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

@ -235,7 +235,7 @@ rtc::scoped_refptr<I420BufferInterface> VideoDenoiser::DenoiseFrame(
const uint8_t* y_src = frame->DataY();
int stride_y_src = frame->StrideY();
rtc::scoped_refptr<I420Buffer> dst =
buffer_pool_.CreateBuffer(width_, height_);
buffer_pool_.CreateI420Buffer(width_, height_);
uint8_t* y_dst = dst->MutableDataY();
int stride_y_dst = dst->StrideY();

View File

@ -15,7 +15,7 @@
#include "api/scoped_refptr.h"
#include "api/video/video_frame_buffer.h"
#include "common_video/include/i420_buffer_pool.h"
#include "common_video/include/video_frame_buffer_pool.h"
#include "modules/video_processing/util/denoiser_filter.h"
#include "modules/video_processing/util/noise_estimation.h"
#include "modules/video_processing/util/skin_detection.h"
@ -77,7 +77,7 @@ class VideoDenoiser {
std::unique_ptr<uint8_t[]> y_density_;
// Save the return values by MbDenoise for each block.
std::unique_ptr<DenoiserDecision[]> mb_filter_decision_;
I420BufferPool buffer_pool_;
VideoFrameBufferPool buffer_pool_;
rtc::scoped_refptr<I420BufferInterface> prev_buffer_;
};