Index: macroblock.c =================================================================== --- macroblock.c (revision 48) +++ macroblock.c (working copy) @@ -562,16 +562,23 @@ { for( i = 0; i < 16; i++ ) { - const int i_dst = h->mb.pic.i_stride[0]; - uint8_t *p_dst = &h->mb.pic.p_fdec[0][4 * block_idx_x[i] + 4 * block_idx_y[i] * i_dst]; - int i_mode = h->mb.cache.intra4x4_pred_mode[x264_scan8[i]]; + int i_mode = h->mb.cache.intra4x4_pred_mode[x264_scan8[i]]; + + /* We don't need x264_mb_encode_i4x4 again since + * it has been performed in x264_mb_analyse_intra + * Xiajie Huang, hworldjj@yahoo.com + */ +/* + const int i_dst = h->mb.pic.i_stride[0]; + uint8_t *p_dst = &h->mb.pic.p_fdec[0][4 * block_idx_x[i] + 4 * block_idx_y[i] * i_dst]; + + / * Do the right prediction * / + h->predict_4x4[i_mode]( p_dst, i_dst ); + + / * encode one 4x4 block * / + x264_mb_encode_i4x4( h, i, i_qscale ); +*/ - /* Do the right prediction */ - h->predict_4x4[i_mode]( p_dst, i_dst ); - - /* encode one 4x4 block */ - x264_mb_encode_i4x4( h, i, i_qscale ); - /* fix the pred mode value */ h->mb.cache.intra4x4_pred_mode[x264_scan8[i]] = x264_mb_pred_mode4x4_fix[i_mode]; }