#ifndef LIBGAV1_SRC_UTILS_CONSTANTS_H_
#define LIBGAV1_SRC_UTILS_CONSTANTS_H_
#include <cstdint>
#include <cstdlib>
#include "src/utils/bit_mask_set.h"
namespace libgav1 {
constexpr int EnumRangeLength(int begin, int end) { … }
enum { … };
enum { … };
enum FrameType : uint8_t { … };
enum Plane : uint8_t { … };
enum : uint8_t { … };
enum PlaneType : uint8_t { … };
enum ReferenceFrameType : int8_t { … };
enum { … };
enum BlockSize : uint8_t { … };
enum Partition : uint8_t { … };
enum : uint8_t { … };
enum PredictionMode : uint8_t { … };
enum InterIntraMode : uint8_t { … };
enum MotionMode : uint8_t { … };
enum TxMode : uint8_t { … };
enum TransformType : uint8_t { … };
constexpr BitMaskSet kTransformFlipColumnsMask(kTransformTypeFlipadstDct,
kTransformTypeFlipadstAdst,
kTransformTypeFlipadstIdentity,
kTransformTypeFlipadstFlipadst);
constexpr BitMaskSet kTransformFlipRowsMask(kTransformTypeDctFlipadst,
kTransformTypeAdstFlipadst,
kTransformTypeIdentityFlipadst,
kTransformTypeFlipadstFlipadst);
enum TransformSize : uint8_t { … };
enum TransformSet : uint8_t { … };
enum TransformClass : uint8_t { … };
enum FilterIntraPredictor : uint8_t { … };
enum ObmcDirection : uint8_t { … };
enum LoopFilterType : uint8_t { … };
enum LoopFilterTransformSizeId : uint8_t { … };
enum LoopRestorationType : uint8_t { … };
enum CompoundReferenceType : uint8_t { … };
enum CompoundPredictionType : uint8_t { … };
enum InterpolationFilter : uint8_t { … };
enum MvJointType : uint8_t { … };
enum ObuType : int8_t { … };
constexpr BitMaskSet kPredictionModeSmoothMask(kPredictionModeSmooth,
kPredictionModeSmoothHorizontal,
kPredictionModeSmoothVertical);
inline const char* ToString(const BlockSize size) { … }
inline const char* ToString(const InterIntraMode mode) { … }
inline const char* ToString(const ObmcDirection direction) { … }
inline const char* ToString(const LoopRestorationType type) { … }
inline const char* ToString(const TransformSize size) { … }
inline const char* ToString(const TransformType type) { … }
extern const uint8_t k4x4WidthLog2[kMaxBlockSizes];
extern const uint8_t k4x4HeightLog2[kMaxBlockSizes];
extern const uint8_t kNum4x4BlocksWide[kMaxBlockSizes];
extern const uint8_t kNum4x4BlocksHigh[kMaxBlockSizes];
extern const uint8_t kBlockWidthPixels[kMaxBlockSizes];
extern const uint8_t kBlockHeightPixels[kMaxBlockSizes];
extern const BlockSize kSubSize[kMaxPartitionTypes][kMaxBlockSizes];
extern const BlockSize kPlaneResidualSize[kMaxBlockSizes][2][2];
extern const int16_t kProjectionMvDivisionLookup[kMaxFrameDistance + 1];
extern const uint8_t kTransformWidth[kNumTransformSizes];
extern const uint8_t kTransformHeight[kNumTransformSizes];
extern const uint8_t kTransformWidth4x4[kNumTransformSizes];
extern const uint8_t kTransformHeight4x4[kNumTransformSizes];
extern const uint8_t kTransformWidthLog2[kNumTransformSizes];
extern const uint8_t kTransformHeightLog2[kNumTransformSizes];
extern const TransformSize kSplitTransformSize[kNumTransformSizes];
extern const TransformSize kTransformSizeSquareMin[kNumTransformSizes];
extern const TransformSize kTransformSizeSquareMax[kNumTransformSizes];
extern const uint8_t kNumTransformTypesInSet[kNumTransformSets];
extern const uint8_t kSgrProjParams[1 << kSgrProjParamsBits][4];
extern const int8_t kSgrProjMultiplierMin[2];
extern const int8_t kSgrProjMultiplierMax[2];
extern const int8_t kWienerTapsMin[3];
extern const int8_t kWienerTapsMax[3];
extern const uint8_t kUpscaleFilterUnsigned[kSuperResFilterShifts]
[kSuperResFilterTaps];
extern const int8_t kWarpedFilters8[3 * kWarpedPixelPrecisionShifts + 1][8];
extern const int16_t kWarpedFilters[3 * kWarpedPixelPrecisionShifts + 1][8];
extern const int8_t kHalfSubPixelFilters[6][16][8];
extern const uint8_t kAbsHalfSubPixelFilters[6][16][8];
extern const int16_t kDirectionalIntraPredictorDerivative[44];
extern const uint8_t kDeblockFilterLevelIndex[kMaxPlanes][kNumLoopFilterTypes];
extern const uint16_t kBlockWeight[kMaxBlockSizes];
}
#endif