TurboJPEG: 8-bit lossless JPEG support

This commit is contained in:
DRC
2022-11-16 15:57:25 -06:00
parent 3fb10c35d8
commit 25ccad99a0
36 changed files with 541 additions and 304 deletions

View File

@@ -753,6 +753,10 @@ if(WITH_JAVA)
${Java_JAVA_EXECUTABLE} ${JAVAARGS} -cp java/turbojpeg.jar ${Java_JAVA_EXECUTABLE} ${JAVAARGS} -cp java/turbojpeg.jar
-Djava.library.path=${CMAKE_CURRENT_BINARY_DIR}/${OBJDIR} -Djava.library.path=${CMAKE_CURRENT_BINARY_DIR}/${OBJDIR}
TJUnitTest -yuv -noyuvpad) TJUnitTest -yuv -noyuvpad)
add_test(TJUnitTest-lossless
${Java_JAVA_EXECUTABLE} ${JAVAARGS} -cp java/turbojpeg.jar
-Djava.library.path=${CMAKE_CURRENT_BINARY_DIR}/${OBJDIR}
TJUnitTest -lossless)
add_test(TJUnitTest-bi add_test(TJUnitTest-bi
${Java_JAVA_EXECUTABLE} ${JAVAARGS} -cp java/turbojpeg.jar ${Java_JAVA_EXECUTABLE} ${JAVAARGS} -cp java/turbojpeg.jar
-Djava.library.path=${CMAKE_CURRENT_BINARY_DIR}/${OBJDIR} -Djava.library.path=${CMAKE_CURRENT_BINARY_DIR}/${OBJDIR}
@@ -765,6 +769,10 @@ if(WITH_JAVA)
${Java_JAVA_EXECUTABLE} ${JAVAARGS} -cp java/turbojpeg.jar ${Java_JAVA_EXECUTABLE} ${JAVAARGS} -cp java/turbojpeg.jar
-Djava.library.path=${CMAKE_CURRENT_BINARY_DIR}/${OBJDIR} -Djava.library.path=${CMAKE_CURRENT_BINARY_DIR}/${OBJDIR}
TJUnitTest -bi -yuv -noyuvpad) TJUnitTest -bi -yuv -noyuvpad)
add_test(TJUnitTest-bi-lossless
${Java_JAVA_EXECUTABLE} ${JAVAARGS} -cp java/turbojpeg.jar
-Djava.library.path=${CMAKE_CURRENT_BINARY_DIR}/${OBJDIR}
TJUnitTest -bi -lossless)
endif() endif()
set(TEST_LIBTYPES "") set(TEST_LIBTYPES "")
@@ -890,6 +898,10 @@ foreach(libtype ${TEST_LIBTYPES})
${CMAKE_CROSSCOMPILING_EMULATOR} tjunittest${suffix} -yuv -alloc) ${CMAKE_CROSSCOMPILING_EMULATOR} tjunittest${suffix} -yuv -alloc)
add_test(tjunittest-${libtype}-yuv-nopad add_test(tjunittest-${libtype}-yuv-nopad
${CMAKE_CROSSCOMPILING_EMULATOR} tjunittest${suffix} -yuv -noyuvpad) ${CMAKE_CROSSCOMPILING_EMULATOR} tjunittest${suffix} -yuv -noyuvpad)
add_test(tjunittest-${libtype}-lossless
${CMAKE_CROSSCOMPILING_EMULATOR} tjunittest${suffix} -lossless)
add_test(tjunittest-${libtype}-lossless-alloc
${CMAKE_CROSSCOMPILING_EMULATOR} tjunittest${suffix} -lossless -alloc)
add_test(tjunittest-${libtype}-bmp add_test(tjunittest-${libtype}-bmp
${CMAKE_CROSSCOMPILING_EMULATOR} tjunittest${suffix} -bmp) ${CMAKE_CROSSCOMPILING_EMULATOR} tjunittest${suffix} -bmp)

View File

@@ -31,9 +31,12 @@ tables.
have been removed. have been removed.
4. Added support for 8-bit and 12-bit lossless JPEG images. A new libjpeg API 4. Added support for 8-bit and 12-bit lossless JPEG images. A new libjpeg API
function (`jpeg_enable_lossless()`) and cjpeg command-line argument function (`jpeg_enable_lossless()`), TurboJPEG API flag (`TJFLAG_LOSSLESS` in
(`-lossless`) can be used to create a lossless JPEG image. (Decompression of the C API and `TJ.FLAG_LOSSLESS` in the Java API), and cjpeg/TJBench
lossless JPEG images is handled automatically.) command-line argument (`-lossless`) can be used to create a lossless JPEG
image. (Decompression of lossless JPEG images is handled automatically.) Note
that the TurboJPEG API and TJBench can currently only be used to create and
decompress 8-bit lossless JPEG images.
5. Introduced a new flag in the TurboJPEG C and Java APIs (`TJFLAG_ARITHMETIC` 5. Introduced a new flag in the TurboJPEG C and Java APIs (`TJFLAG_ARITHMETIC`
and `TJ.FLAG_ARITHMETIC`, respectively) that causes the library to use and `TJ.FLAG_ARITHMETIC`, respectively) that causes the library to use

View File

@@ -128,6 +128,9 @@ Macros</h2></td></tr>
<tr class="memitem:ga91fb6ac6054a32375f1b90d48129f335"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga91fb6ac6054a32375f1b90d48129f335">TJFLAG_ARITHMETIC</a></td></tr> <tr class="memitem:ga91fb6ac6054a32375f1b90d48129f335"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga91fb6ac6054a32375f1b90d48129f335">TJFLAG_ARITHMETIC</a></td></tr>
<tr class="memdesc:ga91fb6ac6054a32375f1b90d48129f335"><td class="mdescLeft">&#160;</td><td class="mdescRight">Use arithmetic entropy coding in JPEG images generated by the compression and transform functions. <a href="group___turbo_j_p_e_g.html#ga91fb6ac6054a32375f1b90d48129f335">More...</a><br /></td></tr> <tr class="memdesc:ga91fb6ac6054a32375f1b90d48129f335"><td class="mdescLeft">&#160;</td><td class="mdescRight">Use arithmetic entropy coding in JPEG images generated by the compression and transform functions. <a href="group___turbo_j_p_e_g.html#ga91fb6ac6054a32375f1b90d48129f335">More...</a><br /></td></tr>
<tr class="separator:ga91fb6ac6054a32375f1b90d48129f335"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:ga91fb6ac6054a32375f1b90d48129f335"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaaf0e8b612bb5b981329db9f30e2115bd"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#gaaf0e8b612bb5b981329db9f30e2115bd">TJFLAG_LOSSLESS</a></td></tr>
<tr class="memdesc:gaaf0e8b612bb5b981329db9f30e2115bd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generate a lossless JPEG image when compressing. <a href="group___turbo_j_p_e_g.html#gaaf0e8b612bb5b981329db9f30e2115bd">More...</a><br /></td></tr>
<tr class="separator:gaaf0e8b612bb5b981329db9f30e2115bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga79bde1b4a3e2351e00887e47781b966e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga79bde1b4a3e2351e00887e47781b966e">TJ_NUMERR</a></td></tr> <tr class="memitem:ga79bde1b4a3e2351e00887e47781b966e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___turbo_j_p_e_g.html#ga79bde1b4a3e2351e00887e47781b966e">TJ_NUMERR</a></td></tr>
<tr class="memdesc:ga79bde1b4a3e2351e00887e47781b966e"><td class="mdescLeft">&#160;</td><td class="mdescRight">The number of error codes. <a href="group___turbo_j_p_e_g.html#ga79bde1b4a3e2351e00887e47781b966e">More...</a><br /></td></tr> <tr class="memdesc:ga79bde1b4a3e2351e00887e47781b966e"><td class="mdescLeft">&#160;</td><td class="mdescRight">The number of error codes. <a href="group___turbo_j_p_e_g.html#ga79bde1b4a3e2351e00887e47781b966e">More...</a><br /></td></tr>
<tr class="separator:ga79bde1b4a3e2351e00887e47781b966e"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:ga79bde1b4a3e2351e00887e47781b966e"><td class="memSeparator" colspan="2">&#160;</td></tr>
@@ -540,6 +543,33 @@ YUV Image Format Notes</h2>
<p>Limit the number of progressive JPEG scans that the decompression and transform functions will process. </p> <p>Limit the number of progressive JPEG scans that the decompression and transform functions will process. </p>
<p>If a progressive JPEG image contains an unreasonably large number of scans, then this flag will cause the decompression and transform functions to return an error. The primary purpose of this is to allow security-critical applications to guard against an exploit of the progressive JPEG format described in <a href="https://libjpeg-turbo.org/pmwiki/uploads/About/TwoIssueswiththeJPEGStandard.pdf" target="_blank">this report</a>. </p> <p>If a progressive JPEG image contains an unreasonably large number of scans, then this flag will cause the decompression and transform functions to return an error. The primary purpose of this is to allow security-critical applications to guard against an exploit of the progressive JPEG format described in <a href="https://libjpeg-turbo.org/pmwiki/uploads/About/TwoIssueswiththeJPEGStandard.pdf" target="_blank">this report</a>. </p>
</div>
</div>
<a id="gaaf0e8b612bb5b981329db9f30e2115bd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaaf0e8b612bb5b981329db9f30e2115bd">&#9670;&nbsp;</a></span>TJFLAG_LOSSLESS</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define TJFLAG_LOSSLESS</td>
</tr>
</table>
</div><div class="memdoc">
<p>Generate a lossless JPEG image when compressing. </p>
<p>In most cases, compressing and decompressing lossless JPEG images is considerably slower than compressing and decompressing lossy JPEG images. Also note that the following features are not available with lossless JPEG images:</p><ul>
<li>Colorspace conversion</li>
<li>Chrominance subsampling</li>
<li>JPEG quality selection</li>
<li>DCT/IDCT algorithm selection</li>
<li>Progressive entropy coding</li>
<li>Arithmetic entropy coding</li>
<li>Compression from/decompression to YUV planar images</li>
<li>Decompression scaling</li>
<li>Lossless transformations </li>
</ul>
</div> </div>
</div> </div>
<a id="ga8808d403c68b62aaa58a4c1e58e98963"></a> <a id="ga8808d403c68b62aaa58a4c1e58e98963"></a>
@@ -1225,7 +1255,7 @@ YUV Image Format Notes</h2>
If you choose option 1, <code>*jpegSize</code> should be set to the size of your pre-allocated buffer. In any case, unless you have set <a class="el" href="group___turbo_j_p_e_g.html#ga8808d403c68b62aaa58a4c1e58e98963" title="Disable buffer (re)allocation.">TJFLAG_NOREALLOC</a>, you should always check <code>*jpegBuf</code> upon return from this function, as it may have changed.</td></tr> If you choose option 1, <code>*jpegSize</code> should be set to the size of your pre-allocated buffer. In any case, unless you have set <a class="el" href="group___turbo_j_p_e_g.html#ga8808d403c68b62aaa58a4c1e58e98963" title="Disable buffer (re)allocation.">TJFLAG_NOREALLOC</a>, you should always check <code>*jpegBuf</code> upon return from this function, as it may have changed.</td></tr>
<tr><td class="paramname">jpegSize</td><td>pointer to an unsigned long variable that holds the size of the JPEG image buffer. If <code>*jpegBuf</code> points to a pre-allocated buffer, then <code>*jpegSize</code> should be set to the size of the buffer. Upon return, <code>*jpegSize</code> will contain the size of the JPEG image (in bytes.) If <code>*jpegBuf</code> points to a JPEG image buffer that is being reused from a previous call to one of the JPEG compression functions, then <code>*jpegSize</code> is ignored.</td></tr> <tr><td class="paramname">jpegSize</td><td>pointer to an unsigned long variable that holds the size of the JPEG image buffer. If <code>*jpegBuf</code> points to a pre-allocated buffer, then <code>*jpegSize</code> should be set to the size of the buffer. Upon return, <code>*jpegSize</code> will contain the size of the JPEG image (in bytes.) If <code>*jpegBuf</code> points to a JPEG image buffer that is being reused from a previous call to one of the JPEG compression functions, then <code>*jpegSize</code> is ignored.</td></tr>
<tr><td class="paramname">jpegSubsamp</td><td>the level of chrominance subsampling to be used when generating the JPEG image (see <a class="el" href="group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074">Chrominance subsampling options</a>.)</td></tr> <tr><td class="paramname">jpegSubsamp</td><td>the level of chrominance subsampling to be used when generating the JPEG image (see <a class="el" href="group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074">Chrominance subsampling options</a>.)</td></tr>
<tr><td class="paramname">jpegQual</td><td>the image quality of the generated JPEG image (1 = worst, 100 = best)</td></tr> <tr><td class="paramname">jpegQual</td><td>the image quality of the generated JPEG image (1 = worst, 100 = best.) When generating a lossless JPEG image (see <a class="el" href="group___turbo_j_p_e_g.html#gaaf0e8b612bb5b981329db9f30e2115bd" title="Generate a lossless JPEG image when compressing.">TJFLAG_LOSSLESS</a>), <code>jpegQual</code> is <code>psv * 10 + Pt</code>, where <code>psv</code> is the predictor selection value (1-7) and <code>Pt</code> is the point transform (0-7). A point transform value of 0 is necessary in order to create a fully lossless JPEG image. (A non-zero point transform value right-shifts the input samples by the specified number of bits, which is effectively a form of lossy color quantization.)</td></tr>
<tr><td class="paramname">flags</td><td>the bitwise OR of one or more of the <a class="el" href="group___turbo_j_p_e_g.html#gacb233cfd722d66d1ccbf48a7de81f0e0">flags</a></td></tr> <tr><td class="paramname">flags</td><td>the bitwise OR of one or more of the <a class="el" href="group___turbo_j_p_e_g.html#gacb233cfd722d66d1ccbf48a7de81f0e0">flags</a></td></tr>
</table> </table>
</dd> </dd>

View File

@@ -37,69 +37,70 @@ var searchData=
['tjflag_5ffastdct_42',['TJFLAG_FASTDCT',['../group___turbo_j_p_e_g.html#gaabce235db80d3f698b27f36cbd453da2',1,'turbojpeg.h']]], ['tjflag_5ffastdct_42',['TJFLAG_FASTDCT',['../group___turbo_j_p_e_g.html#gaabce235db80d3f698b27f36cbd453da2',1,'turbojpeg.h']]],
['tjflag_5ffastupsample_43',['TJFLAG_FASTUPSAMPLE',['../group___turbo_j_p_e_g.html#ga4ee4506c81177a06f77e2504a22efd2d',1,'turbojpeg.h']]], ['tjflag_5ffastupsample_43',['TJFLAG_FASTUPSAMPLE',['../group___turbo_j_p_e_g.html#ga4ee4506c81177a06f77e2504a22efd2d',1,'turbojpeg.h']]],
['tjflag_5flimitscans_44',['TJFLAG_LIMITSCANS',['../group___turbo_j_p_e_g.html#ga163e6482dc5096831feef9c79ff3f805',1,'turbojpeg.h']]], ['tjflag_5flimitscans_44',['TJFLAG_LIMITSCANS',['../group___turbo_j_p_e_g.html#ga163e6482dc5096831feef9c79ff3f805',1,'turbojpeg.h']]],
['tjflag_5fnorealloc_45',['TJFLAG_NOREALLOC',['../group___turbo_j_p_e_g.html#ga8808d403c68b62aaa58a4c1e58e98963',1,'turbojpeg.h']]], ['tjflag_5flossless_45',['TJFLAG_LOSSLESS',['../group___turbo_j_p_e_g.html#gaaf0e8b612bb5b981329db9f30e2115bd',1,'turbojpeg.h']]],
['tjflag_5fprogressive_46',['TJFLAG_PROGRESSIVE',['../group___turbo_j_p_e_g.html#ga43b426750b46190a25d34a67ef76df1b',1,'turbojpeg.h']]], ['tjflag_5fnorealloc_46',['TJFLAG_NOREALLOC',['../group___turbo_j_p_e_g.html#ga8808d403c68b62aaa58a4c1e58e98963',1,'turbojpeg.h']]],
['tjflag_5fstoponwarning_47',['TJFLAG_STOPONWARNING',['../group___turbo_j_p_e_g.html#ga519cfa4ef6c18d9e5b455fdf59306a3a',1,'turbojpeg.h']]], ['tjflag_5fprogressive_47',['TJFLAG_PROGRESSIVE',['../group___turbo_j_p_e_g.html#ga43b426750b46190a25d34a67ef76df1b',1,'turbojpeg.h']]],
['tjfree_48',['tjFree',['../group___turbo_j_p_e_g.html#gaea863d2da0cdb609563aabdf9196514b',1,'turbojpeg.h']]], ['tjflag_5fstoponwarning_48',['TJFLAG_STOPONWARNING',['../group___turbo_j_p_e_g.html#ga519cfa4ef6c18d9e5b455fdf59306a3a',1,'turbojpeg.h']]],
['tjgeterrorcode_49',['tjGetErrorCode',['../group___turbo_j_p_e_g.html#ga414feeffbf860ebd31c745df203de410',1,'turbojpeg.h']]], ['tjfree_49',['tjFree',['../group___turbo_j_p_e_g.html#gaea863d2da0cdb609563aabdf9196514b',1,'turbojpeg.h']]],
['tjgeterrorstr2_50',['tjGetErrorStr2',['../group___turbo_j_p_e_g.html#ga1ead8574f9f39fbafc6b497124e7aafa',1,'turbojpeg.h']]], ['tjgeterrorcode_50',['tjGetErrorCode',['../group___turbo_j_p_e_g.html#ga414feeffbf860ebd31c745df203de410',1,'turbojpeg.h']]],
['tjgetscalingfactors_51',['tjGetScalingFactors',['../group___turbo_j_p_e_g.html#gac3854476006b10787bd128f7ede48057',1,'turbojpeg.h']]], ['tjgeterrorstr2_51',['tjGetErrorStr2',['../group___turbo_j_p_e_g.html#ga1ead8574f9f39fbafc6b497124e7aafa',1,'turbojpeg.h']]],
['tjgreenoffset_52',['tjGreenOffset',['../group___turbo_j_p_e_g.html#ga82d6e35da441112a411da41923c0ba2f',1,'turbojpeg.h']]], ['tjgetscalingfactors_52',['tjGetScalingFactors',['../group___turbo_j_p_e_g.html#gac3854476006b10787bd128f7ede48057',1,'turbojpeg.h']]],
['tjhandle_53',['tjhandle',['../group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763',1,'turbojpeg.h']]], ['tjgreenoffset_53',['tjGreenOffset',['../group___turbo_j_p_e_g.html#ga82d6e35da441112a411da41923c0ba2f',1,'turbojpeg.h']]],
['tjinitcompress_54',['tjInitCompress',['../group___turbo_j_p_e_g.html#ga9d63a05fc6d813f4aae06107041a37e8',1,'turbojpeg.h']]], ['tjhandle_54',['tjhandle',['../group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763',1,'turbojpeg.h']]],
['tjinitdecompress_55',['tjInitDecompress',['../group___turbo_j_p_e_g.html#ga52300eac3f3d9ef4bab303bc244f62d3',1,'turbojpeg.h']]], ['tjinitcompress_55',['tjInitCompress',['../group___turbo_j_p_e_g.html#ga9d63a05fc6d813f4aae06107041a37e8',1,'turbojpeg.h']]],
['tjinittransform_56',['tjInitTransform',['../group___turbo_j_p_e_g.html#ga928beff6ac248ceadf01089fc6b41957',1,'turbojpeg.h']]], ['tjinitdecompress_56',['tjInitDecompress',['../group___turbo_j_p_e_g.html#ga52300eac3f3d9ef4bab303bc244f62d3',1,'turbojpeg.h']]],
['tjloadimage_57',['tjLoadImage',['../group___turbo_j_p_e_g.html#gaffbd83c375e79f5db4b5c5d8ad4466e7',1,'turbojpeg.h']]], ['tjinittransform_57',['tjInitTransform',['../group___turbo_j_p_e_g.html#ga928beff6ac248ceadf01089fc6b41957',1,'turbojpeg.h']]],
['tjmcuheight_58',['tjMCUHeight',['../group___turbo_j_p_e_g.html#gabd247bb9fecb393eca57366feb8327bf',1,'turbojpeg.h']]], ['tjloadimage_58',['tjLoadImage',['../group___turbo_j_p_e_g.html#gaffbd83c375e79f5db4b5c5d8ad4466e7',1,'turbojpeg.h']]],
['tjmcuwidth_59',['tjMCUWidth',['../group___turbo_j_p_e_g.html#ga9e61e7cd47a15a173283ba94e781308c',1,'turbojpeg.h']]], ['tjmcuheight_59',['tjMCUHeight',['../group___turbo_j_p_e_g.html#gabd247bb9fecb393eca57366feb8327bf',1,'turbojpeg.h']]],
['tjpad_60',['TJPAD',['../group___turbo_j_p_e_g.html#ga0aba955473315e405295d978f0c16511',1,'turbojpeg.h']]], ['tjmcuwidth_60',['tjMCUWidth',['../group___turbo_j_p_e_g.html#ga9e61e7cd47a15a173283ba94e781308c',1,'turbojpeg.h']]],
['tjpf_61',['TJPF',['../group___turbo_j_p_e_g.html#gac916144e26c3817ac514e64ae5d12e2a',1,'turbojpeg.h']]], ['tjpad_61',['TJPAD',['../group___turbo_j_p_e_g.html#ga0aba955473315e405295d978f0c16511',1,'turbojpeg.h']]],
['tjpf_5fabgr_62',['TJPF_ABGR',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa1ba1a7f1631dbeaa49a0a85fc4a40081',1,'turbojpeg.h']]], ['tjpf_62',['TJPF',['../group___turbo_j_p_e_g.html#gac916144e26c3817ac514e64ae5d12e2a',1,'turbojpeg.h']]],
['tjpf_5fargb_63',['TJPF_ARGB',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aae8f846ed9d9de99b6e1dfe448848765c',1,'turbojpeg.h']]], ['tjpf_5fabgr_63',['TJPF_ABGR',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa1ba1a7f1631dbeaa49a0a85fc4a40081',1,'turbojpeg.h']]],
['tjpf_5fbgr_64',['TJPF_BGR',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aab10624437fb8ef495a0b153e65749839',1,'turbojpeg.h']]], ['tjpf_5fargb_64',['TJPF_ARGB',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aae8f846ed9d9de99b6e1dfe448848765c',1,'turbojpeg.h']]],
['tjpf_5fbgra_65',['TJPF_BGRA',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aac037ff1845cf9b74bb81a3659c2b9fb4',1,'turbojpeg.h']]], ['tjpf_5fbgr_65',['TJPF_BGR',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aab10624437fb8ef495a0b153e65749839',1,'turbojpeg.h']]],
['tjpf_5fbgrx_66',['TJPF_BGRX',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa2a1fbf569ca79897eae886e3376ca4c8',1,'turbojpeg.h']]], ['tjpf_5fbgra_66',['TJPF_BGRA',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aac037ff1845cf9b74bb81a3659c2b9fb4',1,'turbojpeg.h']]],
['tjpf_5fcmyk_67',['TJPF_CMYK',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa7f5100ec44c91994e243f1cf55553f8b',1,'turbojpeg.h']]], ['tjpf_5fbgrx_67',['TJPF_BGRX',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa2a1fbf569ca79897eae886e3376ca4c8',1,'turbojpeg.h']]],
['tjpf_5fgray_68',['TJPF_GRAY',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa5431b54b015337705f13118073711a1a',1,'turbojpeg.h']]], ['tjpf_5fcmyk_68',['TJPF_CMYK',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa7f5100ec44c91994e243f1cf55553f8b',1,'turbojpeg.h']]],
['tjpf_5frgb_69',['TJPF_RGB',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa7ce93230bff449518ce387c17e6ed37c',1,'turbojpeg.h']]], ['tjpf_5fgray_69',['TJPF_GRAY',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa5431b54b015337705f13118073711a1a',1,'turbojpeg.h']]],
['tjpf_5frgba_70',['TJPF_RGBA',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa88d2e88fab67f6503cf972e14851cc12',1,'turbojpeg.h']]], ['tjpf_5frgb_70',['TJPF_RGB',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa7ce93230bff449518ce387c17e6ed37c',1,'turbojpeg.h']]],
['tjpf_5frgbx_71',['TJPF_RGBX',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa83973bebb7e2dc6fa8bae89ff3f42e01',1,'turbojpeg.h']]], ['tjpf_5frgba_71',['TJPF_RGBA',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa88d2e88fab67f6503cf972e14851cc12',1,'turbojpeg.h']]],
['tjpf_5funknown_72',['TJPF_UNKNOWN',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa84c1a6cead7952998e2fb895844a21ed',1,'turbojpeg.h']]], ['tjpf_5frgbx_72',['TJPF_RGBX',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa83973bebb7e2dc6fa8bae89ff3f42e01',1,'turbojpeg.h']]],
['tjpf_5fxbgr_73',['TJPF_XBGR',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aaf6603b27147de47e212e75dac027b2af',1,'turbojpeg.h']]], ['tjpf_5funknown_73',['TJPF_UNKNOWN',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa84c1a6cead7952998e2fb895844a21ed',1,'turbojpeg.h']]],
['tjpf_5fxrgb_74',['TJPF_XRGB',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aadae996905efcfa3b42a0bb3bea7f9d84',1,'turbojpeg.h']]], ['tjpf_5fxbgr_74',['TJPF_XBGR',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aaf6603b27147de47e212e75dac027b2af',1,'turbojpeg.h']]],
['tjpixelsize_75',['tjPixelSize',['../group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c',1,'turbojpeg.h']]], ['tjpf_5fxrgb_75',['TJPF_XRGB',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aadae996905efcfa3b42a0bb3bea7f9d84',1,'turbojpeg.h']]],
['tjplaneheight_76',['tjPlaneHeight',['../group___turbo_j_p_e_g.html#ga1a209696c6a80748f20e134b3c64789f',1,'turbojpeg.h']]], ['tjpixelsize_76',['tjPixelSize',['../group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c',1,'turbojpeg.h']]],
['tjplanesizeyuv_77',['tjPlaneSizeYUV',['../group___turbo_j_p_e_g.html#gab4ab7b24f6e797d79abaaa670373961d',1,'turbojpeg.h']]], ['tjplaneheight_77',['tjPlaneHeight',['../group___turbo_j_p_e_g.html#ga1a209696c6a80748f20e134b3c64789f',1,'turbojpeg.h']]],
['tjplanewidth_78',['tjPlaneWidth',['../group___turbo_j_p_e_g.html#ga63fb66bb1e36c74008c4634360becbb1',1,'turbojpeg.h']]], ['tjplanesizeyuv_78',['tjPlaneSizeYUV',['../group___turbo_j_p_e_g.html#gab4ab7b24f6e797d79abaaa670373961d',1,'turbojpeg.h']]],
['tjredoffset_79',['tjRedOffset',['../group___turbo_j_p_e_g.html#gadd9b446742ac8a3923f7992c7988fea8',1,'turbojpeg.h']]], ['tjplanewidth_79',['tjPlaneWidth',['../group___turbo_j_p_e_g.html#ga63fb66bb1e36c74008c4634360becbb1',1,'turbojpeg.h']]],
['tjregion_80',['tjregion',['../structtjregion.html',1,'']]], ['tjredoffset_80',['tjRedOffset',['../group___turbo_j_p_e_g.html#gadd9b446742ac8a3923f7992c7988fea8',1,'turbojpeg.h']]],
['tjsamp_81',['TJSAMP',['../group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074',1,'turbojpeg.h']]], ['tjregion_81',['tjregion',['../structtjregion.html',1,'']]],
['tjsamp_5f411_82',['TJSAMP_411',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a28ec62575e5ea295c3fde3001dc628e2',1,'turbojpeg.h']]], ['tjsamp_82',['TJSAMP',['../group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074',1,'turbojpeg.h']]],
['tjsamp_5f420_83',['TJSAMP_420',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a63085dbf683cfe39e513cdb6343e3737',1,'turbojpeg.h']]], ['tjsamp_5f411_83',['TJSAMP_411',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a28ec62575e5ea295c3fde3001dc628e2',1,'turbojpeg.h']]],
['tjsamp_5f422_84',['TJSAMP_422',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a136130902cc578f11f32429b59368404',1,'turbojpeg.h']]], ['tjsamp_5f420_84',['TJSAMP_420',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a63085dbf683cfe39e513cdb6343e3737',1,'turbojpeg.h']]],
['tjsamp_5f440_85',['TJSAMP_440',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074accf740e6f3aa6ba20ba922cad13cb974',1,'turbojpeg.h']]], ['tjsamp_5f422_85',['TJSAMP_422',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a136130902cc578f11f32429b59368404',1,'turbojpeg.h']]],
['tjsamp_5f444_86',['TJSAMP_444',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074afb8da4f44197837bdec0a4f593dacae3',1,'turbojpeg.h']]], ['tjsamp_5f440_86',['TJSAMP_440',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074accf740e6f3aa6ba20ba922cad13cb974',1,'turbojpeg.h']]],
['tjsamp_5fgray_87',['TJSAMP_GRAY',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a3f1c9504842ddc7a48d0f690754b6248',1,'turbojpeg.h']]], ['tjsamp_5f444_87',['TJSAMP_444',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074afb8da4f44197837bdec0a4f593dacae3',1,'turbojpeg.h']]],
['tjsaveimage_88',['tjSaveImage',['../group___turbo_j_p_e_g.html#ga6f445b22d8933ae4815b3370a538d879',1,'turbojpeg.h']]], ['tjsamp_5fgray_88',['TJSAMP_GRAY',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a3f1c9504842ddc7a48d0f690754b6248',1,'turbojpeg.h']]],
['tjscaled_89',['TJSCALED',['../group___turbo_j_p_e_g.html#ga84878bb65404204743aa18cac02781df',1,'turbojpeg.h']]], ['tjsaveimage_89',['tjSaveImage',['../group___turbo_j_p_e_g.html#ga6f445b22d8933ae4815b3370a538d879',1,'turbojpeg.h']]],
['tjscalingfactor_90',['tjscalingfactor',['../structtjscalingfactor.html',1,'']]], ['tjscaled_90',['TJSCALED',['../group___turbo_j_p_e_g.html#ga84878bb65404204743aa18cac02781df',1,'turbojpeg.h']]],
['tjtransform_91',['tjtransform',['../structtjtransform.html',1,'tjtransform'],['../group___turbo_j_p_e_g.html#ga504805ec0161f1b505397ca0118bf8fd',1,'tjtransform():&#160;turbojpeg.h'],['../group___turbo_j_p_e_g.html#ga9cb8abf4cc91881e04a0329b2270be25',1,'tjTransform(tjhandle handle, const unsigned char *jpegBuf, unsigned long jpegSize, int n, unsigned char **dstBufs, unsigned long *dstSizes, tjtransform *transforms, int flags):&#160;turbojpeg.h']]], ['tjscalingfactor_91',['tjscalingfactor',['../structtjscalingfactor.html',1,'']]],
['tjxop_92',['TJXOP',['../group___turbo_j_p_e_g.html#ga2de531af4e7e6c4f124908376b354866',1,'turbojpeg.h']]], ['tjtransform_92',['tjtransform',['../structtjtransform.html',1,'tjtransform'],['../group___turbo_j_p_e_g.html#ga9cb8abf4cc91881e04a0329b2270be25',1,'tjTransform(tjhandle handle, const unsigned char *jpegBuf, unsigned long jpegSize, int n, unsigned char **dstBufs, unsigned long *dstSizes, tjtransform *transforms, int flags):&#160;turbojpeg.h'],['../group___turbo_j_p_e_g.html#ga504805ec0161f1b505397ca0118bf8fd',1,'tjtransform():&#160;turbojpeg.h']]],
['tjxop_5fhflip_93',['TJXOP_HFLIP',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866aa0df69776caa30f0fa28e26332d311ce',1,'turbojpeg.h']]], ['tjxop_93',['TJXOP',['../group___turbo_j_p_e_g.html#ga2de531af4e7e6c4f124908376b354866',1,'turbojpeg.h']]],
['tjxop_5fnone_94',['TJXOP_NONE',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866aad88c0366cd3f7d0eac9d7a3fa1c2c27',1,'turbojpeg.h']]], ['tjxop_5fhflip_94',['TJXOP_HFLIP',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866aa0df69776caa30f0fa28e26332d311ce',1,'turbojpeg.h']]],
['tjxop_5frot180_95',['TJXOP_ROT180',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a140952eb8dd0300accfcc22726d69692',1,'turbojpeg.h']]], ['tjxop_5fnone_95',['TJXOP_NONE',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866aad88c0366cd3f7d0eac9d7a3fa1c2c27',1,'turbojpeg.h']]],
['tjxop_5frot270_96',['TJXOP_ROT270',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a3064ee5dfb7f032df332818587567a08',1,'turbojpeg.h']]], ['tjxop_5frot180_96',['TJXOP_ROT180',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a140952eb8dd0300accfcc22726d69692',1,'turbojpeg.h']]],
['tjxop_5frot90_97',['TJXOP_ROT90',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a43b2bbb23bc4bd548422d43fbe9af128',1,'turbojpeg.h']]], ['tjxop_5frot270_97',['TJXOP_ROT270',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a3064ee5dfb7f032df332818587567a08',1,'turbojpeg.h']]],
['tjxop_5ftranspose_98',['TJXOP_TRANSPOSE',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a31060aed199f886afdd417f80499c32d',1,'turbojpeg.h']]], ['tjxop_5frot90_98',['TJXOP_ROT90',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a43b2bbb23bc4bd548422d43fbe9af128',1,'turbojpeg.h']]],
['tjxop_5ftransverse_99',['TJXOP_TRANSVERSE',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866af3b14d488aea6ece9e5b3df73a74d6a4',1,'turbojpeg.h']]], ['tjxop_5ftranspose_99',['TJXOP_TRANSPOSE',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a31060aed199f886afdd417f80499c32d',1,'turbojpeg.h']]],
['tjxop_5fvflip_100',['TJXOP_VFLIP',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a324eddfbec53b7e691f61e56929d0d5d',1,'turbojpeg.h']]], ['tjxop_5ftransverse_100',['TJXOP_TRANSVERSE',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866af3b14d488aea6ece9e5b3df73a74d6a4',1,'turbojpeg.h']]],
['tjxopt_5farithmetic_101',['TJXOPT_ARITHMETIC',['../group___turbo_j_p_e_g.html#gaecaaa3b7e2af812592c015d83207f010',1,'turbojpeg.h']]], ['tjxop_5fvflip_101',['TJXOP_VFLIP',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a324eddfbec53b7e691f61e56929d0d5d',1,'turbojpeg.h']]],
['tjxopt_5fcopynone_102',['TJXOPT_COPYNONE',['../group___turbo_j_p_e_g.html#ga153b468cfb905d0de61706c838986fe8',1,'turbojpeg.h']]], ['tjxopt_5farithmetic_102',['TJXOPT_ARITHMETIC',['../group___turbo_j_p_e_g.html#gaecaaa3b7e2af812592c015d83207f010',1,'turbojpeg.h']]],
['tjxopt_5fcrop_103',['TJXOPT_CROP',['../group___turbo_j_p_e_g.html#ga9c771a757fc1294add611906b89ab2d2',1,'turbojpeg.h']]], ['tjxopt_5fcopynone_103',['TJXOPT_COPYNONE',['../group___turbo_j_p_e_g.html#ga153b468cfb905d0de61706c838986fe8',1,'turbojpeg.h']]],
['tjxopt_5fgray_104',['TJXOPT_GRAY',['../group___turbo_j_p_e_g.html#ga3acee7b48ade1b99e5588736007c2589',1,'turbojpeg.h']]], ['tjxopt_5fcrop_104',['TJXOPT_CROP',['../group___turbo_j_p_e_g.html#ga9c771a757fc1294add611906b89ab2d2',1,'turbojpeg.h']]],
['tjxopt_5fnooutput_105',['TJXOPT_NOOUTPUT',['../group___turbo_j_p_e_g.html#gafbf992bbf6e006705886333703ffab31',1,'turbojpeg.h']]], ['tjxopt_5fgray_105',['TJXOPT_GRAY',['../group___turbo_j_p_e_g.html#ga3acee7b48ade1b99e5588736007c2589',1,'turbojpeg.h']]],
['tjxopt_5fperfect_106',['TJXOPT_PERFECT',['../group___turbo_j_p_e_g.html#ga50e03cb5ed115330e212417429600b00',1,'turbojpeg.h']]], ['tjxopt_5fnooutput_106',['TJXOPT_NOOUTPUT',['../group___turbo_j_p_e_g.html#gafbf992bbf6e006705886333703ffab31',1,'turbojpeg.h']]],
['tjxopt_5fprogressive_107',['TJXOPT_PROGRESSIVE',['../group___turbo_j_p_e_g.html#gad2371c80674584ecc1a7d75e564cf026',1,'turbojpeg.h']]], ['tjxopt_5fperfect_107',['TJXOPT_PERFECT',['../group___turbo_j_p_e_g.html#ga50e03cb5ed115330e212417429600b00',1,'turbojpeg.h']]],
['tjxopt_5ftrim_108',['TJXOPT_TRIM',['../group___turbo_j_p_e_g.html#ga319826b7eb1583c0595bbe7b95428709',1,'turbojpeg.h']]], ['tjxopt_5fprogressive_108',['TJXOPT_PROGRESSIVE',['../group___turbo_j_p_e_g.html#gad2371c80674584ecc1a7d75e564cf026',1,'turbojpeg.h']]],
['turbojpeg_109',['TurboJPEG',['../group___turbo_j_p_e_g.html',1,'']]] ['tjxopt_5ftrim_109',['TJXOPT_TRIM',['../group___turbo_j_p_e_g.html#ga319826b7eb1583c0595bbe7b95428709',1,'turbojpeg.h']]],
['turbojpeg_110',['TurboJPEG',['../group___turbo_j_p_e_g.html',1,'']]]
]; ];

View File

@@ -1,4 +1,4 @@
var searchData= var searchData=
[ [
['w_110',['w',['../structtjregion.html#ab6eb73ceef584fc23c8c8097926dce42',1,'tjregion']]] ['w_111',['w',['../structtjregion.html#ab6eb73ceef584fc23c8c8097926dce42',1,'tjregion']]]
]; ];

View File

@@ -1,4 +1,4 @@
var searchData= var searchData=
[ [
['x_111',['x',['../structtjregion.html#a4b6a37a93997091b26a75831fa291ad9',1,'tjregion']]] ['x_112',['x',['../structtjregion.html#a4b6a37a93997091b26a75831fa291ad9',1,'tjregion']]]
]; ];

View File

@@ -1,4 +1,4 @@
var searchData= var searchData=
[ [
['y_112',['y',['../structtjregion.html#a7b3e0c24cfe87acc80e334cafdcf22c2',1,'tjregion']]] ['y_113',['y',['../structtjregion.html#a7b3e0c24cfe87acc80e334cafdcf22c2',1,'tjregion']]]
]; ];

View File

@@ -1,6 +1,6 @@
var searchData= var searchData=
[ [
['tjregion_113',['tjregion',['../structtjregion.html',1,'']]], ['tjregion_114',['tjregion',['../structtjregion.html',1,'']]],
['tjscalingfactor_114',['tjscalingfactor',['../structtjscalingfactor.html',1,'']]], ['tjscalingfactor_115',['tjscalingfactor',['../structtjscalingfactor.html',1,'']]],
['tjtransform_115',['tjtransform',['../structtjtransform.html',1,'']]] ['tjtransform_116',['tjtransform',['../structtjtransform.html',1,'']]]
]; ];

View File

@@ -1,8 +1,8 @@
var searchData= var searchData=
[ [
['tjcs_164',['TJCS',['../group___turbo_j_p_e_g.html#ga4f83ad3368e0e29d1957be0efa7c3720',1,'turbojpeg.h']]], ['tjcs_165',['TJCS',['../group___turbo_j_p_e_g.html#ga4f83ad3368e0e29d1957be0efa7c3720',1,'turbojpeg.h']]],
['tjerr_165',['TJERR',['../group___turbo_j_p_e_g.html#gafbc17cfa57d0d5d11fea35ac025950fe',1,'turbojpeg.h']]], ['tjerr_166',['TJERR',['../group___turbo_j_p_e_g.html#gafbc17cfa57d0d5d11fea35ac025950fe',1,'turbojpeg.h']]],
['tjpf_166',['TJPF',['../group___turbo_j_p_e_g.html#gac916144e26c3817ac514e64ae5d12e2a',1,'turbojpeg.h']]], ['tjpf_167',['TJPF',['../group___turbo_j_p_e_g.html#gac916144e26c3817ac514e64ae5d12e2a',1,'turbojpeg.h']]],
['tjsamp_167',['TJSAMP',['../group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074',1,'turbojpeg.h']]], ['tjsamp_168',['TJSAMP',['../group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074',1,'turbojpeg.h']]],
['tjxop_168',['TJXOP',['../group___turbo_j_p_e_g.html#ga2de531af4e7e6c4f124908376b354866',1,'turbojpeg.h']]] ['tjxop_169',['TJXOP',['../group___turbo_j_p_e_g.html#ga2de531af4e7e6c4f124908376b354866',1,'turbojpeg.h']]]
]; ];

View File

@@ -1,37 +1,37 @@
var searchData= var searchData=
[ [
['tjcs_5fcmyk_169',['TJCS_CMYK',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a6c8b636152ac8195b869587db315ee53',1,'turbojpeg.h']]], ['tjcs_5fcmyk_170',['TJCS_CMYK',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a6c8b636152ac8195b869587db315ee53',1,'turbojpeg.h']]],
['tjcs_5fgray_170',['TJCS_GRAY',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720ab3e7d6a87f695e45b81c1b5262b5a50a',1,'turbojpeg.h']]], ['tjcs_5fgray_171',['TJCS_GRAY',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720ab3e7d6a87f695e45b81c1b5262b5a50a',1,'turbojpeg.h']]],
['tjcs_5frgb_171',['TJCS_RGB',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a677cb7ccb85c4038ac41964a2e09e555',1,'turbojpeg.h']]], ['tjcs_5frgb_172',['TJCS_RGB',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a677cb7ccb85c4038ac41964a2e09e555',1,'turbojpeg.h']]],
['tjcs_5fycbcr_172',['TJCS_YCbCr',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a7389b8f65bb387ffedce3efd0d78ec75',1,'turbojpeg.h']]], ['tjcs_5fycbcr_173',['TJCS_YCbCr',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a7389b8f65bb387ffedce3efd0d78ec75',1,'turbojpeg.h']]],
['tjcs_5fycck_173',['TJCS_YCCK',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a53839e0fe867b76b58d16b0a1a7c598e',1,'turbojpeg.h']]], ['tjcs_5fycck_174',['TJCS_YCCK',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a53839e0fe867b76b58d16b0a1a7c598e',1,'turbojpeg.h']]],
['tjerr_5ffatal_174',['TJERR_FATAL',['../group___turbo_j_p_e_g.html#ggafbc17cfa57d0d5d11fea35ac025950feafc9cceeada13122b09e4851e3788039a',1,'turbojpeg.h']]], ['tjerr_5ffatal_175',['TJERR_FATAL',['../group___turbo_j_p_e_g.html#ggafbc17cfa57d0d5d11fea35ac025950feafc9cceeada13122b09e4851e3788039a',1,'turbojpeg.h']]],
['tjerr_5fwarning_175',['TJERR_WARNING',['../group___turbo_j_p_e_g.html#ggafbc17cfa57d0d5d11fea35ac025950fea342dd6e2aedb47bb257b4e7568329b59',1,'turbojpeg.h']]], ['tjerr_5fwarning_176',['TJERR_WARNING',['../group___turbo_j_p_e_g.html#ggafbc17cfa57d0d5d11fea35ac025950fea342dd6e2aedb47bb257b4e7568329b59',1,'turbojpeg.h']]],
['tjpf_5fabgr_176',['TJPF_ABGR',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa1ba1a7f1631dbeaa49a0a85fc4a40081',1,'turbojpeg.h']]], ['tjpf_5fabgr_177',['TJPF_ABGR',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa1ba1a7f1631dbeaa49a0a85fc4a40081',1,'turbojpeg.h']]],
['tjpf_5fargb_177',['TJPF_ARGB',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aae8f846ed9d9de99b6e1dfe448848765c',1,'turbojpeg.h']]], ['tjpf_5fargb_178',['TJPF_ARGB',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aae8f846ed9d9de99b6e1dfe448848765c',1,'turbojpeg.h']]],
['tjpf_5fbgr_178',['TJPF_BGR',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aab10624437fb8ef495a0b153e65749839',1,'turbojpeg.h']]], ['tjpf_5fbgr_179',['TJPF_BGR',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aab10624437fb8ef495a0b153e65749839',1,'turbojpeg.h']]],
['tjpf_5fbgra_179',['TJPF_BGRA',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aac037ff1845cf9b74bb81a3659c2b9fb4',1,'turbojpeg.h']]], ['tjpf_5fbgra_180',['TJPF_BGRA',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aac037ff1845cf9b74bb81a3659c2b9fb4',1,'turbojpeg.h']]],
['tjpf_5fbgrx_180',['TJPF_BGRX',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa2a1fbf569ca79897eae886e3376ca4c8',1,'turbojpeg.h']]], ['tjpf_5fbgrx_181',['TJPF_BGRX',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa2a1fbf569ca79897eae886e3376ca4c8',1,'turbojpeg.h']]],
['tjpf_5fcmyk_181',['TJPF_CMYK',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa7f5100ec44c91994e243f1cf55553f8b',1,'turbojpeg.h']]], ['tjpf_5fcmyk_182',['TJPF_CMYK',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa7f5100ec44c91994e243f1cf55553f8b',1,'turbojpeg.h']]],
['tjpf_5fgray_182',['TJPF_GRAY',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa5431b54b015337705f13118073711a1a',1,'turbojpeg.h']]], ['tjpf_5fgray_183',['TJPF_GRAY',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa5431b54b015337705f13118073711a1a',1,'turbojpeg.h']]],
['tjpf_5frgb_183',['TJPF_RGB',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa7ce93230bff449518ce387c17e6ed37c',1,'turbojpeg.h']]], ['tjpf_5frgb_184',['TJPF_RGB',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa7ce93230bff449518ce387c17e6ed37c',1,'turbojpeg.h']]],
['tjpf_5frgba_184',['TJPF_RGBA',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa88d2e88fab67f6503cf972e14851cc12',1,'turbojpeg.h']]], ['tjpf_5frgba_185',['TJPF_RGBA',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa88d2e88fab67f6503cf972e14851cc12',1,'turbojpeg.h']]],
['tjpf_5frgbx_185',['TJPF_RGBX',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa83973bebb7e2dc6fa8bae89ff3f42e01',1,'turbojpeg.h']]], ['tjpf_5frgbx_186',['TJPF_RGBX',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa83973bebb7e2dc6fa8bae89ff3f42e01',1,'turbojpeg.h']]],
['tjpf_5funknown_186',['TJPF_UNKNOWN',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa84c1a6cead7952998e2fb895844a21ed',1,'turbojpeg.h']]], ['tjpf_5funknown_187',['TJPF_UNKNOWN',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa84c1a6cead7952998e2fb895844a21ed',1,'turbojpeg.h']]],
['tjpf_5fxbgr_187',['TJPF_XBGR',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aaf6603b27147de47e212e75dac027b2af',1,'turbojpeg.h']]], ['tjpf_5fxbgr_188',['TJPF_XBGR',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aaf6603b27147de47e212e75dac027b2af',1,'turbojpeg.h']]],
['tjpf_5fxrgb_188',['TJPF_XRGB',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aadae996905efcfa3b42a0bb3bea7f9d84',1,'turbojpeg.h']]], ['tjpf_5fxrgb_189',['TJPF_XRGB',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aadae996905efcfa3b42a0bb3bea7f9d84',1,'turbojpeg.h']]],
['tjsamp_5f411_189',['TJSAMP_411',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a28ec62575e5ea295c3fde3001dc628e2',1,'turbojpeg.h']]], ['tjsamp_5f411_190',['TJSAMP_411',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a28ec62575e5ea295c3fde3001dc628e2',1,'turbojpeg.h']]],
['tjsamp_5f420_190',['TJSAMP_420',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a63085dbf683cfe39e513cdb6343e3737',1,'turbojpeg.h']]], ['tjsamp_5f420_191',['TJSAMP_420',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a63085dbf683cfe39e513cdb6343e3737',1,'turbojpeg.h']]],
['tjsamp_5f422_191',['TJSAMP_422',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a136130902cc578f11f32429b59368404',1,'turbojpeg.h']]], ['tjsamp_5f422_192',['TJSAMP_422',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a136130902cc578f11f32429b59368404',1,'turbojpeg.h']]],
['tjsamp_5f440_192',['TJSAMP_440',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074accf740e6f3aa6ba20ba922cad13cb974',1,'turbojpeg.h']]], ['tjsamp_5f440_193',['TJSAMP_440',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074accf740e6f3aa6ba20ba922cad13cb974',1,'turbojpeg.h']]],
['tjsamp_5f444_193',['TJSAMP_444',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074afb8da4f44197837bdec0a4f593dacae3',1,'turbojpeg.h']]], ['tjsamp_5f444_194',['TJSAMP_444',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074afb8da4f44197837bdec0a4f593dacae3',1,'turbojpeg.h']]],
['tjsamp_5fgray_194',['TJSAMP_GRAY',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a3f1c9504842ddc7a48d0f690754b6248',1,'turbojpeg.h']]], ['tjsamp_5fgray_195',['TJSAMP_GRAY',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a3f1c9504842ddc7a48d0f690754b6248',1,'turbojpeg.h']]],
['tjxop_5fhflip_195',['TJXOP_HFLIP',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866aa0df69776caa30f0fa28e26332d311ce',1,'turbojpeg.h']]], ['tjxop_5fhflip_196',['TJXOP_HFLIP',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866aa0df69776caa30f0fa28e26332d311ce',1,'turbojpeg.h']]],
['tjxop_5fnone_196',['TJXOP_NONE',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866aad88c0366cd3f7d0eac9d7a3fa1c2c27',1,'turbojpeg.h']]], ['tjxop_5fnone_197',['TJXOP_NONE',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866aad88c0366cd3f7d0eac9d7a3fa1c2c27',1,'turbojpeg.h']]],
['tjxop_5frot180_197',['TJXOP_ROT180',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a140952eb8dd0300accfcc22726d69692',1,'turbojpeg.h']]], ['tjxop_5frot180_198',['TJXOP_ROT180',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a140952eb8dd0300accfcc22726d69692',1,'turbojpeg.h']]],
['tjxop_5frot270_198',['TJXOP_ROT270',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a3064ee5dfb7f032df332818587567a08',1,'turbojpeg.h']]], ['tjxop_5frot270_199',['TJXOP_ROT270',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a3064ee5dfb7f032df332818587567a08',1,'turbojpeg.h']]],
['tjxop_5frot90_199',['TJXOP_ROT90',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a43b2bbb23bc4bd548422d43fbe9af128',1,'turbojpeg.h']]], ['tjxop_5frot90_200',['TJXOP_ROT90',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a43b2bbb23bc4bd548422d43fbe9af128',1,'turbojpeg.h']]],
['tjxop_5ftranspose_200',['TJXOP_TRANSPOSE',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a31060aed199f886afdd417f80499c32d',1,'turbojpeg.h']]], ['tjxop_5ftranspose_201',['TJXOP_TRANSPOSE',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a31060aed199f886afdd417f80499c32d',1,'turbojpeg.h']]],
['tjxop_5ftransverse_201',['TJXOP_TRANSVERSE',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866af3b14d488aea6ece9e5b3df73a74d6a4',1,'turbojpeg.h']]], ['tjxop_5ftransverse_202',['TJXOP_TRANSVERSE',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866af3b14d488aea6ece9e5b3df73a74d6a4',1,'turbojpeg.h']]],
['tjxop_5fvflip_202',['TJXOP_VFLIP',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a324eddfbec53b7e691f61e56929d0d5d',1,'turbojpeg.h']]] ['tjxop_5fvflip_203',['TJXOP_VFLIP',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a324eddfbec53b7e691f61e56929d0d5d',1,'turbojpeg.h']]]
]; ];

View File

@@ -1,31 +1,31 @@
var searchData= var searchData=
[ [
['tjalloc_116',['tjAlloc',['../group___turbo_j_p_e_g.html#gaec627dd4c5f30b7a775a7aea3bec5d83',1,'turbojpeg.h']]], ['tjalloc_117',['tjAlloc',['../group___turbo_j_p_e_g.html#gaec627dd4c5f30b7a775a7aea3bec5d83',1,'turbojpeg.h']]],
['tjbufsize_117',['tjBufSize',['../group___turbo_j_p_e_g.html#ga67ac12fee79073242cb216e07c9f1f90',1,'turbojpeg.h']]], ['tjbufsize_118',['tjBufSize',['../group___turbo_j_p_e_g.html#ga67ac12fee79073242cb216e07c9f1f90',1,'turbojpeg.h']]],
['tjbufsizeyuv2_118',['tjBufSizeYUV2',['../group___turbo_j_p_e_g.html#ga2be2b9969d4df9ecce9b05deed273194',1,'turbojpeg.h']]], ['tjbufsizeyuv2_119',['tjBufSizeYUV2',['../group___turbo_j_p_e_g.html#ga2be2b9969d4df9ecce9b05deed273194',1,'turbojpeg.h']]],
['tjcompress2_119',['tjCompress2',['../group___turbo_j_p_e_g.html#gafbdce0112fd78fd38efae841443a9bcf',1,'turbojpeg.h']]], ['tjcompress2_120',['tjCompress2',['../group___turbo_j_p_e_g.html#gafbdce0112fd78fd38efae841443a9bcf',1,'turbojpeg.h']]],
['tjcompressfromyuv_120',['tjCompressFromYUV',['../group___turbo_j_p_e_g.html#ga7622a459b79aa1007e005b58783f875b',1,'turbojpeg.h']]], ['tjcompressfromyuv_121',['tjCompressFromYUV',['../group___turbo_j_p_e_g.html#ga7622a459b79aa1007e005b58783f875b',1,'turbojpeg.h']]],
['tjcompressfromyuvplanes_121',['tjCompressFromYUVPlanes',['../group___turbo_j_p_e_g.html#ga29ec5dfbd2d84b8724e951d6fa0d5d9e',1,'turbojpeg.h']]], ['tjcompressfromyuvplanes_122',['tjCompressFromYUVPlanes',['../group___turbo_j_p_e_g.html#ga29ec5dfbd2d84b8724e951d6fa0d5d9e',1,'turbojpeg.h']]],
['tjdecodeyuv_122',['tjDecodeYUV',['../group___turbo_j_p_e_g.html#ga70abbf38f77a26fd6da8813bef96f695',1,'turbojpeg.h']]], ['tjdecodeyuv_123',['tjDecodeYUV',['../group___turbo_j_p_e_g.html#ga70abbf38f77a26fd6da8813bef96f695',1,'turbojpeg.h']]],
['tjdecodeyuvplanes_123',['tjDecodeYUVPlanes',['../group___turbo_j_p_e_g.html#ga10e837c07fa9d25770565b237d3898d9',1,'turbojpeg.h']]], ['tjdecodeyuvplanes_124',['tjDecodeYUVPlanes',['../group___turbo_j_p_e_g.html#ga10e837c07fa9d25770565b237d3898d9',1,'turbojpeg.h']]],
['tjdecompress2_124',['tjDecompress2',['../group___turbo_j_p_e_g.html#gae9eccef8b682a48f43a9117c231ed013',1,'turbojpeg.h']]], ['tjdecompress2_125',['tjDecompress2',['../group___turbo_j_p_e_g.html#gae9eccef8b682a48f43a9117c231ed013',1,'turbojpeg.h']]],
['tjdecompressheader3_125',['tjDecompressHeader3',['../group___turbo_j_p_e_g.html#ga0595681096bba7199cc6f3533cb25f77',1,'turbojpeg.h']]], ['tjdecompressheader3_126',['tjDecompressHeader3',['../group___turbo_j_p_e_g.html#ga0595681096bba7199cc6f3533cb25f77',1,'turbojpeg.h']]],
['tjdecompresstoyuv2_126',['tjDecompressToYUV2',['../group___turbo_j_p_e_g.html#ga04d1e839ff9a0860dd1475cff78d3364',1,'turbojpeg.h']]], ['tjdecompresstoyuv2_127',['tjDecompressToYUV2',['../group___turbo_j_p_e_g.html#ga04d1e839ff9a0860dd1475cff78d3364',1,'turbojpeg.h']]],
['tjdecompresstoyuvplanes_127',['tjDecompressToYUVPlanes',['../group___turbo_j_p_e_g.html#gaa59f901a5258ada5bd0185ad59368540',1,'turbojpeg.h']]], ['tjdecompresstoyuvplanes_128',['tjDecompressToYUVPlanes',['../group___turbo_j_p_e_g.html#gaa59f901a5258ada5bd0185ad59368540',1,'turbojpeg.h']]],
['tjdestroy_128',['tjDestroy',['../group___turbo_j_p_e_g.html#ga75f355fa27225ba1a4ee392c852394d2',1,'turbojpeg.h']]], ['tjdestroy_129',['tjDestroy',['../group___turbo_j_p_e_g.html#ga75f355fa27225ba1a4ee392c852394d2',1,'turbojpeg.h']]],
['tjencodeyuv3_129',['tjEncodeYUV3',['../group___turbo_j_p_e_g.html#gac519b922cdf446e97d0cdcba513636bf',1,'turbojpeg.h']]], ['tjencodeyuv3_130',['tjEncodeYUV3',['../group___turbo_j_p_e_g.html#gac519b922cdf446e97d0cdcba513636bf',1,'turbojpeg.h']]],
['tjencodeyuvplanes_130',['tjEncodeYUVPlanes',['../group___turbo_j_p_e_g.html#gae2d04c72457fe7f4d60cf78ab1b1feb1',1,'turbojpeg.h']]], ['tjencodeyuvplanes_131',['tjEncodeYUVPlanes',['../group___turbo_j_p_e_g.html#gae2d04c72457fe7f4d60cf78ab1b1feb1',1,'turbojpeg.h']]],
['tjfree_131',['tjFree',['../group___turbo_j_p_e_g.html#gaea863d2da0cdb609563aabdf9196514b',1,'turbojpeg.h']]], ['tjfree_132',['tjFree',['../group___turbo_j_p_e_g.html#gaea863d2da0cdb609563aabdf9196514b',1,'turbojpeg.h']]],
['tjgeterrorcode_132',['tjGetErrorCode',['../group___turbo_j_p_e_g.html#ga414feeffbf860ebd31c745df203de410',1,'turbojpeg.h']]], ['tjgeterrorcode_133',['tjGetErrorCode',['../group___turbo_j_p_e_g.html#ga414feeffbf860ebd31c745df203de410',1,'turbojpeg.h']]],
['tjgeterrorstr2_133',['tjGetErrorStr2',['../group___turbo_j_p_e_g.html#ga1ead8574f9f39fbafc6b497124e7aafa',1,'turbojpeg.h']]], ['tjgeterrorstr2_134',['tjGetErrorStr2',['../group___turbo_j_p_e_g.html#ga1ead8574f9f39fbafc6b497124e7aafa',1,'turbojpeg.h']]],
['tjgetscalingfactors_134',['tjGetScalingFactors',['../group___turbo_j_p_e_g.html#gac3854476006b10787bd128f7ede48057',1,'turbojpeg.h']]], ['tjgetscalingfactors_135',['tjGetScalingFactors',['../group___turbo_j_p_e_g.html#gac3854476006b10787bd128f7ede48057',1,'turbojpeg.h']]],
['tjinitcompress_135',['tjInitCompress',['../group___turbo_j_p_e_g.html#ga9d63a05fc6d813f4aae06107041a37e8',1,'turbojpeg.h']]], ['tjinitcompress_136',['tjInitCompress',['../group___turbo_j_p_e_g.html#ga9d63a05fc6d813f4aae06107041a37e8',1,'turbojpeg.h']]],
['tjinitdecompress_136',['tjInitDecompress',['../group___turbo_j_p_e_g.html#ga52300eac3f3d9ef4bab303bc244f62d3',1,'turbojpeg.h']]], ['tjinitdecompress_137',['tjInitDecompress',['../group___turbo_j_p_e_g.html#ga52300eac3f3d9ef4bab303bc244f62d3',1,'turbojpeg.h']]],
['tjinittransform_137',['tjInitTransform',['../group___turbo_j_p_e_g.html#ga928beff6ac248ceadf01089fc6b41957',1,'turbojpeg.h']]], ['tjinittransform_138',['tjInitTransform',['../group___turbo_j_p_e_g.html#ga928beff6ac248ceadf01089fc6b41957',1,'turbojpeg.h']]],
['tjloadimage_138',['tjLoadImage',['../group___turbo_j_p_e_g.html#gaffbd83c375e79f5db4b5c5d8ad4466e7',1,'turbojpeg.h']]], ['tjloadimage_139',['tjLoadImage',['../group___turbo_j_p_e_g.html#gaffbd83c375e79f5db4b5c5d8ad4466e7',1,'turbojpeg.h']]],
['tjplaneheight_139',['tjPlaneHeight',['../group___turbo_j_p_e_g.html#ga1a209696c6a80748f20e134b3c64789f',1,'turbojpeg.h']]], ['tjplaneheight_140',['tjPlaneHeight',['../group___turbo_j_p_e_g.html#ga1a209696c6a80748f20e134b3c64789f',1,'turbojpeg.h']]],
['tjplanesizeyuv_140',['tjPlaneSizeYUV',['../group___turbo_j_p_e_g.html#gab4ab7b24f6e797d79abaaa670373961d',1,'turbojpeg.h']]], ['tjplanesizeyuv_141',['tjPlaneSizeYUV',['../group___turbo_j_p_e_g.html#gab4ab7b24f6e797d79abaaa670373961d',1,'turbojpeg.h']]],
['tjplanewidth_141',['tjPlaneWidth',['../group___turbo_j_p_e_g.html#ga63fb66bb1e36c74008c4634360becbb1',1,'turbojpeg.h']]], ['tjplanewidth_142',['tjPlaneWidth',['../group___turbo_j_p_e_g.html#ga63fb66bb1e36c74008c4634360becbb1',1,'turbojpeg.h']]],
['tjsaveimage_142',['tjSaveImage',['../group___turbo_j_p_e_g.html#ga6f445b22d8933ae4815b3370a538d879',1,'turbojpeg.h']]], ['tjsaveimage_143',['tjSaveImage',['../group___turbo_j_p_e_g.html#ga6f445b22d8933ae4815b3370a538d879',1,'turbojpeg.h']]],
['tjtransform_143',['tjTransform',['../group___turbo_j_p_e_g.html#ga9cb8abf4cc91881e04a0329b2270be25',1,'turbojpeg.h']]] ['tjtransform_144',['tjTransform',['../group___turbo_j_p_e_g.html#ga9cb8abf4cc91881e04a0329b2270be25',1,'turbojpeg.h']]]
]; ];

View File

@@ -1,4 +1,4 @@
var searchData= var searchData=
[ [
['turbojpeg_203',['TurboJPEG',['../group___turbo_j_p_e_g.html',1,'']]] ['turbojpeg_204',['TurboJPEG',['../group___turbo_j_p_e_g.html',1,'']]]
]; ];

View File

@@ -1,5 +1,5 @@
var searchData= var searchData=
[ [
['tjhandle_162',['tjhandle',['../group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763',1,'turbojpeg.h']]], ['tjhandle_163',['tjhandle',['../group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763',1,'turbojpeg.h']]],
['tjtransform_163',['tjtransform',['../group___turbo_j_p_e_g.html#ga504805ec0161f1b505397ca0118bf8fd',1,'turbojpeg.h']]] ['tjtransform_164',['tjtransform',['../group___turbo_j_p_e_g.html#ga504805ec0161f1b505397ca0118bf8fd',1,'turbojpeg.h']]]
]; ];

View File

@@ -1,4 +1,4 @@
var searchData= var searchData=
[ [
['customfilter_144',['customFilter',['../structtjtransform.html#afd7fc262df33f741e120ef4183202ef5',1,'tjtransform']]] ['customfilter_145',['customFilter',['../structtjtransform.html#afd7fc262df33f741e120ef4183202ef5',1,'tjtransform']]]
]; ];

View File

@@ -1,5 +1,5 @@
var searchData= var searchData=
[ [
['data_145',['data',['../structtjtransform.html#a688fe8f1a8ecc12a538d9e561cf338e3',1,'tjtransform']]], ['data_146',['data',['../structtjtransform.html#a688fe8f1a8ecc12a538d9e561cf338e3',1,'tjtransform']]],
['denom_146',['denom',['../structtjscalingfactor.html#aefbcdf3e9e62274b2d312c695f133ce3',1,'tjscalingfactor']]] ['denom_147',['denom',['../structtjscalingfactor.html#aefbcdf3e9e62274b2d312c695f133ce3',1,'tjscalingfactor']]]
]; ];

View File

@@ -1,4 +1,4 @@
var searchData= var searchData=
[ [
['h_147',['h',['../structtjregion.html#aecefc45a26f4d8b60dd4d825c1710115',1,'tjregion']]] ['h_148',['h',['../structtjregion.html#aecefc45a26f4d8b60dd4d825c1710115',1,'tjregion']]]
]; ];

View File

@@ -1,4 +1,4 @@
var searchData= var searchData=
[ [
['num_148',['num',['../structtjscalingfactor.html#a9b011e57f981ee23083e2c1aa5e640ec',1,'tjscalingfactor']]] ['num_149',['num',['../structtjscalingfactor.html#a9b011e57f981ee23083e2c1aa5e640ec',1,'tjscalingfactor']]]
]; ];

View File

@@ -1,5 +1,5 @@
var searchData= var searchData=
[ [
['op_149',['op',['../structtjtransform.html#a2525aab4ba6978a1c273f74fef50e498',1,'tjtransform']]], ['op_150',['op',['../structtjtransform.html#a2525aab4ba6978a1c273f74fef50e498',1,'tjtransform']]],
['options_150',['options',['../structtjtransform.html#ac0e74655baa4402209a21e1ae481c8f6',1,'tjtransform']]] ['options_151',['options',['../structtjtransform.html#ac0e74655baa4402209a21e1ae481c8f6',1,'tjtransform']]]
]; ];

View File

@@ -1,4 +1,4 @@
var searchData= var searchData=
[ [
['r_151',['r',['../structtjtransform.html#ac324e5e442abec8a961e5bf219db12cf',1,'tjtransform']]] ['r_152',['r',['../structtjtransform.html#ac324e5e442abec8a961e5bf219db12cf',1,'tjtransform']]]
]; ];

View File

@@ -1,10 +1,10 @@
var searchData= var searchData=
[ [
['tjalphaoffset_152',['tjAlphaOffset',['../group___turbo_j_p_e_g.html#ga5af0ab065feefd526debf1e20c43e837',1,'turbojpeg.h']]], ['tjalphaoffset_153',['tjAlphaOffset',['../group___turbo_j_p_e_g.html#ga5af0ab065feefd526debf1e20c43e837',1,'turbojpeg.h']]],
['tjblueoffset_153',['tjBlueOffset',['../group___turbo_j_p_e_g.html#ga84e2e35d3f08025f976ec1ec53693dea',1,'turbojpeg.h']]], ['tjblueoffset_154',['tjBlueOffset',['../group___turbo_j_p_e_g.html#ga84e2e35d3f08025f976ec1ec53693dea',1,'turbojpeg.h']]],
['tjgreenoffset_154',['tjGreenOffset',['../group___turbo_j_p_e_g.html#ga82d6e35da441112a411da41923c0ba2f',1,'turbojpeg.h']]], ['tjgreenoffset_155',['tjGreenOffset',['../group___turbo_j_p_e_g.html#ga82d6e35da441112a411da41923c0ba2f',1,'turbojpeg.h']]],
['tjmcuheight_155',['tjMCUHeight',['../group___turbo_j_p_e_g.html#gabd247bb9fecb393eca57366feb8327bf',1,'turbojpeg.h']]], ['tjmcuheight_156',['tjMCUHeight',['../group___turbo_j_p_e_g.html#gabd247bb9fecb393eca57366feb8327bf',1,'turbojpeg.h']]],
['tjmcuwidth_156',['tjMCUWidth',['../group___turbo_j_p_e_g.html#ga9e61e7cd47a15a173283ba94e781308c',1,'turbojpeg.h']]], ['tjmcuwidth_157',['tjMCUWidth',['../group___turbo_j_p_e_g.html#ga9e61e7cd47a15a173283ba94e781308c',1,'turbojpeg.h']]],
['tjpixelsize_157',['tjPixelSize',['../group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c',1,'turbojpeg.h']]], ['tjpixelsize_158',['tjPixelSize',['../group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c',1,'turbojpeg.h']]],
['tjredoffset_158',['tjRedOffset',['../group___turbo_j_p_e_g.html#gadd9b446742ac8a3923f7992c7988fea8',1,'turbojpeg.h']]] ['tjredoffset_159',['tjRedOffset',['../group___turbo_j_p_e_g.html#gadd9b446742ac8a3923f7992c7988fea8',1,'turbojpeg.h']]]
]; ];

View File

@@ -1,4 +1,4 @@
var searchData= var searchData=
[ [
['w_159',['w',['../structtjregion.html#ab6eb73ceef584fc23c8c8097926dce42',1,'tjregion']]] ['w_160',['w',['../structtjregion.html#ab6eb73ceef584fc23c8c8097926dce42',1,'tjregion']]]
]; ];

View File

@@ -1,4 +1,4 @@
var searchData= var searchData=
[ [
['x_160',['x',['../structtjregion.html#a4b6a37a93997091b26a75831fa291ad9',1,'tjregion']]] ['x_161',['x',['../structtjregion.html#a4b6a37a93997091b26a75831fa291ad9',1,'tjregion']]]
]; ];

View File

@@ -1,4 +1,4 @@
var searchData= var searchData=
[ [
['y_161',['y',['../structtjregion.html#a7b3e0c24cfe87acc80e334cafdcf22c2',1,'tjregion']]] ['y_162',['y',['../structtjregion.html#a7b3e0c24cfe87acc80e334cafdcf22c2',1,'tjregion']]]
]; ];

View File

@@ -716,6 +716,11 @@ final class TJBench {
System.out.println("-arithmetic = Use arithmetic entropy coding in JPEG images generated by"); System.out.println("-arithmetic = Use arithmetic entropy coding in JPEG images generated by");
System.out.println(" compression and transform operations. (Can be combined with"); System.out.println(" compression and transform operations. (Can be combined with");
System.out.println(" -progressive.)"); System.out.println(" -progressive.)");
System.out.println("-lossless = Generate lossless JPEG images (implies -subsamp 444). When");
System.out.println(" generating lossless JPEG images, Quality is psv * 10 + Pt, where psv is");
System.out.println(" the predictor selection value (1-7) and Pt is the point transform (0-7).");
System.out.println(" A point transform value of 0 is necessary in order to create a fully");
System.out.println(" lossless JPEG image.");
System.out.println("-subsamp <s> = When testing JPEG compression, this option specifies the level"); System.out.println("-subsamp <s> = When testing JPEG compression, this option specifies the level");
System.out.println(" of chrominance subsampling to use (<s> = 444, 422, 440, 420, 411, or"); System.out.println(" of chrominance subsampling to use (<s> = 444, 422, 440, 420, 411, or");
System.out.println(" GRAY). The default is to test Grayscale, 4:2:0, 4:2:2, and 4:4:4 in"); System.out.println(" GRAY). The default is to test Grayscale, 4:2:0, 4:2:2, and 4:4:4 in");
@@ -822,6 +827,10 @@ final class TJBench {
} else if (argv[i].equalsIgnoreCase("-arithmetic")) { } else if (argv[i].equalsIgnoreCase("-arithmetic")) {
System.out.println("Using arithmetic entropy coding\n"); System.out.println("Using arithmetic entropy coding\n");
flags |= TJ.FLAG_ARITHMETIC; flags |= TJ.FLAG_ARITHMETIC;
} else if (argv[i].equalsIgnoreCase("-lossless")) {
System.out.println("Using lossless JPEG\n\n");
flags |= TJ.FLAG_LOSSLESS;
subsamp = TJ.SAMP_444;
} else if (argv[i].equalsIgnoreCase("-rgb")) } else if (argv[i].equalsIgnoreCase("-rgb"))
pf = TJ.PF_RGB; pf = TJ.PF_RGB;
else if (argv[i].equalsIgnoreCase("-rgbx")) else if (argv[i].equalsIgnoreCase("-rgbx"))

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (C)2011-2018 D. R. Commander. All Rights Reserved. * Copyright (C)2011-2018, 2022 D. R. Commander. All Rights Reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
@@ -51,6 +51,7 @@ final class TJUnitTest {
System.out.println("-yuv = test YUV encoding/decoding support"); System.out.println("-yuv = test YUV encoding/decoding support");
System.out.println("-noyuvpad = do not pad each line of each Y, U, and V plane to the nearest"); System.out.println("-noyuvpad = do not pad each line of each Y, U, and V plane to the nearest");
System.out.println(" 4-byte boundary"); System.out.println(" 4-byte boundary");
System.out.println("-lossless = test lossless JPEG compression/decompression");
System.out.println("-bi = test BufferedImage support\n"); System.out.println("-bi = test BufferedImage support\n");
System.exit(1); System.exit(1);
} }
@@ -92,6 +93,8 @@ final class TJUnitTest {
}; };
private static boolean doYUV = false; private static boolean doYUV = false;
private static boolean lossless = false;
private static int psv = 1;
private static int pad = 4; private static int pad = 4;
private static boolean bi = false; private static boolean bi = false;
@@ -269,7 +272,7 @@ final class TJUnitTest {
static void checkVal(int row, int col, int v, String vname, int cv) static void checkVal(int row, int col, int v, String vname, int cv)
throws Exception { throws Exception {
v = (v < 0) ? v + 256 : v; v = (v < 0) ? v + 256 : v;
if (v < cv - 1 || v > cv + 1) { if (v < cv - (lossless ? 0 : 1) || v > cv + (lossless ? 0 : 1)) {
throw new Exception("Comp. " + vname + " at " + row + "," + col + throw new Exception("Comp. " + vname + " at " + row + "," + col +
" should be " + cv + ", not " + v); " should be " + cv + ", not " + v);
} }
@@ -278,7 +281,7 @@ final class TJUnitTest {
static void checkVal0(int row, int col, int v, String vname) static void checkVal0(int row, int col, int v, String vname)
throws Exception { throws Exception {
v = (v < 0) ? v + 256 : v; v = (v < 0) ? v + 256 : v;
if (v > 1) { if (v > (lossless ? 0 : 1)) {
throw new Exception("Comp. " + vname + " at " + row + "," + col + throw new Exception("Comp. " + vname + " at " + row + "," + col +
" should be 0, not " + v); " should be 0, not " + v);
} }
@@ -287,7 +290,7 @@ final class TJUnitTest {
static void checkVal255(int row, int col, int v, String vname) static void checkVal255(int row, int col, int v, String vname)
throws Exception { throws Exception {
v = (v < 0) ? v + 256 : v; v = (v < 0) ? v + 256 : v;
if (v < 254) { if (v < 255 - (lossless ? 0 : 1)) {
throw new Exception("Comp. " + vname + " at " + row + "," + col + throw new Exception("Comp. " + vname + " at " + row + "," + col +
" should be 255, not " + v); " should be 255, not " + v);
} }
@@ -717,6 +720,8 @@ final class TJUnitTest {
} }
tjd.setSourceImage(jpegBuf, jpegSize); tjd.setSourceImage(jpegBuf, jpegSize);
if (lossless && subsamp != TJ.SAMP_444 && subsamp != TJ.SAMP_GRAY)
subsamp = TJ.SAMP_444;
if (tjd.getWidth() != w || tjd.getHeight() != h || if (tjd.getWidth() != w || tjd.getHeight() != h ||
tjd.getSubsamp() != subsamp) tjd.getSubsamp() != subsamp)
throw new Exception("Incorrect JPEG header"); throw new Exception("Incorrect JPEG header");
@@ -780,6 +785,14 @@ final class TJUnitTest {
int w, int h, int pf, String baseName, int subsamp, int w, int h, int pf, String baseName, int subsamp,
int flags) throws Exception { int flags) throws Exception {
int i; int i;
TJScalingFactor sf1 = new TJScalingFactor(1, 1);
if (lossless) {
decompTest(tjd, jpegBuf, jpegSize, w, h, pf, baseName, subsamp, flags,
sf1);
return;
}
TJScalingFactor[] sf = TJ.getScalingFactors(); TJScalingFactor[] sf = TJ.getScalingFactors();
for (i = 0; i < sf.length; i++) { for (i = 0; i < sf.length; i++) {
int num = sf[i].getNum(); int num = sf[i].getNum();
@@ -798,7 +811,7 @@ final class TJUnitTest {
throws Exception { throws Exception {
TJCompressor tjc = null; TJCompressor tjc = null;
TJDecompressor tjd = null; TJDecompressor tjd = null;
int size; int size, quality = 100;
byte[] dstBuf; byte[] dstBuf;
dstBuf = new byte[TJ.bufSize(w, h, subsamp)]; dstBuf = new byte[TJ.bufSize(w, h, subsamp)];
@@ -811,12 +824,16 @@ final class TJUnitTest {
if (pf < 0) continue; if (pf < 0) continue;
for (int i = 0; i < 2; i++) { for (int i = 0; i < 2; i++) {
int flags = 0; int flags = 0;
if (lossless) {
flags |= TJ.FLAG_LOSSLESS;
quality = (((psv++ - 1) % 7) + 1) * 10;
}
if (subsamp == TJ.SAMP_422 || subsamp == TJ.SAMP_420 || if (subsamp == TJ.SAMP_422 || subsamp == TJ.SAMP_420 ||
subsamp == TJ.SAMP_440 || subsamp == TJ.SAMP_411) subsamp == TJ.SAMP_440 || subsamp == TJ.SAMP_411)
flags |= TJ.FLAG_FASTUPSAMPLE; flags |= TJ.FLAG_FASTUPSAMPLE;
if (i == 1) if (i == 1)
flags |= TJ.FLAG_BOTTOMUP; flags |= TJ.FLAG_BOTTOMUP;
size = compTest(tjc, dstBuf, w, h, pf, baseName, subsamp, 100, size = compTest(tjc, dstBuf, w, h, pf, baseName, subsamp, quality,
flags); flags);
decompTest(tjd, dstBuf, size, w, h, pf, baseName, subsamp, flags); decompTest(tjd, dstBuf, size, w, h, pf, baseName, subsamp, flags);
if (pf >= TJ.PF_RGBX && pf <= TJ.PF_XRGB && !bi) { if (pf >= TJ.PF_RGBX && pf <= TJ.PF_XRGB && !bi) {
@@ -838,16 +855,22 @@ final class TJUnitTest {
} }
static void bufSizeTest() throws Exception { static void bufSizeTest() throws Exception {
int w, h, i, subsamp; int w, h, i, subsamp, flags = 0, quality = 100, numSamp = TJ.NUMSAMP;
byte[] srcBuf, dstBuf = null; byte[] srcBuf, dstBuf = null;
YUVImage dstImage = null; YUVImage dstImage = null;
TJCompressor tjc = null; TJCompressor tjc = null;
Random r = new Random(); Random r = new Random();
try { try {
if (lossless) {
flags |= TJ.FLAG_LOSSLESS;
quality = (((psv++ - 1) % 7) + 1) * 10;
numSamp = 1;
}
tjc = new TJCompressor(); tjc = new TJCompressor();
System.out.println("Buffer size regression test"); System.out.println("Buffer size regression test");
for (subsamp = 0; subsamp < TJ.NUMSAMP; subsamp++) { for (subsamp = 0; subsamp < numSamp; subsamp++) {
for (w = 1; w < 48; w++) { for (w = 1; w < 48; w++) {
int maxh = (w == 1) ? 2048 : 48; int maxh = (w == 1) ? 2048 : 48;
for (h = 1; h < maxh; h++) { for (h = 1; h < maxh; h++) {
@@ -863,11 +886,11 @@ final class TJUnitTest {
} }
tjc.setSourceImage(srcBuf, 0, 0, w, 0, h, TJ.PF_BGRX); tjc.setSourceImage(srcBuf, 0, 0, w, 0, h, TJ.PF_BGRX);
tjc.setSubsamp(subsamp); tjc.setSubsamp(subsamp);
tjc.setJPEGQuality(100); tjc.setJPEGQuality(quality);
if (doYUV) if (doYUV)
tjc.encodeYUV(dstImage, 0); tjc.encodeYUV(dstImage, 0);
else else
tjc.compress(dstBuf, 0); tjc.compress(dstBuf, flags);
srcBuf = new byte[h * w * 4]; srcBuf = new byte[h * w * 4];
if (doYUV) if (doYUV)
@@ -881,7 +904,7 @@ final class TJUnitTest {
if (doYUV) if (doYUV)
tjc.encodeYUV(dstImage, 0); tjc.encodeYUV(dstImage, 0);
else else
tjc.compress(dstBuf, 0); tjc.compress(dstBuf, flags);
} }
dstImage = null; dstImage = null;
dstBuf = null; dstBuf = null;
@@ -904,12 +927,16 @@ final class TJUnitTest {
doYUV = true; doYUV = true;
else if (argv[i].equalsIgnoreCase("-noyuvpad")) else if (argv[i].equalsIgnoreCase("-noyuvpad"))
pad = 1; pad = 1;
else if (argv[i].equalsIgnoreCase("-lossless"))
lossless = true;
else if (argv[i].equalsIgnoreCase("-bi")) { else if (argv[i].equalsIgnoreCase("-bi")) {
bi = true; bi = true;
testName = "javabitest"; testName = "javabitest";
} else } else
usage(); usage();
} }
if (lossless && doYUV)
throw new Exception("Lossless JPEG and YUV encoding/decoding are incompatible.");
if (doYUV) if (doYUV)
FORMATS_4BYTE[4] = -1; FORMATS_4BYTE[4] = -1;
doTest(35, 39, bi ? FORMATS_3BYTEBI : FORMATS_3BYTE, TJ.SAMP_444, doTest(35, 39, bi ? FORMATS_3BYTEBI : FORMATS_3BYTE, TJ.SAMP_444,
@@ -918,27 +945,31 @@ final class TJUnitTest {
testName); testName);
doTest(41, 35, bi ? FORMATS_3BYTEBI : FORMATS_3BYTE, TJ.SAMP_422, doTest(41, 35, bi ? FORMATS_3BYTEBI : FORMATS_3BYTE, TJ.SAMP_422,
testName); testName);
doTest(35, 39, bi ? FORMATS_4BYTEBI : FORMATS_4BYTE, TJ.SAMP_422, if (!lossless) {
testName); doTest(35, 39, bi ? FORMATS_4BYTEBI : FORMATS_4BYTE, TJ.SAMP_422,
doTest(39, 41, bi ? FORMATS_3BYTEBI : FORMATS_3BYTE, TJ.SAMP_420, testName);
testName); doTest(39, 41, bi ? FORMATS_3BYTEBI : FORMATS_3BYTE, TJ.SAMP_420,
doTest(41, 35, bi ? FORMATS_4BYTEBI : FORMATS_4BYTE, TJ.SAMP_420, testName);
testName); doTest(41, 35, bi ? FORMATS_4BYTEBI : FORMATS_4BYTE, TJ.SAMP_420,
doTest(35, 39, bi ? FORMATS_3BYTEBI : FORMATS_3BYTE, TJ.SAMP_440, testName);
testName); doTest(35, 39, bi ? FORMATS_3BYTEBI : FORMATS_3BYTE, TJ.SAMP_440,
doTest(39, 41, bi ? FORMATS_4BYTEBI : FORMATS_4BYTE, TJ.SAMP_440, testName);
testName); doTest(39, 41, bi ? FORMATS_4BYTEBI : FORMATS_4BYTE, TJ.SAMP_440,
doTest(41, 35, bi ? FORMATS_3BYTEBI : FORMATS_3BYTE, TJ.SAMP_411, testName);
testName); doTest(41, 35, bi ? FORMATS_3BYTEBI : FORMATS_3BYTE, TJ.SAMP_411,
doTest(35, 39, bi ? FORMATS_4BYTEBI : FORMATS_4BYTE, TJ.SAMP_411, testName);
testName); doTest(35, 39, bi ? FORMATS_4BYTEBI : FORMATS_4BYTE, TJ.SAMP_411,
testName);
}
doTest(39, 41, bi ? FORMATS_GRAYBI : FORMATS_GRAY, TJ.SAMP_GRAY, doTest(39, 41, bi ? FORMATS_GRAYBI : FORMATS_GRAY, TJ.SAMP_GRAY,
testName); testName);
doTest(41, 35, bi ? FORMATS_3BYTEBI : FORMATS_3BYTE, TJ.SAMP_GRAY, if (!lossless) {
testName); doTest(41, 35, bi ? FORMATS_3BYTEBI : FORMATS_3BYTE, TJ.SAMP_GRAY,
FORMATS_4BYTE[4] = -1; testName);
doTest(35, 39, bi ? FORMATS_4BYTEBI : FORMATS_4BYTE, TJ.SAMP_GRAY, FORMATS_4BYTE[4] = -1;
testName); doTest(35, 39, bi ? FORMATS_4BYTEBI : FORMATS_4BYTE, TJ.SAMP_GRAY,
testName);
}
if (!bi) if (!bi)
bufSizeTest(); bufSizeTest();
if (doYUV && !bi) { if (doYUV && !bi) {

View File

@@ -175,167 +175,174 @@
<td class="colLast"><code>32768</code></td> <td class="colLast"><code>32768</code></td>
</tr> </tr>
<tr class="rowColor"> <tr class="rowColor">
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.FLAG_LOSSLESS">
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_LOSSLESS">FLAG_LOSSLESS</a></code></td>
<td class="colLast"><code>131072</code></td>
</tr>
<tr class="altColor">
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.FLAG_PROGRESSIVE"> <td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.FLAG_PROGRESSIVE">
<!-- --> <!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td> </a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_PROGRESSIVE">FLAG_PROGRESSIVE</a></code></td> <td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_PROGRESSIVE">FLAG_PROGRESSIVE</a></code></td>
<td class="colLast"><code>16384</code></td> <td class="colLast"><code>16384</code></td>
</tr> </tr>
<tr class="altColor"> <tr class="rowColor">
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.FLAG_STOPONWARNING"> <td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.FLAG_STOPONWARNING">
<!-- --> <!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td> </a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_STOPONWARNING">FLAG_STOPONWARNING</a></code></td> <td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_STOPONWARNING">FLAG_STOPONWARNING</a></code></td>
<td class="colLast"><code>8192</code></td> <td class="colLast"><code>8192</code></td>
</tr> </tr>
<tr class="rowColor"> <tr class="altColor">
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.NUMCS"> <td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.NUMCS">
<!-- --> <!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td> </a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#NUMCS">NUMCS</a></code></td> <td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#NUMCS">NUMCS</a></code></td>
<td class="colLast"><code>5</code></td> <td class="colLast"><code>5</code></td>
</tr> </tr>
<tr class="altColor"> <tr class="rowColor">
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.NUMERR"> <td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.NUMERR">
<!-- --> <!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td> </a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#NUMERR">NUMERR</a></code></td> <td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#NUMERR">NUMERR</a></code></td>
<td class="colLast"><code>2</code></td> <td class="colLast"><code>2</code></td>
</tr> </tr>
<tr class="rowColor"> <tr class="altColor">
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.NUMPF"> <td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.NUMPF">
<!-- --> <!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td> </a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#NUMPF">NUMPF</a></code></td> <td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#NUMPF">NUMPF</a></code></td>
<td class="colLast"><code>12</code></td> <td class="colLast"><code>12</code></td>
</tr> </tr>
<tr class="altColor"> <tr class="rowColor">
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.NUMSAMP"> <td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.NUMSAMP">
<!-- --> <!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td> </a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#NUMSAMP">NUMSAMP</a></code></td> <td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#NUMSAMP">NUMSAMP</a></code></td>
<td class="colLast"><code>6</code></td> <td class="colLast"><code>6</code></td>
</tr> </tr>
<tr class="rowColor"> <tr class="altColor">
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_ABGR"> <td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_ABGR">
<!-- --> <!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td> </a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_ABGR">PF_ABGR</a></code></td> <td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_ABGR">PF_ABGR</a></code></td>
<td class="colLast"><code>9</code></td> <td class="colLast"><code>9</code></td>
</tr> </tr>
<tr class="altColor"> <tr class="rowColor">
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_ARGB"> <td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_ARGB">
<!-- --> <!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td> </a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_ARGB">PF_ARGB</a></code></td> <td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_ARGB">PF_ARGB</a></code></td>
<td class="colLast"><code>10</code></td> <td class="colLast"><code>10</code></td>
</tr> </tr>
<tr class="rowColor"> <tr class="altColor">
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_BGR"> <td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_BGR">
<!-- --> <!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td> </a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_BGR">PF_BGR</a></code></td> <td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_BGR">PF_BGR</a></code></td>
<td class="colLast"><code>1</code></td> <td class="colLast"><code>1</code></td>
</tr> </tr>
<tr class="altColor"> <tr class="rowColor">
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_BGRA"> <td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_BGRA">
<!-- --> <!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td> </a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_BGRA">PF_BGRA</a></code></td> <td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_BGRA">PF_BGRA</a></code></td>
<td class="colLast"><code>8</code></td> <td class="colLast"><code>8</code></td>
</tr> </tr>
<tr class="rowColor"> <tr class="altColor">
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_BGRX"> <td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_BGRX">
<!-- --> <!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td> </a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_BGRX">PF_BGRX</a></code></td> <td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_BGRX">PF_BGRX</a></code></td>
<td class="colLast"><code>3</code></td> <td class="colLast"><code>3</code></td>
</tr> </tr>
<tr class="altColor"> <tr class="rowColor">
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_CMYK"> <td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_CMYK">
<!-- --> <!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td> </a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_CMYK">PF_CMYK</a></code></td> <td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_CMYK">PF_CMYK</a></code></td>
<td class="colLast"><code>11</code></td> <td class="colLast"><code>11</code></td>
</tr> </tr>
<tr class="rowColor"> <tr class="altColor">
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_GRAY"> <td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_GRAY">
<!-- --> <!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td> </a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_GRAY">PF_GRAY</a></code></td> <td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_GRAY">PF_GRAY</a></code></td>
<td class="colLast"><code>6</code></td> <td class="colLast"><code>6</code></td>
</tr> </tr>
<tr class="altColor"> <tr class="rowColor">
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_RGB"> <td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_RGB">
<!-- --> <!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td> </a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_RGB">PF_RGB</a></code></td> <td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_RGB">PF_RGB</a></code></td>
<td class="colLast"><code>0</code></td> <td class="colLast"><code>0</code></td>
</tr> </tr>
<tr class="rowColor"> <tr class="altColor">
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_RGBA"> <td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_RGBA">
<!-- --> <!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td> </a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_RGBA">PF_RGBA</a></code></td> <td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_RGBA">PF_RGBA</a></code></td>
<td class="colLast"><code>7</code></td> <td class="colLast"><code>7</code></td>
</tr> </tr>
<tr class="altColor"> <tr class="rowColor">
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_RGBX"> <td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_RGBX">
<!-- --> <!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td> </a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_RGBX">PF_RGBX</a></code></td> <td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_RGBX">PF_RGBX</a></code></td>
<td class="colLast"><code>2</code></td> <td class="colLast"><code>2</code></td>
</tr> </tr>
<tr class="rowColor"> <tr class="altColor">
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_XBGR"> <td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_XBGR">
<!-- --> <!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td> </a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_XBGR">PF_XBGR</a></code></td> <td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_XBGR">PF_XBGR</a></code></td>
<td class="colLast"><code>4</code></td> <td class="colLast"><code>4</code></td>
</tr> </tr>
<tr class="altColor"> <tr class="rowColor">
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_XRGB"> <td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_XRGB">
<!-- --> <!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td> </a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_XRGB">PF_XRGB</a></code></td> <td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_XRGB">PF_XRGB</a></code></td>
<td class="colLast"><code>5</code></td> <td class="colLast"><code>5</code></td>
</tr> </tr>
<tr class="rowColor"> <tr class="altColor">
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.SAMP_411"> <td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.SAMP_411">
<!-- --> <!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td> </a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#SAMP_411">SAMP_411</a></code></td> <td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#SAMP_411">SAMP_411</a></code></td>
<td class="colLast"><code>5</code></td> <td class="colLast"><code>5</code></td>
</tr> </tr>
<tr class="altColor"> <tr class="rowColor">
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.SAMP_420"> <td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.SAMP_420">
<!-- --> <!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td> </a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#SAMP_420">SAMP_420</a></code></td> <td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#SAMP_420">SAMP_420</a></code></td>
<td class="colLast"><code>2</code></td> <td class="colLast"><code>2</code></td>
</tr> </tr>
<tr class="rowColor"> <tr class="altColor">
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.SAMP_422"> <td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.SAMP_422">
<!-- --> <!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td> </a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#SAMP_422">SAMP_422</a></code></td> <td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#SAMP_422">SAMP_422</a></code></td>
<td class="colLast"><code>1</code></td> <td class="colLast"><code>1</code></td>
</tr> </tr>
<tr class="altColor"> <tr class="rowColor">
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.SAMP_440"> <td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.SAMP_440">
<!-- --> <!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td> </a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#SAMP_440">SAMP_440</a></code></td> <td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#SAMP_440">SAMP_440</a></code></td>
<td class="colLast"><code>4</code></td> <td class="colLast"><code>4</code></td>
</tr> </tr>
<tr class="rowColor"> <tr class="altColor">
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.SAMP_444"> <td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.SAMP_444">
<!-- --> <!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td> </a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#SAMP_444">SAMP_444</a></code></td> <td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#SAMP_444">SAMP_444</a></code></td>
<td class="colLast"><code>0</code></td> <td class="colLast"><code>0</code></td>
</tr> </tr>
<tr class="altColor"> <tr class="rowColor">
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.SAMP_GRAY"> <td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.SAMP_GRAY">
<!-- --> <!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td> </a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>

View File

@@ -262,6 +262,10 @@
<div class="block">Limit the number of progressive JPEG scans that the decompression and <div class="block">Limit the number of progressive JPEG scans that the decompression and
transform operations will process.</div> transform operations will process.</div>
</dd> </dd>
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJ.html#FLAG_LOSSLESS">FLAG_LOSSLESS</a></span> - Static variable in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</a></dt>
<dd>
<div class="block">Generate a lossless JPEG image when compressing.</div>
</dd>
<dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJ.html#FLAG_PROGRESSIVE">FLAG_PROGRESSIVE</a></span> - Static variable in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</a></dt> <dt><span class="strong"><a href="./org/libjpegturbo/turbojpeg/TJ.html#FLAG_PROGRESSIVE">FLAG_PROGRESSIVE</a></span> - Static variable in class org.libjpegturbo.turbojpeg.<a href="./org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</a></dt>
<dd> <dd>
<div class="block">Use progressive entropy coding in JPEG images generated by compression and <div class="block">Use progressive entropy coding in JPEG images generated by compression and

View File

@@ -204,145 +204,151 @@ extends java.lang.Object</pre>
</tr> </tr>
<tr class="rowColor"> <tr class="rowColor">
<td class="colFirst"><code>static int</code></td> <td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_LOSSLESS">FLAG_LOSSLESS</a></strong></code>
<div class="block">Generate a lossless JPEG image when compressing.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_PROGRESSIVE">FLAG_PROGRESSIVE</a></strong></code> <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_PROGRESSIVE">FLAG_PROGRESSIVE</a></strong></code>
<div class="block">Use progressive entropy coding in JPEG images generated by compression and <div class="block">Use progressive entropy coding in JPEG images generated by compression and
transform operations.</div> transform operations.</div>
</td> </td>
</tr> </tr>
<tr class="altColor"> <tr class="rowColor">
<td class="colFirst"><code>static int</code></td> <td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_STOPONWARNING">FLAG_STOPONWARNING</a></strong></code> <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_STOPONWARNING">FLAG_STOPONWARNING</a></strong></code>
<div class="block">Immediately discontinue the current compression/decompression/transform <div class="block">Immediately discontinue the current compression/decompression/transform
operation if the underlying codec throws a warning (non-fatal error).</div> operation if the underlying codec throws a warning (non-fatal error).</div>
</td> </td>
</tr> </tr>
<tr class="rowColor"> <tr class="altColor">
<td class="colFirst"><code>static int</code></td> <td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#NUMCS">NUMCS</a></strong></code> <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#NUMCS">NUMCS</a></strong></code>
<div class="block">The number of JPEG colorspaces</div> <div class="block">The number of JPEG colorspaces</div>
</td> </td>
</tr> </tr>
<tr class="altColor"> <tr class="rowColor">
<td class="colFirst"><code>static int</code></td> <td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#NUMERR">NUMERR</a></strong></code> <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#NUMERR">NUMERR</a></strong></code>
<div class="block">The number of error codes</div> <div class="block">The number of error codes</div>
</td> </td>
</tr> </tr>
<tr class="rowColor"> <tr class="altColor">
<td class="colFirst"><code>static int</code></td> <td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#NUMPF">NUMPF</a></strong></code> <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#NUMPF">NUMPF</a></strong></code>
<div class="block">The number of pixel formats</div> <div class="block">The number of pixel formats</div>
</td> </td>
</tr> </tr>
<tr class="altColor"> <tr class="rowColor">
<td class="colFirst"><code>static int</code></td> <td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#NUMSAMP">NUMSAMP</a></strong></code> <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#NUMSAMP">NUMSAMP</a></strong></code>
<div class="block">The number of chrominance subsampling options</div> <div class="block">The number of chrominance subsampling options</div>
</td> </td>
</tr> </tr>
<tr class="rowColor"> <tr class="altColor">
<td class="colFirst"><code>static int</code></td> <td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_ABGR">PF_ABGR</a></strong></code> <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_ABGR">PF_ABGR</a></strong></code>
<div class="block">ABGR pixel format.</div> <div class="block">ABGR pixel format.</div>
</td> </td>
</tr> </tr>
<tr class="altColor"> <tr class="rowColor">
<td class="colFirst"><code>static int</code></td> <td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_ARGB">PF_ARGB</a></strong></code> <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_ARGB">PF_ARGB</a></strong></code>
<div class="block">ARGB pixel format.</div> <div class="block">ARGB pixel format.</div>
</td> </td>
</tr> </tr>
<tr class="rowColor"> <tr class="altColor">
<td class="colFirst"><code>static int</code></td> <td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_BGR">PF_BGR</a></strong></code> <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_BGR">PF_BGR</a></strong></code>
<div class="block">BGR pixel format.</div> <div class="block">BGR pixel format.</div>
</td> </td>
</tr> </tr>
<tr class="altColor"> <tr class="rowColor">
<td class="colFirst"><code>static int</code></td> <td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_BGRA">PF_BGRA</a></strong></code> <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_BGRA">PF_BGRA</a></strong></code>
<div class="block">BGRA pixel format.</div> <div class="block">BGRA pixel format.</div>
</td> </td>
</tr> </tr>
<tr class="rowColor"> <tr class="altColor">
<td class="colFirst"><code>static int</code></td> <td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_BGRX">PF_BGRX</a></strong></code> <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_BGRX">PF_BGRX</a></strong></code>
<div class="block">BGRX pixel format.</div> <div class="block">BGRX pixel format.</div>
</td> </td>
</tr> </tr>
<tr class="altColor"> <tr class="rowColor">
<td class="colFirst"><code>static int</code></td> <td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_CMYK">PF_CMYK</a></strong></code> <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_CMYK">PF_CMYK</a></strong></code>
<div class="block">CMYK pixel format.</div> <div class="block">CMYK pixel format.</div>
</td> </td>
</tr> </tr>
<tr class="rowColor"> <tr class="altColor">
<td class="colFirst"><code>static int</code></td> <td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_GRAY">PF_GRAY</a></strong></code> <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_GRAY">PF_GRAY</a></strong></code>
<div class="block">Grayscale pixel format.</div> <div class="block">Grayscale pixel format.</div>
</td> </td>
</tr> </tr>
<tr class="altColor"> <tr class="rowColor">
<td class="colFirst"><code>static int</code></td> <td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_RGB">PF_RGB</a></strong></code> <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_RGB">PF_RGB</a></strong></code>
<div class="block">RGB pixel format.</div> <div class="block">RGB pixel format.</div>
</td> </td>
</tr> </tr>
<tr class="rowColor"> <tr class="altColor">
<td class="colFirst"><code>static int</code></td> <td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_RGBA">PF_RGBA</a></strong></code> <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_RGBA">PF_RGBA</a></strong></code>
<div class="block">RGBA pixel format.</div> <div class="block">RGBA pixel format.</div>
</td> </td>
</tr> </tr>
<tr class="altColor"> <tr class="rowColor">
<td class="colFirst"><code>static int</code></td> <td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_RGBX">PF_RGBX</a></strong></code> <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_RGBX">PF_RGBX</a></strong></code>
<div class="block">RGBX pixel format.</div> <div class="block">RGBX pixel format.</div>
</td> </td>
</tr> </tr>
<tr class="rowColor"> <tr class="altColor">
<td class="colFirst"><code>static int</code></td> <td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_XBGR">PF_XBGR</a></strong></code> <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_XBGR">PF_XBGR</a></strong></code>
<div class="block">XBGR pixel format.</div> <div class="block">XBGR pixel format.</div>
</td> </td>
</tr> </tr>
<tr class="altColor"> <tr class="rowColor">
<td class="colFirst"><code>static int</code></td> <td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_XRGB">PF_XRGB</a></strong></code> <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#PF_XRGB">PF_XRGB</a></strong></code>
<div class="block">XRGB pixel format.</div> <div class="block">XRGB pixel format.</div>
</td> </td>
</tr> </tr>
<tr class="rowColor"> <tr class="altColor">
<td class="colFirst"><code>static int</code></td> <td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_411">SAMP_411</a></strong></code> <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_411">SAMP_411</a></strong></code>
<div class="block">4:1:1 chrominance subsampling.</div> <div class="block">4:1:1 chrominance subsampling.</div>
</td> </td>
</tr> </tr>
<tr class="altColor"> <tr class="rowColor">
<td class="colFirst"><code>static int</code></td> <td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_420">SAMP_420</a></strong></code> <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_420">SAMP_420</a></strong></code>
<div class="block">4:2:0 chrominance subsampling.</div> <div class="block">4:2:0 chrominance subsampling.</div>
</td> </td>
</tr> </tr>
<tr class="rowColor"> <tr class="altColor">
<td class="colFirst"><code>static int</code></td> <td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_422">SAMP_422</a></strong></code> <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_422">SAMP_422</a></strong></code>
<div class="block">4:2:2 chrominance subsampling.</div> <div class="block">4:2:2 chrominance subsampling.</div>
</td> </td>
</tr> </tr>
<tr class="altColor"> <tr class="rowColor">
<td class="colFirst"><code>static int</code></td> <td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_440">SAMP_440</a></strong></code> <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_440">SAMP_440</a></strong></code>
<div class="block">4:4:0 chrominance subsampling.</div> <div class="block">4:4:0 chrominance subsampling.</div>
</td> </td>
</tr> </tr>
<tr class="rowColor"> <tr class="altColor">
<td class="colFirst"><code>static int</code></td> <td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444">SAMP_444</a></strong></code> <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444">SAMP_444</a></strong></code>
<div class="block">4:4:4 chrominance subsampling (no chrominance subsampling).</div> <div class="block">4:4:4 chrominance subsampling (no chrominance subsampling).</div>
</td> </td>
</tr> </tr>
<tr class="altColor"> <tr class="rowColor">
<td class="colFirst"><code>static int</code></td> <td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_GRAY">SAMP_GRAY</a></strong></code> <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_GRAY">SAMP_GRAY</a></strong></code>
<div class="block">Grayscale.</div> <div class="block">Grayscale.</div>
@@ -978,6 +984,31 @@ extends java.lang.Object</pre>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_ARITHMETIC">Constant Field Values</a></dd></dl> <dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_ARITHMETIC">Constant Field Values</a></dd></dl>
</li> </li>
</ul> </ul>
<a name="FLAG_LOSSLESS">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FLAG_LOSSLESS</h4>
<pre>public static final&nbsp;int FLAG_LOSSLESS</pre>
<div class="block">Generate a lossless JPEG image when compressing. In most cases,
compressing and decompressing lossless JPEG images is considerably slower
than compressing and decompressing lossy JPEG images. Also note that the
following features are not available with lossless JPEG images:
<ul>
<li> Colorspace conversion
<li> Chrominance subsampling
<li> JPEG quality selection
<li> DCT/IDCT algorithm selection
<li> Progressive entropy coding
<li> Arithmetic entropy coding
<li> Compression from/decompression to YUV planar images
<li> Decompression scaling
<li> Lossless transformations
</ul></div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_LOSSLESS">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="NUMERR"> <a name="NUMERR">
<!-- --> <!-- -->
</a> </a>

View File

@@ -471,7 +471,14 @@ implements java.io.Closeable</pre>
<pre>public&nbsp;void&nbsp;setJPEGQuality(int&nbsp;quality)</pre> <pre>public&nbsp;void&nbsp;setJPEGQuality(int&nbsp;quality)</pre>
<div class="block">Set the JPEG image quality level for subsequent compress operations.</div> <div class="block">Set the JPEG image quality level for subsequent compress operations.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>quality</code> - the new JPEG image quality level (1 to 100, 1 = worst, <dl><dt><span class="strong">Parameters:</span></dt><dd><code>quality</code> - the new JPEG image quality level (1 to 100, 1 = worst,
100 = best)</dd></dl> 100 = best.) When generating a lossless JPEG image (see
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_LOSSLESS"><code>TJ.FLAG_LOSSLESS</code></a>), <code>quality</code> is
<code>psv * 10 + Pt</code>, where <code>psv</code> is the predictor
selection value (1-7) and <code>Pt</code> is the point transform (0-7). A
point transform value of 0 is necessary in order to create a fully
lossless JPEG image. (A non-zero point transform value right-shifts the
input samples by the specified number of bits, which is effectively a form
of lossy color quantization.)</dd></dl>
</li> </li>
</ul> </ul>
<a name="compress(byte[], int)"> <a name="compress(byte[], int)">

View File

@@ -377,7 +377,7 @@ public final class TJ {
* The uncompressed source/destination image is stored in bottom-up (Windows, * The uncompressed source/destination image is stored in bottom-up (Windows,
* OpenGL) order, not top-down (X11) order. * OpenGL) order, not top-down (X11) order.
*/ */
public static final int FLAG_BOTTOMUP = 2; public static final int FLAG_BOTTOMUP = (1 << 1);
/** /**
* When decompressing an image that was compressed using chrominance * When decompressing an image that was compressed using chrominance
@@ -386,7 +386,7 @@ public final class TJ {
* creates a smooth transition between neighboring chrominance components in * creates a smooth transition between neighboring chrominance components in
* order to reduce upsampling artifacts in the decompressed image. * order to reduce upsampling artifacts in the decompressed image.
*/ */
public static final int FLAG_FASTUPSAMPLE = 256; public static final int FLAG_FASTUPSAMPLE = (1 << 8);
/** /**
* Use the fastest DCT/IDCT algorithm available in the underlying codec. The * Use the fastest DCT/IDCT algorithm available in the underlying codec. The
* default if this flag is not specified is implementation-specific. For * default if this flag is not specified is implementation-specific. For
@@ -395,7 +395,7 @@ public final class TJ {
* only a very slight effect on accuracy, but it uses the accurate algorithm * only a very slight effect on accuracy, but it uses the accurate algorithm
* when decompressing, because this has been shown to have a larger effect. * when decompressing, because this has been shown to have a larger effect.
*/ */
public static final int FLAG_FASTDCT = 2048; public static final int FLAG_FASTDCT = (1 << 11);
/** /**
* Use the most accurate DCT/IDCT algorithm available in the underlying * Use the most accurate DCT/IDCT algorithm available in the underlying
* codec. The default if this flag is not specified is * codec. The default if this flag is not specified is
@@ -405,7 +405,7 @@ public final class TJ {
* but it uses the accurate algorithm when decompressing, because this has * but it uses the accurate algorithm when decompressing, because this has
* been shown to have a larger effect. * been shown to have a larger effect.
*/ */
public static final int FLAG_ACCURATEDCT = 4096; public static final int FLAG_ACCURATEDCT = (1 << 12);
/** /**
* Immediately discontinue the current compression/decompression/transform * Immediately discontinue the current compression/decompression/transform
* operation if the underlying codec throws a warning (non-fatal error). The * operation if the underlying codec throws a warning (non-fatal error). The
@@ -417,7 +417,7 @@ public final class TJ {
* with a void return type) will complete and leave the output image in a * with a void return type) will complete and leave the output image in a
* fully recoverable state after a non-fatal error occurs. * fully recoverable state after a non-fatal error occurs.
*/ */
public static final int FLAG_STOPONWARNING = 8192; public static final int FLAG_STOPONWARNING = (1 << 13);
/** /**
* Use progressive entropy coding in JPEG images generated by compression and * Use progressive entropy coding in JPEG images generated by compression and
* transform operations. Progressive entropy coding will generally improve * transform operations. Progressive entropy coding will generally improve
@@ -425,7 +425,7 @@ public final class TJ {
* reduce compression and decompression performance considerably. Can be * reduce compression and decompression performance considerably. Can be
* combined with {@link #FLAG_ARITHMETIC}. * combined with {@link #FLAG_ARITHMETIC}.
*/ */
public static final int FLAG_PROGRESSIVE = 16384; public static final int FLAG_PROGRESSIVE = (1 << 14);
/** /**
* Limit the number of progressive JPEG scans that the decompression and * Limit the number of progressive JPEG scans that the decompression and
* transform operations will process. If a progressive JPEG image contains * transform operations will process. If a progressive JPEG image contains
@@ -435,7 +435,7 @@ public final class TJ {
* against an exploit of the progressive JPEG format described in * against an exploit of the progressive JPEG format described in
* <a href="https://libjpeg-turbo.org/pmwiki/uploads/About/TwoIssueswiththeJPEGStandard.pdf" target="_blank">this report</a>. * <a href="https://libjpeg-turbo.org/pmwiki/uploads/About/TwoIssueswiththeJPEGStandard.pdf" target="_blank">this report</a>.
*/ */
public static final int FLAG_LIMITSCANS = 32768; public static final int FLAG_LIMITSCANS = (1 << 15);
/** /**
* Use arithmetic entropy coding in JPEG images generated by compression and * Use arithmetic entropy coding in JPEG images generated by compression and
* transform operations. Arithmetic entropy coding will generally improve * transform operations. Arithmetic entropy coding will generally improve
@@ -443,7 +443,25 @@ public final class TJ {
* reduce compression and decompression performance considerably. Can be * reduce compression and decompression performance considerably. Can be
* combined with {@link #FLAG_PROGRESSIVE}. * combined with {@link #FLAG_PROGRESSIVE}.
*/ */
public static final int FLAG_ARITHMETIC = 65536; public static final int FLAG_ARITHMETIC = (1 << 16);
/**
* Generate a lossless JPEG image when compressing. In most cases,
* compressing and decompressing lossless JPEG images is considerably slower
* than compressing and decompressing lossy JPEG images. Also note that the
* following features are not available with lossless JPEG images:
* <ul>
* <li> Colorspace conversion
* <li> Chrominance subsampling
* <li> JPEG quality selection
* <li> DCT/IDCT algorithm selection
* <li> Progressive entropy coding
* <li> Arithmetic entropy coding
* <li> Compression from/decompression to YUV planar images
* <li> Decompression scaling
* <li> Lossless transformations
* </ul>
*/
public static final int FLAG_LOSSLESS = (1 << 17);
/** /**
* The number of error codes * The number of error codes

View File

@@ -1,5 +1,6 @@
/* /*
* Copyright (C)2011-2015, 2018, 2020 D. R. Commander. All Rights Reserved. * Copyright (C)2011-2015, 2018, 2020, 2022 D. R. Commander.
* All Rights Reserved.
* Copyright (C)2015 Viktor Szathmáry. All Rights Reserved. * Copyright (C)2015 Viktor Szathmáry. All Rights Reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -283,7 +284,14 @@ public class TJCompressor implements Closeable {
* Set the JPEG image quality level for subsequent compress operations. * Set the JPEG image quality level for subsequent compress operations.
* *
* @param quality the new JPEG image quality level (1 to 100, 1 = worst, * @param quality the new JPEG image quality level (1 to 100, 1 = worst,
* 100 = best) * 100 = best.) When generating a lossless JPEG image (see
* {@link TJ#FLAG_LOSSLESS}), <code>quality</code> is
* <code>psv * 10 + Pt</code>, where <code>psv</code> is the predictor
* selection value (1-7) and <code>Pt</code> is the point transform (0-7). A
* point transform value of 0 is necessary in order to create a fully
* lossless JPEG image. (A non-zero point transform value right-shifts the
* input samples by the specified number of bits, which is effectively a form
* of lossy color quantization.)
*/ */
public void setJPEGQuality(int quality) { public void setJPEGQuality(int quality) {
if (quality < 1 || quality > 100) if (quality < 1 || quality > 100)

View File

@@ -103,21 +103,21 @@ public class TJTransform extends Rectangle {
* partial MCU blocks that cannot be transformed will be left in place, which * partial MCU blocks that cannot be transformed will be left in place, which
* will create odd-looking strips on the right or bottom edge of the image. * will create odd-looking strips on the right or bottom edge of the image.
*/ */
public static final int OPT_PERFECT = 1; public static final int OPT_PERFECT = (1 << 0);
/** /**
* This option will discard any partial MCU blocks that cannot be * This option will discard any partial MCU blocks that cannot be
* transformed. * transformed.
*/ */
public static final int OPT_TRIM = 2; public static final int OPT_TRIM = (1 << 1);
/** /**
* This option will enable lossless cropping. * This option will enable lossless cropping.
*/ */
public static final int OPT_CROP = 4; public static final int OPT_CROP = (1 << 2);
/** /**
* This option will discard the color data in the input image and produce * This option will discard the color data in the input image and produce
* a grayscale output image. * a grayscale output image.
*/ */
public static final int OPT_GRAY = 8; public static final int OPT_GRAY = (1 << 3);
/** /**
* This option will prevent {@link TJTransformer#transform * This option will prevent {@link TJTransformer#transform
* TJTransformer.transform()} from outputting a JPEG image for this * TJTransformer.transform()} from outputting a JPEG image for this
@@ -125,7 +125,7 @@ public class TJTransform extends Rectangle {
* filter to capture the transformed DCT coefficients without transcoding * filter to capture the transformed DCT coefficients without transcoding
* them. * them.
*/ */
public static final int OPT_NOOUTPUT = 16; public static final int OPT_NOOUTPUT = (1 << 4);
/** /**
* This option will enable progressive entropy coding in the output image * This option will enable progressive entropy coding in the output image
* generated by this particular transform. Progressive entropy coding will * generated by this particular transform. Progressive entropy coding will
@@ -133,13 +133,13 @@ public class TJTransform extends Rectangle {
* default), but it will reduce compression and decompression performance * default), but it will reduce compression and decompression performance
* considerably. Can be combined with {@link #OPT_ARITHMETIC}. * considerably. Can be combined with {@link #OPT_ARITHMETIC}.
*/ */
public static final int OPT_PROGRESSIVE = 32; public static final int OPT_PROGRESSIVE = (1 << 5);
/** /**
* This option will prevent {@link TJTransformer#transform * This option will prevent {@link TJTransformer#transform
* TJTransformer.transform()} from copying any extra markers (including EXIF * TJTransformer.transform()} from copying any extra markers (including EXIF
* and ICC profile data) from the source image to the output image. * and ICC profile data) from the source image to the output image.
*/ */
public static final int OPT_COPYNONE = 64; public static final int OPT_COPYNONE = (1 << 6);
/** /**
* This option will enable arithmetic entropy coding in the output image * This option will enable arithmetic entropy coding in the output image
* generated by this particular transform. Arithmetic entropy coding will * generated by this particular transform. Arithmetic entropy coding will
@@ -147,7 +147,7 @@ public class TJTransform extends Rectangle {
* default), but it will reduce compression and decompression performance * default), but it will reduce compression and decompression performance
* considerably. Can be combined with {@link #OPT_PROGRESSIVE}. * considerably. Can be combined with {@link #OPT_PROGRESSIVE}.
*/ */
public static final int OPT_ARITHMETIC = 128; public static final int OPT_ARITHMETIC = (1 << 7);
/** /**

View File

@@ -775,6 +775,11 @@ static void usage(char *progName)
printf("-arithmetic = Use arithmetic entropy coding in JPEG images generated by\n"); printf("-arithmetic = Use arithmetic entropy coding in JPEG images generated by\n");
printf(" compression and transform operations. (Can be combined with\n"); printf(" compression and transform operations. (Can be combined with\n");
printf(" -progressive.)\n"); printf(" -progressive.)\n");
printf("-lossless = Generate lossless JPEG images (implies -subsamp 444). When\n");
printf(" generating lossless JPEG images, Quality is psv * 10 + Pt, where psv is\n");
printf(" the predictor selection value (1-7) and Pt is the point transform (0-7).\n");
printf(" A point transform value of 0 is necessary in order to create a fully\n");
printf(" lossless JPEG image.\n");
printf("-subsamp <s> = When testing JPEG compression, this option specifies the level\n"); printf("-subsamp <s> = When testing JPEG compression, this option specifies the level\n");
printf(" of chrominance subsampling to use (<s> = 444, 422, 440, 420, 411, or\n"); printf(" of chrominance subsampling to use (<s> = 444, 422, 440, 420, 411, or\n");
printf(" GRAY). The default is to test Grayscale, 4:2:0, 4:2:2, and 4:4:4 in\n"); printf(" GRAY). The default is to test Grayscale, 4:2:0, 4:2:2, and 4:4:4 in\n");
@@ -874,6 +879,10 @@ int main(int argc, char *argv[])
} else if (!strcasecmp(argv[i], "-arithmetic")) { } else if (!strcasecmp(argv[i], "-arithmetic")) {
printf("Using arithmetic entropy coding\n\n"); printf("Using arithmetic entropy coding\n\n");
flags |= TJFLAG_ARITHMETIC; flags |= TJFLAG_ARITHMETIC;
} else if (!strcasecmp(argv[i], "-lossless")) {
printf("Using lossless JPEG\n\n");
flags |= TJFLAG_LOSSLESS;
subsamp = TJSAMP_444;
} else if (!strcasecmp(argv[i], "-rgb")) } else if (!strcasecmp(argv[i], "-rgb"))
pf = TJPF_RGB; pf = TJPF_RGB;
else if (!strcasecmp(argv[i], "-rgbx")) else if (!strcasecmp(argv[i], "-rgbx"))

View File

@@ -58,6 +58,7 @@ static void usage(char *progName)
printf("-yuv = test YUV encoding/decoding support\n"); printf("-yuv = test YUV encoding/decoding support\n");
printf("-noyuvpad = do not pad each line of each Y, U, and V plane to the nearest\n"); printf("-noyuvpad = do not pad each line of each Y, U, and V plane to the nearest\n");
printf(" 4-byte boundary\n"); printf(" 4-byte boundary\n");
printf("-lossless = test lossless JPEG compression/decompression\n");
printf("-alloc = test automatic buffer allocation\n"); printf("-alloc = test automatic buffer allocation\n");
printf("-bmp = tjLoadImage()/tjSaveImage() unit test\n\n"); printf("-bmp = tjLoadImage()/tjSaveImage() unit test\n\n");
exit(1); exit(1);
@@ -95,7 +96,7 @@ const int _4byteFormats[] = {
const int _onlyGray[] = { TJPF_GRAY }; const int _onlyGray[] = { TJPF_GRAY };
const int _onlyRGB[] = { TJPF_RGB }; const int _onlyRGB[] = { TJPF_RGB };
int doYUV = 0, alloc = 0, pad = 4; int doYUV = 0, lossless = 0, alloc = 0, pad = 4, psv = 1;
int exitStatus = 0; int exitStatus = 0;
#define BAILOUT() { exitStatus = -1; goto bailout; } #define BAILOUT() { exitStatus = -1; goto bailout; }
@@ -157,7 +158,7 @@ static void initBuf(unsigned char *buf, int w, int h, int pf, int flags)
#define CHECKVAL(v, cv) { \ #define CHECKVAL(v, cv) { \
if (v < cv - 1 || v > cv + 1) { \ if (v < cv - (1 - lossless) || v > cv + (1 - lossless)) { \
printf("\nComp. %s at %d,%d should be %d, not %d\n", #v, row, col, cv, \ printf("\nComp. %s at %d,%d should be %d, not %d\n", #v, row, col, cv, \
v); \ v); \
retval = 0; exitStatus = -1; goto bailout; \ retval = 0; exitStatus = -1; goto bailout; \
@@ -165,14 +166,14 @@ static void initBuf(unsigned char *buf, int w, int h, int pf, int flags)
} }
#define CHECKVAL0(v) { \ #define CHECKVAL0(v) { \
if (v > 1) { \ if (v > (1 - lossless)) { \
printf("\nComp. %s at %d,%d should be 0, not %d\n", #v, row, col, v); \ printf("\nComp. %s at %d,%d should be 0, not %d\n", #v, row, col, v); \
retval = 0; exitStatus = -1; goto bailout; \ retval = 0; exitStatus = -1; goto bailout; \
} \ } \
} }
#define CHECKVAL255(v) { \ #define CHECKVAL255(v) { \
if (v < 254) { \ if (v < 255 - (1 - lossless)) { \
printf("\nComp. %s at %d,%d should be 255, not %d\n", #v, row, col, v); \ printf("\nComp. %s at %d,%d should be 255, not %d\n", #v, row, col, v); \
retval = 0; exitStatus = -1; goto bailout; \ retval = 0; exitStatus = -1; goto bailout; \
} \ } \
@@ -433,6 +434,8 @@ static void _decompTest(tjhandle handle, unsigned char *jpegBuf,
TRY_TJ(tjDecompressHeader2(handle, jpegBuf, jpegSize, &_hdrw, &_hdrh, TRY_TJ(tjDecompressHeader2(handle, jpegBuf, jpegSize, &_hdrw, &_hdrh,
&_hdrsubsamp)); &_hdrsubsamp));
if (lossless && subsamp != TJSAMP_444 && subsamp != TJSAMP_GRAY)
subsamp = TJSAMP_444;
if (_hdrw != w || _hdrh != h || _hdrsubsamp != subsamp) if (_hdrw != w || _hdrh != h || _hdrsubsamp != subsamp)
THROW("Incorrect JPEG header"); THROW("Incorrect JPEG header");
@@ -493,8 +496,15 @@ static void decompTest(tjhandle handle, unsigned char *jpegBuf,
char *basename, int subsamp, int flags) char *basename, int subsamp, int flags)
{ {
int i, n = 0; int i, n = 0;
tjscalingfactor *sf = tjGetScalingFactors(&n); tjscalingfactor *sf = NULL, sf1 = { 1, 1 };
if (lossless) {
_decompTest(handle, jpegBuf, jpegSize, w, h, pf, basename, subsamp, flags,
sf1);
return;
}
sf = tjGetScalingFactors(&n);
if (!sf || !n) THROW_TJ(); if (!sf || !n) THROW_TJ();
for (i = 0; i < n; i++) { for (i = 0; i < n; i++) {
@@ -518,7 +528,7 @@ static void doTest(int w, int h, const int *formats, int nformats, int subsamp,
tjhandle chandle = NULL, dhandle = NULL; tjhandle chandle = NULL, dhandle = NULL;
unsigned char *dstBuf = NULL; unsigned char *dstBuf = NULL;
unsigned long size = 0; unsigned long size = 0;
int pfi, pf, i; int pfi, pf, i, quality = 100;
if (!alloc) if (!alloc)
size = tjBufSize(w, h, subsamp); size = tjBufSize(w, h, subsamp);
@@ -534,12 +544,16 @@ static void doTest(int w, int h, const int *formats, int nformats, int subsamp,
for (i = 0; i < 2; i++) { for (i = 0; i < 2; i++) {
int flags = 0; int flags = 0;
if (lossless) {
flags |= TJFLAG_LOSSLESS;
quality = (((psv++ - 1) % 7) + 1) * 10;
}
if (subsamp == TJSAMP_422 || subsamp == TJSAMP_420 || if (subsamp == TJSAMP_422 || subsamp == TJSAMP_420 ||
subsamp == TJSAMP_440 || subsamp == TJSAMP_411) subsamp == TJSAMP_440 || subsamp == TJSAMP_411)
flags |= TJFLAG_FASTUPSAMPLE; flags |= TJFLAG_FASTUPSAMPLE;
if (i == 1) flags |= TJFLAG_BOTTOMUP; if (i == 1) flags |= TJFLAG_BOTTOMUP;
pf = formats[pfi]; pf = formats[pfi];
compTest(chandle, &dstBuf, &size, w, h, pf, basename, subsamp, 100, compTest(chandle, &dstBuf, &size, w, h, pf, basename, subsamp, quality,
flags); flags);
decompTest(dhandle, dstBuf, size, w, h, pf, basename, subsamp, flags); decompTest(dhandle, dstBuf, size, w, h, pf, basename, subsamp, flags);
if (pf >= TJPF_RGBX && pf <= TJPF_XRGB) { if (pf >= TJPF_RGBX && pf <= TJPF_XRGB) {
@@ -601,11 +615,19 @@ static void bufSizeTest(void)
unsigned char *srcBuf = NULL, *dstBuf = NULL; unsigned char *srcBuf = NULL, *dstBuf = NULL;
tjhandle handle = NULL; tjhandle handle = NULL;
unsigned long dstSize = 0; unsigned long dstSize = 0;
int flags = 0, quality = 100, numSamp = TJ_NUMSAMP;
if (!alloc) flags |= TJFLAG_NOREALLOC;
if (lossless) {
flags |= TJFLAG_LOSSLESS;
quality = (((psv++ - 1) % 7) + 1) * 10;
numSamp = 1;
}
if ((handle = tjInitCompress()) == NULL) THROW_TJ(); if ((handle = tjInitCompress()) == NULL) THROW_TJ();
printf("Buffer size regression test\n"); printf("Buffer size regression test\n");
for (subsamp = 0; subsamp < TJ_NUMSAMP; subsamp++) { for (subsamp = 0; subsamp < numSamp; subsamp++) {
for (w = 1; w < 48; w++) { for (w = 1; w < 48; w++) {
int maxh = (w == 1) ? 2048 : 48; int maxh = (w == 1) ? 2048 : 48;
@@ -630,8 +652,7 @@ static void bufSizeTest(void)
subsamp, 0)); subsamp, 0));
} else { } else {
TRY_TJ(tjCompress2(handle, srcBuf, w, 0, h, TJPF_BGRX, &dstBuf, TRY_TJ(tjCompress2(handle, srcBuf, w, 0, h, TJPF_BGRX, &dstBuf,
&dstSize, subsamp, 100, &dstSize, subsamp, quality, flags));
alloc ? 0 : TJFLAG_NOREALLOC));
} }
free(srcBuf); srcBuf = NULL; free(srcBuf); srcBuf = NULL;
if (!alloc || doYUV) { if (!alloc || doYUV) {
@@ -657,8 +678,7 @@ static void bufSizeTest(void)
subsamp, 0)); subsamp, 0));
} else { } else {
TRY_TJ(tjCompress2(handle, srcBuf, h, 0, w, TJPF_BGRX, &dstBuf, TRY_TJ(tjCompress2(handle, srcBuf, h, 0, w, TJPF_BGRX, &dstBuf,
&dstSize, subsamp, 100, &dstSize, subsamp, quality, flags));
alloc ? 0 : TJFLAG_NOREALLOC));
} }
free(srcBuf); srcBuf = NULL; free(srcBuf); srcBuf = NULL;
if (!alloc || doYUV) { if (!alloc || doYUV) {
@@ -899,27 +919,34 @@ int main(int argc, char *argv[])
for (i = 1; i < argc; i++) { for (i = 1; i < argc; i++) {
if (!strcasecmp(argv[i], "-yuv")) doYUV = 1; if (!strcasecmp(argv[i], "-yuv")) doYUV = 1;
else if (!strcasecmp(argv[i], "-noyuvpad")) pad = 1; else if (!strcasecmp(argv[i], "-noyuvpad")) pad = 1;
else if (!strcasecmp(argv[i], "-lossless")) lossless = 1;
else if (!strcasecmp(argv[i], "-alloc")) alloc = 1; else if (!strcasecmp(argv[i], "-alloc")) alloc = 1;
else if (!strcasecmp(argv[i], "-bmp")) return bmpTest(); else if (!strcasecmp(argv[i], "-bmp")) return bmpTest();
else usage(argv[0]); else usage(argv[0]);
} }
} }
if (lossless && doYUV)
THROW("Lossless JPEG and YUV encoding/decoding are incompatible.");
if (alloc) printf("Testing automatic buffer allocation\n"); if (alloc) printf("Testing automatic buffer allocation\n");
if (doYUV) num4bf = 4; if (doYUV) num4bf = 4;
overflowTest(); overflowTest();
doTest(35, 39, _3byteFormats, 2, TJSAMP_444, "test"); doTest(35, 39, _3byteFormats, 2, TJSAMP_444, "test");
doTest(39, 41, _4byteFormats, num4bf, TJSAMP_444, "test"); doTest(39, 41, _4byteFormats, num4bf, TJSAMP_444, "test");
doTest(41, 35, _3byteFormats, 2, TJSAMP_422, "test"); doTest(41, 35, _3byteFormats, 2, TJSAMP_422, "test");
doTest(35, 39, _4byteFormats, num4bf, TJSAMP_422, "test"); if (!lossless) {
doTest(39, 41, _3byteFormats, 2, TJSAMP_420, "test"); doTest(35, 39, _4byteFormats, num4bf, TJSAMP_422, "test");
doTest(41, 35, _4byteFormats, num4bf, TJSAMP_420, "test"); doTest(39, 41, _3byteFormats, 2, TJSAMP_420, "test");
doTest(35, 39, _3byteFormats, 2, TJSAMP_440, "test"); doTest(41, 35, _4byteFormats, num4bf, TJSAMP_420, "test");
doTest(39, 41, _4byteFormats, num4bf, TJSAMP_440, "test"); doTest(35, 39, _3byteFormats, 2, TJSAMP_440, "test");
doTest(41, 35, _3byteFormats, 2, TJSAMP_411, "test"); doTest(39, 41, _4byteFormats, num4bf, TJSAMP_440, "test");
doTest(35, 39, _4byteFormats, num4bf, TJSAMP_411, "test"); doTest(41, 35, _3byteFormats, 2, TJSAMP_411, "test");
doTest(35, 39, _4byteFormats, num4bf, TJSAMP_411, "test");
}
doTest(39, 41, _onlyGray, 1, TJSAMP_GRAY, "test"); doTest(39, 41, _onlyGray, 1, TJSAMP_GRAY, "test");
doTest(41, 35, _3byteFormats, 2, TJSAMP_GRAY, "test"); if (!lossless) {
doTest(35, 39, _4byteFormats, 4, TJSAMP_GRAY, "test"); doTest(41, 35, _3byteFormats, 2, TJSAMP_GRAY, "test");
doTest(35, 39, _4byteFormats, 4, TJSAMP_GRAY, "test");
}
bufSizeTest(); bufSizeTest();
if (doYUV) { if (doYUV) {
printf("\n--------------------\n\n"); printf("\n--------------------\n\n");
@@ -932,5 +959,6 @@ int main(int argc, char *argv[])
doTest(48, 48, _onlyGray, 1, TJSAMP_GRAY, "test_yuv0"); doTest(48, 48, _onlyGray, 1, TJSAMP_GRAY, "test_yuv0");
} }
bailout:
return exitStatus; return exitStatus;
} }

View File

@@ -272,13 +272,14 @@ static int getPixelFormat(int pixelSize, int flags)
return -1; return -1;
} }
static void setCompDefaults(struct jpeg_compress_struct *cinfo, static int setCompDefaults(tjhandle handle, int pixelFormat, int subsamp,
int pixelFormat, int subsamp, int jpegQual, int jpegQual, int flags)
int flags)
{ {
#ifndef NO_GETENV #ifndef NO_GETENV
char env[7] = { 0 }; char env[7] = { 0 };
#endif #endif
int retval = 0;
GET_CINSTANCE(handle);
cinfo->in_color_space = pf2cs[pixelFormat]; cinfo->in_color_space = pf2cs[pixelFormat];
cinfo->input_components = tjPixelSize[pixelFormat]; cinfo->input_components = tjPixelSize[pixelFormat];
@@ -307,7 +308,13 @@ static void setCompDefaults(struct jpeg_compress_struct *cinfo,
} }
#endif #endif
if (jpegQual >= 0) { if (flags & TJFLAG_LOSSLESS) {
int psv = jpegQual / 10, pt = jpegQual % 10;
if (psv < 1 || psv > 7 || pt < 0 || pt > 7)
THROW("Invalid lossless parameters");
jpeg_enable_lossless(cinfo, psv, pt);
} else if (jpegQual >= 0) {
jpeg_set_quality(cinfo, jpegQual, TRUE); jpeg_set_quality(cinfo, jpegQual, TRUE);
if (jpegQual >= 96 || flags & TJFLAG_ACCURATEDCT) if (jpegQual >= 96 || flags & TJFLAG_ACCURATEDCT)
cinfo->dct_method = JDCT_ISLOW; cinfo->dct_method = JDCT_ISLOW;
@@ -344,6 +351,9 @@ static void setCompDefaults(struct jpeg_compress_struct *cinfo,
cinfo->comp_info[2].v_samp_factor = 1; cinfo->comp_info[2].v_samp_factor = 1;
if (cinfo->num_components > 3) if (cinfo->num_components > 3)
cinfo->comp_info[3].v_samp_factor = tjMCUHeight[subsamp] / 8; cinfo->comp_info[3].v_samp_factor = tjMCUHeight[subsamp] / 8;
bailout:
return retval;
} }
@@ -719,7 +729,10 @@ DLLEXPORT int tjCompress2(tjhandle handle, const unsigned char *srcBuf,
alloc = FALSE; *jpegSize = tjBufSize(width, height, jpegSubsamp); alloc = FALSE; *jpegSize = tjBufSize(width, height, jpegSubsamp);
} }
jpeg_mem_dest_tj(cinfo, jpegBuf, jpegSize, alloc); jpeg_mem_dest_tj(cinfo, jpegBuf, jpegSize, alloc);
setCompDefaults(cinfo, pixelFormat, jpegSubsamp, jpegQual, flags); if (setCompDefaults(cinfo, pixelFormat, jpegSubsamp, jpegQual,
flags) == -1) {
retval = -1; goto bailout;
}
jpeg_start_compress(cinfo, TRUE); jpeg_start_compress(cinfo, TRUE);
for (i = 0; i < height; i++) { for (i = 0; i < height; i++) {
@@ -817,7 +830,9 @@ DLLEXPORT int tjEncodeYUVPlanes(tjhandle handle, const unsigned char *srcBuf,
else if (flags & TJFLAG_FORCESSE2) PUTENV_S("JSIMD_FORCESSE2", "1"); else if (flags & TJFLAG_FORCESSE2) PUTENV_S("JSIMD_FORCESSE2", "1");
#endif #endif
setCompDefaults(cinfo, pixelFormat, subsamp, -1, flags); if (setCompDefaults(cinfo, pixelFormat, subsamp, -1, flags) == -1) {
retval = -1; goto bailout;
}
/* Execute only the parts of jpeg_start_compress() that we need. If we /* Execute only the parts of jpeg_start_compress() that we need. If we
were to call the whole jpeg_start_compress() function, then it would try were to call the whole jpeg_start_compress() function, then it would try
@@ -1032,7 +1047,9 @@ DLLEXPORT int tjCompressFromYUVPlanes(tjhandle handle,
alloc = FALSE; *jpegSize = tjBufSize(width, height, subsamp); alloc = FALSE; *jpegSize = tjBufSize(width, height, subsamp);
} }
jpeg_mem_dest_tj(cinfo, jpegBuf, jpegSize, alloc); jpeg_mem_dest_tj(cinfo, jpegBuf, jpegSize, alloc);
setCompDefaults(cinfo, TJPF_RGB, subsamp, jpegQual, flags); if (setCompDefaults(cinfo, TJPF_RGB, subsamp, jpegQual, flags) == -1) {
retval = -1; goto bailout;
}
cinfo->raw_data_in = TRUE; cinfo->raw_data_in = TRUE;
jpeg_start_compress(cinfo, TRUE); jpeg_start_compress(cinfo, TRUE);

View File

@@ -370,7 +370,7 @@ enum TJCS {
* The uncompressed source/destination image is stored in bottom-up (Windows, * The uncompressed source/destination image is stored in bottom-up (Windows,
* OpenGL) order, not top-down (X11) order. * OpenGL) order, not top-down (X11) order.
*/ */
#define TJFLAG_BOTTOMUP 2 #define TJFLAG_BOTTOMUP (1 << 1)
/** /**
* When decompressing an image that was compressed using chrominance * When decompressing an image that was compressed using chrominance
* subsampling, use the fastest chrominance upsampling algorithm available in * subsampling, use the fastest chrominance upsampling algorithm available in
@@ -378,7 +378,7 @@ enum TJCS {
* creates a smooth transition between neighboring chrominance components in * creates a smooth transition between neighboring chrominance components in
* order to reduce upsampling artifacts in the decompressed image. * order to reduce upsampling artifacts in the decompressed image.
*/ */
#define TJFLAG_FASTUPSAMPLE 256 #define TJFLAG_FASTUPSAMPLE (1 << 8)
/** /**
* Disable buffer (re)allocation. If passed to one of the JPEG compression or * Disable buffer (re)allocation. If passed to one of the JPEG compression or
* transform functions, this flag will cause those functions to generate an * transform functions, this flag will cause those functions to generate an
@@ -386,7 +386,7 @@ enum TJCS {
* attempting to allocate or reallocate that buffer. This reproduces the * attempting to allocate or reallocate that buffer. This reproduces the
* behavior of earlier versions of TurboJPEG. * behavior of earlier versions of TurboJPEG.
*/ */
#define TJFLAG_NOREALLOC 1024 #define TJFLAG_NOREALLOC (1 << 10)
/** /**
* Use the fastest DCT/IDCT algorithm available in the underlying codec. The * Use the fastest DCT/IDCT algorithm available in the underlying codec. The
* default if this flag is not specified is implementation-specific. For * default if this flag is not specified is implementation-specific. For
@@ -395,7 +395,7 @@ enum TJCS {
* only a very slight effect on accuracy, but it uses the accurate algorithm * only a very slight effect on accuracy, but it uses the accurate algorithm
* when decompressing, because this has been shown to have a larger effect. * when decompressing, because this has been shown to have a larger effect.
*/ */
#define TJFLAG_FASTDCT 2048 #define TJFLAG_FASTDCT (1 << 11)
/** /**
* Use the most accurate DCT/IDCT algorithm available in the underlying codec. * Use the most accurate DCT/IDCT algorithm available in the underlying codec.
* The default if this flag is not specified is implementation-specific. For * The default if this flag is not specified is implementation-specific. For
@@ -404,14 +404,14 @@ enum TJCS {
* only a very slight effect on accuracy, but it uses the accurate algorithm * only a very slight effect on accuracy, but it uses the accurate algorithm
* when decompressing, because this has been shown to have a larger effect. * when decompressing, because this has been shown to have a larger effect.
*/ */
#define TJFLAG_ACCURATEDCT 4096 #define TJFLAG_ACCURATEDCT (1 << 12)
/** /**
* Immediately discontinue the current compression/decompression/transform * Immediately discontinue the current compression/decompression/transform
* operation if the underlying codec throws a warning (non-fatal error). The * operation if the underlying codec throws a warning (non-fatal error). The
* default behavior is to allow the operation to complete unless a fatal error * default behavior is to allow the operation to complete unless a fatal error
* is encountered. * is encountered.
*/ */
#define TJFLAG_STOPONWARNING 8192 #define TJFLAG_STOPONWARNING (1 << 13)
/** /**
* Use progressive entropy coding in JPEG images generated by the compression * Use progressive entropy coding in JPEG images generated by the compression
* and transform functions. Progressive entropy coding will generally improve * and transform functions. Progressive entropy coding will generally improve
@@ -419,7 +419,7 @@ enum TJCS {
* reduce compression and decompression performance considerably. Can be * reduce compression and decompression performance considerably. Can be
* combined with #TJFLAG_ARITHMETIC. * combined with #TJFLAG_ARITHMETIC.
*/ */
#define TJFLAG_PROGRESSIVE 16384 #define TJFLAG_PROGRESSIVE (1 << 14)
/** /**
* Limit the number of progressive JPEG scans that the decompression and * Limit the number of progressive JPEG scans that the decompression and
* transform functions will process. If a progressive JPEG image contains an * transform functions will process. If a progressive JPEG image contains an
@@ -429,7 +429,7 @@ enum TJCS {
* an exploit of the progressive JPEG format described in * an exploit of the progressive JPEG format described in
* <a href="https://libjpeg-turbo.org/pmwiki/uploads/About/TwoIssueswiththeJPEGStandard.pdf" target="_blank">this report</a>. * <a href="https://libjpeg-turbo.org/pmwiki/uploads/About/TwoIssueswiththeJPEGStandard.pdf" target="_blank">this report</a>.
*/ */
#define TJFLAG_LIMITSCANS 32768 #define TJFLAG_LIMITSCANS (1 << 15)
/** /**
* Use arithmetic entropy coding in JPEG images generated by the compression * Use arithmetic entropy coding in JPEG images generated by the compression
* and transform functions. Arithmetic entropy coding will generally improve * and transform functions. Arithmetic entropy coding will generally improve
@@ -437,7 +437,23 @@ enum TJCS {
* reduce compression and decompression performance considerably. Can be * reduce compression and decompression performance considerably. Can be
* combined with #TJFLAG_PROGRESSIVE. * combined with #TJFLAG_PROGRESSIVE.
*/ */
#define TJFLAG_ARITHMETIC 65536 #define TJFLAG_ARITHMETIC (1 << 16)
/**
* Generate a lossless JPEG image when compressing. In most cases, compressing
* and decompressing lossless JPEG images is considerably slower than
* compressing and decompressing lossy JPEG images. Also note that the
* following features are not available with lossless JPEG images:
* - Colorspace conversion
* - Chrominance subsampling
* - JPEG quality selection
* - DCT/IDCT algorithm selection
* - Progressive entropy coding
* - Arithmetic entropy coding
* - Compression from/decompression to YUV planar images
* - Decompression scaling
* - Lossless transformations
*/
#define TJFLAG_LOSSLESS (1 << 17)
/** /**
@@ -527,29 +543,29 @@ enum TJXOP {
* that cannot be transformed will be left in place, which will create * that cannot be transformed will be left in place, which will create
* odd-looking strips on the right or bottom edge of the image. * odd-looking strips on the right or bottom edge of the image.
*/ */
#define TJXOPT_PERFECT 1 #define TJXOPT_PERFECT (1 << 0)
/** /**
* This option will cause #tjTransform() to discard any partial MCU blocks that * This option will cause #tjTransform() to discard any partial MCU blocks that
* cannot be transformed. * cannot be transformed.
*/ */
#define TJXOPT_TRIM 2 #define TJXOPT_TRIM (1 << 1)
/** /**
* This option will enable lossless cropping. See #tjTransform() for more * This option will enable lossless cropping. See #tjTransform() for more
* information. * information.
*/ */
#define TJXOPT_CROP 4 #define TJXOPT_CROP (1 << 2)
/** /**
* This option will discard the color data in the input image and produce * This option will discard the color data in the input image and produce
* a grayscale output image. * a grayscale output image.
*/ */
#define TJXOPT_GRAY 8 #define TJXOPT_GRAY (1 << 3)
/** /**
* This option will prevent #tjTransform() from outputting a JPEG image for * This option will prevent #tjTransform() from outputting a JPEG image for
* this particular transform (this can be used in conjunction with a custom * this particular transform (this can be used in conjunction with a custom
* filter to capture the transformed DCT coefficients without transcoding * filter to capture the transformed DCT coefficients without transcoding
* them.) * them.)
*/ */
#define TJXOPT_NOOUTPUT 16 #define TJXOPT_NOOUTPUT (1 << 4)
/** /**
* This option will enable progressive entropy coding in the output image * This option will enable progressive entropy coding in the output image
* generated by this particular transform. Progressive entropy coding will * generated by this particular transform. Progressive entropy coding will
@@ -557,13 +573,13 @@ enum TJXOP {
* default), but it will reduce compression and decompression performance * default), but it will reduce compression and decompression performance
* considerably. Can be combined with #TJXOPT_ARITHMETIC. * considerably. Can be combined with #TJXOPT_ARITHMETIC.
*/ */
#define TJXOPT_PROGRESSIVE 32 #define TJXOPT_PROGRESSIVE (1 << 5)
/** /**
* This option will prevent #tjTransform() from copying any extra markers * This option will prevent #tjTransform() from copying any extra markers
* (including EXIF and ICC profile data) from the source image to the output * (including EXIF and ICC profile data) from the source image to the output
* image. * image.
*/ */
#define TJXOPT_COPYNONE 64 #define TJXOPT_COPYNONE (1 << 6)
/** /**
* This option will enable arithmetic entropy coding in the output image * This option will enable arithmetic entropy coding in the output image
* generated by this particular transform. Arithmetic entropy coding will * generated by this particular transform. Arithmetic entropy coding will
@@ -571,7 +587,7 @@ enum TJXOP {
* default), but it will reduce compression and decompression performance * default), but it will reduce compression and decompression performance
* considerably. Can be combined with #TJXOPT_PROGRESSIVE. * considerably. Can be combined with #TJXOPT_PROGRESSIVE.
*/ */
#define TJXOPT_ARITHMETIC 128 #define TJXOPT_ARITHMETIC (1 << 7)
/** /**
@@ -760,7 +776,13 @@ DLLEXPORT tjhandle tjInitCompress(void);
* "Chrominance subsampling options".) * "Chrominance subsampling options".)
* *
* @param jpegQual the image quality of the generated JPEG image (1 = worst, * @param jpegQual the image quality of the generated JPEG image (1 = worst,
* 100 = best) * 100 = best.) When generating a lossless JPEG image (see #TJFLAG_LOSSLESS),
* <tt>jpegQual</tt> is <tt>psv * 10 + Pt</tt>, where <tt>psv</tt> is the
* predictor selection value (1-7) and <tt>Pt</tt> is the point transform
* (0-7). A point transform value of 0 is necessary in order to create a fully
* lossless JPEG image. (A non-zero point transform value right-shifts the
* input samples by the specified number of bits, which is effectively a form
* of lossy color quantization.)
* *
* @param flags the bitwise OR of one or more of the @ref TJFLAG_ACCURATEDCT * @param flags the bitwise OR of one or more of the @ref TJFLAG_ACCURATEDCT
* "flags" * "flags"