summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/omx
diff options
context:
space:
mode:
authorLeo Liu <leo.liu@amd.com>2016-09-23 12:05:16 -0400
committerLeo Liu <leo.liu@amd.com>2016-10-04 11:09:59 -0400
commitffb863fd2c8a5d32001575b09d96dbce4983a5ce (patch)
treec2ac5fc2606a30bde2369dd9d4381c9c0381265b /src/gallium/state_trackers/omx
parentc50b68e6a882c95b58f46fba87c8f3531a2913d1 (diff)
downloadexternal_mesa3d-ffb863fd2c8a5d32001575b09d96dbce4983a5ce.zip
external_mesa3d-ffb863fd2c8a5d32001575b09d96dbce4983a5ce.tar.gz
external_mesa3d-ffb863fd2c8a5d32001575b09d96dbce4983a5ce.tar.bz2
st/omx/dec/h265: fix the skip for before and after list
For reference picture sets, there are cases that rps will not always be used. Once detect the unused flag from encoded bitstream, we should not add this rps to any list, otherwise pass the incorrect reference and skip the correct rps. Signed-off-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Diffstat (limited to 'src/gallium/state_trackers/omx')
-rw-r--r--src/gallium/state_trackers/omx/vid_dec_h265.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/state_trackers/omx/vid_dec_h265.c b/src/gallium/state_trackers/omx/vid_dec_h265.c
index acd225d..925a5a7 100644
--- a/src/gallium/state_trackers/omx/vid_dec_h265.c
+++ b/src/gallium/state_trackers/omx/vid_dec_h265.c
@@ -594,6 +594,8 @@ static void vid_dec_h265_EndFrame(vid_dec_PrivateType *priv)
rps = priv->codec_data.h265.rps;
if (rps) {
+ unsigned bf = 0, af = 0;
+
priv->picture.h265.NumDeltaPocsOfRefRpsIdx = rps->num_delta_poc;
for (i = 0; i < rps->num_pics; ++i) {
priv->picture.h265.PicOrderCntVal[i] =
@@ -609,11 +611,10 @@ static void vid_dec_h265_EndFrame(vid_dec_PrivateType *priv)
if (rps->used[i]) {
if (i < rps->num_neg_pics) {
priv->picture.h265.NumPocStCurrBefore++;
- priv->picture.h265.RefPicSetStCurrBefore[i] = i;
+ priv->picture.h265.RefPicSetStCurrBefore[bf++] = i;
} else {
- int j = i - rps->num_neg_pics;
priv->picture.h265.NumPocStCurrAfter++;
- priv->picture.h265.RefPicSetStCurrAfter[j] = i;
+ priv->picture.h265.RefPicSetStCurrAfter[af++] = i;
}
}
}