diff options
author | Sven Gothel <[email protected]> | 2013-04-01 05:16:35 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-04-01 05:16:35 +0200 |
commit | a54bd3e963a7be320dee0c9692d237607fcd0f96 (patch) | |
tree | e365b6baeda020429355f9a7a98a7c3e65da713b /make | |
parent | 00c65b4a34445d140ca9e6ee531dfa4278b8e770 (diff) |
Fix Bug 671: Add JPEG Decoder w/o AWT Dependencies
Original JavaScript code from <https://github.com/notmasteryet/jpgjs/blob/master/jpg.js>,
author 'notmasteryet' <async.processingjs at yahoo.com>.
Ported to Java.
Enhancements:
* InputStream instead of memory buffer
* User provided memory handler
* Fixed JPEG Component ID/Index mapping
* Color space conversion (YCCK, CMYK -> RGB)
* More error tolerant
+++
Features:
JOGL AWT
RGB ok ok
YCCK ok Exception
CMYK ok Exception
YUV Store ok n/a
Need Y-Flip no yes
+++
Benchmark: TestJPEGJoglAWTBenchmarkNewtAWT
JOGL.RGB Loops 100, dt 1199 ms, 11.99 ms/l
JOGL.YUV Loops 100, dt 351 ms, 3.51 ms/l
AWT..... Loops 100, dt 2144 ms, 21.44 ms/l
File: jogl/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/j1-baseline.jpg
Machine: GNU/Linux PC (AMD 8 core), JavaSE 6 (1.6.0_38)
.++++ UITestCase.setUp: com.jogamp.opengl.test.junit.jogl.util.texture.TestJPEGJoglAWTBenchmarkNewtAWT - benchmark
libEGL warning: DRI2: failed to authenticate
0: JPEGImage[261x202, bytesPerPixel 3, reversedChannels false, JPEGPixels[261x202, sourceComp 3, sourceCS YCbCr, storageCS RGB, storageComp 3], java.nio.DirectByteBuffer[pos=0 lim=158166 cap=158166]]
0: TextureData[261x202, y-flip false, internFormat 0x1907, pixelFormat 0x1907, pixelType 0x1401, border 0, estSize 158166, alignment 1, rowlen 0, buffer java.nio.DirectByteBuffer[pos=0 lim=158166 cap=158166]
JOGL.RGB Loops 100, dt 1199 ms, 11.99 ms/l
0: JPEGImage[261x202, bytesPerPixel 3, reversedChannels false, JPEGPixels[261x202, sourceComp 3, sourceCS YCbCr, storageCS YCbCr, storageComp 3], java.nio.DirectByteBuffer[pos=0 lim=158166 cap=158166]]
0: TextureData[261x202, y-flip false, internFormat 0x1907, pixelFormat 0x1907, pixelType 0x1401, border 0, estSize 158166, alignment 1, rowlen 0, buffer java.nio.DirectByteBuffer[pos=0 lim=158166 cap=158166]
JOGL.YUV Loops 100, dt 351 ms, 3.51 ms/l
0: TextureData[261x202, y-flip true, internFormat 0x1907, pixelFormat 0x80e0, pixelType 0x1401, border 0, estSize 158166, alignment 1, rowlen 261, buffer java.nio.HeapByteBuffer[pos=0 lim=158166 cap=158166]
AWT..... Loops 100, dt 2144 ms, 21.44 ms/l
++++ UITestCase.tearDown: com.jogamp.opengl.test.junit.jogl.util.texture.TestJPEGJoglAWTBenchmarkNewtAWT - benchmark
Diffstat (limited to 'make')
-rwxr-xr-x | make/scripts/tests.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh index 41a06ea90..48fa02a6c 100755 --- a/make/scripts/tests.sh +++ b/make/scripts/tests.sh @@ -199,6 +199,7 @@ function jrun() { #D_ARGS="-Dnewt.debug=all" #D_ARGS="-Djogl.debug.GLCanvas -Djogl.debug.GLJPanel" #D_ARGS="-Djogl.debug.PNGImage" + #D_ARGS="-Djogl.debug.JPEGImage" #X_ARGS="-Dsun.java2d.noddraw=True -Dsun.java2d.opengl=True -Dsun.java2d.xrender=false" #X_ARGS="-Dsun.java2d.noddraw=True -Dsun.java2d.opengl=false -Dsun.java2d.xrender=false" #X_ARGS="-verbose:jni" @@ -294,7 +295,7 @@ function testawtswt() { # #testnoawt com.jogamp.nativewindow.NativeWindowVersion $* #testnoawt com.jogamp.opengl.JoglVersion $* -testnoawt com.jogamp.newt.NewtVersion $* +#testnoawt com.jogamp.newt.NewtVersion $* #testnoawt com.jogamp.newt.opengl.GLWindow $* #testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestFloatUtil01MatrixMatrixMultNOUI $* #testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestPMVMatrix01NEWT $* @@ -495,7 +496,11 @@ testnoawt com.jogamp.newt.NewtVersion $* # Texture / TextureUtils # #testawt com.jogamp.opengl.test.junit.jogl.util.texture.TestTexture01AWT +#testnoawt com.jogamp.opengl.test.junit.jogl.util.texture.TestJPEGImage00NEWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.util.texture.TestJPEGImage01NEWT $* +testnoawt com.jogamp.opengl.test.junit.jogl.util.texture.TestJPEGJoglAWTCompareNewtAWT $* +#testnoawt com.jogamp.opengl.test.junit.jogl.util.texture.TestJPEGJoglAWTBenchmarkNewtAWT $* +#testnoawt com.jogamp.opengl.test.junit.jogl.util.texture.TestJPEGTextureFromFileNEWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.util.texture.TestPNGImage01NEWT $* #testawt com.jogamp.opengl.test.junit.jogl.util.texture.TestPNGTextureFromFileAWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.util.texture.TestPNGTextureFromFileNEWT $* |