[FFmpeg-devel] [PATCH] Add DPX decoder

Diego Biurrun diego
Wed May 6 15:59:59 CEST 2009


On Wed, May 06, 2009 at 02:44:34PM +0100, Jimmy Christensen wrote:
> 
> Revision of the patch with better formatting and re-arranged the CODEC id.

Please don't top-post (not even yourself) and trim your quotes.  Also,
your mailer sometimes breaks threads.

> --- libavcodec/dpx.c	(revision 0)
> +++ libavcodec/dpx.c	(revision 0)
> @@ -0,0 +1,173 @@
> +
> +struct RGBField
> +{
> +
> +typedef struct DPXContext
> +{

K&R says { on the same line for struct declarations, this was correct
before.

> +    const uint8_t *headerBuffer = avpkt->data;
> +    const uint8_t *buf = avpkt->data;
> +    int buf_size = avpkt->size;
> +    DPXContext * const s = avctx->priv_data;
> +    AVFrame *picture = data;
> +    AVFrame * const p= (AVFrame*)&s->picture;
> +    uint8_t *ptr;
> +    struct RGBField rgbField;

I repeat: vertical alignment, same in other places.

> +    if(magic_num == 0x53445058) {
> +        endian = 0x0;
> +    }

I repeat: useless {}.

> +    if(endian == 0x0) {

I repeat: K&R mandates spaces between if/for/while/switch and (.

> +    avctx->coded_frame= (AVFrame*)&s->picture;

spaces around =

Diego



More information about the ffmpeg-devel mailing list