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

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

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

revision 274, Tue Jul 9 01:48:49 2002 UTC revision 275, Tue Jul 9 02:43:52 2002 UTC
# Line 9  Line 9 
9  *                       the BFRAME option must be match to core compile option  *                       the BFRAME option must be match to core compile option
10  *******************************************************************************/  *******************************************************************************/
11    
12  #define BFRAMES  //#define BFRAMES
13  #include "ex1.h"  #include "ex1.h"
14    
15  int Encode(char *, int, int, char *);  int Encode(char *, int, int, char *);
# Line 104  Line 104 
104          }          }
105    
106          // get Xvid core status          // get Xvid core status
107            init_param.cpu_flags = 0;
108          xvid_init(0, 0, &init_param, NULL);          xvid_init(0, 0, &init_param, NULL);
109          // Check API Version is 2.1?          // Check API Version is 2.1?
110          if (init_param.api_version != ((2<<16)|(1)))          if (init_param.api_version != ((2<<16)|(1)))
# Line 120  Line 121 
121          // Encode Frame          // Encode Frame
122          temp=fread(inBuf, 1, width*height*3/2, fpi);    // Read YUV data          temp=fread(inBuf, 1, width*height*3/2, fpi);    // Read YUV data
123          while(temp == width*height*3/2){          while(temp == width*height*3/2){
124                  //printf("Frames=%d\n",num);                  printf("Frames=%d\n",num);
125                  set_enc_frame(&frame);                  set_enc_frame(&frame);
126                  if (!(num%param.max_key_interval))                  if (!(num%param.max_key_interval))
127                          frame.intra = 1;        // Encode as I-frame                          frame.intra = 1;        // Encode as I-frame

Legend:
Removed from v.274  
changed lines
  Added in v.275

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