On Fri, Jan 06, 2012 at 01:37:32PM +0200, Yordan Makariev wrote:
> ---
>  libavcodec/4xm.c         |  793 
> ++++++++++++++++++++++++----------------------
>  libavdevice/timefilter.c |   83 +++---
>  2 files changed, 460 insertions(+), 416 deletions(-)

This was looking good at first, but see below ...

> --- a/libavcodec/4xm.c
> +++ b/libavcodec/4xm.c
> @@ -318,103 +327,114 @@ static inline void mcdc(uint16_t *dst, uint16_t *src, 
> int log2w, int h, int stri
>  
> -static void decode_p_block(FourXContext *f, uint16_t *dst, uint16_t *src, 
> int log2w, int log2h, int stride){
> -    const int index= size2index[log2h][log2w];
> -    const int h= 1<<log2h;
> -    int code= get_vlc2(&f->gb, 
> block_type_vlc[1-(f->version>1)][index].table, BLOCK_TYPE_VLC_BITS, 1);
> +static void decode_p_block(FourXContext *f, uint16_t *dst, uint16_t *src,
> +                           int log2w, int log2h, int stride)
> +{
> +    const int index = size2index[log2h][log2w];
> +    const int h     = 1 << log2h;
> +    int code = get_vlc2(&f->gb, block_type_vlc[1 - (f->version > 1)]
> +               [index].table, BLOCK_TYPE_VLC_BITS, 1);

Break after the comma, block_type_vlc is a two-dimensional array.

> +    } else if (code == 6) {
> +        if (log2w) {
>              dst[0] = bytestream2_get_le16(&f->g2);
>              dst[1] = bytestream2_get_le16(&f->g2);
> -        }else{
> -            dst[0     ] = bytestream2_get_le16(&f->g2);
> +        } else {
> +            dst[0] = bytestream2_get_le16(&f->g2);
>              dst[stride] = bytestream2_get_le16(&f->g2);

align

> -static int decode_p_frame(FourXContext *f, const uint8_t *buf, int length){
> +static int decode_p_frame(FourXContext *f, const uint8_t *buf, int length)
> +{
>      int x, y;
> -    const int width= f->avctx->width;
> -    const int height= f->avctx->height;
> -    uint16_t *src= (uint16_t*)f->last_picture.data[0];
> -    uint16_t *dst= (uint16_t*)f->current_picture.data[0];
> -    const int stride= f->current_picture.linesize[0]>>1;
> +    const int width   = f->avctx->width;
> +    const int heigh t = f->avctx->height;
> +    uint16_t *src = (uint16_t *)f->last_picture.data[0];
> +    uint16_t *dst = (uint16_t *)f->current_picture.data[0];
> +    const int stride =          f->current_picture.linesize[0] >> 1;

You could align the last three '=', but most importantly there is a typo
in there that will make this fail to compile.  Which in turn shows you
have not compiled your changes.  Reviewing patches that do not even
compile is just a waste of time.  You must compile your own changes!

> -    memset((uint8_t*)f->bitstream_buffer + bitstream_size, 0, 
> FF_INPUT_BUFFER_PADDING_SIZE);
> +    memset((uint8_t*)f->bitstream_buffer +
> +                     bitstream_size, 0, FF_INPUT_BUFFER_PADDING_SIZE);

Break at the comma, not in the middle of an expression.

> --- a/libavdevice/timefilter.c
> +++ b/libavdevice/timefilter.c
> @@ -89,55 +91,54 @@ int main(void)
>  #if 0
> -            double lastfil=9;
> -            TimeFilter *tf= ff_timefilter_new(1, bestpar0, bestpar1);
> -            for(i=0; i<SAMPLES; i++){
> +            double lastfil = 9;
> +            TimeFilter *tf = ff_timefilter_new(1, bestpar0, bestpar1);
> +            for (i=0; i<SAMPLES; i++) {

spaces around operators

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

Reply via email to