comparison vp3dsp.c @ 11637:f7281af560fe libavcodec

vp3: DC-only IDCT 2-4% faster overall decode
author conrad
date Sat, 17 Apr 2010 02:04:30 +0000
parents e9d9d946f213
children 7dd2a45249a9
comparison
equal deleted inserted replaced
11636:a9e758788a12 11637:f7281af560fe
221 221
222 void ff_vp3_idct_add_c(uint8_t *dest/*align 8*/, int line_size, DCTELEM *block/*align 16*/){ 222 void ff_vp3_idct_add_c(uint8_t *dest/*align 8*/, int line_size, DCTELEM *block/*align 16*/){
223 idct(dest, line_size, block, 2); 223 idct(dest, line_size, block, 2);
224 } 224 }
225 225
226 void ff_vp3_idct_dc_add_c(uint8_t *dest/*align 8*/, int line_size, const DCTELEM *block/*align 16*/){
227 const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
228 int i, dc = block[0];
229 dc = (46341*dc)>>16;
230 dc = (46341*dc + (8<<16))>>20;
231
232 for(i = 0; i < 8; i++){
233 dest[0] = cm[dest[0]+dc];
234 dest[1] = cm[dest[1]+dc];
235 dest[2] = cm[dest[2]+dc];
236 dest[3] = cm[dest[3]+dc];
237 dest[4] = cm[dest[4]+dc];
238 dest[5] = cm[dest[5]+dc];
239 dest[6] = cm[dest[6]+dc];
240 dest[7] = cm[dest[7]+dc];
241 dest += line_size;
242 }
243 }
244
226 void ff_vp3_v_loop_filter_c(uint8_t *first_pixel, int stride, int *bounding_values) 245 void ff_vp3_v_loop_filter_c(uint8_t *first_pixel, int stride, int *bounding_values)
227 { 246 {
228 unsigned char *end; 247 unsigned char *end;
229 int filter_value; 248 int filter_value;
230 const int nstride= -stride; 249 const int nstride= -stride;