GNOME Bugzilla – Bug 732870
jpegenc: add support for encoding from nv21
Last modified: 2014-07-23 06:37:07 UTC
Created attachment 280092 [details] [review] allow encoding from nv21 encoding from nv21 seems to work fine, tested with the following pipeline: gst-launch-1.0 v4l2src ! videoconvert ! video/x-raw,format=NV21 ! jpegenc ! matroskamux ! filesink location=/tmp/test.mkv actually jpeg encoding is restrincted to some yuv and rgb formats, as they are obtained? Probably other formats work too
Review of attachment 280092 [details] [review]: Great that's it ? Can we add NV12 too ?
Review of attachment 280092 [details] [review]: Hmm, can't find any semi-color format in J_COLOR_SPACE, are you sure this is tested ? I would have expected a mapping ...
Ok, tested it myself and it works indeed, need to dig yup to find some doc, and if (or when) that was added.
Created attachment 280096 [details] [review] nv12 seems ok tested with the same pipeline as above changing NV21 with NV12
Ok, the trick is that _COMP_DATA() and _PSTRIDE() is being used. Basically we tell, for NV12, the U starts where the UV plane start, and pixel stride 2 (1 byte padding), and V is the UV planes start + 1.
Review of attachment 280096 [details] [review]: Looks good.
commit 60648012f395c708ba61e8937e03d75cc23bf6d5 Author: Nicola Murino <nicola.murino@gmail.com> Date: Tue Jul 8 02:18:27 2014 +0200 jpegenc: Add support for encoding from NV21 and NV12 https://bugzilla.gnome.org/show_bug.cgi?id=732870
thanks, can the patch be pushed to 1.4 branch too please?