const YV12_BUFFER_CONFIG *dest,
uint32_t in_bd, uint32_t bd) {
PSNR_STATS psnr;
- calc_highbd_psnr(source, dest, &psnr, bd, in_bd);
+ vpx_calc_highbd_psnr(source, dest, &psnr, bd, in_bd);
return psnr.psnr[0];
}
double compute_psnr(const YV12_BUFFER_CONFIG *source,
const YV12_BUFFER_CONFIG *dest) {
PSNR_STATS psnr;
- calc_psnr(source, dest, &psnr);
+ vpx_calc_psnr(source, dest, &psnr);
return psnr.psnr[0];
}
int i;
PSNR_STATS psnr;
#if CONFIG_VP9_HIGHBITDEPTH
- calc_highbd_psnr(cpi->Source, cpi->common.frame_to_show, &psnr,
- cpi->td.mb.e_mbd.bd, cpi->oxcf.input_bit_depth);
+ vpx_calc_highbd_psnr(cpi->Source, cpi->common.frame_to_show, &psnr,
+ cpi->td.mb.e_mbd.bd, cpi->oxcf.input_bit_depth);
#else
- calc_psnr(cpi->Source, cpi->common.frame_to_show, &psnr);
+ vpx_calc_psnr(cpi->Source, cpi->common.frame_to_show, &psnr);
#endif
for (i = 0; i < 4; ++i) {
vpx_clear_system_state();
// TODO(yaowu): unify these two versions into one.
#if CONFIG_VP9_HIGHBITDEPTH
- calc_highbd_psnr(orig, recon, &psnr, cpi->td.mb.e_mbd.bd, in_bit_depth);
+ vpx_calc_highbd_psnr(orig, recon, &psnr, bit_depth, in_bit_depth);
#else
- calc_psnr(orig, recon, &psnr);
+ vpx_calc_psnr(orig, recon, &psnr);
#endif // CONFIG_VP9_HIGHBITDEPTH
adjust_image_stat(psnr.psnr[1], psnr.psnr[2], psnr.psnr[3],
int i;
PSNR_STATS psnr;
#if CONFIG_VP9_HIGHBITDEPTH
- calc_highbd_psnr(cpi->Source, cpi->common.frame_to_show, &psnr,
- cpi->td.mb.e_mbd.bd, cpi->oxcf.input_bit_depth);
+ vpx_calc_highbd_psnr(cpi->Source, cpi->common.frame_to_show, &psnr,
+ cpi->td.mb.e_mbd.bd, cpi->oxcf.input_bit_depth);
#else
- calc_psnr(cpi->Source, cpi->common.frame_to_show, &psnr);
+ vpx_calc_psnr(cpi->Source, cpi->common.frame_to_show, &psnr);
#endif
for (i = 0; i < 4; ++i) {
YV12_BUFFER_CONFIG *pp = &cm->post_proc_buffer;
PSNR_STATS psnr;
#if CONFIG_VP9_HIGHBITDEPTH
- calc_highbd_psnr(orig, recon, &psnr, cpi->td.mb.e_mbd.bd,
- in_bit_depth);
+ vpx_calc_highbd_psnr(orig, recon, &psnr, cpi->td.mb.e_mbd.bd,
+ in_bit_depth);
#else
- calc_psnr(orig, recon, &psnr);
+ vpx_calc_psnr(orig, recon, &psnr);
#endif // CONFIG_VP9_HIGHBITDEPTH
adjust_image_stat(psnr.psnr[1], psnr.psnr[2], psnr.psnr[3],
vpx_clear_system_state();
#if CONFIG_VP9_HIGHBITDEPTH
- calc_highbd_psnr(orig, pp, &psnr2, cpi->td.mb.e_mbd.bd,
+ vpx_calc_highbd_psnr(orig, pp, &psnr2, cpi->td.mb.e_mbd.bd,
cpi->oxcf.input_bit_depth);
#else
- calc_psnr(orig, pp, &psnr2);
+ vpx_calc_psnr(orig, pp, &psnr2);
#endif // CONFIG_VP9_HIGHBITDEPTH
cpi->totalp_sq_error += psnr2.sse[0];
}
#if CONFIG_VP9_HIGHBITDEPTH
-int64_t highbd_get_sse_shift(const uint8_t *a8, int a_stride,
- const uint8_t *b8, int b_stride,
- int width, int height,
- unsigned int input_shift) {
+static int64_t highbd_get_sse_shift(const uint8_t *a8, int a_stride,
+ const uint8_t *b8, int b_stride,
+ int width, int height,
+ unsigned int input_shift) {
const uint16_t *a = CONVERT_TO_SHORTPTR(a8);
const uint16_t *b = CONVERT_TO_SHORTPTR(b8);
int64_t total_sse = 0;
return total_sse;
}
-int64_t highbd_get_sse(const uint8_t *a, int a_stride,
- const uint8_t *b, int b_stride,
- int width, int height) {
+static int64_t highbd_get_sse(const uint8_t *a, int a_stride,
+ const uint8_t *b, int b_stride,
+ int width, int height) {
int64_t total_sse = 0;
int x, y;
const int dw = width % 16;
#endif // CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VP9_HIGHBITDEPTH
-void calc_highbd_psnr(const YV12_BUFFER_CONFIG *a,
- const YV12_BUFFER_CONFIG *b,
- PSNR_STATS *psnr,
- unsigned int bit_depth,
- unsigned int in_bit_depth) {
+void vpx_calc_highbd_psnr(const YV12_BUFFER_CONFIG *a,
+ const YV12_BUFFER_CONFIG *b,
+ PSNR_STATS *psnr, uint32_t bit_depth,
+ uint32_t in_bit_depth) {
const int widths[3] =
{ a->y_crop_width, a->uv_crop_width, a->uv_crop_width };
const int heights[3] =
#endif // !CONFIG_VP9_HIGHBITDEPTH
-void calc_psnr(const YV12_BUFFER_CONFIG *a, const YV12_BUFFER_CONFIG *b,
- PSNR_STATS *psnr) {
+void vpx_calc_psnr(const YV12_BUFFER_CONFIG *a, const YV12_BUFFER_CONFIG *b,
+ PSNR_STATS *psnr) {
static const double peak = 255.0;
const int widths[3] = {
a->y_crop_width, a->uv_crop_width, a->uv_crop_width };
#if CONFIG_VP9_HIGHBITDEPTH
int64_t vpx_highbd_get_y_sse(const YV12_BUFFER_CONFIG *a,
const YV12_BUFFER_CONFIG *b);
-void calc_highbd_psnr(const YV12_BUFFER_CONFIG *a,
+void vpx_calc_highbd_psnr(const YV12_BUFFER_CONFIG *a,
const YV12_BUFFER_CONFIG *b,
PSNR_STATS *psnr,
unsigned int bit_depth,
unsigned int in_bit_depth);
-int64_t highbd_get_sse_shift(const uint8_t *a8, int a_stride,
- const uint8_t *b8, int b_stride,
- int width, int height,
- unsigned int input_shift);
#endif
-void calc_psnr(const YV12_BUFFER_CONFIG *a,
+void vpx_calc_psnr(const YV12_BUFFER_CONFIG *a,
const YV12_BUFFER_CONFIG *b,
PSNR_STATS *psnr);
double *phvs_y, double *phvs_u,
double *phvs_v, uint32_t bd, uint32_t in_bd);
-int64_t highbd_get_sse(const uint8_t *a, int a_stride,
- const uint8_t *b, int b_stride,
- int width, int height);
#ifdef __cplusplus
} // extern "C"
#endif