[svn] / trunk / xvidcore / examples / xvid_enc_dec.c Repository:
ViewVC logotype

Diff of /trunk/xvidcore/examples/xvid_enc_dec.c

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

revision 3, Fri Mar 8 02:46:11 2002 UTC revision 50, Thu Mar 21 23:45:25 2002 UTC
# Line 47  Line 47 
47  #define ARG_FRAMERATE 25  #define ARG_FRAMERATE 25
48  #define ARG_BITRATE 900  #define ARG_BITRATE 900
49    
 int QUALITY =5;  
   
50  int XDIM=0;  int XDIM=0;
51  int YDIM=0;     // will be set when reading first image  int YDIM=0;     // will be set when reading first image
52  int filenr = 0;  int filenr = 0;
# Line 135  Line 133 
133                  xparam.fbase = (int)(FRAMERATE_INCR * ARG_FRAMERATE);                  xparam.fbase = (int)(FRAMERATE_INCR * ARG_FRAMERATE);
134          }          }
135          xparam.bitrate = ARG_BITRATE*1000;          xparam.bitrate = ARG_BITRATE*1000;
136          xparam.rc_period = 2000;          xparam.rc_buffersize = 2048000; // amount of data you have to buffer for continous
137          xparam.rc_reaction_period = 10;                                                                      // playback in a streaming app (in bytes)
138          xparam.rc_reaction_ratio = 20;          xparam.min_quantizer = 2;
         xparam.min_quantizer = 1;  
139          xparam.max_quantizer = 31;          xparam.max_quantizer = 31;
140          xparam.max_key_interval = (int)ARG_FRAMERATE*10;          xparam.max_key_interval = (int)ARG_FRAMERATE*10;
         xparam.motion_search = QUALITY;  
         xparam.lum_masking = 0; // Luminance Masking is still under development  
         xparam.quant_type = 0;  // 0=h.263, 1=mpeg4  
141    
142          xerr = xvid_encore(NULL, XVID_ENC_CREATE, &xparam, NULL);          xerr = xvid_encore(NULL, XVID_ENC_CREATE, &xparam, NULL);
143          enchandle=xparam.handle;          enchandle=xparam.handle;
# Line 164  Line 158 
158          XVID_ENC_FRAME xframe;          XVID_ENC_FRAME xframe;
159          XVID_ENC_STATS xstats;          XVID_ENC_STATS xstats;
160    
161            // general features
162            xframe.general = XVID_H263QUANT; // we use h.263 quantisation
163    //      xframe.general = XVID_MPEGQUANT; // MPEG quantization
164    
165            xframe.general |= XVID_HALFPEL; // halfpel precision
166            xframe.general |= XVID_INTER4V; // four motion vector mode
167    
168            // motion estimation (pmvfast) settings
169            xframe.motion = PMV_HALFPELREFINE16 | PMV_EARLYSTOP16 |
170                                            PMV_HALFPELDIAMOND8 | PMV_EARLYSTOP8;
171    
172          xframe.bitstream = bitstream;          xframe.bitstream = bitstream;
173          xframe.length = -1;     // this is written by the routine          xframe.length = -1;     // this is written by the routine
174    

Legend:
Removed from v.3  
changed lines
  Added in v.50

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