summaryrefslogtreecommitdiffstats
path: root/exynos
diff options
context:
space:
mode:
authorDaniel Hillenbrand <daniel.hillenbrand@codeworkx.de>2012-07-22 15:45:33 +0200
committerDaniel Hillenbrand <daniel.hillenbrand@codeworkx.de>2012-07-22 15:45:33 +0200
commit0fdadcaf08c588469ad9905b0136c894bb062fdf (patch)
tree8e2e52523f6d8bba08f8ec022535ff7b57474485 /exynos
parent29deaa07a920f242d8b2766fba3c8ffa374b1eaf (diff)
downloadhardware_samsung-0fdadcaf08c588469ad9905b0136c894bb062fdf.zip
hardware_samsung-0fdadcaf08c588469ad9905b0136c894bb062fdf.tar.gz
hardware_samsung-0fdadcaf08c588469ad9905b0136c894bb062fdf.tar.bz2
exynos hal: jellybean compat
Diffstat (limited to 'exynos')
-rw-r--r--exynos/multimedia/codecs/audio/exynos4/srp/alp/src/srp_api.c36
-rw-r--r--exynos/multimedia/codecs/audio/exynos4/srp/libsa_jni/SACtrl.c8
-rw-r--r--exynos/multimedia/codecs/audio/exynos4/srp/ulp/src/srp_api.c58
-rw-r--r--exynos/multimedia/codecs/audio/exynos4/srp/ulp/src/srp_api_ctrl.c52
-rw-r--r--exynos/multimedia/codecs/audio/exynos5/srp/alp/src/srp_api.c36
-rw-r--r--exynos/multimedia/codecs/video/exynos4/mfc/Android.mk6
-rw-r--r--exynos/multimedia/codecs/video/exynos4/mfc/dec/src/SsbSipMfcDecAPI.c118
-rw-r--r--exynos/multimedia/codecs/video/exynos4/mfc/enc/src/SsbSipMfcEncAPI.c118
-rw-r--r--exynos/multimedia/codecs/video/exynos4/mfc_v4l2/dec/src/SsbSipMfcDecAPI.c168
-rw-r--r--exynos/multimedia/codecs/video/exynos4/mfc_v4l2/enc/src/SsbSipMfcEncAPI.c126
-rw-r--r--exynos/multimedia/codecs/video/exynos5/mfc_v4l2/dec/src/SsbSipMfcDecAPI.c200
-rw-r--r--exynos/multimedia/codecs/video/exynos5/mfc_v4l2/enc/src/SsbSipMfcEncAPI.c140
-rw-r--r--exynos/multimedia/libstagefrighthw/Android.mk4
-rw-r--r--exynos/multimedia/libstagefrighthw/SEC_OMX_Plugin.cpp4
-rw-r--r--exynos/multimedia/libstagefrighthw/SEC_OMX_Plugin.h2
-rw-r--r--exynos/multimedia/openmax/osal/Android.mk1
-rw-r--r--exynos/multimedia/openmax/osal/SEC_OSAL_Android.cpp6
-rw-r--r--exynos/multimedia/utils/csc/exynos4/csc_fimc.cpp2
-rw-r--r--exynos/multimedia/utils/csc/exynos5/csc_fimc.cpp24
19 files changed, 554 insertions, 555 deletions
diff --git a/exynos/multimedia/codecs/audio/exynos4/srp/alp/src/srp_api.c b/exynos/multimedia/codecs/audio/exynos4/srp/alp/src/srp_api.c
index 56125fb..73c8c04 100644
--- a/exynos/multimedia/codecs/audio/exynos4/srp/alp/src/srp_api.c
+++ b/exynos/multimedia/codecs/audio/exynos4/srp/alp/src/srp_api.c
@@ -12,8 +12,8 @@
#include "srp_api.h"
-#define LOG_NDEBUG 1
-#define LOG_TAG "libsrpapi"
+#define ALOG_NDEBUG 1
+#define ALOG_TAG "libsrpapi"
#include <utils/Log.h>
static struct srp_buf_info ibuf_info;
@@ -35,7 +35,7 @@ int SRP_Create(int block_mode)
return SRP_ERROR_OPEN_FAIL;
}
- LOGE("%s: Device is already opened", __func__);
+ ALOGE("%s: Device is already opened", __func__);
return SRP_ERROR_ALREADY_OPEN;
}
@@ -52,20 +52,20 @@ int SRP_Init()
/* mmap for OBUF */
ret = ioctl(srp_dev, SRP_GET_MMAP_SIZE, &mmapped_size);
if (ret < 0) {
- LOGE("%s: SRP_GET_MMAP_SIZE is failed", __func__);
+ ALOGE("%s: SRP_GET_MMAP_SIZE is failed", __func__);
return SRP_ERROR_OBUF_MMAP;
}
obuf_info.mmapped_addr = mmap(0, mmapped_size,
PROT_READ | PROT_WRITE, MAP_SHARED, srp_dev, 0);
if (!obuf_info.mmapped_addr) {
- LOGE("%s: mmap is failed", __func__);
+ ALOGE("%s: mmap is failed", __func__);
return SRP_ERROR_OBUF_MMAP;
}
obuf_info.mmapped_size = mmapped_size;
ret = SRP_RETURN_OK;
} else {
- LOGE("%s: Device is not ready", __func__);
+ ALOGE("%s: Device is not ready", __func__);
ret = SRP_ERROR_NOT_READY; /* device is not created */
}
@@ -78,12 +78,12 @@ int SRP_Decode(void *buff, int size_byte)
if (srp_dev != -1) {
if (size_byte > 0) {
- LOGV("%s: Send data to RP (%d bytes)", __func__, size_byte);
+ ALOGV("%s: Send data to RP (%d bytes)", __func__, size_byte);
ret = write(srp_dev, buff, size_byte); /* Write Buffer to RP Driver */
if (ret < 0) {
if (ret != SRP_ERROR_IBUF_OVERFLOW)
- LOGE("SRP_Decode returned error code: %d", ret);
+ ALOGE("SRP_Decode returned error code: %d", ret);
}
return ret; /* Write Success */
} else {
@@ -91,7 +91,7 @@ int SRP_Decode(void *buff, int size_byte)
}
}
- LOGE("%s: Device is not ready", __func__);
+ ALOGE("%s: Device is not ready", __func__);
return SRP_ERROR_NOT_READY;
}
@@ -135,7 +135,7 @@ int SRP_Get_PCM(void **addr, unsigned int *size)
ret = read(srp_dev, &pcm_info, 0);
if (ret == -1) {
*size = 0;
- LOGE("%s: PCM read fail", __func__);
+ ALOGE("%s: PCM read fail", __func__);
return SRP_ERROR_OBUF_READ;
}
@@ -155,11 +155,11 @@ int SRP_Get_Dec_Info(struct srp_dec_info *dec_info)
if (srp_dev != -1) {
ret = ioctl(srp_dev, SRP_GET_DEC_INFO, dec_info);
if (ret < 0) {
- LOGE("%s: Failed to get dec info", __func__);
+ ALOGE("%s: Failed to get dec info", __func__);
return SRP_ERROR_GETINFO_FAIL;
}
- LOGV("numChannels(%d), samplingRate(%d)", dec_info->channels, dec_info->sample_rate);
+ ALOGV("numChannels(%d), samplingRate(%d)", dec_info->channels, dec_info->sample_rate);
ret = SRP_RETURN_OK;
} else {
@@ -176,7 +176,7 @@ int SRP_Get_Ibuf_Info(void **addr, unsigned int *size, unsigned int *num)
if (srp_dev != -1) {
ret = ioctl(srp_dev, SRP_GET_IBUF_INFO, &ibuf_info);
if (ret == -1) {
- LOGE("%s: Failed to get Ibuf info", __func__);
+ ALOGE("%s: Failed to get Ibuf info", __func__);
return SRP_ERROR_IBUF_INFO;
}
@@ -185,7 +185,7 @@ int SRP_Get_Ibuf_Info(void **addr, unsigned int *size, unsigned int *num)
*num = ibuf_info.num;
if (*num == 0) {
- LOGE("%s: IBUF num is 0", __func__);
+ ALOGE("%s: IBUF num is 0", __func__);
return SRP_ERROR_INVALID_SETTING;
}
@@ -205,7 +205,7 @@ int SRP_Get_Obuf_Info(void **addr, unsigned int *size, unsigned int *num)
if (obuf_info.addr == NULL) {
ret = ioctl(srp_dev, SRP_GET_OBUF_INFO, &obuf_info);
if (ret < 0) {
- LOGE("%s: SRP_GET_OBUF_INFO is failed", __func__);
+ ALOGE("%s: SRP_GET_OBUF_INFO is failed", __func__);
return SRP_ERROR_OBUF_INFO;
}
}
@@ -215,7 +215,7 @@ int SRP_Get_Obuf_Info(void **addr, unsigned int *size, unsigned int *num)
*num = obuf_info.num;
if (*num == 0) {
- LOGE("%s: OBUF num is 0", __func__);
+ ALOGE("%s: OBUF num is 0", __func__);
return SRP_ERROR_INVALID_SETTING;
}
@@ -256,10 +256,10 @@ int SRP_Terminate(void)
int SRP_IsOpen(void)
{
if (srp_dev == -1) {
- LOGV("%s: Device is not opened", __func__);
+ ALOGV("%s: Device is not opened", __func__);
return 0;
}
- LOGV("%s: Device is opened", __func__);
+ ALOGV("%s: Device is opened", __func__);
return 1;
}
diff --git a/exynos/multimedia/codecs/audio/exynos4/srp/libsa_jni/SACtrl.c b/exynos/multimedia/codecs/audio/exynos4/srp/libsa_jni/SACtrl.c
index 6b99dc3..9e696f4 100644
--- a/exynos/multimedia/codecs/audio/exynos4/srp/libsa_jni/SACtrl.c
+++ b/exynos/multimedia/codecs/audio/exynos4/srp/libsa_jni/SACtrl.c
@@ -7,7 +7,7 @@
#include "srp_api_ctrl.h"
-#define LOG_TAG "libsa_jni"
+#define ALOG_TAG "libsa_jni"
#include <cutils/log.h>
void Java_com_android_music_SetSACtrlJNI_set(JNIEnv * env, jobject obj, int effect_num)
@@ -15,17 +15,17 @@ void Java_com_android_music_SetSACtrlJNI_set(JNIEnv * env, jobject obj, int effe
unsigned long effect_enable = effect_num ? 1 : 0;
unsigned int ret;
- LOGD("Sound effect[%d]", effect_num);
+ ALOGD("Sound effect[%d]", effect_num);
ret = SRP_Ctrl_Enable_Effect(effect_enable);
if (ret < 0) {
- LOGE("%s: Couldn't enabled effect\n", __func__);
+ ALOGE("%s: Couldn't enabled effect\n", __func__);
return;
}
SRP_Ctrl_Set_Effect_Def(effect_num << 5);
if (ret < 0) {
- LOGE("%s: Couldn't defined effect\n", __func__);
+ ALOGE("%s: Couldn't defined effect\n", __func__);
return;
}
diff --git a/exynos/multimedia/codecs/audio/exynos4/srp/ulp/src/srp_api.c b/exynos/multimedia/codecs/audio/exynos4/srp/ulp/src/srp_api.c
index b0c0e5e..2848346 100644
--- a/exynos/multimedia/codecs/audio/exynos4/srp/ulp/src/srp_api.c
+++ b/exynos/multimedia/codecs/audio/exynos4/srp/ulp/src/srp_api.c
@@ -12,14 +12,14 @@
#include "srp_api.h"
-#define LOG_TAG "libsrpapi"
+#define ALOG_TAG "libsrpapi"
#include <cutils/log.h>
-/* Disable LOGD message */
-#ifdef LOGD
-#undef LOGD
+/* Disable ALOGD message */
+#ifdef ALOGD
+#undef ALOGD
#endif
-#define LOGD(...)
+#define ALOGD(...)
//#define _USE_WBUF_ /* Buffering before writing srp-rp device */
//#define _DUMP_TO_FILE_
@@ -48,11 +48,11 @@ static int WriteBuff_Init(void)
wbuf_size = srp_ibuf_size * WBUF_LEN_MUL;
wbuf_pos = 0;
wbuf = (unsigned char *)malloc(wbuf_size);
- LOGD("%s: WriteBuffer %dbytes allocated", __func__, wbuf_size);
+ ALOGD("%s: WriteBuffer %dbytes allocated", __func__, wbuf_size);
return 0;
}
- LOGE("%s: WriteBuffer already allocated", __func__);
+ ALOGE("%s: WriteBuffer already allocated", __func__);
return -1;
}
@@ -64,7 +64,7 @@ static int WriteBuff_Deinit(void)
return 0;
}
- LOGE("%s: WriteBuffer is not ready", __func__);
+ ALOGE("%s: WriteBuffer is not ready", __func__);
return -1;
}
@@ -76,7 +76,7 @@ static int WriteBuff_Write(unsigned char *buff, int size_byte)
memcpy(&wbuf[wbuf_pos], buff, size_byte);
wbuf_pos += size_byte;
} else {
- LOGE("%s: WriteBuffer is filled [%d], ignoring write [%d]", __func__, wbuf_pos, size_byte);
+ ALOGE("%s: WriteBuffer is filled [%d], ignoring write [%d]", __func__, wbuf_pos, size_byte);
return -1; /* Insufficient buffer */
}
@@ -109,7 +109,7 @@ int SRP_Create(int block_mode)
return srp_dev;
}
- LOGE("%s: Device is not ready", __func__);
+ ALOGE("%s: Device is not ready", __func__);
return -1; /* device alreay opened */
}
@@ -134,11 +134,11 @@ int SRP_Init(unsigned int ibuf_size)
}
}
- LOGD("%s: Dump MP3 to %s", __func__, outname);
+ ALOGD("%s: Dump MP3 to %s", __func__, outname);
if (fp_dump = fopen(outname, "wb"))
- LOGD("%s: Success to open %s", __func__, outname);
+ ALOGD("%s: Success to open %s", __func__, outname);
else
- LOGD("%s: Fail to open %s", __func__, outname);
+ ALOGD("%s: Fail to open %s", __func__, outname);
#endif
#ifdef _USE_WBUF_
@@ -149,7 +149,7 @@ int SRP_Init(unsigned int ibuf_size)
#endif
}
- LOGE("%s: Device is not ready", __func__);
+ ALOGE("%s: Device is not ready", __func__);
return -1; /* device is not created */
}
@@ -163,17 +163,17 @@ int SRP_Decode(void *buff, int size_byte)
if (srp_dev != -1) {
/* Check wbuf before writing buff */
while (wbuf_pos >= srp_ibuf_size) { /* Write_Buffer filled? (IBUF Size)*/
- LOGD("%s: Write Buffer is full, Send data to RP", __func__);
+ ALOGD("%s: Write Buffer is full, Send data to RP", __func__);
ret = write(srp_dev, wbuf, srp_ibuf_size); /* Write Buffer to RP Driver */
if (ret == -1) { /* Fail? */
ioctl(srp_dev, SRP_ERROR_STATE, &val);
if (!val) { /* Write error? */
- LOGE("%s: IBUF write fail", __func__);
+ ALOGE("%s: IBUF write fail", __func__);
return -1;
} else { /* Write OK, but RP decode error? */
err_code = val;
- LOGE("%s: RP decode error [0x%05X]", __func__, err_code);
+ ALOGE("%s: RP decode error [0x%05X]", __func__, err_code);
}
}
#ifdef _DUMP_TO_FILE_
@@ -187,11 +187,11 @@ int SRP_Decode(void *buff, int size_byte)
if (ret == -1)
return -1; /* Buffering error */
- LOGD("%s: Write Buffer remain [%d]", __func__, wbuf_pos);
+ ALOGD("%s: Write Buffer remain [%d]", __func__, wbuf_pos);
return err_code; /* Write Success */
}
- LOGE("%s: Device is not ready", __func__);
+ ALOGE("%s: Device is not ready", __func__);
return -1; /* device is not created */
}
@@ -212,10 +212,10 @@ int SRP_Send_EOS(void)
if (ret == -1) { /* Fail? */
ret = ioctl(srp_dev, SRP_ERROR_STATE, &val);
if (!val) { /* Write error? */
- LOGE("%s: IBUF write fail", __func__);
+ ALOGE("%s: IBUF write fail", __func__);
return -1;
} else { /* RP decoe error? */
- LOGE("%s: RP decode error [0x%05X]", __func__, val);
+ ALOGE("%s: RP decode error [0x%05X]", __func__, val);
return -1;
}
} else { /* Success? */
@@ -244,17 +244,17 @@ int SRP_Decode(void *buff, int size_byte)
int err_code = 0;
if (srp_dev != -1) {
- LOGD("%s: Send data to RP (%d bytes)", __func__, size_byte);
+ ALOGD("%s: Send data to RP (%d bytes)", __func__, size_byte);
ret = write(srp_dev, buff, size_byte); /* Write Buffer to RP Driver */
if (ret == -1) { /* Fail? */
ioctl(srp_dev, SRP_ERROR_STATE, &val);
if (!val) { /* Write error? */
- LOGE("%s: IBUF write fail", __func__);
+ ALOGE("%s: IBUF write fail", __func__);
return -1;
} else { /* Write OK, but RP decode error? */
err_code = val;
- LOGE("%s: RP decode error [0x%05X]", __func__, err_code);
+ ALOGE("%s: RP decode error [0x%05X]", __func__, err_code);
}
}
#ifdef _DUMP_TO_FILE_
@@ -265,7 +265,7 @@ int SRP_Decode(void *buff, int size_byte)
return err_code; /* Write Success */
}
- LOGE("%s: Device is not ready", __func__);
+ ALOGE("%s: Device is not ready", __func__);
return -1; /* device is not created */
}
@@ -348,7 +348,7 @@ int SRP_Deinit(void)
return ioctl(srp_dev, SRP_DEINIT); /* Deinialize */
}
- LOGE("%s: Device is not ready", __func__);
+ ALOGE("%s: Device is not ready", __func__);
return -1; /* device is not created */
}
@@ -365,17 +365,17 @@ int SRP_Terminate(void)
}
}
- LOGE("%s: Device is not ready", __func__);
+ ALOGE("%s: Device is not ready", __func__);
return -1; /* device is not created or close error*/
}
int SRP_IsOpen(void)
{
if (srp_dev == -1) {
- LOGD("%s: Device is not opened", __func__);
+ ALOGD("%s: Device is not opened", __func__);
return 0;
}
- LOGD("%s: Device is opened", __func__);
+ ALOGD("%s: Device is opened", __func__);
return 1;
}
diff --git a/exynos/multimedia/codecs/audio/exynos4/srp/ulp/src/srp_api_ctrl.c b/exynos/multimedia/codecs/audio/exynos4/srp/ulp/src/srp_api_ctrl.c
index bdc2310..ed32089 100644
--- a/exynos/multimedia/codecs/audio/exynos4/srp/ulp/src/srp_api_ctrl.c
+++ b/exynos/multimedia/codecs/audio/exynos4/srp/ulp/src/srp_api_ctrl.c
@@ -13,14 +13,14 @@
#include "srp_api_ctrl.h"
#include "srp_ioctl.h"
-#define LOG_TAG "libsrpapi"
+#define ALOG_TAG "libsrpapi"
#include <cutils/log.h>
-/* Disable LOGD message */
-#ifdef LOGD
-#undef LOGD
+/* Disable ALOGD message */
+#ifdef ALOGD
+#undef ALOGD
#endif
-#define LOGD(...)
+#define ALOGD(...)
static int srp_ctrl = -1;
static int srp_ctrl_cnt = 0;
@@ -42,11 +42,11 @@ static int SRP_Ctrl_Open(void)
if (srp_ctrl_cnt == 0) {
srp_ctrl = open(SRP_CTRL_DEV_NAME, O_RDWR | O_NDELAY);
if (srp_ctrl < 0) {
- LOGE("%s: Failed open device file %d", __func__, srp_ctrl);
+ ALOGE("%s: Failed open device file %d", __func__, srp_ctrl);
return -1;
}
srp_ctrl_cnt++;
- LOGV("%s: Device is opened[%d]: cnt %d", __func__, srp_ctrl, srp_ctrl_cnt);
+ ALOGV("%s: Device is opened[%d]: cnt %d", __func__, srp_ctrl, srp_ctrl_cnt);
}
return srp_ctrl;
@@ -59,11 +59,11 @@ static int SRP_Ctrl_Close(void)
if (srp_ctrl_cnt == 1) {
ret = close(srp_ctrl);
if (ret < 0) {
- LOGE("%s: Failed closen device file %d", __func__, srp_ctrl);
+ ALOGE("%s: Failed closen device file %d", __func__, srp_ctrl);
return -1;
}
srp_ctrl_cnt--;
- LOGV("%s: Device is closed[%d]: cnt %d", __func__, srp_ctrl, srp_ctrl_cnt);
+ ALOGV("%s: Device is closed[%d]: cnt %d", __func__, srp_ctrl, srp_ctrl_cnt);
srp_ctrl = -1;
}
@@ -86,13 +86,13 @@ static int SRP_Check_AltFirmware(void)
ioctl(srp_ctrl, SRP_CTRL_ALTFW_STATE, &alt_fw_loaded);
if (!alt_fw_loaded) { /* Not loaded yet? */
- LOGE("Try to download alternate RP firmware");
+ ALOGE("Try to download alternate RP firmware");
temp_buff = (unsigned long *)malloc(256*1024); /* temp buffer */
for (alt_fw_set = 0; alt_fw_set < 6; alt_fw_set++) {
sprintf(alt_fw_name, "%s_text.bin", srp_alt_fw_name_pre[alt_fw_set]);
if (fp = fopen(alt_fw_name, "rb")) {
- LOGE("RP Alt-Firmware Loading: %s", alt_fw_name);
+ ALOGE("RP Alt-Firmware Loading: %s", alt_fw_name);
fread(temp_buff, 64*1024, 1, fp);
close(fp);
alt_fw_text_ok = 1;
@@ -102,7 +102,7 @@ static int SRP_Check_AltFirmware(void)
sprintf(alt_fw_name, "%s_data.bin", srp_alt_fw_name_pre[alt_fw_set]);
if (fp = fopen(alt_fw_name, "rb")) {
- LOGE("RP Alt-Firmware Loading: %s", alt_fw_name);
+ ALOGE("RP Alt-Firmware Loading: %s", alt_fw_name);
fread(&temp_buff[64*1024/4], 96*1024, 1, fp);
close(fp);
alt_fw_data_ok = 1;
@@ -131,7 +131,7 @@ int SRP_Ctrl_Set_Effect(int effect)
ret = SRP_Ctrl_Open();
if (ret < 0) {
- LOGE("%s: SRP_Ctrl_Open error", __func__);
+ ALOGE("%s: SRP_Ctrl_Open error", __func__);
return -1;
}
@@ -149,7 +149,7 @@ int SRP_Ctrl_Enable_Effect(int on)
ret = SRP_Ctrl_Open();
if (ret < 0) {
- LOGE("%s: SRP_Ctrl_Open error", __func__);
+ ALOGE("%s: SRP_Ctrl_Open error", __func__);
return -1;
}
@@ -166,7 +166,7 @@ int SRP_Ctrl_Set_Effect_Def(unsigned long effect_def)
ret = SRP_Ctrl_Open();
if (ret < 0) {
- LOGE("%s: SRP_Ctrl_Open error", __func__);
+ ALOGE("%s: SRP_Ctrl_Open error", __func__);
return -1;
}
@@ -183,7 +183,7 @@ int SRP_Ctrl_Set_Effect_EQ_User(unsigned long eq_user)
ret = SRP_Ctrl_Open();
if (ret < 0) {
- LOGE("%s: SRP_Ctrl_Open error", __func__);
+ ALOGE("%s: SRP_Ctrl_Open error", __func__);
return -1;
}
@@ -200,13 +200,13 @@ int SRP_Ctrl_Set_Pcm_Dump(int on)
ret = SRP_Ctrl_Open();
if (ret < 0) {
- LOGE("%s: SRP_Ctrl_Open error", __func__);
+ ALOGE("%s: SRP_Ctrl_Open error", __func__);
return -1;
}
ioctl(srp_ctrl, SRP_CTRL_PCM_DUMP_OP, on);
- LOGV("dump_op: %d", on);
+ ALOGV("dump_op: %d", on);
SRP_Ctrl_Close();
@@ -220,13 +220,13 @@ int SRP_Ctrl_Get_Pcm_Dump_State(void)
ret = SRP_Ctrl_Open();
if (ret < 0) {
- LOGE("%s: SRP_Ctrl_Open error", __func__);
+ ALOGE("%s: SRP_Ctrl_Open error", __func__);
return -1;
}
ioctl(srp_ctrl, SRP_CTRL_IS_PCM_DUMP, &srp_dump_stat);
- LOGV("srp_dump_stat: %d", srp_dump_stat);
+ ALOGV("srp_dump_stat: %d", srp_dump_stat);
SRP_Ctrl_Close();
@@ -240,7 +240,7 @@ int SRP_Ctrl_Set_Gain(float value)
ret = SRP_Ctrl_Open();
if (ret < 0) {
- LOGE("%s: SRP_Ctrl_Open error", __func__);
+ ALOGE("%s: SRP_Ctrl_Open error", __func__);
return -1;
}
@@ -259,13 +259,13 @@ int SRP_Ctrl_Get_Running_Stat(void)
ret = SRP_Ctrl_Open();
if (ret < 0) {
- LOGE("%s: SRP_Ctrl_Open error", __func__);
+ ALOGE("%s: SRP_Ctrl_Open error", __func__);
return -1;
}
ioctl(srp_ctrl, SRP_CTRL_IS_RUNNING, &srp_running_stat);
- LOGV("srp_running_stat: %d", srp_running_stat);
+ ALOGV("srp_running_stat: %d", srp_running_stat);
SRP_Ctrl_Close();
@@ -279,13 +279,13 @@ int SRP_Ctrl_Get_Open_Stat(void)
ret = SRP_Ctrl_Open();
if (ret < 0) {
- LOGE("%s: SRP_Ctrl_Open error", __func__);
+ ALOGE("%s: SRP_Ctrl_Open error", __func__);
return -1;
}
ioctl(srp_ctrl, SRP_CTRL_IS_OPENED, &srp_open_stat);
- LOGV("srp_open_stat: %d", srp_open_stat);
+ ALOGV("srp_open_stat: %d", srp_open_stat);
SRP_Ctrl_Close();
@@ -301,7 +301,7 @@ short *SRP_Ctrl_Get_Pcm(void)
ret = SRP_Ctrl_Open();
if (ret < 0) {
- LOGE("%s: SRP_Ctrl_Open error", __func__);
+ ALOGE("%s: SRP_Ctrl_Open error", __func__);
return NULL;
}
diff --git a/exynos/multimedia/codecs/audio/exynos5/srp/alp/src/srp_api.c b/exynos/multimedia/codecs/audio/exynos5/srp/alp/src/srp_api.c
index 56125fb..73c8c04 100644
--- a/exynos/multimedia/codecs/audio/exynos5/srp/alp/src/srp_api.c
+++ b/exynos/multimedia/codecs/audio/exynos5/srp/alp/src/srp_api.c
@@ -12,8 +12,8 @@
#include "srp_api.h"
-#define LOG_NDEBUG 1
-#define LOG_TAG "libsrpapi"
+#define ALOG_NDEBUG 1
+#define ALOG_TAG "libsrpapi"
#include <utils/Log.h>
static struct srp_buf_info ibuf_info;
@@ -35,7 +35,7 @@ int SRP_Create(int block_mode)
return SRP_ERROR_OPEN_FAIL;
}
- LOGE("%s: Device is already opened", __func__);
+ ALOGE("%s: Device is already opened", __func__);
return SRP_ERROR_ALREADY_OPEN;
}
@@ -52,20 +52,20 @@ int SRP_Init()
/* mmap for OBUF */
ret = ioctl(srp_dev, SRP_GET_MMAP_SIZE, &mmapped_size);
if (ret < 0) {
- LOGE("%s: SRP_GET_MMAP_SIZE is failed", __func__);
+ ALOGE("%s: SRP_GET_MMAP_SIZE is failed", __func__);
return SRP_ERROR_OBUF_MMAP;
}
obuf_info.mmapped_addr = mmap(0, mmapped_size,
PROT_READ | PROT_WRITE, MAP_SHARED, srp_dev, 0);
if (!obuf_info.mmapped_addr) {
- LOGE("%s: mmap is failed", __func__);
+ ALOGE("%s: mmap is failed", __func__);
return SRP_ERROR_OBUF_MMAP;
}
obuf_info.mmapped_size = mmapped_size;
ret = SRP_RETURN_OK;
} else {
- LOGE("%s: Device is not ready", __func__);
+ ALOGE("%s: Device is not ready", __func__);
ret = SRP_ERROR_NOT_READY; /* device is not created */
}
@@ -78,12 +78,12 @@ int SRP_Decode(void *buff, int size_byte)
if (srp_dev != -1) {
if (size_byte > 0) {
- LOGV("%s: Send data to RP (%d bytes)", __func__, size_byte);
+ ALOGV("%s: Send data to RP (%d bytes)", __func__, size_byte);
ret = write(srp_dev, buff, size_byte); /* Write Buffer to RP Driver */
if (ret < 0) {
if (ret != SRP_ERROR_IBUF_OVERFLOW)
- LOGE("SRP_Decode returned error code: %d", ret);
+ ALOGE("SRP_Decode returned error code: %d", ret);
}
return ret; /* Write Success */
} else {
@@ -91,7 +91,7 @@ int SRP_Decode(void *buff, int size_byte)
}
}
- LOGE("%s: Device is not ready", __func__);
+ ALOGE("%s: Device is not ready", __func__);
return SRP_ERROR_NOT_READY;
}
@@ -135,7 +135,7 @@ int SRP_Get_PCM(void **addr, unsigned int *size)
ret = read(srp_dev, &pcm_info, 0);
if (ret == -1) {
*size = 0;
- LOGE("%s: PCM read fail", __func__);
+ ALOGE("%s: PCM read fail", __func__);
return SRP_ERROR_OBUF_READ;
}
@@ -155,11 +155,11 @@ int SRP_Get_Dec_Info(struct srp_dec_info *dec_info)
if (srp_dev != -1) {
ret = ioctl(srp_dev, SRP_GET_DEC_INFO, dec_info);
if (ret < 0) {
- LOGE("%s: Failed to get dec info", __func__);
+ ALOGE("%s: Failed to get dec info", __func__);
return SRP_ERROR_GETINFO_FAIL;
}
- LOGV("numChannels(%d), samplingRate(%d)", dec_info->channels, dec_info->sample_rate);
+ ALOGV("numChannels(%d), samplingRate(%d)", dec_info->channels, dec_info->sample_rate);
ret = SRP_RETURN_OK;
} else {
@@ -176,7 +176,7 @@ int SRP_Get_Ibuf_Info(void **addr, unsigned int *size, unsigned int *num)
if (srp_dev != -1) {
ret = ioctl(srp_dev, SRP_GET_IBUF_INFO, &ibuf_info);
if (ret == -1) {
- LOGE("%s: Failed to get Ibuf info", __func__);
+ ALOGE("%s: Failed to get Ibuf info", __func__);
return SRP_ERROR_IBUF_INFO;
}
@@ -185,7 +185,7 @@ int SRP_Get_Ibuf_Info(void **addr, unsigned int *size, unsigned int *num)
*num = ibuf_info.num;
if (*num == 0) {
- LOGE("%s: IBUF num is 0", __func__);
+ ALOGE("%s: IBUF num is 0", __func__);
return SRP_ERROR_INVALID_SETTING;
}
@@ -205,7 +205,7 @@ int SRP_Get_Obuf_Info(void **addr, unsigned int *size, unsigned int *num)
if (obuf_info.addr == NULL) {
ret = ioctl(srp_dev, SRP_GET_OBUF_INFO, &obuf_info);
if (ret < 0) {
- LOGE("%s: SRP_GET_OBUF_INFO is failed", __func__);
+ ALOGE("%s: SRP_GET_OBUF_INFO is failed", __func__);
return SRP_ERROR_OBUF_INFO;
}
}
@@ -215,7 +215,7 @@ int SRP_Get_Obuf_Info(void **addr, unsigned int *size, unsigned int *num)
*num = obuf_info.num;
if (*num == 0) {
- LOGE("%s: OBUF num is 0", __func__);
+ ALOGE("%s: OBUF num is 0", __func__);
return SRP_ERROR_INVALID_SETTING;
}
@@ -256,10 +256,10 @@ int SRP_Terminate(void)
int SRP_IsOpen(void)
{
if (srp_dev == -1) {
- LOGV("%s: Device is not opened", __func__);
+ ALOGV("%s: Device is not opened", __func__);
return 0;
}
- LOGV("%s: Device is opened", __func__);
+ ALOGV("%s: Device is opened", __func__);
return 1;
}
diff --git a/exynos/multimedia/codecs/video/exynos4/mfc/Android.mk b/exynos/multimedia/codecs/video/exynos4/mfc/Android.mk
index 2b3bd48..f712c3c 100644
--- a/exynos/multimedia/codecs/video/exynos4/mfc/Android.mk
+++ b/exynos/multimedia/codecs/video/exynos4/mfc/Android.mk
@@ -23,7 +23,7 @@ LOCAL_PRELINK_MODULE := false
ifeq ($(BOARD_USES_MFC_FPS),true)
LOCAL_CFLAGS := -DCONFIG_MFC_FPS
-#LOCAL_CFLAGS += -DCONFIG_MFC_PERF_LOG
+#LOCAL_CFLAGS += -DCONFIG_MFC_PERF_ALOG
endif
ifeq ($(BOARD_USE_S3D_SUPPORT), true)
@@ -61,7 +61,7 @@ LOCAL_PRELINK_MODULE := false
ifeq ($(BOARD_USES_MFC_FPS),true)
LOCAL_CFLAGS := -DCONFIG_MFC_FPS
-#LOCAL_CFLAGS += -DCONFIG_MFC_PERF_LOG
+#LOCAL_CFLAGS += -DCONFIG_MFC_PERF_ALOG
endif
ifeq ($(BOARD_USE_S3D_SUPPORT), true)
@@ -99,7 +99,7 @@ LOCAL_PRELINK_MODULE := false
ifeq ($(BOARD_USES_MFC_FPS),true)
LOCAL_CFLAGS := -DCONFIG_MFC_FPS
-#LOCAL_CFLAGS += -DCONFIG_MFC_PERF_LOG
+#LOCAL_CFLAGS += -DCONFIG_MFC_PERF_ALOG
endif
ifeq ($(BOARD_USE_S3D_SUPPORT), true)
diff --git a/exynos/multimedia/codecs/video/exynos4/mfc/dec/src/SsbSipMfcDecAPI.c b/exynos/multimedia/codecs/video/exynos4/mfc/dec/src/SsbSipMfcDecAPI.c
index 92a8ca6..df985dc 100644
--- a/exynos/multimedia/codecs/video/exynos4/mfc/dec/src/SsbSipMfcDecAPI.c
+++ b/exynos/multimedia/codecs/video/exynos4/mfc/dec/src/SsbSipMfcDecAPI.c
@@ -34,9 +34,9 @@
#include "SsbSipMfcApi.h"
#include <utils/Log.h>
-/*#define LOG_NDEBUG 0*/
-#undef LOG_TAG
-#define LOG_TAG "MFC_DEC_APP"
+/*#define ALOG_NDEBUG 0*/
+#undef ALOG_TAG
+#define ALOG_TAG "MFC_DEC_APP"
#ifdef CONFIG_MFC_FPS
#include <sys/time.h>
@@ -76,21 +76,21 @@ static int isPBPacked(_MFCLIB *pCtx, int Frameleng)
while (1) {
while (startCode != USR_DATA_START_CODE) {
if ((startCode == VOP_START_CODE) || (leng_idx == Frameleng)) {
- LOGI("isPBPacked] VOP START Found !!.....return");
- LOGW("isPBPacked] Non Packed PB");
+ ALOGI("isPBPacked] VOP START Found !!.....return");
+ ALOGW("isPBPacked] Non Packed PB");
return 0;
}
getAByte(strmBuffer, &startCode);
- LOGV(">> StartCode = 0x%08x <<\n", startCode);
+ ALOGV(">> StartCode = 0x%08x <<\n", startCode);
strmBuffer++;
leng_idx++;
}
- LOGI("isPBPacked] User Data Found !!");
+ ALOGI("isPBPacked] User Data Found !!");
do {
if (*strmBuffer == 'p') {
- /*LOGI(">> peter strmBuffer = 0x%08x <<\n", *strmBuffer);*/
- LOGW("isPBPacked] Packed PB\n");
+ /*ALOGI(">> peter strmBuffer = 0x%08x <<\n", *strmBuffer);*/
+ ALOGW("isPBPacked] Packed PB\n");
return 1;
}
getAByte(strmBuffer, &startCode);
@@ -101,7 +101,7 @@ static int isPBPacked(_MFCLIB *pCtx, int Frameleng)
break;
}
- LOGW("isPBPacked] Non Packed PB");
+ ALOGW("isPBPacked] Non Packed PB");
return 0;
}
@@ -119,7 +119,7 @@ void *SsbSipMfcDecOpen(void)
int mapped_size;
struct mfc_common_args CommonArg;
- LOGI("[%s] MFC Library Ver %d.%02d\n",__func__, MFC_LIB_VER_MAJOR, MFC_LIB_VER_MINOR);
+ ALOGI("[%s] MFC Library Ver %d.%02d\n",__func__, MFC_LIB_VER_MAJOR, MFC_LIB_VER_MINOR);
#ifdef CONFIG_MFC_FPS
framecount = 0;
over30ms = 0;
@@ -128,27 +128,27 @@ void *SsbSipMfcDecOpen(void)
#endif
pCTX = (_MFCLIB *)malloc(sizeof(_MFCLIB));
if (pCTX == NULL) {
- LOGE("SsbSipMfcDecOpen] malloc failed.\n");
+ ALOGE("SsbSipMfcDecOpen] malloc failed.\n");
return NULL;
}
memset(pCTX, 0, sizeof(_MFCLIB));
if (access(mfc_dev_name, F_OK) != 0) {
- LOGE("SsbSipMfcDecOpen] MFC device node not exists");
+ ALOGE("SsbSipMfcDecOpen] MFC device node not exists");
free(pCTX);
return NULL;
}
hMFCOpen = open(mfc_dev_name, O_RDWR | O_NDELAY);
if (hMFCOpen < 0) {
- LOGE("SsbSipMfcDecOpen] MFC Open failure");
+ ALOGE("SsbSipMfcDecOpen] MFC Open failure");
free(pCTX);
return NULL;
}
mapped_size = ioctl(hMFCOpen, IOCTL_MFC_GET_MMAP_SIZE, &CommonArg);
if ((mapped_size < 0) || (CommonArg.ret_code != MFC_OK)) {
- LOGE("SsbSipMfcDecOpen] IOCTL_MFC_GET_MMAP_SIZE failed");
+ ALOGE("SsbSipMfcDecOpen] IOCTL_MFC_GET_MMAP_SIZE failed");
free(pCTX);
close(hMFCOpen);
return NULL;
@@ -156,7 +156,7 @@ void *SsbSipMfcDecOpen(void)
mapped_addr = (unsigned int)mmap(0, mapped_size, PROT_READ | PROT_WRITE, MAP_SHARED, hMFCOpen, 0);
if (!mapped_addr) {
- LOGE("SsbSipMfcDecOpen] FIMV5.x driver address mapping failed");
+ ALOGE("SsbSipMfcDecOpen] FIMV5.x driver address mapping failed");
free(pCTX);
close(hMFCOpen);
return NULL;
@@ -180,24 +180,24 @@ void *SsbSipMfcDecOpenExt(void *value)
int err;
struct mfc_common_args CommonArg;
- LOGI("[%s] MFC Library Ver %d.%02d\n",__func__, MFC_LIB_VER_MAJOR, MFC_LIB_VER_MINOR);
+ ALOGI("[%s] MFC Library Ver %d.%02d\n",__func__, MFC_LIB_VER_MAJOR, MFC_LIB_VER_MINOR);
pCTX = (_MFCLIB *)malloc(sizeof(_MFCLIB));
if (pCTX == NULL) {
- LOGE("SsbSipMfcDecOpenExt] malloc failed.\n");
+ ALOGE("SsbSipMfcDecOpenExt] malloc failed.\n");
return NULL;
}
memset(pCTX, 0, sizeof(_MFCLIB));
if (access(mfc_dev_name, F_OK) != 0) {
- LOGE("SsbSipMfcDecOpen] MFC device node not exists");
+ ALOGE("SsbSipMfcDecOpen] MFC device node not exists");
free(pCTX);
return NULL;
}
hMFCOpen = open(mfc_dev_name, O_RDWR | O_NDELAY);
if (hMFCOpen < 0) {
- LOGE("SsbSipMfcDecOpenExt] MFC Open failure");
+ ALOGE("SsbSipMfcDecOpenExt] MFC Open failure");
free(pCTX);
return NULL;
}
@@ -206,7 +206,7 @@ void *SsbSipMfcDecOpenExt(void *value)
err = ioctl(hMFCOpen, IOCTL_MFC_SET_BUF_CACHE, &CommonArg);
if ((err < 0) || (CommonArg.ret_code != MFC_OK)) {
- LOGE("SsbSipMfcDecOpenExt] IOCTL_MFC_SET_BUF_CACHE failed");
+ ALOGE("SsbSipMfcDecOpenExt] IOCTL_MFC_SET_BUF_CACHE failed");
free(pCTX);
close(hMFCOpen);
return NULL;
@@ -214,7 +214,7 @@ void *SsbSipMfcDecOpenExt(void *value)
mapped_size = ioctl(hMFCOpen, IOCTL_MFC_GET_MMAP_SIZE, &CommonArg);
if ((mapped_size < 0) || (CommonArg.ret_code != MFC_OK)) {
- LOGE("SsbSipMfcDecOpenExt] IOCTL_MFC_GET_MMAP_SIZE failed");
+ ALOGE("SsbSipMfcDecOpenExt] IOCTL_MFC_GET_MMAP_SIZE failed");
free(pCTX);
close(hMFCOpen);
return NULL;
@@ -222,7 +222,7 @@ void *SsbSipMfcDecOpenExt(void *value)
mapped_addr = (unsigned int)mmap(0, mapped_size, PROT_READ | PROT_WRITE, MAP_SHARED, hMFCOpen, 0);
if (!mapped_addr) {
- LOGE("SsbSipMfcDecOpenExt] FIMV5.x driver address mapping failed");
+ ALOGE("SsbSipMfcDecOpenExt] FIMV5.x driver address mapping failed");
free(pCTX);
close(hMFCOpen);
return NULL;
@@ -245,7 +245,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit (void *openHandle, SSBSIP_MFC_CODEC_TYPE
_MFCLIB *pCTX;
if (openHandle == NULL) {
- LOGE("SsbSipMfcDecInit] openHandle is NULL");
+ ALOGE("SsbSipMfcDecInit] openHandle is NULL");
return MFC_RET_INVALID_PARAM;
}
@@ -264,7 +264,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit (void *openHandle, SSBSIP_MFC_CODEC_TYPE
(codec_type != XVID_DEC) &&
(codec_type != VC1RCV_DEC) &&
(codec_type != VC1_DEC)) {
- LOGE("SsbSipMfcDecInit] Undefined codec type");
+ ALOGE("SsbSipMfcDecInit] Undefined codec type");
return MFC_RET_INVALID_PARAM;
}
pCTX->codecType = codec_type;
@@ -300,7 +300,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit (void *openHandle, SSBSIP_MFC_CODEC_TYPE
r = ioctl(pCTX->hMFC, IOCTL_MFC_DEC_INIT, &DecArg);
if (DecArg.ret_code != MFC_OK) {
- LOGE("SsbSipMfcDecInit] IOCTL_MFC_DEC_INIT failed");
+ ALOGE("SsbSipMfcDecInit] IOCTL_MFC_DEC_INIT failed");
return MFC_RET_DEC_INIT_FAIL;
}
@@ -341,12 +341,12 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExe(void *openHandle, int lengthBufFill)
long int diffTime, avgTime;
#endif
if (openHandle == NULL) {
- LOGE("SsbSipMfcDecExe] openHandle is NULL\n");
+ ALOGE("SsbSipMfcDecExe] openHandle is NULL\n");
return MFC_RET_INVALID_PARAM;
}
if ((lengthBufFill < 0) || (lengthBufFill > MAX_DECODER_INPUT_BUFFER_SIZE)) {
- LOGE("SsbSipMfcDecExe] lengthBufFill is invalid. (lengthBufFill=%d)", lengthBufFill);
+ ALOGE("SsbSipMfcDecExe] lengthBufFill is invalid. (lengthBufFill=%d)", lengthBufFill);
return MFC_RET_INVALID_PARAM;
}
@@ -366,12 +366,12 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExe(void *openHandle, int lengthBufFill)
#ifdef CONFIG_MFC_FPS
gettimeofday(&mDec1, NULL);
-#ifdef CONFIG_MFC_PERF_LOG
+#ifdef CONFIG_MFC_PERF_ALOG
if (framecount != 0) {
if (mDec2.tv_sec == mDec1.tv_sec)
- LOGI("SsbSipMfcDecExe] Interval between IOCTL_MFC_DEC_EXE's (end to start) = %8d", (mDec1.tv_usec - mDec2.tv_usec));
+ ALOGI("SsbSipMfcDecExe] Interval between IOCTL_MFC_DEC_EXE's (end to start) = %8d", (mDec1.tv_usec - mDec2.tv_usec));
else
- LOGI("SsbSipMfcDecExe] Interval between IOCTL_MFC_DEC_EXE's (end to start) = %8d", (1000000 + (mDec1.tv_usec - mDec2.tv_usec)));
+ ALOGI("SsbSipMfcDecExe] Interval between IOCTL_MFC_DEC_EXE's (end to start) = %8d", (1000000 + (mDec1.tv_usec - mDec2.tv_usec)));
}
#endif
#endif
@@ -379,7 +379,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExe(void *openHandle, int lengthBufFill)
ret = ioctl(pCTX->hMFC, IOCTL_MFC_DEC_EXE, &DecArg);
if (DecArg.ret_code != MFC_OK) {
- LOGE("SsbSipMfcDecExe] IOCTL_MFC_DEC_EXE failed(ret : %d)", DecArg.ret_code);
+ ALOGE("SsbSipMfcDecExe] IOCTL_MFC_DEC_EXE failed(ret : %d)", DecArg.ret_code);
return MFC_RET_DEC_EXE_ERR;
}
@@ -390,14 +390,14 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExe(void *openHandle, int lengthBufFill)
if (mDec1.tv_sec == mDec2.tv_sec) {
if (mDec2.tv_usec - mDec1.tv_usec > 30000)
over30ms++;
-#ifdef CONFIG_MFC_PERF_LOG
- LOGI("SsbSipMfcDecExe] Time consumed for IOCTL_MFC_DEC_EXE = %8d", ((mDec2.tv_usec - mDec1.tv_usec)));
+#ifdef CONFIG_MFC_PERF_ALOG
+ ALOGI("SsbSipMfcDecExe] Time consumed for IOCTL_MFC_DEC_EXE = %8d", ((mDec2.tv_usec - mDec1.tv_usec)));
#endif
} else {
if (1000000 + mDec2.tv_usec - mDec1.tv_usec > 30000)
over30ms++;
-#ifdef CONFIG_MFC_PERF_LOG
- LOGI("SsbSipMfcDecExe] Time consumed for IOCTL_MFC_DEC_EXE = %8d", (1000000 + (mDec2.tv_usec - mDec1.tv_usec)));
+#ifdef CONFIG_MFC_PERF_ALOG
+ ALOGI("SsbSipMfcDecExe] Time consumed for IOCTL_MFC_DEC_EXE = %8d", (1000000 + (mDec2.tv_usec - mDec1.tv_usec)));
#endif
}
@@ -411,7 +411,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExe(void *openHandle, int lengthBufFill)
/* FIXME: dynamic resolution change */
if (DecArg.args.dec_exe.out_display_status == 4) {
- LOGI("SsbSipMfcDecExe] Resolution is chagned");
+ ALOGI("SsbSipMfcDecExe] Resolution is chagned");
/*
pCTX->virFrmBuf.chroma = DecArg.args.dec_exe.out_u_addr.chroma;
pCTX->virFrmBuf.luma = DecArg.args.dec_exe.out_u_addr.luma;
@@ -466,14 +466,14 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecClose(void *openHandle)
struct mfc_common_args free_arg;
#ifdef CONFIG_MFC_FPS
- LOGI(">>> Statistics in MFC API:");
- LOGI(">>> Total number of IOCTL_MFC_DEC_EXE = %d", framecount);
- LOGI(">>> Number of IOCTL_MFC_DEC_EXE taking more than 30ms = %d", over30ms);
- LOGI(">>> Avg IOCTL_MFC_DEC_EXE time = %dsec %.2fmsec", (int)mAvg.tv_sec, (float)(mAvg.tv_usec / 1000.0));
+ ALOGI(">>> Statistics in MFC API:");
+ ALOGI(">>> Total number of IOCTL_MFC_DEC_EXE = %d", framecount);
+ ALOGI(">>> Number of IOCTL_MFC_DEC_EXE taking more than 30ms = %d", over30ms);
+ ALOGI(">>> Avg IOCTL_MFC_DEC_EXE time = %dsec %.2fmsec", (int)mAvg.tv_sec, (float)(mAvg.tv_usec / 1000.0));
#endif
if (openHandle == NULL) {
- LOGE("SsbSipMfcDecClose] openHandle is NULL");
+ ALOGE("SsbSipMfcDecClose] openHandle is NULL");
return MFC_RET_INVALID_PARAM;
}
@@ -511,12 +511,12 @@ void *SsbSipMfcDecGetInBuf(void *openHandle, void **phyInBuf, int inputBufferSi
struct mfc_common_args user_addr_arg, phys_addr_arg;
if (inputBufferSize < 0) {
- LOGE("SsbSipMfcDecGetInBuf] inputBufferSize = %d is invalid", inputBufferSize);
+ ALOGE("SsbSipMfcDecGetInBuf] inputBufferSize = %d is invalid", inputBufferSize);
return NULL;
}
if (openHandle == NULL) {
- LOGE("SsbSipMfcDecGetInBuf] openHandle is NULL\n");
+ ALOGE("SsbSipMfcDecGetInBuf] openHandle is NULL\n");
return NULL;
}
@@ -528,14 +528,14 @@ void *SsbSipMfcDecGetInBuf(void *openHandle, void **phyInBuf, int inputBufferSi
user_addr_arg.args.mem_alloc.mapped_addr = pCTX->mapped_addr;
ret_code = ioctl(pCTX->hMFC, IOCTL_MFC_GET_IN_BUF, &user_addr_arg);
if (ret_code < 0) {
- LOGE("SsbSipMfcDecGetInBuf] IOCTL_MFC_GET_IN_BUF failed");
+ ALOGE("SsbSipMfcDecGetInBuf] IOCTL_MFC_GET_IN_BUF failed");
return NULL;
}
phys_addr_arg.args.real_addr.key = user_addr_arg.args.mem_alloc.offset;
ret_code = ioctl(pCTX->hMFC, IOCTL_MFC_GET_REAL_ADDR, &phys_addr_arg);
if (ret_code < 0) {
- LOGE("SsbSipMfcDecGetInBuf] IOCTL_MFC_GET_PHYS_ADDR failed");
+ ALOGE("SsbSipMfcDecGetInBuf] IOCTL_MFC_GET_PHYS_ADDR failed");
return NULL;
}
@@ -558,7 +558,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetInBuf(void *openHandle, void *phyInBuf, voi
_MFCLIB *pCTX;
if (openHandle == NULL) {
- LOGE("SsbSipMfcDecSetInBuf] openHandle is NULL");
+ ALOGE("SsbSipMfcDecSetInBuf] openHandle is NULL");
return MFC_RET_INVALID_PARAM;
}
@@ -575,7 +575,7 @@ SSBSIP_MFC_DEC_OUTBUF_STATUS SsbSipMfcDecGetOutBuf(void *openHandle, SSBSIP_MFC_
_MFCLIB *pCTX;
if (openHandle == NULL) {
- LOGE("SsbSipMfcDecGetOutBuf] openHandle is NULL");
+ ALOGE("SsbSipMfcDecGetOutBuf] openHandle is NULL");
return MFC_GETOUTBUF_DISPLAY_END;
}
@@ -626,12 +626,12 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetConfig(void *openHandle, SSBSIP_MFC_DEC_CON
struct mfc_dec_fimv1_info *fimv1_res;
if (openHandle == NULL) {
- LOGE("SsbSipMfcDecSetConfig] openHandle is NULL");
+ ALOGE("SsbSipMfcDecSetConfig] openHandle is NULL");
return MFC_RET_INVALID_PARAM;
}
if (value == NULL) {
- LOGE("SsbSipMfcDecSetConfig] value is NULL");
+ ALOGE("SsbSipMfcDecSetConfig] value is NULL");
return MFC_RET_INVALID_PARAM;
}
@@ -669,8 +669,8 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetConfig(void *openHandle, SSBSIP_MFC_DEC_CON
case MFC_DEC_SETCONF_FIMV1_WIDTH_HEIGHT:
fimv1_res = (struct mfc_dec_fimv1_info *)value;
- LOGI("fimv1->width = %d\n", fimv1_res->width);
- LOGI("fimv1->height = %d\n", fimv1_res->height);
+ ALOGI("fimv1->width = %d\n", fimv1_res->width);
+ ALOGI("fimv1->height = %d\n", fimv1_res->height);
#ifdef S3D_SUPPORT
DecArg.args.config.args.basic.values[0] = (int)(fimv1_res->width);
DecArg.args.config.args.basic.values[1] = (int)(fimv1_res->height);
@@ -696,7 +696,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetConfig(void *openHandle, SSBSIP_MFC_DEC_CON
ret_code = ioctl(pCTX->hMFC, IOCTL_MFC_SET_CONFIG, &DecArg);
if (DecArg.ret_code != MFC_OK) {
- LOGE("SsbSipMfcDecSetConfig] IOCTL_MFC_SET_CONFIG failed(ret : %d, conf_type: 0x%08x)", DecArg.ret_code, conf_type);
+ ALOGE("SsbSipMfcDecSetConfig] IOCTL_MFC_SET_CONFIG failed(ret : %d, conf_type: 0x%08x)", DecArg.ret_code, conf_type);
return MFC_RET_DEC_SET_CONF_FAIL;
}
@@ -722,12 +722,12 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecGetConfig(void *openHandle, SSBSIP_MFC_DEC_CON
#endif
if (openHandle == NULL) {
- LOGE("SsbSipMfcDecGetConfig] openHandle is NULL");
+ ALOGE("SsbSipMfcDecGetConfig] openHandle is NULL");
return MFC_RET_INVALID_PARAM;
}
if (value == NULL) {
- LOGE("SsbSipMfcDecGetConfig] value is NULL");
+ ALOGE("SsbSipMfcDecGetConfig] value is NULL");
return MFC_RET_INVALID_PARAM;
}
@@ -740,7 +740,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecGetConfig(void *openHandle, SSBSIP_MFC_DEC_CON
phys_addr_arg.args.get_phys_addr.u_addr = buf_addr->u_addr;
r = ioctl(pCTX->hMFC, IOCTL_MFC_GET_PHYS_ADDR, &phys_addr_arg);
if (r < 0) {
- LOGE("SsbSipMfcDecGetConfig] IOCTL_MFC_GET_PHYS_ADDR failed");
+ ALOGE("SsbSipMfcDecGetConfig] IOCTL_MFC_GET_PHYS_ADDR failed");
return MFC_API_FAIL;
}
buf_addr->p_addr = phys_addr_arg.args.get_phys_addr.p_addr;
@@ -771,7 +771,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecGetConfig(void *openHandle, SSBSIP_MFC_DEC_CON
ret_code = ioctl(pCTX->hMFC, IOCTL_MFC_GET_CONFIG, &DecArg);
if (DecArg.ret_code != MFC_OK) {
- LOGE("SsbSipMfcDecGetConfig] IOCTL_MFC_GET_CONFIG failed(ret : %d, conf_type: 0x%08x)", DecArg.ret_code, conf_type);
+ ALOGE("SsbSipMfcDecGetConfig] IOCTL_MFC_GET_CONFIG failed(ret : %d, conf_type: 0x%08x)", DecArg.ret_code, conf_type);
return MFC_RET_DEC_GET_CONF_FAIL;
}
@@ -793,7 +793,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecGetConfig(void *openHandle, SSBSIP_MFC_DEC_CON
ret_code = ioctl(pCTX->hMFC, IOCTL_MFC_GET_CONFIG, &DecArg);
if (DecArg.ret_code != MFC_OK) {
- LOGE("SsbSipMfcDecGetConfig] IOCTL_MFC_GET_CONFIG failed(ret : %d, conf_type: 0x%08x)", DecArg.ret_code, conf_type);
+ ALOGE("SsbSipMfcDecGetConfig] IOCTL_MFC_GET_CONFIG failed(ret : %d, conf_type: 0x%08x)", DecArg.ret_code, conf_type);
return MFC_RET_DEC_GET_CONF_FAIL;
}
crc_data->luma0 = DecArg.args.get_config.out_config_value[0];
@@ -801,7 +801,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecGetConfig(void *openHandle, SSBSIP_MFC_DEC_CON
#endif
break;
default:
- LOGE("SsbSipMfcDecGetConfig] No such conf_type is supported");
+ ALOGE("SsbSipMfcDecGetConfig] No such conf_type is supported");
return MFC_RET_DEC_GET_CONF_FAIL;
}
diff --git a/exynos/multimedia/codecs/video/exynos4/mfc/enc/src/SsbSipMfcEncAPI.c b/exynos/multimedia/codecs/video/exynos4/mfc/enc/src/SsbSipMfcEncAPI.c
index 797baad..92df6b0 100644
--- a/exynos/multimedia/codecs/video/exynos4/mfc/enc/src/SsbSipMfcEncAPI.c
+++ b/exynos/multimedia/codecs/video/exynos4/mfc/enc/src/SsbSipMfcEncAPI.c
@@ -30,9 +30,9 @@
#include "SsbSipMfcApi.h"
#include <utils/Log.h>
-/* #define LOG_NDEBUG 0 */
-#undef LOG_TAG
-#define LOG_TAG "MFC_ENC_APP"
+/* #define ALOG_NDEBUG 0 */
+#undef ALOG_TAG
+#define ALOG_TAG "MFC_ENC_APP"
#define _MFCLIB_MAGIC_NUMBER 0x92241001
@@ -51,31 +51,31 @@ void *SsbSipMfcEncOpen(void)
int mapped_size;
struct mfc_common_args CommonArg;
- LOGI("[%s] MFC Library Ver %d.%02d",__func__, MFC_LIB_VER_MAJOR, MFC_LIB_VER_MINOR);
+ ALOGI("[%s] MFC Library Ver %d.%02d",__func__, MFC_LIB_VER_MAJOR, MFC_LIB_VER_MINOR);
#if 0
if ((codecType != MPEG4_ENC) &&
(codecType != H264_ENC) &&
(codecType != H263_ENC)) {
- LOGE("SsbSipMfcEncOpen] Undefined codec type");
+ ALOGE("SsbSipMfcEncOpen] Undefined codec type");
return NULL;
}
#endif
if (access(mfc_dev_name, F_OK) != 0) {
- LOGE("SsbSipMfcEncOpen] MFC device node not exists");
+ ALOGE("SsbSipMfcEncOpen] MFC device node not exists");
return NULL;
}
hMFCOpen = open(mfc_dev_name, O_RDWR | O_NDELAY);
if (hMFCOpen < 0) {
- LOGE("SsbSipMfcEncOpen] MFC Open failure");
+ ALOGE("SsbSipMfcEncOpen] MFC Open failure");
return NULL;
}
pCTX = (_MFCLIB *)malloc(sizeof(_MFCLIB));
if (pCTX == NULL) {
- LOGE("SsbSipMfcEncOpen] malloc failed.");
+ ALOGE("SsbSipMfcEncOpen] malloc failed.");
close(hMFCOpen);
return NULL;
}
@@ -83,7 +83,7 @@ void *SsbSipMfcEncOpen(void)
mapped_size = ioctl(hMFCOpen, IOCTL_MFC_GET_MMAP_SIZE, &CommonArg);
if ((mapped_size < 0) || (CommonArg.ret_code != MFC_OK)) {
- LOGE("SsbSipMfcEncOpen] IOCTL_MFC_GET_MMAP_SIZE failed");
+ ALOGE("SsbSipMfcEncOpen] IOCTL_MFC_GET_MMAP_SIZE failed");
free(pCTX);
close(hMFCOpen);
return NULL;
@@ -91,7 +91,7 @@ void *SsbSipMfcEncOpen(void)
mapped_addr = (unsigned int)mmap(0, mapped_size, PROT_READ | PROT_WRITE, MAP_SHARED, hMFCOpen, 0);
if (!mapped_addr) {
- LOGE("SsbSipMfcEncOpen] FIMV5.x driver address mapping failed");
+ ALOGE("SsbSipMfcEncOpen] FIMV5.x driver address mapping failed");
free(pCTX);
close(hMFCOpen);
return NULL;
@@ -116,31 +116,31 @@ void *SsbSipMfcEncOpenExt(void *value)
int err;
struct mfc_common_args CommonArg;
- LOGI("[%s] MFC Library Ver %d.%02d",__func__, MFC_LIB_VER_MAJOR, MFC_LIB_VER_MINOR);
+ ALOGI("[%s] MFC Library Ver %d.%02d",__func__, MFC_LIB_VER_MAJOR, MFC_LIB_VER_MINOR);
#if 0
if ((codecType != MPEG4_ENC) &&
(codecType != H264_ENC) &&
(codecType != H263_ENC)) {
- LOGE("SsbSipMfcEncOpen] Undefined codec type");
+ ALOGE("SsbSipMfcEncOpen] Undefined codec type");
return NULL;
}
#endif
if (access(mfc_dev_name, F_OK) != 0) {
- LOGE("SsbSipMfcEncOpenExt] MFC device node not exists");
+ ALOGE("SsbSipMfcEncOpenExt] MFC device node not exists");
return NULL;
}
hMFCOpen = open(mfc_dev_name, O_RDWR | O_NDELAY);
if (hMFCOpen < 0) {
- LOGE("SsbSipMfcEncOpenExt] MFC Open failure");
+ ALOGE("SsbSipMfcEncOpenExt] MFC Open failure");
return NULL;
}
pCTX = (_MFCLIB *)malloc(sizeof(_MFCLIB));
if (pCTX == NULL) {
- LOGE("SsbSipMfcEncOpenExt] malloc failed.");
+ ALOGE("SsbSipMfcEncOpenExt] malloc failed.");
close(hMFCOpen);
return NULL;
}
@@ -150,7 +150,7 @@ void *SsbSipMfcEncOpenExt(void *value)
err = ioctl(hMFCOpen, IOCTL_MFC_SET_BUF_CACHE, &CommonArg);
if ((err < 0) || (CommonArg.ret_code != MFC_OK)) {
- LOGE("SsbSipMfcEncOpenExt] IOCTL_MFC_SET_BUF_CACHE failed");
+ ALOGE("SsbSipMfcEncOpenExt] IOCTL_MFC_SET_BUF_CACHE failed");
free(pCTX);
close(hMFCOpen);
return NULL;
@@ -158,7 +158,7 @@ void *SsbSipMfcEncOpenExt(void *value)
mapped_size = ioctl(hMFCOpen, IOCTL_MFC_GET_MMAP_SIZE, &CommonArg);
if ((mapped_size < 0) || (CommonArg.ret_code != MFC_OK)) {
- LOGE("SsbSipMfcEncOpenExt] IOCTL_MFC_GET_MMAP_SIZE failed");
+ ALOGE("SsbSipMfcEncOpenExt] IOCTL_MFC_GET_MMAP_SIZE failed");
free(pCTX);
close(hMFCOpen);
return NULL;
@@ -166,7 +166,7 @@ void *SsbSipMfcEncOpenExt(void *value)
mapped_addr = (unsigned int)mmap(0, mapped_size, PROT_READ | PROT_WRITE, MAP_SHARED, hMFCOpen, 0);
if (!mapped_addr) {
- LOGE("SsbSipMfcEncOpenExt] FIMV5.x driver address mapping failed");
+ ALOGE("SsbSipMfcEncOpenExt] FIMV5.x driver address mapping failed");
free(pCTX);
close(hMFCOpen);
return NULL;
@@ -208,17 +208,17 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
if (h264_arg->codecType == H264_ENC) {
pCTX->codecType = H264_ENC;
} else {
- LOGE("SsbSipMfcEncInit] Undefined codec type");
+ ALOGE("SsbSipMfcEncInit] Undefined codec type");
return MFC_RET_INVALID_PARAM;
}
}
}
- LOGI("SsbSipMfcEncInit] Encode Init start");
+ ALOGI("SsbSipMfcEncInit] Encode Init start");
switch (pCTX->codecType) {
case MPEG4_ENC:
- LOGI("SsbSipMfcEncInit] MPEG4 Encode");
+ ALOGI("SsbSipMfcEncInit] MPEG4 Encode");
mpeg4_arg = (SSBSIP_MFC_ENC_MPEG4_PARAM *)param;
pCTX->width = mpeg4_arg->SourceWidth;
@@ -226,7 +226,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
break;
case H263_ENC:
- LOGI("SsbSipMfcEncInit] H263 Encode");
+ ALOGI("SsbSipMfcEncInit] H263 Encode");
h263_arg = (SSBSIP_MFC_ENC_H263_PARAM *)param;
pCTX->width = h263_arg->SourceWidth;
@@ -234,7 +234,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
break;
case H264_ENC:
- LOGI("SsbSipMfcEncInit] H264 Encode");
+ ALOGI("SsbSipMfcEncInit] H264 Encode");
h264_arg = (SSBSIP_MFC_ENC_H264_PARAM *)param;
pCTX->width = h264_arg->SourceWidth;
@@ -263,7 +263,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
/* rate control*/
EncArg.args.enc_init.cmn.in_rc_fr_en = mpeg4_arg->EnableFRMRateControl;
if ((mpeg4_arg->QSCodeMin > 31) || (mpeg4_arg->QSCodeMax > 31)) {
- LOGE("SsbSipMfcEncInit] No such Min/Max QP is supported");
+ ALOGE("SsbSipMfcEncInit] No such Min/Max QP is supported");
return MFC_RET_INVALID_PARAM;
}
EncArg.args.enc_init.cmn.in_rc_qbound_min = mpeg4_arg->QSCodeMin;
@@ -273,7 +273,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
/* pad control */
EncArg.args.enc_init.cmn.in_pad_ctrl_on = mpeg4_arg->PadControlOn;
if ((mpeg4_arg->LumaPadVal > 255) || (mpeg4_arg->CbPadVal > 255) || (mpeg4_arg->CrPadVal > 255)) {
- LOGE("SsbSipMfcEncInit] No such Pad value is supported");
+ ALOGE("SsbSipMfcEncInit] No such Pad value is supported");
return MFC_RET_INVALID_PARAM;
}
EncArg.args.enc_init.cmn.in_y_pad_val = mpeg4_arg->LumaPadVal;
@@ -285,7 +285,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
EncArg.args.enc_init.cmn.in_rc_bitrate = mpeg4_arg->Bitrate;
if ((mpeg4_arg->FrameQp > 31) || (mpeg4_arg->FrameQp_P > 31)) {
- LOGE("SsbSipMfcEncInit] No such FrameQp is supported");
+ ALOGE("SsbSipMfcEncInit] No such FrameQp is supported");
return MFC_RET_INVALID_PARAM;
}
EncArg.args.enc_init.cmn.in_vop_quant = mpeg4_arg->FrameQp;
@@ -296,13 +296,13 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
EncArg.args.enc_init.codec.mpeg4.in_level = mpeg4_arg->LevelIDC;
if (mpeg4_arg->FrameQp_B > 31) {
- LOGE("SsbSipMfcEncInit] No such FrameQp is supported");
+ ALOGE("SsbSipMfcEncInit] No such FrameQp is supported");
return MFC_RET_INVALID_PARAM;
}
EncArg.args.enc_init.codec.mpeg4.in_vop_quant_b = mpeg4_arg->FrameQp_B;
if (mpeg4_arg->NumberBFrames > 2) {
- LOGE("SsbSipMfcEncInit] No such BframeNum is supported");
+ ALOGE("SsbSipMfcEncInit] No such BframeNum is supported");
return MFC_RET_INVALID_PARAM;
}
EncArg.args.enc_init.codec.mpeg4.in_bframenum = mpeg4_arg->NumberBFrames;
@@ -331,7 +331,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
/* rate control*/
EncArg.args.enc_init.cmn.in_rc_fr_en = h263_arg->EnableFRMRateControl;
if ((h263_arg->QSCodeMin > 31) || (h263_arg->QSCodeMax > 31)) {
- LOGE("SsbSipMfcEncInit] No such Min/Max QP is supported");
+ ALOGE("SsbSipMfcEncInit] No such Min/Max QP is supported");
return MFC_RET_INVALID_PARAM;
}
EncArg.args.enc_init.cmn.in_rc_qbound_min = h263_arg->QSCodeMin;
@@ -341,7 +341,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
/* pad control */
EncArg.args.enc_init.cmn.in_pad_ctrl_on = h263_arg->PadControlOn;
if ((h263_arg->LumaPadVal > 255) || (h263_arg->CbPadVal > 255) || (h263_arg->CrPadVal > 255)) {
- LOGE("SsbSipMfcEncInit] No such Pad value is supported");
+ ALOGE("SsbSipMfcEncInit] No such Pad value is supported");
return MFC_RET_INVALID_PARAM;
}
EncArg.args.enc_init.cmn.in_y_pad_val = h263_arg->LumaPadVal;
@@ -353,7 +353,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
EncArg.args.enc_init.cmn.in_rc_bitrate = h263_arg->Bitrate;
if ((h263_arg->FrameQp > 31) || (h263_arg->FrameQp_P > 31)) {
- LOGE("SsbSipMfcEncInit] No such FrameQp is supported");
+ ALOGE("SsbSipMfcEncInit] No such FrameQp is supported");
return MFC_RET_INVALID_PARAM;
}
EncArg.args.enc_init.cmn.in_vop_quant = h263_arg->FrameQp;
@@ -377,7 +377,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
(h264_arg->SliceMode == 2)||(h264_arg->SliceMode == 4)) {
EncArg.args.enc_init.cmn.in_ms_mode = h264_arg->SliceMode;
} else {
- LOGE("SsbSipMfcEncInit] No such slice mode is supported");
+ ALOGE("SsbSipMfcEncInit] No such slice mode is supported");
return MFC_RET_INVALID_PARAM;
}
EncArg.args.enc_init.cmn.in_ms_arg = h264_arg->SliceArgument;
@@ -386,7 +386,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
/* pad control */
EncArg.args.enc_init.cmn.in_pad_ctrl_on = h264_arg->PadControlOn;
if ((h264_arg->LumaPadVal > 255) || (h264_arg->CbPadVal > 255) || (h264_arg->CrPadVal > 255)) {
- LOGE("SsbSipMfcEncInit] No such Pad value is supported");
+ ALOGE("SsbSipMfcEncInit] No such Pad value is supported");
return MFC_RET_INVALID_PARAM;
}
EncArg.args.enc_init.cmn.in_y_pad_val = h264_arg->LumaPadVal;
@@ -400,14 +400,14 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
EncArg.args.enc_init.cmn.in_rc_fr_en = h264_arg->EnableFRMRateControl;
EncArg.args.enc_init.cmn.in_rc_bitrate = h264_arg->Bitrate;
if ((h264_arg->FrameQp > 51) || (h264_arg->FrameQp_P > 51)) {
- LOGE("SsbSipMfcEncInit] No such FrameQp is supported");
+ ALOGE("SsbSipMfcEncInit] No such FrameQp is supported");
return MFC_RET_INVALID_PARAM;
}
EncArg.args.enc_init.cmn.in_vop_quant = h264_arg->FrameQp;
EncArg.args.enc_init.cmn.in_vop_quant_p = h264_arg->FrameQp_P;
if ((h264_arg->QSCodeMin > 51) || (h264_arg->QSCodeMax > 51)) {
- LOGE("SsbSipMfcEncInit] No such Min/Max QP is supported");
+ ALOGE("SsbSipMfcEncInit] No such Min/Max QP is supported");
return MFC_RET_INVALID_PARAM;
}
EncArg.args.enc_init.cmn.in_rc_qbound_min = h264_arg->QSCodeMin;
@@ -420,13 +420,13 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
EncArg.args.enc_init.codec.h264.in_level = h264_arg->LevelIDC;
if (h264_arg->FrameQp_B > 51) {
- LOGE("SsbSipMfcEncInit] No such FrameQp is supported");
+ ALOGE("SsbSipMfcEncInit] No such FrameQp is supported");
return MFC_RET_INVALID_PARAM;
}
EncArg.args.enc_init.codec.h264.in_vop_quant_b = h264_arg->FrameQp_B;
if (h264_arg->NumberBFrames > 2) {
- LOGE("SsbSipMfcEncInit] No such BframeNum is supported");
+ ALOGE("SsbSipMfcEncInit] No such BframeNum is supported");
return MFC_RET_INVALID_PARAM;
}
EncArg.args.enc_init.codec.h264.in_bframenum = h264_arg->NumberBFrames;
@@ -434,7 +434,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
EncArg.args.enc_init.codec.h264.in_interlace_mode = h264_arg->PictureInterlace;
if ((h264_arg->NumberRefForPframes > 2)||(h264_arg->NumberReferenceFrames >2)) {
- LOGE("SsbSipMfcEncInit] No such ref Num is supported");
+ ALOGE("SsbSipMfcEncInit] No such ref Num is supported");
return MFC_RET_INVALID_PARAM;
}
EncArg.args.enc_init.codec.h264.in_reference_num = h264_arg->NumberReferenceFrames;
@@ -450,7 +450,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
EncArg.args.enc_init.codec.h264.in_deblock_dis = h264_arg->LoopFilterDisable;
if ((abs(h264_arg->LoopFilterAlphaC0Offset) > 6) || (abs(h264_arg->LoopFilterBetaOffset) > 6)) {
- LOGE("SsbSipMfcEncInit] No such AlphaC0Offset or BetaOffset is supported");
+ ALOGE("SsbSipMfcEncInit] No such AlphaC0Offset or BetaOffset is supported");
return MFC_RET_INVALID_PARAM;
}
EncArg.args.enc_init.codec.h264.in_deblock_alpha_c0 = h264_arg->LoopFilterAlphaC0Offset;
@@ -466,7 +466,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
break;
default:
- LOGE("SsbSipMfcEncInit] No such codec type is supported");
+ ALOGE("SsbSipMfcEncInit] No such codec type is supported");
return MFC_RET_INVALID_PARAM;
}
@@ -474,7 +474,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
ret_code = ioctl(pCTX->hMFC, IOCTL_MFC_ENC_INIT, &EncArg);
if (EncArg.ret_code != MFC_OK) {
- LOGE("SsbSipMfcEncInit] IOCTL_MFC_ENC_INIT failed");
+ ALOGE("SsbSipMfcEncInit] IOCTL_MFC_ENC_INIT failed");
return MFC_RET_ENC_INIT_FAIL;
}
@@ -498,7 +498,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle)
struct mfc_common_args EncArg;
if (openHandle == NULL) {
- LOGE("SsbSipMfcEncExe] openHandle is NULL");
+ ALOGE("SsbSipMfcEncExe] openHandle is NULL");
return MFC_RET_INVALID_PARAM;
}
@@ -524,7 +524,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle)
ret_code = ioctl(pCTX->hMFC, IOCTL_MFC_ENC_EXE, &EncArg);
if (EncArg.ret_code != MFC_OK) {
- LOGE("SsbSipMfcEncExe] IOCTL_MFC_ENC_EXE failed(ret : %d)", EncArg.ret_code);
+ ALOGE("SsbSipMfcEncExe] IOCTL_MFC_ENC_EXE failed(ret : %d)", EncArg.ret_code);
return MFC_RET_ENC_EXE_ERR;
}
@@ -535,7 +535,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle)
pCTX->outframetagtop = EncArg.args.enc_exe.out_frametag_top;
pCTX->outframetagbottom = EncArg.args.enc_exe.out_frametag_bottom;
- LOGV("SsbSipMfcEncExe] Encode success ==================");
+ ALOGV("SsbSipMfcEncExe] Encode success ==================");
return MFC_RET_OK;
}
@@ -547,7 +547,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncClose(void *openHandle)
struct mfc_common_args free_arg;
if (openHandle == NULL) {
- LOGE("SsbSipMfcEncClose] openHandle is NULL");
+ ALOGE("SsbSipMfcEncClose] openHandle is NULL");
return MFC_RET_INVALID_PARAM;
}
@@ -586,7 +586,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPU
int aligned_y_size, aligned_c_size;
if (openHandle == NULL) {
- LOGE("SsbSipMfcEncGetInBuf] openHandle is NULL");
+ ALOGE("SsbSipMfcEncGetInBuf] openHandle is NULL");
return MFC_RET_INVALID_PARAM;
}
@@ -606,7 +606,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPU
user_addr_arg.args.mem_alloc.mapped_addr = pCTX->mapped_addr;
ret_code = ioctl(pCTX->hMFC, IOCTL_MFC_GET_IN_BUF, &user_addr_arg);
if (ret_code < 0) {
- LOGE("SsbSipMfcEncGetInBuf] IOCTL_MFC_GET_IN_BUF failed");
+ ALOGE("SsbSipMfcEncGetInBuf] IOCTL_MFC_GET_IN_BUF failed");
return MFC_RET_ENC_GET_INBUF_FAIL;
}
@@ -616,7 +616,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPU
real_addr_arg.args.real_addr.key = user_addr_arg.args.mem_alloc.offset;
ret_code = ioctl(pCTX->hMFC, IOCTL_MFC_GET_REAL_ADDR, &real_addr_arg);
if (ret_code < 0) {
- LOGE("SsbSipMfcEncGetInBuf] IOCTL_MFC_GET_REAL_ADDR failed");
+ ALOGE("SsbSipMfcEncGetInBuf] IOCTL_MFC_GET_REAL_ADDR failed");
return MFC_RET_ENC_GET_INBUF_FAIL;
}
pCTX->phyFrmBuf.luma = real_addr_arg.args.real_addr.addr;
@@ -643,11 +643,11 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPU
int aligned_y_size, aligned_c_size;
if (openHandle == NULL) {
- LOGE("SsbSipMfcEncSetInBuf] openHandle is NULL");
+ ALOGE("SsbSipMfcEncSetInBuf] openHandle is NULL");
return MFC_RET_INVALID_PARAM;
}
- LOGV("SsbSipMfcEncSetInBuf] input_info->YPhyAddr & input_info->CPhyAddr should be 64KB aligned");
+ ALOGV("SsbSipMfcEncSetInBuf] input_info->YPhyAddr & input_info->CPhyAddr should be 64KB aligned");
pCTX = (_MFCLIB *) openHandle;
@@ -673,7 +673,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetOutBuf(void *openHandle, SSBSIP_MFC_ENC_OUT
_MFCLIB *pCTX;
if (openHandle == NULL) {
- LOGE("SsbSipMfcEncGetOutBuf] openHandle is NULL");
+ ALOGE("SsbSipMfcEncGetOutBuf] openHandle is NULL");
return MFC_RET_INVALID_PARAM;
}
@@ -705,7 +705,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetOutBuf(void *openHandle, void *phyOutbuf, v
_MFCLIB *pCTX;
if (openHandle == NULL) {
- LOGE("SsbSipMfcEncSetOutBuf] openHandle is NULL");
+ ALOGE("SsbSipMfcEncSetOutBuf] openHandle is NULL");
return MFC_RET_INVALID_PARAM;
}
@@ -731,12 +731,12 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetConfig(void *openHandle, SSBSIP_MFC_ENC_CON
#endif
if (openHandle == NULL) {
- LOGE("SsbSipMfcEncSetConfig] openHandle is NULL");
+ ALOGE("SsbSipMfcEncSetConfig] openHandle is NULL");
return MFC_RET_INVALID_PARAM;
}
if (value == NULL) {
- LOGE("SsbSipMfcEncSetConfig] value is NULL");
+ ALOGE("SsbSipMfcEncSetConfig] value is NULL");
return MFC_RET_INVALID_PARAM;
}
@@ -787,7 +787,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetConfig(void *openHandle, SSBSIP_MFC_ENC_CON
EncArg.args.config.args.basic.values[1] = 0;
break;
default:
- LOGE("SsbSipMfcEncSetConfig] not supported type");
+ ALOGE("SsbSipMfcEncSetConfig] not supported type");
return MFC_RET_ENC_SET_CONF_FAIL;
}
#else
@@ -816,7 +816,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetConfig(void *openHandle, SSBSIP_MFC_ENC_CON
ret_code = ioctl(pCTX->hMFC, IOCTL_MFC_SET_CONFIG, &EncArg);
if (EncArg.ret_code != MFC_OK) {
- LOGE("SsbSipMfcEncSetConfig] IOCTL_MFC_SET_CONFIG failed(ret : %d)", EncArg.ret_code);
+ ALOGE("SsbSipMfcEncSetConfig] IOCTL_MFC_SET_CONFIG failed(ret : %d)", EncArg.ret_code);
return MFC_RET_ENC_SET_CONF_FAIL;
}
@@ -834,11 +834,11 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetConfig(void *openHandle, SSBSIP_MFC_ENC_CON
pCTX = (_MFCLIB *)openHandle;
if (openHandle == NULL) {
- LOGE("SsbSipMfcEncGetConfig] openHandle is NULL");
+ ALOGE("SsbSipMfcEncGetConfig] openHandle is NULL");
return MFC_RET_INVALID_PARAM;
}
if (value == NULL) {
- LOGE("SsbSipMfcEncGetConfig] value is NULL");
+ ALOGE("SsbSipMfcEncGetConfig] value is NULL");
return MFC_RET_INVALID_PARAM;
}
@@ -853,7 +853,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetConfig(void *openHandle, SSBSIP_MFC_ENC_CON
break;
#endif
default:
- LOGE("SsbSipMfcEncGetConfig] No such conf_type is supported.");
+ ALOGE("SsbSipMfcEncGetConfig] No such conf_type is supported.");
return MFC_RET_INVALID_PARAM;
}
diff --git a/exynos/multimedia/codecs/video/exynos4/mfc_v4l2/dec/src/SsbSipMfcDecAPI.c b/exynos/multimedia/codecs/video/exynos4/mfc_v4l2/dec/src/SsbSipMfcDecAPI.c
index 510a351..cad62e3 100644
--- a/exynos/multimedia/codecs/video/exynos4/mfc_v4l2/dec/src/SsbSipMfcDecAPI.c
+++ b/exynos/multimedia/codecs/video/exynos4/mfc_v4l2/dec/src/SsbSipMfcDecAPI.c
@@ -36,8 +36,8 @@
#include "mfc_interface.h"
#include "SsbSipMfcApi.h"
-/* #define LOG_NDEBUG 0 */
-#define LOG_TAG "MFC_DEC_APP"
+/* #define ALOG_NDEBUG 0 */
+#define ALOG_TAG "MFC_DEC_APP"
#include <utils/Log.h>
#ifdef CONFIG_MFC_FPS
@@ -83,20 +83,20 @@ static int isPBPacked(_MFCLIB *pCtx, int Frameleng)
while (1) {
while (startCode != USR_DATA_START_CODE) {
if ((startCode == VOP_START_CODE) || (leng_idx == Frameleng)) {
- LOGI("[%s] VOP START Found !!.....return",__func__);
- LOGW("[%s] Non Packed PB",__func__);
+ ALOGI("[%s] VOP START Found !!.....return",__func__);
+ ALOGW("[%s] Non Packed PB",__func__);
return 0;
}
getAByte(strmBuffer, &startCode);
- LOGV(">> StartCode = 0x%08x <<\n", startCode);
+ ALOGV(">> StartCode = 0x%08x <<\n", startCode);
strmBuffer++;
leng_idx++;
}
- LOGI("[%s] User Data Found !!",__func__);
+ ALOGI("[%s] User Data Found !!",__func__);
do {
if (*strmBuffer == 'p') {
- LOGW("[%s] Packed PB",__func__);
+ ALOGW("[%s] Packed PB",__func__);
return 1;
}
getAByte(strmBuffer, &startCode);
@@ -107,7 +107,7 @@ static int isPBPacked(_MFCLIB *pCtx, int Frameleng)
break;
}
- LOGW("[%s] Non Packed PB",__func__);
+ ALOGW("[%s] Non Packed PB",__func__);
return 0;
}
@@ -143,7 +143,7 @@ void *SsbSipMfcDecOpen(void)
struct v4l2_buffer buf;
struct v4l2_plane planes[MFC_DEC_NUM_PLANES];
- LOGI("[%s] MFC Library Ver %d.%02d",__func__, MFC_LIB_VER_MAJOR, MFC_LIB_VER_MINOR);
+ ALOGI("[%s] MFC Library Ver %d.%02d",__func__, MFC_LIB_VER_MAJOR, MFC_LIB_VER_MINOR);
#ifdef CONFIG_MFC_FPS
framecount = 0;
over30ms = 0;
@@ -151,23 +151,23 @@ void *SsbSipMfcDecOpen(void)
#endif
pCTX = (_MFCLIB *)malloc(sizeof(_MFCLIB));
if (pCTX == NULL) {
- LOGE("[%s] malloc failed.",__func__);
+ ALOGE("[%s] malloc failed.",__func__);
return NULL;
}
memset(pCTX, 0, sizeof(_MFCLIB));
getMFCName(mfc_dev_name, 64);
- LOGI("[%s] dev name is %s",__func__,mfc_dev_name);
+ ALOGI("[%s] dev name is %s",__func__,mfc_dev_name);
if (access(mfc_dev_name, F_OK) != 0) {
- LOGE("[%s] MFC device node not exists",__func__);
+ ALOGE("[%s] MFC device node not exists",__func__);
goto error_case1;
}
hMFCOpen = open(mfc_dev_name, O_RDWR|O_NONBLOCK, 0);
if (hMFCOpen < 0) {
- LOGE("[%s] Failed to open MFC device",__func__);
+ ALOGE("[%s] Failed to open MFC device",__func__);
goto error_case1;
}
@@ -176,22 +176,22 @@ void *SsbSipMfcDecOpen(void)
memset(&cap, 0, sizeof(cap));
ret = ioctl(pCTX->hMFC, VIDIOC_QUERYCAP, &cap);
if (ret != 0) {
- LOGE("[%s] VIDIOC_QUERYCAP failed",__func__);
+ ALOGE("[%s] VIDIOC_QUERYCAP failed",__func__);
goto error_case2;
}
if (!(cap.capabilities & V4L2_CAP_VIDEO_CAPTURE)) {
- LOGE("[%s] Device does not support capture",__func__);
+ ALOGE("[%s] Device does not support capture",__func__);
goto error_case2;
}
if (!(cap.capabilities & V4L2_CAP_VIDEO_OUTPUT)) {
- LOGE("[%s] Device does not support output",__func__);
+ ALOGE("[%s] Device does not support output",__func__);
goto error_case2;
}
if (!(cap.capabilities & V4L2_CAP_STREAMING)) {
- LOGE("[%s] Device does not support streaming",__func__);
+ ALOGE("[%s] Device does not support streaming",__func__);
goto error_case2;
}
@@ -203,7 +203,7 @@ void *SsbSipMfcDecOpen(void)
ret = ioctl(pCTX->hMFC, VIDIOC_S_FMT, &fmt);
if (ret != 0) {
- LOGE("[%s] S_FMT failed",__func__);
+ ALOGE("[%s] S_FMT failed",__func__);
goto error_case2;
}
@@ -216,7 +216,7 @@ void *SsbSipMfcDecOpen(void)
ret = ioctl(pCTX->hMFC, VIDIOC_REQBUFS, &reqbuf);
if (ret != 0) {
- LOGE("[%s] VIDIOC_REQBUFS failed",__func__);
+ ALOGE("[%s] VIDIOC_REQBUFS failed",__func__);
goto error_case2;
}
@@ -232,14 +232,14 @@ void *SsbSipMfcDecOpen(void)
ret = ioctl(pCTX->hMFC, VIDIOC_QUERYBUF, &buf);
if (ret != 0) {
- LOGE("[%s] VIDIOC_QUERYBUF failed",__func__);
+ ALOGE("[%s] VIDIOC_QUERYBUF failed",__func__);
goto error_case3;
}
pCTX->v4l2_dec.mfc_src_bufs[i] = mmap(NULL, buf.m.planes[0].length,
PROT_READ | PROT_WRITE, MAP_SHARED, pCTX->hMFC, buf.m.planes[0].m.mem_offset);
if (pCTX->v4l2_dec.mfc_src_bufs[i] == MAP_FAILED) {
- LOGE("[%s] mmap failed (%d)",__func__,i);
+ ALOGE("[%s] mmap failed (%d)",__func__,i);
goto error_case3;
}
}
@@ -284,10 +284,10 @@ void *SsbSipMfcDecOpenExt(void *value)
if (NO_CACHE == (*(SSBIP_MFC_BUFFER_TYPE *)value)) {
pCTX->cacheablebuffer = NO_CACHE;
- LOGI("[%s] non cacheable buffer",__func__);
+ ALOGI("[%s] non cacheable buffer",__func__);
} else {
pCTX->cacheablebuffer = CACHE;
- LOGI("[%s] cacheable buffer",__func__);
+ ALOGI("[%s] cacheable buffer",__func__);
}
return (void *)pCTX;
@@ -300,14 +300,14 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecClose(void *openHandle)
enum v4l2_buf_type type;
#ifdef CONFIG_MFC_FPS
- LOGI(">>> MFC");
+ ALOGI(">>> MFC");
gettimeofday(&mTS2, NULL);
- LOGI(">>> time=%d", mTS2.tv_sec-mTS1.tv_sec);
- LOGI(">>> framecount=%d", framecount);
- LOGI(">>> 30ms over=%d", over30ms);
+ ALOGI(">>> time=%d", mTS2.tv_sec-mTS1.tv_sec);
+ ALOGI(">>> framecount=%d", framecount);
+ ALOGI(">>> 30ms over=%d", over30ms);
#endif
if (openHandle == NULL) {
- LOGE("[%s] openHandle is NULL",__func__);
+ ALOGE("[%s] openHandle is NULL",__func__);
return MFC_RET_INVALID_PARAM;
}
@@ -317,7 +317,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecClose(void *openHandle)
type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
ret = ioctl(pCTX->hMFC, VIDIOC_STREAMOFF, &type);
if (ret != 0) {
- LOGE("[%s] VIDIOC_STREAMOFF failed (destination buffers)",__func__);
+ ALOGE("[%s] VIDIOC_STREAMOFF failed (destination buffers)",__func__);
return MFC_RET_CLOSE_FAIL;
}
pCTX->inter_buff_status &= ~(MFC_USE_DST_STREAMON);
@@ -327,7 +327,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecClose(void *openHandle)
type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
ret = ioctl(pCTX->hMFC, VIDIOC_STREAMOFF, &type);
if (ret != 0) {
- LOGE("[%s] VIDIOC_STREAMOFF failed (source buffers)",__func__);
+ ALOGE("[%s] VIDIOC_STREAMOFF failed (source buffers)",__func__);
return MFC_RET_CLOSE_FAIL;
}
pCTX->inter_buff_status &= ~(MFC_USE_SRC_STREAMON);
@@ -371,7 +371,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c
enum v4l2_buf_type type;
if (openHandle == NULL) {
- LOGE("[%s] openHandle is NULL",__func__);
+ ALOGE("[%s] openHandle is NULL",__func__);
return MFC_RET_INVALID_PARAM;
}
@@ -423,7 +423,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c
fmt.fmt.pix_mp.pixelformat = V4L2_PIX_FMT_VC1_RCV;
break;
default:
- LOGE("[%s] Does NOT support the standard (%d)",__func__,pCTX->codecType);
+ ALOGE("[%s] Does NOT support the standard (%d)",__func__,pCTX->codecType);
ret = MFC_RET_INVALID_PARAM;
goto error_case1;
}
@@ -433,7 +433,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c
ret = ioctl(pCTX->hMFC, VIDIOC_S_FMT, &fmt);
if (ret != 0) {
- LOGE("[%s] S_FMT failed",__func__);
+ ALOGE("[%s] S_FMT failed",__func__);
ret = MFC_RET_DEC_INIT_FAIL;
goto error_case1;
}
@@ -449,7 +449,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c
ret = ioctl(pCTX->hMFC, VIDIOC_QBUF, &qbuf);
if (ret != 0) {
- LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__);
+ ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__);
ret = MFC_RET_DEC_INIT_FAIL;
goto error_case1;
}
@@ -460,7 +460,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c
// on OUTPUT queue
ret = ioctl(pCTX->hMFC, VIDIOC_STREAMON, &type);
if (ret != 0) {
- LOGE("[%s] VIDIOC_STREAMON failed",__func__);
+ ALOGE("[%s] VIDIOC_STREAMON failed",__func__);
ret = MFC_RET_DEC_INIT_FAIL;
goto error_case1;
}
@@ -471,7 +471,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c
ret = ioctl(pCTX->hMFC, VIDIOC_G_FMT, &fmt);
if (ret != 0) {
- LOGE("[%s] VIDIOC_G_FMT failed",__func__);
+ ALOGE("[%s] VIDIOC_G_FMT failed",__func__);
ret = MFC_RET_DEC_INIT_FAIL;
goto error_case1;
}
@@ -489,7 +489,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c
ret = ioctl(pCTX->hMFC, VIDIOC_G_CROP, &crop);
if (ret != 0) {
- LOGE("[%s] VIDIOC_G_CROP failed",__func__);
+ ALOGE("[%s] VIDIOC_G_CROP failed",__func__);
ret = MFC_RET_DEC_INIT_FAIL;
goto error_case1;
}
@@ -506,7 +506,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c
ret = ioctl(pCTX->hMFC, VIDIOC_G_CTRL, &ctrl);
if (ret != 0) {
- LOGE("[%s] VIDIOC_G_CTRL failed",__func__);
+ ALOGE("[%s] VIDIOC_G_CTRL failed",__func__);
ret = MFC_RET_DEC_INIT_FAIL;
goto error_case1;
}
@@ -522,7 +522,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c
ret = ioctl(pCTX->hMFC, VIDIOC_S_CTRL, &ctrl);
if (ret != 0) {
- LOGE("[%s] VIDIOC_S_CTRL failed, V4L2_CID_CACHEABLE",__func__);
+ ALOGE("[%s] VIDIOC_S_CTRL failed, V4L2_CID_CACHEABLE",__func__);
ret = MFC_RET_DEC_INIT_FAIL;
goto error_case1;
}
@@ -534,7 +534,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c
ret = ioctl(pCTX->hMFC, VIDIOC_REQBUFS, &reqbuf);
if (ret != 0) {
- LOGE("[%s] VIDIOC_REQBUFS failed (destination buffers)",__func__);
+ ALOGE("[%s] VIDIOC_REQBUFS failed (destination buffers)",__func__);
ret = MFC_RET_DEC_INIT_FAIL;
goto error_case1;
}
@@ -551,7 +551,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c
ret = ioctl(pCTX->hMFC, VIDIOC_QUERYBUF, &qbuf);
if (ret != 0) {
- LOGE("[%s] VIDIOC_QUERYBUF failed (destination buffers)",__func__);
+ ALOGE("[%s] VIDIOC_QUERYBUF failed (destination buffers)",__func__);
ret = MFC_RET_DEC_INIT_FAIL;
goto error_case1;
}
@@ -566,7 +566,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c
PROT_READ | PROT_WRITE, MAP_SHARED, pCTX->hMFC, qbuf.m.planes[0].m.mem_offset);
if (pCTX->v4l2_dec.mfc_dst_bufs[i][0] == MAP_FAILED) {
- LOGE("[%s] mmap failed (destination buffers (Y))",__func__);
+ ALOGE("[%s] mmap failed (destination buffers (Y))",__func__);
ret = MFC_RET_DEC_INIT_FAIL;
goto error_case2;
}
@@ -574,14 +574,14 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c
pCTX->v4l2_dec.mfc_dst_bufs[i][1] = mmap(NULL, qbuf.m.planes[1].length,
PROT_READ | PROT_WRITE, MAP_SHARED, pCTX->hMFC, qbuf.m.planes[1].m.mem_offset);
if (pCTX->v4l2_dec.mfc_dst_bufs[i][1] == MAP_FAILED) {
- LOGE("[%s] mmap failed (destination buffers (UV))",__func__);
+ ALOGE("[%s] mmap failed (destination buffers (UV))",__func__);
ret = MFC_RET_DEC_INIT_FAIL;
goto error_case2;
}
ret = ioctl(pCTX->hMFC, VIDIOC_QBUF, &qbuf);
if (ret != 0) {
- LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE",__func__);
+ ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE",__func__);
ret = MFC_RET_DEC_INIT_FAIL;
goto error_case2;
}
@@ -591,7 +591,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c
type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
ret = ioctl(pCTX->hMFC, VIDIOC_STREAMON, &type);
if (ret != 0) {
- LOGE("[%s] VIDIOC_STREAMON failed (destination buffers)",__func__);
+ ALOGE("[%s] VIDIOC_STREAMON failed (destination buffers)",__func__);
ret = MFC_RET_DEC_INIT_FAIL;
goto error_case1;
}
@@ -603,7 +603,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c
ret = ioctl(pCTX->hMFC, VIDIOC_DQBUF, &qbuf);
if(ret != 0) {
- LOGE("[%s] VIDIOC_DQBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__);
+ ALOGE("[%s] VIDIOC_DQBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__);
ret = MFC_RET_DEC_INIT_FAIL;
goto error_case1;
}
@@ -634,12 +634,12 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExe(void *openHandle, int lengthBufFill)
framecount++;
#endif
if (openHandle == NULL) {
- LOGE("[%s] openHandle is NULL",__func__);
+ ALOGE("[%s] openHandle is NULL",__func__);
return MFC_RET_INVALID_PARAM;
}
if ((lengthBufFill < 0) || (lengthBufFill > MAX_DECODER_INPUT_BUFFER_SIZE)) {
- LOGE("[%s] lengthBufFill is invalid. (lengthBufFill=%d)",__func__, lengthBufFill);
+ ALOGE("[%s] lengthBufFill is invalid. (lengthBufFill=%d)",__func__, lengthBufFill);
return MFC_RET_INVALID_PARAM;
}
@@ -665,7 +665,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExe(void *openHandle, int lengthBufFill)
ret = ioctl(pCTX->hMFC, VIDIOC_QBUF, &qbuf);
if (ret != 0) {
- LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__);
+ ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__);
return MFC_RET_DEC_EXE_ERR;
}
@@ -687,10 +687,10 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExe(void *openHandle, int lengthBufFill)
break;
}
} else if (poll_events.revents & POLLERR) { /* POLLERR */
- LOGE("[%s] POLLERR\n",__func__);
+ ALOGE("[%s] POLLERR\n",__func__);
return MFC_RET_DEC_EXE_ERR;
} else {
- LOGE("[%s] poll() returns 0x%x\n",__func__, poll_events.revents);
+ ALOGE("[%s] poll() returns 0x%x\n",__func__, poll_events.revents);
return MFC_RET_DEC_EXE_ERR;
}
} else if (0 > poll_state) {
@@ -737,7 +737,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExe(void *openHandle, int lengthBufFill)
ret = ioctl(pCTX->hMFC, VIDIOC_QBUF, &qbuf);
if (ret != 0) {
- LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__);
+ ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__);
return MFC_RET_DEC_EXE_ERR;
}
@@ -824,12 +824,12 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExeNb(void *openHandle, int lengthBufFill)
framecount++;
#endif
if (openHandle == NULL) {
- LOGE("[%s] openHandle is NULL",__func__);
+ ALOGE("[%s] openHandle is NULL",__func__);
return MFC_RET_INVALID_PARAM;
}
if ((lengthBufFill < 0) || (lengthBufFill > MAX_DECODER_INPUT_BUFFER_SIZE)) {
- LOGE("[%s] lengthBufFill is invalid. (lengthBufFill=%d)",__func__, lengthBufFill);
+ ALOGE("[%s] lengthBufFill is invalid. (lengthBufFill=%d)",__func__, lengthBufFill);
return MFC_RET_INVALID_PARAM;
}
@@ -847,7 +847,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExeNb(void *openHandle, int lengthBufFill)
ret = ioctl(pCTX->hMFC, VIDIOC_QBUF, &qbuf);
if (ret != 0) {
- LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__);
+ ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__);
return MFC_RET_DEC_EXE_ERR;
}
} else if(pCTX->v4l2_dec.bBeingFinalized == 0) {
@@ -862,7 +862,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExeNb(void *openHandle, int lengthBufFill)
ret = ioctl(pCTX->hMFC, VIDIOC_QBUF, &qbuf);
if (ret != 0) {
- LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__);
+ ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__);
return MFC_RET_DEC_EXE_ERR;
}
}
@@ -910,10 +910,10 @@ SSBSIP_MFC_DEC_OUTBUF_STATUS SsbSipMfcDecWaitForOutBuf(void *openHandle, SSBSIP_
break;
}
} else if (poll_events.revents & POLLERR) { /* POLLERR */
- LOGE("[%s] POLLERR\n",__func__);
+ ALOGE("[%s] POLLERR\n",__func__);
return MFC_GETOUTBUF_STATUS_NULL;
} else {
- LOGE("[%s] poll() returns 0x%x\n",__func__, poll_events.revents);
+ ALOGE("[%s] poll() returns 0x%x\n",__func__, poll_events.revents);
return MFC_GETOUTBUF_STATUS_NULL;
}
} else if (0 > poll_state) {
@@ -1023,12 +1023,12 @@ void *SsbSipMfcDecGetInBuf(void *openHandle, void **phyInBuf, int inputBufferSi
int i;
if (openHandle == NULL) {
- LOGE("[%s] openHandle is NULL",__func__);
+ ALOGE("[%s] openHandle is NULL",__func__);
return NULL;
}
if ((inputBufferSize < 0) || (inputBufferSize > MAX_DECODER_INPUT_BUFFER_SIZE)) {
- LOGE("[%s] inputBufferSize = %d is invalid",__func__, inputBufferSize);
+ ALOGE("[%s] inputBufferSize = %d is invalid",__func__, inputBufferSize);
return NULL;
}
@@ -1039,7 +1039,7 @@ void *SsbSipMfcDecGetInBuf(void *openHandle, void **phyInBuf, int inputBufferSi
break;
if (i == MFC_DEC_NUM_SRC_BUFS) {
- LOGV("[%s] No buffer is available.",__func__);
+ ALOGV("[%s] No buffer is available.",__func__);
return NULL;
} else {
pCTX->virStrmBuf = (unsigned int)pCTX->v4l2_dec.mfc_src_bufs[i];
@@ -1056,9 +1056,9 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetInBuf(void *openHandle, void *phyInBuf, voi
_MFCLIB *pCTX;
int i;
- LOGV("[%s] Enter",__func__);
+ ALOGV("[%s] Enter",__func__);
if (openHandle == NULL) {
- LOGE("[%s] openHandle is NULL",__func__);
+ ALOGE("[%s] openHandle is NULL",__func__);
return MFC_RET_INVALID_PARAM;
}
@@ -1069,14 +1069,14 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetInBuf(void *openHandle, void *phyInBuf, voi
break;
if (i == MFC_DEC_NUM_SRC_BUFS) {
- LOGE("[%s] Can not use the buffer",__func__);
+ ALOGE("[%s] Can not use the buffer",__func__);
return MFC_RET_INVALID_PARAM;
} else {
pCTX->virStrmBuf = (unsigned int)virInBuf;
pCTX->v4l2_dec.beingUsedIndex = i;
pCTX->v4l2_dec.mfc_src_buf_flags[i] = BUF_ENQUEUED;
}
- LOGV("[%s] Exit idx %d",__func__,pCTX->v4l2_dec.beingUsedIndex);
+ ALOGV("[%s] Exit idx %d",__func__,pCTX->v4l2_dec.beingUsedIndex);
return MFC_RET_OK;
}
@@ -1086,7 +1086,7 @@ SSBSIP_MFC_DEC_OUTBUF_STATUS SsbSipMfcDecGetOutBuf(void *openHandle, SSBSIP_MFC_
_MFCLIB *pCTX;
if (openHandle == NULL) {
- LOGE("[%s] openHandle is NULL",__func__);
+ ALOGE("[%s] openHandle is NULL",__func__);
return MFC_GETOUTBUF_DISPLAY_END;
}
@@ -1118,13 +1118,13 @@ SSBSIP_MFC_DEC_OUTBUF_STATUS SsbSipMfcDecGetOutBuf(void *openHandle, SSBSIP_MFC_
#ifdef SSB_UMP
ret = ump_secure_id_get_from_vaddr(pCTX->decOutInfo.YVirAddr, &output_info->y_cookie);
if (ret) {
- LOGV("[%s] fail to get secure id(%d) from vaddr(%x)\n",__func__, \
+ ALOGV("[%s] fail to get secure id(%d) from vaddr(%x)\n",__func__, \
output_info->y_cookie, pCTX->decOutInfo.YVirAddr);
}
ret = ump_secure_id_get_from_vaddr(pCTX->decOutInfo.CVirAddr, &output_info->c_cookie);
if (ret) {
- LOGV("[%s] fail to get secure id(%d) from vaddr(%x)\n",__func__, \
+ ALOGV("[%s] fail to get secure id(%d) from vaddr(%x)\n",__func__, \
output_info->c_cookie, pCTX->decOutInfo.CVirAddr);
}
break;
@@ -1153,12 +1153,12 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetConfig(void *openHandle, SSBSIP_MFC_DEC_CON
enum v4l2_buf_type type;
if (openHandle == NULL) {
- LOGE("[%s] openHandle is NULL",__func__);
+ ALOGE("[%s] openHandle is NULL",__func__);
return MFC_RET_INVALID_PARAM;
}
if ((value == NULL) && (MFC_DEC_SETCONF_IS_LAST_FRAME !=conf_type)) {
- LOGE("[%s] value is NULL",__func__);
+ ALOGE("[%s] value is NULL",__func__);
return MFC_RET_INVALID_PARAM;
}
@@ -1172,8 +1172,8 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetConfig(void *openHandle, SSBSIP_MFC_DEC_CON
case MFC_DEC_SETCONF_FIMV1_WIDTH_HEIGHT: /* be set before calling SsbSipMfcDecInit */
fimv1_res = (struct mfc_dec_fimv1_info *)value;
- LOGI("fimv1->width = %d\n", fimv1_res->width);
- LOGI("fimv1->height = %d\n", fimv1_res->height);
+ ALOGI("fimv1->width = %d\n", fimv1_res->width);
+ ALOGI("fimv1->height = %d\n", fimv1_res->height);
pCTX->fimv1_res.width = (int)(fimv1_res->width);
pCTX->fimv1_res.height = (int)(fimv1_res->height);
return MFC_RET_OK;
@@ -1190,7 +1190,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetConfig(void *openHandle, SSBSIP_MFC_DEC_CON
type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
ret = ioctl(pCTX->hMFC, VIDIOC_STREAMOFF, &type);
if (ret != 0) {
- LOGE("[%s] VIDIOC_STREAMOFF failed (destination buffers)",__func__);
+ ALOGE("[%s] VIDIOC_STREAMOFF failed (destination buffers)",__func__);
return MFC_RET_DEC_SET_CONF_FAIL;
}
pCTX->inter_buff_status &= ~(MFC_USE_DST_STREAMON);
@@ -1206,7 +1206,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetConfig(void *openHandle, SSBSIP_MFC_DEC_CON
ret = ioctl(pCTX->hMFC, VIDIOC_QBUF, &qbuf);
if (ret != 0) {
- LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE",__func__);
+ ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE",__func__);
return MFC_RET_DEC_SET_CONF_FAIL;
}
}
@@ -1214,7 +1214,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetConfig(void *openHandle, SSBSIP_MFC_DEC_CON
type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
ret = ioctl(pCTX->hMFC, VIDIOC_STREAMON, &type);
if (ret != 0) {
- LOGE("[%s] VIDIOC_STREAMON failed (destination buffers)",__func__);
+ ALOGE("[%s] VIDIOC_STREAMON failed (destination buffers)",__func__);
return MFC_RET_DEC_SET_CONF_FAIL;
}
pCTX->inter_buff_status |= MFC_USE_DST_STREAMON;
@@ -1253,13 +1253,13 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetConfig(void *openHandle, SSBSIP_MFC_DEC_CON
break;
default:
- LOGE("[%s] conf_type(%d) is NOT supported",__func__, conf_type);
+ ALOGE("[%s] conf_type(%d) is NOT supported",__func__, conf_type);
return MFC_RET_INVALID_PARAM;
}
ret = ioctl(pCTX->hMFC, VIDIOC_S_CTRL, &ctrl);
if (ret != 0) {
- LOGE("[%s] VIDIOC_S_CTRL failed (conf_type = %d)",__func__, conf_type);
+ ALOGE("[%s] VIDIOC_S_CTRL failed (conf_type = %d)",__func__, conf_type);
return MFC_RET_DEC_SET_CONF_FAIL;
}
@@ -1277,12 +1277,12 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecGetConfig(void *openHandle, SSBSIP_MFC_DEC_CON
struct v4l2_control ctrl;
if (openHandle == NULL) {
- LOGE("[%s] openHandle is NULL",__func__);
+ ALOGE("[%s] openHandle is NULL",__func__);
return MFC_RET_INVALID_PARAM;
}
if (value == NULL) {
- LOGE("[%s] value is NULL",__func__);
+ ALOGE("[%s] value is NULL",__func__);
return MFC_RET_INVALID_PARAM;
}
@@ -1305,7 +1305,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecGetConfig(void *openHandle, SSBSIP_MFC_DEC_CON
ret = ioctl(pCTX->hMFC, VIDIOC_G_CTRL, &ctrl);
if (ret != 0) {
- LOGE("[%s] VIDIOC_G_CTRL failed, V4L2_CID_CODEC_CRC_DATA_LUMA",__func__);
+ ALOGE("[%s] VIDIOC_G_CTRL failed, V4L2_CID_CODEC_CRC_DATA_LUMA",__func__);
return MFC_RET_DEC_GET_CONF_FAIL;
}
crc_data->luma0 = ctrl.value;
@@ -1315,13 +1315,13 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecGetConfig(void *openHandle, SSBSIP_MFC_DEC_CON
ret = ioctl(pCTX->hMFC, VIDIOC_G_CTRL, &ctrl);
if (ret != 0) {
- LOGE("[%s] VIDIOC_G_CTRL failed, V4L2_CID_CODEC_CRC_DATA_CHROMA",__func__);
+ ALOGE("[%s] VIDIOC_G_CTRL failed, V4L2_CID_CODEC_CRC_DATA_CHROMA",__func__);
return MFC_RET_DEC_GET_CONF_FAIL;
}
crc_data->chroma0 = ctrl.value;
- LOGI("[%s] crc_data->luma0=%d",__func__,ctrl.value);
- LOGI("[%s] crc_data->chroma0=%d",__func__,ctrl.value);
+ ALOGI("[%s] crc_data->luma0=%d",__func__,ctrl.value);
+ ALOGI("[%s] crc_data->chroma0=%d",__func__,ctrl.value);
break;
case MFC_DEC_GETCONF_FRAME_TAG:
@@ -1344,7 +1344,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecGetConfig(void *openHandle, SSBSIP_MFC_DEC_CON
break;
default:
- LOGE("[%s] conf_type(%d) is NOT supported",__func__, conf_type);
+ ALOGE("[%s] conf_type(%d) is NOT supported",__func__, conf_type);
return MFC_RET_INVALID_PARAM;
}
diff --git a/exynos/multimedia/codecs/video/exynos4/mfc_v4l2/enc/src/SsbSipMfcEncAPI.c b/exynos/multimedia/codecs/video/exynos4/mfc_v4l2/enc/src/SsbSipMfcEncAPI.c
index 45888c6..d35e153 100644
--- a/exynos/multimedia/codecs/video/exynos4/mfc_v4l2/enc/src/SsbSipMfcEncAPI.c
+++ b/exynos/multimedia/codecs/video/exynos4/mfc_v4l2/enc/src/SsbSipMfcEncAPI.c
@@ -31,8 +31,8 @@
#include "mfc_interface.h"
#include "SsbSipMfcApi.h"
-/* #define LOG_NDEBUG 0 */
-#define LOG_TAG "MFC_ENC_APP"
+/* #define ALOG_NDEBUG 0 */
+#define ALOG_TAG "MFC_ENC_APP"
#include <utils/Log.h>
#define POLL_ENC_WAIT_TIMEOUT 25
@@ -71,22 +71,22 @@ void *SsbSipMfcEncOpen(void)
struct v4l2_capability cap;
getMFCName(mfc_dev_name, 64);
- LOGI("[%s] dev name is %s\n",__func__,mfc_dev_name);
+ ALOGI("[%s] dev name is %s\n",__func__,mfc_dev_name);
if (access(mfc_dev_name, F_OK) != 0) {
- LOGE("[%s] MFC device node not exists",__func__);
+ ALOGE("[%s] MFC device node not exists",__func__);
return NULL;
}
hMFCOpen = open(mfc_dev_name, O_RDWR | O_NONBLOCK, 0);
if (hMFCOpen < 0) {
- LOGE("[%s] Failed to open MFC device",__func__);
+ ALOGE("[%s] Failed to open MFC device",__func__);
return NULL;
}
pCTX = (_MFCLIB *)malloc(sizeof(_MFCLIB));
if (pCTX == NULL) {
- LOGE("[%s] malloc failed.",__func__);
+ ALOGE("[%s] malloc failed.",__func__);
return NULL;
}
memset(pCTX, 0, sizeof(_MFCLIB));
@@ -96,28 +96,28 @@ void *SsbSipMfcEncOpen(void)
memset(&cap, 0, sizeof(cap));
ret = ioctl(pCTX->hMFC, VIDIOC_QUERYCAP, &cap);
if (ret != 0) {
- LOGE("[%s] VIDIOC_QUERYCAP failed",__func__);
+ ALOGE("[%s] VIDIOC_QUERYCAP failed",__func__);
close(pCTX->hMFC);
free(pCTX);
return NULL;
}
if (!(cap.capabilities & V4L2_CAP_VIDEO_CAPTURE)) {
- LOGE("[%s] Device does not support capture",__func__);
+ ALOGE("[%s] Device does not support capture",__func__);
close(pCTX->hMFC);
free(pCTX);
return NULL;
}
if (!(cap.capabilities & V4L2_CAP_VIDEO_OUTPUT)) {
- LOGE("[%s] Device does not support output",__func__);
+ ALOGE("[%s] Device does not support output",__func__);
close(pCTX->hMFC);
free(pCTX);
return NULL;
}
if (!(cap.capabilities & V4L2_CAP_STREAMING)) {
- LOGE("[%s] Device does not support streaming",__func__);
+ ALOGE("[%s] Device does not support streaming",__func__);
close(pCTX->hMFC);
free(pCTX);
return NULL;
@@ -144,13 +144,13 @@ void *SsbSipMfcEncOpenExt(void *value)
pCTX->cacheablebuffer = NO_CACHE;
/* physical address is used for Input source */
pCTX->v4l2_enc.bInputPhyVir = 1;
- LOGI("[%s] non cacheable buffer",__func__);
+ ALOGI("[%s] non cacheable buffer",__func__);
}
else {
pCTX->cacheablebuffer = CACHE;
/* vitual address is used for Input source */
pCTX->v4l2_enc.bInputPhyVir = 0;
- LOGI("[%s] cacheable buffer",__func__);
+ ALOGI("[%s] cacheable buffer",__func__);
}
return (void *)pCTX;
@@ -162,7 +162,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncClose(void *openHandle)
int i;
if (openHandle == NULL) {
- LOGE("[%s] openHandle is NULL",__func__);
+ ALOGE("[%s] openHandle is NULL",__func__);
return MFC_RET_INVALID_PARAM;
}
@@ -240,7 +240,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
pCTX->height = h264_arg->SourceHeight;
pCTX->framemap = h264_arg->FrameMap;
} else {
- LOGE("[%s] Undefined codec type \n",__func__);
+ ALOGE("[%s] Undefined codec type \n",__func__);
ret = MFC_RET_INVALID_PARAM;
goto error_case1;
}
@@ -526,7 +526,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
break;
default:
- LOGE("[%s] Undefined codec type",__func__);
+ ALOGE("[%s] Undefined codec type",__func__);
ret = MFC_RET_INVALID_PARAM;
goto error_case1;
}
@@ -545,7 +545,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
ret = ioctl(pCTX->hMFC, VIDIOC_S_EXT_CTRLS, &ext_ctrls);
if (ret != 0) {
- LOGE("[%s] Failed to set extended controls",__func__);
+ ALOGE("[%s] Failed to set extended controls",__func__);
ret = MFC_RET_ENC_INIT_FAIL;
goto error_case1;
}
@@ -575,7 +575,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
ret = ioctl(pCTX->hMFC, VIDIOC_S_FMT, &fmt);
if (ret != 0) {
- LOGE("[%s] S_FMT failed on MFC output stream",__func__);
+ ALOGE("[%s] S_FMT failed on MFC output stream",__func__);
ret = MFC_RET_ENC_INIT_FAIL;
goto error_case1;
}
@@ -594,7 +594,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
fmt.fmt.pix_mp.pixelformat = V4L2_PIX_FMT_H263;
break;
default:
- LOGE("[%s] Codec has not been recognised",__func__);
+ ALOGE("[%s] Codec has not been recognised",__func__);
return MFC_RET_ENC_INIT_FAIL;
}
@@ -603,7 +603,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
ret = ioctl(pCTX->hMFC, VIDIOC_S_FMT, &fmt);
if (ret != 0) {
- LOGE("[%s] S_FMT failed on MFC output stream",__func__);
+ ALOGE("[%s] S_FMT failed on MFC output stream",__func__);
ret = MFC_RET_ENC_INIT_FAIL;
goto error_case1;
}
@@ -617,7 +617,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
ret = ioctl(pCTX->hMFC, VIDIOC_S_CTRL, &ctrl);
if (ret != 0) {
- LOGE("[%s] VIDIOC_S_CTRL failed, V4L2_CID_CACHEABLE",__func__);
+ ALOGE("[%s] VIDIOC_S_CTRL failed, V4L2_CID_CACHEABLE",__func__);
ret = MFC_RET_ENC_INIT_FAIL;
goto error_case1;
}
@@ -633,7 +633,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
ret = ioctl(pCTX->hMFC, VIDIOC_REQBUFS, &reqbuf);
if (ret != 0) {
- LOGE("[%s] Reqbufs src ioctl failed",__func__);
+ ALOGE("[%s] Reqbufs src ioctl failed",__func__);
ret = MFC_RET_ENC_INIT_FAIL;
goto error_case1;
}
@@ -651,7 +651,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
ret = ioctl(pCTX->hMFC, VIDIOC_QUERYBUF, &buf);
if (ret != 0) {
- LOGE("[%s] Querybuf src ioctl failed",__func__);
+ ALOGE("[%s] Querybuf src ioctl failed",__func__);
ret = MFC_RET_ENC_INIT_FAIL;
goto error_case2;
}
@@ -666,7 +666,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
mmap(NULL, buf.m.planes[0].length, PROT_READ | PROT_WRITE,
MAP_SHARED, pCTX->hMFC, buf.m.planes[0].m.mem_offset);
if (pCTX->v4l2_enc.mfc_src_bufs[i][0] == MAP_FAILED) {
- LOGE("[%s] Mmap on src buffer (0) failed",__func__);
+ ALOGE("[%s] Mmap on src buffer (0) failed",__func__);
ret = MFC_RET_ENC_INIT_FAIL;
goto error_case2;
}
@@ -676,13 +676,13 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
MAP_SHARED, pCTX->hMFC, buf.m.planes[1].m.mem_offset);
if (pCTX->v4l2_enc.mfc_src_bufs[i][1] == MAP_FAILED) {
munmap(pCTX->v4l2_enc.mfc_src_bufs[i][0], pCTX->v4l2_enc.mfc_src_bufs_len[0]);
- LOGE("[%s] Mmap on src buffer (1) failed",__func__);
+ ALOGE("[%s] Mmap on src buffer (1) failed",__func__);
ret = MFC_RET_ENC_INIT_FAIL;
goto error_case2;
}
}
} else
- LOGV("[%s] Camera Phys src buf %d",__func__,reqbuf.count);
+ ALOGV("[%s] Camera Phys src buf %d",__func__,reqbuf.count);
for (i = 0; i<pCTX->v4l2_enc.mfc_num_src_bufs; i++)
pCTX->v4l2_enc.mfc_src_buf_flags[i] = BUF_DEQUEUED;
@@ -701,7 +701,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
ret = ioctl(pCTX->hMFC, VIDIOC_REQBUFS, &reqbuf);
if (ret != 0) {
- LOGE("[%s] Reqbufs dst ioctl failed",__func__);
+ ALOGE("[%s] Reqbufs dst ioctl failed",__func__);
ret = MFC_RET_ENC_INIT_FAIL;
goto error_case2;
}
@@ -718,7 +718,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
ret = ioctl(pCTX->hMFC, VIDIOC_QUERYBUF, &buf);
if (ret != 0) {
- LOGE("[%s] Querybuf dst ioctl failed",__func__);
+ ALOGE("[%s] Querybuf dst ioctl failed",__func__);
ret = MFC_RET_ENC_INIT_FAIL;
goto error_case3;
}
@@ -728,14 +728,14 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
mmap(NULL, buf.m.planes[0].length, PROT_READ | PROT_WRITE,
MAP_SHARED, pCTX->hMFC, buf.m.planes[0].m.mem_offset);
if (pCTX->v4l2_enc.mfc_dst_bufs[i] == MAP_FAILED) {
- LOGE("[%s] Mmap on dst buffer failed",__func__);
+ ALOGE("[%s] Mmap on dst buffer failed",__func__);
ret = MFC_RET_ENC_INIT_FAIL;
goto error_case3;
}
ret = ioctl(pCTX->hMFC, VIDIOC_QBUF, &buf);
if (ret != 0) {
- LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE",__func__);
+ ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE",__func__);
ret = MFC_RET_ENC_INIT_FAIL;
goto error_case3;
}
@@ -748,7 +748,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
ret = ioctl(pCTX->hMFC, VIDIOC_STREAMON, &type);
if (ret != 0) {
- LOGE("[%s] V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, VIDIOC_STREAMON failed",__func__);
+ ALOGE("[%s] V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, VIDIOC_STREAMON failed",__func__);
ret = MFC_RET_ENC_INIT_FAIL;
goto error_case3;
}
@@ -773,11 +773,11 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
if (ret == 0)
break;
} else if(poll_events.revents & POLLERR) { /*POLLERR */
- LOGE("[%s] POLLERR\n",__func__);
+ ALOGE("[%s] POLLERR\n",__func__);
ret = MFC_RET_ENC_INIT_FAIL;
goto error_case3;
} else {
- LOGE("[%s] poll() returns 0x%x\n",__func__, poll_events.revents);
+ ALOGE("[%s] poll() returns 0x%x\n",__func__, poll_events.revents);
ret = MFC_RET_ENC_INIT_FAIL;
goto error_case3;
}
@@ -801,11 +801,11 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
ret = ioctl(pCTX->hMFC, VIDIOC_QBUF, &buf);
if (ret != 0) {
- LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE",__func__);
+ ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE",__func__);
ret = MFC_RET_ENC_INIT_FAIL;
goto error_case3;
}
- LOGV("[%s] Strm out idx %d",__func__,index);
+ ALOGV("[%s] Strm out idx %d",__func__,index);
return MFC_RET_OK;
error_case3:
@@ -830,7 +830,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPU
int i;
if (openHandle == NULL) {
- LOGE("[%s] openHandle is NULL\n",__func__);
+ ALOGE("[%s] openHandle is NULL\n",__func__);
return MFC_RET_INVALID_PARAM;
}
@@ -857,7 +857,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPU
break;
if (i == pCTX->v4l2_enc.mfc_num_src_bufs) {
- LOGV("[%s] No buffer is available.",__func__);
+ ALOGV("[%s] No buffer is available.",__func__);
return MFC_RET_ENC_GET_INBUF_FAIL;
} else {
/* FIXME check this for correct physical address */
@@ -871,7 +871,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPU
pCTX->v4l2_enc.mfc_src_buf_flags[i] = BUF_ENQUEUED;
}
}
- LOGV("[%s] Input Buffer idx %d",__func__,i);
+ ALOGV("[%s] Input Buffer idx %d",__func__,i);
return MFC_RET_OK;
}
@@ -884,7 +884,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPU
int ret,i;
if (openHandle == NULL) {
- LOGE("[%s] openHandle is NULL\n",__func__);
+ ALOGE("[%s] openHandle is NULL\n",__func__);
return MFC_RET_INVALID_PARAM;
}
@@ -906,14 +906,14 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPU
MFC dqbuf() */
pCTX->v4l2_enc.beingUsedIndex++;
pCTX->v4l2_enc.beingUsedIndex %= MFC_ENC_NUM_SRC_BUFS;
- LOGV("[%s] Phy Input Buffer idx Queued %d",__func__,pCTX->v4l2_enc.beingUsedIndex);
+ ALOGV("[%s] Phy Input Buffer idx Queued %d",__func__,pCTX->v4l2_enc.beingUsedIndex);
} else {
for (i = 0; i < pCTX->v4l2_enc.mfc_num_src_bufs; i++)
if (pCTX->v4l2_enc.mfc_src_bufs[i][0] == input_info->YVirAddr)
break;
if (i == pCTX->v4l2_enc.mfc_num_src_bufs) {
- LOGE("[%s] Can not use the buffer",__func__);
+ ALOGE("[%s] Can not use the buffer",__func__);
return MFC_RET_INVALID_PARAM;
} else {
pCTX->v4l2_enc.beingUsedIndex = i;
@@ -923,7 +923,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPU
qbuf.index = pCTX->v4l2_enc.beingUsedIndex;
planes[0].bytesused = pCTX->width * pCTX->height;
planes[1].bytesused = (pCTX->width * pCTX->height) >> 1;
- LOGV("[%s] Input Buffer idx Queued %d",__func__,pCTX->v4l2_enc.beingUsedIndex);
+ ALOGV("[%s] Input Buffer idx Queued %d",__func__,pCTX->v4l2_enc.beingUsedIndex);
}
qbuf.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
@@ -932,7 +932,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPU
ret = ioctl(pCTX->hMFC, VIDIOC_QBUF, &qbuf);
if (ret != 0) {
- LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__);
+ ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__);
return MFC_RET_ENC_SET_INBUF_FAIL;
}
@@ -944,7 +944,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetOutBuf(void *openHandle, SSBSIP_MFC_ENC_OUT
_MFCLIB *pCTX;
if (openHandle == NULL) {
- LOGE("[%s] openHandle is NULL\n",__func__);
+ ALOGE("[%s] openHandle is NULL\n",__func__);
return MFC_RET_INVALID_PARAM;
}
@@ -970,7 +970,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetOutBuf(void *openHandle, SSBSIP_MFC_ENC_OUT
SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetOutBuf(void *openHandle, void *phyOutbuf, void *virOutbuf, int outputBufferSize)
{
if (openHandle == NULL) {
- LOGE("[%s] openHandle is NULL\n",__func__);
+ ALOGE("[%s] openHandle is NULL\n",__func__);
return MFC_RET_INVALID_PARAM;
}
@@ -993,9 +993,9 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle)
struct pollfd poll_events;
int poll_state;
- LOGV("[%s] Enter \n",__func__);
+ ALOGV("[%s] Enter \n",__func__);
if (openHandle == NULL) {
- LOGE("[%s] openHandle is NULL\n",__func__);
+ ALOGE("[%s] openHandle is NULL\n",__func__);
return MFC_RET_INVALID_PARAM;
}
@@ -1006,7 +1006,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle)
ret = ioctl(pCTX->hMFC, VIDIOC_S_CTRL, &ctrl);
if (ret != 0) {
- LOGE("[%s] VIDIOC_S_CTRL failed, V4L2_CID_CODEC_FRAME_TAG",__func__);
+ ALOGE("[%s] VIDIOC_S_CTRL failed, V4L2_CID_CODEC_FRAME_TAG",__func__);
return MFC_RET_ENC_EXE_ERR;
}
@@ -1014,7 +1014,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle)
type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
ret = ioctl(pCTX->hMFC, VIDIOC_STREAMON, &type);
if (ret != 0) {
- LOGE("[%s] VIDIOC_STREAMON failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__);
+ ALOGE("[%s] VIDIOC_STREAMON failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__);
return MFC_RET_ENC_EXE_ERR;
}
@@ -1041,14 +1041,14 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle)
if (ret == 0)
break;
} else if (poll_events.revents & POLLERR) { /* POLLERR */
- LOGE("[%s] POLLERR\n",__func__);
+ ALOGE("[%s] POLLERR\n",__func__);
return MFC_RET_ENC_EXE_ERR;
} else {
- LOGE("[%s] poll() returns 0x%x\n",__func__, poll_events.revents);
+ ALOGE("[%s] poll() returns 0x%x\n",__func__, poll_events.revents);
return MFC_RET_ENC_EXE_ERR;
}
} else if (0 > poll_state) {
- LOGE("[%s] poll() Encoder POLL Timeout 0x%x\n",__func__, poll_events.revents);
+ ALOGE("[%s] poll() Encoder POLL Timeout 0x%x\n",__func__, poll_events.revents);
return MFC_RET_ENC_EXE_ERR;
}
loopcnt++;
@@ -1057,7 +1057,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle)
if (pCTX->v4l2_enc.bRunning != 0) {
pCTX->encodedframeType = (qbuf.flags & 0x18) >> 3; /* encoded frame type */
- LOGV("[%s] encoded frame type = %d\n",__func__, pCTX->encodedframeType);
+ ALOGV("[%s] encoded frame type = %d\n",__func__, pCTX->encodedframeType);
switch (pCTX->encodedframeType) {
case 1:
pCTX->encodedframeType = MFC_FRAME_TYPE_I_FRAME;
@@ -1069,7 +1069,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle)
pCTX->encodedframeType = MFC_FRAME_TYPE_B_FRAME;
break;
default:
- LOGE("[%s] VIDIOC_DQBUF failed, encoded frame type is wrong",__func__);
+ ALOGE("[%s] VIDIOC_DQBUF failed, encoded frame type is wrong",__func__);
}
}
@@ -1084,7 +1084,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle)
ret = ioctl(pCTX->hMFC, VIDIOC_G_CTRL, &ctrl);
if (ret != 0) {
- LOGE("[%s] VIDIOC_G_CTRL failed, V4L2_CID_CODEC_FRAME_TAG",__func__);
+ ALOGE("[%s] VIDIOC_G_CTRL failed, V4L2_CID_CODEC_FRAME_TAG",__func__);
return MFC_RET_ENC_EXE_ERR;
}
@@ -1099,7 +1099,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle)
ret = ioctl(pCTX->hMFC, VIDIOC_QBUF, &qbuf);
if (ret != 0) {
- LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE",__func__);
+ ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE",__func__);
return MFC_RET_ENC_EXE_ERR;
}
@@ -1114,7 +1114,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle)
ret = ioctl(pCTX->hMFC, VIDIOC_DQBUF, &qbuf);
if (ret != 0) {
- LOGE("[%s] VIDIOC_DQBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__);
+ ALOGE("[%s] VIDIOC_DQBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__);
return MFC_RET_ENC_EXE_ERR;
}
}
@@ -1122,7 +1122,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle)
/* Update context stream buffer address */
pCTX->virStrmBuf = pCTX->v4l2_enc.mfc_dst_bufs[dequeued_index];
- LOGV("[%s] Strm out idx %d",__func__,dequeued_index);
+ ALOGV("[%s] Strm out idx %d",__func__,dequeued_index);
return MFC_RET_OK;
}
@@ -1132,12 +1132,12 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetConfig(void *openHandle, SSBSIP_MFC_ENC_CON
_MFCLIB *pCTX;
if (openHandle == NULL) {
- LOGE("[%s] openHandle is NULL\n",__func__);
+ ALOGE("[%s] openHandle is NULL\n",__func__);
return MFC_RET_INVALID_PARAM;
}
if (value == NULL) {
- LOGE("[%s] value is NULL\n",__func__);
+ ALOGE("[%s] value is NULL\n",__func__);
return MFC_RET_INVALID_PARAM;
}
@@ -1168,7 +1168,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetConfig(void *openHandle, SSBSIP_MFC_ENC_CON
case MFC_ENC_SETCONF_I_PERIOD:
#endif
default:
- LOGE("[%s] conf_type(%d) is NOT supported\n",__func__, conf_type);
+ ALOGE("[%s] conf_type(%d) is NOT supported\n",__func__, conf_type);
return MFC_RET_INVALID_PARAM;
}
@@ -1182,12 +1182,12 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetConfig(void *openHandle, SSBSIP_MFC_ENC_CON
pCTX = (_MFCLIB *) openHandle;
if (openHandle == NULL) {
- LOGE("[%s] openHandle is NULL\n",__func__);
+ ALOGE("[%s] openHandle is NULL\n",__func__);
return MFC_RET_INVALID_PARAM;
}
if (value == NULL) {
- LOGE("[%s] value is NULL\n",__func__);
+ ALOGE("[%s] value is NULL\n",__func__);
return MFC_RET_INVALID_PARAM;
}
@@ -1197,7 +1197,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetConfig(void *openHandle, SSBSIP_MFC_ENC_CON
break;
default:
- LOGE("[%s] conf_type(%d) is NOT supported\n",__func__, conf_type);
+ ALOGE("[%s] conf_type(%d) is NOT supported\n",__func__, conf_type);
return MFC_RET_INVALID_PARAM;
}
diff --git a/exynos/multimedia/codecs/video/exynos5/mfc_v4l2/dec/src/SsbSipMfcDecAPI.c b/exynos/multimedia/codecs/video/exynos5/mfc_v4l2/dec/src/SsbSipMfcDecAPI.c
index cfb5dcc..d09a553 100644
--- a/exynos/multimedia/codecs/video/exynos5/mfc_v4l2/dec/src/SsbSipMfcDecAPI.c
+++ b/exynos/multimedia/codecs/video/exynos5/mfc_v4l2/dec/src/SsbSipMfcDecAPI.c
@@ -39,8 +39,8 @@
#include "ion.h"
#endif
-/* #define LOG_NDEBUG 0 */
-#define LOG_TAG "MFC_DEC_APP"
+/* #define ALOG_NDEBUG 0 */
+#define ALOG_TAG "MFC_DEC_APP"
#include <utils/Log.h>
#ifdef CONFIG_MFC_FPS
@@ -85,22 +85,22 @@ int v4l2_mfc_querycap(int fd)
ret = ioctl(fd, VIDIOC_QUERYCAP, &cap);
if (ret != 0) {
- LOGE("[%s] VIDIOC_QUERYCAP failed", __func__);
+ ALOGE("[%s] VIDIOC_QUERYCAP failed", __func__);
return ret;
}
if (!(cap.capabilities & V4L2_CAP_VIDEO_CAPTURE)) {
- LOGE("[%s] Device does not support capture", __func__);
+ ALOGE("[%s] Device does not support capture", __func__);
return -1;
}
if (!(cap.capabilities & V4L2_CAP_VIDEO_OUTPUT)) {
- LOGE("[%s] Device does not support output", __func__);
+ ALOGE("[%s] Device does not support output", __func__);
return -1;
}
if (!(cap.capabilities & V4L2_CAP_STREAMING)) {
- LOGE("[%s] Device does not support streaming", __func__);
+ ALOGE("[%s] Device does not support streaming", __func__);
return -1;
}
@@ -158,7 +158,7 @@ int v4l2_mfc_s_fmt(int fd, enum v4l2_buf_type type,
fmt.fmt.pix_mp.pixelformat = V4L2_PIX_FMT_VP8;
break;
default:
- LOGE("[%s] Does NOT support the codec type (%d)", __func__, pixelformat);
+ ALOGE("[%s] Does NOT support the codec type (%d)", __func__, pixelformat);
return -1;
}
fmt.fmt.pix_mp.plane_fmt[0].sizeimage = sizeimage;
@@ -174,11 +174,11 @@ int v4l2_mfc_s_fmt(int fd, enum v4l2_buf_type type,
fmt.fmt.pix_mp.pixelformat = V4L2_PIX_FMT_NV21M;
break;
default:
- LOGE("[%s] Does NOT support the pixel format (%d)", __func__, pixelformat);
+ ALOGE("[%s] Does NOT support the pixel format (%d)", __func__, pixelformat);
return -1;
}
} else {
- LOGE("[%s] Wrong buffer type", __func__);
+ ALOGE("[%s] Wrong buffer type", __func__);
return -1;
}
@@ -377,20 +377,20 @@ static int isPBPacked(_MFCLIB *pCtx, int Frameleng)
while (1) {
while (startCode != USR_DATA_START_CODE) {
if ((startCode == VOP_START_CODE) || (leng_idx == Frameleng)) {
- LOGI("[%s] VOP START Found !!.....return",__func__);
- LOGW("[%s] Non Packed PB",__func__);
+ ALOGI("[%s] VOP START Found !!.....return",__func__);
+ ALOGW("[%s] Non Packed PB",__func__);
return 0;
}
getAByte(strmBuffer, &startCode);
- LOGV(">> StartCode = 0x%08x <<\n", startCode);
+ ALOGV(">> StartCode = 0x%08x <<\n", startCode);
strmBuffer++;
leng_idx++;
}
- LOGI("[%s] User Data Found !!",__func__);
+ ALOGI("[%s] User Data Found !!",__func__);
do {
if (*strmBuffer == 'p') {
- LOGW("[%s] Packed PB",__func__);
+ ALOGW("[%s] Packed PB",__func__);
return 1;
}
getAByte(strmBuffer, &startCode);
@@ -401,7 +401,7 @@ static int isPBPacked(_MFCLIB *pCtx, int Frameleng)
break;
}
- LOGW("[%s] Non Packed PB",__func__);
+ ALOGW("[%s] Non Packed PB",__func__);
return 0;
}
@@ -434,7 +434,7 @@ void *SsbSipMfcDecOpen(void)
struct v4l2_buffer buf;
struct v4l2_plane planes[MFC_DEC_NUM_PLANES];
- LOGI("[%s] MFC Library Ver %d.%02d",__func__, MFC_LIB_VER_MAJOR, MFC_LIB_VER_MINOR);
+ ALOGI("[%s] MFC Library Ver %d.%02d",__func__, MFC_LIB_VER_MAJOR, MFC_LIB_VER_MINOR);
#ifdef CONFIG_MFC_FPS
framecount = 0;
@@ -444,23 +444,23 @@ void *SsbSipMfcDecOpen(void)
pCTX = (_MFCLIB *)malloc(sizeof(_MFCLIB));
if (pCTX == NULL) {
- LOGE("[%s] malloc failed.",__func__);
+ ALOGE("[%s] malloc failed.",__func__);
return NULL;
}
memset(pCTX, 0, sizeof(_MFCLIB));
getMFCName(mfc_dev_name, 64);
- LOGI("[%s] dev name is %s",__func__,mfc_dev_name);
+ ALOGI("[%s] dev name is %s",__func__,mfc_dev_name);
if (access(mfc_dev_name, F_OK) != 0) {
- LOGE("[%s] MFC device node not exists",__func__);
+ ALOGE("[%s] MFC device node not exists",__func__);
goto error_case1;
}
hMFCOpen = open(mfc_dev_name, O_RDWR|O_NONBLOCK, 0);
if (hMFCOpen < 0) {
- LOGE("[%s] Failed to open MFC device",__func__);
+ ALOGE("[%s] Failed to open MFC device",__func__);
goto error_case1;
}
@@ -468,7 +468,7 @@ void *SsbSipMfcDecOpen(void)
ret = v4l2_mfc_querycap(pCTX->hMFC);
if (ret != 0) {
- LOGE("[%s] QUERYCAP failed", __func__);
+ ALOGE("[%s] QUERYCAP failed", __func__);
goto error_case2;
}
@@ -476,7 +476,7 @@ void *SsbSipMfcDecOpen(void)
ret = v4l2_mfc_s_fmt(pCTX->hMFC, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
H264_DEC, MAX_DECODER_INPUT_BUFFER_SIZE, 0, 0);
if (ret != 0) {
- LOGE("[%s] S_FMT failed",__func__);
+ ALOGE("[%s] S_FMT failed",__func__);
goto error_case2;
}
@@ -486,7 +486,7 @@ void *SsbSipMfcDecOpen(void)
ret = v4l2_mfc_reqbufs(pCTX->hMFC, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
V4L2_MEMORY_MMAP, &req_count);
if (ret != 0) {
- LOGE("[%s] VIDIOC_REQBUFS failed",__func__);
+ ALOGE("[%s] VIDIOC_REQBUFS failed",__func__);
goto error_case2;
}
@@ -496,14 +496,14 @@ void *SsbSipMfcDecOpen(void)
ret = v4l2_mfc_querybuf(pCTX->hMFC, &buf, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
V4L2_MEMORY_MMAP, i, planes);
if (ret != 0) {
- LOGE("[%s] VIDIOC_QUERYBUF failed",__func__);
+ ALOGE("[%s] VIDIOC_QUERYBUF failed",__func__);
goto error_case3;
}
pCTX->v4l2_dec.mfc_src_bufs[i] = mmap(NULL, buf.m.planes[0].length,
PROT_READ | PROT_WRITE, MAP_SHARED, pCTX->hMFC, buf.m.planes[0].m.mem_offset);
if (pCTX->v4l2_dec.mfc_src_bufs[i] == MAP_FAILED) {
- LOGE("[%s] mmap failed (%d)",__func__,i);
+ ALOGE("[%s] mmap failed (%d)",__func__,i);
goto error_case3;
}
}
@@ -546,10 +546,10 @@ void *SsbSipMfcDecOpenExt(void *value)
if (NO_CACHE == (*(SSBIP_MFC_BUFFER_TYPE *)value)) {
pCTX->cacheablebuffer = NO_CACHE;
- LOGI("[%s] non cacheable buffer",__func__);
+ ALOGI("[%s] non cacheable buffer",__func__);
} else {
pCTX->cacheablebuffer = CACHE;
- LOGI("[%s] cacheable buffer",__func__);
+ ALOGI("[%s] cacheable buffer",__func__);
}
return (void *)pCTX;
@@ -561,15 +561,15 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecClose(void *openHandle)
_MFCLIB *pCTX;
#ifdef CONFIG_MFC_FPS
- LOGI(">>> MFC");
+ ALOGI(">>> MFC");
gettimeofday(&mTS2, NULL);
- LOGI(">>> time=%d", mTS2.tv_sec-mTS1.tv_sec);
- LOGI(">>> framecount=%d", framecount);
- LOGI(">>> 30ms over=%d", over30ms);
+ ALOGI(">>> time=%d", mTS2.tv_sec-mTS1.tv_sec);
+ ALOGI(">>> framecount=%d", framecount);
+ ALOGI(">>> 30ms over=%d", over30ms);
#endif
if (openHandle == NULL) {
- LOGE("[%s] openHandle is NULL",__func__);
+ ALOGE("[%s] openHandle is NULL",__func__);
return MFC_RET_INVALID_PARAM;
}
@@ -578,7 +578,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecClose(void *openHandle)
if (pCTX->inter_buff_status & MFC_USE_DST_STREAMON) {
ret = v4l2_mfc_streamoff(pCTX->hMFC, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE);
if (ret != 0) {
- LOGE("[%s] VIDIOC_STREAMOFF failed (destination buffers)",__func__);
+ ALOGE("[%s] VIDIOC_STREAMOFF failed (destination buffers)",__func__);
return MFC_RET_CLOSE_FAIL;
}
pCTX->inter_buff_status &= ~(MFC_USE_DST_STREAMON);
@@ -587,7 +587,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecClose(void *openHandle)
if (pCTX->inter_buff_status & MFC_USE_SRC_STREAMON) {
ret = v4l2_mfc_streamoff(pCTX->hMFC, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE);
if (ret != 0) {
- LOGE("[%s] VIDIOC_STREAMOFF failed (source buffers)",__func__);
+ ALOGE("[%s] VIDIOC_STREAMOFF failed (source buffers)",__func__);
return MFC_RET_CLOSE_FAIL;
}
pCTX->inter_buff_status &= ~(MFC_USE_SRC_STREAMON);
@@ -631,7 +631,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c
int poll_state, poll_revents;
if (openHandle == NULL) {
- LOGE("[%s] openHandle is NULL",__func__);
+ ALOGE("[%s] openHandle is NULL",__func__);
return MFC_RET_INVALID_PARAM;
}
@@ -654,7 +654,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c
ret = v4l2_mfc_s_fmt(pCTX->hMFC, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, pCTX->codecType,
MAX_DECODER_INPUT_BUFFER_SIZE, width, height);
if (ret != 0) {
- LOGE("[%s] S_FMT failed", __func__);
+ ALOGE("[%s] S_FMT failed", __func__);
ret = MFC_RET_DEC_INIT_FAIL;
goto error_case1;
}
@@ -663,7 +663,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c
ret = v4l2_mfc_s_fmt(pCTX->hMFC, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, NV12MT_FMT,
0, width, height);
if (ret != 0) {
- LOGE("[%s] S_FMT failed",__func__);
+ ALOGE("[%s] S_FMT failed",__func__);
ret = MFC_RET_DEC_INIT_FAIL;
goto error_case1;
}
@@ -672,7 +672,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c
if (packedPB) {
ret = v4l2_mfc_s_ctrl(pCTX->hMFC, V4L2_CID_CODEC_PACKED_PB, 1);
if (ret != 0) {
- LOGE("[%s] VIDIOC_S_CTRL failed of PACKED_PB\n", __func__);
+ ALOGE("[%s] VIDIOC_S_CTRL failed of PACKED_PB\n", __func__);
return MFC_RET_DEC_SET_CONF_FAIL;
}
}
@@ -680,7 +680,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c
ret = v4l2_mfc_qbuf(pCTX->hMFC, &buf, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
V4L2_MEMORY_MMAP, pCTX->v4l2_dec.beingUsedIndex, planes, Frameleng);
if (ret != 0) {
- LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__);
+ ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__);
ret = MFC_RET_DEC_INIT_FAIL;
goto error_case1;
}
@@ -689,7 +689,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c
on OUTPUT queue */
ret = v4l2_mfc_streamon(pCTX->hMFC, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE);
if (ret != 0) {
- LOGE("[%s] VIDIOC_STREAMON failed",__func__);
+ ALOGE("[%s] VIDIOC_STREAMON failed",__func__);
ret = MFC_RET_DEC_INIT_FAIL;
goto error_case1;
}
@@ -707,7 +707,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c
ret = v4l2_mfc_s_ctrl(pCTX->hMFC, V4L2_CID_CACHEABLE, ctrl_value);
if (ret != 0) {
- LOGE("[%s] VIDIOC_S_CTRL failed, V4L2_CID_CACHEABLE", __func__);
+ ALOGE("[%s] VIDIOC_S_CTRL failed, V4L2_CID_CACHEABLE", __func__);
ret = MFC_RET_DEC_INIT_FAIL;
goto error_case1;
}
@@ -715,7 +715,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c
#ifdef USE_ION
pCTX->ion_fd = ion_client_create();
if (pCTX->ion_fd < 3) {
- LOGE("[%s] Failed to get ion_fd : %d", __func__, pCTX->ion_fd);
+ ALOGE("[%s] Failed to get ion_fd : %d", __func__, pCTX->ion_fd);
ret = MFC_RET_DEC_INIT_FAIL;
goto error_case1;
}
@@ -727,7 +727,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c
ret = v4l2_mfc_streamon(pCTX->hMFC, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE);
if (ret != 0) {
- LOGE("[%s] VIDIOC_STREAMON failed (destination buffers)", __func__);
+ ALOGE("[%s] VIDIOC_STREAMON failed (destination buffers)", __func__);
ret = MFC_RET_DEC_INIT_FAIL;
goto error_case1;
}
@@ -741,10 +741,10 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c
if (ret == 0)
break;
} else if (poll_revents & POLLERR) {
- LOGE("[%s] POLLERR\n", __func__);
+ ALOGE("[%s] POLLERR\n", __func__);
return MFC_GETOUTBUF_STATUS_NULL;
} else {
- LOGE("[%s] poll() returns 0x%x\n", __func__, poll_revents);
+ ALOGE("[%s] poll() returns 0x%x\n", __func__, poll_revents);
return MFC_GETOUTBUF_STATUS_NULL;
}
} else if (poll_state < 0) {
@@ -772,7 +772,7 @@ int read_header_data(void *openHandle)
ret = v4l2_mfc_g_fmt(pCTX->hMFC, &fmt, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE);
if (ret != 0) {
- LOGE("[%s] VIDIOC_G_FMT failed",__func__);
+ ALOGE("[%s] VIDIOC_G_FMT failed",__func__);
ret = MFC_RET_DEC_INIT_FAIL;
goto error_case;
}
@@ -787,7 +787,7 @@ int read_header_data(void *openHandle)
ret = v4l2_mfc_g_crop(pCTX->hMFC, &crop, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE);
if (ret != 0) {
- LOGE("[%s] VIDIOC_G_CROP failed",__func__);
+ ALOGE("[%s] VIDIOC_G_CROP failed",__func__);
ret = MFC_RET_DEC_INIT_FAIL;
goto error_case;
}
@@ -801,14 +801,14 @@ int read_header_data(void *openHandle)
ret = v4l2_mfc_g_ctrl(pCTX->hMFC, V4L2_CID_CODEC_REQ_NUM_BUFS, &ctrl_value);
if (ret != 0) {
- LOGE("[%s] VIDIOC_G_CTRL failed",__func__);
+ ALOGE("[%s] VIDIOC_G_CTRL failed",__func__);
ret = MFC_RET_DEC_INIT_FAIL;
goto error_case;
}
pCTX->v4l2_dec.mfc_num_dst_bufs = ctrl_value + pCTX->dec_numextradpb;
- LOGV("[%s] Num of allocated buffers: %d\n",__func__, pCTX->v4l2_dec.mfc_num_dst_bufs);
+ ALOGV("[%s] Num of allocated buffers: %d\n",__func__, pCTX->v4l2_dec.mfc_num_dst_bufs);
return 0;
@@ -829,7 +829,7 @@ int init_mfc_output_stream(void *openHandle)
ret = v4l2_mfc_reqbufs(pCTX->hMFC, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,
V4L2_MEMORY_MMAP, (int *)&pCTX->v4l2_dec.mfc_num_dst_bufs);
if (ret != 0) {
- LOGE("[%s] VIDIOC_REQBUFS failed (destination buffers)",__func__);
+ ALOGE("[%s] VIDIOC_REQBUFS failed (destination buffers)",__func__);
ret = MFC_RET_DEC_INIT_FAIL;
goto error_case1;
}
@@ -838,7 +838,7 @@ int init_mfc_output_stream(void *openHandle)
ret = v4l2_mfc_querybuf(pCTX->hMFC, &buf, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,
V4L2_MEMORY_MMAP, i, planes);
if (ret != 0) {
- LOGE("[%s] VIDIOC_QUERYBUF failed (destination buffers)",__func__);
+ ALOGE("[%s] VIDIOC_QUERYBUF failed (destination buffers)",__func__);
ret = MFC_RET_DEC_INIT_FAIL;
goto error_case1;
}
@@ -864,7 +864,7 @@ int init_mfc_output_stream(void *openHandle)
pCTX->v4l2_dec.mfc_dst_bufs[i][0] = mmap(NULL, buf.m.planes[0].length,
PROT_READ | PROT_WRITE, MAP_SHARED, pCTX->hMFC, buf.m.planes[0].m.mem_offset);
if (pCTX->v4l2_dec.mfc_dst_bufs[i][0] == MAP_FAILED) {
- LOGE("[%s] mmap failed (destination buffers (Y))",__func__);
+ ALOGE("[%s] mmap failed (destination buffers (Y))",__func__);
ret = MFC_RET_DEC_INIT_FAIL;
goto error_case2;
}
@@ -872,7 +872,7 @@ int init_mfc_output_stream(void *openHandle)
pCTX->v4l2_dec.mfc_dst_bufs[i][1] = mmap(NULL, buf.m.planes[1].length,
PROT_READ | PROT_WRITE, MAP_SHARED, pCTX->hMFC, buf.m.planes[1].m.mem_offset);
if (pCTX->v4l2_dec.mfc_dst_bufs[i][1] == MAP_FAILED) {
- LOGE("[%s] mmap failed (destination buffers (UV))",__func__);
+ ALOGE("[%s] mmap failed (destination buffers (UV))",__func__);
ret = MFC_RET_DEC_INIT_FAIL;
goto error_case2;
}
@@ -881,7 +881,7 @@ int init_mfc_output_stream(void *openHandle)
ret = v4l2_mfc_qbuf(pCTX->hMFC, &buf, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,
V4L2_MEMORY_MMAP, i, planes, 0);
if (ret != 0) {
- LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE",__func__);
+ ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE",__func__);
ret = MFC_RET_DEC_INIT_FAIL;
goto error_case2;
}
@@ -954,12 +954,12 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExe(void *openHandle, int lengthBufFill)
framecount++;
#endif
if (openHandle == NULL) {
- LOGE("[%s] openHandle is NULL",__func__);
+ ALOGE("[%s] openHandle is NULL",__func__);
return MFC_RET_INVALID_PARAM;
}
if ((lengthBufFill < 0) || (lengthBufFill > MAX_DECODER_INPUT_BUFFER_SIZE)) {
- LOGE("[%s] lengthBufFill is invalid. (lengthBufFill=%d)",__func__, lengthBufFill);
+ ALOGE("[%s] lengthBufFill is invalid. (lengthBufFill=%d)",__func__, lengthBufFill);
return MFC_RET_INVALID_PARAM;
}
@@ -973,7 +973,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExe(void *openHandle, int lengthBufFill)
ret = v4l2_mfc_qbuf(pCTX->hMFC, &buf, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
V4L2_MEMORY_MMAP, pCTX->v4l2_dec.beingUsedIndex, planes, lengthBufFill);
if (ret != 0) {
- LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__);
+ ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__);
return MFC_RET_DEC_EXE_ERR;
}
@@ -996,10 +996,10 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExe(void *openHandle, int lengthBufFill)
break;
}
} else if (poll_revents & POLLERR) {
- LOGE("[%s] POLLERR\n",__func__);
+ ALOGE("[%s] POLLERR\n",__func__);
return MFC_RET_DEC_EXE_ERR;
} else {
- LOGE("[%s] poll() returns 0x%x\n", __func__, poll_revents);
+ ALOGE("[%s] poll() returns 0x%x\n", __func__, poll_revents);
return MFC_RET_DEC_EXE_ERR;
}
} else if (poll_state < 0) {
@@ -1019,7 +1019,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExe(void *openHandle, int lengthBufFill)
} else {
ret = v4l2_mfc_g_ctrl(pCTX->hMFC, V4L2_CID_CODEC_DISPLAY_STATUS, &ctrl_value);
if (ret != 0) {
- LOGE("[%s] VIDIOC_G_CTRL failed", __func__);
+ ALOGE("[%s] VIDIOC_G_CTRL failed", __func__);
return MFC_RET_DEC_GET_CONF_FAIL;
}
@@ -1060,7 +1060,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExe(void *openHandle, int lengthBufFill)
ret = v4l2_mfc_qbuf(pCTX->hMFC, &buf, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
V4L2_MEMORY_MMAP, pCTX->v4l2_dec.beingUsedIndex, planes, 0);
if (ret != 0) {
- LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__);
+ ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__);
return MFC_RET_DEC_EXE_ERR;
}
@@ -1072,7 +1072,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExe(void *openHandle, int lengthBufFill)
usleep(1000);
loop_count++;
if (loop_count >= 1000) {
- LOGE("[%s] Error in do-while loop",__func__);
+ ALOGE("[%s] Error in do-while loop",__func__);
break;
}
} while (ret != 0);
@@ -1092,7 +1092,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExe(void *openHandle, int lengthBufFill)
usleep(1000);
loop_count++;
if (loop_count >= 1000) {
- LOGE("[%s] Error in do-while loop",__func__);
+ ALOGE("[%s] Error in do-while loop",__func__);
break;
}
} while (ret != 0);
@@ -1151,12 +1151,12 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExeNb(void *openHandle, int lengthBufFill)
framecount++;
#endif
if (openHandle == NULL) {
- LOGE("[%s] openHandle is NULL",__func__);
+ ALOGE("[%s] openHandle is NULL",__func__);
return MFC_RET_INVALID_PARAM;
}
if ((lengthBufFill < 0) || (lengthBufFill > MAX_DECODER_INPUT_BUFFER_SIZE)) {
- LOGE("[%s] lengthBufFill is invalid. (lengthBufFill=%d)",__func__, lengthBufFill);
+ ALOGE("[%s] lengthBufFill is invalid. (lengthBufFill=%d)",__func__, lengthBufFill);
return MFC_RET_INVALID_PARAM;
}
@@ -1167,7 +1167,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExeNb(void *openHandle, int lengthBufFill)
ret = v4l2_mfc_qbuf(pCTX->hMFC, &buf, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
V4L2_MEMORY_MMAP, pCTX->v4l2_dec.beingUsedIndex, planes, lengthBufFill);
if (ret != 0) {
- LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__);
+ ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__);
return MFC_RET_DEC_EXE_ERR;
}
} else if (pCTX->v4l2_dec.bBeingFinalized == 0) {
@@ -1175,7 +1175,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExeNb(void *openHandle, int lengthBufFill)
ret = v4l2_mfc_qbuf(pCTX->hMFC, &buf, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
V4L2_MEMORY_MMAP, pCTX->v4l2_dec.beingUsedIndex, planes, 0);
if (ret != 0) {
- LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__);
+ ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__);
return MFC_RET_DEC_EXE_ERR;
}
}
@@ -1198,15 +1198,15 @@ int isBreak_loop(void *openHandle)
ret = v4l2_mfc_g_ctrl(pCTX->hMFC, V4L2_CID_CODEC_CHECK_STATE, &ctrl_value);
if (ret != 0) {
- LOGE("[%s] VIDIOC_G_CTRL failed", __func__);
+ ALOGE("[%s] VIDIOC_G_CTRL failed", __func__);
return 0;
}
if (ctrl_value == MFCSTATE_DEC_RES_DETECT) {
- LOGV("[%s] Resolution Change detect",__func__);
+ ALOGV("[%s] Resolution Change detect",__func__);
return 1;
} else if (ctrl_value == MFCSTATE_DEC_TERMINATING) {
- LOGV("[%s] Decoding Finish!!!",__func__);
+ ALOGV("[%s] Decoding Finish!!!",__func__);
return 1;
}
@@ -1243,10 +1243,10 @@ SSBSIP_MFC_DEC_OUTBUF_STATUS SsbSipMfcDecWaitForOutBuf(void *openHandle, SSBSIP_
break;
}
} else if (poll_revents & POLLERR) {
- LOGE("[%s] POLLERR\n",__func__);
+ ALOGE("[%s] POLLERR\n",__func__);
return MFC_GETOUTBUF_STATUS_NULL;
} else {
- LOGE("[%s] poll() returns 0x%x\n", __func__, poll_revents);
+ ALOGE("[%s] poll() returns 0x%x\n", __func__, poll_revents);
return MFC_GETOUTBUF_STATUS_NULL;
}
} else if (poll_state < 0) {
@@ -1266,7 +1266,7 @@ SSBSIP_MFC_DEC_OUTBUF_STATUS SsbSipMfcDecWaitForOutBuf(void *openHandle, SSBSIP_
} else {
ret = v4l2_mfc_g_ctrl(pCTX->hMFC, V4L2_CID_CODEC_DISPLAY_STATUS, &ctrl_value);
if (ret != 0) {
- LOGE("[%s] VIDIOC_G_CTRL failed", __func__);
+ ALOGE("[%s] VIDIOC_G_CTRL failed", __func__);
return MFC_RET_DEC_GET_CONF_FAIL;
}
@@ -1310,7 +1310,7 @@ SSBSIP_MFC_DEC_OUTBUF_STATUS SsbSipMfcDecWaitForOutBuf(void *openHandle, SSBSIP_
usleep(1000);
loop_count++;
if (loop_count >= 1000) {
- LOGE("[%s] Error in do-while loop",__func__);
+ ALOGE("[%s] Error in do-while loop",__func__);
break;
}
} while (ret != 0);
@@ -1330,7 +1330,7 @@ SSBSIP_MFC_DEC_OUTBUF_STATUS SsbSipMfcDecWaitForOutBuf(void *openHandle, SSBSIP_
usleep(1000);
loop_count++;
if (loop_count >= 1000) {
- LOGE("[%s] Error in do-while loop",__func__);
+ ALOGE("[%s] Error in do-while loop",__func__);
break;
}
} while (ret != 0);
@@ -1379,12 +1379,12 @@ void *SsbSipMfcDecGetInBuf(void *openHandle, void **phyInBuf, int inputBufferSi
int i;
if (openHandle == NULL) {
- LOGE("[%s] openHandle is NULL",__func__);
+ ALOGE("[%s] openHandle is NULL",__func__);
return NULL;
}
if ((inputBufferSize < 0) || (inputBufferSize > MAX_DECODER_INPUT_BUFFER_SIZE)) {
- LOGE("[%s] inputBufferSize = %d is invalid",__func__, inputBufferSize);
+ ALOGE("[%s] inputBufferSize = %d is invalid",__func__, inputBufferSize);
return NULL;
}
@@ -1395,7 +1395,7 @@ void *SsbSipMfcDecGetInBuf(void *openHandle, void **phyInBuf, int inputBufferSi
break;
if (i == MFC_DEC_NUM_SRC_BUFS) {
- LOGV("[%s] No buffer is available.",__func__);
+ ALOGV("[%s] No buffer is available.",__func__);
return NULL;
} else {
pCTX->virStrmBuf = (unsigned int)pCTX->v4l2_dec.mfc_src_bufs[i];
@@ -1413,9 +1413,9 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetInBuf(void *openHandle, void *phyInBuf, voi
_MFCLIB *pCTX;
int i;
- LOGV("[%s] Enter",__func__);
+ ALOGV("[%s] Enter",__func__);
if (openHandle == NULL) {
- LOGE("[%s] openHandle is NULL",__func__);
+ ALOGE("[%s] openHandle is NULL",__func__);
return MFC_RET_INVALID_PARAM;
}
@@ -1427,14 +1427,14 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetInBuf(void *openHandle, void *phyInBuf, voi
}
if (i == MFC_DEC_NUM_SRC_BUFS) {
- LOGE("[%s] Can not use the buffer",__func__);
+ ALOGE("[%s] Can not use the buffer",__func__);
return MFC_RET_INVALID_PARAM;
} else {
pCTX->virStrmBuf = (unsigned int)virInBuf;
pCTX->v4l2_dec.beingUsedIndex = i;
pCTX->v4l2_dec.mfc_src_buf_flags[i] = BUF_ENQUEUED;
}
- LOGV("[%s] Exit idx %d",__func__,pCTX->v4l2_dec.beingUsedIndex);
+ ALOGV("[%s] Exit idx %d",__func__,pCTX->v4l2_dec.beingUsedIndex);
return MFC_RET_OK;
}
@@ -1443,7 +1443,7 @@ SSBSIP_MFC_DEC_OUTBUF_STATUS SsbSipMfcDecGetOutBuf(void *openHandle, SSBSIP_MFC_
_MFCLIB *pCTX;
if (openHandle == NULL) {
- LOGE("[%s] openHandle is NULL",__func__);
+ ALOGE("[%s] openHandle is NULL",__func__);
return MFC_GETOUTBUF_DISPLAY_END;
}
@@ -1495,12 +1495,12 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetConfig(void *openHandle, SSBSIP_MFC_DEC_CON
int id, ctrl_value;
if (openHandle == NULL) {
- LOGE("[%s] openHandle is NULL",__func__);
+ ALOGE("[%s] openHandle is NULL",__func__);
return MFC_RET_INVALID_PARAM;
}
if ((value == NULL) && (MFC_DEC_SETCONF_IS_LAST_FRAME !=conf_type)) {
- LOGE("[%s] value is NULL",__func__);
+ ALOGE("[%s] value is NULL",__func__);
return MFC_RET_INVALID_PARAM;
}
@@ -1514,8 +1514,8 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetConfig(void *openHandle, SSBSIP_MFC_DEC_CON
case MFC_DEC_SETCONF_FIMV1_WIDTH_HEIGHT: /* be set before calling SsbSipMfcDecInit */
fimv1_res = (struct mfc_dec_fimv1_info *)value;
- LOGI("fimv1->width = %d\n", fimv1_res->width);
- LOGI("fimv1->height = %d\n", fimv1_res->height);
+ ALOGI("fimv1->width = %d\n", fimv1_res->width);
+ ALOGI("fimv1->height = %d\n", fimv1_res->height);
pCTX->fimv1_res.width = (int)(fimv1_res->width);
pCTX->fimv1_res.height = (int)(fimv1_res->height);
return MFC_RET_OK;
@@ -1531,7 +1531,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetConfig(void *openHandle, SSBSIP_MFC_DEC_CON
case MFC_DEC_SETCONF_DPB_FLUSH:
ret = v4l2_mfc_streamoff(pCTX->hMFC, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE);
if (ret != 0) {
- LOGE("[%s] VIDIOC_STREAMOFF failed (destination buffers)",__func__);
+ ALOGE("[%s] VIDIOC_STREAMOFF failed (destination buffers)",__func__);
return MFC_RET_DEC_SET_CONF_FAIL;
}
pCTX->inter_buff_status &= ~(MFC_USE_DST_STREAMON);
@@ -1540,14 +1540,14 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetConfig(void *openHandle, SSBSIP_MFC_DEC_CON
ret = v4l2_mfc_qbuf(pCTX->hMFC, &buf, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,
V4L2_MEMORY_MMAP, i, planes, 0);
if (ret != 0) {
- LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE",__func__);
+ ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE",__func__);
return MFC_RET_DEC_SET_CONF_FAIL;
}
}
ret = v4l2_mfc_streamon(pCTX->hMFC, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE);
if (ret != 0) {
- LOGE("[%s] VIDIOC_STREAMON failed (destination buffers)",__func__);
+ ALOGE("[%s] VIDIOC_STREAMON failed (destination buffers)",__func__);
return MFC_RET_DEC_SET_CONF_FAIL;
}
pCTX->inter_buff_status |= MFC_USE_DST_STREAMON;
@@ -1585,13 +1585,13 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetConfig(void *openHandle, SSBSIP_MFC_DEC_CON
break;
default:
- LOGE("[%s] conf_type(%d) is NOT supported",__func__, conf_type);
+ ALOGE("[%s] conf_type(%d) is NOT supported",__func__, conf_type);
return MFC_RET_INVALID_PARAM;
}
ret = v4l2_mfc_s_ctrl(pCTX->hMFC, id, ctrl_value);
if (ret != 0) {
- LOGE("[%s] VIDIOC_S_CTRL failed (conf_type = %d)",__func__, conf_type);
+ ALOGE("[%s] VIDIOC_S_CTRL failed (conf_type = %d)",__func__, conf_type);
return MFC_RET_DEC_SET_CONF_FAIL;
}
@@ -1608,12 +1608,12 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecGetConfig(void *openHandle, SSBSIP_MFC_DEC_CON
SSBSIP_MFC_CROP_INFORMATION *crop_information;
if (openHandle == NULL) {
- LOGE("[%s] openHandle is NULL",__func__);
+ ALOGE("[%s] openHandle is NULL",__func__);
return MFC_RET_INVALID_PARAM;
}
if (value == NULL) {
- LOGE("[%s] value is NULL",__func__);
+ ALOGE("[%s] value is NULL",__func__);
return MFC_RET_INVALID_PARAM;
}
@@ -1631,7 +1631,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecGetConfig(void *openHandle, SSBSIP_MFC_DEC_CON
case MFC_DEC_GETCONF_FRAME_TAG:
ret = v4l2_mfc_g_ctrl(pCTX->hMFC, V4L2_CID_CODEC_FRAME_TAG, (int*)value);
if (ret != 0)
- LOGE("[%s] VIDIOC_G_CTRL failed, V4L2_CID_CODEC_FRAME_TAG", __func__);
+ ALOGE("[%s] VIDIOC_G_CTRL failed, V4L2_CID_CODEC_FRAME_TAG", __func__);
break;
case MFC_DEC_GETCONF_CRC_DATA:
@@ -1639,17 +1639,17 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecGetConfig(void *openHandle, SSBSIP_MFC_DEC_CON
ret = v4l2_mfc_g_ctrl(pCTX->hMFC, V4L2_CID_CODEC_CRC_DATA_LUMA, &crc_data->luma0);
if (ret != 0) {
- LOGE("[%s] VIDIOC_G_CTRL failed, V4L2_CID_CODEC_CRC_DATA_LUMA",__func__);
+ ALOGE("[%s] VIDIOC_G_CTRL failed, V4L2_CID_CODEC_CRC_DATA_LUMA",__func__);
return MFC_RET_DEC_GET_CONF_FAIL;
}
ret = v4l2_mfc_g_ctrl(pCTX->hMFC, V4L2_CID_CODEC_CRC_DATA_CHROMA, &crc_data->chroma0);
if (ret != 0) {
- LOGE("[%s] VIDIOC_G_CTRL failed, V4L2_CID_CODEC_CRC_DATA_CHROMA",__func__);
+ ALOGE("[%s] VIDIOC_G_CTRL failed, V4L2_CID_CODEC_CRC_DATA_CHROMA",__func__);
return MFC_RET_DEC_GET_CONF_FAIL;
}
- LOGI("[%s] crc_data->luma0=0x%x\n", __func__, crc_data->luma0);
- LOGI("[%s] crc_data->chroma0=0x%x\n", __func__, crc_data->chroma0);
+ ALOGI("[%s] crc_data->luma0=0x%x\n", __func__, crc_data->luma0);
+ ALOGI("[%s] crc_data->chroma0=0x%x\n", __func__, crc_data->chroma0);
break;
case MFC_DEC_GETCONF_CROP_INFO:
@@ -1661,7 +1661,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecGetConfig(void *openHandle, SSBSIP_MFC_DEC_CON
break;
default:
- LOGE("[%s] conf_type(%d) is NOT supported",__func__, conf_type);
+ ALOGE("[%s] conf_type(%d) is NOT supported",__func__, conf_type);
return MFC_RET_INVALID_PARAM;
}
diff --git a/exynos/multimedia/codecs/video/exynos5/mfc_v4l2/enc/src/SsbSipMfcEncAPI.c b/exynos/multimedia/codecs/video/exynos5/mfc_v4l2/enc/src/SsbSipMfcEncAPI.c
index a4a841f..b444fd2 100644
--- a/exynos/multimedia/codecs/video/exynos5/mfc_v4l2/enc/src/SsbSipMfcEncAPI.c
+++ b/exynos/multimedia/codecs/video/exynos5/mfc_v4l2/enc/src/SsbSipMfcEncAPI.c
@@ -31,8 +31,8 @@
#include "mfc_interface.h"
#include "SsbSipMfcApi.h"
-/* #define LOG_NDEBUG 0 */
-#define LOG_TAG "MFC_ENC_APP"
+/* #define ALOG_NDEBUG 0 */
+#define ALOG_TAG "MFC_ENC_APP"
#include <utils/Log.h>
#define POLL_ENC_WAIT_TIMEOUT 25
@@ -70,24 +70,24 @@ void *SsbSipMfcEncOpen(void)
int ret;
struct v4l2_capability cap;
- LOGI("[%s] MFC Library Ver %d.%02d",__func__, MFC_LIB_VER_MAJOR, MFC_LIB_VER_MINOR);
+ ALOGI("[%s] MFC Library Ver %d.%02d",__func__, MFC_LIB_VER_MAJOR, MFC_LIB_VER_MINOR);
getMFCName(mfc_dev_name, 64);
- LOGI("[%s] dev name is %s\n",__func__,mfc_dev_name);
+ ALOGI("[%s] dev name is %s\n",__func__,mfc_dev_name);
if (access(mfc_dev_name, F_OK) != 0) {
- LOGE("[%s] MFC device node not exists",__func__);
+ ALOGE("[%s] MFC device node not exists",__func__);
return NULL;
}
hMFCOpen = open(mfc_dev_name, O_RDWR | O_NONBLOCK, 0);
if (hMFCOpen < 0) {
- LOGE("[%s] Failed to open MFC device",__func__);
+ ALOGE("[%s] Failed to open MFC device",__func__);
return NULL;
}
pCTX = (_MFCLIB *)malloc(sizeof(_MFCLIB));
if (pCTX == NULL) {
- LOGE("[%s] malloc failed.",__func__);
+ ALOGE("[%s] malloc failed.",__func__);
return NULL;
}
memset(pCTX, 0, sizeof(_MFCLIB));
@@ -97,28 +97,28 @@ void *SsbSipMfcEncOpen(void)
memset(&cap, 0, sizeof(cap));
ret = ioctl(pCTX->hMFC, VIDIOC_QUERYCAP, &cap);
if (ret != 0) {
- LOGE("[%s] VIDIOC_QUERYCAP failed",__func__);
+ ALOGE("[%s] VIDIOC_QUERYCAP failed",__func__);
close(pCTX->hMFC);
free(pCTX);
return NULL;
}
if (!(cap.capabilities & V4L2_CAP_VIDEO_CAPTURE)) {
- LOGE("[%s] Device does not support capture",__func__);
+ ALOGE("[%s] Device does not support capture",__func__);
close(pCTX->hMFC);
free(pCTX);
return NULL;
}
if (!(cap.capabilities & V4L2_CAP_VIDEO_OUTPUT)) {
- LOGE("[%s] Device does not support output",__func__);
+ ALOGE("[%s] Device does not support output",__func__);
close(pCTX->hMFC);
free(pCTX);
return NULL;
}
if (!(cap.capabilities & V4L2_CAP_STREAMING)) {
- LOGE("[%s] Device does not support streaming",__func__);
+ ALOGE("[%s] Device does not support streaming",__func__);
close(pCTX->hMFC);
free(pCTX);
return NULL;
@@ -145,13 +145,13 @@ void *SsbSipMfcEncOpenExt(void *value)
pCTX->cacheablebuffer = NO_CACHE;
/* physical address is used for Input source */
pCTX->v4l2_enc.bInputPhyVir = 1;
- LOGI("[%s] non cacheable buffer",__func__);
+ ALOGI("[%s] non cacheable buffer",__func__);
}
else {
pCTX->cacheablebuffer = CACHE;
/* vitual address is used for Input source */
pCTX->v4l2_enc.bInputPhyVir = 0;
- LOGI("[%s] cacheable buffer",__func__);
+ ALOGI("[%s] cacheable buffer",__func__);
}
return (void *)pCTX;
@@ -165,7 +165,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncClose(void *openHandle)
enum v4l2_buf_type type;
if (openHandle == NULL) {
- LOGE("[%s] openHandle is NULL",__func__);
+ ALOGE("[%s] openHandle is NULL",__func__);
return MFC_RET_INVALID_PARAM;
}
@@ -175,7 +175,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncClose(void *openHandle)
type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
ret = ioctl(pCTX->hMFC, VIDIOC_STREAMOFF, &type);
if (ret != 0) {
- LOGE("[%s] VIDIOC_STREAMOFF failed (destination buffers)",__func__);
+ ALOGE("[%s] VIDIOC_STREAMOFF failed (destination buffers)",__func__);
return MFC_RET_CLOSE_FAIL;
}
pCTX->inter_buff_status &= ~(MFC_USE_DST_STREAMON);
@@ -185,7 +185,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncClose(void *openHandle)
type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
ret = ioctl(pCTX->hMFC, VIDIOC_STREAMOFF, &type);
if (ret != 0) {
- LOGE("[%s] VIDIOC_STREAMOFF failed (source buffers)",__func__);
+ ALOGE("[%s] VIDIOC_STREAMOFF failed (source buffers)",__func__);
return MFC_RET_CLOSE_FAIL;
}
pCTX->inter_buff_status &= ~(MFC_USE_SRC_STREAMON);
@@ -263,7 +263,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
pCTX->height = h264_arg->SourceHeight;
pCTX->framemap = h264_arg->FrameMap;
} else {
- LOGE("[%s] Undefined codec type \n",__func__);
+ ALOGE("[%s] Undefined codec type \n",__func__);
ret = MFC_RET_INVALID_PARAM;
goto error_case1;
}
@@ -574,7 +574,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
break;
default:
- LOGE("[%s] Undefined codec type",__func__);
+ ALOGE("[%s] Undefined codec type",__func__);
ret = MFC_RET_INVALID_PARAM;
goto error_case1;
}
@@ -593,7 +593,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
ret = ioctl(pCTX->hMFC, VIDIOC_S_EXT_CTRLS, &ext_ctrls);
if (ret != 0) {
- LOGE("[%s] Failed to set extended controls",__func__);
+ ALOGE("[%s] Failed to set extended controls",__func__);
ret = MFC_RET_ENC_INIT_FAIL;
goto error_case1;
}
@@ -630,7 +630,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
#endif
ret = ioctl(pCTX->hMFC, VIDIOC_S_FMT, &fmt);
if (ret != 0) {
- LOGE("[%s] S_FMT failed on MFC output stream",__func__);
+ ALOGE("[%s] S_FMT failed on MFC output stream",__func__);
ret = MFC_RET_ENC_INIT_FAIL;
goto error_case1;
}
@@ -649,7 +649,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
fmt.fmt.pix_mp.pixelformat = V4L2_PIX_FMT_H263;
break;
default:
- LOGE("[%s] Codec has not been recognised",__func__);
+ ALOGE("[%s] Codec has not been recognised",__func__);
return MFC_RET_ENC_INIT_FAIL;
}
@@ -658,7 +658,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
ret = ioctl(pCTX->hMFC, VIDIOC_S_FMT, &fmt);
if (ret != 0) {
- LOGE("[%s] S_FMT failed on MFC output stream",__func__);
+ ALOGE("[%s] S_FMT failed on MFC output stream",__func__);
ret = MFC_RET_ENC_INIT_FAIL;
goto error_case1;
}
@@ -672,7 +672,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
ret = ioctl(pCTX->hMFC, VIDIOC_S_CTRL, &ctrl);
if (ret != 0) {
- LOGE("[%s] VIDIOC_S_CTRL failed, V4L2_CID_CACHEABLE",__func__);
+ ALOGE("[%s] VIDIOC_S_CTRL failed, V4L2_CID_CACHEABLE",__func__);
ret = MFC_RET_ENC_INIT_FAIL;
goto error_case1;
}
@@ -688,7 +688,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
ret = ioctl(pCTX->hMFC, VIDIOC_REQBUFS, &reqbuf);
if (ret != 0) {
- LOGE("[%s] Reqbufs src ioctl failed",__func__);
+ ALOGE("[%s] Reqbufs src ioctl failed",__func__);
ret = MFC_RET_ENC_INIT_FAIL;
goto error_case1;
}
@@ -706,7 +706,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
ret = ioctl(pCTX->hMFC, VIDIOC_QUERYBUF, &buf);
if (ret != 0) {
- LOGE("[%s] Querybuf src ioctl failed",__func__);
+ ALOGE("[%s] Querybuf src ioctl failed",__func__);
ret = MFC_RET_ENC_INIT_FAIL;
goto error_case2;
}
@@ -721,7 +721,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
mmap(NULL, buf.m.planes[0].length, PROT_READ | PROT_WRITE,
MAP_SHARED, pCTX->hMFC, buf.m.planes[0].m.mem_offset);
if (pCTX->v4l2_enc.mfc_src_bufs[i][0] == MAP_FAILED) {
- LOGE("[%s] Mmap on src buffer (0) failed",__func__);
+ ALOGE("[%s] Mmap on src buffer (0) failed",__func__);
ret = MFC_RET_ENC_INIT_FAIL;
goto error_case2;
}
@@ -731,13 +731,13 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
MAP_SHARED, pCTX->hMFC, buf.m.planes[1].m.mem_offset);
if (pCTX->v4l2_enc.mfc_src_bufs[i][1] == MAP_FAILED) {
munmap(pCTX->v4l2_enc.mfc_src_bufs[i][0], pCTX->v4l2_enc.mfc_src_bufs_len[0]);
- LOGE("[%s] Mmap on src buffer (1) failed",__func__);
+ ALOGE("[%s] Mmap on src buffer (1) failed",__func__);
ret = MFC_RET_ENC_INIT_FAIL;
goto error_case2;
}
}
} else
- LOGV("[%s] Camera Phys src buf %d",__func__,reqbuf.count);
+ ALOGV("[%s] Camera Phys src buf %d",__func__,reqbuf.count);
for (i = 0; i < pCTX->v4l2_enc.mfc_num_src_bufs; i++)
pCTX->v4l2_enc.mfc_src_buf_flags[i] = BUF_DEQUEUED;
@@ -756,7 +756,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
ret = ioctl(pCTX->hMFC, VIDIOC_REQBUFS, &reqbuf);
if (ret != 0) {
- LOGE("[%s] Reqbufs dst ioctl failed",__func__);
+ ALOGE("[%s] Reqbufs dst ioctl failed",__func__);
ret = MFC_RET_ENC_INIT_FAIL;
goto error_case2;
}
@@ -773,7 +773,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
ret = ioctl(pCTX->hMFC, VIDIOC_QUERYBUF, &buf);
if (ret != 0) {
- LOGE("[%s] Querybuf dst ioctl failed",__func__);
+ ALOGE("[%s] Querybuf dst ioctl failed",__func__);
ret = MFC_RET_ENC_INIT_FAIL;
goto error_case3;
}
@@ -783,14 +783,14 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
mmap(NULL, buf.m.planes[0].length, PROT_READ | PROT_WRITE,
MAP_SHARED, pCTX->hMFC, buf.m.planes[0].m.mem_offset);
if (pCTX->v4l2_enc.mfc_dst_bufs[i] == MAP_FAILED) {
- LOGE("[%s] Mmap on dst buffer failed",__func__);
+ ALOGE("[%s] Mmap on dst buffer failed",__func__);
ret = MFC_RET_ENC_INIT_FAIL;
goto error_case3;
}
ret = ioctl(pCTX->hMFC, VIDIOC_QBUF, &buf);
if (ret != 0) {
- LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE",__func__);
+ ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE",__func__);
ret = MFC_RET_ENC_INIT_FAIL;
goto error_case3;
}
@@ -803,7 +803,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
ret = ioctl(pCTX->hMFC, VIDIOC_STREAMON, &type);
if (ret != 0) {
- LOGE("[%s] V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, VIDIOC_STREAMON failed",__func__);
+ ALOGE("[%s] V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, VIDIOC_STREAMON failed",__func__);
ret = MFC_RET_ENC_INIT_FAIL;
goto error_case3;
}
@@ -830,11 +830,11 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
if (ret == 0)
break;
} else if (poll_events.revents & POLLERR) { /*POLLERR */
- LOGE("[%s] POLLERR\n",__func__);
+ ALOGE("[%s] POLLERR\n",__func__);
ret = MFC_RET_ENC_INIT_FAIL;
goto error_case3;
} else {
- LOGE("[%s] poll() returns 0x%x\n",__func__, poll_events.revents);
+ ALOGE("[%s] poll() returns 0x%x\n",__func__, poll_events.revents);
ret = MFC_RET_ENC_INIT_FAIL;
goto error_case3;
}
@@ -858,11 +858,11 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
ret = ioctl(pCTX->hMFC, VIDIOC_QBUF, &buf);
if (ret != 0) {
- LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE",__func__);
+ ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE",__func__);
ret = MFC_RET_ENC_INIT_FAIL;
goto error_case3;
}
- LOGV("[%s] Strm out idx %d",__func__,index);
+ ALOGV("[%s] Strm out idx %d",__func__,index);
return MFC_RET_OK;
error_case3:
@@ -887,7 +887,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPU
int i;
if (openHandle == NULL) {
- LOGE("[%s] openHandle is NULL\n",__func__);
+ ALOGE("[%s] openHandle is NULL\n",__func__);
return MFC_RET_INVALID_PARAM;
}
@@ -916,7 +916,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPU
break;
if (i == pCTX->v4l2_enc.mfc_num_src_bufs) {
- LOGV("[%s] No buffer is available.",__func__);
+ ALOGV("[%s] No buffer is available.",__func__);
return MFC_RET_ENC_GET_INBUF_FAIL;
} else {
input_info->YPhyAddr = (void*)pCTX->v4l2_enc.mfc_src_phys[i][0];
@@ -929,7 +929,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPU
pCTX->v4l2_enc.mfc_src_buf_flags[i] = BUF_ENQUEUED;
}
}
- LOGV("[%s] Input Buffer idx %d",__func__,i);
+ ALOGV("[%s] Input Buffer idx %d",__func__,i);
return MFC_RET_OK;
}
@@ -942,7 +942,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPU
int ret,i;
if (openHandle == NULL) {
- LOGE("[%s] openHandle is NULL\n",__func__);
+ ALOGE("[%s] openHandle is NULL\n",__func__);
return MFC_RET_INVALID_PARAM;
}
@@ -964,14 +964,14 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPU
MFC dqbuf() */
pCTX->v4l2_enc.beingUsedIndex++;
pCTX->v4l2_enc.beingUsedIndex %= MFC_ENC_NUM_SRC_BUFS;
- LOGV("[%s] Phy Input Buffer idx Queued %d",__func__,pCTX->v4l2_enc.beingUsedIndex);
+ ALOGV("[%s] Phy Input Buffer idx Queued %d",__func__,pCTX->v4l2_enc.beingUsedIndex);
} else {
for (i = 0; i < pCTX->v4l2_enc.mfc_num_src_bufs; i++)
if (pCTX->v4l2_enc.mfc_src_bufs[i][0] == input_info->YVirAddr)
break;
if (i == pCTX->v4l2_enc.mfc_num_src_bufs) {
- LOGE("[%s] Can not use the buffer",__func__);
+ ALOGE("[%s] Can not use the buffer",__func__);
return MFC_RET_INVALID_PARAM;
} else {
pCTX->v4l2_enc.beingUsedIndex = i;
@@ -981,7 +981,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPU
qbuf.index = pCTX->v4l2_enc.beingUsedIndex;
planes[0].bytesused = pCTX->width * pCTX->height;
planes[1].bytesused = (pCTX->width * pCTX->height) >> 1;
- LOGV("[%s] Input Buffer idx Queued %d",__func__,pCTX->v4l2_enc.beingUsedIndex);
+ ALOGV("[%s] Input Buffer idx Queued %d",__func__,pCTX->v4l2_enc.beingUsedIndex);
}
qbuf.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
@@ -990,7 +990,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPU
ret = ioctl(pCTX->hMFC, VIDIOC_QBUF, &qbuf);
if (ret != 0) {
- LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__);
+ ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__);
return MFC_RET_ENC_SET_INBUF_FAIL;
}
@@ -1005,7 +1005,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetOutBuf(void *openHandle, SSBSIP_MFC_ENC_OUT
int ret;
if (openHandle == NULL) {
- LOGE("[%s] openHandle is NULL\n",__func__);
+ ALOGE("[%s] openHandle is NULL\n",__func__);
return MFC_RET_INVALID_PARAM;
}
@@ -1022,14 +1022,14 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetOutBuf(void *openHandle, SSBSIP_MFC_ENC_OUT
ctrl.value = 0;
ret = ioctl(pCTX->hMFC, VIDIOC_G_CTRL, &ctrl);
if (ret != 0)
- LOGE("[%s] Error to do g_ctrl",__func__);
+ ALOGE("[%s] Error to do g_ctrl",__func__);
encoded_y_addr = (unsigned int)ctrl.value;
ctrl.id = V4L2_CID_CODEC_ENCODED_CHROMA_ADDR;
ctrl.value = 0;
ret = ioctl(pCTX->hMFC, VIDIOC_G_CTRL, &ctrl);
if (ret != 0)
- LOGE("[%s] Error to do g_ctrl",__func__);
+ ALOGE("[%s] Error to do g_ctrl",__func__);
encoded_c_addr = (unsigned int)ctrl.value;
output_info->headerSize = pCTX->encodedHeaderSize;
@@ -1045,7 +1045,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetOutBuf(void *openHandle, SSBSIP_MFC_ENC_OUT
SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetOutBuf(void *openHandle, void *phyOutbuf, void *virOutbuf, int outputBufferSize)
{
if (openHandle == NULL) {
- LOGE("[%s] openHandle is NULL\n",__func__);
+ ALOGE("[%s] openHandle is NULL\n",__func__);
return MFC_RET_INVALID_PARAM;
}
@@ -1068,9 +1068,9 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle)
struct pollfd poll_events;
int poll_state;
- LOGV("[%s] Enter \n",__func__);
+ ALOGV("[%s] Enter \n",__func__);
if (openHandle == NULL) {
- LOGE("[%s] openHandle is NULL\n",__func__);
+ ALOGE("[%s] openHandle is NULL\n",__func__);
return MFC_RET_INVALID_PARAM;
}
@@ -1081,7 +1081,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle)
ret = ioctl(pCTX->hMFC, VIDIOC_S_CTRL, &ctrl);
if (ret != 0) {
- LOGE("[%s] VIDIOC_S_CTRL failed, V4L2_CID_CODEC_FRAME_TAG",__func__);
+ ALOGE("[%s] VIDIOC_S_CTRL failed, V4L2_CID_CODEC_FRAME_TAG",__func__);
return MFC_RET_ENC_EXE_ERR;
}
@@ -1089,7 +1089,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle)
type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
ret = ioctl(pCTX->hMFC, VIDIOC_STREAMON, &type);
if (ret != 0) {
- LOGE("[%s] VIDIOC_STREAMON failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__);
+ ALOGE("[%s] VIDIOC_STREAMON failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__);
return MFC_RET_ENC_EXE_ERR;
}
@@ -1118,20 +1118,20 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle)
if (ret == 0)
break;
} else if (poll_events.revents & POLLERR) { /* POLLERR */
- LOGE("[%s] POLLERR\n",__func__);
+ ALOGE("[%s] POLLERR\n",__func__);
return MFC_RET_ENC_EXE_ERR;
} else {
- LOGE("[%s] poll() returns 0x%x\n",__func__, poll_events.revents);
+ ALOGE("[%s] poll() returns 0x%x\n",__func__, poll_events.revents);
return MFC_RET_ENC_EXE_ERR;
}
} else if (0 > poll_state) {
- LOGE("[%s] poll() Encoder POLL Timeout 0x%x\n",__func__, poll_events.revents);
+ ALOGE("[%s] poll() Encoder POLL Timeout 0x%x\n",__func__, poll_events.revents);
return MFC_RET_ENC_EXE_ERR;
} else { /* in the case of B frame encoding */
ctrl.id = V4L2_CID_CODEC_CHECK_STATE;
ctrl.value = 0;
ret = ioctl(pCTX->hMFC, VIDIOC_G_CTRL, &ctrl);
- LOGV("[%s] ctx state = %d\n",__func__, ctrl.value);
+ ALOGV("[%s] ctx state = %d\n",__func__, ctrl.value);
if (ctrl.value == MFCSTATE_ENC_NO_OUTPUT)
return MFC_RET_OK;
}
@@ -1140,7 +1140,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle)
if (pCTX->v4l2_enc.bRunning != 0) {
pCTX->encodedframeType = (qbuf.flags & 0x38) >> 3; /* encoded frame type */
- LOGV("[%s] encoded frame type = %d\n", __func__, pCTX->encodedframeType);
+ ALOGV("[%s] encoded frame type = %d\n", __func__, pCTX->encodedframeType);
switch (pCTX->encodedframeType) {
case 1:
@@ -1153,7 +1153,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle)
pCTX->encodedframeType = MFC_FRAME_TYPE_B_FRAME;
break;
default:
- LOGE("[%s] VIDIOC_DQBUF failed, encoded frame type is wrong",__func__);
+ ALOGE("[%s] VIDIOC_DQBUF failed, encoded frame type is wrong",__func__);
}
}
@@ -1168,7 +1168,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle)
ret = ioctl(pCTX->hMFC, VIDIOC_G_CTRL, &ctrl);
if (ret != 0) {
- LOGE("[%s] VIDIOC_G_CTRL failed, V4L2_CID_CODEC_FRAME_TAG",__func__);
+ ALOGE("[%s] VIDIOC_G_CTRL failed, V4L2_CID_CODEC_FRAME_TAG",__func__);
return MFC_RET_ENC_EXE_ERR;
}
@@ -1183,7 +1183,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle)
ret = ioctl(pCTX->hMFC, VIDIOC_QBUF, &qbuf);
if (ret != 0) {
- LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE",__func__);
+ ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE",__func__);
return MFC_RET_ENC_EXE_ERR;
}
@@ -1198,7 +1198,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle)
ret = ioctl(pCTX->hMFC, VIDIOC_DQBUF, &qbuf);
if (ret != 0) {
- LOGE("[%s] VIDIOC_DQBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__);
+ ALOGE("[%s] VIDIOC_DQBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__);
return MFC_RET_ENC_EXE_ERR;
}
}
@@ -1206,7 +1206,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle)
/* Update context stream buffer address */
pCTX->virStrmBuf = pCTX->v4l2_enc.mfc_dst_bufs[dequeued_index];
- LOGV("[%s] Strm out idx %d",__func__,dequeued_index);
+ ALOGV("[%s] Strm out idx %d",__func__,dequeued_index);
return MFC_RET_OK;
}
@@ -1219,12 +1219,12 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetConfig(void *openHandle, SSBSIP_MFC_ENC_CON
int ret;
if (openHandle == NULL) {
- LOGE("[%s] openHandle is NULL\n",__func__);
+ ALOGE("[%s] openHandle is NULL\n",__func__);
return MFC_RET_INVALID_PARAM;
}
if (value == NULL) {
- LOGE("[%s] value is NULL\n",__func__);
+ ALOGE("[%s] value is NULL\n",__func__);
return MFC_RET_INVALID_PARAM;
}
@@ -1274,13 +1274,13 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetConfig(void *openHandle, SSBSIP_MFC_ENC_CON
return MFC_RET_OK;
default:
- LOGE("[%s] conf_type(%d) is NOT supported\n",__func__, conf_type);
+ ALOGE("[%s] conf_type(%d) is NOT supported\n",__func__, conf_type);
return MFC_RET_INVALID_PARAM;
}
ret = ioctl(pCTX->hMFC, VIDIOC_S_CTRL, &ctrl);
if (ret != 0) {
- LOGE("[%s] VIDIOC_S_CTRL failed (conf_type = %d)",__func__, conf_type);
+ ALOGE("[%s] VIDIOC_S_CTRL failed (conf_type = %d)",__func__, conf_type);
return MFC_RET_ENC_SET_CONF_FAIL;
}
@@ -1294,12 +1294,12 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetConfig(void *openHandle, SSBSIP_MFC_ENC_CON
pCTX = (_MFCLIB *) openHandle;
if (openHandle == NULL) {
- LOGE("[%s] openHandle is NULL\n",__func__);
+ ALOGE("[%s] openHandle is NULL\n",__func__);
return MFC_RET_INVALID_PARAM;
}
if (value == NULL) {
- LOGE("[%s] value is NULL\n",__func__);
+ ALOGE("[%s] value is NULL\n",__func__);
return MFC_RET_INVALID_PARAM;
}
@@ -1309,7 +1309,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetConfig(void *openHandle, SSBSIP_MFC_ENC_CON
break;
default:
- LOGE("[%s] conf_type(%d) is NOT supported\n",__func__, conf_type);
+ ALOGE("[%s] conf_type(%d) is NOT supported\n",__func__, conf_type);
return MFC_RET_INVALID_PARAM;
}
diff --git a/exynos/multimedia/libstagefrighthw/Android.mk b/exynos/multimedia/libstagefrighthw/Android.mk
index ce7a5e7..242e609 100644
--- a/exynos/multimedia/libstagefrighthw/Android.mk
+++ b/exynos/multimedia/libstagefrighthw/Android.mk
@@ -7,7 +7,7 @@ LOCAL_SRC_FILES := \
LOCAL_CFLAGS += $(PV_CFLAGS_MINUS_VISIBILITY)
LOCAL_C_INCLUDES:= \
- $(TOP)/frameworks/base/include/media/stagefright/openmax \
+ $(TOP)/frameworks/native/include/media/openmax \
LOCAL_SHARED_LIBRARIES := \
libbinder \
@@ -15,7 +15,7 @@ LOCAL_SHARED_LIBRARIES := \
libcutils \
libui \
libdl \
- libsurfaceflinger_client
+ libstagefright_foundation
LOCAL_MODULE := libstagefrighthw
diff --git a/exynos/multimedia/libstagefrighthw/SEC_OMX_Plugin.cpp b/exynos/multimedia/libstagefrighthw/SEC_OMX_Plugin.cpp
index efc8691..8e57d1e 100644
--- a/exynos/multimedia/libstagefrighthw/SEC_OMX_Plugin.cpp
+++ b/exynos/multimedia/libstagefrighthw/SEC_OMX_Plugin.cpp
@@ -18,8 +18,8 @@
#include <dlfcn.h>
-#include <media/stagefright/HardwareAPI.h>
-#include <media/stagefright/MediaDebug.h>
+#include <media/hardware/HardwareAPI.h>
+#include <media/stagefright/foundation/ADebug.h>
namespace android {
diff --git a/exynos/multimedia/libstagefrighthw/SEC_OMX_Plugin.h b/exynos/multimedia/libstagefrighthw/SEC_OMX_Plugin.h
index 6df2d31..c7e0dee 100644
--- a/exynos/multimedia/libstagefrighthw/SEC_OMX_Plugin.h
+++ b/exynos/multimedia/libstagefrighthw/SEC_OMX_Plugin.h
@@ -18,7 +18,7 @@
#define SEC_OMX_PLUGIN
-#include <media/stagefright/OMXPluginBase.h>
+#include <media/hardware/OMXPluginBase.h>
namespace android {
diff --git a/exynos/multimedia/openmax/osal/Android.mk b/exynos/multimedia/openmax/osal/Android.mk
index e4ceba0..b7caa51 100644
--- a/exynos/multimedia/openmax/osal/Android.mk
+++ b/exynos/multimedia/openmax/osal/Android.mk
@@ -31,7 +31,6 @@ LOCAL_SHARED_LIBRARIES := libcutils libutils \
libui \
libhardware \
libandroid_runtime \
- libsurfaceflinger_client \
libbinder \
libmedia
diff --git a/exynos/multimedia/openmax/osal/SEC_OSAL_Android.cpp b/exynos/multimedia/openmax/osal/SEC_OSAL_Android.cpp
index bb41720..1f0231a 100644
--- a/exynos/multimedia/openmax/osal/SEC_OSAL_Android.cpp
+++ b/exynos/multimedia/openmax/osal/SEC_OSAL_Android.cpp
@@ -29,13 +29,13 @@
#include <stdio.h>
#include <stdlib.h>
-#include <ui/android_native_buffer.h>
+
#include <ui/GraphicBuffer.h>
#include <ui/GraphicBufferMapper.h>
#include <ui/Rect.h>
-#include <media/stagefright/HardwareAPI.h>
+#include <media/hardware/HardwareAPI.h>
#include <hardware/hardware.h>
-#include <media/stagefright/MetadataBufferType.h>
+#include <media/hardware/MetadataBufferType.h>
#include "SEC_OSAL_Semaphore.h"
#include "SEC_OMX_Baseport.h"
diff --git a/exynos/multimedia/utils/csc/exynos4/csc_fimc.cpp b/exynos/multimedia/utils/csc/exynos4/csc_fimc.cpp
index 7c458b2..a8e6b67 100644
--- a/exynos/multimedia/utils/csc/exynos4/csc_fimc.cpp
+++ b/exynos/multimedia/utils/csc/exynos4/csc_fimc.cpp
@@ -52,7 +52,7 @@ void *csc_fimc_open()
if (hw_converter->bHWconvert_flag == 0) {
delete hw_converter;
hw_converter = NULL;
- LOGE("%s LINE = %d HardwareConverter failed", __func__, __LINE__);
+ ALOGE("%s LINE = %d HardwareConverter failed", __func__, __LINE__);
}
return (void *)hw_converter;
diff --git a/exynos/multimedia/utils/csc/exynos5/csc_fimc.cpp b/exynos/multimedia/utils/csc/exynos5/csc_fimc.cpp
index 89d0f97..4243624 100644
--- a/exynos/multimedia/utils/csc/exynos5/csc_fimc.cpp
+++ b/exynos/multimedia/utils/csc/exynos5/csc_fimc.cpp
@@ -67,21 +67,21 @@ void *csc_fimc_open()
hdl = dlopen("libfimc.so", RTLD_NOW);
if (hdl == NULL) {
- LOGE("%s:: load libfimc.so failed", __func__);
+ ALOGE("%s:: load libfimc.so failed", __func__);
return NULL;
}
create_instance = (SecFimc *(*)())dlsym(hdl, "create_instance");
handle_fimc = (SecFimc *)create_instance();
if (handle_fimc == NULL) {
- LOGE("%s:: create handle_fimc failed", __func__);
+ ALOGE("%s:: create handle_fimc failed", __func__);
return NULL;
}
if (!handle_fimc->create(SecFimc::DEV_1, SecFimc::MODE_MULTI_BUF, 1)) {
destroy_instance = (void (*)(void *))dlsym(hdl, "destroy_instance");
destroy_instance(handle_fimc);
- LOGE("%s:: create() failed", __func__);
+ ALOGE("%s:: create() failed", __func__);
return NULL;
}
return (void *)handle_fimc;
@@ -103,13 +103,13 @@ CSC_FIMC_ERROR_CODE csc_fimc_close(void *handle)
void* hdl = NULL;
if (!handle_fimc->destroy()) {
- LOGE("%s:: destroy() failed", __func__);
+ ALOGE("%s:: destroy() failed", __func__);
return CSC_FIMC_RET_FAIL;
}
hdl = dlopen("libfimc.so", RTLD_NOW);
if (hdl == NULL) {
- LOGE("%s:: load libfimc.so failed", __func__);
+ ALOGE("%s:: load libfimc.so failed", __func__);
return CSC_FIMC_RET_FAIL;
}
@@ -172,7 +172,7 @@ CSC_FIMC_ERROR_CODE csc_fimc_convert_nv12t(
if (!handle_fimc->setSrcParams(width, height, src_crop_x, src_crop_y,
&src_crop_width, &src_crop_height,
HAL_PIXEL_FORMAT_CUSTOM_YCbCr_420_SP_TILED)) {
- LOGE("%s:: setSrcParms() failed", __func__);
+ ALOGE("%s:: setSrcParms() failed", __func__);
return CSC_FIMC_RET_FAIL;
}
@@ -180,19 +180,19 @@ CSC_FIMC_ERROR_CODE csc_fimc_convert_nv12t(
(unsigned int)src_addr[1],
(unsigned int)src_addr[1],
HAL_PIXEL_FORMAT_CUSTOM_YCbCr_420_SP_TILED)) {
- LOGE("%s:: setSrcPhyAddr() failed", __func__);
+ ALOGE("%s:: setSrcPhyAddr() failed", __func__);
return CSC_FIMC_RET_FAIL;
}
if (!handle_fimc->setRotVal(rotate_value)) {
- LOGE("%s:: setRotVal() failed", __func__);
+ ALOGE("%s:: setRotVal() failed", __func__);
return CSC_FIMC_RET_FAIL;
}
if (!handle_fimc->setDstParams(width, height, dst_crop_x, dst_crop_y,
&dst_crop_width, &dst_crop_height,
HarPixelformat)) {
- LOGE("%s:: setDstParams() failed", __func__);
+ ALOGE("%s:: setDstParams() failed", __func__);
return CSC_FIMC_RET_FAIL;
}
@@ -201,7 +201,7 @@ CSC_FIMC_ERROR_CODE csc_fimc_convert_nv12t(
if (!handle_fimc->setDstAddr((unsigned int)(dst_addr[0]),
(unsigned int)(dst_addr[1]),
(unsigned int)(dst_addr[1]))) {
- LOGE("%s:: setDstPhyAddr() failed", __func__);
+ ALOGE("%s:: setDstPhyAddr() failed", __func__);
return CSC_FIMC_RET_FAIL;
}
break;
@@ -210,14 +210,14 @@ CSC_FIMC_ERROR_CODE csc_fimc_convert_nv12t(
if (!handle_fimc->setDstAddr((unsigned int)(dst_addr[0]),
(unsigned int)(dst_addr[1]),
(unsigned int)(dst_addr[2]))) {
- LOGE("%s:: setDstPhyAddr() failed", __func__);
+ ALOGE("%s:: setDstPhyAddr() failed", __func__);
return CSC_FIMC_RET_FAIL;
}
break;
}
if (!handle_fimc->draw(0, 0)) {
- LOGE("%s:: handleOneShot() failed", __func__);
+ ALOGE("%s:: handleOneShot() failed", __func__);
return CSC_FIMC_RET_FAIL;
}