[x264-devel] 4x4 intra prediction

Xiaojie Huang hworldjj at yahoo.com
Thu Sep 23 05:04:56 CEST 2004


In x264_mb_analyse_intra, every 4x4 block has been
encoded by x264_mb_encode_i4x4. But in
x264_macroblock_encode, if the best mode is I_4x4,
x264_mb_encode_i4x4 is performed again. The second
operation is redundant, so we can remove it. The
simulation results indicate that the bitstream is same
as the original. All we have to do is to replace:
            int      i_mode =
h->mb.cache.intra4x4_pred_mode[x264_scan8[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];

			/* 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];

with

            int      i_mode =
h->mb.cache.intra4x4_pred_mode[x264_scan8[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];

			/ * 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];

Xiaojie Huang



		
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

-- 
This is the x264-devel mailing-list
To unsubscribe, go to: http://developers.videolan.org/lists.html



More information about the x264-devel mailing list