| OLD | NEW |
| 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 | 10 |
| 11 | 11 |
| 12 #include <string.h> | 12 #include <string.h> |
| 13 #include "test/acm_random.h" | 13 #include "test/acm_random.h" |
| 14 #include "test/register_state_check.h" |
| 14 #include "third_party/googletest/src/include/gtest/gtest.h" | 15 #include "third_party/googletest/src/include/gtest/gtest.h" |
| 15 extern "C" { | 16 extern "C" { |
| 16 #include "vpx_config.h" | 17 #include "vpx_config.h" |
| 17 #include "vp8_rtcd.h" | 18 #include "vp8_rtcd.h" |
| 18 #include "vp8/common/blockd.h" | 19 #include "vp8/common/blockd.h" |
| 19 #include "vpx_mem/vpx_mem.h" | 20 #include "vpx_mem/vpx_mem.h" |
| 20 } | 21 } |
| 21 | 22 |
| 22 namespace { | 23 namespace { |
| 23 | 24 |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 // We use 17 lines so we have one line above us for top-prediction. | 240 // We use 17 lines so we have one line above us for top-prediction. |
| 240 static const int kDataBufferSize = kStride * (kBlockSize + 1); | 241 static const int kDataBufferSize = kStride * (kBlockSize + 1); |
| 241 | 242 |
| 242 virtual void SetUp() { | 243 virtual void SetUp() { |
| 243 pred_fn_ = GetParam(); | 244 pred_fn_ = GetParam(); |
| 244 SetupMacroblock(data_array_, kBlockSize, kStride, 1); | 245 SetupMacroblock(data_array_, kBlockSize, kStride, 1); |
| 245 } | 246 } |
| 246 | 247 |
| 247 virtual void Predict(MB_PREDICTION_MODE mode) { | 248 virtual void Predict(MB_PREDICTION_MODE mode) { |
| 248 mb_.mode_info_context->mbmi.mode = mode; | 249 mb_.mode_info_context->mbmi.mode = mode; |
| 249 pred_fn_(&mb_, data_ptr_[0] - kStride, data_ptr_[0] - 1, kStride, | 250 REGISTER_STATE_CHECK(pred_fn_(&mb_, |
| 250 data_ptr_[0], kStride); | 251 data_ptr_[0] - kStride, |
| 252 data_ptr_[0] - 1, kStride, |
| 253 data_ptr_[0], kStride)); |
| 251 } | 254 } |
| 252 | 255 |
| 253 intra_pred_y_fn_t pred_fn_; | 256 intra_pred_y_fn_t pred_fn_; |
| 254 static uint8_t* data_array_; | 257 static uint8_t* data_array_; |
| 255 }; | 258 }; |
| 256 | 259 |
| 257 uint8_t* IntraPredYTest::data_array_ = NULL; | 260 uint8_t* IntraPredYTest::data_array_ = NULL; |
| 258 | 261 |
| 259 TEST_P(IntraPredYTest, IntraPredTests) { | 262 TEST_P(IntraPredYTest, IntraPredTests) { |
| 260 RunTest(); | 263 RunTest(); |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 ::testing::Values( | 348 ::testing::Values( |
| 346 vp8_build_intra_predictors_mbuv_s_sse2)); | 349 vp8_build_intra_predictors_mbuv_s_sse2)); |
| 347 #endif | 350 #endif |
| 348 #if HAVE_SSSE3 | 351 #if HAVE_SSSE3 |
| 349 INSTANTIATE_TEST_CASE_P(SSSE3, IntraPredUVTest, | 352 INSTANTIATE_TEST_CASE_P(SSSE3, IntraPredUVTest, |
| 350 ::testing::Values( | 353 ::testing::Values( |
| 351 vp8_build_intra_predictors_mbuv_s_ssse3)); | 354 vp8_build_intra_predictors_mbuv_s_ssse3)); |
| 352 #endif | 355 #endif |
| 353 | 356 |
| 354 } // namespace | 357 } // namespace |
| OLD | NEW |