summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNarsinga Rao Chella <nrchella@codeaurora.org>2015-06-06 06:58:57 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2015-08-04 23:55:34 -0700
commit5d1bb4fa55d84d748e2e199a919c303c5e5e0df7 (patch)
treea1027e54095faa6dec24c8e533ed78a2cdd940b9
parent4b8661586656b286e19ebf53c1eac6d4f7b57167 (diff)
downloadandroid_hardware_qcom_media-5d1bb4fa55d84d748e2e199a919c303c5e5e0df7.tar.gz
android_hardware_qcom_media-5d1bb4fa55d84d748e2e199a919c303c5e5e0df7.tar.bz2
android_hardware_qcom_media-5d1bb4fa55d84d748e2e199a919c303c5e5e0df7.zip
mm-core: add QTI OMX extensions for FLAC/ALAC/APE/AIFF
Add QTI OMX extensions to support QTI FLAC/ALAC/APE/AIFF SW decoder. This is a squash change for below changes mm-core: add QCOM OMX extension for ALAC Change-Id: Ieb55e66a821b05c4f9de84e8c736dfbec5055ab8 mm-core: add QTI OMX extensions for FLAC Change-Id: I9fdcedea0201f63ede21f7562aec5abe8ec7742b mm-core: define compression levels for APE clips Change-Id: I85f8bcf5cc0fd4db7d22d5e7191772f85f1605a3 mm-core: add mimetype and QCOM OMX extension for APE Change-Id: I7effab25af4c5a2315a9a4d2a8b29195cfbbc700 mm-core: Add new mime for AIFF container Change-Id: I69850acb459b3188cd0790c2b57f0bb2b0c23dd6 audio: Add new mime for ALAC format Change-Id: I26ce8e60101baca74dd3f7b3107ba39922c47acf Change-Id: I9fdcedea0201f63ede21f7562aec5abe8ec7742b
-rw-r--r--mm-core/inc/QCMediaDefs.h5
-rw-r--r--mm-core/inc/QOMX_AudioExtensions.h91
-rw-r--r--mm-core/inc/QOMX_AudioIndexExtensions.h5
3 files changed, 98 insertions, 3 deletions
diff --git a/mm-core/inc/QCMediaDefs.h b/mm-core/inc/QCMediaDefs.h
index fa4b898d..b9878f59 100644
--- a/mm-core/inc/QCMediaDefs.h
+++ b/mm-core/inc/QCMediaDefs.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012 - 2013, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012 - 2015, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -50,6 +50,9 @@ extern const char *MEDIA_MIMETYPE_AUDIO_DTS;
extern const char *MEDIA_MIMETYPE_AUDIO_DTS_LBR;
extern const char *MEDIA_MIMETYPE_AUDIO_EAC3;
extern const char *MEDIA_MIMETYPE_AUDIO_AMR_WB_PLUS;
+extern const char *MEDIA_MIMETYPE_AUDIO_AIFF;
+extern const char *MEDIA_MIMETYPE_AUDIO_ALAC;
+extern const char *MEDIA_MIMETYPE_AUDIO_APE;
extern const char *MEDIA_MIMETYPE_CONTAINER_QCMPEG2TS;
extern const char *MEDIA_MIMETYPE_VIDEO_HEVC;
extern const char *MEDIA_MIMETYPE_CONTAINER_QCMPEG;
diff --git a/mm-core/inc/QOMX_AudioExtensions.h b/mm-core/inc/QOMX_AudioExtensions.h
index 2c3848df..a0c5dc81 100644
--- a/mm-core/inc/QOMX_AudioExtensions.h
+++ b/mm-core/inc/QOMX_AudioExtensions.h
@@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
-Copyright (c) 2009, 2011, The Linux Foundation. All rights reserved.
+Copyright (c) 2009, 2011, 2015, The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -75,6 +75,12 @@ extern "C"
#define OMX_QCOM_INDEX_PARAM_DAK_SEQ "OMX.Qualcomm.index.audio.dak_seq"
#define OMX_QCOM_INDEX_CONFIG_DUALMONO "OMX.Qualcomm.index.audio.dualmono"
#define OMX_QCOM_INDEX_CONFIG_AAC_SEL_MIX_COEF "OMX.Qualcomm.index.audio.aac_sel_mix_coef"
+#define OMX_QCOM_INDEX_PARAM_ALAC "OMX.Qualcomm.index.audio.alac"
+#define OMX_QCOM_INDEX_PARAM_APE "OMX.Qualcomm.index.audio.ape"
+#define OMX_QCOM_INDEX_PARAM_FLAC_DEC "OMX.Qualcomm.index.audio.flacdec"
+
+#define ALAC_CSD_SIZE 24
+#define APE_CSD_SIZE 32
typedef enum QOMX_AUDIO_AMRBANDMODETYPE {
QOMX_AUDIO_AMRBandModeWB9 = 0x7F000001,/**< AMRWB Mode 9 = SID*/
@@ -505,6 +511,89 @@ typedef struct QOMX_AUDIO_CONFIG_DUALMONOTYPE {
OMX_AUDIO_DUAL_MONO_CHANNEL_CONFIG eChannelConfig;
} QOMX_AUDIO_CONFIG_DUALMONOTYPE;
+typedef struct QOMX_AUDIO_PARAM_ALACTYPE {
+ 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 nFrameLength; /* Frames per packet when no explicit frames per packet setting is present in the packet header */
+ OMX_U8 nCompatibleVersion; /* Indicates the compatible version */
+ OMX_U8 nBitDepth; /* Bit depth of the source PCM data */
+ OMX_U8 nPb; /* Tuning Parameter; currently not used */
+ OMX_U8 nMb; /* Tuning Parameter; currently not used */
+ OMX_U8 nKb; /* Tuning Parameter; currently not used */
+ OMX_U8 nChannels; /* Number of channels for multichannel decoding */
+ OMX_U16 nMaxRun; /* Currently not used */
+ OMX_U32 nMaxFrameBytes; /* Max size of an Apple Lossless packet within the encoded stream */
+ OMX_U32 nAvgBitRate; /* Average bit rate in bits per second of the Apple Lossless stream */
+ OMX_U32 nSampleRate; /* Number of samples per second in Hertz */
+ OMX_U32 nChannelLayoutTag; /*Indicates whether channel layout information is present in the bitstream */
+} QOMX_AUDIO_PARAM_ALACTYPE;
+
+typedef struct QOMX_AUDIO_PARAM_APETYPE {
+ 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_U16 nCompatibleVersion; /* Indicates the compatible version */
+ OMX_U16 nCompressionLevel; /* The compression level present in the encoded packet */
+ OMX_U32 nFormatFlags; /* Reserved parameter for future use */
+ OMX_U32 nBlocksPerFrame; /* Indicates the number of audio blocks in one frame present in the encoded packet header */
+ OMX_U32 nFinalFrameBlocks; /* Indicates the number of audio blocks in the final frame present in the encoded packet header */
+ OMX_U32 nTotalFrames; /* Indicates the total number of frames */
+ OMX_U16 nBitsPerSample; /* Bit depth of the source PCM data */
+ OMX_U16 nChannels; /* Number of channels for decoding */
+ OMX_U32 nSampleRate; /* Samples per second in Hertz */
+ OMX_U32 nSeekTablePresent; /* Flag to indicate if seek table is present or not */
+} QOMX_AUDIO_PARAM_APETYPE;
+
+enum {
+ kKeyIndexAlacFrameLength = 0,
+ kKeyIndexAlacCompatibleVersion = 4,
+ kKeyIndexAlacBitDepth = 5,
+ kKeyIndexAlacPb = 6,
+ kKeyIndexAlacMb = 7,
+ kKeyIndexAlacKb = 8,
+ kKeyIndexAlacNumChannels = 9,
+ kKeyIndexAlacMaxRun = 10,
+ kKeyIndexAlacMaxFrameBytes = 12,
+ kKeyIndexAlacAvgBitRate = 16,
+ kKeyIndexAlacSamplingRate = 20,
+ kKeyIndexAlacChannelLayoutTag = 24,
+};
+
+enum {
+ kKeyIndexApeCompatibleVersion = 0,
+ kKeyIndexApeCompressionLevel = 2,
+ kKeyIndexApeFormatFlags = 4,
+ kKeyIndexApeBlocksPerFrame = 8,
+ kKeyIndexApeFinalFrameBlocks = 12,
+ kKeyIndexApeTotalFrames = 16,
+ kKeyIndexApeBitsPerSample = 20,
+ kKeyIndexApeNumChannels = 22,
+ kKeyIndexApeSampleRate = 24,
+ kKeyIndexApeSeekTablePresent = 28,
+};
+
+enum {
+ APE_COMPRESSION_LEVEL_FAST = 1000,
+ APE_COMPRESSION_LEVEL_NORMAL = 2000,
+ APE_COMPRESSION_LEVEL_HIGH = 3000,
+ APE_COMPRESSION_LEVEL_EXTRA_HIGH = 4000,
+ APE_COMPRESSION_LEVEL_INSANE = 5000,
+};
+
+typedef struct QOMX_AUDIO_PARAM_FLAC_DEC_TYPE {
+ OMX_U32 nSize;
+ OMX_VERSIONTYPE nVersion;
+ OMX_U32 nPortIndex;
+ OMX_U32 nChannels;
+ OMX_U32 nSampleRate;
+ OMX_U32 nBitsPerSample;
+ OMX_U32 nMinBlkSize;
+ OMX_U32 nMaxBlkSize;
+ OMX_U32 nMinFrmSize;
+ OMX_U32 nMaxFrmSize;
+} QOMX_AUDIO_PARAM_FLAC_DEC_TYPE;
+
#if defined( __cplusplus )
}
#endif /* end of macro __cplusplus */
diff --git a/mm-core/inc/QOMX_AudioIndexExtensions.h b/mm-core/inc/QOMX_AudioIndexExtensions.h
index aed68dfb..4d43e81c 100644
--- a/mm-core/inc/QOMX_AudioIndexExtensions.h
+++ b/mm-core/inc/QOMX_AudioIndexExtensions.h
@@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
-Copyright (c) 2009, The Linux Foundation. All rights reserved.
+Copyright (c) 2009, 2015 The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -71,6 +71,9 @@ typedef enum QOMX_AUDIO_EXTENSIONS_INDEXTYPE
QOMX_IndexParamAudioAc3 = 0x7F200005, /**< "OMX.Qualcomm.index.audio.ac3" */
QOMX_IndexParamAudioAc3PostProc = 0x7F200006, /**< "OMX.Qualcomm.index.audio.postproc.ac3" */
QOMX_IndexParamAudioAacSelectMixCoef = 0x7F200007, /** "OMX.Qualcomm.index.audio.aac_sel_mix_coef**/
+ QOMX_IndexParamAudioAlac = 0x7F200008, /** "OMX.Qualcomm.index.audio.alac" */
+ QOMX_IndexParamAudioApe = 0x7F200009, /** "OMX.Qualcomm.index.audio.ape" */
+ QOMX_IndexParamAudioFlacDec = 0x7F20000A, /** "OMX.Qualcomm.index.audio.flacdec**/
QOMX_IndexParamAudioUnused = 0x7F2FFFFF
} QOMX_AUDIO_EXTENSIONS_INDEXTYPE;