OSDN Git Service

media: add and clarify OMX float numerical type
authorLajos Molnar <lajos@google.com>
Fri, 18 Mar 2016 02:09:21 +0000 (19:09 -0700)
committerLajos Molnar <lajos@google.com>
Fri, 18 Mar 2016 03:29:10 +0000 (20:29 -0700)
Bug: 27172163
Change-Id: Idb399c05d14ee51f944251430d3561479feee6e3

include/media/openmax/OMX_Audio.h
include/media/openmax/OMX_Types.h

index a0cbd3b..d8bee76 100644 (file)
@@ -178,7 +178,7 @@ typedef struct OMX_AUDIO_PARAM_PCMMODETYPE {
     OMX_VERSIONTYPE nVersion;         /**< OMX specification version information */
     OMX_U32 nPortIndex;               /**< port that this structure applies to */
     OMX_U32 nChannels;                /**< Number of channels (e.g. 2 for stereo) */
-    OMX_NUMERICALDATATYPE eNumData;   /**< indicates PCM data as signed or unsigned */
+    OMX_NUMERICALDATATYPE eNumData;   /**< indicates PCM data as signed, unsigned or floating pt. */
     OMX_ENDIANTYPE eEndian;           /**< indicates PCM data as little or big endian */
     OMX_BOOL bInterleaved;            /**< True for normal interleaved data; false for
                                            non-interleaved data (e.g. block data) */
index 5afaba0..515e002 100644 (file)
@@ -280,12 +280,18 @@ typedef enum OMX_ENDIANTYPE
 
 
 /** The OMX_NUMERICALDATATYPE enumeration is used to indicate if data
-    is signed or unsigned
+    is signed, unsigned or floating point (Android extension).
+
+    Android floating point support policy:
+    If component does not support floating point raw audio, it can reset
+    configuration to signed 16-bit integer (support for which is required.)
+    nBitsPerSample will be set to 32 for float data.
  */
 typedef enum OMX_NUMERICALDATATYPE
 {
     OMX_NumericalDataSigned, /**< signed data */
     OMX_NumericalDataUnsigned, /**< unsigned data */
+    OMX_NumericalDataFloat = 0x7F000001, /**< floating point data */
     OMX_NumercialDataMax = 0x7FFFFFFF
 } OMX_NUMERICALDATATYPE;