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

Michael Niedermayer michaelni
Wed Jul 18 00:17:32 CEST 2007


Hi

On Wed, Jul 18, 2007 at 12:15:54AM +0200, Balatoni Denes wrote:
> 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? 

c->sparc_coeffs[4]=(((int16_t)c->vOffset*(int16_t)c->vrCoeff>>11) & 0xffff) * 0x0001000100010001ULL;

removing all 3 &0xffff as alternative is fine too


> 
> 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.

you are impatient, this will cause you a headache or worse if ever youll try
to get a large change into ffmpeg svn

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

Complexity theory is the science of finding the exact solution to an
approximation. Benchmarking OTOH is finding an approximation of the exact
-------------- 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/20070718/f368907e/attachment.pgp>



More information about the ffmpeg-devel mailing list