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

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: common_video not unnecessarily depending on webrtc_h264, fixed circular dependency 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 protected: 60 protected:
61 virtual ~VideoFrameBuffer(); 61 virtual ~VideoFrameBuffer();
62 }; 62 };
63 63
64 // Plain I420 buffer in standard memory. 64 // Plain I420 buffer in standard memory.
65 class I420Buffer : public VideoFrameBuffer { 65 class I420Buffer : public VideoFrameBuffer {
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 void InitializeData();
69 70
70 int width() const override; 71 int width() const override;
71 int height() const override; 72 int height() const override;
72 const uint8_t* data(PlaneType type) const override; 73 const uint8_t* data(PlaneType type) const override;
73 // Non-const data access is only allowed if HasOneRef() is true to protect 74 // Non-const data access is only allowed if HasOneRef() is true to protect
74 // against unexpected overwrites. 75 // against unexpected overwrites.
75 uint8_t* MutableData(PlaneType type) override; 76 uint8_t* MutableData(PlaneType type) override;
76 int stride(PlaneType type) const override; 77 int stride(PlaneType type) const override;
77 void* native_handle() const override; 78 void* native_handle() const override;
78 rtc::scoped_refptr<VideoFrameBuffer> NativeToI420Buffer() override; 79 rtc::scoped_refptr<VideoFrameBuffer> NativeToI420Buffer() override;
(...skipping 69 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 149 // Helper function to crop |buffer| without making a deep copy. May only be used
149 // for non-native frames. 150 // for non-native frames.
150 rtc::scoped_refptr<VideoFrameBuffer> ShallowCenterCrop( 151 rtc::scoped_refptr<VideoFrameBuffer> ShallowCenterCrop(
151 const rtc::scoped_refptr<VideoFrameBuffer>& buffer, 152 const rtc::scoped_refptr<VideoFrameBuffer>& buffer,
152 int cropped_width, 153 int cropped_width,
153 int cropped_height); 154 int cropped_height);
154 155
155 } // namespace webrtc 156 } // namespace webrtc
156 157
157 #endif // WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_FRAME_BUFFER_H_ 158 #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