[2/2] st/va/vp9: set max reference as default of VP9 reference number

Submitted by Zhang, Boyuan on Feb. 8, 2019, 7:51 p.m.

Details

Message ID CY4PR12MB115915A37627D39EB207C3A387690@CY4PR12MB1159.namprd12.prod.outlook.com
State New
Headers show
Series "Series without cover letter" ( rev: 3 ) in Mesa

Not browsing as part of any series.

Commit Message

Zhang, Boyuan Feb. 8, 2019, 7:51 p.m.
This patch is 
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>


-----Original Message-----
From: mesa-dev <mesa-dev-bounces@lists.freedesktop.org> On Behalf Of Liu, Leo

Sent: February 8, 2019 10:11 AM
To: mesa-dev@lists.freedesktop.org
Cc: 19 . 0 <mesa-stable@lists.freedesktop.org>
Subject: [Mesa-dev] [PATCH 2/2] st/va/vp9: set max reference as default of VP9 reference number

If there is no information about number of render targets

Signed-off-by: Leo Liu <leo.liu@amd.com>

Cc: 19.0 <mesa-stable@lists.freedesktop.org>
---
 src/gallium/state_trackers/va/picture_vp9.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

    context->desc.vp9.picture_parameter.bit_depth = vp9->bit_depth;
 
-   for (i = 0 ; i < 8 ; i++)
+   for (i = 0 ; i < NUM_VP9_REFS ; i++)
       vlVaGetReferenceFrame(drv, vp9->reference_frames[i], &context->desc.vp9.ref[i]);
+
+   if (!context->decoder && !context->templat.max_references)
+      context->templat.max_references = NUM_VP9_REFS;
 }
 
 void vlVaHandleSliceParameterBufferVP9(vlVaContext *context, vlVaBuffer *buf)
--
2.17.1

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Patch hide | download patch | download mbox

diff --git a/src/gallium/state_trackers/va/picture_vp9.c b/src/gallium/state_trackers/va/picture_vp9.c
index c1ca54cd008..b5aca9a513c 100644
--- a/src/gallium/state_trackers/va/picture_vp9.c
+++ b/src/gallium/state_trackers/va/picture_vp9.c
@@ -28,6 +28,8 @@ 
 #include "vl/vl_vlc.h"
 #include "va_private.h"
 
+#define NUM_VP9_REFS 8
+
 void vlVaHandlePictureParameterBufferVP9(vlVaDriver *drv, vlVaContext *context, vlVaBuffer *buf)  {
    VADecPictureParameterBufferVP9 *vp9 = buf->data; @@ -79,8 +81,11 @@ void vlVaHandlePictureParameterBufferVP9(vlVaDriver *drv, vlVaContext *context,