Commit a97d2ba4 authored by Dafna Hirschfeld's avatar Dafna Hirschfeld
Browse files

replace EncParam with struct EncParam


Signed-off-by: Dafna Hirschfeld's avatarDafna Hirschfeld <dafna.hirschfeld@collabora.com>
parent 279f3892
......@@ -231,11 +231,11 @@ static void vpu_enc_start_encode(struct vpu_instance *inst)
struct vpu_buffer *src_vbuf = NULL;
struct vpu_buffer *dst_vbuf = NULL;
struct FrameBuffer frame_buf;
EncParam pic_param;
struct EncParam pic_param;
int32_t lumaSize = (inst->dst_fmt.width * inst->dst_fmt.height);
int32_t chromaSize = ((inst->dst_fmt.width/2) * (inst->dst_fmt.height/2));
memset(&pic_param, 0, sizeof(EncParam));
memset(&pic_param, 0, sizeof(struct EncParam));
src_buf = get_valid_src_buf(inst);
dst_buf = get_valid_dst_buf(inst);
......
......@@ -1060,7 +1060,7 @@ enum RetCode ProductVpuEncFiniSeq(CodecInst* instance)
return ret;
}
enum RetCode ProductVpuEncode(CodecInst* instance, EncParam* param)
enum RetCode ProductVpuEncode(CodecInst* instance, struct EncParam* param)
{
enum RetCode ret = RETCODE_NOT_FOUND_VPU_DEVICE;
......
......@@ -193,7 +193,7 @@ extern enum RetCode ProductVpuEncCheckOpenParam(
extern enum RetCode ProductVpuEncode(
CodecInst* instance,
EncParam* param
struct EncParam* param
);
extern enum RetCode ProductVpuEncGetResult(
......
......@@ -1412,7 +1412,7 @@ enum RetCode VPU_EncRegisterFrameBuffer(EncHandle handle, struct FrameBuffer* bu
enum RetCode VPU_EncStartOneFrame(
EncHandle handle,
EncParam * param
struct EncParam * param
)
{
CodecInst* pCodecInst;
......
......@@ -3173,7 +3173,7 @@ This parameter is ignored if rate control is disabled.
@* 0 : enable frame skip function.
@* 1 : disable frame skip function.
NOTE: This variable is for CODA9. For WAVE, host can use EncParam.skipPicture.
NOTE: This variable is for CODA9. For WAVE, host can use struct EncParam.skipPicture.
@endverbatim
*/
int frameSkipDisable;
......@@ -3530,7 +3530,7 @@ struct EncCodeOpt {
/**
* @brief This is a data structure for configuring picture encode operation. The variables can change every time one picture is encoded.
*/
typedef struct {
struct EncParam {
struct FrameBuffer* sourceFrame; /**< This member must represent the frame buffer containing source image to be encoded. */
/**
@verbatim
......@@ -3624,7 +3624,7 @@ This is only for CODA9.
uint32_t wpPixMeanCr; /**< Pixel mean value of Cr component for weighted prediction */
uint32_t forceAllCtuCoefDropEnable; /**< It forces all coefficients to be zero after TQ . */
struct FrameBuffer* OffsetTblBuffer; /**< A offset table buffer address for Cframe50 */
} EncParam;
};
/**
* @brief This structure is used for reporting encoder information. (CODA9 only)
......@@ -4618,7 +4618,7 @@ The given argument parameter, `parameter`, was invalid, which means it has a nul
pointer, or given values for some member variables are improper values.
*RETCODE_INVALID_FRAME_BUFFER* ::
This means sourceFrame in input structure EncParam was invalid, which means
This means sourceFrame in input structure struct EncParam was invalid, which means
sourceFrame was not valid even though picture-skip is disabled.
*RETCODE_QUEUEING_FAILURE* ::
......@@ -4628,7 +4628,7 @@ This means that the current API function call cannot be queued because queue buf
*/
enum RetCode VPU_EncStartOneFrame(
EncHandle handle, /**< [Input] An encoder handle obtained from VPU_EncOpen() */
EncParam * param /**< [Input] A pointer to <<vpuapi_h_EncParam>> structure which describes picture encoding parameters for the current encoder instance. */
struct EncParam * param /**< [Input] A pointer to <<vpuapi_h_EncParam>> structure which describes picture encoding parameters for the current encoder instance. */
);
/**
......
......@@ -327,7 +327,7 @@ enum RetCode CheckEncInstanceValidity(EncHandle handle)
return RETCODE_SUCCESS;
}
enum RetCode CheckEncParam(EncHandle handle, EncParam * param)
enum RetCode CheckEncParam(EncHandle handle, struct EncParam * param)
{
CodecInst *pCodecInst;
EncInfo *pEncInfo;
......
......@@ -885,7 +885,7 @@ int32_t CalcChromaSize(CodecInst* inst, int32_t productId, int32_t stride, int32
void SetTiledFrameBase(uint32_t coreIdx, PhysicalAddress baseAddr);
enum RetCode CheckEncInstanceValidity(EncHandle handle);
enum RetCode CheckEncParam(EncHandle handle, EncParam * param);
enum RetCode CheckEncParam(EncHandle handle, struct EncParam * param);
/* timescale: 1/90000 */
uint64_t GetTimestamp(EncHandle handle);
enum RetCode SetEncCropInfo(int32_t codecMode, struct EncWaveParam* param, int rotMode, int srcWidth, int srcHeight);
......
......@@ -2617,7 +2617,7 @@ enum RetCode Wave5VpuEncRegisterFramebuffer(CodecInst* inst, struct FrameBuffer*
return ret;
}
enum RetCode Wave5VpuEncode(CodecInst* instance, EncParam* option)
enum RetCode Wave5VpuEncode(CodecInst* instance, struct EncParam* option)
{
int32_t coreIdx, srcFrameFormat;
uint32_t regVal = 0, bsEndian;
......
......@@ -179,7 +179,7 @@ extern enum RetCode Wave5EncWriteProtect(
extern enum RetCode Wave5VpuEncode(
CodecInst* instance,
EncParam* option
struct EncParam* option
);
extern enum RetCode Wave5VpuEncGetResult(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment