ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvs/xvidcore/src/encoder.c
(Generate patch)

Comparing xvidcore/src/encoder.c (file contents):
Revision 1.24 by suxen_drol, Sat Apr 13 16:30:01 2002 UTC vs.
Revision 1.25 by h, Mon Apr 15 08:03:50 2002 UTC

# Line 80 | Line 80 | int encoder_create(XVID_ENC_PARAM * pPar
80                  pParam->fincr = (int)(pParam->fincr / div);
81          }
82  
83 <        if (pParam->bitrate <= 0)
84 <                pParam->bitrate = 900000;
83 >        if (pParam->rc_bitrate <= 0)
84 >                pParam->rc_bitrate = 900000;
85  
86 <        if (pParam->rc_buffersize <= 0)
87 <                pParam->rc_buffersize = 16;
86 >        if (pParam->rc_reaction_delay_factor <= 0)
87 >                pParam->rc_reaction_delay_factor = 16;
88 >
89 >        if (pParam->rc_averaging_period <= 0)
90 >                pParam->rc_averaging_period = 100;
91 >
92 >        if (pParam->rc_buffer <= 0)
93 >                pParam->rc_buffer = 100;
94  
95          if ((pParam->min_quantizer <= 0) || (pParam->min_quantizer > 31))
96                  pParam->min_quantizer = 1;
# Line 118 | Line 124 | int encoder_create(XVID_ENC_PARAM * pPar
124  
125          pEnc->mbParam.quant = 4;
126  
127 <        pEnc->bitrate = pParam->bitrate;
127 >        pEnc->bitrate = pParam->rc_bitrate;
128  
129          pEnc->iFrameNum = 0;
130          pEnc->iMaxKeyInterval = pParam->max_key_interval;
# Line 172 | Line 178 | int encoder_create(XVID_ENC_PARAM * pPar
178  
179          pParam->handle = (void *)pEnc;
180  
181 <        if (pParam->bitrate)
181 >        if (pParam->rc_bitrate)
182          {
183 <                RateControlInit(pParam->bitrate, pParam->rc_buffersize, pParam->fbase * 1000 / pParam->fincr,
184 <                                pParam->max_quantizer, pParam->min_quantizer);
183 >                RateControlInit(pParam->rc_bitrate, pParam->rc_reaction_delay_factor,
184 >                        pParam->rc_averaging_period, pParam->rc_buffer, pParam->fbase * 1000 / pParam->fincr,
185 >                        pParam->max_quantizer, pParam->min_quantizer);
186          }
187  
188          init_timer();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines