mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-19 05:49:09 +02:00
88e498a87e
As noted in a comment, pe.min in the reference encoder is centered around current pe. The bit reservoir algo needs pe.min to be a local minimum, because it can only account for local PE variations. If it's set to a global minimum as was being done, bit reservoir logic doesn't work as efficiently. This patch tries to forget old minimums and converge to a local minimum without losing the stability of the previous solution. Listening tests until now suggest this solves numerous RC issues.