--- decoder.c 2003/12/21 19:41:53 1.49.2.28 +++ decoder.c 2004/02/03 02:56:57 1.49.2.31 @@ -20,7 +20,7 @@ * along with this program ; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: decoder.c,v 1.49.2.28 2003/12/21 19:41:53 Isibaar Exp $ + * $Id: decoder.c,v 1.49.2.31 2004/02/03 02:56:57 syskin Exp $ * ****************************************************************************/ @@ -851,12 +851,12 @@ mb->quant = quant; if (dec->interlacing) { - if ((cbp || intra) && !mcsel) { + if (cbp || intra) { mb->field_dct = BitstreamGetBit(bs); DPRINTF(XVID_DEBUG_MB,"decp: field_dct: %i\n", mb->field_dct); } - if (mb->mode == MODE_INTER || mb->mode == MODE_INTER_Q) { + if ((mb->mode == MODE_INTER || mb->mode == MODE_INTER_Q) && !mcsel) { mb->field_pred = BitstreamGetBit(bs); DPRINTF(XVID_DEBUG_MB, "decp: field_pred: %i\n", mb->field_pred); @@ -900,6 +900,7 @@ } else if (gmc_warp) { /* a not coded S(GMC)-VOP macroblock */ mb->mode = MODE_NOT_CODED_GMC; + mb->quant = quant; decoder_mbgmc(dec, mb, x, y, fcode, 0x00, bs, rounding); if(dec->out_frm && cp_mb > 0) { @@ -909,6 +910,7 @@ st_mb = x+1; } else { /* not coded P_VOP macroblock */ mb->mode = MODE_NOT_CODED; + mb->quant = quant; mb->mvs[0].x = mb->mvs[1].x = mb->mvs[2].x = mb->mvs[3].x = 0; mb->mvs[0].y = mb->mvs[1].y = mb->mvs[2].y = mb->mvs[3].y = 0; @@ -1508,13 +1510,13 @@ /* attemping to decode a bvop without atleast 2 reference frames */ image_printf(&dec->cur, dec->edged_width, dec->height, 16, 16, "broken b-frame, mising ref frames"); - stats->type = XVID_TYPE_NOTHING; + if (stats) stats->type = XVID_TYPE_NOTHING; } else if (dec->time_pp <= dec->time_bp) { /* this occurs when dx50_bvop_compatibility==0 sequences are decoded in vfw. */ image_printf(&dec->cur, dec->edged_width, dec->height, 16, 16, "broken b-frame, tpp=%i tbp=%i", dec->time_pp, dec->time_bp); - stats->type = XVID_TYPE_NOTHING; + if (stats) stats->type = XVID_TYPE_NOTHING; } else { decoder_bframe(dec, &bs, quant, fcode_forward, fcode_backward); decoder_output(dec, &dec->cur, dec->mbs, frame, stats, coding_type, quant);