Fix regression in r1501.
authorAnton Mitrofanov <BugMaster@narod.ru>
Thu, 10 Jun 2010 17:33:46 +0000 (21:33 +0400)
committerJason Garrett-Glaser <darkshikari@gmail.com>
Mon, 14 Jun 2010 19:23:34 +0000 (12:23 -0700)
Could cause slightly incorrect analysis in rare cases, but no serious encoding issues.
Also shut up gcc warning about pels_v.

encoder/analyse.c

index 84a553d..696c78f 100644 (file)
@@ -720,7 +720,8 @@ static void x264_mb_analyse_intra( x264_t *h, x264_mb_analysis_t *a, int i_satd_
                 satd[i_pred_mode] -= 3 * lambda;
                 for( int i = 2; i >= 0; i-- )
                 {
-                    int cost = a->i_satd_i8x8_dir[i][idx] = satd[i];
+                    int cost = satd[i];
+                    a->i_satd_i8x8_dir[i][idx] = cost + 4 * lambda;
                     COPY2_IF_LT( i_best, cost, a->i_predict8x8[idx], i );
                 }
 
@@ -1038,7 +1039,7 @@ static void x264_intra_rd_refine( x264_t *h, x264_mb_analysis_t *a )
         for( int idx = 0; idx < 4; idx++ )
         {
             pixel4 pels_h[2] = {0};
-            pixel pels_v[7];
+            pixel pels_v[7] = {0};
             uint16_t i_nnz[2] = {0}; //shut up gcc
             pixel *p_dst_by;
             int cbp_luma_new = 0;