MCPcopy Create free account
hub / github.com/AOMediaCodec/libavif / doesLevelMatch

Function doesLevelMatch

src/codec_aom.c:596–601  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

594}
595
596static avifBool doesLevelMatch(int width, int height, int levelWidth, int levelHeight, int levelDimMult)
597{
598 const int64_t levelLumaPels = (int64_t)levelWidth * levelHeight;
599 const int64_t lumaPels = (int64_t)width * height;
600 return lumaPels <= levelLumaPels && width <= levelWidth * levelDimMult && height <= levelHeight * levelDimMult;
601}
602
603// Quality (q) to quantizer (qp) formula for tune=iq (Image Quality), expressed as a look-up table for more clarity.
604// The formula below is a piecewise linear function. Each segment was empirically selected to correct for the

Callers 1

aomCodecEncodeImageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected