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 6ED404D91F for ; Sat, 3 Jan 2026 05:32:55 +0000 (UTC) Authentication-Results: ffbox; dkim=fail (body hash mismatch (got b'kjB5dv6QVsVCLxOVM7de+lrl0TV4lBPJp9EdCDZdtUQ=', expected b'vyPKAJGExXWhB8KUOBGuA0KfmT8BB/Fh1A8YaeUGIqo=')) header.d=googlemail.com 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=1767418350; h=mime-version : references : in-reply-to : date : message-id : to : reply-to : subject : list-id : list-archive : list-archive : list-help : list-owner : list-post : list-subscribe : list-unsubscribe : from : cc : content-type : content-transfer-encoding : from; bh=vPL/XxwFzOJEeSWYCk7pAt1FTsUQL5UvIHYBkcDWrig=; b=TynbacpaQjKZAX4M0criGIeoNbhOQZ24ENC+MPbdIB1BJmcdikO5lqyIUby3oY8F3RePV QRi5Y4d3aa3pJkHRXnIXjOJdsFidALPE2FMe4vXOb02waC0D7KnP4zqXBq284E+wB3Os/bo 9QgUSdjNwjZKV5ZQUAxIjHGbQzfVXpvsS3YzsHzqQd4i3yprJYtTfmkF/qmDpXFzvlLcvIP 6Bk4UKRg9n5A/YX4SS9E2MPzWx8Ddngr0WfodXCCZBveCZI93py22T9OZyJfusmvpScaGgP GEVYohFjVqVH8n+eJ9HPe7X65s5aDW3BY8C+RQWR1685GjtmvFMehYKYdFtA== Received: from [172.20.0.4] (unknown [172.20.0.4]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 09F87690D32; Sat, 3 Jan 2026 07:32:30 +0200 (EET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=ffmpeg.org; s=arc; t=1767418307; b=Y5pk0izBy6GITq9EebgnLq+R22f+vpAypoK7b7OAsx0I2n9GJmDn3pRhgW598XFBKombG JX76Kexc0Wyb/zk+LdhCaBt1W7krnEBJZ+1wMaGYEx1hs0ZqF6lmGp1KOBj3v+QvRGMk5PN PU2gOk1wi1rtoMNvzjgYYn2lR/wgMOeUz8tPazwgaZccoNCHfNdWrYK25knEbxkuM47ZfmZ yljPSqe0AfaLu+BMm82oQHNO0YXyxjcC5mtmHz79lptGC+1t4AZn3mOyf9+BU+nkKSVN/IP ifLrotJ4EfLfx//iVQA20i1scOMvjnliC3XPoKWq9U/1qUNvqlN6BNlDc6dA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ffmpeg.org; s=arc; t=1767418307; 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=kjB5dv6QVsVCLxOVM7de+lrl0TV4lBPJp9EdCDZdtUQ=; b=l679Cc+ToqZrNP9lwN3lppjG63PTvBn0Na9K0oLKSpsu1t8yVtI/kp6I1JDX380gEX5NW zCNKwSamTNOX6dYCH9rXe1n979GlGp0gR35JBsnwwhs6zZHUdJBffpOOuhDy0pyX4QuNNbj MpnNK2odsiQVGvkjM0b+s+/Uy21dLNqsZsG4bvc3c32K3SYKkBYZFYg+UU/KMVcb1tcd1qp b/xzK598KvNG3TMMxnPKKWcl1HdOGMDHnWI8eNbLEnlUvYA1nap/KSiPaCNkjNuRJrWI7ir 8v1H1yiEnxgW20YcCZCenO6XHqkahQ/6Xb5SXtcmkwpjllUjuz5+z6ACAi9A== ARC-Authentication-Results: i=1; ffmpeg.org; dkim=pass header.d=googlemail.com; arc=none; dmarc=pass header.from=googlemail.com policy.dmarc=quarantine Authentication-Results: ffmpeg.org; dkim=pass header.d=googlemail.com; arc=none (Message is not ARC signed); dmarc=pass (Used From Domain Record) header.from=googlemail.com policy.dmarc=quarantine Received: from mail-yx1-f45.google.com (mail-yx1-f45.google.com [74.125.224.45]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 5DA40690070 for ; Sat, 3 Jan 2026 07:31:32 +0200 (EET) Received: by mail-yx1-f45.google.com with SMTP id 956f58d0204a3-6447743ce90so11545159d50.2 for ; Fri, 02 Jan 2026 21:31:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20230601; t=1767418290; x=1768023090; darn=ffmpeg.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=vyPKAJGExXWhB8KUOBGuA0KfmT8BB/Fh1A8YaeUGIqo=; b=OwGXzXrqXiAHd0V9Lzkn+qMMN8/fyXM4Z+qG2wrQdNjaXpX64wXIua7/SgEm+GZVJ+ 3hgoM0Cs1q7U5Wdr0fWcoRgzKFypC2ot3HnSo/v0AelC+gD6WOEfBJGrbjf5ZCfgprzJ ZNuiX9rYqzi84gN0nI5lvqwQN3ujY1F7+s+Gfn5J2iuEiZGGWz842dmKvMnLZM+qHy9l W41zp4+UXzUcIKpjYI/wGgWqMEbkK6tIOUGcoN/eXSY1NqI0Teu69Y1lJ1UtLA3wEHS1 aADRO5A5CfOeJQAEf9vB1S89Er4MQ64avBlG/z7HNXHgoAAWLYYJdUeb0vzIBuIJASGN Z0gA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767418290; x=1768023090; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=vyPKAJGExXWhB8KUOBGuA0KfmT8BB/Fh1A8YaeUGIqo=; b=sowy8M4ohcuaJa2o/Ss/y4E6pDunRU6YSnLk9T/NFA5UpsvlxTYfXlTOoHn34T/zQ4 dUymahqHOTwjlMnlb27M+MvvfoNKa660gZ0iNYIvGlPoVmc7Ri1mi/S1ZOor/ei090da ywhZlE9BB5AblVjSiGg33RTnb+IczJl+PaQOWIFIUbDXt7QSzseYGb7Ojx8Iy1UO9Lee cw6OUaTix3Z29E/o5K/OOTVQQUW2VC45ZnOAhf9mp6BfUgNyR1JLApzl+3LcovtxmSCm cMy3opFV81y5K3LcGqxqraQeYUsOeKJqN88U+RvfFTKEhGLrWvx1f4tGLGABHIEfSqMc e6nw== X-Gm-Message-State: AOJu0YyWcV7aea3PP1QgM1AeBVA1ssAZKj6KGXCL3KP7ATsrLW4Q3L4c d7XgAMN7p84eEpj4Hbk3yqlyHornzp5sTNOGbR+2spzcDPwz5tzK4NZDCYLIMcUTyqHMiMU1PNJ qqFbuUi6MmYyWZra6KTP8v0VcodZHvjlwVg== X-Gm-Gg: AY/fxX5cg7CCADRqnSsf8HT7iEnh0Ugh+N2L0QpFORTvfITX6TttGdc6DLjE7XqTDsX meInBWf67WzdmcFc7FOStekhxWHbD4UPrOsLmdJD+TiUoXl/mBuXIaOcFo1IPaaECglFzeNPH07 ruENVImxkJ5ZL5LwqKyUZ8lqGnMYatHTXQLmJr4TrwHM84zcZs3Lrh/vdy13TYGiBQgwgp6+2Km ckGtpNcxM/69jhfe0Ly/AOs2g9G6ALgzqxHT+vgRJOzHjJLPipr9m17SwVtosObhN6ZbF6D/bLs dIkMLQ== X-Google-Smtp-Source: AGHT+IGAtkXyLw0T6qjQT4myXEj9HBxkliAzGRB22IkEWrRUhAK+5RzLZuhqyqEATPOGjh+fwmJbScc9193J82ib8ms= X-Received: by 2002:a05:690e:4106:b0:63e:30d0:61a0 with SMTP id 956f58d0204a3-6466a84169bmr33826170d50.26.1767418290239; Fri, 02 Jan 2026 21:31:30 -0800 (PST) MIME-Version: 1.0 References: <176036206413.25.15905318861432080946@bf907ddaa564> In-Reply-To: Date: Sat, 3 Jan 2026 05:31:21 +0000 X-Gm-Features: AQt7F2o4AnpKk5mCDVpasH7oetydG82bqnW-Ms18yRxb5RAd6_3cTRBCi7EB2ik Message-ID: To: FFmpeg development discussions and patches Message-ID-Hash: OWLMKAESBOEIFA6RF4AR6GJMFCJSKUCP X-Message-ID-Hash: OWLMKAESBOEIFA6RF4AR6GJMFCJSKUCP X-MailFrom: SRS0=PdoU=7I=googlemail.com=kieran618@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-Content-Filtered-By: Mailman/MimeDel 3.3.10 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: Kieran Kunhya via ffmpeg-devel Cc: Michael Niedermayer , Kieran Kunhya Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Archived-At: List-Archive: List-Post: I see that this has a CVE associated with it that Ubuntu rates "High" Severity: https://ubuntu.com/security/CVE-2025-63757 What is actually vulnerable here? A vulnerability that a pixel value might theoretically be wrong. Kieran On Tue, 14 Oct 2025, 20:13 Michael Niedermayer via ffmpeg-devel, < ffmpeg-devel@ffmpeg.org> wrote: > On Mon, Oct 13, 2025 at 05:20:55PM +0100, Kieran Kunhya via ffmpeg-devel > wrote: > > On Mon, 13 Oct 2025, 14:28 michaelni via ffmpeg-devel, < > > ffmpeg-devel@ffmpeg.org> wrote: > > > > > 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 = 0xffff; > > > > > > for (j = 0; j < lumFilterSize; j++) > > > - Y += (unsigned)(lumSrc[j][i] * lumFilter[j]); > > > + Y += lumSrc[j][i] * (unsigned)lumFilter[j]; > > > > > > Y >>= 15; > > > Y += (1<<3) + 0x8000; > > > @@ -1037,7 +1037,7 @@ yuv2ya16_X_c_template(SwsInternal *c, const > int16_t > > > *lumFilter, > > > if (hasAlpha) { > > > A = -0x40000000 + (1<<14); > > > for (j = 0; j < lumFilterSize; j++) > > > - A += (unsigned)(alpSrc[j][i] * lumFilter[j]); > > > + A += alpSrc[j][i] * (unsigned)lumFilter[j]; > > > > > > A >>= 15; > > > A += 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 > yuv2* > > > > > > 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 > dstFormat, > > > const uint8_t *chrDither, > > > int v = chrDither[(i + 3) & 7] << 12; > > > int j; > > > for (j=0; j > > - u += (unsigned)(chrUSrc[j][i] * chrFilter[j]); > > > - v += (unsigned)(chrVSrc[j][i] * chrFilter[j]); > > > + u += chrUSrc[j][i] * (unsigned)chrFilter[j]; > > > + v += chrVSrc[j][i] * (unsigned)chrFilter[j]; > > > } > > > > > > dest[2*i]= av_clip_uint8(u>>19); > > > @@ -516,8 +516,8 @@ static void yuv2nv12cX_c(enum AVPixelFormat > dstFormat, > > > const uint8_t *chrDither, > > > int v = chrDither[(i + 3) & 7] << 12; > > > int j; > > > for (j=0; j > > - u += (unsigned)(chrUSrc[j][i] * chrFilter[j]); > > > - v += (unsigned)(chrVSrc[j][i] * chrFilter[j]); > > > + u += chrUSrc[j][i] * (unsigned)chrFilter[j]; > > > + v += chrVSrc[j][i] * (unsigned)chrFilter[j]; > > > } > > > > > > dest[2*i]= av_clip_uint8(v>>19); > > > @@ -577,8 +577,8 @@ static void yuv2p01xcX_c(int big_endian, const > uint8_t > > > *chrDither, > > > int v = 1 << (shift - 1); > > > > > > for (j = 0; j < chrFilterSize; j++) { > > > - u += (unsigned)(chrUSrc[j][i] * chrFilter[j]); > > > - v += (unsigned)(chrVSrc[j][i] * chrFilter[j]); > > > + u += chrUSrc[j][i] * (unsigned)chrFilter[j]; > > > + v += 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 = 1 << 18; > > > > > > for (j = 0; j < lumFilterSize; j++) { > > > - Y1 += (unsigned)(lumSrc[j][i] * lumFilter[j]); > > > - Y2 += (unsigned)(lumSrc[j][i+1] * lumFilter[j]); > > > + Y1 += lumSrc[j][i] * (unsigned)lumFilter[j]; > > > + Y2 += lumSrc[j][i+1] * (unsigned)lumFilter[j]; > > > } > > > Y1 >>= 19; > > > Y2 >>= 19; > > > @@ -896,12 +896,12 @@ yuv2422_X_c_template(SwsInternal *c, const > int16_t > > > *lumFilter, > > > int V = 1 << 18; > > > > > > for (j = 0; j < lumFilterSize; j++) { > > > - Y1 += (unsigned)(lumSrc[j][i * 2] * lumFilter[j]); > > > - Y2 += (unsigned)(lumSrc[j][i * 2 + 1] * lumFilter[j]); > > > + Y1 += lumSrc[j][i * 2] * (unsigned)lumFilter[j]; > > > + Y2 += lumSrc[j][i * 2 + 1] * (unsigned)lumFilter[j]; > > > } > > > for (j = 0; j < chrFilterSize; j++) { > > > - U += (unsigned)(chrUSrc[j][i] * chrFilter[j]); > > > - V += (unsigned)(chrVSrc[j][i] * chrFilter[j]); > > > + U += chrUSrc[j][i] * (unsigned)chrFilter[j]; > > > + V += chrVSrc[j][i] * (unsigned)chrFilter[j]; > > > } > > > Y1 >>= 19; > > > Y2 >>= 19; > > > @@ -1802,12 +1802,12 @@ yuv2rgb_X_c_template(SwsInternal *c, const > int16_t > > > *lumFilter, > > > const void *r, *g, *b; > > > > > > for (j = 0; j < lumFilterSize; j++) { > > > - Y1 += (unsigned)(lumSrc[j][i * 2] * lumFilter[j]); > > > - Y2 += (unsigned)(lumSrc[j][i * 2 + 1] * lumFilter[j]); > > > + Y1 += lumSrc[j][i * 2] * (unsigned)lumFilter[j]; > > > + Y2 += lumSrc[j][i * 2 + 1] * (unsigned)lumFilter[j]; > > > } > > > for (j = 0; j < chrFilterSize; j++) { > > > - U += (unsigned)(chrUSrc[j][i] * chrFilter[j]); > > > - V += (unsigned)(chrVSrc[j][i] * chrFilter[j]); > > > + U += chrUSrc[j][i] * (unsigned)chrFilter[j]; > > > + V += chrVSrc[j][i] * (unsigned)chrFilter[j]; > > > } > > > Y1 >>= 19; > > > Y2 >>= 19; > > > @@ -1817,8 +1817,8 @@ yuv2rgb_X_c_template(SwsInternal *c, const > int16_t > > > *lumFilter, > > > A1 = 1 << 18; > > > A2 = 1 << 18; > > > for (j = 0; j < lumFilterSize; j++) { > > > - A1 += (unsigned)(alpSrc[j][i * 2 ] * lumFilter[j]); > > > - A2 += (unsigned)(alpSrc[j][i * 2 + 1] * lumFilter[j]); > > > + A1 += alpSrc[j][i * 2 ] * (unsigned)lumFilter[j]; > > > + A2 += alpSrc[j][i * 2 + 1] * (unsigned)lumFilter[j]; > > > } > > > A1 >>= 19; > > > A2 >>= 19; > > > @@ -2179,11 +2179,11 @@ yuv2rgb_full_X_c_template(SwsInternal *c, const > > > int16_t *lumFilter, > > > int V = (1<<9)-(128 << 19); > > > > > > for (j = 0; j < lumFilterSize; j++) { > > > - Y += (unsigned)(lumSrc[j][i] * lumFilter[j]); > > > + Y += lumSrc[j][i] * (unsigned)lumFilter[j]; > > > } > > > for (j = 0; j < chrFilterSize; j++) { > > > - U += (unsigned)(chrUSrc[j][i] * chrFilter[j]); > > > - V += (unsigned)(chrVSrc[j][i] * chrFilter[j]); > > > + U += chrUSrc[j][i] * (unsigned)chrFilter[j]; > > > + V += chrVSrc[j][i] * (unsigned)chrFilter[j]; > > > } > > > Y >>= 10; > > > U >>= 10; > > > @@ -2191,7 +2191,7 @@ yuv2rgb_full_X_c_template(SwsInternal *c, const > > > int16_t *lumFilter, > > > if (hasAlpha) { > > > A = 1 << 18; > > > for (j = 0; j < lumFilterSize; j++) { > > > - A += (unsigned)(alpSrc[j][i] * lumFilter[j]); > > > + A += alpSrc[j][i] * (unsigned)lumFilter[j]; > > > } > > > A >>= 19; > > > if (A & 0x100) > > > @@ -2360,11 +2360,11 @@ yuv2gbrp_full_X_c(SwsInternal *c, const int16_t > > > *lumFilter, > > > int R, G, B; > > > > > > for (j = 0; j < lumFilterSize; j++) > > > - Y += (unsigned)(lumSrc[j][i] * lumFilter[j]); > > > + Y += lumSrc[j][i] * (unsigned)lumFilter[j]; > > > > > > for (j = 0; j < chrFilterSize; j++) { > > > - U += (unsigned)(chrUSrc[j][i] * chrFilter[j]); > > > - V += (unsigned)(chrVSrc[j][i] * chrFilter[j]); > > > + U += chrUSrc[j][i] * (unsigned)chrFilter[j]; > > > + V += chrVSrc[j][i] * (unsigned)chrFilter[j]; > > > } > > > > > > Y >>= 10; > > > @@ -2375,7 +2375,7 @@ yuv2gbrp_full_X_c(SwsInternal *c, const int16_t > > > *lumFilter, > > > A = 1 << 18; > > > > > > for (j = 0; j < lumFilterSize; j++) > > > - A += (unsigned)(alpSrc[j][i] * lumFilter[j]); > > > + A += alpSrc[j][i] * (unsigned)lumFilter[j]; > > > > > > if (A & 0xF8000000) > > > A = av_clip_uintp2(A, 27); > > > @@ -2679,7 +2679,7 @@ yuv2ya8_X_c(SwsInternal *c, const int16_t > *lumFilter, > > > int Y = 1 << 18, A = 1 << 18; > > > > > > for (j = 0; j < lumFilterSize; j++) > > > - Y += (unsigned)(lumSrc[j][i] * lumFilter[j]); > > > + Y += lumSrc[j][i] * (unsigned)lumFilter[j]; > > > > > > Y >>= 19; > > > if (Y & 0x100) > > > @@ -2687,7 +2687,7 @@ yuv2ya8_X_c(SwsInternal *c, const int16_t > *lumFilter, > > > > > > if (hasAlpha) { > > > for (j = 0; j < lumFilterSize; j++) > > > - A += (unsigned)(alpSrc[j][i] * lumFilter[j]); > > > + A += alpSrc[j][i] * (unsigned)lumFilter[j]; > > > > > > A >>= 19; > > > > > > @@ -2793,11 +2793,11 @@ yuv2v30_X_c_template(SwsInternal *c, const > int16_t > > > *lumFilter, > > > int j; > > > > > > for (j = 0; j < lumFilterSize; j++) > > > - Y += (unsigned)(lumSrc[j][i] * lumFilter[j]); > > > + Y += lumSrc[j][i] * (unsigned)lumFilter[j]; > > > > > > for (j = 0; j < chrFilterSize; j++) { > > > - U += (unsigned)(chrUSrc[j][i] * chrFilter[j]); > > > - V += (unsigned)(chrVSrc[j][i] * chrFilter[j]); > > > + U += chrUSrc[j][i] * (unsigned)chrFilter[j]; > > > + V += chrVSrc[j][i] * (unsigned)chrFilter[j]; > > > } > > > > > > Y = av_clip_uintp2(Y >> 17, 10); > > > @@ -2847,11 +2847,11 @@ yuv2xv36_X_c(SwsInternal *c, const int16_t > > > *lumFilter, > > > int j; > > > > > > for (j = 0; j < lumFilterSize; j++) > > > - Y += (unsigned)(lumSrc[j][i] * lumFilter[j]); > > > + Y += lumSrc[j][i] * (unsigned)lumFilter[j]; > > > > > > for (j = 0; j < chrFilterSize; j++) { > > > - U += (unsigned)(chrUSrc[j][i] * chrFilter[j]); > > > - V += (unsigned)(chrVSrc[j][i] * chrFilter[j]); > > > + U += chrUSrc[j][i] * (unsigned)chrFilter[j]; > > > + V += 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 = 1 << 18, A = 255; > > > > > > for (j = 0; j < lumFilterSize; j++) > > > - Y += (unsigned)(lumSrc[j][i] * lumFilter[j]); > > > + Y += lumSrc[j][i] * (unsigned)lumFilter[j]; > > > > > > for (j = 0; j < chrFilterSize; j++) > > > - U += (unsigned)(chrUSrc[j][i] * chrFilter[j]); > > > + U += chrUSrc[j][i] * (unsigned)chrFilter[j]; > > > > > > for (j = 0; j < chrFilterSize; j++) > > > - V += (unsigned)(chrVSrc[j][i] * chrFilter[j]); > > > + V += chrVSrc[j][i] * (unsigned)chrFilter[j]; > > > > > > Y >>= 19; > > > U >>= 19; > > > @@ -3034,7 +3034,7 @@ yuv2ayuv_X_c_template(SwsInternal *c, const > int16_t > > > *lumFilter, > > > A = 1 << 18; > > > > > > for (j = 0; j < lumFilterSize; j++) > > > - A += (unsigned)(alpSrc[j][i] * lumFilter[j]); > > > + A += alpSrc[j][i] * (unsigned)lumFilter[j]; > > > > > > A >>= 19; > > > > > > @@ -3105,13 +3105,13 @@ AYUVPACKEDWRAPPER(uyva, AV_PIX_FMT_UYVA) > > > int U = 1 << (shift - 1), V = 1 << (shift - 1); > \ > > > > \ > > > for (j = 0; j < lumFilterSize; j++) { > \ > > > - Y1 += (unsigned)(lumSrc[j][i * 2] * lumFilter[j]); > > > \ > > > - Y2 += (unsigned)(lumSrc[j][i * 2 + 1] * lumFilter[j]); > > > \ > > > + Y1 += lumSrc[j][i * 2] * (unsigned)lumFilter[j]; > > > \ > > > + Y2 += lumSrc[j][i * 2 + 1] * (unsigned)lumFilter[j]; > > > \ > > > } > \ > > > > \ > > > for (j = 0; j < chrFilterSize; j++) { > \ > > > - U += (unsigned)(chrUSrc[j][i] * chrFilter[j]); > > > \ > > > - V += (unsigned)(chrVSrc[j][i] * chrFilter[j]); > > > \ > > > + U += chrUSrc[j][i] * (unsigned)chrFilter[j]; > > > \ > > > + V += 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 = 1 << 18; > > > > > > for (j = 0; j < lumFilterSize; j++) > > > - Y += (unsigned)(lumSrc[j][i] * lumFilter[j]); > > > + Y += lumSrc[j][i] * (unsigned)lumFilter[j]; > > > > > > for (j = 0; j < chrFilterSize; j++) > > > - U += (unsigned)(chrUSrc[j][i] * chrFilter[j]); > > > + U += chrUSrc[j][i] * (unsigned)chrFilter[j]; > > > > > > for (j = 0; j < chrFilterSize; j++) > > > - V += (unsigned)(chrVSrc[j][i] * chrFilter[j]); > > > + V += chrVSrc[j][i] * (unsigned)chrFilter[j]; > > > > > > Y >>= 19; > > > U >>= 19; > > > -- > > > 2.49.1 > > > > > > > Seems fine > > applied > > thx > > [...] > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > Those who would give up essential Liberty, to purchase a little > temporary Safety, deserve neither Liberty nor Safety -- Benjamin Franklin > _______________________________________________ > ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org > To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org > _______________________________________________ ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org