[FFmpeg-devel] [PATCH] OpenEXR decoder rev-17
Diego Biurrun
diego
Sun Sep 13 18:24:54 CEST 2009
On Sun, Sep 13, 2009 at 05:58:48PM +0200, Jimmy Christensen wrote:
>
> --- libavcodec/exr.c (revision 0)
> +++ libavcodec/exr.c (revision 0)
> @@ -0,0 +1,501 @@
> +
> +/**
> + * @file libavcodec/exr.c
> + * OpenEXR decoder
> + * @author Jimmy Christensen
> + *
> + * For more information on the OpenEXR format, visit:
> + * http://openexr.com/
> + *
> + */
nit: pointless empty line
> +enum ExrCompr {
> + EXR_RAW = 0,
> + EXR_RLE = 1,
> + EXR_ZIP1 = 2,
> + EXR_ZIP16 = 3,
> + EXR_PIZ = 4,
> + EXR_B44 = 6
This could be aligned.
> +/**
> + * Convert from 32-bit float as uint32_t to uint16_t
> + * @author Reimar D??ffinger
Something is wrong with the encoding here. Please use UTF-8. Also, you
could simply credit Reimar at the top of the file instead of in
individual functions.
> + return (v+(1<<23)) >> (127+7-exp);
Spaces around operators please, this looks very cramped; same below.
> + w = AV_RL32(buf + 8)+1;
> + h = AV_RL32(buf + 12)+1;
Again, looks cramped, could also be aligned.
> + // Zero out the end if xmax+1 is not w
> + memset(ptr_x, 0, (avctx->width - (xmax+1)) * 6);
> + ptr_x += (avctx->width - (xmax+1))*3;
ditto
Diego
More information about the ffmpeg-devel
mailing list