diff options
author | Claudio Freire <klaussfreire@gmail.com> | 2015-09-23 02:13:56 -0300 |
---|---|---|
committer | Claudio Freire <klaussfreire@gmail.com> | 2015-09-23 02:33:44 -0300 |
commit | 7ec74ae4aaf50507c5da3dfbb7336e15f848b99b (patch) | |
tree | 2ff0ca4d23f852a61fc47c006b3cf2419eb48ba7 /libavcodec/psymodel.h | |
parent | b01f3ddad31aba45254dfd553447c7952f86fd31 (diff) | |
download | ffmpeg-7ec74ae4aaf50507c5da3dfbb7336e15f848b99b.tar.gz |
AAC encoder: tweak rate-distortion logic
This patch modifies the encode frame function to
retry encoding the frame when the resulting bit count
is too far off target, but only adjusting lambda
in small, incremental step. It also makes the logic
more conservative - otherwise it will contend with
bit reservoir-related variations in bit allocation,
and result in artifacts when frame have to be truncated
(usually at high bit rates transitioning from low
complexity to high complexity).
Diffstat (limited to 'libavcodec/psymodel.h')
-rw-r--r-- | libavcodec/psymodel.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/psymodel.h b/libavcodec/psymodel.h index e9be1f6fa5..a04cc4d226 100644 --- a/libavcodec/psymodel.h +++ b/libavcodec/psymodel.h @@ -88,6 +88,7 @@ typedef struct FFPsyContext { struct { int size; ///< size of the bitresevoir in bits int bits; ///< number of bits used in the bitresevoir + int alloc; ///< number of bits allocated by the psy, or -1 if no allocation was done } bitres; void* model_priv_data; ///< psychoacoustic model implementation private data |