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:
@ -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());
|
||||
|
||||
Reference in New Issue
Block a user