From patchwork Wed May 6 05:37:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Fu, Linjie" X-Patchwork-Id: 19514 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 7728544AB8F for ; Wed, 6 May 2020 08:43:28 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4DB7068832F; Wed, 6 May 2020 08:43:28 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2CC8B687FD3 for ; Wed, 6 May 2020 08:43:20 +0300 (EEST) IronPort-SDR: oOJmlnkEHNqLuFY+fE7qWQVvlBqATsWBVJASAY83lt72PXR3b2MJxU8/DsK/S6am36J5kzVsJx zwVNHc0UkVmQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 May 2020 22:43:18 -0700 IronPort-SDR: 5SgLT9gEM1RdtNOaXCpk9h/ILEqCRsJd4AOc9bD1/7hO2FzPUZO2pqAB8fiO5StP/HP8wm7dFg UmCDfsKPvhvA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,358,1583222400"; d="scan'208";a="434757474" Received: from media_lj_kbl.sh.intel.com ([10.239.158.153]) by orsmga005.jf.intel.com with ESMTP; 05 May 2020 22:43:17 -0700 From: Linjie Fu To: ffmpeg-devel@ffmpeg.org Date: Wed, 6 May 2020 13:37:53 +0800 Message-Id: <20200506053753.2194-1-linjie.fu@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [FFmpeg-devel] [PATCH, RFC] lavc/options_table: Add basic candidate h264 profiles 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 Cc: Linjie Fu MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Allows specifying avctx->profile with string type profile for h264 encoders. Private field/option "profile" may be abled to be removed for basic h264 profiles, directly for encoders like libopenh264/h264_vaapi, or with an map to hardware profile like h264_qsv. Signed-off-by: Linjie Fu --- One concern is some encoders have options for specific profiles, like "high444p" for nvenc_h264 and "constrained_high" for h264_amf, hence they may not be able to remove the private option easily. Please help to comment. libavcodec/options_table.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h index 54366747ca..8d41f2755c 100644 --- a/libavcodec/options_table.h +++ b/libavcodec/options_table.h @@ -282,6 +282,10 @@ static const AVOption avcodec_options[] = { {"mpeg4_asp", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PROFILE_MPEG4_ADVANCED_SIMPLE }, INT_MIN, INT_MAX, V|E, "profile"}, {"main10", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PROFILE_HEVC_MAIN_10 }, INT_MIN, INT_MAX, V|E, "profile"}, {"msbc", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PROFILE_SBC_MSBC }, INT_MIN, INT_MAX, A|E, "profile"}, +{"h264_constrained_baseline", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PROFILE_H264_CONSTRAINED_BASELINE }, INT_MIN, INT_MAX, V|E, "profile"}, +{"h264_baseline", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PROFILE_H264_BASELINE }, INT_MIN, INT_MAX, V|E, "profile"}, +{"h264_main", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PROFILE_H264_MAIN }, INT_MIN, INT_MAX, V|E, "profile"}, +{"h264_high", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PROFILE_H264_HIGH }, INT_MIN, INT_MAX, V|E, "profile"}, {"level", NULL, OFFSET(level), AV_OPT_TYPE_INT, {.i64 = FF_LEVEL_UNKNOWN }, INT_MIN, INT_MAX, V|A|E, "level"}, {"unknown", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_LEVEL_UNKNOWN }, INT_MIN, INT_MAX, V|A|E, "level"}, {"lowres", "decode at 1= 1/2, 2=1/4, 3=1/8 resolutions", OFFSET(lowres), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX, V|A|D},