[FFmpeg-devel] [PATCH 2/3] lavc/libxavs2: use upper layer qp parameters first

Liu Steven lq at chinaffmpeg.org
Tue Jan 22 10:05:04 EET 2019



> 在 2019年1月22日,下午2:38,hwrenx <hwrenx at 126.com> 写道:
> 
> Signed-off-by: hwrenx <hwrenx at 126.com>
> ---
> libavcodec/libxavs2.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/libavcodec/libxavs2.c b/libavcodec/libxavs2.c
> index 2d29427..0ad9ca9 100644
> --- a/libavcodec/libxavs2.c
> +++ b/libavcodec/libxavs2.c
> @@ -109,8 +109,9 @@ static av_cold int xavs2_init(AVCodecContext *avctx)
>         xavs2_opt_set2("RateControl",   "%d", 1);
>         xavs2_opt_set2("TargetBitRate", "%"PRId64"", avctx->bit_rate);
>         xavs2_opt_set2("InitialQP",     "%d", cae->initial_qp);
> -        xavs2_opt_set2("MaxQP",         "%d", cae->max_qp);
> -        xavs2_opt_set2("MinQP",         "%d", cae->min_qp);
> +        xavs2_opt_set2("MaxQP",         "%d", avctx->qmax >= 0 ? avctx->qmax : cae->max_qp);
> +        xavs2_opt_set2("MinQP",         "%d", avctx->qmin >= 0 ? avctx->qmin : cae->min_qp);
> +
empty line

>     } else {
>         xavs2_opt_set2("InitialQP",     "%d", cae->qp);
>     }
> -- 
> 2.7.4
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel





More information about the ffmpeg-devel mailing list