GNOME Bugzilla – Bug 747790
videoscale method=bilinear2 and UYVY/YUY2 distortion
Last modified: 2015-04-21 11:33:47 UTC
Videoscale element with new method=bilinear2 is buggy with UYVY/YUY2 (maybe other 4:2:2(?) modes as well?). Sample pipeline as follows: gst-launch-1.0 videotestsrc ! video/x-raw,width=1920,height=1200,format=UYVY ! videoscale method=bilinear2 ! video/x-raw,width=960,height=600 ! videoconvert ! autovideosink On the right hand side there are a few pixel columns with distorted colors - most likely uninitialized memory. I could not easily track down where the problem originates from :/ else I would have tried to fix it myself. I really like the new "bilinear2" moden, it offers a nice performance / quality ratio.
Created attachment 302056 [details] error illustration Additional information. The same happens for method=lanczos as well. Also I _think_ that it also makes no difference if compiled with or without liborc. Maybe that helps to narrow down the code location.
commit 8f82ee70f92d791c54a529bfbea0a6fa5b20b14d Author: Wim Taymans <wtaymans@redhat.com> Date: Tue Apr 21 13:16:29 2015 +0200 video-scaler: scale enough pixels in YUY2 (and friends) mode Fixes https://bugzilla.gnome.org/show_bug.cgi?id=747790
This actually fixes it completely: commit 0588c9a53f187304afb20559634eb82cda7f696a Author: Wim Taymans <wtaymans@redhat.com> Date: Tue Apr 21 13:31:44 2015 +0200 video-scaler: fix YUY2 scaling some more Take into account the different steps between Y and UV when calculating the line size for vertical resampling or else we might not resample enough pixels and leave bad lines. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=747790