[FFmpeg-devel] [PATCH] IFF: Add grayscale support to decoder

Sebastian Vater cdgs.basty
Mon May 10 18:07:43 CEST 2010


Ronald S. Bultje a ?crit :
> Hi,
>
> On Mon, May 10, 2010 at 12:00 PM, Sebastian Vater
> <cdgs.basty at googlemail.com> wrote:
>   
>> Ronald S. Bultje a ?crit :
>>     
>>> On Mon, May 10, 2010 at 11:32 AM, Sebastian Vater
>>> <cdgs.basty at googlemail.com> wrote:
>>>       
>>>> +    if (count > 0) { // PIX_FMT_RGB8
>>>>         
>>> if (count) { //...
>>>       
>> It should really check for just > 0 (is signed)...if we start to play
>> later with extradata stuff and have to subtract, it might be get < 0.
>>     
>
> Isn't count < 0 a bug?
>   

In both cases, the for loop which converts CMAP to lavc isn't executed,
so it will create in both cases a grayscale palette.
As said, it might make a difference when we add custom stuff to
extradata (HAM/masking/etc.) when we are subtracting sth. from count it
can get 0 (just see my HAM patch, where this breaks things if the just
check count != 0).

So I'ld keep > 0 so I haven't to change it anytime later.

Anyway, in asm it's just a jne/jle/jge difference, so it shouldn't
matter at all!

If you want me remove this although, just tell...

-- 

Best regards,
                   :-) Basty/CDGS (-:




More information about the ffmpeg-devel mailing list