From 272b252c0110225188c7d7f31167941210aac197 Mon Sep 17 00:00:00 2001 From: Christophe GISQUET Date: Mon, 19 Mar 2012 22:46:28 +0100 Subject: 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 --- libavcodec/rv34dsp.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'libavcodec/rv34dsp.h') 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; -- cgit v1.2.3