From 08a747afb98c11da48b89339c2f1c5fdc56ced7e Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Wed, 13 Jul 2011 12:20:29 -0400 Subject: eac3enc: use frame exponent strategy when applicable. This checks if the set of selected exponent strategies for all blocks in a channel are in the frame exponent strategy table, and if so, writes the table index instead of each strategy. This saves up to 7 bits per channel per frame, so the overall effect on quality is small. --- libavcodec/ac3enc.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libavcodec/ac3enc.h') diff --git a/libavcodec/ac3enc.h b/libavcodec/ac3enc.h index 6caf4d80c4..a4a8fd4325 100644 --- a/libavcodec/ac3enc.h +++ b/libavcodec/ac3enc.h @@ -217,6 +217,8 @@ typedef struct AC3EncodeContext { uint8_t *cpl_coord_mant_buffer; uint8_t exp_strategy[AC3_MAX_CHANNELS][AC3_MAX_BLOCKS]; ///< exponent strategies + uint8_t frame_exp_strategy[AC3_MAX_CHANNELS]; ///< frame exp strategy index + int use_frame_exp_strategy; ///< indicates use of frame exp strategy uint8_t exp_ref_block[AC3_MAX_CHANNELS][AC3_MAX_BLOCKS]; ///< reference blocks for EXP_REUSE uint8_t *ref_bap [AC3_MAX_CHANNELS][AC3_MAX_BLOCKS]; ///< bit allocation pointers (bap) int ref_bap_set; ///< indicates if ref_bap pointers have been set -- cgit v1.2.3