OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 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 |
(...skipping 11 matching lines...) Expand all Loading... |
22 namespace { | 22 namespace { |
23 class TileIndependenceTest : public ::libvpx_test::EncoderTest, | 23 class TileIndependenceTest : public ::libvpx_test::EncoderTest, |
24 public ::libvpx_test::CodecTestWithParam<int> { | 24 public ::libvpx_test::CodecTestWithParam<int> { |
25 protected: | 25 protected: |
26 TileIndependenceTest() | 26 TileIndependenceTest() |
27 : EncoderTest(GET_PARAM(0)), | 27 : EncoderTest(GET_PARAM(0)), |
28 md5_fw_order_(), | 28 md5_fw_order_(), |
29 md5_inv_order_(), | 29 md5_inv_order_(), |
30 n_tiles_(GET_PARAM(1)) { | 30 n_tiles_(GET_PARAM(1)) { |
31 init_flags_ = VPX_CODEC_USE_PSNR; | 31 init_flags_ = VPX_CODEC_USE_PSNR; |
32 vpx_codec_dec_cfg_t cfg; | 32 vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t(); |
33 cfg.w = 704; | 33 cfg.w = 704; |
34 cfg.h = 144; | 34 cfg.h = 144; |
35 cfg.threads = 1; | 35 cfg.threads = 1; |
36 fw_dec_ = codec_->CreateDecoder(cfg, 0); | 36 fw_dec_ = codec_->CreateDecoder(cfg, 0); |
37 inv_dec_ = codec_->CreateDecoder(cfg, 0); | 37 inv_dec_ = codec_->CreateDecoder(cfg, 0); |
38 inv_dec_->Control(VP9_INVERT_TILE_DECODE_ORDER, 1); | 38 inv_dec_->Control(VP9_INVERT_TILE_DECODE_ORDER, 1); |
39 } | 39 } |
40 | 40 |
41 virtual ~TileIndependenceTest() { | 41 virtual ~TileIndependenceTest() { |
42 delete fw_dec_; | 42 delete fw_dec_; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 | 98 |
99 // could use ASSERT_EQ(!memcmp(.., .., 16) here, but this gives nicer | 99 // could use ASSERT_EQ(!memcmp(.., .., 16) here, but this gives nicer |
100 // output if it fails. Not sure if it's helpful since it's really just | 100 // output if it fails. Not sure if it's helpful since it's really just |
101 // a MD5... | 101 // a MD5... |
102 ASSERT_STREQ(md5_fw_str, md5_inv_str); | 102 ASSERT_STREQ(md5_fw_str, md5_inv_str); |
103 } | 103 } |
104 | 104 |
105 VP9_INSTANTIATE_TEST_CASE(TileIndependenceTest, ::testing::Range(0, 2, 1)); | 105 VP9_INSTANTIATE_TEST_CASE(TileIndependenceTest, ::testing::Range(0, 2, 1)); |
106 | 106 |
107 } // namespace | 107 } // namespace |
OLD | NEW |