[x264-devel] Fix few clang -Wunused-* warnings

Anton Mitrofanov git at videolan.org
Thu Nov 13 13:52:03 CET 2014


x264 | branch: master | Anton Mitrofanov <BugMaster at narod.ru> | Fri Sep  5 19:30:47 2014 +0400| [01204b60367f4959e8393652dd30f0cfba2d2c80] | committer: Fiona Glaser

Fix few clang -Wunused-* warnings

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

 common/x86/predict-c.c |    5 +++++
 encoder/cavlc.c        |    2 ++
 2 files changed, 7 insertions(+)

diff --git a/common/x86/predict-c.c b/common/x86/predict-c.c
index 086c45d..0c668fa 100644
--- a/common/x86/predict-c.c
+++ b/common/x86/predict-c.c
@@ -65,12 +65,17 @@ PREDICT_16x16_DC_LEFT( avx2 )
     H += i * ( src[j+i - FDEC_STRIDE ]  - src[j-i - FDEC_STRIDE ] );\
     V += i * ( src[(j+i)*FDEC_STRIDE -1] - src[(j-i)*FDEC_STRIDE -1] );
 
+#if HAVE_X86_INLINE_ASM
+#if HIGH_BIT_DEPTH
 ALIGNED_16( static const int16_t pw_12345678[8] ) = {1,2,3,4,5,6,7,8};
 ALIGNED_16( static const int16_t pw_m87654321[8] ) = {-8,-7,-6,-5,-4,-3,-2,-1};
 ALIGNED_16( static const int16_t pw_m32101234[8] ) = {-3,-2,-1,0,1,2,3,4};
+#else // !HIGH_BIT_DEPTH
 ALIGNED_8( static const int8_t pb_12345678[8] ) = {1,2,3,4,5,6,7,8};
 ALIGNED_8( static const int8_t pb_m87654321[8] ) = {-8,-7,-6,-5,-4,-3,-2,-1};
 ALIGNED_8( static const int8_t pb_m32101234[8] ) = {-3,-2,-1,0,1,2,3,4};
+#endif // HIGH_BIT_DEPTH
+#endif // HAVE_X86_INLINE_ASM
 
 #define PREDICT_16x16_P_CORE\
     int H = 0;\
diff --git a/encoder/cavlc.c b/encoder/cavlc.c
index 5d826ff..1d393fd 100644
--- a/encoder/cavlc.c
+++ b/encoder/cavlc.c
@@ -289,6 +289,7 @@ static ALWAYS_INLINE void x264_cavlc_macroblock_luma_residual( x264_t *h, int pl
                 x264_cavlc_block_residual( h, DCT_LUMA_4x4, i4+i8*4+p*16, h->dct.luma4x4[i4+i8*4+p*16] );
 }
 
+#if RDO_SKIP_BS
 static ALWAYS_INLINE void x264_cavlc_partition_luma_residual( x264_t *h, int i8, int p )
 {
     if( h->mb.b_transform_8x8 && h->mb.cache.non_zero_count[x264_scan8[i8*4]] )
@@ -299,6 +300,7 @@ static ALWAYS_INLINE void x264_cavlc_partition_luma_residual( x264_t *h, int i8,
         for( int i4 = 0; i4 < 4; i4++ )
             x264_cavlc_block_residual( h, DCT_LUMA_4x4, i4+i8*4+p*16, h->dct.luma4x4[i4+i8*4+p*16] );
 }
+#endif
 
 static void x264_cavlc_mb_header_i( x264_t *h, int i_mb_type, int i_mb_i_offset, int chroma )
 {



More information about the x264-devel mailing list