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 <[email protected]>

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
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to