[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.31, Thu Jul 18 00:07:04 2002 UTC revision 1.33, Sun Jul 21 23:34:07 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 1176  Line 1188 
1188  #ifdef BFRAMES_DEC_DEBUG  #ifdef BFRAMES_DEC_DEBUG
1189          BFRAME_DEBUG          BFRAME_DEBUG
1190  #endif  #endif
1191    
1192                          switch (mb->mb_type) {                          switch (mb->mb_type) {
1193                          case MODE_DIRECT:                          case MODE_DIRECT:
1194                                  get_b_motion_vector(dec, bs, x, y, &mv, 1, zeromv);                                  get_b_motion_vector(dec, bs, x, y, &mv, 1, zeromv);
1195    
1196                          case MODE_DIRECT_NONE_MV:                          case MODE_DIRECT_NONE_MV:
1197                                  {                               // Because this file is a C file not C++ so I use '{' to define var                                  {
1198                                          const int64_t TRB = dec->time_pp - dec->time_bp, TRD = dec->time_pp;                                          const int64_t TRB = dec->time_pp - dec->time_bp, TRD = dec->time_pp;
1199                                          int i;                                          int i;
1200    
# Line 1241  Line 1254 
1254                                  break;                                  break;
1255    
1256                          default:                          default:
1257                                  //DEBUG1("Not support B-frame mb_type =", mb->mb_type);                                  DEBUG1("Not support B-frame mb_type =", mb->mb_type);
1258                                  ;                                  ;
1259                          }                          }
1260    
1261                            if ( (x==19) && (y==8) )
1262                            {
1263                                    fprintf(stderr,"D %d   %d    %d %d   %d %d  \n",0, mb->mb_type,
1264                                                    mb->mvs[0].x, mb->mvs[0].y,mb->b_mvs[0].x, mb->b_mvs[0].y );
1265                            }
1266    
1267    
1268    
1269                  }                                               // end of FOR                  }                                               // end of FOR
1270          }          }
1271  #ifdef BFRAMES_DEC_DEBUG  #ifdef BFRAMES_DEC_DEBUG
# Line 1282  Line 1303 
1303    
1304          start_global_timer();          start_global_timer();
1305    
1306            dec->out_frm = (frame->colorspace == XVID_CSP_EXTERN) ? frame->image : NULL;
1307    
1308          BitstreamInit(&bs, frame->bitstream, frame->length);          BitstreamInit(&bs, frame->bitstream, frame->length);
1309    
1310          // add by chenm001 <chenm001@163.com>          // add by chenm001 <chenm001@163.com>

Legend:
Removed from v.1.31  
changed lines
  Added in v.1.33

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