projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2ccd243
)
videoscale: use simpler scaling method for small images
author
David Schleef
<ds@schleef.org>
Sat, 23 Apr 2011 19:44:50 +0000
(12:44 -0700)
committer
Tim-Philipp Müller
<tim.muller@collabora.co.uk>
Sun, 24 Apr 2011 11:55:28 +0000
(12:55 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=633837
gst/videoscale/gstvideoscale.c
patch
|
blob
|
history
diff --git
a/gst/videoscale/gstvideoscale.c
b/gst/videoscale/gstvideoscale.c
index
ac2968a
..
b941ed0
100644
(file)
--- a/
gst/videoscale/gstvideoscale.c
+++ b/
gst/videoscale/gstvideoscale.c
@@
-1022,6
+1022,14
@@
gst_video_scale_transform (GstBaseTransform * trans, GstBuffer * in,
add_borders = videoscale->add_borders;
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,
videoscale->from_width, videoscale->from_height, 0, 0,
GST_BUFFER_DATA (in));