From patchwork Wed Apr 19 18:11:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Izen X-Patchwork-Id: 41250 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4645:b0:e3:3194:9d20 with SMTP id eb5csp683713pzb; Wed, 19 Apr 2023 11:11:54 -0700 (PDT) X-Google-Smtp-Source: AKy350ZzudmWuNmg35n5uTBROocPGiGcg/9K7vZr4v+nz5kQdiNSUodaxbRgCihQzol1bSTXOKLS X-Received: by 2002:a17:906:39cf:b0:94d:e1ac:9aee with SMTP id i15-20020a17090639cf00b0094de1ac9aeemr3132285eje.33.1681927914444; Wed, 19 Apr 2023 11:11:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681927914; cv=none; d=google.com; s=arc-20160816; b=uNRr8PJBI8TNGXoF6LLtQD53GRqWChuqzFAmYu9yc/FuIIGamlwlWIKeBUxf9sii3D y/TVSaUye1A7HZqDFjFEGYwXsM9G0rQoAwXS6A5Ms/h6Zzx/bJR64+3OcQMkc4rLQGlr y3pJJ3fUY0wnBOUuGYP9gL5Fxt6Fn2BC16+7IbFFZiGbdn++IoTgI74DKtTrVQ7IR9yX IfhUw+2EwmgB873UqXVYKtM+tDTMlTG2YrcA6Wrcf0JJed4/jN26x6rNhqGrzof+3PDQ WH0n6RU9qZkju+0x3BbvyVnQD4b1dnRFF0YAJtb6O1cVVgKYiQ59cwBPZRbXxg4WP5d6 zEQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=Q/kIgPSesz8Qi7rwGt2RufA3Ucpr/rVZvilsq4H63AU=; b=GMfuZmzT7c2G3KYTTGdPQI5xxtLVSFdg+98K93dADpQYTDm0fGyBuJ85ti4dEFr0Db o3ljjK14XsLLPX0FYQNarMMEWVSgaCKMzOGT9zdSNns/x8ym/86aAgDkRqjEUxwiBOB+ 34pe/AciN6kylFhgjEXMo3s3/TNcaYFxuMz2+BsXPMt5Cd2GKjQVhuavW5IICsQokluJ pz4cncnCsNpQfRJZF/tFUm7PM2pPuJ31uC7upd4dO/dPp80kvQ6OCSsqCyOrCLtC1wWW kBzj45n/eIHoznOpj7aVphb8ClMrizFB+ZJeZ0myKyYsQ8Lt+ZPCLeClil+LeF4rOjtF bAZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20221208 header.b=qB7gfGIH; 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 wg1-20020a1709078f0100b00953198aff1dsi2060266ejc.1001.2023.04.19.11.11.54; Wed, 19 Apr 2023 11:11:54 -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=20221208 header.b=qB7gfGIH; 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 2BF8868A23A; Wed, 19 Apr 2023 21:11:38 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-yb1-f170.google.com (mail-yb1-f170.google.com [209.85.219.170]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id ED33568BA8E for ; Wed, 19 Apr 2023 21:11:30 +0300 (EEST) Received: by mail-yb1-f170.google.com with SMTP id 3f1490d57ef6-b8f2747f720so28870276.1 for ; Wed, 19 Apr 2023 11:11:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681927889; x=1684519889; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZTUeuBnteDtpeD0LjLOfAyxV+u9uQCiqmGDOdXejzu0=; b=qB7gfGIHMWJ4fOmrK5CKucDkNcBeM9vxyVRzT6LuSGxWNiDmwYx+DZlP7kUael2KEk /LzlTpZK7FQrhbB46iR7MDfz8ljup0HkKdNL7vdeAw9VlQIxQuglAvd58QUTTH0zCyr1 8RU08jJ7dBJCmgKVAxbh376ELDySE3SOwEf/+A/vawkVsJ1hQBqyCxOJ7TwKFKDPRmDQ +itDJZ01Yp93qiOJQxhCay/0gjqWZLhi6YvQByYZQJuV5OYBe8E8wAjI6qbQYbqXToog pGokXIVCXdzC3huy1NTbN+dm69mE5lSasmtgKIVsAwyi5Y7ZNarZYMESD20HDzPrXBFO DVYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681927889; x=1684519889; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZTUeuBnteDtpeD0LjLOfAyxV+u9uQCiqmGDOdXejzu0=; b=K9cJdB96sF50/PI8gl/Q6mL31sK/Dgg6ETHWBoL5bM1leoX0sWIk4p0t6tr3KyGx1T od3ntiln2vjRYvnI9duKp1n7aUvWNarZy9+8Omb8TqBpAURQeykykNlVr08mOT0n6Md+ SOD8meA7pbcFAw5YkjXXbI0eDuBlON3PmXY9OJm6b6dtK1qazBpxq9WSA0wwD6/G8vs/ 68YzqKpSn0MCS31gITcm7vmLFf8lHbQQm4Da2uRohUsqy8yQSHzSEzc/CS7MI8iC928s ARFi9oRVlvSO7rXVx9cnuAF53knyJ3y1zhCfI1rnlEaXtnPzShKmCsYuRjevnRkj7SCz wrJA== X-Gm-Message-State: AAQBX9fSEVvreXjisEGY3YSYwl5EqPYMECMuhDLBG3nEJZ7t2kd/Z0SU kEfmuZ/MCaNAOGnjhmR4xJ96JOdtSAQ= X-Received: by 2002:a81:1b10:0:b0:53c:6fca:a1c4 with SMTP id b16-20020a811b10000000b0053c6fcaa1c4mr17710287ywb.2.1681927889562; Wed, 19 Apr 2023 11:11:29 -0700 (PDT) Received: from gauss.local (c-98-224-219-15.hsd1.mi.comcast.net. [98.224.219.15]) by smtp.gmail.com with ESMTPSA id w67-20020a814946000000b00555e1886350sm280586ywa.78.2023.04.19.11.11.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Apr 2023 11:11:29 -0700 (PDT) From: Leo Izen To: ffmpeg-devel@ffmpeg.org Date: Wed, 19 Apr 2023 14:11:24 -0400 Message-Id: <20230419181126.38662-2-leo.izen@gmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230419181126.38662-1-leo.izen@gmail.com> References: <20230419181126.38662-1-leo.izen@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v3 1/3] avcodec/mjpegdec: fix non-subsampled RGB JPEGs 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 Cc: Leo Izen Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: WmbuZV3HS+5Z The change introduced in b18a9c29713abc3a1b081de3f320ab53a47120c6 created a regression for non-subsampled progressive RGB jpegs. This should fix that. --- libavcodec/mjpegdec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 01537d4774..1e3ddb72fb 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -1698,7 +1698,8 @@ int ff_mjpeg_decode_sos(MJpegDecodeContext *s, const uint8_t *mb_bitmask, s->h_scount[i] = s->h_count[index]; s->v_scount[i] = s->v_count[index]; - if(nb_components == 3 && s->nb_components == 3 && s->avctx->pix_fmt == AV_PIX_FMT_GBRP) + if((nb_components == 3 || nb_components == 1) && s->nb_components == 3 + && s->avctx->pix_fmt == AV_PIX_FMT_GBRP && !s->progressive) index = (index+2)%3; s->comp_index[i] = index; From patchwork Wed Apr 19 18:11:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Izen X-Patchwork-Id: 41251 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4645:b0:e3:3194:9d20 with SMTP id eb5csp683794pzb; Wed, 19 Apr 2023 11:12:03 -0700 (PDT) X-Google-Smtp-Source: AKy350ZZT/v0ptBzg7ij6BOyDvBebCtJ9zLM1ZN9j5MxLuH4W9jaTKS+Vq80cW0tpm4DEH3ehGaR X-Received: by 2002:a05:6402:14:b0:508:3f06:8fd1 with SMTP id d20-20020a056402001400b005083f068fd1mr2210883edu.29.1681927923347; Wed, 19 Apr 2023 11:12:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681927923; cv=none; d=google.com; s=arc-20160816; b=WYmEYnNk3vC32tSy42uydHAPOJXFLsgpMCUuOzCDt8P+wtaXUohDX5vvNoap3aldhz 3zG4LDYix33V4A0NMYXjCHMTtpm9tUJHkS0NckTm7tHgE+CcCHG5M7oCnFMOxF/zcUcF +0jiz40l9tFvCJafCcveusRPyIh+669LXqugm0WJ49e6a5QIrkVgomzLK0sujUa0rMMD II758l82T2yHgNfFK5oz3zGD8k/CbEwG5ZgIJ1fHaPnODyguRkWlmw0OA5g1EgMPvpPf 54uu7gzseICLTGZUSGRvfpN/itIEnJXrxuwmdENZ8hvmHkNYAClzttNNBIbimgnw2iwl ZHAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=D+BVQMAVDOVxWDOYbMn9aFq2/5p2cXXN5ESKYMsXc7A=; b=OFozmAVk+0gmywypqWdsXMatCD0kuXaYxDuR/pEc9hmyXZXruNXqAW+h8CBdHTXQqp IZmcSKyEUs5K5ZB6aS6YGt0kFef/Q34f5Mh8MEzZLyMKoGm7DqPjN0TfsvIR2kGclyXz A3BF0aGKoZcmWzs8kZUjnKZhRvnKgOxxoLuQFn27rC2qiXgccZQNs4/9mYb7YQ7SJ3Oa +IaqyJxQAIs/0RHNbjmhXEZohbp582KbT5qCphbV6LVMmEeX7JqvUJ0i+N6COqCgTe65 fCMIQWUBDJAPH1RNFOCxLuCRLL72fUmwOfB0cy4jam5OjxVbXZ2NX1Ey9EUcZkAiRU+1 TNtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20221208 header.b=jnT+8SdG; 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 p25-20020a056402075900b005067c4146e4si14194162edy.233.2023.04.19.11.12.03; Wed, 19 Apr 2023 11:12:03 -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=20221208 header.b=jnT+8SdG; 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 42E0568BE34; Wed, 19 Apr 2023 21:11:40 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-yw1-f170.google.com (mail-yw1-f170.google.com [209.85.128.170]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9733368B680 for ; Wed, 19 Apr 2023 21:11:31 +0300 (EEST) Received: by mail-yw1-f170.google.com with SMTP id 00721157ae682-54f8b687a06so607747b3.0 for ; Wed, 19 Apr 2023 11:11:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681927890; x=1684519890; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=1m99/ZRQFasSBFJVJkW1FGEiRKd5ywRsGhJS9xUD204=; b=jnT+8SdGalkbq77oUo25Dcs6tsLebPq0ywo0TQp6qcwKuar57cWKCT8iI70iVWjvIr U0jEm9UsotQ4HUyNIi0pd3fu31VWcOE2J27AcorkQEMdxxsoSwCvo8U4AsDYrDR0yNr4 pwjG58lSeoBgmBKsgIUzKHCdfQouAh6BhtaYZqCkw9NnYBMXrQ5b+rVD8tgVWN9esKWO 6Zu89yHKC0z6x2tVvyvdOBiJhqUhWVYwOw6kXKpdvPTxmLnFV2NleWQ2LbbRcrJkfVMr WgiRoomPpsMX4VhqffRUbzbU9iN3OKyYY1sqg1muokXHuHM1H+LgRXuAs6jp2cBbiLTK X+WA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681927890; x=1684519890; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1m99/ZRQFasSBFJVJkW1FGEiRKd5ywRsGhJS9xUD204=; b=N+aHpg8tfF0UJsgtwOI3IoadDpLwjwSqDdOEOf69JQRLaRHtF1Ftdkb8i8wkKAs78O REL9BxESs3bazaLVNUsRes3T0Ot5IJILU2U8rpeqhgAXVE8t/4Hr+D9qttIW2UVTy/aS zGAWPMy6fwf2aT/seSQccVJxdfRWvMALE9lozcCgO9pRDVpsyOisMiRUggoMLBG7hjsW S/qqVazMDHvsFDzjjHZhVUvdjjenhkYiatwgpuEZAaOu170ncWJwYEdjAAIfB2cEmM20 FUh70m9cxpFq1410vfMXDScbay0h+3gDW0RWzUA9DAjIAA0Y7uhKExnC/9WUDocbfT4h edNA== X-Gm-Message-State: AAQBX9fYH2NVFCIRX2TawVxFhWAR1w7EhHJxVMcEYnKp/nYkn/QUYCZO b+61CqgNJI9rBVARZquSh2Wulg+AtvE= X-Received: by 2002:a81:743:0:b0:54f:87d0:cb3d with SMTP id 64-20020a810743000000b0054f87d0cb3dmr17837954ywh.4.1681927890256; Wed, 19 Apr 2023 11:11:30 -0700 (PDT) Received: from gauss.local (c-98-224-219-15.hsd1.mi.comcast.net. [98.224.219.15]) by smtp.gmail.com with ESMTPSA id w67-20020a814946000000b00555e1886350sm280586ywa.78.2023.04.19.11.11.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Apr 2023 11:11:29 -0700 (PDT) From: Leo Izen To: ffmpeg-devel@ffmpeg.org Date: Wed, 19 Apr 2023 14:11:25 -0400 Message-Id: <20230419181126.38662-3-leo.izen@gmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230419181126.38662-1-leo.izen@gmail.com> References: <20230419181126.38662-1-leo.izen@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v3 2/3] avcodec/mjpeg: fix weird RGB-subsampled baseline JPEGs 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 Cc: Leo Izen Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: PuNW8thiwioP These were broken before any of the recent RGB JPEG commits. This is an additional fix to bring them in line with the rest of the RGB jpegs, which should now all work after the previous patch. Fixes #10190. --- libavcodec/mjpegdec.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 1e3ddb72fb..330c5da5a8 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -576,6 +576,12 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) if (s->adobe_transform == 0 || s->component_id[0] == 'R' && s->component_id[1] == 'G' && s->component_id[2] == 'B') { s->avctx->pix_fmt = AV_PIX_FMT_GBRP; + if (!s->progressive) { + for (int i = 0; i < 2; i++) { + FFSWAP(int, s->upscale_h[i], s->upscale_h[(i + 2) % 3]); + FFSWAP(int, s->upscale_v[i], s->upscale_v[(i + 2) % 3]); + } + } } else { s->avctx->pix_fmt = s->cs_itu601 ? AV_PIX_FMT_YUV444P : AV_PIX_FMT_YUVJ444P; s->avctx->color_range = s->cs_itu601 ? AVCOL_RANGE_MPEG : AVCOL_RANGE_JPEG; From patchwork Wed Apr 19 18:11:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Izen X-Patchwork-Id: 41252 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4645:b0:e3:3194:9d20 with SMTP id eb5csp683925pzb; Wed, 19 Apr 2023 11:12:12 -0700 (PDT) X-Google-Smtp-Source: AKy350bO/xSw6pgRyINlkuJ+yKueeyOG48RQVlsqFDrOT3vnCHCfVJo1yC86qw1G7Y6AnaQmwiqV X-Received: by 2002:aa7:d152:0:b0:506:bc29:2ce7 with SMTP id r18-20020aa7d152000000b00506bc292ce7mr6642632edo.29.1681927932702; Wed, 19 Apr 2023 11:12:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681927932; cv=none; d=google.com; s=arc-20160816; b=duziE0TOeWkvqDhQkmzcZZEGIU5kZCF4ZENun62WGAQTKFFYGSPZhVZGFHOxRtj8A9 Ir6gkygOhac6LcwtIEMka7dKmFQ/3OSrimJn7WfAglenk002oA/FduCIMnQEIYYsZjex IHn29vuTho8wwKsYc0BSrDjtMUQFKA3fg+SdFR/tAYlpHfIcHD6ZmHmb8y6VGgsZF37Y BvSAgZUTDJSGkg+5NxiMtkLTbIfttv6Wbse7Lma9xsPOgA7j7sF5ld9VBgz8p7dErghZ Xg4bPcKjdPGEP6giAdUH/B/hAuHS1h85Yw17+/bWw14aCKjEd7E0PZNrdfkbMvcZrBKV jVqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=KBH3ZCBAiPd51eKcGWV2Q4DEJnd/EvlA/iJeLSYHJ+s=; b=dIwB7ln8eSZJP8+PjKox/uTRU2pslWBoUWEumAQA6oYF+qNlIztB+Zu3513Z/TJt6J r4V4qj40T5NySSsb0fmAnY+xuYHAcp3g5bujYv4d9SrJnHRgoQkpB85lq7pgvuIq7GR/ TK3TwLtTmo/adrG0h8VofgTdaeH7f8Xmms7ml2VnFdiq6B2Gs+VIE83ZvWzXdGYhETVP jsKSUB2nP+IUqxUSp8A94I3WrasK7mqrlVj3ALIJoaeBhh/dIRD/O3wdc9LfQ6Lx4NOh 61VcrqcrHLq6tiFEWS9idn5dCXfeQCx+THrYKI+jfFRTj8Wrmjqe8iAk7YLi4G1BXMyW Zpwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20221208 header.b="Mvyz/Hq5"; 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 f14-20020a056402150e00b00506f0105478si588891edw.428.2023.04.19.11.12.12; Wed, 19 Apr 2023 11:12:12 -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=20221208 header.b="Mvyz/Hq5"; 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 2EF4668BDD9; Wed, 19 Apr 2023 21:11:41 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-yb1-f181.google.com (mail-yb1-f181.google.com [209.85.219.181]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5409568BE03 for ; Wed, 19 Apr 2023 21:11:32 +0300 (EEST) Received: by mail-yb1-f181.google.com with SMTP id 3f1490d57ef6-b9242800284so32148276.1 for ; Wed, 19 Apr 2023 11:11:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681927891; x=1684519891; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QLb767mdK/HAbHOK0j5kQwxzcPqXZ4HH9xWH1q/H3zg=; b=Mvyz/Hq5buk7vBV1qNyV3qaMmA1sRV+omX8/eipDo+cErFNKg0Y/+rXHrkAep3lx9O vTeR2zANL8jW8KuiADzNq5Xctd/9xAJ0OioEqQHnU9O4vgiCO60s6/o7cF6WwH1VJULc NbdvB6Y/IcU4KDD4KXX84phkOo2GKs5fdNqO5PBBnaViF5rMzWb0nZGzwsIbwlD8ShkJ eTBQte+LlLG8zZFLpyQL+u7W/Wf9Y+L/+PvSqRAVjHh5Gv4vxhxPf20zqGP1CGhqIZq/ 205REyJuPAbyKR1lOXE4TO1B0Y1uvW5WbIWRvxOxtCQcvxCZNwTyjCTzPDKuj696Z9M3 m2rA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681927891; x=1684519891; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QLb767mdK/HAbHOK0j5kQwxzcPqXZ4HH9xWH1q/H3zg=; b=TPZULIG5gnmb8dolOt8U9eUTssaA3sg7bYRw2Z6XTkJ9l/sKuDngbz/fuKcvCF8i7o McDc+ZodR1fmvusi6Ro7JnSvE02Q8Eymc+YQjEx304wCyHAl3A3Ho55Hg3QS6iPMAlG/ q4N2QcAH/5hOqwReedTT6r7Z5X8exkK6d15rvuizV5QicnSy3wVCrSnCqpNA0UbJBD1m AAtUFgVeu4EUaG5b1T/Ei1nexgipOfvwI8bIlz0c713ttUvWr8bpSyDZ7XS9mfxzVIpB L/aesMQDOiDAm5KfCRJqFEppP4xbRtQ+yh/0MkXqTiV1zxZJL1izIjZScOtjvQOrlExj Qh9g== X-Gm-Message-State: AAQBX9do/3/r9le3VLzNHkzok7blv16xyCa2di4BlqaTjLXdMKUXfYcX uiHtecAfhRSoUwKOG8lS6HCEN6WnXew= X-Received: by 2002:a25:b0a5:0:b0:b75:458a:7c26 with SMTP id f37-20020a25b0a5000000b00b75458a7c26mr19868716ybj.3.1681927890940; Wed, 19 Apr 2023 11:11:30 -0700 (PDT) Received: from gauss.local (c-98-224-219-15.hsd1.mi.comcast.net. [98.224.219.15]) by smtp.gmail.com with ESMTPSA id w67-20020a814946000000b00555e1886350sm280586ywa.78.2023.04.19.11.11.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Apr 2023 11:11:30 -0700 (PDT) From: Leo Izen To: ffmpeg-devel@ffmpeg.org Date: Wed, 19 Apr 2023 14:11:26 -0400 Message-Id: <20230419181126.38662-4-leo.izen@gmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230419181126.38662-1-leo.izen@gmail.com> References: <20230419181126.38662-1-leo.izen@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v3 3/3] fate: add tests for RGB jpegs 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 Cc: Leo Izen Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: JFpI/LHUQsup Added framecrc tests for RGB JPEGs to verify future changes to the decoder. --- tests/fate/image.mak | 9 +++++++++ tests/ref/fate/jpg-rgb-221 | 6 ++++++ tests/ref/fate/jpg-rgb-baseline | 6 ++++++ tests/ref/fate/jpg-rgb-progressive | 6 ++++++ 4 files changed, 27 insertions(+) create mode 100644 tests/ref/fate/jpg-rgb-221 create mode 100644 tests/ref/fate/jpg-rgb-baseline create mode 100644 tests/ref/fate/jpg-rgb-progressive diff --git a/tests/fate/image.mak b/tests/fate/image.mak index 42dd90feaa..93bc715ca3 100644 --- a/tests/fate/image.mak +++ b/tests/fate/image.mak @@ -337,6 +337,15 @@ fate-jpg-12bpp: CMD = framecrc -idct simple -i $(TARGET_SAMPLES)/jpg/12bpp.jpg - FATE_JPG += fate-jpg-jfif fate-jpg-jfif: CMD = framecrc -idct simple -i $(TARGET_SAMPLES)/jpg/20242.jpg +FATE_JPG += fate-jpg-rgb-baseline +fate-jpg-rgb-baseline: CMD = framecrc -idct simple -i $(TARGET_SAMPLES)/jpg/george-insect-rgb-baseline.jpg + +FATE_JPG += fate-jpg-rgb-progressive +fate-jpg-rgb-progressive: CMD = framecrc -idct simple -i $(TARGET_SAMPLES)/jpg/george-insect-rgb-progressive.jpg + +FATE_JPG += fate-jpg-rgb-221 +fate-jpg-rgb-221: CMD = framecrc -idct simple -i $(TARGET_SAMPLES)/jpg/george-insect-rgb-xyb.jpg + FATE_JPG_TRANSCODE-$(call TRANSCODE, MJPEG, MJPEG IMAGE_JPEG_PIPE, IMAGE_PNG_PIPE_DEMUXER PNG_DECODER SCALE_FILTER) += fate-jpg-icc fate-jpg-icc: CMD = transcode png_pipe $(TARGET_SAMPLES)/png1/lena-int_rgb24.png mjpeg "-vf scale" "" "-show_frames" diff --git a/tests/ref/fate/jpg-rgb-221 b/tests/ref/fate/jpg-rgb-221 new file mode 100644 index 0000000000..32250db493 --- /dev/null +++ b/tests/ref/fate/jpg-rgb-221 @@ -0,0 +1,6 @@ +#tb 0: 1/25 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 64x43 +#sar 0: 0/1 +0, 0, 0, 1, 8256, 0x81617757 diff --git a/tests/ref/fate/jpg-rgb-baseline b/tests/ref/fate/jpg-rgb-baseline new file mode 100644 index 0000000000..f7ff29e9a2 --- /dev/null +++ b/tests/ref/fate/jpg-rgb-baseline @@ -0,0 +1,6 @@ +#tb 0: 1/25 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 64x43 +#sar 0: 0/1 +0, 0, 0, 1, 8256, 0x98ad8863 diff --git a/tests/ref/fate/jpg-rgb-progressive b/tests/ref/fate/jpg-rgb-progressive new file mode 100644 index 0000000000..b0d118d21a --- /dev/null +++ b/tests/ref/fate/jpg-rgb-progressive @@ -0,0 +1,6 @@ +#tb 0: 1/25 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 64x43 +#sar 0: 0/1 +0, 0, 0, 1, 8256, 0xbb6e8830