hardware/intel/common/vaapi
リビジョン | 72f10f16f7e5767492acde130eeeaa598d26a3a6 (tree) |
---|---|
日時 | 2018-12-11 11:35:27 |
作者 | Haihao Xiang <haihao.xiang@inte...> |
コミッター | Haihao Xiang |
Merge branch 'v2.3-branch' into master
@@ -1,6 +1,16 @@ | ||
1 | -intel-vaapi-driver NEWS -- summary of changes. 2018-07-11 | |
1 | +intel-vaapi-driver NEWS -- summary of changes. 2018-12-10 | |
2 | 2 | Copyright (C) 2009-2018 Intel Corporation |
3 | 3 | |
4 | +Version 2.3.0 - 10.Dec.2018 | |
5 | +* Bump version to 2.3.0 | |
6 | +* Add new PCI ID for KBL and CFL | |
7 | +* Fix frame corruption when there are big MVs in VP8 encoding | |
8 | +* Fix dynamically bitrate resetting in AVC encoding | |
9 | +* Fix build errors when the toolchain doesn't support -fstack-protector | |
10 | +* Fix memory leak issue | |
11 | +* Make sure the achieved bitrate meet the requirement for VP8 encoding | |
12 | +* Optimize VPP on GEN8 | |
13 | + | |
4 | 14 | Version 2.2.0 - 11.Jul.2018 |
5 | 15 | * Bump version to 2.2.0 |
6 | 16 | * Add new PCI ID for KBL-Y |
@@ -1621,6 +1621,11 @@ gen8_post_processing_context_finalize(VADriverContextP ctx, | ||
1621 | 1621 | pp_context->scaling_gpe_context_initialized = 0; |
1622 | 1622 | } |
1623 | 1623 | |
1624 | + if (pp_context->clear_gpe_context_initialized) { | |
1625 | + gen8_gpe_context_destroy(&pp_context->clear_gpe_context); | |
1626 | + pp_context->clear_gpe_context_initialized = 0; | |
1627 | + } | |
1628 | + | |
1624 | 1629 | if (pp_context->vebox_proc_ctx) { |
1625 | 1630 | gen75_vebox_context_destroy(ctx, pp_context->vebox_proc_ctx); |
1626 | 1631 | pp_context->vebox_proc_ctx = NULL; |
@@ -411,6 +411,7 @@ static void | ||
411 | 411 | gen9_hevc_enc_free_resources(struct encoder_vme_mfc_context *vme_context) |
412 | 412 | { |
413 | 413 | struct gen9_hevc_encoder_context *priv_ctx = NULL; |
414 | + int i; | |
414 | 415 | |
415 | 416 | priv_ctx = (struct gen9_hevc_encoder_context *)vme_context->private_enc_ctx; |
416 | 417 |
@@ -425,6 +426,8 @@ gen9_hevc_enc_free_resources(struct encoder_vme_mfc_context *vme_context) | ||
425 | 426 | i965_free_gpe_resource(&priv_ctx->res_brc_constant_data_buffer); |
426 | 427 | |
427 | 428 | i965_free_gpe_resource(&priv_ctx->res_mb_code_surface); |
429 | + i965_free_gpe_resource(&priv_ctx->res_min_distortion_buffer); | |
430 | + i965_free_gpe_resource(&priv_ctx->res_brc_mb_qp_buffer); | |
428 | 431 | |
429 | 432 | // free VME buffers |
430 | 433 | 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) | ||
446 | 449 | i965_free_gpe_resource(&priv_ctx->res_mvp_index_buffer); |
447 | 450 | i965_free_gpe_resource(&priv_ctx->res_roi_buffer); |
448 | 451 | i965_free_gpe_resource(&priv_ctx->res_mb_statistics_buffer); |
452 | + i965_free_gpe_resource(&priv_ctx->res_slice_map_buffer); | |
449 | 453 | |
450 | 454 | if (priv_ctx->scaled_2x_surface_obj) { |
451 | 455 | 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) | ||
462 | 466 | i965_free_gpe_resource(&priv_ctx->sao_line_buffer); |
463 | 467 | i965_free_gpe_resource(&priv_ctx->sao_tile_line_buffer); |
464 | 468 | i965_free_gpe_resource(&priv_ctx->sao_tile_column_buffer); |
469 | + i965_free_gpe_resource(&priv_ctx->res_brc_pic_states_read_buffer); | |
470 | + | |
471 | + for (i = 0; i < GEN9_MAX_MV_TEMPORAL_BUFFERS; i++) { | |
472 | + dri_bo_unreference(priv_ctx->mv_temporal_buffer[i].bo); | |
473 | + priv_ctx->mv_temporal_buffer[i].bo = NULL; | |
474 | + } | |
465 | 475 | |
466 | 476 | priv_ctx->res_inited = 0; |
467 | 477 | } |
@@ -6315,9 +6325,8 @@ gen9_hevc_pak_add_pipe_buf_addr_state(VADriverContextP ctx, | ||
6315 | 6325 | OUT_BUFFER_MA_TARGET(NULL); |
6316 | 6326 | |
6317 | 6327 | for (i = 0; i < GEN9_MAX_REF_SURFACES; i++) { |
6318 | - if (priv_ctx->reference_surfaces[i].obj_surface && | |
6319 | - priv_ctx->reference_surfaces[i].obj_surface->bo) { | |
6320 | - bo = priv_ctx->reference_surfaces[i].obj_surface->bo; | |
6328 | + if (priv_ctx->reference_surfaces[i].obj_surface_bo) { | |
6329 | + bo = priv_ctx->reference_surfaces[i].obj_surface_bo; | |
6321 | 6330 | |
6322 | 6331 | OUT_BUFFER_NMA_REFERENCE(bo); |
6323 | 6332 | } else |
@@ -6996,19 +7005,17 @@ gen9_hevc_pak_pipeline_prepare(VADriverContextP ctx, | ||
6996 | 7005 | priv_state = (struct gen9_hevc_encoder_state *)pak_context->private_enc_state; |
6997 | 7006 | pic_param = (VAEncPictureParameterBufferHEVC *)encode_state->pic_param_ext->buffer; |
6998 | 7007 | |
6999 | - if (priv_ctx->uncompressed_picture_source.obj_surface && | |
7000 | - priv_ctx->uncompressed_picture_source.obj_surface->bo) | |
7001 | - dri_bo_unreference(priv_ctx->uncompressed_picture_source.obj_surface->bo); | |
7008 | + dri_bo_unreference(priv_ctx->uncompressed_picture_source.obj_surface_bo); | |
7002 | 7009 | priv_ctx->uncompressed_picture_source.obj_surface = encode_state->input_yuv_object; |
7003 | 7010 | priv_ctx->uncompressed_picture_source.surface_id = encoder_context->input_yuv_surface; |
7004 | - dri_bo_reference(priv_ctx->uncompressed_picture_source.obj_surface->bo); | |
7011 | + priv_ctx->uncompressed_picture_source.obj_surface_bo = encode_state->input_yuv_object->bo; | |
7012 | + dri_bo_reference(priv_ctx->uncompressed_picture_source.obj_surface_bo); | |
7005 | 7013 | |
7006 | - if (priv_ctx->reconstructed_object.obj_surface && | |
7007 | - priv_ctx->reconstructed_object.obj_surface->bo) | |
7008 | - dri_bo_unreference(priv_ctx->reconstructed_object.obj_surface->bo); | |
7014 | + dri_bo_unreference(priv_ctx->reconstructed_object.obj_surface_bo); | |
7009 | 7015 | priv_ctx->reconstructed_object.obj_surface = encode_state->reconstructed_object; |
7010 | 7016 | priv_ctx->reconstructed_object.surface_id = pic_param->decoded_curr_pic.picture_id; |
7011 | - dri_bo_reference(priv_ctx->reconstructed_object.obj_surface->bo); | |
7017 | + priv_ctx->reconstructed_object.obj_surface_bo = encode_state->reconstructed_object->bo; | |
7018 | + dri_bo_reference(priv_ctx->reconstructed_object.obj_surface_bo); | |
7012 | 7019 | |
7013 | 7020 | surface_priv = (struct gen9_hevc_surface_priv *)encode_state->reconstructed_object->private_data; |
7014 | 7021 | if (surface_priv) { |
@@ -7023,12 +7030,11 @@ gen9_hevc_pak_pipeline_prepare(VADriverContextP ctx, | ||
7023 | 7030 | for (i = 0; i < GEN9_MAX_REF_SURFACES; i++) { |
7024 | 7031 | obj_surface = encode_state->reference_objects[i]; |
7025 | 7032 | if (obj_surface && obj_surface->bo) { |
7026 | - if (priv_ctx->reference_surfaces[i].obj_surface && | |
7027 | - priv_ctx->reference_surfaces[i].obj_surface->bo) | |
7028 | - dri_bo_unreference(priv_ctx->reference_surfaces[i].obj_surface->bo); | |
7033 | + dri_bo_unreference(priv_ctx->reference_surfaces[i].obj_surface_bo); | |
7029 | 7034 | priv_ctx->reference_surfaces[i].obj_surface = obj_surface; |
7030 | 7035 | priv_ctx->reference_surfaces[i].surface_id = pic_param->reference_frames[i].picture_id; |
7031 | - dri_bo_reference(obj_surface->bo); | |
7036 | + priv_ctx->reference_surfaces[i].obj_surface_bo = obj_surface->bo; | |
7037 | + dri_bo_reference(priv_ctx->reference_surfaces[i].obj_surface_bo); | |
7032 | 7038 | |
7033 | 7039 | surface_priv = (struct gen9_hevc_surface_priv *) obj_surface->private_data; |
7034 | 7040 | if (surface_priv) { |
@@ -7283,18 +7289,15 @@ gen9_hevc_pak_context_destroy(void *context) | ||
7283 | 7289 | dri_bo_unreference(priv_ctx->indirect_pak_bse_object.bo); |
7284 | 7290 | priv_ctx->indirect_pak_bse_object.bo = NULL; |
7285 | 7291 | |
7286 | - if (priv_ctx->uncompressed_picture_source.obj_surface && | |
7287 | - priv_ctx->uncompressed_picture_source.obj_surface->bo) | |
7288 | - i965_destroy_surface_storage(priv_ctx->uncompressed_picture_source.obj_surface); | |
7292 | + dri_bo_unreference(priv_ctx->uncompressed_picture_source.obj_surface_bo); | |
7293 | + priv_ctx->uncompressed_picture_source.obj_surface_bo = NULL; | |
7294 | + dri_bo_unreference(priv_ctx->reconstructed_object.obj_surface_bo); | |
7295 | + priv_ctx->reconstructed_object.obj_surface_bo = NULL; | |
7289 | 7296 | |
7290 | - if (priv_ctx->reconstructed_object.obj_surface && | |
7291 | - priv_ctx->reconstructed_object.obj_surface->bo) | |
7292 | - i965_destroy_surface_storage(priv_ctx->reconstructed_object.obj_surface); | |
7293 | - | |
7294 | - for (i = 0; i < GEN9_MAX_REF_SURFACES; i++) | |
7295 | - if (priv_ctx->reference_surfaces[i].obj_surface && | |
7296 | - priv_ctx->reference_surfaces[i].obj_surface->bo) | |
7297 | - i965_destroy_surface_storage(priv_ctx->reference_surfaces[i].obj_surface); | |
7297 | + for (i = 0; i < GEN9_MAX_REF_SURFACES; i++) { | |
7298 | + dri_bo_unreference(priv_ctx->reference_surfaces[i].obj_surface_bo); | |
7299 | + priv_ctx->reference_surfaces[i].obj_surface_bo = NULL; | |
7300 | + } | |
7298 | 7301 | } |
7299 | 7302 | |
7300 | 7303 | #define STATUS_IMPLEMENTATION_START |
@@ -556,16 +556,19 @@ struct gen9_hevc_encoder_context { | ||
556 | 556 | struct { |
557 | 557 | struct object_surface *obj_surface; |
558 | 558 | VASurfaceID surface_id; |
559 | + dri_bo *obj_surface_bo; | |
559 | 560 | } uncompressed_picture_source; |
560 | 561 | |
561 | 562 | struct { |
562 | 563 | struct object_surface *obj_surface; |
563 | 564 | VASurfaceID surface_id; |
565 | + dri_bo *obj_surface_bo; | |
564 | 566 | } reconstructed_object; |
565 | 567 | |
566 | 568 | struct { |
567 | 569 | struct object_surface *obj_surface; |
568 | 570 | VASurfaceID surface_id; |
571 | + dri_bo *obj_surface_bo; | |
569 | 572 | } reference_surfaces[GEN9_MAX_REF_SURFACES]; |
570 | 573 | |
571 | 574 | struct { |
@@ -2512,6 +2512,7 @@ i965_destroy_context(struct object_heap *heap, struct object_base *obj) | ||
2512 | 2512 | i965_release_buffer_store(&obj_context->codec_state.decode.iq_matrix); |
2513 | 2513 | i965_release_buffer_store(&obj_context->codec_state.decode.huffman_table); |
2514 | 2514 | i965_release_buffer_store(&obj_context->codec_state.decode.bit_plane); |
2515 | + i965_release_buffer_store(&obj_context->codec_state.decode.probability_data); | |
2515 | 2516 | |
2516 | 2517 | for (i = 0; i < obj_context->codec_state.decode.num_slice_params; i++) |
2517 | 2518 | i965_release_buffer_store(&obj_context->codec_state.decode.slice_params[i]); |
@@ -1237,6 +1237,8 @@ i965_encoder_vp8_free_surfaces(void **data) | ||
1237 | 1237 | vp8_surface->scaled_16x_surface_id = VA_INVALID_SURFACE; |
1238 | 1238 | vp8_surface->scaled_16x_surface_obj = NULL; |
1239 | 1239 | } |
1240 | + | |
1241 | + free(vp8_surface); | |
1240 | 1242 | } |
1241 | 1243 | |
1242 | 1244 | static void |