/*****************************************************************************
- * x264: h264 encoder/decoder testing program.
+ * x264: h264 encoder testing program.
*****************************************************************************
* Copyright (C) 2003 Laurent Aimar
* $Id: x264.c,v 1.1 2004/06/03 19:24:12 fenrir Exp $
{
x264_param_t param;
cli_opt_t opt;
+ int ret;
+
+#ifdef PTW32_STATIC_LIB
+ pthread_win32_process_attach_np();
+ pthread_win32_thread_attach_np();
+#endif
#ifdef _MSC_VER
_setmode(_fileno(stdin), _O_BINARY);
/* Control-C handler */
signal( SIGINT, SigIntHandler );
- return Encode( ¶m, &opt );
+ ret = Encode( ¶m, &opt );
+
+#ifdef PTW32_STATIC_LIB
+ pthread_win32_thread_detach_np();
+ pthread_win32_process_detach_np();
+#endif
+
+ return ret;
}
static char const *strtable_lookup( const char * const table[], int index )
H0( " -I, --keyint <integer> Maximum GOP size [%d]\n", defaults->i_keyint_max );
H1( " -i, --min-keyint <integer> Minimum GOP size [%d]\n", defaults->i_keyint_min );
H1( " --scenecut <integer> How aggressively to insert extra I-frames [%d]\n", defaults->i_scenecut_threshold );
+ H1( " --pre-scenecut Faster, less precise scenecut detection.\n"
+ " Required and implied by multi-threading.\n" );
H0( " -b, --bframes <integer> Number of B-frames between I and P [%d]\n", defaults->i_bframe );
H1( " --no-b-adapt Disable adaptive B-frame decision\n" );
H1( " --b-bias <integer> Influences how often B-frames are used [%d]\n", defaults->i_bframe_bias );
H0( "\n" );
H0( " -q, --qp <integer> Set QP (0=lossless) [%d]\n", defaults->rc.i_qp_constant );
H0( " -B, --bitrate <integer> Set bitrate (kbit/s)\n" );
- H0( " --crf <integer> Quality-based VBR (nominal QP)\n" );
+ H0( " --crf <float> Quality-based VBR (nominal QP)\n" );
H1( " --vbv-maxrate <integer> Max local bitrate (kbit/s) [%d]\n", defaults->rc.i_vbv_max_bitrate );
H0( " --vbv-bufsize <integer> Enable CBR and set size of the VBV buffer (kbit) [%d]\n", defaults->rc.i_vbv_buffer_size );
H1( " --vbv-init <float> Initial VBV buffer occupancy [%.1f]\n", defaults->rc.f_vbv_buffer_init );
" - esa: exhaustive search (slow)\n" );
else H0( " - dia, hex, umh\n" );
H0( " --merange <integer> Maximum motion vector search range [%d]\n", defaults->analyse.i_me_range );
+ H1( " --mvrange <integer> Maximum motion vector length [-1 (auto)]\n" );
+ H1( " --mvrange-thread <int> Minimum buffer between threads [-1 (auto)]\n" );
H0( " -m, --subme <integer> Subpixel motion estimation and partition\n"
" decision quality: 1=fast, 7=best. [%d]\n", defaults->analyse.i_subpel_refine );
H0( " --b-rdo RD based mode decision for B-frames. Requires subme 6.\n" );
H0( " --quiet Quiet Mode\n" );
H0( " --no-psnr Disable PSNR computation\n" );
H0( " --no-ssim Disable SSIM computation\n" );
- H0( " --threads <integer> Parallel encoding (uses slices)\n" );
+ H0( " --threads <integer> Parallel encoding\n" );
H0( " --thread-input Run Avisynth in its own thread\n" );
+ H1( " --non-deterministic Slightly improve quality of SMP, at the cost of repeatability\n" );
H1( " --no-asm Disable all CPU optimizations\n" );
H1( " --visualize Show MB types overlayed on the encoded video\n" );
H1( " --sps-id <integer> Set SPS and PPS id numbers [%d]\n", defaults->i_sps_id );
{ "min-keyint",required_argument,NULL,'i' },
{ "keyint", required_argument, NULL, 'I' },
{ "scenecut",required_argument, NULL, 0 },
+ { "pre-scenecut", no_argument, NULL, 0 },
{ "nf", no_argument, NULL, 0 },
- { "nodeblock", no_argument, NULL, 0 },
+ { "no-deblock", no_argument, NULL, 0 },
{ "filter", required_argument, NULL, 0 },
{ "deblock", required_argument, NULL, 'f' },
{ "interlaced", no_argument, NULL, 0 },
{ "weightb", no_argument, NULL, 'w' },
{ "me", required_argument, NULL, 0 },
{ "merange", required_argument, NULL, 0 },
+ { "mvrange", required_argument, NULL, 0 },
+ { "mvrange-thread", required_argument, NULL, 0 },
{ "subme", required_argument, NULL, 'm' },
{ "b-rdo", no_argument, NULL, 0 },
{ "mixed-refs", no_argument, NULL, 0 },
{ "qpfile", required_argument, NULL, OPT_QPFILE },
{ "threads", required_argument, NULL, 0 },
{ "thread-input", no_argument, NULL, OPT_THREAD_INPUT },
+ { "non-deterministic", no_argument, NULL, 0 },
{ "no-psnr", no_argument, NULL, 0 },
{ "no-ssim", no_argument, NULL, 0 },
{ "quiet", no_argument, NULL, OPT_QUIET },