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

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

Issue 111463005: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 7 years 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/lru_frame_buffer_test.cc ('k') | source/libvpx/test/svc_test.cc » ('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) 2013 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 10
11 #include <math.h> 11 #include <math.h>
12 #include <stdlib.h> 12 #include <stdlib.h>
13 #include <string.h> 13 #include <string.h>
14 #include "test/acm_random.h" 14 #include "test/acm_random.h"
15 #include "test/clear_system_state.h" 15 #include "test/clear_system_state.h"
16 #include "test/register_state_check.h" 16 #include "test/register_state_check.h"
17 #include "test/util.h" 17 #include "test/util.h"
18 #include "third_party/googletest/src/include/gtest/gtest.h" 18 #include "third_party/googletest/src/include/gtest/gtest.h"
19 extern "C" { 19 extern "C" {
20 #include "./vpx_config.h" 20 #include "./vpx_config.h"
21 #include "./vp8_rtcd.h" 21 #include "./vp8_rtcd.h"
22 #include "vpx/vpx_integer.h" 22 #include "vpx/vpx_integer.h"
23 #include "vpx_mem/vpx_mem.h" 23 #include "vpx_mem/vpx_mem.h"
24 } 24 }
25 25
26 namespace { 26 namespace {
27 27
28 typedef void (*sixtap_predict_fn_t)(uint8_t *src_ptr, 28 typedef void (*sixtap_predict_fn_t)(uint8_t *src_ptr,
29 int src_pixels_per_line, 29 int src_pixels_per_line,
30 int xoffset, 30 int xoffset,
31 int yoffset, 31 int yoffset,
32 uint8_t *dst_ptr, 32 uint8_t *dst_ptr,
33 int dst_pitch); 33 int dst_pitch);
34 34
35 class SixtapPredictTest : public PARAMS(int, int, sixtap_predict_fn_t) { 35 typedef std::tr1::tuple<int, int, sixtap_predict_fn_t> sixtap_predict_param_t;
36
37 class SixtapPredictTest
38 : public ::testing::TestWithParam<sixtap_predict_param_t> {
36 public: 39 public:
37 static void SetUpTestCase() { 40 static void SetUpTestCase() {
38 src_ = reinterpret_cast<uint8_t*>(vpx_memalign(kDataAlignment, kSrcSize)); 41 src_ = reinterpret_cast<uint8_t*>(vpx_memalign(kDataAlignment, kSrcSize));
39 dst_ = reinterpret_cast<uint8_t*>(vpx_memalign(kDataAlignment, kDstSize)); 42 dst_ = reinterpret_cast<uint8_t*>(vpx_memalign(kDataAlignment, kDstSize));
40 dst_c_ = reinterpret_cast<uint8_t*>(vpx_memalign(kDataAlignment, kDstSize)); 43 dst_c_ = reinterpret_cast<uint8_t*>(vpx_memalign(kDataAlignment, kDstSize));
41 } 44 }
42 45
43 static void TearDownTestCase() { 46 static void TearDownTestCase() {
44 vpx_free(src_); 47 vpx_free(src_);
45 src_ = NULL; 48 src_ = NULL;
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 const sixtap_predict_fn_t sixtap_8x4_ssse3 = vp8_sixtap_predict8x4_ssse3; 223 const sixtap_predict_fn_t sixtap_8x4_ssse3 = vp8_sixtap_predict8x4_ssse3;
221 const sixtap_predict_fn_t sixtap_4x4_ssse3 = vp8_sixtap_predict4x4_ssse3; 224 const sixtap_predict_fn_t sixtap_4x4_ssse3 = vp8_sixtap_predict4x4_ssse3;
222 INSTANTIATE_TEST_CASE_P( 225 INSTANTIATE_TEST_CASE_P(
223 SSSE3, SixtapPredictTest, ::testing::Values( 226 SSSE3, SixtapPredictTest, ::testing::Values(
224 make_tuple(16, 16, sixtap_16x16_ssse3), 227 make_tuple(16, 16, sixtap_16x16_ssse3),
225 make_tuple(8, 8, sixtap_8x8_ssse3), 228 make_tuple(8, 8, sixtap_8x8_ssse3),
226 make_tuple(8, 4, sixtap_8x4_ssse3), 229 make_tuple(8, 4, sixtap_8x4_ssse3),
227 make_tuple(4, 4, sixtap_4x4_ssse3))); 230 make_tuple(4, 4, sixtap_4x4_ssse3)));
228 #endif 231 #endif
229 } // namespace 232 } // namespace
OLDNEW
« no previous file with comments | « source/libvpx/test/lru_frame_buffer_test.cc ('k') | source/libvpx/test/svc_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698