GNOME Bugzilla – Bug 745337
video: RGB15/16 pack/unpack unit test failure on big endian systems
Last modified: 2015-03-02 14:25:17 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
This is with ORC_CODE=backup btw.
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.
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
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
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
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
Works fine now, thanks!