[svn] / branches / dev-api-4 / xvidcore / examples / xvid_encraw.c Repository:
ViewVC logotype

Diff of /branches/dev-api-4/xvidcore/examples/xvid_encraw.c

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

revision 938, Sun Mar 23 04:03:01 2003 UTC revision 942, Tue Mar 25 11:01:48 2003 UTC
# Line 19  Line 19 
19   *  along with this program; if not, write to the Free Software   *  along with this program; if not, write to the Free Software
20   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
21   *   *
22   * $Id: xvid_encraw.c,v 1.11.2.11 2003-03-23 04:01:32 suxen_drol Exp $   * $Id: xvid_encraw.c,v 1.11.2.12 2003-03-25 11:01:48 suxen_drol Exp $
23   *   *
24   ****************************************************************************/   ****************************************************************************/
25    
# Line 90  Line 90 
90  static int ARG_LUMIMASKING = 0;  static int ARG_LUMIMASKING = 0;
91  static int ARG_BITRATE = 0;  static int ARG_BITRATE = 0;
92  static char * ARG_PASS1 = 0;  static char * ARG_PASS1 = 0;
93    static char * ARG_PASS2 = 0;
94  static int ARG_QUANTI = 0;  static int ARG_QUANTI = 0;
95  static int ARG_QUALITY = 5;  static int ARG_QUALITY = 5;
96  static float ARG_FRAMERATE = 25.00f;  static float ARG_FRAMERATE = 25.00f;
# Line 210  Line 211 
211                  } else if (strcmp("-pass1", argv[i]) == 0 && i < argc - 1) {                  } else if (strcmp("-pass1", argv[i]) == 0 && i < argc - 1) {
212                          i++;                          i++;
213                          ARG_PASS1 = argv[i];                          ARG_PASS1 = argv[i];
214                    } else if (strcmp("-pass2", argv[i]) == 0 && i < argc - 2) {
215                            i++;
216                            ARG_PASS1 = argv[i];
217                i++;
218                ARG_PASS2 = argv[i];
219                  } else if (strcmp("-max_bframes", argv[i]) == 0 && i < argc - 1) {                  } else if (strcmp("-max_bframes", argv[i]) == 0 && i < argc - 1) {
220                          i++;                          i++;
221                          ARG_MAXBFRAMES = atoi(argv[i]);                          ARG_MAXBFRAMES = atoi(argv[i]);
# Line 566  Line 572 
572          fprintf(stderr, " -bquant_ratio  integer: bframe quantizer ratio (default=150)\n");          fprintf(stderr, " -bquant_ratio  integer: bframe quantizer ratio (default=150)\n");
573          fprintf(stderr, " -bquant_offset integer: bframe quantizer offset (default=100)\n");          fprintf(stderr, " -bquant_offset integer: bframe quantizer offset (default=100)\n");
574          fprintf(stderr, " -framerate     float  : target framerate (>0)\n");          fprintf(stderr, " -framerate     float  : target framerate (>0)\n");
575      fprintf(stderr,     " -pass1         string: fisrt pass stats file\n");      fprintf(stderr,     " -pass1 filename      : stats filename\n");
576        fprintf(stderr,     " -pass2 filename1 filename2    : stats amd scaled-stats filename\n");
577          fprintf(stderr, "\n");          fprintf(stderr, "\n");
578          fprintf(stderr, "Other options\n");          fprintf(stderr, "Other options\n");
579          fprintf(stderr, " -asm            : use assembly optmized code\n");          fprintf(stderr, " -asm            : use assembly optmized code\n");
# Line 711  Line 718 
718          int xerr;          int xerr;
719      xvid_plugin_cbr_t cbr;      xvid_plugin_cbr_t cbr;
720      xvid_plugin_2pass1_t rc2pass1;      xvid_plugin_2pass1_t rc2pass1;
721      xvid_enc_plugin_t plugins[5];      xvid_plugin_2pass2_t rc2pass2;
722        xvid_enc_plugin_t plugins[6];
723          xvid_gbl_init_t xvid_gbl_init;          xvid_gbl_init_t xvid_gbl_init;
724          xvid_enc_create_t xvid_enc_create;          xvid_enc_create_t xvid_enc_create;
725    
# Line 766  Line 774 
774                  xvid_enc_create.num_plugins++;                  xvid_enc_create.num_plugins++;
775      }      }
776    
777      if (ARG_PASS1) {      if (ARG_PASS1 && ARG_PASS2) {
778            rc2pass2.version = XVID_VERSION;
779            memset(&rc2pass2, 0, sizeof(xvid_plugin_2pass2_t));
780            rc2pass2.filename1 = ARG_PASS1;
781            rc2pass2.filename2 = ARG_PASS2;
782    
783            plugins[xvid_enc_create.num_plugins].func = xvid_plugin_2pass2;
784                    plugins[xvid_enc_create.num_plugins].param = &rc2pass2;
785                    xvid_enc_create.num_plugins++;
786        } else if (ARG_PASS1) {
787          rc2pass1.version = XVID_VERSION;          rc2pass1.version = XVID_VERSION;
788          memset(&rc2pass1, 0, sizeof(xvid_plugin_2pass1_t));          memset(&rc2pass1, 0, sizeof(xvid_plugin_2pass1_t));
789          rc2pass1.filename = ARG_PASS1;          rc2pass1.filename = ARG_PASS1;
# Line 776  Line 793 
793                  xvid_enc_create.num_plugins++;                  xvid_enc_create.num_plugins++;
794      }      }
795    
796    
797          if (ARG_LUMIMASKING) {          if (ARG_LUMIMASKING) {
798                  plugins[xvid_enc_create.num_plugins].func = xvid_plugin_lumimasking;                  plugins[xvid_enc_create.num_plugins].func = xvid_plugin_lumimasking;
799                  plugins[xvid_enc_create.num_plugins].param = NULL;                  plugins[xvid_enc_create.num_plugins].param = NULL;

Legend:
Removed from v.938  
changed lines
  Added in v.942

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