- case D_16x16:
- if( b_list[i_list][0] )
- {
- x264_mb_predict_mv( h, i_list, 0, 4, mvp );
- bs_write_se( s, h->mb.cache.mv[i_list][x264_scan8[0]][0] - mvp[0] );
- bs_write_se( s, h->mb.cache.mv[i_list][x264_scan8[0]][1] - mvp[1] );
- }
- break;
- case D_16x8:
- if( b_list[i_list][0] )
- {
- x264_mb_predict_mv( h, i_list, 0, 4, mvp );
- bs_write_se( s, h->mb.cache.mv[i_list][x264_scan8[0]][0] - mvp[0] );
- bs_write_se( s, h->mb.cache.mv[i_list][x264_scan8[0]][1] - mvp[1] );
- }
- if( b_list[i_list][1] )
- {
- x264_mb_predict_mv( h, i_list, 8, 4, mvp );
- bs_write_se( s, h->mb.cache.mv[i_list][x264_scan8[8]][0] - mvp[0] );
- bs_write_se( s, h->mb.cache.mv[i_list][x264_scan8[8]][1] - mvp[1] );
- }
- break;
- case D_8x16:
- if( b_list[i_list][0] )
- {
- x264_mb_predict_mv( h, i_list, 0, 2, mvp );
- bs_write_se( s, h->mb.cache.mv[i_list][x264_scan8[0]][0] - mvp[0] );
- bs_write_se( s, h->mb.cache.mv[i_list][x264_scan8[0]][1] - mvp[1] );
- }
- if( b_list[i_list][1] )
- {
- x264_mb_predict_mv( h, i_list, 4, 2, mvp );
- bs_write_se( s, h->mb.cache.mv[i_list][x264_scan8[4]][0] - mvp[0] );
- bs_write_se( s, h->mb.cache.mv[i_list][x264_scan8[4]][1] - mvp[1] );
- }
- break;
+ if( b_list[0][0] ) cavlc_mb_mvd( h, s, 0, 0, 4 );
+ if( b_list[0][1] ) cavlc_mb_mvd( h, s, 0, 8, 4 );
+ if( b_list[1][0] ) cavlc_mb_mvd( h, s, 1, 0, 4 );
+ if( b_list[1][1] ) cavlc_mb_mvd( h, s, 1, 8, 4 );
+ }
+ else //if( h->mb.i_partition == D_8x16 )
+ {
+ if( b_list[0][0] ) cavlc_mb_mvd( h, s, 0, 0, 2 );
+ if( b_list[0][1] ) cavlc_mb_mvd( h, s, 0, 4, 2 );
+ if( b_list[1][0] ) cavlc_mb_mvd( h, s, 1, 0, 2 );
+ if( b_list[1][1] ) cavlc_mb_mvd( h, s, 1, 4, 2 );