diff options
Diffstat (limited to 'vpx_dsp/avg.c')
-rw-r--r-- | vpx_dsp/avg.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/vpx_dsp/avg.c b/vpx_dsp/avg.c index 41a6fd828..1c45e8a73 100644 --- a/vpx_dsp/avg.c +++ b/vpx_dsp/avg.c @@ -314,6 +314,19 @@ void vpx_hadamard_32x32_c(const int16_t *src_diff, ptrdiff_t src_stride, } } +#if CONFIG_VP9_HIGHBITDEPTH +// coeff: dynamic range 20 bit. +// length: value range {16, 64, 256, 1024}. +int vpx_highbd_satd_c(const tran_low_t *coeff, int length) { + int i; + int satd = 0; + for (i = 0; i < length; ++i) satd += abs(coeff[i]); + + // satd: 30 bits + return satd; +} +#endif // CONFIG_VP9_HIGHBITDEPTH + // coeff: 16 bits, dynamic range [-32640, 32640]. // length: value range {16, 64, 256, 1024}. int vpx_satd_c(const tran_low_t *coeff, int length) { |