- "(lower = quicker and higher = better quality)." )
-
-static char *enc_analyse_list[] =
- { "", "all", "normal", "fast", "none" };
-static char *enc_analyse_list_text[] =
- { N_("default"), N_("all"), N_("normal"), N_("fast"), N_("none") };
-
-vlc_module_begin();
- set_description( _("h264 video encoder using x264 library"));
- set_capability( "encoder", 200 );
- set_callbacks( Open, Close );
- set_category( CAT_INPUT );
- set_subcategory( SUBCAT_INPUT_VCODEC );
-
- add_integer( SOUT_CFG_PREFIX "qp", 0, NULL, QP_TEXT, QP_LONGTEXT,
- VLC_FALSE );
- change_integer_range( 0, 51 );
- add_integer( SOUT_CFG_PREFIX "qp-min", 10, NULL, QPMIN_TEXT,
- QPMIN_LONGTEXT, VLC_FALSE );
- change_integer_range( 0, 51 );
- add_integer( SOUT_CFG_PREFIX "qp-max", 51, NULL, QPMAX_TEXT,
- QPMAX_LONGTEXT, VLC_FALSE );
- change_integer_range( 0, 51 );
-
- add_bool( SOUT_CFG_PREFIX "cabac", 1, NULL, CABAC_TEXT, CABAC_LONGTEXT,
- VLC_FALSE );
-
- add_bool( SOUT_CFG_PREFIX "loopfilter", 1, NULL, LOOPF_TEXT,
- LOOPF_LONGTEXT, VLC_FALSE );
-
- add_string( SOUT_CFG_PREFIX "analyse", "", NULL, ANALYSE_TEXT,
- ANALYSE_LONGTEXT, VLC_FALSE );
- change_string_list( enc_analyse_list, enc_analyse_list_text, 0 );
+ "(lower = quicker and higher = better quality). Range 1 to 9." )
+
+#define B_RDO_TEXT N_("RD based mode decision for B-frames")
+#define B_RDO_LONGTEXT N_( "RD based mode decision for B-frames. This " \
+ "requires subme 6 (or higher).")
+
+#define MIXED_REFS_TEXT N_("Decide references on a per partition basis")
+#define MIXED_REFS_LONGTEXT N_( "Allows each 8x8 or 16x8 partition to " \
+ "independently select a reference frame, as opposed to only one ref " \
+ "per macroblock." )
+
+#define CHROMA_ME_TEXT N_("Chroma in motion estimation")
+#define CHROMA_ME_LONGTEXT N_( "Chroma ME for subpel and mode decision in " \
+ "P-frames.")
+
+#define BIME_TEXT N_("Jointly optimize both MVs in B-frames")
+#define BIME_LONGTEXT N_( "Joint bidirectional motion refinement.")
+
+#define TRANSFORM_8X8DCT_TEXT N_("Adaptive spatial transform size")
+#define TRANSFORM_8X8DCT_LONGTEXT N_( \
+ "SATD-based decision for 8x8 transform in inter-MBs.")
+
+#define TRELLIS_TEXT N_("Trellis RD quantization" )
+#define TRELLIS_LONGTEXT N_( "Trellis RD quantization: \n" \
+ " - 0: disabled\n" \
+ " - 1: enabled only on the final encode of a MB\n" \
+ " - 2: enabled on all mode decisions\n" \
+ "This requires CABAC." )
+
+#define FAST_PSKIP_TEXT N_("Early SKIP detection on P-frames")
+#define FAST_PSKIP_LONGTEXT N_( "Early SKIP detection on P-frames.")
+
+#define DCT_DECIMATE_TEXT N_("Coefficient thresholding on P-frames")
+#define DCT_DECIMATE_LONGTEXT N_( "Coefficient thresholding on P-frames." \
+ "Eliminate dct blocks containing only a small single coefficient.")
+
+/* Noise reduction 1 is too weak to measure, suggest at least 10 */
+#define NR_TEXT N_("Noise reduction")
+#define NR_LONGTEXT N_( "Dct-domain noise reduction. Adaptive pseudo-deadzone. " \
+ "10 to 1000 seems to be a useful range." )
+
+#define DEADZONE_INTER_TEXT N_("Inter luma quantization deadzone")
+#define DEADZONE_INTER_LONGTEXT N_( "Set the size of the inter luma quantization deadzone. " \
+ "Range 0 to 32." )
+
+#define DEADZONE_INTRA_TEXT N_("Intra luma quantization deadzone")
+#define DEADZONE_INTRA_LONGTEXT N_( "Set the size of the intra luma quantization deadzone. " \
+ "Range 0 to 32." )
+
+/* Input/Output */
+
+#define NON_DETERMINISTIC_TEXT N_("Non-deterministic optimizations when threaded")
+#define NON_DETERMINISTIC_LONGTEXT N_( "Slightly improve quality of SMP, " \
+ "at the cost of repeatability.")
+
+#define ASM_TEXT N_("CPU optimizations")
+#define ASM_LONGTEXT N_( "Use assembler CPU optimizations.")
+
+#define STATS_TEXT N_("Filename for 2 pass stats file")
+#define STATS_LONGTEXT N_( "Filename for 2 pass stats file for multi-pass encoding.")
+
+#define PSNR_TEXT N_("PSNR computation")
+#define PSNR_LONGTEXT N_( "Compute and print PSNR stats. This has no effect on " \
+ "the actual encoding quality." )
+
+#define SSIM_TEXT N_("SSIM computation")
+#define SSIM_LONGTEXT N_( "Compute and print SSIM stats. This has no effect on " \
+ "the actual encoding quality." )
+
+#define QUIET_TEXT N_("Quiet mode")
+#define QUIET_LONGTEXT N_( "Quiet mode.")
+
+#define VERBOSE_TEXT N_("Statistics")
+#define VERBOSE_LONGTEXT N_( "Print stats for each frame.")
+
+#define SPS_ID_TEXT N_("SPS and PPS id numbers")
+#define SPS_ID_LONGTEXT N_( "Set SPS and PPS id numbers to allow concatenating " \
+ "streams with different settings.")
+
+#define AUD_TEXT N_("Access unit delimiters")
+#define AUD_LONGTEXT N_( "Generate access unit delimiter NAL units.")
+
+static const char *const enc_me_list[] =
+ { "dia", "hex", "umh", "esa", "tesa" };
+static const char *const enc_me_list_text[] =
+ { N_("dia"), N_("hex"), N_("umh"), N_("esa"), N_("tesa") };
+
+static const char *const profile_list[] =
+ { "baseline", "main", "high" };
+
+#if X264_BUILD >= 78
+static const char *const bpyramid_list[] =
+ { "none", "strict", "normal" };
+#endif
+
+static const char *const enc_analyse_list[] =
+ { "none", "fast", "normal", "slow", "all" };
+static const char *const enc_analyse_list_text[] =
+ { N_("none"), N_("fast"), N_("normal"), N_("slow"), N_("all") };
+
+static const char *const direct_pred_list[] =
+ { "none", "spatial", "temporal", "auto" };
+static const char *const direct_pred_list_text[] =
+ { N_("none"), N_("spatial"), N_("temporal"), N_("auto") };
+
+vlc_module_begin ()
+ set_description( N_("H.264/MPEG4 AVC encoder (x264)"))
+ set_capability( "encoder", 200 )
+ set_callbacks( Open, Close )
+ set_category( CAT_INPUT )
+ set_subcategory( SUBCAT_INPUT_VCODEC )
+
+/* Frame-type options */
+
+ add_integer( SOUT_CFG_PREFIX "keyint", 250, NULL, KEYINT_TEXT,
+ KEYINT_LONGTEXT, false )
+
+ add_integer( SOUT_CFG_PREFIX "min-keyint", 25, NULL, MIN_KEYINT_TEXT,
+ MIN_KEYINT_LONGTEXT, false )
+ add_deprecated_alias( SOUT_CFG_PREFIX "keyint-min" ) /* Deprecated since 0.8.5 */
+
+ add_integer( SOUT_CFG_PREFIX "scenecut", 40, NULL, SCENE_TEXT,
+ SCENE_LONGTEXT, false )
+ change_integer_range( -1, 100 )
+
+ add_obsolete_bool( SOUT_CFG_PREFIX "pre-scenecut" )
+
+ add_integer( SOUT_CFG_PREFIX "bframes", 3, NULL, BFRAMES_TEXT,
+ BFRAMES_LONGTEXT, false )
+ change_integer_range( 0, 16 )
+
+ add_integer( SOUT_CFG_PREFIX "b-adapt", 1, NULL, B_ADAPT_TEXT,
+ B_ADAPT_LONGTEXT, false )
+ change_integer_range( 0, 2 )
+
+ add_integer( SOUT_CFG_PREFIX "b-bias", 0, NULL, B_BIAS_TEXT,
+ B_BIAS_LONGTEXT, false )
+ change_integer_range( -100, 100 )
+
+#if X264_BUILD >= 78
+ add_string( SOUT_CFG_PREFIX "bpyramid", "none", NULL, BPYRAMID_TEXT,
+ BPYRAMID_LONGTEXT, false )
+ change_string_list( bpyramid_list, bpyramid_list, 0 );
+#else
+ add_bool( SOUT_CFG_PREFIX "bpyramid", false, NULL, BPYRAMID_TEXT,
+ BPYRAMID_LONGTEXT, false )
+#endif
+
+ add_bool( SOUT_CFG_PREFIX "cabac", true, NULL, CABAC_TEXT, CABAC_LONGTEXT,
+ false )
+
+ add_integer( SOUT_CFG_PREFIX "ref", 3, NULL, REF_TEXT,
+ REF_LONGTEXT, false )
+ change_integer_range( 1, 16 )
+ add_deprecated_alias( SOUT_CFG_PREFIX "frameref" ) /* Deprecated since 0.8.5 */
+
+ add_bool( SOUT_CFG_PREFIX "nf", false, NULL, NF_TEXT,
+ NF_LONGTEXT, false )
+ add_deprecated_alias( SOUT_CFG_PREFIX "loopfilter" ) /* Deprecated since 0.8.5 */
+
+ add_string( SOUT_CFG_PREFIX "deblock", "0:0", NULL, FILTER_TEXT,
+ FILTER_LONGTEXT, false )
+ add_deprecated_alias( SOUT_CFG_PREFIX "filter" ) /* Deprecated since 0.8.6 */
+
+ add_string( SOUT_CFG_PREFIX "psy-rd", "1.0:0.0", NULL, PSY_RD_TEXT,
+ PSY_RD_LONGTEXT, false )
+
+ add_string( SOUT_CFG_PREFIX "level", "5.1", NULL, LEVEL_TEXT,
+ LEVEL_LONGTEXT, false )