diff options
author | Leo Liu <[email protected]> | 2019-02-08 09:48:23 -0500 |
---|---|---|
committer | Leo Liu <[email protected]> | 2019-02-11 14:44:16 -0500 |
commit | a0a52a036708dbf5989778795fd67a79e3226289 (patch) | |
tree | 57796ac26463b22a0114de21c3ea4577e84d650a /src/gallium/state_trackers | |
parent | 21cdb828a3f4d1e2f140fc7c81a4bc305b2f6b04 (diff) |
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 <[email protected]>
Reviewed-by: Boyuan Zhang <[email protected]>
Cc: 19.0 <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r-- | src/gallium/state_trackers/va/picture_vp9.c | 7 |
1 files changed, 6 insertions, 1 deletions
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, 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) |