Mercurial > libavcodec.hg
comparison vp3dsp.c @ 11926:43e39953f4f9 libavcodec
Improve some uses of ff_cropTbl with constant offset
author | mru |
---|---|
date | Tue, 22 Jun 2010 23:12:48 +0000 |
parents | 2064f8a1691e |
children |
comparison
equal
deleted
inserted
replaced
11925:c5e03082fd94 | 11926:43e39953f4f9 |
---|---|
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*/){ | 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] + 15) >> 5; | 227 int i, dc = (block[0] + 15) >> 5; |
228 const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP + dc; | |
229 | 229 |
230 for(i = 0; i < 8; i++){ | 230 for(i = 0; i < 8; i++){ |
231 dest[0] = cm[dest[0]+dc]; | 231 dest[0] = cm[dest[0]]; |
232 dest[1] = cm[dest[1]+dc]; | 232 dest[1] = cm[dest[1]]; |
233 dest[2] = cm[dest[2]+dc]; | 233 dest[2] = cm[dest[2]]; |
234 dest[3] = cm[dest[3]+dc]; | 234 dest[3] = cm[dest[3]]; |
235 dest[4] = cm[dest[4]+dc]; | 235 dest[4] = cm[dest[4]]; |
236 dest[5] = cm[dest[5]+dc]; | 236 dest[5] = cm[dest[5]]; |
237 dest[6] = cm[dest[6]+dc]; | 237 dest[6] = cm[dest[6]]; |
238 dest[7] = cm[dest[7]+dc]; | 238 dest[7] = cm[dest[7]]; |
239 dest += line_size; | 239 dest += line_size; |
240 } | 240 } |
241 } | 241 } |
242 | 242 |
243 void ff_vp3_v_loop_filter_c(uint8_t *first_pixel, int stride, int *bounding_values) | 243 void ff_vp3_v_loop_filter_c(uint8_t *first_pixel, int stride, int *bounding_values) |