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 693817 - ffmpegcolorspace: add direct conversion from UYVY to NV12
ffmpegcolorspace: add direct conversion from UYVY to NV12
Status: RESOLVED WONTFIX
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
0.10.x
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-02-14 15:47 UTC by Antonio Ospite
Modified: 2013-08-16 10:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ffmpegcolorspace: add a routine to convert from UYVY to NV12 (2.71 KB, patch)
2013-02-14 15:50 UTC, Antonio Ospite
rejected Details | Review
configure: add checking for ARM NEON instructions (1.30 KB, patch)
2013-02-14 15:51 UTC, Antonio Ospite
rejected Details | Review
ffmpegcolorspace: add NEON optimization to uyvy422_to_nv12() (2.69 KB, patch)
2013-02-14 15:52 UTC, Antonio Ospite
rejected Details | Review

Description Antonio Ospite 2013-02-14 15:47:25 UTC
Hi,

right now conversion from UYVY to NV12 passes through an intermediate conversion; a direct conversion routine can perform better and can be more easily optimized to save even more CPU and battery on embedded systems.

A scenario when a conversion from UYVY to NV12 is needed is not rare at all: a lot of camera sensors provide YUV422 data using the UYVY pixel format, and many encoders (e.g. h264) expect data in the NV12 pixel format.

I am attaching a uyvy422_to_nv12() routine, plus a NEON optimized version of the code, both developed by Michael Trimarchi.

The project the code has been written for still uses 0.10 so the patches are against this version, let us know if we should submit patches for videoscale in 1.x and then propose a backport of those.

Thanks,
   Antonio
Comment 1 Antonio Ospite 2013-02-14 15:50:48 UTC
Created attachment 236089 [details] [review]
ffmpegcolorspace: add a routine to convert from UYVY to  NV12
Comment 2 Antonio Ospite 2013-02-14 15:51:31 UTC
Created attachment 236090 [details] [review]
configure: add checking for ARM NEON instructions
Comment 3 Antonio Ospite 2013-02-14 15:52:09 UTC
Created attachment 236091 [details] [review]
ffmpegcolorspace: add NEON optimization to  uyvy422_to_nv12()
Comment 4 David Schleef 2013-02-14 20:13:44 UTC
Please check that it handles odd widths correctly, as well as unaligned buffers for both source and destination.  (You can assume that pointers and strides are aligned to 4 bytes for all planes, however.)
Comment 5 David Schleef 2013-02-14 20:20:08 UTC
Also, videoconvert in 1.0 uses Orc.  A UYVY->NV12 converter would be pretty easy to write, about 10 lines of code.
Comment 6 Sebastian Dröge (slomo) 2013-08-16 10:08:42 UTC
Closing as this is for 0.10, and 0.10 is no longer maintained. Patches to add a direct converter to videoconvert would be nice to have nonetheless.