[Libva] [PATCH] Disable the context check to avoid JPEG ENC failed

Xiang, Haihao haihao.xiang at intel.com
Sun Feb 1 20:38:22 PST 2015


Applied.

Thanks
Haihao

> https://bugs.freedesktop.org/show_bug.cgi?id=88728
> Signed-off-by: Qu,Pengfei <Pengfei.Qu at intel.com>
> ---
>  src/i965_drv_video.c | 32 +-------------------------------
>  1 file changed, 1 insertion(+), 31 deletions(-)
> 
> diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
> index 7039dd3..d87a232 100644
> --- a/src/i965_drv_video.c
> +++ b/src/i965_drv_video.c
> @@ -1999,21 +1999,8 @@ i965_create_buffer_internal(VADriverContextP ctx,
>      struct object_buffer *obj_buffer = NULL;
>      struct buffer_store *buffer_store = NULL;
>      int bufferID;
> -    struct object_context *obj_context = NULL;
> -    struct object_config *obj_config = NULL;
>      VAStatus vaStatus = VA_STATUS_ERROR_UNKNOWN;
>  
> -    if (i965->current_context_id == VA_INVALID_ID)
> -        return vaStatus;
> -
> -    obj_context = CONTEXT(i965->current_context_id);
> -
> -    if (!obj_context)
> -        return vaStatus;
> -
> -    obj_config = obj_context->obj_config;
> -    assert(obj_config);
> -
>      /* Validate type */
>      switch (type) {
>      case VAPictureParameterBufferType:
> @@ -2086,11 +2073,7 @@ i965_create_buffer_internal(VADriverContextP ctx,
>              struct i965_coded_buffer_segment *coded_buffer_segment;
>  
>              dri_bo_map(buffer_store->bo, 1);
> -            if(obj_config->profile == VAProfileHEVCMain){
> -                coded_buffer_segment = (struct i965_coded_buffer_segment *)(buffer_store->bo->virtual + ALIGN(size - 0x1000, 0x1000));
> -            }else {
> -                coded_buffer_segment = (struct i965_coded_buffer_segment *)buffer_store->bo->virtual;
> -            }
> +            coded_buffer_segment = (struct i965_coded_buffer_segment *)buffer_store->bo->virtual;
>              coded_buffer_segment->base.size = size - I965_CODEDBUFFER_HEADER_SIZE;
>              coded_buffer_segment->base.bit_offset = 0;
>              coded_buffer_segment->base.status = 0;
> @@ -2168,22 +2151,9 @@ i965_MapBuffer(VADriverContextP ctx,
>                 void **pbuf)             /* out */
>  {
>      struct i965_driver_data *i965 = i965_driver_data(ctx);
> -    struct object_context *obj_context = NULL;
> -    struct object_config *obj_config = NULL;
>      struct object_buffer *obj_buffer = BUFFER(buf_id);
>      VAStatus vaStatus = VA_STATUS_ERROR_UNKNOWN;
>  
> -    if (i965->current_context_id == VA_INVALID_ID)
> -        return vaStatus;
> -
> -    obj_context = CONTEXT(i965->current_context_id);
> -
> -    if (!obj_context)
> -        return vaStatus;
> -
> -    obj_config = obj_context->obj_config;
> -    assert(obj_config);
> -
>      ASSERT_RET(obj_buffer && obj_buffer->buffer_store, VA_STATUS_ERROR_INVALID_BUFFER);
>      ASSERT_RET(obj_buffer->buffer_store->bo || obj_buffer->buffer_store->buffer, VA_STATUS_ERROR_INVALID_BUFFER);
>      ASSERT_RET(!(obj_buffer->buffer_store->bo && obj_buffer->buffer_store->buffer), VA_STATUS_ERROR_INVALID_BUFFER);




More information about the Libva mailing list