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

Unified Diff: webrtc/modules/video_coding/codecs/i420/i420.cc

Issue 2765243002: Delete RawVideoType enum, use the VideoType enum instead. (Closed)
Patch Set: Define constant webrtc::kI420, for backwards compatibility. Created 3 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/video_coding/codecs/i420/i420.cc
diff --git a/webrtc/modules/video_coding/codecs/i420/i420.cc b/webrtc/modules/video_coding/codecs/i420/i420.cc
index d05ba7f519bf26e5a4147a65b62e2b078b3ffd36..31127edc9101c1920f4c110f47f6b0de19c87c57 100644
--- a/webrtc/modules/video_coding/codecs/i420/i420.cc
+++ b/webrtc/modules/video_coding/codecs/i420/i420.cc
@@ -57,9 +57,9 @@ int I420Encoder::InitEncode(const VideoCodec* codecSettings,
_encodedImage._buffer = NULL;
_encodedImage._size = 0;
}
- const size_t newSize =
- CalcBufferSize(kI420, codecSettings->width, codecSettings->height) +
- kI420HeaderSize;
+ const size_t newSize = CalcBufferSize(VideoType::kI420, codecSettings->width,
+ codecSettings->height) +
+ kI420HeaderSize;
uint8_t* newBuffer = new uint8_t[newSize];
if (newBuffer == NULL) {
return WEBRTC_VIDEO_CODEC_MEMORY;
@@ -96,9 +96,9 @@ int I420Encoder::Encode(const VideoFrame& inputImage,
return WEBRTC_VIDEO_CODEC_ERR_SIZE;
}
- size_t req_length =
- CalcBufferSize(kI420, inputImage.width(), inputImage.height()) +
- kI420HeaderSize;
+ size_t req_length = CalcBufferSize(VideoType::kI420, inputImage.width(),
+ inputImage.height()) +
+ kI420HeaderSize;
if (_encodedImage._size > req_length) {
// Reallocate buffer.
delete[] _encodedImage._buffer;
@@ -193,7 +193,8 @@ int I420Decoder::Decode(const EncodedImage& inputImage,
_height = height;
// Verify that the available length is sufficient:
- size_t req_length = CalcBufferSize(kI420, _width, _height) + kI420HeaderSize;
+ size_t req_length =
+ CalcBufferSize(VideoType::kI420, _width, _height) + kI420HeaderSize;
if (req_length > inputImage._length) {
return WEBRTC_VIDEO_CODEC_ERROR;
@@ -204,7 +205,7 @@ int I420Decoder::Decode(const EncodedImage& inputImage,
I420Buffer::Create(_width, _height, _width, half_width, half_width);
// Converting from raw buffer I420Buffer.
- int ret = ConvertToI420(kI420, buffer, 0, 0, _width, _height, 0,
+ int ret = ConvertToI420(VideoType::kI420, buffer, 0, 0, _width, _height, 0,
kVideoRotation_0, frame_buffer.get());
if (ret < 0) {
return WEBRTC_VIDEO_CODEC_MEMORY;

Powered by Google App Engine
This is Rietveld 408576698