mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
videoscale: use simpler scaling method for small images
https://bugzilla.gnome.org/show_bug.cgi?id=633837
This commit is contained in:
parent
2ccd243d55
commit
8264d59aab
1 changed files with 8 additions and 0 deletions
|
@ -1022,6 +1022,14 @@ gst_video_scale_transform (GstBaseTransform * trans, GstBuffer * in,
|
||||||
add_borders = videoscale->add_borders;
|
add_borders = videoscale->add_borders;
|
||||||
GST_OBJECT_UNLOCK (videoscale);
|
GST_OBJECT_UNLOCK (videoscale);
|
||||||
|
|
||||||
|
if (videoscale->from_width == 1) {
|
||||||
|
method = GST_VIDEO_SCALE_NEAREST;
|
||||||
|
}
|
||||||
|
if (method == GST_VIDEO_SCALE_4TAP &&
|
||||||
|
(videoscale->from_width < 4 || videoscale->from_height < 4)) {
|
||||||
|
method = GST_VIDEO_SCALE_BILINEAR;
|
||||||
|
}
|
||||||
|
|
||||||
gst_video_scale_setup_vs_image (&src, videoscale->format, 0,
|
gst_video_scale_setup_vs_image (&src, videoscale->format, 0,
|
||||||
videoscale->from_width, videoscale->from_height, 0, 0,
|
videoscale->from_width, videoscale->from_height, 0, 0,
|
||||||
GST_BUFFER_DATA (in));
|
GST_BUFFER_DATA (in));
|
||||||
|
|
Loading…
Reference in a new issue