Rewrite CreateBlackFrame in webrtcvideoengine.

Don't use VideoFrameBuffer::MutableDataY and friends, instead, use
I420Buffer::SetToBlack.

Also introduce static method I420Buffer::Create, to create an object and
return a scoped_refptr.

TBR=marpan@webrtc.org # Trivial change to video_denoiser.cc
BUG=webrtc:5921

Review-Url: https://codereview.webrtc.org/2078943002
Cr-Commit-Position: refs/heads/master@{#13212}
This commit is contained in:
nisse
2016-06-20 03:38:52 -07:00
committed by Commit bot
parent 44bf02fba2
commit ac62bd4a3b
9 changed files with 48 additions and 49 deletions

View File

@ -335,8 +335,8 @@ void VideoProcessorImpl::FrameDecoded(const VideoFrame& image) {
if (image.width() != config_.codec_settings->width ||
image.height() != config_.codec_settings->height) {
rtc::scoped_refptr<I420Buffer> up_image(
new rtc::RefCountedObject<I420Buffer>(config_.codec_settings->width,
config_.codec_settings->height));
I420Buffer::Create(config_.codec_settings->width,
config_.codec_settings->height));
// Should be the same aspect ratio, no cropping needed.
up_image->ScaleFrom(image.video_frame_buffer());