chromium/third_party/libgav1/src/src/quantizer.cc

// Copyright 2019 The libgav1 Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#include "src/quantizer.h"

#include <cassert>
#include <cstdint>

#include "src/utils/common.h"
#include "src/utils/constants.h"

#if LIBGAV1_MAX_BITDEPTH != 8 && LIBGAV1_MAX_BITDEPTH != 10 && \
    LIBGAV1_MAX_BITDEPTH != 12
#error LIBGAV1_MAX_BITDEPTH must be 8, 10 or 12
#endif

namespace libgav1 {
namespace {

// Import all the constants in the anonymous namespace.
#include "src/quantizer_tables.inc"

// Format the kDcLookup and kAcLookup arrays manually for easier comparison
// with the Dc_Qlookup and Ac_Qlookup arrays in Section 7.12.2.

// clang-format off
constexpr int16_t kDcLookup[][256] =;

constexpr int16_t kAcLookup[][256] =;
// clang-format on

void Transpose(uint8_t* const dst, const uint8_t* const src, int src_width,
               int src_height) {}

// Copies the lower triangle and fills the upper triangle of |dst| using |src|
// as the source.
void FillUpperTriangle(uint8_t* dst, const uint8_t* src, int size) {}

}  // namespace

bool InitializeQuantizerMatrix(QuantizerMatrix* quantizer_matrix_ptr) {}

int GetQIndex(const Segmentation& segmentation, int index, int base_qindex) {}

Quantizer::Quantizer(int bitdepth, const QuantizerParameters* params)
    :{}

int Quantizer::GetDcValue(Plane plane, int qindex) const {}

int Quantizer::GetAcValue(Plane plane, int qindex) const {}

}  // namespace libgav1