}
for (k = 0; k < n_elems; k++) {
+ if (strcmp (name_str, "OMX.k3.video.decoder.avc") == 0)
+ if (n_elems == 1 && color_formats_elems[k] == COLOR_FormatYCbYCr) {
+ GST_INFO ("On HuaweiMediaPad it reports a wrong COLOR_FormatYCbYCr,"
+ "should be COLOR_TI_FormatYUV420PackedSemiPlanar, fix it.");
+ color_formats_elems[k] = COLOR_TI_FormatYUV420PackedSemiPlanar;
+ }
+
GST_INFO ("Color format %d: %d", k, color_formats_elems[k]);
gst_codec_type->color_formats[k] = color_formats_elems[k];
}
gint crop_left, crop_right;
gint crop_top, crop_bottom;
GstVideoFormat gst_format;
+ GstAmcVideoDecClass *klass = GST_AMC_VIDEO_DEC_GET_CLASS (self);
if (!gst_amc_format_get_int (format, "color-format", &color_format) ||
!gst_amc_format_get_int (format, "width", &width) ||
return FALSE;
}
+ if (strcmp (klass->codec_info->name, "OMX.k3.video.decoder.avc") &&
+ color_format == COLOR_FormatYCbYCr)
+ color_format = COLOR_TI_FormatYUV420PackedSemiPlanar;
+
if (!gst_amc_format_get_int (format, "stride", &stride) ||
!gst_amc_format_get_int (format, "slice-height", &slice_height)) {
GST_ERROR_OBJECT (self, "Failed to get stride and slice-height");