On Thu, Jul 02, 2020 at 12:04:22AM +0530, gautamr...@gmail.com wrote: > From: Gautam Ramakrishnan <gautamr...@gmail.com> > > This patch assigns default pix format values when > a match does not take place. > --- > libavcodec/jpeg2000dec.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c > index 3f4a9ef96c..86f9170723 100644 > --- a/libavcodec/jpeg2000dec.c > +++ b/libavcodec/jpeg2000dec.c > @@ -436,6 +436,15 @@ static int get_siz(Jpeg2000DecoderContext *s) > s->cdef[3] = 3; > i = 0; > } > + } else if (ncomponents == 3 && s->precision == 8) { > + s->avctx->pix_fmt = AV_PIX_FMT_RGB24; > + i = 0; > + } else if (ncomponents == 2 && s->precision == 8) { > + s->avctx->pix_fmt = AV_PIX_FMT_YA8; > + i = 0;
I dont think 2 and 3 component formats can ignore the subsampling of the planes. They have to match even if they are not 1 if they mismatch the differing plane would need to be rescaled Thats unless iam missing something, which is possible thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB In a rich man's house there is no place to spit but his face. -- Diogenes of Sinope
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".