}
/* Cheap approximation of chroma costs to avoid a full i4x4/i8x8 analysis. */
- h->predict_16x16[a->i_predict16x16]( h->mb.pic.p_fdec[1] );
- h->predict_16x16[a->i_predict16x16]( h->mb.pic.p_fdec[2] );
+ if( h->mb.b_lossless )
+ {
+ x264_predict_lossless_16x16( h, 1, a->i_predict16x16 );
+ x264_predict_lossless_16x16( h, 2, a->i_predict16x16 );
+ }
+ else
+ {
+ h->predict_16x16[a->i_predict16x16]( h->mb.pic.p_fdec[1] );
+ h->predict_16x16[a->i_predict16x16]( h->mb.pic.p_fdec[2] );
+ }
a->i_satd_chroma = h->pixf.mbcmp[PIXEL_16x16]( h->mb.pic.p_fdec[1], FDEC_STRIDE, h->mb.pic.p_fenc[1], FENC_STRIDE )
+ h->pixf.mbcmp[PIXEL_16x16]( h->mb.pic.p_fdec[2], FDEC_STRIDE, h->mb.pic.p_fenc[2], FENC_STRIDE );
return;