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

Unified Diff: webrtc/common_video/video_frame.cc

Issue 1602523004: Added EncodedImage::GetBufferPaddingBytes. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Constant inside EncodedImage instead 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/modules/video_coding/codecs/h264/h264.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/common_video/video_frame.cc
diff --git a/webrtc/common_video/video_frame.cc b/webrtc/common_video/video_frame.cc
index 8ccd821d090be4423917885a53ff9b715d4dfa27..3bf59a720cde8b9b19ed75ce52d64e5ca61e1367 100644
--- a/webrtc/common_video/video_frame.cc
+++ b/webrtc/common_video/video_frame.cc
@@ -19,6 +19,10 @@
namespace webrtc {
+// TODO(hbos): The FFmpeg video decoder will require up to 8 bytes, update this
+// when the FFmpeg decoder is added.
+const size_t EncodedImage::kBufferPaddingBytesH264 = 0;
+
bool EqualPlane(const uint8_t* data1,
const uint8_t* data2,
int stride,
@@ -242,4 +246,22 @@ bool VideoFrame::EqualsFrame(const VideoFrame& frame) const {
stride(kVPlane), half_width, half_height);
}
+size_t EncodedImage::GetBufferPaddingBytes(VideoCodecType codec_type) {
+ switch (codec_type) {
+ case kVideoCodecVP8:
+ case kVideoCodecVP9:
+ return 0;
+ case kVideoCodecH264:
+ return kBufferPaddingBytesH264;
+ case kVideoCodecI420:
+ case kVideoCodecRED:
+ case kVideoCodecULPFEC:
+ case kVideoCodecGeneric:
+ case kVideoCodecUnknown:
+ return 0;
+ }
+ RTC_NOTREACHED();
+ return 0;
+}
+
} // namespace webrtc
« no previous file with comments | « no previous file | webrtc/modules/video_coding/codecs/h264/h264.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698