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

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

Issue 390713002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: libvpx: Pull from upstream Created 6 years, 5 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/postproc.sh ('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/clear_system_state.h" 10 #include "test/clear_system_state.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 for (int i = 0; i < block_height; ++i) { 73 for (int i = 0; i < block_height; ++i) {
74 for (int j = 0; j < block_width; ++j) { 74 for (int j = 0; j < block_width; ++j) {
75 pixel_ptr[j] = 1; 75 pixel_ptr[j] = 1;
76 } 76 }
77 pixel_ptr += input_stride; 77 pixel_ptr += input_stride;
78 } 78 }
79 79
80 // Initialize pixels in the output to 99. 80 // Initialize pixels in the output to 99.
81 (void)vpx_memset(dst_image, 99, output_size); 81 (void)vpx_memset(dst_image, 99, output_size);
82 82
83 REGISTER_STATE_CHECK(GetParam()(src_image_ptr, dst_image_ptr, input_stride, 83 ASM_REGISTER_STATE_CHECK(
84 output_stride, block_width, flimits, 16)); 84 GetParam()(src_image_ptr, dst_image_ptr, input_stride,
85 output_stride, block_width, flimits, 16));
85 86
86 static const uint8_t expected_data[block_height] = { 87 static const uint8_t expected_data[block_height] = {
87 4, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 4 88 4, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 4
88 }; 89 };
89 90
90 pixel_ptr = dst_image_ptr; 91 pixel_ptr = dst_image_ptr;
91 for (int i = 0; i < block_height; ++i) { 92 for (int i = 0; i < block_height; ++i) {
92 for (int j = 0; j < block_width; ++j) { 93 for (int j = 0; j < block_width; ++j) {
93 EXPECT_EQ(expected_data[i], pixel_ptr[j]) 94 EXPECT_EQ(expected_data[i], pixel_ptr[j])
94 << "VP8PostProcessingFilterTest failed with invalid filter output"; 95 << "VP8PostProcessingFilterTest failed with invalid filter output";
95 } 96 }
96 pixel_ptr += output_stride; 97 pixel_ptr += output_stride;
97 } 98 }
98 99
99 vpx_free(src_image); 100 vpx_free(src_image);
100 vpx_free(dst_image); 101 vpx_free(dst_image);
101 vpx_free(flimits); 102 vpx_free(flimits);
102 }; 103 };
103 104
104 INSTANTIATE_TEST_CASE_P(C, VP8PostProcessingFilterTest, 105 INSTANTIATE_TEST_CASE_P(C, VP8PostProcessingFilterTest,
105 ::testing::Values(vp8_post_proc_down_and_across_mb_row_c)); 106 ::testing::Values(vp8_post_proc_down_and_across_mb_row_c));
106 107
107 #if HAVE_SSE2 108 #if HAVE_SSE2
108 INSTANTIATE_TEST_CASE_P(SSE2, VP8PostProcessingFilterTest, 109 INSTANTIATE_TEST_CASE_P(SSE2, VP8PostProcessingFilterTest,
109 ::testing::Values(vp8_post_proc_down_and_across_mb_row_sse2)); 110 ::testing::Values(vp8_post_proc_down_and_across_mb_row_sse2));
110 #endif 111 #endif
111 112
112 } // namespace 113 } // namespace
OLDNEW
« no previous file with comments | « source/libvpx/test/postproc.sh ('k') | source/libvpx/test/register_state_check.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698