On 10/13/2013 07:01 PM, Luca Barbato wrote:
> On 13/10/13 23:26, Justin Ruggles wrote:
>> ---
>>      uint32_t *pal;
>>      const uint8_t *rp, *gp, *bp;
>>  
>> @@ -527,10 +527,11 @@ static int tiff_decode_tag(TiffContext *s, const 
>> uint8_t *start,
>>          bp  = buf + count / 3 * off * 2;
>>          off = (type_sizes[type] - 1) << 3;
>>          for (i = 0; i < count / 3; i++) {
>> -            j      = (tget(&rp, type, s->le) >> off) << 16;
>> -            j     |= (tget(&gp, type, s->le) >> off) << 8;
>> -            j     |= tget(&bp, type, s->le) >> off;
>> -            pal[i] = j;
>> +            uint32_t p = 0xFF000000;
>> +            p |= (tget(&rp, type, s->le) >> off) << 16;
>> +            p |= (tget(&gp, type, s->le) >> off) << 8;
>> +            p |=  tget(&bp, type, s->le) >> off;
>> +            pal[i] = p;
> 
> uint32_t *pal, p;
> #define ALPHA_MASK 0xFF000000
> 
> maybe is slightly easier to follow.

It's somewhat better after patch 8/9. I don't think the #define really
helps all that much... if you think it's unclear I could add a comment.

-Justin

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to