Mesa (10.4): st/omx/dec/h264: fix picture out-of-order with poc type 0 v2

Emil Velikov evelikov at kemper.freedesktop.org
Wed Mar 4 02:02:53 UTC 2015


Module: Mesa
Branch: 10.4
Commit: 2a9e9b5aeb378f218b147fc6303351ba1d9208f5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2a9e9b5aeb378f218b147fc6303351ba1d9208f5

Author: Leo Liu <leo.liu at amd.com>
Date:   Mon Feb 23 13:50:06 2015 -0500

st/omx/dec/h264: fix picture out-of-order with poc type 0 v2

poc counter should be reset with IDR frame,
otherwise there would be a re-order issue with
frames before and after IDR

v2: add commit message

Signed-off-by: Leo Liu <leo.liu at amd.com>
Reviewed-by: Christian König <christian.koenig at amd.com>
Cc: "10.4 10.5" <mesa-stable at lists.freedesktop.org>
(cherry picked from commit 9c7b343bc0a6aa6065055cbc1c0a891ccc445984)

---

 src/gallium/state_trackers/omx/vid_dec_h264.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/gallium/state_trackers/omx/vid_dec_h264.c b/src/gallium/state_trackers/omx/vid_dec_h264.c
index 7b57785..e01e873 100644
--- a/src/gallium/state_trackers/omx/vid_dec_h264.c
+++ b/src/gallium/state_trackers/omx/vid_dec_h264.c
@@ -706,6 +706,11 @@ static void slice_header(vid_dec_PrivateType *priv, struct vl_rbsp *rbsp,
       if (pic_order_cnt_lsb != priv->codec_data.h264.pic_order_cnt_lsb)
          vid_dec_h264_EndFrame(priv);
 
+      if (IdrPicFlag) {
+         priv->codec_data.h264.pic_order_cnt_msb = 0;
+         priv->codec_data.h264.pic_order_cnt_lsb = 0;
+      }
+
       if ((pic_order_cnt_lsb < priv->codec_data.h264.pic_order_cnt_lsb) &&
           (priv->codec_data.h264.pic_order_cnt_lsb - pic_order_cnt_lsb) >= (max_pic_order_cnt_lsb / 2))
          pic_order_cnt_msb = priv->codec_data.h264.pic_order_cnt_msb + max_pic_order_cnt_lsb;




More information about the mesa-commit mailing list