Skip to content

Commit 5429c0f

Browse files
authored
quantize: drop maxe*=gsize tonal scaling in bmask (#115)
bmask()'s tonal-masking term scaled the per-band peak energy by gsize (the number of grouped short windows). This dates to the 2017 "initial windows grouping support" commit, where avge changed from a single-window average to a gsize-summed total and maxe (still a single-window peak) was multiplied by gsize to match its scale. The quantizer was later rewritten so the masking target uses avge/avgenrg and maxe/avgenrg as ratios against a separately-scaled avgenrg. In that form the gsize multiply no longer matches anything -- it just inflates the tonal term on grouped short blocks and quantizes transients too coarsely.
1 parent 960a0ea commit 5429c0f

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

libfaac/quantize.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ static void bmask(CoderInfo * __restrict coderInfo, faac_real * __restrict xr0,
172172
bandenrg[sfb] = avge;
173173
/* Track peak magnitude to identify potential Huffman overflows. */
174174
bandmaxe[sfb] = FAAC_SQRT(maxe);
175-
maxe *= gsize;
176175

177176
avgenrg = (totenrg / last) * (end - start);
178177

0 commit comments

Comments
 (0)