summaryrefslogtreecommitdiffstats
path: root/sec_mm/sec_omx/sec_codecs
diff options
context:
space:
mode:
Diffstat (limited to 'sec_mm/sec_omx/sec_codecs')
-rw-r--r--sec_mm/sec_omx/sec_codecs/video/mfc_c110/enc/src/SsbSipMfcEncAPI.c24
-rw-r--r--sec_mm/sec_omx/sec_codecs/video/mfc_c110/include/SsbSipMfcApi.h9
-rw-r--r--sec_mm/sec_omx/sec_codecs/video/mfc_c110/include/mfc_interface.h4
3 files changed, 37 insertions, 0 deletions
diff --git a/sec_mm/sec_omx/sec_codecs/video/mfc_c110/enc/src/SsbSipMfcEncAPI.c b/sec_mm/sec_omx/sec_codecs/video/mfc_c110/enc/src/SsbSipMfcEncAPI.c
index c31e522..9216c7b 100644
--- a/sec_mm/sec_omx/sec_codecs/video/mfc_c110/enc/src/SsbSipMfcEncAPI.c
+++ b/sec_mm/sec_omx/sec_codecs/video/mfc_c110/enc/src/SsbSipMfcEncAPI.c
@@ -167,6 +167,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
EncArg.args.enc_init_mpeg4.in_luma_pad_val = mpeg4_arg->LumaPadVal;
EncArg.args.enc_init_mpeg4.in_cb_pad_val = mpeg4_arg->CbPadVal;
EncArg.args.enc_init_mpeg4.in_cr_pad_val = mpeg4_arg->CrPadVal;
+ EncArg.args.enc_init_mpeg4.in_frame_map = mpeg4_arg->FrameMap;
EncArg.args.enc_init_mpeg4.in_time_increament_res = mpeg4_arg->TimeIncreamentRes;
EncArg.args.enc_init_mpeg4.in_time_vop_time_increament = mpeg4_arg->VopTimeIncreament;
@@ -218,6 +219,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
EncArg.args.enc_init_mpeg4.in_luma_pad_val = h263_arg->LumaPadVal;
EncArg.args.enc_init_mpeg4.in_cb_pad_val = h263_arg->CbPadVal;
EncArg.args.enc_init_mpeg4.in_cr_pad_val = h263_arg->CrPadVal;
+ EncArg.args.enc_init_mpeg4.in_frame_map = mpeg4_arg->FrameMap;
EncArg.args.enc_init_mpeg4.in_RC_framerate = h263_arg->FrameRate;
EncArg.args.enc_init_mpeg4.in_RC_bitrate = h263_arg->Bitrate;
@@ -288,6 +290,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
EncArg.args.enc_init_h264.in_luma_pad_val = h264_arg->LumaPadVal;
EncArg.args.enc_init_h264.in_cb_pad_val = h264_arg->CbPadVal;
EncArg.args.enc_init_h264.in_cr_pad_val = h264_arg->CrPadVal;
+ EncArg.args.enc_init_mpeg4.in_frame_map = mpeg4_arg->FrameMap;
/* rate control*/
EncArg.args.enc_init_h264.in_RC_frm_enable = h264_arg->EnableFRMRateControl;
@@ -422,6 +425,27 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncClose(void *openHandle)
return MFC_RET_OK;
}
+SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetSize(void *openHandle, SSBSIP_MFC_CODEC_TYPE codecType, int nWidth, int nHeight)
+{
+ _MFCLIB *pCTX = (_MFCLIB *)openHandle;
+
+ if (pCTX == NULL)
+ return MFC_RET_INVALID_PARAM;
+
+ if (nWidth <= 0 || nHeight <= 0)
+ return MFC_RET_INVALID_PARAM;
+ pCTX->width = nWidth;
+ pCTX->height = nHeight;
+
+ if ((H264_ENC != codecType) &&
+ (MPEG4_ENC != codecType) &&
+ (H263_ENC != codecType))
+ return MFC_RET_INVALID_PARAM;
+ pCTX->codec_type = codecType;
+
+ return MFC_RET_OK;
+}
+
SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPUT_INFO *input_info)
{
int ret_code;
diff --git a/sec_mm/sec_omx/sec_codecs/video/mfc_c110/include/SsbSipMfcApi.h b/sec_mm/sec_omx/sec_codecs/video/mfc_c110/include/SsbSipMfcApi.h
index 646ff0d..a07739a 100644
--- a/sec_mm/sec_omx/sec_codecs/video/mfc_c110/include/SsbSipMfcApi.h
+++ b/sec_mm/sec_omx/sec_codecs/video/mfc_c110/include/SsbSipMfcApi.h
@@ -56,6 +56,11 @@ typedef enum {
} SSBSIP_MFC_FORCE_SET_FRAME_TYPE;
typedef enum {
+ NV12_LINEAR = 0,
+ NV12_TILE
+} SSBSIP_MFC_INSTRM_MODE_TYPE;
+
+typedef enum {
MFC_DEC_SETCONF_POST_ENABLE = 1,
MFC_DEC_SETCONF_EXTRA_BUFFER_NUM,
MFC_DEC_SETCONF_DISPLAY_DELAY,
@@ -182,6 +187,7 @@ typedef struct {
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
@@ -224,6 +230,7 @@ typedef struct {
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
@@ -255,6 +262,7 @@ typedef struct {
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)
@@ -302,6 +310,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param);
SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle);
SSBSIP_MFC_ERROR_CODE SsbSipMfcEncClose(void *openHandle);
+SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetSize(void *openHandle, SSBSIP_MFC_CODEC_TYPE codecType, int nWidth, int nHeight);
SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPUT_INFO *input_info);
SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPUT_INFO *input_info);
diff --git a/sec_mm/sec_omx/sec_codecs/video/mfc_c110/include/mfc_interface.h b/sec_mm/sec_omx/sec_codecs/video/mfc_c110/include/mfc_interface.h
index e7e23c3..f4a1f42 100644
--- a/sec_mm/sec_omx/sec_codecs/video/mfc_c110/include/mfc_interface.h
+++ b/sec_mm/sec_omx/sec_codecs/video/mfc_c110/include/mfc_interface.h
@@ -117,6 +117,8 @@ typedef struct {
int in_cb_pad_val;
int in_cr_pad_val;
+ int in_frame_map; /* [IN] Encoding input NV12 type linear(0) TILE(1) */
+
unsigned int in_mapped_addr;
mfc_strm_ref_buf_arg_t out_u_addr;
mfc_strm_ref_buf_arg_t out_p_addr;
@@ -158,6 +160,8 @@ typedef struct {
int in_cb_pad_val; /* [IN] CB pel value used to fill padding area */
int in_cr_pad_val; /* [IN] CR pel value used to fill padding area */
+ int in_frame_map; /* [IN] Encoding input NV12 type linear(0) TILE(1) */
+
unsigned int in_mapped_addr;
mfc_strm_ref_buf_arg_t out_u_addr;
mfc_strm_ref_buf_arg_t out_p_addr;