Re: [JAVA2D] What's a trick way to clamp a byte to 255 - 0? -- history and
So the clamping is 30 to 40% faster. Did you measure what impact does it have on the overall image processing? How much time does clamping take in the entire computation of the pixel color (with that bicubic interpolation)? Kirill [Message sent by forum member 'kirillcool' (kirillcool)] http://forums.java.net/jive/thread.jspa?messageID=231556 === To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message signoff JAVA2D-INTEREST. For general help, send email to [EMAIL PROTECTED] and include in the body of the message help.
Re: [JAVA2D] What's a trick way to clamp a byte to 255 - 0? -- history and
Yeah, when I integrated it into my bi-cubic interpolator, it slowed it down compared to the logical check clamp. I'm not sure why yet. Maybe it was the way I integrated it. I don't know. In my test suite, the time to interpolate a 944 x 644 image went from 1350ms using the logical test clamp to 1440ms using the triple shift. I'm not sure why... I work on a real slow (800mhz) machine just so I can see these kinds of things better. [EMAIL PROTECTED] wrote: So the clamping is 30 to 40% faster. Did you measure what impact does it have on the overall image processing? How much time does clamping take in the entire computation of the pixel color (with that bicubic interpolation)? Kirill [Message sent by forum member 'kirillcool' (kirillcool)] http://forums.java.net/jive/thread.jspa?messageID=231556 === To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message signoff JAVA2D-INTEREST. For general help, send email to [EMAIL PROTECTED] and include in the body of the message help. === To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message signoff JAVA2D-INTEREST. For general help, send email to [EMAIL PROTECTED] and include in the body of the message help.
Re: [JAVA2D] What's a trick way to clamp a byte to 255 - 0? -- history and
It could be due to branch prediction by the cpu. Ken Warner wrote: Yeah, when I integrated it into my bi-cubic interpolator, it slowed it down compared to the logical check clamp. I'm not sure why yet. Maybe it was the way I integrated it. I don't know. In my test suite, the time to interpolate a 944 x 644 image went from 1350ms using the logical test clamp to 1440ms using the triple shift. I'm not sure why... I work on a real slow (800mhz) machine just so I can see these kinds of things better. === To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message signoff JAVA2D-INTEREST. For general help, send email to [EMAIL PROTECTED] and include in the body of the message help.
Re: [JAVA2D] What's a trick way to clamp a byte to 255 - 0? -- history and
Branch prediction would work just as well in the original tests Ken ran, I think. There must be something else going on. Jim wrote: It could be due to branch prediction by the cpu. Ken Warner wrote: Yeah, when I integrated it into my bi-cubic interpolator, it slowed it down compared to the logical check clamp. I'm not sure why yet. Maybe it was the way I integrated it. I don't know. In my test suite, the time to interpolate a 944 x 644 image went from 1350ms using the logical test clamp to 1440ms using the triple shift. I'm not sure why... I work on a real slow (800mhz) machine just so I can see these kinds of things better. -- Peter B. West http://cv.pbw.id.au/ Folio http://defoe.sourceforge.net/folio/ === To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message signoff JAVA2D-INTEREST. For general help, send email to [EMAIL PROTECTED] and include in the body of the message help.
Re: [JAVA2D] What's a trick way to clamp a byte to 255 - 0? -- history and
In my test suite, the time to interpolate a 944 x 644 image went from 1350ms using the logical test clamp to 1440ms using the triple shift. I'm not sure why... I work on a real slow (800mhz) machine just so I can see these kinds of things better. Could you post that test? Maybe someone can spot what makes the difference. [Message sent by forum member 'rah003' (rah003)] http://forums.java.net/jive/thread.jspa?messageID=231732 === To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message signoff JAVA2D-INTEREST. For general help, send email to [EMAIL PROTECTED] and include in the body of the message help.
Re: [JAVA2D] What's a trick way to clamp a byte to 255 - 0? -- history and
Not really, it's the whole applet. I just stick in some timing code to watch sections of it. Just imagine those logical tests replaced by the triple shift. I'll post a snippet tomorrow. See: http://pancyl.com/ [EMAIL PROTECTED] wrote: In my test suite, the time to interpolate a 944 x 644 image went from 1350ms using the logical test clamp to 1440ms using the triple shift. I'm not sure why... I work on a real slow (800mhz) machine just so I can see these kinds of things better. Could you post that test? Maybe someone can spot what makes the difference. [Message sent by forum member 'rah003' (rah003)] http://forums.java.net/jive/thread.jspa?messageID=231732 === To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message signoff JAVA2D-INTEREST. For general help, send email to [EMAIL PROTECTED] and include in the body of the message help. === To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message signoff JAVA2D-INTEREST. For general help, send email to [EMAIL PROTECTED] and include in the body of the message help.