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

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

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

revision 1382, Mon Mar 22 22:36:25 2004 UTC revision 1559, Fri Nov 19 09:41:06 2004 UTC
# Line 21  Line 21 
21   *  along with this program; if not, write to the Free Software   *  along with this program; if not, write to the Free Software
22   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
23   *   *
24   * $Id: xvid_encraw.c,v 1.13 2004-03-22 22:36:23 edgomez Exp $   * $Id: xvid_encraw.c,v 1.16 2004-11-19 09:41:06 chl Exp $
25   *   *
26   ****************************************************************************/   ****************************************************************************/
27    
# Line 152  Line 152 
152  static int ARG_DEBUG = 0;  static int ARG_DEBUG = 0;
153  static int ARG_VOPDEBUG = 0;  static int ARG_VOPDEBUG = 0;
154  static int ARG_GMC = 0;  static int ARG_GMC = 0;
155    static int ARG_INTERLACING = 0;
156  static int ARG_QPEL = 0;  static int ARG_QPEL = 0;
157  static int ARG_CLOSED_GOP = 0;  static int ARG_CLOSED_GOP = 0;
158    
# Line 347  Line 348 
348                          ARG_QPEL = 1;                          ARG_QPEL = 1;
349                  } else if (strcmp("-gmc", argv[i]) == 0) {                  } else if (strcmp("-gmc", argv[i]) == 0) {
350                          ARG_GMC = 1;                          ARG_GMC = 1;
351                    } else if (strcmp("-interlaced", argv[i]) == 0) {
352                            ARG_INTERLACING = 1;
353                  } else if (strcmp("-closed_gop", argv[i]) == 0) {                  } else if (strcmp("-closed_gop", argv[i]) == 0) {
354                          ARG_CLOSED_GOP = 1;                          ARG_CLOSED_GOP = 1;
355                  } else if (strcmp("-help", argv[i])) {                  } else if (strcmp("-help", argv[i])) {
# Line 696  Line 699 
699          fprintf(stderr, " -quality integer: quality ([0..%d])\n", ME_ELEMENTS - 1);          fprintf(stderr, " -quality integer: quality ([0..%d])\n", ME_ELEMENTS - 1);
700          fprintf(stderr, " -qpel           : use quarter pixel ME\n");          fprintf(stderr, " -qpel           : use quarter pixel ME\n");
701          fprintf(stderr, " -gmc            : use global motion compensation\n");          fprintf(stderr, " -gmc            : use global motion compensation\n");
702            fprintf(stderr, " -interlaced     : use interlaced encoding (this is NOT a deinterlacer!)\n");
703          fprintf(stderr, " -packed         : packed mode\n");          fprintf(stderr, " -packed         : packed mode\n");
704          fprintf(stderr, " -closed_gop     : closed GOP mode\n");          fprintf(stderr, " -closed_gop     : closed GOP mode\n");
705          fprintf(stderr, " -lumimasking    : use lumimasking algorithm\n");          fprintf(stderr, " -lumimasking    : use lumimasking algorithm\n");
# Line 729  Line 733 
733                  return (1);                  return (1);
734    
735          fscanf(handle, "%d %d %d", &xsize, &ysize, &depth);          fscanf(handle, "%d %d %d", &xsize, &ysize, &depth);
736          if ((xsize > 1440) || (ysize > 2880) || (depth != 255)) {          if ((xsize > 4096) || (ysize > 4096*3/2) || (depth != 255)) {
737                  fprintf(stderr, "%d %d %d\n", xsize, ysize, depth);                  fprintf(stderr, "%d %d %d\n", xsize, ysize, depth);
738                  return (2);                  return (2);
739          }          }
# Line 950  Line 954 
954                  rc2pass2.filename = ARG_PASS2;                  rc2pass2.filename = ARG_PASS2;
955                  rc2pass2.bitrate = ARG_BITRATE;                  rc2pass2.bitrate = ARG_BITRATE;
956    
957    /*              An example of activating VBV could look like this
958                    rc2pass2.vbv_size     =  3145728;
959                    rc2pass2.vbv_initial  =  2359296;
960                    rc2pass2.vbv_maxrate  =  4000000;
961                    rc2pass2.vbv_peakrate = 10000000;
962    */
963    
964                  plugins[xvid_enc_create.num_plugins].func = xvid_plugin_2pass2;                  plugins[xvid_enc_create.num_plugins].func = xvid_plugin_2pass2;
965                  plugins[xvid_enc_create.num_plugins].param = &rc2pass2;                  plugins[xvid_enc_create.num_plugins].param = &rc2pass2;
966                  xvid_enc_create.num_plugins++;                  xvid_enc_create.num_plugins++;
# Line 1091  Line 1102 
1102                  xvid_enc_frame.vol_flags |= XVID_VOL_QUARTERPEL;                  xvid_enc_frame.vol_flags |= XVID_VOL_QUARTERPEL;
1103          if (ARG_GMC)          if (ARG_GMC)
1104                  xvid_enc_frame.vol_flags |= XVID_VOL_GMC;                  xvid_enc_frame.vol_flags |= XVID_VOL_GMC;
1105            if (ARG_INTERLACING)
1106                    xvid_enc_frame.vol_flags |= XVID_VOL_INTERLACING;
1107    
1108          /* Set up core's general features */          /* Set up core's general features */
1109          xvid_enc_frame.vop_flags = vop_presets[ARG_QUALITY];          xvid_enc_frame.vop_flags = vop_presets[ARG_QUALITY];

Legend:
Removed from v.1382  
changed lines
  Added in v.1559

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