Hi,

On Sat, Dec 17, 2011 at 4:01 PM, Asen Lekov <[email protected]> wrote:

> Fixed some re-indentation misstakes!
>
[..]
> @@ -129,12 +129,12 @@ static int decode_lspf(QCELPContext *q, float *lspf)
[..]
> -            for (i=0; i<10; i++) {
> +            for (i = 0; i < 10; i++) {
>                  q->predictor_lspf[i] =
>                               lspf[i] = (q->frame.lspv[i] ?
 QCELP_LSP_SPREAD_FACTOR
>                                                           :
-QCELP_LSP_SPREAD_FACTOR)
>                                       + predictors[i] *
QCELP_LSP_OCTAVE_PREDICTOR
> -                                     + (i + 1) * ((1 -
QCELP_LSP_OCTAVE_PREDICTOR)/11);
> +                                     + (i + 1) * ((1 -
QCELP_LSP_OCTAVE_PREDICTOR) / 11);

+ should go on the previous line, IMO.

> -            for(i = 0; i < 10; i++) {
> +            for (i = 0; i < 10; i++) {
>                  q->predictor_lspf[i] =
> -                             lspf[i] = (i + 1) * ( 1 - erasure_coeff)/11
> +                             lspf[i] = (i + 1) * ( 1 - erasure_coeff) /
11
>                                       + erasure_coeff * predictors[i];

+ should go on previous line, and remove space between "(" and "1".

>          // Check for badly received packets.
>          if (q->bitrate == RATE_QUARTER) {
> -            if(lspf[9] <= .70 || lspf[9] >=  .97)
> +            if (lspf[9] <= .70 || lspf[9] >=  .97)

Remove one of the two consecutive spaces between ">=" and ".97".

> +static void compute_svector(QCELPContext *q, const float *gain, float
*cdn_vector)
[..]
> +    case RATE_HALF:
> +        for (i = 0; i < 4; i++) {
> +            tmp_gain = gain[i] * QCELP_RATE_HALF_CODEBOOK_RATIO;
> +            cindex   = -q->frame.cindex[i];
> +            for (j = 0; j < 40; j++)
> +            *cdn_vector++ = tmp_gain * qcelp_rate_half_codebook[cindex++
& 127];

This needs 4 extra spaces.

> +    case RATE_QUARTER:
> +        cbseed = (0x0003 & q->frame.lspv[4])<<14 |
> +                 (0x003F & q->frame.lspv[3])<< 8 |
> +                 (0x0060 & q->frame.lspv[2])<< 1 |
> +                 (0x0007 & q->frame.lspv[1])<< 3 |
> +                 (0x0038 & q->frame.lspv[0])>> 3 ;

Spaces around ">>" amd "<<".

> +                *rnd   = (int16_t)cbseed;

Space between cast and variable name.

> +                for (j = 0; j < 10; j++)
> +                    fir_filter_value += qcelp_rnd_fir_coefs[j ] *
> +                                        (rnd[-j ] + rnd[-20+j]);

Weird spaces inside array "[j ]" -> "[j]", etc).

> +                *cdn_vector++ = tmp_gain * (int16_t)cbseed;

See above, space between cast and variable name.

> @@ -440,9 +438,9 @@ static const float *do_pitchfilter(float memory[303],
const float v_in[160],
[..]
>                          *v_out += qcelp_hammsinc_table[j] * (v_lag[j-4]
+ v_lag[3-j]);

Spaces around "-".

> -    }else if(q->bitrate >= RATE_QUARTER ||
> +    } else if (q->bitrate >= RATE_QUARTER ||
>               (q->bitrate == I_F_Q && !subframe_num))

This last line needs 2 extra spaces so it's aligned again.

> -    if(q->bitrate == RATE_OCTAVE &&
> +    if (q->bitrate == RATE_OCTAVE &&
>         (q->first16bits = AV_RB16(buf)) == 0xFFFF) {

Same.

Rest is OK I think.

Ronald
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to