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 #include "./vpx_config.h" | 10 #include "./vpx_config.h" |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 denoiser_on_ ^= 1; | 363 denoiser_on_ ^= 1; |
364 } | 364 } |
365 } | 365 } |
366 | 366 |
367 encoder->Control(VP9E_SET_NOISE_SENSITIVITY, denoiser_on_); | 367 encoder->Control(VP9E_SET_NOISE_SENSITIVITY, denoiser_on_); |
368 | 368 |
369 if (cfg_.ts_number_layers > 1) { | 369 if (cfg_.ts_number_layers > 1) { |
370 if (video->frame() == 0) { | 370 if (video->frame() == 0) { |
371 encoder->Control(VP9E_SET_SVC, 1); | 371 encoder->Control(VP9E_SET_SVC, 1); |
372 } | 372 } |
373 vpx_svc_layer_id_t layer_id = {0, 0}; | 373 vpx_svc_layer_id_t layer_id; |
| 374 #if VPX_ENCODER_ABI_VERSION > (4 + VPX_CODEC_ABI_VERSION) |
374 layer_id.spatial_layer_id = 0; | 375 layer_id.spatial_layer_id = 0; |
| 376 #endif |
375 frame_flags_ = SetFrameFlags(video->frame(), cfg_.ts_number_layers); | 377 frame_flags_ = SetFrameFlags(video->frame(), cfg_.ts_number_layers); |
376 layer_id.temporal_layer_id = SetLayerId(video->frame(), | 378 layer_id.temporal_layer_id = SetLayerId(video->frame(), |
377 cfg_.ts_number_layers); | 379 cfg_.ts_number_layers); |
378 encoder->Control(VP9E_SET_SVC_LAYER_ID, &layer_id); | 380 encoder->Control(VP9E_SET_SVC_LAYER_ID, &layer_id); |
379 } | 381 } |
380 const vpx_rational_t tb = video->timebase(); | 382 const vpx_rational_t tb = video->timebase(); |
381 timebase_ = static_cast<double>(tb.num) / tb.den; | 383 timebase_ = static_cast<double>(tb.num) / tb.den; |
382 duration_ = 0; | 384 duration_ = 0; |
383 } | 385 } |
384 | 386 |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
734 << " The datarate for the file is greater than target by too much!"; | 736 << " The datarate for the file is greater than target by too much!"; |
735 } | 737 } |
736 #endif // CONFIG_VP9_TEMPORAL_DENOISING | 738 #endif // CONFIG_VP9_TEMPORAL_DENOISING |
737 | 739 |
738 VP8_INSTANTIATE_TEST_CASE(DatarateTestLarge, ALL_TEST_MODES); | 740 VP8_INSTANTIATE_TEST_CASE(DatarateTestLarge, ALL_TEST_MODES); |
739 VP9_INSTANTIATE_TEST_CASE(DatarateTestVP9Large, | 741 VP9_INSTANTIATE_TEST_CASE(DatarateTestVP9Large, |
740 ::testing::Values(::libvpx_test::kOnePassGood, | 742 ::testing::Values(::libvpx_test::kOnePassGood, |
741 ::libvpx_test::kRealTime), | 743 ::libvpx_test::kRealTime), |
742 ::testing::Range(2, 7)); | 744 ::testing::Range(2, 7)); |
743 } // namespace | 745 } // namespace |
OLD | NEW |