From patchwork Mon Nov 23 19:10:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jan_Ekstr=C3=B6m?= X-Patchwork-Id: 23978 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 0841E449287 for ; Mon, 23 Nov 2020 21:17:01 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E0FA968BB97; Mon, 23 Nov 2020 21:17:00 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lj1-f194.google.com (mail-lj1-f194.google.com [209.85.208.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0650768BB49 for ; Mon, 23 Nov 2020 21:16:55 +0200 (EET) Received: by mail-lj1-f194.google.com with SMTP id f24so6386851ljk.13 for ; Mon, 23 Nov 2020 11:16:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=0qFqSW5zdEVaHUeMt75x6NNqscBBU6C8lnA/Y6sMpqo=; b=aRxwNsTVm+mBh2mafQPA5RTNBwcHu1AztixXj9ucf03TTsQMapQHHSmB2mNfXW/kIc b9FHIEAfp9oB6HfvTYa/ILW//X29pFdQ+SNm3Hj15gd0XI15lAJKqIWmecRgo7UV/ci/ OPRHjkIv2bv2QIJy/I89YD90LAP/24pv5WBIg2SC+Tl041X3S/M5s+0AS6eMZD1k2PuN cc9aQ9sYy+AgOXbvEE6AEKbUpHRTPD4HmPlpKMN9vm5SY788GFY8p1BlbiI87mAhpTTF XZpGqjrB7DjrKAxnENP/0x+7U1P1eDtdsO7AX8LJJge6TtDH3i8v6xCDZOdb9bA4PCT7 aF6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=0qFqSW5zdEVaHUeMt75x6NNqscBBU6C8lnA/Y6sMpqo=; b=PkTKEgj9MVB0SO8CgRwl4uYHaysQIFHxuQwe+iALa8CBKyNuoNWogh4t9Kv8EbClo5 HH/DP9O+rBQghGLrJBclqeMvXYWrROA9jOBiP7jPCMqnI0Wi3xGmRww8pigP2EjDtR1b nKe/1LkV8v7fszxGho1cL7TFgw2Ud1zungqYyUfOTWhBYgDJlelyX7zuyw8EnRZdcGc/ BnFC72oXip05uuGiH4z1lHgbs2GUuuBjMyP9XWyotZlyxc+T1/tq9LX9uCZwZY1ChO7w pCfEcnMpOF/6AF59Hi0fGHWJkfO+GopHOf/mp+YNh0lJkRUusPnEyh9VLPACt+RQlxc6 WNvg== X-Gm-Message-State: AOAM533/cCEmLhIPseb6s9O13T53XBgSVniKrSGjGR3J3OFcZC2dIaER BZL+4/p0Et+JVVpSgZutKiRQQLFgwLaA3w== X-Google-Smtp-Source: ABdhPJwzHJDacxfSbbtgbnqERW/ho5pDIGg/aFFYfWKkuvzTAApo4h/JZ68Gn63EnT/Ky8yFhKxD/g== X-Received: by 2002:a05:651c:112e:: with SMTP id e14mr336084ljo.388.1606158650420; Mon, 23 Nov 2020 11:10:50 -0800 (PST) Received: from localhost.localdomain (91-159-194-103.elisa-laajakaista.fi. [91.159.194.103]) by smtp.gmail.com with ESMTPSA id j19sm1469995lfb.29.2020.11.23.11.10.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Nov 2020 11:10:49 -0800 (PST) From: =?utf-8?q?Jan_Ekstr=C3=B6m?= To: ffmpeg-devel@ffmpeg.org Date: Mon, 23 Nov 2020 21:10:40 +0200 Message-Id: <20201123191046.28887-1-jeebjp@gmail.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 0/6] Add support for utilizing av1c as extradata X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Until now an API user with a non-libavformat MP4 or Matroska demuxer would have had to manually filter the extradata to skip the first four bytes when passing data to libavcodec, so that only the OBUs would remain. Now the AV1CodecConfigurationRecord structure can be passed to libavcodec as-is. This is lets it to be dealt with in a similar manner to AVC or HEVC. This is done in the following steps: 1. A nice helper by Mark is added so that it can be utilized in stead of ff_cbs_read from both the decoder and parser after the CBS gains the capability to handle AV1CodecConfigurationRecord structures. 2. Support is added to AV1 CBS for handling AV1CodecConfigurationRecord in a similar vein to AVC/HEVC's avcc/hvcc handling. 3. AV1 decoder and parser are switched to utilize the newly added helper functionality. 4. Support is added for writing out the passed AV1CodecConfigurationRecord in ff_isom_write_av1c, which is called from the MP4 and Matroska writers. 5. Finally, both MP4 and Matroska demuxers are changed to expose the full AV1CodecConfigurationRecord as extradata. Jan Ekström (5): avcodec/cbs_av1: add support for standard MP4/Matroska extradata avcodec/av1{dec,parser}: move to ff_cbs_read_extradata_from_codec avformat/av1: add support for passing through MP4/Matroska av1c avformat/mov: remove special handling of av1c extradata avformat/matroskadec: remove special handling of av1c extradata Mark Thompson (1): cbs: Add function to read extradata from an AVCodecContext libavcodec/av1_parser.c | 2 +- libavcodec/av1dec.c | 5 ++- libavcodec/cbs.c | 77 ++++++++++++++++++++------------------- libavcodec/cbs.h | 11 ++++++ libavcodec/cbs_av1.c | 34 +++++++++++++++++ libavformat/av1.c | 14 +++++++ libavformat/matroskadec.c | 4 -- libavformat/mov.c | 30 +-------------- 8 files changed, 103 insertions(+), 74 deletions(-)