[CinCV TNG] [PATCH] Use jpeglib to decode and encode jpeg images

Einar Rünkaru einarrunkaru at gmail.com
Tue Jul 11 12:24:34 CEST 2017



On 07/10/2017 08:09 PM, Johannes Sixt wrote:
> Am 09.07.2017 um 20:27 schrieb Einar Rünkaru:
>> Supports libjpeg versions 6.2 - 8
>> Does not depend on quicktime any more
>> Fixes crash on some jpeg samples
> 
>> +    jpeg_decompress.output_width = work_frame->get_w();
>> +    jpeg_decompress.output_height = work_frame->get_h();
>> +
>> +    jpeg_read_header(&jpeg_decompress, TRUE);
>> +    jpeg_start_decompress(&jpeg_decompress);
> 
> Ahem. I thought, output_width and output_height are results of 
> jpeg_read_header(). What do you expect when you set them in advance? Do 
> you expect that jpeglib rescales the image when it decompresses it?

jpeg_decompres is uninitialized at this point. The size of temp_frame 
matches the size of jpeg image (got from jpeg_read_header). I do not 
expect rescaling from jpeglib.

Patch applied.

Thanks,
Einar


More information about the Cinelerra mailing list