[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.16, Mon May 6 03:58:09 2002 UTC revision 1.18, Mon May 20 17:12:53 2002 UTC
# Line 32  Line 32 
32   *   *
33   *  History:   *  History:
34   *   *
35     *  08.05.2002  add low_delay support for B_VOP decode
36     *              MinChen <chenm001@163.com>
37     *  05.05.2002  fix some B-frame decode problem
38   *  02.05.2002  add B-frame decode support(have some problem);   *  02.05.2002  add B-frame decode support(have some problem);
39   *              MinChen <chenm001@163.com>   *              MinChen <chenm001@163.com>
40   *  22.04.2002  add some B-frame decode support;  chenm001 <chenm001@163.com>   *  22.04.2002  add some B-frame decode support;  chenm001 <chenm001@163.com>
# Line 1142  Line 1145 
1145          vop_type=BitstreamReadHeaders(&bs, dec, &rounding, &quant, &fcode_forward, &fcode_backward, &intra_dc_threshold);          vop_type=BitstreamReadHeaders(&bs, dec, &rounding, &quant, &fcode_forward, &fcode_backward, &intra_dc_threshold);
1146    
1147          dec->p_bmv.x=dec->p_bmv.y=dec->p_fmv.y=dec->p_fmv.y=0;          // init pred vector to 0          dec->p_bmv.x=dec->p_bmv.y=dec->p_fmv.y=dec->p_fmv.y=0;          // init pred vector to 0
1148    
1149          switch (vop_type)          switch (vop_type)
1150          {          {
1151          case P_VOP :          case P_VOP :
# Line 1155  Line 1159 
1159                  break;                  break;
1160    
1161          case B_VOP :          case B_VOP :
1162    #ifdef BFRAMES
1163                  if (dec->time_pp > dec->time_bp){                  if (dec->time_pp > dec->time_bp){
1164                          DEBUG1("B_VOP  Time=",dec->time);                          DEBUG1("B_VOP  Time=",dec->time);
1165                          decoder_bframe(dec, &bs, quant, fcode_forward, fcode_backward);                          decoder_bframe(dec, &bs, quant, fcode_forward, fcode_backward);
1166                  } else {                  } else {
1167                          DEBUG("broken B-frame!");                          DEBUG("broken B-frame!");
1168                  }                  }
1169    #endif
1170                  break;                  break;
1171    
1172          case N_VOP :    // vop not coded          case N_VOP :    // vop not coded
# Line 1172  Line 1178 
1178    
1179          frame->length = BitstreamPos(&bs) / 8;          frame->length = BitstreamPos(&bs) / 8;
1180    
1181    #ifdef BFRAMES
1182            // test if no B_VOP
1183            if (dec->low_delay){
1184    #endif
1185                image_output(&dec->cur, dec->width, dec->height, dec->edged_width,
1186                                         frame->image, frame->stride, frame->colorspace);
1187    #ifdef BFRAMES
1188            } else {
1189          if (dec->frames >= 1){          if (dec->frames >= 1){
1190                  start_timer();                  start_timer();
1191                  if ((vop_type == I_VOP || vop_type == P_VOP))                  if ((vop_type == I_VOP || vop_type == P_VOP))
# Line 1184  Line 1198 
1198                  }                  }
1199                  stop_conv_timer();                  stop_conv_timer();
1200          }          }
1201            }
1202    #endif
1203    
1204          if (vop_type==I_VOP || vop_type==P_VOP){          if (vop_type==I_VOP || vop_type==P_VOP){
1205                  image_swap(&dec->refn[0], &dec->refn[1]);                  image_swap(&dec->refn[0], &dec->refn[1]);
1206                  image_swap(&dec->cur, &dec->refn[0]);                  image_swap(&dec->cur, &dec->refn[0]);
1207                  // swap MACROBLOCK                  // swap MACROBLOCK
1208                  if (vop_type==P_VOP)                  if (dec->low_delay && vop_type==P_VOP)
1209                          mb_swap(&dec->mbs, &dec->last_mbs);                          mb_swap(&dec->mbs, &dec->last_mbs);
1210          }          }
1211    

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.18

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