Skip to content

Commit

Permalink
videocodec: Streamline TARGET_SOC check
Browse files Browse the repository at this point in the history
 * Add Exynos7880 support.

Change-Id: I846742dec07d070d131079acf9c1aeb161480967
  • Loading branch information
raymanfx committed Jul 26, 2017
1 parent d8394ec commit 6159ec1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 27 deletions.
24 changes: 2 additions & 22 deletions libvideocodec/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -34,28 +34,8 @@ ifeq ($(BOARD_USE_HEVC_HWIP), true)
LOCAL_CFLAGS += -DUSE_HEVC_HWIP
endif

ifeq ($(TARGET_SOC), exynos5422)
LOCAL_CFLAGS += -DSOC_EXYNOS5430
endif

ifeq ($(TARGET_SOC), exynos5430)
LOCAL_CFLAGS += -DSOC_EXYNOS5430
endif

ifeq ($(TARGET_SOC), exynos5433)
LOCAL_CFLAGS += -DSOC_EXYNOS5430
endif

ifeq ($(TARGET_SOC), exynos7420)
LOCAL_CFLAGS += -DSOC_EXYNOS5430
endif

ifeq ($(TARGET_SOC), exynos7580)
LOCAL_CFLAGS += -DSOC_EXYNOS5430
endif

ifeq ($(TARGET_SOC), exynos8890)
LOCAL_CFLAGS += -DSOC_EXYNOS5430
ifneq ($(filter exynos5422 exynos5430 exynos5433 exynos7420 exynos7580 exynos7880 exynos8890, $(TARGET_SOC)),)
LOCAL_CFLAGS += -DNEW_API
endif

LOCAL_MODULE := libExynosVideoApi
Expand Down
4 changes: 2 additions & 2 deletions libvideocodec/dec/ExynosVideoDecoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -1818,7 +1818,7 @@ static ExynosVideoErrorType MFC_Decoder_Enqueue_Inbuf(
// FIXME: figure out why |pPrivate| may be NULL.
if (pPrivate &&
(((OMX_BUFFERHEADERTYPE *)pPrivate)->nFlags & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS) {
#ifdef SOC_EXYNOS5430
#ifdef NEW_API
buf.reserved2 = LAST_FRAME;
ALOGD("%s: OMX_BUFFERFLAG_EOS => LAST_FRAME: 0x%x", __func__, buf.reserved2);
#else
Expand Down Expand Up @@ -2376,7 +2376,7 @@ static ExynosVideoErrorType MFC_Decoder_ExtensionEnqueue_Inbuf(
// FIXME: figure out why |pPrivate| may be NULL.
if (pPrivate &&
(((OMX_BUFFERHEADERTYPE *)pPrivate)->nFlags & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS) {
#ifdef SOC_EXYNOS5430
#ifdef NEW_API
buf.reserved2 = LAST_FRAME;
ALOGD("%s: OMX_BUFFERFLAG_EOS => LAST_FRAME: 0x%x", __func__, buf.reserved2);
#else
Expand Down
6 changes: 3 additions & 3 deletions libvideocodec/enc/ExynosVideoEncoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ static ExynosVideoErrorType MFC_Encoder_Set_EncParam (
ext_ctrl[47].id = V4L2_CID_MPEG_VIDEO_H264_SEI_FP_CURRENT_FRAME_0;
ext_ctrl[47].value = 0;
ext_ctrl[48].id = V4L2_CID_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE;
#ifdef SOC_EXYNOS5430
#ifdef NEW_API
ext_ctrl[48].value = V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_SIDE_BY_SIDE;
#else
ext_ctrl[48].value = V4L2_MPEG_VIDEO_H264_SEI_FP_TYPE_SIDE_BY_SIDE;
Expand Down Expand Up @@ -2158,7 +2158,7 @@ static ExynosVideoErrorType MFC_Encoder_Enqueue_Inbuf(
}

if ((((OMX_BUFFERHEADERTYPE *)pPrivate)->nFlags & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS) {
#ifdef SOC_EXYNOS5430
#ifdef NEW_API
buf.reserved2 = LAST_FRAME;
ALOGD("%s: OMX_BUFFERFLAG_EOS => LAST_FRAME: 0x%x", __func__, buf.reserved);
#else
Expand Down Expand Up @@ -2595,7 +2595,7 @@ static ExynosVideoErrorType MFC_Encoder_ExtensionEnqueue_Inbuf(
}

if ((((OMX_BUFFERHEADERTYPE *)pPrivate)->nFlags & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS) {
#ifdef SOC_EXYNOS5430
#ifdef NEW_API
buf.reserved2 = LAST_FRAME;
ALOGD("%s: OMX_BUFFERFLAG_EOS => LAST_FRAME: 0x%x", __func__, buf.reserved2);
#else
Expand Down

0 comments on commit 6159ec1

Please sign in to comment.