[x264-devel] commit: Remove various bits of dead code found by CLANG. ( Jason Garrett-Glaser )

git version control git at videolan.org
Sun Apr 19 01:09:23 CEST 2009


x264 | branch: master | Jason Garrett-Glaser <darkshikari at gmail.com> | Fri Apr 17 06:00:39 2009 -0700| [c74726e1ed0312e2073f0ea8c45804a870512579] | committer: Jason Garrett-Glaser 

Remove various bits of dead code found by CLANG.

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=c74726e1ed0312e2073f0ea8c45804a870512579
---

 encoder/analyse.c |    7 -------
 encoder/encoder.c |    1 -
 encoder/me.c      |    4 +---
 muxers.c          |    5 ++---
 4 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/encoder/analyse.c b/encoder/analyse.c
index 0aea58f..1b64b69 100644
--- a/encoder/analyse.c
+++ b/encoder/analyse.c
@@ -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 );
diff --git a/encoder/encoder.c b/encoder/encoder.c
index 43a9b95..ea313ae 100644
--- a/encoder/encoder.c
+++ b/encoder/encoder.c
@@ -1381,7 +1381,6 @@ int     x264_encoder_encode( x264_t *h,
     else
     {
         thread_current =
-        thread_prev    =
         thread_oldest  = h;
     }
 
diff --git a/encoder/me.c b/encoder/me.c
index e5da142..15416de 100644
--- a/encoder/me.c
+++ b/encoder/me.c
@@ -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;
diff --git a/muxers.c b/muxers.c
index fffa99b..2eae1eb 100644
--- 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;



More information about the x264-devel mailing list