diff options
author | piratfm <piratfm@gmail.com> | 2013-04-16 16:45:20 +0300 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2013-12-14 17:42:35 +0100 |
commit | 83293a2bb69f96a5fa7f14cfdea45441c9cec0d9 (patch) | |
tree | 2c1430567d6ec3683e378999e3810b2a6504a4f0 /aac-enc-dabplus.c | |
parent | 4cd6dde61ee3115a1d4b5bec50996c8e708370fa (diff) | |
download | fdk-aac-83293a2bb69f96a5fa7f14cfdea45441c9cec0d9.tar.gz fdk-aac-83293a2bb69f96a5fa7f14cfdea45441c9cec0d9.tar.bz2 fdk-aac-83293a2bb69f96a5fa7f14cfdea45441c9cec0d9.zip |
AU alignment changed (last AU takes all possible space in superframe).
Now player works more stable.
Diffstat (limited to 'aac-enc-dabplus.c')
-rw-r--r-- | aac-enc-dabplus.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/aac-enc-dabplus.c b/aac-enc-dabplus.c index b1152a5..977077a 100644 --- a/aac-enc-dabplus.c +++ b/aac-enc-dabplus.c @@ -101,7 +101,6 @@ int main(int argc, char *argv[]) { int wav_format, bits_per_sample, sample_rate=48000, channels=2; uint8_t* input_buf; int16_t* convert_buf; - uint8_t* rs_encoded_buf; void *rs_handler = NULL; int aot = AOT_DABPLUS_AAC_LC; int afterburner = 0, raw_input=0; @@ -255,6 +254,13 @@ int main(int argc, char *argv[]) { fprintf(stderr, "Unable to set the RAW transmux\n"); return 1; } + + /*if (aacEncoder_SetParam(handle, AACENC_BITRATEMODE, 7 *AACENC_BR_MODE_SFR*) != AACENC_OK) { + fprintf(stderr, "Unable to set the bitrate mode\n"); + return 1; + }*/ + + fprintf(stderr, "AAC bitrate set to: %d\n", subchannel_index*8000); if (aacEncoder_SetParam(handle, AACENC_BITRATE, subchannel_index*8000) != AACENC_OK) { fprintf(stderr, "Unable to set the bitrate\n"); @@ -278,7 +284,6 @@ int main(int argc, char *argv[]) { int input_size = channels*2*info.frameLength; input_buf = (uint8_t*) malloc(input_size); convert_buf = (int16_t*) malloc(input_size); - rs_encoded_buf = (uint8_t*) malloc(120*subchannel_index); /* symsize=8, gfpoly=0x11d, fcr=0, prim=1, nroots=10, pad=135 */ rs_handler = init_rs_char(8, 0x11d, 0, 1, 10, 135); @@ -295,8 +300,14 @@ int main(int argc, char *argv[]) { fprintf(stderr, "(outbuf_size mod 5) = %d\n", outbuf_size % 5); } + fprintf(stderr, "outbuf_size: %d\n", outbuf_size); + //outbuf_size += (4 * subchannel_index * (8*8)/8) - outbuf_size/5; + fprintf(stderr, "outbuf_size: %d\n", outbuf_size); + int frame=0; while (1) { + memset(outbuf, 0x00, outbuf_size); + AACENC_BufDesc in_buf = { 0 }, out_buf = { 0 }; AACENC_InArgs in_args = { 0 }; AACENC_OutArgs out_args = { 0 }; |