diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-07-02 12:14:22 +0100 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-07-02 22:37:59 +0100 |
commit | 910247f1720c6aae422723c05dac6d0b19f20bec (patch) | |
tree | 5f9fd6156cdb9d2e2d9111ad56e987127d7b1568 /libavcodec/dnxhdenc.c | |
parent | 1316df7aa98c4784f190d107206d0bb12c590b89 (diff) | |
download | ffmpeg-910247f1720c6aae422723c05dac6d0b19f20bec.tar.gz |
lavc: Deprecate avctx.{inter,intra}_quant_bias
They are used by dnxhd and mpegvideo_enc exclusively, move them to codec
private options instead.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Diffstat (limited to 'libavcodec/dnxhdenc.c')
-rw-r--r-- | libavcodec/dnxhdenc.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/libavcodec/dnxhdenc.c b/libavcodec/dnxhdenc.c index dd7d8d1419..427529bd1d 100644 --- a/libavcodec/dnxhdenc.c +++ b/libavcodec/dnxhdenc.c @@ -45,6 +45,9 @@ static const AVOption options[] = { { "nitris_compat", "encode with Avid Nitris compatibility", offsetof(DNXHDEncContext, nitris_compat), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE }, + { "ibias", "intra quant bias", + offsetof(DNXHDEncContext, intra_quant_bias), AV_OPT_TYPE_INT, + { .i64 = FF_DEFAULT_QUANT_BIAS }, INT_MIN, INT_MAX, VE }, { NULL } }; @@ -205,14 +208,14 @@ static av_cold int dnxhd_init_qmat(DNXHDEncContext *ctx, int lbias, int cbias) weight_matrix[j] = ctx->cid_table->luma_weight[i]; } ff_convert_matrix(&ctx->m, ctx->qmatrix_l, ctx->qmatrix_l16, - weight_matrix, ctx->m.intra_quant_bias, 1, + weight_matrix, ctx->intra_quant_bias, 1, ctx->m.avctx->qmax, 1); for (i = 1; i < 64; i++) { int j = ctx->m.idsp.idct_permutation[ff_zigzag_direct[i]]; weight_matrix[j] = ctx->cid_table->chroma_weight[i]; } ff_convert_matrix(&ctx->m, ctx->qmatrix_c, ctx->qmatrix_c16, - weight_matrix, ctx->m.intra_quant_bias, 1, + weight_matrix, ctx->intra_quant_bias, 1, ctx->m.avctx->qmax, 1); for (qscale = 1; qscale <= ctx->m.avctx->qmax; qscale++) { @@ -339,10 +342,15 @@ static av_cold int dnxhd_encode_init(AVCodecContext *avctx) ctx->m.mb_num = ctx->m.mb_height * ctx->m.mb_width; - if (avctx->intra_quant_bias != FF_DEFAULT_QUANT_BIAS) - ctx->m.intra_quant_bias = avctx->intra_quant_bias; +#if FF_API_QUANT_BIAS +FF_DISABLE_DEPRECATION_WARNINGS + if (ctx->intra_quant_bias == FF_DEFAULT_QUANT_BIAS && + avctx->intra_quant_bias != FF_DEFAULT_QUANT_BIAS) + ctx->intra_quant_bias = avctx->intra_quant_bias; +FF_ENABLE_DEPRECATION_WARNINGS +#endif // XXX tune lbias/cbias - if ((ret = dnxhd_init_qmat(ctx, ctx->m.intra_quant_bias, 0)) < 0) + if ((ret = dnxhd_init_qmat(ctx, ctx->intra_quant_bias, 0)) < 0) return ret; /* Avid Nitris hardware decoder requires a minimum amount of padding |