From 469b4e5032b8183dd04c8cb6f22e9724146bb2f5 Mon Sep 17 00:00:00 2001 From: Loren Merritt Date: Sun, 5 Mar 2006 02:16:19 +0000 Subject: [PATCH] for i8x8 neighbors, don't assume a new slice starts at the edge of the frame git-svn-id: svn://svn.videolan.org/x264/trunk@453 df754926-b1dd-0310-bc7b-ec298dee348c --- encoder/analyse.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/encoder/analyse.c b/encoder/analyse.c index c0d0e633..5d00732a 100644 --- a/encoder/analyse.c +++ b/encoder/analyse.c @@ -369,16 +369,20 @@ static void predict_4x4_mode_available( unsigned int i_neighbour, if( b_l && b_t ) { + *pi_count = 6; *mode++ = I_PRED_4x4_DC; *mode++ = I_PRED_4x4_H; *mode++ = I_PRED_4x4_V; *mode++ = I_PRED_4x4_DDL; - *mode++ = I_PRED_4x4_DDR; - *mode++ = I_PRED_4x4_VR; - *mode++ = I_PRED_4x4_HD; + if( i_neighbour & MB_TOPLEFT ) + { + *mode++ = I_PRED_4x4_DDR; + *mode++ = I_PRED_4x4_VR; + *mode++ = I_PRED_4x4_HD; + *pi_count += 3; + } *mode++ = I_PRED_4x4_VL; *mode++ = I_PRED_4x4_HU; - *pi_count = 9; } else if( b_l ) { @@ -629,7 +633,7 @@ static void x264_mb_analyse_intra( x264_t *h, x264_mb_analysis_t *a, int i_cost_ a->i_sad_i8x8 += i_best; /* we need to encode this block now (for next ones) */ - h->predict_8x8[a->i_predict8x8[x][y]]( p_dst_by, h->mb.i_neighbour ); + h->predict_8x8[a->i_predict8x8[x][y]]( p_dst_by, h->mb.i_neighbour8[idx] ); x264_mb_encode_i8x8( h, idx, a->i_qp ); x264_macroblock_cache_intra8x8_pred( h, 2*x, 2*y, a->i_predict8x8[x][y] ); -- 2.47.3