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

replace DecInfo with struct DecInfo


Signed-off-by: Dafna Hirschfeld's avatarDafna Hirschfeld <dafna.hirschfeld@collabora.com>
parent d0d89b25
......@@ -200,7 +200,7 @@ PhysicalAddress ProductVpuDecGetRdPtr(CodecInst* instance)
int32_t productId;
uint32_t coreIdx;
PhysicalAddress retRdPtr;
DecInfo* pDecInfo;
struct DecInfo* pDecInfo;
enum RetCode ret = RETCODE_SUCCESS;
pDecInfo = VPU_HANDLE_TO_DECINFO(instance);
......@@ -366,7 +366,7 @@ enum RetCode ProductVpuDecGetSeqInfo(CodecInst* instance, struct DecInitialInfo*
enum RetCode ProductVpuDecCheckCapability(CodecInst* instance)
{
DecInfo* pDecInfo;
struct DecInfo* pDecInfo;
struct VpuAttr* pAttr = &g_VpuCoreAttributes[instance->coreIdx];
pDecInfo = &instance->CodecInfo->decInfo;
......@@ -437,7 +437,7 @@ enum RetCode ProductVpuDecSetBitstreamFlag(
BOOL eos;
BOOL checkEos;
BOOL explicitEnd;
DecInfo* pDecInfo = &instance->CodecInfo->decInfo;
struct DecInfo* pDecInfo = &instance->CodecInfo->decInfo;
productId = instance->productId;
......@@ -471,7 +471,7 @@ enum RetCode ProductVpuAllocateFramebuffer(
uint32_t coreIdx;
vpu_buffer_t vbFrame;
FrameBufInfo fbInfo;
DecInfo* pDecInfo = &inst->CodecInfo->decInfo;
struct DecInfo* pDecInfo = &inst->CodecInfo->decInfo;
EncInfo* pEncInfo = &inst->CodecInfo->encInfo;
// Variables for TILED_FRAME/FILED_MB_RASTER
uint32_t sizeLuma;
......@@ -548,7 +548,7 @@ enum RetCode ProductVpuRegisterFramebuffer(CodecInst* instance)
{
enum RetCode ret = RETCODE_FAILURE;
struct FrameBuffer* fb;
DecInfo* pDecInfo = &instance->CodecInfo->decInfo;
struct DecInfo* pDecInfo = &instance->CodecInfo->decInfo;
int32_t gdiIndex = 0;
EncInfo* pEncInfo = &instance->CodecInfo->encInfo;
switch (instance->productId) {
......
......@@ -171,7 +171,7 @@ enum RetCode VPU_GetVersionInfo(uint32_t coreIdx, uint32_t *versionInfo, uint32_
enum RetCode VPU_DecOpen(DecHandle* pHandle, struct DecOpenParam* pop)
{
CodecInst * pCodecInst;
DecInfo* pDecInfo;
struct DecInfo* pDecInfo;
enum RetCode ret;
ret = ProductVpuDecCheckOpenParam(pop);
......@@ -198,7 +198,7 @@ enum RetCode VPU_DecOpen(DecHandle* pHandle, struct DecOpenParam* pop)
pCodecInst->isDecoder = TRUE;
*pHandle = pCodecInst;
pDecInfo = &pCodecInst->CodecInfo->decInfo;
memset(pDecInfo, 0x00, sizeof(DecInfo));
memset(pDecInfo, 0x00, sizeof(struct DecInfo));
memcpy((void*)&pDecInfo->openParam, pop, sizeof(struct DecOpenParam));
if (pop->bitstreamFormat == STD_MPEG4) {
......@@ -303,7 +303,7 @@ enum RetCode VPU_DecOpen(DecHandle* pHandle, struct DecOpenParam* pop)
enum RetCode VPU_DecClose(DecHandle handle)
{
CodecInst * pCodecInst;
DecInfo * pDecInfo;
struct DecInfo * pDecInfo;
enum RetCode ret;
int i;
......@@ -422,7 +422,7 @@ enum RetCode VPU_DecIssueSeqInit(DecHandle handle)
enum RetCode VPU_DecCompleteSeqInit(DecHandle handle, struct DecInitialInfo * info)
{
CodecInst* pCodecInst;
DecInfo* pDecInfo;
struct DecInfo* pDecInfo;
enum RetCode ret;
struct VpuAttr* pAttr;
......@@ -473,7 +473,7 @@ enum RetCode VPU_DecCompleteSeqInit(DecHandle handle, struct DecInitialInfo * in
static enum RetCode DecRegisterFrameBuffer(DecHandle handle, struct FrameBuffer *bufArray, int numFbsForDecoding, int numFbsForWTL, int stride, int height, int mapType)
{
CodecInst* pCodecInst;
DecInfo* pDecInfo;
struct DecInfo* pDecInfo;
int32_t i;
enum RetCode ret;
struct FrameBuffer* fb, nullFb;
......@@ -592,7 +592,7 @@ enum RetCode VPU_DecRegisterFrameBufferEx(DecHandle handle, struct FrameBuffer *
enum RetCode VPU_DecGetBitstreamBuffer(DecHandle handle, PhysicalAddress* prdPtr, PhysicalAddress* pwrPtr, uint32_t* size)
{
CodecInst* pCodecInst;
DecInfo* pDecInfo;
struct DecInfo* pDecInfo;
PhysicalAddress rdPtr;
PhysicalAddress wrPtr;
PhysicalAddress tempPtr;
......@@ -655,7 +655,7 @@ enum RetCode VPU_DecGetBitstreamBuffer(DecHandle handle, PhysicalAddress* prdPtr
enum RetCode VPU_DecUpdateBitstreamBuffer(DecHandle handle, int size)
{
CodecInst* pCodecInst;
DecInfo* pDecInfo;
struct DecInfo* pDecInfo;
PhysicalAddress wrPtr;
PhysicalAddress rdPtr;
enum RetCode ret;
......@@ -730,7 +730,7 @@ enum RetCode VPU_DecUpdateBitstreamBuffer(DecHandle handle, int size)
enum RetCode VPU_DecStartOneFrame(DecHandle handle, struct DecParam *param)
{
CodecInst* pCodecInst;
DecInfo* pDecInfo;
struct DecInfo* pDecInfo;
uint32_t val = 0;
enum RetCode ret = RETCODE_SUCCESS;
struct VpuAttr* pAttr = NULL;
......@@ -787,7 +787,7 @@ enum RetCode VPU_DecStartOneFrame(DecHandle handle, struct DecParam *param)
enum RetCode VPU_DecGetOutputInfo(DecHandle handle, struct DecOutputInfo* info)
{
CodecInst* pCodecInst;
DecInfo* pDecInfo;
struct DecInfo* pDecInfo;
enum RetCode ret;
struct VpuRect rectInfo;
uint32_t val;
......@@ -1131,7 +1131,7 @@ enum RetCode VPU_RunMapConverter(void* handle, struct FrameBuffer* frame, Physic
enum RetCode VPU_DecClrDispFlag(DecHandle handle, int index)
{
CodecInst* pCodecInst;
DecInfo* pDecInfo;
struct DecInfo* pDecInfo;
enum RetCode ret = RETCODE_SUCCESS;
int32_t endIndex;
struct VpuAttr* pAttr = NULL;
......@@ -1171,7 +1171,7 @@ enum RetCode VPU_DecClrDispFlag(DecHandle handle, int index)
enum RetCode VPU_DecGiveCommand(DecHandle handle, enum CodecCommand cmd, void* param)
{
CodecInst* pCodecInst;
DecInfo* pDecInfo;
struct DecInfo* pDecInfo;
enum RetCode ret;
ret = CheckDecInstanceValidity(handle);
......
......@@ -140,7 +140,7 @@ enum RetCode GetCodecInstance(uint32_t coreIdx, CodecInst ** ppInst)
pCodecInst->productId = ProductVpuGetId(coreIdx);
memset((void*)&pCodecInst->CodecInfo, 0x00, sizeof(pCodecInst->CodecInfo));
handleSize = sizeof(DecInfo);
handleSize = sizeof(struct DecInfo);
if (handleSize < sizeof(EncInfo)) {
handleSize = sizeof(EncInfo);
}
......
......@@ -151,7 +151,7 @@ struct vpu_rpt_info_t {
int32_t level;
};
typedef struct {
struct DecInfo {
struct DecOpenParam openParam;
struct DecInitialInfo initialInfo;
struct DecInitialInfo newSeqInfo; /* Temporal new sequence information */
......@@ -180,7 +180,7 @@ typedef struct {
int ppuAllocExt;
int numFrameBuffers;
int numFbsForDecoding; /*!<< number of framebuffers used in decoding */
int numFbsForWTL; /*!<< number of linear framebuffer for displaying when DecInfo::wtlEnable is set to 1 */
int numFbsForWTL; /*!<< number of linear framebuffer for displaying when struct DecInfo::wtlEnable is set to 1 */
int stride;
int frameBufferHeight;
int rotationEnable;
......@@ -236,7 +236,7 @@ typedef struct {
uint32_t vlcBufSize;
uint32_t paramBufSize;
struct vpu_rpt_info_t rpt_info;
} DecInfo;
};
typedef struct {
struct EncOpenParam openParam;
......@@ -320,7 +320,7 @@ typedef struct CodecInst {
uint32_t isDecoder;
union {
EncInfo encInfo;
DecInfo decInfo;
struct DecInfo decInfo;
}* CodecInfo;
} CodecInst;
......
......@@ -361,7 +361,7 @@ enum RetCode Wave5VpuInit(uint32_t coreIdx, void* firmware, uint32_t size)
enum RetCode Wave5VpuBuildUpDecParam(CodecInst* instance, struct DecOpenParam* param)
{
enum RetCode ret = RETCODE_SUCCESS;
DecInfo* pDecInfo = VPU_HANDLE_TO_DECINFO(instance);
struct DecInfo* pDecInfo = VPU_HANDLE_TO_DECINFO(instance);
uint32_t bsEndian = 0;
vpu_buffer_t vb;
......@@ -460,7 +460,7 @@ enum RetCode Wave5VpuBuildUpDecParam(CodecInst* instance, struct DecOpenParam* p
enum RetCode Wave5VpuDecInitSeq(CodecInst* instance)
{
enum RetCode ret = RETCODE_SUCCESS;
DecInfo* pDecInfo;
struct DecInfo* pDecInfo;
uint32_t cmdOption = INIT_SEQ_NORMAL, bsOption;
uint32_t regVal;
......@@ -540,7 +540,7 @@ enum RetCode Wave5VpuDecInitSeq(CodecInst* instance)
static void GetDecSequenceResult(CodecInst* instance, struct DecInitialInfo* info)
{
DecInfo* pDecInfo = &instance->CodecInfo->decInfo;
struct DecInfo* pDecInfo = &instance->CodecInfo->decInfo;
uint32_t regVal, subLayerInfo;
uint32_t profileCompatibilityFlag;
uint32_t left, right, top, bottom;
......@@ -645,7 +645,7 @@ enum RetCode Wave5VpuDecGetSeqInfo(CodecInst* instance, struct DecInitialInfo* i
{
enum RetCode ret = RETCODE_SUCCESS;
uint32_t regVal, i;
DecInfo* pDecInfo;
struct DecInfo* pDecInfo;
pDecInfo = VPU_HANDLE_TO_DECINFO(instance);
......@@ -719,7 +719,7 @@ enum RetCode Wave5VpuDecGetSeqInfo(CodecInst* instance, struct DecInitialInfo* i
enum RetCode Wave5VpuDecRegisterFramebuffer(CodecInst* inst, struct FrameBuffer* fbArr, enum TiledMapType mapType, uint32_t count)
{
enum RetCode ret = RETCODE_SUCCESS;
DecInfo* pDecInfo = &inst->CodecInfo->decInfo;
struct DecInfo* pDecInfo = &inst->CodecInfo->decInfo;
int32_t q, j, i, remain, idx;
uint32_t mvCount;
uint32_t k;
......@@ -982,7 +982,7 @@ enum RetCode Wave5VpuDecRegisterFramebuffer(CodecInst* inst, struct FrameBuffer*
enum RetCode Wave5VpuDecode(CodecInst* instance, struct DecParam* option)
{
DecInfo* pDecInfo = &instance->CodecInfo->decInfo;
struct DecInfo* pDecInfo = &instance->CodecInfo->decInfo;
struct DecOpenParam* pOpenParam = &pDecInfo->openParam;
uint32_t modeOption = DEC_PIC_NORMAL, bsOption, regVal;
int32_t forceLatency = -1;
......@@ -1093,7 +1093,7 @@ enum RetCode Wave5VpuDecGetResult(CodecInst* instance, struct DecOutputInfo* res
{
enum RetCode ret = RETCODE_SUCCESS;
uint32_t regVal, subLayerInfo, index, nalUnitType;
DecInfo* pDecInfo;
struct DecInfo* pDecInfo;
vpu_instance_pool_t* instancePool = NULL;
pDecInfo = VPU_HANDLE_TO_DECINFO(instance);
......@@ -1745,7 +1745,7 @@ enum RetCode Wave5VpuDecFiniSeq(CodecInst* instance)
enum RetCode Wave5VpuDecSetBitstreamFlag(CodecInst* instance, BOOL running, BOOL eos, BOOL explictEnd)
{
DecInfo* pDecInfo = &instance->CodecInfo->decInfo;
struct DecInfo* pDecInfo = &instance->CodecInfo->decInfo;
enum BitStreamMode bsMode = (enum BitStreamMode)pDecInfo->openParam.bitstreamMode;
pDecInfo->streamEndflag = (eos == 1) ? TRUE : FALSE;
......@@ -1772,7 +1772,7 @@ enum RetCode Wave5VpuDecSetBitstreamFlag(CodecInst* instance, BOOL running, BOOL
enum RetCode Wave5DecClrDispFlag(CodecInst* instance, uint32_t index)
{
enum RetCode ret = RETCODE_SUCCESS;
DecInfo * pDecInfo;
struct DecInfo * pDecInfo;
pDecInfo = &instance->CodecInfo->decInfo;
VpuWriteReg(instance->coreIdx, W5_CMD_DEC_CLR_DISP_IDC, (1<<index));
......
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