chromium/media/gpu/av1_builder.cc

// Copyright 2024 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/av1_builder.h"

#include "base/check_op.h"

namespace media {

namespace {
constexpr int kPrimaryReferenceNone =;
}  // namespace

AV1BitstreamBuilder::AV1BitstreamBuilder() = default;
AV1BitstreamBuilder::~AV1BitstreamBuilder() = default;
AV1BitstreamBuilder::AV1BitstreamBuilder(AV1BitstreamBuilder&&) = default;

AV1BitstreamBuilder AV1BitstreamBuilder::BuildSequenceHeaderOBU(
    const SequenceHeader& seq_hdr) {}

AV1BitstreamBuilder AV1BitstreamBuilder::BuildFrameHeaderOBU(
    const SequenceHeader& seq_hdr,
    const FrameHeader& pic_hdr) {}

void AV1BitstreamBuilder::Write(uint64_t val, int num_bits) {}

void AV1BitstreamBuilder::WriteBool(bool val) {}

std::vector<uint8_t> AV1BitstreamBuilder::Flush() && {}

void AV1BitstreamBuilder::PutAlignBits() {}

void AV1BitstreamBuilder::PutTrailingBits() {}

void AV1BitstreamBuilder::WriteOBUHeader(libgav1::ObuType type,
                                         bool extension_flag,
                                         bool has_size) {}

// Encode a variable length unsigned integer of up to 4 bytes.
// Most significant bit of each byte indicates if parsing should continue, and
// the 7 least significant bits hold the actual data. So the encoded length
// may be 5 bytes under some circumstances.
// This function also has a fixed size mode where we pass in a fixed size for
// the data and the function zero pads up to that size.
// See section 4.10.5 of the AV1 specification.
void AV1BitstreamBuilder::WriteValueInLeb128(uint32_t value,
                                             std::optional<int> fixed_size) {}

void AV1BitstreamBuilder::AppendBitstreamBuffer(AV1BitstreamBuilder buffer) {}

}  // namespace media