]> granicus.if.org Git - libx264/commitdiff
Minor fixes and cosmetics
authorFiona Glaser <fiona@x264.com>
Wed, 11 Feb 2009 18:35:56 +0000 (10:35 -0800)
committerFiona Glaser <fiona@x264.com>
Wed, 11 Feb 2009 18:47:02 +0000 (10:47 -0800)
Suppress a GCC warning, fix a non-problematic array overflow, one REP->REP_RET.

common/x86/quant-a.asm
encoder/cabac.c
encoder/encoder.c

index a013e538817e2027320fe3e52606a617b5a1a546..c89a8a420ecce14425364844e696e0f5e2afea66 100644 (file)
@@ -920,7 +920,7 @@ cglobal x264_coeff_level_run%2_%1,0,7
     inc    t6d
     sub    t4d, t3d
     jge .loop
-    RET
+    REP_RET
 %endmacro
 
 INIT_MMX
index fb1d12276ae45c347f61b66afdbf05e1e08f6a72..b44905e1c4f1839027acbd86e27deb8235f422a9 100644 (file)
@@ -541,6 +541,8 @@ static int ALWAYS_INLINE x264_cabac_mb_cbf_ctxidxinc( x264_t *h, int i_cat, int
             i_nza = h->mb.i_neighbour & MB_LEFT ? (h->mb.cbp[h->mb.i_mb_xy - 1] >> (9 + i_idx)) & 1 : b_intra;
             i_nzb = h->mb.i_neighbour & MB_TOP  ? (h->mb.cbp[h->mb.i_mb_top_xy] >> (9 + i_idx)) & 1 : b_intra;
             return 4*i_cat + 2*i_nzb + i_nza;
+        default:
+            return 0;
     }
 }
 
index 6aa69f12d7381febf791ae54d4560477c9a0371b..17a9a47f9fd7e78571525a20fa26aae14e876595 100644 (file)
@@ -1734,7 +1734,8 @@ static void x264_encoder_frame_end( x264_t *h, x264_t *thread_current,
     pic_out->i_pts = h->fenc->i_pts;
 
     pic_out->img.i_plane = h->fdec->i_plane;
-    for(i = 0; i < 4; i++){
+    for(i = 0; i < 3; i++)
+    {
         pic_out->img.i_stride[i] = h->fdec->i_stride[i];
         pic_out->img.plane[i] = h->fdec->plane[i];
     }