[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.1, Sat Feb 22 08:49:44 2003 UTC revision 1.49.2.3, Wed Mar 26 10:29:51 2003 UTC
# Line 1705  Line 1705 
1705  #endif  #endif
1706  }  }
1707    
 /* swap two MACROBLOCK array */  
 void  
 mb_swap(MACROBLOCK ** mb1,  
                 MACROBLOCK ** mb2)  
 {  
         MACROBLOCK *temp = *mb1;  
   
         *mb1 = *mb2;  
         *mb2 = temp;  
 }  
1708    
1709    
1710  /* perform post processing if necessary, and output the image */  /* perform post processing if necessary, and output the image */
# Line 1764  Line 1754 
1754    
1755          if (frame->length < 0)  /* decoder flush */          if (frame->length < 0)  /* decoder flush */
1756          {          {
1757            int ret;
1758                  /* if  not decoding "low_delay/packed", and this isn't low_delay and                  /* if  not decoding "low_delay/packed", and this isn't low_delay and
1759                      we have a reference frame, then outout the reference frame */                      we have a reference frame, then outout the reference frame */
1760                  if (!(dec->low_delay_default && dec->packed_mode) && !dec->low_delay && dec->frames>0)                  if (!(dec->low_delay_default && dec->packed_mode) && !dec->low_delay && dec->frames>0) {
                 {  
1761                          decoder_output(dec, &dec->refn[0], dec->last_mbs, frame, stats, dec->last_coding_type);                          decoder_output(dec, &dec->refn[0], dec->last_mbs, frame, stats, dec->last_coding_type);
1762                dec->frames = 0;
1763                ret = 0;
1764          }else{          }else{
1765              if (stats) stats->type = XVID_TYPE_NOTHING;              if (stats) stats->type = XVID_TYPE_NOTHING;
1766                ret = XVID_ERR_END;
1767          }          }
1768    
1769                  emms();                  emms();
1770                  stop_global_timer();                  stop_global_timer();
1771                  return 0;                  return ret;
1772          }          }
1773    
1774          BitstreamInit(&bs, frame->bitstream, frame->length);          BitstreamInit(&bs, frame->bitstream, frame->length);
# Line 1892  Line 1885 
1885    
1886                  image_swap(&dec->refn[0], &dec->refn[1]);                  image_swap(&dec->refn[0], &dec->refn[1]);
1887                  image_swap(&dec->cur, &dec->refn[0]);                  image_swap(&dec->cur, &dec->refn[0]);
1888                  mb_swap(&dec->mbs, &dec->last_mbs);          SWAP(MACROBLOCK *, dec->mbs, dec->last_mbs);
1889                  dec->last_reduced_resolution = reduced_resolution;                  dec->last_reduced_resolution = reduced_resolution;
1890          dec->last_coding_type = coding_type;          dec->last_coding_type = coding_type;
1891    

Legend:
Removed from v.1.49.2.1  
changed lines
  Added in v.1.49.2.3

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