GNOME Bugzilla – Bug 724814
glcolorscale: Wrong color conversion when download frame
Last modified: 2014-03-24 13:55:43 UTC
Video file sample : http://www.auby.no/files/video_tests/h264_1080p_hp_4.1_10mbps_dts_unstyled_subs_monsters.mkv Command : gst-launch-1.0 filesrc location=path ! matroskademux ! h264parse ! vaapidecode ! glcolorscale ! video/x-raw, format=RGB, width=500, height=500 ! xvimagesink Working command : gst-launch-1.0 filesrc location=path ! matroskademux ! h264parse ! vaapidecode ! glcolorscale ! video/x-raw, format=I420, width=500, height=500 ! xvimagesink Observations : With the wrong color conversion, you should a "red image", and with the correct command, a frame with correct colors. The different (with my quick look) is that in gstgldownload.c line 532, any color conversion is done, and there is certainly something to do. Environment : Gstreamer : 1.2.3 gst-plugin-gl : 0.11.0.1 vainfo: Driver version: Intel i965 driver - 1.2.2.pre2
Correction : gst-launch-1.0 filesrc location=path ! matroskademux ! h264parse ! vaapidecode ! glcolorscale ! video/x-raw, format=RGB, width=500, height=500 ! videoconvert ! xvimagesink
I couldn't reproduce this with my couple of test files. My hardware could not handle harware accelerating this file. gstgldownload converts from RGBA -> format and thus no conversion (via shader) is needed for the RGB formats in Desktop GL. Does substituting everything before and including vaapidecode with gltestsrc/videotestsrc exhibit the same behaviour?
Using avdec_h264 instaed of vaapidecode element have the same wrong output (on my platform). Command : gst-launch-1.0 filesrc location=/home/memphis/samples/Monster.mkv ! matroskademux ! h264parse ! avdec_h264 ! glcolorscale ! video/x-raw, format=RGB ! videoconvert ! xvimagesink I failed to reproduce this case with a test src (gltestsrc or videotestsrc)
Ah, that's because we unconditionally use the bt601 color matrices for both upload and download where this file (and HDTV) uses the bt709 matrices. See https://bugzilla.gnome.org/show_bug.cgi?id=703347
Should be fixed now commit 48ef9402bf18ddae5e5e8c650e407957bf059187 Author: Matthew Waters <ystreet00@gmail.com> Date: Tue Mar 25 00:50:30 2014 +1100 gl/download: add support for the bt709 color matrix