Use I420Buffer::ScaleFrom to clean scaling in SimulcastEncoderAdapter
Bug: None Change-Id: Ie02c18a4ce5b20f2a600a01874dc82f3af7d5d42 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168485 Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> Commit-Queue: Evan Shrubsole <eshr@google.com> Cr-Commit-Position: refs/heads/master@{#30497}
This commit is contained in:
parent
e67c6bcd06
commit
ccd49d9af6
@ -197,7 +197,6 @@ rtc_library("rtc_simulcast_encoder_adapter") {
|
||||
"../system_wrappers",
|
||||
"../system_wrappers:field_trial",
|
||||
"//third_party/abseil-cpp/absl/types:optional",
|
||||
"//third_party/libyuv",
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@ -34,7 +34,6 @@
|
||||
#include "rtc_base/experiments/rate_control_settings.h"
|
||||
#include "rtc_base/logging.h"
|
||||
#include "system_wrappers/include/field_trial.h"
|
||||
#include "third_party/libyuv/include/libyuv/scale.h"
|
||||
|
||||
namespace {
|
||||
|
||||
@ -433,14 +432,7 @@ int SimulcastEncoderAdapter::Encode(
|
||||
I420Buffer::Create(dst_width, dst_height);
|
||||
rtc::scoped_refptr<I420BufferInterface> src_buffer =
|
||||
input_image.video_frame_buffer()->ToI420();
|
||||
libyuv::I420Scale(src_buffer->DataY(), src_buffer->StrideY(),
|
||||
src_buffer->DataU(), src_buffer->StrideU(),
|
||||
src_buffer->DataV(), src_buffer->StrideV(), src_width,
|
||||
src_height, dst_buffer->MutableDataY(),
|
||||
dst_buffer->StrideY(), dst_buffer->MutableDataU(),
|
||||
dst_buffer->StrideU(), dst_buffer->MutableDataV(),
|
||||
dst_buffer->StrideV(), dst_width, dst_height,
|
||||
libyuv::kFilterBilinear);
|
||||
dst_buffer->ScaleFrom(*src_buffer);
|
||||
|
||||
// UpdateRect is not propagated to lower simulcast layers currently.
|
||||
// TODO(ilnik): Consider scaling UpdateRect together with the buffer.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user