Merge "pp_filter_test.cc,cosmetics:adjust name convention"
This commit is contained in:
commit
cb5a2ac920
@ -7,22 +7,23 @@
|
|||||||
* in the file PATENTS. All contributing project authors may
|
* in the file PATENTS. All contributing project authors may
|
||||||
* be found in the AUTHORS file in the root of the source tree.
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
*/
|
*/
|
||||||
|
#include "./vpx_config.h"
|
||||||
|
#include "./vpx_dsp_rtcd.h"
|
||||||
|
#include "test/acm_random.h"
|
||||||
#include "test/clear_system_state.h"
|
#include "test/clear_system_state.h"
|
||||||
#include "test/register_state_check.h"
|
#include "test/register_state_check.h"
|
||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
#include "./vpx_config.h"
|
|
||||||
#include "./vpx_dsp_rtcd.h"
|
|
||||||
#include "vpx/vpx_integer.h"
|
#include "vpx/vpx_integer.h"
|
||||||
#include "vpx_mem/vpx_mem.h"
|
#include "vpx_mem/vpx_mem.h"
|
||||||
|
|
||||||
typedef void (*PostProcFunc)(unsigned char *src_ptr, unsigned char *dst_ptr,
|
typedef void (*VpxPostProcDownAndAcrossMbRowFunc)(
|
||||||
int src_pixels_per_line, int dst_pixels_per_line,
|
unsigned char *src_ptr, unsigned char *dst_ptr, int src_pixels_per_line,
|
||||||
int cols, unsigned char *flimit, int size);
|
int dst_pixels_per_line, int cols, unsigned char *flimit, int size);
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
class VPxPostProcessingFilterTest
|
class VpxPostProcDownAndAcrossMbRowTest
|
||||||
: public ::testing::TestWithParam<PostProcFunc> {
|
: public ::testing::TestWithParam<VpxPostProcDownAndAcrossMbRowFunc> {
|
||||||
public:
|
public:
|
||||||
virtual void TearDown() { libvpx_test::ClearSystemState(); }
|
virtual void TearDown() { libvpx_test::ClearSystemState(); }
|
||||||
};
|
};
|
||||||
@ -30,7 +31,7 @@ class VPxPostProcessingFilterTest
|
|||||||
// Test routine for the VPx post-processing function
|
// Test routine for the VPx post-processing function
|
||||||
// vpx_post_proc_down_and_across_mb_row_c.
|
// vpx_post_proc_down_and_across_mb_row_c.
|
||||||
|
|
||||||
TEST_P(VPxPostProcessingFilterTest, FilterOutputCheck) {
|
TEST_P(VpxPostProcDownAndAcrossMbRowTest, CheckFilterOutput) {
|
||||||
// Size of the underlying data block that will be filtered.
|
// Size of the underlying data block that will be filtered.
|
||||||
const int block_width = 16;
|
const int block_width = 16;
|
||||||
const int block_height = 16;
|
const int block_height = 16;
|
||||||
@ -78,14 +79,14 @@ TEST_P(VPxPostProcessingFilterTest, FilterOutputCheck) {
|
|||||||
input_stride, output_stride, block_width,
|
input_stride, output_stride, block_width,
|
||||||
flimits, 16));
|
flimits, 16));
|
||||||
|
|
||||||
static const uint8_t expected_data[block_height] = { 4, 3, 1, 1, 1, 1, 1, 1,
|
static const uint8_t kExpectedOutput[block_height] = {
|
||||||
1, 1, 1, 1, 1, 1, 3, 4 };
|
4, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 4
|
||||||
|
};
|
||||||
|
|
||||||
pixel_ptr = dst_image_ptr;
|
pixel_ptr = dst_image_ptr;
|
||||||
for (int i = 0; i < block_height; ++i) {
|
for (int i = 0; i < block_height; ++i) {
|
||||||
for (int j = 0; j < block_width; ++j) {
|
for (int j = 0; j < block_width; ++j) {
|
||||||
EXPECT_EQ(expected_data[i], pixel_ptr[j])
|
ASSERT_EQ(kExpectedOutput[i], pixel_ptr[j]);
|
||||||
<< "VPxPostProcessingFilterTest failed with invalid filter output";
|
|
||||||
}
|
}
|
||||||
pixel_ptr += output_stride;
|
pixel_ptr += output_stride;
|
||||||
}
|
}
|
||||||
@ -96,18 +97,18 @@ TEST_P(VPxPostProcessingFilterTest, FilterOutputCheck) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
C, VPxPostProcessingFilterTest,
|
C, VpxPostProcDownAndAcrossMbRowTest,
|
||||||
::testing::Values(vpx_post_proc_down_and_across_mb_row_c));
|
::testing::Values(vpx_post_proc_down_and_across_mb_row_c));
|
||||||
|
|
||||||
#if HAVE_SSE2
|
#if HAVE_SSE2
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSE2, VPxPostProcessingFilterTest,
|
SSE2, VpxPostProcDownAndAcrossMbRowTest,
|
||||||
::testing::Values(vpx_post_proc_down_and_across_mb_row_sse2));
|
::testing::Values(vpx_post_proc_down_and_across_mb_row_sse2));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_MSA
|
#if HAVE_MSA
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
MSA, VPxPostProcessingFilterTest,
|
MSA, VpxPostProcDownAndAcrossMbRowTest,
|
||||||
::testing::Values(vpx_post_proc_down_and_across_mb_row_msa));
|
::testing::Values(vpx_post_proc_down_and_across_mb_row_msa));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user