diff options
author | Andrew Hsieh <andrewhsieh@google.com> | 2012-08-28 19:48:46 +0800 |
---|---|---|
committer | Andrew Hsieh <andrewhsieh@google.com> | 2012-08-28 19:48:46 +0800 |
commit | f897702251443b531b2ded93df71ffd87fbae076 (patch) | |
tree | 01be0bf6c0d6968e1468ec9661fd52110f9b05a7 /distrib/jpeg-6b/jddctmgr.c | |
parent | a616e320339206339dbf51da50f0904010ff71ca (diff) | |
download | external_qemu-f897702251443b531b2ded93df71ffd87fbae076.zip external_qemu-f897702251443b531b2ded93df71ffd87fbae076.tar.gz external_qemu-f897702251443b531b2ded93df71ffd87fbae076.tar.bz2 |
Add SSE optmized IDCT in JPEG decoding emulator
Port from related CL:
https://android-review.googlesource.com/#/c/38840
Change-Id: Iba7183c2760701a95e27355b91835285d63bf7bc
Diffstat (limited to 'distrib/jpeg-6b/jddctmgr.c')
-rw-r--r-- | distrib/jpeg-6b/jddctmgr.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/distrib/jpeg-6b/jddctmgr.c b/distrib/jpeg-6b/jddctmgr.c index 74a96db..95e5849 100644 --- a/distrib/jpeg-6b/jddctmgr.c +++ b/distrib/jpeg-6b/jddctmgr.c @@ -50,6 +50,13 @@ void jpeg_idct_armv6 (j_decompress_ptr cinfo, jpeg_component_info * compptr, #endif +#ifdef ANDROID_INTELSSE2_IDCT +extern short __attribute__((aligned(16))) quantptrSSE[DCTSIZE2]; +extern void jpeg_idct_intelsse (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col); +#endif + /* * The decompressor input side (jdinput.c) saves away the appropriate * quantization table for each component at the start of the first scan @@ -151,6 +158,13 @@ start_pass (j_decompress_ptr cinfo) method = JDCT_IFAST; break; #else /* ANDROID_ARMV6_IDCT */ +#ifdef ANDROID_INTELSSE2_IDCT + case JDCT_ISLOW: + case JDCT_IFAST: + method_ptr = jpeg_idct_intelsse; + method = JDCT_ISLOW; /* Use quant table of ISLOW.*/ + break; +#else #ifdef DCT_ISLOW_SUPPORTED case JDCT_ISLOW: method_ptr = jpeg_idct_islow; @@ -163,6 +177,7 @@ start_pass (j_decompress_ptr cinfo) method = JDCT_IFAST; break; #endif +#endif #endif /* ANDROID_ARMV6_IDCT */ #ifdef DCT_FLOAT_SUPPORTED case JDCT_FLOAT: |