radeon/vcn: add VP9 dpb buffer size
authorLeo Liu <leo.liu@amd.com>
Tue, 13 Mar 2018 13:42:57 +0000 (09:42 -0400)
committerLeo Liu <leo.liu@amd.com>
Thu, 12 Apr 2018 15:15:12 +0000 (11:15 -0400)
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 <leo.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
src/gallium/drivers/radeon/radeon_vcn_dec.c

index ba65452f69d28a1efb1d33c31d00e5aa678bbdcb..b7cb8a3650ef262de96b59537b1b3725bd42c5e1 100644 (file)
@@ -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);