Mesa (master): st/omx/dec/h265: get the reference list for uvd
Leo Liu
leoliu at kemper.freedesktop.org
Tue Sep 6 14:38:09 UTC 2016
Module: Mesa
Branch: master
Commit: 1a534d31febb3abd7554cf44b9be5ed18b4609f4
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1a534d31febb3abd7554cf44b9be5ed18b4609f4
Author: Leo Liu <leo.liu at amd.com>
Date: Mon Aug 29 13:42:24 2016 -0400
st/omx/dec/h265: get the reference list for uvd
Signed-off-by: Leo Liu <leo.liu at amd.com>
Acked-by: Christian König <christian.koenig at amd.com>
---
src/gallium/state_trackers/omx/vid_dec_h265.c | 39 +++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/src/gallium/state_trackers/omx/vid_dec_h265.c b/src/gallium/state_trackers/omx/vid_dec_h265.c
index df2dc05..7c0f75d 100644
--- a/src/gallium/state_trackers/omx/vid_dec_h265.c
+++ b/src/gallium/state_trackers/omx/vid_dec_h265.c
@@ -570,10 +570,49 @@ static void vid_dec_h265_EndFrame(vid_dec_PrivateType *priv)
{
struct dpb_list *entry = NULL;
struct pipe_video_buffer *tmp;
+ struct ref_pic_set *rps;
+ int i;
if (!priv->frame_started)
return;
+ priv->picture.h265.NumPocStCurrBefore = 0;
+ priv->picture.h265.NumPocStCurrAfter = 0;
+ memset(priv->picture.h265.RefPicSetStCurrBefore, 0, 8);
+ memset(priv->picture.h265.RefPicSetStCurrAfter, 0, 8);
+ for (i = 0; i < MAX_NUM_REF_PICS; ++i) {
+ priv->picture.h265.ref[i] = NULL;
+ priv->picture.h265.PicOrderCntVal[i] = 0;
+ }
+
+ rps = priv->codec_data.h265.rps;
+
+ if (rps) {
+ priv->picture.h265.NumDeltaPocsOfRefRpsIdx = rps->num_delta_poc;
+ for (i = 0; i < rps->num_pics; ++i) {
+ priv->picture.h265.PicOrderCntVal[i] =
+ rps->delta_poc[i] + get_poc(priv);
+
+ LIST_FOR_EACH_ENTRY(entry, &priv->codec_data.h265.dpb_list, list) {
+ if (entry->poc == priv->picture.h265.PicOrderCntVal[i]) {
+ priv->picture.h265.ref[i] = entry->buffer;
+ break;
+ }
+ }
+
+ if (rps->used[i]) {
+ if (i < rps->num_neg_pics) {
+ priv->picture.h265.NumPocStCurrBefore++;
+ priv->picture.h265.RefPicSetStCurrBefore[i] = i;
+ } else {
+ int j = i - rps->num_neg_pics;
+ priv->picture.h265.NumPocStCurrAfter++;
+ priv->picture.h265.RefPicSetStCurrAfter[j] = i;
+ }
+ }
+ }
+ }
+
priv->codec->end_frame(priv->codec, priv->target, &priv->picture.base);
priv->frame_started = false;
More information about the mesa-commit
mailing list