After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 724814 - glcolorscale: Wrong color conversion when download frame
glcolorscale: Wrong color conversion when download frame
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-gl
git master
Other Linux
: Normal major
: 1.3.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on: 703347
Blocks:
 
 
Reported: 2014-02-20 18:13 UTC by Adrien SCH.
Modified: 2014-03-24 13:55 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Adrien SCH. 2014-02-20 18:13:09 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
Comment 1 Adrien SCH. 2014-02-20 19:08:13 UTC
Correction : gst-launch-1.0 filesrc location=path ! matroskademux ! h264parse ! vaapidecode
! glcolorscale ! video/x-raw, format=RGB, width=500, height=500 ! videoconvert ! xvimagesink
Comment 2 Matthew Waters (ystreet00) 2014-02-21 05:11:16 UTC
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?
Comment 3 Adrien SCH. 2014-02-21 08:11:40 UTC
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)
Comment 4 Matthew Waters (ystreet00) 2014-02-23 03:08:40 UTC
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
Comment 5 Matthew Waters (ystreet00) 2014-03-24 13:55:43 UTC
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