mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
video-converter: fix size check
Add some debug, fix size check that decides what scaling to do first and when to do conversion.
This commit is contained in:
parent
23adc12e02
commit
9647a8ca78
1 changed files with 5 additions and 1 deletions
|
@ -1118,11 +1118,15 @@ chain_scale (GstVideoConverter * convert, GstLineCache * prev, gboolean force)
|
|||
s0 = convert->current_width * convert->current_height;
|
||||
s3 = convert->out_width * convert->out_height;
|
||||
|
||||
if (s0 <= s3 || force) {
|
||||
GST_DEBUG ("%d <> %d", s0, s3);
|
||||
|
||||
if (s3 <= s0 || force) {
|
||||
/* we are making the image smaller or are forced to resample */
|
||||
s1 = convert->out_width * convert->current_height;
|
||||
s2 = convert->current_width * convert->out_height;
|
||||
|
||||
GST_DEBUG ("%d <> %d", s1, s2);
|
||||
|
||||
if (s1 <= s2) {
|
||||
/* h scaling first produces less pixels */
|
||||
if (convert->current_width != convert->out_width)
|
||||
|
|
Loading…
Reference in a new issue