radeon/vcn: implement encoder dpb management
authorThong Thai <thong.thai@amd.com>
Mon, 22 Nov 2021 00:51:16 +0000 (19:51 -0500)
committerMarge Bot <emma+marge@anholt.net>
Wed, 8 Dec 2021 03:27:42 +0000 (03:27 +0000)
commit7ba0c68e3195aa127370bfce01166387e6903d39
treed0204a40395b59e56db0fd7d0967c65570722250
parent96b276b3270f82ac90baea37301b96f900684860
radeon/vcn: implement encoder dpb management

Previously, the number of previously encoded frames the encoder handled
was 1 - the encoder now supports many more encoded pictures, so the
encoder now has to keep track of multiple reconstructed pictures.

v2: Add a check to make sure an array index is not negative (Boyuan)

Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13915>
src/gallium/drivers/radeon/radeon_vcn_enc.h
src/gallium/drivers/radeon/radeon_vcn_enc_1_2.c
src/gallium/drivers/radeon/radeon_vcn_enc_2_0.c