On Mon, Dec 19, 2011 at 06:19:14PM +0200, Yordan Makariev wrote:
> 
> --- a/libavdevice/timefilter.c
> +++ b/libavdevice/timefilter.c
> @@ -37,7 +37,9 @@ struct TimeFilter {
> +TimeFilter * ff_timefilter_new(double clock_period, 
> +                               double feedback2_factor, 
> +                               double feedback3_factor) 
>  {
> @@ -46,20 +48,22 @@ TimeFilter * ff_timefilter_new(double clock_period, 
> double feedback2_factor, dou
>  
> -void ff_timefilter_destroy(TimeFilter *self)
> +void ff_timefilter_destroy(TimeFilter *self) 
>  {
>  
> -void ff_timefilter_reset(TimeFilter *self)
> +void ff_timefilter_reset(TimeFilter *self) 
>  {
> -    self->count      = 0;
> +    self->count = 0;
>  }
>  
> -double ff_timefilter_update(TimeFilter *self, double system_time, double 
> period)
> +double ff_timefilter_update(TimeFilter *self, 
> +                            double system_time, 
> +                            double period) 

You add trailing whitespace here and almost everywhere else.

> @@ -89,54 +94,60 @@ int main(void)
>  #endif
> -            double best_error= 1000000000;
> -            double bestpar0=1;
> -            double bestpar1=0.001;
> +            double best_error = 1000000000;
> +            double bestpar0 = 1;
> +            double bestpar1 = 0.001;

Vertically align the '=', more opportunities below.

> -                printf("%f %f %f %f\n", i - samples[i] + 10, filtered - 
> samples[i], samples[FFMAX(i, 1)] - samples[FFMAX(i-1, 0)], filtered - 
> lastfil);
> +                printf("%f %f %f %f\n", i - samples[i] + 10, 
> +                                 filtered - samples[i], 
> +                                 samples[FFMAX(i, 1)] - samples[FFMAX(i-1, 
> 0)], 
> +                                 filtered - lastfil);

Indentation is off.

>                  lastfil= filtered;

spaces around '='

> --- a/libavutil/crc.c
> +++ b/libavutil/crc.c
> @@ -56,32 +56,34 @@ static AVCRC av_crc_table[AV_CRC_MAX][257];
> -                c = (c>>1)^(poly & (-(c&1)));
> +                c = (c >> 1) ^(poly & (-(c&1)));

spaces around '&'

> -                c = (c<<1) ^ ((poly<<(32-bits)) & (((int32_t)c)>>31) );
> +                c = (c << 1) ^((poly << (32-bits)) & (((int32_t)c) >> 31));

spaces around '-'

> @@ -92,15 +94,16 @@ int av_crc_init(AVCRC *ctx, int le, int bits, uint32_t 
> poly, int ctx_size){
> -const AVCRC *av_crc_get_table(AVCRCId crc_id){
> +const AVCRC *av_crc_get_table(AVCRCId crc_id) 
> +{
>  #if !CONFIG_HARDCODED_TABLES
> -    if (!av_crc_table[crc_id][FF_ARRAY_ELEMS(av_crc_table[crc_id])-1])
> +    if (!av_crc_table[crc_id][FF_ARRAY_ELEMS(av_crc_table[crc_id]) - 1])
>          if (av_crc_init(av_crc_table[crc_id],
>                          av_crc_table_params[crc_id].le,
>                          av_crc_table_params[crc_id].bits,
>                          av_crc_table_params[crc_id].poly,
> -                        sizeof(av_crc_table[crc_id])) < 0)
> -            return NULL;
> +                 sizeof(av_crc_table[crc_id])) < 0)
> +                return NULL;

Indentation is now screwed up.

> -    int p[4][3]={{AV_CRC_32_IEEE_LE, 0xEDB88320, 0x3D5CDD04},
> -                 {AV_CRC_32_IEEE   , 0x04C11DB7, 0xC0F5BAE0},
> -                 {AV_CRC_16_ANSI   , 0x8005,     0x1FBB    },
> -                 {AV_CRC_8_ATM     , 0x07,       0xE3      },};
> +    int p[4][3] = { { AV_CRC_32_IEEE_LE, 0xEDB88320, 0x3D5CDD04 },
> +                    { AV_CRC_32_IEEE   , 0x04C11DB7, 0xC0F5BAE0 },
> +                    { AV_CRC_16_ANSI   , 0x8005    , 0x1FBB     },
> +                    { AV_CRC_8_ATM     , 0x07      , 0xE3       }
> +    };

Drop the spaces before comma.

> --- a/libavutil/lfg.c
> +++ b/libavutil/lfg.c
> @@ -27,19 +27,20 @@
> -    for(i=8; i<64; i+=4){
> -        AV_WL32(tmp, seed); tmp[4]=i;
> -        av_md5_sum(tmp, tmp,  16);
> -        c->state[i  ]= AV_RL32(tmp);
> -        c->state[i+1]= AV_RL32(tmp+4);
> -        c->state[i+2]= AV_RL32(tmp+8);
> -        c->state[i+3]= AV_RL32(tmp+12);
> +    for (i = 8; i < 64; i += 4) {
> +        AV_WL32(tmp, seed); tmp[4] = i;
> +        av_md5_sum(tmp, tmp, 16);
> +        c->state[i    ] = AV_RL32(tmp);
> +        c->state[i + 1] = AV_RL32(tmp + 4);
> +        c->state[i + 2] = AV_RL32(tmp + 8);
> +        c->state[i + 3] = AV_RL32(tmp + 12);

Drop the spaces before ']'.

> --- a/libavutil/random_seed.c
> +++ b/libavutil/random_seed.c
> @@ -25,39 +25,39 @@
>      if (fd == -1)
>          return -1;
> -    err = read(fd, dst, sizeof(*dst));
> +    err = read(fd, dst, sizeof( *dst ));

This was correct before.


There are more similar issues in other places, review your patch,
fix them and resubmit.

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

Reply via email to