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 644773 - Add support for Y422 colorspaces in videoflip element
Add support for Y422 colorspaces in videoflip element
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 0.10.29
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-03-14 23:19 UTC by Youness Alaoui
Modified: 2011-03-15 20:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch videoflip to add Y422 support (10.39 KB, patch)
2011-03-14 23:19 UTC, Youness Alaoui
none Details | Review
[PATCH] videoflip: Add support for YUY2, UVYV and YVYU colorspaces (10.39 KB, patch)
2011-03-15 01:37 UTC, Youness Alaoui
committed Details | Review
[PATCH] videoflip: Fix buffer overflow bug for odd resolutions and Y422 colorspaces (7.93 KB, patch)
2011-03-15 20:01 UTC, Youness Alaoui
committed Details | Review

Description Youness Alaoui 2011-03-14 23:19:48 UTC
Created attachment 183392 [details] [review]
Patch videoflip to add Y422 support

I've added support for YUY2, UYVY and YVYU colorspaces to the videoflip element.
Attached is the patch, please review+commit.
Thanks
Comment 1 Youness Alaoui 2011-03-15 01:37:18 UTC
Created attachment 183400 [details] [review]
[PATCH] videoflip: Add support for YUY2, UVYV and YVYU colorspaces

After discussion with David Schleef and additional testing, it turns out there was a buffer overflow. Since I increment x by 2, and use x+1, if the width was odd, then x+1 could try to access data outside the boundaries of the array (especially in the case of (sh - 1 - (x + 1))).
I'm attaching a new patch that should resolve this issue.
Thanks.
Comment 2 Tim-Philipp Müller 2011-03-15 09:53:18 UTC
commit a3ed3d93745a0b1030fd627394c26c4f1ca1f06e
Author: Youness Alaoui <youness.alaoui@collabora.co.uk>
Date:   Mon Mar 14 19:14:07 2011 -0400

    videoflip: Add support for YUY2, UVYV and YVYU colorspaces
    
    https://bugzilla.gnome.org/show_bug.cgi?id=644773

commit 3e1c70749593ba171fe215331ba13c43e8576975
Author: Tim-Philipp Müller <tim.muller@collabora.co.uk>
Date:   Tue Mar 15 09:43:35 2011 +0000

    tests: in videofilter unit test also check with 'odd' widths and heights
    
    And only use one test suite.
Comment 3 Youness Alaoui 2011-03-15 20:01:54 UTC
Created attachment 183463 [details] [review]
[PATCH] videoflip: Fix buffer overflow bug for odd resolutions and Y422 colorspaces 

Damn it, I don't know why/how but it seems that git format-patch didn't recreate my amended commit that fixed the buffer overflow I discussed in comment #1 
I'm attaching a new commit that fixes the buffer overflow that was missing from the commit that got merged upstream. Please merge this one too.
Thanks.
Comment 4 Tim-Philipp Müller 2011-03-15 20:28:36 UTC
Comment on attachment 183463 [details] [review]
[PATCH] videoflip: Fix buffer overflow bug for odd resolutions and Y422 colorspaces 

commit 2a8103553d32644129b79293dbe7bd5d404d2691
Author: Tim-Philipp Müller <tim.muller@collabora.co.uk>
Date:   Tue Mar 15 20:19:48 2011 +0000

    tests: enable more formats in videofilter unit test, check more resolutions

commit a1a0186a62684520b6b49b628ed01007a7892084
Author: Youness Alaoui <youness.alaoui@collabora.co.uk>
Date:   Mon Mar 14 19:14:07 2011 -0400

    videoflip: Fix buffer overflow bug for odd resolutions and Y422 colorspaces
    
    https://bugzilla.gnome.org/show_bug.cgi?id=644773