On Mon, Jan 11, 2016 at 9:48 PM, Mats Peterson
<matsp888-at-yahoo....@ffmpeg.org> wrote:
> On 01/12/2016 03:32 AM, Mats Peterson wrote:
>>
>> Valid question. Of course there's no problem using uint32_t, but in the
>> original code the variables are unsigned int... ask Andreas ;)
>
>
> Well, I'm to blame as well, since I have been using uint32_t for the a, r, g
> and b variables rather than unsigned int, since I thought they matched the
> uint32_t palette[] array better. Is that sensible enough?

Don't blame yourself; it is in fact a regression IMHO to change to
unsigned int, albeit a theoretical one. C only guarantees 16 bits for
int/unsigned int, you shift by 24 making it undefined behavior on 16
bit platforms. This is theoretical since POSIX guarantees 32 bits
here; FFmpeg does not support such 16 bit (likely embedded) platforms
anyway. But why change to something worse for no gain ;)?

>
>
> Mats
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to