From patchwork Wed Jun 5 18:31:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 49591 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:d792:0:b0:460:55fa:d5ed with SMTP id db18csp582662vqb; Wed, 5 Jun 2024 11:32:02 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXiAnHigvdEgsF1vGXMnFxG5nD3r1lXu1LU+5HQBKTPmwzPoukdhiDHdOK/1K1bnmsKpReK1vXhZu/oLhp0MKjAeEj3MOx1ZcDPQw== X-Google-Smtp-Source: AGHT+IHPh3ejccj2z6WGhZh3CIQzeTrVlivyW6AM8/5a+SmjaVOjHZOAikzAiLvhBNfGXnMKoIlq X-Received: by 2002:a05:6512:5d5:b0:52a:39aa:7767 with SMTP id 2adb3069b0e04-52bab4ca5bbmr2310654e87.3.1717612322087; Wed, 05 Jun 2024 11:32:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717612322; cv=none; d=google.com; s=arc-20160816; b=jHr1E9dKjIe7o3VlkNEdEBcaH5dw1cuyaDmFULSK1FY/GknVLzNHZ5eOJU8BYd9YgF cXkBDiJdVkO5kFBtqNyADk8WXmiv8r191KROrtwWr6BvVuvUCxihXBKfO8O5QdxHV4EV rBadF1/sjG5q9/QLOZlXQDvuB7Sl6lGeIxpLYfWFE/UmhgrI4C1zoieH3uXo4SmEPf5t 7UKwzZhCCWoxGVw92rXtksB+2ryPqtJnnM5zTBIhnZAub1uK+HuJL3Wr0qD6dzPpFBxS +sKgiC4CWiLZyQZXsFrUZs79hAB2gR5oAuSQzj2UTy6ICV6bICk4UoW/bG65V+nr6JiF eBAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=l9oKzzICI4wH9Dp6vA96vtHQ20WIIUKXfKLc0KszjfQ=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=jteMdsfC8kLHJ+wfNgbYqendH0VW8qm6slWJFP+t4+wjmiIFgx7TtD2rQdlS3c1c5c gn48QXEZ8LUtlPY+oqPB9eTTuDQtWpVzS3QUPvPT9QdXm17yMKya5y6zf0PWffvjk+EZ YAvfUFm2yTrOrgvlulu917dt187rtPDbIRGd6AGVXr9M7Ny8sA9zEnmxoUfN0EGlU0uM BdmX3jrGgdV1bG7HAw67HXZUGeG4mOl/+8V36u/BQnJVHVaeqG9R44xyedanc063+0Tm gVZI3tWbG+s8AM21kuoNHFY/iEosg2qIWZrtmcQHQtS9um+wYUm8ZZlttyUOaZ+XnQJA L6HA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=IIuclVXi; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a68ae69cc36si513929466b.75.2024.06.05.11.32.01; Wed, 05 Jun 2024 11:32:02 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=IIuclVXi; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7C1DA68D331; Wed, 5 Jun 2024 21:31:58 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C804E68D331 for ; Wed, 5 Jun 2024 21:31:51 +0300 (EEST) Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-70257104b4dso81179b3a.1 for ; Wed, 05 Jun 2024 11:31:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717612309; x=1718217109; 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=sOUAWJZVgp8sC7EFN1xhxefB0k950FfliZSTgfZhWsA=; b=IIuclVXiUP0lx1oJm+gskxEKIa6pgpKnoWicMp3L/Gq5ZJ8GglSRtV2vzr8BpsHukW KzWKMc+RcAjpts3GweeKUc+WSwN/VBBgQqoE6LPOhn60+M6MovJYk/3s8DoGz/dKI92g 7T+3cTk7U7C+sTlnA17YTRNaHJCKwwjJ3ZjOMql2zHFqs8nqyvtYioe+yivriC+drKhn +8u4dZafAAYuXKQI1XI0ja/MEHIVZzm6kX8Dr/Qur/DpI2N0FT2/GimDAT2wbDwqiRoj 6nUORioscr/0KYKj720HGN2McOOZ1NyELMRXcrGXyJve+A+/BAMteM4wKQugQGSOI9Zb 2eWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717612309; x=1718217109; 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=sOUAWJZVgp8sC7EFN1xhxefB0k950FfliZSTgfZhWsA=; b=SdQlXprV/uoGgAr1qhndAOlGJFidoBHCHT0bZ4sdlaoFz2lRBE/IGRZ2OF/rd12wyP EelECeHzneq2iJ1oUe9nzMIFkTeJTNfyQtQXecwLekGElWcBR1fTvBqehC3g/7K7SZtW 2S7wy9/gVjiA4Cxn6fqw68tZ5jhkhLb/RHIbE05yVYDY5OF+zNv+k7EIF7aEKByW7X3J ap6ybtCVfwvjyyqLEi6b77Hj6Qpx47C9B3DTeYiT32VaX3tT40TTR0lrNanINlcQ0uau gjRXEkzsdGDwvicFJe/R9mgVqlbQSkNwDSiToKgDg8HF/Qor0YCAsMXs1/BOxzBBP9q+ ruiA== X-Gm-Message-State: AOJu0Ywja8UeXsIH9CWG6ijOHQyd5DmtuO2+sKZFJlTAacT+4ZlHkCvM tFw27bdYDtvuhBpuBX2uccUZt8qOPfvzLUTc/HFQqJFc52PfcaPs0VyRZA== X-Received: by 2002:a05:6a00:124a:b0:6f4:5504:59b6 with SMTP id d2e1a72fcca58-703e5a0cf46mr4016426b3a.29.1717612309282; Wed, 05 Jun 2024 11:31:49 -0700 (PDT) Received: from localhost.localdomain ([190.194.167.233]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-70242b30013sm8902474b3a.211.2024.06.05.11.31.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 11:31:48 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Wed, 5 Jun 2024 15:31:42 -0300 Message-ID: <20240605183142.2831-1-jamrial@gmail.com> X-Mailer: git-send-email 2.45.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] checkasm/sw_rgb: test rgb32/bgr32 to yuv 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: p7oMLLaFfNWN Signed-off-by: James Almer --- tests/checkasm/sw_rgb.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/checkasm/sw_rgb.c b/tests/checkasm/sw_rgb.c index b51d0836c3..57bd6b20cd 100644 --- a/tests/checkasm/sw_rgb.c +++ b/tests/checkasm/sw_rgb.c @@ -187,11 +187,13 @@ static const int input_sizes[] = {8, 128, 1080, MAX_LINE_SIZE}; static const enum AVPixelFormat rgb_formats[] = { AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24, + AV_PIX_FMT_RGBA, + AV_PIX_FMT_BGRA, }; static void check_rgb_to_y(struct SwsContext *ctx) { - LOCAL_ALIGNED_32(uint8_t, src, [MAX_LINE_SIZE * 3]); + LOCAL_ALIGNED_32(uint8_t, src, [MAX_LINE_SIZE * 4]); LOCAL_ALIGNED_32(uint8_t, dst0_y, [MAX_LINE_SIZE * 2]); LOCAL_ALIGNED_32(uint8_t, dst1_y, [MAX_LINE_SIZE * 2]); @@ -199,7 +201,7 @@ static void check_rgb_to_y(struct SwsContext *ctx) const uint8_t *unused1, const uint8_t *unused2, int width, uint32_t *rgb2yuv, void *opq); - randomize_buffers(src, MAX_LINE_SIZE * 3); + randomize_buffers(src, MAX_LINE_SIZE * 4); for (int i = 0; i < FF_ARRAY_ELEMS(rgb_formats); i++) { const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(rgb_formats[i]); @@ -228,7 +230,7 @@ static void check_rgb_to_y(struct SwsContext *ctx) static void check_rgb_to_uv(struct SwsContext *ctx) { - LOCAL_ALIGNED_32(uint8_t, src, [MAX_LINE_SIZE * 3]); + LOCAL_ALIGNED_32(uint8_t, src, [MAX_LINE_SIZE * 4]); LOCAL_ALIGNED_32(uint8_t, dst0_u, [MAX_LINE_SIZE * 2]); LOCAL_ALIGNED_32(uint8_t, dst0_v, [MAX_LINE_SIZE * 2]); LOCAL_ALIGNED_32(uint8_t, dst1_u, [MAX_LINE_SIZE * 2]); @@ -238,7 +240,7 @@ static void check_rgb_to_uv(struct SwsContext *ctx) const uint8_t *src1, const uint8_t *src2, const uint8_t *src3, int width, uint32_t *pal, void *opq); - randomize_buffers(src, MAX_LINE_SIZE * 3); + randomize_buffers(src, MAX_LINE_SIZE * 4); for (int i = 0; i < 2 * FF_ARRAY_ELEMS(rgb_formats); i++) { enum AVPixelFormat src_fmt = rgb_formats[i / 2];