avcodec/vaapi_encode: Simplify code with av_clip_int8()
authorMichael Niedermayer <michael@niedermayer.cc>
Wed, 28 Aug 2019 17:26:49 +0000 (19:26 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Fri, 30 Aug 2019 18:23:02 +0000 (20:23 +0200)
Reviewed-by: "Li, Zhong" <zhong.li@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/vaapi_encode.c

index 2fb43cf1a46370d7a86ad057ab4f13d54e34de7d..3be9159d3784a3462a9473cec65779ab5594a53c 100644 (file)
@@ -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),
             };
         }