[cvs] / xvidcore / src / decoder.c Repository:
ViewVC logotype

Diff of /xvidcore/src/decoder.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.37.2.21, Sat Dec 14 06:07:02 2002 UTC revision 1.37.2.25, Fri Jan 3 16:25:14 2003 UTC
# Line 678  Line 678 
678    
679                          if (dec->interlacing) {                          if (dec->interlacing) {
680                                  mb->field_dct = BitstreamGetBit(bs);                                  mb->field_dct = BitstreamGetBit(bs);
681                                  DEBUG1("deci: field_dct: ", mb->field_dct);                                  DPRINTF(DPRINTF_MB,"deci: field_dct: %i", mb->field_dct);
682                          }                          }
683    
684                          decoder_mbintra(dec, mb, x, y, acpred_flag, cbp, bs, quant,                          decoder_mbintra(dec, mb, x, y, acpred_flag, cbp, bs, quant,
# Line 856  Line 856 
856                                  if (dec->interlacing) {                                  if (dec->interlacing) {
857                                          if (cbp || intra) {                                          if (cbp || intra) {
858                                                  mb->field_dct = BitstreamGetBit(bs);                                                  mb->field_dct = BitstreamGetBit(bs);
859                                                  DEBUG1("decp: field_dct: ", mb->field_dct);                                                  DPRINTF(DPRINTF_MB,"decp: field_dct: %i", mb->field_dct);
860                                          }                                          }
861    
862                                          if (mb->mode == MODE_INTER || mb->mode == MODE_INTER_Q) {                                          if (mb->mode == MODE_INTER || mb->mode == MODE_INTER_Q) {
863                                                  mb->field_pred = BitstreamGetBit(bs);                                                  mb->field_pred = BitstreamGetBit(bs);
864                                                  DEBUG1("decp: field_pred: ", mb->field_pred);                                                  DPRINTF(DPRINTF_MB, "decp: field_pred: %i", mb->field_pred);
865    
866                                                  if (mb->field_pred) {                                                  if (mb->field_pred) {
867                                                          mb->field_for_top = BitstreamGetBit(bs);                                                          mb->field_for_top = BitstreamGetBit(bs);
868                                                          DEBUG1("decp: field_for_top: ", mb->field_for_top);                                                          DPRINTF(DPRINTF_MB,"decp: field_for_top: %i", mb->field_for_top);
869                                                          mb->field_for_bot = BitstreamGetBit(bs);                                                          mb->field_for_bot = BitstreamGetBit(bs);
870                                                          DEBUG1("decp: field_for_bot: ", mb->field_for_bot);                                                          DPRINTF(DPRINTF_MB,"decp: field_for_bot: %i", mb->field_for_bot);
871                                                  }                                                  }
872                                          }                                          }
873                                  }                                  }
# Line 915  Line 915 
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);
# Line 1467  Line 1467 
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;
# Line 1581  Line 1583 
1583                                  break;                                  break;
1584    
1585                          default:                          default:
1586                                  DEBUG1("Not support B-frame mb_type =", mb->mb_type);                                  DPRINTF(DPRINTF_ERROR,"Not support B-frame mb_type = %i", mb->mb_type);
1587                          }                          }
1588    
1589                  }                                               // end of FOR                  }                                               // end of FOR
# Line 1651  Line 1653 
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
# Line 1700  Line 1705 
1705          if (vop_type == - 1)          if (vop_type == - 1)
1706          {          {
1707                  if (success) goto done;                  if (success) goto done;
1708                    emms();
1709                  return XVID_ERR_FAIL;                  return XVID_ERR_FAIL;
1710          }          }
1711    
# Line 1720  Line 1726 
1726                          stats->data.vol.par_width = dec->par_width;                          stats->data.vol.par_width = dec->par_width;
1727                          stats->data.vol.par_height = dec->par_height;                          stats->data.vol.par_height = dec->par_height;
1728                          frame->length = BitstreamPos(&bs) / 8;                          frame->length = BitstreamPos(&bs) / 8;
1729                            emms();
1730                          return XVID_ERR_OK;                          return XVID_ERR_OK;
1731                  }                  }
1732                  goto repeat;                  goto repeat;
# Line 1835  Line 1842 
1842                  {                  {
1843                          /* output the recently decoded frame */                          /* output the recently decoded frame */
1844                          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);
1845                            output = 1;
1846                  }                  }
1847                  else                  else
1848                  {                  {
# Line 1846  Line 1854 
1854    
1855                          decoder_output(dec, &dec->cur, NULL, frame, 1 /*disable pp*/);                          decoder_output(dec, &dec->cur, NULL, frame, 1 /*disable pp*/);
1856                  }                  }
                 output = 1;  
1857          }          }
1858    
1859          frame->length = BitstreamPos(&bs) / 8;          frame->length = BitstreamPos(&bs) / 8;

Legend:
Removed from v.1.37.2.21  
changed lines
  Added in v.1.37.2.25

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4