]> granicus.if.org Git - libx264/commitdiff
Remove various bits of dead code found by CLANG.
authorFiona Glaser <fiona@x264.com>
Fri, 17 Apr 2009 13:00:39 +0000 (06:00 -0700)
committerFiona Glaser <fiona@x264.com>
Fri, 17 Apr 2009 13:00:39 +0000 (06:00 -0700)
encoder/analyse.c
encoder/encoder.c
encoder/me.c
muxers.c

index c0791b8235dcdc964abda933d09818fa3b496e59..f7a671ed08e9af57400c00569e267527a076d762 100644 (file)
@@ -873,13 +873,11 @@ static void x264_intra_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd_thresh )
 
 static void x264_intra_rd_refine( x264_t *h, x264_mb_analysis_t *a )
 {
-    uint8_t  *p_src = h->mb.pic.p_fenc[0];
     uint8_t  *p_dst = h->mb.pic.p_fdec[0];
 
     int i, j, idx, x, y;
     int i_max, i_mode, i_thresh;
     uint64_t i_satd, i_best;
-    int i_pred_mode;
     int predict_mode[9];
     h->mb.i_skip_intra = 0;
 
@@ -952,8 +950,6 @@ static void x264_intra_rd_refine( x264_t *h, x264_mb_analysis_t *a )
             uint8_t *p_dst_by = p_dst + block_idx_xy_fdec[idx];
             i_best = COST_MAX64;
 
-            i_pred_mode = x264_mb_predict_intra4x4_mode( h, idx );
-
             predict_4x4_mode_available( h->mb.i_neighbour4[idx], predict_mode, &i_max );
 
             if( (h->mb.i_neighbour4[idx] & (MB_TOPRIGHT|MB_TOP)) == MB_TOP )
@@ -998,18 +994,15 @@ static void x264_intra_rd_refine( x264_t *h, x264_mb_analysis_t *a )
             uint64_t pels_h = 0;
             uint8_t pels_v[7];
             uint16_t i_nnz[2];
-            uint8_t *p_src_by;
             uint8_t *p_dst_by;
             int j;
             int cbp_luma_new = 0;
             i_thresh = a->i_satd_i8x8_dir[a->i_predict8x8[idx]][idx] * 11/8;
 
             i_best = COST_MAX64;
-            i_pred_mode = x264_mb_predict_intra4x4_mode( h, 4*idx );
             x = idx&1;
             y = idx>>1;
 
-            p_src_by = p_src + 8*x + 8*y*FENC_STRIDE;
             p_dst_by = p_dst + 8*x + 8*y*FDEC_STRIDE;
             predict_4x4_mode_available( h->mb.i_neighbour8[idx], predict_mode, &i_max );
             x264_predict_8x8_filter( p_dst_by, edge, h->mb.i_neighbour8[idx], ALL_NEIGHBORS );
index b181d1e79c372bc217571ee51cee5bdd1ef2bf0f..8fc5f50aacdfb89e66091aea40dd572698486898 100644 (file)
@@ -1381,7 +1381,6 @@ int     x264_encoder_encode( x264_t *h,
     else
     {
         thread_current =
-        thread_prev    =
         thread_oldest  = h;
     }
 
index 815cf501d973e9459e7b4e934ec95732b01dcf2a..243c1d05eaaab59970d03968f02a523137758a95 100644 (file)
@@ -973,9 +973,7 @@ void x264_me_refine_qpel_rd( x264_t *h, x264_me_t *m, int i_lambda2, int i4, int
     uint64_t bcost = m->i_pixel == PIXEL_16x16 ? m->cost : COST_MAX64;
     int bmx = m->mv[0];
     int bmy = m->mv[1];
-    int omx = bmx;
-    int omy = bmy;
-    int pmx, pmy, i, j;
+    int omx, omy, pmx, pmy, i, j;
     unsigned bsatd;
     int satd = 0;
     int dir = -2;
index fffa99b0eba853876190259c30da59412aee15e0..2eae1eb3882461a8c557f58f36e29f6ff990802e 100644 (file)
--- a/muxers.c
+++ b/muxers.c
@@ -138,7 +138,6 @@ typedef struct {
 int open_file_y4m( char *psz_filename, hnd_t *p_handle, x264_param_t *p_param )
 {
     int  i, n, d;
-    int  interlaced;
     char header[MAX_YUV4_HEADER+10];
     char *tokstart, *tokend, *header_end;
     y4m_input_t *h = malloc(sizeof(y4m_input_t));
@@ -197,12 +196,12 @@ int open_file_y4m( char *psz_filename, hnd_t *p_handle, x264_param_t *p_param )
         case 'I': /* Interlace type */
             switch(*tokstart++)
             {
-            case 'p': interlaced = 0; break;
+            case 'p': break;
             case '?':
             case 't':
             case 'b':
             case 'm':
-            default: interlaced = 1;
+            default:
                 fprintf(stderr, "Warning, this sequence might be interlaced\n");
             }
             break;