From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id CA71345F28 for ; Wed, 19 Apr 2023 18:12:00 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0FDE768BE32; Wed, 19 Apr 2023 21:11:40 +0300 (EEST) 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-Google-Smtp-Source: AKy350ZLxlLSMaShFo6u5enqA4k6TKXn+2O1tqPWPXrsnywGp057a1ZE1rNKUw8b3D7Oli67buaCZQ== 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 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: 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; -- 2.40.0 _______________________________________________ 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".