On Wed, Jun 17, 2020 at 04:22:06PM +0530, Gautam Ramakrishnan wrote:
> Hi all,
> 
> I am working on the JPEG2000 decoder. However I am having trouble
> understanding pixel formats correctly.
> For example, from my understanding, the reference file p1_01.j2k pixel
> format does not get recognized by the native decoder. When I force a
> gray8 format on it, I am able to get output similar to opj_decompress
> (I have made other modifications to the decoder as well).
> It would be great if I could be referred to some documentation which
> would help me understand how exactly the pixel format selection works.

for libavcodec in general the decoder sets the format in 
AVCodecContext.pix_fmt, 
for interpreting what each format is you can see
libavutil/pixdesc.*
libavutil/pixfmt.h

There are also a few other colospace related fields color_primaries, color_trc, 
colorspace, color_range, chroma_sample_location

to choose the pix_fmt for a jpeg2000 image, the code is IIRC basically trying
to guess it from various fields from the jpeg2000

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

There will always be a question for which you do not know the correct answer.

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