[FFmpeg-devel] [PATCH]Fix alpha for iff deep

Don Moir donmoir at comcast.net
Sat Mar 10 20:27:31 CET 2012


> On 3/9/12, Carl-Eugen Hoyos <cehoyos at ag.or.at> wrote:
>> Hi!
>>
>> Attached patch makes no difference for the RGBA DEEP iff sample from
>> ticket 1045, but matches the specification (see ticket) better.
>>
>> Please comment, Carl Eugen
>
> Very strange indentation.

Seems to be a strange lack of any optimization.

if you look at this code in the patch:

+        for(x = 0; x < avctx->width; x++)
+            row[4 * x + 3] = row[4 * x + 3] & 0xF0 | (row[4 * x + 3] >> 4);

would be better if:

+      row += 3;
+      for(x = 0; x < avctx->width; x++, row+=4)
+          *row = *row & 0xF0 | (*row >> 4);

But this is more of a minor point then the rest of the code being less than 
optimal in iff.c. It should be obvious but I could elaborate. I bring this 
up because sometimes optimization issues are sometime nic-picked to death 
and sometimes not.





More information about the ffmpeg-devel mailing list