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

Side by Side Diff: webrtc/test/frame_utils.cc

Issue 1878623002: Added new VideoFrameBuffer methods Data[YUV]() etc. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 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) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 f1.stride(webrtc::kYPlane), f1.width(), f1.height()) && 43 f1.stride(webrtc::kYPlane), f1.width(), f1.height()) &&
44 EqualPlane(f1.buffer(webrtc::kUPlane), f2.buffer(webrtc::kUPlane), 44 EqualPlane(f1.buffer(webrtc::kUPlane), f2.buffer(webrtc::kUPlane),
45 f1.stride(webrtc::kUPlane), half_width, half_height) && 45 f1.stride(webrtc::kUPlane), half_width, half_height) &&
46 EqualPlane(f1.buffer(webrtc::kVPlane), f2.buffer(webrtc::kVPlane), 46 EqualPlane(f1.buffer(webrtc::kVPlane), f2.buffer(webrtc::kVPlane),
47 f1.stride(webrtc::kVPlane), half_width, half_height); 47 f1.stride(webrtc::kVPlane), half_width, half_height);
48 } 48 }
49 49
50 bool FrameBufsEqual(const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& f1, 50 bool FrameBufsEqual(const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& f1,
51 const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& f2) { 51 const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& f2) {
52 if (f1->width() != f2->width() || f1->height() != f2->height() || 52 if (f1->width() != f2->width() || f1->height() != f2->height() ||
53 f1->stride(webrtc::kYPlane) != f2->stride(webrtc::kYPlane) || 53 f1->StrideY() != f2->StrideY() ||
54 f1->stride(webrtc::kUPlane) != f2->stride(webrtc::kUPlane) || 54 f1->StrideU() != f2->StrideU() ||
55 f1->stride(webrtc::kVPlane) != f2->stride(webrtc::kVPlane)) { 55 f1->StrideV() != f2->StrideV()) {
56 return false; 56 return false;
57 } 57 }
58 const int half_width = (f1->width() + 1) / 2; 58 const int half_width = (f1->width() + 1) / 2;
59 const int half_height = (f1->height() + 1) / 2; 59 const int half_height = (f1->height() + 1) / 2;
60 return EqualPlane(f1->data(webrtc::kYPlane), f2->data(webrtc::kYPlane), 60 return EqualPlane(f1->DataY(), f2->DataY(),
61 f1->stride(webrtc::kYPlane), f1->width(), f1->height()) && 61 f1->StrideY(), f1->width(), f1->height()) &&
62 EqualPlane(f1->data(webrtc::kUPlane), f2->data(webrtc::kUPlane), 62 EqualPlane(f1->DataU(), f2->DataU(),
63 f1->stride(webrtc::kUPlane), half_width, half_height) && 63 f1->StrideU(), half_width, half_height) &&
64 EqualPlane(f1->data(webrtc::kVPlane), f2->data(webrtc::kVPlane), 64 EqualPlane(f1->DataV(), f2->DataV(),
65 f1->stride(webrtc::kVPlane), half_width, half_height); 65 f1->StrideV(), half_width, half_height);
66 } 66 }
67 67
68 } // namespace test 68 } // namespace test
69 } // namespace webrtc 69 } // namespace webrtc
OLDNEW
« webrtc/common_video/i420_buffer_pool.cc ('K') | « webrtc/test/fake_texture_frame.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698