aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amdfalconx86/recipes-graphics/mesa/mesa/0028-st-omx-dec-add-h264-decoder-level-support.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amdfalconx86/recipes-graphics/mesa/mesa/0028-st-omx-dec-add-h264-decoder-level-support.patch')
-rw-r--r--meta-amdfalconx86/recipes-graphics/mesa/mesa/0028-st-omx-dec-add-h264-decoder-level-support.patch72
1 files changed, 72 insertions, 0 deletions
diff --git a/meta-amdfalconx86/recipes-graphics/mesa/mesa/0028-st-omx-dec-add-h264-decoder-level-support.patch b/meta-amdfalconx86/recipes-graphics/mesa/mesa/0028-st-omx-dec-add-h264-decoder-level-support.patch
new file mode 100644
index 00000000..0b59004a
--- /dev/null
+++ b/meta-amdfalconx86/recipes-graphics/mesa/mesa/0028-st-omx-dec-add-h264-decoder-level-support.patch
@@ -0,0 +1,72 @@
+From fdf7e12f010fd7650b767f726cb27e62321e6573 Mon Sep 17 00:00:00 2001
+From: Leo Liu <leo.liu@amd.com>
+Date: Fri, 13 Mar 2015 12:39:26 -0400
+Subject: [PATCH 28/29] st/omx/dec: add h264 decoder level support
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+v2: use sps level idc as level to driver
+
+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_h264.c | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/src/gallium/state_trackers/omx/vid_dec_h264.c b/src/gallium/state_trackers/omx/vid_dec_h264.c
+index 7c90dee..18d8803 100644
+--- a/src/gallium/state_trackers/omx/vid_dec_h264.c
++++ b/src/gallium/state_trackers/omx/vid_dec_h264.c
+@@ -33,6 +33,7 @@
+
+ #include "pipe/p_video_codec.h"
+ #include "util/u_memory.h"
++#include "util/u_video.h"
+ #include "vl/vl_rbsp.h"
+
+ #include "entrypoint.h"
+@@ -113,10 +114,11 @@ static void vid_dec_h264_BeginFrame(vid_dec_PrivateType *priv)
+ templat.profile = priv->profile;
+ templat.entrypoint = PIPE_VIDEO_ENTRYPOINT_BITSTREAM;
+ templat.chroma_format = PIPE_VIDEO_CHROMA_FORMAT_420;
+- templat.max_references = 2;
++ templat.max_references = priv->picture.h264.num_ref_frames;
+ templat.expect_chunked_decode = true;
+ templat.width = port->sPortParam.format.video.nFrameWidth;
+ templat.height = port->sPortParam.format.video.nFrameHeight;
++ templat.level = priv->picture.h264.pps->sps->level_idc;
+
+ priv->codec = priv->pipe->create_video_codec(priv->pipe, &templat);
+ }
+@@ -239,7 +241,7 @@ static struct pipe_h264_sps *seq_parameter_set_id(vid_dec_PrivateType *priv, str
+ static void seq_parameter_set(vid_dec_PrivateType *priv, struct vl_rbsp *rbsp)
+ {
+ struct pipe_h264_sps *sps;
+- unsigned profile_idc;
++ unsigned profile_idc, level_idc;
+ unsigned i;
+
+ /* Sequence parameter set */
+@@ -267,7 +269,7 @@ static void seq_parameter_set(vid_dec_PrivateType *priv, struct vl_rbsp *rbsp)
+ vl_rbsp_u(rbsp, 2);
+
+ /* level_idc */
+- vl_rbsp_u(rbsp, 8);
++ level_idc = vl_rbsp_u(rbsp, 8);
+
+ sps = seq_parameter_set_id(priv, rbsp);
+ if (!sps)
+@@ -277,6 +279,8 @@ static void seq_parameter_set(vid_dec_PrivateType *priv, struct vl_rbsp *rbsp)
+ memset(sps->ScalingList4x4, 16, sizeof(sps->ScalingList4x4));
+ memset(sps->ScalingList8x8, 16, sizeof(sps->ScalingList8x8));
+
++ sps->level_idc = level_idc;
++
+ if (profile_idc == 100 || profile_idc == 110 || profile_idc == 122 || profile_idc == 244 ||
+ profile_idc == 44 || profile_idc == 83 || profile_idc == 86 || profile_idc == 118 ||
+ profile_idc == 128 || profile_idc == 138) {
+--
+1.9.1
+