On Fri, Feb 22, 2002 at 01:58:32PM -0800, Mark McClelland wrote:
> It could be done with tables, but it would be significantly slower. In 
> fact, you can tell from the "j=0" comment that it was probably a loop at 
> one time. No self respecting iDCT is written that way :)
> 
> I originally wrote the decompressor for the OV518 using tables and a 
> single loop. Someone else rewote it with unrolled loops and without 
> tables, and it is 2.4 times faster now.

Hmm, I understand. Still maybe some inline function (or a #define) for
the steps would make the code more readable and maintainable, while
keeping the speed.

> 
> Vojtech Pavlik wrote:
> 
> >On Thu, Feb 21, 2002 at 10:49:10PM -0800, Mark McClelland wrote:
> >
> >>This changeset adds the OV511 decompression module to 2.5.x and updates 
> >>the OV511 Config.help.
> >>
> >>I've made sure that it builds, but since 2.5.5 doesn't compile for me it 
> >>isn't tested. It's known to work under other kernels, so please apply it 
> >>anyway Greg.
> >>
> >
> >I'm sorry to say that, but I find it rather ugly. Can't most of the code
> >be converted into a couple tables or something?
> >
> >>    /* j=0 */
> >>    tmp = temp[0]*a+temp[1]*b+temp[2]*c+temp[3]*d;
> >>    tmp = tmp>>15;
> >>    tmp = tmp + 128;
> >>    if (tmp > 255) tmp=255;
> >>    if (tmp < 0)   tmp=0;
> >>    pOut[0+out_idx] = (unsigned char) tmp;          
> >>
> -- 
> Mark McClelland
> [EMAIL PROTECTED]
> 
> 

-- 
Vojtech Pavlik
SuSE Labs

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to