Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Xiang, Haihao <haihao.xiang@intel.com>
{
GenCodecSurface base;
dri_bo *motion_vector_temporal_bo;
+ //Encoding HEVC10:internal surface keep for P010->NV12 , this is only for hevc10 to save the P010->NV12
+ struct object_surface *nv12_surface_obj;
+ VASurfaceID nv12_surface_id;
+ VADriverContextP ctx;
+ int has_p010_to_nv12_done;
};
typedef struct gen_vp9_surface GenVP9Surface;
#include "intel_driver.h"
#include "intel_media.h"
+#include "i965_drv_video.h"
static pthread_mutex_t free_avc_surface_lock = PTHREAD_MUTEX_INITIALIZER;
dri_bo_unreference(hevc_surface->motion_vector_temporal_bo);
hevc_surface->motion_vector_temporal_bo = NULL;
+ if (hevc_surface->nv12_surface_obj) {
+ i965_DestroySurfaces(hevc_surface->ctx, &hevc_surface->nv12_surface_id, 1);
+ hevc_surface->nv12_surface_id = VA_INVALID_SURFACE;
+ hevc_surface->nv12_surface_obj = NULL;
+ }
+
free(hevc_surface);
*data = NULL;