#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "media/gpu/vaapi/test/vp8_decoder.h"
#include <va/va.h>
#include <algorithm>
#include <memory>
#include "media/gpu/vaapi/test/macros.h"
#include "media/parsers/ivf_parser.h"
#include "media/parsers/vp8_parser.h"
namespace media {
namespace vaapi_test {
namespace {
template <typename To, typename From>
void CheckedMemcpy(To& to, From& from) { … }
}
Vp8Decoder::Vp8Decoder(std::unique_ptr<IvfParser> ivf_parser,
const VaapiDevice& va_device,
SharedVASurface::FetchPolicy fetch_policy)
: … { … }
Vp8Decoder::~Vp8Decoder() { … }
Vp8Decoder::ParseResult Vp8Decoder::ReadNextFrame(
Vp8FrameHeader& vp8_frame_header) { … }
void Vp8Decoder::FillVp8DataStructures(const Vp8FrameHeader& frame_hdr,
VAIQMatrixBufferVP8& iq_matrix_buf,
VAProbabilityDataBufferVP8& prob_buf,
VAPictureParameterBufferVP8& pic_param,
VASliceParameterBufferVP8& slice_param) { … }
void Vp8Decoder::RefreshReferenceSlots(Vp8FrameHeader& frame_hdr,
scoped_refptr<SharedVASurface> surface) { … }
VideoDecoder::Result Vp8Decoder::DecodeNextFrame() { … }
}
}