radeon/uvd: add and manage render picture list
authorBoyuan Zhang <boyuan.zhang@amd.com>
Fri, 15 Dec 2017 16:23:25 +0000 (11:23 -0500)
committerLeo Liu <leo.liu@amd.com>
Fri, 15 Dec 2017 21:04:31 +0000 (16:04 -0500)
commit2ec48039b8aa1f6a5e16f3f12483b88981d0f5d3
tree34eb5849cb6d458784db1513c523aa368dcd02b7
parentf2bfd1cbb7e72945ca192845a1ad28426c7aea89
radeon/uvd: add and manage render picture list

Create a list in decoder to store all render picture buffer pointers that
currently being used in reference picture lists.

During get message buffer call, check each pointer in render_pic_list[]
within given pic->ref[] list, remove pointer that no longer being used by
pic->ref[]. Then add current render surface pointer to the render_pic_list[]
and assign the associated index to result.curr_idx.

As a result, result.curr_idx will have the correct index to represent the
current render picture, instead of the previous increamenting values.

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
src/gallium/drivers/radeon/radeon_uvd.c