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 667681 - gst_video_format_new_caps should generate caps with host endianness for 16-bit rgb formats
gst_video_format_new_caps should generate caps with host endianness for 16-bi...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
0.10.35
Other Linux
: Normal normal
: 0.10.37
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-01-11 10:44 UTC by George Kiagiadakis
Modified: 2012-01-30 16:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch that fixes the bug (1.08 KB, patch)
2012-01-11 10:44 UTC, George Kiagiadakis
none Details | Review
unit test additions (1.06 KB, patch)
2012-01-11 10:44 UTC, George Kiagiadakis
none Details | Review

Description George Kiagiadakis 2012-01-11 10:44:01 UTC
Created attachment 205011 [details] [review]
Patch that fixes the bug

Unlike all the other formats in the GstVideoFormat enum, the 16-bit rgb formats (RGB16, BGR16, RGB15, BGR15) use the host's endianness in the GST_VIDEO_CAPS_RGB_16 and related macros and also gst_video_format_parse_caps expects these caps to have the host's endianness on them. However, the gst_video_format_new_caps method generates caps with endianness = G_BIG_ENDIAN always, which gives a mismatch and the generated caps neither match the static caps in video.h nor are parsed by gst_video_format_parse_caps.

Here is a patch that fixes this problem, together with additions in the libs/video unit test to ensure that this is correct.
Comment 1 George Kiagiadakis 2012-01-11 10:44:55 UTC
Created attachment 205012 [details] [review]
unit test additions
Comment 2 Vincent Penquerc'h 2012-01-30 16:04:56 UTC
Seems to make sense, thanks.

commit 6f6f079dd93e113ad8f2e41ef56d462acbf3fea1
Author: George Kiagiadakis <george.kiagiadakis@collabora.com>
Date:   Tue Jan 10 21:17:58 2012 +0200

    tests: test 16-bit rgb formats in test_parse_caps_rgb
    
    https://bugzilla.gnome.org/show_bug.cgi?id=667681

commit 1251fb3fc0bd60eb4a38f47403e06c293c51fb16
Author: George Kiagiadakis <george.kiagiadakis@collabora.com>
Date:   Tue Jan 10 21:02:48 2012 +0200

    video: Use host endianness when generating caps for 16-bit rgb formats
    
    This is necessary in order to match what the caps strings in
    video.h contain for 16-bit rgb formats and also to match how
    gst_video_format_parse_caps expects them.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=667681