mirror of
https://github.com/Evolution-X-Devices/hardware_samsung_slsi-linaro_openmax
synced 2026-01-27 15:45:39 +00:00
Add original Samsung hardware projects
Change-Id: I79380bc91acf57ca5f3e56fb64af76f4c45f6566 Signed-off-by: Sam Protsenko <joe.skb7@gmail.com>
This commit is contained in:
61
openmax/component/video/dec/Android.mk
Normal file
61
openmax/component/video/dec/Android.mk
Normal file
@@ -0,0 +1,61 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
Exynos_OMX_VdecControl.c \
|
||||
Exynos_OMX_Vdec.c
|
||||
|
||||
LOCAL_MODULE := libExynosOMX_Vdec
|
||||
LOCAL_ARM_MODE := arm
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_PROPRIETARY_MODULE := true
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(EXYNOS_OMX_INC)/exynos \
|
||||
$(EXYNOS_OMX_TOP)/osal \
|
||||
$(EXYNOS_OMX_TOP)/core \
|
||||
$(EXYNOS_OMX_COMPONENT)/common \
|
||||
$(EXYNOS_OMX_COMPONENT)/video/dec \
|
||||
$(EXYNOS_VIDEO_CODEC)/include \
|
||||
$(TOP)/hardware/samsung_slsi/exynos/include \
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := libExynosVideoApi libVendorVideoApi libExynosOMX_OSAL
|
||||
LOCAL_SHARED_LIBRARIES := liblog
|
||||
|
||||
ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
|
||||
LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
|
||||
LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
|
||||
else
|
||||
ifeq ($(BOARD_USE_ANDROID), true)
|
||||
LOCAL_HEADER_LIBRARIES := media_plugin_headers
|
||||
LOCAL_CFLAGS += -DUSE_ANDROID
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_DMA_BUF), true)
|
||||
LOCAL_CFLAGS += -DUSE_DMA_BUF
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_CSC_HW), true)
|
||||
LOCAL_CFLAGS += -DUSE_CSC_HW
|
||||
endif
|
||||
|
||||
ifeq ($(EXYNOS_OMX_SUPPORT_TUNNELING), true)
|
||||
LOCAL_CFLAGS += -DTUNNELING_SUPPORT
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_SMALL_SECURE_MEMORY), true)
|
||||
LOCAL_CFLAGS += -DUSE_SMALL_SECURE_MEMORY
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_COMPRESSED_COLOR), true)
|
||||
LOCAL_CFLAGS += -DUSE_COMPRESSED_COLOR
|
||||
endif
|
||||
|
||||
ifdef BOARD_EXYNOS_S10B_FORMAT_ALIGN
|
||||
LOCAL_CFLAGS += -DS10B_FORMAT_8B_ALIGNMENT=$(BOARD_EXYNOS_S10B_FORMAT_ALIGN)
|
||||
endif
|
||||
|
||||
LOCAL_CFLAGS += -Wno-unused-variable -Wno-unused-label
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
2102
openmax/component/video/dec/Exynos_OMX_Vdec.c
Normal file
2102
openmax/component/video/dec/Exynos_OMX_Vdec.c
Normal file
File diff suppressed because it is too large
Load Diff
226
openmax/component/video/dec/Exynos_OMX_Vdec.h
Normal file
226
openmax/component/video/dec/Exynos_OMX_Vdec.h
Normal file
@@ -0,0 +1,226 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2012 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file Exynos_OMX_Vdec.h
|
||||
* @brief
|
||||
* @author SeungBeom Kim (sbcrux.kim@samsung.com)
|
||||
* HyeYeon Chung (hyeon.chung@samsung.com)
|
||||
* Yunji Kim (yunji.kim@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2012.02.20 : Create
|
||||
*/
|
||||
|
||||
#ifndef EXYNOS_OMX_VIDEO_DECODE
|
||||
#define EXYNOS_OMX_VIDEO_DECODE
|
||||
|
||||
#include "OMX_Component.h"
|
||||
#include "Exynos_OMX_Def.h"
|
||||
#include "Exynos_OSAL_Queue.h"
|
||||
#include "Exynos_OMX_Baseport.h"
|
||||
#include "Exynos_OMX_Basecomponent.h"
|
||||
#include "VendorVideoAPI.h"
|
||||
#include "ExynosVideoApi.h"
|
||||
|
||||
#define MAX_VIDEO_INPUTBUFFER_NUM 5
|
||||
#define MIN_VIDEO_INPUTBUFFER_NUM 2
|
||||
#define MAX_VIDEO_OUTPUTBUFFER_NUM 4
|
||||
|
||||
#define MAX_FRAME_WIDTH 1920
|
||||
#define MAX_FRAME_HEIGHT 1080
|
||||
|
||||
#define DEFAULT_VIDEO_INPUT_BUFFER_SIZE (DEFAULT_FRAME_WIDTH * DEFAULT_FRAME_HEIGHT) * 2
|
||||
#define DEFAULT_VIDEO_OUTPUT_BUFFER_SIZE (DEFAULT_FRAME_WIDTH * DEFAULT_FRAME_HEIGHT * 3) / 2
|
||||
|
||||
#define MFC_INPUT_BUFFER_NUM_MAX 3
|
||||
|
||||
/* min size of input buffer for DRC */
|
||||
#define DEFAULT_VIDEO_MIN_INPUT_BUFFER_SIZE (1024 * 1024 * 3 / 2) /* 1.5MB */
|
||||
|
||||
/* input buffer size for custom component */
|
||||
#define CUSTOM_DEFAULT_VIDEO_INPUT_BUFFER_SIZE (1024 * 1024 * 7) /* 7MB */
|
||||
#define CUSTOM_OVER_4K_VIDEO_INPUT_BUFFER_SIZE (1024 * 1024 * 15) /* 15MB */
|
||||
#define CUSTOM_LIMITED_DRM_INPUT_BUFFER_SIZE (1024 * 1024 * 5 / 2) /* 2.5MB : For projects which has small vstream heap */
|
||||
|
||||
#define MFC_OUTPUT_BUFFER_NUM_MAX 16 * 2
|
||||
#define DEFAULT_MFC_OUTPUT_YBUFFER_SIZE MAX_FRAME_WIDTH * MAX_FRAME_HEIGHT
|
||||
#define DEFAULT_MFC_OUTPUT_CBUFFER_SIZE MAX_FRAME_WIDTH * MAX_FRAME_HEIGHT / 2
|
||||
|
||||
#define INPUT_PORT_SUPPORTFORMAT_NUM_MAX 1
|
||||
#define OUTPUT_PORT_SUPPORTFORMAT_DEFAULT_NUM 3 /* I420P, NV12, RGBA */
|
||||
#define OUTPUT_PORT_SUPPORTFORMAT_NUM_MAX (OUTPUT_PORT_SUPPORTFORMAT_DEFAULT_NUM + 4) /* NV12T, YV12, NV21, UNUSED */
|
||||
|
||||
#define EXTRA_DPB_NUM 5
|
||||
|
||||
#define MFC_DEFAULT_INPUT_BUFFER_PLANE 1
|
||||
#define MFC_DEFAULT_OUTPUT_BUFFER_PLANE 2
|
||||
|
||||
#define MAX_INPUTBUFFER_NUM_DYNAMIC 0 /* Dynamic number of metadata buffer */
|
||||
#define MAX_OUTPUTBUFFER_NUM_DYNAMIC 0 /* Dynamic number of metadata buffer */
|
||||
|
||||
#define MAX_SECURE_INPUT_BUFFER_SIZE ((3 * 1024 * 1024) / 2) /* 1.5MB */
|
||||
|
||||
#define DEC_BLOCKS_PER_SECOND 979200 /* remove it and have to read a capability at media_codecs.xml */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
void *pAddrY;
|
||||
void *pAddrC;
|
||||
} CODEC_DEC_ADDR_INFO;
|
||||
|
||||
typedef struct _BYPASS_BUFFER_INFO
|
||||
{
|
||||
OMX_U32 nFlags;
|
||||
OMX_TICKS timeStamp;
|
||||
} BYPASS_BUFFER_INFO;
|
||||
|
||||
typedef struct _CODEC_DEC_BUFFER
|
||||
{
|
||||
void *pVirAddr[MAX_BUFFER_PLANE]; /* virtual address */
|
||||
unsigned int bufferSize[MAX_BUFFER_PLANE]; /* buffer alloc size */
|
||||
unsigned long fd[MAX_BUFFER_PLANE]; /* buffer FD */
|
||||
int dataSize; /* total data length */
|
||||
} CODEC_DEC_BUFFER;
|
||||
|
||||
typedef struct _DECODE_CODEC_EXTRA_BUFFERINFO
|
||||
{
|
||||
OMX_U32 imageWidth; /* original info of contents */
|
||||
OMX_U32 imageHeight; /* original info of contents */
|
||||
OMX_U32 imageStride; /* the size applibed H/W alignment. it is including padding data */
|
||||
OMX_CONFIG_RECTTYPE cropRect; /* original info of contents */
|
||||
OMX_COLOR_FORMATTYPE colorFormat;
|
||||
PrivateDataShareBuffer PDSB;
|
||||
ExynosHdrDynamicInfo HDRDynamic;
|
||||
} DECODE_CODEC_EXTRA_BUFFERINFO;
|
||||
|
||||
typedef struct _EXYNOS_OMX_CURRENT_FRAME_TIMESTAMP
|
||||
{
|
||||
OMX_S32 nIndex;
|
||||
OMX_TICKS timeStamp;
|
||||
OMX_U32 nFlags;
|
||||
} EXYNOS_OMX_CURRENT_FRAME_TIMESTAMP;
|
||||
|
||||
typedef enum _EXYNOS_OMX_DATA_TYPE {
|
||||
DATA_TYPE_8BIT = 0x00,
|
||||
DATA_TYPE_10BIT = 0x01,
|
||||
DATA_TYPE_8BIT_WITH_2BIT = 0x11,
|
||||
DATA_TYPE_8BIT_SBWC = 0x100,
|
||||
DATA_TYPE_10BIT_SBWC = 0x101,
|
||||
} EXYNOS_OMX_DATA_TYPE;
|
||||
|
||||
typedef struct _EXYNOS_OMX_VIDEODEC_COMPONENT
|
||||
{
|
||||
OMX_HANDLETYPE hCodecHandle;
|
||||
OMX_BOOL bDiscardCSDError; /* if it is true, discard a error event in CorruptedHeader case */
|
||||
OMX_BOOL bForceHeaderParsing;
|
||||
OMX_BOOL bThumbnailMode;
|
||||
OMX_BOOL bDTSMode; /* true:Decoding Time Stamp, false:Presentation Time Stamp */
|
||||
OMX_BOOL bReorderMode; /* true:use Time Stamp reordering, don't care about a mode like as PTS or DTS */
|
||||
EXYNOS_OMX_DATA_TYPE eDataType;
|
||||
OMX_BOOL bQosChanged;
|
||||
OMX_U32 nQosRatio;
|
||||
OMX_U32 nOperatingRate;
|
||||
OMX_U32 nPriority;
|
||||
OMX_BOOL bSearchBlackBarChanged; /* true: Notify BlackBar searching option(en/disable) was changed */
|
||||
OMX_BOOL bSearchBlackBar; /* true: BlackBar searching enable, false: disable */
|
||||
OMX_CONFIG_RECTTYPE blackBarCropRect;
|
||||
OMX_U32 nMinInBufSize; /* required min size of input buffer for DRC */
|
||||
CODEC_DEC_BUFFER *pMFCDecInputBuffer[MFC_INPUT_BUFFER_NUM_MAX];
|
||||
CODEC_DEC_BUFFER *pMFCDecOutputBuffer[MFC_OUTPUT_BUFFER_NUM_MAX];
|
||||
|
||||
/* Buffer Process */
|
||||
OMX_BOOL bExitBufferProcessThread;
|
||||
OMX_HANDLETYPE hSrcInputThread;
|
||||
OMX_HANDLETYPE hSrcOutputThread;
|
||||
OMX_HANDLETYPE hDstInputThread;
|
||||
OMX_HANDLETYPE hDstOutputThread;
|
||||
|
||||
/* Shared Memory Handle */
|
||||
OMX_HANDLETYPE hSharedMemory;
|
||||
|
||||
/* For Reconfiguration DPB */
|
||||
OMX_BOOL bReconfigDPB;
|
||||
|
||||
/* For DPB Reference Handling (by OMX or MFC Driver) */
|
||||
OMX_BOOL bDrvDPBManaging;
|
||||
|
||||
/* For SBWC Decoding */
|
||||
OMX_COLOR_FORMATTYPE nCompColorFormat;
|
||||
|
||||
/* Protecting S/W Encoder uses SBWC by ConsumerUsage */
|
||||
OMX_BOOL bForceUseNonCompFormat;
|
||||
|
||||
/* For Ref Cnt handling about graphic buffer */
|
||||
OMX_HANDLETYPE hRefHandle;
|
||||
|
||||
/* CSC handle */
|
||||
OMX_PTR csc_handle;
|
||||
OMX_U32 csc_set_format;
|
||||
|
||||
/* For Image conversion when it is available */
|
||||
OMX_HANDLETYPE hImgConv;
|
||||
OMX_U32 nImageConvMode;
|
||||
|
||||
/* Performance handle */
|
||||
OMX_HANDLETYPE pPerfHandle;
|
||||
|
||||
OMX_ERRORTYPE (*exynos_codec_srcInputProcess) (OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_DATA *pInputData);
|
||||
OMX_ERRORTYPE (*exynos_codec_srcOutputProcess) (OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_DATA *pInputData);
|
||||
OMX_ERRORTYPE (*exynos_codec_dstInputProcess) (OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_DATA *pOutputData);
|
||||
OMX_ERRORTYPE (*exynos_codec_dstOutputProcess) (OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_DATA *pOutputData);
|
||||
|
||||
OMX_ERRORTYPE (*exynos_codec_start)(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortIndex);
|
||||
OMX_ERRORTYPE (*exynos_codec_stop)(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortIndex);
|
||||
OMX_ERRORTYPE (*exynos_codec_bufferProcessRun)(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortIndex);
|
||||
OMX_ERRORTYPE (*exynos_codec_enqueueAllBuffer)(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortIndex);
|
||||
|
||||
OMX_ERRORTYPE (*exynos_codec_getCodecOutputPrivateData) (OMX_PTR codecBuffer, OMX_PTR addr[], OMX_U32 size[]);
|
||||
|
||||
OMX_ERRORTYPE (*exynos_codec_reconfigAllBuffers) (OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortIndex);
|
||||
OMX_BOOL (*exynos_codec_checkFormatSupport)(EXYNOS_OMX_BASECOMPONENT *pExynosComponent, OMX_COLOR_FORMATTYPE eColorFormat);
|
||||
OMX_ERRORTYPE (*exynos_codec_checkResolutionChange)(OMX_COMPONENTTYPE *pOMXComponent);
|
||||
|
||||
OMX_ERRORTYPE (*exynos_codec_updateExtraInfo)(OMX_COMPONENTTYPE *pOMXComponent, ExynosVideoMeta *pMeta);
|
||||
} EXYNOS_OMX_VIDEODEC_COMPONENT;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void Exynos_UpdateFrameSize(OMX_COMPONENTTYPE *pOMXComponent);
|
||||
void Exynos_Output_SetSupportFormat(EXYNOS_OMX_BASECOMPONENT *pExynosComponent);
|
||||
void Exynos_SetReorderTimestamp(EXYNOS_OMX_BASECOMPONENT *pExynosComponent, OMX_U32 *nIndex, OMX_TICKS timeStamp, OMX_U32 nFlags);
|
||||
void Exynos_GetReorderTimestamp(EXYNOS_OMX_BASECOMPONENT *pExynosComponent, EXYNOS_OMX_CURRENT_FRAME_TIMESTAMP *sCurrentTimestamp, OMX_S32 nFrameIndex, OMX_S32 eFrameType);
|
||||
OMX_BOOL Exynos_Check_BufferProcess_State(EXYNOS_OMX_BASECOMPONENT *pExynosComponent, OMX_U32 nPortIndex);
|
||||
OMX_ERRORTYPE Exynos_CodecBufferToData(CODEC_DEC_BUFFER *codecBuffer, EXYNOS_OMX_DATA *pData, OMX_U32 nPortIndex);
|
||||
OMX_BOOL Exynos_Preprocessor_InputData(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_DATA *srcInputData);
|
||||
OMX_ERRORTYPE Exynos_OMX_SrcInputBufferProcess(OMX_HANDLETYPE hComponent);
|
||||
OMX_ERRORTYPE Exynos_OMX_SrcOutputBufferProcess(OMX_HANDLETYPE hComponent);
|
||||
OMX_ERRORTYPE Exynos_OMX_DstInputBufferProcess(OMX_HANDLETYPE hComponent);
|
||||
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_Allocate_CodecBuffers(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortIndex, int nBufferCnt, unsigned int nAllocSize[MAX_BUFFER_PLANE]);
|
||||
void Exynos_Free_CodecBuffers(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortIndex);
|
||||
OMX_ERRORTYPE Exynos_ResetAllPortConfig(OMX_COMPONENTTYPE *pOMXComponent);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
2648
openmax/component/video/dec/Exynos_OMX_VdecControl.c
Normal file
2648
openmax/component/video/dec/Exynos_OMX_VdecControl.c
Normal file
File diff suppressed because it is too large
Load Diff
117
openmax/component/video/dec/Exynos_OMX_VdecControl.h
Normal file
117
openmax/component/video/dec/Exynos_OMX_VdecControl.h
Normal file
@@ -0,0 +1,117 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2012 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file Exynos_OMX_VdecControl.h
|
||||
* @brief
|
||||
* @author SeungBeom Kim (sbcrux.kim@samsung.com)
|
||||
* Taehwan Kim (t_h.kim@samsung.com)
|
||||
* @version 2.5.0
|
||||
* @history
|
||||
* 2012.02.20 : Create
|
||||
* 2017.08.03 : Change event handling
|
||||
*/
|
||||
|
||||
#ifndef EXYNOS_OMX_VIDEO_DECODECONTROL
|
||||
#define EXYNOS_OMX_VIDEO_DECODECONTROL
|
||||
|
||||
#include "OMX_Component.h"
|
||||
#include "Exynos_OMX_Def.h"
|
||||
#include "Exynos_OSAL_Queue.h"
|
||||
#include "Exynos_OMX_Baseport.h"
|
||||
#include "Exynos_OMX_Basecomponent.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
OMX_ERRORTYPE Exynos_OMX_UseBuffer(
|
||||
OMX_IN OMX_HANDLETYPE hComponent,
|
||||
OMX_INOUT OMX_BUFFERHEADERTYPE **ppBufferHdr,
|
||||
OMX_IN OMX_U32 nPortIndex,
|
||||
OMX_IN OMX_PTR pAppPrivate,
|
||||
OMX_IN OMX_U32 nSizeBytes,
|
||||
OMX_IN OMX_U8 *pBuffer);
|
||||
OMX_ERRORTYPE Exynos_OMX_AllocateBuffer(
|
||||
OMX_IN OMX_HANDLETYPE hComponent,
|
||||
OMX_INOUT OMX_BUFFERHEADERTYPE **ppBuffer,
|
||||
OMX_IN OMX_U32 nPortIndex,
|
||||
OMX_IN OMX_PTR pAppPrivate,
|
||||
OMX_IN OMX_U32 nSizeBytes);
|
||||
OMX_ERRORTYPE Exynos_OMX_FreeBuffer(
|
||||
OMX_IN OMX_HANDLETYPE hComponent,
|
||||
OMX_IN OMX_U32 nPortIndex,
|
||||
OMX_IN OMX_BUFFERHEADERTYPE *pBufferHdr);
|
||||
|
||||
#ifdef TUNNELING_SUPPORT
|
||||
OMX_ERRORTYPE Exynos_OMX_AllocateTunnelBuffer(
|
||||
EXYNOS_OMX_BASEPORT *pOMXBasePort,
|
||||
OMX_U32 nPortIndex);
|
||||
OMX_ERRORTYPE Exynos_OMX_FreeTunnelBuffer(
|
||||
EXYNOS_OMX_BASEPORT *pOMXBasePort,
|
||||
OMX_U32 nPortIndex);
|
||||
OMX_ERRORTYPE Exynos_OMX_ComponentTunnelRequest(
|
||||
OMX_IN OMX_HANDLETYPE hComp,
|
||||
OMX_IN OMX_U32 nPort,
|
||||
OMX_IN OMX_HANDLETYPE hTunneledComp,
|
||||
OMX_IN OMX_U32 nTunneledPort,
|
||||
OMX_INOUT OMX_TUNNELSETUPTYPE *pTunnelSetup);
|
||||
#endif
|
||||
|
||||
OMX_ERRORTYPE Exynos_OMX_VideoDecodeGetParameter(
|
||||
OMX_IN OMX_HANDLETYPE hComponent,
|
||||
OMX_IN OMX_INDEXTYPE nParamIndex,
|
||||
OMX_INOUT OMX_PTR ComponentParameterStructure);
|
||||
OMX_ERRORTYPE Exynos_OMX_VideoDecodeSetParameter(
|
||||
OMX_IN OMX_HANDLETYPE hComponent,
|
||||
OMX_IN OMX_INDEXTYPE nIndex,
|
||||
OMX_IN OMX_PTR ComponentParameterStructure);
|
||||
OMX_ERRORTYPE Exynos_OMX_VideoDecodeGetConfig(
|
||||
OMX_HANDLETYPE hComponent,
|
||||
OMX_INDEXTYPE nIndex,
|
||||
OMX_PTR pComponentConfigStructure);
|
||||
OMX_ERRORTYPE Exynos_OMX_VideoDecodeSetConfig(
|
||||
OMX_HANDLETYPE hComponent,
|
||||
OMX_INDEXTYPE nIndex,
|
||||
OMX_PTR pComponentConfigStructure);
|
||||
OMX_ERRORTYPE Exynos_OMX_VideoDecodeGetExtensionIndex(
|
||||
OMX_IN OMX_HANDLETYPE hComponent,
|
||||
OMX_IN OMX_STRING cParameterName,
|
||||
OMX_OUT OMX_INDEXTYPE *pIndexType);
|
||||
|
||||
OMX_ERRORTYPE Exynos_InputBufferReturn(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_DATABUFFER *pDataBuffer);
|
||||
OMX_ERRORTYPE Exynos_OutputBufferReturn(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_DATABUFFER *pDataBuffer);
|
||||
OMX_ERRORTYPE Exynos_OMX_BufferFlush(OMX_COMPONENTTYPE *pOMXComponent, OMX_S32 nPortIndex, OMX_BOOL bEvent);
|
||||
|
||||
OMX_BUFFERHEADERTYPE *Exynos_OutputBufferGetQueue_Direct(EXYNOS_OMX_BASECOMPONENT *pExynosComponent);
|
||||
OMX_ERRORTYPE Exynos_InputBufferGetQueue(EXYNOS_OMX_BASECOMPONENT *pExynosComponent);
|
||||
OMX_ERRORTYPE Exynos_OutputBufferGetQueue(EXYNOS_OMX_BASECOMPONENT *pExynosComponent);
|
||||
|
||||
OMX_ERRORTYPE Exynos_CodecBufferEnQueue(EXYNOS_OMX_BASECOMPONENT *pExynosComponent, OMX_U32 PortIndex, OMX_PTR data);
|
||||
OMX_ERRORTYPE Exynos_CodecBufferDeQueue(EXYNOS_OMX_BASECOMPONENT *pExynosComponent, OMX_U32 PortIndex, OMX_PTR *data);
|
||||
OMX_ERRORTYPE Exynos_CodecBufferReset(EXYNOS_OMX_BASECOMPONENT *pExynosComponent, OMX_U32 PortIndex);
|
||||
|
||||
OMX_ERRORTYPE Exynos_Shared_BufferToData(EXYNOS_OMX_BASEPORT *pExynosPort, EXYNOS_OMX_DATABUFFER *pUseBuffer, EXYNOS_OMX_DATA *pData);
|
||||
OMX_ERRORTYPE Exynos_Shared_DataToBuffer(EXYNOS_OMX_BASEPORT *pExynosPort, EXYNOS_OMX_DATABUFFER *pUseBuffer, EXYNOS_OMX_DATA *pData);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
190
openmax/component/video/dec/NOTICE
Normal file
190
openmax/component/video/dec/NOTICE
Normal file
@@ -0,0 +1,190 @@
|
||||
|
||||
Copyright (c) 2014, The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
97
openmax/component/video/dec/h264/Android.mk
Normal file
97
openmax/component/video/dec/h264/Android.mk
Normal file
@@ -0,0 +1,97 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
Exynos_OMX_H264dec.c \
|
||||
library_register.c
|
||||
|
||||
LOCAL_PRELINK_MODULE := false
|
||||
LOCAL_MODULE := libOMX.Exynos.AVC.Decoder
|
||||
LOCAL_MODULE_RELATIVE_PATH := omx
|
||||
LOCAL_PROPRIETARY_MODULE := true
|
||||
|
||||
LOCAL_CFLAGS :=
|
||||
|
||||
ifeq ($(BOARD_USE_DMA_BUF), true)
|
||||
LOCAL_CFLAGS += -DUSE_DMA_BUF
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_S3D_SUPPORT), true)
|
||||
LOCAL_CFLAGS += -DUSE_S3D_SUPPORT
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_CSC_HW), true)
|
||||
LOCAL_CFLAGS += -DUSE_CSC_HW
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_CUSTOM_COMPONENT_SUPPORT), true)
|
||||
LOCAL_CFLAGS += -DUSE_CUSTOM_COMPONENT_SUPPORT
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_SINGLE_PLANE_IN_DRM), true)
|
||||
LOCAL_CFLAGS += -DUSE_SINGLE_PLANE_IN_DRM
|
||||
endif
|
||||
|
||||
ifdef BOARD_EXYNOS_S10B_FORMAT_ALIGN
|
||||
LOCAL_CFLAGS += -DS10B_FORMAT_8B_ALIGNMENT=$(BOARD_EXYNOS_S10B_FORMAT_ALIGN)
|
||||
endif
|
||||
|
||||
LOCAL_ARM_MODE := arm
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := libExynosOMX_Vdec libVendorVideoApi libExynosOMX_OSAL libExynosOMX_Basecomponent \
|
||||
libExynosVideoApi
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
libc \
|
||||
libcutils \
|
||||
libutils \
|
||||
libdl \
|
||||
liblog \
|
||||
libhardware \
|
||||
libhidlbase \
|
||||
libui \
|
||||
libexynosgraphicbuffer \
|
||||
libstagefright_foundation \
|
||||
libexynosv4l2 \
|
||||
libion_exynos \
|
||||
libcsc \
|
||||
libExynosOMX_Resourcemanager \
|
||||
libepicoperator
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(EXYNOS_OMX_INC)/exynos \
|
||||
$(EXYNOS_OMX_TOP)/osal \
|
||||
$(EXYNOS_OMX_TOP)/core \
|
||||
$(EXYNOS_OMX_COMPONENT)/common \
|
||||
$(EXYNOS_OMX_COMPONENT)/video/dec \
|
||||
$(EXYNOS_VIDEO_CODEC)/include \
|
||||
$(TOP)/hardware/samsung_slsi/exynos/include \
|
||||
|
||||
ifeq ($(BOARD_USE_SKYPE_HD), true)
|
||||
LOCAL_CFLAGS += -DUSE_SKYPE_HD
|
||||
LOCAL_CFLAGS += -DBUILD_DEC
|
||||
LOCAL_STATIC_LIBRARIES += libExynosOMX_SkypeHD_Dec
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
|
||||
LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
|
||||
LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
|
||||
else
|
||||
ifeq ($(BOARD_USE_ANDROID), true)
|
||||
LOCAL_HEADER_LIBRARIES := media_plugin_headers
|
||||
LOCAL_CFLAGS += -DUSE_ANDROID
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_SMALL_SECURE_MEMORY), true)
|
||||
LOCAL_CFLAGS += -DUSE_SMALL_SECURE_MEMORY
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_COMPRESSED_COLOR), true)
|
||||
LOCAL_CFLAGS += -DUSE_COMPRESSED_COLOR
|
||||
endif
|
||||
|
||||
LOCAL_CFLAGS += -Wno-unused-variable -Wno-unused-label
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
3865
openmax/component/video/dec/h264/Exynos_OMX_H264dec.c
Normal file
3865
openmax/component/video/dec/h264/Exynos_OMX_H264dec.c
Normal file
File diff suppressed because it is too large
Load Diff
105
openmax/component/video/dec/h264/Exynos_OMX_H264dec.h
Normal file
105
openmax/component/video/dec/h264/Exynos_OMX_H264dec.h
Normal file
@@ -0,0 +1,105 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2012 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file Exynos_OMX_H264dec.h
|
||||
* @brief
|
||||
* @author SeungBeom Kim (sbcrux.kim@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2012.02.20 : Create
|
||||
*/
|
||||
|
||||
#ifndef EXYNOS_OMX_H264_DEC_COMPONENT
|
||||
#define EXYNOS_OMX_H264_DEC_COMPONENT
|
||||
|
||||
#include "Exynos_OMX_Def.h"
|
||||
#include "OMX_Component.h"
|
||||
#include "OMX_Video.h"
|
||||
#include "ExynosVideoApi.h"
|
||||
#include "library_register.h"
|
||||
|
||||
|
||||
typedef struct _EXYNOS_MFC_H264DEC_HANDLE
|
||||
{
|
||||
OMX_HANDLETYPE hMFCHandle;
|
||||
OMX_U32 indexTimestamp;
|
||||
OMX_U32 outputIndexTimestamp;
|
||||
OMX_BOOL bConfiguredMFCSrc;
|
||||
OMX_BOOL bConfiguredMFCDst;
|
||||
OMX_S32 maxDPBNum;
|
||||
|
||||
/* for custom component(MSRND) */
|
||||
#define MAX_H264_DISPLAYDELAY_VALIDNUM 8
|
||||
OMX_U32 nDisplayDelay;
|
||||
|
||||
/* skype */
|
||||
OMX_BOOL bLowLatency;
|
||||
|
||||
/* extra info which will be shared with renderer */
|
||||
int interlacedType;
|
||||
ExynosVideoHdrInfo sHdrInfo;
|
||||
OMX_U32 nActualFormat;
|
||||
|
||||
#ifdef USE_S3D_SUPPORT
|
||||
EXYNOS_OMX_FPARGMT_TYPE S3DFPArgmtType;
|
||||
#endif
|
||||
|
||||
ExynosVideoColorFormatType MFCOutputColorType;
|
||||
ExynosVideoDecOps *pDecOps;
|
||||
ExynosVideoDecBufferOps *pInbufOps;
|
||||
ExynosVideoDecBufferOps *pOutbufOps;
|
||||
ExynosVideoGeometry codecOutbufConf;
|
||||
ExynosVideoInstInfo videoInstInfo;
|
||||
|
||||
#define MAX_PROFILE_NUM 5
|
||||
OMX_VIDEO_AVCPROFILETYPE profiles[MAX_PROFILE_NUM];
|
||||
OMX_S32 nProfileCnt;
|
||||
OMX_VIDEO_AVCLEVELTYPE maxLevel;
|
||||
} EXYNOS_MFC_H264DEC_HANDLE;
|
||||
|
||||
typedef struct _EXYNOS_H264DEC_HANDLE
|
||||
{
|
||||
/* OMX Codec specific */
|
||||
OMX_VIDEO_PARAM_AVCTYPE AVCComponent[ALL_PORT_NUM];
|
||||
OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE errorCorrectionType[ALL_PORT_NUM];
|
||||
|
||||
/* EXYNOS MFC Codec specific */
|
||||
EXYNOS_MFC_H264DEC_HANDLE hMFCH264Handle;
|
||||
|
||||
OMX_BOOL bSourceStart;
|
||||
OMX_BOOL bDestinationStart;
|
||||
OMX_HANDLETYPE hSourceStartEvent;
|
||||
OMX_HANDLETYPE hDestinationInStartEvent;
|
||||
OMX_HANDLETYPE hDestinationOutStartEvent;
|
||||
|
||||
EXYNOS_QUEUE bypassBufferInfoQ;
|
||||
} EXYNOS_H264DEC_HANDLE;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
OSCL_EXPORT_REF OMX_ERRORTYPE Exynos_OMX_ComponentInit(OMX_HANDLETYPE hComponent, OMX_STRING componentName);
|
||||
OMX_ERRORTYPE Exynos_OMX_ComponentDeinit(OMX_HANDLETYPE hComponent);
|
||||
OMX_ERRORTYPE H264CodecDstSetup(OMX_COMPONENTTYPE *pOMXComponent);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
190
openmax/component/video/dec/h264/NOTICE
Normal file
190
openmax/component/video/dec/h264/NOTICE
Normal file
@@ -0,0 +1,190 @@
|
||||
|
||||
Copyright (c) 2014, The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
59
openmax/component/video/dec/h264/library_register.c
Normal file
59
openmax/component/video/dec/h264/library_register.c
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2012 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file library_register.c
|
||||
* @brief
|
||||
* @author SeungBeom Kim (sbcrux.kim@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2012.02.20 : Create
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include "Exynos_OSAL_Memory.h"
|
||||
#include "Exynos_OSAL_ETC.h"
|
||||
#include "library_register.h"
|
||||
#include "Exynos_OSAL_Log.h"
|
||||
|
||||
|
||||
OSCL_EXPORT_REF int Exynos_OMX_COMPONENT_Library_Register(ExynosRegisterComponentType **exynosComponents)
|
||||
{
|
||||
FunctionIn();
|
||||
|
||||
if (exynosComponents == NULL)
|
||||
goto EXIT;
|
||||
|
||||
/* component 1 - video decoder H.264 */
|
||||
Exynos_OSAL_Strcpy(exynosComponents[0]->componentName, EXYNOS_OMX_COMPONENT_H264_DEC);
|
||||
Exynos_OSAL_Strcpy(exynosComponents[0]->roles[0], EXYNOS_OMX_COMPONENT_H264_DEC_ROLE);
|
||||
exynosComponents[0]->totalRoleNum = MAX_COMPONENT_ROLE_NUM;
|
||||
|
||||
/* component 2 - video decoder H.264 for DRM */
|
||||
Exynos_OSAL_Strcpy(exynosComponents[1]->componentName, EXYNOS_OMX_COMPONENT_H264_DRM_DEC);
|
||||
Exynos_OSAL_Strcpy(exynosComponents[1]->roles[0], EXYNOS_OMX_COMPONENT_H264_DEC_ROLE);
|
||||
exynosComponents[1]->totalRoleNum = MAX_COMPONENT_ROLE_NUM;
|
||||
|
||||
EXIT:
|
||||
FunctionOut();
|
||||
|
||||
return MAX_COMPONENT_NUM;
|
||||
}
|
||||
62
openmax/component/video/dec/h264/library_register.h
Normal file
62
openmax/component/video/dec/h264/library_register.h
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2012 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file library_register.h
|
||||
* @brief
|
||||
* @author SeungBeom Kim (sbcrux.kim@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2012.02.20 : Create
|
||||
*/
|
||||
|
||||
#ifndef EXYNOS_OMX_H264_REG
|
||||
#define EXYNOS_OMX_H264_REG
|
||||
|
||||
#include "Exynos_OMX_Def.h"
|
||||
#include "OMX_Component.h"
|
||||
#include "Exynos_OMX_Component_Register.h"
|
||||
|
||||
|
||||
#define OSCL_EXPORT_REF __attribute__((visibility("default")))
|
||||
#define MAX_COMPONENT_NUM 2
|
||||
#define MAX_COMPONENT_ROLE_NUM 1
|
||||
|
||||
/* H.264 */
|
||||
#ifndef USE_CUSTOM_COMPONENT_SUPPORT
|
||||
#define EXYNOS_OMX_COMPONENT_H264_DEC "OMX.Exynos.AVC.Decoder"
|
||||
#define EXYNOS_OMX_COMPONENT_H264_DRM_DEC "OMX.Exynos.AVC.Decoder.secure"
|
||||
#else
|
||||
#define EXYNOS_OMX_COMPONENT_H264_DEC "OMX.Exynos.avc.dec"
|
||||
#define EXYNOS_OMX_COMPONENT_H264_DRM_DEC "OMX.Exynos.avc.dec.secure"
|
||||
#endif
|
||||
|
||||
#define EXYNOS_OMX_COMPONENT_H264_DEC_ROLE "video_decoder.avc"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
OSCL_EXPORT_REF int Exynos_OMX_COMPONENT_Library_Register(ExynosRegisterComponentType **exynosComponents);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
96
openmax/component/video/dec/hevc/Android.mk
Normal file
96
openmax/component/video/dec/hevc/Android.mk
Normal file
@@ -0,0 +1,96 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
Exynos_OMX_HEVCdec.c \
|
||||
library_register.c
|
||||
|
||||
LOCAL_PRELINK_MODULE := false
|
||||
LOCAL_MODULE := libOMX.Exynos.HEVC.Decoder
|
||||
LOCAL_MODULE_RELATIVE_PATH := omx
|
||||
LOCAL_PROPRIETARY_MODULE := true
|
||||
|
||||
LOCAL_CFLAGS :=
|
||||
LOCAL_CFLAGS += -DUSE_HEVC_SUPPORT
|
||||
|
||||
ifeq ($(BOARD_USE_DMA_BUF), true)
|
||||
LOCAL_CFLAGS += -DUSE_DMA_BUF
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_S3D_SUPPORT), true)
|
||||
LOCAL_CFLAGS += -DUSE_S3D_SUPPORT
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_CSC_HW), true)
|
||||
LOCAL_CFLAGS += -DUSE_CSC_HW
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_CUSTOM_COMPONENT_SUPPORT), true)
|
||||
LOCAL_CFLAGS += -DUSE_CUSTOM_COMPONENT_SUPPORT
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_SINGLE_PLANE_IN_DRM), true)
|
||||
LOCAL_CFLAGS += -DUSE_SINGLE_PLANE_IN_DRM
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_FULL_ST2094_40), true)
|
||||
LOCAL_CFLAGS += -DUSE_FULL_ST2094_40
|
||||
endif
|
||||
|
||||
ifdef BOARD_EXYNOS_S10B_FORMAT_ALIGN
|
||||
LOCAL_CFLAGS += -DS10B_FORMAT_8B_ALIGNMENT=$(BOARD_EXYNOS_S10B_FORMAT_ALIGN)
|
||||
endif
|
||||
|
||||
LOCAL_ARM_MODE := arm
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := libExynosOMX_Vdec libVendorVideoApi libExynosOMX_OSAL libExynosOMX_Basecomponent \
|
||||
libExynosVideoApi
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
libc \
|
||||
libcutils \
|
||||
libutils \
|
||||
libdl \
|
||||
liblog \
|
||||
libhardware \
|
||||
libhidlbase \
|
||||
libui \
|
||||
libexynosgraphicbuffer \
|
||||
libstagefright_foundation \
|
||||
libexynosv4l2 \
|
||||
libion_exynos \
|
||||
libcsc \
|
||||
libExynosOMX_Resourcemanager \
|
||||
libepicoperator
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(EXYNOS_OMX_INC)/exynos \
|
||||
$(EXYNOS_OMX_TOP)/osal \
|
||||
$(EXYNOS_OMX_TOP)/core \
|
||||
$(EXYNOS_OMX_COMPONENT)/common \
|
||||
$(EXYNOS_OMX_COMPONENT)/video/dec \
|
||||
$(EXYNOS_VIDEO_CODEC)/include \
|
||||
$(TOP)/hardware/samsung_slsi/exynos/include \
|
||||
|
||||
ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
|
||||
LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
|
||||
LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
|
||||
else
|
||||
ifeq ($(BOARD_USE_ANDROID), true)
|
||||
LOCAL_HEADER_LIBRARIES := media_plugin_headers
|
||||
LOCAL_CFLAGS += -DUSE_ANDROID
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_SMALL_SECURE_MEMORY), true)
|
||||
LOCAL_CFLAGS += -DUSE_SMALL_SECURE_MEMORY
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_COMPRESSED_COLOR), true)
|
||||
LOCAL_CFLAGS += -DUSE_COMPRESSED_COLOR
|
||||
endif
|
||||
|
||||
LOCAL_CFLAGS += -Wno-unused-variable -Wno-unused-label
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
4278
openmax/component/video/dec/hevc/Exynos_OMX_HEVCdec.c
Normal file
4278
openmax/component/video/dec/hevc/Exynos_OMX_HEVCdec.c
Normal file
File diff suppressed because it is too large
Load Diff
101
openmax/component/video/dec/hevc/Exynos_OMX_HEVCdec.h
Normal file
101
openmax/component/video/dec/hevc/Exynos_OMX_HEVCdec.h
Normal file
@@ -0,0 +1,101 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2013 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file Exynos_OMX_HEVCdec.h
|
||||
* @brief
|
||||
* @author SeungBeom Kim (sbcrux.kim@samsung.com)
|
||||
* Taehwan Kim (t_h.kim@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2013.07.26 : Create
|
||||
*/
|
||||
|
||||
#ifndef EXYNOS_OMX_HEVC_DEC_COMPONENT
|
||||
#define EXYNOS_OMX_HEVC_DEC_COMPONENT
|
||||
|
||||
#include "Exynos_OMX_Def.h"
|
||||
#include "OMX_Component.h"
|
||||
#include "OMX_Video.h"
|
||||
#include "ExynosVideoApi.h"
|
||||
|
||||
|
||||
typedef struct _EXYNOS_MFC_HEVCDEC_HANDLE
|
||||
{
|
||||
OMX_HANDLETYPE hMFCHandle;
|
||||
OMX_U32 indexTimestamp;
|
||||
OMX_U32 outputIndexTimestamp;
|
||||
OMX_BOOL bConfiguredMFCSrc;
|
||||
OMX_BOOL bConfiguredMFCDst;
|
||||
OMX_S32 maxDPBNum;
|
||||
|
||||
/* for custom component(MSRND) */
|
||||
#define MAX_HEVC_DISPLAYDELAY_VALIDNUM 8
|
||||
OMX_U32 nDisplayDelay;
|
||||
|
||||
/* extra info which will be shared with renderer */
|
||||
ExynosVideoHdrInfo sHdrInfo;
|
||||
OMX_U32 nActualFormat;
|
||||
|
||||
#ifdef USE_S3D_SUPPORT
|
||||
EXYNOS_OMX_FPARGMT_TYPE S3DFPArgmtType;
|
||||
#endif
|
||||
|
||||
ExynosVideoColorFormatType MFCOutputColorType;
|
||||
ExynosVideoDecOps *pDecOps;
|
||||
ExynosVideoDecBufferOps *pInbufOps;
|
||||
ExynosVideoDecBufferOps *pOutbufOps;
|
||||
ExynosVideoGeometry codecOutbufConf;
|
||||
ExynosVideoInstInfo videoInstInfo;
|
||||
|
||||
#define MAX_PROFILE_NUM 4
|
||||
OMX_VIDEO_HEVCPROFILETYPE profiles[MAX_PROFILE_NUM];
|
||||
OMX_S32 nProfileCnt;
|
||||
OMX_VIDEO_HEVCLEVELTYPE maxLevel;
|
||||
} EXYNOS_MFC_HEVCDEC_HANDLE;
|
||||
|
||||
typedef struct _EXYNOS_HEVCDEC_HANDLE
|
||||
{
|
||||
/* OMX Codec specific */
|
||||
OMX_VIDEO_PARAM_HEVCTYPE HevcComponent[ALL_PORT_NUM];
|
||||
OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE errorCorrectionType[ALL_PORT_NUM];
|
||||
|
||||
/* EXYNOS MFC Codec specific */
|
||||
EXYNOS_MFC_HEVCDEC_HANDLE hMFCHevcHandle;
|
||||
|
||||
OMX_BOOL bSourceStart;
|
||||
OMX_BOOL bDestinationStart;
|
||||
OMX_HANDLETYPE hSourceStartEvent;
|
||||
OMX_HANDLETYPE hDestinationInStartEvent;
|
||||
OMX_HANDLETYPE hDestinationOutStartEvent;
|
||||
|
||||
EXYNOS_QUEUE bypassBufferInfoQ;
|
||||
} EXYNOS_HEVCDEC_HANDLE;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
OSCL_EXPORT_REF OMX_ERRORTYPE Exynos_OMX_ComponentInit(OMX_HANDLETYPE hComponent, OMX_STRING componentName);
|
||||
OMX_ERRORTYPE Exynos_OMX_ComponentDeinit(OMX_HANDLETYPE hComponent);
|
||||
OMX_ERRORTYPE HevcCodecDstSetup(OMX_COMPONENTTYPE *pOMXComponent);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
190
openmax/component/video/dec/hevc/NOTICE
Normal file
190
openmax/component/video/dec/hevc/NOTICE
Normal file
@@ -0,0 +1,190 @@
|
||||
|
||||
Copyright (c) 2014, The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
65
openmax/component/video/dec/hevc/library_register.c
Normal file
65
openmax/component/video/dec/hevc/library_register.c
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2013 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file library_register.c
|
||||
* @brief
|
||||
* @author SeungBeom Kim (sbcrux.kim@samsung.com)
|
||||
* Taehwan Kim (t_h.kim@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2013.07.26 : Create
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include "Exynos_OSAL_Memory.h"
|
||||
#include "Exynos_OSAL_ETC.h"
|
||||
#include "library_register.h"
|
||||
|
||||
#undef EXYNOS_LOG_TAG
|
||||
#define EXYNOS_LOG_TAG "EXYNOS_HEVC_DEC"
|
||||
//#define EXYNOS_LOG_OFF
|
||||
#include "Exynos_OSAL_Log.h"
|
||||
|
||||
|
||||
OSCL_EXPORT_REF int Exynos_OMX_COMPONENT_Library_Register(
|
||||
ExynosRegisterComponentType **ppExynosComponent)
|
||||
{
|
||||
FunctionIn();
|
||||
|
||||
if (ppExynosComponent == NULL)
|
||||
goto EXIT;
|
||||
|
||||
/* component 1 - video decoder HEVC */
|
||||
Exynos_OSAL_Strcpy(ppExynosComponent[0]->componentName, EXYNOS_OMX_COMPONENT_HEVC_DEC);
|
||||
Exynos_OSAL_Strcpy(ppExynosComponent[0]->roles[0], EXYNOS_OMX_COMPONENT_HEVC_DEC_ROLE);
|
||||
ppExynosComponent[0]->totalRoleNum = MAX_COMPONENT_ROLE_NUM;
|
||||
|
||||
/* component 2 - video decoder HEVC for DRM */
|
||||
Exynos_OSAL_Strcpy(ppExynosComponent[1]->componentName, EXYNOS_OMX_COMPONENT_HEVC_DRM_DEC);
|
||||
Exynos_OSAL_Strcpy(ppExynosComponent[1]->roles[0], EXYNOS_OMX_COMPONENT_HEVC_DEC_ROLE);
|
||||
ppExynosComponent[1]->totalRoleNum = MAX_COMPONENT_ROLE_NUM;
|
||||
|
||||
EXIT:
|
||||
FunctionOut();
|
||||
|
||||
return MAX_COMPONENT_NUM;
|
||||
}
|
||||
62
openmax/component/video/dec/hevc/library_register.h
Normal file
62
openmax/component/video/dec/hevc/library_register.h
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2013 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file library_register.h
|
||||
* @brief
|
||||
* @author SeungBeom Kim (sbcrux.kim@samsung.com)
|
||||
* Taehwan Kim (t_h.kim@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2013.07.26 : Create
|
||||
*/
|
||||
|
||||
#ifndef EXYNOS_OMX_HEVC_DEC_REG
|
||||
#define EXYNOS_OMX_HEVC_DEC_REG
|
||||
|
||||
#include "Exynos_OMX_Def.h"
|
||||
#include "OMX_Component.h"
|
||||
#include "Exynos_OMX_Component_Register.h"
|
||||
|
||||
|
||||
#define OSCL_EXPORT_REF __attribute__((visibility("default")))
|
||||
#define MAX_COMPONENT_NUM 2
|
||||
#define MAX_COMPONENT_ROLE_NUM 1
|
||||
|
||||
/* HEVC */
|
||||
#ifndef USE_CUSTOM_COMPONENT_SUPPORT
|
||||
#define EXYNOS_OMX_COMPONENT_HEVC_DEC "OMX.Exynos.HEVC.Decoder"
|
||||
#define EXYNOS_OMX_COMPONENT_HEVC_DRM_DEC "OMX.Exynos.HEVC.Decoder.secure"
|
||||
#else
|
||||
#define EXYNOS_OMX_COMPONENT_HEVC_DEC "OMX.Exynos.hevc.dec"
|
||||
#define EXYNOS_OMX_COMPONENT_HEVC_DRM_DEC "OMX.Exynos.hevc.dec.secure"
|
||||
#endif
|
||||
|
||||
#define EXYNOS_OMX_COMPONENT_HEVC_DEC_ROLE "video_decoder.hevc"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
OSCL_EXPORT_REF int Exynos_OMX_COMPONENT_Library_Register(ExynosRegisterComponentType **ppExynosComponent);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
87
openmax/component/video/dec/mpeg2/Android.mk
Normal file
87
openmax/component/video/dec/mpeg2/Android.mk
Normal file
@@ -0,0 +1,87 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
Exynos_OMX_Mpeg2dec.c \
|
||||
library_register.c
|
||||
|
||||
LOCAL_PRELINK_MODULE := false
|
||||
LOCAL_MODULE := libOMX.Exynos.MPEG2.Decoder
|
||||
LOCAL_MODULE_RELATIVE_PATH := omx
|
||||
LOCAL_PROPRIETARY_MODULE := true
|
||||
|
||||
LOCAL_CFLAGS :=
|
||||
|
||||
ifeq ($(BOARD_USE_DMA_BUF), true)
|
||||
LOCAL_CFLAGS += -DUSE_DMA_BUF
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_CSC_HW), true)
|
||||
LOCAL_CFLAGS += -DUSE_CSC_HW
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_CUSTOM_COMPONENT_SUPPORT), true)
|
||||
LOCAL_CFLAGS += -DUSE_CUSTOM_COMPONENT_SUPPORT
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_SINGLE_PLANE_IN_DRM), true)
|
||||
LOCAL_CFLAGS += -DUSE_SINGLE_PLANE_IN_DRM
|
||||
endif
|
||||
|
||||
ifdef BOARD_EXYNOS_S10B_FORMAT_ALIGN
|
||||
LOCAL_CFLAGS += -DS10B_FORMAT_8B_ALIGNMENT=$(BOARD_EXYNOS_S10B_FORMAT_ALIGN)
|
||||
endif
|
||||
|
||||
LOCAL_ARM_MODE := arm
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := libExynosOMX_Vdec libVendorVideoApi libExynosOMX_OSAL libExynosOMX_Basecomponent \
|
||||
libExynosVideoApi
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
libc \
|
||||
libcutils \
|
||||
libutils \
|
||||
libdl \
|
||||
liblog \
|
||||
libhardware \
|
||||
libhidlbase \
|
||||
libui \
|
||||
libexynosgraphicbuffer \
|
||||
libstagefright_foundation \
|
||||
libexynosv4l2 \
|
||||
libion_exynos \
|
||||
libcsc \
|
||||
libExynosOMX_Resourcemanager \
|
||||
libepicoperator
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(EXYNOS_OMX_INC)/exynos \
|
||||
$(EXYNOS_OMX_TOP)/osal \
|
||||
$(EXYNOS_OMX_TOP)/core \
|
||||
$(EXYNOS_OMX_COMPONENT)/common \
|
||||
$(EXYNOS_OMX_COMPONENT)/video/dec \
|
||||
$(EXYNOS_VIDEO_CODEC)/include \
|
||||
$(TOP)/hardware/samsung_slsi/exynos/include \
|
||||
|
||||
ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
|
||||
LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
|
||||
LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
|
||||
else
|
||||
ifeq ($(BOARD_USE_ANDROID), true)
|
||||
LOCAL_HEADER_LIBRARIES := media_plugin_headers
|
||||
LOCAL_CFLAGS += -DUSE_ANDROID
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_SMALL_SECURE_MEMORY), true)
|
||||
LOCAL_CFLAGS += -DUSE_SMALL_SECURE_MEMORY
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_COMPRESSED_COLOR), true)
|
||||
LOCAL_CFLAGS += -DUSE_COMPRESSED_COLOR
|
||||
endif
|
||||
|
||||
LOCAL_CFLAGS += -Wno-unused-variable -Wno-unused-label
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
3439
openmax/component/video/dec/mpeg2/Exynos_OMX_Mpeg2dec.c
Normal file
3439
openmax/component/video/dec/mpeg2/Exynos_OMX_Mpeg2dec.c
Normal file
File diff suppressed because it is too large
Load Diff
97
openmax/component/video/dec/mpeg2/Exynos_OMX_Mpeg2dec.h
Normal file
97
openmax/component/video/dec/mpeg2/Exynos_OMX_Mpeg2dec.h
Normal file
@@ -0,0 +1,97 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2012 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file Exynos_OMX_Mpeg2dec.h
|
||||
* @brief
|
||||
* @author Satish Kumar Reddy (palli.satish@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2012.07.10 : Create
|
||||
*/
|
||||
|
||||
#ifndef EXYNOS_OMX_MPEG2_DEC_COMPONENT
|
||||
#define EXYNOS_OMX_MPEG2_DEC_COMPONENT
|
||||
|
||||
#include "Exynos_OMX_Def.h"
|
||||
#include "OMX_Component.h"
|
||||
#include "OMX_Video.h"
|
||||
#include "ExynosVideoApi.h"
|
||||
|
||||
|
||||
typedef struct _EXYNOS_MFC_MPEG2DEC_HANDLE
|
||||
{
|
||||
OMX_HANDLETYPE hMFCHandle;
|
||||
OMX_U32 indexTimestamp;
|
||||
OMX_U32 outputIndexTimestamp;
|
||||
OMX_BOOL bConfiguredMFCSrc;
|
||||
OMX_BOOL bConfiguredMFCDst;
|
||||
OMX_S32 maxDPBNum;
|
||||
|
||||
/* extra info which will be shared with renderer */
|
||||
int interlacedType;
|
||||
ExynosVideoHdrInfo sHdrInfo;
|
||||
OMX_U32 nActualFormat;
|
||||
|
||||
ExynosVideoColorFormatType MFCOutputColorType;
|
||||
ExynosVideoDecOps *pDecOps;
|
||||
ExynosVideoDecBufferOps *pInbufOps;
|
||||
ExynosVideoDecBufferOps *pOutbufOps;
|
||||
ExynosVideoGeometry codecOutbufConf;
|
||||
ExynosVideoInstInfo videoInstInfo;
|
||||
|
||||
#define MAX_PROFILE_NUM 2
|
||||
OMX_VIDEO_MPEG2PROFILETYPE profiles[MAX_PROFILE_NUM];
|
||||
OMX_S32 nProfileCnt;
|
||||
OMX_VIDEO_MPEG2LEVELTYPE maxLevel;
|
||||
} EXYNOS_MFC_MPEG2DEC_HANDLE;
|
||||
|
||||
typedef struct _EXYNOS_MPEG2DEC_HANDLE
|
||||
{
|
||||
/* OMX Codec specific */
|
||||
OMX_VIDEO_PARAM_MPEG2TYPE Mpeg2Component[ALL_PORT_NUM];
|
||||
OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE errorCorrectionType[ALL_PORT_NUM];
|
||||
|
||||
/* EXYNOS MFC Codec specific */
|
||||
EXYNOS_MFC_MPEG2DEC_HANDLE hMFCMpeg2Handle;
|
||||
|
||||
OMX_BOOL bSourceStart;
|
||||
OMX_BOOL bDestinationStart;
|
||||
OMX_HANDLETYPE hSourceStartEvent;
|
||||
OMX_HANDLETYPE hDestinationInStartEvent;
|
||||
OMX_HANDLETYPE hDestinationOutStartEvent;
|
||||
|
||||
EXYNOS_QUEUE bypassBufferInfoQ;
|
||||
} EXYNOS_MPEG2DEC_HANDLE;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
OSCL_EXPORT_REF OMX_ERRORTYPE Exynos_OMX_ComponentInit(
|
||||
OMX_HANDLETYPE hComponent,
|
||||
OMX_STRING componentName);
|
||||
OMX_ERRORTYPE Exynos_OMX_ComponentDeinit(
|
||||
OMX_HANDLETYPE hComponent);
|
||||
OMX_ERRORTYPE Mpeg2CodecDstSetup(
|
||||
OMX_COMPONENTTYPE *pOMXComponent);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
190
openmax/component/video/dec/mpeg2/NOTICE
Normal file
190
openmax/component/video/dec/mpeg2/NOTICE
Normal file
@@ -0,0 +1,190 @@
|
||||
|
||||
Copyright (c) 2014, The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
59
openmax/component/video/dec/mpeg2/library_register.c
Normal file
59
openmax/component/video/dec/mpeg2/library_register.c
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2012 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file library_register.c
|
||||
* @brief
|
||||
* @author Satish Kumar Reddy (palli.satish@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2012.07.10 : Create
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include "Exynos_OSAL_Memory.h"
|
||||
#include "Exynos_OSAL_ETC.h"
|
||||
#include "library_register.h"
|
||||
|
||||
#undef EXYNOS_LOG_TAG
|
||||
#define EXYNOS_LOG_TAG "EXYNOS_MPEG2_DEC"
|
||||
//#define EXYNOS_LOG_OFF
|
||||
#include "Exynos_OSAL_Log.h"
|
||||
|
||||
|
||||
OSCL_EXPORT_REF int Exynos_OMX_COMPONENT_Library_Register(
|
||||
ExynosRegisterComponentType **ppExynosComponent)
|
||||
{
|
||||
FunctionIn();
|
||||
|
||||
if (ppExynosComponent == NULL)
|
||||
goto EXIT;
|
||||
|
||||
/* component 1 - video decoder MPEG2 */
|
||||
Exynos_OSAL_Strcpy(ppExynosComponent[0]->componentName, EXYNOS_OMX_COMPONENT_MPEG2_DEC);
|
||||
Exynos_OSAL_Strcpy(ppExynosComponent[0]->roles[0], EXYNOS_OMX_COMPONENT_MPEG2_DEC_ROLE);
|
||||
ppExynosComponent[0]->totalRoleNum = MAX_COMPONENT_ROLE_NUM;
|
||||
|
||||
EXIT:
|
||||
FunctionOut();
|
||||
|
||||
return MAX_COMPONENT_NUM;
|
||||
}
|
||||
59
openmax/component/video/dec/mpeg2/library_register.h
Normal file
59
openmax/component/video/dec/mpeg2/library_register.h
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2012 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file library_register.h
|
||||
* @brief
|
||||
* @author Satish Kumar Reddy (palli.satish@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2012.07.10 : Create
|
||||
*/
|
||||
|
||||
#ifndef EXYNOS_OMX_MPEG2_DEC_REG
|
||||
#define EXYNOS_OMX_MPEG2_DEC_REG
|
||||
|
||||
#include "Exynos_OMX_Def.h"
|
||||
#include "OMX_Component.h"
|
||||
#include "Exynos_OMX_Component_Register.h"
|
||||
|
||||
|
||||
#define OSCL_EXPORT_REF __attribute__((visibility("default")))
|
||||
#define MAX_COMPONENT_NUM 1
|
||||
#define MAX_COMPONENT_ROLE_NUM 1
|
||||
|
||||
#ifndef USE_CUSTOM_COMPONENT_SUPPORT
|
||||
#define EXYNOS_OMX_COMPONENT_MPEG2_DEC "OMX.Exynos.MPEG2.Decoder"
|
||||
#else
|
||||
#define EXYNOS_OMX_COMPONENT_MPEG2_DEC "OMX.Exynos.mpeg2.dec"
|
||||
#endif
|
||||
|
||||
#define EXYNOS_OMX_COMPONENT_MPEG2_DEC_ROLE "video_decoder.mpeg2"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
OSCL_EXPORT_REF int Exynos_OMX_COMPONENT_Library_Register(
|
||||
ExynosRegisterComponentType **ppExynosComponent);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
87
openmax/component/video/dec/mpeg4/Android.mk
Normal file
87
openmax/component/video/dec/mpeg4/Android.mk
Normal file
@@ -0,0 +1,87 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
Exynos_OMX_Mpeg4dec.c \
|
||||
library_register.c
|
||||
|
||||
LOCAL_PRELINK_MODULE := false
|
||||
LOCAL_MODULE := libOMX.Exynos.MPEG4.Decoder
|
||||
LOCAL_MODULE_RELATIVE_PATH := omx
|
||||
LOCAL_PROPRIETARY_MODULE := true
|
||||
|
||||
LOCAL_CFLAGS :=
|
||||
|
||||
ifeq ($(BOARD_USE_DMA_BUF), true)
|
||||
LOCAL_CFLAGS += -DUSE_DMA_BUF
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_CSC_HW), true)
|
||||
LOCAL_CFLAGS += -DUSE_CSC_HW
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_CUSTOM_COMPONENT_SUPPORT), true)
|
||||
LOCAL_CFLAGS += -DUSE_CUSTOM_COMPONENT_SUPPORT
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_SINGLE_PLANE_IN_DRM), true)
|
||||
LOCAL_CFLAGS += -DUSE_SINGLE_PLANE_IN_DRM
|
||||
endif
|
||||
|
||||
ifdef BOARD_EXYNOS_S10B_FORMAT_ALIGN
|
||||
LOCAL_CFLAGS += -DS10B_FORMAT_8B_ALIGNMENT=$(BOARD_EXYNOS_S10B_FORMAT_ALIGN)
|
||||
endif
|
||||
|
||||
LOCAL_ARM_MODE := arm
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := libExynosOMX_Vdec libVendorVideoApi libExynosOMX_OSAL libExynosOMX_Basecomponent \
|
||||
libExynosVideoApi
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
libc \
|
||||
libcutils \
|
||||
libutils \
|
||||
libdl \
|
||||
liblog \
|
||||
libhardware \
|
||||
libhidlbase \
|
||||
libui \
|
||||
libexynosgraphicbuffer \
|
||||
libstagefright_foundation \
|
||||
libexynosv4l2 \
|
||||
libion_exynos \
|
||||
libcsc \
|
||||
libExynosOMX_Resourcemanager \
|
||||
libepicoperator
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(EXYNOS_OMX_INC)/exynos \
|
||||
$(EXYNOS_OMX_TOP)/osal \
|
||||
$(EXYNOS_OMX_TOP)/core \
|
||||
$(EXYNOS_OMX_COMPONENT)/common \
|
||||
$(EXYNOS_OMX_COMPONENT)/video/dec \
|
||||
$(EXYNOS_VIDEO_CODEC)/include \
|
||||
$(TOP)/hardware/samsung_slsi/exynos/include \
|
||||
|
||||
ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
|
||||
LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
|
||||
LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
|
||||
else
|
||||
ifeq ($(BOARD_USE_ANDROID), true)
|
||||
LOCAL_HEADER_LIBRARIES := media_plugin_headers
|
||||
LOCAL_CFLAGS += -DUSE_ANDROID
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_SMALL_SECURE_MEMORY), true)
|
||||
LOCAL_CFLAGS += -DUSE_SMALL_SECURE_MEMORY
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_COMPRESSED_COLOR), true)
|
||||
LOCAL_CFLAGS += -DUSE_COMPRESSED_COLOR
|
||||
endif
|
||||
|
||||
LOCAL_CFLAGS += -Wno-unused-variable -Wno-unused-label
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
3643
openmax/component/video/dec/mpeg4/Exynos_OMX_Mpeg4dec.c
Normal file
3643
openmax/component/video/dec/mpeg4/Exynos_OMX_Mpeg4dec.c
Normal file
File diff suppressed because it is too large
Load Diff
123
openmax/component/video/dec/mpeg4/Exynos_OMX_Mpeg4dec.h
Normal file
123
openmax/component/video/dec/mpeg4/Exynos_OMX_Mpeg4dec.h
Normal file
@@ -0,0 +1,123 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2012 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file Exynos_OMX_Mpeg4dec.h
|
||||
* @brief
|
||||
* @author Yunji Kim (yunji.kim@samsung.com)
|
||||
* @author SeungBeom Kim (sbcrux.kim@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2012.02.20 : Create
|
||||
*/
|
||||
|
||||
#ifndef EXYNOS_OMX_MPEG4_DEC_COMPONENT
|
||||
#define EXYNOS_OMX_MPEG4_DEC_COMPONENT
|
||||
|
||||
#include "Exynos_OMX_Def.h"
|
||||
#include "OMX_Component.h"
|
||||
#include "OMX_Video.h"
|
||||
#include "ExynosVideoApi.h"
|
||||
|
||||
|
||||
typedef enum _CODEC_TYPE
|
||||
{
|
||||
CODEC_TYPE_H263,
|
||||
CODEC_TYPE_MPEG4
|
||||
} CODEC_TYPE;
|
||||
|
||||
/*
|
||||
* This structure is the same as BitmapInfoHhr struct in pv_avifile_typedefs.h file
|
||||
*/
|
||||
typedef struct _BitmapInfoHhr
|
||||
{
|
||||
OMX_U32 BiSize;
|
||||
OMX_U32 BiWidth;
|
||||
OMX_U32 BiHeight;
|
||||
OMX_U16 BiPlanes;
|
||||
OMX_U16 BiBitCount;
|
||||
OMX_U32 BiCompression;
|
||||
OMX_U32 BiSizeImage;
|
||||
OMX_U32 BiXPelsPerMeter;
|
||||
OMX_U32 BiYPelsPerMeter;
|
||||
OMX_U32 BiClrUsed;
|
||||
OMX_U32 BiClrImportant;
|
||||
} BitmapInfoHhr;
|
||||
|
||||
typedef struct _EXYNOS_MFC_MPEG4DEC_HANDLE
|
||||
{
|
||||
OMX_HANDLETYPE hMFCHandle;
|
||||
OMX_U32 indexTimestamp;
|
||||
OMX_U32 outputIndexTimestamp;
|
||||
OMX_BOOL bConfiguredMFCSrc;
|
||||
OMX_BOOL bConfiguredMFCDst;
|
||||
OMX_S32 maxDPBNum;
|
||||
CODEC_TYPE codecType;
|
||||
|
||||
/* extra info which will be shared with renderer */
|
||||
int interlacedType;
|
||||
OMX_U32 nActualFormat;
|
||||
|
||||
ExynosVideoColorFormatType MFCOutputColorType;
|
||||
ExynosVideoDecOps *pDecOps;
|
||||
ExynosVideoDecBufferOps *pInbufOps;
|
||||
ExynosVideoDecBufferOps *pOutbufOps;
|
||||
ExynosVideoGeometry codecOutbufConf;
|
||||
ExynosVideoInstInfo videoInstInfo;
|
||||
|
||||
#define MAX_PROFILE_NUM 4
|
||||
OMX_S32 profiles[MAX_PROFILE_NUM];
|
||||
OMX_S32 nProfileCnt;
|
||||
OMX_S32 maxLevel;
|
||||
} EXYNOS_MFC_MPEG4DEC_HANDLE;
|
||||
|
||||
typedef struct _EXYNOS_MPEG4DEC_HANDLE
|
||||
{
|
||||
/* OMX Codec specific */
|
||||
OMX_VIDEO_PARAM_H263TYPE h263Component[ALL_PORT_NUM];
|
||||
OMX_VIDEO_PARAM_MPEG4TYPE mpeg4Component[ALL_PORT_NUM];
|
||||
OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE errorCorrectionType[ALL_PORT_NUM];
|
||||
|
||||
/* EXYNOS MFC Codec specific */
|
||||
EXYNOS_MFC_MPEG4DEC_HANDLE hMFCMpeg4Handle;
|
||||
|
||||
OMX_BOOL bSourceStart;
|
||||
OMX_BOOL bDestinationStart;
|
||||
OMX_HANDLETYPE hSourceStartEvent;
|
||||
OMX_HANDLETYPE hDestinationInStartEvent;
|
||||
OMX_HANDLETYPE hDestinationOutStartEvent;
|
||||
|
||||
EXYNOS_QUEUE bypassBufferInfoQ;
|
||||
} EXYNOS_MPEG4DEC_HANDLE;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
OSCL_EXPORT_REF OMX_ERRORTYPE Exynos_OMX_ComponentInit(
|
||||
OMX_HANDLETYPE hComponent,
|
||||
OMX_STRING componentName);
|
||||
OMX_ERRORTYPE Exynos_OMX_ComponentDeinit(
|
||||
OMX_HANDLETYPE hComponent);
|
||||
OMX_ERRORTYPE Mpeg4CodecDstSetup(
|
||||
OMX_COMPONENTTYPE *pOMXComponent);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
190
openmax/component/video/dec/mpeg4/NOTICE
Normal file
190
openmax/component/video/dec/mpeg4/NOTICE
Normal file
@@ -0,0 +1,190 @@
|
||||
|
||||
Copyright (c) 2014, The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
69
openmax/component/video/dec/mpeg4/library_register.c
Normal file
69
openmax/component/video/dec/mpeg4/library_register.c
Normal file
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2012 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file library_register.c
|
||||
* @brief
|
||||
* @author Yunji Kim (yunji.kim@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2012.02.20 : Create
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include "Exynos_OSAL_Memory.h"
|
||||
#include "Exynos_OSAL_ETC.h"
|
||||
#include "library_register.h"
|
||||
|
||||
#undef EXYNOS_LOG_TAG
|
||||
#define EXYNOS_LOG_TAG "EXYNOS_MPEG4_DEC"
|
||||
//#define EXYNOS_LOG_OFF
|
||||
#include "Exynos_OSAL_Log.h"
|
||||
|
||||
|
||||
OSCL_EXPORT_REF int Exynos_OMX_COMPONENT_Library_Register(
|
||||
ExynosRegisterComponentType **ppExynosComponent)
|
||||
{
|
||||
FunctionIn();
|
||||
|
||||
if (ppExynosComponent == NULL)
|
||||
goto EXIT;
|
||||
|
||||
/* component 1 - video decoder MPEG4 */
|
||||
Exynos_OSAL_Strcpy(ppExynosComponent[0]->componentName, EXYNOS_OMX_COMPONENT_MPEG4_DEC);
|
||||
Exynos_OSAL_Strcpy(ppExynosComponent[0]->roles[0], EXYNOS_OMX_COMPONENT_MPEG4_DEC_ROLE);
|
||||
ppExynosComponent[0]->totalRoleNum = MAX_COMPONENT_ROLE_NUM;
|
||||
|
||||
/* component 2 - video decoder MPEG4 for DRM*/
|
||||
Exynos_OSAL_Strcpy(ppExynosComponent[1]->componentName, EXYNOS_OMX_COMPONENT_MPEG4_DRM_DEC);
|
||||
Exynos_OSAL_Strcpy(ppExynosComponent[1]->roles[0], EXYNOS_OMX_COMPONENT_MPEG4_DEC_ROLE);
|
||||
ppExynosComponent[1]->totalRoleNum = MAX_COMPONENT_ROLE_NUM;
|
||||
|
||||
/* component 3 - video decoder H.263 */
|
||||
Exynos_OSAL_Strcpy(ppExynosComponent[2]->componentName, EXYNOS_OMX_COMPONENT_H263_DEC);
|
||||
Exynos_OSAL_Strcpy(ppExynosComponent[2]->roles[0], EXYNOS_OMX_COMPONENT_H263_DEC_ROLE);
|
||||
ppExynosComponent[2]->totalRoleNum = MAX_COMPONENT_ROLE_NUM;
|
||||
|
||||
EXIT:
|
||||
FunctionOut();
|
||||
|
||||
return MAX_COMPONENT_NUM;
|
||||
}
|
||||
72
openmax/component/video/dec/mpeg4/library_register.h
Normal file
72
openmax/component/video/dec/mpeg4/library_register.h
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2012 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file library_register.h
|
||||
* @brief
|
||||
* @author Yunji Kim (yunji.kim@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2012.02.20 : Create
|
||||
*/
|
||||
|
||||
#ifndef EXYNOS_OMX_MPEG4_DEC_REG
|
||||
#define EXYNOS_OMX_MPEG4_DEC_REG
|
||||
|
||||
#include "Exynos_OMX_Def.h"
|
||||
#include "OMX_Component.h"
|
||||
#include "Exynos_OMX_Component_Register.h"
|
||||
|
||||
|
||||
#define OSCL_EXPORT_REF __attribute__((visibility("default")))
|
||||
#define MAX_COMPONENT_NUM 3
|
||||
#define MAX_COMPONENT_ROLE_NUM 1
|
||||
|
||||
/* MPEG4 */
|
||||
#ifndef USE_CUSTOM_COMPONENT_SUPPORT
|
||||
#define EXYNOS_OMX_COMPONENT_MPEG4_DEC "OMX.Exynos.MPEG4.Decoder"
|
||||
#define EXYNOS_OMX_COMPONENT_MPEG4_DRM_DEC "OMX.Exynos.MPEG4.Decoder.secure"
|
||||
#else
|
||||
#define EXYNOS_OMX_COMPONENT_MPEG4_DEC "OMX.Exynos.mpeg4.dec"
|
||||
#define EXYNOS_OMX_COMPONENT_MPEG4_DRM_DEC "OMX.Exynos.mpeg4.dec.secure"
|
||||
#endif
|
||||
|
||||
#define EXYNOS_OMX_COMPONENT_MPEG4_DEC_ROLE "video_decoder.mpeg4"
|
||||
|
||||
|
||||
/* H.263 */
|
||||
#ifndef USE_CUSTOM_COMPONENT_SUPPORT
|
||||
#define EXYNOS_OMX_COMPONENT_H263_DEC "OMX.Exynos.H263.Decoder"
|
||||
#else
|
||||
#define EXYNOS_OMX_COMPONENT_H263_DEC "OMX.Exynos.h263.dec"
|
||||
#endif
|
||||
|
||||
#define EXYNOS_OMX_COMPONENT_H263_DEC_ROLE "video_decoder.h263"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
OSCL_EXPORT_REF int Exynos_OMX_COMPONENT_Library_Register(
|
||||
ExynosRegisterComponentType **ppExynosComponent);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
87
openmax/component/video/dec/vc1/Android.mk
Normal file
87
openmax/component/video/dec/vc1/Android.mk
Normal file
@@ -0,0 +1,87 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
Exynos_OMX_Wmvdec.c \
|
||||
library_register.c
|
||||
|
||||
LOCAL_PRELINK_MODULE := false
|
||||
LOCAL_MODULE := libOMX.Exynos.WMV.Decoder
|
||||
LOCAL_MODULE_RELATIVE_PATH := omx
|
||||
LOCAL_PROPRIETARY_MODULE := true
|
||||
|
||||
LOCAL_CFLAGS :=
|
||||
|
||||
ifeq ($(BOARD_USE_DMA_BUF), true)
|
||||
LOCAL_CFLAGS += -DUSE_DMA_BUF
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_CSC_HW), true)
|
||||
LOCAL_CFLAGS += -DUSE_CSC_HW
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_CUSTOM_COMPONENT_SUPPORT), true)
|
||||
LOCAL_CFLAGS += -DUSE_CUSTOM_COMPONENT_SUPPORT
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_SINGLE_PLANE_IN_DRM), true)
|
||||
LOCAL_CFLAGS += -DUSE_SINGLE_PLANE_IN_DRM
|
||||
endif
|
||||
|
||||
ifdef BOARD_EXYNOS_S10B_FORMAT_ALIGN
|
||||
LOCAL_CFLAGS += -DS10B_FORMAT_8B_ALIGNMENT=$(BOARD_EXYNOS_S10B_FORMAT_ALIGN)
|
||||
endif
|
||||
|
||||
LOCAL_ARM_MODE := arm
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := libExynosOMX_Vdec libVendorVideoApi libExynosOMX_OSAL libExynosOMX_Basecomponent \
|
||||
libExynosVideoApi
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
libc \
|
||||
libcutils \
|
||||
libutils \
|
||||
libdl \
|
||||
liblog \
|
||||
libhardware \
|
||||
libhidlbase \
|
||||
libui \
|
||||
libexynosgraphicbuffer \
|
||||
libstagefright_foundation \
|
||||
libexynosv4l2 \
|
||||
libion_exynos \
|
||||
libcsc \
|
||||
libExynosOMX_Resourcemanager \
|
||||
libepicoperator
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(EXYNOS_OMX_INC)/exynos \
|
||||
$(EXYNOS_OMX_TOP)/osal \
|
||||
$(EXYNOS_OMX_TOP)/core \
|
||||
$(EXYNOS_OMX_COMPONENT)/common \
|
||||
$(EXYNOS_OMX_COMPONENT)/video/dec \
|
||||
$(EXYNOS_VIDEO_CODEC)/include \
|
||||
$(TOP)/hardware/samsung_slsi/exynos/include \
|
||||
|
||||
ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
|
||||
LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
|
||||
LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
|
||||
else
|
||||
ifeq ($(BOARD_USE_ANDROID), true)
|
||||
LOCAL_HEADER_LIBRARIES := media_plugin_headers
|
||||
LOCAL_CFLAGS += -DUSE_ANDROID
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_SMALL_SECURE_MEMORY), true)
|
||||
LOCAL_CFLAGS += -DUSE_SMALL_SECURE_MEMORY
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_COMPRESSED_COLOR), true)
|
||||
LOCAL_CFLAGS += -DUSE_COMPRESSED_COLOR
|
||||
endif
|
||||
|
||||
LOCAL_CFLAGS += -Wno-unused-variable -Wno-unused-label
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
3646
openmax/component/video/dec/vc1/Exynos_OMX_Wmvdec.c
Normal file
3646
openmax/component/video/dec/vc1/Exynos_OMX_Wmvdec.c
Normal file
File diff suppressed because it is too large
Load Diff
108
openmax/component/video/dec/vc1/Exynos_OMX_Wmvdec.h
Normal file
108
openmax/component/video/dec/vc1/Exynos_OMX_Wmvdec.h
Normal file
@@ -0,0 +1,108 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2012 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file Exynos_OMX_Wmvdec.h
|
||||
* @brief
|
||||
* @author HyeYeon Chung (hyeon.chung@samsung.com)
|
||||
* @author Satish Kumar Reddy (palli.satish@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2012.07.10 : Create
|
||||
*/
|
||||
|
||||
#ifndef EXYNOS_OMX_WMV_DEC_COMPONENT
|
||||
#define EXYNOS_OMX_WMV_DEC_COMPONENT
|
||||
|
||||
#include "Exynos_OMX_Def.h"
|
||||
#include "OMX_Component.h"
|
||||
#include "OMX_Video.h"
|
||||
#include "ExynosVideoApi.h"
|
||||
|
||||
#define BITMAPINFOHEADER_SIZE 40
|
||||
#define BITMAPINFOHEADER_ASFBINDING_SIZE 41
|
||||
#define COMPRESSION_POS 16
|
||||
|
||||
typedef enum WMV_FORMAT {
|
||||
WMV_FORMAT_VC1,
|
||||
WMV_FORMAT_WMV3,
|
||||
WMV_FORMAT_UNKNOWN
|
||||
} WMV_FORMAT;
|
||||
|
||||
typedef struct _EXYNOS_MFC_WMVDEC_HANDLE
|
||||
{
|
||||
OMX_HANDLETYPE hMFCHandle;
|
||||
OMX_U32 indexTimestamp;
|
||||
OMX_U32 outputIndexTimestamp;
|
||||
OMX_BOOL bConfiguredMFCSrc;
|
||||
OMX_BOOL bConfiguredMFCDst;
|
||||
OMX_S32 maxDPBNum;
|
||||
WMV_FORMAT wmvFormat;
|
||||
|
||||
/* extra info which will be shared with renderer */
|
||||
int interlacedType;
|
||||
OMX_U32 nActualFormat;
|
||||
|
||||
ExynosVideoColorFormatType MFCOutputColorType;
|
||||
ExynosVideoDecOps *pDecOps;
|
||||
ExynosVideoDecBufferOps *pInbufOps;
|
||||
ExynosVideoDecBufferOps *pOutbufOps;
|
||||
ExynosVideoGeometry codecOutbufConf;
|
||||
ExynosVideoInstInfo videoInstInfo;
|
||||
|
||||
#define MAX_PROFILE_NUM 3
|
||||
OMX_VIDEO_VC1PROFILETYPE profiles[MAX_PROFILE_NUM];
|
||||
OMX_S32 nProfileCnt;
|
||||
OMX_VIDEO_VC1LEVELTYPE maxLevel[MAX_PROFILE_NUM];
|
||||
} EXYNOS_MFC_WMVDEC_HANDLE;
|
||||
|
||||
typedef struct _EXYNOS_WMVDEC_HANDLE
|
||||
{
|
||||
/* OMX Codec specific */
|
||||
OMX_VIDEO_PARAM_WMVTYPE WmvComponent[ALL_PORT_NUM];
|
||||
OMX_VIDEO_PARAM_VC1TYPE Vc1Component[ALL_PORT_NUM];
|
||||
OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE errorCorrectionType[ALL_PORT_NUM];
|
||||
|
||||
/* EXYNOS MFC Codec specific */
|
||||
EXYNOS_MFC_WMVDEC_HANDLE hMFCWmvHandle;
|
||||
|
||||
OMX_BOOL bSourceStart;
|
||||
OMX_BOOL bDestinationStart;
|
||||
OMX_HANDLETYPE hSourceStartEvent;
|
||||
OMX_HANDLETYPE hDestinationInStartEvent;
|
||||
OMX_HANDLETYPE hDestinationOutStartEvent;
|
||||
|
||||
EXYNOS_QUEUE bypassBufferInfoQ;
|
||||
} EXYNOS_WMVDEC_HANDLE;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
OSCL_EXPORT_REF OMX_ERRORTYPE Exynos_OMX_ComponentInit(
|
||||
OMX_HANDLETYPE hComponent,
|
||||
OMX_STRING componentName);
|
||||
OMX_ERRORTYPE Exynos_OMX_ComponentDeinit(
|
||||
OMX_HANDLETYPE hComponent);
|
||||
OMX_ERRORTYPE WmvCodecDstSetup(
|
||||
OMX_COMPONENTTYPE *pOMXComponent);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
190
openmax/component/video/dec/vc1/NOTICE
Normal file
190
openmax/component/video/dec/vc1/NOTICE
Normal file
@@ -0,0 +1,190 @@
|
||||
|
||||
Copyright (c) 2014, The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
59
openmax/component/video/dec/vc1/library_register.c
Normal file
59
openmax/component/video/dec/vc1/library_register.c
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2012 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file library_register.c
|
||||
* @brief
|
||||
* @author HyeYeon Chung (hyeon.chung@samsung.com)
|
||||
* @author Satish Kumar Reddy (palli.satish@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2012.07.10 : Create
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include "Exynos_OSAL_Memory.h"
|
||||
#include "Exynos_OSAL_ETC.h"
|
||||
#include "library_register.h"
|
||||
|
||||
#undef EXYNOS_LOG_TAG
|
||||
#define EXYNOS_LOG_TAG "EXYNOS_WMV_DEC"
|
||||
//#define EXYNOS_LOG_OFF
|
||||
#include "Exynos_OSAL_Log.h"
|
||||
|
||||
OSCL_EXPORT_REF int Exynos_OMX_COMPONENT_Library_Register(
|
||||
ExynosRegisterComponentType **ppExynosComponent)
|
||||
{
|
||||
FunctionIn();
|
||||
|
||||
if (ppExynosComponent == NULL)
|
||||
goto EXIT;
|
||||
|
||||
/* component 1 - video decoder WMV */
|
||||
Exynos_OSAL_Strcpy(ppExynosComponent[0]->componentName, EXYNOS_OMX_COMPONENT_WMV_DEC);
|
||||
Exynos_OSAL_Strcpy(ppExynosComponent[0]->roles[0], EXYNOS_OMX_COMPONENT_WMV_DEC_ROLE);
|
||||
ppExynosComponent[0]->totalRoleNum = MAX_COMPONENT_ROLE_NUM;
|
||||
|
||||
EXIT:
|
||||
FunctionOut();
|
||||
|
||||
return MAX_COMPONENT_NUM;
|
||||
}
|
||||
59
openmax/component/video/dec/vc1/library_register.h
Normal file
59
openmax/component/video/dec/vc1/library_register.h
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2012 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file library_register.h
|
||||
* @brief
|
||||
* @author HyeYeon Chung (hyeon.chung@samsung.com)
|
||||
* @author Satish Kumar Reddy (palli.satish@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2012.07.10 : Create
|
||||
*/
|
||||
|
||||
#ifndef EXYNOS_OMX_WMV_DEC_REG
|
||||
#define EXYNOS_OMX_WMV_DEC_REG
|
||||
|
||||
#include "Exynos_OMX_Def.h"
|
||||
#include "OMX_Component.h"
|
||||
#include "Exynos_OMX_Component_Register.h"
|
||||
|
||||
#define OSCL_EXPORT_REF __attribute__((visibility("default")))
|
||||
#define MAX_COMPONENT_NUM 1
|
||||
#define MAX_COMPONENT_ROLE_NUM 1
|
||||
|
||||
/* WMV */
|
||||
#ifndef USE_CUSTOM_COMPONENT_SUPPORT
|
||||
#define EXYNOS_OMX_COMPONENT_WMV_DEC "OMX.Exynos.WMV.Decoder"
|
||||
#else
|
||||
#define EXYNOS_OMX_COMPONENT_WMV_DEC "OMX.Exynos.vc1.dec"
|
||||
#endif
|
||||
|
||||
#define EXYNOS_OMX_COMPONENT_WMV_DEC_ROLE "video_decoder.vc1"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
OSCL_EXPORT_REF int Exynos_OMX_COMPONENT_Library_Register(
|
||||
ExynosRegisterComponentType **ppExynosComponent);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
88
openmax/component/video/dec/vp8/Android.mk
Normal file
88
openmax/component/video/dec/vp8/Android.mk
Normal file
@@ -0,0 +1,88 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
Exynos_OMX_Vp8dec.c \
|
||||
library_register.c
|
||||
|
||||
LOCAL_PRELINK_MODULE := false
|
||||
LOCAL_MODULE := libOMX.Exynos.VP8.Decoder
|
||||
LOCAL_MODULE_RELATIVE_PATH := omx
|
||||
LOCAL_PROPRIETARY_MODULE := true
|
||||
|
||||
LOCAL_CFLAGS :=
|
||||
LOCAL_CFLAGS += -DUSE_VP8_SUPPORT
|
||||
|
||||
ifeq ($(BOARD_USE_DMA_BUF), true)
|
||||
LOCAL_CFLAGS += -DUSE_DMA_BUF
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_CSC_HW), true)
|
||||
LOCAL_CFLAGS += -DUSE_CSC_HW
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_CUSTOM_COMPONENT_SUPPORT), true)
|
||||
LOCAL_CFLAGS += -DUSE_CUSTOM_COMPONENT_SUPPORT
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_SINGLE_PLANE_IN_DRM), true)
|
||||
LOCAL_CFLAGS += -DUSE_SINGLE_PLANE_IN_DRM
|
||||
endif
|
||||
|
||||
ifdef BOARD_EXYNOS_S10B_FORMAT_ALIGN
|
||||
LOCAL_CFLAGS += -DS10B_FORMAT_8B_ALIGNMENT=$(BOARD_EXYNOS_S10B_FORMAT_ALIGN)
|
||||
endif
|
||||
|
||||
LOCAL_ARM_MODE := arm
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := libExynosOMX_Vdec libVendorVideoApi libExynosOMX_OSAL libExynosOMX_Basecomponent \
|
||||
libExynosVideoApi
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
libc \
|
||||
libcutils \
|
||||
libutils \
|
||||
libdl \
|
||||
liblog \
|
||||
libhardware \
|
||||
libhidlbase \
|
||||
libui \
|
||||
libexynosgraphicbuffer \
|
||||
libstagefright_foundation \
|
||||
libexynosv4l2 \
|
||||
libion_exynos \
|
||||
libcsc \
|
||||
libExynosOMX_Resourcemanager\
|
||||
libepicoperator
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(EXYNOS_OMX_INC)/exynos \
|
||||
$(EXYNOS_OMX_TOP)/osal \
|
||||
$(EXYNOS_OMX_TOP)/core \
|
||||
$(EXYNOS_OMX_COMPONENT)/common \
|
||||
$(EXYNOS_OMX_COMPONENT)/video/dec \
|
||||
$(EXYNOS_VIDEO_CODEC)/include \
|
||||
$(TOP)/hardware/samsung_slsi/exynos/include \
|
||||
|
||||
ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
|
||||
LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
|
||||
LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
|
||||
else
|
||||
ifeq ($(BOARD_USE_ANDROID), true)
|
||||
LOCAL_HEADER_LIBRARIES := media_plugin_headers
|
||||
LOCAL_CFLAGS += -DUSE_ANDROID
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_SMALL_SECURE_MEMORY), true)
|
||||
LOCAL_CFLAGS += -DUSE_SMALL_SECURE_MEMORY
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_COMPRESSED_COLOR), true)
|
||||
LOCAL_CFLAGS += -DUSE_COMPRESSED_COLOR
|
||||
endif
|
||||
|
||||
LOCAL_CFLAGS += -Wno-unused-variable -Wno-unused-label
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
3353
openmax/component/video/dec/vp8/Exynos_OMX_Vp8dec.c
Normal file
3353
openmax/component/video/dec/vp8/Exynos_OMX_Vp8dec.c
Normal file
File diff suppressed because it is too large
Load Diff
96
openmax/component/video/dec/vp8/Exynos_OMX_Vp8dec.h
Normal file
96
openmax/component/video/dec/vp8/Exynos_OMX_Vp8dec.h
Normal file
@@ -0,0 +1,96 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2012 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file Exynos_OMX_Vp8dec.h
|
||||
* @brief
|
||||
* @author Satish Kumar Reddy (palli.satish@samsung.com)
|
||||
* @author SeungBeom Kim (sbcrux.kim@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2012.02.20 : Create
|
||||
*/
|
||||
|
||||
#ifndef EXYNOS_OMX_VP8_DEC_COMPONENT
|
||||
#define EXYNOS_OMX_VP8_DEC_COMPONENT
|
||||
|
||||
#include "Exynos_OMX_Def.h"
|
||||
#include "OMX_Component.h"
|
||||
#include "OMX_Video.h"
|
||||
#include "ExynosVideoApi.h"
|
||||
|
||||
|
||||
typedef struct _EXYNOS_MFC_VP8DEC_HANDLE
|
||||
{
|
||||
OMX_HANDLETYPE hMFCHandle;
|
||||
OMX_U32 indexTimestamp;
|
||||
OMX_U32 outputIndexTimestamp;
|
||||
OMX_BOOL bConfiguredMFCSrc;
|
||||
OMX_BOOL bConfiguredMFCDst;
|
||||
OMX_S32 maxDPBNum;
|
||||
|
||||
/* extra info which will be shared with renderer */
|
||||
OMX_U32 nActualFormat;
|
||||
|
||||
ExynosVideoColorFormatType MFCOutputColorType;
|
||||
ExynosVideoDecOps *pDecOps;
|
||||
ExynosVideoDecBufferOps *pInbufOps;
|
||||
ExynosVideoDecBufferOps *pOutbufOps;
|
||||
ExynosVideoGeometry codecOutbufConf;
|
||||
ExynosVideoInstInfo videoInstInfo;
|
||||
|
||||
#define MAX_PROFILE_NUM 1
|
||||
OMX_VIDEO_VP8PROFILETYPE profiles[MAX_PROFILE_NUM];
|
||||
OMX_S32 nProfileCnt;
|
||||
OMX_VIDEO_VP8LEVELTYPE maxLevel;
|
||||
} EXYNOS_MFC_VP8DEC_HANDLE;
|
||||
|
||||
typedef struct _EXYNOS_VP8DEC_HANDLE
|
||||
{
|
||||
/* OMX Codec specific */
|
||||
OMX_VIDEO_PARAM_VP8TYPE VP8Component[ALL_PORT_NUM];
|
||||
OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE errorCorrectionType[ALL_PORT_NUM];
|
||||
|
||||
/* EXYNOS MFC Codec specific */
|
||||
EXYNOS_MFC_VP8DEC_HANDLE hMFCVp8Handle;
|
||||
|
||||
OMX_BOOL bSourceStart;
|
||||
OMX_BOOL bDestinationStart;
|
||||
OMX_HANDLETYPE hSourceStartEvent;
|
||||
OMX_HANDLETYPE hDestinationInStartEvent;
|
||||
OMX_HANDLETYPE hDestinationOutStartEvent;
|
||||
|
||||
EXYNOS_QUEUE bypassBufferInfoQ;
|
||||
} EXYNOS_VP8DEC_HANDLE;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
OSCL_EXPORT_REF OMX_ERRORTYPE Exynos_OMX_ComponentInit(
|
||||
OMX_HANDLETYPE hComponent,
|
||||
OMX_STRING componentName);
|
||||
OMX_ERRORTYPE Exynos_OMX_ComponentDeinit(
|
||||
OMX_HANDLETYPE hComponent);
|
||||
OMX_ERRORTYPE VP8CodecDstSetup(
|
||||
OMX_COMPONENTTYPE *pOMXComponent);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
190
openmax/component/video/dec/vp8/NOTICE
Normal file
190
openmax/component/video/dec/vp8/NOTICE
Normal file
@@ -0,0 +1,190 @@
|
||||
|
||||
Copyright (c) 2014, The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
59
openmax/component/video/dec/vp8/library_register.c
Normal file
59
openmax/component/video/dec/vp8/library_register.c
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2012 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file library_register.c
|
||||
* @brief
|
||||
* @author Satish Kumar Reddy (palli.satish@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2012.02.20 : Create
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include "Exynos_OSAL_Memory.h"
|
||||
#include "Exynos_OSAL_ETC.h"
|
||||
#include "library_register.h"
|
||||
|
||||
#undef EXYNOS_LOG_TAG
|
||||
#define EXYNOS_LOG_TAG "EXYNOS_VP8_DEC"
|
||||
//#define EXYNOS_LOG_OFF
|
||||
#include "Exynos_OSAL_Log.h"
|
||||
|
||||
|
||||
OSCL_EXPORT_REF int Exynos_OMX_COMPONENT_Library_Register(
|
||||
ExynosRegisterComponentType **ppExynosComponent)
|
||||
{
|
||||
FunctionIn();
|
||||
|
||||
if (ppExynosComponent == NULL)
|
||||
goto EXIT;
|
||||
|
||||
/* component 1 - video decoder VP8 */
|
||||
Exynos_OSAL_Strcpy(ppExynosComponent[0]->componentName, EXYNOS_OMX_COMPONENT_VP8_DEC);
|
||||
Exynos_OSAL_Strcpy(ppExynosComponent[0]->roles[0], EXYNOS_OMX_COMPONENT_VP8_DEC_ROLE);
|
||||
ppExynosComponent[0]->totalRoleNum = MAX_COMPONENT_ROLE_NUM;
|
||||
|
||||
EXIT:
|
||||
FunctionOut();
|
||||
|
||||
return MAX_COMPONENT_NUM;
|
||||
}
|
||||
60
openmax/component/video/dec/vp8/library_register.h
Normal file
60
openmax/component/video/dec/vp8/library_register.h
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2012 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file library_register.h
|
||||
* @brief
|
||||
* @author Satish Kumar Reddy (palli.satish@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2012.02.20 : Create
|
||||
*/
|
||||
|
||||
#ifndef EXYNOS_OMX_VP8_DEC_REG
|
||||
#define EXYNOS_OMX_VP8_DEC_REG
|
||||
|
||||
#include "Exynos_OMX_Def.h"
|
||||
#include "OMX_Component.h"
|
||||
#include "Exynos_OMX_Component_Register.h"
|
||||
|
||||
|
||||
#define OSCL_EXPORT_REF __attribute__((visibility("default")))
|
||||
#define MAX_COMPONENT_NUM 1
|
||||
#define MAX_COMPONENT_ROLE_NUM 1
|
||||
|
||||
/* VP8 */
|
||||
#ifndef USE_CUSTOM_COMPONENT_SUPPORT
|
||||
#define EXYNOS_OMX_COMPONENT_VP8_DEC "OMX.Exynos.VP8.Decoder"
|
||||
#else
|
||||
#define EXYNOS_OMX_COMPONENT_VP8_DEC "OMX.Exynos.vp8.dec"
|
||||
#endif
|
||||
|
||||
#define EXYNOS_OMX_COMPONENT_VP8_DEC_ROLE "video_decoder.vp8"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
OSCL_EXPORT_REF int Exynos_OMX_COMPONENT_Library_Register(
|
||||
ExynosRegisterComponentType **ppExynosComponent);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
88
openmax/component/video/dec/vp9/Android.mk
Normal file
88
openmax/component/video/dec/vp9/Android.mk
Normal file
@@ -0,0 +1,88 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
Exynos_OMX_Vp9dec.c \
|
||||
library_register.c
|
||||
|
||||
LOCAL_PRELINK_MODULE := false
|
||||
LOCAL_MODULE := libOMX.Exynos.VP9.Decoder
|
||||
LOCAL_MODULE_RELATIVE_PATH := omx
|
||||
LOCAL_PROPRIETARY_MODULE := true
|
||||
|
||||
LOCAL_CFLAGS :=
|
||||
LOCAL_CFLAGS += -DUSE_VP9_SUPPORT
|
||||
|
||||
ifeq ($(BOARD_USE_DMA_BUF), true)
|
||||
LOCAL_CFLAGS += -DUSE_DMA_BUF
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_CSC_HW), true)
|
||||
LOCAL_CFLAGS += -DUSE_CSC_HW
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_CUSTOM_COMPONENT_SUPPORT), true)
|
||||
LOCAL_CFLAGS += -DUSE_CUSTOM_COMPONENT_SUPPORT
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_SINGLE_PLANE_IN_DRM), true)
|
||||
LOCAL_CFLAGS += -DUSE_SINGLE_PLANE_IN_DRM
|
||||
endif
|
||||
|
||||
ifdef BOARD_EXYNOS_S10B_FORMAT_ALIGN
|
||||
LOCAL_CFLAGS += -DS10B_FORMAT_8B_ALIGNMENT=$(BOARD_EXYNOS_S10B_FORMAT_ALIGN)
|
||||
endif
|
||||
|
||||
LOCAL_ARM_MODE := arm
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := libExynosOMX_Vdec libVendorVideoApi libExynosOMX_OSAL libExynosOMX_Basecomponent \
|
||||
libExynosVideoApi
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
libc \
|
||||
libcutils \
|
||||
libutils \
|
||||
libdl \
|
||||
liblog \
|
||||
libhardware \
|
||||
libhidlbase \
|
||||
libui \
|
||||
libexynosgraphicbuffer \
|
||||
libstagefright_foundation \
|
||||
libexynosv4l2 \
|
||||
libion_exynos \
|
||||
libcsc \
|
||||
libExynosOMX_Resourcemanager \
|
||||
libepicoperator
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(EXYNOS_OMX_INC)/exynos \
|
||||
$(EXYNOS_OMX_TOP)/osal \
|
||||
$(EXYNOS_OMX_TOP)/core \
|
||||
$(EXYNOS_OMX_COMPONENT)/common \
|
||||
$(EXYNOS_OMX_COMPONENT)/video/dec \
|
||||
$(EXYNOS_VIDEO_CODEC)/include \
|
||||
$(TOP)/hardware/samsung_slsi/exynos/include \
|
||||
|
||||
ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
|
||||
LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
|
||||
LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
|
||||
else
|
||||
ifeq ($(BOARD_USE_ANDROID), true)
|
||||
LOCAL_HEADER_LIBRARIES := media_plugin_headers
|
||||
LOCAL_CFLAGS += -DUSE_ANDROID
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_SMALL_SECURE_MEMORY), true)
|
||||
LOCAL_CFLAGS += -DUSE_SMALL_SECURE_MEMORY
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_COMPRESSED_COLOR), true)
|
||||
LOCAL_CFLAGS += -DUSE_COMPRESSED_COLOR
|
||||
endif
|
||||
|
||||
LOCAL_CFLAGS += -Wno-unused-variable -Wno-unused-label
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
3684
openmax/component/video/dec/vp9/Exynos_OMX_Vp9dec.c
Normal file
3684
openmax/component/video/dec/vp9/Exynos_OMX_Vp9dec.c
Normal file
File diff suppressed because it is too large
Load Diff
97
openmax/component/video/dec/vp9/Exynos_OMX_Vp9dec.h
Normal file
97
openmax/component/video/dec/vp9/Exynos_OMX_Vp9dec.h
Normal file
@@ -0,0 +1,97 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2014 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file Exynos_OMX_Vp9dec.h
|
||||
* @brief
|
||||
* @author Taehwan Kim (t_h.kim@samsung.com)
|
||||
* SeungBeom Kim (sbcrux.kim@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2014.07.24 : Create
|
||||
*/
|
||||
|
||||
#ifndef EXYNOS_OMX_VP9_DEC_COMPONENT
|
||||
#define EXYNOS_OMX_VP9_DEC_COMPONENT
|
||||
|
||||
#include "Exynos_OMX_Def.h"
|
||||
#include "OMX_Component.h"
|
||||
#include "OMX_Video.h"
|
||||
#include "ExynosVideoApi.h"
|
||||
|
||||
|
||||
typedef struct _EXYNOS_MFC_VP9DEC_HANDLE
|
||||
{
|
||||
OMX_HANDLETYPE hMFCHandle;
|
||||
OMX_U32 indexTimestamp;
|
||||
OMX_U32 outputIndexTimestamp;
|
||||
OMX_BOOL bConfiguredMFCSrc;
|
||||
OMX_BOOL bConfiguredMFCDst;
|
||||
OMX_S32 maxDPBNum;
|
||||
|
||||
/* extra info which will be shared with renderer */
|
||||
ExynosVideoHdrInfo sHdrInfo;
|
||||
OMX_U32 nActualFormat;
|
||||
|
||||
ExynosVideoColorFormatType MFCOutputColorType;
|
||||
ExynosVideoDecOps *pDecOps;
|
||||
ExynosVideoDecBufferOps *pInbufOps;
|
||||
ExynosVideoDecBufferOps *pOutbufOps;
|
||||
ExynosVideoGeometry codecOutbufConf;
|
||||
ExynosVideoInstInfo videoInstInfo;
|
||||
|
||||
#define MAX_PROFILE_NUM 5
|
||||
OMX_VIDEO_VP9PROFILETYPE profiles[MAX_PROFILE_NUM];
|
||||
OMX_S32 nProfileCnt;
|
||||
OMX_VIDEO_VP9LEVELTYPE maxLevel;
|
||||
} EXYNOS_MFC_VP9DEC_HANDLE;
|
||||
|
||||
typedef struct _EXYNOS_VP9DEC_HANDLE
|
||||
{
|
||||
/* OMX Codec specific */
|
||||
OMX_VIDEO_PARAM_VP9TYPE VP9Component[ALL_PORT_NUM];
|
||||
OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE errorCorrectionType[ALL_PORT_NUM];
|
||||
|
||||
/* EXYNOS MFC Codec specific */
|
||||
EXYNOS_MFC_VP9DEC_HANDLE hMFCVp9Handle;
|
||||
|
||||
OMX_BOOL bSourceStart;
|
||||
OMX_BOOL bDestinationStart;
|
||||
OMX_HANDLETYPE hSourceStartEvent;
|
||||
OMX_HANDLETYPE hDestinationInStartEvent;
|
||||
OMX_HANDLETYPE hDestinationOutStartEvent;
|
||||
|
||||
EXYNOS_QUEUE bypassBufferInfoQ;
|
||||
} EXYNOS_VP9DEC_HANDLE;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
OSCL_EXPORT_REF OMX_ERRORTYPE Exynos_OMX_ComponentInit(
|
||||
OMX_HANDLETYPE hComponent,
|
||||
OMX_STRING componentName);
|
||||
OMX_ERRORTYPE Exynos_OMX_ComponentDeinit(
|
||||
OMX_HANDLETYPE hComponent);
|
||||
OMX_ERRORTYPE VP9CodecDstSetup(
|
||||
OMX_COMPONENTTYPE *pOMXComponent);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
190
openmax/component/video/dec/vp9/NOTICE
Normal file
190
openmax/component/video/dec/vp9/NOTICE
Normal file
@@ -0,0 +1,190 @@
|
||||
|
||||
Copyright (c) 2014, The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
65
openmax/component/video/dec/vp9/library_register.c
Normal file
65
openmax/component/video/dec/vp9/library_register.c
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2014 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file library_register.c
|
||||
* @brief
|
||||
* @author Taehwan Kim (t_h.kim@samsung.com)
|
||||
* SeungBeom Kim (sbcrux.kim@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2014.07.24 : Create
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include "Exynos_OSAL_Memory.h"
|
||||
#include "Exynos_OSAL_ETC.h"
|
||||
#include "library_register.h"
|
||||
|
||||
#undef EXYNOS_LOG_TAG
|
||||
#define EXYNOS_LOG_TAG "EXYNOS_VP9_DEC"
|
||||
//#define EXYNOS_LOG_OFF
|
||||
#include "Exynos_OSAL_Log.h"
|
||||
|
||||
|
||||
OSCL_EXPORT_REF int Exynos_OMX_COMPONENT_Library_Register(
|
||||
ExynosRegisterComponentType **ppExynosComponent)
|
||||
{
|
||||
FunctionIn();
|
||||
|
||||
if (ppExynosComponent == NULL)
|
||||
goto EXIT;
|
||||
|
||||
/* component 1 - video decoder VP9 */
|
||||
Exynos_OSAL_Strcpy(ppExynosComponent[0]->componentName, EXYNOS_OMX_COMPONENT_VP9_DEC);
|
||||
Exynos_OSAL_Strcpy(ppExynosComponent[0]->roles[0], EXYNOS_OMX_COMPONENT_VP9_DEC_ROLE);
|
||||
ppExynosComponent[0]->totalRoleNum = MAX_COMPONENT_ROLE_NUM;
|
||||
|
||||
/* component 2 - video decoder VP9 for DRM */
|
||||
Exynos_OSAL_Strcpy(ppExynosComponent[1]->componentName, EXYNOS_OMX_COMPONENT_VP9_DRM_DEC);
|
||||
Exynos_OSAL_Strcpy(ppExynosComponent[1]->roles[0], EXYNOS_OMX_COMPONENT_VP9_DEC_ROLE);
|
||||
ppExynosComponent[1]->totalRoleNum = MAX_COMPONENT_ROLE_NUM;
|
||||
|
||||
EXIT:
|
||||
FunctionOut();
|
||||
|
||||
return MAX_COMPONENT_NUM;
|
||||
}
|
||||
63
openmax/component/video/dec/vp9/library_register.h
Normal file
63
openmax/component/video/dec/vp9/library_register.h
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2012 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file library_register.h
|
||||
* @brief
|
||||
* @author Taehwan Kim (t_h.kim@samsung.com)
|
||||
* SeungBeom Kim (sbcrux.kim@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2014.07.24 : Create
|
||||
*/
|
||||
|
||||
#ifndef EXYNOS_OMX_VP9_DEC_REG
|
||||
#define EXYNOS_OMX_VP9_DEC_REG
|
||||
|
||||
#include "Exynos_OMX_Def.h"
|
||||
#include "OMX_Component.h"
|
||||
#include "Exynos_OMX_Component_Register.h"
|
||||
|
||||
|
||||
#define OSCL_EXPORT_REF __attribute__((visibility("default")))
|
||||
#define MAX_COMPONENT_NUM 2
|
||||
#define MAX_COMPONENT_ROLE_NUM 1
|
||||
|
||||
/* VP9 */
|
||||
#ifndef USE_CUSTOM_COMPONENT_SUPPORT
|
||||
#define EXYNOS_OMX_COMPONENT_VP9_DEC "OMX.Exynos.VP9.Decoder"
|
||||
#define EXYNOS_OMX_COMPONENT_VP9_DRM_DEC "OMX.Exynos.VP9.Decoder.secure"
|
||||
#else
|
||||
#define EXYNOS_OMX_COMPONENT_VP9_DEC "OMX.Exynos.vp9.dec"
|
||||
#define EXYNOS_OMX_COMPONENT_VP9_DRM_DEC "OMX.Exynos.vp9.dec.secure"
|
||||
#endif
|
||||
|
||||
#define EXYNOS_OMX_COMPONENT_VP9_DEC_ROLE "video_decoder.vp9"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
OSCL_EXPORT_REF int Exynos_OMX_COMPONENT_Library_Register(
|
||||
ExynosRegisterComponentType **ppExynosComponent);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
73
openmax/component/video/enc/Android.mk
Normal file
73
openmax/component/video/enc/Android.mk
Normal file
@@ -0,0 +1,73 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
Exynos_OMX_VencControl.c \
|
||||
Exynos_OMX_Venc.c
|
||||
|
||||
LOCAL_MODULE := libExynosOMX_Venc
|
||||
LOCAL_ARM_MODE := arm
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_PROPRIETARY_MODULE := true
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(EXYNOS_OMX_INC)/exynos \
|
||||
$(EXYNOS_OMX_TOP)/osal \
|
||||
$(EXYNOS_OMX_TOP)/core \
|
||||
$(EXYNOS_OMX_COMPONENT)/common \
|
||||
$(EXYNOS_OMX_COMPONENT)/video/enc \
|
||||
$(EXYNOS_VIDEO_CODEC)/include \
|
||||
$(TOP)/hardware/samsung_slsi/exynos/include \
|
||||
|
||||
ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
|
||||
LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
|
||||
LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
|
||||
else
|
||||
ifeq ($(BOARD_USE_ANDROID), true)
|
||||
LOCAL_HEADER_LIBRARIES := media_plugin_headers
|
||||
LOCAL_CFLAGS += -DUSE_ANDROID
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_CUSTOM_COMPONENT_SUPPORT), true)
|
||||
LOCAL_CFLAGS += -DUSE_CUSTOM_COMPONENT_SUPPORT
|
||||
endif
|
||||
|
||||
ifeq ($(EXYNOS_OMX_SUPPORT_TUNNELING), true)
|
||||
LOCAL_CFLAGS += -DTUNNELING_SUPPORT
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_DMA_BUF), true)
|
||||
LOCAL_CFLAGS += -DUSE_DMA_BUF
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_GSC_RGB_ENCODER), true)
|
||||
LOCAL_CFLAGS += -DUSE_HW_CSC_GRALLOC_SOURCE
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_FIMC_RGB_ENCODER), true)
|
||||
LOCAL_CFLAGS += -DUSE_HW_CSC_GRALLOC_SOURCE
|
||||
LOCAL_CFLAGS += -DUSE_FIMC_CSC
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_CSC_HW), true)
|
||||
LOCAL_CFLAGS += -DUSE_CSC_HW
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_VIDEO_EXT_FOR_WFD_HDCP), true)
|
||||
LOCAL_CFLAGS += -DUSE_VIDEO_EXT_FOR_WFD_HDCP
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_SMALL_SECURE_MEMORY), true)
|
||||
LOCAL_CFLAGS += -DUSE_SMALL_SECURE_MEMORY
|
||||
endif
|
||||
|
||||
ifdef BOARD_EXYNOS_S10B_FORMAT_ALIGN
|
||||
LOCAL_CFLAGS += -DS10B_FORMAT_8B_ALIGNMENT=$(BOARD_EXYNOS_S10B_FORMAT_ALIGN)
|
||||
endif
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := libVendorVideoApi
|
||||
LOCAL_SHARED_LIBRARIES := liblog libcsc
|
||||
|
||||
LOCAL_CFLAGS += -Wno-unused-variable -Wno-unused-label
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
2272
openmax/component/video/enc/Exynos_OMX_Venc.c
Normal file
2272
openmax/component/video/enc/Exynos_OMX_Venc.c
Normal file
File diff suppressed because it is too large
Load Diff
184
openmax/component/video/enc/Exynos_OMX_Venc.h
Normal file
184
openmax/component/video/enc/Exynos_OMX_Venc.h
Normal file
@@ -0,0 +1,184 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2012 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file Exynos_OMX_Venc.h
|
||||
* @brief
|
||||
* @author SeungBeom Kim (sbcrux.kim@samsung.com)
|
||||
* Yunji Kim (yunji.kim@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2012.02.20 : Create
|
||||
*/
|
||||
|
||||
#ifndef EXYNOS_OMX_VIDEO_ENCODE
|
||||
#define EXYNOS_OMX_VIDEO_ENCODE
|
||||
|
||||
#include "OMX_Component.h"
|
||||
#include "Exynos_OMX_Def.h"
|
||||
#include "Exynos_OSAL_Queue.h"
|
||||
#include "Exynos_OMX_Baseport.h"
|
||||
#include "Exynos_OMX_Basecomponent.h"
|
||||
|
||||
#define MAX_VIDEO_INPUTBUFFER_NUM 5
|
||||
#define MAX_VIDEO_OUTPUTBUFFER_NUM 4
|
||||
|
||||
#define MAX_FRAME_WIDTH 1920
|
||||
#define MAX_FRAME_HEIGHT 1080
|
||||
|
||||
#define DEFAULT_VIDEO_INPUT_BUFFER_SIZE (ALIGN_TO_16B(DEFAULT_FRAME_WIDTH) * ALIGN_TO_16B(DEFAULT_FRAME_HEIGHT) + \
|
||||
ALIGN((ALIGN_TO_16B(DEFAULT_FRAME_WIDTH) * ALIGN_TO_16B(DEFAULT_FRAME_HEIGHT))/2,256))
|
||||
#define DEFAULT_VIDEO_OUTPUT_BUFFER_SIZE (DEFAULT_FRAME_WIDTH * DEFAULT_FRAME_HEIGHT) * 3 / 2
|
||||
|
||||
#define MFC_INPUT_BUFFER_NUM_MAX 5
|
||||
#define MFC_OUTPUT_BUFFER_NUM_MAX 4
|
||||
|
||||
#define DEFAULT_MFC_INPUT_YBUFFER_SIZE ALIGN_TO_16B(MAX_FRAME_WIDTH) * ALIGN_TO_16B(MAX_FRAME_HEIGHT)
|
||||
#define DEFAULT_MFC_INPUT_CBUFFER_SIZE ALIGN((DEFAULT_MFC_INPUT_YBUFFER_SIZE / 2), 256)
|
||||
#define DEFAULT_MFC_OUTPUT_BUFFER_SIZE MAX_FRAME_WIDTH * MAX_FRAME_HEIGHT * 3 / 2
|
||||
|
||||
#define MIN_CPB_SIZE (1024 * 1024)
|
||||
#define CUSTOM_LIMITED_DRM_OUTPUT_BUFFER_SIZE (1024 * 1024 * 3) /* 3MB : For projects which has small vstream heap */
|
||||
|
||||
#define INPUT_PORT_SUPPORTFORMAT_DEFAULT_NUM 5 /* I42P, NV12, NV21, BGRA8888, RGBA8888 */
|
||||
#define INPUT_PORT_SUPPORTFORMAT_NUM_MAX (INPUT_PORT_SUPPORTFORMAT_DEFAULT_NUM + 5) /* Opaque, NV12T, YV12, ARGB8888, UNUSED */
|
||||
#define OUTPUT_PORT_SUPPORTFORMAT_NUM_MAX 1
|
||||
|
||||
#define MFC_DEFAULT_INPUT_BUFFER_PLANE 2
|
||||
#define MFC_DEFAULT_OUTPUT_BUFFER_PLANE 1
|
||||
|
||||
#define MAX_INPUTBUFFER_NUM_DYNAMIC 0 /* Dynamic number of metadata buffer */
|
||||
#define MAX_OUTPUTBUFFER_NUM_DYNAMIC 0 /* Dynamic number of metadata buffer */
|
||||
|
||||
#define OMX_VIDEO_MAX_REF_FRAMES 3
|
||||
#define OMX_VIDEO_MAX_LTR_FRAMES 4 /* LTR */
|
||||
|
||||
#define ENC_BLOCKS_PER_SECOND 979200 /* remove it and have to read a capability at media_codecs.xml */
|
||||
|
||||
#define GENERAL_TSVC_ENABLE (1 << 16)
|
||||
|
||||
typedef struct
|
||||
{
|
||||
void *pAddrY;
|
||||
void *pAddrC;
|
||||
} CODEC_ENC_ADDR_INFO;
|
||||
|
||||
typedef struct _BYPASS_BUFFER_INFO
|
||||
{
|
||||
OMX_U32 nFlags;
|
||||
OMX_TICKS timeStamp;
|
||||
} BYPASS_BUFFER_INFO;
|
||||
|
||||
typedef struct _CODEC_ENC_BUFFER
|
||||
{
|
||||
void *pVirAddr[MAX_BUFFER_PLANE]; /* virtual address */
|
||||
unsigned int bufferSize[MAX_BUFFER_PLANE]; /* buffer alloc size */
|
||||
unsigned long fd[MAX_BUFFER_PLANE]; /* buffer FD */
|
||||
int dataSize; /* total data length */
|
||||
} CODEC_ENC_BUFFER;
|
||||
|
||||
typedef struct _EXYNOS_OMX_VIDEOENC_COMPONENT
|
||||
{
|
||||
OMX_HANDLETYPE hCodecHandle;
|
||||
OMX_BOOL bQosChanged;
|
||||
OMX_U32 nQosRatio;
|
||||
OMX_U32 nOperatingRate;
|
||||
OMX_U32 nPriority;
|
||||
CODEC_ENC_BUFFER *pMFCEncInputBuffer[MFC_INPUT_BUFFER_NUM_MAX];
|
||||
CODEC_ENC_BUFFER *pMFCEncOutputBuffer[MFC_OUTPUT_BUFFER_NUM_MAX];
|
||||
|
||||
/* Buffer Process */
|
||||
OMX_BOOL bExitBufferProcessThread;
|
||||
OMX_HANDLETYPE hSrcInputThread;
|
||||
OMX_HANDLETYPE hSrcOutputThread;
|
||||
OMX_HANDLETYPE hDstInputThread;
|
||||
OMX_HANDLETYPE hDstOutputThread;
|
||||
|
||||
/* Shared Memory Handle */
|
||||
OMX_HANDLETYPE hSharedMemory;
|
||||
|
||||
OMX_BOOL IntraRefreshVOP;
|
||||
OMX_VIDEO_CONTROLRATETYPE eControlRate[ALL_PORT_NUM];
|
||||
OMX_VIDEO_PARAM_QUANTIZATIONTYPE quantization;
|
||||
OMX_VIDEO_PARAM_INTRAREFRESHTYPE intraRefresh;
|
||||
|
||||
OMX_BOOL bPVCMode; /* true: PVC mode on false: PVC mode off
|
||||
Only h264 hevc vp8 vp9 codec valid */
|
||||
OMX_BOOL bDropControl;
|
||||
OMX_BOOL bDisableDFR;
|
||||
|
||||
OMX_BOOL bUseBlurFilter;
|
||||
EXYNOS_OMX_BLUR_MODE eBlurMode; /* Down/Up or Coefficient mothod */
|
||||
EXYNOS_OMX_BLUR_RESOL eBlurResol;
|
||||
|
||||
EXYNOS_OMX_ROTATION_TYPE eRotationType;
|
||||
OMX_MIRRORTYPE eMirrorType;
|
||||
|
||||
OMX_BOOL bFirstInput;
|
||||
OMX_BOOL bFirstOutput;
|
||||
OMX_BOOL bEncDRC;
|
||||
OMX_BOOL bEncDRCSync;
|
||||
OMX_HANDLETYPE hEncDRCSyncEvent;
|
||||
|
||||
OMX_COLOR_FORMATTYPE surfaceFormat;
|
||||
|
||||
/* CSC handle */
|
||||
OMX_PTR csc_handle;
|
||||
OMX_BOOL csc_set_format;
|
||||
|
||||
/* Performance handle */
|
||||
OMX_HANDLETYPE pPerfHandle;
|
||||
|
||||
OMX_ERRORTYPE (*exynos_codec_srcInputProcess) (OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_DATA *pInputData);
|
||||
OMX_ERRORTYPE (*exynos_codec_srcOutputProcess) (OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_DATA *pInputData);
|
||||
OMX_ERRORTYPE (*exynos_codec_dstInputProcess) (OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_DATA *pOutputData);
|
||||
OMX_ERRORTYPE (*exynos_codec_dstOutputProcess) (OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_DATA *pOutputData);
|
||||
|
||||
OMX_ERRORTYPE (*exynos_codec_start)(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortIndex);
|
||||
OMX_ERRORTYPE (*exynos_codec_stop)(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortIndex);
|
||||
OMX_ERRORTYPE (*exynos_codec_bufferProcessRun)(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortIndex);
|
||||
OMX_ERRORTYPE (*exynos_codec_enqueueAllBuffer)(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortIndex);
|
||||
|
||||
OMX_ERRORTYPE (*exynos_codec_getCodecOutputPrivateData) (OMX_PTR codecBuffer, OMX_PTR *addr, OMX_U32 *size);
|
||||
|
||||
OMX_BOOL (*exynos_codec_checkFormatSupport)(EXYNOS_OMX_BASECOMPONENT *pExynosComponent, OMX_COLOR_FORMATTYPE eColorFormat);
|
||||
} EXYNOS_OMX_VIDEOENC_COMPONENT;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void Exynos_UpdateFrameSize(OMX_COMPONENTTYPE *pOMXComponent);
|
||||
void Exynos_Input_SetSupportFormat(EXYNOS_OMX_BASECOMPONENT *pExynosComponent);
|
||||
OMX_COLOR_FORMATTYPE Exynos_Input_GetActualColorFormat(EXYNOS_OMX_BASECOMPONENT *pExynosComponent);
|
||||
OMX_BOOL Exynos_Check_BufferProcess_State(EXYNOS_OMX_BASECOMPONENT *pExynosComponent, OMX_U32 nPortIndex);
|
||||
OMX_ERRORTYPE Exynos_CodecBufferToData(CODEC_ENC_BUFFER *codecBuffer, EXYNOS_OMX_DATA *pData, OMX_U32 nPortIndex);
|
||||
OMX_ERRORTYPE Exynos_OMX_SrcInputBufferProcess(OMX_HANDLETYPE hComponent);
|
||||
OMX_ERRORTYPE Exynos_OMX_SrcOutputBufferProcess(OMX_HANDLETYPE hComponent);
|
||||
OMX_ERRORTYPE Exynos_OMX_DstInputBufferProcess(OMX_HANDLETYPE hComponent);
|
||||
OMX_ERRORTYPE Exynos_OMX_DstOutputBufferProcess(OMX_HANDLETYPE hComponent);
|
||||
OMX_ERRORTYPE Exynos_OMX_VideoEncodeComponentInit(OMX_IN OMX_HANDLETYPE hComponent);
|
||||
OMX_ERRORTYPE Exynos_OMX_VideoEncodeComponentDeinit(OMX_IN OMX_HANDLETYPE hComponent);
|
||||
OMX_ERRORTYPE Exynos_Allocate_CodecBuffers(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortIndex, int nBufferCnt, unsigned int nAllocLen[MAX_BUFFER_PLANE]);
|
||||
void Exynos_Free_CodecBuffers(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortIndex);
|
||||
OMX_ERRORTYPE Exynos_ResetAllPortConfig(OMX_COMPONENTTYPE *pOMXComponent);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
2712
openmax/component/video/enc/Exynos_OMX_VencControl.c
Normal file
2712
openmax/component/video/enc/Exynos_OMX_VencControl.c
Normal file
File diff suppressed because it is too large
Load Diff
118
openmax/component/video/enc/Exynos_OMX_VencControl.h
Normal file
118
openmax/component/video/enc/Exynos_OMX_VencControl.h
Normal file
@@ -0,0 +1,118 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2012 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file Exynos_OMX_VencControl.h
|
||||
* @brief
|
||||
* @author SeungBeom Kim (sbcrux.kim@samsung.com)
|
||||
* Taehwan Kim (t_h.kim@samsung.com)
|
||||
* @version 2.5.0
|
||||
* @history
|
||||
* 2012.02.20 : Create
|
||||
* 2017.08.03 : Change event handling
|
||||
*/
|
||||
|
||||
#ifndef EXYNOS_OMX_VIDEO_ENCODECONTROL
|
||||
#define EXYNOS_OMX_VIDEO_ENCODECONTROL
|
||||
|
||||
#include "OMX_Component.h"
|
||||
#include "Exynos_OMX_Def.h"
|
||||
#include "Exynos_OSAL_Queue.h"
|
||||
#include "Exynos_OMX_Baseport.h"
|
||||
#include "Exynos_OMX_Basecomponent.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
OMX_ERRORTYPE Exynos_OMX_UseBuffer(
|
||||
OMX_IN OMX_HANDLETYPE hComponent,
|
||||
OMX_INOUT OMX_BUFFERHEADERTYPE **ppBufferHdr,
|
||||
OMX_IN OMX_U32 nPortIndex,
|
||||
OMX_IN OMX_PTR pAppPrivate,
|
||||
OMX_IN OMX_U32 nSizeBytes,
|
||||
OMX_IN OMX_U8 *pBuffer);
|
||||
OMX_ERRORTYPE Exynos_OMX_AllocateBuffer(
|
||||
OMX_IN OMX_HANDLETYPE hComponent,
|
||||
OMX_INOUT OMX_BUFFERHEADERTYPE **ppBuffer,
|
||||
OMX_IN OMX_U32 nPortIndex,
|
||||
OMX_IN OMX_PTR pAppPrivate,
|
||||
OMX_IN OMX_U32 nSizeBytes);
|
||||
OMX_ERRORTYPE Exynos_OMX_FreeBuffer(
|
||||
OMX_IN OMX_HANDLETYPE hComponent,
|
||||
OMX_IN OMX_U32 nPortIndex,
|
||||
OMX_IN OMX_BUFFERHEADERTYPE *pBufferHdr);
|
||||
|
||||
#ifdef TUNNELING_SUPPORT
|
||||
OMX_ERRORTYPE Exynos_OMX_AllocateTunnelBuffer(
|
||||
EXYNOS_OMX_BASEPORT *pOMXBasePort,
|
||||
OMX_U32 nPortIndex);
|
||||
OMX_ERRORTYPE Exynos_OMX_FreeTunnelBuffer(
|
||||
EXYNOS_OMX_BASEPORT *pOMXBasePort,
|
||||
OMX_U32 nPortIndex);
|
||||
OMX_ERRORTYPE Exynos_OMX_ComponentTunnelRequest(
|
||||
OMX_IN OMX_HANDLETYPE hComp,
|
||||
OMX_IN OMX_U32 nPort,
|
||||
OMX_IN OMX_HANDLETYPE hTunneledComp,
|
||||
OMX_IN OMX_U32 nTunneledPort,
|
||||
OMX_INOUT OMX_TUNNELSETUPTYPE *pTunnelSetup);
|
||||
#endif
|
||||
|
||||
OMX_ERRORTYPE Exynos_OMX_VideoEncodeGetParameter(
|
||||
OMX_IN OMX_HANDLETYPE hComponent,
|
||||
OMX_IN OMX_INDEXTYPE nParamIndex,
|
||||
OMX_INOUT OMX_PTR pComponentParameterStructure);
|
||||
OMX_ERRORTYPE Exynos_OMX_VideoEncodeSetParameter(
|
||||
OMX_IN OMX_HANDLETYPE hComponent,
|
||||
OMX_IN OMX_INDEXTYPE nIndex,
|
||||
OMX_IN OMX_PTR pComponentParameterStructure);
|
||||
OMX_ERRORTYPE Exynos_OMX_VideoEncodeGetConfig(
|
||||
OMX_HANDLETYPE hComponent,
|
||||
OMX_INDEXTYPE nIndex,
|
||||
OMX_PTR pComponentConfigStructure);
|
||||
OMX_ERRORTYPE Exynos_OMX_VideoEncodeSetConfig(
|
||||
OMX_HANDLETYPE hComponent,
|
||||
OMX_INDEXTYPE nIndex,
|
||||
OMX_PTR pComponentConfigStructure);
|
||||
OMX_ERRORTYPE Exynos_OMX_VideoEncodeGetExtensionIndex(
|
||||
OMX_IN OMX_HANDLETYPE hComponent,
|
||||
OMX_IN OMX_STRING szParameterName,
|
||||
OMX_OUT OMX_INDEXTYPE *pIndexType);
|
||||
|
||||
OMX_ERRORTYPE Exynos_InputBufferReturn(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_DATABUFFER *pDataBuffer);
|
||||
OMX_ERRORTYPE Exynos_OutputBufferReturn(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_DATABUFFER *pDataBuffer);
|
||||
|
||||
OMX_ERRORTYPE Exynos_OMX_BufferFlush(OMX_COMPONENTTYPE *pOMXComponent, OMX_S32 nPortIndex, OMX_BOOL bEvent);
|
||||
|
||||
OMX_BUFFERHEADERTYPE *Exynos_OutputBufferGetQueue_Direct(EXYNOS_OMX_BASECOMPONENT *pExynosComponent);
|
||||
OMX_ERRORTYPE Exynos_InputBufferGetQueue(EXYNOS_OMX_BASECOMPONENT *pExynosComponent);
|
||||
OMX_ERRORTYPE Exynos_OutputBufferGetQueue(EXYNOS_OMX_BASECOMPONENT *pExynosComponent);
|
||||
|
||||
OMX_ERRORTYPE Exynos_CodecBufferEnqueue(EXYNOS_OMX_BASECOMPONENT *pExynosComponent, OMX_U32 nPortIndex, OMX_PTR pData);
|
||||
OMX_ERRORTYPE Exynos_CodecBufferDequeue(EXYNOS_OMX_BASECOMPONENT *pExynosComponent, OMX_U32 nPortIndex, OMX_PTR *pData);
|
||||
OMX_ERRORTYPE Exynos_CodecBufferReset(EXYNOS_OMX_BASECOMPONENT *pExynosComponent, OMX_U32 nPortIndex);
|
||||
|
||||
OMX_ERRORTYPE Exynos_Shared_BufferToData(EXYNOS_OMX_BASEPORT *pExynosPort, EXYNOS_OMX_DATABUFFER *pUseBuffer, EXYNOS_OMX_DATA *pData);
|
||||
OMX_ERRORTYPE Exynos_Shared_DataToBuffer(EXYNOS_OMX_BASEPORT *pExynosPort, EXYNOS_OMX_DATABUFFER *pUseBuffer, EXYNOS_OMX_DATA *pData);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
190
openmax/component/video/enc/NOTICE
Normal file
190
openmax/component/video/enc/NOTICE
Normal file
@@ -0,0 +1,190 @@
|
||||
|
||||
Copyright (c) 2014, The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
89
openmax/component/video/enc/h264/Android.mk
Normal file
89
openmax/component/video/enc/h264/Android.mk
Normal file
@@ -0,0 +1,89 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
Exynos_OMX_H264enc.c \
|
||||
library_register.c
|
||||
|
||||
LOCAL_PRELINK_MODULE := false
|
||||
LOCAL_MODULE := libOMX.Exynos.AVC.Encoder
|
||||
LOCAL_MODULE_RELATIVE_PATH := omx
|
||||
LOCAL_PROPRIETARY_MODULE := true
|
||||
|
||||
LOCAL_CFLAGS :=
|
||||
|
||||
ifeq ($(BOARD_USE_DMA_BUF), true)
|
||||
LOCAL_CFLAGS += -DUSE_DMA_BUF
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_CSC_HW), true)
|
||||
LOCAL_CFLAGS += -DUSE_CSC_HW
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_SINGLE_PLANE_IN_DRM), true)
|
||||
LOCAL_CFLAGS += -DUSE_SINGLE_PLANE_IN_DRM
|
||||
endif
|
||||
|
||||
ifdef BOARD_EXYNOS_S10B_FORMAT_ALIGN
|
||||
LOCAL_CFLAGS += -DS10B_FORMAT_8B_ALIGNMENT=$(BOARD_EXYNOS_S10B_FORMAT_ALIGN)
|
||||
endif
|
||||
|
||||
LOCAL_ARM_MODE := arm
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := libExynosOMX_Venc libVendorVideoApi libExynosOMX_OSAL libExynosOMX_Basecomponent \
|
||||
libExynosVideoApi
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
libc \
|
||||
libcutils \
|
||||
libutils \
|
||||
libdl \
|
||||
liblog \
|
||||
libhardware \
|
||||
libhidlbase \
|
||||
libui \
|
||||
libexynosgraphicbuffer \
|
||||
libstagefright_foundation \
|
||||
libexynosv4l2 \
|
||||
libion_exynos \
|
||||
libcsc \
|
||||
libExynosOMX_Resourcemanager \
|
||||
libepicoperator
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(EXYNOS_OMX_INC)/exynos \
|
||||
$(EXYNOS_OMX_TOP)/osal \
|
||||
$(EXYNOS_OMX_TOP)/core \
|
||||
$(EXYNOS_OMX_COMPONENT)/common \
|
||||
$(EXYNOS_OMX_COMPONENT)/video/enc \
|
||||
$(EXYNOS_VIDEO_CODEC)/include \
|
||||
$(TOP)/hardware/samsung_slsi/exynos/include \
|
||||
|
||||
ifeq ($(BOARD_USE_SKYPE_HD), true)
|
||||
LOCAL_CFLAGS += -DUSE_SKYPE_HD
|
||||
LOCAL_CFLAGS += -DBUILD_ENC
|
||||
LOCAL_STATIC_LIBRARIES += libExynosOMX_SkypeHD_Enc
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
|
||||
LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
|
||||
LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
|
||||
else
|
||||
ifeq ($(BOARD_USE_ANDROID), true)
|
||||
LOCAL_HEADER_LIBRARIES := media_plugin_headers
|
||||
LOCAL_CFLAGS += -DUSE_ANDROID
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_CUSTOM_COMPONENT_SUPPORT), true)
|
||||
LOCAL_CFLAGS += -DUSE_CUSTOM_COMPONENT_SUPPORT
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_SMALL_SECURE_MEMORY), true)
|
||||
LOCAL_CFLAGS += -DUSE_SMALL_SECURE_MEMORY
|
||||
endif
|
||||
|
||||
LOCAL_CFLAGS += -Wno-unused-variable -Wno-unused-label
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
4567
openmax/component/video/enc/h264/Exynos_OMX_H264enc.c
Normal file
4567
openmax/component/video/enc/h264/Exynos_OMX_H264enc.c
Normal file
File diff suppressed because it is too large
Load Diff
135
openmax/component/video/enc/h264/Exynos_OMX_H264enc.h
Normal file
135
openmax/component/video/enc/h264/Exynos_OMX_H264enc.h
Normal file
@@ -0,0 +1,135 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2012 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file Exynos_OMX_H264enc.h
|
||||
* @brief
|
||||
* @author SeungBeom Kim (sbcrux.kim@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2012.02.20 : Create
|
||||
*/
|
||||
|
||||
#ifndef EXYNOS_OMX_H264_ENC_COMPONENT
|
||||
#define EXYNOS_OMX_H264_ENC_COMPONENT
|
||||
|
||||
#include "Exynos_OMX_Def.h"
|
||||
#include "OMX_Component.h"
|
||||
#include "OMX_Video.h"
|
||||
|
||||
#include "ExynosVideoApi.h"
|
||||
#include "library_register.h"
|
||||
|
||||
|
||||
typedef struct _H264_VUI_SAR {
|
||||
OMX_BOOL SarEnable;
|
||||
OMX_U32 SarIndex;
|
||||
OMX_U32 SarWidth;
|
||||
OMX_U32 SarHeight;
|
||||
} H264_VUI_SAR;
|
||||
|
||||
typedef struct _EXTRA_DATA
|
||||
{
|
||||
OMX_PTR pHeaderSPS;
|
||||
OMX_U32 SPSLen;
|
||||
OMX_PTR pHeaderPPS;
|
||||
OMX_U32 PPSLen;
|
||||
} EXTRA_DATA;
|
||||
|
||||
typedef struct _EXYNOS_MFC_H264ENC_HANDLE
|
||||
{
|
||||
OMX_HANDLETYPE hMFCHandle;
|
||||
|
||||
OMX_U32 indexTimestamp;
|
||||
OMX_U32 outputIndexTimestamp;
|
||||
|
||||
OMX_BOOL bConfiguredMFCSrc;
|
||||
OMX_BOOL bConfiguredMFCDst;
|
||||
|
||||
OMX_BOOL bPrependSpsPpsToIdr;
|
||||
OMX_BOOL bTemporalSVC;
|
||||
OMX_BOOL bRoiInfo;
|
||||
OMX_BOOL bWeightedPrediction;
|
||||
|
||||
/* skypeHD */
|
||||
OMX_BOOL bEnableSkypeHD;
|
||||
OMX_S64 nTriggerTS;
|
||||
OMX_U32 nLTRFrames;
|
||||
OMX_BOOL bLowLatency;
|
||||
EXYNOS_OMX_HIERARCHICAL_CODING_TYPE eHierarchicalType;
|
||||
H264_VUI_SAR stSarParam;
|
||||
OMX_S32 nBaseLayerPid;
|
||||
OMX_BOOL bSkypeBitrate;
|
||||
|
||||
EXTRA_DATA headerData;
|
||||
|
||||
ExynosVideoEncOps *pEncOps;
|
||||
ExynosVideoEncBufferOps *pInbufOps;
|
||||
ExynosVideoEncBufferOps *pOutbufOps;
|
||||
ExynosVideoEncParam encParam;
|
||||
ExynosVideoInstInfo videoInstInfo;
|
||||
|
||||
#define MAX_PROFILE_NUM 5
|
||||
OMX_VIDEO_AVCPROFILETYPE profiles[MAX_PROFILE_NUM];
|
||||
OMX_S32 nProfileCnt;
|
||||
OMX_VIDEO_AVCLEVELTYPE maxLevel;
|
||||
} EXYNOS_MFC_H264ENC_HANDLE;
|
||||
|
||||
typedef struct _EXYNOS_H264ENC_HANDLE
|
||||
{
|
||||
/* OMX Codec specific */
|
||||
OMX_VIDEO_PARAM_AVCTYPE AVCComponent[ALL_PORT_NUM];
|
||||
OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE errorCorrectionType[ALL_PORT_NUM];
|
||||
OMX_VIDEO_PARAM_AVCSLICEFMO AVCSliceFmo;
|
||||
OMX_VIDEO_QPRANGE qpRangeI;
|
||||
OMX_VIDEO_QPRANGE qpRangeP;
|
||||
OMX_VIDEO_QPRANGE qpRangeB;
|
||||
OMX_VIDEO_PARAM_CHROMA_QP_OFFSET chromaQPOffset;
|
||||
OMX_BOOL bDisableHBEncoding;
|
||||
|
||||
/* Temporal SVC */
|
||||
OMX_U32 nMaxTemporalLayerCount;
|
||||
OMX_U32 nMaxTemporalLayerCountForB;
|
||||
OMX_U32 nTemporalLayerCount;
|
||||
OMX_U32 nTemporalLayerCountForB;
|
||||
OMX_BOOL bUseTemporalLayerBitrateRatio;
|
||||
OMX_U32 nTemporalLayerBitrateRatio[OMX_VIDEO_MAX_AVC_TEMPORAL_LAYERS];
|
||||
|
||||
/* SEC MFC Codec specific */
|
||||
EXYNOS_MFC_H264ENC_HANDLE hMFCH264Handle;
|
||||
|
||||
OMX_BOOL bSourceStart;
|
||||
OMX_BOOL bDestinationStart;
|
||||
OMX_HANDLETYPE hSourceStartEvent;
|
||||
OMX_HANDLETYPE hDestinationInStartEvent;
|
||||
OMX_HANDLETYPE hDestinationOutStartEvent;
|
||||
|
||||
EXYNOS_QUEUE bypassBufferInfoQ;
|
||||
} EXYNOS_H264ENC_HANDLE;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
OSCL_EXPORT_REF OMX_ERRORTYPE Exynos_OMX_ComponentInit(OMX_HANDLETYPE hComponent, OMX_STRING componentName);
|
||||
OMX_ERRORTYPE Exynos_OMX_ComponentDeinit(OMX_HANDLETYPE hComponent);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
190
openmax/component/video/enc/h264/NOTICE
Normal file
190
openmax/component/video/enc/h264/NOTICE
Normal file
@@ -0,0 +1,190 @@
|
||||
|
||||
Copyright (c) 2014, The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
60
openmax/component/video/enc/h264/library_register.c
Normal file
60
openmax/component/video/enc/h264/library_register.c
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2012 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file library_register.c
|
||||
* @brief
|
||||
* @author SeungBeom Kim (sbcrux.kim@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2012.02.20 : Create
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include "Exynos_OSAL_Memory.h"
|
||||
#include "Exynos_OSAL_ETC.h"
|
||||
#include "library_register.h"
|
||||
#include "Exynos_OSAL_Log.h"
|
||||
|
||||
|
||||
OSCL_EXPORT_REF int Exynos_OMX_COMPONENT_Library_Register(ExynosRegisterComponentType **exynosComponents)
|
||||
{
|
||||
FunctionIn();
|
||||
|
||||
if (exynosComponents == NULL)
|
||||
goto EXIT;
|
||||
|
||||
/* component 1 - video Encoder H.264 */
|
||||
Exynos_OSAL_Strcpy(exynosComponents[0]->componentName, EXYNOS_OMX_COMPONENT_H264_ENC);
|
||||
Exynos_OSAL_Strcpy(exynosComponents[0]->roles[0], EXYNOS_OMX_COMPONENT_H264_ENC_ROLE);
|
||||
exynosComponents[0]->totalRoleNum = MAX_COMPONENT_ROLE_NUM;
|
||||
|
||||
/* component 2 - video Encoder H.264 for DRM */
|
||||
Exynos_OSAL_Strcpy(exynosComponents[1]->componentName, EXYNOS_OMX_COMPONENT_H264_DRM_ENC);
|
||||
Exynos_OSAL_Strcpy(exynosComponents[1]->roles[0], EXYNOS_OMX_COMPONENT_H264_DRM_ENC_ROLE);
|
||||
exynosComponents[1]->totalRoleNum = MAX_COMPONENT_ROLE_NUM;
|
||||
|
||||
EXIT:
|
||||
FunctionOut();
|
||||
|
||||
return MAX_COMPONENT_NUM;
|
||||
}
|
||||
|
||||
57
openmax/component/video/enc/h264/library_register.h
Normal file
57
openmax/component/video/enc/h264/library_register.h
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2012 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file library_register.h
|
||||
* @brief
|
||||
* @author SeungBeom Kim (sbcrux.kim@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2012.02.20 : Create
|
||||
*/
|
||||
|
||||
#ifndef EXYNOS_OMX_H264_REG
|
||||
#define EXYNOS_OMX_H264_REG
|
||||
|
||||
#include "Exynos_OMX_Def.h"
|
||||
#include "OMX_Component.h"
|
||||
#include "Exynos_OMX_Component_Register.h"
|
||||
|
||||
|
||||
#define OSCL_EXPORT_REF __attribute__((visibility("default")))
|
||||
#define MAX_COMPONENT_NUM 2
|
||||
#define MAX_COMPONENT_ROLE_NUM 1
|
||||
|
||||
/* H.264 */
|
||||
#define EXYNOS_OMX_COMPONENT_H264_ENC "OMX.Exynos.AVC.Encoder"
|
||||
#define EXYNOS_OMX_COMPONENT_H264_DRM_ENC "OMX.Exynos.AVC.Encoder.secure"
|
||||
#define EXYNOS_OMX_COMPONENT_H264_ENC_ROLE "video_encoder.avc"
|
||||
#define EXYNOS_OMX_COMPONENT_H264_DRM_ENC_ROLE "video_encoder.avc-wfd"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
OSCL_EXPORT_REF int Exynos_OMX_COMPONENT_Library_Register(ExynosRegisterComponentType **exynosComponents);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
74
openmax/component/video/enc/h264wfd/Android.mk
Normal file
74
openmax/component/video/enc/h264wfd/Android.mk
Normal file
@@ -0,0 +1,74 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
Exynos_OMX_H264enc_wfd.c \
|
||||
library_register.c
|
||||
|
||||
LOCAL_PRELINK_MODULE := false
|
||||
LOCAL_MODULE := libOMX.Exynos.AVC.WFD.Encoder
|
||||
LOCAL_MODULE_RELATIVE_PATH := omx
|
||||
LOCAL_PROPRIETARY_MODULE := true
|
||||
|
||||
LOCAL_CFLAGS :=
|
||||
|
||||
ifeq ($(BOARD_USE_DMA_BUF), true)
|
||||
LOCAL_CFLAGS += -DUSE_DMA_BUF
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_SINGLE_PLANE_IN_DRM), true)
|
||||
LOCAL_CFLAGS += -DUSE_SINGLE_PLANE_IN_DRM
|
||||
endif
|
||||
|
||||
ifdef BOARD_EXYNOS_S10B_FORMAT_ALIGN
|
||||
LOCAL_CFLAGS += -DS10B_FORMAT_8B_ALIGNMENT=$(BOARD_EXYNOS_S10B_FORMAT_ALIGN)
|
||||
endif
|
||||
|
||||
LOCAL_ARM_MODE := arm
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := libVendorVideoApi libExynosOMX_OSAL libExynosVideoApi
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
libc \
|
||||
libcutils \
|
||||
libutils \
|
||||
libdl \
|
||||
liblog \
|
||||
libhardware \
|
||||
libhidlbase \
|
||||
libui \
|
||||
libexynosgraphicbuffer \
|
||||
libstagefright_foundation \
|
||||
libexynosv4l2 \
|
||||
libion_exynos \
|
||||
libcsc \
|
||||
libExynosOMX_Resourcemanager \
|
||||
libepicoperator
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(EXYNOS_OMX_INC)/exynos \
|
||||
$(EXYNOS_OMX_TOP)/osal \
|
||||
$(EXYNOS_OMX_TOP)/core \
|
||||
$(EXYNOS_OMX_COMPONENT)/common \
|
||||
$(EXYNOS_OMX_COMPONENT)/video/enc \
|
||||
$(EXYNOS_VIDEO_CODEC)/include \
|
||||
$(TOP)/hardware/samsung_slsi/exynos/include \
|
||||
|
||||
ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
|
||||
LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
|
||||
LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
|
||||
else
|
||||
ifeq ($(BOARD_USE_ANDROID), true)
|
||||
LOCAL_HEADER_LIBRARIES := media_plugin_headers
|
||||
LOCAL_CFLAGS += -DUSE_ANDROID
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_CUSTOM_COMPONENT_SUPPORT), true)
|
||||
LOCAL_CFLAGS += -DUSE_CUSTOM_COMPONENT_SUPPORT
|
||||
endif
|
||||
|
||||
LOCAL_CFLAGS += -Wno-unused-variable -Wno-unused-label -Wno-unused-parameter -Wno-unused-function
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
5747
openmax/component/video/enc/h264wfd/Exynos_OMX_H264enc_wfd.c
Normal file
5747
openmax/component/video/enc/h264wfd/Exynos_OMX_H264enc_wfd.c
Normal file
File diff suppressed because it is too large
Load Diff
133
openmax/component/video/enc/h264wfd/Exynos_OMX_H264enc_wfd.h
Normal file
133
openmax/component/video/enc/h264wfd/Exynos_OMX_H264enc_wfd.h
Normal file
@@ -0,0 +1,133 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2017 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file Exynos_OMX_H264enc_wfd.h
|
||||
* @brief
|
||||
* @author SeungBeom Kim (sbcrux.kim@samsung.com)
|
||||
* Taehwan Kim (t_h.kim@samsung.com)
|
||||
* ByungGwan Kang (bk0917.kang@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2017.06.20 : Create
|
||||
*/
|
||||
|
||||
#ifndef EXYNOS_OMX_H264_WFD_ENC_COMPONENT
|
||||
#define EXYNOS_OMX_H264_WFD_ENC_COMPONENT
|
||||
|
||||
#include "Exynos_OMX_Def.h"
|
||||
#include "OMX_Component.h"
|
||||
#include "OMX_Video.h"
|
||||
|
||||
#include "ExynosVideoApi.h"
|
||||
#include "library_register.h"
|
||||
|
||||
typedef struct _EXYNOS_MFC_H264WFDENC_HANDLE
|
||||
{
|
||||
OMX_HANDLETYPE hMFCHandle;
|
||||
|
||||
OMX_U32 indexTimestamp;
|
||||
OMX_U32 outputIndexTimestamp;
|
||||
OMX_BOOL bPrependSpsPpsToIdr;
|
||||
OMX_BOOL bTemporalSVC;
|
||||
OMX_BOOL bRoiInfo;
|
||||
OMX_U32 nLTRFrames;
|
||||
|
||||
ExynosVideoEncOps *pEncOps;
|
||||
ExynosVideoEncBufferOps *pInbufOps;
|
||||
ExynosVideoEncBufferOps *pOutbufOps;
|
||||
ExynosVideoEncParam encParam;
|
||||
ExynosVideoInstInfo videoInstInfo;
|
||||
|
||||
#define MAX_PROFILE_NUM 5
|
||||
OMX_VIDEO_AVCPROFILETYPE profiles[MAX_PROFILE_NUM];
|
||||
OMX_S32 nProfileCnt;
|
||||
OMX_VIDEO_AVCLEVELTYPE maxLevel;
|
||||
} EXYNOS_MFC_H264WFDENC_HANDLE;
|
||||
|
||||
typedef struct _EXYNOS_H264WFDENC_HANDLE
|
||||
{
|
||||
/* OMX Codec specific */
|
||||
OMX_VIDEO_PARAM_AVCTYPE AVCComponent[ALL_PORT_NUM];
|
||||
OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE errorCorrectionType[ALL_PORT_NUM];
|
||||
OMX_VIDEO_PARAM_AVCSLICEFMO AVCSliceFmo;
|
||||
OMX_VIDEO_QPRANGE qpRangeI;
|
||||
OMX_VIDEO_QPRANGE qpRangeP;
|
||||
OMX_VIDEO_QPRANGE qpRangeB;
|
||||
EXYNOS_OMX_VIDEO_CONFIG_TEMPORALSVC TemporalSVC; /* Temporal SVC */
|
||||
|
||||
/* SEC MFC Codec specific */
|
||||
EXYNOS_MFC_H264WFDENC_HANDLE hMFCH264Handle;
|
||||
|
||||
EXYNOS_QUEUE bypassBufferInfoQ;
|
||||
|
||||
OMX_BOOL bLowLatency;
|
||||
EXYNOS_OMX_HIERARCHICAL_CODING_TYPE eHierarchicalType;
|
||||
|
||||
OMX_S32 nBaseLayerPid;
|
||||
OMX_U32 nMaxTemporalLayerCount;
|
||||
} EXYNOS_H264WFDENC_HANDLE;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
OSCL_EXPORT_REF OMX_ERRORTYPE Exynos_OMX_ComponentInit(OMX_HANDLETYPE hComponent, OMX_STRING componentName);
|
||||
OMX_ERRORTYPE Exynos_OMX_ComponentDeinit(OMX_HANDLETYPE hComponent);
|
||||
|
||||
OMX_ERRORTYPE Exynos_OMX_Port_Constructor(OMX_HANDLETYPE hComponent);
|
||||
OMX_ERRORTYPE Exynos_OMX_Port_Destructor(OMX_HANDLETYPE hComponent);
|
||||
int Exynos_GetPlaneFromPort(EXYNOS_OMX_BASEPORT *pPort);
|
||||
OMX_ERRORTYPE Exynos_SetPlaneToPort(EXYNOS_OMX_BASEPORT *pPort, int nPlaneNum);
|
||||
OMX_ERRORTYPE Exynos_OMX_EmptyThisBuffer(OMX_IN OMX_HANDLETYPE hComponent, OMX_IN OMX_BUFFERHEADERTYPE *pBuffer);
|
||||
OMX_ERRORTYPE Exynos_OMX_FillThisBuffer(OMX_IN OMX_HANDLETYPE hComponent, OMX_IN OMX_BUFFERHEADERTYPE *pBuffer);
|
||||
|
||||
|
||||
OMX_ERRORTYPE Exynos_OMX_BaseComponent_Constructor(OMX_IN OMX_HANDLETYPE hComponent);
|
||||
OMX_ERRORTYPE Exynos_OMX_BaseComponent_Destructor(OMX_IN OMX_HANDLETYPE hComponent);
|
||||
OMX_ERRORTYPE Exynos_OMX_Check_SizeVersion(OMX_PTR header, OMX_U32 size);
|
||||
|
||||
void Exynos_UpdateFrameSize(OMX_COMPONENTTYPE *pOMXComponent);
|
||||
void Exynos_Input_SetSupportFormat(EXYNOS_OMX_BASECOMPONENT *pExynosComponent);
|
||||
OMX_COLOR_FORMATTYPE Exynos_Input_GetActualColorFormat(EXYNOS_OMX_BASECOMPONENT *pExynosComponent);
|
||||
OMX_ERRORTYPE Exynos_ResetAllPortConfig(OMX_COMPONENTTYPE *pOMXComponent);
|
||||
OMX_ERRORTYPE Exynos_OMX_VideoEncodeComponentInit(OMX_IN OMX_HANDLETYPE hComponent);
|
||||
OMX_ERRORTYPE Exynos_OMX_VideoEncodeComponentDeinit(OMX_IN OMX_HANDLETYPE hComponent);
|
||||
|
||||
OMX_ERRORTYPE Exynos_OMX_UseBuffer(
|
||||
OMX_IN OMX_HANDLETYPE hComponent,
|
||||
OMX_INOUT OMX_BUFFERHEADERTYPE **ppBufferHdr,
|
||||
OMX_IN OMX_U32 nPortIndex,
|
||||
OMX_IN OMX_PTR pAppPrivate,
|
||||
OMX_IN OMX_U32 nSizeBytes,
|
||||
OMX_IN OMX_U8 *pBuffer);
|
||||
OMX_ERRORTYPE Exynos_OMX_AllocateBuffer(
|
||||
OMX_IN OMX_HANDLETYPE hComponent,
|
||||
OMX_INOUT OMX_BUFFERHEADERTYPE **ppBuffer,
|
||||
OMX_IN OMX_U32 nPortIndex,
|
||||
OMX_IN OMX_PTR pAppPrivate,
|
||||
OMX_IN OMX_U32 nSizeBytes);
|
||||
OMX_ERRORTYPE Exynos_OMX_FreeBuffer(
|
||||
OMX_IN OMX_HANDLETYPE hComponent,
|
||||
OMX_IN OMX_U32 nPortIndex,
|
||||
OMX_IN OMX_BUFFERHEADERTYPE *pBufferHdr);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
190
openmax/component/video/enc/h264wfd/NOTICE
Normal file
190
openmax/component/video/enc/h264wfd/NOTICE
Normal file
@@ -0,0 +1,190 @@
|
||||
|
||||
Copyright (c) 2014, The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
62
openmax/component/video/enc/h264wfd/library_register.c
Normal file
62
openmax/component/video/enc/h264wfd/library_register.c
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2017 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file library_register.c
|
||||
* @brief
|
||||
* @author SeungBeom Kim (sbcrux.kim@samsung.com)
|
||||
* Taehwan Kim (t_h.kim@samsung.com)
|
||||
* ByungGwan Kang (bk0917.kang@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2017.06.20 : Create
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include "Exynos_OSAL_Memory.h"
|
||||
#include "Exynos_OSAL_ETC.h"
|
||||
#include "library_register.h"
|
||||
#include "Exynos_OSAL_Log.h"
|
||||
|
||||
|
||||
OSCL_EXPORT_REF int Exynos_OMX_COMPONENT_Library_Register(ExynosRegisterComponentType **exynosComponents)
|
||||
{
|
||||
FunctionIn();
|
||||
|
||||
if (exynosComponents == NULL)
|
||||
goto EXIT;
|
||||
|
||||
/* component 1 - video Encoder H.264 */
|
||||
Exynos_OSAL_Strcpy(exynosComponents[0]->componentName, EXYNOS_OMX_COMPONENT_H264_WFD_ENC);
|
||||
Exynos_OSAL_Strcpy(exynosComponents[0]->roles[0], EXYNOS_OMX_COMPONENT_H264_WFD_ENC_ROLE);
|
||||
exynosComponents[0]->totalRoleNum = MAX_COMPONENT_ROLE_NUM;
|
||||
|
||||
/* component 2 - video Encoder H.264 for DRM */
|
||||
Exynos_OSAL_Strcpy(exynosComponents[1]->componentName, EXYNOS_OMX_COMPONENT_H264_WFD_DRM_ENC);
|
||||
Exynos_OSAL_Strcpy(exynosComponents[1]->roles[0], EXYNOS_OMX_COMPONENT_H264_WFD_ENC_ROLE);
|
||||
exynosComponents[1]->totalRoleNum = MAX_COMPONENT_ROLE_NUM;
|
||||
|
||||
EXIT:
|
||||
FunctionOut();
|
||||
|
||||
return MAX_COMPONENT_NUM;
|
||||
}
|
||||
|
||||
58
openmax/component/video/enc/h264wfd/library_register.h
Normal file
58
openmax/component/video/enc/h264wfd/library_register.h
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2017 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file library_register.h
|
||||
* @brief
|
||||
* @author SeungBeom Kim (sbcrux.kim@samsung.com)
|
||||
* Taehwan Kim (t_h.kim@samsung.com)
|
||||
* ByungGwan Kang (bk0917.kang@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2017.06.20 : Create
|
||||
*/
|
||||
|
||||
#ifndef EXYNOS_OMX_H264_WFD_REG
|
||||
#define EXYNOS_OMX_H264_WFD_REG
|
||||
|
||||
#include "Exynos_OMX_Def.h"
|
||||
#include "OMX_Component.h"
|
||||
#include "Exynos_OMX_Component_Register.h"
|
||||
|
||||
|
||||
#define OSCL_EXPORT_REF __attribute__((visibility("default")))
|
||||
#define MAX_COMPONENT_NUM 2
|
||||
#define MAX_COMPONENT_ROLE_NUM 1
|
||||
|
||||
/* H.264 */
|
||||
#define EXYNOS_OMX_COMPONENT_H264_WFD_ENC "OMX.Exynos.AVC.WFD.Encoder"
|
||||
#define EXYNOS_OMX_COMPONENT_H264_WFD_DRM_ENC "OMX.Exynos.AVC.WFD.Encoder.secure"
|
||||
#define EXYNOS_OMX_COMPONENT_H264_WFD_ENC_ROLE "video_encoder.avc-wfd"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
OSCL_EXPORT_REF int Exynos_OMX_COMPONENT_Library_Register(ExynosRegisterComponentType **exynosComponents);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
88
openmax/component/video/enc/hevc/Android.mk
Normal file
88
openmax/component/video/enc/hevc/Android.mk
Normal file
@@ -0,0 +1,88 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
Exynos_OMX_HEVCenc.c \
|
||||
library_register.c
|
||||
|
||||
LOCAL_PRELINK_MODULE := false
|
||||
LOCAL_MODULE := libOMX.Exynos.HEVC.Encoder
|
||||
LOCAL_MODULE_RELATIVE_PATH := omx
|
||||
LOCAL_PROPRIETARY_MODULE := true
|
||||
|
||||
LOCAL_CFLAGS :=
|
||||
LOCAL_CFLAGS += -DUSE_HEVC_SUPPORT
|
||||
|
||||
ifeq ($(BOARD_USE_DMA_BUF), true)
|
||||
LOCAL_CFLAGS += -DUSE_DMA_BUF
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_CSC_HW), true)
|
||||
LOCAL_CFLAGS += -DUSE_CSC_HW
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_SINGLE_PLANE_IN_DRM), true)
|
||||
LOCAL_CFLAGS += -DUSE_SINGLE_PLANE_IN_DRM
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_FULL_ST2094_40), true)
|
||||
LOCAL_CFALGS += -DUSE_FULL_ST2094_40
|
||||
endif
|
||||
|
||||
ifdef BOARD_EXYNOS_S10B_FORMAT_ALIGN
|
||||
LOCAL_CFLAGS += -DS10B_FORMAT_8B_ALIGNMENT=$(BOARD_EXYNOS_S10B_FORMAT_ALIGN)
|
||||
endif
|
||||
|
||||
LOCAL_ARM_MODE := arm
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := libExynosOMX_Venc libVendorVideoApi libExynosOMX_OSAL libExynosOMX_Basecomponent \
|
||||
libExynosVideoApi
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
libc \
|
||||
libcutils \
|
||||
libutils \
|
||||
libdl \
|
||||
liblog \
|
||||
libhardware \
|
||||
libhidlbase \
|
||||
libui \
|
||||
libexynosgraphicbuffer \
|
||||
libstagefright_foundation \
|
||||
libexynosv4l2 \
|
||||
libion_exynos \
|
||||
libcsc \
|
||||
libExynosOMX_Resourcemanager \
|
||||
libepicoperator
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(EXYNOS_OMX_INC)/exynos \
|
||||
$(EXYNOS_OMX_TOP)/osal \
|
||||
$(EXYNOS_OMX_TOP)/core \
|
||||
$(EXYNOS_OMX_COMPONENT)/common \
|
||||
$(EXYNOS_OMX_COMPONENT)/video/enc \
|
||||
$(EXYNOS_VIDEO_CODEC)/include \
|
||||
$(TOP)/hardware/samsung_slsi/exynos/include \
|
||||
|
||||
ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
|
||||
LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
|
||||
LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
|
||||
else
|
||||
ifeq ($(BOARD_USE_ANDROID), true)
|
||||
LOCAL_HEADER_LIBRARIES := media_plugin_headers
|
||||
LOCAL_CFLAGS += -DUSE_ANDROID
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_CUSTOM_COMPONENT_SUPPORT), true)
|
||||
LOCAL_CFLAGS += -DUSE_CUSTOM_COMPONENT_SUPPORT
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_SMALL_SECURE_MEMORY), true)
|
||||
LOCAL_CFLAGS += -DUSE_SMALL_SECURE_MEMORY
|
||||
endif
|
||||
|
||||
LOCAL_CFLAGS += -Wno-unused-variable -Wno-unused-label
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
4545
openmax/component/video/enc/hevc/Exynos_OMX_HEVCenc.c
Normal file
4545
openmax/component/video/enc/hevc/Exynos_OMX_HEVCenc.c
Normal file
File diff suppressed because it is too large
Load Diff
109
openmax/component/video/enc/hevc/Exynos_OMX_HEVCenc.h
Normal file
109
openmax/component/video/enc/hevc/Exynos_OMX_HEVCenc.h
Normal file
@@ -0,0 +1,109 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2014 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file Exynos_OMX_HEVCenc.h
|
||||
* @brief
|
||||
* @author SeungBeom Kim (sbcrux.kim@samsung.com)
|
||||
* Taehwan Kim (t_h.kim@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2014.05.22 : Create
|
||||
*/
|
||||
|
||||
#ifndef EXYNOS_OMX_HEVC_ENC_COMPONENT
|
||||
#define EXYNOS_OMX_HEVC_ENC_COMPONENT
|
||||
|
||||
#include "Exynos_OMX_Def.h"
|
||||
#include "OMX_Component.h"
|
||||
#include "OMX_Video.h"
|
||||
|
||||
#include "ExynosVideoApi.h"
|
||||
|
||||
typedef struct _EXYNOS_MFC_HEVCENC_HANDLE
|
||||
{
|
||||
OMX_HANDLETYPE hMFCHandle;
|
||||
|
||||
OMX_U32 indexTimestamp;
|
||||
OMX_U32 outputIndexTimestamp;
|
||||
|
||||
OMX_BOOL bConfiguredMFCSrc;
|
||||
OMX_BOOL bConfiguredMFCDst;
|
||||
OMX_BOOL bPrependSpsPpsToIdr;
|
||||
OMX_BOOL bTemporalSVC;
|
||||
OMX_BOOL bRoiInfo;
|
||||
OMX_BOOL bWeightedPrediction;
|
||||
OMX_BOOL bHDRDynamicInfo;
|
||||
OMX_BOOL bGPBEnable;
|
||||
|
||||
ExynosVideoEncOps *pEncOps;
|
||||
ExynosVideoEncBufferOps *pInbufOps;
|
||||
ExynosVideoEncBufferOps *pOutbufOps;
|
||||
ExynosVideoEncParam encParam;
|
||||
ExynosVideoInstInfo videoInstInfo;
|
||||
|
||||
OMX_U32 nRefForPframes;
|
||||
|
||||
#define MAX_PROFILE_NUM 4
|
||||
OMX_VIDEO_HEVCPROFILETYPE profiles[MAX_PROFILE_NUM];
|
||||
OMX_S32 nProfileCnt;
|
||||
OMX_VIDEO_HEVCLEVELTYPE maxLevel;
|
||||
} EXYNOS_MFC_HEVCENC_HANDLE;
|
||||
|
||||
typedef struct _EXYNOS_HEVCENC_HANDLE
|
||||
{
|
||||
/* OMX Codec specific */
|
||||
OMX_VIDEO_PARAM_HEVCTYPE HevcComponent[ALL_PORT_NUM];
|
||||
OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE errorCorrectionType[ALL_PORT_NUM];
|
||||
OMX_VIDEO_QPRANGE qpRangeI;
|
||||
OMX_VIDEO_QPRANGE qpRangeP;
|
||||
OMX_VIDEO_QPRANGE qpRangeB;
|
||||
OMX_VIDEO_PARAM_CHROMA_QP_OFFSET chromaQPOffset;
|
||||
OMX_BOOL bDisableHBEncoding;
|
||||
|
||||
/* Temporal SVC */
|
||||
OMX_U32 nMaxTemporalLayerCount;
|
||||
OMX_U32 nMaxTemporalLayerCountForB;
|
||||
OMX_U32 nTemporalLayerCount;
|
||||
OMX_U32 nTemporalLayerCountForB;
|
||||
OMX_BOOL bUseTemporalLayerBitrateRatio;
|
||||
OMX_U32 nTemporalLayerBitrateRatio[OMX_VIDEO_MAX_HEVC_TEMPORAL_LAYERS];
|
||||
|
||||
/* SEC MFC Codec specific */
|
||||
EXYNOS_MFC_HEVCENC_HANDLE hMFCHevcHandle;
|
||||
|
||||
OMX_BOOL bSourceStart;
|
||||
OMX_BOOL bDestinationStart;
|
||||
OMX_HANDLETYPE hSourceStartEvent;
|
||||
OMX_HANDLETYPE hDestinationInStartEvent;
|
||||
OMX_HANDLETYPE hDestinationOutStartEvent;
|
||||
|
||||
EXYNOS_QUEUE bypassBufferInfoQ;
|
||||
} EXYNOS_HEVCENC_HANDLE;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
OSCL_EXPORT_REF OMX_ERRORTYPE Exynos_OMX_ComponentInit(OMX_HANDLETYPE hComponent, OMX_STRING componentName);
|
||||
OMX_ERRORTYPE Exynos_OMX_ComponentDeinit(OMX_HANDLETYPE hComponent);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
190
openmax/component/video/enc/hevc/NOTICE
Normal file
190
openmax/component/video/enc/hevc/NOTICE
Normal file
@@ -0,0 +1,190 @@
|
||||
|
||||
Copyright (c) 2014, The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
61
openmax/component/video/enc/hevc/library_register.c
Normal file
61
openmax/component/video/enc/hevc/library_register.c
Normal file
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2014 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file library_register.c
|
||||
* @brief
|
||||
* @author SeungBeom Kim (sbcrux.kim@samsung.com)
|
||||
* Taehwan Kim (t_h.kim@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2014.05.22 : Create
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include "Exynos_OSAL_Memory.h"
|
||||
#include "Exynos_OSAL_ETC.h"
|
||||
#include "library_register.h"
|
||||
#include "Exynos_OSAL_Log.h"
|
||||
|
||||
|
||||
OSCL_EXPORT_REF int Exynos_OMX_COMPONENT_Library_Register(ExynosRegisterComponentType **exynosComponents)
|
||||
{
|
||||
FunctionIn();
|
||||
|
||||
if (exynosComponents == NULL)
|
||||
goto EXIT;
|
||||
|
||||
/* component 1 - video Encoder HEVC */
|
||||
Exynos_OSAL_Strcpy(exynosComponents[0]->componentName, EXYNOS_OMX_COMPONENT_HEVC_ENC);
|
||||
Exynos_OSAL_Strcpy(exynosComponents[0]->roles[0], EXYNOS_OMX_COMPONENT_HEVC_ENC_ROLE);
|
||||
exynosComponents[0]->totalRoleNum = MAX_COMPONENT_ROLE_NUM;
|
||||
|
||||
/* component 2 - video Encoder HEVC for DRM */
|
||||
Exynos_OSAL_Strcpy(exynosComponents[1]->componentName, EXYNOS_OMX_COMPONENT_HEVC_DRM_ENC);
|
||||
Exynos_OSAL_Strcpy(exynosComponents[1]->roles[0], EXYNOS_OMX_COMPONENT_HEVC_DRM_ENC_ROLE);
|
||||
exynosComponents[1]->totalRoleNum = MAX_COMPONENT_ROLE_NUM;
|
||||
|
||||
EXIT:
|
||||
FunctionOut();
|
||||
|
||||
return MAX_COMPONENT_NUM;
|
||||
}
|
||||
|
||||
58
openmax/component/video/enc/hevc/library_register.h
Normal file
58
openmax/component/video/enc/hevc/library_register.h
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2014 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file library_register.h
|
||||
* @brief
|
||||
* @author SeungBeom Kim (sbcrux.kim@samsung.com)
|
||||
* Taehwan Kim (t_h.kim@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2014.05.22 : Create
|
||||
*/
|
||||
|
||||
#ifndef EXYNOS_OMX_HEVC_REG
|
||||
#define EXYNOS_OMX_HEVC_REG
|
||||
|
||||
#include "Exynos_OMX_Def.h"
|
||||
#include "OMX_Component.h"
|
||||
#include "Exynos_OMX_Component_Register.h"
|
||||
|
||||
|
||||
#define OSCL_EXPORT_REF __attribute__((visibility("default")))
|
||||
#define MAX_COMPONENT_NUM 2
|
||||
#define MAX_COMPONENT_ROLE_NUM 1
|
||||
|
||||
/* HEVC */
|
||||
#define EXYNOS_OMX_COMPONENT_HEVC_ENC "OMX.Exynos.HEVC.Encoder"
|
||||
#define EXYNOS_OMX_COMPONENT_HEVC_DRM_ENC "OMX.Exynos.HEVC.Encoder.secure"
|
||||
#define EXYNOS_OMX_COMPONENT_HEVC_ENC_ROLE "video_encoder.hevc"
|
||||
#define EXYNOS_OMX_COMPONENT_HEVC_DRM_ENC_ROLE "video_encoder.hevc-wfd"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
OSCL_EXPORT_REF int Exynos_OMX_COMPONENT_Library_Register(ExynosRegisterComponentType **exynosComponents);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
74
openmax/component/video/enc/hevcwfd/Android.mk
Normal file
74
openmax/component/video/enc/hevcwfd/Android.mk
Normal file
@@ -0,0 +1,74 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
Exynos_OMX_HEVCenc_wfd.c \
|
||||
library_register.c
|
||||
|
||||
LOCAL_PRELINK_MODULE := false
|
||||
LOCAL_MODULE := libOMX.Exynos.HEVC.WFD.Encoder
|
||||
LOCAL_MODULE_RELATIVE_PATH := omx
|
||||
LOCAL_PROPRIETARY_MODULE := true
|
||||
|
||||
LOCAL_CFLAGS :=
|
||||
|
||||
ifeq ($(BOARD_USE_DMA_BUF), true)
|
||||
LOCAL_CFLAGS += -DUSE_DMA_BUF
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_SINGLE_PLANE_IN_DRM), true)
|
||||
LOCAL_CFLAGS += -DUSE_SINGLE_PLANE_IN_DRM
|
||||
endif
|
||||
|
||||
ifdef BOARD_EXYNOS_S10B_FORMAT_ALIGN
|
||||
LOCAL_CFLAGS += -DS10B_FORMAT_8B_ALIGNMENT=$(BOARD_EXYNOS_S10B_FORMAT_ALIGN)
|
||||
endif
|
||||
|
||||
LOCAL_ARM_MODE := arm
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := libVendorVideoApi libExynosOMX_OSAL libExynosVideoApi
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
libc \
|
||||
libcutils \
|
||||
libutils \
|
||||
libdl \
|
||||
liblog \
|
||||
libhardware \
|
||||
libhidlbase \
|
||||
libui \
|
||||
libexynosgraphicbuffer \
|
||||
libstagefright_foundation \
|
||||
libexynosv4l2 \
|
||||
libion_exynos \
|
||||
libcsc \
|
||||
libExynosOMX_Resourcemanager \
|
||||
libepicoperator
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(EXYNOS_OMX_INC)/exynos \
|
||||
$(EXYNOS_OMX_TOP)/osal \
|
||||
$(EXYNOS_OMX_TOP)/core \
|
||||
$(EXYNOS_OMX_COMPONENT)/common \
|
||||
$(EXYNOS_OMX_COMPONENT)/video/enc \
|
||||
$(EXYNOS_VIDEO_CODEC)/include \
|
||||
$(TOP)/hardware/samsung_slsi/exynos/include \
|
||||
|
||||
ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
|
||||
LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
|
||||
LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
|
||||
else
|
||||
ifeq ($(BOARD_USE_ANDROID), true)
|
||||
LOCAL_HEADER_LIBRARIES := media_plugin_headers
|
||||
LOCAL_CFLAGS += -DUSE_ANDROID
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_CUSTOM_COMPONENT_SUPPORT), true)
|
||||
LOCAL_CFLAGS += -DUSE_CUSTOM_COMPONENT_SUPPORT
|
||||
endif
|
||||
|
||||
LOCAL_CFLAGS += -Wno-unused-variable -Wno-unused-label -Wno-unused-parameter -Wno-unused-function
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
5730
openmax/component/video/enc/hevcwfd/Exynos_OMX_HEVCenc_wfd.c
Normal file
5730
openmax/component/video/enc/hevcwfd/Exynos_OMX_HEVCenc_wfd.c
Normal file
File diff suppressed because it is too large
Load Diff
132
openmax/component/video/enc/hevcwfd/Exynos_OMX_HEVCenc_wfd.h
Normal file
132
openmax/component/video/enc/hevcwfd/Exynos_OMX_HEVCenc_wfd.h
Normal file
@@ -0,0 +1,132 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2017 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file Exynos_OMX_HEVCenc_wfd.h
|
||||
* @brief
|
||||
* @author SeungBeom Kim (sbcrux.kim@samsung.com)
|
||||
* Taehwan Kim (t_h.kim@samsung.com)
|
||||
* ByungGwan Kang (bk0917.kang@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2018.07.13 : Create
|
||||
*/
|
||||
|
||||
#ifndef EXYNOS_OMX_HEVC_WFD_ENC_COMPONENT
|
||||
#define EXYNOS_OMX_HEVC_WFD_ENC_COMPONENT
|
||||
|
||||
#include "Exynos_OMX_Def.h"
|
||||
#include "OMX_Component.h"
|
||||
#include "OMX_Video.h"
|
||||
|
||||
#include "ExynosVideoApi.h"
|
||||
#include "library_register.h"
|
||||
|
||||
typedef struct _EXYNOS_MFC_HEVCWFDENC_HANDLE
|
||||
{
|
||||
OMX_HANDLETYPE hMFCHandle;
|
||||
|
||||
OMX_U32 indexTimestamp;
|
||||
OMX_U32 outputIndexTimestamp;
|
||||
OMX_BOOL bPrependSpsPpsToIdr;
|
||||
OMX_BOOL bTemporalSVC;
|
||||
OMX_BOOL bRoiInfo;
|
||||
OMX_U32 nLTRFrames;
|
||||
|
||||
ExynosVideoEncOps *pEncOps;
|
||||
ExynosVideoEncBufferOps *pInbufOps;
|
||||
ExynosVideoEncBufferOps *pOutbufOps;
|
||||
ExynosVideoEncParam encParam;
|
||||
ExynosVideoInstInfo videoInstInfo;
|
||||
|
||||
#define MAX_PROFILE_NUM 3
|
||||
OMX_VIDEO_HEVCPROFILETYPE profiles[MAX_PROFILE_NUM];
|
||||
OMX_S32 nProfileCnt;
|
||||
OMX_VIDEO_HEVCLEVELTYPE maxLevel;
|
||||
} EXYNOS_MFC_HEVCWFDENC_HANDLE;
|
||||
|
||||
typedef struct _EXYNOS_HEVCWFDENC_HANDLE
|
||||
{
|
||||
/* OMX Codec specific */
|
||||
OMX_VIDEO_PARAM_HEVCTYPE HevcComponent[ALL_PORT_NUM];
|
||||
OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE errorCorrectionType[ALL_PORT_NUM];
|
||||
OMX_VIDEO_QPRANGE qpRangeI;
|
||||
OMX_VIDEO_QPRANGE qpRangeP;
|
||||
OMX_VIDEO_QPRANGE qpRangeB;
|
||||
|
||||
OMX_U32 nMaxTemporalLayerCount;
|
||||
OMX_U32 nMaxTemporalLayerCountForB;
|
||||
OMX_U32 nTemporalLayerCount;
|
||||
OMX_U32 nTemporalLayerCountForB;
|
||||
OMX_BOOL bUseTemporalLayerBitrateRatio;
|
||||
OMX_U32 nTemporalLayerBitrateRatio[OMX_VIDEO_MAX_HEVC_TEMPORAL_LAYERS];
|
||||
|
||||
/* SEC MFC Codec specific */
|
||||
EXYNOS_MFC_HEVCWFDENC_HANDLE hMFCHevcHandle;
|
||||
|
||||
EXYNOS_QUEUE bypassBufferInfoQ;
|
||||
} EXYNOS_HEVCWFDENC_HANDLE;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
OSCL_EXPORT_REF OMX_ERRORTYPE Exynos_OMX_ComponentInit(OMX_HANDLETYPE hComponent, OMX_STRING componentName);
|
||||
OMX_ERRORTYPE Exynos_OMX_ComponentDeinit(OMX_HANDLETYPE hComponent);
|
||||
|
||||
OMX_ERRORTYPE Exynos_OMX_Port_Constructor(OMX_HANDLETYPE hComponent);
|
||||
OMX_ERRORTYPE Exynos_OMX_Port_Destructor(OMX_HANDLETYPE hComponent);
|
||||
int Exynos_GetPlaneFromPort(EXYNOS_OMX_BASEPORT *pPort);
|
||||
OMX_ERRORTYPE Exynos_SetPlaneToPort(EXYNOS_OMX_BASEPORT *pPort, int nPlaneNum);
|
||||
OMX_ERRORTYPE Exynos_OMX_EmptyThisBuffer(OMX_IN OMX_HANDLETYPE hComponent, OMX_IN OMX_BUFFERHEADERTYPE *pBuffer);
|
||||
OMX_ERRORTYPE Exynos_OMX_FillThisBuffer(OMX_IN OMX_HANDLETYPE hComponent, OMX_IN OMX_BUFFERHEADERTYPE *pBuffer);
|
||||
|
||||
|
||||
OMX_ERRORTYPE Exynos_OMX_BaseComponent_Constructor(OMX_IN OMX_HANDLETYPE hComponent);
|
||||
OMX_ERRORTYPE Exynos_OMX_BaseComponent_Destructor(OMX_IN OMX_HANDLETYPE hComponent);
|
||||
OMX_ERRORTYPE Exynos_OMX_Check_SizeVersion(OMX_PTR header, OMX_U32 size);
|
||||
|
||||
void Exynos_UpdateFrameSize(OMX_COMPONENTTYPE *pOMXComponent);
|
||||
void Exynos_Input_SetSupportFormat(EXYNOS_OMX_BASECOMPONENT *pExynosComponent);
|
||||
OMX_COLOR_FORMATTYPE Exynos_Input_GetActualColorFormat(EXYNOS_OMX_BASECOMPONENT *pExynosComponent);
|
||||
OMX_ERRORTYPE Exynos_ResetAllPortConfig(OMX_COMPONENTTYPE *pOMXComponent);
|
||||
OMX_ERRORTYPE Exynos_OMX_VideoEncodeComponentInit(OMX_IN OMX_HANDLETYPE hComponent);
|
||||
OMX_ERRORTYPE Exynos_OMX_VideoEncodeComponentDeinit(OMX_IN OMX_HANDLETYPE hComponent);
|
||||
|
||||
OMX_ERRORTYPE Exynos_OMX_UseBuffer(
|
||||
OMX_IN OMX_HANDLETYPE hComponent,
|
||||
OMX_INOUT OMX_BUFFERHEADERTYPE **ppBufferHdr,
|
||||
OMX_IN OMX_U32 nPortIndex,
|
||||
OMX_IN OMX_PTR pAppPrivate,
|
||||
OMX_IN OMX_U32 nSizeBytes,
|
||||
OMX_IN OMX_U8 *pBuffer);
|
||||
OMX_ERRORTYPE Exynos_OMX_AllocateBuffer(
|
||||
OMX_IN OMX_HANDLETYPE hComponent,
|
||||
OMX_INOUT OMX_BUFFERHEADERTYPE **ppBuffer,
|
||||
OMX_IN OMX_U32 nPortIndex,
|
||||
OMX_IN OMX_PTR pAppPrivate,
|
||||
OMX_IN OMX_U32 nSizeBytes);
|
||||
OMX_ERRORTYPE Exynos_OMX_FreeBuffer(
|
||||
OMX_IN OMX_HANDLETYPE hComponent,
|
||||
OMX_IN OMX_U32 nPortIndex,
|
||||
OMX_IN OMX_BUFFERHEADERTYPE *pBufferHdr);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
190
openmax/component/video/enc/hevcwfd/NOTICE
Normal file
190
openmax/component/video/enc/hevcwfd/NOTICE
Normal file
@@ -0,0 +1,190 @@
|
||||
|
||||
Copyright (c) 2014, The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
62
openmax/component/video/enc/hevcwfd/library_register.c
Normal file
62
openmax/component/video/enc/hevcwfd/library_register.c
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2017 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file library_register.c
|
||||
* @brief
|
||||
* @author SeungBeom Kim (sbcrux.kim@samsung.com)
|
||||
* Taehwan Kim (t_h.kim@samsung.com)
|
||||
* ByungGwan Kang (bk0917.kang@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2018.07.13 : Create
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include "Exynos_OSAL_Memory.h"
|
||||
#include "Exynos_OSAL_ETC.h"
|
||||
#include "library_register.h"
|
||||
#include "Exynos_OSAL_Log.h"
|
||||
|
||||
|
||||
OSCL_EXPORT_REF int Exynos_OMX_COMPONENT_Library_Register(ExynosRegisterComponentType **exynosComponents)
|
||||
{
|
||||
FunctionIn();
|
||||
|
||||
if (exynosComponents == NULL)
|
||||
goto EXIT;
|
||||
|
||||
/* component 1 - video Encoder HEVC */
|
||||
Exynos_OSAL_Strcpy(exynosComponents[0]->componentName, EXYNOS_OMX_COMPONENT_HEVC_WFD_ENC);
|
||||
Exynos_OSAL_Strcpy(exynosComponents[0]->roles[0], EXYNOS_OMX_COMPONENT_HEVC_WFD_ENC_ROLE);
|
||||
exynosComponents[0]->totalRoleNum = MAX_COMPONENT_ROLE_NUM;
|
||||
|
||||
/* component 2 - video Encoder HEVC for DRM */
|
||||
Exynos_OSAL_Strcpy(exynosComponents[1]->componentName, EXYNOS_OMX_COMPONENT_HEVC_WFD_DRM_ENC);
|
||||
Exynos_OSAL_Strcpy(exynosComponents[1]->roles[0], EXYNOS_OMX_COMPONENT_HEVC_WFD_ENC_ROLE);
|
||||
exynosComponents[1]->totalRoleNum = MAX_COMPONENT_ROLE_NUM;
|
||||
|
||||
EXIT:
|
||||
FunctionOut();
|
||||
|
||||
return MAX_COMPONENT_NUM;
|
||||
}
|
||||
|
||||
58
openmax/component/video/enc/hevcwfd/library_register.h
Normal file
58
openmax/component/video/enc/hevcwfd/library_register.h
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2017 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file library_register.h
|
||||
* @brief
|
||||
* @author SeungBeom Kim (sbcrux.kim@samsung.com)
|
||||
* Taehwan Kim (t_h.kim@samsung.com)
|
||||
* ByungGwan Kang (bk0917.kang@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2018.07.13 : Create
|
||||
*/
|
||||
|
||||
#ifndef EXYNOS_OMX_HEVC_WFD_REG
|
||||
#define EXYNOS_OMX_HEVC_WFD_REG
|
||||
|
||||
#include "Exynos_OMX_Def.h"
|
||||
#include "OMX_Component.h"
|
||||
#include "Exynos_OMX_Component_Register.h"
|
||||
|
||||
|
||||
#define OSCL_EXPORT_REF __attribute__((visibility("default")))
|
||||
#define MAX_COMPONENT_NUM 2
|
||||
#define MAX_COMPONENT_ROLE_NUM 1
|
||||
|
||||
/* HEVC */
|
||||
#define EXYNOS_OMX_COMPONENT_HEVC_WFD_ENC "OMX.Exynos.HEVC.WFD.Encoder"
|
||||
#define EXYNOS_OMX_COMPONENT_HEVC_WFD_DRM_ENC "OMX.Exynos.HEVC.WFD.Encoder.secure"
|
||||
#define EXYNOS_OMX_COMPONENT_HEVC_WFD_ENC_ROLE "video_encoder.hevc-wfd"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
OSCL_EXPORT_REF int Exynos_OMX_COMPONENT_Library_Register(ExynosRegisterComponentType **exynosComponents);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
79
openmax/component/video/enc/mpeg4/Android.mk
Normal file
79
openmax/component/video/enc/mpeg4/Android.mk
Normal file
@@ -0,0 +1,79 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
Exynos_OMX_Mpeg4enc.c \
|
||||
library_register.c
|
||||
|
||||
LOCAL_PRELINK_MODULE := false
|
||||
LOCAL_MODULE := libOMX.Exynos.MPEG4.Encoder
|
||||
LOCAL_MODULE_RELATIVE_PATH := omx
|
||||
LOCAL_PROPRIETARY_MODULE := true
|
||||
|
||||
LOCAL_CFLAGS :=
|
||||
|
||||
ifeq ($(BOARD_USE_DMA_BUF), true)
|
||||
LOCAL_CFLAGS += -DUSE_DMA_BUF
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_CSC_HW), true)
|
||||
LOCAL_CFLAGS += -DUSE_CSC_HW
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_SINGLE_PLANE_IN_DRM), true)
|
||||
LOCAL_CFLAGS += -DUSE_SINGLE_PLANE_IN_DRM
|
||||
endif
|
||||
|
||||
ifdef BOARD_EXYNOS_S10B_FORMAT_ALIGN
|
||||
LOCAL_CFLAGS += -DS10B_FORMAT_8B_ALIGNMENT=$(BOARD_EXYNOS_S10B_FORMAT_ALIGN)
|
||||
endif
|
||||
|
||||
LOCAL_ARM_MODE := arm
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := libExynosOMX_Venc libVendorVideoApi libExynosOMX_OSAL libExynosOMX_Basecomponent \
|
||||
libExynosVideoApi
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
libc \
|
||||
libcutils \
|
||||
libutils \
|
||||
libdl \
|
||||
liblog \
|
||||
libhardware \
|
||||
libhidlbase \
|
||||
libui \
|
||||
libexynosgraphicbuffer \
|
||||
libstagefright_foundation \
|
||||
libexynosv4l2 \
|
||||
libion_exynos \
|
||||
libcsc \
|
||||
libExynosOMX_Resourcemanager \
|
||||
libepicoperator
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(EXYNOS_OMX_INC)/exynos \
|
||||
$(EXYNOS_OMX_TOP)/osal \
|
||||
$(EXYNOS_OMX_TOP)/core \
|
||||
$(EXYNOS_OMX_COMPONENT)/common \
|
||||
$(EXYNOS_OMX_COMPONENT)/video/enc \
|
||||
$(EXYNOS_VIDEO_CODEC)/include \
|
||||
$(TOP)/hardware/samsung_slsi/exynos/include \
|
||||
|
||||
ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
|
||||
LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
|
||||
LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
|
||||
else
|
||||
ifeq ($(BOARD_USE_ANDROID), true)
|
||||
LOCAL_HEADER_LIBRARIES := media_plugin_headers
|
||||
LOCAL_CFLAGS += -DUSE_ANDROID
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_CUSTOM_COMPONENT_SUPPORT), true)
|
||||
LOCAL_CFLAGS += -DUSE_CUSTOM_COMPONENT_SUPPORT
|
||||
endif
|
||||
|
||||
LOCAL_CFLAGS += -Wno-unused-variable -Wno-unused-label -Wno-unused-function
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
3638
openmax/component/video/enc/mpeg4/Exynos_OMX_Mpeg4enc.c
Normal file
3638
openmax/component/video/enc/mpeg4/Exynos_OMX_Mpeg4enc.c
Normal file
File diff suppressed because it is too large
Load Diff
99
openmax/component/video/enc/mpeg4/Exynos_OMX_Mpeg4enc.h
Normal file
99
openmax/component/video/enc/mpeg4/Exynos_OMX_Mpeg4enc.h
Normal file
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2012 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file Exynos_OMX_Mpeg4enc.h
|
||||
* @brief
|
||||
* @author Yunji Kim (yunji.kim@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2012.02.20 : Create
|
||||
*/
|
||||
|
||||
#ifndef EXYNOS_OMX_MPEG4_ENC_COMPONENT
|
||||
#define EXYNOS_OMX_MPEG4_ENC_COMPONENT
|
||||
|
||||
#include "Exynos_OMX_Def.h"
|
||||
#include "OMX_Component.h"
|
||||
#include "OMX_Video.h"
|
||||
|
||||
#include "ExynosVideoApi.h"
|
||||
|
||||
typedef enum _CODEC_TYPE
|
||||
{
|
||||
CODEC_TYPE_H263,
|
||||
CODEC_TYPE_MPEG4
|
||||
} CODEC_TYPE;
|
||||
|
||||
typedef struct _EXYNOS_MFC_MPEG4ENC_HANDLE
|
||||
{
|
||||
OMX_HANDLETYPE hMFCHandle;
|
||||
|
||||
OMX_U32 indexTimestamp;
|
||||
OMX_U32 outputIndexTimestamp;
|
||||
OMX_BOOL bConfiguredMFCSrc;
|
||||
OMX_BOOL bConfiguredMFCDst;
|
||||
CODEC_TYPE codecType;
|
||||
|
||||
ExynosVideoEncOps *pEncOps;
|
||||
ExynosVideoEncBufferOps *pInbufOps;
|
||||
ExynosVideoEncBufferOps *pOutbufOps;
|
||||
ExynosVideoEncParam encParam;
|
||||
ExynosVideoInstInfo videoInstInfo;
|
||||
|
||||
#define MAX_PROFILE_NUM 4
|
||||
OMX_S32 profiles[MAX_PROFILE_NUM];
|
||||
OMX_S32 nProfileCnt;
|
||||
OMX_S32 maxLevel;
|
||||
} EXYNOS_MFC_MPEG4ENC_HANDLE;
|
||||
|
||||
typedef struct _EXYNOS_MPEG4ENC_HANDLE
|
||||
{
|
||||
/* OMX Codec specific */
|
||||
OMX_VIDEO_PARAM_H263TYPE h263Component[ALL_PORT_NUM];
|
||||
OMX_VIDEO_PARAM_MPEG4TYPE mpeg4Component[ALL_PORT_NUM];
|
||||
OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE errorCorrectionType[ALL_PORT_NUM];
|
||||
|
||||
OMX_VIDEO_QPRANGE qpRangeI;
|
||||
OMX_VIDEO_QPRANGE qpRangeP;
|
||||
OMX_VIDEO_QPRANGE qpRangeB; /* MPEG4 ONLY */
|
||||
|
||||
/* SEC MFC Codec specific */
|
||||
EXYNOS_MFC_MPEG4ENC_HANDLE hMFCMpeg4Handle;
|
||||
|
||||
OMX_BOOL bSourceStart;
|
||||
OMX_BOOL bDestinationStart;
|
||||
OMX_HANDLETYPE hSourceStartEvent;
|
||||
OMX_HANDLETYPE hDestinationInStartEvent;
|
||||
OMX_HANDLETYPE hDestinationOutStartEvent;
|
||||
|
||||
EXYNOS_QUEUE bypassBufferInfoQ;
|
||||
} EXYNOS_MPEG4ENC_HANDLE;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
OSCL_EXPORT_REF OMX_ERRORTYPE Exynos_OMX_ComponentInit(OMX_HANDLETYPE hComponent, OMX_STRING componentName);
|
||||
OMX_ERRORTYPE Exynos_OMX_ComponentDeinit(OMX_HANDLETYPE hComponent);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
190
openmax/component/video/enc/mpeg4/NOTICE
Normal file
190
openmax/component/video/enc/mpeg4/NOTICE
Normal file
@@ -0,0 +1,190 @@
|
||||
|
||||
Copyright (c) 2014, The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
62
openmax/component/video/enc/mpeg4/library_register.c
Normal file
62
openmax/component/video/enc/mpeg4/library_register.c
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2012 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file library_register.c
|
||||
* @brief
|
||||
* @author Yunji Kim (yunji.kim@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2012.02.20 : Create
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include "Exynos_OSAL_Memory.h"
|
||||
#include "Exynos_OSAL_ETC.h"
|
||||
#include "library_register.h"
|
||||
|
||||
#undef EXYNOS_LOG_TAG
|
||||
#define EXYNOS_LOG_TAG "EXYNOS_MPEG4_ENC"
|
||||
//#define EXYNOS_LOG_OFF
|
||||
#include "Exynos_OSAL_Log.h"
|
||||
|
||||
OSCL_EXPORT_REF int Exynos_OMX_COMPONENT_Library_Register(ExynosRegisterComponentType **ppExynosComponent)
|
||||
{
|
||||
FunctionIn();
|
||||
|
||||
if (ppExynosComponent == NULL)
|
||||
goto EXIT;
|
||||
|
||||
/* component 1 - video encoder MPEG4 */
|
||||
Exynos_OSAL_Strcpy(ppExynosComponent[0]->componentName, EXYNOS_OMX_COMPONENT_MPEG4_ENC);
|
||||
Exynos_OSAL_Strcpy(ppExynosComponent[0]->roles[0], EXYNOS_OMX_COMPONENT_MPEG4_ENC_ROLE);
|
||||
ppExynosComponent[0]->totalRoleNum = MAX_COMPONENT_ROLE_NUM;
|
||||
|
||||
/* component 2 - video encoder H.263 */
|
||||
Exynos_OSAL_Strcpy(ppExynosComponent[1]->componentName, EXYNOS_OMX_COMPONENT_H263_ENC);
|
||||
Exynos_OSAL_Strcpy(ppExynosComponent[1]->roles[0], EXYNOS_OMX_COMPONENT_H263_ENC_ROLE);
|
||||
ppExynosComponent[1]->totalRoleNum = MAX_COMPONENT_ROLE_NUM;
|
||||
|
||||
EXIT:
|
||||
FunctionOut();
|
||||
|
||||
return MAX_COMPONENT_NUM;
|
||||
}
|
||||
59
openmax/component/video/enc/mpeg4/library_register.h
Normal file
59
openmax/component/video/enc/mpeg4/library_register.h
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2012 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file library_register.h
|
||||
* @brief
|
||||
* @author Yunji Kim (yunji.kim@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2012.02.20 : Create
|
||||
*/
|
||||
|
||||
#ifndef EXYNOS_OMX_MPEG4_ENC_REG
|
||||
#define EXYNOS_OMX_MPEG4_ENC_REG
|
||||
|
||||
#include "Exynos_OMX_Def.h"
|
||||
#include "OMX_Component.h"
|
||||
#include "Exynos_OMX_Component_Register.h"
|
||||
|
||||
|
||||
#define OSCL_EXPORT_REF __attribute__((visibility("default")))
|
||||
#define MAX_COMPONENT_NUM 2
|
||||
#define MAX_COMPONENT_ROLE_NUM 1
|
||||
|
||||
/* MPEG4 */
|
||||
#define EXYNOS_OMX_COMPONENT_MPEG4_ENC "OMX.Exynos.MPEG4.Encoder"
|
||||
#define EXYNOS_OMX_COMPONENT_MPEG4_ENC_ROLE "video_encoder.mpeg4"
|
||||
|
||||
/* H.263 */
|
||||
#define EXYNOS_OMX_COMPONENT_H263_ENC "OMX.Exynos.H263.Encoder"
|
||||
#define EXYNOS_OMX_COMPONENT_H263_ENC_ROLE "video_encoder.h263"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
OSCL_EXPORT_REF int Exynos_OMX_COMPONENT_Library_Register(ExynosRegisterComponentType **ppExynosComponent);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
80
openmax/component/video/enc/vp8/Android.mk
Normal file
80
openmax/component/video/enc/vp8/Android.mk
Normal file
@@ -0,0 +1,80 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
Exynos_OMX_Vp8enc.c \
|
||||
library_register.c
|
||||
|
||||
LOCAL_PRELINK_MODULE := false
|
||||
LOCAL_MODULE := libOMX.Exynos.VP8.Encoder
|
||||
LOCAL_MODULE_RELATIVE_PATH := omx
|
||||
LOCAL_PROPRIETARY_MODULE := true
|
||||
|
||||
LOCAL_CFLAGS :=
|
||||
LOCAL_CFLAGS += -DUSE_VP8_SUPPORT
|
||||
|
||||
ifeq ($(BOARD_USE_DMA_BUF), true)
|
||||
LOCAL_CFLAGS += -DUSE_DMA_BUF
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_CSC_HW), true)
|
||||
LOCAL_CFLAGS += -DUSE_CSC_HW
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_SINGLE_PLANE_IN_DRM), true)
|
||||
LOCAL_CFLAGS += -DUSE_SINGLE_PLANE_IN_DRM
|
||||
endif
|
||||
|
||||
ifdef BOARD_EXYNOS_S10B_FORMAT_ALIGN
|
||||
LOCAL_CFLAGS += -DS10B_FORMAT_8B_ALIGNMENT=$(BOARD_EXYNOS_S10B_FORMAT_ALIGN)
|
||||
endif
|
||||
|
||||
LOCAL_ARM_MODE := arm
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := libExynosOMX_Venc libVendorVideoApi libExynosOMX_OSAL libExynosOMX_Basecomponent \
|
||||
libExynosVideoApi
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
libc \
|
||||
libcutils \
|
||||
libutils \
|
||||
libdl \
|
||||
liblog \
|
||||
libhardware \
|
||||
libhidlbase \
|
||||
libui \
|
||||
libexynosgraphicbuffer \
|
||||
libstagefright_foundation \
|
||||
libexynosv4l2 \
|
||||
libion_exynos \
|
||||
libcsc \
|
||||
libExynosOMX_Resourcemanager \
|
||||
libepicoperator
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(EXYNOS_OMX_INC)/exynos \
|
||||
$(EXYNOS_OMX_TOP)/osal \
|
||||
$(EXYNOS_OMX_TOP)/core \
|
||||
$(EXYNOS_OMX_COMPONENT)/common \
|
||||
$(EXYNOS_OMX_COMPONENT)/video/enc \
|
||||
$(EXYNOS_VIDEO_CODEC)/include \
|
||||
$(TOP)/hardware/samsung_slsi/exynos/include \
|
||||
|
||||
ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
|
||||
LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
|
||||
LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
|
||||
else
|
||||
ifeq ($(BOARD_USE_ANDROID), true)
|
||||
LOCAL_HEADER_LIBRARIES := media_plugin_headers
|
||||
LOCAL_CFLAGS += -DUSE_ANDROID
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_CUSTOM_COMPONENT_SUPPORT), true)
|
||||
LOCAL_CFLAGS += -DUSE_CUSTOM_COMPONENT_SUPPORT
|
||||
endif
|
||||
|
||||
LOCAL_CFLAGS += -Wno-unused-variable -Wno-unused-label -Wno-unused-function
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
3565
openmax/component/video/enc/vp8/Exynos_OMX_Vp8enc.c
Normal file
3565
openmax/component/video/enc/vp8/Exynos_OMX_Vp8enc.c
Normal file
File diff suppressed because it is too large
Load Diff
94
openmax/component/video/enc/vp8/Exynos_OMX_Vp8enc.h
Normal file
94
openmax/component/video/enc/vp8/Exynos_OMX_Vp8enc.h
Normal file
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2013 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file Exynos_OMX_Vp8enc.h
|
||||
* @brief
|
||||
* @author SeungBeom Kim (sbcrux.kim@samsung.com)
|
||||
* Taehwan Kim (t_h.kim@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2013.02.14 : Create
|
||||
*/
|
||||
|
||||
#ifndef EXYNOS_OMX_VP8_ENC_COMPONENT
|
||||
#define EXYNOS_OMX_VP8_ENC_COMPONENT
|
||||
|
||||
#include "Exynos_OMX_Def.h"
|
||||
#include "OMX_Component.h"
|
||||
#include "OMX_Video.h"
|
||||
|
||||
#include "ExynosVideoApi.h"
|
||||
|
||||
typedef struct _EXYNOS_MFC_VP8ENC_HANDLE
|
||||
{
|
||||
OMX_HANDLETYPE hMFCHandle;
|
||||
|
||||
OMX_U32 indexTimestamp;
|
||||
OMX_U32 outputIndexTimestamp;
|
||||
OMX_BOOL bConfiguredMFCSrc;
|
||||
OMX_BOOL bConfiguredMFCDst;
|
||||
|
||||
ExynosVideoEncOps *pEncOps;
|
||||
ExynosVideoEncBufferOps *pInbufOps;
|
||||
ExynosVideoEncBufferOps *pOutbufOps;
|
||||
ExynosVideoEncParam encParam;
|
||||
ExynosVideoInstInfo videoInstInfo;
|
||||
|
||||
OMX_U32 nRefForPframes;
|
||||
|
||||
#define MAX_PROFILE_NUM 1
|
||||
OMX_VIDEO_VP8PROFILETYPE profiles[MAX_PROFILE_NUM];
|
||||
OMX_S32 nProfileCnt;
|
||||
OMX_VIDEO_VP8LEVELTYPE maxLevel;
|
||||
} EXYNOS_MFC_VP8ENC_HANDLE;
|
||||
|
||||
typedef struct _EXYNOS_VP8ENC_HANDLE
|
||||
{
|
||||
/* OMX Codec specific */
|
||||
OMX_VIDEO_PARAM_VP8TYPE VP8Component[ALL_PORT_NUM];
|
||||
OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE errorCorrectionType[ALL_PORT_NUM];
|
||||
OMX_U32 nPFrames; /* IDR period control */
|
||||
OMX_VIDEO_QPRANGE qpRangeI;
|
||||
OMX_VIDEO_QPRANGE qpRangeP;
|
||||
|
||||
OMX_VIDEO_PARAM_ANDROID_VP8ENCODERTYPE AndroidVp8EncoderType;
|
||||
|
||||
/* SEC MFC Codec specific */
|
||||
EXYNOS_MFC_VP8ENC_HANDLE hMFCVp8Handle;
|
||||
|
||||
OMX_BOOL bSourceStart;
|
||||
OMX_BOOL bDestinationStart;
|
||||
OMX_HANDLETYPE hSourceStartEvent;
|
||||
OMX_HANDLETYPE hDestinationInStartEvent;
|
||||
OMX_HANDLETYPE hDestinationOutStartEvent;
|
||||
|
||||
EXYNOS_QUEUE bypassBufferInfoQ;
|
||||
} EXYNOS_VP8ENC_HANDLE;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
OSCL_EXPORT_REF OMX_ERRORTYPE Exynos_OMX_ComponentInit(OMX_HANDLETYPE hComponent, OMX_STRING componentName);
|
||||
OMX_ERRORTYPE Exynos_OMX_ComponentDeinit(OMX_HANDLETYPE hComponent);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
190
openmax/component/video/enc/vp8/NOTICE
Normal file
190
openmax/component/video/enc/vp8/NOTICE
Normal file
@@ -0,0 +1,190 @@
|
||||
|
||||
Copyright (c) 2014, The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
58
openmax/component/video/enc/vp8/library_register.c
Normal file
58
openmax/component/video/enc/vp8/library_register.c
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2013 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file library_register.c
|
||||
* @brief
|
||||
* @author SeungBeom Kim (sbcrux.kim@samsung.com)
|
||||
* Taehwan Kim (t_h.kim@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2013.02.14 : Create
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include "Exynos_OSAL_Memory.h"
|
||||
#include "Exynos_OSAL_ETC.h"
|
||||
#include "library_register.h"
|
||||
|
||||
#undef EXYNOS_LOG_TAG
|
||||
#define EXYNOS_LOG_TAG "EXYNOS_VP8_ENC"
|
||||
//#define EXYNOS_LOG_OFF
|
||||
#include "Exynos_OSAL_Log.h"
|
||||
|
||||
OSCL_EXPORT_REF int Exynos_OMX_COMPONENT_Library_Register(ExynosRegisterComponentType **ppExynosComponent)
|
||||
{
|
||||
FunctionIn();
|
||||
|
||||
if (ppExynosComponent == NULL)
|
||||
goto EXIT;
|
||||
|
||||
/* component 1 - video encoder VP8 */
|
||||
Exynos_OSAL_Strcpy(ppExynosComponent[0]->componentName, EXYNOS_OMX_COMPONENT_VP8_ENC);
|
||||
Exynos_OSAL_Strcpy(ppExynosComponent[0]->roles[0], EXYNOS_OMX_COMPONENT_VP8_ENC_ROLE);
|
||||
ppExynosComponent[0]->totalRoleNum = MAX_COMPONENT_ROLE_NUM;
|
||||
|
||||
EXIT:
|
||||
FunctionOut();
|
||||
|
||||
return MAX_COMPONENT_NUM;
|
||||
}
|
||||
56
openmax/component/video/enc/vp8/library_register.h
Normal file
56
openmax/component/video/enc/vp8/library_register.h
Normal file
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2013 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file library_register.h
|
||||
* @brief
|
||||
* @author SeungBeom Kim (sbcrux.kim@samsung.com)
|
||||
* Taehwan Kim (t_h.kim@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2013.02.14 : Create
|
||||
*/
|
||||
|
||||
#ifndef EXYNOS_OMX_VP8_ENC_REG
|
||||
#define EXYNOS_OMX_VP8_ENC_REG
|
||||
|
||||
#include "Exynos_OMX_Def.h"
|
||||
#include "OMX_Component.h"
|
||||
#include "Exynos_OMX_Component_Register.h"
|
||||
|
||||
|
||||
#define OSCL_EXPORT_REF __attribute__((visibility("default")))
|
||||
#define MAX_COMPONENT_NUM 1
|
||||
#define MAX_COMPONENT_ROLE_NUM 1
|
||||
|
||||
/* VP8 */
|
||||
#define EXYNOS_OMX_COMPONENT_VP8_ENC "OMX.Exynos.VP8.Encoder"
|
||||
#define EXYNOS_OMX_COMPONENT_VP8_ENC_ROLE "video_encoder.vp8"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
OSCL_EXPORT_REF int Exynos_OMX_COMPONENT_Library_Register(ExynosRegisterComponentType **ppExynosComponent);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
79
openmax/component/video/enc/vp9/Android.mk
Normal file
79
openmax/component/video/enc/vp9/Android.mk
Normal file
@@ -0,0 +1,79 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
Exynos_OMX_Vp9enc.c \
|
||||
library_register.c
|
||||
|
||||
LOCAL_PRELINK_MODULE := false
|
||||
LOCAL_MODULE := libOMX.Exynos.VP9.Encoder
|
||||
LOCAL_MODULE_RELATIVE_PATH := omx
|
||||
LOCAL_PROPRIETARY_MODULE := true
|
||||
|
||||
LOCAL_CFLAGS := -DUSE_VP9_SUPPORT
|
||||
|
||||
ifeq ($(BOARD_USE_DMA_BUF), true)
|
||||
LOCAL_CFLAGS += -DUSE_DMA_BUF
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_CSC_HW), true)
|
||||
LOCAL_CFLAGS += -DUSE_CSC_HW
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_SINGLE_PLANE_IN_DRM), true)
|
||||
LOCAL_CFLAGS += -DUSE_SINGLE_PLANE_IN_DRM
|
||||
endif
|
||||
|
||||
ifdef BOARD_EXYNOS_S10B_FORMAT_ALIGN
|
||||
LOCAL_CFLAGS += -DS10B_FORMAT_8B_ALIGNMENT=$(BOARD_EXYNOS_S10B_FORMAT_ALIGN)
|
||||
endif
|
||||
|
||||
LOCAL_ARM_MODE := arm
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := libExynosOMX_Venc libVendorVideoApi libExynosOMX_OSAL libExynosOMX_Basecomponent \
|
||||
libExynosVideoApi
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
libc \
|
||||
libcutils \
|
||||
libutils \
|
||||
libdl \
|
||||
liblog \
|
||||
libhardware \
|
||||
libhidlbase \
|
||||
libui \
|
||||
libexynosgraphicbuffer \
|
||||
libstagefright_foundation \
|
||||
libexynosv4l2 \
|
||||
libion_exynos \
|
||||
libcsc \
|
||||
libExynosOMX_Resourcemanager \
|
||||
libepicoperator
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(EXYNOS_OMX_INC)/exynos \
|
||||
$(EXYNOS_OMX_TOP)/osal \
|
||||
$(EXYNOS_OMX_TOP)/core \
|
||||
$(EXYNOS_OMX_COMPONENT)/common \
|
||||
$(EXYNOS_OMX_COMPONENT)/video/enc \
|
||||
$(EXYNOS_VIDEO_CODEC)/include \
|
||||
$(TOP)/hardware/samsung_slsi/exynos/include \
|
||||
|
||||
ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
|
||||
LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
|
||||
LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
|
||||
else
|
||||
ifeq ($(BOARD_USE_ANDROID), true)
|
||||
LOCAL_HEADER_LIBRARIES := media_plugin_headers
|
||||
LOCAL_CFLAGS += -DUSE_ANDROID
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_USE_CUSTOM_COMPONENT_SUPPORT), true)
|
||||
LOCAL_CFLAGS += -DUSE_CUSTOM_COMPONENT_SUPPORT
|
||||
endif
|
||||
|
||||
LOCAL_CFLAGS += -Wno-unused-variable -Wno-unused-label -Wno-unused-function
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
3530
openmax/component/video/enc/vp9/Exynos_OMX_Vp9enc.c
Normal file
3530
openmax/component/video/enc/vp9/Exynos_OMX_Vp9enc.c
Normal file
File diff suppressed because it is too large
Load Diff
94
openmax/component/video/enc/vp9/Exynos_OMX_Vp9enc.h
Normal file
94
openmax/component/video/enc/vp9/Exynos_OMX_Vp9enc.h
Normal file
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2013 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file Exynos_OMX_Vp9enc.h
|
||||
* @brief
|
||||
* @author SeungBeom Kim (sbcrux.kim@samsung.com)
|
||||
* Taehwan Kim (t_h.kim@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2015.04.14 : Create
|
||||
*/
|
||||
|
||||
#ifndef EXYNOS_OMX_VP9_ENC_COMPONENT
|
||||
#define EXYNOS_OMX_VP9_ENC_COMPONENT
|
||||
|
||||
#include "Exynos_OMX_Def.h"
|
||||
#include "OMX_Component.h"
|
||||
#include "OMX_Video.h"
|
||||
|
||||
#include "ExynosVideoApi.h"
|
||||
|
||||
typedef struct _EXYNOS_MFC_VP9ENC_HANDLE
|
||||
{
|
||||
OMX_HANDLETYPE hMFCHandle;
|
||||
|
||||
OMX_U32 indexTimestamp;
|
||||
OMX_U32 outputIndexTimestamp;
|
||||
OMX_BOOL bConfiguredMFCSrc;
|
||||
OMX_BOOL bConfiguredMFCDst;
|
||||
|
||||
ExynosVideoEncOps *pEncOps;
|
||||
ExynosVideoEncBufferOps *pInbufOps;
|
||||
ExynosVideoEncBufferOps *pOutbufOps;
|
||||
ExynosVideoEncParam encParam;
|
||||
ExynosVideoInstInfo videoInstInfo;
|
||||
|
||||
OMX_U32 nRefForPframes;
|
||||
|
||||
#define MAX_PROFILE_NUM 4
|
||||
OMX_VIDEO_VP9PROFILETYPE profiles[MAX_PROFILE_NUM];
|
||||
OMX_S32 nProfileCnt;
|
||||
OMX_VIDEO_VP9LEVELTYPE maxLevel;
|
||||
} EXYNOS_MFC_VP9ENC_HANDLE;
|
||||
|
||||
typedef struct _EXYNOS_VP9ENC_HANDLE
|
||||
{
|
||||
/* OMX Codec specific */
|
||||
OMX_VIDEO_PARAM_VP9TYPE VP9Component[ALL_PORT_NUM];
|
||||
OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE errorCorrectionType[ALL_PORT_NUM];
|
||||
OMX_U32 nPFrames; /* IDR period control */
|
||||
OMX_VIDEO_QPRANGE qpRangeI;
|
||||
OMX_VIDEO_QPRANGE qpRangeP;
|
||||
|
||||
OMX_VIDEO_PARAM_ANDROID_VP8ENCODERTYPE AndroidVp9EncoderType;
|
||||
|
||||
/* SEC MFC Codec specific */
|
||||
EXYNOS_MFC_VP9ENC_HANDLE hMFCVp9Handle;
|
||||
|
||||
OMX_BOOL bSourceStart;
|
||||
OMX_BOOL bDestinationStart;
|
||||
OMX_HANDLETYPE hSourceStartEvent;
|
||||
OMX_HANDLETYPE hDestinationInStartEvent;
|
||||
OMX_HANDLETYPE hDestinationOutStartEvent;
|
||||
|
||||
EXYNOS_QUEUE bypassBufferInfoQ;
|
||||
} EXYNOS_VP9ENC_HANDLE;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
OSCL_EXPORT_REF OMX_ERRORTYPE Exynos_OMX_ComponentInit(OMX_HANDLETYPE hComponent, OMX_STRING componentName);
|
||||
OMX_ERRORTYPE Exynos_OMX_ComponentDeinit(OMX_HANDLETYPE hComponent);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
190
openmax/component/video/enc/vp9/NOTICE
Normal file
190
openmax/component/video/enc/vp9/NOTICE
Normal file
@@ -0,0 +1,190 @@
|
||||
|
||||
Copyright (c) 2014, The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
58
openmax/component/video/enc/vp9/library_register.c
Normal file
58
openmax/component/video/enc/vp9/library_register.c
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2013 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file library_register.c
|
||||
* @brief
|
||||
* @author SeungBeom Kim (sbcrux.kim@samsung.com)
|
||||
* Taehwan Kim (t_h.kim@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2015.04.14 : Create
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include "Exynos_OSAL_Memory.h"
|
||||
#include "Exynos_OSAL_ETC.h"
|
||||
#include "library_register.h"
|
||||
|
||||
#undef EXYNOS_LOG_TAG
|
||||
#define EXYNOS_LOG_TAG "EXYNOS_VP9_ENC"
|
||||
//#define EXYNOS_LOG_OFF
|
||||
#include "Exynos_OSAL_Log.h"
|
||||
|
||||
OSCL_EXPORT_REF int Exynos_OMX_COMPONENT_Library_Register(ExynosRegisterComponentType **ppExynosComponent)
|
||||
{
|
||||
FunctionIn();
|
||||
|
||||
if (ppExynosComponent == NULL)
|
||||
goto EXIT;
|
||||
|
||||
/* component 1 - video encoder VP9 */
|
||||
Exynos_OSAL_Strcpy(ppExynosComponent[0]->componentName, EXYNOS_OMX_COMPONENT_VP9_ENC);
|
||||
Exynos_OSAL_Strcpy(ppExynosComponent[0]->roles[0], EXYNOS_OMX_COMPONENT_VP9_ENC_ROLE);
|
||||
ppExynosComponent[0]->totalRoleNum = MAX_COMPONENT_ROLE_NUM;
|
||||
|
||||
EXIT:
|
||||
FunctionOut();
|
||||
|
||||
return MAX_COMPONENT_NUM;
|
||||
}
|
||||
56
openmax/component/video/enc/vp9/library_register.h
Normal file
56
openmax/component/video/enc/vp9/library_register.h
Normal file
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2013 Samsung Electronics S.LSI Co. LTD
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file library_register.h
|
||||
* @brief
|
||||
* @author SeungBeom Kim (sbcrux.kim@samsung.com)
|
||||
* Taehwan Kim (t_h.kim@samsung.com)
|
||||
* @version 2.0.0
|
||||
* @history
|
||||
* 2015.04.14 : Create
|
||||
*/
|
||||
|
||||
#ifndef EXYNOS_OMX_VP9_ENC_REG
|
||||
#define EXYNOS_OMX_VP9_ENC_REG
|
||||
|
||||
#include "Exynos_OMX_Def.h"
|
||||
#include "OMX_Component.h"
|
||||
#include "Exynos_OMX_Component_Register.h"
|
||||
|
||||
|
||||
#define OSCL_EXPORT_REF __attribute__((visibility("default")))
|
||||
#define MAX_COMPONENT_NUM 1
|
||||
#define MAX_COMPONENT_ROLE_NUM 1
|
||||
|
||||
/* VP9 */
|
||||
#define EXYNOS_OMX_COMPONENT_VP9_ENC "OMX.Exynos.VP9.Encoder"
|
||||
#define EXYNOS_OMX_COMPONENT_VP9_ENC_ROLE "video_encoder.vp9"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
OSCL_EXPORT_REF int Exynos_OMX_COMPONENT_Library_Register(ExynosRegisterComponentType **ppExynosComponent);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user