]> git.sesse.net Git - x264/blobdiff - encoder/ratecontrol.c
Fix build on x86 with asm on but SSE off
[x264] / encoder / ratecontrol.c
index 6cc59c34713ad2591d17ab7820a3e56b859cb0ce..f26855e3d65d31ed909e4399bf213f8aad6c9055 100644 (file)
@@ -375,9 +375,8 @@ int x264_reference_build_list_optimal( x264_t *h )
         int bestref = 1;
 
         for( int i = 1; i < h->i_ref0; i++ )
-            if( !frames[i]->b_duplicate || frames[i]->i_frame != h->fref0[ref-1]->i_frame )
-                /* Favor lower POC as a tiebreaker. */
-                COPY2_IF_GT( max, refcount[i], bestref, i );
+            /* Favor lower POC as a tiebreaker. */
+            COPY2_IF_GT( max, refcount[i], bestref, i );
 
         /* FIXME: If there are duplicates from frames other than ref0 then it is possible
          * that the optimal ordering doesnt place every duplicate. */
@@ -639,6 +638,7 @@ int x264_ratecontrol_new( x264_t *h )
         if( !strncmp( stats_buf, "#options:", 9 ) )
         {
             int i, j;
+            uint32_t k, l;
             char *opts = stats_buf;
             stats_in = strchr( stats_buf, '\n' );
             if( !stats_in )
@@ -657,15 +657,15 @@ int x264_ratecontrol_new( x264_t *h )
                 return -1;
             }
 
-            if( ( p = strstr( opts, "timebase=" ) ) && sscanf( p, "timebase=%d/%d", &i, &j ) != 2 )
+            if( ( p = strstr( opts, "timebase=" ) ) && sscanf( p, "timebase=%u/%u", &k, &l ) != 2 )
             {
                 x264_log( h, X264_LOG_ERROR, "timebase specified in stats file not valid\n" );
                 return -1;
             }
-            if( i != h->param.i_timebase_num || j != h->param.i_timebase_den )
+            if( k != h->param.i_timebase_num || l != h->param.i_timebase_den )
             {
-                x264_log( h, X264_LOG_ERROR, "timebase mismatch with 1st pass (%d/%d vs %d/%d)\n",
-                          h->param.i_timebase_num, h->param.i_timebase_den, i, j );
+                x264_log( h, X264_LOG_ERROR, "timebase mismatch with 1st pass (%u/%u vs %u/%u)\n",
+                          h->param.i_timebase_num, h->param.i_timebase_den, k, l );
                 return -1;
             }