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

Side by Side Diff: webrtc/media/engine/webrtcvideoframe_unittest.cc

Issue 2020593002: Refactor scaling. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Trivial rebase. Created 4 years, 6 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) 2011 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2011 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 TEST_WEBRTCVIDEOFRAME(ConvertFromI400BufferInverted) 238 TEST_WEBRTCVIDEOFRAME(ConvertFromI400BufferInverted)
239 TEST_WEBRTCVIDEOFRAME(ConvertFromYUY2Buffer) 239 TEST_WEBRTCVIDEOFRAME(ConvertFromYUY2Buffer)
240 TEST_WEBRTCVIDEOFRAME(ConvertFromYUY2BufferStride) 240 TEST_WEBRTCVIDEOFRAME(ConvertFromYUY2BufferStride)
241 TEST_WEBRTCVIDEOFRAME(ConvertFromYUY2BufferInverted) 241 TEST_WEBRTCVIDEOFRAME(ConvertFromYUY2BufferInverted)
242 TEST_WEBRTCVIDEOFRAME(ConvertFromUYVYBuffer) 242 TEST_WEBRTCVIDEOFRAME(ConvertFromUYVYBuffer)
243 TEST_WEBRTCVIDEOFRAME(ConvertFromUYVYBufferStride) 243 TEST_WEBRTCVIDEOFRAME(ConvertFromUYVYBufferStride)
244 TEST_WEBRTCVIDEOFRAME(ConvertFromUYVYBufferInverted) 244 TEST_WEBRTCVIDEOFRAME(ConvertFromUYVYBufferInverted)
245 // TEST_WEBRTCVIDEOFRAME(ConvertToI422Buffer) 245 // TEST_WEBRTCVIDEOFRAME(ConvertToI422Buffer)
246 // TEST_WEBRTCVIDEOFRAME(ConstructARGBBlackWhitePixel) 246 // TEST_WEBRTCVIDEOFRAME(ConstructARGBBlackWhitePixel)
247 247
248 TEST_WEBRTCVIDEOFRAME(StretchToFrame)
249 TEST_WEBRTCVIDEOFRAME(Copy) 248 TEST_WEBRTCVIDEOFRAME(Copy)
250 TEST_WEBRTCVIDEOFRAME(CopyIsRef) 249 TEST_WEBRTCVIDEOFRAME(CopyIsRef)
251 250
252 // These functions test implementation-specific details. 251 // These functions test implementation-specific details.
253 // Tests the Init function with different cropped size. 252 // Tests the Init function with different cropped size.
254 TEST_F(WebRtcVideoFrameTest, InitEvenSize) { 253 TEST_F(WebRtcVideoFrameTest, InitEvenSize) {
255 TestInit(640, 360, webrtc::kVideoRotation_0, true); 254 TestInit(640, 360, webrtc::kVideoRotation_0, true);
256 } 255 }
257 256
258 TEST_F(WebRtcVideoFrameTest, InitOddWidth) { 257 TEST_F(WebRtcVideoFrameTest, InitOddWidth) {
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 330
332 // Claim the frame 2 needs to be rotated for another 270 degree. The output 331 // Claim the frame 2 needs to be rotated for another 270 degree. The output
333 // from frame 2 rotation should be the same as frame 1. 332 // from frame 2 rotation should be the same as frame 1.
334 applied90->set_rotation(webrtc::kVideoRotation_270); 333 applied90->set_rotation(webrtc::kVideoRotation_270);
335 const cricket::VideoFrame* applied360 = 334 const cricket::VideoFrame* applied360 =
336 applied90->GetCopyWithRotationApplied(); 335 applied90->GetCopyWithRotationApplied();
337 EXPECT_TRUE(applied360); 336 EXPECT_TRUE(applied360);
338 EXPECT_EQ(applied360->rotation(), webrtc::kVideoRotation_0); 337 EXPECT_EQ(applied360->rotation(), webrtc::kVideoRotation_0);
339 EXPECT_TRUE(IsEqual(applied0, *applied360, 0)); 338 EXPECT_TRUE(IsEqual(applied0, *applied360, 0));
340 } 339 }
OLDNEW
« no previous file with comments | « webrtc/media/base/videoframefactory.cc ('k') | webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_encoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698