From: <ex...@us...> - 2012-06-05 23:08:49
|
Revision: 31118 http://xbmc4xbox.svn.sourceforge.net/xbmc4xbox/?rev=31118&view=rev Author: exobuzz Date: 2012-06-05 23:08:37 +0000 (Tue, 05 Jun 2012) Log Message: ----------- added: new jpegio class (based on upstream code) and libturbo-jpeg library - had to rename exports to not conflict with libjpeg that is built into d3d8x changed: use new libjpeg for thumbnailing, and "large texture loading". force new library for standard texture loading for thumbnails. need to pass thumbnail size in, since initial thumbnailing is now limited to 1/8-8/8 of original size, but it close to a "no-op" apart from the encoding. then when loading the thumbs request user thumb size and a thumbnail can be returned much close. this uses the built in scaling in the library, that is limited, but doesn't cost like the scaling in cximage. if the .tbn file is not a jpeg such as for image folders (currently), then it will be passed onto cximage. note: as part of this code, a memory leak was found with the jpegio class from upstream xbmc, this patch has been sent back - reassuring to know, grandpa xbmc4xbox can still help with the sibling projects. Modified Paths: -------------- trunk/guilib/TextureManager.cpp trunk/guilib/guilib.vcproj trunk/xbmc/GUILargeTextureManager.cpp trunk/xbmc/Picture.cpp trunk/xbmc/Picture.h trunk/xbmc/XBTF.h trunk/xbmc.vcproj Added Paths: ----------- trunk/xbmc/lib/libjpeg-turbo/ trunk/xbmc/lib/libjpeg-turbo/include/ trunk/xbmc/lib/libjpeg-turbo/include/jconfig.h trunk/xbmc/lib/libjpeg-turbo/include/jmorecfg.h trunk/xbmc/lib/libjpeg-turbo/include/jpeglib.h trunk/xbmc/lib/libjpeg-turbo/lib/ trunk/xbmc/lib/libjpeg-turbo/lib/libturbojpeg.lib trunk/xbmc/lib/libjpeg-turbo/make-xbmc-lib.sh trunk/xbmc/lib/libjpeg-turbo/patches/ trunk/xbmc/lib/libjpeg-turbo/patches/better-scaling.patch trunk/xbmc/lib/libjpeg-turbo/patches/rename-exports.patch trunk/xbmc/lib/libjpeg-turbo/src/ trunk/xbmc/lib/libjpeg-turbo/src/BUILDING.txt trunk/xbmc/lib/libjpeg-turbo/src/CMakeFiles/ trunk/xbmc/lib/libjpeg-turbo/src/CMakeFiles/CMakeCCompiler.cmake trunk/xbmc/lib/libjpeg-turbo/src/CMakeFiles/CMakeOutput.log trunk/xbmc/lib/libjpeg-turbo/src/CMakeFiles/CMakeRCCompiler.cmake trunk/xbmc/lib/libjpeg-turbo/src/CMakeFiles/CMakeSystem.cmake trunk/xbmc/lib/libjpeg-turbo/src/CMakeFiles/CompilerIdC/ trunk/xbmc/lib/libjpeg-turbo/src/CMakeFiles/CompilerIdC/CMakeCCompilerId.c trunk/xbmc/lib/libjpeg-turbo/src/CMakeFiles/CompilerIdC/CMakeCCompilerId.exe trunk/xbmc/lib/libjpeg-turbo/src/CMakeFiles/CompilerIdC/CMakeCCompilerId.obj trunk/xbmc/lib/libjpeg-turbo/src/CMakeLists.txt trunk/xbmc/lib/libjpeg-turbo/src/ChangeLog.txt trunk/xbmc/lib/libjpeg-turbo/src/Makefile.am trunk/xbmc/lib/libjpeg-turbo/src/Makefile.am.orig trunk/xbmc/lib/libjpeg-turbo/src/Makefile.in trunk/xbmc/lib/libjpeg-turbo/src/README trunk/xbmc/lib/libjpeg-turbo/src/README-turbo.txt trunk/xbmc/lib/libjpeg-turbo/src/acinclude.m4 trunk/xbmc/lib/libjpeg-turbo/src/aclocal.m4 trunk/xbmc/lib/libjpeg-turbo/src/bmp.c trunk/xbmc/lib/libjpeg-turbo/src/bmp.h trunk/xbmc/lib/libjpeg-turbo/src/cderror.h trunk/xbmc/lib/libjpeg-turbo/src/cdjpeg.c trunk/xbmc/lib/libjpeg-turbo/src/cdjpeg.h trunk/xbmc/lib/libjpeg-turbo/src/change.log trunk/xbmc/lib/libjpeg-turbo/src/cjpeg.1 trunk/xbmc/lib/libjpeg-turbo/src/cjpeg.c trunk/xbmc/lib/libjpeg-turbo/src/cmakescripts/ trunk/xbmc/lib/libjpeg-turbo/src/cmakescripts/getdate.bat trunk/xbmc/lib/libjpeg-turbo/src/cmakescripts/testclean.cmake trunk/xbmc/lib/libjpeg-turbo/src/coderules.txt trunk/xbmc/lib/libjpeg-turbo/src/compile trunk/xbmc/lib/libjpeg-turbo/src/config.guess trunk/xbmc/lib/libjpeg-turbo/src/config.h.in trunk/xbmc/lib/libjpeg-turbo/src/config.sub trunk/xbmc/lib/libjpeg-turbo/src/configure trunk/xbmc/lib/libjpeg-turbo/src/configure.ac trunk/xbmc/lib/libjpeg-turbo/src/depcomp trunk/xbmc/lib/libjpeg-turbo/src/djpeg.1 trunk/xbmc/lib/libjpeg-turbo/src/djpeg.c trunk/xbmc/lib/libjpeg-turbo/src/doc/ trunk/xbmc/lib/libjpeg-turbo/src/doc/html/ trunk/xbmc/lib/libjpeg-turbo/src/doc/html/annotated.html trunk/xbmc/lib/libjpeg-turbo/src/doc/html/bc_s.png trunk/xbmc/lib/libjpeg-turbo/src/doc/html/classes.html trunk/xbmc/lib/libjpeg-turbo/src/doc/html/closed.png trunk/xbmc/lib/libjpeg-turbo/src/doc/html/doxygen.css trunk/xbmc/lib/libjpeg-turbo/src/doc/html/doxygen.png trunk/xbmc/lib/libjpeg-turbo/src/doc/html/functions.html trunk/xbmc/lib/libjpeg-turbo/src/doc/html/functions_vars.html trunk/xbmc/lib/libjpeg-turbo/src/doc/html/group___turbo_j_p_e_g.html trunk/xbmc/lib/libjpeg-turbo/src/doc/html/index.html trunk/xbmc/lib/libjpeg-turbo/src/doc/html/installdox trunk/xbmc/lib/libjpeg-turbo/src/doc/html/jquery.js trunk/xbmc/lib/libjpeg-turbo/src/doc/html/modules.html trunk/xbmc/lib/libjpeg-turbo/src/doc/html/nav_f.png trunk/xbmc/lib/libjpeg-turbo/src/doc/html/nav_h.png trunk/xbmc/lib/libjpeg-turbo/src/doc/html/open.png trunk/xbmc/lib/libjpeg-turbo/src/doc/html/search/ trunk/xbmc/lib/libjpeg-turbo/src/doc/html/search/all_63.html trunk/xbmc/lib/libjpeg-turbo/src/doc/html/search/all_64.html trunk/xbmc/lib/libjpeg-turbo/src/doc/html/search/all_68.html trunk/xbmc/lib/libjpeg-turbo/src/doc/html/search/all_6e.html trunk/xbmc/lib/libjpeg-turbo/src/doc/html/search/all_6f.html trunk/xbmc/lib/libjpeg-turbo/src/doc/html/search/all_72.html trunk/xbmc/lib/libjpeg-turbo/src/doc/html/search/all_74.html trunk/xbmc/lib/libjpeg-turbo/src/doc/html/search/all_77.html trunk/xbmc/lib/libjpeg-turbo/src/doc/html/search/all_78.html trunk/xbmc/lib/libjpeg-turbo/src/doc/html/search/all_79.html trunk/xbmc/lib/libjpeg-turbo/src/doc/html/search/classes_74.html trunk/xbmc/lib/libjpeg-turbo/src/doc/html/search/close.png trunk/xbmc/lib/libjpeg-turbo/src/doc/html/search/mag_sel.png trunk/xbmc/lib/libjpeg-turbo/src/doc/html/search/nomatches.html trunk/xbmc/lib/libjpeg-turbo/src/doc/html/search/search.css trunk/xbmc/lib/libjpeg-turbo/src/doc/html/search/search.js trunk/xbmc/lib/libjpeg-turbo/src/doc/html/search/search_l.png trunk/xbmc/lib/libjpeg-turbo/src/doc/html/search/search_m.png trunk/xbmc/lib/libjpeg-turbo/src/doc/html/search/search_r.png trunk/xbmc/lib/libjpeg-turbo/src/doc/html/search/variables_63.html trunk/xbmc/lib/libjpeg-turbo/src/doc/html/search/variables_64.html trunk/xbmc/lib/libjpeg-turbo/src/doc/html/search/variables_68.html trunk/xbmc/lib/libjpeg-turbo/src/doc/html/search/variables_6e.html trunk/xbmc/lib/libjpeg-turbo/src/doc/html/search/variables_6f.html trunk/xbmc/lib/libjpeg-turbo/src/doc/html/search/variables_72.html trunk/xbmc/lib/libjpeg-turbo/src/doc/html/search/variables_77.html trunk/xbmc/lib/libjpeg-turbo/src/doc/html/search/variables_78.html trunk/xbmc/lib/libjpeg-turbo/src/doc/html/search/variables_79.html trunk/xbmc/lib/libjpeg-turbo/src/doc/html/structtjregion.html trunk/xbmc/lib/libjpeg-turbo/src/doc/html/structtjscalingfactor.html trunk/xbmc/lib/libjpeg-turbo/src/doc/html/structtjtransform.html trunk/xbmc/lib/libjpeg-turbo/src/doc/html/tab_a.png trunk/xbmc/lib/libjpeg-turbo/src/doc/html/tab_b.png trunk/xbmc/lib/libjpeg-turbo/src/doc/html/tab_h.png trunk/xbmc/lib/libjpeg-turbo/src/doc/html/tab_s.png trunk/xbmc/lib/libjpeg-turbo/src/doc/html/tabs.css trunk/xbmc/lib/libjpeg-turbo/src/doxygen.config trunk/xbmc/lib/libjpeg-turbo/src/example.c trunk/xbmc/lib/libjpeg-turbo/src/filelist.txt trunk/xbmc/lib/libjpeg-turbo/src/install-sh trunk/xbmc/lib/libjpeg-turbo/src/install.txt trunk/xbmc/lib/libjpeg-turbo/src/jaricom.c trunk/xbmc/lib/libjpeg-turbo/src/java/ trunk/xbmc/lib/libjpeg-turbo/src/java/CMakeLists.txt trunk/xbmc/lib/libjpeg-turbo/src/java/MANIFEST.MF trunk/xbmc/lib/libjpeg-turbo/src/java/Makefile.am trunk/xbmc/lib/libjpeg-turbo/src/java/Makefile.in trunk/xbmc/lib/libjpeg-turbo/src/java/README trunk/xbmc/lib/libjpeg-turbo/src/java/TJExample.java trunk/xbmc/lib/libjpeg-turbo/src/java/TJUnitTest.java trunk/xbmc/lib/libjpeg-turbo/src/java/doc/ trunk/xbmc/lib/libjpeg-turbo/src/java/doc/allclasses-frame.html trunk/xbmc/lib/libjpeg-turbo/src/java/doc/allclasses-noframe.html trunk/xbmc/lib/libjpeg-turbo/src/java/doc/constant-values.html trunk/xbmc/lib/libjpeg-turbo/src/java/doc/deprecated-list.html trunk/xbmc/lib/libjpeg-turbo/src/java/doc/help-doc.html trunk/xbmc/lib/libjpeg-turbo/src/java/doc/index-all.html trunk/xbmc/lib/libjpeg-turbo/src/java/doc/index.html trunk/xbmc/lib/libjpeg-turbo/src/java/doc/org/ trunk/xbmc/lib/libjpeg-turbo/src/java/doc/org/libjpegturbo/ trunk/xbmc/lib/libjpeg-turbo/src/java/doc/org/libjpegturbo/turbojpeg/ trunk/xbmc/lib/libjpeg-turbo/src/java/doc/org/libjpegturbo/turbojpeg/TJ.html trunk/xbmc/lib/libjpeg-turbo/src/java/doc/org/libjpegturbo/turbojpeg/TJCompressor.html trunk/xbmc/lib/libjpeg-turbo/src/java/doc/org/libjpegturbo/turbojpeg/TJCustomFilter.html trunk/xbmc/lib/libjpeg-turbo/src/java/doc/org/libjpegturbo/turbojpeg/TJDecompressor.html trunk/xbmc/lib/libjpeg-turbo/src/java/doc/org/libjpegturbo/turbojpeg/TJScalingFactor.html trunk/xbmc/lib/libjpeg-turbo/src/java/doc/org/libjpegturbo/turbojpeg/TJTransform.html trunk/xbmc/lib/libjpeg-turbo/src/java/doc/org/libjpegturbo/turbojpeg/TJTransformer.html trunk/xbmc/lib/libjpeg-turbo/src/java/doc/org/libjpegturbo/turbojpeg/package-frame.html trunk/xbmc/lib/libjpeg-turbo/src/java/doc/org/libjpegturbo/turbojpeg/package-summary.html trunk/xbmc/lib/libjpeg-turbo/src/java/doc/org/libjpegturbo/turbojpeg/package-tree.html trunk/xbmc/lib/libjpeg-turbo/src/java/doc/overview-tree.html trunk/xbmc/lib/libjpeg-turbo/src/java/doc/package-list trunk/xbmc/lib/libjpeg-turbo/src/java/doc/resources/ trunk/xbmc/lib/libjpeg-turbo/src/java/doc/resources/inherit.gif trunk/xbmc/lib/libjpeg-turbo/src/java/doc/serialized-form.html trunk/xbmc/lib/libjpeg-turbo/src/java/doc/stylesheet.css trunk/xbmc/lib/libjpeg-turbo/src/java/org/ trunk/xbmc/lib/libjpeg-turbo/src/java/org/libjpegturbo/ trunk/xbmc/lib/libjpeg-turbo/src/java/org/libjpegturbo/turbojpeg/ trunk/xbmc/lib/libjpeg-turbo/src/java/org/libjpegturbo/turbojpeg/TJ.java trunk/xbmc/lib/libjpeg-turbo/src/java/org/libjpegturbo/turbojpeg/TJCompressor.java trunk/xbmc/lib/libjpeg-turbo/src/java/org/libjpegturbo/turbojpeg/TJCustomFilter.java trunk/xbmc/lib/libjpeg-turbo/src/java/org/libjpegturbo/turbojpeg/TJDecompressor.java trunk/xbmc/lib/libjpeg-turbo/src/java/org/libjpegturbo/turbojpeg/TJLoader.java trunk/xbmc/lib/libjpeg-turbo/src/java/org/libjpegturbo/turbojpeg/TJLoader.java.in trunk/xbmc/lib/libjpeg-turbo/src/java/org/libjpegturbo/turbojpeg/TJScalingFactor.java trunk/xbmc/lib/libjpeg-turbo/src/java/org/libjpegturbo/turbojpeg/TJTransform.java trunk/xbmc/lib/libjpeg-turbo/src/java/org/libjpegturbo/turbojpeg/TJTransformer.java trunk/xbmc/lib/libjpeg-turbo/src/java/org_libjpegturbo_turbojpeg_TJ.h trunk/xbmc/lib/libjpeg-turbo/src/java/org_libjpegturbo_turbojpeg_TJCompressor.h trunk/xbmc/lib/libjpeg-turbo/src/java/org_libjpegturbo_turbojpeg_TJDecompressor.h trunk/xbmc/lib/libjpeg-turbo/src/java/org_libjpegturbo_turbojpeg_TJTransformer.h trunk/xbmc/lib/libjpeg-turbo/src/jcapimin.c trunk/xbmc/lib/libjpeg-turbo/src/jcapistd.c trunk/xbmc/lib/libjpeg-turbo/src/jcarith.c trunk/xbmc/lib/libjpeg-turbo/src/jccoefct.c trunk/xbmc/lib/libjpeg-turbo/src/jccolext.c trunk/xbmc/lib/libjpeg-turbo/src/jccolor.c trunk/xbmc/lib/libjpeg-turbo/src/jcdctmgr.c trunk/xbmc/lib/libjpeg-turbo/src/jchuff.c trunk/xbmc/lib/libjpeg-turbo/src/jchuff.h trunk/xbmc/lib/libjpeg-turbo/src/jcinit.c trunk/xbmc/lib/libjpeg-turbo/src/jcmainct.c trunk/xbmc/lib/libjpeg-turbo/src/jcmarker.c trunk/xbmc/lib/libjpeg-turbo/src/jcmaster.c trunk/xbmc/lib/libjpeg-turbo/src/jcomapi.c trunk/xbmc/lib/libjpeg-turbo/src/jconfig.h.in trunk/xbmc/lib/libjpeg-turbo/src/jconfig.txt trunk/xbmc/lib/libjpeg-turbo/src/jcparam.c trunk/xbmc/lib/libjpeg-turbo/src/jcphuff.c trunk/xbmc/lib/libjpeg-turbo/src/jcprepct.c trunk/xbmc/lib/libjpeg-turbo/src/jcsample.c trunk/xbmc/lib/libjpeg-turbo/src/jcstest.c trunk/xbmc/lib/libjpeg-turbo/src/jctrans.c trunk/xbmc/lib/libjpeg-turbo/src/jdapimin.c trunk/xbmc/lib/libjpeg-turbo/src/jdapistd.c trunk/xbmc/lib/libjpeg-turbo/src/jdarith.c trunk/xbmc/lib/libjpeg-turbo/src/jdatadst-tj.c trunk/xbmc/lib/libjpeg-turbo/src/jdatadst.c trunk/xbmc/lib/libjpeg-turbo/src/jdatasrc-tj.c trunk/xbmc/lib/libjpeg-turbo/src/jdatasrc.c trunk/xbmc/lib/libjpeg-turbo/src/jdcoefct.c trunk/xbmc/lib/libjpeg-turbo/src/jdcolext.c trunk/xbmc/lib/libjpeg-turbo/src/jdcolor.c trunk/xbmc/lib/libjpeg-turbo/src/jdct.h trunk/xbmc/lib/libjpeg-turbo/src/jddctmgr.c trunk/xbmc/lib/libjpeg-turbo/src/jdhuff.c trunk/xbmc/lib/libjpeg-turbo/src/jdhuff.h trunk/xbmc/lib/libjpeg-turbo/src/jdinput.c trunk/xbmc/lib/libjpeg-turbo/src/jdmainct.c trunk/xbmc/lib/libjpeg-turbo/src/jdmarker.c trunk/xbmc/lib/libjpeg-turbo/src/jdmaster.c trunk/xbmc/lib/libjpeg-turbo/src/jdmerge.c trunk/xbmc/lib/libjpeg-turbo/src/jdmrgext.c trunk/xbmc/lib/libjpeg-turbo/src/jdphuff.c trunk/xbmc/lib/libjpeg-turbo/src/jdpostct.c trunk/xbmc/lib/libjpeg-turbo/src/jdsample.c trunk/xbmc/lib/libjpeg-turbo/src/jdtrans.c trunk/xbmc/lib/libjpeg-turbo/src/jerror.c trunk/xbmc/lib/libjpeg-turbo/src/jerror.h trunk/xbmc/lib/libjpeg-turbo/src/jfdctflt.c trunk/xbmc/lib/libjpeg-turbo/src/jfdctfst.c trunk/xbmc/lib/libjpeg-turbo/src/jfdctint.c trunk/xbmc/lib/libjpeg-turbo/src/jidctflt.c trunk/xbmc/lib/libjpeg-turbo/src/jidctfst.c trunk/xbmc/lib/libjpeg-turbo/src/jidctint.c trunk/xbmc/lib/libjpeg-turbo/src/jidctred.c trunk/xbmc/lib/libjpeg-turbo/src/jinclude.h trunk/xbmc/lib/libjpeg-turbo/src/jmemmgr.c trunk/xbmc/lib/libjpeg-turbo/src/jmemnobs.c trunk/xbmc/lib/libjpeg-turbo/src/jmemsys.h trunk/xbmc/lib/libjpeg-turbo/src/jmorecfg.h trunk/xbmc/lib/libjpeg-turbo/src/jpegcomp.h trunk/xbmc/lib/libjpeg-turbo/src/jpegint.h trunk/xbmc/lib/libjpeg-turbo/src/jpeglib.h trunk/xbmc/lib/libjpeg-turbo/src/jpegtran.1 trunk/xbmc/lib/libjpeg-turbo/src/jpegtran.c trunk/xbmc/lib/libjpeg-turbo/src/jquant1.c trunk/xbmc/lib/libjpeg-turbo/src/jquant2.c trunk/xbmc/lib/libjpeg-turbo/src/jsimd.h trunk/xbmc/lib/libjpeg-turbo/src/jsimd_none.c trunk/xbmc/lib/libjpeg-turbo/src/jsimddct.h trunk/xbmc/lib/libjpeg-turbo/src/jutils.c trunk/xbmc/lib/libjpeg-turbo/src/jversion.h trunk/xbmc/lib/libjpeg-turbo/src/libjpeg.map.in trunk/xbmc/lib/libjpeg-turbo/src/libjpeg.txt trunk/xbmc/lib/libjpeg-turbo/src/ltmain.sh trunk/xbmc/lib/libjpeg-turbo/src/missing trunk/xbmc/lib/libjpeg-turbo/src/rdbmp.c trunk/xbmc/lib/libjpeg-turbo/src/rdcolmap.c trunk/xbmc/lib/libjpeg-turbo/src/rdgif.c trunk/xbmc/lib/libjpeg-turbo/src/rdjpgcom.1 trunk/xbmc/lib/libjpeg-turbo/src/rdjpgcom.c trunk/xbmc/lib/libjpeg-turbo/src/rdppm.c trunk/xbmc/lib/libjpeg-turbo/src/rdrle.c trunk/xbmc/lib/libjpeg-turbo/src/rdswitch.c trunk/xbmc/lib/libjpeg-turbo/src/rdtarga.c trunk/xbmc/lib/libjpeg-turbo/src/release/ trunk/xbmc/lib/libjpeg-turbo/src/release/Description.plist.in trunk/xbmc/lib/libjpeg-turbo/src/release/Info.plist.in trunk/xbmc/lib/libjpeg-turbo/src/release/License.rtf trunk/xbmc/lib/libjpeg-turbo/src/release/ReadMe.rtf trunk/xbmc/lib/libjpeg-turbo/src/release/Welcome.rtf trunk/xbmc/lib/libjpeg-turbo/src/release/copyright trunk/xbmc/lib/libjpeg-turbo/src/release/deb-control.tmpl trunk/xbmc/lib/libjpeg-turbo/src/release/libjpeg-turbo.nsi.in trunk/xbmc/lib/libjpeg-turbo/src/release/libjpeg-turbo.spec.in trunk/xbmc/lib/libjpeg-turbo/src/release/makecygwinpkg.in trunk/xbmc/lib/libjpeg-turbo/src/release/makedpkg.in trunk/xbmc/lib/libjpeg-turbo/src/release/makemacpkg.in trunk/xbmc/lib/libjpeg-turbo/src/release/makesunpkg.in trunk/xbmc/lib/libjpeg-turbo/src/release/pkginfo.in trunk/xbmc/lib/libjpeg-turbo/src/release/uninstall.in trunk/xbmc/lib/libjpeg-turbo/src/sharedlib/ trunk/xbmc/lib/libjpeg-turbo/src/sharedlib/CMakeLists.txt trunk/xbmc/lib/libjpeg-turbo/src/simd/ trunk/xbmc/lib/libjpeg-turbo/src/simd/CMakeLists.txt trunk/xbmc/lib/libjpeg-turbo/src/simd/Makefile.am trunk/xbmc/lib/libjpeg-turbo/src/simd/Makefile.in trunk/xbmc/lib/libjpeg-turbo/src/simd/jcclrmmx.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jcclrss2-64.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jcclrss2.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jccolmmx.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jccolss2-64.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jccolss2.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jcgrammx.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jcgrass2-64.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jcgrass2.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jcgrymmx.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jcgryss2-64.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jcgryss2.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jcolsamp.inc trunk/xbmc/lib/libjpeg-turbo/src/simd/jcqnt3dn.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jcqntmmx.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jcqnts2f-64.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jcqnts2f.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jcqnts2i-64.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jcqnts2i.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jcqntsse.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jcsammmx.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jcsamss2-64.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jcsamss2.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jdclrmmx.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jdclrss2-64.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jdclrss2.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jdcolmmx.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jdcolss2-64.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jdcolss2.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jdct.inc trunk/xbmc/lib/libjpeg-turbo/src/simd/jdmermmx.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jdmerss2-64.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jdmerss2.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jdmrgmmx.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jdmrgss2-64.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jdmrgss2.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jdsammmx.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jdsamss2-64.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jdsamss2.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jf3dnflt.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jfmmxfst.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jfmmxint.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jfss2fst-64.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jfss2fst.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jfss2int-64.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jfss2int.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jfsseflt-64.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jfsseflt.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/ji3dnflt.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jimmxfst.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jimmxint.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jimmxred.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jiss2flt-64.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jiss2flt.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jiss2fst-64.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jiss2fst.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jiss2int-64.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jiss2int.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jiss2red-64.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jiss2red.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jisseflt.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jsimd.h trunk/xbmc/lib/libjpeg-turbo/src/simd/jsimd_arm.c trunk/xbmc/lib/libjpeg-turbo/src/simd/jsimd_arm_neon.S trunk/xbmc/lib/libjpeg-turbo/src/simd/jsimd_i386.c trunk/xbmc/lib/libjpeg-turbo/src/simd/jsimd_x86_64.c trunk/xbmc/lib/libjpeg-turbo/src/simd/jsimdcfg.inc.h trunk/xbmc/lib/libjpeg-turbo/src/simd/jsimdcpu.asm trunk/xbmc/lib/libjpeg-turbo/src/simd/jsimdext.inc trunk/xbmc/lib/libjpeg-turbo/src/simd/nasm_lt.sh trunk/xbmc/lib/libjpeg-turbo/src/structure.txt trunk/xbmc/lib/libjpeg-turbo/src/testimages/ trunk/xbmc/lib/libjpeg-turbo/src/testimages/nightshot_iso_100.bmp trunk/xbmc/lib/libjpeg-turbo/src/testimages/testimg.bmp trunk/xbmc/lib/libjpeg-turbo/src/testimages/testimgari.jpg trunk/xbmc/lib/libjpeg-turbo/src/testimages/testimgari.ppm trunk/xbmc/lib/libjpeg-turbo/src/testimages/testimgcrop.jpg trunk/xbmc/lib/libjpeg-turbo/src/testimages/testimgflt-nosimd.jpg trunk/xbmc/lib/libjpeg-turbo/src/testimages/testimgflt.jpg trunk/xbmc/lib/libjpeg-turbo/src/testimages/testimgflt.ppm trunk/xbmc/lib/libjpeg-turbo/src/testimages/testimgfst.jpg trunk/xbmc/lib/libjpeg-turbo/src/testimages/testimgfst.ppm trunk/xbmc/lib/libjpeg-turbo/src/testimages/testimgfst100.jpg trunk/xbmc/lib/libjpeg-turbo/src/testimages/testimgfst1_2.ppm trunk/xbmc/lib/libjpeg-turbo/src/testimages/testimgfst1_4.ppm trunk/xbmc/lib/libjpeg-turbo/src/testimages/testimgfst1_8.ppm trunk/xbmc/lib/libjpeg-turbo/src/testimages/testimggray.jpg trunk/xbmc/lib/libjpeg-turbo/src/testimages/testimgint.jpg trunk/xbmc/lib/libjpeg-turbo/src/testimages/testimgint.ppm trunk/xbmc/lib/libjpeg-turbo/src/testimages/testimgint1_2.ppm trunk/xbmc/lib/libjpeg-turbo/src/testimages/testimgint1_4.ppm trunk/xbmc/lib/libjpeg-turbo/src/testimages/testimgint1_8.ppm trunk/xbmc/lib/libjpeg-turbo/src/testimages/testimgp.jpg trunk/xbmc/lib/libjpeg-turbo/src/testimages/testorig.jpg trunk/xbmc/lib/libjpeg-turbo/src/testimages/testorig.ppm trunk/xbmc/lib/libjpeg-turbo/src/testimages/vgl_5674_0098.bmp trunk/xbmc/lib/libjpeg-turbo/src/testimages/vgl_6434_0018a.bmp trunk/xbmc/lib/libjpeg-turbo/src/testimages/vgl_6548_0026a.bmp trunk/xbmc/lib/libjpeg-turbo/src/tjbench.c trunk/xbmc/lib/libjpeg-turbo/src/tjbenchtest.in trunk/xbmc/lib/libjpeg-turbo/src/tjexampletest.in trunk/xbmc/lib/libjpeg-turbo/src/tjunittest.c trunk/xbmc/lib/libjpeg-turbo/src/tjutil.c trunk/xbmc/lib/libjpeg-turbo/src/tjutil.h trunk/xbmc/lib/libjpeg-turbo/src/transupp.c trunk/xbmc/lib/libjpeg-turbo/src/transupp.h trunk/xbmc/lib/libjpeg-turbo/src/turbojpeg-jni.c trunk/xbmc/lib/libjpeg-turbo/src/turbojpeg-mapfile trunk/xbmc/lib/libjpeg-turbo/src/turbojpeg-mapfile.jni trunk/xbmc/lib/libjpeg-turbo/src/turbojpeg.c trunk/xbmc/lib/libjpeg-turbo/src/turbojpeg.h trunk/xbmc/lib/libjpeg-turbo/src/usage.txt trunk/xbmc/lib/libjpeg-turbo/src/win/ trunk/xbmc/lib/libjpeg-turbo/src/win/config.h.in trunk/xbmc/lib/libjpeg-turbo/src/win/jconfig.h.in trunk/xbmc/lib/libjpeg-turbo/src/win/jpeg62.def trunk/xbmc/lib/libjpeg-turbo/src/win/jpeg7.def trunk/xbmc/lib/libjpeg-turbo/src/win/jpeg8.def trunk/xbmc/lib/libjpeg-turbo/src/win/jsimdcfg.inc trunk/xbmc/lib/libjpeg-turbo/src/wizard.txt trunk/xbmc/lib/libjpeg-turbo/src/wrbmp.c trunk/xbmc/lib/libjpeg-turbo/src/wrgif.c trunk/xbmc/lib/libjpeg-turbo/src/wrjpgcom.1 trunk/xbmc/lib/libjpeg-turbo/src/wrjpgcom.c trunk/xbmc/lib/libjpeg-turbo/src/wrppm.c trunk/xbmc/lib/libjpeg-turbo/src/wrrle.c trunk/xbmc/lib/libjpeg-turbo/src/wrtarga.c trunk/xbmc/utils/JpegIO.cpp trunk/xbmc/utils/JpegIO.h Modified: trunk/guilib/TextureManager.cpp =================================================================== --- trunk/guilib/TextureManager.cpp 2012-05-22 02:52:08 UTC (rev 31117) +++ trunk/guilib/TextureManager.cpp 2012-06-05 23:08:37 UTC (rev 31118) @@ -27,11 +27,13 @@ #include "GraphicContext.h" #include "utils/SingleLock.h" #include "StringUtils.h" +#include "Picture.h" #include "utils/CharsetConverter.h" #include "../xbmc/utils/URIUtils.h" #include "../xbmc/FileSystem/File.h" #include "../xbmc/FileSystem/Directory.h" #include "../xbmc/FileSystem/SpecialProtocol.h" +#include "AdvancedSettings.h" #ifdef HAS_XBOX_D3D #include <XGraphics.h> @@ -575,44 +577,56 @@ CStdString texturePath; g_charsetConverter.utf8ToStringCharset(strPath, texturePath); - HRESULT result = D3DXCreateTextureFromFileEx(g_graphicsContext.Get3DDevice(), _P(texturePath).c_str(), - D3DX_DEFAULT, D3DX_DEFAULT, 1, 0, D3DFMT_LIN_A8R8G8B8, D3DPOOL_MANAGED, - D3DX_FILTER_NONE , D3DX_FILTER_NONE, 0, &info, NULL, &pTexture); + // if the file is a thumbnail, load with picture loader (fast jpeg decoder), and limit to our chosen thumbsize + // as thumbnails could be slighly bigger on disk due to libjpeg scaling + if (URIUtils::GetExtension(strPath).Equals(".tbn")) + { + CPicture pic; + pTexture = pic.Load(strPath, g_advancedSettings.m_thumbSize, g_advancedSettings.m_thumbSize); + info.Width = pic.GetWidth(); + info.Height = pic.GetHeight(); + } + else + { + + HRESULT result = D3DXCreateTextureFromFileEx(g_graphicsContext.Get3DDevice(), _P(texturePath).c_str(), + D3DX_DEFAULT, D3DX_DEFAULT, 1, 0, D3DFMT_LIN_A8R8G8B8, D3DPOOL_MANAGED, + D3DX_FILTER_NONE , D3DX_FILTER_NONE, 0, &info, NULL, &pTexture); - int checkWidth = D3DX_DEFAULT; - int checkHeight = D3DX_DEFAULT; + int checkWidth = D3DX_DEFAULT; + int checkHeight = D3DX_DEFAULT; - // Don't allow anything bigger than 720p on Xbox because of the limited amount of memory - if ( info.Width > 1280 ) - checkWidth = 1280; + // Don't allow anything bigger than 720p on Xbox because of the limited amount of memory + if ( info.Width > 1280 ) + checkWidth = 1280; - if ( info.Height > 720 ) - checkHeight = 720; + if ( info.Height > 720 ) + checkHeight = 720; - if (checkWidth != D3DX_DEFAULT || checkHeight != D3DX_DEFAULT ) - { - // HACK!: If the picture/texture turns out to be too large try to load with a resolution equal to our screen - CLog::Log(LOGWARNING, "%s - Texture file %s (%i x %i) is too big! Reloading resized", __FUNCTION__, strPath.c_str(), info.Width, info.Height ); + if (checkWidth != D3DX_DEFAULT || checkHeight != D3DX_DEFAULT ) + { + // HACK!: If the picture/texture turns out to be too large try to load with a resolution equal to our screen + CLog::Log(LOGWARNING, "%s - Texture file %s (%i x %i) is too big! Reloading resized", __FUNCTION__, strPath.c_str(), info.Width, info.Height ); - if (pTexture) + if (pTexture) + { + pTexture->Release(); + pTexture = NULL; + } + + result = D3DXCreateTextureFromFileEx(g_graphicsContext.Get3DDevice(), _P(texturePath).c_str(), + checkWidth, checkHeight, 1, 0, D3DFMT_LIN_A8R8G8B8, D3DPOOL_MANAGED, + D3DX_FILTER_NONE , D3DX_FILTER_NONE, 0, &info, NULL, &pTexture); + } + + if (result != D3D_OK) { - pTexture->Release(); - pTexture = NULL; +// if (!strnicmp(strPath.c_str(), "special://home/skin/", 20) && !strnicmp(strPath.c_str(), "special://xbmc/skin/", 20)) + CLog::Log(LOGERROR, "%s - Texture manager unable to load file: %s", __FUNCTION__, strPath.c_str()); + return 0; } - - result = D3DXCreateTextureFromFileEx(g_graphicsContext.Get3DDevice(), _P(texturePath).c_str(), - checkWidth, checkHeight, 1, 0, D3DFMT_LIN_A8R8G8B8, D3DPOOL_MANAGED, - D3DX_FILTER_NONE , D3DX_FILTER_NONE, 0, &info, NULL, &pTexture); } - - if (result != D3D_OK) - { -// if (!strnicmp(strPath.c_str(), "special://home/skin/", 20) && !strnicmp(strPath.c_str(), "special://xbmc/skin/", 20)) - CLog::Log(LOGERROR, "%s - Texture manager unable to load file: %s", __FUNCTION__, strPath.c_str()); - return 0; - } } - CTextureMap* pMap = new CTextureMap(strTextureName, info.Width, info.Height, 0, pPal, bundle >= 0); pMap->Add(pTexture, 100); Modified: trunk/guilib/guilib.vcproj =================================================================== --- trunk/guilib/guilib.vcproj 2012-05-22 02:52:08 UTC (rev 31117) +++ trunk/guilib/guilib.vcproj 2012-06-05 23:08:37 UTC (rev 31118) @@ -675,9 +675,6 @@ RelativePath=".\VisibleEffect.h"> </File> <File - RelativePath=".\XBTF.h"> - </File> - <File RelativePath=".\XMLUtils.h"> </File> </Filter> Modified: trunk/xbmc/GUILargeTextureManager.cpp =================================================================== --- trunk/xbmc/GUILargeTextureManager.cpp 2012-05-22 02:52:08 UTC (rev 31117) +++ trunk/xbmc/GUILargeTextureManager.cpp 2012-06-05 23:08:37 UTC (rev 31118) @@ -26,7 +26,7 @@ #include "FileItem.h" #include "Settings.h" #include "AdvancedSettings.h" -#include "Util.h" +#include "utils/URIUtils.h" using namespace std; @@ -72,7 +72,11 @@ { loadPath = g_TextureManager.GetTexturePath(path); } - texture = pic.Load(loadPath, min(g_graphicsContext.GetWidth(), 1024), min(g_graphicsContext.GetHeight(), 720)); + int width = min(g_graphicsContext.GetWidth(), 1024); + int height = min(g_graphicsContext.GetHeight(), 720); + if (URIUtils::GetExtension(loadPath).Equals(".tbn")) + width = height = g_advancedSettings.m_thumbSize; + texture = pic.Load(loadPath, width, height); } // and add to our allocated list lock.Enter(); Modified: trunk/xbmc/Picture.cpp =================================================================== --- trunk/xbmc/Picture.cpp 2012-05-22 02:52:08 UTC (rev 31117) +++ trunk/xbmc/Picture.cpp 2012-06-05 23:08:37 UTC (rev 31118) @@ -28,10 +28,12 @@ #include "FileSystem/File.h" #include "FileSystem/FileCurl.h" #include "DDSImage.h" +#include "JPEGIO.h" #include "utils/URIUtils.h" #include "Crc32.h" #include <XGraphics.h> #include "d3dx8.h" +#include "XBTF.h" using namespace XFILE; @@ -45,7 +47,7 @@ } -IDirect3DTexture8* CPicture::Load(const CStdString& strFileName, int iMaxWidth, int iMaxHeight) +IDirect3DTexture8* CPicture::Load(const CStdString& file, int width, int height) { /* DDS files are not yet generated by xbmc. This setting simply enables support required @@ -57,7 +59,7 @@ if (g_advancedSettings.m_useddsfanart) { //If a .dds version of the image exists we load it instead. - CStdString ddsPath = URIUtils::ReplaceExtension(strFileName, ".dds"); + CStdString ddsPath = URIUtils::ReplaceExtension(file, ".dds"); if (CFile::Exists(ddsPath)) { CDDSImage img; @@ -99,12 +101,50 @@ } } - if (!m_dll.Load()) return NULL; + //ImageLib is sooo sloow for jpegs. Try our own decoder first. If it fails, fall back to ImageLib. + if (URIUtils::GetExtension(file).Equals(".jpg") || URIUtils::GetExtension(file).Equals(".tbn")) + { + CJpegIO jpegImage; + if (jpegImage.Open(file, width, height)) + { + if (jpegImage.OrgWidth() == 0 || jpegImage.OrgHeight() == 0) + return NULL; + memset(&m_info, 0, sizeof(ImageInfo)); + m_info.originalwidth = jpegImage.OrgWidth(); + m_info.originalheight = jpegImage.OrgHeight(); + m_info.width = jpegImage.Width(); + m_info.height = jpegImage.Height(); + LPDIRECT3DTEXTURE8 pTexture = NULL; + g_graphicsContext.Get3DDevice()->CreateTexture(((m_info.width + 3) / 4) * 4, ((m_info.height + 3) / 4) * 4, 1, 0, D3DFMT_LIN_A8R8G8B8 , D3DPOOL_MANAGED, &pTexture); + if (pTexture) + { + D3DLOCKED_RECT lr; + if ( D3D_OK == pTexture->LockRect( 0, &lr, NULL, 0 )) + { + DWORD destPitch = lr.Pitch; + BYTE *pixels = (BYTE *)lr.pBits; + bool ret = jpegImage.Decode(pixels, destPitch, XB_FMT_A8R8G8B8); + pTexture->UnlockRect( 0 ); + if (ret) + return pTexture; + else + return NULL; + } + } + else { + CLog::Log(LOGERROR, "%s - failed to create texture while loading image %s", __FUNCTION__, file.c_str()); + return NULL; + } + } + } + DllImageLib dll; + if (!dll.Load()) return NULL; + memset(&m_info, 0, sizeof(ImageInfo)); - if (!m_dll.LoadImage(strFileName.c_str(), iMaxWidth, iMaxHeight, &m_info)) + if (!dll.LoadImage(file.c_str(), width, height, &m_info)) { - CLog::Log(LOGERROR, "PICTURE: Error loading image %s", strFileName.c_str()); + CLog::Log(LOGERROR, "PICTURE: Error loading image %s", file.c_str()); return NULL; } LPDIRECT3DTEXTURE8 pTexture = NULL; @@ -135,8 +175,8 @@ } } else - CLog::Log(LOGERROR, "%s - failed to create texture while loading image %s", __FUNCTION__, strFileName.c_str()); - m_dll.ReleaseImage(&m_info); + CLog::Log(LOGERROR, "%s - failed to create texture while loading image %s", __FUNCTION__, file.c_str()); + dll.ReleaseImage(&m_info); return pTexture; } @@ -147,27 +187,7 @@ if (checkExistence && CFile::Exists(thumbFile)) return true; - CLog::Log(LOGINFO, "Creating thumb from: %s as: %s", file.c_str(), thumbFile.c_str()); - - memset(&m_info, 0, sizeof(ImageInfo)); - if (URIUtils::IsInternetStream(file, true)) - { - CFileCurl stream; - CStdString thumbData; - if (stream.Get(file, thumbData)) - return CreateThumbnailFromMemory((const BYTE *)thumbData.c_str(), thumbData.size(), URIUtils::GetExtension(file), thumbFile); - - return false; - } - // load our dll - if (!m_dll.Load()) return false; - - if (!m_dll.CreateThumbnail(file.c_str(), thumbFile.c_str(), g_advancedSettings.m_thumbSize, g_advancedSettings.m_thumbSize, g_guiSettings.GetBool("pictures.useexifrotation"))) - { - CLog::Log(LOGERROR, "%s: Unable to create thumbfile %s from image %s", __FUNCTION__, thumbFile.c_str(), file.c_str()); - return false; - } - return true; + return CacheImage(file, thumbFile, g_advancedSettings.m_thumbSize, g_advancedSettings.m_thumbSize); } bool CPicture::CacheImage(const CStdString& sourceUrl, const CStdString& destFile, int width, int height) @@ -175,8 +195,10 @@ if (width > 0 && height > 0) { CLog::Log(LOGINFO, "Caching image from: %s to %s with width %i and height %i", sourceUrl.c_str(), destFile.c_str(), width, height); - if (!m_dll.Load()) return false; - + + CJpegIO jpegImage; + DllImageLib dll; + if (URIUtils::IsInternetStream(sourceUrl, true)) { Crc32 crc; @@ -187,8 +209,17 @@ CFileCurl stream; if (stream.Download(sourceUrl, tempFile)) { - if (!m_dll.CreateThumbnail(tempFile.c_str(), destFile.c_str(), width, height, g_guiSettings.GetBool("pictures.useexifrotation"))) + if (URIUtils::GetExtension(sourceUrl).Equals(".jpg") || URIUtils::GetExtension(sourceUrl).Equals(".tbn")) { + if (jpegImage.CreateThumbnail(tempFile, destFile, width, height, g_guiSettings.GetBool("pictures.useexifrotation"))) + { + CFile::Delete(tempFile); + return true; + } + } + if (!dll.Load()) return false; + if (!dll.CreateThumbnail(tempFile.c_str(), destFile.c_str(), width, height, g_guiSettings.GetBool("pictures.useexifrotation"))) + { CLog::Log(LOGERROR, "%s Unable to create new image %s from image %s", __FUNCTION__, destFile.c_str(), sourceUrl.c_str()); CFile::Delete(tempFile); return false; @@ -198,9 +229,15 @@ } return false; } - - if (!m_dll.CreateThumbnail(sourceUrl.c_str(), destFile.c_str(), width, height, g_guiSettings.GetBool("pictures.useexifrotation"))) + + if (URIUtils::GetExtension(sourceUrl).Equals(".jpg") || URIUtils::GetExtension(sourceUrl).Equals(".tbn")) { + if (jpegImage.CreateThumbnail(sourceUrl, destFile, width, height, g_guiSettings.GetBool("pictures.useexifrotation"))) + return true; + } + if (!dll.Load()) return false; + if (!dll.CreateThumbnail(sourceUrl.c_str(), destFile.c_str(), width, height, g_guiSettings.GetBool("pictures.useexifrotation"))) + { CLog::Log(LOGERROR, "%s Unable to create new image %s from image %s", __FUNCTION__, destFile.c_str(), sourceUrl.c_str()); return false; } @@ -209,15 +246,7 @@ else { CLog::Log(LOGINFO, "Caching image from: %s to %s", sourceUrl.c_str(), destFile.c_str()); - if (URIUtils::IsInternetStream(sourceUrl, true)) - { - CFileCurl stream; - return stream.Download(sourceUrl, destFile); - } - else - { return CFile::Cache(sourceUrl, destFile); - } } } @@ -238,9 +267,16 @@ bool CPicture::CreateThumbnailFromMemory(const unsigned char* buffer, int bufSize, const CStdString& extension, const CStdString& thumbFile) { CLog::Log(LOGINFO, "Creating album thumb from memory: %s", thumbFile.c_str()); - if (!m_dll.Load()) return false; - if (!m_dll.CreateThumbnailFromMemory((BYTE *)buffer, bufSize, extension.c_str(), thumbFile.c_str(), g_advancedSettings.m_thumbSize, g_advancedSettings.m_thumbSize)) + if (extension.Equals("jpg") || extension.Equals("tbn")) { + CJpegIO jpegImage; + if (jpegImage.CreateThumbnailFromMemory((unsigned char*)buffer, bufSize, thumbFile.c_str(), g_advancedSettings.m_thumbSize, g_advancedSettings.m_thumbSize)) + return true; + } + DllImageLib dll; + if (!dll.Load()) return false; + if (!dll.CreateThumbnailFromMemory((BYTE *)buffer, bufSize, extension.c_str(), thumbFile.c_str(), g_advancedSettings.m_thumbSize, g_advancedSettings.m_thumbSize)) + { CLog::Log(LOGERROR, "%s: exception with fileType: %s", __FUNCTION__, extension.c_str()); return false; } @@ -249,7 +285,8 @@ void CPicture::CreateFolderThumb(const CStdString *thumbs, const CStdString &folderThumb) { // we want to mold the thumbs together into one single one - if (!m_dll.Load()) return; + DllImageLib dll; + if (!dll.Load()) return; CStdString cachedThumbs[4]; const char *szThumbs[4]; for (int i=0; i < 4; i++) @@ -262,24 +299,31 @@ } szThumbs[i] = cachedThumbs[i].c_str(); } - if (!m_dll.CreateFolderThumbnail(szThumbs, folderThumb.c_str(), g_advancedSettings.m_thumbSize, g_advancedSettings.m_thumbSize)) + if (!dll.CreateFolderThumbnail(szThumbs, folderThumb.c_str(), g_advancedSettings.m_thumbSize, g_advancedSettings.m_thumbSize)) { CLog::Log(LOGERROR, "%s failed for folder thumb %s", __FUNCTION__, folderThumb.c_str()); } } -bool CPicture::CreateThumbnailFromSurface(BYTE* pBuffer, int width, int height, int stride, const CStdString &strThumbFileName) +bool CPicture::CreateThumbnailFromSurface(const unsigned char *buffer, int width, int height, int stride, const CStdString &thumbFile) { - if (!pBuffer || !m_dll.Load()) return false; - return m_dll.CreateThumbnailFromSurface(pBuffer, width, height, stride, strThumbFileName.c_str()); + if (URIUtils::GetExtension(thumbFile).Equals(".jpg")) + { + CJpegIO jpegImage; + if (jpegImage.CreateThumbnailFromSurface((BYTE *)buffer, width, height, XB_FMT_A8R8G8B8, stride, thumbFile.c_str())) + return true; + } + DllImageLib dll; + if (!buffer || !dll.Load()) return false; + return dll.CreateThumbnailFromSurface((BYTE *)buffer, width, height, stride, thumbFile.c_str()); } int CPicture::ConvertFile(const CStdString &srcFile, const CStdString &destFile, float rotateDegrees, int width, int height, unsigned int quality, bool mirror) { - if (!m_dll.Load()) return false; - int ret; - ret=m_dll.ConvertFile(srcFile.c_str(), destFile.c_str(), rotateDegrees, width, height, quality, mirror); - if (ret!=0) + DllImageLib dll; + if (!dll.Load()) return false; + int ret = dll.ConvertFile(srcFile.c_str(), destFile.c_str(), rotateDegrees, width, height, quality, mirror); + if (ret) { CLog::Log(LOGERROR, "PICTURE: Error %i converting image %s", ret, srcFile.c_str()); return ret; @@ -316,7 +360,7 @@ return false; } -bool CPicture::CreateThumbnailFromSwizzledTexture(LPDIRECT3DTEXTURE8 &texture, int width, int height, const CStdString &thumb) +bool CPicture::CreateThumbnailFromSwizzledTexture(LPDIRECT3DTEXTURE8 &texture, int width, int height, const CStdString &thumbFile) { LPDIRECT3DTEXTURE8 linTexture = NULL; if (D3D_OK == D3DXCreateTexture(g_graphicsContext.Get3DDevice(), width, height, 1, 0, D3DFMT_LIN_A8R8G8B8, D3DPOOL_MANAGED, &linTexture)) @@ -328,7 +372,7 @@ D3DXLoadSurfaceFromSurface(dest, NULL, NULL, source, NULL, NULL, D3DX_FILTER_NONE, 0); D3DLOCKED_RECT lr; dest->LockRect(&lr, NULL, 0); - bool success = CreateThumbnailFromSurface((BYTE *)lr.pBits, width, height, lr.Pitch, thumb); + bool success = CreateThumbnailFromSurface((BYTE *)lr.pBits, width, height, lr.Pitch, thumbFile); dest->UnlockRect(); SAFE_RELEASE(source); SAFE_RELEASE(dest); Modified: trunk/xbmc/Picture.h =================================================================== --- trunk/xbmc/Picture.h 2012-05-22 02:52:08 UTC (rev 31117) +++ trunk/xbmc/Picture.h 2012-06-05 23:08:37 UTC (rev 31118) @@ -26,17 +26,17 @@ public: CPicture(void); virtual ~CPicture(void); - IDirect3DTexture8* Load(const CStdString& strFilename, int iMaxWidth = 128, int iMaxHeight = 128); + IDirect3DTexture8* Load(const CStdString& strFilename, int width = 128, int height = 128); - bool CreateThumbnailFromMemory(const BYTE* pBuffer, int nBufSize, const CStdString& strExtension, const CStdString& strThumbFileName); - bool CreateThumbnailFromSurface(BYTE* pBuffer, int width, int height, int stride, const CStdString &strThumbFileName); - bool CreateThumbnailFromSwizzledTexture(LPDIRECT3DTEXTURE8 &texture, int width, int height, const CStdString &thumb); - int ConvertFile(const CStdString& srcFile, const CStdString& destFile, float rotateDegrees, int width, int height, unsigned int quality, bool mirror=false); + static bool CreateThumbnailFromMemory(const unsigned char* buffer, int bufSize, const CStdString& extension, const CStdString& thumbFile); + static bool CreateThumbnailFromSurface(const unsigned char* buffer, int width, int height, int stride, const CStdString &thumbFile); + static bool CreateThumbnailFromSwizzledTexture(LPDIRECT3DTEXTURE8 &texture, int width, int height, const CStdString &thumbFile); + static int ConvertFile(const CStdString& srcFile, const CStdString& destFile, float rotateDegrees, int width, int height, unsigned int quality, bool mirror=false); - void CreateFolderThumb(const CStdString *strThumbs, const CStdString &folderThumbnail); - bool CreateThumbnail(const CStdString& strFileName, const CStdString& strThumbFileName, bool checkExistence = false); - bool CacheThumb(const CStdString& sourceUrl, const CStdString& destFileName); - bool CacheFanart(const CStdString& sourceUrl, const CStdString& destFileName); + static void CreateFolderThumb(const CStdString *strThumbs, const CStdString &folderThumbnail); + static bool CreateThumbnail(const CStdString& strFileName, const CStdString& strThumbFileName, bool checkExistence = false); + static bool CacheThumb(const CStdString& sourceUrl, const CStdString& destFileName); + static bool CacheFanart(const CStdString& sourceUrl, const CStdString& destFileName); // caches a skin image as a thumbnail image bool CacheSkinImage(const CStdString &srcFile, const CStdString &destFile); @@ -51,7 +51,7 @@ protected: private: - bool CacheImage(const CStdString& sourceUrl, const CStdString& destFileName, int width, int height); + static bool CacheImage(const CStdString& sourceUrl, const CStdString& destFileName, int width, int height); struct VERTEX { @@ -61,7 +61,5 @@ }; static const DWORD FVF_VERTEX = D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX1; - DllImageLib m_dll; - ImageInfo m_info; }; Modified: trunk/xbmc/XBTF.h =================================================================== --- trunk/xbmc/XBTF.h 2012-05-22 02:52:08 UTC (rev 31117) +++ trunk/xbmc/XBTF.h 2012-06-05 23:08:37 UTC (rev 31118) @@ -36,6 +36,9 @@ #define XB_FMT_DXT5_YCoCg 8 #define XB_FMT_A8R8G8B8 16 #define XB_FMT_A8 32 +#define XB_FMT_RGBA8 64 +#define XB_FMT_RGB8 128 +#define XB_FMT_OPAQUE 65536 class CXBTFFrame { Added: trunk/xbmc/lib/libjpeg-turbo/include/jconfig.h =================================================================== --- trunk/xbmc/lib/libjpeg-turbo/include/jconfig.h (rev 0) +++ trunk/xbmc/lib/libjpeg-turbo/include/jconfig.h 2012-06-05 23:08:37 UTC (rev 31118) @@ -0,0 +1,147 @@ +/* jconfig.vc --- jconfig.h for Microsoft Visual C++ on Windows 95 or NT. */ +/* see jconfig.txt for explanations */ + +#define JPEG_LIB_VERSION 80 +#define LIBJPEG_TURBO_VERSION 1.2.0 +#define C_ARITH_CODING_SUPPORTED +#define D_ARITH_CODING_SUPPORTED + +#define HAVE_PROTOTYPES +#define HAVE_UNSIGNED_CHAR +#define HAVE_UNSIGNED_SHORT +/* #define void char */ +/* #define const */ +#undef CHAR_IS_UNSIGNED +#define HAVE_STDDEF_H +#define HAVE_STDLIB_H +#undef NEED_BSD_STRINGS +#undef NEED_SYS_TYPES_H +#undef NEED_FAR_POINTERS /* we presume a 32-bit flat memory model */ +#undef NEED_SHORT_EXTERNAL_NAMES +#undef INCOMPLETE_TYPES_BROKEN + +/* Define "boolean" as unsigned char, not int, per Windows custom */ +#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ +typedef unsigned char boolean; +#endif +#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ + +/* Define "INT32" as int, not long, per Windows custom */ +#if !(defined(_BASETSD_H_) || defined(_BASETSD_H)) /* don't conflict if basetsd.h already read */ +typedef short INT16; +typedef signed int INT32; +#endif +#define XMD_H /* prevent jmorecfg.h from redefining it */ + +#ifdef JPEG_INTERNALS + +#undef RIGHT_SHIFT_IS_UNSIGNED + +#endif /* JPEG_INTERNALS */ + +#define jcopy_block_row tb_jcopy_block_row +#define jcopy_sample_rows tb_jcopy_sample_rows +#define jdiv_round_up tb_jdiv_round_up +#define jinit_1pass_quantizer tb_jinit_1pass_quantizer +#define jinit_2pass_quantizer tb_jinit_2pass_quantizer +#define jinit_c_coef_controller tb_jinit_c_coef_controller +#define jinit_c_main_controller tb_jinit_c_main_controller +#define jinit_c_master_control tb_jinit_c_master_control +#define jinit_c_prep_controller tb_jinit_c_prep_controller +#define jinit_color_converter tb_jinit_color_converter +#define jinit_color_deconverter tb_jinit_color_deconverter +#define jinit_compress_master tb_jinit_compress_master +#define jinit_d_coef_controller tb_jinit_d_coef_controller +#define jinit_d_main_controller tb_jinit_d_main_controller +#define jinit_d_post_controller tb_jinit_d_post_controller +#define jinit_downsampler tb_jinit_downsampler +#define jinit_forward_dct tb_jinit_forward_dct +#define jinit_huff_decoder tb_jinit_huff_decoder +#define jinit_huff_encoder tb_jinit_huff_encoder +#define jinit_input_controller tb_jinit_input_controller +#define jinit_inverse_dct tb_jinit_inverse_dct +#define jinit_marker_reader tb_jinit_marker_reader +#define jinit_marker_writer tb_jinit_marker_writer +#define jinit_master_decompress tb_jinit_master_decompress +#define jinit_memory_mgr tb_jinit_memory_mgr +#define jinit_merged_upsampler tb_jinit_merged_upsampler +#define jinit_phuff_decoder tb_jinit_phuff_decoder +#define jinit_phuff_encoder tb_jinit_phuff_encoder +#define jinit_upsampler tb_jinit_upsampler +#define jpeg_CreateCompress tb_jpeg_CreateCompress +#define jpeg_CreateDecompress tb_jpeg_CreateDecompress +#define jpeg_abort tb_jpeg_abort +#define jpeg_abort_compress tb_jpeg_abort_compress +#define jpeg_abort_decompress tb_jpeg_abort_decompress +#define jpeg_add_quant_table tb_jpeg_add_quant_table +#define jpeg_alloc_huff_table tb_jpeg_alloc_huff_table +#define jpeg_alloc_quant_table tb_jpeg_alloc_quant_table +#define jpeg_calc_jpeg_dimensions tb_jpeg_calc_jpeg_dimensions +#define jpeg_calc_output_dimensions tb_jpeg_calc_output_dimensions +#define jpeg_consume_input tb_jpeg_consume_input +#define jpeg_copy_critical_parameters tb_jpeg_copy_critical_parameters +#define jpeg_core_output_dimensions tb_jpeg_core_output_dimensions +#define jpeg_default_colorspace tb_jpeg_default_colorspace +#define jpeg_default_qtables tb_jpeg_default_qtables +#define jpeg_destroy tb_jpeg_destroy +#define jpeg_destroy_compress tb_jpeg_destroy_compress +#define jpeg_destroy_decompress tb_jpeg_destroy_decompress +#define jpeg_fdct_float tb_jpeg_fdct_float +#define jpeg_fdct_ifast tb_jpeg_fdct_ifast +#define jpeg_fdct_islow tb_jpeg_fdct_islow +#define jpeg_fill_bit_buffer tb_jpeg_fill_bit_buffer +#define jpeg_finish_compress tb_jpeg_finish_compress +#define jpeg_finish_decompress tb_jpeg_finish_decompress +#define jpeg_finish_output tb_jpeg_finish_output +#define jpeg_free_large tb_jpeg_free_large +#define jpeg_free_small tb_jpeg_free_small +#define jpeg_gen_optimal_table tb_jpeg_gen_optimal_table +#define jpeg_get_large tb_jpeg_get_large +#define jpeg_get_small tb_jpeg_get_small +#define jpeg_has_multiple_scans tb_jpeg_has_multiple_scans +#define jpeg_huff_decode tb_jpeg_huff_decode +#define jpeg_idct_1x1 tb_jpeg_idct_1x1 +#define jpeg_idct_2x2 tb_jpeg_idct_2x2 +#define jpeg_idct_4x4 tb_jpeg_idct_4x4 +#define jpeg_idct_float tb_jpeg_idct_float +#define jpeg_idct_ifast tb_jpeg_idct_ifast +#define jpeg_idct_islow tb_jpeg_idct_islow +#define jpeg_input_complete tb_jpeg_input_complete +#define jpeg_make_c_derived_tbl tb_jpeg_make_c_derived_tbl +#define jpeg_make_d_derived_tbl tb_jpeg_make_d_derived_tbl +#define jpeg_mem_available tb_jpeg_mem_available +#define jpeg_mem_dest tb_jpeg_mem_dest +#define jpeg_mem_init tb_jpeg_mem_init +#define jpeg_mem_src tb_jpeg_mem_src +#define jpeg_mem_term tb_jpeg_mem_term +#define jpeg_new_colormap tb_jpeg_new_colormap +#define jpeg_open_backing_store tb_jpeg_open_backing_store +#define jpeg_quality_scaling tb_jpeg_quality_scaling +#define jpeg_read_coefficients tb_jpeg_read_coefficients +#define jpeg_read_header tb_jpeg_read_header +#define jpeg_read_raw_data tb_jpeg_read_raw_data +#define jpeg_read_scanlines tb_jpeg_read_scanlines +#define jpeg_resync_to_restart tb_jpeg_resync_to_restart +#define jpeg_save_markers tb_jpeg_save_markers +#define jpeg_set_colorspace tb_jpeg_set_colorspace +#define jpeg_set_defaults tb_jpeg_set_defaults +#define jpeg_set_linear_quality tb_jpeg_set_linear_quality +#define jpeg_set_marker_processor tb_jpeg_set_marker_processor +#define jpeg_set_quality tb_jpeg_set_quality +#define jpeg_simple_progression tb_jpeg_simple_progression +#define jpeg_start_compress tb_jpeg_start_compress +#define jpeg_start_decompress tb_jpeg_start_decompress +#define jpeg_start_output tb_jpeg_start_output +#define jpeg_std_error tb_jpeg_std_error +#define jpeg_stdio_dest tb_jpeg_stdio_dest +#define jpeg_stdio_src tb_jpeg_stdio_src +#define jpeg_suppress_tables tb_jpeg_suppress_tables +#define jpeg_write_coefficients tb_jpeg_write_coefficients +#define jpeg_write_m_byte tb_jpeg_write_m_byte +#define jpeg_write_m_header tb_jpeg_write_m_header +#define jpeg_write_marker tb_jpeg_write_marker +#define jpeg_write_raw_data tb_jpeg_write_raw_data +#define jpeg_write_scanlines tb_jpeg_write_scanlines +#define jpeg_write_tables tb_jpeg_write_tables +#define jround_up tb_jround_up +#define jzero_far tb_jzero_far Added: trunk/xbmc/lib/libjpeg-turbo/include/jmorecfg.h =================================================================== --- trunk/xbmc/lib/libjpeg-turbo/include/jmorecfg.h (rev 0) +++ trunk/xbmc/lib/libjpeg-turbo/include/jmorecfg.h 2012-06-05 23:08:37 UTC (rev 31118) @@ -0,0 +1,404 @@ +/* + * jmorecfg.h + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * Copyright (C) 2009, 2011, D. R. Commander. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains additional configuration options that customize the + * JPEG software for special applications or support machine-dependent + * optimizations. Most users will not need to touch this file. + */ + + +/* + * Define BITS_IN_JSAMPLE as either + * 8 for 8-bit sample values (the usual setting) + * 12 for 12-bit sample values + * Only 8 and 12 are legal data precisions for lossy JPEG according to the + * JPEG standard, and the IJG code does not support anything else! + * We do not support run-time selection of data precision, sorry. + */ + +#define BITS_IN_JSAMPLE 8 /* use 8 or 12 */ + + +/* + * Maximum number of components (color channels) allowed in JPEG image. + * To meet the letter of the JPEG spec, set this to 255. However, darn + * few applications need more than 4 channels (maybe 5 for CMYK + alpha + * mask). We recommend 10 as a reasonable compromise; use 4 if you are + * really short on memory. (Each allowed component costs a hundred or so + * bytes of storage, whether actually used in an image or not.) + */ + +#define MAX_COMPONENTS 10 /* maximum number of image components */ + + +/* + * Basic data types. + * You may need to change these if you have a machine with unusual data + * type sizes; for example, "char" not 8 bits, "short" not 16 bits, + * or "long" not 32 bits. We don't care whether "int" is 16 or 32 bits, + * but it had better be at least 16. + */ + +/* Representation of a single sample (pixel element value). + * We frequently allocate large arrays of these, so it's important to keep + * them small. But if you have memory to burn and access to char or short + * arrays is very slow on your hardware, you might want to change these. + */ + +#if BITS_IN_JSAMPLE == 8 +/* JSAMPLE should be the smallest type that will hold the values 0..255. + * You can use a signed char by having GETJSAMPLE mask it with 0xFF. + */ + +#ifdef HAVE_UNSIGNED_CHAR + +typedef unsigned char JSAMPLE; +#define GETJSAMPLE(value) ((int) (value)) + +#else /* not HAVE_UNSIGNED_CHAR */ + +typedef char JSAMPLE; +#ifdef __CHAR_UNSIGNED__ +#define GETJSAMPLE(value) ((int) (value)) +#else +#define GETJSAMPLE(value) ((int) (value) & 0xFF) +#endif /* __CHAR_UNSIGNED__ */ + +#endif /* HAVE_UNSIGNED_CHAR */ + +#define MAXJSAMPLE 255 +#define CENTERJSAMPLE 128 + +#endif /* BITS_IN_JSAMPLE == 8 */ + + +#if BITS_IN_JSAMPLE == 12 +/* JSAMPLE should be the smallest type that will hold the values 0..4095. + * On nearly all machines "short" will do nicely. + */ + +typedef short JSAMPLE; +#define GETJSAMPLE(value) ((int) (value)) + +#define MAXJSAMPLE 4095 +#define CENTERJSAMPLE 2048 + +#endif /* BITS_IN_JSAMPLE == 12 */ + + +/* Representation of a DCT frequency coefficient. + * This should be a signed value of at least 16 bits; "short" is usually OK. + * Again, we allocate large arrays of these, but you can change to int + * if you have memory to burn and "short" is really slow. + */ + +typedef short JCOEF; + + +/* Compressed datastreams are represented as arrays of JOCTET. + * These must be EXACTLY 8 bits wide, at least once they are written to + * external storage. Note that when using the stdio data source/destination + * managers, this is also the data type passed to fread/fwrite. + */ + +#ifdef HAVE_UNSIGNED_CHAR + +typedef unsigned char JOCTET; +#define GETJOCTET(value) (value) + +#else /* not HAVE_UNSIGNED_CHAR */ + +typedef char JOCTET; +#ifdef __CHAR_UNSIGNED__ +#define GETJOCTET(value) (value) +#else +#define GETJOCTET(value) ((value) & 0xFF) +#endif /* __CHAR_UNSIGNED__ */ + +#endif /* HAVE_UNSIGNED_CHAR */ + + +/* These typedefs are used for various table entries and so forth. + * They must be at least as wide as specified; but making them too big + * won't cost a huge amount of memory, so we don't provide special + * extraction code like we did for JSAMPLE. (In other words, these + * typedefs live at a different point on the speed/space tradeoff curve.) + */ + +/* UINT8 must hold at least the values 0..255. */ + +#ifdef HAVE_UNSIGNED_CHAR +typedef unsigned char UINT8; +#else /* not HAVE_UNSIGNED_CHAR */ +#ifdef __CHAR_UNSIGNED__ +typedef char UINT8; +#else /* not __CHAR_UNSIGNED__ */ +typedef short UINT8; +#endif /* __CHAR_UNSIGNED__ */ +#endif /* HAVE_UNSIGNED_CHAR */ + +/* UINT16 must hold at least the values 0..65535. */ + +#ifdef HAVE_UNSIGNED_SHORT +typedef unsigned short UINT16; +#else /* not HAVE_UNSIGNED_SHORT */ +typedef unsigned int UINT16; +#endif /* HAVE_UNSIGNED_SHORT */ + +/* INT16 must hold at least the values -32768..32767. */ + +#ifndef XMD_H /* X11/xmd.h correctly defines INT16 */ +typedef short INT16; +#endif + +/* INT32 must hold at least signed 32-bit values. */ + +#ifndef XMD_H /* X11/xmd.h correctly defines INT32 */ +typedef long INT32; +#endif + +/* Datatype used for image dimensions. The JPEG standard only supports + * images up to 64K*64K due to 16-bit fields in SOF markers. Therefore + * "unsigned int" is sufficient on all machines. However, if you need to + * handle larger images and you don't mind deviating from the spec, you + * can change this datatype. + */ + +typedef unsigned int JDIMENSION; + +#define JPEG_MAX_DIMENSION 65500L /* a tad under 64K to prevent overflows */ + + +/* These macros are used in all function definitions and extern declarations. + * You could modify them if you need to change function linkage conventions; + * in particular, you'll need to do that to make the library a Windows DLL. + * Another application is to make all functions global for use with debuggers + * or code profilers that require it. + */ + +/* a function called through method pointers: */ +#define METHODDEF(type) static type +/* a function used only in its module: */ +#define LOCAL(type) static type +/* a function referenced thru EXTERNs: */ +#define GLOBAL(type) type +/* a reference to a GLOBAL function: */ +#define EXTERN(type) extern type + + +/* This macro is used to declare a "method", that is, a function pointer. + * We want to supply prototype parameters if the compiler can cope. + * Note that the arglist parameter must be parenthesized! + * Again, you can customize this if you need special linkage keywords. + */ + +#ifdef HAVE_PROTOTYPES +#define JMETHOD(type,methodname,arglist) type (*methodname) arglist +#else +#define JMETHOD(type,methodname,arglist) type (*methodname) () +#endif + + +/* Here is the pseudo-keyword for declaring pointers that must be "far" + * on 80x86 machines. Most of the specialized coding for 80x86 is handled + * by just saying "FAR *" where such a pointer is needed. In a few places + * explicit coding is needed; see uses of the NEED_FAR_POINTERS symbol. + */ + +#ifdef NEED_FAR_POINTERS +#define FAR far +#else +#define FAR +#endif + + +/* + * On a few systems, type boolean and/or its values FALSE, TRUE may appear + * in standard header files. Or you may have conflicts with application- + * specific header files that you want to include together with these files. + * Defining HAVE_BOOLEAN before including jpeglib.h should make it work. + */ + +#ifndef HAVE_BOOLEAN +typedef int boolean; +#endif +#ifndef FALSE /* in case these macros already exist */ +#define FALSE 0 /* values of boolean */ +#endif +#ifndef TRUE +#define TRUE 1 +#endif + + +/* + * The remaining options affect code selection within the JPEG library, + * but they don't need to be visible to most applications using the library. + * To minimize application namespace pollution, the symbols won't be + * defined unless JPEG_INTERNALS or JPEG_INTERNAL_OPTIONS has been defined. + */ + +#ifdef JPEG_INTERNALS +#define JPEG_INTERNAL_OPTIONS +#endif + +#ifdef JPEG_INTERNAL_OPTIONS + + +/* + * These defines indicate whether to include various optional functions. + * Undefining some of these symbols will produce a smaller but less capable + * library. Note that you can leave certain source files out of the + * compilation/linking process if you've #undef'd the corresponding symbols. + * (You may HAVE to do that if your compiler doesn't like null source files.) + */ + +/* Capability option... [truncated message content] |