summaryrefslogtreecommitdiffstats
path: root/aac-enc-dabplus-zmq.c
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2014-01-10 09:02:18 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2014-01-10 09:02:18 +0100
commitd18555671ab1a18b5385db3996e719c1fc9ae768 (patch)
treef914dfd2e6d07493b9931db851e8f13fb49b6a5a /aac-enc-dabplus-zmq.c
parent373fcdac84fd1a8a8d513d1dcc00539821c1c803 (diff)
downloadODR-AudioEnc-d18555671ab1a18b5385db3996e719c1fc9ae768.tar.gz
ODR-AudioEnc-d18555671ab1a18b5385db3996e719c1fc9ae768.tar.bz2
ODR-AudioEnc-d18555671ab1a18b5385db3996e719c1fc9ae768.zip
aac-enc-dabplus-zmq: remove useless ADTS code
Diffstat (limited to 'aac-enc-dabplus-zmq.c')
-rw-r--r--aac-enc-dabplus-zmq.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/aac-enc-dabplus-zmq.c b/aac-enc-dabplus-zmq.c
index 0994d04..9122dc2 100644
--- a/aac-enc-dabplus-zmq.c
+++ b/aac-enc-dabplus-zmq.c
@@ -49,7 +49,6 @@ void usage(const char* name) {
//" -V, --version Print version and exit.\n"
//" --mi=[ 0, ... ] Set AAC frame messages interval in milliseconds.\n"
//" --ma=[ 0, ... ] Set AAC frame messages attack time in milliseconds.\n"
-//" -t, --adts Set ADTS output format (for debugging).\n"
//" -l, --lp Set frame size to 1024 instead of 960.\n"
"\n"
"Only the tcp:// zeromq transport has been tested until now.\n"
@@ -63,40 +62,6 @@ void usage(const char* name) {
#define required_argument 1
#define optional_argument 2
-#define ADTS_HEADER_SIZE 7
-#define ADTS_MPEG_ID 1 /* 0: MPEG-4, 1: MPEG-2 */
-#define ADTS_MPEG_PROFILE 1
-const int mpeg4audio_sample_rates[16] = {
- 96000, 88200, 64000, 48000, 44100, 32000,
- 24000, 22050, 16000, 12000, 11025, 8000, 7350
-};
-
-int FindSRIndex(int sr)
-{
- int i;
- for (i = 0; i < 16; i++) {
- if (sr == mpeg4audio_sample_rates[i])
- return i;
- }
- return 16 - 1;
-}
-
-void adts_hdr_up(char *buff, int size)
-{
- unsigned short len = size + ADTS_HEADER_SIZE;
- unsigned short buffer_fullness = 0x07FF;
-
- /* frame length, 13 bits */
- buff[3] &= 0xFC;
- buff[3] |= ((len >> 11) & 0x03); /* 2b: aac_frame_length */
- buff[4] = len >> 3; /* 8b: aac_frame_length */
- buff[5] = (len << 5) & 0xE0; /* 3b: aac_frame_length */
- /* buffer fullness, 11 bits */
- buff[5] |= ((buffer_fullness >> 6) & 0x1F); /* 5b: adts_buffer_fullness */
- buff[6] = (buffer_fullness << 2) & 0xFC; /* 6b: adts_buffer_fullness */
- /* 2b: num_raw_data_blocks */
-}
-
int main(int argc, char *argv[]) {
int subchannel_index = 8; //64kbps subchannel
int ch=0;
@@ -125,7 +90,6 @@ int main(int argc, char *argv[]) {
{"rate", required_argument, 0, 'r'},
{"channels", required_argument, 0, 'c'},
//{"lp", no_argument, 0, 'l'},
- //{"adts", no_argument, 0, 't'},
{"afterburner", no_argument, 0, 'a'},
{"help", no_argument, 0, 'h'},
{0,0,0,0},