Extend I420 frame buffer pool to also create NV12 buffers

Bug: webrtc:11956
Change-Id: I758a28f2755cfa72ad486fbe1f9209f356eb5fa1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/184510
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32147}
This commit is contained in:
Ilya Nikolaevskiy
2020-09-18 15:18:54 +02:00
committed by Commit Bot
parent c5a74ffba4
commit 4c87d83d03
17 changed files with 385 additions and 286 deletions

View File

@ -103,7 +103,7 @@ int H264DecoderImpl::AVGetBuffer2(AVCodecContext* context,
// TODO(nisse): Delete that feature from the video pool, instead add
// an explicit call to InitializeData here.
rtc::scoped_refptr<I420Buffer> frame_buffer =
decoder->pool_.CreateBuffer(width, height);
decoder->pool_.CreateI420Buffer(width, height);
int y_size = width * height;
int uv_size = frame_buffer->ChromaWidth() * frame_buffer->ChromaHeight();