diff options
Diffstat (limited to 'gst/deinterlace2/tvtime/tomsmocomp/SearchLoopTop.inc')
-rw-r--r-- | gst/deinterlace2/tvtime/tomsmocomp/SearchLoopTop.inc | 72 |
1 files changed, 31 insertions, 41 deletions
diff --git a/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopTop.inc b/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopTop.inc index 9f42650b..9d6a490f 100644 --- a/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopTop.inc +++ b/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopTop.inc @@ -6,29 +6,6 @@ const unsigned char* pSrc; const unsigned char* pBob; const unsigned char* pBobP; -#ifndef IS_C - -int64_t Max_Mov = 0x0404040404040404ull; -int64_t DiffThres = 0x0f0f0f0f0f0f0f0full; -int64_t YMask = 0x00ff00ff00ff00ffull; // keeps only luma -int64_t UVMask = 0xff00ff00ff00ff00ull; // keeps only chroma -int64_t TENS = 0x0a0a0a0a0a0a0a0aull; -int64_t FOURS = 0x0404040404040404ull; -int64_t ONES = 0x0101010101010101ull; -int64_t Min_Vals = 0x0000000000000000ull; -int64_t Max_Vals = 0x0000000000000000ull; -int64_t ShiftMask = 0xfefffefffefffeffull; - -long oldbx; - -#else - -#ifdef USE_STRANGE_BOB -int64_t DiffThres = 0x0f; -#endif - -#endif - // long is int32 on ARCH_368, int64 on ARCH_AMD64. Declaring it this way // saves a lot of xor's to delete 64bit garbage. @@ -40,23 +17,10 @@ long src_pitch2 = 2 * src_pitch; // even & odd lines are interleaved in Avi long dst_pitch2 = 2 * dst_pitch; -#ifdef IS_C +long y; -long x,best,diff,avg,diff2,out; -#endif -long y; - -#if defined(IS_SSE2) -long Last8 = (rowsize-16); // ofs to last 16 bytes in row for SSE2 -#elif defined(IS_C) -long Last8 = (rowsize-4); // ofs to last two pixel in row -#else -long Last8 = (rowsize-8); // ofs to last 8 bytes in row -#endif +long Last8; -#ifndef IS_C -long dst_pitchw = dst_pitch; // local stor so asm can ref -#endif pSrc = pWeaveSrc; // points 1 weave line above pSrcP = pWeaveSrcP; // " @@ -112,9 +76,24 @@ long dst_pitchw = dst_pitch; // local stor so asm can ref #define _YMask "%17" #define _oldbx "%18" #endif + Last8 = (rowsize-8); for (y=1; y < FldHeight-1; y++) - { + { + long dst_pitchw = dst_pitch; // local stor so asm can ref + int64_t Max_Mov = 0x0404040404040404ull; + int64_t DiffThres = 0x0f0f0f0f0f0f0f0full; + int64_t YMask = 0x00ff00ff00ff00ffull; // keeps only luma + int64_t UVMask = 0xff00ff00ff00ff00ull; // keeps only chroma + int64_t TENS = 0x0a0a0a0a0a0a0a0aull; + int64_t FOURS = 0x0404040404040404ull; + int64_t ONES = 0x0101010101010101ull; + int64_t Min_Vals = 0x0000000000000000ull; + int64_t Max_Vals = 0x0000000000000000ull; + int64_t ShiftMask = 0xfefffefffefffeffull; + + long oldbx; + // pretend it's indented -->> __asm__ __volatile__ ( @@ -206,9 +185,20 @@ long dst_pitchw = dst_pitch; // local stor so asm can ref "pcmpeqb %%mm7, %%mm7\n\t" // ffff, say we didn't find anything good yet #else + Last8 = (rowsize - 4); for (y=1; y < FldHeight-1; y++) { + #ifdef USE_STRANGE_BOB + long DiffThres = 0x0f; + #endif + + #ifndef SKIP_SEARCH + long weave[2], MaxVals[2], MinVals[2]; + #endif + + long diff[2], best[2], avg[2], diff2[2], out[2], x; + #ifdef USE_VERTICAL_FILTER pDest[0] = (3 * pBob[0] + pBob[src_pitch2]) / 4; pDest[1] = (3 * pBob[1] + pBob[src_pitch2 + 1]) / 4; @@ -246,7 +236,7 @@ long dst_pitchw = dst_pitch; // local stor so asm can ref pSrc += 4; pSrcP += 4; - for (x=4; x < Last8; x += 1) { + for (x=4; x < Last8; x += 2) { #ifdef USE_STRANGE_BOB #include "StrangeBob.inc" @@ -258,7 +248,7 @@ long dst_pitchw = dst_pitch; // local stor so asm can ref // from the current location, by rating them by the min distance // from the Bob value instead of the avg distance from that value. // our best and only rating so far - diff = 255; + diff[0] = diff[1] = 255; #endif |