[FFmpeg-devel] [PATCH 5/5] libavcodec/jpeg2000dec.c: Remove log2_chroma check in pixel format selection
Michael Niedermayer
michael at niedermayer.cc
Tue Jun 23 00:00:26 EEST 2020
On Mon, Jun 22, 2020 at 12:14:39AM +0530, Gautam Ramakrishnan wrote:
> On Mon, Jun 22, 2020 at 12:12 AM <gautamramk at gmail.com> wrote:
> >
> > From: Gautam Ramakrishnan <gautamramk at gmail.com>
> >
> > The log2_chroma_wh is derived from the sample separations of the
> > codestream if the file is a j2k codestream. Not sure if sample
> > separation is same is subsampling and whether using sample
> > separation values from the codestream to determine pixel format.
> > ---
> > libavcodec/jpeg2000dec.c | 2 --
> > 1 file changed, 2 deletions(-)
> >
> > diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
> > index c8c89803ac..2b9659bf96 100644
> > --- a/libavcodec/jpeg2000dec.c
> > +++ b/libavcodec/jpeg2000dec.c
> > @@ -225,8 +225,6 @@ static int pix_fmt_match(enum AVPixelFormat pix_fmt, int components,
> >
> > case 1:
> > match = match && desc->comp[0].depth >= bpc &&
> > - (log2_chroma_wh >> 2 & 3) == 0 &&
> > - (log2_chroma_wh & 3) == 0 &&
> > (desc->flags & AV_PIX_FMT_FLAG_PAL) == pal8 * AV_PIX_FMT_FLAG_PAL;
> > }
> > return match;
> > --
> > 2.17.1
> >
> This patch has to be discussed. I do not see any other formats having
> a check like this,
see pix_fmt_id in mjpegdec.c
> but that is probably because the pixel format is determined from the
> headers and not
> from the codestream.
If the removed check was wrong then i suspect more changes are needed
and just removing this alone will not be correct
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
There will always be a question for which you do not know the correct answer.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20200622/1119ddb5/attachment.sig>
More information about the ffmpeg-devel
mailing list