Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(593)

Side by Side Diff: source/libvpx/test/pp_filter_test.cc

Issue 11974002: libvpx: Pull from upstream (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « source/libvpx/test/intrapred_test.cc ('k') | source/libvpx/test/register_state_check.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebM project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 #include "test/register_state_check.h"
10 #include "third_party/googletest/src/include/gtest/gtest.h" 11 #include "third_party/googletest/src/include/gtest/gtest.h"
11 extern "C" { 12 extern "C" {
12 #include "vpx_config.h" 13 #include "vpx_config.h"
13 #include "vp8_rtcd.h" 14 #include "vp8_rtcd.h"
14 #include "vpx/vpx_integer.h" 15 #include "vpx/vpx_integer.h"
15 #include "vpx_mem/vpx_mem.h" 16 #include "vpx_mem/vpx_mem.h"
16 } 17 }
17 18
18 typedef void (*post_proc_func_t)(unsigned char *src_ptr, 19 typedef void (*post_proc_func_t)(unsigned char *src_ptr,
19 unsigned char *dst_ptr, 20 unsigned char *dst_ptr,
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 for (int i = 0; i < block_height; ++i) { 68 for (int i = 0; i < block_height; ++i) {
68 for (int j = 0; j < block_width; ++j) { 69 for (int j = 0; j < block_width; ++j) {
69 pixel_ptr[j] = 1; 70 pixel_ptr[j] = 1;
70 } 71 }
71 pixel_ptr += input_stride; 72 pixel_ptr += input_stride;
72 } 73 }
73 74
74 // Initialize pixels in the output to 99. 75 // Initialize pixels in the output to 99.
75 (void)vpx_memset(dst_image, 99, output_size); 76 (void)vpx_memset(dst_image, 99, output_size);
76 77
77 GetParam()(src_image_ptr, dst_image_ptr, input_stride, 78 REGISTER_STATE_CHECK(GetParam()(src_image_ptr, dst_image_ptr, input_stride,
78 output_stride, block_width, flimits, 16); 79 output_stride, block_width, flimits, 16));
79 80
80 static const uint8_t expected_data[block_height] = { 81 static const uint8_t expected_data[block_height] = {
81 4, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 4 82 4, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 4
82 }; 83 };
83 84
84 pixel_ptr = dst_image_ptr; 85 pixel_ptr = dst_image_ptr;
85 for (int i = 0; i < block_height; ++i) { 86 for (int i = 0; i < block_height; ++i) {
86 for (int j = 0; j < block_width; ++j) { 87 for (int j = 0; j < block_width; ++j) {
87 EXPECT_EQ(expected_data[i], pixel_ptr[j]) 88 EXPECT_EQ(expected_data[i], pixel_ptr[j])
88 << "Vp8PostProcessingFilterTest failed with invalid filter output"; 89 << "Vp8PostProcessingFilterTest failed with invalid filter output";
89 } 90 }
90 pixel_ptr += output_stride; 91 pixel_ptr += output_stride;
91 } 92 }
92 93
93 vpx_free(src_image); 94 vpx_free(src_image);
94 vpx_free(dst_image); 95 vpx_free(dst_image);
95 vpx_free(flimits); 96 vpx_free(flimits);
96 }; 97 };
97 98
98 INSTANTIATE_TEST_CASE_P(C, Vp8PostProcessingFilterTest, 99 INSTANTIATE_TEST_CASE_P(C, Vp8PostProcessingFilterTest,
99 ::testing::Values(vp8_post_proc_down_and_across_mb_row_c)); 100 ::testing::Values(vp8_post_proc_down_and_across_mb_row_c));
100 101
101 #if HAVE_SSE2 102 #if HAVE_SSE2
102 INSTANTIATE_TEST_CASE_P(SSE2, Vp8PostProcessingFilterTest, 103 INSTANTIATE_TEST_CASE_P(SSE2, Vp8PostProcessingFilterTest,
103 ::testing::Values(vp8_post_proc_down_and_across_mb_row_sse2)); 104 ::testing::Values(vp8_post_proc_down_and_across_mb_row_sse2));
104 #endif 105 #endif
105 106
106 } // namespace 107 } // namespace
OLDNEW
« no previous file with comments | « source/libvpx/test/intrapred_test.cc ('k') | source/libvpx/test/register_state_check.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698