mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
theoraenc: do not automatically override quality when using target bitrate
If both quality and bitrate are set, libtheora will try to meet both constraints, causing it to prefer emitting a smaller number of good frames, to emitting the full number of frames that would not meet the requested quality. This causes a slideshow effect when the bitrate is low and the quality is high. And the default theoraenc is high (48/63). So only set quality when it is requested, and leave it unset otherwise. https://bugzilla.gnome.org/show_bug.cgi?id=658443
This commit is contained in:
parent
07e118ff24
commit
cea0ac790f
1 changed files with 7 additions and 1 deletions
|
@ -508,7 +508,13 @@ theora_enc_reset (GstTheoraEnc * enc)
|
|||
|
||||
GST_OBJECT_LOCK (enc);
|
||||
enc->info.target_bitrate = enc->video_bitrate;
|
||||
enc->info.quality = enc->video_quality;
|
||||
if (enc->quality_changed) {
|
||||
enc->info.quality = enc->video_quality;
|
||||
} else {
|
||||
if (enc->video_bitrate == 0) {
|
||||
enc->info.quality = enc->video_quality;
|
||||
}
|
||||
}
|
||||
enc->bitrate_changed = FALSE;
|
||||
enc->quality_changed = FALSE;
|
||||
GST_OBJECT_UNLOCK (enc);
|
||||
|
|
Loading…
Reference in a new issue