Commit 514c92ed authored by Dennis van Amerongen's avatar Dennis van Amerongen

* modules/codec/x264.c: Fix range enforcement and string selection (deprecated...

* modules/codec/x264.c: Fix range enforcement and string selection (deprecated was in the way). Use actual default values for options direct, me and deblock filter params (mainly for the gui).
parent 6c0f1922
...@@ -310,27 +310,26 @@ static void Close( vlc_object_t * ); ...@@ -310,27 +310,26 @@ static void Close( vlc_object_t * );
#if X264_BUILD >= 24 #if X264_BUILD >= 24
static char *enc_me_list[] = static char *enc_me_list[] =
{ "", "dia", "hex", "umh", "esa" }; { "dia", "hex", "umh", "esa" };
static char *enc_me_list_text[] = static char *enc_me_list_text[] =
{ N_("default"), N_("dia"), N_("hex"), N_("umh"), N_("esa") }; { N_("dia"), N_("hex"), N_("umh"), N_("esa") };
#endif #endif
static char *enc_analyse_list[] = static char *enc_analyse_list[] =
{ "", "none", "fast", "normal", "slow", "all" }; { "none", "fast", "normal", "slow", "all" };
static char *enc_analyse_list_text[] = static char *enc_analyse_list_text[] =
{ N_("default"), N_("none"), N_("fast"), N_("normal"), { N_("none"), N_("fast"), N_("normal"), N_("slow"), N_("all") };
N_("slow"), N_("all") };
#if X264_BUILD >= 45 /* r457 */ #if X264_BUILD >= 45 /* r457 */
static char *direct_pred_list[] = static char *direct_pred_list[] =
{ "", "none", "spatial", "temporal", "auto" }; { "none", "spatial", "temporal", "auto" };
static char *direct_pred_list_text[] = static char *direct_pred_list_text[] =
{ N_("default"), N_("none"), N_("spatial"), N_("temporal"), N_("auto") }; { N_("none"), N_("spatial"), N_("temporal"), N_("auto") };
#else #else
static char *direct_pred_list[] = static char *direct_pred_list[] =
{ "", "none", "spatial", "temporal" }; { "none", "spatial", "temporal" };
static char *direct_pred_list_text[] = static char *direct_pred_list_text[] =
{ N_("default"), N_("none"), N_("spatial"), N_("temporal") }; { N_("none"), N_("spatial"), N_("temporal") };
#endif #endif
vlc_module_begin(); vlc_module_begin();
...@@ -374,14 +373,14 @@ vlc_module_begin(); ...@@ -374,14 +373,14 @@ vlc_module_begin();
add_integer( SOUT_CFG_PREFIX "ref", 1, NULL, REF_TEXT, add_integer( SOUT_CFG_PREFIX "ref", 1, NULL, REF_TEXT,
REF_LONGTEXT, VLC_FALSE ); REF_LONGTEXT, VLC_FALSE );
add_deprecated( SOUT_CFG_PREFIX "frameref", VLC_FALSE ); /* Deprecated since 0.8.5 */
change_integer_range( 1, 16 ); change_integer_range( 1, 16 );
add_deprecated( SOUT_CFG_PREFIX "frameref", VLC_FALSE ); /* Deprecated since 0.8.5 */
add_bool( SOUT_CFG_PREFIX "nf", 0, NULL, NF_TEXT, add_bool( SOUT_CFG_PREFIX "nf", 0, NULL, NF_TEXT,
NF_LONGTEXT, VLC_FALSE ); NF_LONGTEXT, VLC_FALSE );
add_deprecated( SOUT_CFG_PREFIX "loopfilter", VLC_FALSE ); /* Deprecated since 0.8.5 */ add_deprecated( SOUT_CFG_PREFIX "loopfilter", VLC_FALSE ); /* Deprecated since 0.8.5 */
add_string( SOUT_CFG_PREFIX "deblock", "", NULL, FILTER_TEXT, add_string( SOUT_CFG_PREFIX "deblock", "0:0", NULL, FILTER_TEXT,
FILTER_LONGTEXT, VLC_FALSE ); FILTER_LONGTEXT, VLC_FALSE );
add_deprecated( SOUT_CFG_PREFIX "filter", VLC_FALSE ); /* Deprecated since 0.8.6 */ add_deprecated( SOUT_CFG_PREFIX "filter", VLC_FALSE ); /* Deprecated since 0.8.6 */
...@@ -407,13 +406,13 @@ vlc_module_begin(); ...@@ -407,13 +406,13 @@ vlc_module_begin();
add_integer( SOUT_CFG_PREFIX "qpmin", 10, NULL, QPMIN_TEXT, add_integer( SOUT_CFG_PREFIX "qpmin", 10, NULL, QPMIN_TEXT,
QPMIN_LONGTEXT, VLC_FALSE ); QPMIN_LONGTEXT, VLC_FALSE );
add_deprecated( SOUT_CFG_PREFIX "qp-min", VLC_FALSE ); /* Deprecated since 0.8.5 */
change_integer_range( 0, 51 ); change_integer_range( 0, 51 );
add_deprecated( SOUT_CFG_PREFIX "qp-min", VLC_FALSE ); /* Deprecated since 0.8.5 */
add_integer( SOUT_CFG_PREFIX "qpmax", 51, NULL, QPMAX_TEXT, add_integer( SOUT_CFG_PREFIX "qpmax", 51, NULL, QPMAX_TEXT,
QPMAX_LONGTEXT, VLC_FALSE ); QPMAX_LONGTEXT, VLC_FALSE );
add_deprecated( SOUT_CFG_PREFIX "qp-max", VLC_FALSE ); /* Deprecated since 0.8.5 */
change_integer_range( 0, 51 ); change_integer_range( 0, 51 );
add_deprecated( SOUT_CFG_PREFIX "qp-max", VLC_FALSE ); /* Deprecated since 0.8.5 */
add_integer( SOUT_CFG_PREFIX "qpstep", 4, NULL, QPSTEP_TEXT, add_integer( SOUT_CFG_PREFIX "qpstep", 4, NULL, QPSTEP_TEXT,
QPSTEP_LONGTEXT, VLC_FALSE ); QPSTEP_LONGTEXT, VLC_FALSE );
...@@ -421,8 +420,8 @@ vlc_module_begin(); ...@@ -421,8 +420,8 @@ vlc_module_begin();
add_float( SOUT_CFG_PREFIX "ratetol", 1.0, NULL, RATETOL_TEXT, add_float( SOUT_CFG_PREFIX "ratetol", 1.0, NULL, RATETOL_TEXT,
RATETOL_LONGTEXT, VLC_FALSE ); RATETOL_LONGTEXT, VLC_FALSE );
add_deprecated( SOUT_CFG_PREFIX "tolerance", VLC_FALSE ); /* Deprecated since 0.8.5 */
change_float_range( 0, 100 ); change_float_range( 0, 100 );
add_deprecated( SOUT_CFG_PREFIX "tolerance", VLC_FALSE ); /* Deprecated since 0.8.5 */
add_integer( SOUT_CFG_PREFIX "vbv-maxrate", 0, NULL, VBV_MAXRATE_TEXT, add_integer( SOUT_CFG_PREFIX "vbv-maxrate", 0, NULL, VBV_MAXRATE_TEXT,
VBV_MAXRATE_LONGTEXT, VLC_FALSE ); VBV_MAXRATE_LONGTEXT, VLC_FALSE );
...@@ -462,8 +461,8 @@ vlc_module_begin(); ...@@ -462,8 +461,8 @@ vlc_module_begin();
/* x264 partitions = none (default). set at least "normal" mode. */ /* x264 partitions = none (default). set at least "normal" mode. */
add_string( SOUT_CFG_PREFIX "partitions", "normal", NULL, ANALYSE_TEXT, add_string( SOUT_CFG_PREFIX "partitions", "normal", NULL, ANALYSE_TEXT,
ANALYSE_LONGTEXT, VLC_FALSE ); ANALYSE_LONGTEXT, VLC_FALSE );
add_deprecated( SOUT_CFG_PREFIX "analyse", VLC_FALSE ); /* Deprecated since 0.8.6 */
change_string_list( enc_analyse_list, enc_analyse_list_text, 0 ); change_string_list( enc_analyse_list, enc_analyse_list_text, 0 );
add_deprecated( SOUT_CFG_PREFIX "analyse", VLC_FALSE ); /* Deprecated since 0.8.6 */
add_string( SOUT_CFG_PREFIX "direct", "spatial", NULL, DIRECT_PRED_TEXT, add_string( SOUT_CFG_PREFIX "direct", "spatial", NULL, DIRECT_PRED_TEXT,
DIRECT_PRED_LONGTEXT, VLC_FALSE ); DIRECT_PRED_LONGTEXT, VLC_FALSE );
...@@ -492,8 +491,8 @@ vlc_module_begin(); ...@@ -492,8 +491,8 @@ vlc_module_begin();
add_integer( SOUT_CFG_PREFIX "subme", 5, NULL, SUBME_TEXT, add_integer( SOUT_CFG_PREFIX "subme", 5, NULL, SUBME_TEXT,
SUBME_LONGTEXT, VLC_FALSE ); SUBME_LONGTEXT, VLC_FALSE );
add_deprecated( SOUT_CFG_PREFIX "subpel", VLC_FALSE ); /* Deprecated since 0.8.5 */
change_integer_range( 1, SUBME_MAX ); change_integer_range( 1, SUBME_MAX );
add_deprecated( SOUT_CFG_PREFIX "subpel", VLC_FALSE ); /* Deprecated since 0.8.5 */
#if X264_BUILD >= 41 /* r368 */ #if X264_BUILD >= 41 /* r368 */
add_bool( SOUT_CFG_PREFIX "b-rdo", 0, NULL, B_RDO_TEXT, add_bool( SOUT_CFG_PREFIX "b-rdo", 0, NULL, B_RDO_TEXT,
......
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