[FFmpeg-devel] [PATCH] qtpalette: make the color_* variables unsigned again

Mats Peterson matsp888 at yahoo.com
Tue Jan 12 06:28:56 CET 2016


On 01/12/2016 05:51 AM, Ganesh Ajjanagadde wrote:
> On Mon, Jan 11, 2016 at 9:48 PM, Mats Peterson
> <matsp888-at-yahoo.com at ffmpeg.org> wrote:
>> On 01/12/2016 03:32 AM, Mats Peterson wrote:
> 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 ;)?
>


Exactly, I actually thought of that myself. And I like the stdint 
variables because they eliminate guesswork. That has always been a 
problem with the "standard" types in C.

Mats



More information about the ffmpeg-devel mailing list