[FFmpeg-devel] [PATCH] Electronic Arts MAD Decoder

Diego Biurrun diego
Wed Jun 10 13:15:21 CEST 2009


On Wed, Jun 10, 2009 at 08:52:58PM +1000, Peter Ross wrote:
> 
> Patch updated.
> 
> --- libavcodec/eamad.c	(revision 0)
> +++ libavcodec/eamad.c	(revision 0)
> @@ -0,0 +1,323 @@
> +
> +static av_cold int mad_decode_init(AVCodecContext *avctx)

All those mad_ prefixes for static functions are pointless.

> +static inline void mad_comp_block(MadContext *t, int mb_x, int mb_y, int j, int mv_x, int mv_y, int add)

nit: long line

> +        mad_comp(
> +            t->frame.data[0] + (mb_y*16 + ((j&2)<<2))*t->frame.linesize[0] + mb_x*16 + ((j&1)<<3),
> +            t->frame.linesize[0],
> +            t->last_frame.data[0] + (mb_y*16 + ((j&2)<<2) + mv_y)*t->last_frame.linesize[0] + mb_x*16 + ((j&1)<<3) + mv_x,
> +            t->last_frame.linesize[0],
> +            add);

This looks weird, you do not indent function parameters like this in
other places.

Diego



More information about the ffmpeg-devel mailing list