diff options
Diffstat (limited to 'src/i965_decoder.h')
-rw-r--r-- | src/i965_decoder.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/i965_decoder.h b/src/i965_decoder.h index 2cdc2994..40158f0b 100644 --- a/src/i965_decoder.h +++ b/src/i965_decoder.h @@ -26,6 +26,8 @@ #define I965_DECODER_H #include <stdint.h> +#include <stdlib.h> + #include <va/va.h> #include <intel_bufmgr.h> @@ -43,6 +45,35 @@ struct gen_buffer { int valid; }; +#if HAVE_GEN_AVC_SURFACE + +typedef struct gen_avc_surface GenAvcSurface; +struct gen_avc_surface +{ + dri_bo *dmv_top; + dri_bo *dmv_bottom; + int dmv_bottom_flag; +}; + +static void +gen_free_avc_surface(void **data) +{ + GenAvcSurface *avc_surface = *data; + + if (!avc_surface) + return; + + dri_bo_unreference(avc_surface->dmv_top); + avc_surface->dmv_top = NULL; + dri_bo_unreference(avc_surface->dmv_bottom); + avc_surface->dmv_bottom = NULL; + + free(avc_surface); + *data = NULL; +} + +#endif + extern struct hw_context * gen75_dec_hw_context_init(VADriverContextP ctx, VAProfile profile); |