[FFmpeg-soc] [soc]: r1688 - in eac3: eac3.h eac3dec.c
jbr
subversion at mplayerhq.hu
Sat Dec 29 05:56:37 CET 2007
Author: jbr
Date: Sat Dec 29 05:56:37 2007
New Revision: 1688
Log:
rename delta bit allocation variables
Modified:
eac3/eac3.h
eac3/eac3dec.c
Modified: eac3/eac3.h
==============================================================================
--- eac3/eac3.h (original)
+++ eac3/eac3.h Sat Dec 29 05:56:37 2007
@@ -156,11 +156,11 @@ typedef struct EAC3Context{
int16_t psd[AC3_MAX_CHANNELS][AC3_MAX_COEFS]; ///< scaled exponents
int16_t bndpsd[AC3_MAX_CHANNELS][50]; ///< interpolated exponents
int16_t mask[AC3_MAX_CHANNELS][50]; ///< masking values
- uint8_t deltbae[AC3_MAX_CHANNELS]; ///< Delta bit allocation exists
- uint8_t deltnseg[AC3_MAX_CHANNELS]; ///< Channel delta bit allocation number of segments
- uint8_t deltoffst[AC3_MAX_CHANNELS][9]; ///< Channel delta bit allocation offset
- uint8_t deltlen[AC3_MAX_CHANNELS][9]; ///< Channel delta bit allocation length
- uint8_t deltba[AC3_MAX_CHANNELS][9]; ///< Channel delta bit allocation
+ uint8_t dba_mode[AC3_MAX_CHANNELS]; ///< Delta bit allocation mode (deltbae)
+ uint8_t dba_nsegs[AC3_MAX_CHANNELS]; ///< Number of delta segments (deltnseg)
+ uint8_t dba_offsets[AC3_MAX_CHANNELS][9]; ///< Delta segment offsets (deltoffst)
+ uint8_t dba_lengths[AC3_MAX_CHANNELS][9]; ///< Delta segment lengths (deltlen)
+ uint8_t dba_values[AC3_MAX_CHANNELS][9]; ///< Delta values for each segment (deltba)
///@}
///@defgroup dithering Zero-Mantissa Dithering
Modified: eac3/eac3dec.c
==============================================================================
--- eac3/eac3dec.c (original)
+++ eac3/eac3dec.c Sat Dec 29 05:56:37 2007
@@ -1071,21 +1071,21 @@ static int parse_audblk(EAC3Context *s,
/* Delta bit allocation information */
if (s->dba_syntax && get_bits1(gbc)) {
for (ch = !s->cpl_in_use[blk]; ch <= s->fbw_channels; ch++) {
- s->deltbae[ch] = get_bits(gbc, 2);
+ s->dba_mode[ch] = get_bits(gbc, 2);
}
for (ch = !s->cpl_in_use[blk]; ch <= s->fbw_channels; ch++) {
- if (s->deltbae[ch] == DBA_NEW) {
- s->deltnseg[ch] = get_bits(gbc, 3);
- for (seg = 0; seg <= s->deltnseg[ch]; seg++) {
- s->deltoffst[ch][seg] = get_bits(gbc, 5);
- s->deltlen[ch][seg] = get_bits(gbc, 4);
- s->deltba[ch][seg] = get_bits(gbc, 3);
+ if (s->dba_mode[ch] == DBA_NEW) {
+ s->dba_nsegs[ch] = get_bits(gbc, 3);
+ for (seg = 0; seg <= s->dba_nsegs[ch]; seg++) {
+ s->dba_offsets[ch][seg] = get_bits(gbc, 5);
+ s->dba_lengths[ch][seg] = get_bits(gbc, 4);
+ s->dba_values[ch][seg] = get_bits(gbc, 3);
}
}
}
} else if (!blk) {
for (ch = 0; ch <= s->num_channels; ch++) {
- s->deltbae[ch] = DBA_NONE;
+ s->dba_mode[ch] = DBA_NONE;
}
}
@@ -1106,9 +1106,9 @@ static int parse_audblk(EAC3Context *s,
ff_ac3_bit_alloc_calc_mask(&s->bit_alloc_params,
s->bndpsd[ch], s->start_freq[ch], s->end_freq[ch], s->fgain[ch],
(ch == s->lfe_channel),
- s->deltbae[ch], s->deltnseg[ch],
- s->deltoffst[ch], s->deltlen[ch],
- s->deltba[ch], s->mask[ch]);
+ s->dba_mode[ch], s->dba_nsegs[ch],
+ s->dba_offsets[ch], s->dba_lengths[ch],
+ s->dba_values[ch], s->mask[ch]);
if (s->channel_uses_aht[ch] == 0)
ff_ac3_bit_alloc_calc_bap(s->mask[ch], s->psd[ch], s->start_freq[ch],
More information about the FFmpeg-soc
mailing list