chromium/media/gpu/vaapi/test/vp8_decoder.cc

// Copyright 2021 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/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) {}

}  // namespace

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

// The implementation of method is mostly lifted from vaapi_utils.h
// FillVP8DataStructures
// (https://source.chromium.org/chromium/chromium/src/+/main:media/gpu/vaapi/vaapi_utils.cc;l=195;drc=9d70e034c6a4c2b1ed56c94aace3f3c8d2b1f771).
void Vp8Decoder::FillVp8DataStructures(const Vp8FrameHeader& frame_hdr,
                                       VAIQMatrixBufferVP8& iq_matrix_buf,
                                       VAProbabilityDataBufferVP8& prob_buf,
                                       VAPictureParameterBufferVP8& pic_param,
                                       VASliceParameterBufferVP8& slice_param) {}

// Based on update_reference_frames() in libvpx: vp8/encoder/onyx_if.c
void Vp8Decoder::RefreshReferenceSlots(Vp8FrameHeader& frame_hdr,
                                       scoped_refptr<SharedVASurface> surface) {}

VideoDecoder::Result Vp8Decoder::DecodeNextFrame() {}

}  // namespace vaapi_test
}  // namespace media