From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 685F247534 for ; Thu, 12 Oct 2023 12:49:59 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 276F468C9B5; Thu, 12 Oct 2023 15:49:57 +0300 (EEST) Received: from out203-205-221-233.mail.qq.com (out203-205-221-233.mail.qq.com [203.205.221.233]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9CF7B68C901 for ; Thu, 12 Oct 2023 15:49:47 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1697114977; bh=3Ko8fJjVPKnwNTe7kAw1X9EzwOvGzvDboLlb5wbzHbw=; h=From:To:Cc:Subject:Date; b=Uh/e+CseyWwGKD/oxS/d02tdQS6woE1CIQgnwYA6saaFaU7LHXzLyczpPCPlo4r8i zIho1y8yZ6QDOzriANcGcfbiZheAaliQeSVI8mzM1jDxI0itbGjHN3q5m1WvMwIA8X HQV0VthI1S/bQxQQDW9YNLBA/HALJP77X1Kj7U1s= Received: from ZHILIZHAO-MB1.tencent.com ([119.147.10.203]) by newxmesmtplogicsvrsza12-0.qq.com (NewEsmtp) with SMTP id C63ACE9D; Thu, 12 Oct 2023 20:49:35 +0800 X-QQ-mid: xmsmtpt1697114975tlha6wzg1 Message-ID: X-QQ-XMAILINFO: N5sfBKY/oC4kx1Ju889OG8YMoRB2zSjFvHvkQmoYorcgs3WAivzwMt8iTh7qQj N2+mlWpi8W4e13qtvJYriQXs8zIFRk+wfRJKpBY5NScogZaGucYorfJwgjWCMB8+tM25IO9yu9nX HEq4G+zAuDEvKnWOVLkKeYI/IhoEWYQmo0yvTgUJhF7OthzdTbEwTE9zpc0W+KdFP/ELlY6nsJoK tOIEOGBGOJ1Y51crbji/zMcs87UQ2sVG8r1oiVd/nUsm3He7Uieo5/b8vl8u9OunKhJMcGY9WuCU wS4nEQfYehMsyw5+4jZir0ev/R6HaEmyrYGgX/HgXM855VWVcpJbj95trvDOkzXVDMWcQERK+abQ OKH0uZxNu+O4eV+/67Ggbty8cM4oGkwMbc672qsqxWlIT+HAwO3aMvGP1DJsaJQgt0AO11d/nLNe 9FoS3U/RWlgVY6HjANdPTW0vMvYZ/ueMxhpVtaTHUzL4iCwhDUfFgQfyOdswwvmPLQb0DTX+7Do8 CliLW08VgwBpMBensx1NULdS+SEDeDHf3kBqFiAf2KfZSn2ndK4Noq8iWZlrtEbbIeJ4DM+2xVE8 ftD1AgolN2C90pz68RyNce9K/fQ+dyU+fWveKfh6c/bZCzqMbFHwnr6miGY/OkdFftdpQ5e3Z7vV RaIvz8DuOGC3b46AzGbCMr6R1vCG2/Yg+31/alysltnpguIVnn2lQgdzh+ORLb9kRgK3Fhoy6K18 VMlUrXkT9NxCKpoHfKTyr6gyfS7WBf0y+WpUxrsBaGL1WATgmqvwwZMjTHd8BcFoozfdHoUuRi6a TI/fat6c9KSGYq+stcBUENwgzA8pZk23vD3ACyYpVb2rKS+AsFEZdSdQ7HK09ZTDF5ktJhkfkOB1 Q7EbayLd/mFERRhV8AZm0qbBxmiDkh0pEmQrQeDk2tTfd15Rn/hCVg7yHmIPZl5Y6j++M/uf/InG BtFLXmHNqJN5BhokSphpktqEfAwHtiJ1DYX2u4kfs= X-QQ-XMRINFO: Mp0Kj//9VHAxr69bL5MkOOs= From: Zhao Zhili To: ffmpeg-devel@ffmpeg.org Date: Thu, 12 Oct 2023 20:49:33 +0800 X-OQ-MSGID: <20231012124934.27842-1-quinkblack@foxmail.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/2] avcodec/videotoolboxenc: add hw_configs 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: Zhao Zhili Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: From: Zhao Zhili Will be used in the following patches. --- libavcodec/videotoolboxenc.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c index 1d1595329a..b685bf4cc4 100644 --- a/libavcodec/videotoolboxenc.c +++ b/libavcodec/videotoolboxenc.c @@ -37,6 +37,7 @@ #include "encode.h" #include "h264.h" #include "h264_sei.h" +#include "hwconfig.h" #include #if !HAVE_KCMVIDEOCODECTYPE_HEVC @@ -2830,6 +2831,11 @@ static const enum AVPixelFormat prores_pix_fmts[] = { "Sets the maximum number of reference frames. This only has an effect when the value is less than the maximum allowed by the profile/level.", \ OFFSET(max_ref_frames), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE }, +static const AVCodecHWConfigInternal *const vt_encode_hw_configs[] = { + HW_CONFIG_ENCODER_FRAMES(VIDEOTOOLBOX, VIDEOTOOLBOX), + NULL, +}; + #define OFFSET(x) offsetof(VTEncContext, x) static const AVOption h264_options[] = { { "profile", "Profile", OFFSET(profile), AV_OPT_TYPE_INT, { .i64 = AV_PROFILE_UNKNOWN }, AV_PROFILE_UNKNOWN, INT_MAX, VE, "profile" }, @@ -2886,6 +2892,7 @@ const FFCodec ff_h264_videotoolbox_encoder = { .close = vtenc_close, .p.priv_class = &h264_videotoolbox_class, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, + .hw_configs = vt_encode_hw_configs, }; static const AVOption hevc_options[] = { @@ -2923,6 +2930,7 @@ const FFCodec ff_hevc_videotoolbox_encoder = { .p.priv_class = &hevc_videotoolbox_class, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, .p.wrapper_name = "videotoolbox", + .hw_configs = vt_encode_hw_configs, }; static const AVOption prores_options[] = { @@ -2961,4 +2969,5 @@ const FFCodec ff_prores_videotoolbox_encoder = { .p.priv_class = &prores_videotoolbox_class, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, .p.wrapper_name = "videotoolbox", + .hw_configs = vt_encode_hw_configs, }; -- 2.42.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".