Thanks Jmvalin, if you could give me some direction that would be much appreciated.You want to look at the celt/celt_encoder.c file. The transient_analysis() function returns 1 when the current frame is a transient and 0 otherwise. It also computes an estimate how how "strong" the transient is, which it returns in tf_estimate. That value gets used in compute_vbr() to boost the bitrate. To change the behaviour, you'd have to change the value of that estimate, and then update tf_calibration so that the average bitrate doesn't change.
That's curious -- I assumed that when "tonality estimation" was implemented in v1.1 for tonally rich content, the final bitrate did actually increase when averaged over a large collection, compared to v1.0. Further boosting transients wouldn't work the same way?No, when tonality estimation was added, the bitrate of the (vast majority of) non-tonal files decreased slightly to ensure that the average over a large collection stayed the same. Of course, you can argue how representative my collection is, but I try to make sure any change I make to VBR does not change the overall average. One note about 1.0 though. While it did have transient boosting in VBR mode, the VBR was tuned to always produce the same average over an individual file. Truly unconstrained VBR only arrived with 1.1.
In any case, I wasn't making the case for this boosting feature to become the default behaviour of the encoder, just that it would be useful to be able to have it as an option if needed (much like the ability to define framesize).If a VBR change is good, if should be on by default. If it's only good in some files, then you might as well just increase the value you pass to --bitrate.