chromium/media/base/video_frame_converter.cc

// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#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) {}

// Wraps `tmp_frame` in a new VideoFrame with pixel format `override_format`. No
// ref is taken on `tmp_frame`, so callers must guarantee it outlives the
// return frame.
scoped_refptr<VideoFrame> WrapTempFrameForABGRToARGB(
    VideoPixelFormat override_format,
    scoped_refptr<VideoFrame> tmp_frame) {}

}  // namespace

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) {}

}  // namespace media