[FFmpeg-soc] [soc]: r5213 - wmapro/wmaprodec.c

Diego Biurrun diego at biurrun.de
Fri Aug 21 18:31:57 CEST 2009


On Fri, Aug 21, 2009 at 06:21:37PM +0200, faust3 wrote:
> 
> Log:
> random cosmetic "fixes"

nice :)

> --- wmapro/wmaprodec.c	Fri Aug 21 17:19:51 2009	(r5212)
> +++ wmapro/wmaprodec.c	Fri Aug 21 18:21:36 2009	(r5213)
> @@ -225,17 +225,17 @@ typedef struct WMA3DecodeContext {
>  
> -    PRINT("ed sample bit depth",s->bits_per_sample);
> -    PRINT_HEX("ed decode flags",s->decode_flags);
> -    PRINT("samples per frame",s->samples_per_frame);
> -    PRINT("log2 frame size",s->log2_frame_size);
> -    PRINT("max num subframes",s->max_num_subframes);
> -    PRINT("len prefix",s->len_prefix);
> -    PRINT("num channels",s->num_channels);
> -    PRINT("lossless",s->lossless);
> +    PRINT("ed sample bit depth", s->bits_per_sample);
> +    PRINT_HEX("ed decode flags", s->decode_flags);
> +    PRINT("samples per frame", s->samples_per_frame);
> +    PRINT("log2 frame size", s->log2_frame_size);
> +    PRINT("max num subframes", s->max_num_subframes);
> +    PRINT("len prefix", s->len_prefix);
> +    PRINT("num channels", s->num_channels);
> +    PRINT("lossless", s->lossless);

This could even be aligned..

> @@ -316,7 +316,7 @@ static av_cold int decode_init(AVCodecCo
>          av_log(avctx, AV_LOG_ERROR, "invalid number of subframes %i\n",
> -                      s->max_num_subframes);
> +            s->max_num_subframes);

That's not an improvement, the second line should be aligned with the
first character after the '('.

> @@ -339,43 +339,43 @@ static av_cold int decode_init(AVCodecCo
>      }
>  
>      INIT_VLC_STATIC(&sf_vlc, SCALEVLCBITS, HUFF_SCALE_SIZE,
> -                 scale_huffbits, 1, 1,
> -                 scale_huffcodes, 2, 2, 616);
> +        scale_huffbits, 1, 1,
> +        scale_huffcodes, 2, 2, 616);
>  
>      INIT_VLC_STATIC(&sf_rl_vlc, VLCBITS, HUFF_SCALE_RL_SIZE,
> -                 scale_rl_huffbits, 1, 1,
> -                 scale_rl_huffcodes, 4, 4, 1406);
> +        scale_rl_huffbits, 1, 1,
> +        scale_rl_huffcodes, 4, 4, 1406);
>  
>      INIT_VLC_STATIC(&coef_vlc[0], VLCBITS, HUFF_COEF0_SIZE,
> -                 coef0_huffbits, 1, 1,
> -                 coef0_huffcodes, 4, 4, 2108);
> +        coef0_huffbits, 1, 1,
> +        coef0_huffcodes, 4, 4, 2108);
>  
>      INIT_VLC_STATIC(&coef_vlc[1], VLCBITS, HUFF_COEF1_SIZE,
> -                 coef1_huffbits, 1, 1,
> -                 coef1_huffcodes, 4, 4, 3912);
> +        coef1_huffbits, 1, 1,
> +        coef1_huffcodes, 4, 4, 3912);
>  
>      INIT_VLC_STATIC(&vec4_vlc, VLCBITS, HUFF_VEC4_SIZE,
> -                 vec4_huffbits, 1, 1,
> -                 vec4_huffcodes, 2, 2, 604);
> +        vec4_huffbits, 1, 1,
> +        vec4_huffcodes, 2, 2, 604);
>  
>      INIT_VLC_STATIC(&vec2_vlc, VLCBITS, HUFF_VEC2_SIZE,
> -                 vec2_huffbits, 1, 1,
> -                 vec2_huffcodes, 2, 2, 562);
> +        vec2_huffbits, 1, 1,
> +        vec2_huffcodes, 2, 2, 562);
>  
>      INIT_VLC_STATIC(&vec1_vlc, VLCBITS, HUFF_VEC1_SIZE,
> -                 vec1_huffbits, 1, 1,
> -                 vec1_huffcodes, 2, 2, 562);
> +        vec1_huffbits, 1, 1,
> +        vec1_huffcodes, 2, 2, 562);

same here

> @@ -414,23 +414,23 @@ static av_cold int decode_init(AVCodecCo
>  
> -    for (i=0 ; i<WMAPRO_BLOCK_SIZES ; i++) {
> +    for (i=0 ; i < WMAPRO_BLOCK_SIZES; i++) {

space around =

> @@ -686,12 +686,12 @@ static int decode_channel_transform(WMA3
>  
>          if (get_bits1(&s->gb)) {
>              av_log_ask_for_sample(s->avctx,
> -                   "unsupported channel transform bit\n");
> +                "unsupported channel transform bit\n");
>              return AVERROR_INVALIDDATA;

This looks weird.

> @@ -1226,22 +1226,22 @@ static int decode_subframe(WMA3DecodeCon
>      if (transmit_coeffs) {
>          /** reconstruct the per channel data */
>          inverse_channel_transform(s);
> -        for (i=0;i<s->channels_for_cur_subframe;i++) {
> +        for (i =0; i < s->channels_for_cur_subframe; i++) {

space around =

Diego


More information about the FFmpeg-soc mailing list