Change #275177
| Category | ffmpeg |
| Changed by | Lynne <dev@lynne.ee> |
| Changed at | Sun 19 Jul 2026 14:41:53 |
| Repository | https://git.ffmpeg.org/ffmpeg.git |
| Project | ffmpeg |
| Branch | master |
| Revision | 9d0a4132ff5b53ba2240ed2465f953a0d1a55634 |
Comments
avcodec/aacenc: rework NMR stereo decisions, retune coded bandwidth
Stereo decisions are made per band before quantization, from the psy
model's spectra, and carry cross-frame memory (EMA-smoothed statistics,
per-grid mode banks, leave-hysteresis) so the image holds instead of
churning:
* M/S adopts content-driven and rate-free (side under half the mid);
for mid-dominant bands M/S is simply the better coding at every
rate, and a wandering L/R fraction reads as image instability.
* I/S competes with M/S above 6.1 kHz instead of only seeing M/S
rejects (which are exactly the wide bands it cannot render), and
engages under SUSTAINED strain only: the pressure ramp gated by the
lambda floor, so pressure spikes at a comfortable operating point
cannot flood it onto content where coding the side is affordable
and strictly better. Unengaged candidates fall back to M/S.
* Pairs whose joint-tool candidacy fraction stays low decouple:
block switching goes per-channel and M/S stops, matching how
independent coding wins on diffuse decorrelated content.
* PNS in a pair is reserved for clearly-wide bands (it renders
uncorrelated noise per channel).
Block switching for a pair is decided through the psy window_pair()
hook so common_window survives transients.
The NMR rate-to-bandwidth table is retuned upward at >= 48 kbps/ch to
track the bandwidth strong encoders deliver; both quality metrics
improve on a 16-clip battery and wider regresses. Lower rates are
unchanged.
Changed files
- libavcodec/aacenc.c
- tests/fate/aac.mak
- tests/ref/fate/id3v2-reenc-delete-metadata
- tests/ref/fate/id3v2-reenc-delete-metadata-keep
- tests/ref/fate/id3v2-reenc-delete-metadata-keep-format
- tests/ref/fate/id3v2-reenc-delete-metadata-keep-stream
- tests/ref/fate/id3v2-reenc-delete-metadata-map-metadata