From patchwork Tue Apr 6 21:55:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 26785 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 B564844AF20 for ; Wed, 7 Apr 2021 00:55:59 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A1C7368A7DE; Wed, 7 Apr 2021 00:55:59 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-oln040092068068.outbound.protection.outlook.com [40.92.68.68]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5A1EB68A6EE for ; Wed, 7 Apr 2021 00:55:51 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cE8nWlsUGa3KnArD7v3m5Krse1AH4PeaxMFs1MHhrpnZZENEZs4IM6nqcp4S8esMwPcOH6onQvBwK0QJJI4hbpbOdLfpoRwLYiLNgFr6zrT7sLZRMlcfY6Ba626/jsQ/8YojgqihzrkahTmkHvp+Ade8MwuP0ugfdKXQT3qGWiz6zcWVSf+H3GnD8OKhGbYJGJFOMGxowubaH9rxraHTwZN3nlgDHl0XUBB8/B0h4z9HGp4CKRXcnUrv7DXOvNOohntyUAWJx//qmpzc9RMaOyrYOld4STQ4iIMAAgfIlRgX9HYuoLWc3EQrtJuH9u77jG3bppOIQwF08kGGz05/ww== 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-SenderADCheck; bh=ohEQL2j8VC5WGFj/rLEkwWtj7v6xNicUCVDrkIEiVQE=; b=SrJ1LZf9etz26RNx92lAW+IFmURt0w6l1aZYyXqrxvkSQ8m40p7Kb2pHMBPqlVqsxo7LjdfoptkypwDZV+tzTZ7YzjmB5Orz9heok8lkjL36FGuYxWMPUg81QdZzMGGbj9pSaly9hfMkRQ9Jgl/uIF1QJ2oG/urSf7piw/dEUZ8mgbEbMUPSYx6B8WgXRD17IBU2gNwihgz8Et2Zo+/+3nyw0fPWSbSsM+DIqwKExaQomVkzSFivKPuihbPr5zD8zMUD6GIBKrfLwVllOAZ2MztWj69TceaAZxBNyAJ3yBjOvPXXp1/I0upEALj6oX9yspH2YCczsmke40zO++KwnQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ohEQL2j8VC5WGFj/rLEkwWtj7v6xNicUCVDrkIEiVQE=; b=caTrKhhnr4RSEQ3LL/EpR66KA2XUAdcXXksEcJ76ps9Nb01Z+dEYEZ1Rs/d90R/2fZH7oo3geJ3xSnNTtWdznynTdLh/K2iD5RmnBQihHCb9e8Qy4bGrWPN1y4p0Q6T4RaJr27zyfB231HNwGa1rAvV6SBnIuA0gO4GtCnkHG2jFgEIT2mojn8cCv61UlvhdXTMVdh/mZjUvqshrEjWH5IDgi6vb0aiEUuEODuWNXUsD3ncrB9UeVY5qxOFsa1/Z+As6fW+4ZYkQtM3Uhw9jV/zN012nwQd9AFpFoGJZbS3MGFRI7EC07VBE5WfEg49vXP1Ioj/DnPIAFyOEa/4UKQ== Received: from AM5EUR02FT037.eop-EUR02.prod.protection.outlook.com (2a01:111:e400:7e1c::48) by AM5EUR02HT011.eop-EUR02.prod.protection.outlook.com (2a01:111:e400:7e1c::79) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3999.28; Tue, 6 Apr 2021 21:55:50 +0000 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com (2a01:111:e400:7e1c::46) by AM5EUR02FT037.mail.protection.outlook.com (2a01:111:e400:7e1c::182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3999.28 via Frontend Transport; Tue, 6 Apr 2021 21:55:50 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:0A9223D0EBF5D4E069BD59488558B4089E5A2F3C8366EC6486F1C905C5CFD6FF; UpperCasedChecksum:AE0C088A406FA59F6A0D33F6E59C396DBBE918E92D07E8FD0F8D86D2FB9BC88E; SizeAsReceived:7601; Count:48 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com ([fe80::8128:5de5:4e94:9a21]) by HE1PR0301MB2154.eurprd03.prod.outlook.com ([fe80::8128:5de5:4e94:9a21%3]) with mapi id 15.20.3999.032; Tue, 6 Apr 2021 21:55:50 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 6 Apr 2021 23:55:13 +0200 Message-ID: X-Mailer: git-send-email 2.27.0 In-Reply-To: References: X-TMN: [4dV8Lm5MLjz6hQ33MUHLaM2wzFu+IzZi] X-ClientProxiedBy: ZR0P278CA0046.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:1d::15) To HE1PR0301MB2154.eurprd03.prod.outlook.com (2603:10a6:3:2a::22) X-Microsoft-Original-Message-ID: <20210406215516.832944-7-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.137.96) by ZR0P278CA0046.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:1d::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.16 via Frontend Transport; Tue, 6 Apr 2021 21:55:49 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: a71ce7c2-ec70-4749-ae21-08d8f946bdbb X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiRct5ooVDkA416xUUNF5iBF0DWG24et7AwhBWAYAEWl6RmWTzFZCdZQIJU2lj3iGJyu7cCZjRy6JY2Z9ezIms3RakcTvUR/FsVEePF8UcrQGsegFGrbTRqz4qKcxXbjAfYvYb+CBRsdb/z9rtFi1uKAfWDrH/ae0vvt9qVaA94v2Hjd5JJm7K3qdVvtY1B+8wjT63NtDz5LXxUkldi09nLOSjAdd85C+YddC60BLHV8U0DeC9mwvoxm46h+31p7deiXUpKM2sRy05JHXXJf47c//wkhh08N51p1wbcQQ1Y/J2cirjZddafV/mtPCOnu0CdZKcuAR6VHTYNWoFep9iFDvT8tHFCs1y8xiRTBRri2VW97cInZwfnkaU9qcESyb8ZZ9w8KCQj+IIIc8MTESC4toJS97k+Unz9hPxUZRs0uKJLB0qyCnX/QNMOcLd13PRtSPmECRuTpNleGL0imJaNGAaf5ztIoV4CYahYKAlOihJ8MbAXMw4K0wV7ZnPIX1BpHxuE/0OQzefRMLgisB9jPk7PF3iaqdDyKe+4u66afNKn5VIaY+95VbW4I0kaapRL/gMaYl7vk7ipeLKXQZV2+idItlYBfRn2GmeLfJccBF0qdEK/HYx6b9G+Il+jcabAfXuhDVRd7x0ACGBK9LbQ4jgXu1ZIifZVh0FZbPhIsLJQ6IEJW6fPHoWG5W82vpc16MP9J07iMsTQuiJDugTrVSkaVcvePwvV6OokTyohNSdQ4CLDTe1aVOsfXzs6g4ro= X-MS-TrafficTypeDiagnostic: AM5EUR02HT011: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1M9goaNel1MXHi3VdBY2qwJ04YmV8fRrvxN86wxX6T9+YAtASwarSPLxOKaWuFn6PSpovoNhgOmWvMiNc9fpvR+mA1eSN8gwzMj81NRV6z3OncC1djzZmy82cDFh/4C4atTuM1Ogp522PvlDDgo8LA5NhKx3HWlGaspQlcNar3n6iD/lERNEzZGLHS7zmNWtXlpfJ6yE9MREAy7WzbBlaNkYRWUb4c9jHYmAFQzyi/DeXL6xgXXqxbhswjYcU8f1nkr3O3R8FY1Rhq6wgQFN9ZVHePS8Qx8adVFJLsI63k/jp03CXluBPnK7cAll+k8ZphUnc0aHcZVcl7UpUoyPsSexHXzLYPvmMnTnf5lN5dwxVXsR91FOjFQ49121ZYVYtjZ/bJJN0TDR5///nV8Nng== X-MS-Exchange-AntiSpam-MessageData: gPCXg0r7lSMdAcf84/ZEsf7akAJak06bc/LjKFrPmEJ+Nd6WQSBmKqGCo+CGIFfbkrs6kEKycwyhL1CACusorLNCf78WbvlcYfGFe3DsEGRQrfdm2kGXhsDuMK8I6cwbWybI5D6zo/6Nkb/g3d7tDw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a71ce7c2-ec70-4749-ae21-08d8f946bdbb X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Apr 2021 21:55:50.1114 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: AM5EUR02FT037.eop-EUR02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5EUR02HT011 Subject: [FFmpeg-devel] [PATCH 16/19] avcodec/mpegvideo: Deprecate a53cc option for encoders != MPEG-2 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: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" The MPEG-2 encoder is the only mpegvideo-based encoder that supports embedding a53 side data. Signed-off-by: Andreas Rheinhardt --- I am surprised that no one seems to have noticed this when this option has been added. libavcodec/mjpegenc.c | 1 + libavcodec/mpeg12enc.c | 2 ++ libavcodec/mpeg4videoenc.c | 3 +++ libavcodec/mpegvideo.h | 3 ++- libavcodec/mpegvideo_enc.c | 3 +++ 5 files changed, 11 insertions(+), 1 deletion(-) diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c index 6c261a1397..86a18ec6a9 100644 --- a/libavcodec/mjpegenc.c +++ b/libavcodec/mjpegenc.c @@ -595,6 +595,7 @@ FF_MPV_COMMON_OPTS { "optimal", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = HUFFMAN_TABLE_OPTIMAL }, INT_MIN, INT_MAX, VE, "huffman" }, #if FF_API_MPEGVIDEO_OPTS FF_MPV_DEPRECATED_MPEG_QUANT_OPT +FF_MPV_DEPRECATED_A53_CC_OPT #endif { NULL}, }; diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c index 99c79a4232..5b8ccf3ce1 100644 --- a/libavcodec/mpeg12enc.c +++ b/libavcodec/mpeg12enc.c @@ -1154,6 +1154,7 @@ static const AVOption mpeg1_options[] = { FF_MPV_COMMON_OPTS #if FF_API_MPEGVIDEO_OPTS FF_MPV_DEPRECATED_MPEG_QUANT_OPT + FF_MPV_DEPRECATED_A53_CC_OPT #endif { NULL }, }; @@ -1164,6 +1165,7 @@ static const AVOption mpeg2_options[] = { OFFSET(intra_vlc_format), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE }, { "non_linear_quant", "Use nonlinear quantizer.", OFFSET(q_scale_type), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE }, { "alternate_scan", "Enable alternate scantable.", OFFSET(alternate_scan), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE }, + { "a53cc", "Use A53 Closed Captions (if available)", OFFSET(a53_cc), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, VE }, { "seq_disp_ext", "Write sequence_display_extension blocks.", OFFSET(seq_disp_ext), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE, "seq_disp_ext" }, { "auto", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = -1}, 0, 0, VE, "seq_disp_ext" }, { "never", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = 0 }, 0, 0, VE, "seq_disp_ext" }, diff --git a/libavcodec/mpeg4videoenc.c b/libavcodec/mpeg4videoenc.c index e2792e1161..384710cf60 100644 --- a/libavcodec/mpeg4videoenc.c +++ b/libavcodec/mpeg4videoenc.c @@ -1378,6 +1378,9 @@ static const AVOption options[] = { { "mpeg_quant", "Use MPEG quantizers instead of H.263", OFFSET(mpeg_quant), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, 1, VE }, FF_MPV_COMMON_OPTS +#if FF_API_MPEGVIDEO_OPTS + FF_MPV_DEPRECATED_A53_CC_OPT +#endif FF_MPEG4_PROFILE_OPTS { NULL }, }; diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h index e83b4ab211..508ae0dfb9 100644 --- a/libavcodec/mpegvideo.h +++ b/libavcodec/mpegvideo.h @@ -676,12 +676,13 @@ FF_MPV_OPT_CMP_FUNC, \ {"mepc", "Motion estimation bitrate penalty compensation (1.0 = 256)", FF_MPV_OFFSET(me_penalty_compensation), AV_OPT_TYPE_INT, {.i64 = 256 }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS }, \ {"mepre", "pre motion estimation", FF_MPV_OFFSET(me_pre), AV_OPT_TYPE_INT, {.i64 = 0 }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS }, \ {"intra_penalty", "Penalty for intra blocks in block decision", FF_MPV_OFFSET(intra_penalty), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX/2, FF_MPV_OPT_FLAGS }, \ -{"a53cc", "Use A53 Closed Captions (if available)", FF_MPV_OFFSET(a53_cc), AV_OPT_TYPE_BOOL, {.i64 = 1}, 0, 1, FF_MPV_OPT_FLAGS }, \ FF_MPV_RC_STRATEGY_OPTS #if FF_API_MPEGVIDEO_OPTS #define FF_MPV_DEPRECATED_MPEG_QUANT_OPT \ { "mpeg_quant", "Deprecated, does nothing", FF_MPV_OFFSET(mpeg_quant), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, 0, FF_MPV_OPT_FLAGS | AV_OPT_FLAG_DEPRECATED }, +#define FF_MPV_DEPRECATED_A53_CC_OPT \ + { "a53cc", "Deprecated, does nothing", FF_MPV_OFFSET(a53_cc), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, FF_MPV_OPT_FLAGS | AV_OPT_FLAG_DEPRECATED }, #endif extern const AVOption ff_mpv_generic_options[]; diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 19a7e57a29..03fcfa83dd 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -88,6 +88,7 @@ const AVOption ff_mpv_generic_options[] = { FF_MPV_COMMON_OPTS #if FF_API_MPEGVIDEO_OPTS FF_MPV_DEPRECATED_MPEG_QUANT_OPT + FF_MPV_DEPRECATED_A53_CC_OPT #endif { NULL }, }; @@ -4712,6 +4713,7 @@ static const AVOption h263_options[] = { FF_MPV_COMMON_OPTS #if FF_API_MPEGVIDEO_OPTS FF_MPV_DEPRECATED_MPEG_QUANT_OPT + FF_MPV_DEPRECATED_A53_CC_OPT #endif { NULL }, }; @@ -4745,6 +4747,7 @@ static const AVOption h263p_options[] = { FF_MPV_COMMON_OPTS #if FF_API_MPEGVIDEO_OPTS FF_MPV_DEPRECATED_MPEG_QUANT_OPT + FF_MPV_DEPRECATED_A53_CC_OPT #endif { NULL }, };