 Chromium Code Reviews
 Chromium Code Reviews Issue 2021843002:
  Delete unused code in webrtc_libyuv.cc.  (Closed) 
  Base URL: https://chromium.googlesource.com/external/webrtc.git@master
    
  
    Issue 2021843002:
  Delete unused code in webrtc_libyuv.cc.  (Closed) 
  Base URL: https://chromium.googlesource.com/external/webrtc.git@master| 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 125 ASSERT_TRUE(source_file_ != NULL); | 125 ASSERT_TRUE(source_file_ != NULL); | 
| 126 // Set input frame. | 126 // Set input frame. | 
| 127 ASSERT_EQ( | 127 ASSERT_EQ( | 
| 128 fread(source_buffer_.get(), 1, length_source_frame_, source_file_), | 128 fread(source_buffer_.get(), 1, length_source_frame_, source_file_), | 
| 129 length_source_frame_); | 129 length_source_frame_); | 
| 130 codec_inst_.width = kWidth; | 130 codec_inst_.width = kWidth; | 
| 131 codec_inst_.height = kHeight; | 131 codec_inst_.height = kHeight; | 
| 132 const int kFramerate = 30; | 132 const int kFramerate = 30; | 
| 133 codec_inst_.maxFramerate = kFramerate; | 133 codec_inst_.maxFramerate = kFramerate; | 
| 134 // Setting aligned stride values. | 134 // Setting aligned stride values. | 
| 135 int stride_uv = 0; | 135 int stride_y = 16 * ((codec_inst_.width + 15) / 16); | 
| 
pbos-webrtc
2016/05/31 10:48:45
Pref copying the method here as well, this reads w
 
nisse-webrtc
2016/05/31 12:55:22
Done.
 | |
| 136 int stride_y = 0; | 136 int stride_uv = 16 * ((codec_inst_.width + 31) / 32); | 
| 137 Calc16ByteAlignedStride(codec_inst_.width, &stride_y, &stride_uv); | |
| 138 EXPECT_EQ(stride_y, 176); | 137 EXPECT_EQ(stride_y, 176); | 
| 139 EXPECT_EQ(stride_uv, 96); | 138 EXPECT_EQ(stride_uv, 96); | 
| 140 | 139 | 
| 141 input_frame_.CreateEmptyFrame(codec_inst_.width, codec_inst_.height, | 140 input_frame_.CreateEmptyFrame(codec_inst_.width, codec_inst_.height, | 
| 142 stride_y, stride_uv, stride_uv); | 141 stride_y, stride_uv, stride_uv); | 
| 143 input_frame_.set_timestamp(kTestTimestamp); | 142 input_frame_.set_timestamp(kTestTimestamp); | 
| 144 // Using ConvertToI420 to add stride to the image. | 143 // Using ConvertToI420 to add stride to the image. | 
| 145 EXPECT_EQ(0, ConvertToI420(kI420, source_buffer_.get(), 0, 0, | 144 EXPECT_EQ(0, ConvertToI420(kI420, source_buffer_.get(), 0, 0, | 
| 146 codec_inst_.width, codec_inst_.height, 0, | 145 codec_inst_.width, codec_inst_.height, 0, | 
| 147 kVideoRotation_0, &input_frame_)); | 146 kVideoRotation_0, &input_frame_)); | 
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 261 EXPECT_EQ(WEBRTC_VIDEO_CODEC_ERROR, | 260 EXPECT_EQ(WEBRTC_VIDEO_CODEC_ERROR, | 
| 262 decoder_->Decode(encoded_frame_, false, NULL)); | 261 decoder_->Decode(encoded_frame_, false, NULL)); | 
| 263 // Now setting a key frame. | 262 // Now setting a key frame. | 
| 264 encoded_frame_._frameType = kVideoFrameKey; | 263 encoded_frame_._frameType = kVideoFrameKey; | 
| 265 EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, | 264 EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, | 
| 266 decoder_->Decode(encoded_frame_, false, NULL)); | 265 decoder_->Decode(encoded_frame_, false, NULL)); | 
| 267 EXPECT_GT(I420PSNR(&input_frame_, &decoded_frame_), 36); | 266 EXPECT_GT(I420PSNR(&input_frame_, &decoded_frame_), 36); | 
| 268 } | 267 } | 
| 269 | 268 | 
| 270 } // namespace webrtc | 269 } // namespace webrtc | 
| OLD | NEW |