summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaihao Xiang <haihao.xiang@intel.com>2018-12-11 10:35:27 +0800
committerHaihao Xiang <haihao.xiang@intel.com>2018-12-11 10:35:27 +0800
commit72f10f16f7e5767492acde130eeeaa598d26a3a6 (patch)
treecdf9660a88c5be5a3fa2f51ce2e130ce2fe1369b
parentecfb0dbc9f5da257900627ab7e3e6d2f616daa2d (diff)
parentce593cf433d62f46a87bec73485ae1c968010ae6 (diff)
downloadlibva-intel-driver-72f10f16f7e5767492acde130eeeaa598d26a3a6.tar.gz
Merge branch 'v2.3-branch' into master
-rw-r--r--NEWS12
-rw-r--r--src/gen8_post_processing.c5
-rw-r--r--src/gen9_hevc_encoder.c55
-rw-r--r--src/gen9_hevc_encoder.h3
-rw-r--r--src/i965_drv_video.c1
-rw-r--r--src/i965_encoder_vp8.c2
6 files changed, 51 insertions, 27 deletions
diff --git a/NEWS b/NEWS
index 1678d45a..c42b3a5c 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,16 @@
-intel-vaapi-driver NEWS -- summary of changes. 2018-07-11
+intel-vaapi-driver NEWS -- summary of changes. 2018-12-10
Copyright (C) 2009-2018 Intel Corporation
+Version 2.3.0 - 10.Dec.2018
+* Bump version to 2.3.0
+* Add new PCI ID for KBL and CFL
+* Fix frame corruption when there are big MVs in VP8 encoding
+* Fix dynamically bitrate resetting in AVC encoding
+* Fix build errors when the toolchain doesn't support -fstack-protector
+* Fix memory leak issue
+* Make sure the achieved bitrate meet the requirement for VP8 encoding
+* Optimize VPP on GEN8
+
Version 2.2.0 - 11.Jul.2018
* Bump version to 2.2.0
* Add new PCI ID for KBL-Y
diff --git a/src/gen8_post_processing.c b/src/gen8_post_processing.c
index 36610731..c3a911b9 100644
--- a/src/gen8_post_processing.c
+++ b/src/gen8_post_processing.c
@@ -1621,6 +1621,11 @@ gen8_post_processing_context_finalize(VADriverContextP ctx,
pp_context->scaling_gpe_context_initialized = 0;
}
+ if (pp_context->clear_gpe_context_initialized) {
+ gen8_gpe_context_destroy(&pp_context->clear_gpe_context);
+ pp_context->clear_gpe_context_initialized = 0;
+ }
+
if (pp_context->vebox_proc_ctx) {
gen75_vebox_context_destroy(ctx, pp_context->vebox_proc_ctx);
pp_context->vebox_proc_ctx = NULL;
diff --git a/src/gen9_hevc_encoder.c b/src/gen9_hevc_encoder.c
index 5c7bee6a..d5b2d3b0 100644
--- a/src/gen9_hevc_encoder.c
+++ b/src/gen9_hevc_encoder.c
@@ -411,6 +411,7 @@ static void
gen9_hevc_enc_free_resources(struct encoder_vme_mfc_context *vme_context)
{
struct gen9_hevc_encoder_context *priv_ctx = NULL;
+ int i;
priv_ctx = (struct gen9_hevc_encoder_context *)vme_context->private_enc_ctx;
@@ -425,6 +426,8 @@ gen9_hevc_enc_free_resources(struct encoder_vme_mfc_context *vme_context)
i965_free_gpe_resource(&priv_ctx->res_brc_constant_data_buffer);
i965_free_gpe_resource(&priv_ctx->res_mb_code_surface);
+ i965_free_gpe_resource(&priv_ctx->res_min_distortion_buffer);
+ i965_free_gpe_resource(&priv_ctx->res_brc_mb_qp_buffer);
// free VME buffers
i965_free_gpe_resource(&priv_ctx->res_flatness_check_surface);
@@ -446,6 +449,7 @@ gen9_hevc_enc_free_resources(struct encoder_vme_mfc_context *vme_context)
i965_free_gpe_resource(&priv_ctx->res_mvp_index_buffer);
i965_free_gpe_resource(&priv_ctx->res_roi_buffer);
i965_free_gpe_resource(&priv_ctx->res_mb_statistics_buffer);
+ i965_free_gpe_resource(&priv_ctx->res_slice_map_buffer);
if (priv_ctx->scaled_2x_surface_obj) {
i965_DestroySurfaces(priv_ctx->ctx, &priv_ctx->scaled_2x_surface_id, 1);
@@ -462,6 +466,12 @@ gen9_hevc_enc_free_resources(struct encoder_vme_mfc_context *vme_context)
i965_free_gpe_resource(&priv_ctx->sao_line_buffer);
i965_free_gpe_resource(&priv_ctx->sao_tile_line_buffer);
i965_free_gpe_resource(&priv_ctx->sao_tile_column_buffer);
+ i965_free_gpe_resource(&priv_ctx->res_brc_pic_states_read_buffer);
+
+ for (i = 0; i < GEN9_MAX_MV_TEMPORAL_BUFFERS; i++) {
+ dri_bo_unreference(priv_ctx->mv_temporal_buffer[i].bo);
+ priv_ctx->mv_temporal_buffer[i].bo = NULL;
+ }
priv_ctx->res_inited = 0;
}
@@ -6315,9 +6325,8 @@ gen9_hevc_pak_add_pipe_buf_addr_state(VADriverContextP ctx,
OUT_BUFFER_MA_TARGET(NULL);
for (i = 0; i < GEN9_MAX_REF_SURFACES; i++) {
- if (priv_ctx->reference_surfaces[i].obj_surface &&
- priv_ctx->reference_surfaces[i].obj_surface->bo) {
- bo = priv_ctx->reference_surfaces[i].obj_surface->bo;
+ if (priv_ctx->reference_surfaces[i].obj_surface_bo) {
+ bo = priv_ctx->reference_surfaces[i].obj_surface_bo;
OUT_BUFFER_NMA_REFERENCE(bo);
} else
@@ -6996,19 +7005,17 @@ gen9_hevc_pak_pipeline_prepare(VADriverContextP ctx,
priv_state = (struct gen9_hevc_encoder_state *)pak_context->private_enc_state;
pic_param = (VAEncPictureParameterBufferHEVC *)encode_state->pic_param_ext->buffer;
- if (priv_ctx->uncompressed_picture_source.obj_surface &&
- priv_ctx->uncompressed_picture_source.obj_surface->bo)
- dri_bo_unreference(priv_ctx->uncompressed_picture_source.obj_surface->bo);
+ dri_bo_unreference(priv_ctx->uncompressed_picture_source.obj_surface_bo);
priv_ctx->uncompressed_picture_source.obj_surface = encode_state->input_yuv_object;
priv_ctx->uncompressed_picture_source.surface_id = encoder_context->input_yuv_surface;
- dri_bo_reference(priv_ctx->uncompressed_picture_source.obj_surface->bo);
+ priv_ctx->uncompressed_picture_source.obj_surface_bo = encode_state->input_yuv_object->bo;
+ dri_bo_reference(priv_ctx->uncompressed_picture_source.obj_surface_bo);
- if (priv_ctx->reconstructed_object.obj_surface &&
- priv_ctx->reconstructed_object.obj_surface->bo)
- dri_bo_unreference(priv_ctx->reconstructed_object.obj_surface->bo);
+ dri_bo_unreference(priv_ctx->reconstructed_object.obj_surface_bo);
priv_ctx->reconstructed_object.obj_surface = encode_state->reconstructed_object;
priv_ctx->reconstructed_object.surface_id = pic_param->decoded_curr_pic.picture_id;
- dri_bo_reference(priv_ctx->reconstructed_object.obj_surface->bo);
+ priv_ctx->reconstructed_object.obj_surface_bo = encode_state->reconstructed_object->bo;
+ dri_bo_reference(priv_ctx->reconstructed_object.obj_surface_bo);
surface_priv = (struct gen9_hevc_surface_priv *)encode_state->reconstructed_object->private_data;
if (surface_priv) {
@@ -7023,12 +7030,11 @@ gen9_hevc_pak_pipeline_prepare(VADriverContextP ctx,
for (i = 0; i < GEN9_MAX_REF_SURFACES; i++) {
obj_surface = encode_state->reference_objects[i];
if (obj_surface && obj_surface->bo) {
- if (priv_ctx->reference_surfaces[i].obj_surface &&
- priv_ctx->reference_surfaces[i].obj_surface->bo)
- dri_bo_unreference(priv_ctx->reference_surfaces[i].obj_surface->bo);
+ dri_bo_unreference(priv_ctx->reference_surfaces[i].obj_surface_bo);
priv_ctx->reference_surfaces[i].obj_surface = obj_surface;
priv_ctx->reference_surfaces[i].surface_id = pic_param->reference_frames[i].picture_id;
- dri_bo_reference(obj_surface->bo);
+ priv_ctx->reference_surfaces[i].obj_surface_bo = obj_surface->bo;
+ dri_bo_reference(priv_ctx->reference_surfaces[i].obj_surface_bo);
surface_priv = (struct gen9_hevc_surface_priv *) obj_surface->private_data;
if (surface_priv) {
@@ -7283,18 +7289,15 @@ gen9_hevc_pak_context_destroy(void *context)
dri_bo_unreference(priv_ctx->indirect_pak_bse_object.bo);
priv_ctx->indirect_pak_bse_object.bo = NULL;
- if (priv_ctx->uncompressed_picture_source.obj_surface &&
- priv_ctx->uncompressed_picture_source.obj_surface->bo)
- i965_destroy_surface_storage(priv_ctx->uncompressed_picture_source.obj_surface);
+ dri_bo_unreference(priv_ctx->uncompressed_picture_source.obj_surface_bo);
+ priv_ctx->uncompressed_picture_source.obj_surface_bo = NULL;
+ dri_bo_unreference(priv_ctx->reconstructed_object.obj_surface_bo);
+ priv_ctx->reconstructed_object.obj_surface_bo = NULL;
- if (priv_ctx->reconstructed_object.obj_surface &&
- priv_ctx->reconstructed_object.obj_surface->bo)
- i965_destroy_surface_storage(priv_ctx->reconstructed_object.obj_surface);
-
- for (i = 0; i < GEN9_MAX_REF_SURFACES; i++)
- if (priv_ctx->reference_surfaces[i].obj_surface &&
- priv_ctx->reference_surfaces[i].obj_surface->bo)
- i965_destroy_surface_storage(priv_ctx->reference_surfaces[i].obj_surface);
+ for (i = 0; i < GEN9_MAX_REF_SURFACES; i++) {
+ dri_bo_unreference(priv_ctx->reference_surfaces[i].obj_surface_bo);
+ priv_ctx->reference_surfaces[i].obj_surface_bo = NULL;
+ }
}
#define STATUS_IMPLEMENTATION_START
diff --git a/src/gen9_hevc_encoder.h b/src/gen9_hevc_encoder.h
index 3114f263..3057b661 100644
--- a/src/gen9_hevc_encoder.h
+++ b/src/gen9_hevc_encoder.h
@@ -556,16 +556,19 @@ struct gen9_hevc_encoder_context {
struct {
struct object_surface *obj_surface;
VASurfaceID surface_id;
+ dri_bo *obj_surface_bo;
} uncompressed_picture_source;
struct {
struct object_surface *obj_surface;
VASurfaceID surface_id;
+ dri_bo *obj_surface_bo;
} reconstructed_object;
struct {
struct object_surface *obj_surface;
VASurfaceID surface_id;
+ dri_bo *obj_surface_bo;
} reference_surfaces[GEN9_MAX_REF_SURFACES];
struct {
diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index 911c34df..e1b688ae 100644
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -2512,6 +2512,7 @@ i965_destroy_context(struct object_heap *heap, struct object_base *obj)
i965_release_buffer_store(&obj_context->codec_state.decode.iq_matrix);
i965_release_buffer_store(&obj_context->codec_state.decode.huffman_table);
i965_release_buffer_store(&obj_context->codec_state.decode.bit_plane);
+ i965_release_buffer_store(&obj_context->codec_state.decode.probability_data);
for (i = 0; i < obj_context->codec_state.decode.num_slice_params; i++)
i965_release_buffer_store(&obj_context->codec_state.decode.slice_params[i]);
diff --git a/src/i965_encoder_vp8.c b/src/i965_encoder_vp8.c
index 83fc9ec9..e2e09658 100644
--- a/src/i965_encoder_vp8.c
+++ b/src/i965_encoder_vp8.c
@@ -1237,6 +1237,8 @@ i965_encoder_vp8_free_surfaces(void **data)
vp8_surface->scaled_16x_surface_id = VA_INVALID_SURFACE;
vp8_surface->scaled_16x_surface_obj = NULL;
}
+
+ free(vp8_surface);
}
static void