"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tools/depends/native/TexturePacker/src/decoder/JPGDecoder.cpp" between
xbmc-18.8-Leia.tar.gz and xbmc-18.9-Leia.tar.gz

About: XBMC is a software media player and entertainment hub for digital media that plays almost all popular audio and video formats around (new name "Kodi").

JPGDecoder.cpp  (xbmc-18.8-Leia):JPGDecoder.cpp  (xbmc-18.9-Leia)
skipping to change at line 87 skipping to change at line 87
cinfo.err = jpeg_std_error(&jerr); cinfo.err = jpeg_std_error(&jerr);
jpeg_create_decompress(&cinfo); jpeg_create_decompress(&cinfo);
jpeg_stdio_src(&cinfo, arq->getFP()); jpeg_stdio_src(&cinfo, arq->getFP());
jpeg_read_header(&cinfo, TRUE); jpeg_read_header(&cinfo, TRUE);
jpeg_start_decompress(&cinfo); jpeg_start_decompress(&cinfo);
// Image Size is calculated as (width * height * bytes per pixel = 4 // Image Size is calculated as (width * height * bytes per pixel = 4
ImageSize = cinfo.image_width * cinfo.image_height * 4; ImageSize = cinfo.image_width * cinfo.image_height * 4;
frames.user = NULL;
DecodedFrame frame; DecodedFrame frame;
frame.rgbaImage.pixels = (char *)new char[ImageSize]; frame.rgbaImage.pixels = (char *)new char[ImageSize];
unsigned char *scanlinebuff = new unsigned char[3 * cinfo.image_width]; unsigned char *scanlinebuff = new unsigned char[3 * cinfo.image_width];
unsigned char *dst = (unsigned char *)frame.rgbaImage.pixels; unsigned char *dst = (unsigned char *)frame.rgbaImage.pixels;
while (cinfo.output_scanline < cinfo.output_height) while (cinfo.output_scanline < cinfo.output_height)
{ {
jpeg_read_scanlines(&cinfo,&scanlinebuff,1); jpeg_read_scanlines(&cinfo,&scanlinebuff,1);
skipping to change at line 118 skipping to change at line 117
} }
delete [] scanlinebuff; delete [] scanlinebuff;
jpeg_finish_decompress(&cinfo); jpeg_finish_decompress(&cinfo);
jpeg_destroy_decompress(&cinfo); jpeg_destroy_decompress(&cinfo);
frame.rgbaImage.height = cinfo.image_height; frame.rgbaImage.height = cinfo.image_height;
frame.rgbaImage.width = cinfo.image_width; frame.rgbaImage.width = cinfo.image_width;
frame.rgbaImage.bbp = 32; frame.rgbaImage.bbp = 32;
frame.rgbaImage.pitch = 4 * cinfo.image_width; frame.rgbaImage.pitch = 4 * cinfo.image_width;
frame.decoder = this;
frames.frameList.push_back(frame); frames.frameList.push_back(frame);
delete arq; delete arq;
return true; return true;
} }
void JPGDecoder::FreeDecodedFrames(DecodedFrames &frames) void JPGDecoder::FreeDecodedFrame(DecodedFrame &frame)
{ {
for (unsigned int i = 0; i < frames.frameList.size(); i++) delete [] frame.rgbaImage.pixels;
{
delete [] frames.frameList[i].rgbaImage.pixels;
}
frames.clear();
} }
void JPGDecoder::FillSupportedExtensions() void JPGDecoder::FillSupportedExtensions()
{ {
m_supportedExtensions.push_back(".jpg"); m_supportedExtensions.push_back(".jpg");
m_supportedExtensions.push_back(".jpeg"); m_supportedExtensions.push_back(".jpeg");
} }
 End of changes. 4 change blocks. 
8 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)