From eb22785bd831e775fd23f0b0c1748c100ae7357d Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Tue, 13 Mar 2018 09:42:57 -0400 Subject: [PATCH] radeon/vcn: add VP9 dpb buffer size MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The current FW has restricted the size to the worse case, and the new dynamic dpb buffer support is on the way from firmware side, we will change accordingly. Signed-off-by: Leo Liu Acked-by: Christian König --- src/gallium/drivers/radeon/radeon_vcn_dec.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gallium/drivers/radeon/radeon_vcn_dec.c b/src/gallium/drivers/radeon/radeon_vcn_dec.c index ba65452f69d..b7cb8a3650e 100644 --- a/src/gallium/drivers/radeon/radeon_vcn_dec.c +++ b/src/gallium/drivers/radeon/radeon_vcn_dec.c @@ -1019,6 +1019,12 @@ static unsigned calc_dpb_size(struct radeon_decoder *dec) dpb_size = MAX2(dpb_size, 30 * 1024 * 1024); break; + case PIPE_VIDEO_FORMAT_VP9: + max_references = MAX2(max_references, 9); + + dpb_size = (4096 * 3000 * 3 / 2) * max_references; + break; + default: // something is missing here assert(0); -- 2.30.2