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 2C01645301 for ; Sun, 18 May 2025 20:52:23 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id B25DE68DA85; Sun, 18 May 2025 23:52:18 +0300 (EEST) Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id D5EB768DA53 for ; Sun, 18 May 2025 23:52:11 +0300 (EEST) Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-43edb40f357so29709555e9.0 for ; Sun, 18 May 2025 13:52:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747601531; x=1748206331; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=PDO+gDvyzs1iKT0oqUV1B4f2xcYWhQOFOxnMt7JQT48=; b=Orc1UQSKdZCtZpxfWv2XEi+X1Vf8a5D/GnI1AmvlEGJ7/tHPGg8RPcd2cI7MPj3dG+ /Q4G6W72ttjRmiSxWmCFBkFkrm9azPfO2KWWY8p8JASahZT49a/dqkX6H4BaqvQZDtGl d8Qqbh+crZ3lQd17cmcGiTPyR3b38Hb60yMapTTF2rmyHndOPOn78D0wbl1KQI8lPLHh vnx+hBg4ntXIh0cCr+c9ayzjB1MgAGPz8vFirKicH/Eqsl9/ebFEHZWG/JXJVJgHv8vs GUh+XykVCaXK6+QRSj4ymU8ybE5iZmavU1AXWnXV7fCZk2yeM42jmy/wWoeqBQ/iSIdr atOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747601531; x=1748206331; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=PDO+gDvyzs1iKT0oqUV1B4f2xcYWhQOFOxnMt7JQT48=; b=iTppnYD43aE50nK+u+btMUuSYQjbwS90KuD8QNArI+bO2+ebMTtutDNOtlVd/5UzAO jpCvC9wK/lCc2VAnon+4kg0MEmXsHmwFOoiOg1TPEbkYfEn4+2kAkoYQUXnL0j91A/nq MIOhmn+2I3Bb+dPn6CTgdZ516eLqJluLYXqAFKxLjTss2f1eXr6wm6BX7onUhBYcwt3E ViU8Nbv/NYhGEGP7IaP/9mkzpqL0J6Nt4isZmen//l7NtHNpG61snMGuTP18a5Qx21mY zaH6St3GbsdngfXIz+b6xqcZk3pyfVpmvoyQ7IF4yXEYuC8Jgp1IKTNoqI85aTdVjTGR FHuQ== X-Gm-Message-State: AOJu0YyWpjiCujkZ2GTKdHgc/MSA4WR0UpdC8fZQoIyP0SO4ETRQDqF0 mDhhuJNN5GMeHL0Ky+mO+i9WBf3Fl06TSh6IgQOuC46Lr6+PHwzfbyxVREOnZYoz X-Gm-Gg: ASbGncuT0m1CS62WfQtuV/BNO4BOh+OkAWCxLdIGk2AjjhwdQ5qcAnywonZoIXF3gVr 9wOXhBZ5VAry6aPl3XtX93pJF+Oioy7JBGyWgkTIv8VrxQN1zuoYlEYp4d9LKnQVgAmQ4jNvb6D h6/ocdbMGRteszlWG9CG5ByXeMulVAbrscrmNklFlTxUSe8Dnz8npiDrq4NFVu/4xtcuj7+2zDS tHfuFCYe9Z2ZITcUta7s7ltDuRhgOJYRsJ061svdcAoj2mXTqO7z7sQIF1ouYp1NukZct0bLSJ8 fMoYf0dTvbNDWTSvsbKo7pKZ+rG7Ut2QJfv5NVcY3KhK7NO/tAVU2DaZxQomLwzgGT1ZyFyeQMM tTZDw6AGJKNWS0UBwFaezm1a2AQSag2hJ05uUYE5KIYk= X-Google-Smtp-Source: AGHT+IGPBm8gXUzdCls5AtFsS2QN0h1l+MTizL1kNWRweE2PfoQbMvo4eInQ1ZtdkE/LK2Jtp0p6JQ== X-Received: by 2002:a05:600c:474a:b0:442:f44f:65b with SMTP id 5b1f17b1804b1-442fd675a33mr85643935e9.32.1747601530544; Sun, 18 May 2025 13:52:10 -0700 (PDT) Received: from localhost.localdomain (20.238-74-193.fia-dyn.isp.proximus.be. [193.74.238.20]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-442fd583f20sm113389525e9.28.2025.05.18.13.52.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 May 2025 13:52:10 -0700 (PDT) From: Ramiro Polla To: ffmpeg-devel@ffmpeg.org Date: Sun, 18 May 2025 22:52:07 +0200 Message-Id: <20250518205209.30343-1-ramiro.polla@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/3] swscale/swscale_unscaled: fix planarCopyWrapper() for yuv444p => yuva444p X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Currently, planarCopyWrapper() assumes that src[3] must be NULL when the source format has no alpha plane. This commit updates the condition for filling the alpha plane based on the number of components available in the source format as well. --- libswscale/swscale_unscaled.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c index b84120549e..307e5471a9 100644 --- a/libswscale/swscale_unscaled.c +++ b/libswscale/swscale_unscaled.c @@ -2221,7 +2221,7 @@ static int planarCopyWrapper(SwsInternal *c, const uint8_t *const src[], // ignore palette for GRAY8 if (plane == 1 && desc_dst->nb_components < 3) continue; - if (!src[plane] || (plane == 1 && desc_src->nb_components < 3)) { + if (!src[plane] || (plane == 1 && desc_src->nb_components < 3) || (plane == 3 && desc_src->nb_components <= 3)) { if (is16BPS(c->opts.dst_format) || isNBPS(c->opts.dst_format)) { fillPlane16(dst[plane], dstStride[plane], length, height, y, plane == 3, desc_dst->comp[plane].depth, -- 2.30.2 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".