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 C2E1845F3D for ; Wed, 19 Apr 2023 18:58:54 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 82B5D68BE2B; Wed, 19 Apr 2023 21:58:52 +0300 (EEST) Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BC61868838B for ; Wed, 19 Apr 2023 21:58:45 +0300 (EEST) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id 6B49540005 for ; Wed, 19 Apr 2023 18:58:42 +0000 (UTC) Date: Wed, 19 Apr 2023 20:58:38 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20230419185838.GS275832@pb2> References: <20230419181126.38662-1-leo.izen@gmail.com> <20230419181126.38662-2-leo.izen@gmail.com> MIME-Version: 1.0 In-Reply-To: <20230419181126.38662-2-leo.izen@gmail.com> Subject: Re: [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 Content-Type: multipart/mixed; boundary="===============6950694561639944934==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============6950694561639944934== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="7WENQHN97/U9vH7R" Content-Disposition: inline --7WENQHN97/U9vH7R Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 19, 2023 at 02:11:24PM -0400, Leo Izen wrote: > 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(-) >=20 > 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, cons= t uint8_t *mb_bitmask, > s->h_scount[i] =3D s->h_count[index]; > s->v_scount[i] =3D s->v_count[index]; > =20 > - if(nb_components =3D=3D 3 && s->nb_components =3D=3D 3 && s->avc= tx->pix_fmt =3D=3D AV_PIX_FMT_GBRP) > + if((nb_components =3D=3D 3 || nb_components =3D=3D 1) && s->nb_c= omponents =3D=3D 3 > + && s->avctx->pix_fmt =3D=3D AV_PIX_FMT_GBRP && !s->progr= essive) > index =3D (index+2)%3; Why is progressive/!progressive special cased in all the new RGB code ? thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Whats the most studid thing your enemy could do ? Blow himself up Whats the most studid thing you could do ? Give up your rights and freedom because your enemy blew himself up. --7WENQHN97/U9vH7R Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZEA53gAKCRBhHseHBAsP q08iAJ9ugbbPmmLmOWXvI0S1IfdnSvZVeQCfeVUJbH62Yt9VhMWTYNyxof8ZN5E= =uCbe -----END PGP SIGNATURE----- --7WENQHN97/U9vH7R-- --===============6950694561639944934== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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". --===============6950694561639944934==--