[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.49.2.28, Sun Dec 21 19:41:53 2003 UTC revision 1.49.2.34, Sun Feb 29 12:57:58 2004 UTC
# Line 779  Line 779 
779    
780          start_timer();          start_timer();
781          image_setedges(&dec->refn[0], dec->edged_width, dec->edged_height,          image_setedges(&dec->refn[0], dec->edged_width, dec->edged_height,
782                                          dec->width, dec->height);                                          dec->width, dec->height, dec->bs_version);
783          stop_edges_timer();          stop_edges_timer();
784    
785          if (gmc_warp) {          if (gmc_warp) {
# Line 851  Line 851 
851                                  mb->quant = quant;                                  mb->quant = quant;
852    
853                                  if (dec->interlacing) {                                  if (dec->interlacing) {
854                                          if ((cbp || intra) && !mcsel) {                                          if (cbp || intra) {
855                                                  mb->field_dct = BitstreamGetBit(bs);                                                  mb->field_dct = BitstreamGetBit(bs);
856                                                  DPRINTF(XVID_DEBUG_MB,"decp: field_dct: %i\n", mb->field_dct);                                                  DPRINTF(XVID_DEBUG_MB,"decp: field_dct: %i\n", mb->field_dct);
857                                          }                                          }
858    
859                                          if (mb->mode == MODE_INTER || mb->mode == MODE_INTER_Q) {                                          if ((mb->mode == MODE_INTER || mb->mode == MODE_INTER_Q) && !mcsel) {
860                                                  mb->field_pred = BitstreamGetBit(bs);                                                  mb->field_pred = BitstreamGetBit(bs);
861                                                  DPRINTF(XVID_DEBUG_MB, "decp: field_pred: %i\n", mb->field_pred);                                                  DPRINTF(XVID_DEBUG_MB, "decp: field_pred: %i\n", mb->field_pred);
862    
# Line 900  Line 900 
900    
901                          } else if (gmc_warp) {  /* a not coded S(GMC)-VOP macroblock */                          } else if (gmc_warp) {  /* a not coded S(GMC)-VOP macroblock */
902                                  mb->mode = MODE_NOT_CODED_GMC;                                  mb->mode = MODE_NOT_CODED_GMC;
903                                    mb->quant = quant;
904                                  decoder_mbgmc(dec, mb, x, y, fcode, 0x00, bs, rounding);                                  decoder_mbgmc(dec, mb, x, y, fcode, 0x00, bs, rounding);
905    
906                                  if(dec->out_frm && cp_mb > 0) {                                  if(dec->out_frm && cp_mb > 0) {
# Line 909  Line 910 
910                                  st_mb = x+1;                                  st_mb = x+1;
911                          } else {        /* not coded P_VOP macroblock */                          } else {        /* not coded P_VOP macroblock */
912                                  mb->mode = MODE_NOT_CODED;                                  mb->mode = MODE_NOT_CODED;
913                                    mb->quant = quant;
914    
915                                  mb->mvs[0].x = mb->mvs[1].x = mb->mvs[2].x = mb->mvs[3].x = 0;                                  mb->mvs[0].x = mb->mvs[1].x = mb->mvs[2].x = mb->mvs[3].x = 0;
916                                  mb->mvs[0].y = mb->mvs[1].y = mb->mvs[2].y = mb->mvs[3].y = 0;                                  mb->mvs[0].y = mb->mvs[1].y = mb->mvs[2].y = mb->mvs[3].y = 0;
# Line 1178  Line 1180 
1180    
1181          start_timer();          start_timer();
1182          image_setedges(&dec->refn[0], dec->edged_width, dec->edged_height,          image_setedges(&dec->refn[0], dec->edged_width, dec->edged_height,
1183                                          dec->width, dec->height);                                          dec->width, dec->height, dec->bs_version);
1184          image_setedges(&dec->refn[1], dec->edged_width, dec->edged_height,          image_setedges(&dec->refn[1], dec->edged_width, dec->edged_height,
1185                                          dec->width, dec->height);                                          dec->width, dec->height, dec->bs_version);
1186          stop_edges_timer();          stop_edges_timer();
1187    
1188          for (y = 0; y < dec->mb_height; y++) {          for (y = 0; y < dec->mb_height; y++) {
# Line 1508  Line 1510 
1510                          /* attemping to decode a bvop without atleast 2 reference frames */                          /* attemping to decode a bvop without atleast 2 reference frames */
1511                          image_printf(&dec->cur, dec->edged_width, dec->height, 16, 16,                          image_printf(&dec->cur, dec->edged_width, dec->height, 16, 16,
1512                                                  "broken b-frame, mising ref frames");                                                  "broken b-frame, mising ref frames");
1513                          stats->type = XVID_TYPE_NOTHING;                          if (stats) stats->type = XVID_TYPE_NOTHING;
1514                  } else if (dec->time_pp <= dec->time_bp) {                  } else if (dec->time_pp <= dec->time_bp) {
1515                          /* this occurs when dx50_bvop_compatibility==0 sequences are                          /* this occurs when dx50_bvop_compatibility==0 sequences are
1516                          decoded in vfw. */                          decoded in vfw. */
1517                          image_printf(&dec->cur, dec->edged_width, dec->height, 16, 16,                          image_printf(&dec->cur, dec->edged_width, dec->height, 16, 16,
1518                                                  "broken b-frame, tpp=%i tbp=%i", dec->time_pp, dec->time_bp);                                                  "broken b-frame, tpp=%i tbp=%i", dec->time_pp, dec->time_bp);
1519                          stats->type = XVID_TYPE_NOTHING;                          if (stats) stats->type = XVID_TYPE_NOTHING;
1520                  } else {                  } else {
1521                          decoder_bframe(dec, &bs, quant, fcode_forward, fcode_backward);                          decoder_bframe(dec, &bs, quant, fcode_forward, fcode_backward);
1522                          decoder_output(dec, &dec->cur, dec->mbs, frame, stats, coding_type, quant);                          decoder_output(dec, &dec->cur, dec->mbs, frame, stats, coding_type, quant);
# Line 1524  Line 1526 
1526                  dec->frames++;                  dec->frames++;
1527          }          }
1528    
1529    #if 0 /* Avoids to read to much data because of 32bit reads in our BS functions */
1530          BitstreamByteAlign(&bs);          BitstreamByteAlign(&bs);
1531    #endif
1532    
1533          /* low_delay_default mode: repeat in packed_mode */          /* low_delay_default mode: repeat in packed_mode */
1534          if (dec->low_delay_default && dec->packed_mode && output == 0 && success == 0) {          if (dec->low_delay_default && dec->packed_mode && output == 0 && success == 0) {
# Line 1555  Line 1559 
1559          emms();          emms();
1560          stop_global_timer();          stop_global_timer();
1561    
1562          return BitstreamPos(&bs) / 8;   /* number of bytes consumed */          return (BitstreamPos(&bs) + 7) / 8;     /* number of bytes consumed */
1563  }  }

Legend:
Removed from v.1.49.2.28  
changed lines
  Added in v.1.49.2.34

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