diff options
Diffstat (limited to 'vp8/common/idctllm.c')
-rw-r--r-- | vp8/common/idctllm.c | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/vp8/common/idctllm.c b/vp8/common/idctllm.c index 2866fa4bb..c9686626c 100644 --- a/vp8/common/idctllm.c +++ b/vp8/common/idctllm.c @@ -104,23 +104,30 @@ void vp8_short_idct4x4llm_1_c(short *input, short *output, int pitch) } } - -void vp8_dc_only_idct_c(short input_dc, short *output, int pitch) +void vp8_dc_only_idct_add_c(short input_dc, unsigned char *pred_ptr, unsigned char *dst_ptr, int pitch, int stride) { - int i; - int a1; - short *op = output; - int shortpitch = pitch >> 1; - a1 = ((input_dc + 4) >> 3); + int a1 = ((input_dc + 4) >> 3); + int r, c; - for (i = 0; i < 4; i++) + for (r = 0; r < 4; r++) { - op[0] = a1; - op[1] = a1; - op[2] = a1; - op[3] = a1; - op += shortpitch; + for (c = 0; c < 4; c++) + { + int a = a1 + pred_ptr[c] ; + + if (a < 0) + a = 0; + + if (a > 255) + a = 255; + + dst_ptr[c] = (unsigned char) a ; + } + + dst_ptr += stride; + pred_ptr += pitch; } + } void vp8_short_inv_walsh4x4_c(short *input, short *output) |