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

Side by Side Diff: talk/media/base/videoframe.cc

Issue 1586613002: Delete remnants of non-square pixel support from cricket::VideoFrame. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Keep old InitToBlack and InitToEmptyBuffer methods. Created 4 years, 11 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
« no previous file with comments | « talk/media/base/videoframe.h ('k') | talk/media/base/videoframe_unittest.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 interpolate, vert_crop); 213 interpolate, vert_crop);
214 dst->SetTimeStamp(GetTimeStamp()); 214 dst->SetTimeStamp(GetTimeStamp());
215 // Stretched frame should have the same rotation as the source. 215 // Stretched frame should have the same rotation as the source.
216 dst->SetRotation(GetVideoRotation()); 216 dst->SetRotation(GetVideoRotation());
217 } 217 }
218 218
219 VideoFrame* VideoFrame::Stretch(size_t dst_width, size_t dst_height, 219 VideoFrame* VideoFrame::Stretch(size_t dst_width, size_t dst_height,
220 bool interpolate, bool vert_crop) const { 220 bool interpolate, bool vert_crop) const {
221 VideoFrame* dest = CreateEmptyFrame(static_cast<int>(dst_width), 221 VideoFrame* dest = CreateEmptyFrame(static_cast<int>(dst_width),
222 static_cast<int>(dst_height), 222 static_cast<int>(dst_height),
223 GetPixelWidth(), GetPixelHeight(),
224 GetTimeStamp()); 223 GetTimeStamp());
225 if (dest) { 224 if (dest) {
226 StretchToFrame(dest, interpolate, vert_crop); 225 StretchToFrame(dest, interpolate, vert_crop);
227 } 226 }
228 return dest; 227 return dest;
229 } 228 }
230 229
231 bool VideoFrame::SetToBlack() { 230 bool VideoFrame::SetToBlack() {
232 return libyuv::I420Rect(GetYPlane(), GetYPitch(), 231 return libyuv::I420Rect(GetYPlane(), GetYPitch(),
233 GetUPlane(), GetUPitch(), 232 GetUPlane(), GetUPitch(),
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 << " expected: " << expected_size 380 << " expected: " << expected_size
382 << " sample[0..3]: " << static_cast<int>(four_samples[0]) 381 << " sample[0..3]: " << static_cast<int>(four_samples[0])
383 << ", " << static_cast<int>(four_samples[1]) 382 << ", " << static_cast<int>(four_samples[1])
384 << ", " << static_cast<int>(four_samples[2]) 383 << ", " << static_cast<int>(four_samples[2])
385 << ", " << static_cast<int>(four_samples[3]); 384 << ", " << static_cast<int>(four_samples[3]);
386 } 385 }
387 return true; 386 return true;
388 } 387 }
389 388
390 } // namespace cricket 389 } // namespace cricket
OLDNEW
« no previous file with comments | « talk/media/base/videoframe.h ('k') | talk/media/base/videoframe_unittest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698