From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 25AC24C5E5 for ; Tue, 14 Oct 2025 19:13:46 +0000 (UTC) Authentication-Results: ffbox; dkim=fail (body hash mismatch (got b'NK/7N8jISmq7QC5ptpJKz/NfUm66itkqBX9or2TO3i8=', expected b'jyoKwcT8bcRJ2SnL5rmJZK9O88MXErI1b7E9UAoklO0=')) header.d=niedermayer.cc header.a=rsa-sha256 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1760469211; h=date : to : message-id : references : mime-version : in-reply-to : reply-to : subject : list-id : list-archive : list-archive : list-help : list-owner : list-post : list-subscribe : list-unsubscribe : from : cc : content-type : from; bh=8P2xfCaKw4mrQg2WCumaYUmInKNLJi3VXKhNUbwaJF0=; b=o2+Nc+8j6qrvFMy2WNv71g3psTkWcBq/Ay5jdy2OIfvFFm/i5SjQt4off1QgFlg3CeKwq Dh8p+1w7qmmUfe33Zf0b+xC9gyccEZTT3J3nnATnZiPy+cv6J4nKfq05G/nCIDNqVceBFVt wreyi+28jOalo8aEF00DRU0Ppp+GDUdYmkievP/nTrJ7DuN2k0CMqT3LxArPhEeLMM8uE1R uhzneDDYdmrTKMgXY3mnSUY1YOSPuQ9YoTAEGOqAG9TsnTnVvUVKur4SBMG5bgnJ1ju8qjO XVj2Iwve+SJfIESJmC6+XPvpTEi7FE088s8cKQDZqm9QSYwMnozwLYrY8N1Q== Received: from [172.19.0.4] (unknown [172.19.0.4]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id C78F268F314; Tue, 14 Oct 2025 22:13:31 +0300 (EEST) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=ffmpeg.org; s=arc; t=1760469206; b=HN1bbN74uBdFOu+MfDbWK3jG97QnG9aAdR00dPsFhYFQ4pWw936ursHLo4QjnNMd4PDbw War4oU0DkfURmnWXcNvMpwFy98WoGZx3klERR2ZWWJIflUgyW7H5a8e0UH8Ax7dEUZdfajW cXmt1lmvRWli9+UtX35mh1O/R1JRPXzs9BLE55+MNVrAc/fspM027A3bTYy/buCA2ETT3lV 41rObJ6mwF5zoOrYF2UW5/ZBDIeyIsLVZOg9iHEtMDfXZhwgSKDhcifnSCe2SAzDgIZr4t8 hYOwY1pq1BSBG3XgHntPkP85jlvem1R6ckL94QgXTiNxtqRD2XvcL3aJTWfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ffmpeg.org; s=arc; t=1760469206; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=NK/7N8jISmq7QC5ptpJKz/NfUm66itkqBX9or2TO3i8=; b=iIjXw0qEX9RM4YTjZJhtIaLYzfG2Nh8cK03ZhvLa/AouY/RgdNBaqbsBb5il9DrnxFmz0 QtMqEbogr0O45kIOYPLc4HJRLklfKO6P3IJIZnqM2O3F3ExToiJlR0RXQnr5DYtAIXVSwOo CWlFdyTIEAeAKdVwfBfEVHTrOQCl6N13jtc9vbSuaWpCKvlOgPGyYKS/tMzGoIcADr1pXa5 PGFpwLTCHdjuBbpQBXwV9MeTggUEXcC2cUcxE8FTXOy8vmZBNIEgxraSyhHiMf4gC5XuXCj RgeJQvCp5ldl4bPfEDp5LJrC4A5tMRUtwAbkY648svuAuGfWVie3MwxNUbqg== ARC-Authentication-Results: i=1; ffmpeg.org; dkim=pass header.d=niedermayer.cc; arc=none; dmarc=none Authentication-Results: ffmpeg.org; dkim=pass header.d=niedermayer.cc; arc=none (Message is not ARC signed); dmarc=none Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 24BE468F2E3 for ; Tue, 14 Oct 2025 22:13:15 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 6F83044306 for ; Tue, 14 Oct 2025 19:13:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1760469194; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jyoKwcT8bcRJ2SnL5rmJZK9O88MXErI1b7E9UAoklO0=; b=SjvcS63cbKNNFSkg+DweF6GY29Rt0Rm1WCCYXFIOhBeHVYqio96AFr7mVnWUwnmsnatZn5 w8sDl699L5dKx7wWfFnqJMRi8OE6IpO6BRtQ6d9csGVrEQWsrZ8Pt6eJ2k9SmS8wsHMyyb LOma4zxJzumSI/e1PCKAFAvVg5kjnnsttjrT6MQMX//yNbWOj8IorKBi4EoXiUNURSVj5d 6ofWoPLlY+qskTbuuzACI+pbmRCf4E2FUh24zQ7VY130ImbDU3+06Kno7JVblWeMJEKPuI PnxXdkj4cOkqv70tTebXdEaZsHlUViqdkPrayX2FAJWU+XG6jA2gPSeaLX8ldw== Date: Tue, 14 Oct 2025 21:13:13 +0200 To: FFmpeg development discussions and patches Message-ID: References: <176036206413.25.15905318861432080946@bf907ddaa564> MIME-Version: 1.0 In-Reply-To: X-GND-Sasl: michael@niedermayer.cc Message-ID-Hash: RRSVYL7MZQFPT6H2WIRSTILDACFKHWI6 X-Message-ID-Hash: RRSVYL7MZQFPT6H2WIRSTILDACFKHWI6 X-MailFrom: SRS0=Q9FK=4X=niedermayer.cc=michael@ffmpeg.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-ffmpeg-devel.ffmpeg.org-0; header-match-ffmpeg-devel.ffmpeg.org-1; header-match-ffmpeg-devel.ffmpeg.org-2; header-match-ffmpeg-devel.ffmpeg.org-3; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list Reply-To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] Re: [PATCH] swscale/output: Fix unsigned cast position in yuv2* (PR #20698) List-Id: FFmpeg development discussions and patches Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michael Niedermayer via ffmpeg-devel Cc: Michael Niedermayer Content-Type: multipart/mixed; boundary="===============8640234275484972846==" Archived-At: List-Archive: List-Post: --===============8640234275484972846== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="29FoG/QO+cYmZ5n9" Content-Disposition: inline --29FoG/QO+cYmZ5n9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 13, 2025 at 05:20:55PM +0100, Kieran Kunhya via ffmpeg-devel wr= ote: > On Mon, 13 Oct 2025, 14:28 michaelni via ffmpeg-devel, < > ffmpeg-devel@ffmpeg.org> wrote: >=20 > > PR #20698 opened by michaelni > > URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20698 > > Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20698.patch > > > > > > >From 93794583405909cfe8e7abffdd84c2454959ff18 Mon Sep 17 00:00:00 2001 > > From: Michael Niedermayer > > Date: Mon, 13 Oct 2025 14:32:45 +0200 > > Subject: [PATCH 1/2] swscale/output: Fix integer overflow in > > yuv2ya16_X_c_template() > > > > Found-by: colod colod > > > > Signed-off-by: Michael Niedermayer > > --- > > libswscale/output.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/libswscale/output.c b/libswscale/output.c > > index b873276c00..cb6630bd73 100644 > > --- a/libswscale/output.c > > +++ b/libswscale/output.c > > @@ -1028,7 +1028,7 @@ yuv2ya16_X_c_template(SwsInternal *c, const int16= _t > > *lumFilter, > > int A =3D 0xffff; > > > > for (j =3D 0; j < lumFilterSize; j++) > > - Y +=3D (unsigned)(lumSrc[j][i] * lumFilter[j]); > > + Y +=3D lumSrc[j][i] * (unsigned)lumFilter[j]; > > > > Y >>=3D 15; > > Y +=3D (1<<3) + 0x8000; > > @@ -1037,7 +1037,7 @@ yuv2ya16_X_c_template(SwsInternal *c, const int16= _t > > *lumFilter, > > if (hasAlpha) { > > A =3D -0x40000000 + (1<<14); > > for (j =3D 0; j < lumFilterSize; j++) > > - A +=3D (unsigned)(alpSrc[j][i] * lumFilter[j]); > > + A +=3D alpSrc[j][i] * (unsigned)lumFilter[j]; > > > > A >>=3D 15; > > A +=3D 0x8000; > > -- > > 2.49.1 > > > > > > >From 9d0761453e5ecaa1344d63e2fcc9bd3cc6d4d0f6 Mon Sep 17 00:00:00 2001 > > From: Michael Niedermayer > > Date: Mon, 13 Oct 2025 14:46:16 +0200 > > Subject: [PATCH 2/2] swscale/output: Fix unsigned cast position in yuv= 2* > > > > Fixes: signed overflow > > > > Signed-off-by: Michael Niedermayer > > --- > > libswscale/output.c | 90 ++++++++++++++++++++++----------------------- > > 1 file changed, 45 insertions(+), 45 deletions(-) > > > > diff --git a/libswscale/output.c b/libswscale/output.c > > index cb6630bd73..877db04f36 100644 > > --- a/libswscale/output.c > > +++ b/libswscale/output.c > > @@ -503,8 +503,8 @@ static void yuv2nv12cX_c(enum AVPixelFormat dstForm= at, > > const uint8_t *chrDither, > > int v =3D chrDither[(i + 3) & 7] << 12; > > int j; > > for (j=3D0; j > - u +=3D (unsigned)(chrUSrc[j][i] * chrFilter[j]); > > - v +=3D (unsigned)(chrVSrc[j][i] * chrFilter[j]); > > + u +=3D chrUSrc[j][i] * (unsigned)chrFilter[j]; > > + v +=3D chrVSrc[j][i] * (unsigned)chrFilter[j]; > > } > > > > dest[2*i]=3D av_clip_uint8(u>>19); > > @@ -516,8 +516,8 @@ static void yuv2nv12cX_c(enum AVPixelFormat dstForm= at, > > const uint8_t *chrDither, > > int v =3D chrDither[(i + 3) & 7] << 12; > > int j; > > for (j=3D0; j > - u +=3D (unsigned)(chrUSrc[j][i] * chrFilter[j]); > > - v +=3D (unsigned)(chrVSrc[j][i] * chrFilter[j]); > > + u +=3D chrUSrc[j][i] * (unsigned)chrFilter[j]; > > + v +=3D chrVSrc[j][i] * (unsigned)chrFilter[j]; > > } > > > > dest[2*i]=3D av_clip_uint8(v>>19); > > @@ -577,8 +577,8 @@ static void yuv2p01xcX_c(int big_endian, const uint= 8_t > > *chrDither, > > int v =3D 1 << (shift - 1); > > > > for (j =3D 0; j < chrFilterSize; j++) { > > - u +=3D (unsigned)(chrUSrc[j][i] * chrFilter[j]); > > - v +=3D (unsigned)(chrVSrc[j][i] * chrFilter[j]); > > + u +=3D chrUSrc[j][i] * (unsigned)chrFilter[j]; > > + v +=3D chrVSrc[j][i] * (unsigned)chrFilter[j]; > > } > > > > output_pixel(&dest[2*i] , u); > > @@ -678,8 +678,8 @@ yuv2mono_X_c_template(SwsInternal *c, const int16_t > > *lumFilter, > > int Y2 =3D 1 << 18; > > > > for (j =3D 0; j < lumFilterSize; j++) { > > - Y1 +=3D (unsigned)(lumSrc[j][i] * lumFilter[j]); > > - Y2 +=3D (unsigned)(lumSrc[j][i+1] * lumFilter[j]); > > + Y1 +=3D lumSrc[j][i] * (unsigned)lumFilter[j]; > > + Y2 +=3D lumSrc[j][i+1] * (unsigned)lumFilter[j]; > > } > > Y1 >>=3D 19; > > Y2 >>=3D 19; > > @@ -896,12 +896,12 @@ yuv2422_X_c_template(SwsInternal *c, const int16_t > > *lumFilter, > > int V =3D 1 << 18; > > > > for (j =3D 0; j < lumFilterSize; j++) { > > - Y1 +=3D (unsigned)(lumSrc[j][i * 2] * lumFilter[j]); > > - Y2 +=3D (unsigned)(lumSrc[j][i * 2 + 1] * lumFilter[j]); > > + Y1 +=3D lumSrc[j][i * 2] * (unsigned)lumFilter[j]; > > + Y2 +=3D lumSrc[j][i * 2 + 1] * (unsigned)lumFilter[j]; > > } > > for (j =3D 0; j < chrFilterSize; j++) { > > - U +=3D (unsigned)(chrUSrc[j][i] * chrFilter[j]); > > - V +=3D (unsigned)(chrVSrc[j][i] * chrFilter[j]); > > + U +=3D chrUSrc[j][i] * (unsigned)chrFilter[j]; > > + V +=3D chrVSrc[j][i] * (unsigned)chrFilter[j]; > > } > > Y1 >>=3D 19; > > Y2 >>=3D 19; > > @@ -1802,12 +1802,12 @@ yuv2rgb_X_c_template(SwsInternal *c, const int1= 6_t > > *lumFilter, > > const void *r, *g, *b; > > > > for (j =3D 0; j < lumFilterSize; j++) { > > - Y1 +=3D (unsigned)(lumSrc[j][i * 2] * lumFilter[j]); > > - Y2 +=3D (unsigned)(lumSrc[j][i * 2 + 1] * lumFilter[j]); > > + Y1 +=3D lumSrc[j][i * 2] * (unsigned)lumFilter[j]; > > + Y2 +=3D lumSrc[j][i * 2 + 1] * (unsigned)lumFilter[j]; > > } > > for (j =3D 0; j < chrFilterSize; j++) { > > - U +=3D (unsigned)(chrUSrc[j][i] * chrFilter[j]); > > - V +=3D (unsigned)(chrVSrc[j][i] * chrFilter[j]); > > + U +=3D chrUSrc[j][i] * (unsigned)chrFilter[j]; > > + V +=3D chrVSrc[j][i] * (unsigned)chrFilter[j]; > > } > > Y1 >>=3D 19; > > Y2 >>=3D 19; > > @@ -1817,8 +1817,8 @@ yuv2rgb_X_c_template(SwsInternal *c, const int16_t > > *lumFilter, > > A1 =3D 1 << 18; > > A2 =3D 1 << 18; > > for (j =3D 0; j < lumFilterSize; j++) { > > - A1 +=3D (unsigned)(alpSrc[j][i * 2 ] * lumFilter[j]= ); > > - A2 +=3D (unsigned)(alpSrc[j][i * 2 + 1] * lumFilter[j]= ); > > + A1 +=3D alpSrc[j][i * 2 ] * (unsigned)lumFilter[j]; > > + A2 +=3D alpSrc[j][i * 2 + 1] * (unsigned)lumFilter[j]; > > } > > A1 >>=3D 19; > > A2 >>=3D 19; > > @@ -2179,11 +2179,11 @@ yuv2rgb_full_X_c_template(SwsInternal *c, const > > int16_t *lumFilter, > > int V =3D (1<<9)-(128 << 19); > > > > for (j =3D 0; j < lumFilterSize; j++) { > > - Y +=3D (unsigned)(lumSrc[j][i] * lumFilter[j]); > > + Y +=3D lumSrc[j][i] * (unsigned)lumFilter[j]; > > } > > for (j =3D 0; j < chrFilterSize; j++) { > > - U +=3D (unsigned)(chrUSrc[j][i] * chrFilter[j]); > > - V +=3D (unsigned)(chrVSrc[j][i] * chrFilter[j]); > > + U +=3D chrUSrc[j][i] * (unsigned)chrFilter[j]; > > + V +=3D chrVSrc[j][i] * (unsigned)chrFilter[j]; > > } > > Y >>=3D 10; > > U >>=3D 10; > > @@ -2191,7 +2191,7 @@ yuv2rgb_full_X_c_template(SwsInternal *c, const > > int16_t *lumFilter, > > if (hasAlpha) { > > A =3D 1 << 18; > > for (j =3D 0; j < lumFilterSize; j++) { > > - A +=3D (unsigned)(alpSrc[j][i] * lumFilter[j]); > > + A +=3D alpSrc[j][i] * (unsigned)lumFilter[j]; > > } > > A >>=3D 19; > > if (A & 0x100) > > @@ -2360,11 +2360,11 @@ yuv2gbrp_full_X_c(SwsInternal *c, const int16_t > > *lumFilter, > > int R, G, B; > > > > for (j =3D 0; j < lumFilterSize; j++) > > - Y +=3D (unsigned)(lumSrc[j][i] * lumFilter[j]); > > + Y +=3D lumSrc[j][i] * (unsigned)lumFilter[j]; > > > > for (j =3D 0; j < chrFilterSize; j++) { > > - U +=3D (unsigned)(chrUSrc[j][i] * chrFilter[j]); > > - V +=3D (unsigned)(chrVSrc[j][i] * chrFilter[j]); > > + U +=3D chrUSrc[j][i] * (unsigned)chrFilter[j]; > > + V +=3D chrVSrc[j][i] * (unsigned)chrFilter[j]; > > } > > > > Y >>=3D 10; > > @@ -2375,7 +2375,7 @@ yuv2gbrp_full_X_c(SwsInternal *c, const int16_t > > *lumFilter, > > A =3D 1 << 18; > > > > for (j =3D 0; j < lumFilterSize; j++) > > - A +=3D (unsigned)(alpSrc[j][i] * lumFilter[j]); > > + A +=3D alpSrc[j][i] * (unsigned)lumFilter[j]; > > > > if (A & 0xF8000000) > > A =3D av_clip_uintp2(A, 27); > > @@ -2679,7 +2679,7 @@ yuv2ya8_X_c(SwsInternal *c, const int16_t *lumFil= ter, > > int Y =3D 1 << 18, A =3D 1 << 18; > > > > for (j =3D 0; j < lumFilterSize; j++) > > - Y +=3D (unsigned)(lumSrc[j][i] * lumFilter[j]); > > + Y +=3D lumSrc[j][i] * (unsigned)lumFilter[j]; > > > > Y >>=3D 19; > > if (Y & 0x100) > > @@ -2687,7 +2687,7 @@ yuv2ya8_X_c(SwsInternal *c, const int16_t *lumFil= ter, > > > > if (hasAlpha) { > > for (j =3D 0; j < lumFilterSize; j++) > > - A +=3D (unsigned)(alpSrc[j][i] * lumFilter[j]); > > + A +=3D alpSrc[j][i] * (unsigned)lumFilter[j]; > > > > A >>=3D 19; > > > > @@ -2793,11 +2793,11 @@ yuv2v30_X_c_template(SwsInternal *c, const int1= 6_t > > *lumFilter, > > int j; > > > > for (j =3D 0; j < lumFilterSize; j++) > > - Y +=3D (unsigned)(lumSrc[j][i] * lumFilter[j]); > > + Y +=3D lumSrc[j][i] * (unsigned)lumFilter[j]; > > > > for (j =3D 0; j < chrFilterSize; j++) { > > - U +=3D (unsigned)(chrUSrc[j][i] * chrFilter[j]); > > - V +=3D (unsigned)(chrVSrc[j][i] * chrFilter[j]); > > + U +=3D chrUSrc[j][i] * (unsigned)chrFilter[j]; > > + V +=3D chrVSrc[j][i] * (unsigned)chrFilter[j]; > > } > > > > Y =3D av_clip_uintp2(Y >> 17, 10); > > @@ -2847,11 +2847,11 @@ yuv2xv36_X_c(SwsInternal *c, const int16_t > > *lumFilter, > > int j; > > > > for (j =3D 0; j < lumFilterSize; j++) > > - Y +=3D (unsigned)(lumSrc[j][i] * lumFilter[j]); > > + Y +=3D lumSrc[j][i] * (unsigned)lumFilter[j]; > > > > for (j =3D 0; j < chrFilterSize; j++) { > > - U +=3D (unsigned)(chrUSrc[j][i] * chrFilter[j]); > > - V +=3D (unsigned)(chrVSrc[j][i] * chrFilter[j]); > > + U +=3D chrUSrc[j][i] * (unsigned)chrFilter[j]; > > + V +=3D chrVSrc[j][i] * (unsigned)chrFilter[j]; > > } > > > > output_pixels(dest + 8 * i + 2, Y, 15, 12, 4) > > @@ -3011,13 +3011,13 @@ yuv2ayuv_X_c_template(SwsInternal *c, const > > int16_t *lumFilter, > > int V =3D 1 << 18, A =3D 255; > > > > for (j =3D 0; j < lumFilterSize; j++) > > - Y +=3D (unsigned)(lumSrc[j][i] * lumFilter[j]); > > + Y +=3D lumSrc[j][i] * (unsigned)lumFilter[j]; > > > > for (j =3D 0; j < chrFilterSize; j++) > > - U +=3D (unsigned)(chrUSrc[j][i] * chrFilter[j]); > > + U +=3D chrUSrc[j][i] * (unsigned)chrFilter[j]; > > > > for (j =3D 0; j < chrFilterSize; j++) > > - V +=3D (unsigned)(chrVSrc[j][i] * chrFilter[j]); > > + V +=3D chrVSrc[j][i] * (unsigned)chrFilter[j]; > > > > Y >>=3D 19; > > U >>=3D 19; > > @@ -3034,7 +3034,7 @@ yuv2ayuv_X_c_template(SwsInternal *c, const int16= _t > > *lumFilter, > > A =3D 1 << 18; > > > > for (j =3D 0; j < lumFilterSize; j++) > > - A +=3D (unsigned)(alpSrc[j][i] * lumFilter[j]); > > + A +=3D alpSrc[j][i] * (unsigned)lumFilter[j]; > > > > A >>=3D 19; > > > > @@ -3105,13 +3105,13 @@ AYUVPACKEDWRAPPER(uyva, AV_PIX_FMT_UYVA) > > int U =3D 1 << (shift - 1), V =3D 1 << (shift - 1); = \ > > = \ > > for (j =3D 0; j < lumFilterSize; j++) { = \ > > - Y1 +=3D (unsigned)(lumSrc[j][i * 2] * lumFilter[j]= ); > > \ > > - Y2 +=3D (unsigned)(lumSrc[j][i * 2 + 1] * lumFilter[j]= ); > > \ > > + Y1 +=3D lumSrc[j][i * 2] * (unsigned)lumFilter[j]; > > \ > > + Y2 +=3D lumSrc[j][i * 2 + 1] * (unsigned)lumFilter[j]; > > \ > > } = \ > > = \ > > for (j =3D 0; j < chrFilterSize; j++) { = \ > > - U +=3D (unsigned)(chrUSrc[j][i] * chrFilter[j]); > > \ > > - V +=3D (unsigned)(chrVSrc[j][i] * chrFilter[j]); > > \ > > + U +=3D chrUSrc[j][i] * (unsigned)chrFilter[j]; > > \ > > + V +=3D chrVSrc[j][i] * (unsigned)chrFilter[j]; > > \ > > } = \ > > = \ > > output_pixel(dest + 8 * i + 0, Y1, bits); = \ > > @@ -3259,13 +3259,13 @@ yuv2vyu444_X_c(SwsInternal *c, const int16_t > > *lumFilter, > > int V =3D 1 << 18; > > > > for (j =3D 0; j < lumFilterSize; j++) > > - Y +=3D (unsigned)(lumSrc[j][i] * lumFilter[j]); > > + Y +=3D lumSrc[j][i] * (unsigned)lumFilter[j]; > > > > for (j =3D 0; j < chrFilterSize; j++) > > - U +=3D (unsigned)(chrUSrc[j][i] * chrFilter[j]); > > + U +=3D chrUSrc[j][i] * (unsigned)chrFilter[j]; > > > > for (j =3D 0; j < chrFilterSize; j++) > > - V +=3D (unsigned)(chrVSrc[j][i] * chrFilter[j]); > > + V +=3D chrVSrc[j][i] * (unsigned)chrFilter[j]; > > > > Y >>=3D 19; > > U >>=3D 19; > > -- > > 2.49.1 > > >=20 > Seems fine applied thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety -- Benjamin Franklin --29FoG/QO+cYmZ5n9 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCaO6gwgAKCRBhHseHBAsP q/ioAJ4gJ4FriGDGWe78QVveeJgRxExuHwCfWmtMWOMuCG3dKY7WGOmMQocdDgM= =mmqG -----END PGP SIGNATURE----- --29FoG/QO+cYmZ5n9-- --===============8640234275484972846== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org --===============8640234275484972846==--