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 d7d0b63..f425d08 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];
 }