diff options
author | Alexey Fisher <bug-track@fisher-privat.net> | 2011-05-18 13:18:58 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2011-05-18 13:18:58 +0200 |
commit | a9ea8823078321f275a99efec2be75599d1427fb (patch) | |
tree | adb975c646357a83c6e1d0bbeb9cf3309d84279a /ext/vp8 | |
parent | b04b596c618e89f5e260b112dbce4f0b713d6e7f (diff) |
vp8enc: Fix quality to (constant) quantizer mapping
This now allows to select all possible quantizers between
0 and 63.
See bug #641405.
Diffstat (limited to 'ext/vp8')
-rw-r--r-- | ext/vp8/gstvp8enc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/vp8/gstvp8enc.c b/ext/vp8/gstvp8enc.c index b65029f80..2bf1301ad 100644 --- a/ext/vp8/gstvp8enc.c +++ b/ext/vp8/gstvp8enc.c @@ -242,7 +242,7 @@ gst_vp8_enc_class_init (GstVP8EncClass * klass) g_object_class_install_property (gobject_class, PROP_QUALITY, g_param_spec_double ("quality", "Quality", - "Quality", + "Quality. This parameter set constant quantizer.", 0, 10.0, DEFAULT_QUALITY, (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); @@ -508,8 +508,8 @@ gst_vp8_enc_set_format (GstBaseVideoEncoder * base_video_encoder, if (encoder->bitrate) { cfg.rc_target_bitrate = encoder->bitrate / 1000; } else { - cfg.rc_min_quantizer = 63 - encoder->quality * 5.0; - cfg.rc_max_quantizer = 63 - encoder->quality * 5.0; + cfg.rc_min_quantizer = (gint) (63 - encoder->quality * 6.2); + cfg.rc_max_quantizer = (gint) (63 - encoder->quality * 6.2); cfg.rc_target_bitrate = encoder->bitrate; } |