summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRostislav Pehlivanov <atomnuker@gmail.com>2015-06-26 21:16:30 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-06-28 00:15:21 +0200
commitd71935f8833d81a7ae13e0bd889db5e3e3c46e36 (patch)
treed3696ddeb33005600d6a169b3a5b8c943272ea3f
parent6323647c3550fe1aa3d92ff112de2d2f0d8da267 (diff)
aac: add additional fields needed by the encoder for intensity stereo
This commit adds additional fields which are used by the native encoder to add intensity stereo support. It also adds some clarifying statements to the comments for the codebooks. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/aac.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/libavcodec/aac.h b/libavcodec/aac.h
index 23ec085d8e..75494d2af1 100644
--- a/libavcodec/aac.h
+++ b/libavcodec/aac.h
@@ -76,9 +76,10 @@ enum BandType {
ZERO_BT = 0, ///< Scalefactors and spectral data are all zero.
FIRST_PAIR_BT = 5, ///< This and later band types encode two values (rather than four) with one code word.
ESC_BT = 11, ///< Spectral data are coded with an escape sequence.
+ RESERVED_BT = 12, ///< Band types following are encoded differently from others.
NOISE_BT = 13, ///< Spectral data are scaled white noise not coded in the bitstream.
- INTENSITY_BT2 = 14, ///< Scalefactor data are intensity stereo positions.
- INTENSITY_BT = 15, ///< Scalefactor data are intensity stereo positions.
+ INTENSITY_BT2 = 14, ///< Scalefactor data are intensity stereo positions (out of phase).
+ INTENSITY_BT = 15, ///< Scalefactor data are intensity stereo positions (in phase).
};
#define IS_CODEBOOK_UNSIGNED(x) (((x) - 1) & 10)
@@ -237,6 +238,8 @@ typedef struct SingleChannelElement {
float sf[120]; ///< scalefactors
int sf_idx[128]; ///< scalefactor indices (used by encoder)
uint8_t zeroes[128]; ///< band is not coded (used by encoder)
+ float is_ener[128]; ///< Intensity stereo pos (used by encoder)
+ float pns_ener[128]; ///< Noise energy values (used by encoder)
DECLARE_ALIGNED(32, float, pcoeffs)[1024]; ///< coefficients for IMDCT, pristine
DECLARE_ALIGNED(32, float, coeffs)[1024]; ///< coefficients for IMDCT, maybe processed
DECLARE_ALIGNED(32, float, saved)[1536]; ///< overlap
@@ -254,7 +257,9 @@ typedef struct ChannelElement {
// CPE specific
int common_window; ///< Set if channels share a common 'IndividualChannelStream' in bitstream.
int ms_mode; ///< Signals mid/side stereo flags coding mode (used by encoder)
+ uint8_t is_mode; ///< Set if any bands have been encoded using intensity stereo (used by encoder)
uint8_t ms_mask[128]; ///< Set if mid/side stereo is used for each scalefactor window band
+ uint8_t is_mask[128]; ///< Set if intensity stereo is used (used by encoder)
// shared
SingleChannelElement ch[2];
// CCE specific