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

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

Issue 1583223002: Revert of Delete remnants of non-square pixel support from cricket::VideoFrame. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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(),
223 GetTimeStamp()); 224 GetTimeStamp());
224 if (dest) { 225 if (dest) {
225 StretchToFrame(dest, interpolate, vert_crop); 226 StretchToFrame(dest, interpolate, vert_crop);
226 } 227 }
227 return dest; 228 return dest;
228 } 229 }
229 230
230 bool VideoFrame::SetToBlack() { 231 bool VideoFrame::SetToBlack() {
231 return libyuv::I420Rect(GetYPlane(), GetYPitch(), 232 return libyuv::I420Rect(GetYPlane(), GetYPitch(),
232 GetUPlane(), GetUPitch(), 233 GetUPlane(), GetUPitch(),
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 << " expected: " << expected_size 381 << " expected: " << expected_size
381 << " sample[0..3]: " << static_cast<int>(four_samples[0]) 382 << " sample[0..3]: " << static_cast<int>(four_samples[0])
382 << ", " << static_cast<int>(four_samples[1]) 383 << ", " << static_cast<int>(four_samples[1])
383 << ", " << static_cast<int>(four_samples[2]) 384 << ", " << static_cast<int>(four_samples[2])
384 << ", " << static_cast<int>(four_samples[3]); 385 << ", " << static_cast<int>(four_samples[3]);
385 } 386 }
386 return true; 387 return true;
387 } 388 }
388 389
389 } // namespace cricket 390 } // 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