On 08/10/2011 10:51 AM, Justin Ruggles wrote:

> ---
>  libavcodec/ac3enc_float.c    |    7 ++++---
>  libavcodec/ac3enc_template.c |    4 ----
>  2 files changed, 4 insertions(+), 7 deletions(-)
> 
> diff --git a/libavcodec/ac3enc_float.c b/libavcodec/ac3enc_float.c
> index 8e74aaf..32ec558 100644
> --- a/libavcodec/ac3enc_float.c
> +++ b/libavcodec/ac3enc_float.c
> @@ -104,9 +104,10 @@ static int normalize_samples(AC3EncodeContext *s)
>  static void scale_coefficients(AC3EncodeContext *s)
>  {
>      int chan_size = AC3_MAX_COEFS * s->num_blocks;
> -    s->ac3dsp.float_to_fixed24(s->fixed_coef_buffer + chan_size,
> -                               s->mdct_coef_buffer  + chan_size,
> -                               chan_size * s->channels);
> +    int cpl       = s->cpl_on;
> +    s->ac3dsp.float_to_fixed24(s->fixed_coef_buffer + (chan_size * !cpl),
> +                               s->mdct_coef_buffer  + (chan_size * !cpl),
> +                               chan_size * (s->channels + cpl));
>  }
>  
>  
> diff --git a/libavcodec/ac3enc_template.c b/libavcodec/ac3enc_template.c
> index 7a6d72f..e79ae14 100644
> --- a/libavcodec/ac3enc_template.c
> +++ b/libavcodec/ac3enc_template.c
> @@ -173,10 +173,6 @@ static void apply_channel_coupling(AC3EncodeContext *s)
>  
>          /* coefficients must be clipped in order to be encoded */
>          clip_coefficients(&s->dsp, cpl_coef, num_cpl_coefs);
> -
> -        /* scale coupling coefficients from float to 24-bit fixed-point */
> -        s->ac3dsp.float_to_fixed24(&block->fixed_coef[CPL_CH][cpl_start],
> -                                   cpl_coef, num_cpl_coefs);
>      }
>  
>      /* calculate energy in each band in coupling channel and each fbw 
> channel */


ping.

-Justin
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to