[svn] / trunk / xvidcore / src / encoder.c Repository:
ViewVC logotype

Diff of /trunk/xvidcore/src/encoder.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 168, Thu May 9 00:15:51 2002 UTC revision 189, Fri Jun 7 10:36:08 2002 UTC
# Line 36  Line 36 
36   *             MinChen <chenm001@163.com>   *             MinChen <chenm001@163.com>
37   *  14.04.2002 added FrameCodeB()   *  14.04.2002 added FrameCodeB()
38   *   *
39   *  $Id: encoder.c,v 1.36 2002-05-09 00:15:50 chenm001 Exp $   *  $Id: encoder.c,v 1.38 2002-06-07 10:36:08 edgomez Exp $
40   *   *
41   ***************************************************************************/   ***************************************************************************/
42    
# Line 301  Line 301 
301    
302          if (pParam->rc_bitrate)          if (pParam->rc_bitrate)
303          {          {
304                  RateControlInit(pParam->rc_bitrate, pParam->rc_reaction_delay_factor,                  RateControlInit(&pEnc->rate_control,
305                          pParam->rc_averaging_period, pParam->rc_buffer, pParam->fbase * 1000 / pParam->fincr,                                  pParam->rc_bitrate,
306                          pParam->max_quantizer, pParam->min_quantizer);                                  pParam->rc_reaction_delay_factor,
307                                    pParam->rc_averaging_period,
308                                    pParam->rc_buffer,
309                                    pParam->fbase * 1000 / pParam->fincr,
310                                    pParam->max_quantizer,
311                                    pParam->min_quantizer);
312          }          }
313    
314          init_timer();          init_timer();
# Line 439  Line 444 
444    
445          SWAP(pEnc->current, pEnc->reference);          SWAP(pEnc->current, pEnc->reference);
446    
447          pEnc->current->quant = (pFrame->quant == 0) ? RateControlGetQ(0) : pFrame->quant;          pEnc->current->quant = (pFrame->quant == 0) ? RateControlGetQ(&pEnc->rate_control, 0) : pFrame->quant;
448    
449          if(pEnc->current->quant < 1)          if(pEnc->current->quant < 1)
450                  pEnc->current->quant = 1;                  pEnc->current->quant = 1;
# Line 576  Line 581 
581    
582          if (pFrame->quant == 0)          if (pFrame->quant == 0)
583          {          {
584                  RateControlUpdate(pEnc->current->quant, pFrame->length, pFrame->intra);                  RateControlUpdate(&pEnc->rate_control,
585                                      pEnc->current->quant,
586                                      pFrame->length,
587                                      pFrame->intra);
588          }          }
589    
590          pEnc->iFrameNum++;          pEnc->iFrameNum++;
# Line 637  Line 645 
645    
646          if (pFrame->quant == 0)          if (pFrame->quant == 0)
647          {          {
648                  pEnc->current->quant = RateControlGetQ(0);                  pEnc->current->quant = RateControlGetQ(&pEnc->rate_control,0);
649          }          }
650          else          else
651          {          {
# Line 730  Line 738 
738    
739          if (pFrame->quant == 0)          if (pFrame->quant == 0)
740          {          {
741                  RateControlUpdate(pEnc->current->quant, pFrame->length, pFrame->intra);                  RateControlUpdate(&pEnc->rate_control,
742                                      pEnc->current->quant,
743                                      pFrame->length,
744                                      pFrame->intra);
745          }          }
746    
747  #ifdef _DEBUG  #ifdef _DEBUG

Legend:
Removed from v.168  
changed lines
  Added in v.189

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