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

Side by Side Diff: webrtc/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc

Issue 2765243002: Delete RawVideoType enum, use the VideoType enum instead. (Closed)
Patch Set: Define constant webrtc::kI420, for backwards compatibility. Created 3 years, 7 months 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
OLDNEW
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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 return encoded_frame_._length; 191 return encoded_frame_._length;
192 } 192 }
193 } 193 }
194 return 0; 194 return 0;
195 } 195 }
196 196
197 size_t WaitForDecodedFrame() const { 197 size_t WaitForDecodedFrame() const {
198 int64_t startTime = rtc::TimeMillis(); 198 int64_t startTime = rtc::TimeMillis();
199 while (rtc::TimeMillis() - startTime < kMaxWaitDecTimeMs) { 199 while (rtc::TimeMillis() - startTime < kMaxWaitDecTimeMs) {
200 if (decode_complete_callback_->DecodeComplete()) { 200 if (decode_complete_callback_->DecodeComplete()) {
201 return CalcBufferSize(kI420, decoded_frame_->width(), 201 return CalcBufferSize(VideoType::kI420, decoded_frame_->width(),
202 decoded_frame_->height()); 202 decoded_frame_->height());
203 } 203 }
204 } 204 }
205 return 0; 205 return 0;
206 } 206 }
207 207
208 const int kWidth = 172; 208 const int kWidth = 172;
209 const int kHeight = 144; 209 const int kHeight = 144;
210 210
211 std::unique_ptr<Vp8UnitTestEncodeCompleteCallback> encode_complete_callback_; 211 std::unique_ptr<Vp8UnitTestEncodeCompleteCallback> encode_complete_callback_;
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 decoder_->Decode(encoded_frame_, false, NULL)); 309 decoder_->Decode(encoded_frame_, false, NULL));
310 // Now setting a key frame. 310 // Now setting a key frame.
311 encoded_frame_._frameType = kVideoFrameKey; 311 encoded_frame_._frameType = kVideoFrameKey;
312 EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, 312 EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK,
313 decoder_->Decode(encoded_frame_, false, NULL)); 313 decoder_->Decode(encoded_frame_, false, NULL));
314 ASSERT_TRUE(decoded_frame_); 314 ASSERT_TRUE(decoded_frame_);
315 EXPECT_GT(I420PSNR(input_frame_.get(), &*decoded_frame_), 36); 315 EXPECT_GT(I420PSNR(input_frame_.get(), &*decoded_frame_), 36);
316 } 316 }
317 317
318 } // namespace webrtc 318 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698