diff options
author | Sebastian Dröge <slomo@circular-chaos.org> | 2008-08-26 12:33:16 +0000 |
---|---|---|
committer | Sebastian Dröge <slomo@circular-chaos.org> | 2008-08-26 12:33:16 +0000 |
commit | 81f8895cb433d34da3478b45904536a365d88946 (patch) | |
tree | 428a19ae1c386c1874bf1235f8006a1a8832ac05 /gst/deinterlace2/tvtime/tomsmocomp/SearchLoopBottom.inc | |
parent | 9fbc550ee173229058094ad2a43858342ba4fc8e (diff) | |
download | gst-plugins-bad-81f8895cb433d34da3478b45904536a365d88946.tar.gz gst-plugins-bad-81f8895cb433d34da3478b45904536a365d88946.tar.bz2 gst-plugins-bad-81f8895cb433d34da3478b45904536a365d88946.zip |
gst/deinterlace2/tvtime/tomsmocomp/: Unroll the loop to handle two bytes at once. This should give a small speedup an...
Original commit message from CVS:
* gst/deinterlace2/tvtime/tomsmocomp/SearchLoopBottom.inc:
* gst/deinterlace2/tvtime/tomsmocomp/SearchLoopTop.inc:
* gst/deinterlace2/tvtime/tomsmocomp/StrangeBob.inc:
* gst/deinterlace2/tvtime/tomsmocomp/WierdBob.inc:
Unroll the loop to handle two bytes at once. This should give
a small speedup and makes it possible to handle chroma and luma
different which is needed later.
Diffstat (limited to 'gst/deinterlace2/tvtime/tomsmocomp/SearchLoopBottom.inc')
-rw-r--r-- | gst/deinterlace2/tvtime/tomsmocomp/SearchLoopBottom.inc | 38 |
1 files changed, 25 insertions, 13 deletions
diff --git a/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopBottom.inc b/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopBottom.inc index ce6d2534..e1560353 100644 --- a/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopBottom.inc +++ b/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopBottom.inc @@ -114,27 +114,39 @@ return 0; #else #ifdef SKIP_SEARCH - out = best; // just use the results of our wierd bob + out[0] = best[0]; // just use the results of our wierd bob + out[1] = best[1]; #else - diff = diff - MIN (diff, 10) - 4; - if (diff < 0) - out = weave; + diff[0] = diff[0] - MIN (diff[0], 10) - 4; + diff[1] = diff[1] - MIN (diff[1] - 10) - 4; + if (diff[0] < 0) + out[0] = weave[0]; else - out = best; + out[0] = best[0]; + + if (diff[1] < 0) + out[1] = weave[1]; + else + out[1] = best[1]; + - out = CLAMP (out, MinVals, MaxVals); + out[0] = CLAMP (out[0], MinVals[0], MaxVals[0]); + out[1] = CLAMP (out[1], MinVals[1], MaxVals[1]); #endif #ifdef USE_VERTICAL_FILTER - pDest[x] = (out + pBob[0]) / 2; - pDest[x + dst_pitchw] = (pBob[src_pitch2] + out) / 2; + pDest[x] = (out[0] + pBob[0]) / 2; + pDest[x + dst_pitchw] = (pBob[src_pitch2] + out[0]) / 2; + pDest[x + 1] = (out[1] + pBob[1]) / 2; + pDest[x + 1 + dst_pitchw] = (pBob[src_pitch2 + 1] + out[1]) / 2; #else - pDest[x] = out; + pDest[x] = out[0]; + pDest[x+1] = out[1]; #endif - pBob += 1; - pBobP += 1; - pSrc += 1; - pSrcP += 1; + pBob += 2; + pBobP += 2; + pSrc += 2; + pSrcP += 2; } // adjust for next line pSrc = src_pitch2 * (y+1) + pWeaveSrc; |