Commit fed37612 authored by Benjamin Otte's avatar Benjamin Otte
Browse files

theora: Disable noise-sensitivity property

It is ignored by libtheora

https://bugzilla.gnome.org/show_bug.cgi?id=594729
parent fad889e3
...@@ -81,7 +81,6 @@ struct _GstTheoraEnc ...@@ -81,7 +81,6 @@ struct _GstTheoraEnc
gboolean keyframe_auto; gboolean keyframe_auto;
gint keyframe_freq; gint keyframe_freq;
gint keyframe_force; gint keyframe_force;
gint noise_sensitivity;
gint sharpness; gint sharpness;
gint info_width, info_height; gint info_width, info_height;
......
...@@ -102,7 +102,6 @@ _ilog (unsigned int v) ...@@ -102,7 +102,6 @@ _ilog (unsigned int v)
#define THEORA_DEF_KEYFRAME_AUTO TRUE #define THEORA_DEF_KEYFRAME_AUTO TRUE
#define THEORA_DEF_KEYFRAME_FREQ 64 #define THEORA_DEF_KEYFRAME_FREQ 64
#define THEORA_DEF_KEYFRAME_FREQ_FORCE 64 #define THEORA_DEF_KEYFRAME_FREQ_FORCE 64
#define THEORA_DEF_NOISE_SENSITIVITY 1
#define THEORA_DEF_SHARPNESS 0 #define THEORA_DEF_SHARPNESS 0
#define THEORA_DEF_SPEEDLEVEL 1 #define THEORA_DEF_SPEEDLEVEL 1
enum enum
...@@ -262,7 +261,7 @@ gst_theora_enc_class_init (GstTheoraEncClass * klass) ...@@ -262,7 +261,7 @@ gst_theora_enc_class_init (GstTheoraEncClass * klass)
(GParamFlags) G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); (GParamFlags) G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, ARG_NOISE_SENSITIVITY, g_object_class_install_property (gobject_class, ARG_NOISE_SENSITIVITY,
g_param_spec_int ("noise-sensitivity", "Noise sensitivity", g_param_spec_int ("noise-sensitivity", "Noise sensitivity",
"Noise sensitivity", 0, 32768, THEORA_DEF_NOISE_SENSITIVITY, "ignored and kept for API compat only", 0, 32768, 1,
(GParamFlags) G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); (GParamFlags) G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, ARG_SHARPNESS, g_object_class_install_property (gobject_class, ARG_SHARPNESS,
g_param_spec_int ("sharpness", "Sharpness", "Sharpness", 0, 2, g_param_spec_int ("sharpness", "Sharpness", "Sharpness", 0, 2,
...@@ -302,7 +301,6 @@ gst_theora_enc_init (GstTheoraEnc * enc, GstTheoraEncClass * g_class) ...@@ -302,7 +301,6 @@ gst_theora_enc_init (GstTheoraEnc * enc, GstTheoraEncClass * g_class)
enc->keyframe_auto = THEORA_DEF_KEYFRAME_AUTO; enc->keyframe_auto = THEORA_DEF_KEYFRAME_AUTO;
enc->keyframe_freq = THEORA_DEF_KEYFRAME_FREQ; enc->keyframe_freq = THEORA_DEF_KEYFRAME_FREQ;
enc->keyframe_force = THEORA_DEF_KEYFRAME_FREQ_FORCE; enc->keyframe_force = THEORA_DEF_KEYFRAME_FREQ_FORCE;
enc->noise_sensitivity = THEORA_DEF_NOISE_SENSITIVITY;
enc->sharpness = THEORA_DEF_SHARPNESS; enc->sharpness = THEORA_DEF_SHARPNESS;
enc->granule_shift = _ilog (enc->info.keyframe_frequency_force - 1); enc->granule_shift = _ilog (enc->info.keyframe_frequency_force - 1);
...@@ -484,7 +482,6 @@ theora_enc_sink_setcaps (GstPad * pad, GstCaps * caps) ...@@ -484,7 +482,6 @@ theora_enc_sink_setcaps (GstPad * pad, GstCaps * caps)
enc->info.keyframe_frequency = enc->keyframe_freq; enc->info.keyframe_frequency = enc->keyframe_freq;
enc->info.keyframe_frequency_force = enc->keyframe_force; enc->info.keyframe_frequency_force = enc->keyframe_force;
enc->info.keyframe_data_target_bitrate = enc->video_bitrate * 1.5; enc->info.keyframe_data_target_bitrate = enc->video_bitrate * 1.5;
enc->info.noise_sensitivity = enc->noise_sensitivity;
enc->info.sharpness = enc->sharpness; enc->info.sharpness = enc->sharpness;
/* as done in theora */ /* as done in theora */
...@@ -1179,6 +1176,7 @@ theora_enc_set_property (GObject * object, guint prop_id, ...@@ -1179,6 +1176,7 @@ theora_enc_set_property (GObject * object, guint prop_id,
case ARG_QUICK: case ARG_QUICK:
case ARG_KEYFRAME_THRESHOLD: case ARG_KEYFRAME_THRESHOLD:
case ARG_KEYFRAME_MINDISTANCE: case ARG_KEYFRAME_MINDISTANCE:
case ARG_NOISE_SENSITIVITY:
/* kept for API compat, but ignored */ /* kept for API compat, but ignored */
break; break;
case ARG_BITRATE: case ARG_BITRATE:
...@@ -1198,9 +1196,6 @@ theora_enc_set_property (GObject * object, guint prop_id, ...@@ -1198,9 +1196,6 @@ theora_enc_set_property (GObject * object, guint prop_id,
case ARG_KEYFRAME_FREQ_FORCE: case ARG_KEYFRAME_FREQ_FORCE:
enc->keyframe_force = g_value_get_int (value); enc->keyframe_force = g_value_get_int (value);
break; break;
case ARG_NOISE_SENSITIVITY:
enc->noise_sensitivity = g_value_get_int (value);
break;
case ARG_SHARPNESS: case ARG_SHARPNESS:
enc->sharpness = g_value_get_int (value); enc->sharpness = g_value_get_int (value);
break; break;
...@@ -1253,7 +1248,7 @@ theora_enc_get_property (GObject * object, guint prop_id, ...@@ -1253,7 +1248,7 @@ theora_enc_get_property (GObject * object, guint prop_id,
g_value_set_int (value, 8); g_value_set_int (value, 8);
break; break;
case ARG_NOISE_SENSITIVITY: case ARG_NOISE_SENSITIVITY:
g_value_set_int (value, enc->noise_sensitivity); g_value_set_int (value, 1);
break; break;
case ARG_SHARPNESS: case ARG_SHARPNESS:
g_value_set_int (value, enc->sharpness); g_value_set_int (value, enc->sharpness);
......
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