Skip to content

Add adaptive-bias quantization (poor man's trellis) - #177

Draft
skal65535 wants to merge 2 commits into
mainfrom
skal/bias
Draft

Add adaptive-bias quantization (poor man's trellis)#177
skal65535 wants to merge 2 commits into
mainfrom
skal/bias

Conversation

@skal65535

Copy link
Copy Markdown
Collaborator

'-adapt_bias' modulates the AC quantization bias per-block.

  • adds Encoder::AdaptiveBiasQuantizeBlock, dispatched with GetActiveQuantizeBlockFunc()
  • zero cost to the non-adaptive paths.

JPEG only spends bits on coeffs' num_bits coding, mantissa isn't Huffman-coded.
=> adaptive bias only nudges coefficients at the threshold of power-of-two.
And by an amount proportional to a per-block flat/normal/busy activity
estimation.

'-adapt_bias' modulates the AC quantization bias per-block.

* adds Encoder::AdaptiveBiasQuantizeBlock, dispatched with GetActiveQuantizeBlockFunc()
* zero cost to the non-adaptive paths.

JPEG only spends bits on coeffs' num_bits coding, mantissa isn't Huffman-coded.
=> adaptive bias only nudges coefficients at the threshold of power-of-two.
And by an amount proportional to a per-block flat/normal/busy activity
estimation.
* ClassifyBlockActivity() owns perceptual masking (flat/normal/busy
  tiers) -- separate from AdaptiveBiasQuantizeBlock's bit-cost-correct
  rounding at the 0-vs-1 survival edge.
* Each piece's comment now justifies only its own concept.
* Drop DCTCoeffs::bias_: written but never read.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant