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

Michael Niedermayer michaelni
Tue Jul 17 23:28:56 CEST 2007


Hi

On Tue, Jul 17, 2007 at 11:28:53PM +0200, Balatoni Denes wrote:
> Hi!
> 
> Tuesday 17 July 2007 23:03-kor Michael Niedermayer ezt ?rta:
> > > +    c->sparc_coeffs[0]=(uint16_t)(((int16_t)(c->yOffset &
> > > 0xffff)*(int16_t)(c->yCoeff & 0xffff)>>11) & 0xffff) *
> > > 0x0001000100010001ULL; +   
> > > c->sparc_coeffs[1]=(uint16_t)(((int16_t)(c->uOffset &
> > > 0xffff)*(int16_t)(c->ubCoeff & 0xffff)>>11) & 0xffff) *
> > > 0x0001000100010001ULL; +   
> > > c->sparc_coeffs[2]=(uint16_t)(((int16_t)(c->uOffset &
> > > 0xffff)*(int16_t)(c->ugCoeff & 0xffff)>>11) & 0xffff) *
> > > 0x0001000100010001ULL; +   
> > > c->sparc_coeffs[3]=(uint16_t)(((int16_t)(c->vOffset &
> > > 0xffff)*(int16_t)(c->vgCoeff & 0xffff)>>11) & 0xffff) *
> > > 0x0001000100010001ULL; +   
> > > 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

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is dangerous to be right in matters on which the established authorities
are wrong. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070717/7b918b37/attachment.pgp>



More information about the ffmpeg-devel mailing list