[FFmpeg-soc] [soc]: r3725 - in eac3: eac3dec.c ffmpeg.patch
jbr
subversion at mplayerhq.hu
Mon Sep 8 01:56:07 CEST 2008
Author: jbr
Date: Mon Sep 8 01:56:06 2008
New Revision: 3725
Log:
read spx attenuation code
Modified:
eac3/eac3dec.c
eac3/ffmpeg.patch
Modified: eac3/eac3dec.c
==============================================================================
--- eac3/eac3dec.c (original)
+++ eac3/eac3dec.c Mon Sep 8 01:56:06 2008
@@ -522,12 +522,11 @@ int ff_eac3_parse_header(AC3DecodeContex
}
/* spectral extension attenuation data */
- if (parse_spx_atten_data) {
for (ch = 1; ch <= s->fbw_channels; ch++) {
- if (get_bits1(gbc)) { // channel has spx attenuation
- skip_bits(gbc, 5); // skip spx attenuation code
- }
- }
+ if (parse_spx_atten_data && get_bits1(gbc))
+ s->spx_atten_code[ch] = get_bits(gbc, 5);
+ else
+ s->spx_atten_code[ch] = -1;
}
/* block start information */
Modified: eac3/ffmpeg.patch
==============================================================================
--- eac3/ffmpeg.patch (original)
+++ eac3/ffmpeg.patch Mon Sep 8 01:56:06 2008
@@ -16,7 +16,7 @@ Index: libavcodec/ac3dec.h
typedef struct {
AVCodecContext *avctx; ///< parent context
GetBitContext gbc; ///< bitstream reader
-@@ -79,15 +85,33 @@
+@@ -79,15 +85,34 @@
int cpl_strategy_exists[MAX_BLOCKS]; ///< coupling strategy exists (cplstre)
int channel_in_cpl[AC3_MAX_CHANNELS]; ///< channel in coupling (chincpl)
int phase_flags_in_use; ///< phase flags in use (phsflginu)
@@ -35,6 +35,7 @@ Index: libavcodec/ac3dec.h
+///@defgroup spx spectral extension
+ int spx_in_use[MAX_BLOCKS]; ///< spectral extension in use (spxinu)
+ int channel_in_spx[AC3_MAX_CHANNELS]; ///< channel in spectral extension (chinspx)
++ int spx_atten_code[AC3_MAX_CHANNELS]; ///< spx attenuation code (spxattencod)
+ int spx_coords_exist[AC3_MAX_CHANNELS]; ///< indicates if a channel has spx coords (spxcoe)
+ int spx_start_subband; ///< spx beginning frequency band (spxbegf)
+ int spx_start_freq; ///< spx start frequency bin
@@ -53,7 +54,7 @@ Index: libavcodec/ac3dec.h
///@defgroup aht adaptive hybrid transform
int channel_uses_aht[AC3_MAX_CHANNELS]; ///< channel AHT in use (chahtinu)
int pre_mantissa[AC3_MAX_CHANNELS][AC3_MAX_COEFS][MAX_BLOCKS]; ///< pre-IDCT mantissas
-@@ -179,4 +203,6 @@
+@@ -179,4 +204,6 @@
*/
void ff_eac3_decode_transform_coeffs_aht_ch(AC3DecodeContext *s, int ch);
More information about the FFmpeg-soc
mailing list