androidmedia: Add support for COLOR_FormatYUV420Flexible

https://bugzilla.gnome.org/show_bug.cgi?id=747126
This commit is contained in:
Edward Hervey 2015-03-13 16:07:15 +01:00 committed by Sebastian Dröge
parent 0654442c8f
commit 8d41c3e393
2 changed files with 4 additions and 1 deletions

View file

@ -102,6 +102,7 @@ enum
COLOR_QCOM_FormatYVU420SemiPlanar32m = 0x7fa30c04,
/* From hardware/ti/omap4xxx/domx/omx_core/inc/OMX_TI_IVCommon.h */
COLOR_TI_FormatYUV420PackedSemiPlanarInterlaced = 0x7f000001,
COLOR_FormatYUV420Flexible = 0x7f420888,
/* This format is Exynos specific from the OMX vendor-specific
* numeric range, but is defined in the Android OMX headers, so
* we shouldn't find incompatible usage and crash horribly... right?

View file

@ -1775,6 +1775,7 @@ static const struct
} color_format_mapping_table[] = {
{
COLOR_FormatYUV420Planar, GST_VIDEO_FORMAT_I420}, {
COLOR_FormatYUV420Flexible, GST_VIDEO_FORMAT_I420}, {
COLOR_FormatYUV420SemiPlanar, GST_VIDEO_FORMAT_NV12}, {
COLOR_TI_FormatYUV420PackedSemiPlanar, GST_VIDEO_FORMAT_NV12}, {
COLOR_TI_FormatYUV420PackedSemiPlanarInterlaced, GST_VIDEO_FORMAT_NV12}, {
@ -1968,7 +1969,8 @@ gst_amc_color_format_info_set (GstAmcColorFormatInfo * color_format_info,
}
switch (color_format) {
case COLOR_FormatYUV420Planar:{
case COLOR_FormatYUV420Planar:
case COLOR_FormatYUV420Flexible:{
if (stride == 0 || slice_height == 0) {
GST_ERROR ("Stride or slice height is 0");
return FALSE;