[FFmpeg-devel] [PATCH] OpenEXR decoder rev-18

Jimmy Christensen jimmy
Sun Sep 13 19:13:21 CEST 2009


On 2009-09-13 18:24, Diego Biurrun wrote:
> 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
>

Fixed in rev18.

>> +enum ExrCompr {
>> +    EXR_RAW = 0,
>> +    EXR_RLE = 1,
>> +    EXR_ZIP1 = 2,
>> +    EXR_ZIP16 = 3,
>> +    EXR_PIZ = 4,
>> +    EXR_B44 = 6
>
> This could be aligned.

Fixed in rev18.

>
>> +/**
>> + * 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.
>

Moved the credit to the start of the file. Must have been my mail 
program sending the mail as western. Will give it another try.

>> +    return (v+(1<<23)) >> (127+7-exp);
>
> Spaces around operators please, this looks very cramped; same below.
>

Fixed in rev18. and it lots of other places too.

>> +            w = AV_RL32(buf + 8)+1;
>> +            h = AV_RL32(buf + 12)+1;
>
> Again, looks cramped, could also be aligned.
>

Fixed in rev18.


>> +                // 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
>

Fixed in rev18.

Thanks.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenEXR-rev18.diff
Type: text/x-patch
Size: 20233 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090913/39357f91/attachment.bin>



More information about the ffmpeg-devel mailing list