summaryrefslogtreecommitdiffstats
path: root/libAACenc/src/aacenc.h
diff options
context:
space:
mode:
authorDave Burke <daveburke@google.com>2012-05-12 13:17:25 -0700
committerDave Burke <daveburke@google.com>2012-05-12 13:47:46 -0700
commit698b536f3b34a7cfc41a80e1034cc359456bdd66 (patch)
treefa3dfa75d535b188725f1b84316cb4b06db79771 /libAACenc/src/aacenc.h
parent9bf37cc9712506b2483650c82d3c41152337ef7e (diff)
downloadODR-AudioEnc-698b536f3b34a7cfc41a80e1034cc359456bdd66.tar.gz
ODR-AudioEnc-698b536f3b34a7cfc41a80e1034cc359456bdd66.tar.bz2
ODR-AudioEnc-698b536f3b34a7cfc41a80e1034cc359456bdd66.zip
Update to 2012_05_11 version.
Fixes: - Don't throw error for invalid bitrate but limit to functional value - More robust ASC parsing - More robust handling of corrupt bitstreams - Handle multiple raw access units Change-Id: Ib49fe2545ff4185fe924126da702fe84ac5c2d87
Diffstat (limited to 'libAACenc/src/aacenc.h')
-rw-r--r--libAACenc/src/aacenc.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/libAACenc/src/aacenc.h b/libAACenc/src/aacenc.h
index 66ef2b9..22228f6 100644
--- a/libAACenc/src/aacenc.h
+++ b/libAACenc/src/aacenc.h
@@ -159,6 +159,33 @@ typedef struct {
typedef struct AAC_ENC *HANDLE_AAC_ENC;
+/**
+ * \brief Limit given bit rate to a valid value
+ * \param hTpEnc transport encoder handle
+ * \param coreSamplingRate the sample rate to be used for the AAC encoder
+ * \param frameLength the frameLength to be used for the AAC encoder
+ * \param nChannels number of total channels
+ * \param nChannelsEff number of effective channels
+ * \param bitRate the initial bit rate value for which the closest valid bit rate value is searched for
+ * \param averageBits average bits per frame for fixed framing. Set to -1 if not available.
+ * \param optional pointer where the current bits per frame are stored into.
+ * \param bitrateMode the current bit rate mode
+ * \param nSubFrames number of sub frames for super framing (not transport frames).
+ * \return a valid bit rate value as close as possible or identical to bitRate
+ */
+INT FDKaacEnc_LimitBitrate(
+ HANDLE_TRANSPORTENC hTpEnc,
+ INT coreSamplingRate,
+ INT frameLength,
+ INT nChannels,
+ INT nChannelsEff,
+ INT bitRate,
+ INT averageBits,
+ INT *pAverageBitsPerFrame,
+ INT bitrateMode,
+ INT nSubFrames
+ );
+
/*-----------------------------------------------------------------------------
functionname: FDKaacEnc_GetVBRBitrate