[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.35, Wed Jul 24 23:09:28 2002 UTC revision 1.39, Sun Sep 22 17:01:36 2002 UTC
# Line 53  Line 53 
53   *  26.03.2002  interlacing support - moved transfers outside decode loop   *  26.03.2002  interlacing support - moved transfers outside decode loop
54   *  26.12.2001  decoder_mbinter: dequant/idct moved within if(coded) block   *  26.12.2001  decoder_mbinter: dequant/idct moved within if(coded) block
55   *  22.12.2001  lock based interpolation   *  22.12.2001  lock based interpolation
56   *  01.12.2001  inital version; (c)2001 peter ross <pross@cs.rmit.edu.au>   *  01.12.2001  inital version; (c)2001 peter ross <pross@xvid.org>
57   *   *
58   *  $Id$   *  $Id$
59   *   *
# Line 379  Line 379 
379    
380          start_timer();          start_timer();
381          if(dec->quarterpel) {          if(dec->quarterpel) {
382                  DEBUG("QUARTERPEL");                  DPRINTF(DPRINTF_DEBUG, "QUARTERPEL\n");
383                  interpolate8x8_quarterpel(dec->cur.y, dec->refn[0].y, 16*x_pos, 16*y_pos,                  interpolate8x8_quarterpel(dec->cur.y, dec->refn[0].y, 16*x_pos, 16*y_pos,
384                                                                    pMB->mvs[0].x, pMB->mvs[0].y, stride,  rounding);                                                                    pMB->mvs[0].x, pMB->mvs[0].y, stride,  rounding);
385                  interpolate8x8_quarterpel(dec->cur.y, dec->refn[0].y, 16*x_pos + 8, 16*y_pos,                  interpolate8x8_quarterpel(dec->cur.y, dec->refn[0].y, 16*x_pos + 8, 16*y_pos,
# Line 509  Line 509 
509    
510                          if (dec->interlacing) {                          if (dec->interlacing) {
511                                  mb->field_dct = BitstreamGetBit(bs);                                  mb->field_dct = BitstreamGetBit(bs);
512                                  DEBUG1("deci: field_dct: ", mb->field_dct);                                  DPRINTF(DPRINTF_DEBUG, "deci: field_dct: %d", mb->field_dct);
513                          }                          }
514    
515                          decoder_mbintra(dec, mb, x, y, acpred_flag, cbp, bs, quant,                          decoder_mbintra(dec, mb, x, y, acpred_flag, cbp, bs, quant,
# Line 653  Line 653 
653                                  mb->quant = quant;                                  mb->quant = quant;
654    
655                                  if (dec->interlacing) {                                  if (dec->interlacing) {
656                                            if (cbp || intra) {
657                                          mb->field_dct = BitstreamGetBit(bs);                                          mb->field_dct = BitstreamGetBit(bs);
658                                          DEBUG1("decp: field_dct: ", mb->field_dct);                                                  DPRINTF(DPRINTF_DEBUG, "decp: field_dct: %d", mb->field_dct);
659                                            }
660    
661                                          if (mb->mode == MODE_INTER || mb->mode == MODE_INTER_Q) {                                          if (mb->mode == MODE_INTER || mb->mode == MODE_INTER_Q) {
662                                                  mb->field_pred = BitstreamGetBit(bs);                                                  mb->field_pred = BitstreamGetBit(bs);
663                                                  DEBUG1("decp: field_pred: ", mb->field_pred);                                                  DPRINTF(DPRINTF_DEBUG, "decp: field_pred: %d", mb->field_pred);
664    
665                                                  if (mb->field_pred) {                                                  if (mb->field_pred) {
666                                                          mb->field_for_top = BitstreamGetBit(bs);                                                          mb->field_for_top = BitstreamGetBit(bs);
667                                                          DEBUG1("decp: field_for_top: ", mb->field_for_top);                                                          DPRINTF(DPRINTF_DEBUG, "decp: field_for_top: %d", mb->field_for_top);
668                                                          mb->field_for_bot = BitstreamGetBit(bs);                                                          mb->field_for_bot = BitstreamGetBit(bs);
669                                                          DEBUG1("decp: field_for_bot: ", mb->field_for_bot);                                                          DPRINTF(DPRINTF_DEBUG, "decp: field_for_bot: %d", mb->field_for_bot);
670                                                  }                                                  }
671                                          }                                          }
672                                  }                                  }
# Line 704  Line 706 
706                                                                  rounding);                                                                  rounding);
707                          } else                          // not coded                          } else                          // not coded
708                          {                          {
709                                  DEBUG2("P-frame MB at (X,Y)=",x,y);                                  DPRINTF(DPRINTF_DEBUG, "P-frame MB at (X,Y)=(%d,%d)", x, y);
710    
711                                  mb->mode = MODE_NOT_CODED;                                  mb->mode = MODE_NOT_CODED;
712                                  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;
713                                  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 1276  Line 1279 
1279                                  break;                                  break;
1280    
1281                          default:                          default:
1282                                  DEBUG1("Not support B-frame mb_type =", mb->mb_type);                                  DPRINTF(DPRINTF_ERROR, "Not support B-frame mb_type = %d", mb->mb_type);
1283                          }                          }
1284    
1285                  }                                               // end of FOR                  }                                               // end of FOR
# Line 1377  Line 1380 
1380    
1381  #ifdef BFRAMES_DEC  #ifdef BFRAMES_DEC
1382          // test if no B_VOP          // test if no B_VOP
1383          if (dec->low_delay) {          if (dec->low_delay || dec->frames == 0) {
1384  #endif  #endif
1385          image_output(&dec->cur, dec->width, dec->height, dec->edged_width,          image_output(&dec->cur, dec->width, dec->height, dec->edged_width,
1386                                           frame->image, frame->stride, frame->colorspace);                                           frame->image, frame->stride, frame->colorspace);
1387    
1388  #ifdef BFRAMES_DEC  #ifdef BFRAMES_DEC
1389          } else {          } else {
1390                  if (dec->frames >= 0) {                  if (dec->frames >= 1) {
1391                          start_timer();                          start_timer();
1392                          if ((vop_type == I_VOP || vop_type == P_VOP)) {                          if ((vop_type == I_VOP || vop_type == P_VOP)) {
1393                                  image_output(&dec->refn[0], dec->width, dec->height,                                  image_output(&dec->refn[0], dec->width, dec->height,

Legend:
Removed from v.1.35  
changed lines
  Added in v.1.39

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