From patchwork Tue Feb 1 13:06:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 34001 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2c4e:0:0:0:0 with SMTP id x14csp605469iov; Tue, 1 Feb 2022 05:13:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJxoFmcsgo6nzfpjvYgj7BP/5u2tDhFjJbrufzoo4u2RXO6dPTF9pDjJJ+CjobwoQflwxAJC X-Received: by 2002:aa7:c258:: with SMTP id y24mr25288904edo.288.1643721205323; Tue, 01 Feb 2022 05:13:25 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id v28si9040723ejk.797.2022.02.01.05.13.24; Tue, 01 Feb 2022 05:13:25 -0800 (PST) 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=@outlook.com header.s=selector1 header.b=UBe7dOxv; arc=fail (body hash mismatch); 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 85F2168B369; Tue, 1 Feb 2022 15:07:59 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2100.outbound.protection.outlook.com [40.92.89.100]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AF76368B364 for ; Tue, 1 Feb 2022 15:07:58 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JJ40LoNwB1ef17h056AE4PbW3SKor+ofIIiPmh7DJBLI4IRFx4AZxzLW/4b4blHOHwvf10i65NZLVCBYhyxi8XR9r8JHu5sviVmqBUs43nzpOolte82+e6dZm10EdSlPiYMLkdPAjgdhMef0elnxGGHNSfJIACsanuem/DEbcPxQ32wWXkMTQEgOv5v9OSmrezA211a4m+RvlNN2ElAm5O1pCOtfBdo96zy2G3JIk1RyRbP2Z/7hE9wQGIuoz4BCshyXHAn2BS6c7Vv8IrIkmky8DNsKz8RqO9eJQkXCKRDVcQZvhzG7YywWUGjOQpfMAYuTWx3PdV6pWLV0QfIqCQ== 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=OxNF9x2+xqLoZo+wV4H6tUz65rrcb/7j6oV1PjTbFp8=; b=MTeATpHXxmJ5krQXkKTx6Pq2egiSfFZUS0VWp4RcCLIdTYCkXJYi+TERSiNVNlzCo3KD41wvFHA/V2tg4knJoVVBbXVpclngCyqDzzjgI+QYEvXXuPgzB0lN+f3C/47BlgPPDr4JGp3KzKWQxJl2f9CTUdwk4z6hqZ2MgwOzrPzwD2zF89oIT7KXeJIXtwCBFnqaYri88aFBFRN+qPap/H4VgIMyVrS1pfDL2Sm05YAAiYbiqgKg6yW72PyJ3HScR5CPthPfZusr9+P0eNkk2S7o1iqLCUZOPl71mZdI8/LVd2GQPUZ15gK/br0ztnfVBN/xclg4elpjXCHCCsO9SA== 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=OxNF9x2+xqLoZo+wV4H6tUz65rrcb/7j6oV1PjTbFp8=; b=UBe7dOxvol+jRjPAuuvVhAX1tFrfMnq9R/P+MtPvD2NO7Ovo/gK/5Q2nCN/gFDCxjBs57YmoTP7Q4a3Im5TrOzqFW37VZ/5vcrBMGwO0Tv8FQHBh7YoQRxqnLl0x6TtW09Fqjw1CwEvzSpvbg0Y1SntFr58MYVssd+jxM4r5AU/46H+8SveRQTTL6hXlRqixIngQYb8lCrebsiDqvu8iOsiT5icKG8X1UI87jcoq5skSPacDDEw70CU4jtDtl+rOm5rlp5lkouly8w0qQNw1wf+jxYnGrDdHKXOzt55lONUa/AsBklqsQt3ORdruqf4oYefLYwXyLsB5zPvF0Qvf/A== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM0PR03MB5700.eurprd03.prod.outlook.com (2603:10a6:208:16f::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4930.22; Tue, 1 Feb 2022 13:07:57 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22%6]) with mapi id 15.20.4951.011; Tue, 1 Feb 2022 13:07:56 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 1 Feb 2022 14:06:26 +0100 Message-ID: X-Mailer: git-send-email 2.32.0 In-Reply-To: References: X-TMN: [3jMYMw9ZXDobZ/e3n9nML9oUdgcrLAzN] X-ClientProxiedBy: AM6P195CA0092.EURP195.PROD.OUTLOOK.COM (2603:10a6:209:86::33) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20220201130706.1420875-28-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2f55181d-4d0e-4b26-9cda-08d9e583dd72 X-MS-TrafficTypeDiagnostic: AM0PR03MB5700:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8dzvC+F+lgCnweQNR9Er0E6hypRMVRIX/0v5EKB71cnn1BkCC8aT8gnlinL9lhqxWzOvN65YKn7wsYav8w7yFpcZVpiaHk+nMtbyruX8z3ZlfD/zDaWEsJ0ypvbCAveYnvqWNeAGjnGmECGoT7hYcOSp51vLAE3tJe1vFJ+9OZT21a1L0BFTrkNCgcqtqZhXXzDa2Gw4le3QKcQQ9KX3K/a5fp1CSjySpX9S73ZaVQe309EIt8GWaLoW4BByqYwHAvRz1hjTtQoggURsLa8hucLMaPgORJNASM+mWoBXRoQ+oTRwRb8eZzGyEb8DLf0W/VrckwznVzpS7eacEDraUiZbNvSz+EM+y/HymNuVBR7NCTX5up1sDbHn/q+120W6ye9A/cVHbNY3DytsTJmWsmFo6CaRllw4ltrc+pzAWmRhsy+AaO/I81UOjUHc766A34aZ1xOzwl3uQsqqfHavKB3R6Io5VnPexRRAt9MfXv2Y9UEUT1QgziZkwkkkf0rP1gt4QnvLjJgQWp0SJnG+TYrpBZDqkxZO4Epj9kcbHnMUfysBy4vbVB1ubEOZozie X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: vUI9po1PuZDi4P1c0oj7JWMLG/1m8krCaoraElmq0Q60bXqmMsIGChQ1wTH/hegpDbbgksEg75P/PzodFF+th7U8kA6dFQuED9nV+TycBVp3MRsavs+rzDXLkqXSFRHowr1x9ZlhukTV2IX/+KvXqi0Uut2TANqrybUoex//bztRkPWIisavEFLgXkzG5/0IsAG7oG3+L/X9M82/NDgvHLDoiNRFUu/MiBQ4Y5aGM+BqDYRaeNleSLNRCchCFI/sCNUTBx0dziaKACQ9l5Xppq9uV2qlFtN2QChDvRYdd/k3jtkDiPo5cpFRCJ0zubNEMZHLEr0WGiRx4ErxC+8IVZM5pAvTCwykAhpMhuJ4BHvZpz8ojdoJOmaBZTShWAlkMJWT0IqVwc94v1ZxmHJQUZeJQl75vNGGLrdFduVlsvmOASn9ip9y1hzcdMXHo7E5DWJqIbxP16OpP1XTFCKJfzWL1yPPFbCHs4nHHlLAt0TqBpqIoMcPOXVQX59WX/KA49xeWwzGxEsTc4HVtqeT3uzvt1wZxXzaWGIUHsuoF1oAb1UGLmOdYHMwBVghv/BVMZ5OjVwB6u/Knw9uska7ktgV69c7/NWrel+1EDEaPJ6pEI0nK5Hp4wd7ZFjmjWWhdA+pandQwt3bn+U0UTtpqD5QkhoUYty9IF5RZy4HzpSF1XI7kbEdfYmmVzxl+7QN5YPWwSO21LBE7ubVAt6ssYneCpMutTlcGhzUHyN3Vbr8Pa8nUuFRpxDnwYTcsjochJ0uN8vKh+07K3a6sUaMHTPxHjTjTjhcJQmXJxUztMJJSEGrwGjQtiyd656cVfyZHiJ63byTGMR9YFecWhYTDdN1G9VoeSPiPT2n6fS/3sPEqX4JFEDwfhEktN6WpfEwMbJGggoftydBhWsM9P5Noz8Xd4bb6LwZNDaRiJeROEe+5bHiOJMsCtJHImek0FGMnP1tVBRK7hcqT3Bp+5pP4A== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2f55181d-4d0e-4b26-9cda-08d9e583dd72 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Feb 2022 13:07:56.9481 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR03MB5700 Subject: [FFmpeg-devel] [PATCH v2 29/69] avcodec/mpegvideoenc: Move tmp bframes to MPVMainEncContext 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: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: /E4EM84yio1K Also move b_frame_strategy and b_sensitivity; they are all only used by an encoder's main thread. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo.h | 7 ----- libavcodec/mpegvideo_enc.c | 61 +++++++++++++++++++------------------- libavcodec/mpegvideoenc.h | 15 +++++++--- 3 files changed, 41 insertions(+), 42 deletions(-) diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h index a32bd277eb..017aadb3e7 100644 --- a/libavcodec/mpegvideo.h +++ b/libavcodec/mpegvideo.h @@ -56,8 +56,6 @@ #define MAX_THREADS 32 -#define MAX_B_FRAMES 16 - /** * MPVContext. */ @@ -528,11 +526,6 @@ typedef struct MPVContext { int error_rate; - /* temporary frames used by b_frame_strategy = 2 */ - AVFrame *tmp_frames[MAX_B_FRAMES + 2]; - int b_frame_strategy; - int b_sensitivity; - /* frame skip options for encoding */ int frame_skip_threshold; int frame_skip_factor; diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 5f607d9e11..e365f2fd81 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -354,10 +354,10 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx) } s->gop_size = avctx->gop_size; s->avctx = avctx; - if (avctx->max_b_frames > MAX_B_FRAMES) { + if (avctx->max_b_frames > MPVENC_MAX_B_FRAMES) { av_log(avctx, AV_LOG_ERROR, "Too many B-frames requested, maximum " - "is %d.\n", MAX_B_FRAMES); - avctx->max_b_frames = MAX_B_FRAMES; + "is " AV_STRINGIFY(MPVENC_MAX_B_FRAMES) ".\n"); + avctx->max_b_frames = MPVENC_MAX_B_FRAMES; } else if (avctx->max_b_frames < 0) { av_log(avctx, AV_LOG_ERROR, "max b frames must be 0 or positive for mpegvideo based encoders\n"); @@ -612,10 +612,10 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx) return AVERROR(EINVAL); } - if (s->b_frame_strategy && (avctx->flags & AV_CODEC_FLAG_PASS2)) { + if (m->b_frame_strategy && (avctx->flags & AV_CODEC_FLAG_PASS2)) { av_log(avctx, AV_LOG_INFO, "notice: b_frame_strategy only affects the first pass\n"); - s->b_frame_strategy = 0; + m->b_frame_strategy = 0; } i = av_gcd(avctx->time_base.den, avctx->time_base.num); @@ -904,17 +904,17 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx) if ((ret = ff_rate_control_init(m)) < 0) return ret; - if (s->b_frame_strategy == 2) { + if (m->b_frame_strategy == 2) { for (i = 0; i < s->max_b_frames + 2; i++) { - s->tmp_frames[i] = av_frame_alloc(); - if (!s->tmp_frames[i]) + m->tmp_frames[i] = av_frame_alloc(); + if (!m->tmp_frames[i]) return AVERROR(ENOMEM); - s->tmp_frames[i]->format = AV_PIX_FMT_YUV420P; - s->tmp_frames[i]->width = s->width >> s->brd_scale; - s->tmp_frames[i]->height = s->height >> s->brd_scale; + m->tmp_frames[i]->format = AV_PIX_FMT_YUV420P; + m->tmp_frames[i]->width = s->width >> s->brd_scale; + m->tmp_frames[i]->height = s->height >> s->brd_scale; - ret = av_frame_get_buffer(s->tmp_frames[i], 0); + ret = av_frame_get_buffer(m->tmp_frames[i], 0); if (ret < 0) return ret; } @@ -935,14 +935,13 @@ av_cold int ff_mpv_encode_end(AVCodecContext *avctx) { MPVMainEncContext *const m = avctx->priv_data; MPVMainContext *const s = &m->common; - int i; ff_rate_control_uninit(m); ff_mpv_common_end(&m->common); - for (i = 0; i < FF_ARRAY_ELEMS(s->tmp_frames); i++) - av_frame_free(&s->tmp_frames[i]); + for (int i = 0; i < FF_ARRAY_ELEMS(m->tmp_frames); i++) + av_frame_free(&m->tmp_frames[i]); ff_mpv_picture_free(avctx, &s->new_picture); @@ -1267,18 +1266,18 @@ static int estimate_best_b_count(MPVMainEncContext *m) data[2] += INPLACE_OFFSET; } - s->mpvencdsp.shrink[scale](s->tmp_frames[i]->data[0], - s->tmp_frames[i]->linesize[0], + s->mpvencdsp.shrink[scale](m->tmp_frames[i]->data[0], + m->tmp_frames[i]->linesize[0], data[0], pre_input.f->linesize[0], width, height); - s->mpvencdsp.shrink[scale](s->tmp_frames[i]->data[1], - s->tmp_frames[i]->linesize[1], + s->mpvencdsp.shrink[scale](m->tmp_frames[i]->data[1], + m->tmp_frames[i]->linesize[1], data[1], pre_input.f->linesize[1], width >> 1, height >> 1); - s->mpvencdsp.shrink[scale](s->tmp_frames[i]->data[2], - s->tmp_frames[i]->linesize[2], + s->mpvencdsp.shrink[scale](m->tmp_frames[i]->data[2], + m->tmp_frames[i]->linesize[2], data[2], pre_input.f->linesize[2], width >> 1, height >> 1); @@ -1315,10 +1314,10 @@ static int estimate_best_b_count(MPVMainEncContext *m) goto fail; - s->tmp_frames[0]->pict_type = AV_PICTURE_TYPE_I; - s->tmp_frames[0]->quality = 1 * FF_QP2LAMBDA; + m->tmp_frames[0]->pict_type = AV_PICTURE_TYPE_I; + m->tmp_frames[0]->quality = 1 * FF_QP2LAMBDA; - out_size = encode_frame(c, s->tmp_frames[0], pkt); + out_size = encode_frame(c, m->tmp_frames[0], pkt); if (out_size < 0) { ret = out_size; goto fail; @@ -1329,11 +1328,11 @@ static int estimate_best_b_count(MPVMainEncContext *m) for (i = 0; i < s->max_b_frames + 1; i++) { int is_p = i % (j + 1) == j || i == s->max_b_frames; - s->tmp_frames[i + 1]->pict_type = is_p ? + m->tmp_frames[i + 1]->pict_type = is_p ? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_B; - s->tmp_frames[i + 1]->quality = is_p ? p_lambda : b_lambda; + m->tmp_frames[i + 1]->quality = is_p ? p_lambda : b_lambda; - out_size = encode_frame(c, s->tmp_frames[i + 1], pkt); + out_size = encode_frame(c, m->tmp_frames[i + 1], pkt); if (out_size < 0) { ret = out_size; goto fail; @@ -1420,11 +1419,11 @@ static int select_input_picture(MPVMainEncContext *m) } } - if (s->b_frame_strategy == 0) { + if (m->b_frame_strategy == 0) { b_frames = s->max_b_frames; while (b_frames && !s->input_picture[b_frames]) b_frames--; - } else if (s->b_frame_strategy == 1) { + } else if (m->b_frame_strategy == 1) { for (i = 1; i < s->max_b_frames + 1; i++) { if (s->input_picture[i] && s->input_picture[i]->b_frame_score == 0) { @@ -1438,7 +1437,7 @@ static int select_input_picture(MPVMainEncContext *m) for (i = 0; i < s->max_b_frames + 1; i++) { if (!s->input_picture[i] || s->input_picture[i]->b_frame_score - 1 > - s->mb_num / s->b_sensitivity) + s->mb_num / m->b_sensitivity) break; } @@ -1448,7 +1447,7 @@ static int select_input_picture(MPVMainEncContext *m) for (i = 0; i < b_frames + 1; i++) { s->input_picture[i]->b_frame_score = 0; } - } else if (s->b_frame_strategy == 2) { + } else if (m->b_frame_strategy == 2) { b_frames = estimate_best_b_count(m); if (b_frames < 0) return b_frames; diff --git a/libavcodec/mpegvideoenc.h b/libavcodec/mpegvideoenc.h index 37375132d7..7b58ace64b 100644 --- a/libavcodec/mpegvideoenc.h +++ b/libavcodec/mpegvideoenc.h @@ -32,9 +32,16 @@ #include "internal.h" #include "mpegvideo.h" +#define MPVENC_MAX_B_FRAMES 16 + typedef MPVContext MPVEncContext; typedef struct MPVMainEncContext { MPVMainContext common; + + /* temporary frames used by b_frame_strategy == 2 */ + AVFrame *tmp_frames[MPVENC_MAX_B_FRAMES + 2]; + int b_frame_strategy; + int b_sensitivity; } MPVMainEncContext; #define UNI_AC_ENC_INDEX(run,level) ((run)*128 + (level)) @@ -115,8 +122,8 @@ FF_MPV_OPT_CMP_FUNC, \ {"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 }, \ #define FF_MPV_COMMON_BFRAME_OPTS \ -{"b_strategy", "Strategy to choose between I/P/B-frames", FF_MPV_OFFSET(b_frame_strategy), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, 2, FF_MPV_OPT_FLAGS }, \ -{"b_sensitivity", "Adjust sensitivity of b_frame_strategy 1", FF_MPV_OFFSET(b_sensitivity), AV_OPT_TYPE_INT, {.i64 = 40 }, 1, INT_MAX, FF_MPV_OPT_FLAGS }, \ +{"b_strategy", "Strategy to choose between I/P/B-frames", FF_MPV_MAIN_OFFSET(b_frame_strategy), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, 2, FF_MPV_OPT_FLAGS }, \ +{"b_sensitivity", "Adjust sensitivity of b_frame_strategy 1", FF_MPV_MAIN_OFFSET(b_sensitivity), AV_OPT_TYPE_INT, {.i64 = 40 }, 1, INT_MAX, FF_MPV_OPT_FLAGS }, \ {"brd_scale", "Downscale frames for dynamic B-frame decision", FF_MPV_OFFSET(brd_scale), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, 3, FF_MPV_OPT_FLAGS }, #if FF_API_MPEGVIDEO_OPTS @@ -127,8 +134,8 @@ FF_MPV_OPT_CMP_FUNC, \ #define FF_MPV_DEPRECATED_MATRIX_OPT \ { "force_duplicated_matrix", "Deprecated, does nothing", FF_MPV_OFFSET(dummy), AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1, FF_MPV_OPT_FLAGS | AV_OPT_FLAG_DEPRECATED }, #define FF_MPV_DEPRECATED_BFRAME_OPTS \ - { "b_strategy", "Deprecated, does nothing", FF_MPV_OFFSET(b_frame_strategy), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 2, FF_MPV_OPT_FLAGS | AV_OPT_FLAG_DEPRECATED }, \ - { "b_sensitivity", "Deprecated, does nothing", FF_MPV_OFFSET(b_sensitivity), AV_OPT_TYPE_INT, { .i64 = 40 }, 1, INT_MAX, FF_MPV_OPT_FLAGS | AV_OPT_FLAG_DEPRECATED }, \ + { "b_strategy", "Deprecated, does nothing", FF_MPV_MAIN_OFFSET(b_frame_strategy), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 2, FF_MPV_OPT_FLAGS | AV_OPT_FLAG_DEPRECATED }, \ + { "b_sensitivity", "Deprecated, does nothing", FF_MPV_MAIN_OFFSET(b_sensitivity), AV_OPT_TYPE_INT, { .i64 = 40 }, 1, INT_MAX, FF_MPV_OPT_FLAGS | AV_OPT_FLAG_DEPRECATED }, \ { "brd_scale", "Deprecated, does nothing", FF_MPV_OFFSET(brd_scale), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 3, FF_MPV_OPT_FLAGS | AV_OPT_FLAG_DEPRECATED }, #endif