Commit a488727f authored by Tom Finegan's avatar Tom Finegan

Remove CONFIG_AV1_TEMPORAL_DENOISING.

Clean up. Remove dead experiment/whatever.

Change-Id: I03cae9c9240e917595aa4a38b1d6d29a2ec19115
parent e0578d1e
......@@ -579,9 +579,6 @@ set(AOM_UNIT_TEST_SOURCES
"${AOM_ROOT}/test/decode_api_test.cc"
"${AOM_ROOT}/test/decode_test_driver.cc"
"${AOM_ROOT}/test/decode_test_driver.h"
# commented out in test.mk, requires CONFIG_AV1_TEMPORAL_DENOISING and
# HAVE_SSE2
#"${AOM_ROOT}/test/denoiser_sse2_test.cc"
"${AOM_ROOT}/test/divu_small_test.cc"
"${AOM_ROOT}/test/encode_api_test.cc"
"${AOM_ROOT}/test/encode_test_driver.cc"
......
......@@ -67,7 +67,6 @@ CONFIG_DECODE_PERF_TESTS equ ${CONFIG_DECODE_PERF_TESTS}
CONFIG_ENCODE_PERF_TESTS equ ${CONFIG_ENCODE_PERF_TESTS}
CONFIG_MULTI_RES_ENCODING equ ${CONFIG_MULTI_RES_ENCODING}
CONFIG_TEMPORAL_DENOISING equ ${CONFIG_TEMPORAL_DENOISING}
CONFIG_AV1_TEMPORAL_DENOISING equ ${CONFIG_AV1_TEMPORAL_DENOISING}
CONFIG_COEFFICIENT_RANGE_CHECKING equ ${CONFIG_COEFFICIENT_RANGE_CHECKING}
CONFIG_AOM_HIGHBITDEPTH equ ${CONFIG_AOM_HIGHBITDEPTH}
CONFIG_BETTER_HW_COMPATIBILITY equ ${CONFIG_BETTER_HW_COMPATIBILITY}
......
......@@ -84,7 +84,6 @@
#define CONFIG_ENCODE_PERF_TESTS ${CONFIG_ENCODE_PERF_TESTS}
#define CONFIG_MULTI_RES_ENCODING ${CONFIG_MULTI_RES_ENCODING}
#define CONFIG_TEMPORAL_DENOISING ${CONFIG_TEMPORAL_DENOISING}
#define CONFIG_AV1_TEMPORAL_DENOISING ${CONFIG_AV1_TEMPORAL_DENOISING}
#define CONFIG_COEFFICIENT_RANGE_CHECKING ${CONFIG_COEFFICIENT_RANGE_CHECKING}
#define CONFIG_AOM_HIGHBITDEPTH ${CONFIG_AOM_HIGHBITDEPTH}
#define CONFIG_BETTER_HW_COMPATIBILITY ${CONFIG_BETTER_HW_COMPATIBILITY}
......
......@@ -84,7 +84,6 @@ set(CONFIG_DECODE_PERF_TESTS 0 CACHE BOOL "Internal flag.")
set(CONFIG_ENCODE_PERF_TESTS 0 CACHE BOOL "Internal flag.")
set(CONFIG_MULTI_RES_ENCODING 0 CACHE BOOL "Internal flag.")
set(CONFIG_TEMPORAL_DENOISING 1 CACHE BOOL "Internal flag.")
set(CONFIG_AV1_TEMPORAL_DENOISING 0 CACHE BOOL "Internal flag.")
set(CONFIG_COEFFICIENT_RANGE_CHECKING 0 CACHE BOOL "Internal flag.")
set(CONFIG_AOM_HIGHBITDEPTH 0 CACHE BOOL "Internal flag.")
set(CONFIG_BETTER_HW_COMPATIBILITY 0 CACHE BOOL "Internal flag.")
......
/*
* Copyright (c) 2016, Alliance for Open Media. All rights reserved
*
* This source code is subject to the terms of the BSD 2 Clause License and
* the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
* was not distributed with this source code in the LICENSE file, you can
* obtain it at www.aomedia.org/license/software. If the Alliance for Open
* Media Patent License 1.0 was not distributed with this source code in the
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "test/acm_random.h"
#include "test/clear_system_state.h"
#include "test/register_state_check.h"
#include "test/util.h"
#include "aom_scale/yv12config.h"
#include "aom/aom_integer.h"
#include "av1/common/reconinter.h"
#include "av1/encoder/context_tree.h"
#include "av1/encoder/denoiser.h"
using libaom_test::ACMRandom;
namespace {
const int kNumPixels = 64 * 64;
class AV1DenoiserTest : public ::testing::TestWithParam<BLOCK_SIZE> {
public:
virtual ~AV1DenoiserTest() {}
virtual void SetUp() { bs_ = GetParam(); }
virtual void TearDown() { libaom_test::ClearSystemState(); }
protected:
BLOCK_SIZE bs_;
};
TEST_P(AV1DenoiserTest, BitexactCheck) {
ACMRandom rnd(ACMRandom::DeterministicSeed());
const int count_test_block = 4000;
// Allocate the space for input and output,
// where sig_block is the block to be denoised,
// mc_avg_block is the denoised reference block,
// avg_block_c is the denoised result from C code,
// avg_block_sse2 is the denoised result from SSE2 code.
DECLARE_ALIGNED(16, uint8_t, sig_block[kNumPixels]);
DECLARE_ALIGNED(16, uint8_t, mc_avg_block[kNumPixels]);
DECLARE_ALIGNED(16, uint8_t, avg_block_c[kNumPixels]);
DECLARE_ALIGNED(16, uint8_t, avg_block_sse2[kNumPixels]);
for (int i = 0; i < count_test_block; ++i) {
// Generate random motion magnitude, 20% of which exceed the threshold.
const int motion_magnitude_random =
rnd.Rand8() % static_cast<int>(MOTION_MAGNITUDE_THRESHOLD * 1.2);
// Initialize a test block with random number in range [0, 255].
for (int j = 0; j < kNumPixels; ++j) {
int temp = 0;
sig_block[j] = rnd.Rand8();
// The pixels in mc_avg_block are generated by adding a random
// number in range [-19, 19] to corresponding pixels in sig_block.
temp =
sig_block[j] + ((rnd.Rand8() % 2 == 0) ? -1 : 1) * (rnd.Rand8() % 20);
// Clip.
mc_avg_block[j] = (temp < 0) ? 0 : ((temp > 255) ? 255 : temp);
}
ASM_REGISTER_STATE_CHECK(av1_denoiser_filter_c(sig_block, 64, mc_avg_block,
64, avg_block_c, 64, 0, bs_,
motion_magnitude_random));
ASM_REGISTER_STATE_CHECK(av1_denoiser_filter_sse2(
sig_block, 64, mc_avg_block, 64, avg_block_sse2, 64, 0, bs_,
motion_magnitude_random));
// Test bitexactness.
for (int h = 0; h < block_size_high[bs_]; ++h) {
for (int w = 0; w < block_size_wide[bs_]; ++w) {
EXPECT_EQ(avg_block_c[h * 64 + w], avg_block_sse2[h * 64 + w]);
}
}
}
}
// Test for all block size.
INSTANTIATE_TEST_CASE_P(SSE2, AV1DenoiserTest,
::testing::Values(BLOCK_8X8, BLOCK_8X16, BLOCK_16X8,
BLOCK_16X16, BLOCK_16X32, BLOCK_32X16,
BLOCK_32X32, BLOCK_32X64, BLOCK_64X32,
BLOCK_64X64));
} // namespace
......@@ -143,10 +143,6 @@ LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += variance_test.cc
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += error_block_test.cc
#LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_quantize_test.cc
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += subtract_test.cc
ifeq ($(CONFIG_AV1_ENCODER)$(CONFIG_AV1_TEMPORAL_DENOISING),yesyes)
#LIBAOM_TEST_SRCS-$(HAVE_SSE2) += denoiser_sse2_test.cc
endif
LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += arf_freq_test.cc
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment