| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   79       EXPECT_NEAR(frame->DataV()[x / 2 + (y / 2) * frame->StrideV()] / 256.0, |   79       EXPECT_NEAR(frame->DataV()[x / 2 + (y / 2) * frame->StrideV()] / 256.0, | 
|   80                   orig_y, 0.02); |   80                   orig_y, 0.02); | 
|   81     } |   81     } | 
|   82   } |   82   } | 
|   83 } |   83 } | 
|   84  |   84  | 
|   85 }  // namespace |   85 }  // namespace | 
|   86  |   86  | 
|   87 TEST(TestVideoFrame, InitialValues) { |   87 TEST(TestVideoFrame, InitialValues) { | 
|   88   VideoFrame frame; |   88   VideoFrame frame; | 
|   89   EXPECT_TRUE(frame.IsZeroSize()); |   89   EXPECT_TRUE(!frame.video_frame_buffer()); | 
|   90   EXPECT_EQ(kVideoRotation_0, frame.rotation()); |   90   EXPECT_EQ(kVideoRotation_0, frame.rotation()); | 
|   91 } |   91 } | 
|   92  |   92  | 
|   93 TEST(TestVideoFrame, CopiesInitialFrameWithoutCrashing) { |   93 TEST(TestVideoFrame, CopiesInitialFrameWithoutCrashing) { | 
|   94   VideoFrame frame; |   94   VideoFrame frame; | 
|   95   VideoFrame frame2; |   95   VideoFrame frame2; | 
|   96   frame2.CopyFrame(frame); |   96   frame2.CopyFrame(frame); | 
|   97 } |   97 } | 
|   98  |   98  | 
|   99 TEST(TestVideoFrame, WidthHeightValues) { |   99 TEST(TestVideoFrame, WidthHeightValues) { | 
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  364  |  364  | 
|  365   // Center crop to 640 x 360 (16/9 aspect), then scale down by 2. |  365   // Center crop to 640 x 360 (16/9 aspect), then scale down by 2. | 
|  366   rtc::scoped_refptr<I420Buffer> scaled_buffer( |  366   rtc::scoped_refptr<I420Buffer> scaled_buffer( | 
|  367       I420Buffer::Create(320, 180)); |  367       I420Buffer::Create(320, 180)); | 
|  368  |  368  | 
|  369   scaled_buffer->CropAndScaleFrom(buf); |  369   scaled_buffer->CropAndScaleFrom(buf); | 
|  370   CheckCrop(scaled_buffer, 0.0, 0.125, 1.0, 0.75); |  370   CheckCrop(scaled_buffer, 0.0, 0.125, 1.0, 0.75); | 
|  371 } |  371 } | 
|  372  |  372  | 
|  373 }  // namespace webrtc |  373 }  // namespace webrtc | 
| OLD | NEW |