200 |
static char *ARG_PASS2 = 0; |
static char *ARG_PASS2 = 0; |
201 |
//static int ARG_QUALITY = ME_ELEMENTS - 1; |
//static int ARG_QUALITY = ME_ELEMENTS - 1; |
202 |
static int ARG_QUALITY = 6; |
static int ARG_QUALITY = 6; |
203 |
static float ARG_FRAMERATE = 25.00f; |
static float ARG_FRAMERATE = 0.f; |
204 |
static int ARG_DWRATE = 25; |
static int ARG_DWRATE = 25; |
205 |
static int ARG_DWSCALE = 1; |
static int ARG_DWSCALE = 1; |
206 |
static int ARG_MAXFRAMENR = ABS_MAXFRAMENR; |
static int ARG_MAXFRAMENR = ABS_MAXFRAMENR; |
353 |
|
|
354 |
/* Is there a dumb Xvid coder ? */ |
/* Is there a dumb Xvid coder ? */ |
355 |
if(ME_ELEMENTS != VOP_ELEMENTS) { |
if(ME_ELEMENTS != VOP_ELEMENTS) { |
356 |
fprintf(stderr, "Presets' arrays should have the same number of elements -- Please fill a bug to xvid-devel@xvid.org\n"); |
fprintf(stderr, "Presets' arrays should have the same number of elements -- Please file a bug to xvid-devel@xvid.org\n"); |
357 |
return(-1); |
return(-1); |
358 |
} |
} |
359 |
|
|
753 |
i++; |
i++; |
754 |
else |
else |
755 |
ARG_PROGRESS = 10; |
ARG_PROGRESS = 10; |
756 |
} else if (strcmp("-help", argv[i])) { |
} else if (strcmp("-help", argv[i]) == 0) { |
757 |
usage(); |
usage(); |
758 |
return (0); |
return (0); |
759 |
} else { |
} else { |
951 |
} |
} |
952 |
|
|
953 |
if (ARG_FRAMERATE <= 0) { |
if (ARG_FRAMERATE <= 0) { |
954 |
fprintf(stderr, "Wrong Framerate %f\n", ARG_FRAMERATE); |
ARG_FRAMERATE = 25.00f; /* default value */ |
|
return (-1); |
|
955 |
} |
} |
956 |
|
|
957 |
if (ARG_TARGETSIZE) { |
if (ARG_TARGETSIZE) { |
1409 |
myAVIStreamInfo.dwRate = ARG_DWRATE; |
myAVIStreamInfo.dwRate = ARG_DWRATE; |
1410 |
myAVIStreamInfo.dwLength = ARG_MAXFRAMENR; |
myAVIStreamInfo.dwLength = ARG_MAXFRAMENR; |
1411 |
myAVIStreamInfo.dwQuality = 10000; |
myAVIStreamInfo.dwQuality = 10000; |
1412 |
SetRect(&myAVIStreamInfo.rcFrame, 0, 0, YDIM, XDIM); |
SetRect(&myAVIStreamInfo.rcFrame, 0, 0, XDIM, YDIM); |
1413 |
|
|
1414 |
if (avierr=AVIFileOpen(&myAVIFile, ARG_AVIOUTPUTFILE, OF_CREATE|OF_WRITE, NULL)) { |
if (avierr=AVIFileOpen(&myAVIFile, ARG_AVIOUTPUTFILE, OF_CREATE|OF_WRITE, NULL)) { |
1415 |
fprintf(stderr, "AVIFileOpen failed opening output file %s, error code %d\n", ARG_AVIOUTPUTFILE, avierr); |
fprintf(stderr, "AVIFileOpen failed opening output file %s, error code %d\n", ARG_AVIOUTPUTFILE, avierr); |
1838 |
fprintf(stderr, " -bquant_offset integer: bframe quantizer offset (100)\n"); |
fprintf(stderr, " -bquant_offset integer: bframe quantizer offset (100)\n"); |
1839 |
fprintf(stderr, "\n"); |
fprintf(stderr, "\n"); |
1840 |
fprintf(stderr, "Rate control options:\n"); |
fprintf(stderr, "Rate control options:\n"); |
1841 |
fprintf(stderr, " -framerate float : target framerate (25.0)\n"); |
fprintf(stderr, " -framerate float : target framerate (auto)\n"); |
1842 |
fprintf(stderr, " -bitrate [integer] : target bitrate in kbps (700)\n"); |
fprintf(stderr, " -bitrate [integer] : target bitrate in kbps (700)\n"); |
1843 |
fprintf(stderr, " -size integer : target size in kilobytes\n"); |
fprintf(stderr, " -size integer : target size in kilobytes\n"); |
1844 |
fprintf(stderr, " -single : single pass mode (default)\n"); |
fprintf(stderr, " -single : single pass mode (default)\n"); |