[FFmpeg-devel] [PATCH] Add DPX decoder rev-17
Wed Jun 3 20:52:42 CEST 2009
On 2009-06-03 20:20, Reimar D?ffinger wrote:
> Hm. I really wonder which compiler you use.
> Anyway I guess Michael would accept a version using macros if it was
> done without adding useless calculation.
> Except that it's rather silly to use macros in cases like this when
> there is absolutely no reason to.
> static inline unsigned make_16bit(unsigned value)
> // mask away invalid bits
> value&= 0xFFC0;
> // correctly expand to 16 bits
> return value + (value>> 10);
> *dst++ = make_16bit(rgbBuffer>> 16);
> *dst++ = make_16bit(rgbBuffer>> 6);
> *dst++ = make_16bit(rgbBuffer<< 4);
Thanks for the code. Works perfectly and keeps it's speed. I'm using gcc
4.3.3 on Ubuntu 9.04 amd64. C is not exactly my biggest force and
appreciate any help I can get.
Btw. should I also upload sample images to test with?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 8184 bytes
Desc: not available
More information about the ffmpeg-devel