OSDN Git Service

add HEVC decoder and cleanup
authorMichael Chen <omxcodec@gmail.com>
Fri, 11 Oct 2013 12:36:37 +0000 (20:36 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Mon, 9 Dec 2013 14:32:15 +0000 (22:32 +0800)
Change-Id: I16342228014320161a22302a3c14df7725556cd2

include/media/openmax/OMX_Audio.h
include/media/openmax/OMX_Index.h
include/media/openmax/OMX_Video.h

index e0b17d7..6b716d4 100644 (file)
@@ -109,8 +109,11 @@ typedef enum OMX_AUDIO_CODINGTYPE {
     OMX_AUDIO_CodingFLAC,        /**< Any variant of FLAC encoded data */
     OMX_AUDIO_CodingKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 
     OMX_AUDIO_CodingVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
+    OMX_AUDIO_CodingMP2,         /**< Any variant of MP2 encoded data */
+    OMX_AUDIO_CodingAC3,         /**< Any variant of AC3 encoded data */
     OMX_AUDIO_CodingAPE,         /**< Any variant of APE encoded data */
     OMX_AUDIO_CodingDTS,         /**< Any variant of DTS encoded data */
+    OMX_AUDIO_CodingFFMPEG,      /**< Any variant of FFMPEG encoded data */
     OMX_AUDIO_CodingMax = 0x7FFFFFFF
 } OMX_AUDIO_CODINGTYPE;
 
@@ -356,6 +359,36 @@ typedef struct OMX_AUDIO_PARAM_FLACTYPE {
 } OMX_AUDIO_PARAM_FLACTYPE;
 
 
+/** MP2 params */
+typedef struct OMX_AUDIO_PARAM_MP2TYPE {
+    OMX_U32 nSize;                 /**< size of the structure in bytes */
+    OMX_VERSIONTYPE nVersion;      /**< OMX specification version information */
+    OMX_U32 nPortIndex;            /**< port that this structure applies to */
+    OMX_U32 nChannels;             /**< Number of channels */
+    OMX_U32 nBitRate;              /**< Bit rate of the input data.  Use 0 for variable
+                                        rate or unknown bit rates */
+    OMX_U32 nSampleRate;           /**< Sampling rate of the source data.  Use 0 for
+                                        variable or unknown sampling rate. */
+    OMX_AUDIO_CHANNELMODETYPE eChannelMode;   /**< Channel mode enumeration */
+    OMX_AUDIO_MP3STREAMFORMATTYPE eFormat;  /**< MP3 stream format */
+} OMX_AUDIO_PARAM_MP2TYPE;
+
+
+/** AC3 params */
+typedef struct OMX_AUDIO_PARAM_AC3TYPE {
+    OMX_U32 nSize;                 /**< size of the structure in bytes */
+    OMX_VERSIONTYPE nVersion;      /**< OMX specification version information */
+    OMX_U32 nPortIndex;            /**< port that this structure applies to */
+    OMX_U32 nChannels;             /**< Number of channels */
+    OMX_U32 nBitRate;              /**< Bit rate of the input data.  Use 0 for variable
+                                        rate or unknown bit rates */
+    OMX_U32 nSamplingRate;         /**< Sampling rate of the source data.  Use 0 for
+                                        variable or unknown sampling rate. */
+    OMX_AUDIO_CHANNELMODETYPE eChannelMode;   /**< Channel mode enumeration */
+} OMX_AUDIO_PARAM_AC3TYPE;
+
+
+/** APE params */
 typedef struct OMX_AUDIO_PARAM_APETYPE {
     OMX_U32 nSize;                /**< size of the structure in bytes */
     OMX_VERSIONTYPE nVersion;     /**< OMX specification version information */
@@ -370,6 +403,7 @@ typedef struct OMX_AUDIO_PARAM_APETYPE {
 } OMX_AUDIO_PARAM_APETYPE;
 
 
+/** DTS params */
 typedef struct OMX_AUDIO_PARAM_DTSTYPE {
     OMX_U32 nSize;                 /**< size of the structure in bytes */
     OMX_VERSIONTYPE nVersion;      /**< OMX specification version information */
@@ -382,6 +416,23 @@ typedef struct OMX_AUDIO_PARAM_DTSTYPE {
     OMX_AUDIO_CHANNELMODETYPE eChannelMode;   /**< Channel mode enumeration */
 } OMX_AUDIO_PARAM_DTSTYPE;
 
+/** FFMPEG Audio params */
+typedef struct OMX_AUDIO_PARAM_FFMPEGTYPE {
+    OMX_U32 nSize;
+    OMX_VERSIONTYPE nVersion;
+    OMX_U32 nPortIndex;
+
+    OMX_S32 eCodecId;              /**< enum AVCodecID */
+    OMX_U32 nChannels;             /**< Number of channels */
+    OMX_U32 nBitRate;              /**< Bit rate of the input data.  Use 0 for variable
+                                        rate or unknown bit rates */
+    OMX_U32 nBitsPerSample;        /**< Number of bits in each sample */
+    OMX_U32 nSampleRate;           /**< Sampling rate of the source data.  Use 0 for
+                                        variable or unknown sampling rate. */
+    OMX_U32 nBlockAlign;           /**< is the block alignment, or block size, in bytes of the audio codec */
+
+    OMX_S32 eSampleFormat;         /**< enum AVSampleFormat */
+} OMX_AUDIO_PARAM_FFMPEGTYPE;
 
 /** WMA Version */
 typedef enum OMX_AUDIO_WMAFORMATTYPE {
index 35df22c..d40f24f 100644 (file)
@@ -136,8 +136,6 @@ typedef enum OMX_INDEXTYPE {
     OMX_IndexParamAudioSmv,                 /**< reference: OMX_AUDIO_PARAM_SMVTYPE */
     OMX_IndexParamAudioVorbis,              /**< reference: OMX_AUDIO_PARAM_VORBISTYPE */
     OMX_IndexParamAudioFlac,                /**< reference: OMX_AUDIO_PARAM_FLACTYPE */
-    OMX_IndexParamAudioApe,                 /**< reference: OMX_AUDIO_PARAM_APETYPE */
-    OMX_IndexParamAudioDts,                 /**< reference: OMX_AUDIO_PARAM_DTSTYPE */
 
     OMX_IndexConfigAudioMidiImmediateEvent, /**< reference: OMX_AUDIO_CONFIG_MIDIIMMEDIATEEVENTTYPE */
     OMX_IndexConfigAudioMidiControl,        /**< reference: OMX_AUDIO_CONFIG_MIDICONTROLTYPE */
@@ -265,6 +263,12 @@ typedef enum OMX_INDEXTYPE {
        to 0x7FFFFFFE.  This range is not broken out by vendor, so
        private indexes are not guaranteed unique and therefore should
        only be sent to the appropriate component. */
+    OMX_IndexParamAudioMp2,                 /**< reference: OMX_AUDIO_PARAM_MP2TYPE */
+    OMX_IndexParamAudioAc3,                 /**< reference: OMX_AUDIO_PARAM_AC3TYPE */
+    OMX_IndexParamAudioApe,                 /**< reference: OMX_AUDIO_PARAM_APETYPE */
+    OMX_IndexParamAudioDts,                 /**< reference: OMX_AUDIO_PARAM_DTSTYPE */
+    OMX_IndexParamVideoFFmpeg,              /**< reference: OMX_VIDEO_PARAM_FFMPEGTYPE */
+    OMX_IndexParamAudioFFmpeg,              /**< reference: OMX_AUDIO_PARAM_FFMPEGTYPE */
 
     OMX_IndexMax = 0x7FFFFFFF
 
index 4441a7a..03d2b10 100644 (file)
@@ -89,6 +89,11 @@ typedef enum OMX_VIDEO_CODINGTYPE {
     OMX_VIDEO_CodingVP9,        /**< Google VP9 */
     OMX_VIDEO_CodingKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 
     OMX_VIDEO_CodingVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
+    OMX_VIDEO_CodingVC1,        /**< VC1 */
+    OMX_VIDEO_CodingFLV1,       /**< Sorenson's H.263 */
+    OMX_VIDEO_CodingDIVX,       /**< DIVX */
+    OMX_VIDEO_CodingHEVC,       /**< HEVC */
+    OMX_VIDEO_CodingFFMPEG,     /**< FFMPEG */
     OMX_VIDEO_CodingMax = 0x7FFFFFFF
 } OMX_VIDEO_CODINGTYPE;
 
@@ -1068,6 +1073,19 @@ typedef struct OMX_VIDEO_CONFIG_NALSIZE {
     OMX_U32 nNaluBytes;
 } OMX_VIDEO_CONFIG_NALSIZE;
 
+/**
+ * FFMPEG Video Params
+ */
+typedef struct OMX_VIDEO_PARAM_FFMPEGTYPE {
+    OMX_U32 nSize;
+    OMX_VERSIONTYPE nVersion;
+    OMX_U32 nPortIndex;
+
+    OMX_S32 eCodecId;              /**< enum AVCodecID */
+    OMX_U32 nWidth;
+    OMX_U32 nHeight;
+} OMX_VIDEO_PARAM_FFMPEGTYPE;
+
 /** @} */
 
 #ifdef __cplusplus