[FFmpeg-soc] [soc]: r1713 - in eac3: ac3dec.c ac3dec.h eac3dec.c
jbr
subversion at mplayerhq.hu
Sun Dec 30 20:42:36 CET 2007
Author: jbr
Date: Sun Dec 30 20:42:35 2007
New Revision: 1713
Log:
change ff_ac3_do_rematrixing() back to taking an AC3DecodeContext as an
argument
Modified:
eac3/ac3dec.c
eac3/ac3dec.h
eac3/eac3dec.c
Modified: eac3/ac3dec.c
==============================================================================
--- eac3/ac3dec.c (original)
+++ eac3/ac3dec.c Sun Dec 30 20:42:35 2007
@@ -540,21 +540,22 @@ static int get_transform_coeffs(AC3Decod
* Stereo rematrixing.
* reference: Section 7.5.4 Rematrixing : Decoding Technique
*/
-void ff_ac3_do_rematrixing(float (*transform_coeffs)[256], int end,
- int num_rematrixing_bands, int *rematrixing_flags)
+void ff_ac3_do_rematrixing(AC3DecodeContext *ctx)
{
int bnd, i;
- int bndend;
+ int end, bndend;
float tmp0, tmp1;
- for(bnd=0; bnd<num_rematrixing_bands; bnd++) {
- if(rematrixing_flags[bnd]) {
+ end = FFMIN(ctx->end_freq[1], ctx->end_freq[2]);
+
+ for(bnd=0; bnd<ctx->num_rematrixing_bands; bnd++) {
+ if(ctx->rematrixing_flags[bnd]) {
bndend = FFMIN(end, ff_ac3_rematrix_band_tab[bnd+1]);
for(i=ff_ac3_rematrix_band_tab[bnd]; i<bndend; i++) {
- tmp0 = transform_coeffs[1][i];
- tmp1 = transform_coeffs[2][i];
- transform_coeffs[1][i] = tmp0 + tmp1;
- transform_coeffs[2][i] = tmp0 - tmp1;
+ tmp0 = ctx->transform_coeffs[1][i];
+ tmp1 = ctx->transform_coeffs[2][i];
+ ctx->transform_coeffs[1][i] = tmp0 + tmp1;
+ ctx->transform_coeffs[2][i] = tmp0 - tmp1;
}
}
}
@@ -938,9 +939,7 @@ static int ac3_parse_audio_block(AC3Deco
/* recover coefficients if rematrixing is in use */
if(ctx->channel_mode == AC3_CHMODE_STEREO) {
- ff_ac3_do_rematrixing(ctx->transform_coeffs,
- FFMIN(ctx->end_freq[1], ctx->end_freq[2]),
- ctx->num_rematrixing_bands, ctx->rematrixing_flags);
+ ff_ac3_do_rematrixing(ctx);
}
/* apply scaling to coefficients (headroom, dynrng) */
Modified: eac3/ac3dec.h
==============================================================================
--- eac3/ac3dec.h (original)
+++ eac3/ac3dec.h Sun Dec 30 20:42:35 2007
@@ -250,7 +250,7 @@ void ff_ac3_uncouple_channels(AC3DecodeC
void ff_ac3_remove_dithering(AC3DecodeContext *s);
-void ff_ac3_do_rematrixing(float (*transform_coeffs)[256], int end, int nrematbnd, int *rematflg);
+void ff_ac3_do_rematrixing(AC3DecodeContext *s);
void ff_ac3_do_imdct_256(float *tmp_output, float *transform_coeffs,
MDCTContext *imdct_256, float *tmp_imdct);
Modified: eac3/eac3dec.c
==============================================================================
--- eac3/eac3dec.c (original)
+++ eac3/eac3dec.c Sun Dec 30 20:42:35 2007
@@ -1237,9 +1237,7 @@ static int eac3_decode_frame(AVCodecCont
/* recover coefficients if rematrixing is in use */
if (c->channel_mode == AC3_CHMODE_STEREO)
- ff_ac3_do_rematrixing(c->transform_coeffs,
- FFMIN(c->end_freq[1], c->end_freq[2]),
- c->num_rematrixing_bands, c->rematrixing_flags);
+ ff_ac3_do_rematrixing(c);
/* apply scaling to coefficients (dialnorm, dynrng) */
for (ch = 1; ch <= c->fbw_channels + c->lfe_on; ch++) {
More information about the FFmpeg-soc
mailing list