I changed the code as per you suggestion and also fixed the config errors. Please review the attached patch.
Thanks and regards, Konda Raju -----Original Message----- From: libav-devel [mailto:libav-devel-boun...@libav.org] On Behalf Of Diego Biurrun Sent: Monday, February 27, 2017 7:48 PM To: libav development <libav-devel@libav.org> Subject: Re: [libav-devel] [PATCH] nvenc: add initial QP value options for I, P and B pictures. On Mon, Feb 27, 2017 at 02:11:49PM +0000, Konda Raju wrote: > From 7cb5b9d551dc0755630e8f308542d6e325169525 Mon Sep 17 00:00:00 2001 > From: Raju Konda <kr...@nvidia.com> Konda Raju or Raju Konda? This is a tad confusing.. > Date: Wed, 22 Feb 2017 19:20:53 +0530 > Subject: [PATCH 1/2] add default initial QP value options for I, P and > B pictures > > --- > libavcodec/nvenc.c | 33 +++++++++++++++++++++++++-------- > libavcodec/nvenc.h | 3 +++ > libavcodec/nvenc_h264.c | 3 +++ > libavcodec/nvenc_hevc.c | 3 +++ > 4 files changed, 34 insertions(+), 8 deletions(-) > > diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c index > ba2647b10a..158642a550 100644 > --- a/libavcodec/nvenc.c > +++ b/libavcodec/nvenc.c > @@ -547,16 +547,33 @@ static av_cold void set_vbr(AVCodecContext > *avctx) > + if (ctx->init_qp_i < 0) { > + if (avctx->i_quant_factor != 0.0 && avctx->b_quant_factor != 0.0) { > + rc->initialRCQP.qpIntra = av_clip( > + rc->initialRCQP.qpInterP * > + fabs(avctx->i_quant_factor) + avctx->i_quant_offset + 0.5, 0, 51); > + > + if (ctx->init_qp_b < 0) { > + if (avctx->i_quant_factor != 0.0 && avctx->b_quant_factor != 0.0) { > + rc->initialRCQP.qpInterB = av_clip( > + rc->initialRCQP.qpInterP * > + fabs(avctx->b_quant_factor) + avctx->b_quant_offset + 0.5, 0, 51); Don't break the lines after the '(' please. > --- a/libavcodec/nvenc_h264.c > +++ b/libavcodec/nvenc_h264.c > @@ -109,6 +109,9 @@ static const AVOption options[] = { > OFFSET(quality), > AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 51, VE }, > { "aud", "Use access unit delimiters", OFFSET(aud), > AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE }, > { "bluray-compat", "Bluray compatibility workarounds", > OFFSET(bluray_compat),AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE }, > + { "init_qpP", "initial QP value for P picture", > OFFSET(init_qp_p), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 51, VE }, > + { "init_qpB", "initial QP value for B picture", > OFFSET(init_qp_b), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 51, VE }, > + { "init_qpI", "initial QP value for I picture", > OFFSET(init_qp_i), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 51, VE }, P-frame, B-frame, I-frame are the more common names I think. Diego _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel ----------------------------------------------------------------------------------- This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. -----------------------------------------------------------------------------------
0001-add-initial-QP-value-options.patch
Description: 0001-add-initial-QP-value-options.patch
_______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel