915 |
} |
} |
916 |
else if (gmc_mv) /* not coded S_VOP macroblock */ |
else if (gmc_mv) /* not coded S_VOP macroblock */ |
917 |
{ |
{ |
918 |
mb->mode = MODE_NOT_CODED; |
mb->mode = MODE_NOT_CODED_GMC; |
919 |
mb->mvs[0].x = mb->mvs[1].x = mb->mvs[2].x = mb->mvs[3].x = gmc_sanitize(gmc_mv[0].x, dec->quarterpel, fcode); |
mb->mvs[0].x = mb->mvs[1].x = mb->mvs[2].x = mb->mvs[3].x = gmc_sanitize(gmc_mv[0].x, dec->quarterpel, fcode); |
920 |
mb->mvs[0].y = mb->mvs[1].y = mb->mvs[2].y = mb->mvs[3].y = gmc_sanitize(gmc_mv[0].y, dec->quarterpel, fcode); |
mb->mvs[0].y = mb->mvs[1].y = mb->mvs[2].y = mb->mvs[3].y = gmc_sanitize(gmc_mv[0].y, dec->quarterpel, fcode); |
921 |
decoder_mbinter(dec, mb, x, y, 0, 0, bs, quant, rounding, reduced_resolution); |
decoder_mbinter(dec, mb, x, y, 0, 0, bs, quant, rounding, reduced_resolution); |
1467 |
mb->b_mvs[0] = mb->b_mvs[1] = mb->b_mvs[2] = mb->b_mvs[3] = |
mb->b_mvs[0] = mb->b_mvs[1] = mb->b_mvs[2] = mb->b_mvs[3] = |
1468 |
mb->mvs[0] = mb->mvs[1] = mb->mvs[2] = mb->mvs[3] = zeromv; |
mb->mvs[0] = mb->mvs[1] = mb->mvs[2] = mb->mvs[3] = zeromv; |
1469 |
|
|
1470 |
// the last P_VOP is skip macroblock ? |
// skip if the co-located P_VOP macroblock is not coded |
1471 |
|
// note: gmc+not_coded isn't skipped |
1472 |
|
|
1473 |
if (last_mb->mode == MODE_NOT_CODED) { |
if (last_mb->mode == MODE_NOT_CODED) { |
1474 |
//DEBUG2("Skip MB in B-frame at (X,Y)=!",x,y); |
//DEBUG2("Skip MB in B-frame at (X,Y)=!",x,y); |
1475 |
mb->cbp = 0; |
mb->cbp = 0; |
1653 |
dec->low_delay_default = (frame->general & XVID_DEC_LOWDELAY); |
dec->low_delay_default = (frame->general & XVID_DEC_LOWDELAY); |
1654 |
dec->out_frm = (frame->colorspace == XVID_CSP_EXTERN) ? frame->image : NULL; |
dec->out_frm = (frame->colorspace == XVID_CSP_EXTERN) ? frame->image : NULL; |
1655 |
|
|
1656 |
|
if ((frame->general & XVID_DEC_DISCONTINUITY)) |
1657 |
|
dec->frames = 0; |
1658 |
|
|
1659 |
if (frame->length < 0) /* decoder flush */ |
if (frame->length < 0) /* decoder flush */ |
1660 |
{ |
{ |
1661 |
/* if not decoding "low_delay/packed", and this isn't low_delay and |
/* if not decoding "low_delay/packed", and this isn't low_delay and |
1840 |
{ |
{ |
1841 |
/* output the recently decoded frame */ |
/* output the recently decoded frame */ |
1842 |
decoder_output(dec, &dec->refn[0], dec->last_mbs, frame, dec->last_reduced_resolution); |
decoder_output(dec, &dec->refn[0], dec->last_mbs, frame, dec->last_reduced_resolution); |
1843 |
|
output = 1; |
1844 |
} |
} |
1845 |
else |
else |
1846 |
{ |
{ |
1852 |
|
|
1853 |
decoder_output(dec, &dec->cur, NULL, frame, 1 /*disable pp*/); |
decoder_output(dec, &dec->cur, NULL, frame, 1 /*disable pp*/); |
1854 |
} |
} |
|
output = 1; |
|
1855 |
} |
} |
1856 |
|
|
1857 |
frame->length = BitstreamPos(&bs) / 8; |
frame->length = BitstreamPos(&bs) / 8; |