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

Side by Side Diff: webrtc/common_video/include/video_frame_buffer.h

Issue 2049023002: Revert of New static method I420Buffer::SetToBlack. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | webrtc/common_video/video_frame_buffer.cc » ('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 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 protected: 81 protected:
82 virtual ~VideoFrameBuffer(); 82 virtual ~VideoFrameBuffer();
83 }; 83 };
84 84
85 // Plain I420 buffer in standard memory. 85 // Plain I420 buffer in standard memory.
86 class I420Buffer : public VideoFrameBuffer { 86 class I420Buffer : public VideoFrameBuffer {
87 public: 87 public:
88 I420Buffer(int width, int height); 88 I420Buffer(int width, int height);
89 I420Buffer(int width, int height, int stride_y, int stride_u, int stride_v); 89 I420Buffer(int width, int height, int stride_y, int stride_u, int stride_v);
90
91 // Sets all three planes to all zeros. Used to work around for
92 // quirks in memory checkers
93 // (https://bugs.chromium.org/p/libyuv/issues/detail?id=377) and
94 // ffmpeg (http://crbug.com/390941).
95 // TODO(nisse): Should be deleted if/when those issues are resolved
96 // in a better way.
97 void InitializeData(); 90 void InitializeData();
98 91
99 // Sets the frame buffer to all black.
100 void SetToBlack();
101
102 int width() const override; 92 int width() const override;
103 int height() const override; 93 int height() const override;
104 const uint8_t* DataY() const override; 94 const uint8_t* DataY() const override;
105 const uint8_t* DataU() const override; 95 const uint8_t* DataU() const override;
106 const uint8_t* DataV() const override; 96 const uint8_t* DataV() const override;
107 97
108 uint8_t* MutableDataY() override; 98 uint8_t* MutableDataY() override;
109 uint8_t* MutableDataU() override; 99 uint8_t* MutableDataU() override;
110 uint8_t* MutableDataV() override; 100 uint8_t* MutableDataV() override;
111 int StrideY() const override; 101 int StrideY() const override;
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 // Helper function to crop |buffer| without making a deep copy. May only be used 189 // Helper function to crop |buffer| without making a deep copy. May only be used
200 // for non-native frames. 190 // for non-native frames.
201 rtc::scoped_refptr<VideoFrameBuffer> ShallowCenterCrop( 191 rtc::scoped_refptr<VideoFrameBuffer> ShallowCenterCrop(
202 const rtc::scoped_refptr<VideoFrameBuffer>& buffer, 192 const rtc::scoped_refptr<VideoFrameBuffer>& buffer,
203 int cropped_width, 193 int cropped_width,
204 int cropped_height); 194 int cropped_height);
205 195
206 } // namespace webrtc 196 } // namespace webrtc
207 197
208 #endif // WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_FRAME_BUFFER_H_ 198 #endif // WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_FRAME_BUFFER_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/common_video/video_frame_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698