]> granicus.if.org Git - libx264/commitdiff
Fix minor bug in intra pred with intra refresh
authorFiona Glaser <fiona@x264.com>
Mon, 4 Oct 2010 20:33:23 +0000 (13:33 -0700)
committerFiona Glaser <fiona@x264.com>
Sun, 10 Oct 2010 21:43:42 +0000 (14:43 -0700)
i8x8 blocks didn't properly avoid predicting from top-right when necessary.
This could cause intra refresh to not completely refresh the frame.

encoder/analyse.c

index d7d0b63526acf1105d2061ea3891fa89e3daaadc..f425d08d7db3245f5fbcf1b390c03457cd8b8ee9 100644 (file)
@@ -564,7 +564,7 @@ static ALWAYS_INLINE const int8_t *predict_8x8chroma_mode_available( int i_neigh
 
 static ALWAYS_INLINE const int8_t *predict_8x8_mode_available( int force_intra, int i_neighbour, int i )
 {
-    int avoid_topright = force_intra && (i&4);
+    int avoid_topright = force_intra && (i&1);
     int idx = i_neighbour & (MB_TOP|MB_LEFT|MB_TOPLEFT);
     return i4x4_mode_available[avoid_topright][(idx&MB_TOPLEFT)?4:idx];
 }