Added vp8 decoder support 91/124291/4
authorSejun Park <sejun79.park@samsung.com>
Tue, 11 Apr 2017 05:26:48 +0000 (14:26 +0900)
committerSejun Park <sejun79.park@samsung.com>
Tue, 11 Apr 2017 06:23:09 +0000 (15:23 +0900)
Change-Id: I1bd2a6b9b706b9b6bf3fc4882d8bcb8a1c38b228

15 files changed:
config/exynos/gstomx.conf
config/exynos64/gstomx.conf
configure.ac [changed mode: 0755->0644]
omx/Makefile.am [changed mode: 0755->0644]
omx/gstomx.c [changed mode: 0755->0644]
omx/gstomx.h [changed mode: 0755->0644]
omx/gstomxbufferpool.c [changed mode: 0755->0644]
omx/gstomxbufferpool.h [changed mode: 0755->0644]
omx/gstomxvideo.c [changed mode: 0755->0644]
omx/gstomxvideodec.c [changed mode: 0755->0644]
omx/gstomxvideodec.h [changed mode: 0755->0644]
omx/gstomxvideoenc.c [changed mode: 0755->0644]
omx/gstomxvideoenc.h [changed mode: 0755->0644]
omx/openmax/OMX_VideoExt.h [changed mode: 0644->0755]
packaging/gst-omx.spec

index a41fd06..5fb1b94 100755 (executable)
@@ -42,6 +42,17 @@ in-port-usebuffer=0
 out-port-usebuffer=1
 hacks=no-component-role;no-disable-outport;no-component-reconfigure
 
+[omxdec_vp8]
+type-name=GstOMXVP8Dec
+core-name=/usr/lib/libExynosOMX_Core.so
+component-name=OMX.Exynos.VP8.Decoder
+rank=258
+in-port-index=0
+out-port-index=1
+in-port-usebuffer=0
+out-port-usebuffer=1
+hacks=no-component-role;no-disable-outport;no-component-reconfigure
+
 [omxdec_vc1]
 type-name=GstOMXWMVDec
 core-name=/usr/lib/libExynosOMX_Core.so
index c512b7e..7726c17 100755 (executable)
@@ -42,6 +42,17 @@ in-port-usebuffer=0
 out-port-usebuffer=1
 hacks=no-component-role;no-disable-outport;no-component-reconfigure
 
+[omxdec_vp8]
+type-name=GstOMXVP8Dec
+core-name=/usr/lib/libExynosOMX_Core.so
+component-name=OMX.Exynos.VP8.Decoder
+rank=258
+in-port-index=0
+out-port-index=1
+in-port-usebuffer=0
+out-port-usebuffer=1
+hacks=no-component-role;no-disable-outport;no-component-reconfigure
+
 [omxdec_vc1]
 type-name=GstOMXWMVDec
 core-name=/usr/lib64/libExynosOMX_Core.so
old mode 100755 (executable)
new mode 100644 (file)
index f523e32..bb6d6c0
@@ -187,23 +187,39 @@ if test "x$HAVE_VIDEO_EXT" = "xyes"; then
 "
 fi
 
-AC_CHECK_DECLS([OMX_VIDEO_CodingVP8],
+dnl check for supporting vp8
+AC_MSG_CHECKING([for supporting vp8])
+AC_ARG_ENABLE(vp8, AC_HELP_STRING([--enable-vp8], [OpenMAX IL has VP8 support]),
   [
-    AC_DEFINE(HAVE_VP8, 1, [OpenMAX IL has VP8 support])
-    HAVE_VP8=yes
-  ], [
-    HAVE_VP8=no
-  ], [[$VIDEO_HEADERS]])
+    case "${enableval}" in
+      yes) HAVE_VP8=yes ;;
+      no)  HAVE_VP8=no ;;
+      *)   AC_MSG_ERROR(bad value ${enableval} for --enable-vp8) ;;
+    esac
+  ],
+  [HAVE_VP8=no])
 AM_CONDITIONAL(HAVE_VP8, test "x$HAVE_VP8" = "xyes")
+AC_MSG_RESULT([$HAVE_VP8])
+if test "x$HAVE_VP8" = "xyes"; then
+  AC_DEFINE(HAVE_VP8, 1, [OpenMAX IL has VP8 support])
+fi
 
-AC_CHECK_DECLS([OMX_VIDEO_CodingTheora],
+dnl check for supporting theora
+AC_MSG_CHECKING([for supporting theora])
+AC_ARG_ENABLE(theora, AC_HELP_STRING([--enable-theora], [OpenMAX IL has Theora support]),
   [
-    AC_DEFINE(HAVE_THEORA, 1, [OpenMAX IL has Theora support])
-    HAVE_THEORA=yes
-  ], [
-    HAVE_THEORA=no
-  ], [[$VIDEO_HEADERS]])
+    case "${enableval}" in
+      yes) HAVE_THEORA=yes ;;
+      no)  HAVE_THEORA=no ;;
+      *)   AC_MSG_ERROR(bad value ${enableval} for --enable-theora) ;;
+    esac
+  ],
+  [HAVE_THEORA=no])
 AM_CONDITIONAL(HAVE_THEORA, test "x$HAVE_THEORA" = "xyes")
+AC_MSG_RESULT([$HAVE_THEORA])
+if test "x$HAVE_THEORA" = "xyes"; then
+  AC_DEFINE(HAVE_THEORA, 1, [OpenMAX IL has Theora support])
+fi
 
 dnl Check for -Bsymbolic-functions linker flag used to avoid
 dnl intra-library PLT jumps, if available.
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100644 (file)
new mode 100755 (executable)
index a9b5d45..4983dc4
@@ -50,7 +50,6 @@ typedef enum OMX_NALUFORMATSTYPE {
     OMX_NaluFormatCodingMax = 0x7FFFFFFF\r
 } OMX_NALUFORMATSTYPE;\r
 \r
-\r
 /** NAL Stream Format */\r
 typedef struct OMX_NALSTREAMFORMATTYPE{\r
     OMX_U32 nSize;\r
@@ -59,6 +58,61 @@ typedef struct OMX_NALSTREAMFORMATTYPE{
     OMX_NALUFORMATSTYPE eNaluFormat;\r
 } OMX_NALSTREAMFORMATTYPE;\r
 \r
+/** Enum for standard video codingtype extensions */\r
+typedef enum OMX_VIDEO_CODINGEXTTYPE {\r
+    OMX_VIDEO_ExtCodingUnused = OMX_VIDEO_CodingKhronosExtensions,\r
+    OMX_VIDEO_CodingVP8,        /**< VP8/WebM */\r
+} OMX_VIDEO_CODINGEXTTYPE;\r
+\r
+/** VP8 profiles */\r
+typedef enum OMX_VIDEO_VP8PROFILETYPE {\r
+    OMX_VIDEO_VP8ProfileMain = 0x01,\r
+    OMX_VIDEO_VP8ProfileUnknown = 0x6EFFFFFF,\r
+    OMX_VIDEO_VP8ProfileMax = 0x7FFFFFFF\r
+} OMX_VIDEO_VP8PROFILETYPE;\r
+\r
+/** VP8 levels */\r
+typedef enum OMX_VIDEO_VP8LEVELTYPE {\r
+    OMX_VIDEO_VP8Level_Version0 = 0x01,\r
+    OMX_VIDEO_VP8Level_Version1 = 0x02,\r
+    OMX_VIDEO_VP8Level_Version2 = 0x04,\r
+    OMX_VIDEO_VP8Level_Version3 = 0x08,\r
+    OMX_VIDEO_VP8LevelUnknown = 0x6EFFFFFF,\r
+    OMX_VIDEO_VP8LevelMax = 0x7FFFFFFF\r
+} OMX_VIDEO_VP8LEVELTYPE;\r
+\r
+/** VP8 Param */\r
+typedef struct OMX_VIDEO_PARAM_VP8TYPE {\r
+    OMX_U32 nSize;\r
+    OMX_VERSIONTYPE nVersion;\r
+    OMX_U32 nPortIndex;\r
+    OMX_VIDEO_VP8PROFILETYPE eProfile;\r
+    OMX_VIDEO_VP8LEVELTYPE eLevel;\r
+    OMX_U32 nDCTPartitions;\r
+    OMX_BOOL bErrorResilientMode;\r
+} OMX_VIDEO_PARAM_VP8TYPE;\r
+\r
+/** Structure for configuring VP8 reference frames */\r
+typedef struct OMX_VIDEO_VP8REFERENCEFRAMETYPE {\r
+    OMX_U32 nSize;\r
+    OMX_VERSIONTYPE nVersion;\r
+    OMX_U32 nPortIndex;\r
+    OMX_BOOL bPreviousFrameRefresh;\r
+    OMX_BOOL bGoldenFrameRefresh;\r
+    OMX_BOOL bAlternateFrameRefresh;\r
+    OMX_BOOL bUsePreviousFrame;\r
+    OMX_BOOL bUseGoldenFrame;\r
+    OMX_BOOL bUseAlternateFrame;\r
+} OMX_VIDEO_VP8REFERENCEFRAMETYPE;\r
+\r
+/** Structure for querying VP8 reference frame type */\r
+typedef struct OMX_VIDEO_VP8REFERENCEFRAMEINFOTYPE {\r
+    OMX_U32 nSize;\r
+    OMX_VERSIONTYPE nVersion;\r
+    OMX_U32 nPortIndex;\r
+    OMX_BOOL bIsIntraFrame;\r
+    OMX_BOOL bIsGoldenOrAlternateFrame;\r
+} OMX_VIDEO_VP8REFERENCEFRAMEINFOTYPE;\r
 \r
 \r
 #ifdef __cplusplus\r
index caa1578..5e431f3 100755 (executable)
@@ -31,7 +31,7 @@ export CFLAGS+=" -DTIZEN_FEATURE_OMX"
 %ifarch aarch64
 %configure --disable-static --prefix=/usr --with-omx-target=exynos64
 %else
-%configure --disable-static --prefix=/usr --with-omx-target=exynos
+%configure --disable-static --prefix=/usr --with-omx-target=exynos --enable-vp8
 %endif
 
 make %{?jobs:-j%jobs}