summaryrefslogtreecommitdiff
path: root/libavcodec/rv34dsp.h
diff options
context:
space:
mode:
authorChristophe GISQUET <christophe.gisquet@gmail.com>2012-03-19 22:46:28 +0100
committerRonald S. Bultje <rsbultje@gmail.com>2012-04-10 10:06:48 -0700
commit272b252c0110225188c7d7f31167941210aac197 (patch)
tree47bea5996c88057a418e8872a655bac8f261736e /libavcodec/rv34dsp.h
parentd3c59d5003a483f1a23e225fc71c19bd1116d11c (diff)
rv40dsp: implement prescaled versions for biweight.
Quite often, the original weights are multiple of 512. By prescaling them by 1/512 when they are computed (once per frame), no intermediate shifting is needed, and no prescaling on each call either. The x86 code already used that trick. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavcodec/rv34dsp.h')
-rw-r--r--libavcodec/rv34dsp.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/libavcodec/rv34dsp.h b/libavcodec/rv34dsp.h
index c70194cc20..58da59f038 100644
--- a/libavcodec/rv34dsp.h
+++ b/libavcodec/rv34dsp.h
@@ -58,7 +58,12 @@ typedef struct RV34DSPContext {
qpel_mc_func avg_pixels_tab[4][16];
h264_chroma_mc_func put_chroma_pixels_tab[3];
h264_chroma_mc_func avg_chroma_pixels_tab[3];
- rv40_weight_func rv40_weight_pixels_tab[2];
+ /**
+ * Biweight functions, first dimension is transform size (16/8),
+ * second is whether the weight is prescaled by 1/512 to skip
+ * the intermediate shifting.
+ */
+ rv40_weight_func rv40_weight_pixels_tab[2][2];
rv34_inv_transform_func rv34_inv_transform;
rv34_inv_transform_func rv34_inv_transform_dc;
rv34_idct_add_func rv34_idct_add;