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(-)
> 
> 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;

Why is progressive/!progressive special cased in all the new RGB code ?

thx

[...]

-- 
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.

Attachment: signature.asc
Description: PGP signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to