-#define CONT_TEXT N_("set image contrast")
-#define CONT_LONGTEXT N_("Set the image contrast. Defaults to 1")
-#define HUE_TEXT N_("set image hue")
-#define HUE_LONGTEXT N_("Set the image hue, between 0 and 360. Defaults to 0")
-#define SAT_TEXT N_("set image saturation")
-#define SAT_LONGTEXT N_("Set the image saturation. Defaults to 1")
-#define LUM_TEXT N_("set image brightness")
-#define LUM_LONGTEXT N_("Set the image brightness. Defaults to 1")
-
-
-vlc_module_begin();
- add_category_hint( N_("Adjust"), NULL );
- add_float_with_range( "contrast", 1.0, 0.0, 2.0, NULL, CONT_TEXT, CONT_LONGTEXT );
- add_float_with_range( "brightness", 1.0, 0.0, 2.0, NULL, LUM_TEXT, LUM_LONGTEXT );
- add_integer_with_range( "hue", 0, 0, 360, NULL, HUE_TEXT, HUE_LONGTEXT );
- add_float_with_range( "saturation", 1.0, 0.0, 3.0, NULL, SAT_TEXT, SAT_LONGTEXT );
- set_description( _("contrast/hue/saturation/brightness filter") );
- set_capability( "video filter", 0 );
- add_shortcut( "adjust" );
- set_callbacks( Create, Destroy );
-vlc_module_end();
+#define THRES_TEXT N_("Brightness threshold")
+#define THRES_LONGTEXT N_("When this mode is enabled, pixels will be " \
+ "shown as black or white. The threshold value will be the brightness " \
+ "defined below." )
+#define CONT_TEXT N_("Image contrast (0-2)")
+#define CONT_LONGTEXT N_("Set the image contrast, between 0 and 2. Defaults to 1.")
+#define HUE_TEXT N_("Image hue (0-360)")
+#define HUE_LONGTEXT N_("Set the image hue, between 0 and 360. Defaults to 0.")
+#define SAT_TEXT N_("Image saturation (0-3)")
+#define SAT_LONGTEXT N_("Set the image saturation, between 0 and 3. Defaults to 1.")
+#define LUM_TEXT N_("Image brightness (0-2)")
+#define LUM_LONGTEXT N_("Set the image brightness, between 0 and 2. Defaults to 1.")
+#define GAMMA_TEXT N_("Image gamma (0-10)")
+#define GAMMA_LONGTEXT N_("Set the image gamma, between 0.01 and 10. Defaults to 1.")
+
+vlc_module_begin ()
+ set_description( N_("Image properties filter") )
+ set_shortname( N_("Image adjust" ))
+ set_category( CAT_VIDEO )
+ set_subcategory( SUBCAT_VIDEO_VFILTER )
+ set_capability( "video filter2", 0 )
+
+ add_float_with_range( "contrast", 1.0, 0.0, 2.0,
+ CONT_TEXT, CONT_LONGTEXT, false )
+ add_float_with_range( "brightness", 1.0, 0.0, 2.0,
+ LUM_TEXT, LUM_LONGTEXT, false )
+ add_integer_with_range( "hue", 0, 0, 360,
+ HUE_TEXT, HUE_LONGTEXT, false )
+ add_float_with_range( "saturation", 1.0, 0.0, 3.0,
+ SAT_TEXT, SAT_LONGTEXT, false )
+ add_float_with_range( "gamma", 1.0, 0.01, 10.0,
+ GAMMA_TEXT, GAMMA_LONGTEXT, false )
+
+ add_bool( "brightness-threshold", false,
+ THRES_TEXT, THRES_LONGTEXT, false )
+
+ add_shortcut( "adjust" )
+ set_callbacks( Create, Destroy )
+vlc_module_end ()
+
+static const char *const ppsz_filter_options[] = {
+ "contrast", "brightness", "hue", "saturation", "gamma",
+ "brightness-threshold", NULL
+};