chromium/media/parsers/vp9_parser.h

// Copyright 2015 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// This file contains an implementation of a VP9 bitstream parser. The main
// purpose of this parser is to support hardware decode acceleration. Some
// accelerators, e.g. libva which implements VA-API, require the caller
// (chrome) to feed them parsed VP9 frame header.
//
// See media::VP9Decoder for example usage.
//

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif
#ifndef MEDIA_PARSERS_VP9_PARSER_H_
#define MEDIA_PARSERS_VP9_PARSER_H_

#include <stddef.h>
#include <stdint.h>
#include <sys/types.h>

#include <memory>

#include "base/containers/circular_deque.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/raw_ptr_exclusion.h"
#include "media/base/decrypt_config.h"
#include "media/base/media_export.h"
#include "media/base/video_color_space.h"
#include "ui/gfx/geometry/size.h"

namespace media {

const int kVp9MaxProfile =;
const int kVp9NumRefFramesLog2 =;
const size_t kVp9NumRefFrames =;
const uint8_t kVp9MaxProb =;
const size_t kVp9NumRefsPerFrame =;
const size_t kVp9NumFrameContextsLog2 =;
const size_t kVp9NumFrameContexts =;

Vp9Prob;

enum class Vp9ColorSpace {};

enum Vp9InterpolationFilter {};

enum Vp9RefType {};

enum Vp9ReferenceMode {};

struct MEDIA_EXPORT Vp9SegmentationParams {};

struct MEDIA_EXPORT Vp9LoopFilterParams {};

// Members of Vp9FrameHeader will be 0-initialized by Vp9Parser::ParseNextFrame.
struct MEDIA_EXPORT Vp9QuantizationParams {};

// Entropy context for frame parsing
struct MEDIA_EXPORT Vp9FrameContext {};

struct MEDIA_EXPORT Vp9CompressedHeader {};

// VP9 frame header.
struct MEDIA_EXPORT Vp9FrameHeader {};

// A parser for VP9 bitstream.
class MEDIA_EXPORT Vp9Parser {};

}  // namespace media

#endif  // MEDIA_PARSERS_VP9_PARSER_H_