[FFmpeg-devel] [PATCH 1/5] avcodec/vaapi_encode: Simplify code with av_clip_int8()

Li, Zhong zhong.li at intel.com
Thu Aug 29 03:18:03 EEST 2019


> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of Michael
> Niedermayer
> Sent: Thursday, August 29, 2019 1:27 AM
> To: FFmpeg development discussions and patches <ffmpeg-devel at ffmpeg.org>
> Subject: [FFmpeg-devel] [PATCH 1/5] avcodec/vaapi_encode: Simplify code with
> av_clip_int8()
> 
> Only build tested
> 
> Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> ---
>  libavcodec/vaapi_encode.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/vaapi_encode.c b/libavcodec/vaapi_encode.c index
> 2fb43cf1a4..3be9159d37 100644
> --- a/libavcodec/vaapi_encode.c
> +++ b/libavcodec/vaapi_encode.c
> @@ -480,7 +480,7 @@ static int vaapi_encode_issue(AVCodecContext *avctx,
>                      .width  = roi->right  - roi->left,
>                      .height = roi->bottom - roi->top,
>                  },
> -                .roi_value = av_clip_c(v, INT8_MIN, INT8_MAX),
> +                .roi_value = av_clip_int8(v),
>              };
>          }
> 
> --
> 2.23.0

LGTM


More information about the ffmpeg-devel mailing list