GNOME Bugzilla – Bug 485828
[v4l2src] Fixates to lowest resolution on new kernels
Last modified: 2007-10-27 15:18:29 UTC
I've upgraded my computer from Ubuntu 7.04 to 7.10 and when i run cheese i get a very bad image quality from my webcam. This didn't happen with Ubuntu 7.04, the image quality where very good. Other information: Gstreamer 0.10.14 and Cheese 0.2.4
Created attachment 97083 [details] Image taken on Ubuntu 7.10.
Created attachment 97084 [details] Image taken on 7.04.
Same versions of cheese, or different versions of cheese?
Same version of cheese, different version of Gstreamer.
Could you run cheese like this: $ GST_DEBUG=*v4l*:5,GST_PADS:5,capsfilter:5 cheese 2>dbg.log on both systems and attach the gzipped dbg.log.gz files?
Created attachment 97126 [details] Debug log from Ubuntu 7.04.
Created attachment 97127 [details] Debug log from Ubuntu 7.10.
This is a problem with the way the caps are probed and fixated. v4l2src in CVS (and gutsy) seems to use a new API to query the supported sizes on new kernels and falls back to another API on older kernels. This results in the caps looking differently and fixation being done in a different way: with the old API we end up with a range for width/height, so fixation will just fixate to the biggest size, while with the new API we get a different structure in the caps for every supported size, and fixation will just pick the first structure in the caps. Because the probing is done from smallest size to highest size this will result in the smallest resolution supported by the camera - not ideal. This should fix it: 2007-10-13 Tim-Philipp Müller <tim at centricular dot net> * sys/v4l2/gstv4l2src.c: * sys/v4l2/v4l2src_calls.c: When probing the formats and sizes a camera supports, make sure the best ones (highest resolution, prefered format) end up at the beginning of the probed caps and the less desirable ones at the end. This is important because the order within the caps matters for things like fixation and negotiation, ie. what format is chosen in the end. With recent kernels, the current probing code will end up querying the supported sizes from lowest resolution to highest resolution, adding them to the probed caps in that order, resulting to v4l2src fixating to the lowest possible resolution if downstream does not express a size preference. Also make up a somewhat random ranking of prefered output formats for the same reason. Fixes #485828.
*** Bug 490818 has been marked as a duplicate of this bug. ***