[FFmpeg-devel] [PATCH 3/3] swscale/output: Fix several invalid shifts in yuv2rgb_full_1_c_template()

Michael Niedermayer michael at niedermayer.cc
Wed Jan 22 15:02:38 EET 2020


On Wed, Jan 22, 2020 at 06:13:52AM +0100, Andreas Rheinhardt wrote:
> On Tue, Jan 21, 2020 at 11:24 PM Michael Niedermayer <michael at niedermayer.cc>
> wrote:
> 
> > Fixes: Invalid shifts
> > Fixes: #8320
> >
> > Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> > ---
> >  libswscale/output.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/libswscale/output.c b/libswscale/output.c
> > index d192ea854b..439de04a05 100644
> > --- a/libswscale/output.c
> > +++ b/libswscale/output.c
> > @@ -2111,8 +2111,8 @@ yuv2rgb_full_1_c_template(SwsContext *c, const
> > int16_t *buf0,
> >          int A = 0; //init to silence warning
> >          for (i = 0; i < dstW; i++) {
> >              int Y = buf0[i] << 2;
> >
> 
> buf0[i] is an int16_t. Is it certain (in the sense of: checked, not in the
> sense of "negative luminance is nonsense") that it can't be negative?
> LGTM apart from that.

ill change the luma cases too and will apply

Thanks


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

There will always be a question for which you do not know the correct answer.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20200122/c8dd1aeb/attachment.sig>


More information about the ffmpeg-devel mailing list