diff options
author | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-02-03 16:49:19 +0000 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-02-03 16:49:19 +0000 |
commit | f3af379b5c1816271b1afce0ccb2a935dc29940c (patch) | |
tree | 629aec01a415bfe4a0552d31292adbb01b31d180 /libavcodec/snowenc.c | |
parent | 908d010b12fadc36d8cadf6bba5e073e23b9603c (diff) | |
parent | 2862b63783b5556f7f3fb2d097629bc6879f833a (diff) | |
download | ffmpeg-f3af379b5c1816271b1afce0ccb2a935dc29940c.tar.gz |
Merge commit '2862b63783b5556f7f3fb2d097629bc6879f833a'
* commit '2862b63783b5556f7f3fb2d097629bc6879f833a':
lavc: Move prediction_method to codec private options
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavcodec/snowenc.c')
-rw-r--r-- | libavcodec/snowenc.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c index ab707c86f4..b1d177d3b8 100644 --- a/libavcodec/snowenc.c +++ b/libavcodec/snowenc.c @@ -41,7 +41,14 @@ static av_cold int encode_init(AVCodecContext *avctx) int plane_index, ret; int i; - if(avctx->prediction_method == DWT_97 +#if FF_API_PRIVATE_OPT +FF_DISABLE_DEPRECATION_WARNINGS + if (avctx->prediction_method) + s->pred = avctx->prediction_method; +FF_ENABLE_DEPRECATION_WARNINGS +#endif + + if(s->pred == DWT_97 && (avctx->flags & AV_CODEC_FLAG_QSCALE) && avctx->global_quality == 0){ av_log(avctx, AV_LOG_ERROR, "The 9/7 wavelet is incompatible with lossless mode.\n"); @@ -54,7 +61,7 @@ FF_DISABLE_DEPRECATION_WARNINGS FF_ENABLE_DEPRECATION_WARNINGS #endif - s->spatial_decomposition_type= avctx->prediction_method; //FIXME add decorrelator type r transform_type + s->spatial_decomposition_type= s->pred; //FIXME add decorrelator type r transform_type s->mv_scale = (avctx->flags & AV_CODEC_FLAG_QPEL) ? 2 : 4; s->block_max_depth= (avctx->flags & AV_CODEC_FLAG_4MV ) ? 1 : 0; @@ -1917,6 +1924,9 @@ static const AVOption options[] = { { "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 }, + { "pred", "Spatial decomposition type", OFFSET(pred), AV_OPT_TYPE_INT, { .i64 = 0 }, DWT_97, DWT_53, VE, "pred" }, + { "dwt97", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, INT_MIN, INT_MAX, VE, "pred" }, + { "dwt53", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 1 }, INT_MIN, INT_MAX, VE, "pred" }, { NULL }, }; |