2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
11 #include "vpx_ports/config.h"
13 #include "dequantize.h"
15 void vp8_dequant_dc_idct_add_c(short *input
, short *dq
, unsigned char *pred
,
16 unsigned char *dest
, int pitch
, int stride
,
18 void vp8_dequant_idct_add_c(short *input
, short *dq
, unsigned char *pred
,
19 unsigned char *dest
, int pitch
, int stride
);
20 void vp8_dc_only_idct_add_c(short input_dc
, unsigned char *pred_ptr
,
21 unsigned char *dst_ptr
, int pitch
, int stride
);
23 void vp8_dequant_dc_idct_add_y_block_c
24 (short *q
, short *dq
, unsigned char *pre
,
25 unsigned char *dst
, int stride
, char *eobs
, short *dc
)
29 for (i
= 0; i
< 4; i
++)
31 for (j
= 0; j
< 4; j
++)
34 vp8_dequant_dc_idct_add_c (q
, dq
, pre
, dst
, 16, stride
, dc
[0]);
36 vp8_dc_only_idct_add_c (dc
[0], pre
, dst
, 16, stride
);
49 void vp8_dequant_idct_add_y_block_c
50 (short *q
, short *dq
, unsigned char *pre
,
51 unsigned char *dst
, int stride
, char *eobs
)
55 for (i
= 0; i
< 4; i
++)
57 for (j
= 0; j
< 4; j
++)
60 vp8_dequant_idct_add_c (q
, dq
, pre
, dst
, 16, stride
);
63 vp8_dc_only_idct_add_c (q
[0]*dq
[0], pre
, dst
, 16, stride
);
77 void vp8_dequant_idct_add_uv_block_c
78 (short *q
, short *dq
, unsigned char *pre
,
79 unsigned char *dstu
, unsigned char *dstv
, int stride
, char *eobs
)
83 for (i
= 0; i
< 2; i
++)
85 for (j
= 0; j
< 2; j
++)
88 vp8_dequant_idct_add_c (q
, dq
, pre
, dstu
, 8, stride
);
91 vp8_dc_only_idct_add_c (q
[0]*dq
[0], pre
, dstu
, 8, stride
);
101 dstu
+= 4*stride
- 8;
104 for (i
= 0; i
< 2; i
++)
106 for (j
= 0; j
< 2; j
++)
109 vp8_dequant_idct_add_c (q
, dq
, pre
, dstv
, 8, stride
);
112 vp8_dc_only_idct_add_c (q
[0]*dq
[0], pre
, dstv
, 8, stride
);
122 dstv
+= 4*stride
- 8;