exynos3: omx: moar love for p1 jellybean-stable
authorChirayu Desai <chirayudesai1@gmail.com>
Tue, 16 Oct 2012 10:20:18 +0000 (15:50 +0530)
committerChirayu Desai <chirayudesai1@gmail.com>
Sat, 27 Oct 2012 12:16:28 +0000 (17:46 +0530)
- bump up mfc memsize
- use H/W decoding for TV-Out

Change-Id: I9425a371c29671e4ba9f82207f79d236ff6731e1

exynos3/s5pc110/sec_mm/sec_omx/sec_codecs/Android.mk
exynos3/s5pc110/sec_mm/sec_omx/sec_codecs/video/mfc_c110/include/SsbSipMfcApi.h
exynos3/s5pc110/sec_mm/sec_omx/sec_omx_component/video/dec/Android.mk
exynos3/s5pc110/sec_mm/sec_omx/sec_omx_component/video/dec/h264dec/SEC_OMX_H264dec.c
exynos3/s5pc110/sec_mm/sec_omx/sec_omx_component/video/dec/mpeg4dec/SEC_OMX_Mpeg4dec.c

index 3c163a4e94c5baeb58408636f069eafc77c510cc..05d4d86e8c578e7628704033687fb9ca13615537 100644 (file)
@@ -2,6 +2,10 @@ LOCAL_PATH := $(call my-dir)
 
 include $(CLEAR_VARS)
 
-include   $(SEC_CODECS)/video/mfc_c110/dec/Android.mk
-include   $(SEC_CODECS)/video/mfc_c110/enc/Android.mk
-include   $(SEC_CODECS)/video/mfc_c110/csc/Android.mk
\ No newline at end of file
+include $(SEC_CODECS)/video/mfc_c110/dec/Android.mk
+include $(SEC_CODECS)/video/mfc_c110/enc/Android.mk
+include $(SEC_CODECS)/video/mfc_c110/csc/Android.mk
+
+ifneq ($(TARGET_SEC_OMX_BIG_MMAP_BUFFER_SIZE),true)
+    LOCAL_CFLAGS += -DBIG_MMAP_BUFFER_SIZE
+endif
index 118e1bab276c2a9ad07727636e77696c85550016..071fb5d03a2f82edfe3af1fbeb6d9ab4382c233e 100644 (file)
 #define MAX_DECODER_INPUT_BUFFER_SIZE  (1024 * 3072)
 #define MAX_ENCODER_OUTPUT_BUFFER_SIZE (1024 * 3072)
 
+#ifdef BIG_MMAP_BUFFER_SIZE
+#define MMAP_BUFFER_SIZE_MMAP          (62*1024*1024)
+#else
 #define MMAP_BUFFER_SIZE_MMAP          (35328*1024) // 34.5*1024*1024
+#endif // BIG_MMAP_BUFFER_SIZE
 
 #define S5PC110_MFC_DEV_NAME           "/dev/s3c-mfc"
 
index 772c47756b20f54aa9eef5ff387f4e8936208713..5802cc06b0d82b05d990413de0bfe8da9697329d 100644 (file)
@@ -17,4 +17,8 @@ LOCAL_C_INCLUDES := $(SEC_OMX_INC)/khronos \
 
 LOCAL_C_INCLUDES += $(SEC_OMX_TOP)/sec_codecs/video/mfc_c110/include
 
+ifeq ($(TARGET_USE_HWDECODING_TVOUT),true)
+    LOCAL_CFLAGS += -DUSE_HWDECODING_TVOUT
+endif
+
 include $(BUILD_STATIC_LIBRARY)
index 64ac7ebedf80316a6a522b091186abcc295eee7a..63769898c9d78cb47c920472c74345940bc75f2d 100644 (file)
@@ -699,13 +699,15 @@ OMX_ERRORTYPE SEC_MFC_H264Dec_GetExtensionIndex(
         ret = OMX_ErrorNone;
 #ifdef USE_ANDROID_EXTENSION
     } else if (SEC_OSAL_Strcmp(cParameterName, SEC_INDEX_PARAM_ENABLE_ANB) == 0) {
-           if (isTvOutEnabled()) {
-               // Samsung normally pushes HW-decoded frames to the TV Out driver
-               // but it's hard for us to do that without source, so return an error
-               // and let Android fallback to software decoding
-               ret = OMX_ErrorInsufficientResources;
-               goto EXIT;
-           }
+#ifndef USE_HWDECODING_TVOUT
+            if (isTvOutEnabled()) {
+                // Samsung normally pushes HW-decoded frames to the TV Out driver
+                // but it's hard for us to do that without source, so return an error
+                // and let Android fallback to software decoding
+                ret = OMX_ErrorInsufficientResources;
+                goto EXIT;
+            }
+#endif // USE_HWDECODING_TVOUT
 
         *pIndexType = OMX_IndexParamEnableAndroidBuffers;
         ret = OMX_ErrorNone;
index fb679da5ead648ba012128dc10e3bbeaa659d740..1da14e7b3e879776746df3999e7052477840eed2 100644 (file)
@@ -836,13 +836,15 @@ OMX_ERRORTYPE SEC_MFC_Mpeg4Dec_GetExtensionIndex(
         ret = OMX_ErrorNone;
 #ifdef USE_ANDROID_EXTENSION
     } else if (SEC_OSAL_Strcmp(cParameterName, SEC_INDEX_PARAM_ENABLE_ANB) == 0) {
-           if (isTvOutEnabled()) {
-               // Samsung normally pushes HW-decoded frames to the TV Out driver
-               // but it's hard for us to do that without source, so return an error
-               // and let Android fallback to software decoding
-               ret = OMX_ErrorInsufficientResources;
-               goto EXIT;
-           }
+#ifndef USE_HWDECODING_TVOUT
+            if (isTvOutEnabled()) {
+                // Samsung normally pushes HW-decoded frames to the TV Out driver
+                // but it's hard for us to do that without source, so return an error
+                // and let Android fallback to software decoding
+                ret = OMX_ErrorInsufficientResources;
+                goto EXIT;
+            }
+#endif // USE_HWDECODING_TVOUT
 
         *pIndexType = OMX_IndexParamEnableAndroidBuffers;
         ret = OMX_ErrorNone;