diff options
Diffstat (limited to 'src/lnc_H263ES.c')
-rw-r--r-- | src/lnc_H263ES.c | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/src/lnc_H263ES.c b/src/lnc_H263ES.c index 98c4751..a9cda85 100644 --- a/src/lnc_H263ES.c +++ b/src/lnc_H263ES.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2011 Intel Corporation. All Rights Reserved. - * Copyright (c) Imagination Technologies Limited, UK + * Copyright (c) Imagination Technologies Limited, UK * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the @@ -9,11 +9,11 @@ * distribute, sub license, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: - * + * * The above copyright notice and this permission notice (including the * next paragraph) shall be included in all copies or substantial portions * of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. @@ -83,10 +83,21 @@ static void lnc_H263ES_QueryConfigAttributes( static VAStatus lnc_H263ES_ValidateConfig( object_config_p obj_config) { - VAStatus vaStatus = VA_STATUS_SUCCESS; - psb__information_message("lnc_H263ES_ValidateConfig\n"); + int i; + /* Check all attributes */ + for (i = 0; i < obj_config->attrib_count; i++) { + switch (obj_config->attrib_list[i].type) { + case VAConfigAttribRTFormat: + /* Ignore */ + break; + case VAConfigAttribRateControl: + break; + default: + return VA_STATUS_ERROR_ATTR_NOT_SUPPORTED; + } + } - return vaStatus; + return VA_STATUS_SUCCESS; } @@ -281,7 +292,7 @@ static VAStatus lnc__H263ES_process_picture_param(context_ENC_p ctx, object_buff */ cmdbuf->cmd_idx_saved_frameskip = cmdbuf->cmd_idx; if (!(ctx->sRCParams.RCEnable && ctx->sRCParams.FrameSkip)) { - lnc__H263_prepare_picture_header(cmdbuf->header_mem_p + ctx->pic_header_ofs, + lnc__H263_prepare_picture_header((IMG_UINT32 *)(cmdbuf->header_mem_p + ctx->pic_header_ofs), ctx->obj_context->frame_count, pBuffer->picture_type, SourceFormatType, @@ -307,7 +318,7 @@ static VAStatus lnc__H263ES_process_slice_param(context_ENC_p ctx, object_buffer VAEncSliceParameterBuffer *pBuffer; lnc_cmdbuf_p cmdbuf = ctx->obj_context->lnc_cmdbuf; PIC_PARAMS *psPicParams = (PIC_PARAMS *)(cmdbuf->pic_params_p); - int i; + unsigned int i; int slice_param_idx; ASSERT(obj_buffer->type == VAEncSliceParameterBufferType); @@ -361,7 +372,7 @@ static VAStatus lnc__H263ES_process_slice_param(context_ENC_p ctx, object_buffer /* Insert Do Header command, relocation is needed */ if (ctx->obj_context->slice_count) { /*First slice of a frame need not slice header*/ lnc__H263_prepare_GOBslice_header( - cmdbuf->header_mem_p + ctx->slice_header_ofs + ctx->obj_context->slice_count * HEADER_SIZE, + (IMG_UINT32 *)(cmdbuf->header_mem_p + ctx->slice_header_ofs + ctx->obj_context->slice_count * HEADER_SIZE), ctx->obj_context->slice_count, ctx->obj_context->frame_count); |