aboutsummaryrefslogtreecommitdiffstats
path: root/libAACenc/src/aacenc.h
diff options
context:
space:
mode:
Diffstat (limited to 'libAACenc/src/aacenc.h')
-rw-r--r--libAACenc/src/aacenc.h39
1 files changed, 38 insertions, 1 deletions
diff --git a/libAACenc/src/aacenc.h b/libAACenc/src/aacenc.h
index 87fc3e8..79524b5 100644
--- a/libAACenc/src/aacenc.h
+++ b/libAACenc/src/aacenc.h
@@ -2,7 +2,7 @@
/* -----------------------------------------------------------------------------------------------------------
Software License for The Fraunhofer FDK AAC Codec Library for Android
-© Copyright 1995 - 2013 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
+© Copyright 1995 - 2015 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
All rights reserved.
1. INTRODUCTION
@@ -98,6 +98,11 @@ amm-info@iis.fraunhofer.de
#include "sbr_encoder.h"
+#define BITRES_MAX_LD 4000
+#define BITRES_MIN_LD 500
+#define BITRATE_MAX_LD 70000 /* Max assumed bitrate for bitres calculation */
+#define BITRATE_MIN_LD 12000 /* Min assumed bitrate for bitres calculation */
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -204,6 +209,8 @@ struct AACENC_CONFIG {
INT maxBitsPerFrame; /* maximum number of bits in AU */
INT bitreservoir; /* size of bitreservoir */
+ INT audioMuxVersion; /* audio mux version in loas/latm transport format */
+
UINT sbrRatio; /* sbr sampling rate ratio: dual- or single-rate */
UCHAR useTns; /* flag: use temporal noise shaping */
@@ -223,6 +230,36 @@ typedef struct {
typedef struct AAC_ENC *HANDLE_AAC_ENC;
/**
+ * \brief Calculate framesize in bits for given bit rate, frame length and sampling rate.
+ *
+ * \param bitRate Ttarget bitrate in bits per second.
+ * \param frameLength Number of audio samples in one frame.
+ * \param samplingRate Sampling rate in Hz.
+ *
+ * \return Framesize in bits per frame.
+*/
+INT FDKaacEnc_CalcBitsPerFrame(
+ const INT bitRate,
+ const INT frameLength,
+ const INT samplingRate
+ );
+
+/**
+ * \brief Calculate bitrate in bits per second for given framesize, frame length and sampling rate.
+ *
+ * \param bitsPerFrame Framesize in bits per frame.
+ * \param frameLength Number of audio samples in one frame.
+ * \param samplingRate Sampling rate in Hz.
+ *
+ * \return Bitrate in bits per second.
+*/
+INT FDKaacEnc_CalcBitrate(
+ const INT bitsPerFrame,
+ const INT frameLength,
+ const INT samplingRate
+ );
+
+/**
* \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