[Libav-user] YUV420SemiPlanar pixel format conversations

Harald Schlangmann harry at gps-laptimer.de
Mon Feb 8 13:35:55 CET 2016


Hi,

I want to use sws_scale to convert from three different pixel formats to PIX_FMT_RGB565, edit the result, and convert back afterwards. 

The overall architecture is 

	video file ‣ demux using MediaExtractor (Android)
		‣ decode using MediaCodec (Android)
		‣ convert to RGB565 using sws_scale (ffmpeg)
		‣ edit frames
		‣ convert to original pixel format  using sws_scale (ffmpeg)
		‣ encode using MediaCodec (Android)
		‣ max using MediaMuxer (Android)
		‣ edited video file

The three pixel formats I want to support are

- YUV420SemiPlanar
- OMX_QCOM_COLOR_FormatYUV420PackedSemiPlanar64x32Tile2m8ka
- COLOR_QCOM_FormatYUV420SemiPlanar32m

The later are Qualcomm formats used frequently on Android according to http://alumnus.caltech.edu/~heirich/styled-6/index.html (which points out these three formats will be good to be compatible with 95% of all Android phones).

My questions: which AV_FMT_* pixel formats map to this three formats? This is actually the missing link to integrate Android native media functions with ffmpeg format conversion.

YUV420SemiPlanar is AV_PIX_FMT_NV12, but what are the Qualcomm ones? For OMX_QCOM_COLOR_FormatYUV420PackedSemiPlanar64x32Tile2m8ka I found this conversion function www.videolan.org/developers/vlc/modules/codec/omxil/qcom.c, but I’d prefer to go with ffmpeg as a single library.

Thanks for your insights, I’m not deep in this color format stuff and have difficulties identifying what is probably obvious to a specialist. 

Thx, Harald

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4118 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20160208/3e3a5f91/attachment.bin>


More information about the Libav-user mailing list