| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 encode_complete_callback_.reset(new Vp8UnitTestEncodeCompleteCallback( | 150 encode_complete_callback_.reset(new Vp8UnitTestEncodeCompleteCallback( |
| 151 &encoded_frame_, &codec_specific_info_, 0, nullptr)); | 151 &encoded_frame_, &codec_specific_info_, 0, nullptr)); |
| 152 decode_complete_callback_.reset( | 152 decode_complete_callback_.reset( |
| 153 new Vp8UnitTestDecodeCompleteCallback(&decoded_frame_, &decoded_qp_)); | 153 new Vp8UnitTestDecodeCompleteCallback(&decoded_frame_, &decoded_qp_)); |
| 154 encoder_->RegisterEncodeCompleteCallback(encode_complete_callback_.get()); | 154 encoder_->RegisterEncodeCompleteCallback(encode_complete_callback_.get()); |
| 155 decoder_->RegisterDecodeCompleteCallback(decode_complete_callback_.get()); | 155 decoder_->RegisterDecodeCompleteCallback(decode_complete_callback_.get()); |
| 156 // Using a QCIF image (aligned stride (u,v planes) > width). | 156 // Using a QCIF image (aligned stride (u,v planes) > width). |
| 157 // Processing only one frame. | 157 // Processing only one frame. |
| 158 source_file_ = fopen(test::ResourcePath("paris_qcif", "yuv").c_str(), "rb"); | 158 source_file_ = fopen(test::ResourcePath("paris_qcif", "yuv").c_str(), "rb"); |
| 159 ASSERT_TRUE(source_file_ != nullptr); | 159 ASSERT_TRUE(source_file_ != nullptr); |
| 160 rtc::scoped_refptr<VideoFrameBuffer> compact_buffer( | 160 rtc::scoped_refptr<I420BufferInterface> compact_buffer( |
| 161 test::ReadI420Buffer(kWidth, kHeight, source_file_)); | 161 test::ReadI420Buffer(kWidth, kHeight, source_file_)); |
| 162 ASSERT_TRUE(compact_buffer); | 162 ASSERT_TRUE(compact_buffer); |
| 163 codec_settings_.width = kWidth; | 163 codec_settings_.width = kWidth; |
| 164 codec_settings_.height = kHeight; | 164 codec_settings_.height = kHeight; |
| 165 const int kFramerate = 30; | 165 const int kFramerate = 30; |
| 166 codec_settings_.maxFramerate = kFramerate; | 166 codec_settings_.maxFramerate = kFramerate; |
| 167 // Setting aligned stride values. | 167 // Setting aligned stride values. |
| 168 int stride_uv; | 168 int stride_uv; |
| 169 int stride_y; | 169 int stride_y; |
| 170 Calc16ByteAlignedStride(codec_settings_.width, &stride_y, &stride_uv); | 170 Calc16ByteAlignedStride(codec_settings_.width, &stride_y, &stride_uv); |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 // Temporal layer 1. | 427 // Temporal layer 1. |
| 428 input_frame_->set_timestamp(input_frame_->timestamp() + | 428 input_frame_->set_timestamp(input_frame_->timestamp() + |
| 429 kTimestampIncrementPerFrame); | 429 kTimestampIncrementPerFrame); |
| 430 EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, | 430 EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, |
| 431 encoder_->Encode(*input_frame_, nullptr, nullptr)); | 431 encoder_->Encode(*input_frame_, nullptr, nullptr)); |
| 432 ExpectFrameWith((picture_id + 7) % (1 << 15), (tl0_pic_idx + 3) % (1 << 8), | 432 ExpectFrameWith((picture_id + 7) % (1 << 15), (tl0_pic_idx + 3) % (1 << 8), |
| 433 1); | 433 1); |
| 434 } | 434 } |
| 435 | 435 |
| 436 } // namespace webrtc | 436 } // namespace webrtc |
| OLD | NEW |