summaryrefslogtreecommitdiff
path: root/vpx
diff options
context:
space:
mode:
authorYaowu Xu <yaowu@google.com>2016-06-24 12:44:23 -0700
committerYaowu Xu <yaowu@google.com>2016-06-24 13:52:50 -0700
commit003a9d20add4f736ff16fa58e51b5ca1bbf50ce0 (patch)
tree784f64307f1b7d3abd70cc5266f0a6fd65975077 /vpx
parent7ed1d54ab4b75037e90c46135cfe01b7dc47fa4d (diff)
downloadlibvpx-003a9d20add4f736ff16fa58e51b5ca1bbf50ce0.tar
libvpx-003a9d20add4f736ff16fa58e51b5ca1bbf50ce0.tar.gz
libvpx-003a9d20add4f736ff16fa58e51b5ca1bbf50ce0.tar.bz2
libvpx-003a9d20add4f736ff16fa58e51b5ca1bbf50ce0.zip
Port metric computation changes from nextgenv2
Change-Id: I4aceffcdf7af59ffeb51984f0345c3a4c7e76a9f
Diffstat (limited to 'vpx')
-rw-r--r--vpx/internal/vpx_psnr.h34
-rw-r--r--vpx/src/vpx_psnr.c24
-rw-r--r--vpx/vpx_codec.mk2
3 files changed, 0 insertions, 60 deletions
diff --git a/vpx/internal/vpx_psnr.h b/vpx/internal/vpx_psnr.h
deleted file mode 100644
index 07d81bb8d..000000000
--- a/vpx/internal/vpx_psnr.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2014 The WebM project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#ifndef VPX_INTERNAL_VPX_PSNR_H_
-#define VPX_INTERNAL_VPX_PSNR_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-// TODO(dkovalev) change vpx_sse_to_psnr signature: double -> int64_t
-
-/*!\brief Converts SSE to PSNR
- *
- * Converts sum of squared errros (SSE) to peak signal-to-noise ratio (PNSR).
- *
- * \param[in] samples Number of samples
- * \param[in] peak Max sample value
- * \param[in] sse Sum of squared errors
- */
-double vpx_sse_to_psnr(double samples, double peak, double sse);
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // VPX_INTERNAL_VPX_PSNR_H_
diff --git a/vpx/src/vpx_psnr.c b/vpx/src/vpx_psnr.c
deleted file mode 100644
index 05843acb6..000000000
--- a/vpx/src/vpx_psnr.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright (c) 2014 The WebM project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#include <math.h>
-
-#include "vpx/internal/vpx_psnr.h"
-
-#define MAX_PSNR 100.0
-
-double vpx_sse_to_psnr(double samples, double peak, double sse) {
- if (sse > 0.0) {
- const double psnr = 10.0 * log10(samples * peak * peak / sse);
- return psnr > MAX_PSNR ? MAX_PSNR : psnr;
- } else {
- return MAX_PSNR;
- }
-}
diff --git a/vpx/vpx_codec.mk b/vpx/vpx_codec.mk
index ccdef040c..b77f45817 100644
--- a/vpx/vpx_codec.mk
+++ b/vpx/vpx_codec.mk
@@ -36,10 +36,8 @@ API_SRCS-yes += vpx_decoder.h
API_SRCS-yes += src/vpx_encoder.c
API_SRCS-yes += vpx_encoder.h
API_SRCS-yes += internal/vpx_codec_internal.h
-API_SRCS-yes += internal/vpx_psnr.h
API_SRCS-yes += src/vpx_codec.c
API_SRCS-yes += src/vpx_image.c
-API_SRCS-yes += src/vpx_psnr.c
API_SRCS-yes += vpx_codec.h
API_SRCS-yes += vpx_codec.mk
API_SRCS-yes += vpx_frame_buffer.h