Commit 50f40fd2 authored by Loren Merritt's avatar Loren Merritt

separate --thread-input from --threads



git-svn-id: svn://svn.videolan.org/x264/trunk@474 df754926-b1dd-0310-bc7b-ec298dee348c
parent 36c25b66
......@@ -47,10 +47,4 @@ extern int (*p_get_frame_total)( hnd_t handle );
extern int (*p_read_frame)( x264_picture_t *p_pic, hnd_t handle, int i_frame );
extern int (*p_close_infile)( hnd_t handle );
extern int (*p_open_outfile)( char *psz_filename, hnd_t *p_handle );
extern int (*p_set_outfile_param)( hnd_t handle, x264_param_t *p_param );
extern int (*p_write_nalu)( hnd_t handle, uint8_t *p_nal, int i_size );
extern int (*p_set_eop)( hnd_t handle, x264_picture_t *p_picture );
extern int (*p_close_outfile)( hnd_t handle );
#endif
......@@ -266,6 +266,7 @@ static void Help( x264_param_t *defaults )
" -o, --output Specify output file\n"
"\n"
" --threads <integer> Parallel encoding (uses slices)\n"
" --thread-input Run Avisynth in its own thread\n"
" --no-asm Disable all CPU optimizations\n"
" --no-psnr Disable PSNR computation\n"
" --quiet Quiet Mode\n"
......@@ -358,7 +359,8 @@ static int Parse( int argc, char **argv,
char *psz_filename = NULL;
x264_param_t defaults = *param;
char *psz;
char b_avis = 0;
int b_avis = 0;
int b_thread_input = 0;
memset( opt, 0, sizeof(cli_opt_t) );
......@@ -442,6 +444,7 @@ static int Parse( int argc, char **argv,
#define OPT_NO_FAST_PSKIP 317
#define OPT_BIME 318
#define OPT_NR 319
#define OPT_THREAD_INPUT 320
static struct option long_options[] =
{
......@@ -498,6 +501,7 @@ static int Parse( int argc, char **argv,
{ "cplxblur",required_argument, NULL, OPT_CPLXBLUR },
{ "zones", required_argument, NULL, OPT_ZONES },
{ "threads", required_argument, NULL, OPT_THREADS },
{ "thread-input", no_argument, NULL, OPT_THREAD_INPUT },
{ "no-psnr", no_argument, NULL, OPT_NOPSNR },
{ "quiet", no_argument, NULL, OPT_QUIET },
{ "verbose", no_argument, NULL, 'v' },
......@@ -784,6 +788,9 @@ static int Parse( int argc, char **argv,
case OPT_THREADS:
param->i_threads = atoi(optarg);
break;
case OPT_THREAD_INPUT:
b_thread_input = 1;
break;
case OPT_NOPSNR:
param->analyse.b_psnr = 0;
break;
......@@ -976,7 +983,7 @@ static int Parse( int argc, char **argv,
}
#ifdef HAVE_PTHREAD
if( param->i_threads > 1 )
if( b_thread_input || param->i_threads > 1 )
{
if( open_file_thread( NULL, &opt->hin, param ) )
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment