[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.30, Mon Jul 15 23:50:31 2002 UTC revision 1.32, Fri Jul 19 11:15:21 2002 UTC
# Line 493  Line 493 
493                          decoder_mbintra(dec, mb, x, y, acpred_flag, cbp, bs, quant,                          decoder_mbintra(dec, mb, x, y, acpred_flag, cbp, bs, quant,
494                                                          intra_dc_threshold, bound);                                                          intra_dc_threshold, bound);
495                  }                  }
496                    if(dec->out_frm)
497                      output_slice(&dec->cur, dec->edged_width,dec->width,dec->out_frm,0,y,dec->mb_width);
498    
499          }          }
500    
501  }  }
# Line 556  Line 559 
559    
560          uint32_t x, y;          uint32_t x, y;
561          uint32_t bound;          uint32_t bound;
562            int cp_mb, st_mb;
563    
564          start_timer();          start_timer();
565          image_setedges(&dec->refn[0], dec->edged_width, dec->edged_height,          image_setedges(&dec->refn[0], dec->edged_width, dec->edged_height,
# Line 565  Line 569 
569          bound = 0;          bound = 0;
570    
571          for (y = 0; y < dec->mb_height; y++) {          for (y = 0; y < dec->mb_height; y++) {
572                    cp_mb = st_mb = 0;
573                  for (x = 0; x < dec->mb_width; x++) {                  for (x = 0; x < dec->mb_width; x++) {
574                          MACROBLOCK *mb;                          MACROBLOCK *mb;
575    
# Line 592  Line 597 
597                                  uint32_t cbp;                                  uint32_t cbp;
598                                  uint32_t intra;                                  uint32_t intra;
599    
600                                    cp_mb++;
601                                  mcbpc = get_mcbpc_inter(bs);                                  mcbpc = get_mcbpc_inter(bs);
602                                  mb->mode = mcbpc & 7;                                  mb->mode = mcbpc & 7;
603                                  cbpc = (mcbpc >> 4);                                  cbpc = (mcbpc >> 4);
# Line 718  Line 724 
724                                                                   dec->refn[0].v +                                                                   dec->refn[0].v +
725                                                                   (8 * y) * dec->edged_width / 2 + (8 * x),                                                                   (8 * y) * dec->edged_width / 2 + (8 * x),
726                                                                   dec->edged_width / 2);                                                                   dec->edged_width / 2);
   
727                                  stop_transfer_timer();                                  stop_transfer_timer();
728                                    if(dec->out_frm && cp_mb > 0) {
729                                      output_slice(&dec->cur, dec->edged_width,dec->width,dec->out_frm,st_mb,y,cp_mb);
730                                      cp_mb = 0;
731                                    }
732                                    st_mb = x+1;
733                          }                          }
734                  }                  }
735                    if(dec->out_frm && cp_mb > 0)
736                      output_slice(&dec->cur, dec->edged_width,dec->width,dec->out_frm,st_mb,y,cp_mb);
737          }          }
738  }  }
739    
# Line 1282  Line 1294 
1294    
1295          start_global_timer();          start_global_timer();
1296    
1297            dec->out_frm = (frame->colorspace == XVID_CSP_EXTERN) ? frame->image : NULL;
1298    
1299          BitstreamInit(&bs, frame->bitstream, frame->length);          BitstreamInit(&bs, frame->bitstream, frame->length);
1300    
1301          // add by chenm001 <chenm001@163.com>          // add by chenm001 <chenm001@163.com>
# Line 1367  Line 1381 
1381          if (vop_type == I_VOP || vop_type == P_VOP) {          if (vop_type == I_VOP || vop_type == P_VOP) {
1382                  image_swap(&dec->refn[0], &dec->refn[1]);                  image_swap(&dec->refn[0], &dec->refn[1]);
1383                  image_swap(&dec->cur, &dec->refn[0]);                  image_swap(&dec->cur, &dec->refn[0]);
1384    
1385                  // swap MACROBLOCK                  // swap MACROBLOCK
1386                  if (!dec->low_delay && vop_type == P_VOP)                  // the Divx will not set the low_delay flage some times
1387                    // so follow code will wrong to not swap at that time
1388                    // this will broken bitstream! so I'm change it,
1389                    // But that is not the best way! can anyone tell me how
1390                    // to do another way?
1391                    // 18-07-2002   MinChen<chenm001@163.com>
1392                    //if (!dec->low_delay && vop_type == P_VOP)
1393                    if (vop_type == P_VOP)
1394                          mb_swap(&dec->mbs, &dec->last_mbs);                          mb_swap(&dec->mbs, &dec->last_mbs);
1395          }          }
1396    

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.32

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