summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2008-08-27 01:40:46 +0000
committerJustin Ruggles <justin.ruggles@gmail.com>2008-08-27 01:40:46 +0000
commit0ffea2439bdb9275a34cac1830cfee29819a69e0 (patch)
tree1735a32d7577b51088d87be1e9603c0c94163709 /libavcodec
parente43b29ab26e831abdbba7cc481d1c704c0d86ee5 (diff)
copy default coupling band structure from table to decoding context (used for E-AC-3)
Originally committed as revision 14990 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/ac3dec.c3
-rw-r--r--libavcodec/ac3dec.h2
2 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index e4a1e754db..3a7eec902f 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -824,6 +824,9 @@ static int decode_audio_block(AC3DecodeContext *s, int blk)
s->cpl_band_struct[bnd] = get_bits1(gbc);
}
} else if (!blk) {
+ memcpy(s->cpl_band_struct,
+ &ff_eac3_default_cpl_band_struct[cpl_begin_freq+1],
+ s->num_cpl_subbands-1);
}
s->cpl_band_struct[s->num_cpl_subbands-1] = 0;
diff --git a/libavcodec/ac3dec.h b/libavcodec/ac3dec.h
index 9e44019b14..26d613538c 100644
--- a/libavcodec/ac3dec.h
+++ b/libavcodec/ac3dec.h
@@ -82,7 +82,7 @@ typedef struct {
int phase_flags[18]; ///< phase flags (phsflg)
int num_cpl_subbands; ///< number of coupling sub bands (ncplsubnd)
int num_cpl_bands; ///< number of coupling bands (ncplbnd)
- int cpl_band_struct[18]; ///< coupling band structure (cplbndstrc)
+ uint8_t cpl_band_struct[18]; ///< coupling band structure (cplbndstrc)
int firstchincpl; ///< first channel in coupling
int first_cpl_coords[AC3_MAX_CHANNELS]; ///< first coupling coordinates states (firstcplcos)
int cpl_coords[AC3_MAX_CHANNELS][18]; ///< coupling coordinates (cplco)