sec_mm: some fixes, work in progress
This commit is contained in:
@@ -97,7 +97,7 @@ void *SsbSipMfcDecOpen(void)
|
||||
}
|
||||
memset(pCTX, 0, sizeof(_MFCLIB));
|
||||
|
||||
hMFCOpen = open(S5PC110_MFC_DEV_NAME, O_RDWR | O_NDELAY);
|
||||
hMFCOpen = open(SAMSUNG_MFC_DEV_NAME, O_RDWR | O_NDELAY);
|
||||
if (hMFCOpen < 0) {
|
||||
LOGE("SsbSipMfcDecOpen: MFC Open failure\n");
|
||||
return NULL;
|
||||
@@ -121,7 +121,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c
|
||||
{
|
||||
int ret_code;
|
||||
int packedPB = MFC_UNPACKED_PB;
|
||||
mfc_common_args DecArg;
|
||||
struct mfc_common_args DecArg;
|
||||
_MFCLIB *pCTX;
|
||||
|
||||
if (openHandle == NULL) {
|
||||
@@ -202,7 +202,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExe(void *openHandle, int lengthBufFill)
|
||||
int Yoffset;
|
||||
int Coffset;
|
||||
_MFCLIB *pCTX;
|
||||
mfc_common_args DecArg;
|
||||
struct mfc_common_args DecArg;
|
||||
|
||||
if (openHandle == NULL) {
|
||||
LOGE("SsbSipMfcDecExe: openHandle is NULL\n");
|
||||
@@ -258,7 +258,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecClose(void *openHandle)
|
||||
{
|
||||
int ret_code;
|
||||
_MFCLIB *pCTX;
|
||||
mfc_common_args free_arg;
|
||||
struct mfc_common_args free_arg;
|
||||
|
||||
if (openHandle == NULL) {
|
||||
LOGE("SsbSipMfcDecClose: openHandle is NULL\n");
|
||||
@@ -292,7 +292,7 @@ void *SsbSipMfcDecGetInBuf(void *openHandle, void **phyInBuf, int inputBufferSiz
|
||||
{
|
||||
int ret_code;
|
||||
_MFCLIB *pCTX;
|
||||
mfc_common_args user_addr_arg, phys_addr_arg;
|
||||
struct mfc_common_args user_addr_arg, phys_addr_arg;
|
||||
|
||||
if (inputBufferSize < 0) {
|
||||
LOGE("SsbSipMfcDecGetInBuf: inputBufferSize = %d is invalid\n", inputBufferSize);
|
||||
@@ -384,7 +384,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetConfig(void *openHandle, SSBSIP_MFC_DEC_CON
|
||||
{
|
||||
int ret_code;
|
||||
_MFCLIB *pCTX;
|
||||
mfc_common_args DecArg;
|
||||
struct mfc_common_args DecArg;
|
||||
SSBSIP_MFC_IMG_RESOLUTION *img_resolution;
|
||||
|
||||
if (openHandle == NULL) {
|
||||
@@ -441,7 +441,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecGetConfig(void *openHandle, SSBSIP_MFC_DEC_CON
|
||||
{
|
||||
int ret_code;
|
||||
_MFCLIB *pCTX;
|
||||
mfc_common_args DecArg;
|
||||
struct mfc_common_args DecArg;
|
||||
|
||||
SSBSIP_MFC_IMG_RESOLUTION *img_resolution;
|
||||
SSBSIP_MFC_CROP_INFORMATION *crop_information;
|
||||
|
||||
@@ -36,7 +36,7 @@ void *SsbSipMfcEncOpen(void)
|
||||
_MFCLIB *pCTX;
|
||||
unsigned int mapped_addr;
|
||||
|
||||
hMFCOpen = open(S5PC110_MFC_DEV_NAME, O_RDWR | O_NDELAY);
|
||||
hMFCOpen = open(SAMSUNG_MFC_DEV_NAME, O_RDWR | O_NDELAY);
|
||||
if (hMFCOpen < 0) {
|
||||
LOGE("SsbSipMfcEncOpen: MFC Open failure\n");
|
||||
return NULL;
|
||||
@@ -71,8 +71,8 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
|
||||
int dpbBufSize;
|
||||
|
||||
_MFCLIB *pCTX;
|
||||
mfc_common_args EncArg;
|
||||
mfc_common_args user_addr_arg, phys_addr_arg;
|
||||
struct mfc_common_args EncArg;
|
||||
struct mfc_common_args user_addr_arg, phys_addr_arg;
|
||||
SSBSIP_MFC_ENC_H264_PARAM *h264_arg;
|
||||
SSBSIP_MFC_ENC_MPEG4_PARAM *mpeg4_arg;
|
||||
SSBSIP_MFC_ENC_H263_PARAM *h263_arg;
|
||||
@@ -352,7 +352,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle)
|
||||
{
|
||||
int ret_code;
|
||||
_MFCLIB *pCTX;
|
||||
mfc_common_args EncArg;
|
||||
struct mfc_common_args EncArg;
|
||||
|
||||
if (openHandle == NULL) {
|
||||
LOGE("SsbSipMfcEncExe: openHandle is NULL\n");
|
||||
@@ -392,7 +392,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncClose(void *openHandle)
|
||||
{
|
||||
int ret_code;
|
||||
_MFCLIB *pCTX;
|
||||
mfc_common_args free_arg;
|
||||
struct mfc_common_args free_arg;
|
||||
|
||||
if (openHandle == NULL) {
|
||||
LOGE("SsbSipMfcEncClose: openHandle is NULL\n");
|
||||
@@ -426,7 +426,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPU
|
||||
{
|
||||
int ret_code;
|
||||
_MFCLIB *pCTX;
|
||||
mfc_common_args user_addr_arg, phys_addr_arg;
|
||||
struct mfc_common_args user_addr_arg, phys_addr_arg;
|
||||
int y_size, c_size;
|
||||
int aligned_y_size, aligned_c_size;
|
||||
|
||||
@@ -553,7 +553,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetConfig(void *openHandle, SSBSIP_MFC_ENC_CON
|
||||
{
|
||||
int ret_code;
|
||||
_MFCLIB *pCTX;
|
||||
mfc_common_args EncArg;
|
||||
struct mfc_common_args EncArg;
|
||||
|
||||
if (openHandle == NULL) {
|
||||
LOGE("SsbSipMfcEncSetConfig: openHandle is NULL\n");
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
/*
|
||||
* Copyright 2010 Samsung Electronics Co. LTD
|
||||
* Copyright (c) 2010 Samsung Electronics Co., Ltd.
|
||||
* http://www.samsung.com/
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* Global header for Samsung MFC (Multi Function Codec - FIMV) driver
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* Alternatively, Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
@@ -26,12 +33,13 @@
|
||||
#define SUPPORT_1080P 1
|
||||
|
||||
#if SUPPORT_1080P
|
||||
#define MMAP_BUFFER_SIZE_MMAP (63*1024*1024)
|
||||
#define MMAP_BUFFER_SIZE_MMAP (70*1024*1024) /* only C110 use this value. in C210, memory size is decided in menuconfig*/
|
||||
#else
|
||||
#define MMAP_BUFFER_SIZE_MMAP (49*1024*1024)
|
||||
#define MMAP_BUFFER_SIZE_MMAP (62*1024*1024)
|
||||
#endif
|
||||
|
||||
#define S5PC110_MFC_DEV_NAME "/dev/s3c-mfc"
|
||||
#define SAMSUNG_MFC_DEV_NAME "/dev/s3c-mfc"
|
||||
|
||||
|
||||
/*--------------------------------------------------------------------------------*/
|
||||
/* Structure and Type */
|
||||
@@ -61,6 +69,16 @@ typedef enum {
|
||||
NOT_CODED = 2
|
||||
} SSBSIP_MFC_FORCE_SET_FRAME_TYPE;
|
||||
|
||||
typedef enum {
|
||||
NV12_LINEAR = 0,
|
||||
NV12_TILE
|
||||
} SSBSIP_MFC_INSTRM_MODE_TYPE;
|
||||
|
||||
typedef enum {
|
||||
NO_CACHE = 0,
|
||||
CACHE = 1
|
||||
} SSBIP_MFC_BUFFER_TYPE;
|
||||
|
||||
typedef enum {
|
||||
MFC_DEC_SETCONF_POST_ENABLE = 1,
|
||||
MFC_DEC_SETCONF_EXTRA_BUFFER_NUM,
|
||||
@@ -73,7 +91,13 @@ typedef enum {
|
||||
MFC_DEC_GETCONF_CRC_DATA,
|
||||
MFC_DEC_GETCONF_BUF_WIDTH_HEIGHT,
|
||||
MFC_DEC_GETCONF_CROP_INFO,
|
||||
MFC_DEC_GETCONF_FRAME_TAG
|
||||
MFC_DEC_GETCONF_FRAME_TAG,
|
||||
|
||||
/* C210 specific feature */
|
||||
MFC_DEC_SETCONF_IMMEDIATELY_DISPLAY,
|
||||
MFC_DEC_SETCONF_DPB_FLUSH,
|
||||
MFC_DEC_SETCONF_PIXEL_CACHE,
|
||||
MFC_DEC_GETCONF_WIDTH_HEIGHT
|
||||
} SSBSIP_MFC_DEC_CONF;
|
||||
|
||||
typedef enum {
|
||||
@@ -82,7 +106,12 @@ typedef enum {
|
||||
MFC_ENC_SETCONF_CHANGE_BIT_RATE,
|
||||
MFC_ENC_SETCONF_FRAME_TAG,
|
||||
MFC_ENC_SETCONF_ALLOW_FRAME_SKIP,
|
||||
MFC_ENC_GETCONF_FRAME_TAG
|
||||
MFC_ENC_GETCONF_FRAME_TAG,
|
||||
|
||||
/* C210 specific feature */
|
||||
MFC_ENC_SETCONF_VUI_INFO,
|
||||
MFC_ENC_SETCONF_I_PERIOD,
|
||||
MFC_ENC_SETCONF_HIER_P
|
||||
} SSBSIP_MFC_ENC_CONF;
|
||||
|
||||
typedef enum {
|
||||
@@ -90,7 +119,8 @@ typedef enum {
|
||||
MFC_GETOUTBUF_DECODING_ONLY = 1,
|
||||
MFC_GETOUTBUF_DISPLAY_DECODING,
|
||||
MFC_GETOUTBUF_DISPLAY_ONLY,
|
||||
MFC_GETOUTBUF_DISPLAY_END
|
||||
MFC_GETOUTBUF_DISPLAY_END,
|
||||
MFC_GETOUTBUF_CHANGE_RESOL
|
||||
} SSBSIP_MFC_DEC_OUTBUF_STATUS;
|
||||
|
||||
typedef enum {
|
||||
@@ -130,140 +160,156 @@ typedef enum {
|
||||
} SSBSIP_MFC_ERROR_CODE;
|
||||
|
||||
typedef struct {
|
||||
void *YPhyAddr; // [OUT] physical address of Y
|
||||
void *CPhyAddr; // [OUT] physical address of CbCr
|
||||
void *YVirAddr; // [OUT] virtual address of Y
|
||||
void *CVirAddr; // [OUT] virtual address of CbCr
|
||||
void *YPhyAddr; /* [OUT] physical address of Y */
|
||||
void *CPhyAddr; /* [OUT] physical address of CbCr */
|
||||
void *YVirAddr; /* [OUT] virtual address of Y */
|
||||
void *CVirAddr; /* [OUT] virtual address of CbCr */
|
||||
|
||||
int img_width; // [OUT] width of real image
|
||||
int img_height; // [OUT] height of real image
|
||||
int buf_width; // [OUT] width aligned to 16
|
||||
int buf_height; // [OUT] height alighed to 16
|
||||
int img_width; /* [OUT] width of real image */
|
||||
int img_height; /* [OUT] height of real image */
|
||||
int buf_width; /* [OUT] width aligned to 16 */
|
||||
int buf_height; /* [OUT] height alighed to 16 */
|
||||
|
||||
int timestamp_top; // [OUT] timestamp of top filed(This is used for interlaced stream)
|
||||
int timestamp_bottom; // [OUT] timestamp of bottom filed(This is used for interlaced stream)
|
||||
int consumedByte; // [OUT] the number of byte consumed during decoding
|
||||
int res_change; // [OUT] whether resolution is changed or not. 0: not change, 1: increased, 2: decreased
|
||||
int crop_top_offset; // [OUT] crop information, top_offset
|
||||
int crop_bottom_offset; // [OUT] crop information, bottom_offset
|
||||
int crop_left_offset; // [OUT] crop information, left_offset
|
||||
int crop_right_offset; // [OUT] crop information, right_offset
|
||||
int timestamp_top; /* [OUT] timestamp of top filed(This is used for interlaced stream) */
|
||||
int timestamp_bottom; /* [OUT] timestamp of bottom filed(This is used for interlaced stream) */
|
||||
int consumedByte; /* [OUT] the number of byte consumed during decoding */
|
||||
int res_change; /* [OUT] whether resolution is changed or not. 0: not change, 1: increased, 2: decreased */
|
||||
int crop_top_offset; /* [OUT] crop information, top_offset */
|
||||
int crop_bottom_offset; /* [OUT] crop information, bottom_offset */
|
||||
int crop_left_offset; /* [OUT] crop information, left_offset */
|
||||
int crop_right_offset; /* [OUT] crop information, right_offset */
|
||||
|
||||
/* C210 UMP feature */
|
||||
unsigned int y_cookie; /* [OUT] cookie for Y address */
|
||||
unsigned int c_cookie; /* [OUT] cookie for CbCr address, If it is 0, Y and CbCr is in continous memory */
|
||||
} SSBSIP_MFC_DEC_OUTPUT_INFO;
|
||||
|
||||
typedef struct {
|
||||
void *YPhyAddr; // [IN/OUT] physical address of Y
|
||||
void *CPhyAddr; // [IN/OUT] physical address of CbCr
|
||||
void *YVirAddr; // [IN/OUT] virtual address of Y
|
||||
void *CVirAddr; // [IN/OUT] virtual address of CbCr
|
||||
int YSize; // [IN/OUT] input size of Y data
|
||||
int CSize; // [IN/OUT] input size of CbCr data
|
||||
void *YPhyAddr; /* [IN/OUT] physical address of Y */
|
||||
void *CPhyAddr; /* [IN/OUT] physical address of CbCr */
|
||||
void *YVirAddr; /* [IN/OUT] virtual address of Y */
|
||||
void *CVirAddr; /* [IN/OUT] virtual address of CbCr */
|
||||
int YSize; /* [IN/OUT] input size of Y data */
|
||||
int CSize; /* [IN/OUT] input size of CbCr data */
|
||||
|
||||
/* C210 UMP feature */
|
||||
unsigned int y_cookie; /* [OUT] cookie for Y address */
|
||||
unsigned int c_cookie; /* [OUT] cookie for CbCr address, If it is 0, Y and CbCr is in continous memory */
|
||||
} SSBSIP_MFC_ENC_INPUT_INFO;
|
||||
|
||||
typedef struct {
|
||||
unsigned int dataSize; // [OUT] encoded data size(without header)
|
||||
unsigned int headerSize; // [OUT] encoded header size
|
||||
unsigned int frameType; // [OUT] frame type of encoded stream
|
||||
void *StrmPhyAddr; // [OUT] physical address of Y
|
||||
void *StrmVirAddr; // [OUT] virtual address of Y
|
||||
void *encodedYPhyAddr; // [OUT] physical address of Y which is flushed
|
||||
void *encodedCPhyAddr; // [OUT] physical address of C which is flushed
|
||||
unsigned int dataSize; /* [OUT] encoded data size(without header) */
|
||||
unsigned int headerSize; /* [OUT] encoded header size */
|
||||
unsigned int frameType; /* [OUT] frame type of encoded stream */
|
||||
void *StrmPhyAddr; /* [OUT] physical address of Y */
|
||||
void *StrmVirAddr; /* [OUT] virtual address of Y */
|
||||
void *encodedYPhyAddr; /* [OUT] physical address of Y which is flushed */
|
||||
void *encodedCPhyAddr; /* [OUT] physical address of C which is flushed */
|
||||
|
||||
/* C210 UMP feature */
|
||||
unsigned int strm_cookie; /* [OUT] cooke for stream buffer */
|
||||
unsigned int y_encoded_cookie; /* [OUT] cookie for Y address */
|
||||
unsigned int c_encoded_cookie; /* [OUT] cookie for CbCr address, If it is 0, Y and CbCr is in continous memory */
|
||||
} SSBSIP_MFC_ENC_OUTPUT_INFO;
|
||||
|
||||
typedef struct {
|
||||
// common parameters
|
||||
SSBSIP_MFC_CODEC_TYPE codecType; // [IN] codec type
|
||||
int SourceWidth; // [IN] width of video to be encoded
|
||||
int SourceHeight; // [IN] height of video to be encoded
|
||||
int IDRPeriod; // [IN] GOP number(interval of I-frame)
|
||||
int SliceMode; // [IN] Multi slice mode
|
||||
int RandomIntraMBRefresh; // [IN] cyclic intra refresh
|
||||
int EnableFRMRateControl; // [IN] frame based rate control enable
|
||||
int Bitrate; // [IN] rate control parameter(bit rate)
|
||||
int FrameQp; // [IN] The quantization parameter of the frame
|
||||
int FrameQp_P; // [IN] The quantization parameter of the P frame
|
||||
int QSCodeMax; // [IN] Maximum Quantization value
|
||||
int QSCodeMin; // [IN] Minimum Quantization value
|
||||
int CBRPeriodRf; // [IN] Reaction coefficient parameter for rate control
|
||||
int PadControlOn; // [IN] Enable padding control
|
||||
int LumaPadVal; // [IN] Luma pel value used to fill padding area
|
||||
int CbPadVal; // [IN] CB pel value used to fill padding area
|
||||
int CrPadVal; // [IN] CR pel value used to fill padding area
|
||||
/* common parameters */
|
||||
SSBSIP_MFC_CODEC_TYPE codecType; /* [IN] codec type */
|
||||
int SourceWidth; /* [IN] width of video to be encoded */
|
||||
int SourceHeight; /* [IN] height of video to be encoded */
|
||||
int IDRPeriod; /* [IN] GOP number(interval of I-frame) */
|
||||
int SliceMode; /* [IN] Multi slice mode */
|
||||
int RandomIntraMBRefresh; /* [IN] cyclic intra refresh */
|
||||
int EnableFRMRateControl; /* [IN] frame based rate control enable */
|
||||
int Bitrate; /* [IN] rate control parameter(bit rate) */
|
||||
int FrameQp; /* [IN] The quantization parameter of the frame */
|
||||
int FrameQp_P; /* [IN] The quantization parameter of the P frame */
|
||||
int QSCodeMax; /* [IN] Maximum Quantization value */
|
||||
int QSCodeMin; /* [IN] Minimum Quantization value */
|
||||
int CBRPeriodRf; /* [IN] Reaction coefficient parameter for rate control */
|
||||
int PadControlOn; /* [IN] Enable padding control */
|
||||
int LumaPadVal; /* [IN] Luma pel value used to fill padding area */
|
||||
int CbPadVal; /* [IN] CB pel value used to fill padding area */
|
||||
int CrPadVal; /* [IN] CR pel value used to fill padding area */
|
||||
int FrameMap; /* [IN] Encoding input mode(tile mode or linear mode) */
|
||||
|
||||
// H.264 specific parameters
|
||||
int ProfileIDC; // [IN] profile
|
||||
int LevelIDC; // [IN] level
|
||||
int FrameQp_B; // [IN] The quantization parameter of the B frame
|
||||
int FrameRate; // [IN] rate control parameter(frame rate)
|
||||
int SliceArgument; // [IN] MB number or byte number
|
||||
int NumberBFrames; // [IN] The number of consecutive B frame inserted
|
||||
int NumberReferenceFrames; // [IN] The number of reference pictures used
|
||||
int NumberRefForPframes; // [IN] The number of reference pictures used for encoding P pictures
|
||||
int LoopFilterDisable; // [IN] disable the loop filter
|
||||
int LoopFilterAlphaC0Offset; // [IN] Alpha & C0 offset for H.264 loop filter
|
||||
int LoopFilterBetaOffset; // [IN] Beta offset for H.264 loop filter
|
||||
int SymbolMode; // [IN] The mode of entropy coding(CABAC, CAVLC)
|
||||
int PictureInterlace; // [IN] Enables the interlace mode
|
||||
int Transform8x8Mode; // [IN] Allow 8x8 transform(This is allowed only for high profile)
|
||||
int EnableMBRateControl; // [IN] Enable macroblock-level rate control
|
||||
int DarkDisable; // [IN] Disable adaptive rate control on dark region
|
||||
int SmoothDisable; // [IN] Disable adaptive rate control on smooth region
|
||||
int StaticDisable; // [IN] Disable adaptive rate control on static region
|
||||
int ActivityDisable; // [IN] Disable adaptive rate control on high activity region
|
||||
/* H.264 specific parameters */
|
||||
int ProfileIDC; /* [IN] profile */
|
||||
int LevelIDC; /* [IN] level */
|
||||
int FrameQp_B; /* [IN] The quantization parameter of the B frame */
|
||||
int FrameRate; /* [IN] rate control parameter(frame rate) */
|
||||
int SliceArgument; /* [IN] MB number or byte number */
|
||||
int NumberBFrames; /* [IN] The number of consecutive B frame inserted */
|
||||
int NumberReferenceFrames; /* [IN] The number of reference pictures used */
|
||||
int NumberRefForPframes; /* [IN] The number of reference pictures used for encoding P pictures */
|
||||
int LoopFilterDisable; /* [IN] disable the loop filter */
|
||||
int LoopFilterAlphaC0Offset; /* [IN] Alpha & C0 offset for H.264 loop filter */
|
||||
int LoopFilterBetaOffset; /* [IN] Beta offset for H.264 loop filter */
|
||||
int SymbolMode; /* [IN] The mode of entropy coding(CABAC, CAVLC) */
|
||||
int PictureInterlace; /* [IN] Enables the interlace mode */
|
||||
int Transform8x8Mode; /* [IN] Allow 8x8 transform(This is allowed only for high profile) */
|
||||
int EnableMBRateControl; /* [IN] Enable macroblock-level rate control */
|
||||
int DarkDisable; /* [IN] Disable adaptive rate control on dark region */
|
||||
int SmoothDisable; /* [IN] Disable adaptive rate control on smooth region */
|
||||
int StaticDisable; /* [IN] Disable adaptive rate control on static region */
|
||||
int ActivityDisable; /* [IN] Disable adaptive rate control on high activity region */
|
||||
} SSBSIP_MFC_ENC_H264_PARAM;
|
||||
|
||||
typedef struct {
|
||||
// common parameters
|
||||
SSBSIP_MFC_CODEC_TYPE codecType; // [IN] codec type
|
||||
int SourceWidth; // [IN] width of video to be encoded
|
||||
int SourceHeight; // [IN] height of video to be encoded
|
||||
int IDRPeriod; // [IN] GOP number(interval of I-frame)
|
||||
int SliceMode; // [IN] Multi slice mode
|
||||
int RandomIntraMBRefresh; // [IN] cyclic intra refresh
|
||||
int EnableFRMRateControl; // [IN] frame based rate control enable
|
||||
int Bitrate; // [IN] rate control parameter(bit rate)
|
||||
int FrameQp; // [IN] The quantization parameter of the frame
|
||||
int FrameQp_P; // [IN] The quantization parameter of the P frame
|
||||
int QSCodeMax; // [IN] Maximum Quantization value
|
||||
int QSCodeMin; // [IN] Minimum Quantization value
|
||||
int CBRPeriodRf; // [IN] Reaction coefficient parameter for rate control
|
||||
int PadControlOn; // [IN] Enable padding control
|
||||
int LumaPadVal; // [IN] Luma pel value used to fill padding area
|
||||
int CbPadVal; // [IN] CB pel value used to fill padding area
|
||||
int CrPadVal; // [IN] CR pel value used to fill padding area
|
||||
/* common parameters */
|
||||
SSBSIP_MFC_CODEC_TYPE codecType; /* [IN] codec type */
|
||||
int SourceWidth; /* [IN] width of video to be encoded */
|
||||
int SourceHeight; /* [IN] height of video to be encoded */
|
||||
int IDRPeriod; /* [IN] GOP number(interval of I-frame) */
|
||||
int SliceMode; /* [IN] Multi slice mode */
|
||||
int RandomIntraMBRefresh; /* [IN] cyclic intra refresh */
|
||||
int EnableFRMRateControl; /* [IN] frame based rate control enable */
|
||||
int Bitrate; /* [IN] rate control parameter(bit rate) */
|
||||
int FrameQp; /* [IN] The quantization parameter of the frame */
|
||||
int FrameQp_P; /* [IN] The quantization parameter of the P frame */
|
||||
int QSCodeMax; /* [IN] Maximum Quantization value */
|
||||
int QSCodeMin; /* [IN] Minimum Quantization value */
|
||||
int CBRPeriodRf; /* [IN] Reaction coefficient parameter for rate control */
|
||||
int PadControlOn; /* [IN] Enable padding control */
|
||||
int LumaPadVal; /* [IN] Luma pel value used to fill padding area */
|
||||
int CbPadVal; /* [IN] CB pel value used to fill padding area */
|
||||
int CrPadVal; /* [IN] CR pel value used to fill padding area */
|
||||
int FrameMap; /* [IN] Encoding input mode(tile mode or linear mode) */
|
||||
|
||||
// MPEG4 specific parameters
|
||||
int ProfileIDC; // [IN] profile
|
||||
int LevelIDC; // [IN] level
|
||||
int FrameQp_B; // [IN] The quantization parameter of the B frame
|
||||
int TimeIncreamentRes; // [IN] frame rate
|
||||
int VopTimeIncreament; // [IN] frame rate
|
||||
int SliceArgument; // [IN] MB number or byte number
|
||||
int NumberBFrames; // [IN] The number of consecutive B frame inserted
|
||||
int DisableQpelME; // [IN] disable quarter-pixel motion estimation
|
||||
/* MPEG4 specific parameters */
|
||||
int ProfileIDC; /* [IN] profile */
|
||||
int LevelIDC; /* [IN] level */
|
||||
int FrameQp_B; /* [IN] The quantization parameter of the B frame */
|
||||
int TimeIncreamentRes; /* [IN] frame rate */
|
||||
int VopTimeIncreament; /* [IN] frame rate */
|
||||
int SliceArgument; /* [IN] MB number or byte number */
|
||||
int NumberBFrames; /* [IN] The number of consecutive B frame inserted */
|
||||
int DisableQpelME; /* [IN] disable quarter-pixel motion estimation */
|
||||
} SSBSIP_MFC_ENC_MPEG4_PARAM;
|
||||
|
||||
typedef struct {
|
||||
// common parameters
|
||||
SSBSIP_MFC_CODEC_TYPE codecType; // [IN] codec type
|
||||
int SourceWidth; // [IN] width of video to be encoded
|
||||
int SourceHeight; // [IN] height of video to be encoded
|
||||
int IDRPeriod; // [IN] GOP number(interval of I-frame)
|
||||
int SliceMode; // [IN] Multi slice mode
|
||||
int RandomIntraMBRefresh; // [IN] cyclic intra refresh
|
||||
int EnableFRMRateControl; // [IN] frame based rate control enable
|
||||
int Bitrate; // [IN] rate control parameter(bit rate)
|
||||
int FrameQp; // [IN] The quantization parameter of the frame
|
||||
int FrameQp_P; // [IN] The quantization parameter of the P frame
|
||||
int QSCodeMax; // [IN] Maximum Quantization value
|
||||
int QSCodeMin; // [IN] Minimum Quantization value
|
||||
int CBRPeriodRf; // [IN] Reaction coefficient parameter for rate control
|
||||
int PadControlOn; // [IN] Enable padding control
|
||||
int LumaPadVal; // [IN] Luma pel value used to fill padding area
|
||||
int CbPadVal; // [IN] CB pel value used to fill padding area
|
||||
int CrPadVal; // [IN] CR pel value used to fill padding area
|
||||
/* common parameters */
|
||||
SSBSIP_MFC_CODEC_TYPE codecType; /* [IN] codec type */
|
||||
int SourceWidth; /* [IN] width of video to be encoded */
|
||||
int SourceHeight; /* [IN] height of video to be encoded */
|
||||
int IDRPeriod; /* [IN] GOP number(interval of I-frame) */
|
||||
int SliceMode; /* [IN] Multi slice mode */
|
||||
int RandomIntraMBRefresh; /* [IN] cyclic intra refresh */
|
||||
int EnableFRMRateControl; /* [IN] frame based rate control enable */
|
||||
int Bitrate; /* [IN] rate control parameter(bit rate) */
|
||||
int FrameQp; /* [IN] The quantization parameter of the frame */
|
||||
int FrameQp_P; /* [IN] The quantization parameter of the P frame */
|
||||
int QSCodeMax; /* [IN] Maximum Quantization value */
|
||||
int QSCodeMin; /* [IN] Minimum Quantization value */
|
||||
int CBRPeriodRf; /* [IN] Reaction coefficient parameter for rate control */
|
||||
int PadControlOn; /* [IN] Enable padding control */
|
||||
int LumaPadVal; /* [IN] Luma pel value used to fill padding area */
|
||||
int CbPadVal; /* [IN] CB pel value used to fill padding area */
|
||||
int CrPadVal; /* [IN] CR pel value used to fill padding area */
|
||||
int FrameMap; /* [IN] Encoding input mode(tile mode or linear mode) */
|
||||
|
||||
// H.263 specific parameters
|
||||
int FrameRate; // [IN] rate control parameter(frame rate)
|
||||
/* H.263 specific parameters */
|
||||
int FrameRate; /* [IN] rate control parameter(frame rate) */
|
||||
} SSBSIP_MFC_ENC_H263_PARAM;
|
||||
|
||||
typedef struct {
|
||||
@@ -287,19 +333,31 @@ extern "C" {
|
||||
/*--------------------------------------------------------------------------------*/
|
||||
/* Format Conversion API */
|
||||
/*--------------------------------------------------------------------------------*/
|
||||
/* Format Conversion API */
|
||||
void Y_tile_to_linear_4x2(unsigned char *p_linear_addr, unsigned char *p_tiled_addr, unsigned int x_size, unsigned int y_size);
|
||||
void CbCr_tile_to_linear_4x2(unsigned char *p_linear_addr, unsigned char *p_tiled_addr, unsigned int x_size, unsigned int y_size);
|
||||
|
||||
/* C210 specific feature */
|
||||
void tile_to_linear_64x32_4x2_neon(unsigned char *p_linear_addr, unsigned char *p_tiled_addr, unsigned int x_size, unsigned int y_size);
|
||||
void tile_to_linear_64x32_4x2_uv_neon(unsigned char *p_linear_addr, unsigned char *p_tiled_addr, unsigned int x_size, unsigned int y_size);
|
||||
void Convert_NV12_to_I420_NEON(unsigned char *YUV420p, unsigned char *YVU420sp, unsigned int YSize, unsigned int UVPlaneSize);
|
||||
|
||||
/*--------------------------------------------------------------------------------*/
|
||||
/* Decoding APIs */
|
||||
/*--------------------------------------------------------------------------------*/
|
||||
void *SsbSipMfcDecOpen(void);
|
||||
void *SsbSipMfcDecOpenExt(void *value);
|
||||
SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE codec_type, int Frameleng);
|
||||
SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExe(void *openHandle, int lengthBufFill);
|
||||
SSBSIP_MFC_ERROR_CODE SsbSipMfcDecClose(void *openHandle);
|
||||
void *SsbSipMfcDecGetInBuf(void *openHandle, void **phyInBuf, int inputBufferSize);
|
||||
|
||||
void *SsbSipMfcDecGetInBuf(void *openHandle, void **phyInBuf, int inputBufferSize);
|
||||
SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetInBuf(void *openHandle, void *phyInBuf, void *virInBuf, int inputBufferSize);
|
||||
|
||||
#if (defined(CONFIG_VIDEO_MFC_VCM_UMP) || defined(USE_UMP))
|
||||
SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetInBuf(void *openHandle, unsigned int secure_id, int size);
|
||||
#else
|
||||
SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetInBuf(void *openHandle, void *phyInBuf, void *virInBuf, int size);
|
||||
#endif
|
||||
|
||||
SSBSIP_MFC_DEC_OUTBUF_STATUS SsbSipMfcDecGetOutBuf(void *openHandle, SSBSIP_MFC_DEC_OUTPUT_INFO *output_info);
|
||||
|
||||
@@ -310,6 +368,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecGetConfig(void *openHandle, SSBSIP_MFC_DEC_CON
|
||||
/* Encoding APIs */
|
||||
/*--------------------------------------------------------------------------------*/
|
||||
void *SsbSipMfcEncOpen(void);
|
||||
void *SsbSipMfcEncOpenExt(void *value);
|
||||
SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param);
|
||||
SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle);
|
||||
SSBSIP_MFC_ERROR_CODE SsbSipMfcEncClose(void *openHandle);
|
||||
|
||||
Reference in New Issue
Block a user