chromium/media/gpu/vaapi/test/h264_vaapi_wrapper.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/h264_vaapi_wrapper.h"

#include <va/va.h>

#include <algorithm>
#include <memory>

#include "base/trace_event/trace_event.h"
#include "media/gpu/macros.h"
#include "media/gpu/vaapi/test/h264_dpb.h"
#include "media/gpu/vaapi/test/macros.h"
#include "media/gpu/vaapi/test/scoped_va_config.h"
#include "media/gpu/vaapi/test/scoped_va_context.h"
#include "media/gpu/vaapi/test/shared_va_surface.h"
#include "media/gpu/vaapi/test/vaapi_device.h"
#include "media/parsers/h264_parser.h"

namespace media::vaapi_test {

namespace {

// from ITU-T REC H.264 spec
// section 8.5.6
// "Inverse scanning process for 4x4 transform coefficients and scaling lists"
static constexpr int kZigzagScan4x4[16] =;

// section 8.5.7
// "Inverse scanning process for 8x8 transform coefficients and scaling lists"
static constexpr uint8_t kZigzagScan8x8[64] =;

VAProfile GetProfile(const H264SPS* sps) {}

unsigned int GetFormatForProfile(const VAProfile& profile) {}

void InitVAPicture(VAPictureH264* va_pic) {}

void FillVAPicture(VAPictureH264* va_pic, scoped_refptr<H264Picture> pic) {}

}  // namespace

H264VaapiWrapper::H264VaapiWrapper(const VaapiDevice& va_device)
    :{}

H264VaapiWrapper::~H264VaapiWrapper() = default;

scoped_refptr<H264Picture> H264VaapiWrapper::CreatePicture(const H264SPS* sps) {}

void H264VaapiWrapper::SubmitFrameMetadata(
    const H264SPS* sps,
    const H264PPS* pps,
    const H264DPB& dpb,
    const H264Picture::Vector& ref_pic_listp0,
    const H264Picture::Vector& ref_pic_listb0,
    const H264Picture::Vector& ref_pic_listb1,
    scoped_refptr<H264Picture> pic) {}

void H264VaapiWrapper::SubmitSlice(
    const H264PPS* pps,
    const H264SliceHeader* slice_hdr,
    const H264Picture::Vector& ref_pic_list0,
    const H264Picture::Vector& ref_pic_list1,
    scoped_refptr<H264Picture> pic,
    const uint8_t* data,
    size_t size,
    const std::vector<SubsampleEntry>& subsamples) {}

void H264VaapiWrapper::SubmitDecode(scoped_refptr<H264Picture> pic) {}

}  // namespace media::vaapi_test