On Mon, Jul 08, 2024 at 12:25:17AM -0400, Sean McGovern wrote: > --- > libswscale/yuv2rgb.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/libswscale/yuv2rgb.c b/libswscale/yuv2rgb.c > index 977eb3a7dd..ac0b811f61 100644 > --- a/libswscale/yuv2rgb.c > +++ b/libswscale/yuv2rgb.c > @@ -100,9 +100,9 @@ const int *sws_getCoefficients(int colorspace) > > #define PUTRGBA(dst, ysrc, asrc, i, abase) \ > Y = ysrc[2 * i]; \ > - dst[2 * i] = r[Y] + g[Y] + b[Y] + (asrc[2 * i] << abase); \ > + dst[2 * i] = r[Y] + g[Y] + b[Y] + ((int32_t)(asrc[2 * i]) << > abase); \ > Y = ysrc[2 * i + 1]; \ > - dst[2 * i + 1] = r[Y] + g[Y] + b[Y] + (asrc[2 * i + 1] << abase); > + dst[2 * i + 1] = r[Y] + g[Y] + b[Y] + ((int32_t)(asrc[2 * i + 1]) << > abase);
can you explain what undefined behavior this does prevent and how ? (in the commit message) thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The greatest way to live with honor in this world is to be what we pretend to be. -- Socrates
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".