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

Michael Niedermayer michael at niedermayer.cc
Fri Aug 30 21:24:35 EEST 2019


On Thu, Aug 29, 2019 at 12:18:03AM +0000, Li, Zhong wrote:
> > 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

will apply

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

When you are offended at any man's fault, turn to yourself and study your
own failings. Then you will forget your anger. -- Epictetus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20190830/feeeeef4/attachment.sig>


More information about the ffmpeg-devel mailing list