summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSejun Park <sejun79.park@samsung.com>2017-10-10 17:13:09 +0900
committerSejun Park <sejun79.park@samsung.com>2017-10-10 17:13:23 +0900
commitb55b38dba1327f13d0d496ff2886a8c6a78045f9 (patch)
tree5152eb94fa9d677075c7f8ae68c548f10dac423e
parent8e37052ccc9a7f8ffd22152d22313b420124b2bf (diff)
downloadlibomxil-e3250-v4l2-tizen_3.0.tar.gz
libomxil-e3250-v4l2-tizen_3.0.tar.bz2
libomxil-e3250-v4l2-tizen_3.0.zip
Change-Id: I6235010bd24cd04dad701d70d867a03e6393ebc3
-rwxr-xr-x[-rw-r--r--]exynos/libcsc/csc.c15
-rwxr-xr-x[-rw-r--r--]exynos/libcsc/csc_helper.c2
-rwxr-xr-xexynos/libv4l2/exynos_mc.c18
-rwxr-xr-xexynos/libv4l2/exynos_subdev.c28
-rwxr-xr-xexynos/libv4l2/exynos_v4l2.c5
-rwxr-xr-xexynos4/libcodec/video/v4l2/dec/ExynosVideoDecoder.c10
-rwxr-xr-xexynos4/libcodec/video/v4l2/enc/ExynosVideoEncoder.c7
-rwxr-xr-xexynos4/libcodec/video/v4l2/include/ExynosVideoApi.h6
-rwxr-xr-xexynos4/libswconverter/swconvertor.c19
-rwxr-xr-xopenmax/component/audio/dec/Exynos_OMX_Adec.c50
-rwxr-xr-xopenmax/component/audio/dec/mp3/Exynos_OMX_Mp3dec.c8
-rwxr-xr-xopenmax/component/common/Exynos_OMX_Basecomponent.c11
-rwxr-xr-x[-rw-r--r--]openmax/component/common/Exynos_OMX_Basecomponent.h4
-rwxr-xr-xopenmax/component/common/Exynos_OMX_Baseport.c8
-rwxr-xr-xopenmax/component/common/Exynos_OMX_Baseport.h5
-rwxr-xr-xopenmax/component/common/Exynos_OMX_Resourcemanager.c3
-rwxr-xr-x[-rw-r--r--]openmax/component/video/dec/Exynos_OMX_Vdec.c108
-rwxr-xr-x[-rw-r--r--]openmax/component/video/dec/Exynos_OMX_Vdec.h2
-rwxr-xr-x[-rw-r--r--]openmax/component/video/dec/Exynos_OMX_VdecControl.c61
-rwxr-xr-x[-rw-r--r--]openmax/component/video/dec/Exynos_OMX_VdecControl.h6
-rwxr-xr-xopenmax/component/video/dec/h264/Exynos_OMX_H264dec.c84
-rwxr-xr-xopenmax/component/video/dec/mpeg2/Exynos_OMX_Mpeg2dec.c69
-rwxr-xr-xopenmax/component/video/dec/mpeg4/Exynos_OMX_Mpeg4dec.c88
-rwxr-xr-xopenmax/component/video/dec/vc1/Exynos_OMX_Wmvdec.c87
-rwxr-xr-xopenmax/component/video/enc/Exynos_OMX_Venc.c52
-rwxr-xr-xopenmax/component/video/enc/Exynos_OMX_Venc.h2
-rwxr-xr-xopenmax/component/video/enc/Exynos_OMX_VencControl.c77
-rwxr-xr-x[-rw-r--r--]openmax/component/video/enc/Exynos_OMX_VencControl.h17
-rwxr-xr-xopenmax/component/video/enc/h264/Exynos_OMX_H264enc.c100
-rwxr-xr-x[-rw-r--r--]openmax/component/video/enc/h264/Exynos_OMX_H264enc.h7
-rwxr-xr-xopenmax/component/video/enc/mpeg4/Exynos_OMX_Mpeg4enc.c122
-rwxr-xr-x[-rw-r--r--]openmax/component/video/enc/mpeg4/Exynos_OMX_Mpeg4enc.h6
-rwxr-xr-x[-rw-r--r--]openmax/core/Exynos_OMX_Component_Register.c9
-rwxr-xr-x[-rw-r--r--]openmax/core/Exynos_OMX_Core.c11
-rwxr-xr-x[-rw-r--r--]openmax/osal/Exynos_OSAL_Event.c1
-rwxr-xr-xopenmax/osal/Exynos_OSAL_Log.h5
-rwxr-xr-x[-rw-r--r--]openmax/osal/Exynos_OSAL_Mutex.c2
-rwxr-xr-xopenmax/osal/Exynos_OSAL_Platform_Specific.c14
-rwxr-xr-xopenmax/osal/Exynos_OSAL_SharedMemory.c8
-rwxr-xr-xpackaging/libomxil-e3250-v4l2.spec4
40 files changed, 316 insertions, 825 deletions
diff --git a/exynos/libcsc/csc.c b/exynos/libcsc/csc.c
index df7a09d..a55a011 100644..100755
--- a/exynos/libcsc/csc.c
+++ b/exynos/libcsc/csc.c
@@ -34,6 +34,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#ifndef TIZEN_FEATURE_E3250 /* build env */
#include <utils/Log.h>
#include <system/graphics.h>
@@ -235,6 +236,12 @@ static CSC_ERRORCODE conv_sw_src_nv12t(
return ret;
}
+void csc_interleave_memcpy_neon(
+ unsigned char *dest,
+ unsigned char *src1,
+ unsigned char *src2,
+ unsigned int src_size);
+
/* source is YUV420P */
static CSC_ERRORCODE conv_sw_src_yuv420p(
CSC_HANDLE *handle)
@@ -422,7 +429,7 @@ static CSC_ERRORCODE csc_init_hw(
#endif
default:
ALOGE("%s:: unsupported csc_hw_type, csc use sw", __func__);
- csc_handle->csc_hw_handle == NULL;
+ csc_handle->csc_hw_handle = NULL;
break;
}
}
@@ -495,20 +502,24 @@ static CSC_ERRORCODE csc_set_buffer(
{
CSC_HANDLE *csc_handle;
CSC_ERRORCODE ret = CSC_ErrorNone;
+#ifdef ENABLE_GSCALER
void *src_addr[3] = {NULL, };
void *dst_addr[3] = {NULL, };
+#endif
if (handle == NULL)
return CSC_ErrorNotInit;
csc_handle = (CSC_HANDLE *)handle;
if (csc_handle->csc_method == CSC_METHOD_HW) {
+#ifdef ENABLE_GSCALER
src_addr[0] = csc_handle->src_buffer.planes[CSC_Y_PLANE];
src_addr[1] = csc_handle->src_buffer.planes[CSC_U_PLANE];
src_addr[2] = csc_handle->src_buffer.planes[CSC_V_PLANE];
dst_addr[0] = csc_handle->dst_buffer.planes[CSC_Y_PLANE];
dst_addr[1] = csc_handle->dst_buffer.planes[CSC_U_PLANE];
dst_addr[2] = csc_handle->dst_buffer.planes[CSC_V_PLANE];
+#endif
switch (csc_handle->csc_hw_type) {
case CSC_HW_TYPE_FIMC:
@@ -749,7 +760,6 @@ CSC_ERRORCODE csc_set_src_buffer(
{
CSC_HANDLE *csc_handle;
CSC_ERRORCODE ret = CSC_ErrorNone;
- void *addr[3] = {NULL, };
if (handle == NULL)
return CSC_ErrorNotInit;
@@ -771,7 +781,6 @@ CSC_ERRORCODE csc_set_dst_buffer(
{
CSC_HANDLE *csc_handle;
CSC_ERRORCODE ret = CSC_ErrorNone;
- void *addr[3] = {NULL, };
if (handle == NULL)
return CSC_ErrorNotInit;
diff --git a/exynos/libcsc/csc_helper.c b/exynos/libcsc/csc_helper.c
index c333fa4..142086d 100644..100755
--- a/exynos/libcsc/csc_helper.c
+++ b/exynos/libcsc/csc_helper.c
@@ -64,7 +64,7 @@ unsigned int omx_2_hal_pixel_format(
OMX_COLOR_FORMATTYPE omx_format)
{
unsigned int hal_format;
- switch (omx_format) {
+ switch ((int)omx_format) {
#ifndef TIZEN_FEATURE_E3250 /* build env */ /* useless */
case OMX_COLOR_FormatYCbYCr:
hal_format = HAL_PIXEL_FORMAT_YCbCr_422_I;
diff --git a/exynos/libv4l2/exynos_mc.c b/exynos/libv4l2/exynos_mc.c
index 66ec719..cca6cff 100755
--- a/exynos/libv4l2/exynos_mc.c
+++ b/exynos/libv4l2/exynos_mc.c
@@ -34,6 +34,7 @@
#include <errno.h>
#include <ctype.h>
#include <string.h>
+#include <unistd.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
@@ -179,11 +180,11 @@ static int __media_get_devname_sysfs(struct media_entity *entity)
char *p;
int ret;
- sprintf(sysname, "/sys/dev/char/%u:%u", entity->info.v4l.major,
+ snprintf(sysname, sizeof(sysname), "/sys/dev/char/%u:%u", entity->info.v4l.major,
entity->info.v4l.minor);
ret = readlink(sysname, target, sizeof(target));
- if (ret < 0)
+ if (ret < 0 || ret >= (int)sizeof(target))
return -errno;
target[ret] = '\0';
@@ -191,21 +192,16 @@ static int __media_get_devname_sysfs(struct media_entity *entity)
if (p == NULL)
return -EINVAL;
- sprintf(devname, "/tmp/%s", p + 1);
+ snprintf(devname, sizeof(devname), "/tmp/%s", p + 1);
ret = mknod(devname, 0666 | S_IFCHR, MKDEV(81, entity->info.v4l.minor));
- strcpy(entity->devname, devname);
+ strncpy(entity->devname, devname, sizeof(devname) - 1);
return 0;
}
static int __media_get_media_fd(const char *filename, struct media_device *media)
{
- ssize_t num;
- int media_node;
- char *ptr;
- char media_buf[6];
-
ALOGD("%s: %s", __func__, filename);
media->fd = open(filename, O_RDWR, 0);
@@ -231,6 +227,10 @@ static int __media_enum_entities(struct media_device *media)
for (id = 0, ret = 0; ; id = entity->info.id) {
size = (media->entities_count + 1) * sizeof(*media->entities);
media->entities = (struct media_entity*)realloc(media->entities, size);
+ if (media->entities == NULL) {
+ ret = -ENOMEM;
+ break;
+ }
entity = &media->entities[media->entities_count];
memset(entity, 0, sizeof(*entity));
diff --git a/exynos/libv4l2/exynos_subdev.c b/exynos/libv4l2/exynos_subdev.c
index 6c1b099..8919d2d 100755
--- a/exynos/libv4l2/exynos_subdev.c
+++ b/exynos/libv4l2/exynos_subdev.c
@@ -30,6 +30,7 @@
#include <stdio.h>
#include <stdarg.h>
#include <fcntl.h>
+#include <string.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
@@ -44,7 +45,7 @@
#include "Exynos_OSAL_Log.h"
#endif
-#define SUBDEV_MINOR_MAX 191
+#define SUBDEV_MAX 191
static int __subdev_open(const char *filename, int oflag, va_list ap)
{
@@ -79,22 +80,25 @@ int exynos_subdev_open_devname(const char *devname, int oflag, ...)
va_list ap;
FILE *stream_fd;
char filename[64], name[64];
- int minor, size, i = 0;
+ int i = 0;
do {
- if (i > (SUBDEV_MINOR_MAX - 128))
+ if (i > (SUBDEV_MAX - 128))
break;
/* video device node */
- sprintf(filename, "/dev/v4l-subdev%d", i++);
+ snprintf(filename, sizeof(filename), "/dev/v4l-subdev%d", i);
/* if the node is video device */
if ((lstat(filename, &s) == 0) && S_ISCHR(s.st_mode) &&
((int)((unsigned short)(s.st_rdev) >> 8) == 81)) {
- minor = (int)((unsigned short)(s.st_rdev & 0x3f));
- ALOGD("try node: %s, minor: %d", filename, minor);
+ ALOGD("try node: %s", filename);
/* open sysfs entry */
- sprintf(filename, "/sys/class/video4linux/v4l-subdev%d/name", minor);
+ snprintf(filename, sizeof(filename), "/sys/class/video4linux/v4l-subdev%d/name", i);
+ if (S_ISLNK(s.st_mode)) {
+ ALOGE("symbolic link detected");
+ return -1;
+ }
stream_fd = fopen(filename, "r");
if (stream_fd == NULL) {
ALOGE("failed to open sysfs entry for subdev");
@@ -102,24 +106,26 @@ int exynos_subdev_open_devname(const char *devname, int oflag, ...)
}
/* read sysfs entry for device name */
- size = (int)fgets(name, sizeof(name), stream_fd);
+ char *p = fgets(name, sizeof(name), stream_fd);
fclose(stream_fd);
/* check read size */
- if (size == 0) {
+ if (p == NULL) {
ALOGE("failed to read sysfs entry for subdev");
} else {
/* matched */
if (strncmp(name, devname, strlen(devname)) == 0) {
- ALOGI("node found for device %s: /dev/v4l-subdev%d", devname, minor);
+ ALOGI("node found for device %s: /dev/v4l-subdev%d", devname, i);
found = true;
+ break;
}
}
}
+ i++;
} while (found == false);
if (found) {
- sprintf(filename, "/dev/v4l-subdev%d", minor);
+ snprintf(filename, sizeof(filename), "/dev/v4l-subdev%d", i);
va_start(ap, oflag);
fd = __subdev_open(filename, oflag, ap);
va_end(ap);
diff --git a/exynos/libv4l2/exynos_v4l2.c b/exynos/libv4l2/exynos_v4l2.c
index e050fba..3441529 100755
--- a/exynos/libv4l2/exynos_v4l2.c
+++ b/exynos/libv4l2/exynos_v4l2.c
@@ -32,6 +32,7 @@
#include <stdarg.h>
#include <fcntl.h>
#include <string.h>
+#include <unistd.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
@@ -187,7 +188,7 @@ bool exynos_v4l2_enuminput(int fd, int index, char *input_name_buf)
}
input.index = index;
- ret = ioctl(fd, VIDIOC_ENUMINPUT, &input);
+ ret = ioctl(fd, VIDIOC_ENUMINPUT, &input, 32);
if (ret) {
ALOGE("%s: no matching index founds", __func__);
return false;
@@ -195,7 +196,7 @@ bool exynos_v4l2_enuminput(int fd, int index, char *input_name_buf)
ALOGI("Name of input channel[%d] is %s", input.index, input.name);
- strcpy(input_name_buf, (const char *)input.name);
+ strncpy(input_name_buf, (const char *)input.name, 32);
return true;
}
diff --git a/exynos4/libcodec/video/v4l2/dec/ExynosVideoDecoder.c b/exynos4/libcodec/video/v4l2/dec/ExynosVideoDecoder.c
index 31217df..24be448 100755
--- a/exynos4/libcodec/video/v4l2/dec/ExynosVideoDecoder.c
+++ b/exynos4/libcodec/video/v4l2/dec/ExynosVideoDecoder.c
@@ -107,10 +107,10 @@ static unsigned int __ColorFormatType_To_V4L2PixelFormat(ExynosVideoColorFormatT
pixelformat = V4L2_PIX_FMT_NV21M;
break;
case VIDEO_COLORFORMAT_NV12:
+#endif
default:
pixelformat = V4L2_PIX_FMT_NV12M;
break;
-#endif
}
return pixelformat;
@@ -492,7 +492,7 @@ static ExynosVideoErrorType MFC_Decoder_Get_FramePackingInfo(
struct v4l2_ext_control ext_ctrl[FRAME_PACK_SEI_INFO_NUM];
struct v4l2_ext_controls ext_ctrls;
- int seiAvailable, seiInfo, seiGridPos, i;
+ int seiAvailable, seiInfo, seiGridPos;
unsigned int seiArgmtId;
@@ -571,8 +571,6 @@ EXIT:
}
/*
-
-/*
* [Decoder Buffer OPS] Enable Cacheable (Input)
*/
static ExynosVideoErrorType MFC_Decoder_Enable_Cacheable_Inbuf(void *pHandle)
@@ -1225,6 +1223,7 @@ EXIT:
return ret;
}
+#if 0
/*
* [Decoder Buffer OPS] Wait (Input)
*/
@@ -1266,6 +1265,7 @@ static ExynosVideoErrorType MFC_Decoder_Wait_Inbuf(void *pHandle)
EXIT:
return ret;
}
+#endif
static ExynosVideoErrorType MFC_Decoder_Register_Inbuf(
void *pHandle,
@@ -1742,7 +1742,7 @@ static ExynosVideoBuffer *MFC_Decoder_Dequeue_Outbuf(void *pHandle)
}
#endif
switch (buf.flags & (0x7 << 3)) {
- ALOGV("%s: frameType: %d", __func__, buf.flags & (0x7 << 3));
+
case V4L2_BUF_FLAG_KEYFRAME:
pOutbuf->frameType = VIDEO_FRAME_I;
break;
diff --git a/exynos4/libcodec/video/v4l2/enc/ExynosVideoEncoder.c b/exynos4/libcodec/video/v4l2/enc/ExynosVideoEncoder.c
index a3b1a74..2851560 100755
--- a/exynos4/libcodec/video/v4l2/enc/ExynosVideoEncoder.c
+++ b/exynos4/libcodec/video/v4l2/enc/ExynosVideoEncoder.c
@@ -701,7 +701,6 @@ EXIT:
static int MFC_Encoder_Get_FrameTag(void *pHandle)
{
ExynosVideoEncContext *pCtx = (ExynosVideoEncContext *)pHandle;
- ExynosVideoErrorType ret = VIDEO_ERROR_NONE;
int frameTag = -1;
@@ -712,7 +711,6 @@ static int MFC_Encoder_Get_FrameTag(void *pHandle)
#ifdef V4L2_CID_MPEG_MFC51_VIDEO_FRAME_TAG
if (exynos_v4l2_g_ctrl(pCtx->hEnc, V4L2_CID_MPEG_MFC51_VIDEO_FRAME_TAG, &frameTag) != 0) {
ALOGE("%s: Failed to g_ctrl", __func__);
- ret = VIDEO_ERROR_APIFAIL;
goto EXIT;
}
#endif
@@ -1556,6 +1554,7 @@ EXIT:
return ret;
}
+#if 0
/*
* [Encoder Buffer OPS] Wait (Src)
*/
@@ -1642,6 +1641,7 @@ static ExynosVideoErrorType MFC_Encoder_Wait_Outbuf(void *pHandle)
EXIT:
return ret;
}
+#endif
static ExynosVideoErrorType MFC_Encoder_Register_Inbuf(
void *pHandle,
@@ -1986,6 +1986,7 @@ EXIT:
return ret;
}
+#if 0
/*
* [Encoder Buffer OPS] Enqueue All (Output)
*/
@@ -2014,6 +2015,7 @@ static ExynosVideoErrorType MFC_Encoder_Enqueue_All_Outbuf(void *pHandle)
EXIT:
return ret;
}
+#endif
/*
* [Encoder Buffer OPS] Dequeue (Input)
@@ -2066,7 +2068,6 @@ static ExynosVideoBuffer *MFC_Encoder_Dequeue_Outbuf(void *pHandle)
struct v4l2_buffer buf;
struct v4l2_plane planes[VIDEO_ENCODER_OUTBUF_PLANES];
- int value;
if (pCtx == NULL) {
ALOGE("%s: Video context info must be supplied", __func__);
diff --git a/exynos4/libcodec/video/v4l2/include/ExynosVideoApi.h b/exynos4/libcodec/video/v4l2/include/ExynosVideoApi.h
index b89adcc..6638349 100755
--- a/exynos4/libcodec/video/v4l2/include/ExynosVideoApi.h
+++ b/exynos4/libcodec/video/v4l2/include/ExynosVideoApi.h
@@ -234,8 +234,8 @@ typedef struct _ExynosVideoDecOps {
ExynosVideoErrorType (*Enable_SliceMode)(void *pHandle);
ExynosVideoErrorType (*Enable_SEIParsing)(void *pHandle);
ExynosVideoErrorType (*Get_FramePackingInfo)(void *pHandle, ExynosVideoFramePacking *pFramepacking);
- ExynosVideoErrorType (*Set_ImmediateDisplay)(void *pHandle);
- ExynosVideoErrorType (*Enable_DecodeWait)(void *pHandle);
+ ExynosVideoErrorType (*Set_ImmediateDisplay)(void *pHandle);
+ ExynosVideoErrorType (*Enable_DecodeWait)(void *pHandle);
} ExynosVideoDecOps;
typedef struct _ExynosVideoEncOps {
@@ -247,7 +247,7 @@ typedef struct _ExynosVideoEncOps {
ExynosVideoErrorType (*Set_EncParam)(void *pHandle, ExynosVideoEncParam*encParam);
ExynosVideoErrorType (*Set_FrameTag)(void *pHandle, int frameTag);
int (*Get_FrameTag)(void *pHandle);
- ExynosVideoErrorType (*Set_FrameType)(void *pHandle, int frameType);
+ ExynosVideoErrorType (*Set_FrameType)(void *pHandle, ExynosVideoFrameType frameType);
ExynosVideoErrorType (*Set_FrameRate)(void *pHandle, int frameRate);
ExynosVideoErrorType (*Set_BitRate)(void *pHandle, int bitRate);
ExynosVideoErrorType (*Set_FrameSkip)(void *pHandle, int frameSkip);
diff --git a/exynos4/libswconverter/swconvertor.c b/exynos4/libswconverter/swconvertor.c
index 756fb13..afc8209 100755
--- a/exynos4/libswconverter/swconvertor.c
+++ b/exynos4/libswconverter/swconvertor.c
@@ -28,8 +28,10 @@
* 2012.02.01 : Create
*/
-#include "stdio.h"
-#include "stdlib.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
#include "swconverter.h"
/*
@@ -53,7 +55,7 @@
static int tile_4x2_read(int x_size, int y_size, int x_pos, int y_pos)
{
int pixel_x_m1, pixel_y_m1;
- int roundup_x, roundup_y;
+ int roundup_x;
int linear_addr0, linear_addr1, bank_addr ;
int x_addr;
int trans_addr;
@@ -62,7 +64,6 @@ static int tile_4x2_read(int x_size, int y_size, int x_pos, int y_pos)
pixel_y_m1 = y_size -1;
roundup_x = ((pixel_x_m1 >> 7) + 1);
- roundup_y = ((pixel_x_m1 >> 6) + 1);
x_addr = x_pos >> 2;
@@ -1565,9 +1566,6 @@ void csc_RGB565_to_YUV420P(
unsigned int R, G, B;
unsigned int Y, U, V;
- unsigned int offset1 = width * height;
- unsigned int offset2 = width/2 * height/2;
-
unsigned short int *pSrc = (unsigned short int *)rgb_src;
unsigned char *pDstY = (unsigned char *)y_dst;
@@ -1639,8 +1637,6 @@ void csc_RGB565_to_YUV420SP(
unsigned int R, G, B;
unsigned int Y, U, V;
- unsigned int offset = width * height;
-
unsigned short int *pSrc = (unsigned short int *)rgb_src;
unsigned char *pDstY = (unsigned char *)y_dst;
@@ -1716,9 +1712,6 @@ void csc_ARGB8888_to_YUV420P(
unsigned int R, G, B;
unsigned int Y, U, V;
- unsigned int offset1 = width * height;
- unsigned int offset2 = width/2 * height/2;
-
unsigned int *pSrc = (unsigned int *)rgb_src;
unsigned char *pDstY = (unsigned char *)y_dst;
@@ -1790,8 +1783,6 @@ void csc_ARGB8888_to_YUV420SP(
unsigned int R, G, B;
unsigned int Y, U, V;
- unsigned int offset = width * height;
-
unsigned int *pSrc = (unsigned int *)rgb_src;
unsigned char *pDstY = (unsigned char *)y_dst;
diff --git a/openmax/component/audio/dec/Exynos_OMX_Adec.c b/openmax/component/audio/dec/Exynos_OMX_Adec.c
index 734d16a..0de66dc 100755
--- a/openmax/component/audio/dec/Exynos_OMX_Adec.c
+++ b/openmax/component/audio/dec/Exynos_OMX_Adec.c
@@ -241,8 +241,6 @@ OMX_ERRORTYPE Exynos_OMX_FreeBuffer(
OMX_COMPONENTTYPE *pOMXComponent = NULL;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = NULL;
EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
- OMX_BUFFERHEADERTYPE *temp_bufferHeader = NULL;
- OMX_U8 *temp_buffer = NULL;
OMX_U32 i = 0;
FunctionIn();
@@ -318,29 +316,12 @@ EXIT:
OMX_ERRORTYPE Exynos_OMX_AllocateTunnelBuffer(EXYNOS_OMX_BASEPORT *pOMXBasePort, OMX_U32 nPortIndex)
{
- OMX_ERRORTYPE ret = OMX_ErrorNone;
- EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
- OMX_BUFFERHEADERTYPE *temp_bufferHeader = NULL;
- OMX_U8 *temp_buffer = NULL;
- OMX_U32 bufferSize = 0;
- OMX_PARAM_PORTDEFINITIONTYPE portDefinition;
-
- ret = OMX_ErrorTunnelingUnsupported;
-EXIT:
- return ret;
+ return OMX_ErrorTunnelingUnsupported;
}
OMX_ERRORTYPE Exynos_OMX_FreeTunnelBuffer(EXYNOS_OMX_BASEPORT *pOMXBasePort, OMX_U32 nPortIndex)
{
- OMX_ERRORTYPE ret = OMX_ErrorNone;
- EXYNOS_OMX_BASEPORT* pExynosPort = NULL;
- OMX_BUFFERHEADERTYPE* temp_bufferHeader = NULL;
- OMX_U8 *temp_buffer = NULL;
- OMX_U32 bufferSize = 0;
-
- ret = OMX_ErrorTunnelingUnsupported;
-EXIT:
- return ret;
+ return OMX_ErrorTunnelingUnsupported;
}
OMX_ERRORTYPE Exynos_OMX_ComponentTunnelRequest(
@@ -350,11 +331,7 @@ OMX_ERRORTYPE Exynos_OMX_ComponentTunnelRequest(
OMX_IN OMX_U32 nTunneledPort,
OMX_INOUT OMX_TUNNELSETUPTYPE *pTunnelSetup)
{
- OMX_ERRORTYPE ret = OMX_ErrorNone;
-
- ret = OMX_ErrorTunnelingUnsupported;
-EXIT:
- return ret;
+ return OMX_ErrorTunnelingUnsupported;
}
OMX_BOOL Exynos_Check_BufferProcess_State(EXYNOS_OMX_BASECOMPONENT *pExynosComponent)
@@ -419,7 +396,6 @@ OMX_ERRORTYPE Exynos_InputBufferReturn(OMX_COMPONENTTYPE *pOMXComponent)
dataBuffer->nFlags = 0;
dataBuffer->timeStamp = 0;
-EXIT:
FunctionOut();
return ret;
@@ -526,7 +502,6 @@ OMX_ERRORTYPE Exynos_OutputBufferReturn(OMX_COMPONENTTYPE *pOMXComponent)
dataBuffer->nFlags = 0;
dataBuffer->timeStamp = 0;
-EXIT:
FunctionOut();
return ret;
@@ -770,7 +745,6 @@ OMX_ERRORTYPE Exynos_OMX_BufferProcess(OMX_HANDLETYPE hComponent)
EXYNOS_OMX_DATABUFFER *outputUseBuffer = &exynosOutputPort->way.port1WayDataBuffer.dataBuffer;
EXYNOS_OMX_DATA *inputData = &exynosInputPort->processData;
EXYNOS_OMX_DATA *outputData = &exynosOutputPort->processData;
- OMX_U32 copySize = 0;
pExynosComponent->reInputData = OMX_FALSE;
@@ -824,7 +798,7 @@ OMX_ERRORTYPE Exynos_OMX_BufferProcess(OMX_HANDLETYPE hComponent)
Exynos_OSAL_MutexUnlock(outputUseBuffer->bufferMutex);
Exynos_OSAL_MutexUnlock(inputUseBuffer->bufferMutex);
- if (ret == OMX_ErrorInputDataDecodeYet)
+ if (ret == (OMX_ERRORTYPE)OMX_ErrorInputDataDecodeYet)
pExynosComponent->reInputData = OMX_TRUE;
else
pExynosComponent->reInputData = OMX_FALSE;
@@ -835,8 +809,6 @@ OMX_ERRORTYPE Exynos_OMX_BufferProcess(OMX_HANDLETYPE hComponent)
}
}
-EXIT:
-
FunctionOut();
return ret;
@@ -870,7 +842,6 @@ OMX_ERRORTYPE Exynos_OMX_FlushPort(OMX_COMPONENTTYPE *pOMXComponent, OMX_S32 por
EXYNOS_OMX_DATABUFFER *flushPortBuffer = NULL;
OMX_BUFFERHEADERTYPE *bufferHeader = NULL;
EXYNOS_OMX_MESSAGE *message = NULL;
- OMX_U32 flushNum = 0;
OMX_S32 semValue = 0;
FunctionIn();
@@ -926,7 +897,6 @@ OMX_ERRORTYPE Exynos_OMX_FlushPort(OMX_COMPONENTTYPE *pOMXComponent, OMX_S32 por
pExynosPort->processData.timeStamp = 0;
pExynosPort->processData.usedDataLen = 0;
-EXIT:
FunctionOut();
return ret;
@@ -936,10 +906,8 @@ OMX_ERRORTYPE Exynos_OMX_BufferFlush(OMX_COMPONENTTYPE *pOMXComponent, OMX_S32 n
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = NULL;
- EXYNOS_OMX_AUDIODEC_COMPONENT *pAudioDec = NULL;
EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
EXYNOS_OMX_DATABUFFER *flushPortBuffer = NULL;
- OMX_U32 i = 0, cnt = 0;
FunctionIn();
#ifdef TIZEN_FEATURE_E3250
@@ -960,7 +928,6 @@ OMX_ERRORTYPE Exynos_OMX_BufferFlush(OMX_COMPONENTTYPE *pOMXComponent, OMX_S32 n
goto EXIT;
}
pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
- pAudioDec = (EXYNOS_OMX_AUDIODEC_COMPONENT *)pExynosComponent->hComponentHandle;
Exynos_OSAL_SignalSet(pExynosComponent->pauseEvent);
@@ -1014,7 +981,6 @@ OMX_ERRORTYPE Exynos_OMX_AudioDecodeGetParameter(
OMX_ERRORTYPE ret = OMX_ErrorNone;
OMX_COMPONENTTYPE *pOMXComponent = NULL;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = NULL;
- EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
FunctionIn();
@@ -1124,7 +1090,6 @@ OMX_ERRORTYPE Exynos_OMX_AudioDecodeSetParameter(
OMX_ERRORTYPE ret = OMX_ErrorNone;
OMX_COMPONENTTYPE *pOMXComponent = NULL;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = NULL;
- EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
FunctionIn();
@@ -1159,10 +1124,8 @@ OMX_ERRORTYPE Exynos_OMX_AudioDecodeSetParameter(
{
OMX_AUDIO_PARAM_PORTFORMATTYPE *portFormat = (OMX_AUDIO_PARAM_PORTFORMATTYPE *)ComponentParameterStructure;
OMX_U32 portIndex = portFormat->nPortIndex;
- OMX_U32 index = portFormat->nIndex;
EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
OMX_PARAM_PORTDEFINITIONTYPE *portDefinition = NULL;
- OMX_U32 supportFormatNum = 0; /* supportFormatNum = N-1 */
ret = Exynos_OMX_Check_SizeVersion(portFormat, sizeof(OMX_AUDIO_PARAM_PORTFORMATTYPE));
if (ret != OMX_ErrorNone) {
@@ -1350,8 +1313,6 @@ static OMX_ERRORTYPE Exynos_OMX_BufferProcessThread(OMX_PTR threadData)
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
OMX_COMPONENTTYPE *pOMXComponent = NULL;
- EXYNOS_OMX_BASECOMPONENT *pSECComponent = NULL;
- EXYNOS_OMX_MESSAGE *message = NULL;
FunctionIn();
@@ -1364,7 +1325,6 @@ static OMX_ERRORTYPE Exynos_OMX_BufferProcessThread(OMX_PTR threadData)
if (ret != OMX_ErrorNone) {
goto EXIT;
}
- pSECComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
Exynos_OMX_BufferProcess(pOMXComponent);
Exynos_OSAL_ThreadExit(NULL);
@@ -1390,7 +1350,6 @@ OMX_ERRORTYPE Exynos_OMX_BufferProcess_Create(OMX_HANDLETYPE hComponent)
Exynos_OMX_BufferProcessThread,
pOMXComponent);
-EXIT:
FunctionOut();
return ret;
@@ -1419,7 +1378,6 @@ OMX_ERRORTYPE Exynos_OMX_BufferProcess_Terminate(OMX_HANDLETYPE hComponent)
Exynos_OSAL_ThreadTerminate(pAudioDec->hBufferProcessThread);
pAudioDec->hBufferProcessThread = NULL;
-EXIT:
FunctionOut();
return ret;
diff --git a/openmax/component/audio/dec/mp3/Exynos_OMX_Mp3dec.c b/openmax/component/audio/dec/mp3/Exynos_OMX_Mp3dec.c
index 56cc7d5..1ba3815 100755
--- a/openmax/component/audio/dec/mp3/Exynos_OMX_Mp3dec.c
+++ b/openmax/component/audio/dec/mp3/Exynos_OMX_Mp3dec.c
@@ -130,7 +130,6 @@ OMX_ERRORTYPE Exynos_SRP_Mp3Dec_GetParameter(
break;
case OMX_IndexParamStandardComponentRole:
{
- OMX_S32 codecType;
OMX_PARAM_COMPONENTROLETYPE *pComponentRole = (OMX_PARAM_COMPONENTROLETYPE *)pComponentParameterStructure;
ret = Exynos_OMX_Check_SizeVersion(pComponentRole, sizeof(OMX_PARAM_COMPONENTROLETYPE));
@@ -397,7 +396,6 @@ OMX_ERRORTYPE Exynos_SRP_Mp3Dec_ComponentRoleEnum(
OMX_ERRORTYPE ret = OMX_ErrorNone;
OMX_COMPONENTTYPE *pOMXComponent = NULL;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = NULL;
- OMX_S32 codecType;
FunctionIn();
@@ -458,7 +456,6 @@ OMX_ERRORTYPE Exynos_SRP_Mp3Dec_Init(OMX_COMPONENTTYPE *pOMXComponent)
outFile = fopen("/data/OutFile.pcm", "w+");
#endif
-EXIT:
FunctionOut();
return ret;
@@ -467,7 +464,6 @@ EXIT:
OMX_ERRORTYPE Exynos_SRP_Mp3Dec_Terminate(OMX_COMPONENTTYPE *pOMXComponent)
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
- EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
FunctionIn();
@@ -476,7 +472,6 @@ OMX_ERRORTYPE Exynos_SRP_Mp3Dec_Terminate(OMX_COMPONENTTYPE *pOMXComponent)
fclose(outFile);
#endif
-EXIT:
FunctionOut();
return ret;
@@ -678,7 +673,7 @@ OMX_ERRORTYPE Exynos_SRP_Mp3Dec_bufferProcess(OMX_COMPONENTTYPE *pOMXComponent,
ret = Exynos_SRP_Mp3_Decode_Block(pOMXComponent, pInputData, pOutputData);
if (ret != OMX_ErrorNone) {
- if (ret == OMX_ErrorInputDataDecodeYet) {
+ if (ret == (OMX_ERRORTYPE)OMX_ErrorInputDataDecodeYet) {
pOutputData->usedDataLen = 0;
pOutputData->remainDataLen = pOutputData->dataLen;
} else {
@@ -717,7 +712,6 @@ OSCL_EXPORT_REF OMX_ERRORTYPE Exynos_OMX_ComponentInit(OMX_HANDLETYPE hComponent
unsigned int outputBufferSize = 0;
unsigned int outputBufferNum = 0;
OMX_S32 returnCodec;
- int i = 0;
FunctionIn();
diff --git a/openmax/component/common/Exynos_OMX_Basecomponent.c b/openmax/component/common/Exynos_OMX_Basecomponent.c
index b440efe..4cf6289 100755
--- a/openmax/component/common/Exynos_OMX_Basecomponent.c
+++ b/openmax/component/common/Exynos_OMX_Basecomponent.c
@@ -172,7 +172,6 @@ OMX_ERRORTYPE Exynos_OMX_ComponentStateSet(OMX_COMPONENTTYPE *pOMXComponent, OMX
OMX_STATETYPE destState = messageParam;
OMX_STATETYPE currentState = pExynosComponent->currentState;
EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
- OMX_S32 countValue = 0;
unsigned int i = 0, j = 0;
int k = 0;
@@ -677,7 +676,6 @@ static OMX_ERRORTYPE Exynos_StateSet(EXYNOS_OMX_BASECOMPONENT *pExynosComponent,
static OMX_ERRORTYPE Exynos_SetPortFlush(EXYNOS_OMX_BASECOMPONENT *pExynosComponent, OMX_U32 nParam)
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
- EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
OMX_S32 portIndex = nParam;
OMX_U16 i = 0, cnt = 0, index = 0;
@@ -716,7 +714,7 @@ static OMX_ERRORTYPE Exynos_SetPortEnable(EXYNOS_OMX_BASECOMPONENT *pExynosCompo
OMX_ERRORTYPE ret = OMX_ErrorNone;
EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
OMX_S32 portIndex = nParam;
- OMX_U16 i = 0, cnt = 0;
+ OMX_U16 i = 0;
FunctionIn();
@@ -759,7 +757,7 @@ static OMX_ERRORTYPE Exynos_SetPortDisable(EXYNOS_OMX_BASECOMPONENT *pExynosComp
OMX_ERRORTYPE ret = OMX_ErrorNone;
EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
OMX_S32 portIndex = nParam;
- OMX_U16 i = 0, cnt = 0;
+ OMX_U16 i = 0;
FunctionIn();
@@ -795,10 +793,6 @@ EXIT:
static OMX_ERRORTYPE Exynos_SetMarkBuffer(EXYNOS_OMX_BASECOMPONENT *pExynosComponent, OMX_U32 nParam)
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
- EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
- OMX_U32 portIndex = nParam;
- OMX_U16 i = 0, cnt = 0;
-
if (nParam >= pExynosComponent->portParam.nPorts) {
ret = OMX_ErrorBadPortIndex;
@@ -853,7 +847,6 @@ OMX_ERRORTYPE Exynos_OMX_SendCommand(
OMX_ERRORTYPE ret = OMX_ErrorNone;
OMX_COMPONENTTYPE *pOMXComponent = NULL;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = NULL;
- EXYNOS_OMX_MESSAGE *message = NULL;
FunctionIn();
diff --git a/openmax/component/common/Exynos_OMX_Basecomponent.h b/openmax/component/common/Exynos_OMX_Basecomponent.h
index 6e889f8..5572639 100644..100755
--- a/openmax/component/common/Exynos_OMX_Basecomponent.h
+++ b/openmax/component/common/Exynos_OMX_Basecomponent.h
@@ -104,8 +104,8 @@ typedef struct _EXYNOS_OMX_BASECOMPONENT
OMX_ERRORTYPE (*exynos_AllocateTunnelBuffer)(EXYNOS_OMX_BASEPORT *pOMXBasePort, OMX_U32 nPortIndex);
OMX_ERRORTYPE (*exynos_FreeTunnelBuffer)(EXYNOS_OMX_BASEPORT *pOMXBasePort, OMX_U32 nPortIndex);
- OMX_ERRORTYPE (*exynos_BufferProcessCreate)(OMX_COMPONENTTYPE *pOMXComponent);
- OMX_ERRORTYPE (*exynos_BufferProcessTerminate)(OMX_COMPONENTTYPE *pOMXComponent);
+ OMX_ERRORTYPE (*exynos_BufferProcessCreate)(OMX_HANDLETYPE pOMXComponent);
+ OMX_ERRORTYPE (*exynos_BufferProcessTerminate)(OMX_HANDLETYPE pOMXComponent);
OMX_ERRORTYPE (*exynos_BufferFlush)(OMX_COMPONENTTYPE *pOMXComponent, OMX_S32 nPortIndex, OMX_BOOL bEvent);
} EXYNOS_OMX_BASECOMPONENT;
diff --git a/openmax/component/common/Exynos_OMX_Baseport.c b/openmax/component/common/Exynos_OMX_Baseport.c
index 552fa4d..999155c 100755
--- a/openmax/component/common/Exynos_OMX_Baseport.c
+++ b/openmax/component/common/Exynos_OMX_Baseport.c
@@ -99,9 +99,7 @@ OMX_ERRORTYPE Exynos_OMX_BufferFlushProcess(OMX_COMPONENTTYPE *pOMXComponent, OM
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = NULL;
- EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
OMX_S32 portIndex = 0;
- EXYNOS_OMX_DATABUFFER *flushPortBuffer[2] = {NULL, NULL};
OMX_U32 i = 0, cnt = 0;
FunctionIn();
@@ -155,7 +153,6 @@ OMX_ERRORTYPE Exynos_OMX_EnablePort(OMX_COMPONENTTYPE *pOMXComponent, OMX_S32 po
OMX_ERRORTYPE ret = OMX_ErrorNone;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
- OMX_U32 i = 0, cnt = 0;
FunctionIn();
#ifdef TIZEN_FEATURE_E3250
@@ -173,7 +170,6 @@ OMX_ERRORTYPE Exynos_OMX_EnablePort(OMX_COMPONENTTYPE *pOMXComponent, OMX_S32 po
ret = OMX_ErrorNone;
-EXIT:
FunctionOut();
return ret;
@@ -242,7 +238,6 @@ OMX_ERRORTYPE Exynos_OMX_DisablePort(OMX_COMPONENTTYPE *pOMXComponent, OMX_S32 p
OMX_ERRORTYPE ret = OMX_ErrorNone;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
- OMX_U32 i = 0, elemNum = 0;
EXYNOS_OMX_MESSAGE *message;
FunctionIn();
@@ -280,10 +275,8 @@ OMX_ERRORTYPE Exynos_OMX_PortDisableProcess(OMX_COMPONENTTYPE *pOMXComponent, OM
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = NULL;
- EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
OMX_S32 portIndex = 0;
OMX_U32 i = 0, cnt = 0;
- EXYNOS_OMX_DATABUFFER *flushPortBuffer[2] = {NULL, NULL};
FunctionIn();
@@ -566,7 +559,6 @@ OMX_ERRORTYPE Exynos_OMX_Port_Constructor(OMX_HANDLETYPE hComponent)
EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
EXYNOS_OMX_BASEPORT *pExynosInputPort = NULL;
EXYNOS_OMX_BASEPORT *pExynosOutputPort = NULL;
- int i = 0;
FunctionIn();
diff --git a/openmax/component/common/Exynos_OMX_Baseport.h b/openmax/component/common/Exynos_OMX_Baseport.h
index df52a3c..ee297c8 100755
--- a/openmax/component/common/Exynos_OMX_Baseport.h
+++ b/openmax/component/common/Exynos_OMX_Baseport.h
@@ -201,6 +201,9 @@ typedef struct _EXYNOS_OMX_BASEPORT
extern "C" {
#endif
+OMX_ERRORTYPE Exynos_OMX_FillThisBuffer(
+ OMX_IN OMX_HANDLETYPE hComponent,
+ OMX_IN OMX_BUFFERHEADERTYPE *pBuffer);
OMX_ERRORTYPE Exynos_OMX_PortEnableProcess(OMX_COMPONENTTYPE *pOMXComponent, OMX_S32 nPortIndex);
OMX_ERRORTYPE Exynos_OMX_PortDisableProcess(OMX_COMPONENTTYPE *pOMXComponent, OMX_S32 nPortIndex);
OMX_ERRORTYPE Exynos_OMX_BufferFlushProcess(OMX_COMPONENTTYPE *pOMXComponent, OMX_S32 nPortIndex, OMX_BOOL bEvent);
@@ -210,6 +213,8 @@ OMX_ERRORTYPE Exynos_ResetDataBuffer(EXYNOS_OMX_DATABUFFER *pDataBuffer);
OMX_ERRORTYPE Exynos_ResetCodecData(EXYNOS_OMX_DATA *pData);
OMX_ERRORTYPE Exynos_Shared_BufferToData(EXYNOS_OMX_DATABUFFER *pUseBuffer, EXYNOS_OMX_DATA *pData, EXYNOS_OMX_PLANE nPlane);
OMX_ERRORTYPE Exynos_Shared_DataToBuffer(EXYNOS_OMX_DATA *pData, EXYNOS_OMX_DATABUFFER *pUseBuffer);
+OMX_ERRORTYPE Exynos_OMX_InputBufferReturn(OMX_COMPONENTTYPE *pOMXComponent, OMX_BUFFERHEADERTYPE* bufferHeader);
+OMX_ERRORTYPE Exynos_OMX_OutputBufferReturn(OMX_COMPONENTTYPE *pOMXComponent, OMX_BUFFERHEADERTYPE* bufferHeader);
#ifdef __cplusplus
};
diff --git a/openmax/component/common/Exynos_OMX_Resourcemanager.c b/openmax/component/common/Exynos_OMX_Resourcemanager.c
index 7c3aa37..279a436 100755
--- a/openmax/component/common/Exynos_OMX_Resourcemanager.c
+++ b/openmax/component/common/Exynos_OMX_Resourcemanager.c
@@ -163,7 +163,6 @@ int searchLowPriority(EXYNOS_OMX_RM_COMPONENT_LIST *RMComp_list, OMX_U32 inComp_
else
ret = 1;
-EXIT:
return ret;
}
@@ -258,7 +257,7 @@ OMX_ERRORTYPE Exynos_OMX_ResourceManager_Deinit()
ghVideoRMComponentListMutex = NULL;
ret = OMX_ErrorNone;
-EXIT:
+
FunctionOut();
return ret;
diff --git a/openmax/component/video/dec/Exynos_OMX_Vdec.c b/openmax/component/video/dec/Exynos_OMX_Vdec.c
index d426153..e42b4c5 100644..100755
--- a/openmax/component/video/dec/Exynos_OMX_Vdec.c
+++ b/openmax/component/video/dec/Exynos_OMX_Vdec.c
@@ -35,10 +35,12 @@
#include "Exynos_OMX_Vdec.h"
#include "Exynos_OMX_VdecControl.h"
#include "Exynos_OMX_Basecomponent.h"
+#include "Exynos_OMX_Baseport.h"
#include "Exynos_OSAL_Thread.h"
#include "Exynos_OSAL_Semaphore.h"
#include "Exynos_OSAL_Mutex.h"
#include "Exynos_OSAL_ETC.h"
+#include "Exynos_OSAL_SharedMemory.h"
#ifdef USE_PB
#include "Exynos_OSAL_Platform_Specific.h"
@@ -104,7 +106,7 @@ void Exynos_UpdateFrameSize(OMX_COMPONENTTYPE *pOMXComponent)
height = exynosOutputPort->portDefinition.format.video.nSliceHeight =
exynosInputPort->portDefinition.format.video.nSliceHeight;
- switch(exynosOutputPort->portDefinition.format.video.eColorFormat) {
+ switch((int)exynosOutputPort->portDefinition.format.video.eColorFormat) {
case OMX_COLOR_FormatYUV420Planar:
case OMX_COLOR_FormatYUV420SemiPlanar:
if (width && height)
@@ -173,7 +175,6 @@ OMX_BOOL Exynos_Check_BufferProcess_State(EXYNOS_OMX_BASECOMPONENT *pExynosCompo
OMX_ERRORTYPE Exynos_Input_CodecBufferToData(EXYNOS_OMX_BASECOMPONENT *pExynosComponent, OMX_PTR codecBuffer, EXYNOS_OMX_DATA *pData)
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
- EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = (EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle;
CODEC_DEC_BUFFER *pInputCodecBuffer = (CODEC_DEC_BUFFER *)codecBuffer;
pData->buffer.singlePlaneBuffer.dataBuffer = pInputCodecBuffer->pVirAddr[0];
@@ -217,8 +218,6 @@ OMX_ERRORTYPE Exynos_Output_CodecBufferToData(EXYNOS_OMX_BASECOMPONENT *pExynosC
void Exynos_Wait_ProcessPause(EXYNOS_OMX_BASECOMPONENT *pExynosComponent, OMX_U32 nPortIndex)
{
- EXYNOS_OMX_BASEPORT *exynosOMXInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
- EXYNOS_OMX_BASEPORT *exynosOMXOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
EXYNOS_OMX_BASEPORT *exynosOMXPort = NULL;
FunctionIn();
@@ -249,32 +248,36 @@ OMX_BOOL Exynos_CSC_OutputData(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_DATA
EXYNOS_OMX_BASEPORT *exynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
EXYNOS_OMX_DATABUFFER *outputUseBuffer = &exynosOutputPort->way.port2WayDataBuffer.outputDataBuffer;
- OMX_U32 copySize = 0;
DECODE_CODEC_EXTRA_BUFFERINFO *pBufferInfo = NULL;
#ifdef TIZEN_FEATURE_E3250
MMVideoBuffer *pSlpOutBuf = NULL;
-#endif
+#endif //TIZEN_FEATURE_E3250
FunctionIn();
OMX_U32 width = 0, height = 0;
+
+#ifndef TIZEN_FEATURE_E3250
int imageSize = 0;
OMX_COLOR_FORMATTYPE colorFormat;
+#endif
void *pOutputBuf = (void *)outputUseBuffer->bufferHeader->pBuffer;
+#ifndef TIZEN_FEATURE_E3250
void *pSrcBuf[MAX_BUFFER_PLANE] = {NULL, };
void *pYUVBuf[MAX_BUFFER_PLANE] = {NULL, };
CSC_ERRORCODE cscRet = CSC_ErrorNone;
- CSC_METHOD csc_method = CSC_METHOD_SW;
- unsigned int cacheable = 1;
+#endif
pBufferInfo = (DECODE_CODEC_EXTRA_BUFFERINFO *)dstOutputData->extInfo;
width = pBufferInfo->imageWidth;
height = pBufferInfo->imageHeight;
+#ifndef TIZEN_FEATURE_E3250
imageSize = width * height;
colorFormat = pBufferInfo->ColorFormat;
+#endif
#ifdef TIZEN_FEATURE_E3250
pSlpOutBuf = (MMVideoBuffer *)pOutputBuf;
@@ -313,8 +316,7 @@ OMX_BOOL Exynos_CSC_OutputData(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_DATA
pSlpOutBuf->handle.dmabuf_fd[2]);
ret = OMX_TRUE;
- goto EXIT;
-#endif
+#else //TIZEN_FEATURE_E3250
pSrcBuf[0] = dstOutputData->buffer.multiPlaneBuffer.dataBuffer[0];
pSrcBuf[1] = dstOutputData->buffer.multiPlaneBuffer.dataBuffer[1];
@@ -324,14 +326,15 @@ OMX_BOOL Exynos_CSC_OutputData(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_DATA
pYUVBuf[1] = (unsigned char *)pOutputBuf + imageSize;
pYUVBuf[2] = (unsigned char *)pOutputBuf + imageSize + imageSize / 4;
- csc_get_method(pVideoDec->csc_handle, &csc_method);
#ifdef USE_DMA_BUF
+ CSC_METHOD csc_method = CSC_METHOD_SW;
+ csc_get_method(pVideoDec->csc_handle, &csc_method);
if (csc_method == CSC_METHOD_HW) {
- pSrcBuf[0] = dstOutputData->buffer.multiPlaneBuffer.fd[0];
- pSrcBuf[1] = dstOutputData->buffer.multiPlaneBuffer.fd[1];
- pSrcBuf[2] = dstOutputData->buffer.multiPlaneBuffer.fd[2];
+ pSrcBuf[0] = (unsigned char *)(&dstOutputData->buffer.multiPlaneBuffer.fd[0]);
+ pSrcBuf[1] = (unsigned char *)(&dstOutputData->buffer.multiPlaneBuffer.fd[1]);
+ pSrcBuf[2] = (unsigned char *)(&dstOutputData->buffer.multiPlaneBuffer.fd[2]);
}
-#endif
+#endif //USE_DMA_BUF
#ifdef USE_PB
if (exynosOutputPort->bIsPBEnabled == OMX_TRUE) {
@@ -350,18 +353,19 @@ OMX_BOOL Exynos_CSC_OutputData(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_DATA
pYUVBuf[1] = (unsigned char *)planes[1].fd;
pYUVBuf[2] = (unsigned char *)planes[2].fd;
}
-#endif
+#endif //USE_DMA_BUF
}
-#endif
+#endif //USE_PB
#ifdef USE_DMA_BUF
if ((exynosOutputPort->bIsPBEnabled == OMX_FALSE) &&
(csc_method == CSC_METHOD_HW)) {
- pYUVBuf[0] = Exynos_OSAL_SharedMemory_VirtToION(pVideoDec->hSharedMemory, pOutputBuf);
+ pYUVBuf[0] = Exynos_OSAL_SharedMemory_VirtToION(pVideoDec->hSharedMemory, (OMX_PTR)pOutputBuf);
pYUVBuf[1] = NULL;
pYUVBuf[2] = NULL;
}
-#endif
+#endif //USE_DMA_BUF
+ unsigned int cacheable = 1;
if (pVideoDec->csc_set_format == OMX_FALSE) {
csc_set_src_format(
pVideoDec->csc_handle, /* handle */
@@ -402,18 +406,18 @@ OMX_BOOL Exynos_CSC_OutputData(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_DATA
ret = OMX_FALSE;
else
ret = OMX_TRUE;
-
+#endif //TIZEN_FEATURE_E3250
#ifdef USE_PB
if (exynosOutputPort->bIsPBEnabled == OMX_TRUE) {
#ifdef TIZEN_FEATURE_E3250
Exynos_OSAL_UnlockPB(pOutputBuf, dstOutputData, exynosOutputPort, exynosInputPort);
-#else
+#else //TIZEN_FEATURE_E3250
Exynos_OSAL_UnlockPB(pOutputBuf, dstOutputData);
-#endif
+#endif //TIZEN_FEATURE_E3250
}
-#endif
+#endif //USE_PB
-EXIT:
+//EXIT:
FunctionOut();
return ret;
@@ -423,7 +427,6 @@ OMX_BOOL Exynos_Preprocessor_InputData(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_
{
OMX_BOOL ret = OMX_FALSE;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
- EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = (EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle;
EXYNOS_OMX_BASEPORT *exynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
EXYNOS_OMX_DATABUFFER *inputUseBuffer = &exynosInputPort->way.port2WayDataBuffer.inputDataBuffer;
OMX_U32 copySize = 0;
@@ -445,6 +448,7 @@ OMX_BOOL Exynos_Preprocessor_InputData(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_
Exynos_Shared_BufferToData(inputUseBuffer, srcInputData, ONE_PLANE);
#ifndef TIZEN_FEATURE_E3250
+ EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = (EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle;
if (pVideoDec->bDRMPlayerMode == OMX_TRUE) {
OMX_PTR dataBuffer = NULL;
@@ -526,12 +530,10 @@ OMX_BOOL Exynos_Postprocess_OutputData(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_
{
OMX_BOOL ret = OMX_FALSE;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
- EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = (EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle;
EXYNOS_OMX_BASEPORT *exynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
- EXYNOS_OMX_BASEPORT *exynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
+ EXYNOS_OMX_BASEPORT *exynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
EXYNOS_OMX_DATABUFFER *outputUseBuffer = &exynosOutputPort->way.port2WayDataBuffer.outputDataBuffer;
OMX_U32 copySize = 0;
- DECODE_CODEC_EXTRA_BUFFERINFO *pBufferInfo = NULL;
FunctionIn();
@@ -570,7 +572,7 @@ OMX_BOOL Exynos_Postprocess_OutputData(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_
pExynosComponent->checkTimeStamp.nStartFlags = 0x0;
pExynosComponent->checkTimeStamp.needSetStartTimeStamp = OMX_FALSE;
pExynosComponent->checkTimeStamp.needCheckStartTimeStamp = OMX_FALSE;
- pExynosComponent->checkTimeStamp.bImmediateDisplay = OMX_FALSE;
+ pExynosComponent->checkTimeStamp.bImmediateDisplay = OMX_FALSE;
} else {
Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "drop frame after seeking", pExynosComponent);
if (exynosOutputPort->bufferProcessType & BUFFER_SHARE)
@@ -585,15 +587,7 @@ OMX_BOOL Exynos_Postprocess_OutputData(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_
}
if (exynosOutputPort->bufferProcessType & BUFFER_COPY) {
- OMX_U32 width = 0, height = 0;
- int imageSize = 0;
- void *pOutputBuf = (void *)outputUseBuffer->bufferHeader->pBuffer;
-
- pBufferInfo = (DECODE_CODEC_EXTRA_BUFFERINFO *)dstOutputData->extInfo;
-
- width = pBufferInfo->imageWidth;
- height = pBufferInfo->imageHeight;
- imageSize = width * height;
+ //void *pOutputBuf = (void *)outputUseBuffer->bufferHeader->pBuffer;
if ((dstOutputData->remainDataLen <= (outputUseBuffer->allocSize - outputUseBuffer->dataLen)) &&
(!CHECK_PORT_BEING_FLUSHED(exynosOutputPort))) {
@@ -685,7 +679,6 @@ OMX_ERRORTYPE Exynos_OMX_SrcInputBufferProcess(OMX_HANDLETYPE hComponent)
EXYNOS_OMX_DATABUFFER *srcInputUseBuffer = &exynosInputPort->way.port2WayDataBuffer.inputDataBuffer;
EXYNOS_OMX_DATA *pSrcInputData = &exynosInputPort->processData;
OMX_BOOL bCheckInputData = OMX_FALSE;
- OMX_BOOL bValidCodecData = OMX_FALSE;
OMX_BOOL bCodecConfigured = OMX_FALSE;
FunctionIn();
@@ -699,13 +692,13 @@ OMX_ERRORTYPE Exynos_OMX_SrcInputBufferProcess(OMX_HANDLETYPE hComponent)
Exynos_OSAL_SleepMillisec(0);
if ((CHECK_PORT_BEING_FLUSHED(exynosInputPort)) ||
- ((exynosOutputPort->exceptionFlag == NEED_PORT_DISABLE) && (ret == OMX_ErrorInputDataDecodeYet)))
+ ((exynosOutputPort->exceptionFlag == NEED_PORT_DISABLE) && (ret == (OMX_ERRORTYPE)OMX_ErrorInputDataDecodeYet)))
break;
if (exynosInputPort->portState != OMX_StateIdle)
break;
Exynos_OSAL_MutexLock(srcInputUseBuffer->bufferMutex);
- if (ret != OMX_ErrorInputDataDecodeYet) {
+ if (ret != (OMX_ERRORTYPE)OMX_ErrorInputDataDecodeYet) {
if (exynosInputPort->bufferProcessType & BUFFER_COPY) {
OMX_PTR codecBuffer;
@@ -751,7 +744,7 @@ OMX_ERRORTYPE Exynos_OMX_SrcInputBufferProcess(OMX_HANDLETYPE hComponent)
ret = pVideoDec->exynos_codec_srcInputProcess(pOMXComponent, pSrcInputData);
- if (ret == OMX_ErrorCorruptedFrame) {
+ if (ret == (OMX_ERRORTYPE)OMX_ErrorCorruptedFrame) {
if (exynosInputPort->bufferProcessType & BUFFER_COPY) {
OMX_PTR codecBuffer;
codecBuffer = pSrcInputData->pPrivate;
@@ -764,17 +757,15 @@ OMX_ERRORTYPE Exynos_OMX_SrcInputBufferProcess(OMX_HANDLETYPE hComponent)
}
}
- if (ret != OMX_ErrorInputDataDecodeYet) {
+ if (ret != (OMX_ERRORTYPE)OMX_ErrorInputDataDecodeYet) {
Exynos_ResetCodecData(pSrcInputData);
}
Exynos_OSAL_MutexUnlock(srcInputUseBuffer->bufferMutex);
- if (ret == OMX_ErrorCodecInit)
+ if (ret == (OMX_ERRORTYPE)OMX_ErrorCodecInit)
pVideoDec->bExitBufferProcessThread = OMX_TRUE;
}
}
-EXIT:
-
FunctionOut();
return ret;
@@ -825,8 +816,6 @@ OMX_ERRORTYPE Exynos_OMX_SrcOutputBufferProcess(OMX_HANDLETYPE hComponent)
}
}
-EXIT:
-
FunctionOut();
return ret;
@@ -858,7 +847,7 @@ OMX_ERRORTYPE Exynos_OMX_DstInputBufferProcess(OMX_HANDLETYPE hComponent)
break;
Exynos_OSAL_MutexLock(dstInputUseBuffer->bufferMutex);
- if (ret != OMX_ErrorOutputBufferUseYet) {
+ if (ret != (OMX_ERRORTYPE)OMX_ErrorOutputBufferUseYet) {
if (exynosOutputPort->bufferProcessType & BUFFER_COPY) {
OMX_PTR codecBuffer;
ret = Exynos_CodecBufferDeQueue(pExynosComponent, OUTPUT_PORT_INDEX, &codecBuffer);
@@ -900,15 +889,13 @@ OMX_ERRORTYPE Exynos_OMX_DstInputBufferProcess(OMX_HANDLETYPE hComponent)
}
ret = pVideoDec->exynos_codec_dstInputProcess(pOMXComponent, &dstInputData);
- if (ret != OMX_ErrorOutputBufferUseYet) {
+ if (ret != (OMX_ERRORTYPE)OMX_ErrorOutputBufferUseYet) {
Exynos_ResetCodecData(&dstInputData);
}
Exynos_OSAL_MutexUnlock(dstInputUseBuffer->bufferMutex);
}
}
-EXIT:
-
FunctionOut();
return ret;
@@ -973,8 +960,6 @@ OMX_ERRORTYPE Exynos_OMX_DstOutputBufferProcess(OMX_HANDLETYPE hComponent)
}
}
-EXIT:
-
FunctionOut();
return ret;
@@ -984,8 +969,6 @@ static OMX_ERRORTYPE Exynos_OMX_SrcInputProcessThread(OMX_PTR threadData)
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
OMX_COMPONENTTYPE *pOMXComponent = NULL;
- EXYNOS_OMX_BASECOMPONENT *pExynosComponent = NULL;
- EXYNOS_OMX_MESSAGE *message = NULL;
FunctionIn();
@@ -998,7 +981,6 @@ static OMX_ERRORTYPE Exynos_OMX_SrcInputProcessThread(OMX_PTR threadData)
if (ret != OMX_ErrorNone) {
goto EXIT;
}
- pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
Exynos_OMX_SrcInputBufferProcess(pOMXComponent);
Exynos_OSAL_ThreadExit(NULL);
@@ -1013,8 +995,6 @@ static OMX_ERRORTYPE Exynos_OMX_SrcOutputProcessThread(OMX_PTR threadData)
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
OMX_COMPONENTTYPE *pOMXComponent = NULL;
- EXYNOS_OMX_BASECOMPONENT *pExynosComponent = NULL;
- EXYNOS_OMX_MESSAGE *message = NULL;
FunctionIn();
@@ -1027,7 +1007,6 @@ static OMX_ERRORTYPE Exynos_OMX_SrcOutputProcessThread(OMX_PTR threadData)
if (ret != OMX_ErrorNone) {
goto EXIT;
}
- pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
Exynos_OMX_SrcOutputBufferProcess(pOMXComponent);
Exynos_OSAL_ThreadExit(NULL);
@@ -1042,8 +1021,6 @@ static OMX_ERRORTYPE Exynos_OMX_DstInputProcessThread(OMX_PTR threadData)
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
OMX_COMPONENTTYPE *pOMXComponent = NULL;
- EXYNOS_OMX_BASECOMPONENT *pExynosComponent = NULL;
- EXYNOS_OMX_MESSAGE *message = NULL;
FunctionIn();
@@ -1056,7 +1033,6 @@ static OMX_ERRORTYPE Exynos_OMX_DstInputProcessThread(OMX_PTR threadData)
if (ret != OMX_ErrorNone) {
goto EXIT;
}
- pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
Exynos_OMX_DstInputBufferProcess(pOMXComponent);
Exynos_OSAL_ThreadExit(NULL);
@@ -1071,8 +1047,6 @@ static OMX_ERRORTYPE Exynos_OMX_DstOutputProcessThread(OMX_PTR threadData)
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
OMX_COMPONENTTYPE *pOMXComponent = NULL;
- EXYNOS_OMX_BASECOMPONENT *pExynosComponent = NULL;
- EXYNOS_OMX_MESSAGE *message = NULL;
FunctionIn();
@@ -1085,7 +1059,6 @@ static OMX_ERRORTYPE Exynos_OMX_DstOutputProcessThread(OMX_PTR threadData)
if (ret != OMX_ErrorNone) {
goto EXIT;
}
- pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
Exynos_OMX_DstOutputBufferProcess(pOMXComponent);
Exynos_OSAL_ThreadExit(NULL);
@@ -1123,7 +1096,6 @@ OMX_ERRORTYPE Exynos_OMX_BufferProcess_Create(OMX_HANDLETYPE hComponent)
Exynos_OMX_SrcInputProcessThread,
pOMXComponent);
-EXIT:
FunctionOut();
return ret;
@@ -1136,7 +1108,6 @@ OMX_ERRORTYPE Exynos_OMX_BufferProcess_Terminate(OMX_HANDLETYPE hComponent)
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = (EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle;
OMX_S32 countValue = 0;
- unsigned int i = 0;
FunctionIn();
@@ -1174,7 +1145,6 @@ OMX_ERRORTYPE Exynos_OMX_BufferProcess_Terminate(OMX_HANDLETYPE hComponent)
Exynos_OSAL_ThreadTerminate(pVideoDec->hDstOutputThread);
pVideoDec->hDstOutputThread = NULL;
-EXIT:
FunctionOut();
return ret;
diff --git a/openmax/component/video/dec/Exynos_OMX_Vdec.h b/openmax/component/video/dec/Exynos_OMX_Vdec.h
index 89fe484..d125bd9 100644..100755
--- a/openmax/component/video/dec/Exynos_OMX_Vdec.h
+++ b/openmax/component/video/dec/Exynos_OMX_Vdec.h
@@ -168,6 +168,8 @@ OMX_ERRORTYPE Exynos_OMX_DstOutputBufferProcess(OMX_HANDLETYPE hComponent);
OMX_ERRORTYPE Exynos_OMX_VideoDecodeComponentInit(OMX_IN OMX_HANDLETYPE hComponent);
OMX_ERRORTYPE Exynos_OMX_VideoDecodeComponentDeinit(OMX_IN OMX_HANDLETYPE hComponent);
+OMX_ERRORTYPE Exynos_OMX_BufferProcess_Create(OMX_HANDLETYPE hComponent);
+OMX_ERRORTYPE Exynos_OMX_BufferProcess_Terminate(OMX_HANDLETYPE hComponent);
#ifdef __cplusplus
}
#endif
diff --git a/openmax/component/video/dec/Exynos_OMX_VdecControl.c b/openmax/component/video/dec/Exynos_OMX_VdecControl.c
index b6db0e5..130bf11 100644..100755
--- a/openmax/component/video/dec/Exynos_OMX_VdecControl.c
+++ b/openmax/component/video/dec/Exynos_OMX_VdecControl.c
@@ -38,6 +38,7 @@
#include "Exynos_OSAL_Mutex.h"
#include "Exynos_OSAL_ETC.h"
#include "Exynos_OSAL_SharedMemory.h"
+#include "Exynos_OMX_Baseport.h"
#ifdef USE_PB
#include "Exynos_OSAL_Platform_Specific.h"
@@ -144,7 +145,7 @@ OMX_ERRORTYPE Exynos_OMX_UseBuffer(
Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "\nPlatformBuffer: buf %d pYUVBuf[0]:0x%x , pYUVBuf[1]:0x%x ",
i, pExynosPort->extendBufferHeader[i].pYUVBuf[0], pExynosPort->extendBufferHeader[i].pYUVBuf[1]);
} else if ((pVideoDec->bDRMPlayerMode == OMX_TRUE) && (nPortIndex == INPUT_PORT_INDEX)) {
- pExynosPort->extendBufferHeader[i].buf_fd[0] = pBuffer;
+ pExynosPort->extendBufferHeader[i].buf_fd[0] = (int)pBuffer;
} else if(nPortIndex == INPUT_PORT_INDEX){
MMVideoBuffer * pSlpOutBuf = (MMVideoBuffer *)pBuffer;
temp_bufferHeader->pBuffer = pSlpOutBuf->data[0];
@@ -270,7 +271,7 @@ OMX_ERRORTYPE Exynos_OMX_AllocateBuffer(
pExynosPort->bufferStateAllocate[i] = (BUFFER_STATE_ALLOCATED | HEADER_STATE_ALLOCATED);
INIT_SET_SIZE_VERSION(temp_bufferHeader, OMX_BUFFERHEADERTYPE);
if (mem_type == SECURE_MEMORY)
- temp_bufferHeader->pBuffer = temp_buffer_fd;
+ temp_bufferHeader->pBuffer = (OMX_U8 *)temp_buffer_fd;
else
temp_bufferHeader->pBuffer = temp_buffer;
temp_bufferHeader->nAllocLen = nSizeBytes;
@@ -313,8 +314,6 @@ OMX_ERRORTYPE Exynos_OMX_FreeBuffer(
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = NULL;
EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = NULL;
EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
- OMX_BUFFERHEADERTYPE *temp_bufferHeader = NULL;
- OMX_U8 *temp_buffer = NULL;
OMX_U32 i = 0;
FunctionIn();
@@ -396,29 +395,13 @@ EXIT:
OMX_ERRORTYPE Exynos_OMX_AllocateTunnelBuffer(EXYNOS_OMX_BASEPORT *pOMXBasePort, OMX_U32 nPortIndex)
{
- OMX_ERRORTYPE ret = OMX_ErrorNone;
- EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
- OMX_BUFFERHEADERTYPE *temp_bufferHeader = NULL;
- OMX_U8 *temp_buffer = NULL;
- OMX_U32 bufferSize = 0;
- OMX_PARAM_PORTDEFINITIONTYPE portDefinition;
-
- ret = OMX_ErrorTunnelingUnsupported;
-EXIT:
- return ret;
+
+ return OMX_ErrorTunnelingUnsupported;
}
OMX_ERRORTYPE Exynos_OMX_FreeTunnelBuffer(EXYNOS_OMX_BASEPORT *pOMXBasePort, OMX_U32 nPortIndex)
{
- OMX_ERRORTYPE ret = OMX_ErrorNone;
- EXYNOS_OMX_BASEPORT* pExynosPort = NULL;
- OMX_BUFFERHEADERTYPE* temp_bufferHeader = NULL;
- OMX_U8 *temp_buffer = NULL;
- OMX_U32 bufferSize = 0;
-
- ret = OMX_ErrorTunnelingUnsupported;
-EXIT:
- return ret;
+ return OMX_ErrorTunnelingUnsupported;
}
OMX_ERRORTYPE Exynos_OMX_ComponentTunnelRequest(
@@ -428,11 +411,7 @@ OMX_ERRORTYPE Exynos_OMX_ComponentTunnelRequest(
OMX_IN OMX_U32 nTunneledPort,
OMX_INOUT OMX_TUNNELSETUPTYPE *pTunnelSetup)
{
- OMX_ERRORTYPE ret = OMX_ErrorNone;
-
- ret = OMX_ErrorTunnelingUnsupported;
-EXIT:
- return ret;
+ return OMX_ErrorTunnelingUnsupported;
}
OMX_ERRORTYPE Exynos_OMX_GetFlushBuffer(EXYNOS_OMX_BASEPORT *pExynosPort, EXYNOS_OMX_DATABUFFER *pDataBuffer[])
@@ -450,7 +429,6 @@ OMX_ERRORTYPE Exynos_OMX_GetFlushBuffer(EXYNOS_OMX_BASEPORT *pExynosPort, EXYNOS
pDataBuffer[1] = &(pExynosPort->way.port2WayDataBuffer.outputDataBuffer);
}
-EXIT:
FunctionOut();
return ret;
@@ -465,7 +443,6 @@ OMX_ERRORTYPE Exynos_OMX_FlushPort(OMX_COMPONENTTYPE *pOMXComponent, OMX_S32 por
OMX_BUFFERHEADERTYPE *bufferHeader = NULL;
EXYNOS_OMX_DATABUFFER *pDataPortBuffer[2] = {NULL, NULL};
EXYNOS_OMX_MESSAGE *message = NULL;
- OMX_U32 flushNum = 0;
OMX_S32 semValue = 0;
int i = 0, maxBufferNum = 0;
FunctionIn();
@@ -548,7 +525,6 @@ OMX_ERRORTYPE Exynos_OMX_FlushPort(OMX_COMPONENTTYPE *pOMXComponent, OMX_S32 por
}
Exynos_OSAL_ResetQueue(&pExynosPort->bufferQ);
-EXIT:
FunctionOut();
return ret;
@@ -561,7 +537,7 @@ OMX_ERRORTYPE Exynos_OMX_BufferFlush(OMX_COMPONENTTYPE *pOMXComponent, OMX_S32 n
EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = NULL;
EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
EXYNOS_OMX_DATABUFFER *flushPortBuffer[2] = {NULL, NULL};
- OMX_U32 i = 0, cnt = 0;
+
FunctionIn();
#ifdef TIZEN_FEATURE_E3250
@@ -700,7 +676,6 @@ OMX_ERRORTYPE Exynos_InputBufferReturn(OMX_COMPONENTTYPE *pOMXComponent)
/* reset dataBuffer */
Exynos_ResetDataBuffer(dataBuffer);
-EXIT:
FunctionOut();
return ret;
@@ -745,7 +720,6 @@ OMX_ERRORTYPE Exynos_FlushInputBufferReturn(OMX_COMPONENTTYPE *pOMXComponent, EX
/* reset dataBuffer */
Exynos_ResetDataBuffer(dataBuffer);
-EXIT:
FunctionOut();
return ret;
@@ -856,7 +830,6 @@ OMX_ERRORTYPE Exynos_OutputBufferReturn(OMX_COMPONENTTYPE *pOMXComponent)
/* reset dataBuffer */
Exynos_ResetDataBuffer(dataBuffer);
-EXIT:
FunctionOut();
return ret;
@@ -866,7 +839,6 @@ OMX_ERRORTYPE Exynos_FlushOutputBufferReturn(OMX_COMPONENTTYPE *pOMXComponent, E
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
- EXYNOS_OMX_BASEPORT *exynosOMXOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
OMX_BUFFERHEADERTYPE *bufferHeader = NULL;
FunctionIn();
@@ -901,7 +873,6 @@ OMX_ERRORTYPE Exynos_FlushOutputBufferReturn(OMX_COMPONENTTYPE *pOMXComponent, E
/* reset dataBuffer */
Exynos_ResetDataBuffer(dataBuffer);
-EXIT:
FunctionOut();
return ret;
@@ -1043,13 +1014,13 @@ OMX_ERRORTYPE Exynos_CodecBufferDeQueue(EXYNOS_OMX_BASECOMPONENT *pExynosCompone
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
- OMX_U32 tempData;
+ void *tempData;
FunctionIn();
pExynosPort = &pExynosComponent->pExynosPort[PortIndex];
Exynos_OSAL_SemaphoreWait(pExynosPort->codecSemID);
- tempData = (OMX_U32)Exynos_OSAL_Dequeue(&pExynosPort->codecBufferQ);
+ tempData = Exynos_OSAL_Dequeue(&pExynosPort->codecBufferQ);
if (tempData == NULL) {
*data = NULL;
ret = OMX_ErrorUndefined;
@@ -1080,7 +1051,7 @@ OMX_ERRORTYPE Exynos_CodecBufferReset(EXYNOS_OMX_BASECOMPONENT *pExynosComponent
goto EXIT;
}
while (1) {
- int cnt = 0;
+ OMX_S32 cnt = 0;
Exynos_OSAL_Get_SemaphoreCount(pExynosPort->codecSemID, &cnt);
if (cnt > 0)
Exynos_OSAL_SemaphoreWait(pExynosPort->codecSemID);
@@ -1103,7 +1074,6 @@ OMX_ERRORTYPE Exynos_OMX_VideoDecodeGetParameter(
OMX_ERRORTYPE ret = OMX_ErrorNone;
OMX_COMPONENTTYPE *pOMXComponent = NULL;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = NULL;
- EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
FunctionIn();
@@ -1133,7 +1103,7 @@ OMX_ERRORTYPE Exynos_OMX_VideoDecodeGetParameter(
goto EXIT;
}
- switch (nParamIndex) {
+ switch ((int)nParamIndex) {
case OMX_IndexParamVideoInit:
{
OMX_PORT_PARAM_TYPE *portParam = (OMX_PORT_PARAM_TYPE *)ComponentParameterStructure;
@@ -1245,7 +1215,6 @@ OMX_ERRORTYPE Exynos_OMX_VideoDecodeSetParameter(
OMX_ERRORTYPE ret = OMX_ErrorNone;
OMX_COMPONENTTYPE *pOMXComponent = NULL;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = NULL;
- EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
FunctionIn();
@@ -1275,15 +1244,13 @@ OMX_ERRORTYPE Exynos_OMX_VideoDecodeSetParameter(
goto EXIT;
}
- switch (nIndex) {
+ switch ((int)nIndex) {
case OMX_IndexParamVideoPortFormat:
{
OMX_VIDEO_PARAM_PORTFORMATTYPE *portFormat = (OMX_VIDEO_PARAM_PORTFORMATTYPE *)ComponentParameterStructure;
OMX_U32 portIndex = portFormat->nPortIndex;
- OMX_U32 index = portFormat->nIndex;
EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
OMX_PARAM_PORTDEFINITIONTYPE *portDefinition = NULL;
- OMX_U32 supportFormatNum = 0;
ret = Exynos_OMX_Check_SizeVersion(portFormat, sizeof(OMX_VIDEO_PARAM_PORTFORMATTYPE));
if (ret != OMX_ErrorNone) {
@@ -1417,7 +1384,7 @@ OMX_ERRORTYPE Exynos_OMX_VideoDecodeSetConfig(
goto EXIT;
}
- switch (nIndex) {
+ switch ((EXYNOS_OMX_INDEXTYPE)nIndex) {
case OMX_IndexVendorThumbnailMode:
{
EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = (EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle;
diff --git a/openmax/component/video/dec/Exynos_OMX_VdecControl.h b/openmax/component/video/dec/Exynos_OMX_VdecControl.h
index ca12a6b..c2ecef6 100644..100755
--- a/openmax/component/video/dec/Exynos_OMX_VdecControl.h
+++ b/openmax/component/video/dec/Exynos_OMX_VdecControl.h
@@ -92,6 +92,12 @@ OMX_ERRORTYPE Exynos_OutputBufferReturn(OMX_COMPONENTTYPE *pOMXComponent);
OMX_ERRORTYPE Exynos_OMX_BufferFlush(OMX_COMPONENTTYPE *pOMXComponent, OMX_S32 nPortIndex, OMX_BOOL bEvent);
OMX_ERRORTYPE Exynos_FlushInputBufferReturn(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_DATABUFFER *dataBuffer);
OMX_ERRORTYPE Exynos_FlushOutputBufferReturn(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_DATABUFFER *dataBuffer);
+OMX_ERRORTYPE Exynos_CodecBufferReset(EXYNOS_OMX_BASECOMPONENT *pExynosComponent, OMX_U32 PortIndex);
+OMX_ERRORTYPE Exynos_CodecBufferEnQueue(EXYNOS_OMX_BASECOMPONENT *pExynosComponent, OMX_U32 PortIndex, OMX_PTR data);
+OMX_BUFFERHEADERTYPE *Exynos_OutputBufferGetQueue_Direct(EXYNOS_OMX_BASECOMPONENT *pExynosComponent);
+OMX_ERRORTYPE Exynos_OutputBufferGetQueue(EXYNOS_OMX_BASECOMPONENT *pExynosComponent);
+OMX_ERRORTYPE Exynos_CodecBufferDeQueue(EXYNOS_OMX_BASECOMPONENT *pExynosComponent, OMX_U32 PortIndex, OMX_PTR *data);
+OMX_ERRORTYPE Exynos_InputBufferGetQueue(EXYNOS_OMX_BASECOMPONENT *pExynosComponent);
#ifdef USE_PB
OMX_ERRORTYPE Exynos_Shared_PlatformBufferToData(EXYNOS_OMX_DATABUFFER *pUseBuffer, EXYNOS_OMX_DATA *pData, EXYNOS_OMX_BASEPORT *pExynosPort, EXYNOS_OMX_PLANE nPlane);
diff --git a/openmax/component/video/dec/h264/Exynos_OMX_H264dec.c b/openmax/component/video/dec/h264/Exynos_OMX_H264dec.c
index 62f2380..bf88e02 100755
--- a/openmax/component/video/dec/h264/Exynos_OMX_H264dec.c
+++ b/openmax/component/video/dec/h264/Exynos_OMX_H264dec.c
@@ -41,6 +41,7 @@
#include "ExynosVideoApi.h"
#include "Exynos_OSAL_SharedMemory.h"
#include "Exynos_OSAL_Event.h"
+#include "Exynos_OMX_VdecControl.h"
@@ -112,16 +113,13 @@ EXYNOS_OMX_VIDEO_PROFILELEVEL supportedAVCProfileLevels[] ={
static OMX_ERRORTYPE GetCodecInputPrivateData(OMX_PTR codecBuffer, void *pVirtAddr, OMX_U32 *dataSize)
{
- OMX_ERRORTYPE ret = OMX_ErrorNone;
-
-EXIT:
- return ret;
+ return OMX_ErrorNone;
}
-static OMX_ERRORTYPE GetCodecOutputPrivateData(OMX_PTR codecBuffer, void *addr[], int size[])
+static OMX_ERRORTYPE GetCodecOutputPrivateData(OMX_PTR codecBuffer, OMX_PTR addr[], OMX_U32 size[])
{
- OMX_ERRORTYPE ret = OMX_ErrorNone;
- ExynosVideoBuffer *pCodecBuffer;
+ OMX_ERRORTYPE ret = OMX_ErrorNone;
+ ExynosVideoBuffer *pCodecBuffer = NULL;
if (codecBuffer == NULL) {
ret = OMX_ErrorBadParameter;
@@ -412,7 +410,6 @@ OMX_ERRORTYPE H264CodecStart(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortInde
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
void *hMFCHandle = NULL;
- ExynosVideoDecOps *pDecOps = NULL;
ExynosVideoDecBufferOps *pInbufOps = NULL;
ExynosVideoDecBufferOps *pOutbufOps = NULL;
EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = NULL;
@@ -438,7 +435,6 @@ OMX_ERRORTYPE H264CodecStart(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortInde
}
hMFCHandle = pH264Dec->hMFCH264Handle.hMFCHandle;
- pDecOps = pH264Dec->hMFCH264Handle.pDecOps;
pInbufOps = pH264Dec->hMFCH264Handle.pInbufOps;
pOutbufOps = pH264Dec->hMFCH264Handle.pOutbufOps;
@@ -459,7 +455,6 @@ OMX_ERRORTYPE H264CodecStop(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortIndex
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
void *hMFCHandle = NULL;
- ExynosVideoDecOps *pDecOps = NULL;
ExynosVideoDecBufferOps *pInbufOps = NULL;
ExynosVideoDecBufferOps *pOutbufOps = NULL;
EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = NULL;
@@ -484,7 +479,6 @@ OMX_ERRORTYPE H264CodecStop(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortIndex
}
hMFCHandle = pH264Dec->hMFCH264Handle.hMFCHandle;
- pDecOps = pH264Dec->hMFCH264Handle.pDecOps;
pInbufOps = pH264Dec->hMFCH264Handle.pInbufOps;
pOutbufOps = pH264Dec->hMFCH264Handle.pOutbufOps;
@@ -513,7 +507,6 @@ OMX_ERRORTYPE H264CodecSrcInit(OMX_COMPONENTTYPE *pOMXComponent)
ExynosVideoDecOps *pDecOps = pH264Dec->hMFCH264Handle.pDecOps;
ExynosVideoDecBufferOps *pInbufOps = pH264Dec->hMFCH264Handle.pInbufOps;
- ExynosVideoDecBufferOps *pOutbufOps = pH264Dec->hMFCH264Handle.pOutbufOps;
ExynosVideoGeometry bufferConf;
OMX_U32 inputBufferNumber = 0;
int i, plane;
@@ -610,16 +603,20 @@ OMX_ERRORTYPE H264CodecSrcInit(OMX_COMPONENTTYPE *pOMXComponent)
/* Register input buffer */
for (i = 0; i < pExynosInputPort->portDefinition.nBufferCountActual; i++) {
ExynosVideoPlane plane;
+#if 0
if (pVideoDec->bDRMPlayerMode == OMX_TRUE) {
-#ifdef TIZEN_FEATURE_E3250
+#endif
+#ifdef TIZEN_FEATURE_E54XX
/* IL Client assigns FD value in pBuffer */
plane.addr = pExynosInputPort->extendBufferHeader[i].OMXBufferHeader->pBuffer;
#else
- plane.addr = Exynos_OSAL_SharedMemory_IONToVirt(pVideoDec->hSharedMemory, pExynosInputPort->extendBufferHeader[i].OMXBufferHeader->pBuffer);
+ plane.addr = Exynos_OSAL_SharedMemory_IONToVirt(pVideoDec->hSharedMemory, (int)pExynosInputPort->extendBufferHeader[i].OMXBufferHeader->pBuffer);
#endif
+#if 0
} else {
plane.addr = pExynosInputPort->extendBufferHeader[i].OMXBufferHeader->pBuffer;
}
+#endif
plane.allocSize = pExynosInputPort->extendBufferHeader[i].OMXBufferHeader->nAllocLen;
plane.fd = pExynosInputPort->extendBufferHeader[i].buf_fd[0];
if (pInbufOps->Register(hMFCHandle, &plane, MFC_INPUT_BUFFER_PLANE) != VIDEO_ERROR_NONE) {
@@ -640,10 +637,6 @@ EXIT:
OMX_ERRORTYPE H264CodecOutputBufferProcessRun(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortIndex)
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
- void *hMFCHandle = NULL;
- ExynosVideoDecOps *pDecOps = NULL;
- ExynosVideoDecBufferOps *pInbufOps = NULL;
- ExynosVideoDecBufferOps *pOutbufOps = NULL;
EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = NULL;
EXYNOS_H264DEC_HANDLE *pH264Dec = NULL;
@@ -665,10 +658,6 @@ OMX_ERRORTYPE H264CodecOutputBufferProcessRun(OMX_COMPONENTTYPE *pOMXComponent,
goto EXIT;
}
- hMFCHandle = pH264Dec->hMFCH264Handle.hMFCHandle;
- pDecOps = pH264Dec->hMFCH264Handle.pDecOps;
- pInbufOps = pH264Dec->hMFCH264Handle.pInbufOps;
- pOutbufOps = pH264Dec->hMFCH264Handle.pOutbufOps;
if (nPortIndex == INPUT_PORT_INDEX) {
if (pH264Dec->bSourceStart == OMX_FALSE) {
@@ -699,8 +688,6 @@ OMX_ERRORTYPE H264CodecEnQueueAllBuffer(OMX_COMPONENTTYPE *pOMXComponent, OMX_U3
EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = (EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle;
EXYNOS_H264DEC_HANDLE *pH264Dec = (EXYNOS_H264DEC_HANDLE *)((EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
void *hMFCHandle = pH264Dec->hMFCH264Handle.hMFCHandle;
- EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
- EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
int i, nOutbufs;
ExynosVideoDecOps *pDecOps = pH264Dec->hMFCH264Handle.pDecOps;
@@ -728,7 +715,6 @@ OMX_ERRORTYPE H264CodecEnQueueAllBuffer(OMX_COMPONENTTYPE *pOMXComponent, OMX_U3
pInbufOps->Clear_Queue(hMFCHandle);
} else if ((nPortIndex == OUTPUT_PORT_INDEX) &&
(pH264Dec->bDestinationStart == OMX_TRUE)) {
- OMX_U32 dataLen[MFC_OUTPUT_BUFFER_PLANE] = {0, 0};
ExynosVideoBuffer *pBuffer = NULL;
Exynos_CodecBufferReset(pExynosComponent, OUTPUT_PORT_INDEX);
@@ -797,7 +783,6 @@ EXIT:
OMX_ERRORTYPE H264CodecDstFreeCodecBuffers(
OMX_COMPONENTTYPE *pOMXComponent)
{
- OMX_ERRORTYPE ret = OMX_ErrorNone;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = (EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle;
EXYNOS_H264DEC_HANDLE *pH264Dec = (EXYNOS_H264DEC_HANDLE *)pVideoDec->hCodecHandle;
@@ -938,8 +923,6 @@ OMX_ERRORTYPE H264CodecResetupAllElement(
EXYNOS_OMX_BASEPORT *pOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
ExynosVideoDecBufferOps *pOutbufOps = pH264Dec->hMFCH264Handle.pOutbufOps;
- int i, j, nOutbufs;
-
FunctionIn();
if ((nPortIndex == INPUT_PORT_INDEX) &&
@@ -989,19 +972,15 @@ OMX_ERRORTYPE H264CodecSrcSetup(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_DAT
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
- EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = (EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle;
EXYNOS_H264DEC_HANDLE *pH264Dec = (EXYNOS_H264DEC_HANDLE *)((EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
void *hMFCHandle = pH264Dec->hMFCH264Handle.hMFCHandle;
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
- EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
OMX_U32 oneFrameSize = pSrcInputData->dataLen;
ExynosVideoDecOps *pDecOps = pH264Dec->hMFCH264Handle.pDecOps;
ExynosVideoDecBufferOps *pInbufOps = pH264Dec->hMFCH264Handle.pInbufOps;
ExynosVideoDecBufferOps *pOutbufOps = pH264Dec->hMFCH264Handle.pOutbufOps;
ExynosVideoGeometry bufferConf;
- OMX_U32 inputBufferNumber = 0;
- int i;
FunctionIn();
@@ -1082,11 +1061,9 @@ OMX_ERRORTYPE H264CodecDstSetup(OMX_COMPONENTTYPE *pOMXComponent)
EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = (EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle;
EXYNOS_H264DEC_HANDLE *pH264Dec = (EXYNOS_H264DEC_HANDLE *)pVideoDec->hCodecHandle;
void *hMFCHandle = pH264Dec->hMFCH264Handle.hMFCHandle;
- EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
ExynosVideoDecOps *pDecOps = pH264Dec->hMFCH264Handle.pDecOps;
- ExynosVideoDecBufferOps *pInbufOps = pH264Dec->hMFCH264Handle.pInbufOps;
ExynosVideoDecBufferOps *pOutbufOps = pH264Dec->hMFCH264Handle.pOutbufOps;
int i, nOutbufs;
@@ -1221,10 +1198,7 @@ OMX_ERRORTYPE H264CodecCheckResolutionChange(OMX_COMPONENTTYPE *pOMXComponent)
EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
ExynosVideoDecOps *pDecOps = pH264Dec->hMFCH264Handle.pDecOps;
- ExynosVideoDecBufferOps *pInbufOps = pH264Dec->hMFCH264Handle.pInbufOps;
ExynosVideoDecBufferOps *pOutbufOps = pH264Dec->hMFCH264Handle.pOutbufOps;
- ExynosVideoGeometry bufferConf;
- int i;
FunctionIn();
@@ -1618,7 +1592,7 @@ OMX_ERRORTYPE Exynos_H264Dec_SetParameter(
pExynosOutputPort->portDefinition.format.video.nStride = width;
pExynosOutputPort->portDefinition.format.video.nSliceHeight = height;
- switch (pExynosOutputPort->portDefinition.format.video.eColorFormat) {
+ switch ((int)pExynosOutputPort->portDefinition.format.video.eColorFormat) {
case OMX_COLOR_FormatYUV420Planar:
case OMX_COLOR_FormatYUV420SemiPlanar:
pExynosOutputPort->portDefinition.nBufferSize = (width * height * 3) / 2;
@@ -1875,7 +1849,6 @@ OMX_ERRORTYPE Exynos_H264Dec_GetExtensionIndex(
}
if (Exynos_OSAL_Strcmp(cParameterName, EXYNOS_INDEX_PARAM_ENABLE_THUMBNAIL) == 0) {
- EXYNOS_H264DEC_HANDLE *pH264Dec = (EXYNOS_H264DEC_HANDLE *)((EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
*pIndexType = OMX_IndexVendorThumbnailMode;
ret = OMX_ErrorNone;
}
@@ -1901,8 +1874,6 @@ OMX_ERRORTYPE Exynos_H264Dec_ComponentRoleEnum(
OMX_U32 nIndex)
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
- OMX_COMPONENTTYPE *pOMXComponent = NULL;
- EXYNOS_OMX_BASECOMPONENT *pExynosComponent = NULL;
FunctionIn();
@@ -1932,11 +1903,6 @@ OMX_ERRORTYPE Exynos_H264Dec_Init(OMX_COMPONENTTYPE *pOMXComponent)
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
EXYNOS_H264DEC_HANDLE *pH264Dec = (EXYNOS_H264DEC_HANDLE *)pVideoDec->hCodecHandle;
- OMX_PTR hMFCHandle = pH264Dec->hMFCH264Handle.hMFCHandle;
-
- ExynosVideoDecOps *pDecOps = NULL;
- ExynosVideoDecBufferOps *pInbufOps = NULL;
- ExynosVideoDecBufferOps *pOutbufOps = NULL;
CSC_METHOD csc_method = CSC_METHOD_SW;
int i, plane;
@@ -1954,10 +1920,6 @@ OMX_ERRORTYPE Exynos_H264Dec_Init(OMX_COMPONENTTYPE *pOMXComponent)
goto EXIT;
}
- pDecOps = pH264Dec->hMFCH264Handle.pDecOps;
- pInbufOps = pH264Dec->hMFCH264Handle.pInbufOps;
- pOutbufOps = pH264Dec->hMFCH264Handle.pOutbufOps;
-
if (pExynosInputPort->bufferProcessType & BUFFER_COPY) {
Exynos_OSAL_SemaphoreCreate(&pExynosInputPort->codecSemID);
Exynos_OSAL_QueueCreate(&pExynosInputPort->codecBufferQ, MAX_QUEUE_ELEMENTS);
@@ -2055,13 +2017,8 @@ OMX_ERRORTYPE Exynos_H264Dec_Terminate(OMX_COMPONENTTYPE *pOMXComponent)
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
EXYNOS_H264DEC_HANDLE *pH264Dec = (EXYNOS_H264DEC_HANDLE *)((EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
- OMX_PTR hMFCHandle = pH264Dec->hMFCH264Handle.hMFCHandle;
- ExynosVideoDecOps *pDecOps = pH264Dec->hMFCH264Handle.pDecOps;
- ExynosVideoDecBufferOps *pInbufOps = pH264Dec->hMFCH264Handle.pInbufOps;
- ExynosVideoDecBufferOps *pOutbufOps = pH264Dec->hMFCH264Handle.pOutbufOps;
-
- int i, plane;
+ int i;
FunctionIn();
@@ -2113,7 +2070,7 @@ OMX_ERRORTYPE Exynos_H264Dec_Terminate(OMX_COMPONENTTYPE *pOMXComponent)
}
H264CodecClose(pH264Dec);
-EXIT:
+
FunctionOut();
return ret;
@@ -2126,15 +2083,11 @@ OMX_ERRORTYPE Exynos_H264Dec_SrcIn(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_
EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = (EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle;
EXYNOS_H264DEC_HANDLE *pH264Dec = (EXYNOS_H264DEC_HANDLE *)((EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
void *hMFCHandle = pH264Dec->hMFCH264Handle.hMFCHandle;
- EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
- EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
OMX_U32 oneFrameSize = pSrcInputData->dataLen;
OMX_BOOL bInStartCode = OMX_FALSE;
ExynosVideoDecOps *pDecOps = pH264Dec->hMFCH264Handle.pDecOps;
ExynosVideoDecBufferOps *pInbufOps = pH264Dec->hMFCH264Handle.pInbufOps;
- ExynosVideoDecBufferOps *pOutbufOps = pH264Dec->hMFCH264Handle.pOutbufOps;
ExynosVideoErrorType codecReturn = VIDEO_ERROR_NONE;
- int i;
FunctionIn();
@@ -2215,7 +2168,6 @@ OMX_ERRORTYPE Exynos_H264Dec_SrcOut(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX
EXYNOS_H264DEC_HANDLE *pH264Dec = (EXYNOS_H264DEC_HANDLE *)((EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
void *hMFCHandle = pH264Dec->hMFCH264Handle.hMFCHandle;
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
- ExynosVideoDecOps *pDecOps = pH264Dec->hMFCH264Handle.pDecOps;
ExynosVideoDecBufferOps *pInbufOps = pH264Dec->hMFCH264Handle.pInbufOps;
ExynosVideoBuffer *pVideoBuffer;
@@ -2273,7 +2225,6 @@ OMX_ERRORTYPE Exynos_H264Dec_DstIn(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_
EXYNOS_H264DEC_HANDLE *pH264Dec = (EXYNOS_H264DEC_HANDLE *)((EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
void *hMFCHandle = pH264Dec->hMFCH264Handle.hMFCHandle;
EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
- ExynosVideoDecOps *pDecOps = pH264Dec->hMFCH264Handle.pDecOps;
ExynosVideoDecBufferOps *pOutbufOps = pH264Dec->hMFCH264Handle.pOutbufOps;
OMX_U32 dataLen[MFC_OUTPUT_BUFFER_PLANE] = {0,};
ExynosVideoErrorType codecReturn = VIDEO_ERROR_NONE;
@@ -2326,7 +2277,6 @@ OMX_ERRORTYPE Exynos_H264Dec_DstOut(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX
EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = (EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle;
EXYNOS_H264DEC_HANDLE *pH264Dec = (EXYNOS_H264DEC_HANDLE *)pVideoDec->hCodecHandle;
void *hMFCHandle = pH264Dec->hMFCH264Handle.hMFCHandle;
- EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
ExynosVideoDecOps *pDecOps = pH264Dec->hMFCH264Handle.pDecOps;
ExynosVideoDecBufferOps *pOutbufOps = pH264Dec->hMFCH264Handle.pOutbufOps;
@@ -2485,7 +2435,7 @@ OMX_ERRORTYPE Exynos_H264Dec_srcInputBufferProcess(OMX_COMPONENTTYPE *pOMXCompon
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
- EXYNOS_H264DEC_HANDLE *pH264Dec = (EXYNOS_H264DEC_HANDLE *)((EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
+
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
FunctionIn();
@@ -2501,8 +2451,8 @@ OMX_ERRORTYPE Exynos_H264Dec_srcInputBufferProcess(OMX_COMPONENTTYPE *pOMXCompon
ret = Exynos_H264Dec_SrcIn(pOMXComponent, pSrcInputData);
if ((ret != OMX_ErrorNone) &&
- (ret != OMX_ErrorInputDataDecodeYet) &&
- (ret != OMX_ErrorCorruptedFrame)) {
+ (ret != (OMX_ERRORTYPE)OMX_ErrorInputDataDecodeYet) &&
+ (ret != (OMX_ERRORTYPE)OMX_ErrorCorruptedFrame)) {
pExynosComponent->pCallbacks->EventHandler((OMX_HANDLETYPE)pOMXComponent,
pExynosComponent->callbackData,
OMX_EventError, ret, 0, NULL);
diff --git a/openmax/component/video/dec/mpeg2/Exynos_OMX_Mpeg2dec.c b/openmax/component/video/dec/mpeg2/Exynos_OMX_Mpeg2dec.c
index cb77ee1..4e7acf7 100755
--- a/openmax/component/video/dec/mpeg2/Exynos_OMX_Mpeg2dec.c
+++ b/openmax/component/video/dec/mpeg2/Exynos_OMX_Mpeg2dec.c
@@ -41,6 +41,7 @@
#include "ExynosVideoApi.h"
#include "Exynos_OSAL_SharedMemory.h"
#include "Exynos_OSAL_Event.h"
+#include "Exynos_OMX_VdecControl.h"
#ifdef USE_PB
#include "Exynos_OSAL_Platform_Specific.h"
@@ -62,16 +63,13 @@
static OMX_ERRORTYPE GetCodecInputPrivateData(OMX_PTR codecBuffer, void *pVirtAddr, OMX_U32 *dataSize)
{
- OMX_ERRORTYPE ret = OMX_ErrorNone;
-
-EXIT:
- return ret;
+ return OMX_ErrorNone;
}
-static OMX_ERRORTYPE GetCodecOutputPrivateData(OMX_PTR codecBuffer, void *addr[], int size[])
+static OMX_ERRORTYPE GetCodecOutputPrivateData(OMX_PTR codecBuffer, OMX_PTR addr[], OMX_U32 size[])
{
- OMX_ERRORTYPE ret = OMX_ErrorNone;
- ExynosVideoBuffer *pCodecBuffer;
+ OMX_ERRORTYPE ret = OMX_ErrorNone;
+ ExynosVideoBuffer *pCodecBuffer = NULL;
if (codecBuffer == NULL) {
ret = OMX_ErrorBadParameter;
@@ -279,7 +277,6 @@ OMX_ERRORTYPE Mpeg2CodecStart(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortInd
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
void *hMFCHandle = NULL;
- ExynosVideoDecOps *pDecOps = NULL;
ExynosVideoDecBufferOps *pInbufOps = NULL;
ExynosVideoDecBufferOps *pOutbufOps = NULL;
EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = NULL;
@@ -305,7 +302,6 @@ OMX_ERRORTYPE Mpeg2CodecStart(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortInd
}
hMFCHandle = pMpeg2Dec->hMFCMpeg2Handle.hMFCHandle;
- pDecOps = pMpeg2Dec->hMFCMpeg2Handle.pDecOps;
pInbufOps = pMpeg2Dec->hMFCMpeg2Handle.pInbufOps;
pOutbufOps = pMpeg2Dec->hMFCMpeg2Handle.pOutbufOps;
@@ -326,7 +322,6 @@ OMX_ERRORTYPE Mpeg2CodecStop(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortInde
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
void *hMFCHandle = NULL;
- ExynosVideoDecOps *pDecOps = NULL;
ExynosVideoDecBufferOps *pInbufOps = NULL;
ExynosVideoDecBufferOps *pOutbufOps = NULL;
EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = NULL;
@@ -351,7 +346,6 @@ OMX_ERRORTYPE Mpeg2CodecStop(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortInde
}
hMFCHandle = pMpeg2Dec->hMFCMpeg2Handle.hMFCHandle;
- pDecOps = pMpeg2Dec->hMFCMpeg2Handle.pDecOps;
pInbufOps = pMpeg2Dec->hMFCMpeg2Handle.pInbufOps;
pOutbufOps = pMpeg2Dec->hMFCMpeg2Handle.pOutbufOps;
@@ -371,10 +365,6 @@ EXIT:
OMX_ERRORTYPE Mpeg2CodecOutputBufferProcessRun(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortIndex)
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
- void *hMFCHandle = NULL;
- ExynosVideoDecOps *pDecOps = NULL;
- ExynosVideoDecBufferOps *pInbufOps = NULL;
- ExynosVideoDecBufferOps *pOutbufOps = NULL;
EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = NULL;
EXYNOS_MPEG2DEC_HANDLE *pMpeg2Dec = NULL;
@@ -396,11 +386,6 @@ OMX_ERRORTYPE Mpeg2CodecOutputBufferProcessRun(OMX_COMPONENTTYPE *pOMXComponent,
goto EXIT;
}
- hMFCHandle = pMpeg2Dec->hMFCMpeg2Handle.hMFCHandle;
- pDecOps = pMpeg2Dec->hMFCMpeg2Handle.pDecOps;
- pInbufOps = pMpeg2Dec->hMFCMpeg2Handle.pInbufOps;
- pOutbufOps = pMpeg2Dec->hMFCMpeg2Handle.pOutbufOps;
-
if (nPortIndex == INPUT_PORT_INDEX) {
if (pMpeg2Dec->bSourceStart == OMX_FALSE) {
Exynos_OSAL_SignalSet(pMpeg2Dec->hSourceStartEvent);
@@ -430,8 +415,6 @@ OMX_ERRORTYPE Mpeg2CodecEnQueueAllBuffer(OMX_COMPONENTTYPE *pOMXComponent, OMX_U
EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = (EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle;
EXYNOS_MPEG2DEC_HANDLE *pMpeg2Dec = (EXYNOS_MPEG2DEC_HANDLE *)((EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
void *hMFCHandle = pMpeg2Dec->hMFCMpeg2Handle.hMFCHandle;
- EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
- EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
int i, nOutbufs;
ExynosVideoDecOps *pDecOps = pMpeg2Dec->hMFCMpeg2Handle.pDecOps;
@@ -454,7 +437,6 @@ OMX_ERRORTYPE Mpeg2CodecEnQueueAllBuffer(OMX_COMPONENTTYPE *pOMXComponent, OMX_U
pInbufOps->Clear_Queue(hMFCHandle);
} else if ((nPortIndex == OUTPUT_PORT_INDEX) &&
(pMpeg2Dec->bDestinationStart == OMX_TRUE)) {
- OMX_U32 dataLen[MFC_OUTPUT_BUFFER_PLANE] = {0, 0};
ExynosVideoBuffer *pBuffer = NULL;
Exynos_CodecBufferReset(pExynosComponent, OUTPUT_PORT_INDEX);
@@ -682,11 +664,8 @@ OMX_ERRORTYPE Mpeg2CodecDstSetup(OMX_COMPONENTTYPE *pOMXComponent)
EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = (EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle;
EXYNOS_MPEG2DEC_HANDLE *pMpeg2Dec = (EXYNOS_MPEG2DEC_HANDLE *)((EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
void *hMFCHandle = pMpeg2Dec->hMFCMpeg2Handle.hMFCHandle;
- EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
- ExynosVideoDecOps *pDecOps = pMpeg2Dec->hMFCMpeg2Handle.pDecOps;
- ExynosVideoDecBufferOps *pInbufOps = pMpeg2Dec->hMFCMpeg2Handle.pInbufOps;
ExynosVideoDecBufferOps *pOutbufOps = pMpeg2Dec->hMFCMpeg2Handle.pOutbufOps;
int i, nOutbufs;
@@ -1052,7 +1031,7 @@ OMX_ERRORTYPE Exynos_Mpeg2Dec_SetParameter(
pExynosOutputPort->portDefinition.format.video.nStride = width;
pExynosOutputPort->portDefinition.format.video.nSliceHeight = height;
- switch (pExynosOutputPort->portDefinition.format.video.eColorFormat) {
+ switch ((int)pExynosOutputPort->portDefinition.format.video.eColorFormat) {
case OMX_COLOR_FormatYUV420Planar:
case OMX_COLOR_FormatYUV420SemiPlanar:
// case OMX_SEC_COLOR_FormatNV12TPhysicalAddress:
@@ -1255,7 +1234,6 @@ OMX_ERRORTYPE Exynos_Mpeg2Dec_GetExtensionIndex(
}
if (Exynos_OSAL_Strcmp(cParameterName, EXYNOS_INDEX_PARAM_ENABLE_THUMBNAIL) == 0) {
- EXYNOS_MPEG2DEC_HANDLE *pMpeg2Dec = (EXYNOS_MPEG2DEC_HANDLE *)((EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
*pIndexType = OMX_IndexVendorThumbnailMode;
ret = OMX_ErrorNone;
} else {
@@ -1274,8 +1252,6 @@ OMX_ERRORTYPE Exynos_Mpeg2Dec_ComponentRoleEnum(
OMX_U32 nIndex)
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
- OMX_COMPONENTTYPE *pOMXComponent = NULL;
- EXYNOS_OMX_BASECOMPONENT *pExynosComponent = NULL;
FunctionIn();
@@ -1305,11 +1281,8 @@ OMX_ERRORTYPE Exynos_Mpeg2Dec_Init(OMX_COMPONENTTYPE *pOMXComponent)
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
EXYNOS_MPEG2DEC_HANDLE *pMpeg2Dec = (EXYNOS_MPEG2DEC_HANDLE *)pVideoDec->hCodecHandle;
- OMX_PTR hMFCHandle = pMpeg2Dec->hMFCMpeg2Handle.hMFCHandle;
- ExynosVideoDecOps *pDecOps = NULL;
- ExynosVideoDecBufferOps *pInbufOps = NULL;
- ExynosVideoDecBufferOps *pOutbufOps = NULL;
+
CSC_METHOD csc_method = CSC_METHOD_SW;
int i, plane;
@@ -1327,10 +1300,6 @@ OMX_ERRORTYPE Exynos_Mpeg2Dec_Init(OMX_COMPONENTTYPE *pOMXComponent)
goto EXIT;
}
- pDecOps = pMpeg2Dec->hMFCMpeg2Handle.pDecOps;
- pInbufOps = pMpeg2Dec->hMFCMpeg2Handle.pInbufOps;
- pOutbufOps = pMpeg2Dec->hMFCMpeg2Handle.pOutbufOps;
-
if ((pExynosInputPort->bufferProcessType & BUFFER_COPY) == BUFFER_COPY) {
Exynos_OSAL_SemaphoreCreate(&pExynosInputPort->codecSemID);
Exynos_OSAL_QueueCreate(&pExynosInputPort->codecBufferQ, MAX_QUEUE_ELEMENTS);
@@ -1410,13 +1379,8 @@ OMX_ERRORTYPE Exynos_Mpeg2Dec_Terminate(OMX_COMPONENTTYPE *pOMXComponent)
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
EXYNOS_MPEG2DEC_HANDLE *pMpeg2Dec = (EXYNOS_MPEG2DEC_HANDLE *)((EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
- OMX_PTR hMFCHandle = pMpeg2Dec->hMFCMpeg2Handle.hMFCHandle;
- ExynosVideoDecOps *pDecOps = pMpeg2Dec->hMFCMpeg2Handle.pDecOps;
- ExynosVideoDecBufferOps *pInbufOps = pMpeg2Dec->hMFCMpeg2Handle.pInbufOps;
- ExynosVideoDecBufferOps *pOutbufOps = pMpeg2Dec->hMFCMpeg2Handle.pOutbufOps;
-
- int i, plane;
+ int i;
FunctionIn();
@@ -1479,7 +1443,6 @@ OMX_ERRORTYPE Exynos_Mpeg2Dec_Terminate(OMX_COMPONENTTYPE *pOMXComponent)
}
Mpeg2CodecClose(pMpeg2Dec);
-EXIT:
FunctionOut();
return ret;
@@ -1489,17 +1452,12 @@ OMX_ERRORTYPE Exynos_Mpeg2Dec_SrcIn(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
- EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = (EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle;
EXYNOS_MPEG2DEC_HANDLE *pMpeg2Dec = (EXYNOS_MPEG2DEC_HANDLE *)((EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
void *hMFCHandle = pMpeg2Dec->hMFCMpeg2Handle.hMFCHandle;
- EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
- EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
OMX_U32 oneFrameSize = pSrcInputData->dataLen;
ExynosVideoDecOps *pDecOps = pMpeg2Dec->hMFCMpeg2Handle.pDecOps;
ExynosVideoDecBufferOps *pInbufOps = pMpeg2Dec->hMFCMpeg2Handle.pInbufOps;
- ExynosVideoDecBufferOps *pOutbufOps = pMpeg2Dec->hMFCMpeg2Handle.pOutbufOps;
ExynosVideoErrorType codecReturn = VIDEO_ERROR_NONE;
- int i;
FunctionIn();
@@ -1558,7 +1516,6 @@ OMX_ERRORTYPE Exynos_Mpeg2Dec_SrcOut(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OM
EXYNOS_MPEG2DEC_HANDLE *pMpeg2Dec = (EXYNOS_MPEG2DEC_HANDLE *)((EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
void *hMFCHandle = pMpeg2Dec->hMFCMpeg2Handle.hMFCHandle;
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
- ExynosVideoDecOps *pDecOps = pMpeg2Dec->hMFCMpeg2Handle.pDecOps;
ExynosVideoDecBufferOps *pInbufOps = pMpeg2Dec->hMFCMpeg2Handle.pInbufOps;
ExynosVideoBuffer *pVideoBuffer;
@@ -1612,11 +1569,8 @@ OMX_ERRORTYPE Exynos_Mpeg2Dec_DstIn(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
- EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = (EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle;
EXYNOS_MPEG2DEC_HANDLE *pMpeg2Dec = (EXYNOS_MPEG2DEC_HANDLE *)((EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
void *hMFCHandle = pMpeg2Dec->hMFCMpeg2Handle.hMFCHandle;
- EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
- ExynosVideoDecOps *pDecOps = pMpeg2Dec->hMFCMpeg2Handle.pDecOps;
ExynosVideoDecBufferOps *pOutbufOps = pMpeg2Dec->hMFCMpeg2Handle.pOutbufOps;
OMX_U32 dataLen[MFC_OUTPUT_BUFFER_PLANE] = {0,};
ExynosVideoErrorType codecReturn = VIDEO_ERROR_NONE;
@@ -1655,10 +1609,10 @@ OMX_ERRORTYPE Exynos_Mpeg2Dec_DstOut(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OM
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
- EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = (EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle;
+ EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = (EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle;
EXYNOS_MPEG2DEC_HANDLE *pMpeg2Dec = (EXYNOS_MPEG2DEC_HANDLE *)((EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
void *hMFCHandle = pMpeg2Dec->hMFCMpeg2Handle.hMFCHandle;
- EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
+
EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
ExynosVideoDecOps *pDecOps = pMpeg2Dec->hMFCMpeg2Handle.pDecOps;
ExynosVideoDecBufferOps *pOutbufOps = pMpeg2Dec->hMFCMpeg2Handle.pOutbufOps;
@@ -1786,7 +1740,6 @@ OMX_ERRORTYPE Exynos_Mpeg2Dec_srcInputBufferProcess(OMX_COMPONENTTYPE *pOMXCompo
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
- EXYNOS_MPEG2DEC_HANDLE *pMpeg2Dec = (EXYNOS_MPEG2DEC_HANDLE *)((EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
FunctionIn();
@@ -1801,7 +1754,7 @@ OMX_ERRORTYPE Exynos_Mpeg2Dec_srcInputBufferProcess(OMX_COMPONENTTYPE *pOMXCompo
}
ret = Exynos_Mpeg2Dec_SrcIn(pOMXComponent, pSrcInputData);
- if ((ret != OMX_ErrorNone) && (ret != OMX_ErrorInputDataDecodeYet)) {
+ if ((ret != OMX_ErrorNone) && (ret != (OMX_ERRORTYPE)OMX_ErrorInputDataDecodeYet)) {
pExynosComponent->pCallbacks->EventHandler((OMX_HANDLETYPE)pOMXComponent,
pExynosComponent->callbackData,
OMX_EventError, ret, 0, NULL);
diff --git a/openmax/component/video/dec/mpeg4/Exynos_OMX_Mpeg4dec.c b/openmax/component/video/dec/mpeg4/Exynos_OMX_Mpeg4dec.c
index 7d99bcf..15bb2e8 100755
--- a/openmax/component/video/dec/mpeg4/Exynos_OMX_Mpeg4dec.c
+++ b/openmax/component/video/dec/mpeg4/Exynos_OMX_Mpeg4dec.c
@@ -42,6 +42,7 @@
#include "ExynosVideoApi.h"
#include "Exynos_OSAL_SharedMemory.h"
#include "Exynos_OSAL_Event.h"
+#include "Exynos_OMX_VdecControl.h"
#ifdef USE_PB
#include "Exynos_OSAL_Platform_Specific.h"
@@ -122,16 +123,13 @@ EXYNOS_OMX_VIDEO_PROFILELEVEL supportedH263ProfileLevels[] = {
static OMX_ERRORTYPE GetCodecInputPrivateData(OMX_PTR codecBuffer, void *pVirtAddr, OMX_U32 *dataSize)
{
- OMX_ERRORTYPE ret = OMX_ErrorNone;
-
-EXIT:
- return ret;
+ return OMX_ErrorNone;
}
-static OMX_ERRORTYPE GetCodecOutputPrivateData(OMX_PTR codecBuffer, void *addr[], int size[])
+static OMX_ERRORTYPE GetCodecOutputPrivateData(OMX_PTR codecBuffer, OMX_PTR addr[], OMX_U32 size[])
{
- OMX_ERRORTYPE ret = OMX_ErrorNone;
- ExynosVideoBuffer *pCodecBuffer;
+ OMX_ERRORTYPE ret = OMX_ErrorNone;
+ ExynosVideoBuffer *pCodecBuffer = NULL;
if (codecBuffer == NULL) {
ret = OMX_ErrorBadParameter;
@@ -355,7 +353,7 @@ static OMX_BOOL Check_Stream_StartCode(
}
}
-static void getAByte(char *buff, int *code)
+static void getAByte(OMX_U8 *buff, int *code)
{
int byte;
@@ -463,15 +461,11 @@ OMX_ERRORTYPE Mpeg4CodecOpen(EXYNOS_MPEG4DEC_HANDLE *pMpeg4Dec)
}
/* alloc context, open, querycap */
- if (pMpeg4Dec->hMFCMpeg4Handle.bShareableBuf == OMX_TRUE) {
#ifdef USE_DMA_BUF
- pMpeg4Dec->hMFCMpeg4Handle.hMFCHandle = pMpeg4Dec->hMFCMpeg4Handle.pDecOps->Init(V4L2_MEMORY_DMABUF);
+ pMpeg4Dec->hMFCMpeg4Handle.hMFCHandle = pMpeg4Dec->hMFCMpeg4Handle.pDecOps->Init(V4L2_MEMORY_DMABUF);
#else
- pMpeg4Dec->hMFCMpeg4Handle.hMFCHandle = pMpeg4Dec->hMFCMpeg4Handle.pDecOps->Init(V4L2_MEMORY_USERPTR);
+ pMpeg4Dec->hMFCMpeg4Handle.hMFCHandle = pMpeg4Dec->hMFCMpeg4Handle.pDecOps->Init(V4L2_MEMORY_USERPTR);
#endif
- } else {
- pMpeg4Dec->hMFCMpeg4Handle.hMFCHandle = pMpeg4Dec->hMFCMpeg4Handle.pDecOps->Init(V4L2_MEMORY_DMABUF);
- }
if (pMpeg4Dec->hMFCMpeg4Handle.hMFCHandle == NULL) {
Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "Failed to allocate context buffer");
ret = OMX_ErrorInsufficientResources;
@@ -550,7 +544,6 @@ OMX_ERRORTYPE Mpeg4CodecStart(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortInd
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
void *hMFCHandle = NULL;
- ExynosVideoDecOps *pDecOps = NULL;
ExynosVideoDecBufferOps *pInbufOps = NULL;
ExynosVideoDecBufferOps *pOutbufOps = NULL;
EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = NULL;
@@ -576,7 +569,6 @@ OMX_ERRORTYPE Mpeg4CodecStart(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortInd
}
hMFCHandle = pMpeg4Dec->hMFCMpeg4Handle.hMFCHandle;
- pDecOps = pMpeg4Dec->hMFCMpeg4Handle.pDecOps;
pInbufOps = pMpeg4Dec->hMFCMpeg4Handle.pInbufOps;
pOutbufOps = pMpeg4Dec->hMFCMpeg4Handle.pOutbufOps;
@@ -597,7 +589,6 @@ OMX_ERRORTYPE Mpeg4CodecStop(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortInde
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
void *hMFCHandle = NULL;
- ExynosVideoDecOps *pDecOps = NULL;
ExynosVideoDecBufferOps *pInbufOps = NULL;
ExynosVideoDecBufferOps *pOutbufOps = NULL;
EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = NULL;
@@ -622,7 +613,6 @@ OMX_ERRORTYPE Mpeg4CodecStop(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortInde
}
hMFCHandle = pMpeg4Dec->hMFCMpeg4Handle.hMFCHandle;
- pDecOps = pMpeg4Dec->hMFCMpeg4Handle.pDecOps;
pInbufOps = pMpeg4Dec->hMFCMpeg4Handle.pInbufOps;
pOutbufOps = pMpeg4Dec->hMFCMpeg4Handle.pOutbufOps;
@@ -651,7 +641,6 @@ OMX_ERRORTYPE Mpeg4CodecSrcInit(OMX_COMPONENTTYPE *pOMXComponent)
ExynosVideoDecOps *pDecOps = pMpeg4Dec->hMFCMpeg4Handle.pDecOps;
ExynosVideoDecBufferOps *pInbufOps = pMpeg4Dec->hMFCMpeg4Handle.pInbufOps;
- ExynosVideoDecBufferOps *pOutbufOps = pMpeg4Dec->hMFCMpeg4Handle.pOutbufOps;
ExynosVideoGeometry bufferConf;
OMX_U32 inputBufferNumber = 0;
int i, plane;
@@ -751,7 +740,7 @@ OMX_ERRORTYPE Mpeg4CodecSrcInit(OMX_COMPONENTTYPE *pOMXComponent)
for (i = 0; i < pExynosInputPort->portDefinition.nBufferCountActual; i++) {
ExynosVideoPlane plane;
if (pVideoDec->bDRMPlayerMode == OMX_TRUE) {
- plane.addr = Exynos_OSAL_SharedMemory_IONToVirt(pVideoDec->hSharedMemory, pExynosInputPort->extendBufferHeader[i].OMXBufferHeader->pBuffer);
+ plane.addr = Exynos_OSAL_SharedMemory_IONToVirt(pVideoDec->hSharedMemory, (int)pExynosInputPort->extendBufferHeader[i].OMXBufferHeader->pBuffer);
} else {
plane.addr = pExynosInputPort->extendBufferHeader[i].OMXBufferHeader->pBuffer;
}
@@ -776,10 +765,6 @@ EXIT:
OMX_ERRORTYPE Mpeg4CodecOutputBufferProcessRun(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortIndex)
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
- void *hMFCHandle = NULL;
- ExynosVideoDecOps *pDecOps = NULL;
- ExynosVideoDecBufferOps *pInbufOps = NULL;
- ExynosVideoDecBufferOps *pOutbufOps = NULL;
EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = NULL;
EXYNOS_MPEG4DEC_HANDLE *pMpeg4Dec = NULL;
@@ -801,11 +786,6 @@ OMX_ERRORTYPE Mpeg4CodecOutputBufferProcessRun(OMX_COMPONENTTYPE *pOMXComponent,
goto EXIT;
}
- hMFCHandle = pMpeg4Dec->hMFCMpeg4Handle.hMFCHandle;
- pDecOps = pMpeg4Dec->hMFCMpeg4Handle.pDecOps;
- pInbufOps = pMpeg4Dec->hMFCMpeg4Handle.pInbufOps;
- pOutbufOps = pMpeg4Dec->hMFCMpeg4Handle.pOutbufOps;
-
if (nPortIndex == INPUT_PORT_INDEX) {
if (pMpeg4Dec->bSourceStart == OMX_FALSE) {
Exynos_OSAL_SignalSet(pMpeg4Dec->hSourceStartEvent);
@@ -835,8 +815,6 @@ OMX_ERRORTYPE Mpeg4CodecEnQueueAllBuffer(OMX_COMPONENTTYPE *pOMXComponent, OMX_U
EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = (EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle;
EXYNOS_MPEG4DEC_HANDLE *pMpeg4Dec = (EXYNOS_MPEG4DEC_HANDLE *)pVideoDec->hCodecHandle;
void *hMFCHandle = pMpeg4Dec->hMFCMpeg4Handle.hMFCHandle;
- EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
- EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
int i, nOutbufs;
ExynosVideoDecOps *pDecOps = pMpeg4Dec->hMFCMpeg4Handle.pDecOps;
@@ -864,7 +842,6 @@ OMX_ERRORTYPE Mpeg4CodecEnQueueAllBuffer(OMX_COMPONENTTYPE *pOMXComponent, OMX_U
pInbufOps->Clear_Queue(hMFCHandle);
} else if ((nPortIndex == OUTPUT_PORT_INDEX) &&
(pMpeg4Dec->bDestinationStart == OMX_TRUE)) {
- OMX_U32 dataLen[MFC_OUTPUT_BUFFER_PLANE] = {0, 0};
ExynosVideoBuffer *pBuffer = NULL;
Exynos_CodecBufferReset(pExynosComponent, OUTPUT_PORT_INDEX);
@@ -888,7 +865,6 @@ EXIT:
OMX_ERRORTYPE Mpeg4CodecDstFreeCodecBuffers(
OMX_COMPONENTTYPE *pOMXComponent)
{
- OMX_ERRORTYPE ret = OMX_ErrorNone;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = (EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle;
EXYNOS_MPEG4DEC_HANDLE *pMpeg4Dec = (EXYNOS_MPEG4DEC_HANDLE *)pVideoDec->hCodecHandle;
@@ -1026,8 +1002,6 @@ OMX_ERRORTYPE Mpeg4CodecResetupAllElement(
EXYNOS_OMX_BASEPORT *pOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
ExynosVideoDecBufferOps *pOutbufOps = pMpeg4Dec->hMFCMpeg4Handle.pOutbufOps;
- int i, j, nOutbufs;
-
FunctionIn();
if ((nPortIndex == INPUT_PORT_INDEX) &&
@@ -1078,19 +1052,15 @@ OMX_ERRORTYPE Mpeg4CodecSrcSetup(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_DA
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
- EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = (EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle;
EXYNOS_MPEG4DEC_HANDLE *pMpeg4Dec = (EXYNOS_MPEG4DEC_HANDLE *)((EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
void *hMFCHandle = pMpeg4Dec->hMFCMpeg4Handle.hMFCHandle;
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
- EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
OMX_U32 oneFrameSize = pSrcInputData->dataLen;
ExynosVideoDecOps *pDecOps = pMpeg4Dec->hMFCMpeg4Handle.pDecOps;
ExynosVideoDecBufferOps *pInbufOps = pMpeg4Dec->hMFCMpeg4Handle.pInbufOps;
ExynosVideoDecBufferOps *pOutbufOps = pMpeg4Dec->hMFCMpeg4Handle.pOutbufOps;
ExynosVideoGeometry bufferConf;
- OMX_U32 inputBufferNumber = 0;
- int i;
FunctionIn();
@@ -1180,11 +1150,8 @@ OMX_ERRORTYPE Mpeg4CodecDstSetup(OMX_COMPONENTTYPE *pOMXComponent)
EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = (EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle;
EXYNOS_MPEG4DEC_HANDLE *pMpeg4Dec = (EXYNOS_MPEG4DEC_HANDLE *)((EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
void *hMFCHandle = pMpeg4Dec->hMFCMpeg4Handle.hMFCHandle;
- EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
- ExynosVideoDecOps *pDecOps = pMpeg4Dec->hMFCMpeg4Handle.pDecOps;
- ExynosVideoDecBufferOps *pInbufOps = pMpeg4Dec->hMFCMpeg4Handle.pInbufOps;
ExynosVideoDecBufferOps *pOutbufOps = pMpeg4Dec->hMFCMpeg4Handle.pOutbufOps;
int i, nOutbufs;
@@ -1313,10 +1280,7 @@ OMX_ERRORTYPE Mpeg4CodecCheckResolutionChange(OMX_COMPONENTTYPE *pOMXComponent)
EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
ExynosVideoDecOps *pDecOps = pMpeg4Dec->hMFCMpeg4Handle.pDecOps;
- ExynosVideoDecBufferOps *pInbufOps = pMpeg4Dec->hMFCMpeg4Handle.pInbufOps;
ExynosVideoDecBufferOps *pOutbufOps = pMpeg4Dec->hMFCMpeg4Handle.pOutbufOps;
- ExynosVideoGeometry bufferConf;
- int i;
FunctionIn();
@@ -1749,7 +1713,7 @@ OMX_ERRORTYPE Exynos_Mpeg4Dec_SetParameter(
pExynosOutputPort->portDefinition.format.video.nStride = width;
pExynosOutputPort->portDefinition.format.video.nSliceHeight = height;
- switch (pExynosOutputPort->portDefinition.format.video.eColorFormat) {
+ switch ((int)pExynosOutputPort->portDefinition.format.video.eColorFormat) {
case OMX_COLOR_FormatYUV420Planar:
case OMX_COLOR_FormatYUV420SemiPlanar:
pExynosOutputPort->portDefinition.nBufferSize = (width * height * 3) / 2;
@@ -1972,7 +1936,6 @@ OMX_ERRORTYPE Exynos_Mpeg4Dec_GetExtensionIndex(
}
if (Exynos_OSAL_Strcmp(cParameterName, EXYNOS_INDEX_PARAM_ENABLE_THUMBNAIL) == 0) {
- EXYNOS_MPEG4DEC_HANDLE *pMpeg4Dec = (EXYNOS_MPEG4DEC_HANDLE *)((EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
*pIndexType = OMX_IndexVendorThumbnailMode;
ret = OMX_ErrorNone;
} else {
@@ -2041,11 +2004,6 @@ OMX_ERRORTYPE Exynos_Mpeg4Dec_Init(OMX_COMPONENTTYPE *pOMXComponent)
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
EXYNOS_MPEG4DEC_HANDLE *pMpeg4Dec = (EXYNOS_MPEG4DEC_HANDLE *)pVideoDec->hCodecHandle;
- OMX_PTR hMFCHandle = pMpeg4Dec->hMFCMpeg4Handle.hMFCHandle;
-
- ExynosVideoDecOps *pDecOps = NULL;
- ExynosVideoDecBufferOps *pInbufOps = NULL;
- ExynosVideoDecBufferOps *pOutbufOps = NULL;
CSC_METHOD csc_method = CSC_METHOD_SW;
int i, plane;
@@ -2063,10 +2021,6 @@ OMX_ERRORTYPE Exynos_Mpeg4Dec_Init(OMX_COMPONENTTYPE *pOMXComponent)
goto EXIT;
}
- pDecOps = pMpeg4Dec->hMFCMpeg4Handle.pDecOps;
- pInbufOps = pMpeg4Dec->hMFCMpeg4Handle.pInbufOps;
- pOutbufOps = pMpeg4Dec->hMFCMpeg4Handle.pOutbufOps;
-
if (pExynosInputPort->bufferProcessType & BUFFER_COPY) {
Exynos_OSAL_SemaphoreCreate(&pExynosInputPort->codecSemID);
Exynos_OSAL_QueueCreate(&pExynosInputPort->codecBufferQ, MAX_QUEUE_ELEMENTS);
@@ -2157,13 +2111,8 @@ OMX_ERRORTYPE Exynos_Mpeg4Dec_Terminate(OMX_COMPONENTTYPE *pOMXComponent)
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
EXYNOS_MPEG4DEC_HANDLE *pMpeg4Dec = (EXYNOS_MPEG4DEC_HANDLE *)((EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
- OMX_PTR hMFCHandle = pMpeg4Dec->hMFCMpeg4Handle.hMFCHandle;
- ExynosVideoDecOps *pDecOps = pMpeg4Dec->hMFCMpeg4Handle.pDecOps;
- ExynosVideoDecBufferOps *pInbufOps = pMpeg4Dec->hMFCMpeg4Handle.pInbufOps;
- ExynosVideoDecBufferOps *pOutbufOps = pMpeg4Dec->hMFCMpeg4Handle.pOutbufOps;
-
- int i, plane;
+ int i;
FunctionIn();
@@ -2195,6 +2144,7 @@ OMX_ERRORTYPE Exynos_Mpeg4Dec_Terminate(OMX_COMPONENTTYPE *pOMXComponent)
for (i = 0; i < MFC_INPUT_BUFFER_NUM_MAX; i++) {
if (pVideoDec->pMFCDecInputBuffer[i] != NULL) {
#ifndef TIZEN_FEATURE_E3250 /* do not use ion */
+ int plane;
for (plane = 0; plane < MFC_INPUT_BUFFER_PLANE; plane++) {
if (pVideoDec->pMFCDecInputBuffer[i]->pVirAddr[plane] != NULL)
Exynos_OSAL_SharedMemory_Free(pVideoDec->hSharedMemory, pVideoDec->pMFCDecInputBuffer[i]->pVirAddr[plane]);
@@ -2215,7 +2165,6 @@ OMX_ERRORTYPE Exynos_Mpeg4Dec_Terminate(OMX_COMPONENTTYPE *pOMXComponent)
}
Mpeg4CodecClose(pMpeg4Dec);
-EXIT:
FunctionOut();
return ret;
@@ -2225,18 +2174,13 @@ OMX_ERRORTYPE Exynos_Mpeg4Dec_SrcIn(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
- EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = (EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle;
EXYNOS_MPEG4DEC_HANDLE *pMpeg4Dec = (EXYNOS_MPEG4DEC_HANDLE *)((EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
void *hMFCHandle = pMpeg4Dec->hMFCMpeg4Handle.hMFCHandle;
- EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
- EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
OMX_U32 oneFrameSize = pSrcInputData->dataLen;
OMX_BOOL bInStartCode = OMX_FALSE;
ExynosVideoDecOps *pDecOps = pMpeg4Dec->hMFCMpeg4Handle.pDecOps;
ExynosVideoDecBufferOps *pInbufOps = pMpeg4Dec->hMFCMpeg4Handle.pInbufOps;
- ExynosVideoDecBufferOps *pOutbufOps = pMpeg4Dec->hMFCMpeg4Handle.pOutbufOps;
ExynosVideoErrorType codecReturn = VIDEO_ERROR_NONE;
- int i;
FunctionIn();
@@ -2308,7 +2252,6 @@ OMX_ERRORTYPE Exynos_Mpeg4Dec_SrcOut(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OM
EXYNOS_MPEG4DEC_HANDLE *pMpeg4Dec = (EXYNOS_MPEG4DEC_HANDLE *)((EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
void *hMFCHandle = pMpeg4Dec->hMFCMpeg4Handle.hMFCHandle;
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
- ExynosVideoDecOps *pDecOps = pMpeg4Dec->hMFCMpeg4Handle.pDecOps;
ExynosVideoDecBufferOps *pInbufOps = pMpeg4Dec->hMFCMpeg4Handle.pInbufOps;
ExynosVideoBuffer *pVideoBuffer;
@@ -2366,7 +2309,6 @@ OMX_ERRORTYPE Exynos_Mpeg4Dec_DstIn(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX
EXYNOS_MPEG4DEC_HANDLE *pMpeg4Dec = (EXYNOS_MPEG4DEC_HANDLE *)((EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
void *hMFCHandle = pMpeg4Dec->hMFCMpeg4Handle.hMFCHandle;
EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
- ExynosVideoDecOps *pDecOps = pMpeg4Dec->hMFCMpeg4Handle.pDecOps;
ExynosVideoDecBufferOps *pOutbufOps = pMpeg4Dec->hMFCMpeg4Handle.pOutbufOps;
OMX_U32 dataLen[MFC_OUTPUT_BUFFER_PLANE] = {0,};
ExynosVideoErrorType codecReturn = VIDEO_ERROR_NONE;
@@ -2419,7 +2361,6 @@ OMX_ERRORTYPE Exynos_Mpeg4Dec_DstOut(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OM
EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = (EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle;
EXYNOS_MPEG4DEC_HANDLE *pMpeg4Dec = (EXYNOS_MPEG4DEC_HANDLE *)((EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
void *hMFCHandle = pMpeg4Dec->hMFCMpeg4Handle.hMFCHandle;
- EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
ExynosVideoDecOps *pDecOps = pMpeg4Dec->hMFCMpeg4Handle.pDecOps;
ExynosVideoDecBufferOps *pOutbufOps = pMpeg4Dec->hMFCMpeg4Handle.pOutbufOps;
@@ -2568,7 +2509,6 @@ OMX_ERRORTYPE Exynos_Mpeg4Dec_srcInputBufferProcess(OMX_COMPONENTTYPE *pOMXCompo
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
- EXYNOS_MPEG4DEC_HANDLE *pMpeg4Dec = (EXYNOS_MPEG4DEC_HANDLE *)((EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
FunctionIn();
@@ -2584,8 +2524,8 @@ OMX_ERRORTYPE Exynos_Mpeg4Dec_srcInputBufferProcess(OMX_COMPONENTTYPE *pOMXCompo
ret = Exynos_Mpeg4Dec_SrcIn(pOMXComponent, pSrcInputData);
if ((ret != OMX_ErrorNone) &&
- (ret != OMX_ErrorInputDataDecodeYet) &&
- (ret != OMX_ErrorCorruptedFrame)) {
+ (ret != (OMX_ERRORTYPE)OMX_ErrorInputDataDecodeYet) &&
+ (ret != (OMX_ERRORTYPE)OMX_ErrorCorruptedFrame)) {
pExynosComponent->pCallbacks->EventHandler((OMX_HANDLETYPE)pOMXComponent,
pExynosComponent->callbackData,
OMX_EventError, ret, 0, NULL);
diff --git a/openmax/component/video/dec/vc1/Exynos_OMX_Wmvdec.c b/openmax/component/video/dec/vc1/Exynos_OMX_Wmvdec.c
index cbd65e9..57c82f1 100755
--- a/openmax/component/video/dec/vc1/Exynos_OMX_Wmvdec.c
+++ b/openmax/component/video/dec/vc1/Exynos_OMX_Wmvdec.c
@@ -44,6 +44,7 @@
#include "ExynosVideoApi.h"
#include "Exynos_OSAL_SharedMemory.h"
#include "Exynos_OSAL_Event.h"
+#include "Exynos_OMX_VdecControl.h"
#ifdef USE_PB
#include "Exynos_OSAL_Platform_Specific.h"
@@ -75,16 +76,13 @@ const OMX_U32 wmva = 0x41564d57;
static OMX_ERRORTYPE GetCodecInputPrivateData(OMX_PTR codecBuffer, void *pVirtAddr, OMX_U32 *dataSize)
{
- OMX_ERRORTYPE ret = OMX_ErrorNone;
-
-EXIT:
- return ret;
+ return OMX_ErrorNone;
}
-static OMX_ERRORTYPE GetCodecOutputPrivateData(OMX_PTR codecBuffer, void *addr[], int size[])
+static OMX_ERRORTYPE GetCodecOutputPrivateData(OMX_PTR codecBuffer, OMX_PTR addr[], OMX_U32 size[])
{
- OMX_ERRORTYPE ret = OMX_ErrorNone;
- ExynosVideoBuffer *pCodecBuffer;
+ OMX_ERRORTYPE ret = OMX_ErrorNone;
+ ExynosVideoBuffer *pCodecBuffer = NULL;
if (codecBuffer == NULL) {
ret = OMX_ErrorBadParameter;
@@ -271,7 +269,7 @@ static OMX_BOOL Make_Stream_MetaData(
switch (wmvFormat) {
case WMV_FORMAT_WMV3:
- if (*pStreamSize >= BITMAPINFOHEADER_SIZE) {
+
#ifndef TIZEN_FEATURE_E3250
BitmapInfoHhr *pBitmapInfoHeader;
pBitmapInfoHeader = (BitmapInfoHhr *)pInputStream;
@@ -319,10 +317,6 @@ static OMX_BOOL Make_Stream_MetaData(
*pStreamSize = currPos;
return OMX_TRUE;
- } else {
- Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "%s: *pStreamSize is too small to contain metadata(%d)", __FUNCTION__, *pStreamSize);
- return OMX_FALSE;
- }
break;
case WMV_FORMAT_VC1:
if (*pStreamSize >= BITMAPINFOHEADER_ASFBINDING_SIZE) {
@@ -351,7 +345,6 @@ static OMX_BOOL Make_Stream_StartCode(
/* first 4 bytes : size of Frame, second 4 bytes : present Time stamp */
OMX_U8 frameStartCode2[8] = {0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00};
#endif
- OMX_U32 i;
switch (wmvFormat) {
case WMV_FORMAT_WMV3:
@@ -383,12 +376,10 @@ OMX_ERRORTYPE Process_Wmv_CodecConfigData(OMX_COMPONENTTYPE *pOMXComponent, void
OMX_ERRORTYPE ret = OMX_ErrorNone;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = (EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle;
- EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
- EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
EXYNOS_WMVDEC_HANDLE *pWmvDec = (EXYNOS_WMVDEC_HANDLE *)pVideoDec->hCodecHandle;
- OMX_PTR hMFCHandle = pWmvDec->hMFCWmvHandle.hMFCHandle;
+
#ifdef TIZEN_FEATURE_E3250
- EXYNOS_OMX_DATABUFFER *pSrcInputData = (EXYNOS_OMX_DATA *)pConfig;
+ EXYNOS_OMX_DATABUFFER *pSrcInputData = (EXYNOS_OMX_DATABUFFER*)pConfig;
OMX_U8 *pInputStream = pSrcInputData->bufferHeader->pBuffer;
#endif
@@ -592,7 +583,6 @@ OMX_ERRORTYPE WmvCodecStart(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortIndex
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
void *hMFCHandle = NULL;
- ExynosVideoDecOps *pDecOps = NULL;
ExynosVideoDecBufferOps *pInbufOps = NULL;
ExynosVideoDecBufferOps *pOutbufOps = NULL;
EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = NULL;
@@ -618,7 +608,6 @@ OMX_ERRORTYPE WmvCodecStart(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortIndex
}
hMFCHandle = pWmvDec->hMFCWmvHandle.hMFCHandle;
- pDecOps = pWmvDec->hMFCWmvHandle.pDecOps;
pInbufOps = pWmvDec->hMFCWmvHandle.pInbufOps;
pOutbufOps = pWmvDec->hMFCWmvHandle.pOutbufOps;
@@ -639,7 +628,6 @@ OMX_ERRORTYPE WmvCodecStop(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortIndex)
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
void *hMFCHandle = NULL;
- ExynosVideoDecOps *pDecOps = NULL;
ExynosVideoDecBufferOps *pInbufOps = NULL;
ExynosVideoDecBufferOps *pOutbufOps = NULL;
EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = NULL;
@@ -664,7 +652,6 @@ OMX_ERRORTYPE WmvCodecStop(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortIndex)
}
hMFCHandle = pWmvDec->hMFCWmvHandle.hMFCHandle;
- pDecOps = pWmvDec->hMFCWmvHandle.pDecOps;
pInbufOps = pWmvDec->hMFCWmvHandle.pInbufOps;
pOutbufOps = pWmvDec->hMFCWmvHandle.pOutbufOps;
@@ -690,11 +677,9 @@ OMX_ERRORTYPE WmvCodecSrcInit(OMX_COMPONENTTYPE *pOMXComponent)
EXYNOS_WMVDEC_HANDLE *pWmvDec = (EXYNOS_WMVDEC_HANDLE *)((EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
void *hMFCHandle = pWmvDec->hMFCWmvHandle.hMFCHandle;
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
- EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
ExynosVideoDecOps *pDecOps = pWmvDec->hMFCWmvHandle.pDecOps;
ExynosVideoDecBufferOps *pInbufOps = pWmvDec->hMFCWmvHandle.pInbufOps;
- ExynosVideoDecBufferOps *pOutbufOps = pWmvDec->hMFCWmvHandle.pOutbufOps;
ExynosVideoGeometry bufferConf;
OMX_U32 inputBufferNumber = 0;
int i, plane;
@@ -817,10 +802,6 @@ EXIT:
OMX_ERRORTYPE WmvCodecOutputBufferProcessRun(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortIndex)
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
- void *hMFCHandle = NULL;
- ExynosVideoDecOps *pDecOps = NULL;
- ExynosVideoDecBufferOps *pInbufOps = NULL;
- ExynosVideoDecBufferOps *pOutbufOps = NULL;
EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = NULL;
EXYNOS_WMVDEC_HANDLE *pWmvDec = NULL;
@@ -842,11 +823,6 @@ OMX_ERRORTYPE WmvCodecOutputBufferProcessRun(OMX_COMPONENTTYPE *pOMXComponent, O
goto EXIT;
}
- hMFCHandle = pWmvDec->hMFCWmvHandle.hMFCHandle;
- pDecOps = pWmvDec->hMFCWmvHandle.pDecOps;
- pInbufOps = pWmvDec->hMFCWmvHandle.pInbufOps;
- pOutbufOps = pWmvDec->hMFCWmvHandle.pOutbufOps;
-
if (nPortIndex == INPUT_PORT_INDEX) {
if (pWmvDec->bSourceStart == OMX_FALSE) {
Exynos_OSAL_SignalSet(pWmvDec->hSourceStartEvent);
@@ -876,8 +852,6 @@ OMX_ERRORTYPE WmvCodecEnQueueAllBuffer(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32
EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = (EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle;
EXYNOS_WMVDEC_HANDLE *pWmvDec = (EXYNOS_WMVDEC_HANDLE *)((EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
void *hMFCHandle = pWmvDec->hMFCWmvHandle.hMFCHandle;
- EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
- EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
int i, nOutbufs;
ExynosVideoDecOps *pDecOps = pWmvDec->hMFCWmvHandle.pDecOps;
@@ -905,7 +879,6 @@ OMX_ERRORTYPE WmvCodecEnQueueAllBuffer(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32
pInbufOps->Clear_Queue(hMFCHandle);
} else if ((nPortIndex == OUTPUT_PORT_INDEX) &&
(pWmvDec->bDestinationStart == OMX_TRUE)) {
- OMX_U32 dataLen[MFC_OUTPUT_BUFFER_PLANE] = {0, 0};
ExynosVideoBuffer *pBuffer = NULL;
Exynos_CodecBufferReset(pExynosComponent, OUTPUT_PORT_INDEX);
@@ -928,7 +901,6 @@ EXIT:
OMX_ERRORTYPE WmvCodecDstFreeCodecBuffers(
OMX_COMPONENTTYPE *pOMXComponent)
{
- OMX_ERRORTYPE ret = OMX_ErrorNone;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = (EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle;
EXYNOS_WMVDEC_HANDLE *pWmvDec = (EXYNOS_WMVDEC_HANDLE *)pVideoDec->hCodecHandle;
@@ -1066,8 +1038,6 @@ OMX_ERRORTYPE WmvCodecResetupAllElement(
EXYNOS_OMX_BASEPORT *pOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
ExynosVideoDecBufferOps *pOutbufOps = pWmvDec->hMFCWmvHandle.pOutbufOps;
- int i, j, nOutbufs;
-
FunctionIn();
if ((nPortIndex == INPUT_PORT_INDEX) &&
@@ -1117,11 +1087,9 @@ OMX_ERRORTYPE WmvCodecSrcSetup(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_DATA
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
- EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = (EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle;
EXYNOS_WMVDEC_HANDLE *pWmvDec = (EXYNOS_WMVDEC_HANDLE *)((EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
void *hMFCHandle = pWmvDec->hMFCWmvHandle.hMFCHandle;
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
- EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
OMX_U32 oneFrameSize = pSrcInputData->dataLen;
OMX_BOOL bMetaData = OMX_FALSE;
@@ -1129,8 +1097,6 @@ OMX_ERRORTYPE WmvCodecSrcSetup(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_DATA
ExynosVideoDecBufferOps *pInbufOps = pWmvDec->hMFCWmvHandle.pInbufOps;
ExynosVideoDecBufferOps *pOutbufOps = pWmvDec->hMFCWmvHandle.pOutbufOps;
ExynosVideoGeometry bufferConf;
- OMX_U32 inputBufferNumber = 0;
- int i;
FunctionIn();
@@ -1235,11 +1201,8 @@ OMX_ERRORTYPE WmvCodecDstSetup(OMX_COMPONENTTYPE *pOMXComponent)
EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = (EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle;
EXYNOS_WMVDEC_HANDLE *pWmvDec = (EXYNOS_WMVDEC_HANDLE *)((EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
void *hMFCHandle = pWmvDec->hMFCWmvHandle.hMFCHandle;
- EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
- ExynosVideoDecOps *pDecOps = pWmvDec->hMFCWmvHandle.pDecOps;
- ExynosVideoDecBufferOps *pInbufOps = pWmvDec->hMFCWmvHandle.pInbufOps;
ExynosVideoDecBufferOps *pOutbufOps = pWmvDec->hMFCWmvHandle.pOutbufOps;
int i, nOutbufs;
@@ -1367,10 +1330,7 @@ OMX_ERRORTYPE WmvCodecCheckResolutionChange(OMX_COMPONENTTYPE *pOMXComponent)
EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
ExynosVideoDecOps *pDecOps = pWmvDec->hMFCWmvHandle.pDecOps;
- ExynosVideoDecBufferOps *pInbufOps = pWmvDec->hMFCWmvHandle.pInbufOps;
ExynosVideoDecBufferOps *pOutbufOps = pWmvDec->hMFCWmvHandle.pOutbufOps;
- ExynosVideoGeometry bufferConf;
- int i;
FunctionIn();
@@ -1681,7 +1641,7 @@ OMX_ERRORTYPE Exynos_WmvDec_SetParameter(
pExynosOutputPort->portDefinition.format.video.nStride = width;
pExynosOutputPort->portDefinition.format.video.nSliceHeight = height;
- switch (pExynosOutputPort->portDefinition.format.video.eColorFormat) {
+ switch ((int)pExynosOutputPort->portDefinition.format.video.eColorFormat) {
case OMX_COLOR_FormatYUV420Planar:
case OMX_COLOR_FormatYUV420SemiPlanar:
pExynosOutputPort->portDefinition.nBufferSize = (width * height * 3) / 2;
@@ -1865,7 +1825,6 @@ OMX_ERRORTYPE Exynos_WmvDec_GetExtensionIndex(
}
if (Exynos_OSAL_Strcmp(cParameterName, EXYNOS_INDEX_PARAM_ENABLE_THUMBNAIL) == 0) {
- EXYNOS_WMVDEC_HANDLE *pWmvDec = (EXYNOS_WMVDEC_HANDLE *)((EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
*pIndexType = OMX_IndexVendorThumbnailMode;
ret = OMX_ErrorNone;
} else {
@@ -1884,8 +1843,6 @@ OMX_ERRORTYPE Exynos_WmvDec_ComponentRoleEnum(
OMX_U32 nIndex)
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
- OMX_COMPONENTTYPE *pOMXComponent = NULL;
- EXYNOS_OMX_BASECOMPONENT *pExynosComponent = NULL;
FunctionIn();
@@ -1915,11 +1872,6 @@ OMX_ERRORTYPE Exynos_WmvDec_Init(OMX_COMPONENTTYPE *pOMXComponent)
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
EXYNOS_WMVDEC_HANDLE *pWmvDec = (EXYNOS_WMVDEC_HANDLE *)pVideoDec->hCodecHandle;
- OMX_PTR hMFCHandle = pWmvDec->hMFCWmvHandle.hMFCHandle;
-
- ExynosVideoDecOps *pDecOps = NULL;
- ExynosVideoDecBufferOps *pInbufOps = NULL;
- ExynosVideoDecBufferOps *pOutbufOps = NULL;
CSC_METHOD csc_method = CSC_METHOD_SW;
int i, plane;
@@ -1937,10 +1889,6 @@ OMX_ERRORTYPE Exynos_WmvDec_Init(OMX_COMPONENTTYPE *pOMXComponent)
goto EXIT;
}
- pDecOps = pWmvDec->hMFCWmvHandle.pDecOps;
- pInbufOps = pWmvDec->hMFCWmvHandle.pInbufOps;
- pOutbufOps = pWmvDec->hMFCWmvHandle.pOutbufOps;
-
if (pExynosInputPort->bufferProcessType & BUFFER_COPY) {
Exynos_OSAL_SemaphoreCreate(&pExynosInputPort->codecSemID);
Exynos_OSAL_QueueCreate(&pExynosInputPort->codecBufferQ, MAX_QUEUE_ELEMENTS);
@@ -2028,11 +1976,6 @@ OMX_ERRORTYPE Exynos_WmvDec_Terminate(OMX_COMPONENTTYPE *pOMXComponent)
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
EXYNOS_WMVDEC_HANDLE *pWmvDec = (EXYNOS_WMVDEC_HANDLE *)((EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
- OMX_PTR hMFCHandle = pWmvDec->hMFCWmvHandle.hMFCHandle;
-
- ExynosVideoDecOps *pDecOps = pWmvDec->hMFCWmvHandle.pDecOps;
- ExynosVideoDecBufferOps *pInbufOps = pWmvDec->hMFCWmvHandle.pInbufOps;
- ExynosVideoDecBufferOps *pOutbufOps = pWmvDec->hMFCWmvHandle.pOutbufOps;
int i, plane;
@@ -2085,7 +2028,6 @@ OMX_ERRORTYPE Exynos_WmvDec_Terminate(OMX_COMPONENTTYPE *pOMXComponent)
}
WmvCodecClose(pWmvDec);
-EXIT:
FunctionOut();
return ret;
@@ -2095,18 +2037,13 @@ OMX_ERRORTYPE Exynos_WmvDec_SrcIn(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_D
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
- EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = (EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle;
EXYNOS_WMVDEC_HANDLE *pWmvDec = (EXYNOS_WMVDEC_HANDLE *)((EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
void *hMFCHandle = pWmvDec->hMFCWmvHandle.hMFCHandle;
- EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
- EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
OMX_U32 oneFrameSize = pSrcInputData->dataLen;
OMX_BOOL bStartCode = OMX_FALSE;
ExynosVideoDecOps *pDecOps = pWmvDec->hMFCWmvHandle.pDecOps;
ExynosVideoDecBufferOps *pInbufOps = pWmvDec->hMFCWmvHandle.pInbufOps;
- ExynosVideoDecBufferOps *pOutbufOps = pWmvDec->hMFCWmvHandle.pOutbufOps;
ExynosVideoErrorType codecReturn = VIDEO_ERROR_NONE;
- int i;
FunctionIn();
@@ -2191,7 +2128,6 @@ OMX_ERRORTYPE Exynos_WmvDec_SrcOut(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_
EXYNOS_WMVDEC_HANDLE *pWmvDec = (EXYNOS_WMVDEC_HANDLE *)((EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
void *hMFCHandle = pWmvDec->hMFCWmvHandle.hMFCHandle;
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
- ExynosVideoDecOps *pDecOps = pWmvDec->hMFCWmvHandle.pDecOps;
ExynosVideoDecBufferOps *pInbufOps = pWmvDec->hMFCWmvHandle.pInbufOps;
ExynosVideoBuffer *pVideoBuffer;
@@ -2249,7 +2185,6 @@ OMX_ERRORTYPE Exynos_WmvDec_DstIn(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_D
EXYNOS_WMVDEC_HANDLE *pWmvDec = (EXYNOS_WMVDEC_HANDLE *)((EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
void *hMFCHandle = pWmvDec->hMFCWmvHandle.hMFCHandle;
EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
- ExynosVideoDecOps *pDecOps = pWmvDec->hMFCWmvHandle.pDecOps;
ExynosVideoDecBufferOps *pOutbufOps = pWmvDec->hMFCWmvHandle.pOutbufOps;
OMX_U32 dataLen[2] = {0,};
ExynosVideoErrorType codecReturn = VIDEO_ERROR_NONE;
@@ -2303,7 +2238,6 @@ OMX_ERRORTYPE Exynos_WmvDec_DstOut(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_
EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = (EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle;
EXYNOS_WMVDEC_HANDLE *pWmvDec = (EXYNOS_WMVDEC_HANDLE *)((EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
void *hMFCHandle = pWmvDec->hMFCWmvHandle.hMFCHandle;
- EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
ExynosVideoDecOps *pDecOps = pWmvDec->hMFCWmvHandle.pDecOps;
ExynosVideoDecBufferOps *pOutbufOps = pWmvDec->hMFCWmvHandle.pOutbufOps;
@@ -2451,7 +2385,6 @@ OMX_ERRORTYPE Exynos_WmvDec_srcInputBufferProcess(OMX_COMPONENTTYPE *pOMXCompone
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
- EXYNOS_WMVDEC_HANDLE *pWmvDec = (EXYNOS_WMVDEC_HANDLE *)((EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
FunctionIn();
@@ -2466,7 +2399,7 @@ OMX_ERRORTYPE Exynos_WmvDec_srcInputBufferProcess(OMX_COMPONENTTYPE *pOMXCompone
}
ret = Exynos_WmvDec_SrcIn(pOMXComponent, pSrcInputData);
- if ((ret != OMX_ErrorNone) && (ret != OMX_ErrorInputDataDecodeYet)) {
+ if ((ret != OMX_ErrorNone) && (ret != (OMX_ERRORTYPE)OMX_ErrorInputDataDecodeYet)) {
pExynosComponent->pCallbacks->EventHandler((OMX_HANDLETYPE)pOMXComponent,
pExynosComponent->callbackData,
OMX_EventError, ret, 0, NULL);
diff --git a/openmax/component/video/enc/Exynos_OMX_Venc.c b/openmax/component/video/enc/Exynos_OMX_Venc.c
index c66643c..266448b 100755
--- a/openmax/component/video/enc/Exynos_OMX_Venc.c
+++ b/openmax/component/video/enc/Exynos_OMX_Venc.c
@@ -40,6 +40,7 @@
#include "Exynos_OSAL_ETC.h"
#include "ExynosVideoApi.h"
#include "csc.h"
+#include "Exynos_OSAL_SharedMemory.h"
#undef EXYNOS_LOG_TAG
#define EXYNOS_LOG_TAG "EXYNOS_VIDEO_ENC"
@@ -95,7 +96,6 @@ OMX_BOOL Exynos_Check_BufferProcess_State(EXYNOS_OMX_BASECOMPONENT *pExynosCompo
OMX_ERRORTYPE Exynos_Input_CodecBufferToData(EXYNOS_OMX_BASECOMPONENT *pExynosComponent, OMX_PTR codecBuffer, EXYNOS_OMX_DATA *pData)
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
- EXYNOS_OMX_VIDEOENC_COMPONENT *pVideoEnc = (EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle;
CODEC_ENC_BUFFER *pInputCodecBuffer = (CODEC_ENC_BUFFER*)codecBuffer;
pData->buffer.multiPlaneBuffer.dataBuffer[0] = pInputCodecBuffer->pVirAddr[0];
@@ -137,8 +137,6 @@ OMX_ERRORTYPE Exynos_Output_CodecBufferToData(EXYNOS_OMX_BASECOMPONENT *pExynosC
void Exynos_Wait_ProcessPause(EXYNOS_OMX_BASECOMPONENT *pExynosComponent, OMX_U32 nPortIndex)
{
- EXYNOS_OMX_BASEPORT *exynosOMXInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
- EXYNOS_OMX_BASEPORT *exynosOMXOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
EXYNOS_OMX_BASEPORT *exynosOMXPort = NULL;
FunctionIn();
@@ -171,7 +169,6 @@ OMX_BOOL Exynos_CSC_InputData(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_DATA
OMX_U32 nFrameHeight = exynosInputPort->portDefinition.format.video.nFrameHeight;
OMX_COLOR_FORMATTYPE eColorFormat = exynosInputPort->portDefinition.format.video.eColorFormat;
OMX_BYTE checkInputStream = NULL;
- OMX_BOOL flagEOS = OMX_FALSE;
FunctionIn();
@@ -200,9 +197,9 @@ OMX_BOOL Exynos_CSC_InputData(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_DATA
csc_get_method(pVideoEnc->csc_handle, &csc_method);
if (csc_method == CSC_METHOD_HW) {
- pDstBuf[0] = srcInputData->buffer.multiPlaneBuffer.fd[0];
- pDstBuf[1] = srcInputData->buffer.multiPlaneBuffer.fd[1];
- pDstBuf[2] = srcInputData->buffer.multiPlaneBuffer.fd[2];
+ pDstBuf[0] = (unsigned char*)(&srcInputData->buffer.multiPlaneBuffer.fd[0]);
+ pDstBuf[1] = (unsigned char*)(&srcInputData->buffer.multiPlaneBuffer.fd[1]);
+ pDstBuf[2] = (unsigned char*)(&srcInputData->buffer.multiPlaneBuffer.fd[2]);
}
#ifdef USE_METADATABUFFERTYPE
@@ -236,13 +233,13 @@ OMX_BOOL Exynos_CSC_InputData(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_DATA
{
#ifdef USE_DMA_BUF
if (csc_method == CSC_METHOD_HW) {
- pSrcBuf[0] = Exynos_OSAL_SharedMemory_VirtToION(pVideoEnc->hSharedMemory, checkInputStream);
+ pSrcBuf[0] = (unsigned char *)Exynos_OSAL_SharedMemory_VirtToION(pVideoEnc->hSharedMemory, checkInputStream);
pSrcBuf[1] = NULL;
pSrcBuf[2] = NULL;
}
#endif
- switch (eColorFormat) {
+ switch ((int)eColorFormat) {
case OMX_COLOR_FormatYUV420Planar:
/* YUV420Planar converted to YUV420Semiplanar (interleaved UV plane) as per MFC spec.*/
csc_src_color_format = omx_2_hal_pixel_format((unsigned int)OMX_COLOR_FormatYUV420Planar);
@@ -306,7 +303,6 @@ OMX_BOOL Exynos_CSC_InputData(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_DATA
ret = OMX_TRUE;
-EXIT:
FunctionOut();
return ret;
@@ -316,16 +312,10 @@ OMX_BOOL Exynos_Preprocessor_InputData(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_
{
OMX_BOOL ret = OMX_FALSE;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
- EXYNOS_OMX_VIDEOENC_COMPONENT *pVideoEnc = (EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle;
EXYNOS_OMX_BASEPORT *exynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
EXYNOS_OMX_DATABUFFER *inputUseBuffer = &exynosInputPort->way.port2WayDataBuffer.inputDataBuffer;
- OMX_U32 nFrameWidth = exynosInputPort->portDefinition.format.video.nFrameWidth;
- OMX_U32 nFrameHeight = exynosInputPort->portDefinition.format.video.nFrameHeight;
- OMX_COLOR_FORMATTYPE eColorFormat = exynosInputPort->portDefinition.format.video.eColorFormat;
OMX_U32 copySize = 0;
- OMX_BYTE checkInputStream = NULL;
OMX_U32 checkInputStreamLen = 0;
- OMX_BOOL flagEOS = OMX_FALSE;
FunctionIn();
@@ -349,6 +339,8 @@ OMX_BOOL Exynos_Preprocessor_InputData(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_
/* kMetadataBufferTypeCameraSource */
Exynos_OSAL_GetInfoFromMetaData((OMX_BYTE)inputUseBuffer->bufferHeader->pBuffer, ppBuf);
#ifdef USE_DMA_BUF
+ EXYNOS_OMX_VIDEOENC_COMPONENT *pVideoEnc = (EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle;
+
srcInputData->buffer.multiPlaneBuffer.fd[0] = ppBuf[0];
srcInputData->buffer.multiPlaneBuffer.fd[1] = ppBuf[1];
allocSize[0] = nFrameWidth * nFrameHeight;
@@ -393,14 +385,12 @@ OMX_BOOL Exynos_Preprocessor_InputData(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_
/* reset dataBuffer */
Exynos_ResetDataBuffer(inputUseBuffer);
} else if (exynosInputPort->bufferProcessType & BUFFER_COPY) {
- checkInputStream = inputUseBuffer->bufferHeader->pBuffer + inputUseBuffer->usedDataLen;
checkInputStreamLen = inputUseBuffer->remainDataLen;
pExynosComponent->bUseFlagEOF = OMX_TRUE;
if (checkInputStreamLen == 0) {
inputUseBuffer->nFlags |= OMX_BUFFERFLAG_EOS;
- flagEOS = OMX_TRUE;
}
copySize = checkInputStreamLen;
@@ -550,7 +540,6 @@ OMX_ERRORTYPE Exynos_OMX_SrcInputBufferProcess(OMX_HANDLETYPE hComponent)
EXYNOS_OMX_DATABUFFER *srcInputUseBuffer = &exynosInputPort->way.port2WayDataBuffer.inputDataBuffer;
EXYNOS_OMX_DATA *pSrcInputData = &exynosInputPort->processData;
OMX_BOOL bCheckInputData = OMX_FALSE;
- OMX_BOOL bValidCodecData = OMX_FALSE;
FunctionIn();
@@ -601,13 +590,11 @@ OMX_ERRORTYPE Exynos_OMX_SrcInputBufferProcess(OMX_HANDLETYPE hComponent)
ret = pVideoEnc->exynos_codec_srcInputProcess(pOMXComponent, pSrcInputData);
Exynos_ResetCodecData(pSrcInputData);
Exynos_OSAL_MutexUnlock(srcInputUseBuffer->bufferMutex);
- if (ret == OMX_ErrorCodecInit)
+ if (ret == (OMX_ERRORTYPE)OMX_ErrorCodecInit)
pVideoEnc->bExitBufferProcessThread = OMX_TRUE;
}
}
-EXIT:
-
FunctionOut();
return ret;
@@ -658,8 +645,6 @@ OMX_ERRORTYPE Exynos_OMX_SrcOutputBufferProcess(OMX_HANDLETYPE hComponent)
}
}
-EXIT:
-
FunctionOut();
return ret;
@@ -725,8 +710,6 @@ OMX_ERRORTYPE Exynos_OMX_DstInputBufferProcess(OMX_HANDLETYPE hComponent)
}
}
-EXIT:
-
FunctionOut();
return ret;
@@ -791,8 +774,6 @@ OMX_ERRORTYPE Exynos_OMX_DstOutputBufferProcess(OMX_HANDLETYPE hComponent)
}
}
-EXIT:
-
FunctionOut();
return ret;
@@ -802,8 +783,6 @@ static OMX_ERRORTYPE Exynos_OMX_SrcInputProcessThread(OMX_PTR threadData)
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
OMX_COMPONENTTYPE *pOMXComponent = NULL;
- EXYNOS_OMX_BASECOMPONENT *pExynosComponent = NULL;
- EXYNOS_OMX_MESSAGE *message = NULL;
FunctionIn();
@@ -816,7 +795,6 @@ static OMX_ERRORTYPE Exynos_OMX_SrcInputProcessThread(OMX_PTR threadData)
if (ret != OMX_ErrorNone) {
goto EXIT;
}
- pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
Exynos_OMX_SrcInputBufferProcess(pOMXComponent);
Exynos_OSAL_ThreadExit(NULL);
@@ -831,8 +809,6 @@ static OMX_ERRORTYPE Exynos_OMX_SrcOutputProcessThread(OMX_PTR threadData)
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
OMX_COMPONENTTYPE *pOMXComponent = NULL;
- EXYNOS_OMX_BASECOMPONENT *pExynosComponent = NULL;
- EXYNOS_OMX_MESSAGE *message = NULL;
FunctionIn();
@@ -845,7 +821,6 @@ static OMX_ERRORTYPE Exynos_OMX_SrcOutputProcessThread(OMX_PTR threadData)
if (ret != OMX_ErrorNone) {
goto EXIT;
}
- pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
Exynos_OMX_SrcOutputBufferProcess(pOMXComponent);
Exynos_OSAL_ThreadExit(NULL);
@@ -860,8 +835,6 @@ static OMX_ERRORTYPE Exynos_OMX_DstInputProcessThread(OMX_PTR threadData)
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
OMX_COMPONENTTYPE *pOMXComponent = NULL;
- EXYNOS_OMX_BASECOMPONENT *pExynosComponent = NULL;
- EXYNOS_OMX_MESSAGE *message = NULL;
FunctionIn();
@@ -874,7 +847,6 @@ static OMX_ERRORTYPE Exynos_OMX_DstInputProcessThread(OMX_PTR threadData)
if (ret != OMX_ErrorNone) {
goto EXIT;
}
- pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
Exynos_OMX_DstInputBufferProcess(pOMXComponent);
Exynos_OSAL_ThreadExit(NULL);
@@ -889,8 +861,6 @@ static OMX_ERRORTYPE Exynos_OMX_DstOutputProcessThread(OMX_PTR threadData)
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
OMX_COMPONENTTYPE *pOMXComponent = NULL;
- EXYNOS_OMX_BASECOMPONENT *pExynosComponent = NULL;
- EXYNOS_OMX_MESSAGE *message = NULL;
FunctionIn();
@@ -903,7 +873,6 @@ static OMX_ERRORTYPE Exynos_OMX_DstOutputProcessThread(OMX_PTR threadData)
if (ret != OMX_ErrorNone) {
goto EXIT;
}
- pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
Exynos_OMX_DstOutputBufferProcess(pOMXComponent);
Exynos_OSAL_ThreadExit(NULL);
@@ -941,7 +910,6 @@ OMX_ERRORTYPE Exynos_OMX_BufferProcess_Create(OMX_HANDLETYPE hComponent)
Exynos_OMX_SrcInputProcessThread,
pOMXComponent);
-EXIT:
FunctionOut();
return ret;
@@ -954,7 +922,6 @@ OMX_ERRORTYPE Exynos_OMX_BufferProcess_Terminate(OMX_HANDLETYPE hComponent)
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
EXYNOS_OMX_VIDEOENC_COMPONENT *pVideoEnc = (EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle;
OMX_S32 countValue = 0;
- unsigned int i = 0;
FunctionIn();
@@ -992,7 +959,6 @@ OMX_ERRORTYPE Exynos_OMX_BufferProcess_Terminate(OMX_HANDLETYPE hComponent)
Exynos_OSAL_ThreadTerminate(pVideoEnc->hDstOutputThread);
pVideoEnc->hDstOutputThread = NULL;
-EXIT:
FunctionOut();
return ret;
diff --git a/openmax/component/video/enc/Exynos_OMX_Venc.h b/openmax/component/video/enc/Exynos_OMX_Venc.h
index bdd3b08..53f77f9 100755
--- a/openmax/component/video/enc/Exynos_OMX_Venc.h
+++ b/openmax/component/video/enc/Exynos_OMX_Venc.h
@@ -126,7 +126,7 @@ typedef struct _EXYNOS_OMX_VIDEOENC_COMPONENT
int (*exynos_checkInputFrame) (OMX_U8 *pInputStream, OMX_U32 buffSize, OMX_U32 flag,
OMX_BOOL bPreviousFrameEOF, OMX_BOOL *pbEndOfFrame);
OMX_ERRORTYPE (*exynos_codec_getCodecInputPrivateData) (OMX_PTR codecBuffer, OMX_PTR addr[], OMX_U32 size[]);
- OMX_ERRORTYPE (*exynos_codec_getCodecOutputPrivateData) (OMX_PTR codecBuffer, OMX_PTR addr, OMX_U32 *size);
+ OMX_ERRORTYPE (*exynos_codec_getCodecOutputPrivateData) (OMX_PTR codecBuffer, OMX_PTR *addr, OMX_U32 *size);
} EXYNOS_OMX_VIDEOENC_COMPONENT;
#ifdef __cplusplus
diff --git a/openmax/component/video/enc/Exynos_OMX_VencControl.c b/openmax/component/video/enc/Exynos_OMX_VencControl.c
index 7053059..5734400 100755
--- a/openmax/component/video/enc/Exynos_OMX_VencControl.c
+++ b/openmax/component/video/enc/Exynos_OMX_VencControl.c
@@ -91,8 +91,7 @@ OMX_ERRORTYPE Exynos_OMX_UseBuffer(
}
pVideoEnc = (EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle;
- if ((nPortIndex < 0) ||
- (nPortIndex >= pExynosComponent->portParam.nPorts)) {
+ if (nPortIndex >= pExynosComponent->portParam.nPorts) {
ret = OMX_ErrorBadPortIndex;
goto EXIT;
}
@@ -222,8 +221,8 @@ OMX_ERRORTYPE Exynos_OMX_AllocateBuffer(
}
pVideoEnc = (EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle;
- if ((nPortIndex < 0) ||
- (nPortIndex >= pExynosComponent->portParam.nPorts)) {
+ if (nPortIndex >= pExynosComponent->portParam.nPorts) {
+ Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "[%p][%s] invalid parameter(0x%x)", pExynosComponent, __FUNCTION__, nPortIndex);
ret = OMX_ErrorBadPortIndex;
goto EXIT;
}
@@ -333,8 +332,8 @@ OMX_ERRORTYPE Exynos_OMX_FreeBuffer(
}
pVideoEnc = (EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle;
- if ((nPortIndex < 0) ||
- (nPortIndex >= pExynosComponent->portParam.nPorts)) {
+ if (nPortIndex >= pExynosComponent->portParam.nPorts) {
+ Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "[%p][%s] invalid parameter(0x%x)", pExynosComponent, __FUNCTION__, nPortIndex);
ret = OMX_ErrorBadPortIndex;
goto EXIT;
}
@@ -401,31 +400,14 @@ OMX_ERRORTYPE Exynos_OMX_AllocateTunnelBuffer(
EXYNOS_OMX_BASEPORT *pOMXBasePort,
OMX_U32 nPortIndex)
{
- OMX_ERRORTYPE ret = OMX_ErrorNone;
- EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
- OMX_BUFFERHEADERTYPE *pTempBufferHdr = NULL;
- OMX_U8 *pTempBuffer = NULL;
- OMX_U32 nBufferSize = 0;
- OMX_PARAM_PORTDEFINITIONTYPE portDefinition;
-
- ret = OMX_ErrorTunnelingUnsupported;
-EXIT:
- return ret;
+ return OMX_ErrorTunnelingUnsupported;
}
OMX_ERRORTYPE Exynos_OMX_FreeTunnelBuffer(
EXYNOS_OMX_BASEPORT *pOMXBasePort,
OMX_U32 nPortIndex)
{
- OMX_ERRORTYPE ret = OMX_ErrorNone;
- EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
- OMX_BUFFERHEADERTYPE *pTempBufferHdr = NULL;
- OMX_U8 *pTempBuffer = NULL;
- OMX_U32 nBufferSize = 0;
-
- ret = OMX_ErrorTunnelingUnsupported;
-EXIT:
- return ret;
+ return OMX_ErrorTunnelingUnsupported;
}
OMX_ERRORTYPE Exynos_OMX_ComponentTunnelRequest(
@@ -435,11 +417,7 @@ OMX_ERRORTYPE Exynos_OMX_ComponentTunnelRequest(
OMX_IN OMX_U32 nTunneledPort,
OMX_INOUT OMX_TUNNELSETUPTYPE *pTunnelSetup)
{
- OMX_ERRORTYPE ret = OMX_ErrorNone;
-
- ret = OMX_ErrorTunnelingUnsupported;
-EXIT:
- return ret;
+ return OMX_ErrorTunnelingUnsupported;
}
OMX_ERRORTYPE Exynos_OMX_GetFlushBuffer(
@@ -459,7 +437,6 @@ OMX_ERRORTYPE Exynos_OMX_GetFlushBuffer(
pDataBuffer[1] = &(pExynosPort->way.port2WayDataBuffer.outputDataBuffer);
}
-EXIT:
FunctionOut();
return ret;
@@ -591,7 +568,6 @@ OMX_ERRORTYPE Exynos_OMX_BufferFlush(
EXYNOS_OMX_VIDEOENC_COMPONENT *pVideoEnc = NULL;
EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
EXYNOS_OMX_DATABUFFER *pDataBuffer[2] = {NULL, NULL};
- OMX_U32 i = 0;
FunctionIn();
#ifdef TIZEN_FEATURE_E3250
@@ -1126,8 +1102,7 @@ OMX_ERRORTYPE Exynos_CodecBufferEnqueue(
goto EXIT;
}
- if ((nPortIndex < 0) ||
- (nPortIndex >= pExynosComponent->portParam.nPorts)) {
+ if (nPortIndex >= pExynosComponent->portParam.nPorts) {
ret = OMX_ErrorBadPortIndex;
goto EXIT;
}
@@ -1169,8 +1144,7 @@ OMX_ERRORTYPE Exynos_CodecBufferDequeue(
goto EXIT;
}
- if ((nPortIndex < 0) ||
- (nPortIndex >= pExynosComponent->portParam.nPorts)) {
+ if (nPortIndex >= pExynosComponent->portParam.nPorts) {
ret = OMX_ErrorBadPortIndex;
goto EXIT;
}
@@ -1206,8 +1180,7 @@ OMX_ERRORTYPE Exynos_CodecBufferReset(
goto EXIT;
}
- if ((nPortIndex < 0) ||
- (nPortIndex >= pExynosComponent->portParam.nPorts)) {
+ if (nPortIndex >= pExynosComponent->portParam.nPorts) {
ret = OMX_ErrorBadPortIndex;
goto EXIT;
}
@@ -1220,7 +1193,7 @@ OMX_ERRORTYPE Exynos_CodecBufferReset(
}
while (1) {
- int cnt = 0;
+ OMX_S32 cnt = 0;
Exynos_OSAL_Get_SemaphoreCount(pExynosPort->codecSemID, &cnt);
if (cnt > 0)
Exynos_OSAL_SemaphoreWait(pExynosPort->codecSemID);
@@ -1243,7 +1216,6 @@ OMX_ERRORTYPE Exynos_OMX_VideoEncodeGetParameter(
OMX_ERRORTYPE ret = OMX_ErrorNone;
OMX_COMPONENTTYPE *pOMXComponent = NULL;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = NULL;
- EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
FunctionIn();
@@ -1302,8 +1274,7 @@ OMX_ERRORTYPE Exynos_OMX_VideoEncodeGetParameter(
goto EXIT;
}
- if ((nPortIndex < 0) ||
- (nPortIndex >= pExynosComponent->portParam.nPorts)) {
+ if (nPortIndex >= pExynosComponent->portParam.nPorts) {
ret = OMX_ErrorBadPortIndex;
goto EXIT;
}
@@ -1406,9 +1377,7 @@ OMX_ERRORTYPE Exynos_OMX_VideoEncodeGetParameter(
{
OMX_VIDEO_PARAM_QUANTIZATIONTYPE *pVideoQuantization = (OMX_VIDEO_PARAM_QUANTIZATIONTYPE *)pComponentParameterStructure;
OMX_U32 nPortIndex = pVideoQuantization->nPortIndex;
- EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
EXYNOS_OMX_VIDEOENC_COMPONENT *pVideoEnc = NULL;
- OMX_PARAM_PORTDEFINITIONTYPE *pPortDef = NULL;
if (nPortIndex != OUTPUT_PORT_INDEX) {
ret = OMX_ErrorBadPortIndex;
@@ -1419,8 +1388,6 @@ OMX_ERRORTYPE Exynos_OMX_VideoEncodeGetParameter(
ret = OMX_ErrorBadParameter;
goto EXIT;
}
- pExynosPort = &pExynosComponent->pExynosPort[nPortIndex];
- pPortDef = &pExynosPort->portDefinition;
pVideoQuantization->nQpI = pVideoEnc->quantization.nQpI;
pVideoQuantization->nQpP = pVideoEnc->quantization.nQpP;
@@ -1435,8 +1402,7 @@ OMX_ERRORTYPE Exynos_OMX_VideoEncodeGetParameter(
OMX_U32 nPortIndex = pPortDef->nPortIndex;
EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
- if ((nPortIndex < 0) ||
- (nPortIndex >= pExynosComponent->portParam.nPorts)) {
+ if (nPortIndex >= pExynosComponent->portParam.nPorts) {
ret = OMX_ErrorBadPortIndex;
goto EXIT;
}
@@ -1477,7 +1443,6 @@ OMX_ERRORTYPE Exynos_OMX_VideoEncodeSetParameter(
OMX_ERRORTYPE ret = OMX_ErrorNone;
OMX_COMPONENTTYPE *pOMXComponent = NULL;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = NULL;
- EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
FunctionIn();
@@ -1513,17 +1478,14 @@ OMX_ERRORTYPE Exynos_OMX_VideoEncodeSetParameter(
{
OMX_VIDEO_PARAM_PORTFORMATTYPE *pPortFormat = (OMX_VIDEO_PARAM_PORTFORMATTYPE *)pComponentParameterStructure;
OMX_U32 nPortIndex = pPortFormat->nPortIndex;
- OMX_U32 nIndex = pPortFormat->nIndex;
OMX_PARAM_PORTDEFINITIONTYPE *pPortDef = NULL;
- OMX_U32 nSupportFormat = 0;
ret = Exynos_OMX_Check_SizeVersion(pPortFormat, sizeof(OMX_VIDEO_PARAM_PORTFORMATTYPE));
if (ret != OMX_ErrorNone) {
goto EXIT;
}
- if ((nPortIndex < 0) ||
- (nPortIndex >= pExynosComponent->portParam.nPorts)) {
+ if (nPortIndex >= pExynosComponent->portParam.nPorts) {
ret = OMX_ErrorBadPortIndex;
goto EXIT;
}
@@ -1538,7 +1500,6 @@ OMX_ERRORTYPE Exynos_OMX_VideoEncodeSetParameter(
{
OMX_VIDEO_PARAM_BITRATETYPE *pVideoBitrate = (OMX_VIDEO_PARAM_BITRATETYPE *)pComponentParameterStructure;
OMX_U32 nPortIndex = pVideoBitrate->nPortIndex;
- EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
EXYNOS_OMX_VIDEOENC_COMPONENT *pVideoEnc = NULL;
OMX_PARAM_PORTDEFINITIONTYPE *pPortDef = NULL;
@@ -1563,9 +1524,7 @@ OMX_ERRORTYPE Exynos_OMX_VideoEncodeSetParameter(
{
OMX_VIDEO_PARAM_QUANTIZATIONTYPE *pVideoQuantization = (OMX_VIDEO_PARAM_QUANTIZATIONTYPE *)pComponentParameterStructure;
OMX_U32 nPortIndex = pVideoQuantization->nPortIndex;
- EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
EXYNOS_OMX_VIDEOENC_COMPONENT *pVideoEnc = NULL;
- OMX_PARAM_PORTDEFINITIONTYPE *pPortDef = NULL;
if (nPortIndex != OUTPUT_PORT_INDEX) {
ret = OMX_ErrorBadPortIndex;
@@ -1576,8 +1535,6 @@ OMX_ERRORTYPE Exynos_OMX_VideoEncodeSetParameter(
ret = OMX_ErrorBadParameter;
goto EXIT;
}
- pExynosPort = &pExynosComponent->pExynosPort[nPortIndex];
- pPortDef = &pExynosPort->portDefinition;
pVideoEnc->quantization.nQpI = pVideoQuantization->nQpI;
pVideoEnc->quantization.nQpP = pVideoQuantization->nQpP;
@@ -1591,10 +1548,8 @@ OMX_ERRORTYPE Exynos_OMX_VideoEncodeSetParameter(
OMX_PARAM_PORTDEFINITIONTYPE *pPortDef = (OMX_PARAM_PORTDEFINITIONTYPE *)pComponentParameterStructure;
OMX_U32 nPortIndex = pPortDef->nPortIndex;
EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
- OMX_U32 width, height, size;
- if ((nPortIndex < 0) ||
- (nPortIndex >= pExynosComponent->portParam.nPorts)) {
+ if (nPortIndex >= pExynosComponent->portParam.nPorts) {
ret = OMX_ErrorBadPortIndex;
goto EXIT;
}
diff --git a/openmax/component/video/enc/Exynos_OMX_VencControl.h b/openmax/component/video/enc/Exynos_OMX_VencControl.h
index f2bd4ed..3a7b5f4 100644..100755
--- a/openmax/component/video/enc/Exynos_OMX_VencControl.h
+++ b/openmax/component/video/enc/Exynos_OMX_VencControl.h
@@ -87,6 +87,23 @@ OMX_ERRORTYPE Exynos_OMX_VideoEncodeGetExtensionIndex(
OMX_IN OMX_HANDLETYPE hComponent,
OMX_IN OMX_STRING szParameterName,
OMX_OUT OMX_INDEXTYPE *pIndexType);
+OMX_ERRORTYPE Exynos_OutputBufferGetQueue(
+ EXYNOS_OMX_BASECOMPONENT *pExynosComponent);
+OMX_BUFFERHEADERTYPE *Exynos_OutputBufferGetQueue_Direct(
+ EXYNOS_OMX_BASECOMPONENT *pExynosComponent);
+OMX_ERRORTYPE Exynos_InputBufferGetQueue(
+ EXYNOS_OMX_BASECOMPONENT *pExynosComponent);
+OMX_ERRORTYPE Exynos_CodecBufferEnqueue(
+ EXYNOS_OMX_BASECOMPONENT *pExynosComponent,
+ OMX_U32 nPortIndex,
+ OMX_PTR pData);
+OMX_ERRORTYPE Exynos_CodecBufferReset(
+ EXYNOS_OMX_BASECOMPONENT *pExynosComponent,
+ OMX_U32 nPortIndex);
+OMX_ERRORTYPE Exynos_CodecBufferDequeue(
+ EXYNOS_OMX_BASECOMPONENT *pExynosComponent,
+ OMX_U32 nPortIndex,
+ OMX_PTR *pData);
OMX_ERRORTYPE Exynos_InputBufferReturn(OMX_COMPONENTTYPE *pOMXComponent);
OMX_ERRORTYPE Exynos_OutputBufferReturn(OMX_COMPONENTTYPE *pOMXComponent);
OMX_ERRORTYPE Exynos_OMX_BufferFlush(OMX_COMPONENTTYPE *pOMXComponent, OMX_S32 nPortIndex, OMX_BOOL bEvent);
diff --git a/openmax/component/video/enc/h264/Exynos_OMX_H264enc.c b/openmax/component/video/enc/h264/Exynos_OMX_H264enc.c
index 2173513..e3eb799 100755
--- a/openmax/component/video/enc/h264/Exynos_OMX_H264enc.c
+++ b/openmax/component/video/enc/h264/Exynos_OMX_H264enc.c
@@ -40,6 +40,7 @@
//#include "ExynosVideoApi.h"
#include "Exynos_OSAL_SharedMemory.h"
#include "Exynos_OSAL_Event.h"
+#include "Exynos_OMX_VencControl.h"
/* To use CSC_METHOD_HW in EXYNOS OMX, gralloc should allocate physical memory using FIMC */
/* It means GRALLOC_USAGE_HW_FIMC1 should be set on Native Window usage */
@@ -251,7 +252,7 @@ static void Set_H264Enc_Param(EXYNOS_OMX_BASECOMPONENT *pExynosComponent)
pCommonParam->CbPadVal = 0;
pCommonParam->CrPadVal = 0;
- switch ((EXYNOS_OMX_COLOR_FORMATTYPE)pExynosInputPort->portDefinition.format.video.eColorFormat) {
+ switch ((int)pExynosInputPort->portDefinition.format.video.eColorFormat) {
case OMX_COLOR_FormatYUV420SemiPlanar:
case OMX_COLOR_FormatYUV420Planar: /* Converted to NV12 in Exynos_Preprocessor_InputData */
case OMX_SEC_COLOR_FormatNV12L_DmaBuf_Fd:
@@ -376,10 +377,7 @@ static void Change_H264Enc_Param(EXYNOS_OMX_BASECOMPONENT *pExynosComponent)
OMX_ERRORTYPE GetCodecInputPrivateData(OMX_PTR codecBuffer, OMX_PTR addr[], OMX_U32 size[])
{
- OMX_ERRORTYPE ret = OMX_ErrorNone;
-
-EXIT:
- return ret;
+ return OMX_ErrorNone;
}
OMX_ERRORTYPE GetCodecOutputPrivateData(OMX_PTR codecBuffer, OMX_PTR *pVirtAddr, OMX_U32 *dataSize)
@@ -558,7 +556,6 @@ OMX_ERRORTYPE H264CodecStart(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortInde
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
void *hMFCHandle = NULL;
- ExynosVideoEncOps *pEncOps = NULL;
ExynosVideoEncBufferOps *pInbufOps = NULL;
ExynosVideoEncBufferOps *pOutbufOps = NULL;
EXYNOS_OMX_VIDEOENC_COMPONENT *pVideoEnc = NULL;
@@ -584,7 +581,6 @@ OMX_ERRORTYPE H264CodecStart(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortInde
}
hMFCHandle = pH264Enc->hMFCH264Handle.hMFCHandle;
- pEncOps = pH264Enc->hMFCH264Handle.pEncOps;
pInbufOps = pH264Enc->hMFCH264Handle.pInbufOps;
pOutbufOps = pH264Enc->hMFCH264Handle.pOutbufOps;
@@ -604,10 +600,10 @@ EXIT:
OMX_ERRORTYPE H264CodecStop(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortIndex)
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
- void *hMFCHandle = NULL;
- ExynosVideoEncOps *pEncOps = NULL;
- ExynosVideoEncBufferOps *pInbufOps = NULL;
+
+ void *hMFCHandle = NULL;
ExynosVideoEncBufferOps *pOutbufOps = NULL;
+ ExynosVideoEncBufferOps *pInbufOps = NULL;
EXYNOS_OMX_VIDEOENC_COMPONENT *pVideoEnc = NULL;
EXYNOS_H264ENC_HANDLE *pH264Enc = NULL;
@@ -628,9 +624,7 @@ OMX_ERRORTYPE H264CodecStop(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortIndex
ret = OMX_ErrorBadParameter;
goto EXIT;
}
-
hMFCHandle = pH264Enc->hMFCH264Handle.hMFCHandle;
- pEncOps = pH264Enc->hMFCH264Handle.pEncOps;
pInbufOps = pH264Enc->hMFCH264Handle.pInbufOps;
pOutbufOps = pH264Enc->hMFCH264Handle.pOutbufOps;
@@ -656,16 +650,14 @@ OMX_ERRORTYPE H264CodecSrcInit(OMX_COMPONENTTYPE *pOMXComponent)
EXYNOS_MFC_H264ENC_HANDLE *pMFCH264Handle = &pH264Enc->hMFCH264Handle;
void *hMFCHandle = pMFCH264Handle->hMFCHandle;
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
- EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
ExynosVideoEncOps *pEncOps = pH264Enc->hMFCH264Handle.pEncOps;
ExynosVideoEncBufferOps *pInbufOps = pH264Enc->hMFCH264Handle.pInbufOps;
- ExynosVideoEncBufferOps *pOutbufOps = pH264Enc->hMFCH264Handle.pOutbufOps;
ExynosVideoEncParam *pEncParam = NULL;
ExynosVideoGeometry bufferConf;
OMX_U32 inputBufferNumber = 0;
- int i, nOutbufs;
+ int i;
FunctionIn();
@@ -795,10 +787,6 @@ EXIT:
OMX_ERRORTYPE H264CodecOutputBufferProcessRun(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortIndex)
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
- void *hMFCHandle = NULL;
- ExynosVideoEncOps *pEncOps = NULL;
- ExynosVideoEncBufferOps *pInbufOps = NULL;
- ExynosVideoEncBufferOps *pOutbufOps = NULL;
EXYNOS_OMX_VIDEOENC_COMPONENT *pVideoEnc = NULL;
EXYNOS_H264ENC_HANDLE *pH264Enc = NULL;
@@ -820,11 +808,6 @@ OMX_ERRORTYPE H264CodecOutputBufferProcessRun(OMX_COMPONENTTYPE *pOMXComponent,
goto EXIT;
}
- hMFCHandle = pH264Enc->hMFCH264Handle.hMFCHandle;
- pEncOps = pH264Enc->hMFCH264Handle.pEncOps;
- pInbufOps = pH264Enc->hMFCH264Handle.pInbufOps;
- pOutbufOps = pH264Enc->hMFCH264Handle.pOutbufOps;
-
if (nPortIndex == INPUT_PORT_INDEX) {
if (pH264Enc->bSourceStart == OMX_FALSE) {
Exynos_OSAL_SignalSet(pH264Enc->hSourceStartEvent);
@@ -854,11 +837,8 @@ OMX_ERRORTYPE H264CodecEnqueueAllBuffer(OMX_COMPONENTTYPE *pOMXComponent, OMX_U3
EXYNOS_OMX_VIDEOENC_COMPONENT *pVideoEnc = (EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle;
EXYNOS_H264ENC_HANDLE *pH264Enc = (EXYNOS_H264ENC_HANDLE *)((EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
void *hMFCHandle = pH264Enc->hMFCH264Handle.hMFCHandle;
- EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
- EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
- int i, nOutbufs;
+ int i;
- ExynosVideoEncOps *pEncOps = pH264Enc->hMFCH264Handle.pEncOps;
ExynosVideoEncBufferOps *pInbufOps = pH264Enc->hMFCH264Handle.pInbufOps;
ExynosVideoEncBufferOps *pOutbufOps = pH264Enc->hMFCH264Handle.pOutbufOps;
@@ -884,7 +864,6 @@ OMX_ERRORTYPE H264CodecEnqueueAllBuffer(OMX_COMPONENTTYPE *pOMXComponent, OMX_U3
pInbufOps->Clear_Queue(hMFCHandle);
} else if ((nPortIndex == OUTPUT_PORT_INDEX) &&
(pH264Enc->bDestinationStart == OMX_TRUE)) {
- OMX_U32 dataLen[2] = {0, 0};
ExynosVideoBuffer *pBuffer = NULL;
Exynos_CodecBufferReset(pExynosComponent, OUTPUT_PORT_INDEX);
@@ -909,23 +888,10 @@ OMX_ERRORTYPE H264CodecSrcSetup(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_DAT
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
- EXYNOS_OMX_VIDEOENC_COMPONENT *pVideoEnc = (EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle;
EXYNOS_H264ENC_HANDLE *pH264Enc = (EXYNOS_H264ENC_HANDLE *)((EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
- EXYNOS_MFC_H264ENC_HANDLE *pMFCH264Handle = &pH264Enc->hMFCH264Handle;
- void *hMFCHandle = pMFCH264Handle->hMFCHandle;
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
- EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
OMX_U32 oneFrameSize = pSrcInputData->dataLen;
- ExynosVideoEncOps *pEncOps = pH264Enc->hMFCH264Handle.pEncOps;
- ExynosVideoEncBufferOps *pInbufOps = pH264Enc->hMFCH264Handle.pInbufOps;
- ExynosVideoEncBufferOps *pOutbufOps = pH264Enc->hMFCH264Handle.pOutbufOps;
- ExynosVideoEncParam *pEncParam = NULL;
-
- ExynosVideoGeometry bufferConf;
- OMX_U32 inputBufferNumber = 0;
- int i, nOutbufs;
-
FunctionIn();
if ((oneFrameSize <= 0) && (pSrcInputData->nFlags & OMX_BUFFERFLAG_EOS)) {
@@ -969,14 +935,11 @@ OMX_ERRORTYPE H264CodecDstSetup(OMX_COMPONENTTYPE *pOMXComponent)
EXYNOS_H264ENC_HANDLE *pH264Enc = (EXYNOS_H264ENC_HANDLE *)((EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
EXYNOS_MFC_H264ENC_HANDLE *pMFCH264Handle = &pH264Enc->hMFCH264Handle;
void *hMFCHandle = pMFCH264Handle->hMFCHandle;
- EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
- ExynosVideoEncOps *pEncOps = pH264Enc->hMFCH264Handle.pEncOps;
- ExynosVideoEncBufferOps *pInbufOps = pH264Enc->hMFCH264Handle.pInbufOps;
ExynosVideoEncBufferOps *pOutbufOps = pH264Enc->hMFCH264Handle.pOutbufOps;
ExynosVideoGeometry bufferConf;
- int i, nOutbufs, nPlanes, OutBufferSize;
+ int i,nPlanes, OutBufferSize;
FunctionIn();
@@ -1312,7 +1275,7 @@ OMX_ERRORTYPE Exynos_H264Enc_SetParameter(
goto EXIT;
}
- switch (nIndex) {
+ switch ((int)nIndex) {
case OMX_IndexParamVideoAvc:
{
OMX_VIDEO_PARAM_AVCTYPE *pDstAVCComponent = NULL;
@@ -1542,10 +1505,9 @@ OMX_ERRORTYPE Exynos_H264Enc_SetConfig(
pVideoEnc = (EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle;
pH264Enc = (EXYNOS_H264ENC_HANDLE *)((EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
- switch (nIndex) {
+ switch ((int)nIndex) {
case OMX_IndexConfigVideoIntraPeriod:
{
- EXYNOS_OMX_VIDEOENC_COMPONENT *pVEncBase = ((EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle);
OMX_U32 nPFrames = (*((OMX_U32 *)pComponentConfigStructure)) - 1;
pH264Enc->AVCComponent[OUTPUT_PORT_INDEX].nPFrames = nPFrames;
@@ -1644,8 +1606,6 @@ EXIT:
OMX_ERRORTYPE Exynos_H264Enc_ComponentRoleEnum(OMX_HANDLETYPE hComponent, OMX_U8 *cRole, OMX_U32 nIndex)
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
- OMX_COMPONENTTYPE *pOMXComponent = NULL;
- EXYNOS_OMX_BASECOMPONENT *pExynosComponent = NULL;
FunctionIn();
@@ -1675,19 +1635,13 @@ OMX_ERRORTYPE Exynos_H264Enc_Init(OMX_COMPONENTTYPE *pOMXComponent)
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
EXYNOS_H264ENC_HANDLE *pH264Enc = (EXYNOS_H264ENC_HANDLE *)((EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;;
- EXYNOS_MFC_H264ENC_HANDLE *pMFCH264Handle = &pH264Enc->hMFCH264Handle;
- OMX_PTR hMFCHandle = pH264Enc->hMFCH264Handle.hMFCHandle;
OMX_COLOR_FORMATTYPE eColorFormat;
- ExynosVideoEncOps *pEncOps = NULL;
- ExynosVideoEncBufferOps *pInbufOps = NULL;
- ExynosVideoEncBufferOps *pOutbufOps = NULL;
-
- CSC_METHOD csc_method = CSC_METHOD_SW;
int i = 0;
FunctionIn();
+ CSC_METHOD csc_method = CSC_METHOD_SW;
pH264Enc->hMFCH264Handle.bConfiguredMFCSrc = OMX_FALSE;
pH264Enc->hMFCH264Handle.bConfiguredMFCDst = OMX_FALSE;
pVideoEnc->bFirstOutput = OMX_FALSE;
@@ -1704,8 +1658,8 @@ OMX_ERRORTYPE Exynos_H264Enc_Init(OMX_COMPONENTTYPE *pOMXComponent)
}
#endif
} else {
- if (eColorFormat == OMX_SEC_COLOR_FormatNV12L_DmaBuf_Fd ||
- eColorFormat == OMX_SEC_COLOR_FormatNV12T_DmaBuf_Fd) {
+ if (eColorFormat == (OMX_COLOR_FORMATTYPE)OMX_SEC_COLOR_FormatNV12L_DmaBuf_Fd ||
+ eColorFormat == (OMX_COLOR_FORMATTYPE)OMX_SEC_COLOR_FormatNV12T_DmaBuf_Fd) {
pExynosInputPort->bufferProcessType = BUFFER_SHARE;
} else {
pExynosInputPort->bufferProcessType = BUFFER_COPY;
@@ -1726,10 +1680,6 @@ OMX_ERRORTYPE Exynos_H264Enc_Init(OMX_COMPONENTTYPE *pOMXComponent)
goto EXIT;
}
- pEncOps = pH264Enc->hMFCH264Handle.pEncOps;
- pInbufOps = pH264Enc->hMFCH264Handle.pInbufOps;
- pOutbufOps = pH264Enc->hMFCH264Handle.pOutbufOps;
-
if (pExynosInputPort->bufferProcessType & BUFFER_COPY) {
Exynos_OSAL_SemaphoreCreate(&pExynosInputPort->codecSemID);
Exynos_OSAL_QueueCreate(&pExynosInputPort->codecBufferQ, MAX_QUEUE_ELEMENTS);
@@ -1802,6 +1752,7 @@ OMX_ERRORTYPE Exynos_H264Enc_Init(OMX_COMPONENTTYPE *pOMXComponent)
pExynosComponent->getAllDelayBuffer = OMX_FALSE;
#if 0//defined(USE_CSC_GSCALER)
+
csc_method = CSC_METHOD_HW; //in case of Use ION buffer.
#endif
pVideoEnc->csc_handle = csc_init(csc_method);
@@ -1826,13 +1777,8 @@ OMX_ERRORTYPE Exynos_H264Enc_Terminate(OMX_COMPONENTTYPE *pOMXComponent)
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
EXYNOS_H264ENC_HANDLE *pH264Enc = (EXYNOS_H264ENC_HANDLE *)((EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
- OMX_PTR hMFCHandle = pH264Enc->hMFCH264Handle.hMFCHandle;
-
- ExynosVideoEncOps *pEncOps = pH264Enc->hMFCH264Handle.pEncOps;
- ExynosVideoEncBufferOps *pInbufOps = pH264Enc->hMFCH264Handle.pInbufOps;
- ExynosVideoEncBufferOps *pOutbufOps = pH264Enc->hMFCH264Handle.pOutbufOps;
- int i = 0, plane = 0;
+ int i = 0;
FunctionIn();
@@ -1895,7 +1841,6 @@ OMX_ERRORTYPE Exynos_H264Enc_Terminate(OMX_COMPONENTTYPE *pOMXComponent)
}
H264CodecClose(pH264Enc);
-EXIT:
FunctionOut();
return ret;
@@ -1909,13 +1854,10 @@ OMX_ERRORTYPE Exynos_H264Enc_SrcIn(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_
EXYNOS_H264ENC_HANDLE *pH264Enc = (EXYNOS_H264ENC_HANDLE *)((EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
void *hMFCHandle = pH264Enc->hMFCH264Handle.hMFCHandle;
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
- EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
OMX_U32 oneFrameSize = pSrcInputData->dataLen;
ExynosVideoEncOps *pEncOps = pH264Enc->hMFCH264Handle.pEncOps;
ExynosVideoEncBufferOps *pInbufOps = pH264Enc->hMFCH264Handle.pInbufOps;
- ExynosVideoEncBufferOps *pOutbufOps = pH264Enc->hMFCH264Handle.pOutbufOps;
ExynosVideoErrorType codecReturn = VIDEO_ERROR_NONE;
- int i;
FunctionIn();
@@ -1933,9 +1875,8 @@ OMX_ERRORTYPE Exynos_H264Enc_SrcIn(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_
pVideoEnc->configChange = OMX_FALSE;
}
- if ((pSrcInputData->dataLen >= 0) ||
- ((pSrcInputData->nFlags & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS)) {
- OMX_U32 pMFCYUVDataSize[MFC_INPUT_BUFFER_PLANE] = {NULL, NULL};
+ if ((pSrcInputData->nFlags & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS) {
+ OMX_U32 pMFCYUVDataSize[MFC_INPUT_BUFFER_PLANE] = {0, };
ExynosVideoPlane planes[MFC_INPUT_BUFFER_PLANE];
int plane;
@@ -2037,7 +1978,6 @@ OMX_ERRORTYPE Exynos_H264Enc_SrcOut(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX
EXYNOS_H264ENC_HANDLE *pH264Enc = (EXYNOS_H264ENC_HANDLE *)((EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
void *hMFCHandle = pH264Enc->hMFCH264Handle.hMFCHandle;
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
- ExynosVideoEncOps *pEncOps = pH264Enc->hMFCH264Handle.pEncOps;
ExynosVideoEncBufferOps *pInbufOps = pH264Enc->hMFCH264Handle.pInbufOps;
ExynosVideoBuffer *pVideoBuffer;
@@ -2096,10 +2036,8 @@ OMX_ERRORTYPE Exynos_H264Enc_DstIn(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
- EXYNOS_OMX_VIDEOENC_COMPONENT *pVideoEnc = (EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle;
EXYNOS_H264ENC_HANDLE *pH264Enc = (EXYNOS_H264ENC_HANDLE *)((EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
void *hMFCHandle = pH264Enc->hMFCH264Handle.hMFCHandle;
- ExynosVideoEncOps *pEncOps = pH264Enc->hMFCH264Handle.pEncOps;
ExynosVideoEncBufferOps *pOutbufOps = pH264Enc->hMFCH264Handle.pOutbufOps;
OMX_U32 dataLen = 0;
ExynosVideoErrorType codecReturn = VIDEO_ERROR_NONE;
@@ -2141,7 +2079,6 @@ OMX_ERRORTYPE Exynos_H264Enc_DstOut(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX
ExynosVideoEncBufferOps *pOutbufOps = pH264Enc->hMFCH264Handle.pOutbufOps;
ExynosVideoBuffer *pVideoBuffer;
ExynosVideoFrameStatusType displayStatus = VIDEO_FRAME_STATUS_UNKNOWN;
- ExynosVideoGeometry bufferGeometry;
OMX_S32 indexTimestamp = 0;
FunctionIn();
@@ -2226,7 +2163,6 @@ OMX_ERRORTYPE Exynos_H264Enc_srcInputBufferProcess(OMX_COMPONENTTYPE *pOMXCompon
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
- EXYNOS_H264ENC_HANDLE *pH264Enc = (EXYNOS_H264ENC_HANDLE *)((EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
FunctionIn();
diff --git a/openmax/component/video/enc/h264/Exynos_OMX_H264enc.h b/openmax/component/video/enc/h264/Exynos_OMX_H264enc.h
index caa606d..d988c02 100644..100755
--- a/openmax/component/video/enc/h264/Exynos_OMX_H264enc.h
+++ b/openmax/component/video/enc/h264/Exynos_OMX_H264enc.h
@@ -52,9 +52,9 @@ typedef struct _EXYNOS_MFC_H264ENC_HANDLE
OMX_BOOL bPrependSpsPpsToIdr;
EXTRA_DATA headerData;
- ExynosVideoDecOps *pEncOps;
- ExynosVideoDecBufferOps *pInbufOps;
- ExynosVideoDecBufferOps *pOutbufOps;
+ ExynosVideoEncOps *pEncOps;
+ ExynosVideoEncBufferOps *pInbufOps;
+ ExynosVideoEncBufferOps *pOutbufOps;
ExynosVideoEncParam encParam;
} EXYNOS_MFC_H264ENC_HANDLE;
@@ -79,6 +79,7 @@ extern "C" {
OSCL_EXPORT_REF OMX_ERRORTYPE Exynos_OMX_ComponentInit(OMX_HANDLETYPE hComponent, OMX_STRING componentName);
OMX_ERRORTYPE Exynos_OMX_ComponentDeinit(OMX_HANDLETYPE hComponent);
+OMX_ERRORTYPE GetCodecOutputPrivateData(OMX_PTR codecBuffer, OMX_PTR *pVirtAddr, OMX_U32 *dataSize);
#ifdef __cplusplus
};
diff --git a/openmax/component/video/enc/mpeg4/Exynos_OMX_Mpeg4enc.c b/openmax/component/video/enc/mpeg4/Exynos_OMX_Mpeg4enc.c
index c582237..d775ad4 100755
--- a/openmax/component/video/enc/mpeg4/Exynos_OMX_Mpeg4enc.c
+++ b/openmax/component/video/enc/mpeg4/Exynos_OMX_Mpeg4enc.c
@@ -40,6 +40,7 @@
//#include "ExynosVideoApi.h"
#include "Exynos_OSAL_SharedMemory.h"
#include "Exynos_OSAL_Event.h"
+#include "Exynos_OMX_VencControl.h"
/* To use CSC_METHOD_HW in EXYNOS OMX, gralloc should allocate physical memory using FIMC */
/* It means GRALLOC_USAGE_HW_FIMC1 should be set on Native Window usage */
@@ -242,7 +243,7 @@ static void Set_Mpeg4Enc_Param(EXYNOS_OMX_BASECOMPONENT *pExynosComponent)
pCommonParam->CbPadVal = 0;
pCommonParam->CrPadVal = 0;
- switch ((EXYNOS_OMX_COLOR_FORMATTYPE)pExynosInputPort->portDefinition.format.video.eColorFormat) {
+ switch ((int)pExynosInputPort->portDefinition.format.video.eColorFormat) {
case OMX_COLOR_FormatYUV420SemiPlanar:
case OMX_COLOR_FormatYUV420Planar: /* Converted to NV12 in Exynos_Preprocessor_InputData */
#ifdef TIZEN_FEATURE_E3250
@@ -342,7 +343,7 @@ static void Set_H263Enc_Param(EXYNOS_OMX_BASECOMPONENT *pExynosComponent)
pCommonParam->CbPadVal = 0;
pCommonParam->CrPadVal = 0;
- switch ((EXYNOS_OMX_COLOR_FORMATTYPE)pExynosInputPort->portDefinition.format.video.eColorFormat) {
+ switch ((int)pExynosInputPort->portDefinition.format.video.eColorFormat) {
case OMX_COLOR_FormatYUV420SemiPlanar:
case OMX_COLOR_FormatYUV420Planar: /* Converted to NV12 in Exynos_Preprocessor_InputData */
#ifdef TIZEN_FEATURE_E3250
@@ -491,10 +492,7 @@ static void Change_H263Enc_Param(EXYNOS_OMX_BASECOMPONENT *pExynosComponent)
OMX_ERRORTYPE GetCodecInputPrivateData(OMX_PTR codecBuffer, OMX_PTR addr[], OMX_U32 size[])
{
- OMX_ERRORTYPE ret = OMX_ErrorNone;
-
-EXIT:
- return ret;
+ return OMX_ErrorNone;
}
OMX_ERRORTYPE GetCodecOutputPrivateData(OMX_PTR codecBuffer, OMX_PTR *pVirtAddr, OMX_U32 *dataSize)
@@ -673,7 +671,6 @@ OMX_ERRORTYPE Mpeg4CodecStart(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortInd
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
void *hMFCHandle = NULL;
- ExynosVideoEncOps *pEncOps = NULL;
ExynosVideoEncBufferOps *pInbufOps = NULL;
ExynosVideoEncBufferOps *pOutbufOps = NULL;
EXYNOS_OMX_VIDEOENC_COMPONENT *pVideoEnc = NULL;
@@ -699,7 +696,6 @@ OMX_ERRORTYPE Mpeg4CodecStart(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortInd
}
hMFCHandle = pMpeg4Enc->hMFCMpeg4Handle.hMFCHandle;
- pEncOps = pMpeg4Enc->hMFCMpeg4Handle.pEncOps;
pInbufOps = pMpeg4Enc->hMFCMpeg4Handle.pInbufOps;
pOutbufOps = pMpeg4Enc->hMFCMpeg4Handle.pOutbufOps;
@@ -720,7 +716,6 @@ OMX_ERRORTYPE Mpeg4CodecStop(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortInde
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
void *hMFCHandle = NULL;
- ExynosVideoEncOps *pEncOps = NULL;
ExynosVideoEncBufferOps *pInbufOps = NULL;
ExynosVideoEncBufferOps *pOutbufOps = NULL;
EXYNOS_OMX_VIDEOENC_COMPONENT *pVideoEnc = NULL;
@@ -745,7 +740,6 @@ OMX_ERRORTYPE Mpeg4CodecStop(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortInde
}
hMFCHandle = pMpeg4Enc->hMFCMpeg4Handle.hMFCHandle;
- pEncOps = pMpeg4Enc->hMFCMpeg4Handle.pEncOps;
pInbufOps = pMpeg4Enc->hMFCMpeg4Handle.pInbufOps;
pOutbufOps = pMpeg4Enc->hMFCMpeg4Handle.pOutbufOps;
@@ -771,16 +765,16 @@ OMX_ERRORTYPE Mpeg4CodecSrcInit(OMX_COMPONENTTYPE *pOMXComponent)
EXYNOS_MFC_MPEG4ENC_HANDLE *pMFCMpeg4Handle = &pMpeg4Enc->hMFCMpeg4Handle;
void *hMFCHandle = pMFCMpeg4Handle->hMFCHandle;
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
- EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
+
ExynosVideoEncOps *pEncOps = pMpeg4Enc->hMFCMpeg4Handle.pEncOps;
ExynosVideoEncBufferOps *pInbufOps = pMpeg4Enc->hMFCMpeg4Handle.pInbufOps;
- ExynosVideoEncBufferOps *pOutbufOps = pMpeg4Enc->hMFCMpeg4Handle.pOutbufOps;
+
ExynosVideoEncParam *pEncParam = NULL;
ExynosVideoGeometry bufferConf;
OMX_U32 inputBufferNumber = 0;
- int i, nOutbufs;
+ int i;
FunctionIn();
@@ -909,10 +903,6 @@ EXIT:
OMX_ERRORTYPE Mpeg4CodecOutputBufferProcessRun(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortIndex)
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
- void *hMFCHandle = NULL;
- ExynosVideoEncOps *pEncOps = NULL;
- ExynosVideoEncBufferOps *pInbufOps = NULL;
- ExynosVideoEncBufferOps *pOutbufOps = NULL;
EXYNOS_OMX_VIDEOENC_COMPONENT *pVideoEnc = NULL;
EXYNOS_MPEG4ENC_HANDLE *pMpeg4Enc = NULL;
@@ -934,11 +924,6 @@ OMX_ERRORTYPE Mpeg4CodecOutputBufferProcessRun(OMX_COMPONENTTYPE *pOMXComponent,
goto EXIT;
}
- hMFCHandle = pMpeg4Enc->hMFCMpeg4Handle.hMFCHandle;
- pEncOps = pMpeg4Enc->hMFCMpeg4Handle.pEncOps;
- pInbufOps = pMpeg4Enc->hMFCMpeg4Handle.pInbufOps;
- pOutbufOps = pMpeg4Enc->hMFCMpeg4Handle.pOutbufOps;
-
if (nPortIndex == INPUT_PORT_INDEX) {
if (pMpeg4Enc->bSourceStart == OMX_FALSE) {
Exynos_OSAL_SignalSet(pMpeg4Enc->hSourceStartEvent);
@@ -968,11 +953,8 @@ OMX_ERRORTYPE Mpeg4CodecEnqueueAllBuffer(OMX_COMPONENTTYPE *pOMXComponent, OMX_U
EXYNOS_OMX_VIDEOENC_COMPONENT *pVideoEnc = (EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle;
EXYNOS_MPEG4ENC_HANDLE *pMpeg4Enc = (EXYNOS_MPEG4ENC_HANDLE *)((EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
void *hMFCHandle = pMpeg4Enc->hMFCMpeg4Handle.hMFCHandle;
- EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
- EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
- int i, nOutbufs;
+ int i;
- ExynosVideoEncOps *pEncOps = pMpeg4Enc->hMFCMpeg4Handle.pEncOps;
ExynosVideoEncBufferOps *pInbufOps = pMpeg4Enc->hMFCMpeg4Handle.pInbufOps;
ExynosVideoEncBufferOps *pOutbufOps = pMpeg4Enc->hMFCMpeg4Handle.pOutbufOps;
@@ -998,7 +980,6 @@ OMX_ERRORTYPE Mpeg4CodecEnqueueAllBuffer(OMX_COMPONENTTYPE *pOMXComponent, OMX_U
pInbufOps->Clear_Queue(hMFCHandle);
} else if ((nPortIndex == OUTPUT_PORT_INDEX) &&
(pMpeg4Enc->bDestinationStart == OMX_TRUE)) {
- OMX_U32 dataLen[2] = {0, 0};
ExynosVideoBuffer *pBuffer = NULL;
Exynos_CodecBufferReset(pExynosComponent, OUTPUT_PORT_INDEX);
@@ -1023,23 +1004,10 @@ OMX_ERRORTYPE Mpeg4CodecSrcSetup(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_DA
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
- EXYNOS_OMX_VIDEOENC_COMPONENT *pVideoEnc = (EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle;
EXYNOS_MPEG4ENC_HANDLE *pMpeg4Enc = (EXYNOS_MPEG4ENC_HANDLE *)((EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
- EXYNOS_MFC_MPEG4ENC_HANDLE *pMFCMpeg4Handle = &pMpeg4Enc->hMFCMpeg4Handle;
- void *hMFCHandle = pMFCMpeg4Handle->hMFCHandle;
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
- EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
OMX_U32 oneFrameSize = pSrcInputData->dataLen;
- ExynosVideoEncOps *pEncOps = pMpeg4Enc->hMFCMpeg4Handle.pEncOps;
- ExynosVideoEncBufferOps *pInbufOps = pMpeg4Enc->hMFCMpeg4Handle.pInbufOps;
- ExynosVideoEncBufferOps *pOutbufOps = pMpeg4Enc->hMFCMpeg4Handle.pOutbufOps;
- ExynosVideoEncParam *pEncParam = NULL;
-
- ExynosVideoGeometry bufferConf;
- OMX_U32 inputBufferNumber = 0;
- int i, nOutbufs;
-
FunctionIn();
if ((oneFrameSize <= 0) && (pSrcInputData->nFlags & OMX_BUFFERFLAG_EOS)) {
@@ -1052,9 +1020,10 @@ OMX_ERRORTYPE Mpeg4CodecSrcSetup(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_DA
OMXBuffer->nTimeStamp = pSrcInputData->timeStamp;
OMXBuffer->nFlags = pSrcInputData->nFlags;
- Exynos_OMX_OutputBufferReturn(pOMXComponent, OMXBuffer);
-
- ret = OMX_ErrorNone;
+ ret = Exynos_OMX_OutputBufferReturn(pOMXComponent, OMXBuffer);
+ if (ret != OMX_ErrorNone) {
+ goto EXIT;
+ }
goto EXIT;
}
@@ -1087,14 +1056,11 @@ OMX_ERRORTYPE Mpeg4CodecDstSetup(OMX_COMPONENTTYPE *pOMXComponent)
EXYNOS_MPEG4ENC_HANDLE *pMpeg4Enc = (EXYNOS_MPEG4ENC_HANDLE *)((EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
EXYNOS_MFC_MPEG4ENC_HANDLE *pMFCMpeg4Handle = &pMpeg4Enc->hMFCMpeg4Handle;
void *hMFCHandle = pMFCMpeg4Handle->hMFCHandle;
- EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
- ExynosVideoEncOps *pEncOps = pMpeg4Enc->hMFCMpeg4Handle.pEncOps;
- ExynosVideoEncBufferOps *pInbufOps = pMpeg4Enc->hMFCMpeg4Handle.pInbufOps;
ExynosVideoEncBufferOps *pOutbufOps = pMpeg4Enc->hMFCMpeg4Handle.pOutbufOps;
ExynosVideoGeometry bufferConf;
- int i, nOutbufs, nPlanes, OutBufferSize;
+ int i, nPlanes, OutBufferSize;
FunctionIn();
@@ -1154,8 +1120,15 @@ OMX_ERRORTYPE Mpeg4CodecDstSetup(OMX_COMPONENTTYPE *pOMXComponent)
for (i = 0; i < MFC_OUTPUT_BUFFER_NUM_MAX; i++) {
ExynosVideoPlane plane;
pVideoEnc->pMFCEncOutputBuffer[i] = (CODEC_ENC_BUFFER *)Exynos_OSAL_Malloc(sizeof(CODEC_ENC_BUFFER));
+
+ if (pVideoEnc->pMFCEncOutputBuffer[i] == NULL) {
+ Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "Failed to Alloc output buffer");
+ ret = OMX_ErrorInsufficientResources;
+ goto EXIT;
+ }
pVideoEnc->pMFCEncOutputBuffer[i]->pVirAddr[0] =
(void *)Exynos_OSAL_SharedMemory_Alloc(pVideoEnc->hSharedMemory, OutBufferSize, NORMAL_MEMORY);
+
if (pVideoEnc->pMFCEncOutputBuffer[i]->pVirAddr[0] == NULL) {
Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "Failed to Alloc output buffer");
ret = OMX_ErrorInsufficientResources;
@@ -1686,7 +1659,7 @@ OMX_ERRORTYPE Exynos_Mpeg4Enc_SetConfig(
pVideoEnc = (EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle;
pMpeg4Enc = (EXYNOS_MPEG4ENC_HANDLE *)pVideoEnc->hCodecHandle;
- switch (nIndex) {
+ switch ((EXYNOS_OMX_INDEXTYPE)nIndex) {
case OMX_IndexConfigVideoIntraPeriod:
{
OMX_U32 nPFrames = (*((OMX_U32 *)pComponentConfigStructure)) - 1;
@@ -1816,15 +1789,11 @@ OMX_ERRORTYPE Exynos_Mpeg4Enc_Init(OMX_COMPONENTTYPE *pOMXComponent)
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
EXYNOS_MPEG4ENC_HANDLE *pMpeg4Enc = (EXYNOS_MPEG4ENC_HANDLE *)((EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;;
- EXYNOS_MFC_MPEG4ENC_HANDLE *pMFCMpeg4Handle = &pMpeg4Enc->hMFCMpeg4Handle;
- OMX_PTR hMFCHandle = pMpeg4Enc->hMFCMpeg4Handle.hMFCHandle;
OMX_COLOR_FORMATTYPE eColorFormat;
- ExynosVideoEncOps *pEncOps = NULL;
- ExynosVideoEncBufferOps *pInbufOps = NULL;
- ExynosVideoEncBufferOps *pOutbufOps = NULL;
CSC_METHOD csc_method = CSC_METHOD_SW;
+
int i = 0;
FunctionIn();
@@ -1845,8 +1814,8 @@ OMX_ERRORTYPE Exynos_Mpeg4Enc_Init(OMX_COMPONENTTYPE *pOMXComponent)
}
#endif
} else {
- if (eColorFormat == OMX_SEC_COLOR_FormatNV12L_DmaBuf_Fd ||
- eColorFormat == OMX_SEC_COLOR_FormatNV12T_DmaBuf_Fd) {
+ if (eColorFormat == (OMX_COLOR_FORMATTYPE)OMX_SEC_COLOR_FormatNV12L_DmaBuf_Fd ||
+ eColorFormat == (OMX_COLOR_FORMATTYPE)OMX_SEC_COLOR_FormatNV12T_DmaBuf_Fd) {
pExynosInputPort->bufferProcessType = BUFFER_SHARE;
} else {
pExynosInputPort->bufferProcessType = BUFFER_COPY;
@@ -1859,10 +1828,6 @@ OMX_ERRORTYPE Exynos_Mpeg4Enc_Init(OMX_COMPONENTTYPE *pOMXComponent)
goto EXIT;
}
- pEncOps = pMpeg4Enc->hMFCMpeg4Handle.pEncOps;
- pInbufOps = pMpeg4Enc->hMFCMpeg4Handle.pInbufOps;
- pOutbufOps = pMpeg4Enc->hMFCMpeg4Handle.pOutbufOps;
-
if (pExynosInputPort->bufferProcessType & BUFFER_COPY) {
Exynos_OSAL_SemaphoreCreate(&pExynosInputPort->codecSemID);
Exynos_OSAL_QueueCreate(&pExynosInputPort->codecBufferQ, MAX_QUEUE_ELEMENTS);
@@ -1870,6 +1835,11 @@ OMX_ERRORTYPE Exynos_Mpeg4Enc_Init(OMX_COMPONENTTYPE *pOMXComponent)
if (pMpeg4Enc->hMFCMpeg4Handle.bShareableBuf == OMX_TRUE) {
for (i = 0; i < MFC_INPUT_BUFFER_NUM_MAX; i++) {
pVideoEnc->pMFCEncInputBuffer[i] = Exynos_OSAL_Malloc(sizeof(CODEC_ENC_BUFFER));
+ if (pVideoEnc->pMFCEncInputBuffer[i] == NULL) {
+ Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "Failed to Alloc input buffer");
+ ret = OMX_ErrorInsufficientResources;
+ goto EXIT;
+ }
/* Use ION Allocator */
/*Alloc Y-Buffer */
pVideoEnc->pMFCEncInputBuffer[i]->pVirAddr[0] = (void *)Exynos_OSAL_SharedMemory_Alloc(pVideoEnc->hSharedMemory, DEFAULT_MFC_INPUT_YBUFFER_SIZE, NORMAL_MEMORY);
@@ -1959,13 +1929,8 @@ OMX_ERRORTYPE Exynos_Mpeg4Enc_Terminate(OMX_COMPONENTTYPE *pOMXComponent)
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
EXYNOS_MPEG4ENC_HANDLE *pMpeg4Enc = (EXYNOS_MPEG4ENC_HANDLE *)((EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
- OMX_PTR hMFCHandle = pMpeg4Enc->hMFCMpeg4Handle.hMFCHandle;
-
- ExynosVideoEncOps *pEncOps = pMpeg4Enc->hMFCMpeg4Handle.pEncOps;
- ExynosVideoEncBufferOps *pInbufOps = pMpeg4Enc->hMFCMpeg4Handle.pInbufOps;
- ExynosVideoEncBufferOps *pOutbufOps = pMpeg4Enc->hMFCMpeg4Handle.pOutbufOps;
- int i = 0, plane = 0;
+ int i = 0;
FunctionIn();
@@ -1986,7 +1951,7 @@ OMX_ERRORTYPE Exynos_Mpeg4Enc_Terminate(OMX_COMPONENTTYPE *pOMXComponent)
for (i = 0; i < MFC_INPUT_BUFFER_NUM_MAX; i++) {
if (pVideoEnc->pMFCEncInputBuffer[i] != NULL) {
#ifndef TIZEN_FEATURE_E3250 /* do not use ion */
- for (plane = 0; plane < MFC_INPUT_BUFFER_PLANE; plane++) {
+ for (int plane = 0; plane < MFC_INPUT_BUFFER_PLANE; plane++) {
if (pVideoEnc->pMFCEncInputBuffer[i]->pVirAddr[plane] != NULL)
Exynos_OSAL_SharedMemory_Free(pVideoEnc->hSharedMemory, pVideoEnc->pMFCEncInputBuffer[i]->pVirAddr[plane]);
}
@@ -2010,7 +1975,7 @@ OMX_ERRORTYPE Exynos_Mpeg4Enc_Terminate(OMX_COMPONENTTYPE *pOMXComponent)
for (i = 0; i < MFC_INPUT_BUFFER_NUM_MAX; i++) {
if (pVideoEnc->pMFCEncInputBuffer[i] != NULL) {
#ifndef TIZEN_FEATURE_E3250 /* do not use ion */
- for (plane = 0; plane < MFC_INPUT_BUFFER_PLANE; plane++) {
+ for (int plane = 0; plane < MFC_INPUT_BUFFER_PLANE; plane++) {
if (pVideoEnc->pMFCEncInputBuffer[i]->pVirAddr[plane] != NULL)
Exynos_OSAL_SharedMemory_Free(pVideoEnc->hSharedMemory, pVideoEnc->pMFCEncInputBuffer[i]->pVirAddr[plane]);
}
@@ -2030,7 +1995,6 @@ OMX_ERRORTYPE Exynos_Mpeg4Enc_Terminate(OMX_COMPONENTTYPE *pOMXComponent)
}
Mpeg4CodecClose(pMpeg4Enc);
-EXIT:
FunctionOut();
return ret;
@@ -2044,13 +2008,10 @@ OMX_ERRORTYPE Exynos_Mpeg4Enc_SrcIn(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX
EXYNOS_MPEG4ENC_HANDLE *pMpeg4Enc = (EXYNOS_MPEG4ENC_HANDLE *)((EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
void *hMFCHandle = pMpeg4Enc->hMFCMpeg4Handle.hMFCHandle;
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
- EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
OMX_U32 oneFrameSize = pSrcInputData->dataLen;
ExynosVideoEncOps *pEncOps = pMpeg4Enc->hMFCMpeg4Handle.pEncOps;
ExynosVideoEncBufferOps *pInbufOps = pMpeg4Enc->hMFCMpeg4Handle.pInbufOps;
- ExynosVideoEncBufferOps *pOutbufOps = pMpeg4Enc->hMFCMpeg4Handle.pOutbufOps;
ExynosVideoErrorType codecReturn = VIDEO_ERROR_NONE;
- int i;
FunctionIn();
@@ -2074,9 +2035,8 @@ OMX_ERRORTYPE Exynos_Mpeg4Enc_SrcIn(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX
}
- if ((pSrcInputData->dataLen >= 0) ||
- ((pSrcInputData->nFlags & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS)) {
- OMX_U32 pMFCYUVDataSize[MFC_INPUT_BUFFER_PLANE] = {NULL, NULL};
+ if ((pSrcInputData->nFlags & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS) {
+ OMX_U32 pMFCYUVDataSize[MFC_INPUT_BUFFER_PLANE] = {0, };
ExynosVideoPlane planes[MFC_INPUT_BUFFER_PLANE];
int plane;
@@ -2154,7 +2114,6 @@ OMX_ERRORTYPE Exynos_Mpeg4Enc_SrcOut(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OM
EXYNOS_MPEG4ENC_HANDLE *pMpeg4Enc = (EXYNOS_MPEG4ENC_HANDLE *)((EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
void *hMFCHandle = pMpeg4Enc->hMFCMpeg4Handle.hMFCHandle;
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
- ExynosVideoEncOps *pEncOps = pMpeg4Enc->hMFCMpeg4Handle.pEncOps;
ExynosVideoEncBufferOps *pInbufOps = pMpeg4Enc->hMFCMpeg4Handle.pInbufOps;
ExynosVideoBuffer *pVideoBuffer;
@@ -2213,10 +2172,8 @@ OMX_ERRORTYPE Exynos_Mpeg4Enc_DstIn(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
- EXYNOS_OMX_VIDEOENC_COMPONENT *pVideoEnc = (EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle;
EXYNOS_MPEG4ENC_HANDLE *pMpeg4Enc = (EXYNOS_MPEG4ENC_HANDLE *)((EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
void *hMFCHandle = pMpeg4Enc->hMFCMpeg4Handle.hMFCHandle;
- ExynosVideoEncOps *pEncOps = pMpeg4Enc->hMFCMpeg4Handle.pEncOps;
ExynosVideoEncBufferOps *pOutbufOps = pMpeg4Enc->hMFCMpeg4Handle.pOutbufOps;
OMX_U32 dataLen = 0;
ExynosVideoErrorType codecReturn = VIDEO_ERROR_NONE;
@@ -2252,13 +2209,12 @@ OMX_ERRORTYPE Exynos_Mpeg4Enc_DstOut(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OM
OMX_ERRORTYPE ret = OMX_ErrorNone;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
EXYNOS_OMX_VIDEOENC_COMPONENT *pVideoEnc = (EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle;
- EXYNOS_MPEG4ENC_HANDLE *pMpeg4Enc = (EXYNOS_MPEG4ENC_HANDLE *)((EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
+ EXYNOS_MPEG4ENC_HANDLE *pMpeg4Enc = (EXYNOS_MPEG4ENC_HANDLE *)pVideoEnc->hCodecHandle;
void *hMFCHandle = pMpeg4Enc->hMFCMpeg4Handle.hMFCHandle;
ExynosVideoEncOps *pEncOps = pMpeg4Enc->hMFCMpeg4Handle.pEncOps;
ExynosVideoEncBufferOps *pOutbufOps = pMpeg4Enc->hMFCMpeg4Handle.pOutbufOps;
ExynosVideoBuffer *pVideoBuffer;
ExynosVideoFrameStatusType displayStatus = VIDEO_FRAME_STATUS_UNKNOWN;
- ExynosVideoGeometry bufferGeometry;
OMX_S32 indexTimestamp = 0;
FunctionIn();
@@ -2287,7 +2243,6 @@ OMX_ERRORTYPE Exynos_Mpeg4Enc_DstOut(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OM
pDstOutputData->bufferHeader = (OMX_BUFFERHEADERTYPE *)pVideoBuffer->pPrivate;
if (pVideoEnc->bFirstOutput == OMX_FALSE) {
- OMX_U8 *p = NULL;
pDstOutputData->timeStamp = 0;
pDstOutputData->nFlags |= OMX_BUFFERFLAG_CODECCONFIG;
@@ -2326,7 +2281,6 @@ OMX_ERRORTYPE Exynos_Mpeg4Enc_srcInputBufferProcess(OMX_COMPONENTTYPE *pOMXCompo
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
- EXYNOS_MPEG4ENC_HANDLE *pMpeg4Enc = (EXYNOS_MPEG4ENC_HANDLE *)((EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
FunctionIn();
@@ -2683,9 +2637,12 @@ OMX_ERRORTYPE Exynos_OMX_ComponentDeinit(OMX_HANDLETYPE hComponent)
OMX_ERRORTYPE ret = OMX_ErrorNone;
OMX_COMPONENTTYPE *pOMXComponent = NULL;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = NULL;
- EXYNOS_OMX_VIDEOENC_COMPONENT *pVideoEnc = NULL;
EXYNOS_MPEG4ENC_HANDLE *pMpeg4Enc = NULL;
+#ifndef TIZEN_FEATURE_E3250 /* do not use ion */
+ EXYNOS_OMX_VIDEOENC_COMPONENT *pVideoEnc = NULL;
+ pVideoEnc = (EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle;
+#endif
FunctionIn();
if (hComponent == NULL) {
@@ -2694,7 +2651,6 @@ OMX_ERRORTYPE Exynos_OMX_ComponentDeinit(OMX_HANDLETYPE hComponent)
}
pOMXComponent = (OMX_COMPONENTTYPE *)hComponent;
pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
- pVideoEnc = (EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle;
#ifndef TIZEN_FEATURE_E3250 /* do not use ion */
Exynos_OSAL_SharedMemory_Close(pVideoEnc->hSharedMemory);
#endif
diff --git a/openmax/component/video/enc/mpeg4/Exynos_OMX_Mpeg4enc.h b/openmax/component/video/enc/mpeg4/Exynos_OMX_Mpeg4enc.h
index 37792bb..6db3033 100644..100755
--- a/openmax/component/video/enc/mpeg4/Exynos_OMX_Mpeg4enc.h
+++ b/openmax/component/video/enc/mpeg4/Exynos_OMX_Mpeg4enc.h
@@ -49,9 +49,9 @@ typedef struct _EXYNOS_MFC_MPEG4ENC_HANDLE
OMX_BOOL bConfiguredMFCDst;
CODEC_TYPE codecType;
- ExynosVideoDecOps *pEncOps;
- ExynosVideoDecBufferOps *pInbufOps;
- ExynosVideoDecBufferOps *pOutbufOps;
+ ExynosVideoEncOps *pEncOps;
+ ExynosVideoEncBufferOps *pInbufOps;
+ ExynosVideoEncBufferOps *pOutbufOps;
ExynosVideoEncParam encParam;
} EXYNOS_MFC_MPEG4ENC_HANDLE;
diff --git a/openmax/core/Exynos_OMX_Component_Register.c b/openmax/core/Exynos_OMX_Component_Register.c
index 37415c2..544d4af 100644..100755
--- a/openmax/core/Exynos_OMX_Component_Register.c
+++ b/openmax/core/Exynos_OMX_Component_Register.c
@@ -48,10 +48,8 @@
OMX_ERRORTYPE Exynos_OMX_Component_Register(EXYNOS_OMX_COMPONENT_REGLIST **compList, OMX_U32 *compNum)
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
- int componentNum = 0, roleNum = 0, totalCompNum = 0;
- int read;
+ int componentNum = 0, totalCompNum = 0;
char *libName;
- size_t len;
const char *errorMsg;
DIR *dir;
struct dirent *d;
@@ -139,13 +137,10 @@ EXIT:
OMX_ERRORTYPE Exynos_OMX_Component_Unregister(EXYNOS_OMX_COMPONENT_REGLIST *componentList)
{
- OMX_ERRORTYPE ret = OMX_ErrorNone;
-
Exynos_OSAL_Memset(componentList, 0, sizeof(EXYNOS_OMX_COMPONENT_REGLIST) * MAX_OMX_COMPONENT_NUM);
Exynos_OSAL_Free(componentList);
-EXIT:
- return ret;
+ return OMX_ErrorNone;
}
OMX_ERRORTYPE Exynos_OMX_ComponentAPICheck(OMX_COMPONENTTYPE *component)
diff --git a/openmax/core/Exynos_OMX_Core.c b/openmax/core/Exynos_OMX_Core.c
index 0cabd0a..e783ea5 100644..100755
--- a/openmax/core/Exynos_OMX_Core.c
+++ b/openmax/core/Exynos_OMX_Core.c
@@ -260,20 +260,14 @@ OMX_API OMX_ERRORTYPE OMX_APIENTRY Exynos_OMX_SetupTunnel(
OMX_IN OMX_HANDLETYPE hInput,
OMX_IN OMX_U32 nPortInput)
{
- OMX_ERRORTYPE ret = OMX_ErrorNotImplemented;
-
-EXIT:
- return ret;
+ return OMX_ErrorNotImplemented;
}
OMX_API OMX_ERRORTYPE Exynos_OMX_GetContentPipe(
OMX_OUT OMX_HANDLETYPE *hPipe,
OMX_IN OMX_STRING szURI)
{
- OMX_ERRORTYPE ret = OMX_ErrorNotImplemented;
-
-EXIT:
- return ret;
+ return OMX_ErrorNotImplemented;
}
OMX_API OMX_ERRORTYPE Exynos_OMX_GetComponentsOfRole (
@@ -283,7 +277,6 @@ OMX_API OMX_ERRORTYPE Exynos_OMX_GetComponentsOfRole (
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
int max_role_num = 0;
- OMX_STRING RoleString[MAX_OMX_COMPONENT_ROLE_SIZE];
int i = 0, j = 0;
FunctionIn();
diff --git a/openmax/osal/Exynos_OSAL_Event.c b/openmax/osal/Exynos_OSAL_Event.c
index ef14f85..b686f4d 100644..100755
--- a/openmax/osal/Exynos_OSAL_Event.c
+++ b/openmax/osal/Exynos_OSAL_Event.c
@@ -30,6 +30,7 @@
#include <string.h>
#include <pthread.h>
#include <errno.h>
+#include <sys/time.h>
#include "Exynos_OSAL_Memory.h"
#include "Exynos_OSAL_Mutex.h"
diff --git a/openmax/osal/Exynos_OSAL_Log.h b/openmax/osal/Exynos_OSAL_Log.h
index 66657cb..32d90aa 100755
--- a/openmax/osal/Exynos_OSAL_Log.h
+++ b/openmax/osal/Exynos_OSAL_Log.h
@@ -81,10 +81,15 @@ typedef enum _LOG_LEVEL
#define OMX_DEBUG_LEVEL 2 /* EXYNOS_LOG_INFO */
+#undef ALOGV
#define ALOGV(...) Exynos_OSAL_Log(EXYNOS_LOG_VERVOSE, __VA_ARGS__)
+#undef ALOGD
#define ALOGD(...) Exynos_OSAL_Log(EXYNOS_LOG_TRACE, __VA_ARGS__)
+#undef ALOGI
#define ALOGI(...) Exynos_OSAL_Log(EXYNOS_LOG_INFO, __VA_ARGS__)
+#undef ALOGW
#define ALOGW(...) Exynos_OSAL_Log(EXYNOS_LOG_WARNING, __VA_ARGS__)
+#undef ALOGE
#define ALOGE(...) Exynos_OSAL_Log(EXYNOS_LOG_ERROR, __VA_ARGS__)
#ifndef EXYNOS_LOG_TAG
diff --git a/openmax/osal/Exynos_OSAL_Mutex.c b/openmax/osal/Exynos_OSAL_Mutex.c
index 4ef773c..511a715 100644..100755
--- a/openmax/osal/Exynos_OSAL_Mutex.c
+++ b/openmax/osal/Exynos_OSAL_Mutex.c
@@ -66,7 +66,6 @@ OMX_ERRORTYPE Exynos_OSAL_MutexTerminate(OMX_HANDLETYPE mutexHandle)
OMX_ERRORTYPE Exynos_OSAL_MutexLock(OMX_HANDLETYPE mutexHandle)
{
pthread_mutex_t *mutex = (pthread_mutex_t *)mutexHandle;
- int result;
if (mutex == NULL)
return OMX_ErrorBadParameter;
@@ -80,7 +79,6 @@ OMX_ERRORTYPE Exynos_OSAL_MutexLock(OMX_HANDLETYPE mutexHandle)
OMX_ERRORTYPE Exynos_OSAL_MutexUnlock(OMX_HANDLETYPE mutexHandle)
{
pthread_mutex_t *mutex = (pthread_mutex_t *)mutexHandle;
- int result;
if (mutex == NULL)
return OMX_ErrorBadParameter;
diff --git a/openmax/osal/Exynos_OSAL_Platform_Specific.c b/openmax/osal/Exynos_OSAL_Platform_Specific.c
index e82d3d9..796b145 100755
--- a/openmax/osal/Exynos_OSAL_Platform_Specific.c
+++ b/openmax/osal/Exynos_OSAL_Platform_Specific.c
@@ -28,6 +28,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <mm_types.h>
#include "Exynos_OSAL_Semaphore.h"
@@ -105,9 +106,9 @@ OMX_ERRORTYPE Exynos_OSAL_LockPBHandle(
vplanes[2].addr = vaddr[2];
Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "%s: buffer locked: 0x%x", __func__, *vaddr);
-#endif
EXIT:
+#endif
FunctionOut();
return ret;
@@ -132,9 +133,10 @@ OMX_ERRORTYPE Exynos_OSAL_UnlockPBHandle(OMX_IN OMX_U32 handle)
}
Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "%s: buffer unlocked: 0x%x", __func__, handle);
-#endif
EXIT:
+#endif
+
FunctionOut();
return ret;
@@ -168,7 +170,7 @@ OMX_ERRORTYPE Exynos_OSAL_LockPB(
vplanes[1].addr = buffer->data[1]; //vaddr[1];
vplanes[2].addr = NULL; //vaddr[2];
- Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "Exynos_OSAL_LockPB:fd[0](%d) fd[1](%d) a[0](%p) a[1](%p)",
+ Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "Exynos_OSAL_LockPB:fd[0](%d) fd[1](%d) a[0](%p) a[1](%p)",
buffer->handle.dmabuf_fd[0], buffer->handle.dmabuf_fd[1], buffer->data[0], buffer->data[1]);
#else
android_native_buffer_t *pANB = (android_native_buffer_t *) pBuffer;
@@ -177,7 +179,6 @@ OMX_ERRORTYPE Exynos_OSAL_LockPB(
*pStride = pANB->stride;
#endif
-EXIT:
FunctionOut();
return ret;
@@ -461,7 +462,6 @@ OMX_ERRORTYPE Exynos_OSAL_SetPBParameter(
OMX_ERRORTYPE ret = OMX_ErrorNone;
OMX_COMPONENTTYPE *pOMXComponent = NULL;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = NULL;
- EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = NULL;
FunctionIn();
@@ -492,9 +492,7 @@ OMX_ERRORTYPE Exynos_OSAL_SetPBParameter(
goto EXIT;
}
- pVideoDec = (EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle;
-
- switch (nIndex) {
+ switch ((int)nIndex) {
#ifdef TIZEN_FEATURE_E3250
case OMX_IndexParamEnablePlatformSpecificBuffers:
#else
diff --git a/openmax/osal/Exynos_OSAL_SharedMemory.c b/openmax/osal/Exynos_OSAL_SharedMemory.c
index 93c2416..0514f9a 100755
--- a/openmax/osal/Exynos_OSAL_SharedMemory.c
+++ b/openmax/osal/Exynos_OSAL_SharedMemory.c
@@ -38,7 +38,9 @@
#include <fcntl.h>
#include <sys/mman.h>
+#include "Exynos_OSAL_Memory.h"
#include "Exynos_OSAL_SharedMemory.h"
+#include "Exynos_OSAL_Mutex.h"
#include "ion.h"
#define EXYNOS_LOG_OFF
@@ -74,7 +76,7 @@ OMX_HANDLETYPE Exynos_OSAL_SharedMemory_Open()
if (pHandle == NULL)
goto EXIT;
- IONClient = (OMX_HANDLETYPE)ion_client_create();
+ IONClient = ion_client_create();
if (IONClient <= 0) {
Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "ion_client_create Error: %d", IONClient);
Exynos_OSAL_Free((void *)pHandle);
@@ -82,7 +84,7 @@ OMX_HANDLETYPE Exynos_OSAL_SharedMemory_Open()
goto EXIT;
}
- pHandle->hIONHandle = IONClient;
+ pHandle->hIONHandle = (OMX_HANDLETYPE)IONClient;
Exynos_OSAL_MutexCreate(&pHandle->hSMMutex);
@@ -299,7 +301,7 @@ OMX_PTR Exynos_OSAL_SharedMemory_Map(OMX_HANDLETYPE handle, OMX_U32 size, unsign
pElement = (EXYNOS_SHAREDMEM_LIST *)Exynos_OSAL_Malloc(sizeof(EXYNOS_SHAREDMEM_LIST));
Exynos_OSAL_Memset(pElement, 0, sizeof(EXYNOS_SHAREDMEM_LIST));
- IONBuffer = (OMX_PTR)ionfd;
+ IONBuffer = (ion_buffer)ionfd;
if (IONBuffer <= 0) {
Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "ion_alloc Error: %d", IONBuffer);
diff --git a/packaging/libomxil-e3250-v4l2.spec b/packaging/libomxil-e3250-v4l2.spec
index 94612a9..8b5ccac 100755
--- a/packaging/libomxil-e3250-v4l2.spec
+++ b/packaging/libomxil-e3250-v4l2.spec
@@ -56,8 +56,6 @@ make
%install
rm -rf %{buildroot}
-mkdir -p %{buildroot}/usr/share/license
-cp COPYING %{buildroot}/usr/share/license/%{name}
%make_install
@@ -70,7 +68,7 @@ cp COPYING %{buildroot}/usr/share/license/%{name}
%manifest libomxil-e3250-v4l2.manifest
%{_libdir}/*.so*
%{_libdir}/omx/*.so
-%{_datadir}/license/%{name}
+%license COPYING
%files devel