[FFmpeg-soc] [soc]: r3561 - mlp/mlpenc.c

Michael Niedermayer michaelni at gmx.at
Sat Aug 23 20:01:05 CEST 2008


On Sat, Aug 23, 2008 at 05:39:26PM +0200, ramiro wrote:
> Author: ramiro
> Date: Sat Aug 23 17:39:25 2008
> New Revision: 3561
> 
> Log:
> Simple stereo decorrelation (mostly copied from alacenc.c).

[...]

> Modified: mlp/mlpenc.c
> ==============================================================================
> --- mlp/mlpenc.c	(original)
> +++ mlp/mlpenc.c	Sat Aug 23 17:39:25 2008
> @@ -49,7 +49,8 @@ typedef struct {
>      uint8_t         count;                  ///< number of matrices to apply
>  
>      uint8_t         outch[MAX_MATRICES];    ///< output channel for each matrix
> -    int32_t         coeff[MAX_MATRICES][MAX_CHANNELS+2];
> +    int32_t         forco[MAX_MATRICES][MAX_CHANNELS+2];    ///< forward coefficients
> +    int32_t         coeff[MAX_MATRICES][MAX_CHANNELS+2];    ///< decoding coefficients
>      uint8_t         fbits[MAX_CHANNELS];    ///< fraction bits
>  
>      int8_t          shift[MAX_CHANNELS];    ///< Left shift to apply to decoded PCM values to get final 24-bit output.

you do not need 2 arrays


[...]
> @@ -936,17 +974,48 @@ static void lossless_matrix_coeffs(MLPEn
>  
>      generate_2_noise_channels(ctx);
>  
> -    /* TODO actual decorrelation. */
> -
> -    mp->count    = 1;
> -    mp->outch[0] = 1;
> +    mode = estimate_stereo_mode(ctx);
>  
> -    mp->coeff[0][0] =  1 << 14;
> -    mp->coeff[0][1] = -1 << 14;
> -    mp->coeff[0][2] =  0 << 14;
> -    mp->coeff[0][3] =  0 << 14;
> +    switch(mode) {

> +        case MLP_CHMODE_MID_SIDE:
> +        case MLP_CHMODE_LEFT_RIGHT:
> +            mp->count    = 0;
> +            break;

this is wrong

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/attachments/20080823/da322251/attachment.pgp>


More information about the FFmpeg-soc mailing list