diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-07-24 20:50:55 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-08-30 04:23:30 +0200 |
commit | 4bd99f715de3ea54319d54f848d16186dd00b039 (patch) | |
tree | 0bb06421cefcecf26e62ab0896e5c4ebf1836af6 /libavcodec/snowenc.c | |
parent | 21bfeec27f933e18e7aac52ec025831353f47430 (diff) | |
download | ffmpeg-4bd99f715de3ea54319d54f848d16186dd00b039.tar.gz |
avcodec/snowenc: Support setting the iterative dia size separately
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/snowenc.c')
-rw-r--r-- | libavcodec/snowenc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c index 9b5a488148..5e5dc35e86 100644 --- a/libavcodec/snowenc.c +++ b/libavcodec/snowenc.c @@ -1120,8 +1120,9 @@ static void iterative_me(SnowContext *s){ do{ int newx = block->mx; int newy = block->my; + int dia_size = s->iterative_dia_size ? s->iterative_dia_size : FFMAX(s->avctx->dia_size, 1); dia_change=0; - for(i=0; i<FFMAX(s->avctx->dia_size, 1); i++){ + for(i=0; i < dia_size; i++){ for(j=0; j<i; j++){ dia_change |= check_block_inter(s, mb_x, mb_y, newx+4*(i-j), newy+(4*j), obmc_edged, &best_rd); dia_change |= check_block_inter(s, mb_x, mb_y, newx-4*(i-j), newy-(4*j), obmc_edged, &best_rd); @@ -1898,6 +1899,7 @@ static const AVOption options[] = { { "memc_only", "Only do ME/MC (I frames -> ref, P frame -> ME+MC).", OFFSET(memc_only), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE }, { "no_bitstream", "Skip final bitstream writeout.", OFFSET(no_bitstream), AV_OPT_TYPE_INT, { .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 }, { NULL }, }; |