From 3faa303a47e0c3b59a53988e0f76018930c6cb1a Mon Sep 17 00:00:00 2001 From: Christophe GISQUET Date: Sun, 1 Jan 2012 18:33:22 +0100 Subject: rv34: DC-only inverse transform When decoding coefficients, detect whether the block is DC-only, and take advantage of this knowledge to perform DC-only inverse transform. This is achieved by: - first, changing the 108x4 element modulo_three_table into a 108 element table (kind of base4), and accessing each value using mask and shifts. - then, checking low bits for 0 (as they represent the presence of higher frequency coefficients) Also provide x86 SIMD code for the DC-only inverse transform. Signed-off-by: Kostya Shishkov --- libavcodec/rv34dsp.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libavcodec/rv34dsp.h') diff --git a/libavcodec/rv34dsp.h b/libavcodec/rv34dsp.h index f2bc20e911..6f53a09928 100644 --- a/libavcodec/rv34dsp.h +++ b/libavcodec/rv34dsp.h @@ -56,6 +56,7 @@ typedef struct RV34DSPContext { h264_chroma_mc_func avg_chroma_pixels_tab[3]; rv40_weight_func rv40_weight_pixels_tab[2]; rv34_inv_transform_func rv34_inv_transform_tab[2]; + void (*rv34_inv_transform_dc_tab[2])(DCTELEM *block); rv40_weak_loop_filter_func rv40_weak_loop_filter[2]; rv40_strong_loop_filter_func rv40_strong_loop_filter[2]; rv40_loop_filter_strength_func rv40_loop_filter_strength[2]; @@ -66,6 +67,7 @@ void ff_rv34dsp_init(RV34DSPContext *c, DSPContext* dsp); void ff_rv40dsp_init(RV34DSPContext *c, DSPContext* dsp); void ff_rv34dsp_init_neon(RV34DSPContext *c, DSPContext *dsp); +void ff_rv34dsp_init_x86(RV34DSPContext *c, DSPContext *dsp); void ff_rv40dsp_init_x86(RV34DSPContext *c, DSPContext *dsp); void ff_rv40dsp_init_neon(RV34DSPContext *c, DSPContext *dsp); -- cgit v1.2.3