summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorLeo Liu <[email protected]>2015-02-23 13:50:06 -0500
committerLeo Liu <[email protected]>2015-02-24 10:39:49 -0500
commit9c7b343bc0a6aa6065055cbc1c0a891ccc445984 (patch)
tree062c33d4bbe95d3af96acf0c7201f6626deb2de6 /src/gallium
parentfece147be53880ac8e8e5e2863f91cdd01d98b5c (diff)
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 <[email protected]> Reviewed-by: Christian König <[email protected]> Cc: "10.4 10.5" <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/state_trackers/omx/vid_dec_h264.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/omx/vid_dec_h264.c b/src/gallium/state_trackers/omx/vid_dec_h264.c
index 7b57785c28f..e01e8739740 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;