Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-01-28 18:36:06 +0300
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-01-28 18:36:06 +0300
commite8c5d5f42960b3a694fe57cef6cceed08954ea2f (patch)
tree052832f5c43769c8bfd2aa2d222e75e092930563 /libavcodec/snowenc.c
parent30c1bdb87ce336f2b9957769e30a10d72f93d372 (diff)
snow: Move scenechange_threshold to a private option
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavcodec/snowenc.c')
-rw-r--r--libavcodec/snowenc.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c
index 7b1046c88c..ab707c86f4 100644
--- a/libavcodec/snowenc.c
+++ b/libavcodec/snowenc.c
@@ -1739,10 +1739,17 @@ redo_frame:
}
predict_plane(s, s->spatial_idwt_buffer, plane_index, 0);
+#if FF_API_PRIVATE_OPT
+FF_DISABLE_DEPRECATION_WARNINGS
+ if(s->avctx->scenechange_threshold)
+ s->scenechange_threshold = s->avctx->scenechange_threshold;
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
+
if( plane_index==0
&& pic->pict_type == AV_PICTURE_TYPE_P
&& !(avctx->flags&AV_CODEC_FLAG_PASS2)
- && s->m.me.scene_change_score > s->avctx->scenechange_threshold){
+ && s->m.me.scene_change_score > s->scenechange_threshold){
ff_init_range_encoder(c, pkt->data, pkt->size);
ff_build_rac_states(c, (1LL<<32)/20, 256-8);
pic->pict_type= AV_PICTURE_TYPE_I;
@@ -1909,6 +1916,7 @@ static const AVOption options[] = {
{ "no_bitstream", "Skip final bitstream writeout.", OFFSET(no_bitstream), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },
{ "intra_penalty", "Penalty for intra blocks in block decission", OFFSET(intra_penalty), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE },
{ "iterative_dia_size", "Dia size for the iterative ME", OFFSET(iterative_dia_size), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE },
+ { "sc_threshold", "Scene change threshold", OFFSET(scenechange_threshold), AV_OPT_TYPE_INT, { .i64 = 0 }, INT_MIN, INT_MAX, VE },
{ NULL },
};