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 745337 - video: RGB15/16 pack/unpack unit test failure on big endian systems
video: RGB15/16 pack/unpack unit test failure on big endian systems
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal minor
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-02-28 16:27 UTC by Tim-Philipp Müller
Modified: 2015-03-02 14:25 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tim-Philipp Müller 2015-02-28 16:27:16 UTC
The test_video_pack_unpack2 check fails on big-endian machines for RGB16/BGR16/RGB15/BGR15 formats.

Result for RGB16:

outpixel
00000000: ff 00 00 00 ff 00 00 00 ff 00 00 00 ff 00 00 00
00000010: ff 00 00 00 ff 00 00 00 ff 00 00 00 ff 00 00 00
00000020: ff 00 00 00 ff 00 00 00 ff 00 00 00 ff 00 00 00
00000030: ff 00 00 00 ff 00 00 00 ff 00 00 00 ff 00 00 00
00000040: ff 00 00 00 ff 00 00 00 ff 00 00 00 ff 00 00 00
00000050: ff 00 00 00 ff 00 00 00 ff 00 00 00 ff 00 00 00
00000060: ff 00 00 00 ff 00 00 00 ff 00 00 00 ff 00 00 00
00000070: ff 00 00 00 ff 00 00 00 ff 00 00 00 ff 00 00 00

pixels
00000000: ff 00 00 00 ff 00 00 01 ff 00 00 02 ff 00 00 03
00000010: ff 00 00 04 ff 00 00 05 ff 00 00 06 ff 00 00 07
00000020: ff 00 00 08 ff 00 00 09 ff 00 00 0a ff 00 00 0b
00000030: ff 00 00 0c ff 00 00 0d ff 00 00 0e ff 00 00 0f
00000040: ff 00 00 10 ff 00 00 11 ff 00 00 12 ff 00 00 13
00000050: ff 00 00 14 ff 00 00 15 ff 00 00 16 ff 00 00 17
00000060: ff 00 00 18 ff 00 00 19 ff 00 00 1a ff 00 00 1b
00000070: ff 00 00 1c ff 00 00 1d ff 00 00 1e ff 00 00 1f
Comment 1 Tim-Philipp Müller 2015-02-28 16:29:47 UTC
This is with ORC_CODE=backup btw.
Comment 2 Tim-Philipp Müller 2015-02-28 17:26:08 UTC
After the initial PACK_FRAME (&frame, pixels, 0, WIDTH) all bytes in the first line are still 0 here, which isn't right, it should be something like

packed pixels
00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000010: 01 00 01 00 01 00 01 00 01 00 01 00 01 00 01 00
00000020: 02 00 02 00 02 00 02 00 02 00 02 00 02 00 02 00
00000030: 03 00 03 00 03 00 03 00 03 00 03 00 03 00 03 00

probably byte swapped, but certainly not zeroes.
Comment 3 Wim Taymans 2015-03-02 11:28:36 UTC
Can you check if this fixes it (only tested by manually swapping bytes before load and store on LE machine).

commit 569ca5770c2b52cebeca52834fd498b22256491e
Author: Wim Taymans <wtaymans@redhat.com>
Date:   Mon Mar 2 12:26:23 2015 +0100

    video-format: add big-endian versions of RGB/BGR 15/16 pack/unpack
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=745337
Comment 4 Tim-Philipp Müller 2015-03-02 11:55:32 UTC
Thanks, but still fails the same way as before, only that the output is in different byte order now it seems (which is further away from what the result should be now?):

outpixels:
00000000: 00 00 00 ff 00 00 00 ff 00 00 00 ff 00 00 00 ff
00000010: 00 00 00 ff 00 00 00 ff 00 00 00 ff 00 00 00 ff
00000020: 00 00 00 ff 00 00 00 ff 00 00 00 ff 00 00 00 ff
00000030: 00 00 00 ff 00 00 00 ff 00 00 00 ff 00 00 00 ff
00000040: 00 00 00 ff 00 00 00 ff 00 00 00 ff 00 00 00 ff
00000050: 00 00 00 ff 00 00 00 ff 00 00 00 ff 00 00 00 ff
00000060: 00 00 00 ff 00 00 00 ff 00 00 00 ff 00 00 00 ff
00000070: 00 00 00 ff 00 00 00 ff 00 00 00 ff 00 00 00 ff

pixels:
00000000: ff 00 00 00 ff 00 00 01 ff 00 00 02 ff 00 00 03
00000010: ff 00 00 04 ff 00 00 05 ff 00 00 06 ff 00 00 07
00000020: ff 00 00 08 ff 00 00 09 ff 00 00 0a ff 00 00 0b
00000030: ff 00 00 0c ff 00 00 0d ff 00 00 0e ff 00 00 0f
00000040: ff 00 00 10 ff 00 00 11 ff 00 00 12 ff 00 00 13
00000050: ff 00 00 14 ff 00 00 15 ff 00 00 16 ff 00 00 17
00000060: ff 00 00 18 ff 00 00 19 ff 00 00 1a ff 00 00 1b
00000070: ff 00 00 1c ff 00 00 1d ff 00 00 1e ff 00 00 1f
Comment 5 Tim-Philipp Müller 2015-03-02 12:44:25 UTC
RGB16/BGR16 work now with latest changes (d1a9eacb), but RGB15/BGR15 still fail:

00000000: ff 00 00 00 ff 00 00 01 ff 00 00 02 ff 00 00 03
00000010: ff 00 00 04 ff 00 00 05 ff 00 00 06 ff 00 00 07
00000020: ff 00 00 08 ff 00 00 09 ff 00 00 0a ff 00 00 0b
00000030: ff 00 00 0c ff 00 00 0d ff 00 00 0e ff 00 00 0f
00000040: ff 00 00 10 ff 00 00 11 ff 00 00 12 ff 00 00 13
00000050: ff 00 00 14 ff 00 00 15 ff 00 00 16 ff 00 00 17
00000060: ff 00 00 18 ff 00 00 19 ff 00 00 1a ff 00 00 1b
00000070: ff 00 00 1c ff 00 00 1d ff 00 00 1e ff 00 00 1f

00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000010: 00 01 00 01 00 01 00 01 00 01 00 01 00 01 00 01
00000020: 00 02 00 02 00 02 00 02 00 02 00 02 00 02 00 02
00000030: 00 03 00 03 00 03 00 03 00 03 00 03 00 03 00 03

00000000: 00 00 ff 00 00 00 ff 00 00 00 ff 00 00 00 ff 00
00000010: 00 00 ff 00 00 00 ff 00 00 00 ff 00 00 00 ff 00
00000020: 00 08 ff 00 00 08 ff 00 00 08 ff 00 00 08 ff 00
00000030: 00 08 ff 00 00 08 ff 00 00 08 ff 00 00 08 ff 00
00000040: 00 10 ff 00 00 10 ff 00 00 10 ff 00 00 10 ff 00
00000050: 00 10 ff 00 00 10 ff 00 00 10 ff 00 00 10 ff 00
00000060: 00 18 ff 00 00 18 ff 00 00 18 ff 00 00 18 ff 00
00000070: 00 18 ff 00 00 18 ff 00 00 18 ff 00 00 18 ff 00

--

outpixels:
00000000: 00 00 ff 00 00 00 ff 00 00 00 ff 00 00 00 ff 00
00000010: 00 00 ff 00 00 00 ff 00 00 00 ff 00 00 00 ff 00
00000020: 00 08 ff 00 00 08 ff 00 00 08 ff 00 00 08 ff 00
00000030: 00 08 ff 00 00 08 ff 00 00 08 ff 00 00 08 ff 00
00000040: 00 10 ff 00 00 10 ff 00 00 10 ff 00 00 10 ff 00
00000050: 00 10 ff 00 00 10 ff 00 00 10 ff 00 00 10 ff 00
00000060: 00 18 ff 00 00 18 ff 00 00 18 ff 00 00 18 ff 00
00000070: 00 18 ff 00 00 18 ff 00 00 18 ff 00 00 18 ff 00

pixels:
00000000: ff 00 00 00 ff 00 00 01 ff 00 00 02 ff 00 00 03
00000010: ff 00 00 04 ff 00 00 05 ff 00 00 06 ff 00 00 07
00000020: ff 00 00 08 ff 00 00 09 ff 00 00 0a ff 00 00 0b
00000030: ff 00 00 0c ff 00 00 0d ff 00 00 0e ff 00 00 0f
00000040: ff 00 00 10 ff 00 00 11 ff 00 00 12 ff 00 00 13
00000050: ff 00 00 14 ff 00 00 15 ff 00 00 16 ff 00 00 17
00000060: ff 00 00 18 ff 00 00 19 ff 00 00 1a ff 00 00 1b
00000070: ff 00 00 1c ff 00 00 1d ff 00 00 1e ff 00 00 1f
Comment 6 Wim Taymans 2015-03-02 14:08:42 UTC
commit 0062dadc35855786682b8719ae36303ad59b3bf5
Author: Wim Taymans <wtaymans@redhat.com>
Date:   Mon Mar 2 15:07:34 2015 +0100

    video-orc: fix unpack functions for RGB/RGB15 on BE
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=745337
Comment 7 Tim-Philipp Müller 2015-03-02 14:25:17 UTC
Works fine now, thanks!