diff options
author | Fritz Koenig <frkoenig@google.com> | 2010-08-20 10:58:19 -0700 |
---|---|---|
committer | Fritz Koenig <frkoenig@google.com> | 2010-08-23 08:58:54 -0700 |
commit | 93c32a55c2444b8245e8cba9187e1ec654d1fbc6 (patch) | |
tree | 8f7c32ca7fafe2784e00066c37ffee4b2473e44e /vp8/decoder/dequantize.h | |
parent | b0660457fe46a48246e42a8e5c0ce78c0e2e4164 (diff) | |
download | libvpx-93c32a55c2444b8245e8cba9187e1ec654d1fbc6.tar libvpx-93c32a55c2444b8245e8cba9187e1ec654d1fbc6.tar.gz libvpx-93c32a55c2444b8245e8cba9187e1ec654d1fbc6.tar.bz2 libvpx-93c32a55c2444b8245e8cba9187e1ec654d1fbc6.zip |
Rework idct calling structure.
Moving the eob structure allows for a non-struct based
function to handle decoding an entire mb of
idct/dequant/recon data. This allows for SIMD functions
to idct/dequant/recon multiple blocks at once.
SSE2 implementation gives 3% gain on Atom.
Change-Id: I8a8f3efd546ea4e0535f517d94f347cfb737c9c2
Diffstat (limited to 'vp8/decoder/dequantize.h')
-rw-r--r-- | vp8/decoder/dequantize.h | 47 |
1 files changed, 44 insertions, 3 deletions
diff --git a/vp8/decoder/dequantize.h b/vp8/decoder/dequantize.h index fbca3919c..125d35b05 100644 --- a/vp8/decoder/dequantize.h +++ b/vp8/decoder/dequantize.h @@ -27,6 +27,21 @@ int pitch, int stride, \ int dc) +#define prototype_dequant_dc_idct_add_y_block(sym) \ + void sym(short *q, short *dq, \ + unsigned char *pre, unsigned char *dst, \ + int stride, char *eobs, short *dc) + +#define prototype_dequant_idct_add_y_block(sym) \ + void sym(short *q, short *dq, \ + unsigned char *pre, unsigned char *dst, \ + int stride, char *eobs) + +#define prototype_dequant_idct_add_uv_block(sym) \ + void sym(short *q, short *dq, \ + unsigned char *pre, unsigned char *dst_u, \ + unsigned char *dst_v, int stride, char *eobs) + #if ARCH_X86 || ARCH_X86_64 #include "x86/dequantize_x86.h" #endif @@ -50,16 +65,42 @@ extern prototype_dequant_idct_add(vp8_dequant_idct_add); #endif extern prototype_dequant_dc_idct_add(vp8_dequant_dc_idct_add); +#ifndef vp8_dequant_dc_idct_add_y_block +#define vp8_dequant_dc_idct_add_y_block vp8_dequant_dc_idct_add_y_block_c +#endif +extern prototype_dequant_dc_idct_add_y_block(vp8_dequant_dc_idct_add_y_block); + +#ifndef vp8_dequant_idct_add_y_block +#define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_c +#endif +extern prototype_dequant_idct_add_y_block(vp8_dequant_idct_add_y_block); + +#ifndef vp8_dequant_idct_add_uv_block +#define vp8_dequant_idct_add_uv_block vp8_dequant_idct_add_uv_block_c +#endif +extern prototype_dequant_idct_add_uv_block(vp8_dequant_idct_add_uv_block); + + typedef prototype_dequant_block((*vp8_dequant_block_fn_t)); typedef prototype_dequant_idct_add((*vp8_dequant_idct_add_fn_t)); + typedef prototype_dequant_dc_idct_add((*vp8_dequant_dc_idct_add_fn_t)); +typedef prototype_dequant_dc_idct_add_y_block((*vp8_dequant_dc_idct_add_y_block_fn_t)); + +typedef prototype_dequant_idct_add_y_block((*vp8_dequant_idct_add_y_block_fn_t)); + +typedef prototype_dequant_idct_add_uv_block((*vp8_dequant_idct_add_uv_block_fn_t)); + typedef struct { - vp8_dequant_block_fn_t block; - vp8_dequant_idct_add_fn_t idct_add; - vp8_dequant_dc_idct_add_fn_t dc_idct_add; + vp8_dequant_block_fn_t block; + vp8_dequant_idct_add_fn_t idct_add; + vp8_dequant_dc_idct_add_fn_t dc_idct_add; + vp8_dequant_dc_idct_add_y_block_fn_t dc_idct_add_y_block; + vp8_dequant_idct_add_y_block_fn_t idct_add_y_block; + vp8_dequant_idct_add_uv_block_fn_t idct_add_uv_block; } vp8_dequant_rtcd_vtable_t; #if CONFIG_RUNTIME_CPU_DETECT |