]> git.videolan.org Git - x264.git/commitdiff
Faster --me tesa
authorJason Garrett-Glaser <darkshikari@gmail.com>
Thu, 14 Jan 2010 01:16:13 +0000 (20:16 -0500)
committerJason Garrett-Glaser <darkshikari@gmail.com>
Thu, 14 Jan 2010 04:47:10 +0000 (23:47 -0500)
encoder/me.c

index b2a530d65939136d04d0f34eb3c5b06061a24416..6a01d00d3f7569964568760970451b774bd48ae5 100644 (file)
@@ -652,12 +652,11 @@ me_hex2:
                 }
                 while( nmvsad > limit )
                 {
-                    int bsad = mvsads[0].sad;
                     int bi = 0;
                     for( i=1; i<nmvsad; i++ )
-                        COPY2_IF_GT( bsad, mvsads[i].sad, bi, i );
+                        if( mvsads[i].sad > mvsads[bi].sad )
+                            bi = i;
                     nmvsad--;
-                    mvsads[bi] = mvsads[nmvsad];
                     if( sizeof( mvsad_t ) == sizeof( uint64_t ) )
                         CP64( &mvsads[bi], &mvsads[nmvsad] );
                     else