PR #24541 opened by chendixi URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24541 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24541.patch
Expose libaom rc_resize_mode configuration via -resize-mode option in libaomenc. Signed-off-by: chendixi <[email protected]> # Summary of changes Briefly describe what this PR does and why. <!-- If this PR requires new FATE test samples, attach them to the PR and list their target paths below (relative to the fate-suite root). Attached filenames must match the sample's filename: ```fate-samples # e.g. vorbis/new-sample.ogg ``` --> >From dc7b2c85ba1c9e9d4111bef506bbfdaa558d3364 Mon Sep 17 00:00:00 2001 From: chendixi <[email protected]> Date: Wed, 16 Sep 2026 13:09:11 -0700 Subject: [PATCH] avcodec/libaomenc: add resize-mode option Expose libaom rc_resize_mode configuration via -resize-mode option in libaomenc. Signed-off-by: chendixi <[email protected]> --- libavcodec/libaomenc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c index 3042d15f38..8ae06a07fe 100644 --- a/libavcodec/libaomenc.c +++ b/libavcodec/libaomenc.c @@ -141,6 +141,7 @@ typedef struct AOMEncoderContext { int enable_diff_wtd_comp; int enable_dist_wtd_comp; int enable_dual_filter; + int resize_mode; AVDictionary *aom_params; } AOMContext; @@ -859,6 +860,10 @@ static av_cold int aom_config(AVCodecContext *avctx, ctx->enccfg.rc_max_quantizer = 0; } + if (ctx->resize_mode >= 0) { + ctx->enccfg.rc_resize_mode = ctx->resize_mode; + } + if (ctx->enccfg.rc_end_usage == AOM_CQ || ctx->enccfg.rc_end_usage == AOM_Q) { if (ctx->crf < ctx->enccfg.rc_min_quantizer || ctx->crf > ctx->enccfg.rc_max_quantizer) { av_log(avctx, AV_LOG_ERROR, @@ -1654,6 +1659,7 @@ static const AVOption options[] = { { "enable-masked-comp", "Enable masked compound", OFFSET(enable_masked_comp), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE}, { "enable-interintra-comp", "Enable interintra compound", OFFSET(enable_interintra_comp), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE}, { "enable-smooth-interintra", "Enable smooth interintra mode", OFFSET(enable_smooth_interintra), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE}, + { "resize-mode", "Frame resize mode", OFFSET(resize_mode), AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX, VE}, #if AOM_ENCODER_ABI_VERSION >= 23 { "aom-params", "Set libaom options using a :-separated list of key=value pairs", OFFSET(aom_params), AV_OPT_TYPE_DICT, { 0 }, 0, 0, VE }, #endif -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
