diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2016-03-06 17:28:42 +0100 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2016-03-08 23:56:51 +0100 |
commit | b91e3763905ad95602f2b4e91d37415692573248 (patch) | |
tree | e1d41e6d4d080ab85612d599c43d21608920f434 /libavcodec/aacenc.h | |
parent | b3e0371818917364be0b2f4b24831b4ed987392f (diff) | |
download | ffmpeg-b91e3763905ad95602f2b4e91d37415692573248.tar.gz |
aacenc: use generational cache instead of resetting.
Approximately 11% faster transcoding from mp3 with
default settings.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Diffstat (limited to 'libavcodec/aacenc.h')
-rw-r--r-- | libavcodec/aacenc.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/aacenc.h b/libavcodec/aacenc.h index 2252e2989c..63e789366f 100644 --- a/libavcodec/aacenc.h +++ b/libavcodec/aacenc.h @@ -84,10 +84,10 @@ extern AACCoefficientsEncoder ff_aac_coders[]; typedef struct AACQuantizeBandCostCacheEntry { float rd; float energy; - int bits; ///< -1 means uninitialized entry + int bits; char cb; char rtz; - char padding[2]; ///< Keeps the entry size a multiple of 32 bits + uint16_t generation; } AACQuantizeBandCostCacheEntry; /** @@ -126,6 +126,7 @@ typedef struct AACEncContext { DECLARE_ALIGNED(16, int, qcoefs)[96]; ///< quantized coefficients DECLARE_ALIGNED(32, float, scoefs)[1024]; ///< scaled coefficients + uint16_t quantize_band_cost_cache_generation; AACQuantizeBandCostCacheEntry quantize_band_cost_cache[256][128]; ///< memoization area for quantize_band_cost struct { |