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

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

Issue 2354223002: Revert of Move MutableDataY{,U,V} methods to I420Buffer only. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 3 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 d0c8d0c62c97113090ee35aea284a6098b4c4f58..93204dde9ce72f1e04032757def1dae5f902d8a8 100644
--- a/webrtc/modules/video_coding/codecs/i420/i420.cc
+++ b/webrtc/modules/video_coding/codecs/i420/i420.cc
@@ -137,7 +137,8 @@
}
I420Decoder::I420Decoder()
- : _width(0),
+ : _decodedImage(),
+ _width(0),
_height(0),
_inited(false),
_decodeCompleteCallback(NULL) {}
@@ -198,19 +199,17 @@
}
// Set decoded image parameters.
int half_width = (_width + 1) / 2;
- rtc::scoped_refptr<webrtc::I420Buffer> frame_buffer =
- I420Buffer::Create(_width, _height, _width, half_width, half_width);
-
- // Converting from raw buffer I420Buffer.
+ _decodedImage.CreateEmptyFrame(_width, _height, _width, half_width,
+ half_width);
+ // Converting from buffer to plane representation.
int ret = ConvertToI420(kI420, buffer, 0, 0, _width, _height, 0,
- kVideoRotation_0, frame_buffer.get());
+ kVideoRotation_0, &_decodedImage);
if (ret < 0) {
return WEBRTC_VIDEO_CODEC_MEMORY;
}
-
- VideoFrame decoded_image(frame_buffer, inputImage._timeStamp, 0,
- webrtc::kVideoRotation_0);
- _decodeCompleteCallback->Decoded(decoded_image);
+ _decodedImage.set_timestamp(inputImage._timeStamp);
+
+ _decodeCompleteCallback->Decoded(_decodedImage);
return WEBRTC_VIDEO_CODEC_OK;
}

Powered by Google App Engine
This is Rietveld 408576698