[Mesa-dev] [PATCH 5/5] st/omx/dec/h265: fix the skip for before and after list

Leo Liu leo.liu at amd.com
Fri Sep 23 16:32:57 UTC 2016


Should not be skipped when rps->used false

Signed-off-by: Leo Liu <leo.liu at amd.com>
---
 src/gallium/state_trackers/omx/vid_dec_h265.c | 7 ++++---
 1 file 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 9125eb1..2c72e2e 100644
--- a/src/gallium/state_trackers/omx/vid_dec_h265.c
+++ b/src/gallium/state_trackers/omx/vid_dec_h265.c
@@ -710,6 +710,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] =
@@ -725,11 +727,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;
             }
          }
       }
-- 
2.7.4



More information about the mesa-dev mailing list