#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] = …;
constexpr int kDivisorLookupBits = …;
constexpr int kDivisorLookupPrecisionBits = …;
template <typename T>
void GenerateApproximateDivisor(T value, int16_t* division_factor,
int16_t* division_shift) { … }
int LeastSquareProduct(int a, int b) { … }
int DiagonalClamp(int32_t value) { … }
int NonDiagonalClamp(int32_t value) { … }
int16_t GetShearParameter(int value) { … }
}
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) { … }
}