diff options
Diffstat (limited to 'meta-amdfalconx86/recipes-graphics/mesa/mesa/0026-st-omx-dec-separate-create_video_codec-to-different-.patch')
-rw-r--r-- | meta-amdfalconx86/recipes-graphics/mesa/mesa/0026-st-omx-dec-separate-create_video_codec-to-different-.patch | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/meta-amdfalconx86/recipes-graphics/mesa/mesa/0026-st-omx-dec-separate-create_video_codec-to-different-.patch b/meta-amdfalconx86/recipes-graphics/mesa/mesa/0026-st-omx-dec-separate-create_video_codec-to-different-.patch new file mode 100644 index 00000000..6bd9c12e --- /dev/null +++ b/meta-amdfalconx86/recipes-graphics/mesa/mesa/0026-st-omx-dec-separate-create_video_codec-to-different-.patch @@ -0,0 +1,123 @@ +From 2261e94a5b6a67ec9142cd3c71d824fec35b70c2 Mon Sep 17 00:00:00 2001 +From: Leo Liu <leo.liu@amd.com> +Date: Fri, 13 Mar 2015 12:25:42 -0400 +Subject: [PATCH 26/29] st/omx/dec: separate create_video_codec to different + codecs +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +v2: get frame size from port info + +Signed-off-by: Leo Liu <leo.liu@amd.com> +Reviewed-by: Christian König <christian.koenig@amd.com> +Signed-off-by: Arindam Nath <arindam.nath@amd.com> +--- + src/gallium/state_trackers/omx/vid_dec.c | 18 ------------------ + src/gallium/state_trackers/omx/vid_dec.h | 1 + + src/gallium/state_trackers/omx/vid_dec_h264.c | 15 +++++++++++++++ + src/gallium/state_trackers/omx/vid_dec_mpeg12.c | 14 ++++++++++++++ + 4 files changed, 30 insertions(+), 18 deletions(-) + +diff --git a/src/gallium/state_trackers/omx/vid_dec.c b/src/gallium/state_trackers/omx/vid_dec.c +index 13f4f55..9e7e7ba 100644 +--- a/src/gallium/state_trackers/omx/vid_dec.c ++++ b/src/gallium/state_trackers/omx/vid_dec.c +@@ -44,8 +44,6 @@ + #include <bellagio/omxcore.h> + #endif + +-#include <bellagio/omx_base_video_port.h> +- + #include "pipe/p_screen.h" + #include "pipe/p_video_codec.h" + #include "util/u_memory.h" +@@ -364,22 +362,6 @@ static OMX_ERRORTYPE vid_dec_MessageHandler(OMX_COMPONENTTYPE* comp, internalReq + + if (msg->messageType == OMX_CommandStateSet) { + if ((msg->messageParam == OMX_StateIdle ) && (priv->state == OMX_StateLoaded)) { +- +- struct pipe_video_codec templat = {}; +- omx_base_video_PortType *port; +- +- port = (omx_base_video_PortType *)priv->ports[OMX_BASE_FILTER_INPUTPORT_INDEX]; +- +- templat.profile = priv->profile; +- templat.entrypoint = PIPE_VIDEO_ENTRYPOINT_BITSTREAM; +- templat.chroma_format = PIPE_VIDEO_CHROMA_FORMAT_420; +- templat.width = port->sPortParam.format.video.nFrameWidth; +- templat.height = port->sPortParam.format.video.nFrameHeight; +- templat.max_references = 2; +- templat.expect_chunked_decode = true; +- +- priv->codec = priv->pipe->create_video_codec(priv->pipe, &templat); +- + if (priv->profile == PIPE_VIDEO_PROFILE_MPEG2_MAIN) + vid_dec_mpeg12_Init(priv); + else if (priv->profile == PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH) +diff --git a/src/gallium/state_trackers/omx/vid_dec.h b/src/gallium/state_trackers/omx/vid_dec.h +index 9acf872..1c51f9c 100644 +--- a/src/gallium/state_trackers/omx/vid_dec.h ++++ b/src/gallium/state_trackers/omx/vid_dec.h +@@ -44,6 +44,7 @@ + + #include <bellagio/st_static_component_loader.h> + #include <bellagio/omx_base_filter.h> ++#include <bellagio/omx_base_video_port.h> + + #include "pipe/p_video_state.h" + #include "state_tracker/drm_driver.h" +diff --git a/src/gallium/state_trackers/omx/vid_dec_h264.c b/src/gallium/state_trackers/omx/vid_dec_h264.c +index e01e873..7c90dee 100644 +--- a/src/gallium/state_trackers/omx/vid_dec_h264.c ++++ b/src/gallium/state_trackers/omx/vid_dec_h264.c +@@ -105,6 +105,21 @@ static void vid_dec_h264_BeginFrame(vid_dec_PrivateType *priv) + + priv->picture.h264.num_ref_frames = priv->picture.h264.pps->sps->max_num_ref_frames; + ++ if (!priv->codec) { ++ struct pipe_video_codec templat = {}; ++ omx_base_video_PortType *port; ++ ++ port = (omx_base_video_PortType *)priv->ports[OMX_BASE_FILTER_INPUTPORT_INDEX]; ++ templat.profile = priv->profile; ++ templat.entrypoint = PIPE_VIDEO_ENTRYPOINT_BITSTREAM; ++ templat.chroma_format = PIPE_VIDEO_CHROMA_FORMAT_420; ++ templat.max_references = 2; ++ templat.expect_chunked_decode = true; ++ templat.width = port->sPortParam.format.video.nFrameWidth; ++ templat.height = port->sPortParam.format.video.nFrameHeight; ++ ++ priv->codec = priv->pipe->create_video_codec(priv->pipe, &templat); ++ } + priv->codec->begin_frame(priv->codec, priv->target, &priv->picture.base); + priv->frame_started = true; + } +diff --git a/src/gallium/state_trackers/omx/vid_dec_mpeg12.c b/src/gallium/state_trackers/omx/vid_dec_mpeg12.c +index de4c69a..bef83ec 100644 +--- a/src/gallium/state_trackers/omx/vid_dec_mpeg12.c ++++ b/src/gallium/state_trackers/omx/vid_dec_mpeg12.c +@@ -65,6 +65,20 @@ static struct pipe_video_buffer *vid_dec_mpeg12_Flush(vid_dec_PrivateType *priv) + + void vid_dec_mpeg12_Init(vid_dec_PrivateType *priv) + { ++ struct pipe_video_codec templat = {}; ++ omx_base_video_PortType *port; ++ ++ port = (omx_base_video_PortType *)priv->ports[OMX_BASE_FILTER_INPUTPORT_INDEX]; ++ templat.profile = priv->profile; ++ templat.entrypoint = PIPE_VIDEO_ENTRYPOINT_BITSTREAM; ++ templat.chroma_format = PIPE_VIDEO_CHROMA_FORMAT_420; ++ templat.max_references = 2; ++ templat.expect_chunked_decode = true; ++ templat.width = port->sPortParam.format.video.nFrameWidth; ++ templat.height = port->sPortParam.format.video.nFrameHeight; ++ ++ priv->codec = priv->pipe->create_video_codec(priv->pipe, &templat); ++ + priv->picture.base.profile = PIPE_VIDEO_PROFILE_MPEG2_MAIN; + priv->picture.mpeg12.intra_matrix = default_intra_matrix; + priv->picture.mpeg12.non_intra_matrix = default_non_intra_matrix; +-- +1.9.1 + |