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

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

Issue 1645543003: H264: Improve FFmpeg decoder performance by using I420BufferPool. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressed comments Created 4 years, 10 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) 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 public: 66 public:
67 I420Buffer(int width, int height); 67 I420Buffer(int width, int height);
68 I420Buffer(int width, int height, int stride_y, int stride_u, int stride_v); 68 I420Buffer(int width, int height, int stride_y, int stride_u, int stride_v);
69 69
70 int width() const override; 70 int width() const override;
71 int height() const override; 71 int height() const override;
72 const uint8_t* data(PlaneType type) const override; 72 const uint8_t* data(PlaneType type) const override;
73 // Non-const data access is only allowed if HasOneRef() is true to protect 73 // Non-const data access is only allowed if HasOneRef() is true to protect
74 // against unexpected overwrites. 74 // against unexpected overwrites.
75 uint8_t* MutableData(PlaneType type) override; 75 uint8_t* MutableData(PlaneType type) override;
76 // The size of the |data| buffer. The YUV planes are continuous in the buffer.
77 int DataSize() const;
stefan-webrtc 2016/02/05 10:18:53 I'm not sure I like this. Should we instead provid
hbos 2016/02/05 11:23:44 Fair enough. If that changes, we will no longer be
76 int stride(PlaneType type) const override; 78 int stride(PlaneType type) const override;
77 void* native_handle() const override; 79 void* native_handle() const override;
78 rtc::scoped_refptr<VideoFrameBuffer> NativeToI420Buffer() override; 80 rtc::scoped_refptr<VideoFrameBuffer> NativeToI420Buffer() override;
79 81
80 protected: 82 protected:
81 ~I420Buffer() override; 83 ~I420Buffer() override;
82 84
83 private: 85 private:
84 const int width_; 86 const int width_;
85 const int height_; 87 const int height_;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 // Helper function to crop |buffer| without making a deep copy. May only be used 150 // Helper function to crop |buffer| without making a deep copy. May only be used
149 // for non-native frames. 151 // for non-native frames.
150 rtc::scoped_refptr<VideoFrameBuffer> ShallowCenterCrop( 152 rtc::scoped_refptr<VideoFrameBuffer> ShallowCenterCrop(
151 const rtc::scoped_refptr<VideoFrameBuffer>& buffer, 153 const rtc::scoped_refptr<VideoFrameBuffer>& buffer,
152 int cropped_width, 154 int cropped_width,
153 int cropped_height); 155 int cropped_height);
154 156
155 } // namespace webrtc 157 } // namespace webrtc
156 158
157 #endif // WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_FRAME_BUFFER_H_ 159 #endif // WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_FRAME_BUFFER_H_
OLDNEW
« no previous file with comments | « webrtc/common_video/include/i420_buffer_pool.h ('k') | webrtc/common_video/video_frame_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698