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

replace DecHandle with struct CodecInst


Signed-off-by: Dafna Hirschfeld's avatarDafna Hirschfeld <dafna.hirschfeld@collabora.com>
parent b5817a4e
......@@ -168,7 +168,7 @@ enum RetCode VPU_GetVersionInfo(uint32_t coreIdx, uint32_t *versionInfo, uint32_
return ret;
}
enum RetCode VPU_DecOpen(DecHandle* pHandle, struct DecOpenParam* pop)
enum RetCode VPU_DecOpen(struct CodecInst** pHandle, struct DecOpenParam* pop)
{
struct CodecInst * pCodecInst;
struct DecInfo* pDecInfo;
......@@ -300,7 +300,7 @@ enum RetCode VPU_DecOpen(DecHandle* pHandle, struct DecOpenParam* pop)
return RETCODE_SUCCESS;
}
enum RetCode VPU_DecClose(DecHandle handle)
enum RetCode VPU_DecClose(struct CodecInst* handle)
{
struct CodecInst * pCodecInst;
struct DecInfo * pDecInfo;
......@@ -383,7 +383,7 @@ enum RetCode VPU_DecClose(DecHandle handle)
return ret;
}
enum RetCode VPU_DecIssueSeqInit(DecHandle handle)
enum RetCode VPU_DecIssueSeqInit(struct CodecInst* handle)
{
struct CodecInst* pCodecInst;
enum RetCode ret;
......@@ -419,7 +419,7 @@ enum RetCode VPU_DecIssueSeqInit(DecHandle handle)
return ret;
}
enum RetCode VPU_DecCompleteSeqInit(DecHandle handle, struct DecInitialInfo * info)
enum RetCode VPU_DecCompleteSeqInit(struct CodecInst* handle, struct DecInitialInfo * info)
{
struct CodecInst* pCodecInst;
struct DecInfo* pDecInfo;
......@@ -470,7 +470,7 @@ enum RetCode VPU_DecCompleteSeqInit(DecHandle handle, struct DecInitialInfo * in
return ret;
}
static enum RetCode DecRegisterFrameBuffer(DecHandle handle, struct FrameBuffer *bufArray, int numFbsForDecoding, int numFbsForWTL, int stride, int height, int mapType)
static enum RetCode DecRegisterFrameBuffer(struct CodecInst* handle, struct FrameBuffer *bufArray, int numFbsForDecoding, int numFbsForWTL, int stride, int height, int mapType)
{
struct CodecInst* pCodecInst;
struct DecInfo* pDecInfo;
......@@ -584,12 +584,12 @@ static enum RetCode DecRegisterFrameBuffer(DecHandle handle, struct FrameBuffer
return ret;
}
enum RetCode VPU_DecRegisterFrameBufferEx(DecHandle handle, struct FrameBuffer *bufArray, int numOfDecFbs, int numOfDisplayFbs, int stride, int height, int mapType)
enum RetCode VPU_DecRegisterFrameBufferEx(struct CodecInst* handle, struct FrameBuffer *bufArray, int numOfDecFbs, int numOfDisplayFbs, int stride, int height, int mapType)
{
return DecRegisterFrameBuffer(handle, bufArray, numOfDecFbs, numOfDisplayFbs, stride, height, mapType);
}
enum RetCode VPU_DecGetBitstreamBuffer(DecHandle handle, PhysicalAddress* prdPtr, PhysicalAddress* pwrPtr, uint32_t* size)
enum RetCode VPU_DecGetBitstreamBuffer(struct CodecInst* handle, PhysicalAddress* prdPtr, PhysicalAddress* pwrPtr, uint32_t* size)
{
struct CodecInst* pCodecInst;
struct DecInfo* pDecInfo;
......@@ -652,7 +652,7 @@ enum RetCode VPU_DecGetBitstreamBuffer(DecHandle handle, PhysicalAddress* prdPtr
return RETCODE_SUCCESS;
}
enum RetCode VPU_DecUpdateBitstreamBuffer(DecHandle handle, int size)
enum RetCode VPU_DecUpdateBitstreamBuffer(struct CodecInst* handle, int size)
{
struct CodecInst* pCodecInst;
struct DecInfo* pDecInfo;
......@@ -727,7 +727,7 @@ enum RetCode VPU_DecUpdateBitstreamBuffer(DecHandle handle, int size)
return ret;
}
enum RetCode VPU_DecStartOneFrame(DecHandle handle, struct DecParam *param)
enum RetCode VPU_DecStartOneFrame(struct CodecInst* handle, struct DecParam *param)
{
struct CodecInst* pCodecInst;
struct DecInfo* pDecInfo;
......@@ -784,7 +784,7 @@ enum RetCode VPU_DecStartOneFrame(DecHandle handle, struct DecParam *param)
return ret;
}
enum RetCode VPU_DecGetOutputInfo(DecHandle handle, struct DecOutputInfo* info)
enum RetCode VPU_DecGetOutputInfo(struct CodecInst* handle, struct DecOutputInfo* info)
{
struct CodecInst* pCodecInst;
struct DecInfo* pDecInfo;
......@@ -1128,7 +1128,7 @@ enum RetCode VPU_RunMapConverter(void* handle, struct FrameBuffer* frame, Physic
}
#endif /* SUPPORT_MAPCONVETER */
enum RetCode VPU_DecClrDispFlag(DecHandle handle, int index)
enum RetCode VPU_DecClrDispFlag(struct CodecInst* handle, int index)
{
struct CodecInst* pCodecInst;
struct DecInfo* pDecInfo;
......@@ -1168,7 +1168,7 @@ enum RetCode VPU_DecClrDispFlag(DecHandle handle, int index)
return ret;
}
enum RetCode VPU_DecGiveCommand(DecHandle handle, enum CodecCommand cmd, void* param)
enum RetCode VPU_DecGiveCommand(struct CodecInst* handle, enum CodecCommand cmd, void* param)
{
struct CodecInst* pCodecInst;
struct DecInfo* pDecInfo;
......
......@@ -1344,18 +1344,6 @@ struct CodecInst;
#define VPU_HANDLE_TO_DECINFO(_handle) (&(((struct CodecInst*)_handle)->CodecInfo->decInfo))
#define VPU_HANDLE_TO_ENCINFO(_handle) (&(((struct CodecInst*)_handle)->CodecInfo->encInfo))
/**
* @brief
@verbatim
This is a dedicated type for decoder handle returned when a decoder instance is
opened. A decoder instance can be referred to by the corresponding handle. struct CodecInst
is a type managed internally by API. Application does not need to care about it.
NOTE: This type is vaild for decoder only.
@endverbatim
*/
typedef struct CodecInst* DecHandle;
/**
* @brief This is a data structure for H.264/AVC specific picture information. Only H.264/AVC decoder
returns this structure after decoding a frame. For details about all these
......@@ -3895,7 +3883,7 @@ function.
@endverbatim
*/
enum RetCode VPU_DecOpen(
DecHandle *pHandle, /**< [Output] A pointer to DecHandle type variable which specifies each instance for HOST application. */
struct CodecInst* *pHandle, /**< [Output] A pointer to struct CodecInst* type variable which specifies each instance for HOST application. */
struct DecOpenParam *pop /**< [Input] A pointer to <<vpuapi_h_DecOpenParam>> which describes required parameters for creating a new decoder instance. */
);
......@@ -3932,7 +3920,7 @@ VPU_DecGetOutputInfo() to proceed this function call.
@endverbatim
*/
enum RetCode VPU_DecClose(
DecHandle handle /**< [Input] A decoder handle obtained from VPU_DecOpen() */
struct CodecInst* handle /**< [Input] A decoder handle obtained from VPU_DecOpen() */
);
/**
......@@ -3981,7 +3969,7 @@ This means that the current API function call cannot be queued because queue buf
@endverbatim
*/
enum RetCode VPU_DecIssueSeqInit(
DecHandle handle /**< [Input] A decoder handle obtained from VPU_DecOpen() */
struct CodecInst* handle /**< [Input] A decoder handle obtained from VPU_DecOpen() */
);
/**
......@@ -4018,7 +4006,7 @@ so that this function call is meaningless and not allowed anymore.
@endverbatim
*/
enum RetCode VPU_DecCompleteSeqInit(
DecHandle handle, /**< [Input] A decoder handle obtained from VPU_DecOpen() */
struct CodecInst* handle, /**< [Input] A decoder handle obtained from VPU_DecOpen() */
struct DecInitialInfo* info /**< [Output] A pointer to <<vpuapi_h_DecInitialInfo>> data structure */
);
......@@ -4072,7 +4060,7 @@ Operation has not recieved any response from VPU and has timed out.
@endverbatim
*/
enum RetCode VPU_DecRegisterFrameBufferEx(
DecHandle handle, /**< [Input] A decoder handle obtained from VPU_DecOpen() */
struct CodecInst* handle, /**< [Input] A decoder handle obtained from VPU_DecOpen() */
struct FrameBuffer* bufArray, /**< [Input] The allocated frame buffer address and information in <<vpuapi_h_FrameBuffer>>. If this parameter is NULL, this function (not HOST application) allocates frame buffers. */
int numOfDecFbs, /**< [Input] The number of compressed frame buffer */
int numOfDisplayFbs, /**< [Input] The number of linear frame buffer when WTL is enabled. In WAVE, this should be equal to or larger than framebufDelay of <<vpuapi_h_DecInitialInfo>> + 2. */
......@@ -4119,7 +4107,7 @@ This means that the current API function call cannot be queued because queue buf
@endverbatim
*/
enum RetCode VPU_DecStartOneFrame(
DecHandle handle, /**< [Input] A decoder handle obtained from VPU_DecOpen() */
struct CodecInst* handle, /**< [Input] A decoder handle obtained from VPU_DecOpen() */
struct DecParam *param /**< [Input] <<vpuapi_h_DecParam>> which describes picture decoding parameters for the given decoder instance */
);
......@@ -4150,7 +4138,7 @@ This means that report is not ready for this query(GET_RESULT) command. (WAVE5 o
@endverbatim
*/
enum RetCode VPU_DecGetOutputInfo(
DecHandle handle, /**< [Input] A decoder handle obtained from VPU_DecOpen() */
struct CodecInst* handle, /**< [Input] A decoder handle obtained from VPU_DecOpen() */
struct DecOutputInfo* info /**< [Output] A pointer to <<vpuapi_h_DecOutputInfo>> which describes picture decoding results for the current decoder instance. */
);
......@@ -4185,7 +4173,7 @@ This means that the current API function call cannot be queued because queue buf
@endverbatim
*/
enum RetCode VPU_DecGiveCommand(
DecHandle handle, /**< [Input] A decoder handle obtained from VPU_DecOpen() */
struct CodecInst* handle, /**< [Input] A decoder handle obtained from VPU_DecOpen() */
enum CodecCommand cmd, /**< [Input] A variable specifying the given command of <<vpuapi_h_CodecCommand>> */
void* parameter /**< [Input/Output] A pointer to command-specific data structure which describes picture I/O parameters for the current decoder instance */
);
......@@ -4228,7 +4216,7 @@ values.
@endverbatim
*/
enum RetCode VPU_DecGetBitstreamBuffer(
DecHandle handle, /**< [Input] A decoder handle obtained from VPU_DecOpen() */
struct CodecInst* handle, /**< [Input] A decoder handle obtained from VPU_DecOpen() */
PhysicalAddress *prdPrt, /**< [Output] A stream buffer read pointer for the current decoder instance */
PhysicalAddress *pwrPtr, /**< [Output] A stream buffer write pointer for the current decoder instance */
uint32_t *size /**< [Output] A variable specifying the available space in bitstream buffer for the current decoder instance */
......@@ -4260,7 +4248,7 @@ in the bitstream buffer.
@endverbatim
*/
enum RetCode VPU_DecUpdateBitstreamBuffer(
DecHandle handle, /**< [Input] A decoder handle obtained from VPU_DecOpen() */
struct CodecInst* handle, /**< [Input] A decoder handle obtained from VPU_DecOpen() */
/**
@verbatim
......@@ -4308,7 +4296,7 @@ values.
@endverbatim
*/
enum RetCode VPU_DecClrDispFlag(
DecHandle handle, /**< [Input] A decoder handle obtained from VPU_DecOpen() */
struct CodecInst* handle, /**< [Input] A decoder handle obtained from VPU_DecOpen() */
int index /**< [Input] A frame buffer index to be cleared */
);
......
......@@ -837,7 +837,7 @@ enum RetCode InitCodecInstancePool(uint32_t coreIdx);
enum RetCode GetCodecInstance(uint32_t coreIdx, struct CodecInst ** ppInst);
void FreeCodecInstance(struct CodecInst * pCodecInst);
enum RetCode SetParaSet(DecHandle handle, int paraSetType, struct DecParamSet * para);
enum RetCode SetParaSet(struct CodecInst* handle, int paraSetType, struct DecParamSet * para);
enum RetCode CheckInstanceValidity(struct CodecInst* pCodecInst);
enum RetCode UpdateFrameBufferAddr(enum TiledMapType mapType, struct FrameBuffer* fbArr, uint32_t numOfFrameBuffers, uint32_t sizeLuma, uint32_t sizeChroma);
......
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