From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <ffmpeg-devel-bounces@ffmpeg.org> Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 21C4C4E827 for <ffmpegdev@gitmailbox.com>; Mon, 17 Mar 2025 10:44:50 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2D32368B926; Mon, 17 Mar 2025 12:44:12 +0200 (EET) Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 27E85687CA4 for <ffmpeg-devel@ffmpeg.org>; Mon, 17 Mar 2025 12:44:02 +0200 (EET) Received: from haasn.dev (unknown [10.30.1.1]) by haasn.dev (Postfix) with UTF8SMTP id DA45042716; Mon, 17 Mar 2025 11:44:01 +0100 (CET) From: Niklas Haas <ffmpeg@haasn.xyz> To: ffmpeg-devel@ffmpeg.org Date: Mon, 17 Mar 2025 11:43:50 +0100 Message-ID: <20250317104357.307832-4-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250317104357.307832-1-ffmpeg@haasn.xyz> References: <20250317104357.307832-1-ffmpeg@haasn.xyz> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 04/11] tests/swscale: use yuva444p as reference X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org> List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe> List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel> List-Post: <mailto:ffmpeg-devel@ffmpeg.org> List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help> List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe> Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Cc: Niklas Haas <git@haasn.dev> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> Archived-At: <https://master.gitmailbox.com/ffmpegdev/20250317104357.307832-4-ffmpeg@haasn.xyz/> List-Archive: <https://master.gitmailbox.com/ffmpegdev/> List-Post: <mailto:ffmpegdev@gitmailbox.com> From: Niklas Haas <git@haasn.dev> Instead of the lossy yuva420p. This does change the results compared to the status quo, but is more reflective of the actual strength of a conversion, since it will faithfully measure the round-trip error from subsampling and upsampling. --- libswscale/tests/swscale.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libswscale/tests/swscale.c b/libswscale/tests/swscale.c index 3f140f51f7..8db5ee0af5 100644 --- a/libswscale/tests/swscale.c +++ b/libswscale/tests/swscale.c @@ -82,7 +82,7 @@ static int fmt_comps(enum AVPixelFormat fmt) static void get_mse(int mse[4], const AVFrame *a, const AVFrame *b, int comps) { - av_assert1(a->format == AV_PIX_FMT_YUVA420P); + av_assert1(a->format == AV_PIX_FMT_YUVA444P); av_assert1(b->format == a->format); av_assert1(b->width == a->width && b->height == a->height); @@ -90,8 +90,8 @@ static void get_mse(int mse[4], const AVFrame *a, const AVFrame *b, int comps) const int is_chroma = p == 1 || p == 2; const int stride_a = a->linesize[p]; const int stride_b = b->linesize[p]; - const int w = (a->width + is_chroma) >> is_chroma; - const int h = (a->height + is_chroma) >> is_chroma; + const int w = a->width; + const int h = a->height; uint64_t sum = 0; if (comps & (1 << p)) { @@ -499,7 +499,7 @@ bad_option: goto error; ref->width = opts.w; ref->height = opts.h; - ref->format = AV_PIX_FMT_YUVA420P; + ref->format = AV_PIX_FMT_YUVA444P; if (sws_scale_frame(sws[0], ref, rgb) < 0) goto error; -- 2.48.1 _______________________________________________ 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".