Hello,
Initially, I would like to thank for development of this library, I do
appreciate the compression speed.
Currently I'm using the "raw_data_in" mode and "jpeg_write_raw_data"
function to encode YCbCr image. It works great when creating JFIF
conformant output, but my current requirements is to produce raw
"scan" content. Therefore, I have few questions about libjpeg-turbo
API:
1. Is there any possibility to disable the writing of any markers and
header segments? I managed to disable DQT and DHT tables, but my goal
is to get Huffman encoded "scan" data only. Simply speaking I want
libjpeg to perform transformation, DC prediction, entropy encoding and
flush encoded MCUs into some buffer. The reason is to create RFC2435
conformant RTP payload, witch forces the transmission of some
parameters in different way than JFIF. Obviously, I can strip unwanted
markers and segments but it's a significant waste of time.
2. Same as 1. but encoding only a part of picture. I would like to
divide the the work into multiple threads and at the end combine the
content of output buffers (obviously with inclusion of restart
markers). Currently, I'd have to provide fake image dimensions to the
encoder (i.e. a quarter of height in case of using four threads) to
by-pass the verification if entire picture have been encoded.
Moreover, I'd have to perform above mentioned stripping of unwanted
markers/segments.
Unfortunately, I didn't found such a features in API exposed in
"jpeglib.h" but maybe I missed something.
--
Best regards
Jakub Stankowski
|