From 003a9d20add4f736ff16fa58e51b5ca1bbf50ce0 Mon Sep 17 00:00:00 2001 From: Yaowu Xu Date: Fri, 24 Jun 2016 12:44:23 -0700 Subject: Port metric computation changes from nextgenv2 Change-Id: I4aceffcdf7af59ffeb51984f0345c3a4c7e76a9f --- vpx/internal/vpx_psnr.h | 34 ---------------------------------- vpx/src/vpx_psnr.c | 24 ------------------------ vpx/vpx_codec.mk | 2 -- 3 files changed, 60 deletions(-) delete mode 100644 vpx/internal/vpx_psnr.h delete mode 100644 vpx/src/vpx_psnr.c (limited to 'vpx') 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 - -#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 -- cgit v1.2.3