#ifndef MEDIA_GPU_VAAPI_TEST_UTILS_H_
#define MEDIA_GPU_VAAPI_TEST_UTILS_H_
#include <stddef.h>
#include <stdint.h>
#include <va/va.h>
#include <string>
#include "base/memory/raw_ptr.h"
#include "build/chromeos_buildflags.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/native_pixmap_handle.h"
namespace media {
class ScopedVAImage;
namespace vaapi_test_utils {
struct TestParam { … };
std::string TestParamToString(
const testing::TestParamInfo<TestParam>& param_info);
constexpr size_t kMaxNumberPlanes = …;
static_assert …;
static_assert …;
struct DecodedImage { … };
DecodedImage ScopedVAImageToDecodedImage(const ScopedVAImage* scoped_va_image);
#if BUILDFLAG(IS_CHROMEOS_ASH)
std::unique_ptr<DecodedImage> NativePixmapToDecodedImage(
gfx::NativePixmapHandle& handle,
const gfx::Size& size,
const gfx::BufferFormat& format);
#endif
bool CompareImages(const DecodedImage& reference_image,
const DecodedImage& hw_decoded_image,
double min_ssim = 0.995);
}
}
#endif