diff options
-rw-r--r-- | device_base.mk | 1 | ||||
-rwxr-xr-x | libcolorconvertyv12/Android.mk | 24 | ||||
-rwxr-xr-x | libcolorconvertyv12/IYV12ColorConverter.c | 76 | ||||
-rw-r--r-- | sec_mm/sec_omx/sec_omx_component/video/dec/SEC_OMX_Vdec.c | 4 | ||||
-rw-r--r-- | sec_mm/sec_omx/sec_omx_component/video/enc/SEC_OMX_Venc.c | 1 |
5 files changed, 104 insertions, 2 deletions
diff --git a/device_base.mk b/device_base.mk index e44ee58..4990ab9 100644 --- a/device_base.mk +++ b/device_base.mk @@ -123,6 +123,7 @@ PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \ libcamera \ libstagefrighthw \ + libyv12colorconvert \ com.android.future.usb.accessory # Input device calibration files diff --git a/libcolorconvertyv12/Android.mk b/libcolorconvertyv12/Android.mk new file mode 100755 index 0000000..72ffbf7 --- /dev/null +++ b/libcolorconvertyv12/Android.mk @@ -0,0 +1,24 @@ +LOCAL_PATH := $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_MODULE_TAGS := optional + +LOCAL_SRC_FILES := \ + IYV12ColorConverter.c + + +LOCAL_MODULE := libyv12colorconvert + +LOCAL_CFLAGS := + +LOCAL_ARM_MODE := arm + +LOCAL_STATIC_LIBRARIES := +LOCAL_SHARED_LIBRARIES := + +LOCAL_C_INCLUDES := \ + $(TOP)/frameworks/base/include/media/stagefright/openmax \ + $(TOP)/frameworks/media/libvideoeditor/include + +include $(BUILD_SHARED_LIBRARY) + diff --git a/libcolorconvertyv12/IYV12ColorConverter.c b/libcolorconvertyv12/IYV12ColorConverter.c new file mode 100755 index 0000000..7855bde --- /dev/null +++ b/libcolorconvertyv12/IYV12ColorConverter.c @@ -0,0 +1,76 @@ +/* + * + * Copyright 2011 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 IYV12ColorConverter.cpp + * @brief + * @author SeungBeom Kim (sbcrux.kim@samsung.com) + * @version 1.0 + * @history + * 2010.7.27 : Create + */ + +#include <media/stagefright/openmax/OMX_IVCommon.h> +#include <IYV12ColorConverter.h> + + +int SEC_getDecoderOutputFormat() +{ + return (int)OMX_COLOR_FormatYUV420Planar; +} + +int SEC_convertDecoderOutputToYV12( + void* decoderBits, int decoderWidth, int decoderHeight, + ARect decoderRect, void* dstBits) +{ + int ret = -1; + return ret; +} + +int SEC_getEncoderInputFormat() +{ + return (int)OMX_COLOR_FormatYUV420Planar; +} + +int SEC_convertYV12ToEncoderInput( + void* srcBits, int srcWidth, int srcHeight, + int encoderWidth, int encoderHeight, ARect encoderRect, + void* encoderBits) +{ + int ret = -1; + return ret; +} + +int SEC_getEncoderInputBufferInfo( + int srcWidth, int srcHeight, + int* encoderWidth, int* encoderHeight, + ARect* encoderRect, int* encoderBufferSize) +{ + int ret = -1; + return ret; +} + +void getYV12ColorConverter(IYV12ColorConverter *converter) +{ + converter->getDecoderOutputFormat = SEC_getDecoderOutputFormat; + converter->convertDecoderOutputToYV12 = SEC_convertDecoderOutputToYV12; + converter->getEncoderInputFormat = SEC_getEncoderInputFormat; + converter->convertDecoderOutputToYV12 = SEC_convertDecoderOutputToYV12; + converter->getEncoderInputBufferInfo = SEC_getEncoderInputBufferInfo; + return; +} + diff --git a/sec_mm/sec_omx/sec_omx_component/video/dec/SEC_OMX_Vdec.c b/sec_mm/sec_omx/sec_omx_component/video/dec/SEC_OMX_Vdec.c index dccdaa5..6dd72a1 100644 --- a/sec_mm/sec_omx/sec_omx_component/video/dec/SEC_OMX_Vdec.c +++ b/sec_mm/sec_omx/sec_omx_component/video/dec/SEC_OMX_Vdec.c @@ -1046,12 +1046,12 @@ OMX_ERRORTYPE SEC_OMX_VideoDecodeGetParameter( switch (index) { case supportFormat_0: portFormat->eCompressionFormat = OMX_VIDEO_CodingUnused; - portFormat->eColorFormat = OMX_COLOR_FormatYUV420SemiPlanar; + portFormat->eColorFormat = OMX_COLOR_FormatYUV420Planar;//OMX_COLOR_FormatYUV420SemiPlanar; portFormat->xFramerate = portDefinition->format.video.xFramerate; break; case supportFormat_1: portFormat->eCompressionFormat = OMX_VIDEO_CodingUnused; - portFormat->eColorFormat = OMX_COLOR_FormatYUV420Planar; + portFormat->eColorFormat = OMX_COLOR_FormatYUV420SemiPlanar;//OMX_COLOR_FormatYUV420Planar; portFormat->xFramerate = portDefinition->format.video.xFramerate; break; case supportFormat_2: diff --git a/sec_mm/sec_omx/sec_omx_component/video/enc/SEC_OMX_Venc.c b/sec_mm/sec_omx/sec_omx_component/video/enc/SEC_OMX_Venc.c index 8ddd2a4..2f8d5f2 100644 --- a/sec_mm/sec_omx/sec_omx_component/video/enc/SEC_OMX_Venc.c +++ b/sec_mm/sec_omx/sec_omx_component/video/enc/SEC_OMX_Venc.c @@ -756,6 +756,7 @@ OMX_BOOL SEC_Preprocessor_InputData(OMX_COMPONENTTYPE *pOMXComponent) switch (pSECPort->portDefinition.format.video.eColorFormat) { case OMX_COLOR_FormatYUV420Planar: + /* Real YUV420P Data */ csc_linear_to_tiled(inputData->specificBufferHeader.YVirAddr, checkInputStream, width, height); csc_linear_to_tiled_interleave(inputData->specificBufferHeader.CVirAddr, |