summaryrefslogtreecommitdiff
path: root/libavcodec/vp3dsp.c
diff options
context:
space:
mode:
authorDavid Conrad <lessen42@gmail.com>2010-04-17 02:04:30 +0000
committerDavid Conrad <lessen42@gmail.com>2010-04-17 02:04:30 +0000
commiteb6a6cd788a172f146534c5fab9b98d6cbf59520 (patch)
tree23225d7976eefaf0292342e6ee8b4ac946efcb8e /libavcodec/vp3dsp.c
parentf32f7d8b24d1228df447be85046b9346292d936e (diff)
downloadffmpeg-eb6a6cd788a172f146534c5fab9b98d6cbf59520.tar.gz
vp3: DC-only IDCT
2-4% faster overall decode Originally committed as revision 22896 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vp3dsp.c')
-rw-r--r--libavcodec/vp3dsp.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/libavcodec/vp3dsp.c b/libavcodec/vp3dsp.c
index 87b64de385..049758e671 100644
--- a/libavcodec/vp3dsp.c
+++ b/libavcodec/vp3dsp.c
@@ -223,6 +223,25 @@ void ff_vp3_idct_add_c(uint8_t *dest/*align 8*/, int line_size, DCTELEM *block/*
idct(dest, line_size, block, 2);
}
+void ff_vp3_idct_dc_add_c(uint8_t *dest/*align 8*/, int line_size, const DCTELEM *block/*align 16*/){
+ const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
+ int i, dc = block[0];
+ dc = (46341*dc)>>16;
+ dc = (46341*dc + (8<<16))>>20;
+
+ for(i = 0; i < 8; i++){
+ dest[0] = cm[dest[0]+dc];
+ dest[1] = cm[dest[1]+dc];
+ dest[2] = cm[dest[2]+dc];
+ dest[3] = cm[dest[3]+dc];
+ dest[4] = cm[dest[4]+dc];
+ dest[5] = cm[dest[5]+dc];
+ dest[6] = cm[dest[6]+dc];
+ dest[7] = cm[dest[7]+dc];
+ dest += line_size;
+ }
+}
+
void ff_vp3_v_loop_filter_c(uint8_t *first_pixel, int stride, int *bounding_values)
{
unsigned char *end;