On Wed, May 4, 2011 at 10:00 AM, Ronald S. Bultje <[email protected]> wrote:
> Hi,
[...]
>> +                unsigned b =  c        &  0x1F;
>> +                unsigned g = (c >>  5) &  0x1F;
>> +                unsigned r =  c >> 10;
>> +                /* 000aabbb -> aa bbb aa  */
>> +                *dst++ = (b << 3) | (r >> 3);
>> +                *dst++ = (g << 3) | (g >> 3);
>> +                *dst++ = (r << 3) | (b >> 3);
>
> Why?
>

Just a typo, should be ordered b,g,r on both sides of the |. (The idea
is to use the full output range, i.e. the 0x1F is mapped to 0xFF, not
0xF8.  There's probably a better/faster way to do this.)

[...]
>> +        if (get_bits1(&gb)) {
>> +            av_log(avctx, AV_LOG_ERROR, "FIXME custom palette not 
>> implemented yet\n");
>> +            return -1;
>> +        }
>> +    }
>
> Custom palette doesn't sound difficult, do you have samples that trigger this?
>

The FFmpeg encoder never uses them currently, but it should be easy
enough to hack it up to produce samples that do use it.

[...]

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

Reply via email to