[FFmpeg-devel] [PATCH] UltraSPARC VIS yuv2rgb third try

Balatoni Denes dbalatoni
Wed Jul 18 00:15:54 CEST 2007


Hi!

Tuesday 17 July 2007 23:28-kor Michael Niedermayer ezt ?rta:
> Hi
>
> On Tue, Jul 17, 2007 at 11:28:53PM +0200, Balatoni Denes wrote:
> > > > c->sparc_coeffs[4]=(uint16_t)(((int16_t)(c->vOffset &
> > > > 0xffff)*(int16_t)(c->vrCoeff & 0xffff)>>11) & 0xffff) *
> > > > 0x0001000100010001ULL;
> > >
> > > i think half of whats done here is superflous
> >
> > At least it works (and tested), and this was the easiest. What is
> > superflous?
>
> 2 &0xFFFF and one cast per line at least

After half an hour of trying, all I could figure out is that the 
final "&0xffff" is not needed. So what is the solution? 

Anyhow, I like it the way it is, because it is at least clear to me. But I 
could remove the final & 0xffff, if then you (or anybody) will apply it at 
last.

> [...]

bye
Denes




More information about the ffmpeg-devel mailing list