chromium/third_party/libgav1/src/src/warp_prediction.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/warp_prediction.h"

#include <cmath>
#include <cstdint>
#include <cstdlib>

#include "src/tile.h"
#include "src/utils/block_parameters_holder.h"
#include "src/utils/common.h"
#include "src/utils/constants.h"
#include "src/utils/logging.h"

namespace libgav1 {
namespace {

constexpr int kWarpModelTranslationClamp =;
constexpr int kWarpModelAffineClamp =;
constexpr int kLargestMotionVectorDiff =;

constexpr uint16_t kDivisorLookup[257] =;

// Number of fractional bits of lookup in divisor lookup table.
constexpr int kDivisorLookupBits =;
// Number of fractional bits of entries in divisor lookup table.
constexpr int kDivisorLookupPrecisionBits =;

// 7.11.3.7.
template <typename T>
void GenerateApproximateDivisor(T value, int16_t* division_factor,
                                int16_t* division_shift) {}

// 7.11.3.8.
int LeastSquareProduct(int a, int b) {}

// 7.11.3.8.
int DiagonalClamp(int32_t value) {}

// 7.11.3.8.
int NonDiagonalClamp(int32_t value) {}

int16_t GetShearParameter(int value) {}

}  // namespace

bool SetupShear(GlobalMotion* const warp_params) {}

bool WarpEstimation(const int num_samples, const int block_width4x4,
                    const int block_height4x4, const int row4x4,
                    const int column4x4, const MotionVector& mv,
                    const int candidates[kMaxLeastSquaresSamples][4],
                    GlobalMotion* const warp_params) {}

}  // namespace libgav1