165 |
static frame_stats_t framestats[7]; |
static frame_stats_t framestats[7]; |
166 |
|
|
167 |
static int ARG_STATS = 0; |
static int ARG_STATS = 0; |
168 |
|
static int ARG_SSIM = 0; |
169 |
|
static char* ARG_SSIM_PATH = NULL; |
170 |
static int ARG_DUMP = 0; |
static int ARG_DUMP = 0; |
171 |
static int ARG_LUMIMASKING = 0; |
static int ARG_LUMIMASKING = 0; |
172 |
static int ARG_BITRATE = 0; |
static int ARG_BITRATE = 0; |
176 |
static char *ARG_PASS2 = 0; |
static char *ARG_PASS2 = 0; |
177 |
//static int ARG_QUALITY = ME_ELEMENTS - 1; |
//static int ARG_QUALITY = ME_ELEMENTS - 1; |
178 |
static int ARG_QUALITY = 6; |
static int ARG_QUALITY = 6; |
179 |
static float ARG_FRAMERATE = 0.00f; |
static float ARG_FRAMERATE = 25.00f; |
180 |
static int ARG_DWRATE = 25; |
static int ARG_DWRATE = 25; |
181 |
static int ARG_DWSCALE = 1; |
static int ARG_DWSCALE = 1; |
182 |
static int ARG_MAXFRAMENR = ABS_MAXFRAMENR; |
static int ARG_MAXFRAMENR = ABS_MAXFRAMENR; |
580 |
ARG_INPUTFILE = argv[i]; |
ARG_INPUTFILE = argv[i]; |
581 |
} else if (strcmp("-stats", argv[i]) == 0) { |
} else if (strcmp("-stats", argv[i]) == 0) { |
582 |
ARG_STATS = 1; |
ARG_STATS = 1; |
583 |
|
} else if (strcmp("-ssim", argv[i]) == 0) { |
584 |
|
ARG_SSIM = 1; |
585 |
|
} else if (strcmp("-ssim_file", argv[i]) == 0 && i < argc -1) { |
586 |
|
i++; |
587 |
|
ARG_SSIM_PATH = argv[i]; |
588 |
} else if (strcmp("-timecode", argv[i]) == 0 && i < argc -1) { |
} else if (strcmp("-timecode", argv[i]) == 0 && i < argc -1) { |
589 |
i++; |
i++; |
590 |
ARG_TIMECODEFILE = argv[i]; |
ARG_TIMECODEFILE = argv[i]; |
1568 |
fprintf(stderr, " -noclosed_gop : Disable closed GOP mode\n"); |
fprintf(stderr, " -noclosed_gop : Disable closed GOP mode\n"); |
1569 |
fprintf(stderr, " -lumimasking : use lumimasking algorithm\n"); |
fprintf(stderr, " -lumimasking : use lumimasking algorithm\n"); |
1570 |
fprintf(stderr, " -stats : print stats about encoded frames\n"); |
fprintf(stderr, " -stats : print stats about encoded frames\n"); |
1571 |
|
fprintf(stderr, " -ssim : prints the ssim stats for every encoded frame (slow!)\n"); |
1572 |
|
fprintf(stderr, " -ssim_file filename : outputs the ssim stats into a file\n"); |
1573 |
fprintf(stderr, " -debug : activates xvidcore internal debugging output\n"); |
fprintf(stderr, " -debug : activates xvidcore internal debugging output\n"); |
1574 |
fprintf(stderr, " -vop_debug : print some info directly into encoded frames\n"); |
fprintf(stderr, " -vop_debug : print some info directly into encoded frames\n"); |
1575 |
fprintf(stderr, " -nochromame : Disable chroma motion estimation\n"); |
fprintf(stderr, " -nochromame : Disable chroma motion estimation\n"); |
1772 |
xvid_plugin_single_t single; |
xvid_plugin_single_t single; |
1773 |
xvid_plugin_2pass1_t rc2pass1; |
xvid_plugin_2pass1_t rc2pass1; |
1774 |
xvid_plugin_2pass2_t rc2pass2; |
xvid_plugin_2pass2_t rc2pass2; |
1775 |
|
xvid_plugin_ssim_t ssim; |
1776 |
//xvid_plugin_fixed_t rcfixed; |
//xvid_plugin_fixed_t rcfixed; |
1777 |
xvid_enc_plugin_t plugins[7]; |
xvid_enc_plugin_t plugins[8]; |
1778 |
xvid_gbl_init_t xvid_gbl_init; |
xvid_gbl_init_t xvid_gbl_init; |
1779 |
xvid_enc_create_t xvid_enc_create; |
xvid_enc_create_t xvid_enc_create; |
1780 |
int i; |
int i; |
1903 |
xvid_enc_create.num_plugins++; |
xvid_enc_create.num_plugins++; |
1904 |
} |
} |
1905 |
|
|
1906 |
|
if (ARG_SSIM || ARG_SSIM_PATH != NULL) { |
1907 |
|
plugins[xvid_enc_create.num_plugins].func = xvid_plugin_ssim; |
1908 |
|
ssim.b_printstat = ARG_SSIM; |
1909 |
|
ssim.stat_path = ARG_SSIM_PATH; |
1910 |
|
ssim.b_visualize = 0; |
1911 |
|
plugins[xvid_enc_create.num_plugins].param = &ssim; |
1912 |
|
xvid_enc_create.num_plugins++; |
1913 |
|
} |
1914 |
|
|
1915 |
#if 0 |
#if 0 |
1916 |
if (ARG_DEBUG) { |
if (ARG_DEBUG) { |
1917 |
plugins[xvid_enc_create.num_plugins].func = rawenc_debug; |
plugins[xvid_enc_create.num_plugins].func = rawenc_debug; |