Format of decompressed JPEG when out_color_space is YCbCr/YUV

37 views
Skip to first unread message

Madeleine

unread,
Oct 8, 2018, 10:11:04 AM10/8/18
to libjpeg-turbo User Discussion/Support
When going directly through the libjpeg-turbo API (not TurboJPEG), what is the format of the output returned by jpeg_read_scanlines when I set the jpeg_decompress_struct to have an out_color_space of YCbCr/YUV? 

Thanks!

DRC

unread,
Oct 8, 2018, 12:48:36 PM10/8/18
to libjpeg-t...@googlegroups.com
jpeg_read_scanlines() with out_color_space==JCS_YCbCr will upsample the
YCbCr planes into packed YCbCr pixels, so essentially it does upsampling
without color conversion. You can get the raw YCbCr planar data by
using jpeg_read_raw_data() instead (look at the source code for the
tjDecompressToYUVPlanes() function in turbojpeg.c for an example.)

Madeleine Barowsky

unread,
Oct 8, 2018, 5:46:09 PM10/8/18
to libjpeg-t...@googlegroups.com
Thank you! 

--
You received this message because you are subscribed to the Google Groups "libjpeg-turbo User Discussion/Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to libjpeg-turbo-u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/libjpeg-turbo-users/44f39760-dbc7-abe5-53e5-35281a4e29e4%40virtualgl.org.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages