#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "media/base/video_frame_converter.h"
#include "base/logging.h"
#include "media/base/test_helpers.h"
#include "media/base/video_frame.h"
#include "media/base/video_util.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/libyuv/include/libyuv.h"
namespace media {
namespace {
constexpr gfx::Size kCodedSize(128, 128);
constexpr gfx::Rect kVisibleRect(64, 64, 64, 64);
gfx::Size SelectDestSize(bool scaled) { … }
gfx::Rect SelectDestRect(bool scaled) { … }
bool IsConversionSupported(VideoPixelFormat src, VideoPixelFormat dest) { … }
[[maybe_unused]] void DumpFrame(const VideoFrame& frame, const char* prefix) { … }
}
TestParams;
class VideoFrameConverterTest
: public testing::Test,
public ::testing::WithParamInterface<TestParams> { … };
TEST_P(VideoFrameConverterTest, ConvertAndScale) { … }
INSTANTIATE_TEST_SUITE_P(…);
}