From 770fb50f0ac05731dd1389bfceb171253425855d Mon Sep 17 00:00:00 2001 From: Jan-Simon Möller Date: Thu, 1 Sep 2016 18:16:16 +0200 Subject: Changes to meta-renesas for building with YP 2.1.1 'krogoth' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Notable changes: - We drop old appends (libgcc_4.8.bbappend, qemu_%.bbappends, gtk+_2.24.%.bbappend) - All gstreamer1.0_1.2.3 related recipes are now in meta-reneas and have been heavily massaged to work with YP 2.1.1 . - systemd needs a patch due to the old kernel - linux-libc-headers needed a patch TODO: - Test and fix Signed-off-by: Jan-Simon Möller --- ...-change-supported-color-formats-list-crea.patch | 126 +++++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 common/recipes-multimedia/gstreamer/gstreamer1.0-omx/0004-omxvideodec-change-supported-color-formats-list-crea.patch (limited to 'common/recipes-multimedia/gstreamer/gstreamer1.0-omx/0004-omxvideodec-change-supported-color-formats-list-crea.patch') diff --git a/common/recipes-multimedia/gstreamer/gstreamer1.0-omx/0004-omxvideodec-change-supported-color-formats-list-crea.patch b/common/recipes-multimedia/gstreamer/gstreamer1.0-omx/0004-omxvideodec-change-supported-color-formats-list-crea.patch new file mode 100644 index 0000000..1f20871 --- /dev/null +++ b/common/recipes-multimedia/gstreamer/gstreamer1.0-omx/0004-omxvideodec-change-supported-color-formats-list-crea.patch @@ -0,0 +1,126 @@ +From 92bf075e1ce4b2687acc84f56ffbfff17883069e Mon Sep 17 00:00:00 2001 +From: Kazunori Kobayashi +Date: Thu, 6 Jun 2013 11:31:27 +0900 +Subject: [PATCH 04/14] omxvideodec: change supported color formats list + creation + +To create supported color formats list for caps negotiation, +this change tries to set each color format that is prepared in +a list beforehand and determines which color formats are supported +by the component. The more components can be dealt with by this +support. + +NV12 color format is put at the top of the list declared as a constant +so that the caps negotiation gives top priority to this color format. +--- + omx/gstomxvideodec.c | 84 +++++++++++++++++++++++----------------------------- + 1 file changed, 37 insertions(+), 47 deletions(-) + +diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c +index df6362b..62ee5c5 100644 +--- a/omx/gstomxvideodec.c ++++ b/omx/gstomxvideodec.c +@@ -1793,63 +1793,53 @@ static GList * + gst_omx_video_dec_get_supported_colorformats (GstOMXVideoDec * self) + { + GstOMXPort *port = self->dec_out_port; +- GstVideoCodecState *state = self->input_state; + OMX_VIDEO_PARAM_PORTFORMATTYPE param; + OMX_ERRORTYPE err; + GList *negotiation_map = NULL; +- gint old_index; ++ gint i; ++ OMX_COLOR_FORMATTYPE format_org; ++ VideoNegotiationMap *m; ++ const VideoNegotiationMap format_list[] = { ++ {GST_VIDEO_FORMAT_NV12, OMX_COLOR_FormatYUV420SemiPlanar}, ++ {GST_VIDEO_FORMAT_I420, OMX_COLOR_FormatYUV420Planar}, ++ {GST_VIDEO_FORMAT_I420, OMX_COLOR_FormatYUV420PackedPlanar}, ++ }; + + GST_OMX_INIT_STRUCT (¶m); + param.nPortIndex = port->index; +- param.nIndex = 0; +- if (!state || state->info.fps_n == 0) +- param.xFramerate = 0; +- else +- param.xFramerate = (state->info.fps_n << 16) / (state->info.fps_d); + +- old_index = -1; +- do { +- VideoNegotiationMap *m; ++ err = gst_omx_component_get_parameter (self->dec, ++ OMX_IndexParamVideoPortFormat, ¶m); ++ if (err != OMX_ErrorNone) { ++ GST_ERROR_OBJECT (self, ++ "Failed to getting video port format (err info: %s (0x%08x))", ++ gst_omx_error_to_string (err), err); ++ return NULL; ++ } ++ /* temporary save original format type */ ++ format_org = param.eColorFormat; + +- err = +- gst_omx_component_get_parameter (self->dec, ++ for (i = 0; i < sizeof (format_list) / sizeof (VideoNegotiationMap); i++) { ++ param.eColorFormat = format_list[i].type; ++ err = gst_omx_component_set_parameter (self->dec, + OMX_IndexParamVideoPortFormat, ¶m); +- +- /* FIXME: Workaround for Bellagio that simply always +- * returns the same value regardless of nIndex and +- * never returns OMX_ErrorNoMore +- */ +- if (old_index == param.nIndex) +- break; +- +- if (err == OMX_ErrorNone || err == OMX_ErrorNoMore) { +- switch (param.eColorFormat) { +- case OMX_COLOR_FormatYUV420Planar: +- case OMX_COLOR_FormatYUV420PackedPlanar: +- m = g_slice_new (VideoNegotiationMap); +- m->format = GST_VIDEO_FORMAT_I420; +- m->type = param.eColorFormat; +- negotiation_map = g_list_append (negotiation_map, m); +- GST_DEBUG_OBJECT (self, "Component supports I420 (%d) at index %d", +- param.eColorFormat, param.nIndex); +- break; +- case OMX_COLOR_FormatYUV420SemiPlanar: +- m = g_slice_new (VideoNegotiationMap); +- m->format = GST_VIDEO_FORMAT_NV12; +- m->type = param.eColorFormat; +- negotiation_map = g_list_append (negotiation_map, m); +- GST_DEBUG_OBJECT (self, "Component supports NV12 (%d) at index %d", +- param.eColorFormat, param.nIndex); +- break; +- default: +- GST_DEBUG_OBJECT (self, +- "Component supports unsupported color format %d at index %d", +- param.eColorFormat, param.nIndex); +- break; +- } ++ if (err == OMX_ErrorNone) { ++ m = g_slice_new (VideoNegotiationMap); ++ m->format = format_list[i].format; ++ m->type = format_list[i].type; ++ negotiation_map = g_list_append (negotiation_map, m); ++ GST_DEBUG_OBJECT (self, "Component supports (%d)", param.eColorFormat); + } +- old_index = param.nIndex++; +- } while (err == OMX_ErrorNone); ++ } ++ ++ /* restore setting */ ++ param.eColorFormat = format_org; ++ err = gst_omx_component_set_parameter (self->dec, ++ OMX_IndexParamVideoPortFormat, ¶m); ++ if (err != OMX_ErrorNone) ++ GST_ERROR_OBJECT (self, ++ "Failed to seetting video port format (err info: %s (0x%08x))", ++ gst_omx_error_to_string (err), err); + + return negotiation_map; + } +-- +1.8.1.2 + -- cgit 1.2.3-korg