[Ffmpeg-devel] Porting to TI DM642 DSP

Michael Niedermayer michaelni
Thu Apr 21 11:05:13 CEST 2005


On Thursday 21 April 2005 06:03, Patrick Noffke wrote:
> >>redefining int64 types as a structure of two 32-bit words, and defining a
> >>bunch of macros for basic operations (add, subtract, multiply, divide,
> >>shift, etc.).  If there are no better suggestions, I may have to go down
> >>this road.  Of course, for compilers that support 64 bit types, the int64
> >>types would remain as is, and the macros would use the native operators.
> >
> >i'm pretty sure something like this won't get accepted into
> >mainstream. it's too ugly a hack... before doing something so evil i'd
> >suggest making a preprocessor for the compiler to do this crap for
> >you..
> Why?  If it's in the mainstream, others can utilize the same thing if
> they don't have support for 64 bit longs.  Personally, I don't think the
> "hack" is that ugly.

well, a preprocessor which can fix this would also help these other people, 
and not only that, but it would also help other projects which use 64 bit 
no doubt it might be easier to hack one project by hand to get it working but 
it wont be easier to fix all existing projects then it is to write such a 

> >it's not. are you sure the compiler isn't defaulting to some broken
> >c++ mode?
> That was the problem for casting from void *, but there are other things
> I'm having to fix, mainly to do with initializing variables.  For
> example, a variable of type enum PixelFormat cannot be initialized with
> -1, since that's not a valid enum value.

maybe (unsigned)-1 would work ...


"nothing is evil in the beginning. Even Sauron was not so." -- Elrond

More information about the ffmpeg-devel mailing list