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 5E32848660 for ; Wed, 15 May 2024 10:14:49 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E058968D6D9; Wed, 15 May 2024 13:14:45 +0300 (EEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4D12668D538 for ; Wed, 15 May 2024 13:14:38 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715768084; x=1747304084; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=BbdpnU1QgeVRRhDIfYKafBjm9UXmekoXBg/HXbPUMYY=; b=YpP5gJ35oROQTvGIyMQV9NpKvLNdt+XrzDil0h19FVhf1JhLRD50+0Hv PlYQeofVmeL30M927iQybZsLaIYGBezPvwy7ROLtUMk1rcl/41wAhOvjF PILCgXu00SBP/5py653ndHyzQ7Ve9KAZS+VmVirV24awvQa39XHrkZurA mmVxskE0j00aSnVmzLfpZs/js8h2Wisq7PJKspC6vbYn9V6oiRGJmSyY6 xiWwhSxRZCER5AeMI7rUrbSbgkIX5ZQpy6eVZpnYgIFd07M+2IXW1/Ads fVdDftpl3+fHkWUp3eTz+5r/CznL7c9f5xuN5vGzsCo6M7bWiab3g0ahW g==; X-CSE-ConnectionGUID: zA8nicn0Ruyh6UKJemcUCQ== X-CSE-MsgGUID: +0lcfx7/SFGFW5AIfXoO+A== X-IronPort-AV: E=McAfee;i="6600,9927,11073"; a="11661935" X-IronPort-AV: E=Sophos;i="6.08,161,1712646000"; d="scan'208";a="11661935" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 May 2024 03:14:37 -0700 X-CSE-ConnectionGUID: dciX9KOaTP2Mbt+Tm12VHw== X-CSE-MsgGUID: SGDr88U0RJK0cAxfG8DoKA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,161,1712646000"; d="scan'208";a="31095332" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmviesa010.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 15 May 2024 03:14:37 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 15 May 2024 03:14:35 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 15 May 2024 03:14:35 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Wed, 15 May 2024 03:14:35 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.41) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Wed, 15 May 2024 03:14:35 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=icgju5o4s5NicMqlnR0x2yF39/dzj3+iqInLjuvKLg8piFpdgEGhOSRUABIXCrq3oEKaeesSuudmWvXHE4YOBpUwKCa3LPDkn6L+TGDk19bttsN2/1/wCsBR9iVEAGhPhKtmBrKeT3DkDw367zgCwRUBb9ypdjeTaqOMyTPNVPFRUPBmePbRj137y3gmBbNbDb6UUC6r5PmCSwKQQziFw4p6RN//m69EF/1H7GxcC7pCGCoHqXv6I1TcwRgp3l5xm3aZ8r7ImbZig/LHxtHsz1MfqsbSH1U3ydwI0Waz7v0rKVCGy2zogQj6Qho9olfoFlxmzkWhAInFQYkp/yGRjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=GFBTEZl/HbQ3MxxRdzo91iQ9Tk4Zc+ULQpWDVUw2GXg=; b=UIAN/CaoCLa28oAnHCcW8cTr+27/rYJas/dh73QuVWbyWxEe2Xj2qb86VstFX1SrJXvrlCg6TuaIGx2Jv5SEnH7iWbCIygFqApj8kkwUydmXyTJ0LBQSIxYlkEuSxqOFno17sh22EdWvOdoIUFZ/nwbpAF+xDyN1uGzCepA1K7K/VHHq/qs+cpxEUoNgaWFcBifpRN0C4j/xEa0sKMYOi25m/ek9cfPts8jr1WtzjcFWwD/94p8goxFW+wifD97xC7u+ZEHTOmZITY5VtAu0iwtP+IsTG3UrPafyeyZnYyJo5bX+4y0VKCJo+QFHIL9gyfrGT1B2wpvnN6W7yzEesA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from CH3PR11MB8659.namprd11.prod.outlook.com (2603:10b6:610:1cf::5) by DM4PR11MB7255.namprd11.prod.outlook.com (2603:10b6:8:10d::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.55; Wed, 15 May 2024 10:14:33 +0000 Received: from CH3PR11MB8659.namprd11.prod.outlook.com ([fe80::7037:678a:eb45:ac6c]) by CH3PR11MB8659.namprd11.prod.outlook.com ([fe80::7037:678a:eb45:ac6c%3]) with mapi id 15.20.7587.028; Wed, 15 May 2024 10:14:33 +0000 From: "Wu, Tong1" To: FFmpeg development discussions and patches Thread-Topic: [FFmpeg-devel] [PATCH v8 11/15] avcodec/vaapi_encode: extract a get_recon_format function to base layer Thread-Index: AQHapkKQzce9Mp8qV0OV9OMYqxumybGYE+EQ Date: Wed, 15 May 2024 10:14:33 +0000 Message-ID: References: <20240418085910.547-1-tong1.wu@intel.com> <20240418085910.547-11-tong1.wu@intel.com> <90573a46-11d1-42f8-8651-70ad339e94e4@jkqxz.net> In-Reply-To: <90573a46-11d1-42f8-8651-70ad339e94e4@jkqxz.net> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CH3PR11MB8659:EE_|DM4PR11MB7255:EE_ x-ms-office365-filtering-correlation-id: df6fca44-1547-4cb0-5620-08dc74c7d112 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230031|376005|1800799015|366007|38070700009; x-microsoft-antispam-message-info: =?us-ascii?Q?ly527rwLkV1dRRj5IejA7W7NkNIBCAe0CIqlmjHvd4ob16CgmIrcuVdPNir9?= =?us-ascii?Q?m6RdpulNmubfpFQafJ184ZHEO4To1ZYO8Udwrz2xaNG4Cp92t3Ljnf+aSkv9?= =?us-ascii?Q?PEdRbe2HxUxiG7so8dwKUB1fsoewcVM41sOgGPaltC0hIwFrosFBJJV5J3Sr?= =?us-ascii?Q?wXbkz7HF6BO4h/ORqlI9jYbN4jgtnNShlf3YcOoRz0lLyH+uDZBwhAuqbkOF?= =?us-ascii?Q?EBW8dnHILHbuL5xr2USoSDg3ZwEz0HsdXit702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Ypx0CQ4wCZrXbO2Z5tm2cX8Q9WAL0Nwiki//Ada3JwCo?= =?us-ascii?Q?wZX588gX8HxO9tGtuLD7GrUcfVj3fc4QEYugzZ5A4C6MKFFuR11g8nwjKI3L?= =?us-ascii?Q?Ue+7DpcWGhTnp+X0LD45PQCeAx+L9jLqek4OpAOlKw=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH3PR11MB8659.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(1800799015)(366007)(38070700009); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?SC7rcQ/7IbBKvs9ASmhWodB8xOqHfQk4WSe6muPpRzZLzF6jLwKtQ4nReszO?= =?us-ascii?Q?XnUrSCGmO6L6GtDs2vKtXYtP9MVndn2U2P+bLf75zp+hq3mtLtzFcp6gBnQh?= =?us-ascii?Q?cf7UwIngMr8HXALwU8uAH67wc+tqnPG8qloyQTHpAAosU91aunzzZtMKhu0C?= =?us-ascii?Q?RVwfSsMrgOpkdbvrgCgDQlv23jTNUlVnm+cHC6LwK+5QT4bPlL03yNYWMT60?= =?us-ascii?Q?akIAOiIrbi6YS5QjukR07P5YV/wwDXF9vfz/Gcl8KT06qMDMf0TMm1b3OSYn?= =?us-ascii?Q?0beT3UyeGAJUi0XoOKZ/JoBOy+NGd2RKZCIsBu325I5qUkRMZ2dbiTzzZ2nl?= =?us-ascii?Q?3sqkgyOH3MCZ2jn0zSsdI3PMWjtU47Le9da/jmMK9GOFVBE1SjqaVk1FMG1Z?= =?us-ascii?Q?rV43AEbF1AG1Waf6XITspr1bkPriuF+3W8E5XewiEROmAtthCmxT3zOlrgd9?= =?us-ascii?Q?atl61nPjjE01rGCgPmf0AftVNgpql8bWl0c/OJYkUV3UU+O1ps5UUByt8btZ?= =?us-ascii?Q?UP7/AX7IIe/0N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bQX8q6lR?= =?us-ascii?Q?q2c7DXOIsb7xlbiYQmmp4dz5jrUiehWRB2GlEU3GWWsYTJFd//ICwQJiADxV?= =?us-ascii?Q?4Y0/SIpwdiM6azMu90NIGDB2SERTZff562JyUCqqYMFGBQ4Xan1cBpZFHfCs?= =?us-ascii?Q?n8KDhD7CZKgXjrMucH6rXFSN5MwBcLyfEgX0esFp?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CH3PR11MB8659.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: df6fca44-1547-4cb0-5620-08dc74c7d112 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 May 2024 10:14:33.4179 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: vK1H41xegTNh75CdVGWM9HfnywE3vtz5DVAoqOCeLC4azB1NYt3lufhCzzt5rGzvUmlADbycp0VvNW0F4e7OtQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB7255 X-OriginatorOrg: intel.com Subject: Re: [FFmpeg-devel] [PATCH v8 11/15] avcodec/vaapi_encode: extract a get_recon_format function to base layer 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 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: >-----Original Message----- >From: ffmpeg-devel On Behalf Of Mark >Thompson >Sent: Wednesday, May 15, 2024 5:06 AM >To: ffmpeg-devel@ffmpeg.org >Subject: Re: [FFmpeg-devel] [PATCH v8 11/15] avcodec/vaapi_encode: extract a >get_recon_format function to base layer > >On 18/04/2024 09:59, tong1.wu-at-intel.com@ffmpeg.org wrote: >> From: Tong Wu >> >> Surface size and block size parameters are also moved to base layer. >> >> Signed-off-by: Tong Wu >> --- >> libavcodec/hw_base_encode.c | 58 +++++++++++++++++++++++ >> libavcodec/hw_base_encode.h | 12 +++++ >> libavcodec/vaapi_encode.c | 81 ++++++++------------------------- >> libavcodec/vaapi_encode.h | 10 ---- >> libavcodec/vaapi_encode_av1.c | 10 ++-- >> libavcodec/vaapi_encode_h264.c | 11 +++-- >> libavcodec/vaapi_encode_h265.c | 25 +++++----- >> libavcodec/vaapi_encode_mjpeg.c | 5 +- >> libavcodec/vaapi_encode_vp9.c | 6 +-- >> 9 files changed, 118 insertions(+), 100 deletions(-) >> >> diff --git a/libavcodec/hw_base_encode.c b/libavcodec/hw_base_encode.c >> index a4223d90f0..af85bb99aa 100644 >> --- a/libavcodec/hw_base_encode.c >> +++ b/libavcodec/hw_base_encode.c >> @@ -693,6 +693,64 @@ int ff_hw_base_init_gop_structure(AVCodecContext >*avctx, uint32_t ref_l0, uint32 >> return 0; >> } >> >> +int ff_hw_base_get_recon_format(AVCodecContext *avctx, const void >*hwconfig, enum AVPixelFormat *fmt) >> +{ >> + HWBaseEncodeContext *ctx = avctx->priv_data; >> + AVHWFramesConstraints *constraints = NULL; >> + enum AVPixelFormat recon_format; >> + int err, i; >> + >> + constraints = av_hwdevice_get_hwframe_constraints(ctx->device_ref, >> + hwconfig); > >Does this mechanism actually make sense for D3D12? > >VAAPI is the currently the only implementation of this function with non-null >hwconfig, and this is really relying on it to get useful information (otherwise >the formats are just everything the device can allocate as a surface and the >sizes are 0/INT_MAX). > >If D3D12 has something which would fit into the hwconfig method then this >could work very nicely as well, but if it doesn't then presumably it does have >some other calls to check things like the maximum frame size supported by the >encoder and we should be using those rather than making this code generic? > >(Also consider Vulkan if possible; if two thirds of the cases want it then maybe >we should do this even if it doesn't fit in one of them.) For Vulkan the constrains also includes the maximum frame size stuff so I guess this mechanism also works for Vulkan. If so shall we keep this patch? I'm ok for keeping or dropping this patch. And for D3D12 we should probably add the max frame size check afterwards. > >> + if (!constraints) { >> + err = AVERROR(ENOMEM); >> + goto fail; >> + } >> + >> + // Probably we can use the input surface format as the surface format >> + // of the reconstructed frames. If not, we just pick the first (only?) >> + // format in the valid list and hope that it all works. >> + recon_format = AV_PIX_FMT_NONE; >> + if (constraints->valid_sw_formats) { >> + for (i = 0; constraints->valid_sw_formats[i] != AV_PIX_FMT_NONE; i++) { >> + if (ctx->input_frames->sw_format == >> + constraints->valid_sw_formats[i]) { >> + recon_format = ctx->input_frames->sw_format; >> + break; >> + } >> + } >> + if (recon_format == AV_PIX_FMT_NONE) { >> + // No match. Just use the first in the supported list and >> + // hope for the best. >> + recon_format = constraints->valid_sw_formats[0]; >> + } >> + } else { >> + // No idea what to use; copy input format. >> + recon_format = ctx->input_frames->sw_format; >> + } >> + av_log(avctx, AV_LOG_DEBUG, "Using %s as format of " >> + "reconstructed frames.\n", av_get_pix_fmt_name(recon_format)); >> + >> + if (ctx->surface_width < constraints->min_width || >> + ctx->surface_height < constraints->min_height || >> + ctx->surface_width > constraints->max_width || >> + ctx->surface_height > constraints->max_height) { >> + av_log(avctx, AV_LOG_ERROR, "Hardware does not support encoding at >" >> + "size %dx%d (constraints: width %d-%d height %d-%d).\n", >> + ctx->surface_width, ctx->surface_height, >> + constraints->min_width, constraints->max_width, >> + constraints->min_height, constraints->max_height); >> + err = AVERROR(EINVAL); >> + goto fail; >> + } >> + >> + *fmt = recon_format; >> + err = 0; >> +fail: >> + av_hwframe_constraints_free(&constraints); >> + return err; >> +} >> + >> int ff_hw_base_encode_init(AVCodecContext *avctx) >> { >> HWBaseEncodeContext *ctx = avctx->priv_data; >> diff --git a/libavcodec/hw_base_encode.h b/libavcodec/hw_base_encode.h >> index d717f955d8..7686cf9501 100644 >> --- a/libavcodec/hw_base_encode.h >> +++ b/libavcodec/hw_base_encode.h >> @@ -126,6 +126,16 @@ typedef struct HWBaseEncodeContext { >> // Desired B frame reference depth. >> int desired_b_depth; >> >> + // The required size of surfaces. This is probably the input >> + // size (AVCodecContext.width|height) aligned up to whatever >> + // block size is required by the codec. >> + int surface_width; >> + int surface_height; >> + >> + // The block size for slice calculations. >> + int slice_block_width; >> + int slice_block_height; >> + >> // The hardware device context. >> AVBufferRef *device_ref; >> AVHWDeviceContext *device; >> @@ -210,6 +220,8 @@ int >ff_hw_base_encode_receive_packet(AVCodecContext *avctx, AVPacket *pkt); >> int ff_hw_base_init_gop_structure(AVCodecContext *avctx, uint32_t ref_l0, >uint32_t ref_l1, >> int flags, int prediction_pre_only); >> >> +int ff_hw_base_get_recon_format(AVCodecContext *avctx, const void >*hwconfig, enum AVPixelFormat *fmt); >> + >> int ff_hw_base_encode_init(AVCodecContext *avctx); >> >> int ff_hw_base_encode_close(AVCodecContext *avctx); >> ... > >Thanks, > >- Mark >_______________________________________________ >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". _______________________________________________ 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".