From patchwork Fri Sep 20 21:39:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Martin_Storsj=C3=B6?= X-Patchwork-Id: 51683 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:d154:0:b0:48e:c0f8:d0de with SMTP id bt20csp1245237vqb; Fri, 20 Sep 2024 14:39:22 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXHtlKc+uuNv9IuZYA/fUxWivEWRgmn9oWAdfELk9RPvQLR0K1VbP2++5pnv0keXjMORhFhMjYrK1rerLoBGL/F@gmail.com X-Google-Smtp-Source: AGHT+IGeRapfORStFnzRDY0j0W/dCsQ65Nyzw6A1I4NAceSgRBxhbpTNjttu/i0aBHg/YFeqHE1a X-Received: by 2002:a05:651c:2125:b0:2f7:562d:cb5b with SMTP id 38308e7fff4ca-2f7cb2f987dmr38947961fa.7.1726868361782; Fri, 20 Sep 2024 14:39:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726868361; cv=none; d=google.com; s=arc-20240605; b=fII9OTSnfo7zYUziLZ25CkjgAkw6Eg9go1pCPdZ5gphhEU1aJFnbcNb9uoReAufMNQ fK6iRIQSN2vOga81K6BH7uo4NM0e919t5ddb1HRWOIBcmU1m8RimCiIecbadRO1p1D64 MouB4LvUP2BljDpbVMQ2nh7B4r8e+LXdTeDpBk/R/00GpC3QAJ7beOAH90gng0lcejkV P00K07ettHKmTal72vV8c0Zbu6W2ZGsw5ImG+LycahwKTVa+/e269hCl+JqD17H142rq qRZKo0bzIlbfsrF9+upXb5LpQPNYA17djTmOSl4RuzCDtLxmY20TjwSarJ50QY9uPFKj WDzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=f4lNqoGRwyIgumNeBcxoeDm7ym/ZAtni1NpiLag2BoY=; fh=hplrErllZ4UAr7djWmln0x+whhyV2Tb1Ou2s2xJZd1s=; b=TC1hW09LLbg9lxE3SGx0ya820+BV0fcAvpwkkt4fgn37V2C8cZDjOH6T0GlK7DvspL I7n4d1iLZ7eCgIZzSYe5Sq5oCb9uGN5d+AKUB5i6119tkw9i5LsTRU84m0JHoMi8eUp+ pdCiAPq4XUgN30eV/7s8JpTXR9Le0mphO1WtnpNx7OqOF0Nk8R57x7ZDXoKL/3t+2Nmq fsgHZNjG6yfiWa8wfdu5AYBopRb68MWAhaHjLZtfERh+Nr/SYeZGsv6T6bUO/elCqkf/ JMcEGNK6MVvm0qnk5NyRhUdVfr1K2u6H0uqPIAJnbqYygowF0nspQiTU/Ww5aEDNYwks cYfg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@martin-st.20230601.gappssmtp.com header.s=20230601 header.b=NxiVJQtJ; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a90612caa16si999560266b.408.2024.09.20.14.39.21; Fri, 20 Sep 2024 14:39:21 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@martin-st.20230601.gappssmtp.com header.s=20230601 header.b=NxiVJQtJ; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C318868DBCD; Sat, 21 Sep 2024 00:39:16 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1E5D668D0AD for ; Sat, 21 Sep 2024 00:39:08 +0300 (EEST) Received: by mail-lf1-f41.google.com with SMTP id 2adb3069b0e04-53659867cbdso3855282e87.3 for ; Fri, 20 Sep 2024 14:39:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=martin-st.20230601.gappssmtp.com; s=20230601; t=1726868348; x=1727473148; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=MTqRj3Ho/YdfOAIGqvh5d1Ohjytb0Ezf0VV3zB5qz+c=; b=NxiVJQtJ3Miz6b0Pe1orRx2m6L3ThHEZJldqJQqC+wJGjiBoa7JQC3ZQ9XN2tuA0o8 J1Gak5lWEbN7z2Ob+hqYKqdJRM4ZRJl7e9UwOheryft/Gor2ojtK5OgdIvVXIbWYu39B G+JfPtLlpoFQRTNFD86ltDcCDaQILbASkSv+Eoe6TeUoG57/dDjo1C/dpqtvd+1uSqH/ kbt7zYo/90aR1cZWBUWLVjjS55ueItMC52cQabnutkhqccMBB180c7es3g5LPMW6MAUG He3M2HIsZZXN8ZkX7DxzcRQ1zFYYZzUtz/8pF9sSP75f5y+UCcQY/6No5nfyYsJQ0Yyu Ha0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726868348; x=1727473148; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=MTqRj3Ho/YdfOAIGqvh5d1Ohjytb0Ezf0VV3zB5qz+c=; b=Ul5c6c0Apgusy6h/ViLXEIY5Vi1wbu48eTyiVHUnukZUoa5H9rwktY4EOShlU9qLGt IOdVeqIpkqslvWGUiyypJNBExmjaguR5SXYEPywHEt7pE0beJ6gEadhznZu2icjeY0nr QR+NWBddI+HCfzgCHO489xkPwritJ9V1qmDgJVixwjY6CrkfGkRzY5BOJ/T4BC1MV6wk D5RCNnGRC7IgyWMp3FsF/mklAwD9/jjSapEQfjQDdGeP79Z3Liw5Fje1qy9ODJ+DNuMt RClE8phdhpLpsrIC/2UtntUYzGryVOKUycOgPZaeqh0aZEXUOxq7CFvsigVtjw4vHKyP Vxbg== X-Gm-Message-State: AOJu0Yy/VmAWaYCSG33QnMFPlO99d8Qxtrixo4uOF9sJUigBjqZ0w/7+ NjSiMJQlUNF75MIIxqgxuumUq8IO/Vw15j4Q8IFgRkxjUqAYwDffRzm7mUXEUWIR/tKHpblHxN4 zkQ== X-Received: by 2002:a05:6512:33ca:b0:52e:936e:a237 with SMTP id 2adb3069b0e04-536ac2e5b7amr3158850e87.16.1726868347704; Fri, 20 Sep 2024 14:39:07 -0700 (PDT) Received: from localhost (host-114-191.parnet.fi. [77.234.114.191]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-53687047023sm2316129e87.45.2024.09.20.14.39.07 (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 20 Sep 2024 14:39:07 -0700 (PDT) From: =?utf-8?q?Martin_Storsj=C3=B6?= To: ffmpeg-devel@ffmpeg.org Date: Sat, 21 Sep 2024 00:39:06 +0300 Message-Id: <20240920213906.66044-1-martin@martin.st> X-Mailer: git-send-email 2.39.5 (Apple Git-154) MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avcodec/videotoolbox: add AV1 hardware acceleration X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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 Cc: Ruslan Chernenko , =?utf-8?q?Jan_Ekstr=C3=B6m?= Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: yQYng/lspxul From: Jan Ekström Co-authored-by: Ruslan Chernenko Co-authored-by: Martin Storsjö --- This is a touched up version of Jan and Ruslan's patches for AV1 hwaccel via videotoolbox; I tried to polish the code a little by not overwriting avctx->extradata in ff_videotoolbox_av1c_extradata_create, and by factorizing out a new function ff_videotoolbox_buffer_append. --- configure | 4 ++ libavcodec/Makefile | 1 + libavcodec/av1dec.c | 10 +++ libavcodec/hwaccels.h | 1 + libavcodec/videotoolbox.c | 34 +++++++++++ libavcodec/videotoolbox_av1.c | 112 ++++++++++++++++++++++++++++++++++ libavcodec/vt_internal.h | 4 ++ 7 files changed, 166 insertions(+) create mode 100644 libavcodec/videotoolbox_av1.c diff --git a/configure b/configure index 8fbf3772a8..bc244d7ca2 100755 --- a/configure +++ b/configure @@ -2464,6 +2464,7 @@ TYPES_LIST=" kCMVideoCodecType_HEVC kCMVideoCodecType_HEVCWithAlpha kCMVideoCodecType_VP9 + kCMVideoCodecType_AV1 kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange kCVPixelFormatType_422YpCbCr8BiPlanarVideoRange kCVPixelFormatType_422YpCbCr10BiPlanarVideoRange @@ -3171,6 +3172,8 @@ av1_vaapi_hwaccel_deps="vaapi VADecPictureParameterBufferAV1_bit_depth_idx" av1_vaapi_hwaccel_select="av1_decoder" av1_vdpau_hwaccel_deps="vdpau VdpPictureInfoAV1" av1_vdpau_hwaccel_select="av1_decoder" +av1_videotoolbox_hwaccel_deps="videotoolbox" +av1_videotoolbox_hwaccel_select="av1_decoder" av1_vulkan_hwaccel_deps="vulkan" av1_vulkan_hwaccel_select="av1_decoder" h263_vaapi_hwaccel_deps="vaapi" @@ -6690,6 +6693,7 @@ enabled videotoolbox && { check_func_headers CoreMedia/CMFormatDescription.h kCMVideoCodecType_HEVC "-framework CoreMedia" check_func_headers CoreMedia/CMFormatDescription.h kCMVideoCodecType_HEVCWithAlpha "-framework CoreMedia" check_func_headers CoreMedia/CMFormatDescription.h kCMVideoCodecType_VP9 "-framework CoreMedia" + check_func_headers CoreMedia/CMFormatDescription.h kCMVideoCodecType_AV1 "-framework CoreMedia" check_func_headers CoreVideo/CVPixelBuffer.h kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange "-framework CoreVideo" check_func_headers CoreVideo/CVPixelBuffer.h kCVPixelFormatType_422YpCbCr8BiPlanarVideoRange "-framework CoreVideo" check_func_headers CoreVideo/CVPixelBuffer.h kCVPixelFormatType_422YpCbCr10BiPlanarVideoRange "-framework CoreVideo" diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 936fc3415a..fa6d30a8b3 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -1007,6 +1007,7 @@ OBJS-$(CONFIG_AV1_D3D12VA_HWACCEL) += dxva2_av1.o d3d12va_av1.o OBJS-$(CONFIG_AV1_NVDEC_HWACCEL) += nvdec_av1.o OBJS-$(CONFIG_AV1_VAAPI_HWACCEL) += vaapi_av1.o OBJS-$(CONFIG_AV1_VDPAU_HWACCEL) += vdpau_av1.o +OBJS-$(CONFIG_AV1_VIDEOTOOLBOX_HWACCEL) += videotoolbox_av1.o OBJS-$(CONFIG_AV1_VULKAN_HWACCEL) += vulkan_decode.o vulkan_av1.o OBJS-$(CONFIG_H263_VAAPI_HWACCEL) += vaapi_mpeg4.o OBJS-$(CONFIG_H263_VIDEOTOOLBOX_HWACCEL) += videotoolbox.o diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c index 1d5b9ef4f4..0fad09af74 100644 --- a/libavcodec/av1dec.c +++ b/libavcodec/av1dec.c @@ -541,6 +541,7 @@ static int get_pixel_format(AVCodecContext *avctx) CONFIG_AV1_NVDEC_HWACCEL + \ CONFIG_AV1_VAAPI_HWACCEL + \ CONFIG_AV1_VDPAU_HWACCEL + \ + CONFIG_AV1_VIDEOTOOLBOX_HWACCEL + \ CONFIG_AV1_VULKAN_HWACCEL) enum AVPixelFormat pix_fmts[HWACCEL_MAX + 2], *fmtp = pix_fmts; @@ -568,6 +569,9 @@ static int get_pixel_format(AVCodecContext *avctx) #if CONFIG_AV1_VDPAU_HWACCEL *fmtp++ = AV_PIX_FMT_VDPAU; #endif +#if CONFIG_AV1_VIDEOTOOLBOX_HWACCEL + *fmtp++ = AV_PIX_FMT_VIDEOTOOLBOX; +#endif #if CONFIG_AV1_VULKAN_HWACCEL *fmtp++ = AV_PIX_FMT_VULKAN; #endif @@ -592,6 +596,9 @@ static int get_pixel_format(AVCodecContext *avctx) #if CONFIG_AV1_VDPAU_HWACCEL *fmtp++ = AV_PIX_FMT_VDPAU; #endif +#if CONFIG_AV1_VIDEOTOOLBOX_HWACCEL + *fmtp++ = AV_PIX_FMT_VIDEOTOOLBOX; +#endif #if CONFIG_AV1_VULKAN_HWACCEL *fmtp++ = AV_PIX_FMT_VULKAN; #endif @@ -1594,6 +1601,9 @@ const FFCodec ff_av1_decoder = { #if CONFIG_AV1_VDPAU_HWACCEL HWACCEL_VDPAU(av1), #endif +#if CONFIG_AV1_VIDEOTOOLBOX_HWACCEL + HWACCEL_VIDEOTOOLBOX(av1), +#endif #if CONFIG_AV1_VULKAN_HWACCEL HWACCEL_VULKAN(av1), #endif diff --git a/libavcodec/hwaccels.h b/libavcodec/hwaccels.h index 5171e4c7d7..2b9bdc8fc9 100644 --- a/libavcodec/hwaccels.h +++ b/libavcodec/hwaccels.h @@ -26,6 +26,7 @@ extern const struct FFHWAccel ff_av1_dxva2_hwaccel; extern const struct FFHWAccel ff_av1_nvdec_hwaccel; extern const struct FFHWAccel ff_av1_vaapi_hwaccel; extern const struct FFHWAccel ff_av1_vdpau_hwaccel; +extern const struct FFHWAccel ff_av1_videotoolbox_hwaccel; extern const struct FFHWAccel ff_av1_vulkan_hwaccel; extern const struct FFHWAccel ff_h263_vaapi_hwaccel; extern const struct FFHWAccel ff_h263_videotoolbox_hwaccel; diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c index 3c6df8b4ab..90c1fbfb10 100644 --- a/libavcodec/videotoolbox.c +++ b/libavcodec/videotoolbox.c @@ -56,6 +56,10 @@ enum { kCMVideoCodecType_HEVC = 'hvc1' }; enum { kCMVideoCodecType_VP9 = 'vp09' }; #endif +#if !HAVE_KCMVIDEOCODECTYPE_AV1 +enum { kCMVideoCodecType_AV1 = 'av01' }; +#endif + #define VIDEOTOOLBOX_ESDS_EXTRADATA_PADDING 12 typedef struct VTHWFrame { @@ -92,6 +96,26 @@ int ff_videotoolbox_buffer_copy(VTContext *vtctx, return 0; } +int ff_videotoolbox_buffer_append(VTContext *vtctx, + const uint8_t *buffer, + uint32_t size) +{ + void *tmp; + + tmp = av_fast_realloc(vtctx->bitstream, + &vtctx->allocated_size, + vtctx->bitstream_size + size); + + if (!tmp) + return AVERROR(ENOMEM); + + vtctx->bitstream = tmp; + memcpy(vtctx->bitstream + vtctx->bitstream_size, buffer, size); + vtctx->bitstream_size += size; + + return 0; +} + static int videotoolbox_postproc_frame(void *avctx, AVFrame *frame) { int ret; @@ -846,6 +870,13 @@ static CFDictionaryRef videotoolbox_decoder_config_create(CMVideoCodecType codec if (data) CFDictionarySetValue(avc_info, CFSTR("vpcC"), data); break; +#endif +#if CONFIG_AV1_VIDEOTOOLBOX_HWACCEL + case kCMVideoCodecType_AV1 : + data = ff_videotoolbox_av1c_extradata_create(avctx); + if (data) + CFDictionarySetValue(avc_info, CFSTR("av1C"), data); + break; #endif default: break; @@ -912,6 +943,9 @@ static int videotoolbox_start(AVCodecContext *avctx) case AV_CODEC_ID_VP9 : videotoolbox->cm_codec_type = kCMVideoCodecType_VP9; break; + case AV_CODEC_ID_AV1 : + videotoolbox->cm_codec_type = kCMVideoCodecType_AV1; + break; default : break; } diff --git a/libavcodec/videotoolbox_av1.c b/libavcodec/videotoolbox_av1.c new file mode 100644 index 0000000000..9ccf65bb25 --- /dev/null +++ b/libavcodec/videotoolbox_av1.c @@ -0,0 +1,112 @@ +/* + * Videotoolbox hardware acceleration for AV1 + * Copyright (c) 2023 Jan Ekström + * Copyright (c) 2024 Ruslan Chernenko + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "libavutil/mem.h" + +#include "av1dec.h" +#include "hwaccel_internal.h" +#include "internal.h" +#include "vt_internal.h" + +CFDataRef ff_videotoolbox_av1c_extradata_create(AVCodecContext *avctx) +{ + AV1DecContext *s = avctx->priv_data; + uint8_t *buf; + CFDataRef data; + if (!s->raw_seq) + return NULL; + + buf = av_malloc(s->seq_data_ref->size + 4); + if (!buf) + return NULL; + buf[0] = 0x81; // version and marker (constant) + buf[1] = s->raw_seq->seq_profile << 5 | s->raw_seq->seq_level_idx[0]; + buf[2] = s->raw_seq->seq_tier[0] << 7 | + s->raw_seq->color_config.high_bitdepth << 6 | + s->raw_seq->color_config.twelve_bit << 5 | + s->raw_seq->color_config.mono_chrome << 4 | + s->raw_seq->color_config.subsampling_x << 3 | + s->raw_seq->color_config.subsampling_y << 2 | + s->raw_seq->color_config.chroma_sample_position; + + if (s->raw_seq->initial_display_delay_present_flag) + buf[3] = 0 << 5 | + s->raw_seq->initial_display_delay_present_flag << 4 | + s->raw_seq->initial_display_delay_minus_1[0]; + else + buf[3] = 0x00; + memcpy(buf + 4, s->seq_data_ref->data, s->seq_data_ref->size); + data = CFDataCreate(kCFAllocatorDefault, buf, s->seq_data_ref->size + 4); + av_free(buf); + return data; +}; + + +static int videotoolbox_av1_decode_params(AVCodecContext *avctx, + int header_type, + const uint8_t *buffer, + uint32_t size) +{ + VTContext *vtctx = avctx->internal->hwaccel_priv_data; + return ff_videotoolbox_buffer_append(vtctx, buffer, size); +} + +static int videotoolbox_av1_start_frame(AVCodecContext *avctx, + const uint8_t *buffer, + uint32_t size) +{ + VTContext *vtctx = avctx->internal->hwaccel_priv_data; + return ff_videotoolbox_buffer_append(vtctx, buffer, size); +} + +static int videotoolbox_av1_decode_slice(AVCodecContext *avctx, + const uint8_t *buffer, + uint32_t size) +{ + return 0; +} + +static int videotoolbox_av1_end_frame(AVCodecContext *avctx) +{ + const AV1DecContext *s = avctx->priv_data; + VTContext *vtctx = avctx->internal->hwaccel_priv_data; + AVFrame *frame = s->cur_frame.f; + int ret = ff_videotoolbox_common_end_frame(avctx, frame); + vtctx->bitstream_size = 0; + return ret; +} + +const FFHWAccel ff_av1_videotoolbox_hwaccel = { + .p.name = "av1_videotoolbox", + .p.type = AVMEDIA_TYPE_VIDEO, + .p.id = AV_CODEC_ID_AV1, + .p.pix_fmt = AV_PIX_FMT_VIDEOTOOLBOX, + .alloc_frame = ff_videotoolbox_alloc_frame, + .decode_params = videotoolbox_av1_decode_params, + .start_frame = videotoolbox_av1_start_frame, + .decode_slice = videotoolbox_av1_decode_slice, + .end_frame = videotoolbox_av1_end_frame, + .frame_params = ff_videotoolbox_frame_params, + .init = ff_videotoolbox_common_init, + .uninit = ff_videotoolbox_uninit, + .priv_data_size = sizeof(VTContext), +}; diff --git a/libavcodec/vt_internal.h b/libavcodec/vt_internal.h index 9502d7c7dc..effa96fc15 100644 --- a/libavcodec/vt_internal.h +++ b/libavcodec/vt_internal.h @@ -56,6 +56,9 @@ int ff_videotoolbox_frame_params(AVCodecContext *avctx, int ff_videotoolbox_buffer_copy(VTContext *vtctx, const uint8_t *buffer, uint32_t size); +int ff_videotoolbox_buffer_append(VTContext *vtctx, + const uint8_t *buffer, + uint32_t size); int ff_videotoolbox_uninit(AVCodecContext *avctx); int ff_videotoolbox_h264_start_frame(AVCodecContext *avctx, const uint8_t *buffer, @@ -64,6 +67,7 @@ int ff_videotoolbox_h264_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size); int ff_videotoolbox_common_end_frame(AVCodecContext *avctx, AVFrame *frame); +CFDataRef ff_videotoolbox_av1c_extradata_create(AVCodecContext *avctx); CFDataRef ff_videotoolbox_avcc_extradata_create(AVCodecContext *avctx); CFDataRef ff_videotoolbox_hvcc_extradata_create(AVCodecContext *avctx); CFDataRef ff_videotoolbox_vpcc_extradata_create(AVCodecContext *avctx);