aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/dca.h
diff options
context:
space:
mode:
authorAlexandra Hájková <alexandra.khirnova@gmail.com>2015-12-17 15:52:47 +0100
committerJanne Grunau <janne-libav@jannau.net>2015-12-23 11:50:18 +0100
commitaebf07075f4244caf591a3af71e5872fe314e87b (patch)
tree6341986176d7d58b58e7f25cbde1b25ba8445efa /libavcodec/dca.h
parent85990140e7302d1e7fcc9fc0eea316178c19fe03 (diff)
downloadffmpeg-aebf07075f4244caf591a3af71e5872fe314e87b.tar.gz
dca: change the core to work with integer coefficients.
The DCA core decoder converts integer coefficients read from the bitstream to floats just after reading them (along with dequantization). All the other steps of the audio reconstruction are done with floats which makes the output for the DTS lossless extension (XLL) actually lossy. This patch changes the DCA core to work with integer coefficients until QMF. At this point the integer coefficients are converted to floats. The coefficients for the LFE channel (lfe_data) are not touched. This is the first step for the really lossless XLL decoding.
Diffstat (limited to 'libavcodec/dca.h')
-rw-r--r--libavcodec/dca.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/dca.h b/libavcodec/dca.h
index 6548d75634..a85470d106 100644
--- a/libavcodec/dca.h
+++ b/libavcodec/dca.h
@@ -138,8 +138,8 @@ typedef struct DCAAudioHeader {
int transient_huffman[DCA_PRIM_CHANNELS_MAX]; ///< transient mode code book
int scalefactor_huffman[DCA_PRIM_CHANNELS_MAX]; ///< scale factor code book
int bitalloc_huffman[DCA_PRIM_CHANNELS_MAX]; ///< bit allocation quantizer select
- int quant_index_huffman[DCA_PRIM_CHANNELS_MAX][DCA_ABITS_MAX]; ///< quantization index codebook select
- float scalefactor_adj[DCA_PRIM_CHANNELS_MAX][DCA_ABITS_MAX]; ///< scale factor adjustment
+ int quant_index_huffman[DCA_PRIM_CHANNELS_MAX][DCA_ABITS_MAX]; ///< quantization index codebook select
+ uint32_t scalefactor_adj[DCA_PRIM_CHANNELS_MAX][DCA_ABITS_MAX]; ///< scale factor adjustment
int subframes; ///< number of subframes
int total_channels; ///< number of channels including extensions
@@ -147,10 +147,10 @@ typedef struct DCAAudioHeader {
} DCAAudioHeader;
typedef struct DCAChan {
- DECLARE_ALIGNED(32, float, subband_samples)[DCA_BLOCKS_MAX][DCA_SUBBANDS][8];
+ DECLARE_ALIGNED(32, int32_t, subband_samples)[DCA_BLOCKS_MAX][DCA_SUBBANDS][8];
/* Subband samples history (for ADPCM) */
- DECLARE_ALIGNED(16, float, subband_samples_hist)[DCA_SUBBANDS][4];
+ DECLARE_ALIGNED(32, int32_t, subband_samples_hist)[DCA_SUBBANDS][4];
int hist_index;
/* Half size is sufficient for core decoding, but for 96 kHz data