#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "media/base/video_frame_converter.h"
#include "base/trace_event/trace_event.h"
#include "media/base/video_frame_converter_internals.h"
#include "third_party/libyuv/include/libyuv.h"
namespace media {
namespace {
constexpr auto kDefaultFiltering = …;
std::optional<VideoPixelFormat> GetSourceFormatOverrideForABGRToARGB(
VideoPixelFormat src_format,
VideoPixelFormat dest_format) { … }
scoped_refptr<VideoFrame> WrapTempFrameForABGRToARGB(
VideoPixelFormat override_format,
scoped_refptr<VideoFrame> tmp_frame) { … }
}
VideoFrameConverter::VideoFrameConverter()
: … { … }
VideoFrameConverter::~VideoFrameConverter() { … }
EncoderStatus VideoFrameConverter::ConvertAndScale(const VideoFrame& src_frame,
VideoFrame& dest_frame) { … }
scoped_refptr<VideoFrame> VideoFrameConverter::CreateTempFrame(
VideoPixelFormat format,
const gfx::Size& coded_size,
const gfx::Rect& visible_rect,
const gfx::Size& natural_size) { … }
scoped_refptr<VideoFrame> VideoFrameConverter::WrapNV12xFrameInI420xFrame(
const VideoFrame& frame) { … }
EncoderStatus VideoFrameConverter::ConvertAndScaleRGB(
const VideoFrame* src_frame,
VideoFrame& dest_frame) { … }
EncoderStatus VideoFrameConverter::ConvertAndScaleI4xxx(
const VideoFrame* src_frame,
VideoFrame& dest_frame) { … }
EncoderStatus VideoFrameConverter::ConvertAndScaleNV12x(
const VideoFrame* src_frame,
VideoFrame& dest_frame) { … }
}