You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avcodec/libx264: Fix sc_threshold after 30c1bdb87c
After the merge the default threshold was unconditionally overwritten A similar fix was written by Vittorio Giovara, but i didnt see that before i wrote this and it also doesnt apply cleanly Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -551,11 +551,11 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
|||||||
|
|
||||||
#if FF_API_PRIVATE_OPT
|
#if FF_API_PRIVATE_OPT
|
||||||
FF_DISABLE_DEPRECATION_WARNINGS
|
FF_DISABLE_DEPRECATION_WARNINGS
|
||||||
if (avctx->scenechange_threshold)
|
if (avctx->scenechange_threshold >= 0)
|
||||||
x4->scenechange_threshold = avctx->scenechange_threshold;
|
x4->scenechange_threshold = avctx->scenechange_threshold;
|
||||||
if (x4->scenechange_threshold >= 0)
|
|
||||||
FF_ENABLE_DEPRECATION_WARNINGS
|
FF_ENABLE_DEPRECATION_WARNINGS
|
||||||
#endif
|
#endif
|
||||||
|
if (x4->scenechange_threshold >= 0)
|
||||||
x4->params.i_scenecut_threshold = x4->scenechange_threshold;
|
x4->params.i_scenecut_threshold = x4->scenechange_threshold;
|
||||||
|
|
||||||
if (avctx->qmin >= 0)
|
if (avctx->qmin >= 0)
|
||||||
@@ -990,7 +990,7 @@ static const AVOption options[] = {
|
|||||||
{ "ac", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 1 }, INT_MIN, INT_MAX, VE, "coder" },
|
{ "ac", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 1 }, INT_MIN, INT_MAX, VE, "coder" },
|
||||||
{ "b_strategy", "Strategy to choose between I/P/B-frames", OFFSET(b_frame_strategy), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 2, VE },
|
{ "b_strategy", "Strategy to choose between I/P/B-frames", OFFSET(b_frame_strategy), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 2, VE },
|
||||||
{ "chromaoffset", "QP difference between chroma and luma", OFFSET(chroma_offset), AV_OPT_TYPE_INT, { .i64 = 0 }, INT_MIN, INT_MAX, VE },
|
{ "chromaoffset", "QP difference between chroma and luma", OFFSET(chroma_offset), AV_OPT_TYPE_INT, { .i64 = 0 }, INT_MIN, INT_MAX, VE },
|
||||||
{ "sc_threshold", "Scene change threshold", OFFSET(scenechange_threshold), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE },
|
{ "sc_threshold", "Scene change threshold", OFFSET(scenechange_threshold), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, VE },
|
||||||
{ "noise_reduction", "Noise reduction", OFFSET(noise_reduction), AV_OPT_TYPE_INT, { .i64 = -1 }, 0, INT_MAX, VE },
|
{ "noise_reduction", "Noise reduction", OFFSET(noise_reduction), AV_OPT_TYPE_INT, { .i64 = -1 }, 0, INT_MAX, VE },
|
||||||
|
|
||||||
{ "x264-params", "Override the x264 configuration using a :-separated list of key=value parameters", OFFSET(x264_params), AV_OPT_TYPE_STRING, { 0 }, 0, 0, VE },
|
{ "x264-params", "Override the x264 configuration using a :-separated list of key=value parameters", OFFSET(x264_params), AV_OPT_TYPE_STRING, { 0 }, 0, 0, VE },
|
||||||
|
Reference in New Issue
Block a user