Giter Site home page Giter Site logo

knik0 / faac Goto Github PK

View Code? Open in Web Editor NEW
172.0 172.0 59.0 2.58 MB

Freeware Advanced Audio Coder faac mirror

Home Page: https://sourceforge.net/projects/faac/

License: Other

Makefile 0.35% Shell 0.03% C++ 24.86% C 74.43% M4 0.32%
aac audio encoder faac m4a mp4

faac's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

faac's Issues

Don't use -msse2 for arches others than i386 or amd64

Hi,
Faac 1.29.7.8 fail to build because you build with -msse2 without checking
the architecture in configure.
Here is the output of gcc in armhf machine.

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility=hidden -msse2 -DDRM -g -O2 -fdebug-prefix-map=/home/marillat/faac-dmo-1.29.7.8=. -fstack-protector-strong -Wformat -Werror=format-security -DDRM -c blockswitch.c  -fPIC -DPIC -o .libs/libfaac_drm_la-blockswitch.o
gcc: error: unrecognized command line option ‘-msse2’
````

Breaking API change in 1.29.9 — intentional or not?

12d7414 introduced a breaking API change, config.allowMidside => config. jointmode that broke compatibility with current Libav (https://code.videolan.org/libav/libav/blob/master/libavcodec/libfaac.c#L118) and maintenance lines of FFmpeg, e.g. 2.8.13 (FFmpeg dropped faac support in 3.2). While Libav could and probably should be updated to reflect this change, it's probably hard to fix this in the maintenance lines of FFmpeg.

I package FFmpeg and related packages for the Homebrew package manager, so I just want to make sure this change is intentional and final before dropping faac support from our FFmpeg 2.x package. Thanks for your attention.

floating point exceptions in multiple locations

Hi, I was fuzzing faac with afl and I came across some floating point exceptions. One is in lifaac/quantize.c line 367 and the other is in frontend/input.c line 257 (compile with address sanitizer for a more concise backtrace). I will attach the two files causing these errors. (Sorry about the weird file extensions, github won't let me upload the files as .wav)

err1.txt
err2.txt

cheers
project-repo

Missing include files

Hi,
in 1.29.7.5 include files for kiss-fft (at least) are not packaged in the tarball and thus

make[2]: Entering directory '/src/faac-1.29.7.5/libfaac'
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -I../include -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility=hidden -DDRM -g -O2 -fdebug-prefix-map=/src/faac-1.29.7.5=. -fstack-protector-strong -Wformat -Werror=format-security -DDRM -c -o libfaac_drm_la-fft.lo `test -f 'fft.c' || echo './'`fft.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility=hidden -DDRM -g -O2 -fdebug-prefix-map=/src/faac-1.29.7.5=. -fstack-protector-strong -Wformat -Werror=format-security -DDRM -c fft.c  -fPIC -DPIC -o .libs/libfaac_drm_la-fft.o
fft.c:34:10: fatal error: kiss_fft/kiss_fft.h: No such file or directory
 #include "kiss_fft/kiss_fft.h"
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Makefile:623: recipe for target 'libfaac_drm_la-fft.lo' failed

vs2017 build, error

open the "project\msvc\faac.sln" with vs2017 ,build project err:“....\libfaac\aacquant.c”: No such file or directory

Invalid memory address dereference in huffcode (in libfaac/huff2.c:259)

Hi, i found a issue in the FAAC 1.29.9.2, it is crashed by function huffcode .It just cause a Invalid memory address dereference.the details are below(ASAN):

./faac faac_res/unkown_addr_huff2_259  -o out.aac
Freeware Advanced Audio Coder
FAAC 1.29.9.2

Initial quantization quality: 50
Average bitrate: 64 kbps/channel
Bandwidth: 5512 Hz
PNS level: 4
Object type: Low Complexity(MPEG-2) + IS + PNS
Container format: Transport Stream (ADTS)
Encoding faac_res/unkown_addr_huff2_259 to out.aac
   frame          | bitrate | elapsed/estim | play/CPU | ETA
ASAN:SIGSEGV
=================================================================
==27230==ERROR: AddressSanitizer: SEGV on unknown address 0x7f3599266fe0 (pc 0x7f379905df34 bp 0x7ffe3392bea0 sp 0x7ffe3392bdd0 T0)
    #0 0x7f379905df33 in huffcode /root/faac_asan/faac/libfaac/huff2.c:259
    #1 0x7f379905e877 in huffbook /root/faac_asan/faac/libfaac/huff2.c:435
    #2 0x7f379905abe6 in qlevel /root/faac_asan/faac/libfaac/quantize.c:282
    #3 0x7f379905aff8 in BlocQuant /root/faac_asan/faac/libfaac/quantize.c:312
    #4 0x7f379904e38e in faacEncEncode /root/faac_asan/faac/libfaac/frame.c:586
    #5 0x4057cf in main /root/faac_asan/faac/frontend/main.c:1071
    #6 0x7f3798c9682f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #7 0x401968 in _start (/usr/local/faac-asan/bin/faac+0x401968)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /root/faac_asan/faac/libfaac/huff2.c:259 huffcode
==27230==ABORTING

POC FILE:https://github.com/fantasy7082/image_test/blob/master/006_unkown_addr_huff2_259_wav

Dropping allowMidside breaks nearly all library consumers

In commit 12d7414 the struct member allowMidside is dropped from faacEncConfiguration.

This breaks the build on virtually every consumer of libfaac. Due to the history of AAC in open source projects, many of those consumers are not frequently updated anymore.
For example, in FreeBSD we keep a (no longer maintained) package of ffmpeg before 1.0 around in order to support other infrequently maintained packages. This old ffmpeg package (and quite a few more, obviously) expect allowMidside.

Would it be possible to stay backward compatible for a certain grace period and keep the struct member allowMidside for now? This would allow the community to come up with the necessary workarounds in a release-friendly manner.

Invalid memory address dereference in huffcode (in libfaac/huff2.c:167)

Hi, i found a issue in the FAAC 1.29.9.2, it is crashed by function huffcode .It just cause a Invalid memory address dereference.the details are below(ASAN):

./faac faac_res/unkown_addr_huff2_167  -o out.aac
Freeware Advanced Audio Coder
FAAC 1.29.9.2

Initial quantization quality: 100
Average bitrate: 64 kbps/channel
Bandwidth: 5504 Hz
PNS level: 4
Object type: Low Complexity(MPEG-2) + IS + PNS
Container format: Transport Stream (ADTS)
Encoding faac_res/unkown_addr_huff2_167 to out.aac
   frame          | bitrate | elapsed/estim | play/CPU | ETA
ASAN:SIGSEGV
=================================================================
==27221==ERROR: AddressSanitizer: SEGV on unknown address 0x7f7dfb85d134 (pc 0x7f7ffb654409 bp 0x7ffd2ae638c0 sp 0x7ffd2ae637f0 T0)
    #0 0x7f7ffb654408 in huffcode /root/faac_asan/faac/libfaac/huff2.c:167
    #1 0x7f7ffb65578d in huffbook /root/faac_asan/faac/libfaac/huff2.c:413
    #2 0x7f7ffb651be6 in qlevel /root/faac_asan/faac/libfaac/quantize.c:282
    #3 0x7f7ffb651ff8 in BlocQuant /root/faac_asan/faac/libfaac/quantize.c:312
    #4 0x7f7ffb64538e in faacEncEncode /root/faac_asan/faac/libfaac/frame.c:586
    #5 0x4057cf in main /root/faac_asan/faac/frontend/main.c:1071
    #6 0x7f7ffb28d82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #7 0x401968 in _start (/usr/local/faac-asan/bin/faac+0x401968)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /root/faac_asan/faac/libfaac/huff2.c:167 huffcode
==27221==ABORTING

POC FILE:https://github.com/fantasy7082/image_test/blob/master/003_unkown_addr_huff2_167_wav

1.29.8 fail to build with --enable-drm

Hi again,
Build fine without --enable-drm

make[2]: Entering directory '/src/faac-1.29.8/libfaac'
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -I../include -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility=hidden -msse2 -DDRM -g -O2 -fdebug-prefix-map=/src/faac-1.29.8=. -fstack-protector-strong -Wformat -Werror=format-security -DDRM -c -o libfaac_drm_la-bitstream.lo `test -f 'bitstream.c' || echo './'`bitstream.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility=hidden -msse2 -DDRM -g -O2 -fdebug-prefix-map=/src/faac-1.29.8=. -fstack-protector-strong -Wformat -Werror=format-security -DDRM -c bitstream.c  -fPIC -DPIC -o .libs/libfaac_drm_la-bitstream.o
In file included from huff2.h:20:0,
                 from bitstream.c:33:
bitstream.h:112:18: error: expected identifier before numeric constant
 # define ESC_HCB 11
                  ^
huff2.h:24:5: note: in expansion of macro 'ESC_HCB'
     ESC_HCB = 11,
     ^~~~~~~
bitstream.c: In function 'WriteReorderedSpectralData':
bitstream.c:1023:28: error: 'CoderInfo {aka struct <anonymous>}' has no member named 'data'; did you mean 'datacnt'?
     int* data = coderInfo->data;
                            ^~~~
                            datacnt
bitstream.c:1024:26: error: 'CoderInfo {aka struct <anonymous>}' has no member named 'len'
     int* len  = coderInfo->len;
                          ^~
bitstream.c:1047:27: error: 'CoderInfo {aka struct <anonymous>}' has no member named 'book_vector'
         cur_cb = coderInfo->book_vector[0];
                           ^~
bitstream.c:1074:39: error: 'CoderInfo {aka struct <anonymous>}' has no member named 'book_vector'
                     cur_cb = coderInfo->book_vector[sfb_cnt];
                                       ^~
Makefile:617: recipe for target 'libfaac_drm_la-bitstream.lo' failed

LICENSE?

Hi @knik0 .

diff COPYING lgpl-2.0.txt 
1,2c1,2
<                 GNU LIBRARY GENERAL PUBLIC LICENSE
<                      Version 2, June 1991
---
>                   GNU LIBRARY GENERAL PUBLIC LICENSE
>                        Version 2, June 1991
5c5
<                   59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
---
>  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
12c12
<                           Preamble
---
>                             Preamble
102c102
<                 GNU LIBRARY GENERAL PUBLIC LICENSE
---
>                   GNU LIBRARY GENERAL PUBLIC LICENSE
414c414
<                           NO WARRANTY
---
>                             NO WARRANTY
437c437
<                    END OF TERMS AND CONDITIONS
---
>                      END OF TERMS AND CONDITIONS
466,468c466,467
<     License along with this library; if not, write to the 
<     Free Software Foundation, Inc., 59 Temple Place - Suite 330, 
<     Boston, MA  02111-1307  USA.
---
>     License along with this library; if not, write to the Free Software
>     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

❓ Can correct? Otherwise, github is not recognized GitHub.

cppcheck -f -v . 2>cppcheck.log >/dev/null

char *tempVal=new char[slen];
if(RegQueryValueEx(regKey, keyStr, NULL, NULL, (BYTE *)tempVal, &len )!=ERROR_SUCCESS ||
strcmpi(tempVal,valStr))
RegSetValueEx(regKey, keyStr, 0, REG_SZ, (BYTE *)valStr, slen);
delete tempVal;

Maybe:

        BYTE *tempVal=new BYTE[slen];
...
       delete *tempVal;

?

BYTE *tempVal=new BYTE[size];
if(RegQueryValueEx(regKey, keyStr, NULL, NULL, (BYTE *)tempVal, &len )!=ERROR_SUCCESS ||
memcmp(tempVal,addr,len))
RegSetValueEx(regKey, keyStr, 0, REG_BINARY, addr, size);
delete tempVal;

Maybe:

...
       delete *tempVal;

?

dest=NULL;
if((retVal=RegQueryValueEx(regKey , keyStr , NULL , NULL, NULL, &size))==ERROR_SUCCESS)
if(*dest=(BYTE *)malloc(size+1))

Maybe:

    *dest=NULL;
...

?

Please, tag the releases

I saw that you have some commits with comments like "version -> 1.29.9.2". Would it be possible to tag those commits with something like 1.29.9.2? This would be good to use with some tools (including checking automatically if there are new versions).

Thanks,

Rogério.

Croaking sound after encoding.

Hello.
I am using libfaac.dll version 1.29.
Input data:
44100 Hz 16 bit stereo.
calling
faacEncOpen(44100, 2, &inputSamples, &maxOutputBytes);

Encoder setting:
faacEncConfiguration c = (faacEncConfiguration)cfg;
c.inputFormat = FAAC_INPUT.I_16BIT;
c.bitRate = 128000 / 2; // 128000
c.outputFormat = FAAC_OUTPUT.ADTS;
c.useLfe = 0;
c.aacObjectType = AAC_object_type.LOW;
c.bandWidth = 44100 / 2;
After encoding and writing to a data file, a "croak" sound is obtained.
https://disk.yandex.ru/d/1nyV0gmklqHMAw
Please tell me what am I doing wrong?
Thank you.

The --long-help option won't work

The --long-help option give me an error.
Setting --help-long option works, so it should be a mistake in the manual.

faac-1.29.6-win32\faac --long-help
faac-1.29.6-win32\faac.exe: unknown option -- long-help
Usage: faac [options] infile

Help options:
        --help          Short help on using FAAC
        --long-help     Description of all options for FAAC.
        --license       License terms for FAAC.
        --help-qual     Quality-related options
        --help-io       Input/output options
        --help-mp4      MP4 specific options
        --help-advanced Advanced options, only for testing purposes

how to build lib/dll with gcc in mingw, and use lib in msvc

in windows , i use build the project in mingw. and use gcc link all *.o to create .lib and .dll,then use them in msvc,but err:
error LNK2019: unresolved external symbol _faacEncGetCurrentConfiguration referenced in function "public: bool __thiscall mediakit::AACEncoder::init(int,int,int)" (?init@AACEncoder@mediakit@@QAE_NHHH@Z) error LNK2019: unresolved external symbol _faacEncSetConfiguration referenced in function "public: bool __thiscall mediakit::AACEncoder::init(int,int,int)" (?init@AACEncoder@mediakit@@QAE_NHHH@Z) error LNK2019: unresolved external symbol _faacEncOpen referenced in function "public: bool __thiscall mediakit::AACEncoder::init(int,int,int)" (?init@AACEncoder@mediakit@@QAE_NHHH@Z) error LNK2019: unresolved external symbol _faacEncEncode referenced in function "public: int __thiscall mediakit::AACEncoder::inputData(char *,int,unsigned char * *)" (?inputData@AACEncoder@mediakit@@QAEHPADHPAPAE@Z) error LNK2019: unresolved external symbol _faacEncClose referenced in function "public: virtual __thiscall mediakit::AACEncoder::~AACEncoder(void)" (??1AACEncoder@mediakit@@UAE@XZ)

i think that i build lib have problem. i use gcc command:

./bootstrap
./configure --without-mp4v2 --enable-shared
make
make install
gcc -shared -o libfaac.dll *.o -Wl,--output-def,libfaac.def,--out-implib,libfaac.lib

Heavy glitch when encoding with Main/LTP object type

Hi Krzysztof,

Not sure if you are interested in bug reports for Main/LTP encoding. I saw that the code handling the --obj-type option is wrapped in an #if 0 block.

Nevertheless, here is a sample that yields a heavy glitch in the right channel when encoded with either Main or LTP object type and quality set to 100: sample.zip

The glitch is near the end of the sample and only in the right channel - it's easily audible.

Thanks again for resuming work on the FAAC encoder!

Regards,
Robert

Reporting wrong libfaac version

Running Ubuntu 18.04 LTS. Following the instructions in the INSTALL text file, faac was built and then installed in /usr/local/bin. Running faac then results in the following error:
main.c(507): wrong libfaac version

Note: the version using apt, 1.29, is not installed, but maybe there is a conflict with something else?

Invalid memory address dereference in huffcode (in libfaac/huff2.c:132)

Hi, i found a issue in the FAAC 1.29.9.2, it is crashed by function huffcode .It just cause a Invalid memory address dereference.the details are below(ASAN):

./faac faac_res/unkown_addr_huff2_132  -o out.aac
Freeware Advanced Audio Coder
FAAC 1.29.9.2

Initial quantization quality: 13
Average bitrate: 17 kbps/channel
Bandwidth: 117 Hz
PNS level: 4
Object type: Low Complexity(MPEG-2) + IS + PNS
Container format: Transport Stream (ADTS)
Encoding faac_res/unkown_addr_huff2_132 to out.aac
   frame          | bitrate | elapsed/estim | play/CPU | ETA
ASAN:SIGSEGV
=================================================================
==27218==ERROR: AddressSanitizer: SEGV on unknown address 0x7f1ae4bdfe14 (pc 0x7f1ce49d6ffa bp 0x7ffebb8c3710 sp 0x7ffebb8c3640 T0)
    #0 0x7f1ce49d6ff9 in huffcode /root/faac_asan/faac/libfaac/huff2.c:132
    #1 0x7f1ce49d873a in huffbook /root/faac_asan/faac/libfaac/huff2.c:409
    #2 0x7f1ce49d4be6 in qlevel /root/faac_asan/faac/libfaac/quantize.c:282
    #3 0x7f1ce49d4ff8 in BlocQuant /root/faac_asan/faac/libfaac/quantize.c:312
    #4 0x7f1ce49c838e in faacEncEncode /root/faac_asan/faac/libfaac/frame.c:586
    #5 0x4057cf in main /root/faac_asan/faac/frontend/main.c:1071
    #6 0x7f1ce461082f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #7 0x401968 in _start (/usr/local/faac-asan/bin/faac+0x401968)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /root/faac_asan/faac/libfaac/huff2.c:132 huffcode
==27218==ABORTING

POC FILE:https://github.com/fantasy7082/image_test/blob/master/002_unkown_addr_huff2_132_wav

Introduction of PNS coding breaks Joint Stereo coding

The recent introduction PNS in FAAC 1.29.9 broke Joint Stereo coding (jointmode == JOINT_MS) due to a bad branch.

In quantize.c the else branch in the following code is now executed if book == HCB_ZERO, but it should only be executed for book == HCB_ESC:

    if ((book == HCB_INTENSITY) || (book == HCB_INTENSITY2))
    {
        [...]
    }
    else if (book != HCB_PNS)
    {
        [...]
    }

Here is a sample which shows exceptionally audible artifacts in the right channel due to this: sample.zip

I'll prepare a pull request with a fix.

Reduce memory

  1. I don't found any code use ‘’faacEncStruct.coderInfo.bwpInfo‘’ , remove ‘’bwpInfo‘’ can save about 157KB for each channel.
  2. in function "faacEncEncode()"
if (!hEncoder->sampleBuff[channel])
    hEncoder->sampleBuff[channel] = (double*)AllocMemory(FRAME_LEN*sizeof(double));

tmp = hEncoder->sampleBuff[channel];

hEncoder->sampleBuff[channel]		= hEncoder->nextSampleBuff[channel];
hEncoder->nextSampleBuff[channel]	= hEncoder->next2SampleBuff[channel];
hEncoder->next2SampleBuff[channel]	= hEncoder->next3SampleBuff[channel];
hEncoder->next3SampleBuff[channel]	= tmp;

I think "nextSampleBuff" and "next2SampleBuff" is useless, so change it to this

hEncoder->sampleBuff[channel]		= hEncoder->next3SampleBuff[channel];
hEncoder->next3SampleBuff[channel]	= tmp;

can save 16KB for each channel.

How to read aac file?

Dear,
I could not find the test file, I just want to read aac file,but ..
Could U help me?
Please.
Thx

Invalid memory address dereference in huffcode (in libfaac/huff2.c:184)

Hi, i found a issue in the FAAC 1.29.9.2, it is crashed by function huffcode .It just cause a Invalid memory address dereference.the details are below(ASAN):

./faac faac_res/unkown_addr_huff2_184  -o out.aac
Freeware Advanced Audio Coder
FAAC 1.29.9.2

Initial quantization quality: 50
Average bitrate: 64 kbps/channel
Bandwidth: 5512 Hz
PNS level: 4
Object type: Low Complexity(MPEG-2) + IS + PNS
Container format: Transport Stream (ADTS)
Encoding faac_res/unkown_addr_huff2_184 to out.aac
   frame          | bitrate | elapsed/estim | play/CPU | ETA
ASAN:SIGSEGV
=================================================================
==27224==ERROR: AddressSanitizer: SEGV on unknown address 0x7f46283263a0 (pc 0x7f482811d6b3 bp 0x7fff764d41e0 sp 0x7fff764d4110 T0)
    #0 0x7f482811d6b2 in huffcode /root/faac_asan/faac/libfaac/huff2.c:184
    #1 0x7f482811e7e0 in huffbook /root/faac_asan/faac/libfaac/huff2.c:417
    #2 0x7f482811abe6 in qlevel /root/faac_asan/faac/libfaac/quantize.c:282
    #3 0x7f482811aff8 in BlocQuant /root/faac_asan/faac/libfaac/quantize.c:312
    #4 0x7f482810e38e in faacEncEncode /root/faac_asan/faac/libfaac/frame.c:586
    #5 0x4057cf in main /root/faac_asan/faac/frontend/main.c:1071
    #6 0x7f4827d5682f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #7 0x401968 in _start (/usr/local/faac-asan/bin/faac+0x401968)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /root/faac_asan/faac/libfaac/huff2.c:184 huffcode
==27224==ABORTING

POC FILE:https://github.com/fantasy7082/image_test/blob/master/004_unkown_addr_huff2_184_wav

Invalid memory address dereference in huffcode (in libfaac/huff2.c:115)

Hi, i found a issue in the FAAC 1.29.9.2, it is crashed by function huffcode .It just cause a Invalid memory address dereference.the details are below(ASAN):

 ./faac  faac_res/unkown_addr_huff2_115  -o out.aac
Freeware Advanced Audio Coder
FAAC 1.29.9.2

Initial quantization quality: 20
Average bitrate: 26 kbps/channel
Bandwidth: 115 Hz
PNS level: 4
Object type: Low Complexity(MPEG-2) + IS + PNS
Container format: Transport Stream (ADTS)
Encoding faac_res/unkown_addr_huff2_115 to out.aac
   frame          | bitrate | elapsed/estim | play/CPU | ETA
ASAN:SIGSEGV

=================================================================
==27195==ERROR: AddressSanitizer: SEGV on unknown address 0x7fbf2b1a2b3c (pc 0x7fc12af99c9a bp 0x7ffd4bb3fdb0 sp 0x7ffd4bb3fce0 T0)
    #0 0x7fc12af99c99 in huffcode /root/faac_asan/faac/libfaac/huff2.c:115
    #1 0x7fc12af9b6e7 in huffbook /root/faac_asan/faac/libfaac/huff2.c:405
    #2 0x7fc12af97be6 in qlevel /root/faac_asan/faac/libfaac/quantize.c:282
    #3 0x7fc12af97ff8 in BlocQuant /root/faac_asan/faac/libfaac/quantize.c:312
    #4 0x7fc12af8b38e in faacEncEncode /root/faac_asan/faac/libfaac/frame.c:586
    #5 0x4057cf in main /root/faac_asan/faac/frontend/main.c:1071
    #6 0x7fc12abd382f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #7 0x401968 in _start (/usr/local/faac-asan/bin/faac+0x401968)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /root/faac_asan/faac/libfaac/huff2.c:115 huffcode
==27195==ABORTING

POC FILE:https://github.com/fantasy7082/image_test/blob/master/001_unkown_addr_huff2_115_wav

weird audio artifacts

hi,

encoding the song High Wire by Badlands produces some really strong weird phasing, flattening and sort of click sound, on the vocals, most noticeable when he sings the phrase "love love love" around 45, 121 and 242 seconds (amongst other places) More echo/delay is added to that part of the vocal and it's double tracked.
The FAAC compression makes is sound flat and with really weird artefacts. It sounds like the double tracking is totally lost. Delay too.

using EAC with FAAC 1.30, English, on Win10 x64 with the following settings

--overwrite -q 150 -w -o %dest% --artist "%artist%" --title "%title%" --album "%albumtitle%" --year "%year%" --track "%tracknr3%" --disc "%cdnumber%/%totalcds%" --genre "%genre%" --comment "%comment%" %hascover%--cover-art %coverfile%%hascover% %source%

I can't detect it at all listening to it encoded with FLAC, mp3 or using iTunes. Maybe I do hear something weird around 45sec on the iTunes encoded version, but maybe not totally unnatural.

here's a link to faac aac, itunes aac, and flac copies of the file
https://1drv.ms/u/s!AsK3c06abHHFg8wJjQg1Ys1VOTC2yQ?e=qqoLmb

installation error

Hello
I am getting this error while installing.
can you help?

u0_a257@localhost ~> cd ./faac/
u0_a257@localhost ~/faac (master)> ./bootstrap
configure.ac:17: installing './compile'
configure.ac:19: installing './config.guess'
configure.ac:19: installing './config.sub'
configure.ac:4: installing './install-sh'
configure.ac:4: installing './missing'
frontend/Makefile.am: installing './depcomp'
configure.ac:6: warning: 'AM_CONFIG_HEADER': this macro is obsolete.
configure.ac:6: You should use the 'AC_CONFIG_HEADERS' macro instead.
/home/builder/.termux-build/autoconf/src/lib/autoconf/general.m4:2434: AC_DIAGNOSE is expanded from...
aclocal.m4:9806: AM_CONFIG_HEADER is expanded from...
configure.ac:6: the top level
configure.ac:19: warning: The macro AM_PROG_LIBTOOL' is obsolete. configure.ac:19: You should run autoupdate. aclocal.m4:123: AM_PROG_LIBTOOL is expanded from... configure.ac:19: the top level configure.ac:44: warning: The macro AC_HEADER_STDC' is obsolete.
configure.ac:44: You should run autoupdate.
/home/builder/.termux-build/autoconf/src/lib/autoconf/headers.m4:704: AC_HEADER_STDC is expanded from...
configure.ac:44: the top level
configure.ac:53: warning: The macro AC_HEADER_TIME' is obsolete. configure.ac:53: You should run autoupdate. /home/builder/.termux-build/autoconf/src/lib/autoconf/headers.m4:743: AC_HEADER_TIME is expanded from... configure.ac:53: the top level configure.ac:61: warning: AC_OUTPUT should be used without arguments. configure.ac:61: You should run autoupdate. u0_a257@localhost ~/faac (master)> ./configure checking for a BSD-compatible install... /data/data/com.termux/files/usr/bin/install -c checking whether build environment is sane... yes checking for a race-free mkdir -p... /data/data/com.termux/files/usr/bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether the compiler supports GNU C... yes checking whether gcc accepts -g... yes checking for gcc option to enable C11 features... none needed checking whether gcc understands -c and -o together... yes checking whether make supports the include directive... yes (GNU style) checking dependency style of gcc... gcc3 checking for g++... g++ checking whether the compiler supports GNU C++... yes checking whether g++ accepts -g... yes checking for g++ option to enable C++11 features... none needed checking dependency style of g++... gcc3 checking build system type... armv8l-unknown-linux-gnueabi checking host system type... armv8l-unknown-linux-gnueabi checking how to print strings... printf checking for a sed that does not truncate output... /data/data/com.termux/files/usr/bin/sed checking for grep that handles long lines and -e... /data/data/com.termux/files/usr/bin/grep checking for egrep... /data/data/com.termux/files/usr/bin/grep -E checking for fgrep... /data/data/com.termux/files/usr/bin/grep -F checking for ld used by gcc... /data/data/com.termux/files/usr/bin/ld checking if the linker (/data/data/com.termux/files/usr/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /data/data/com.termux/files/usr/bin/nm -B checking the name lister (/data/data/com.termux/files/usr/bin/nm -B) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 32768 checking how to convert armv8l-unknown-linux-gnueabi file names to armv8l-unknown-linux-gnueabi format... func_convert_file_noop checking how to convert armv8l-unknown-linux-gnueabi file names to toolchain format... func_convert_file_noop checking for /data/data/com.termux/files/usr/bin/ld option to reload object files... -r checking for file... file checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for dlltool... no checking how to associate runtime and link libraries... printf %s\n checking for ar... ar checking for archiver @FILE support... @ checking for strip... strip checking for ranlib... ranlib checking command to parse /data/data/com.termux/files/usr/bin/nm -B output from gcc object... ok checking for sysroot... no checking for a working dd... /data/data/com.termux/files/usr/bin/dd checking how to truncate binary pipes... /data/data/com.termux/files/usr/bin/dd bs=4096 count=1 checking for mt... no checking if : is a manifest tool... no checking for stdio.h... yes checking for stdlib.h... yes checking for string.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for strings.h... yes checking for sys/stat.h... yes checking for sys/types.h... yes checking for unistd.h... yes checking for sys/time.h... yes checking for dlfcn.h... yes checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... yes checking for gcc option to produce PIC... -fPIC -DPIC checking if gcc PIC flag -fPIC -DPIC works... yes checking if gcc static flag -static works... no checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/data/data/com.termux/files/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking how to run the C++ preprocessor... g++ -E checking for ld used by g++... /data/data/com.termux/files/usr/bin/ld checking if the linker (/data/data/com.termux/files/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/data/data/com.termux/files/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC -DPIC checking if g++ PIC flag -fPIC -DPIC works... yes checking if g++ static flag -static works... no checking if g++ supports -c -o file.o... yes checking if g++ supports -c -o file.o... (cached) yes checking whether the g++ linker (/data/data/com.termux/files/usr/bin/ld) supports shared libraries... yes checking dynamic linker characteristics... (cached) GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking for getopt.h... yes checking for immintrin.h... no checking for gcc options needed to detect all undeclared functions... -fno-builtin checking whether strcasecmp is declared... yes checking for getopt_long in -lgnugetopt... no checking for windres... no checking whether byte ordering is bigendian... no checking for egrep... (cached) /data/data/com.termux/files/usr/bin/grep -E checking for special C compiler options needed for large files... no checking for _FILE_OFFSET_BITS value needed for large files... 64 checking for stdint.h... (cached) yes checking for inttypes.h... (cached) yes checking for mathf.h... no checking for float.h... yes checking whether strchr is declared... yes checking whether memcpy is declared... yes checking whether strsep is declared... yes checking for sys/time.h... (cached) yes checking for off_t... yes checking for in_port_t... yes checking for socklen_t... yes checking for fpos_t.__pos... no checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating common/Makefile config.status: creating libfaac/Makefile config.status: creating libfaac/faac.pc config.status: creating frontend/Makefile config.status: creating include/Makefile config.status: creating Makefile config.status: creating config.h config.status: executing depfiles commands config.status: executing libtool commands u0_a257@localhost ~/faac (master)> make make all-recursive make[1]: Entering directory '/data/data/com.termux/files/home/faac' Making all in include make[2]: Entering directory '/data/data/com.termux/files/home/faac/include' make[2]: Nothing to be done for 'all'. make[2]: Leaving directory '/data/data/com.termux/files/home/faac/include' Making all in libfaac make[2]: Entering directory '/data/data/com.termux/files/home/faac/libfaac' /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I../include -fvisibility=hidden -O2 -Wall -fexceptions -MT libfaac_la-bitstream.lo -MD -MP -MF .deps/libfaac_la-bitstream.Tpo -c -o libfaac_la-bitstream.lo test -f 'bitstream.c' || echo './'bitstream.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../include -fvisibility=hidden -O2 -Wall -fexceptions -MT libfaac_la-bitstream.lo -MD -MP -MF .deps/libfaac_la-bitstream.Tpo -c bitstream.c -fPIC -DPIC -o .libs/libfaac_la-bitstream.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../include -fvisibility=hidden -O2 -Wall -fexceptions -MT libfaac_la-bitstream.lo -MD -MP -MF .deps/libfaac_la-bitstream.Tpo -c bitstream.c -o libfaac_la-bitstream.o >/dev/null 2>&1 mv -f .deps/libfaac_la-bitstream.Tpo .deps/libfaac_la-bitstream.Plo /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I../include -fvisibility=hidden -O2 -Wall -fexceptions -MT libfaac_la-fft.lo -MD -MP -MF .deps/libfaac_la-fft.Tpo -c -o libfaac_la-fft.lo test -f 'fft.c' || echo './'fft.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../include -fvisibility=hidden -O2 -Wall -fexceptions -MT libfaac_la-fft.lo -MD -MP -MF .deps/libfaac_la-fft.Tpo -c fft.c -fPIC -DPIC -o .libs/libfaac_la-fft.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../include -fvisibility=hidden -O2 -Wall -fexceptions -MT libfaac_la-fft.lo -MD -MP -MF .deps/libfaac_la-fft.Tpo -c fft.c -o libfaac_la-fft.o >/dev/null 2>&1 mv -f .deps/libfaac_la-fft.Tpo .deps/libfaac_la-fft.Plo /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I../include -fvisibility=hidden -O2 -Wall -fexceptions -MT libfaac_la-frame.lo -MD -MP -MF .deps/libfaac_la-frame.Tpo -c -o libfaac_la-frame.lo test -f 'frame.c' || echo './'frame.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../include -fvisibility=hidden -O2 -Wall -fexceptions -MT libfaac_la-frame.lo -MD -MP -MF .deps/libfaac_la-frame.Tpo -c frame.c -fPIC -DPIC -o .libs/libfaac_la-frame.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../include -fvisibility=hidden -O2 -Wall -fexceptions -MT libfaac_la-frame.lo -MD -MP -MF .deps/libfaac_la-frame.Tpo -c frame.c -o libfaac_la-frame.o >/dev/null 2>&1 mv -f .deps/libfaac_la-frame.Tpo .deps/libfaac_la-frame.Plo /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I../include -fvisibility=hidden -O2 -Wall -fexceptions -MT libfaac_la-blockswitch.lo -MD -MP -MF .deps/libfaac_la-blockswitch.Tpo -c -o libfaac_la-blockswitch.lo test -f 'blockswitch.c' || echo './'blockswitch.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../include -fvisibility=hidden -O2 -Wall -fexceptions -MT libfaac_la-blockswitch.lo -MD -MP -MF .deps/libfaac_la-blockswitch.Tpo -c blockswitch.c -fPIC -DPIC -o .libs/libfaac_la-blockswitch.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../include -fvisibility=hidden -O2 -Wall -fexceptions -MT libfaac_la-blockswitch.lo -MD -MP -MF .deps/libfaac_la-blockswitch.Tpo -c blockswitch.c -o libfaac_la-blockswitch.o >/dev/null 2>&1 mv -f .deps/libfaac_la-blockswitch.Tpo .deps/libfaac_la-blockswitch.Plo /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I../include -fvisibility=hidden -O2 -Wall -fexceptions -MT libfaac_la-util.lo -MD -MP -MF .deps/libfaac_la-util.Tpo -c -o libfaac_la-util.lo test -f 'util.c' || echo './'util.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../include -fvisibility=hidden -O2 -Wall -fexceptions -MT libfaac_la-util.lo -MD -MP -MF .deps/libfaac_la-util.Tpo -c util.c -fPIC -DPIC -o .libs/libfaac_la-util.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../include -fvisibility=hidden -O2 -Wall -fexceptions -MT libfaac_la-util.lo -MD -MP -MF .deps/libfaac_la-util.Tpo -c util.c -o libfaac_la-util.o >/dev/null 2>&1 mv -f .deps/libfaac_la-util.Tpo .deps/libfaac_la-util.Plo /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I../include -fvisibility=hidden -O2 -Wall -fexceptions -MT libfaac_la-channels.lo -MD -MP -MF .deps/libfaac_la-channels.Tpo -c -o libfaac_la-channels.lo test -f 'channels.c' || echo './'channels.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../include -fvisibility=hidden -O2 -Wall -fexceptions -MT libfaac_la-channels.lo -MD -MP -MF .deps/libfaac_la-channels.Tpo -c channels.c -fPIC -DPIC -o .libs/libfaac_la-channels.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../include -fvisibility=hidden -O2 -Wall -fexceptions -MT libfaac_la-channels.lo -MD -MP -MF .deps/libfaac_la-channels.Tpo -c channels.c -o libfaac_la-channels.o >/dev/null 2>&1 mv -f .deps/libfaac_la-channels.Tpo .deps/libfaac_la-channels.Plo /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I../include -fvisibility=hidden -O2 -Wall -fexceptions -MT libfaac_la-filtbank.lo -MD -MP -MF .deps/libfaac_la-filtbank.Tpo -c -o libfaac_la-filtbank.lo test -f 'filtbank.c' || echo './'filtbank.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../include -fvisibility=hidden -O2 -Wall -fexceptions -MT libfaac_la-filtbank.lo -MD -MP -MF .deps/libfaac_la-filtbank.Tpo -c filtbank.c -fPIC -DPIC -o .libs/libfaac_la-filtbank.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../include -fvisibility=hidden -O2 -Wall -fexceptions -MT libfaac_la-filtbank.lo -MD -MP -MF .deps/libfaac_la-filtbank.Tpo -c filtbank.c -o libfaac_la-filtbank.o >/dev/null 2>&1 mv -f .deps/libfaac_la-filtbank.Tpo .deps/libfaac_la-filtbank.Plo /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I../include -fvisibility=hidden -O2 -Wall -fexceptions -MT libfaac_la-tns.lo -MD -MP -MF .deps/libfaac_la-tns.Tpo -c -o libfaac_la-tns.lo test -f 'tns.c' || echo './'tns.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../include -fvisibility=hidden -O2 -Wall -fexceptions -MT libfaac_la-tns.lo -MD -MP -MF .deps/libfaac_la-tns.Tpo -c tns.c -fPIC -DPIC -o .libs/libfaac_la-tns.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../include -fvisibility=hidden -O2 -Wall -fexceptions -MT libfaac_la-tns.lo -MD -MP -MF .deps/libfaac_la-tns.Tpo -c tns.c -o libfaac_la-tns.o >/dev/null 2>&1 mv -f .deps/libfaac_la-tns.Tpo .deps/libfaac_la-tns.Plo /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I../include -fvisibility=hidden -O2 -Wall -fexceptions -MT libfaac_la-quantize.lo -MD -MP -MF .deps/libfaac_la-quantize.Tpo -c -o libfaac_la-quantize.lo test -f 'quantize.c' || echo './'quantize.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../include -fvisibility=hidden -O2 -Wall -fexceptions -MT libfaac_la-quantize.lo -MD -MP -MF .deps/libfaac_la-quantize.Tpo -c quantize.c -fPIC -DPIC -o .libs/libfaac_la-quantize.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../include -fvisibility=hidden -O2 -Wall -fexceptions -MT libfaac_la-quantize.lo -MD -MP -MF .deps/libfaac_la-quantize.Tpo -c quantize.c -o libfaac_la-quantize.o >/dev/null 2>&1 mv -f .deps/libfaac_la-quantize.Tpo .deps/libfaac_la-quantize.Plo /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I../include -fvisibility=hidden -O2 -Wall -fexceptions -MT libfaac_la-huff2.lo -MD -MP -MF .deps/libfaac_la-huff2.Tpo -c -o libfaac_la-huff2.lo test -f 'huff2.c' || echo './'huff2.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../include -fvisibility=hidden -O2 -Wall -fexceptions -MT libfaac_la-huff2.lo -MD -MP -MF .deps/libfaac_la-huff2.Tpo -c huff2.c -fPIC -DPIC -o .libs/libfaac_la-huff2.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../include -fvisibility=hidden -O2 -Wall -fexceptions -MT libfaac_la-huff2.lo -MD -MP -MF .deps/libfaac_la-huff2.Tpo -c huff2.c -o libfaac_la-huff2.o >/dev/null 2>&1 mv -f .deps/libfaac_la-huff2.Tpo .deps/libfaac_la-huff2.Plo /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I../include -fvisibility=hidden -O2 -Wall -fexceptions -MT libfaac_la-huffdata.lo -MD -MP -MF .deps/libfaac_la-huffdata.Tpo -c -o libfaac_la-huffdata.lo test -f 'huffdata.c' || echo './'huffdata.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../include -fvisibility=hidden -O2 -Wall -fexceptions -MT libfaac_la-huffdata.lo -MD -MP -MF .deps/libfaac_la-huffdata.Tpo -c huffdata.c -fPIC -DPIC -o .libs/libfaac_la-huffdata.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../include -fvisibility=hidden -O2 -Wall -fexceptions -MT libfaac_la-huffdata.lo -MD -MP -MF .deps/libfaac_la-huffdata.Tpo -c huffdata.c -o libfaac_la-huffdata.o >/dev/null 2>&1 mv -f .deps/libfaac_la-huffdata.Tpo .deps/libfaac_la-huffdata.Plo /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I../include -fvisibility=hidden -O2 -Wall -fexceptions -MT libfaac_la-stereo.lo -MD -MP -MF .deps/libfaac_la-stereo.Tpo -c -o libfaac_la-stereo.lo test -f 'stereo.c' || echo './'stereo.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../include -fvisibility=hidden -O2 -Wall -fexceptions -MT libfaac_la-stereo.lo -MD -MP -MF .deps/libfaac_la-stereo.Tpo -c stereo.c -fPIC -DPIC -o .libs/libfaac_la-stereo.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../include -fvisibility=hidden -O2 -Wall -fexceptions -MT libfaac_la-stereo.lo -MD -MP -MF .deps/libfaac_la-stereo.Tpo -c stereo.c -o libfaac_la-stereo.o >/dev/null 2>&1 mv -f .deps/libfaac_la-stereo.Tpo .deps/libfaac_la-stereo.Plo /bin/sh ../libtool --tag=CC --mode=link gcc -fvisibility=hidden -O2 -Wall -fexceptions -no-undefined -o libfaac.la -rpath /usr/local/lib libfaac_la-bitstream.lo libfaac_la-fft.lo libfaac_la-frame.lo libfaac_la-blockswitch.lo libfaac_la-util.lo libfaac_la-channels.lo libfaac_la-filtbank.lo libfaac_la-tns.lo libfaac_la-quantize.lo libfaac_la-huff2.lo libfaac_la-huffdata.lo libfaac_la-stereo.lo -lm libtool: link: gcc -shared -fPIC -DPIC .libs/libfaac_la-bitstream.o .libs/libfaac_la-fft.o .libs/libfaac_la-frame.o .libs/libfaac_la-blockswitch.o .libs/libfaac_la-util.o .libs/libfaac_la-channels.o .libs/libfaac_la-filtbank.o .libs/libfaac_la-tns.o .libs/libfaac_la-quantize.o .libs/libfaac_la-huff2.o .libs/libfaac_la-huffdata.o .libs/libfaac_la-stereo.o -lm -O2 -Wl,-soname -Wl,libfaac.so.0 -o .libs/libfaac.so.0.0.0 libtool: link: (cd ".libs" && rm -f "libfaac.so.0" && ln -s "libfaac.so.0.0.0" "libfaac.so.0") libtool: link: (cd ".libs" && rm -f "libfaac.so" && ln -s "libfaac.so.0.0.0" "libfaac.so") libtool: link: ar cr .libs/libfaac.a libfaac_la-bitstream.o libfaac_la-fft.o libfaac_la-frame.o libfaac_la-blockswitch.o libfaac_la-util.o libfaac_la-channels.o libfaac_la-filtbank.o libfaac_la-tns.o libfaac_la-quantize.o libfaac_la-huff2.o libfaac_la-huffdata.o libfaac_la-stereo.o libtool: link: ranlib .libs/libfaac.a libtool: link: ( cd ".libs" && rm -f "libfaac.la" && ln -s "../libfaac.la" "libfaac.la" ) make[2]: Leaving directory '/data/data/com.termux/files/home/faac/libfaac' Making all in common make[2]: Entering directory '/data/data/com.termux/files/home/faac/common' make[3]: Entering directory '/data/data/com.termux/files/home/faac/common' make[3]: Nothing to be done for 'all-am'. make[3]: Leaving directory '/data/data/com.termux/files/home/faac/common' make[2]: Leaving directory '/data/data/com.termux/files/home/faac/common' Making all in frontend make[2]: Entering directory '/data/data/com.termux/files/home/faac/frontend' depbase=echo main.o | sed 's|[^/]$|.deps/&|;s|.o$||';\ gcc -DHAVE_CONFIG_H -I. -I.. -I../include -O2 -Wall -fexceptions -MT main.o -MD -MP -MF $depbase.Tpo -c -o main.o main.c &&\ mv -f $depbase.Tpo $depbase.Po depbase=echo input.o | sed 's|[^/]$|.deps/&amp;|;s|.o$||';\ gcc -DHAVE_CONFIG_H -I. -I.. -I../include -O2 -Wall -fexceptions -MT input.o -MD -MP -MF $depbase.Tpo -c -o input.o input.c &&\ mv -f $depbase.Tpo $depbase.Po depbase=echo mp4write.o | sed 's|[^/]*$|.deps/&|;s|.o$||'`;
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -O2 -Wall -fexceptions -MT mp4write.o -MD -MP -MF $depbase.Tpo -c -o mp4write.o mp4write.c &&
mv -f $depbase.Tpo $depbase.Po
/bin/sh ../libtool --tag=CC --mode=link gcc -O2 -Wall -fexceptions -o faac main.o input.o mp4write.o ../libfaac/libfaac.la -lm
libtool: link: gcc -O2 -Wall -fexceptions -o .libs/faac main.o input.o mp4write.o ../libfaac/.libs/libfaac.so -lm -Wl,-rpath -Wl,/usr/local/lib
make[2]: Leaving directory '/data/data/com.termux/files/home/faac/frontend'
make[2]: Entering directory '/data/data/com.termux/files/home/faac'
make[2]: Leaving directory '/data/data/com.termux/files/home/faac'
make[1]: Leaving directory '/data/data/com.termux/files/home/faac'
u0_a257@localhost ~/faac (master)> make install
Making install in include
make[1]: Entering directory '/data/data/com.termux/files/home/faac/include'
make[2]: Entering directory '/data/data/com.termux/files/home/faac/include'
make[2]: Nothing to be done for 'install-exec-am'.
/data/data/com.termux/files/usr/bin/mkdir -p '/usr/local/include'
mkdir: cannot create directory ‘/usr’: Read-only file system
make[2]: *** [Makefile:335: install-includeHEADERS] Error 1
make[2]: Leaving directory '/data/data/com.termux/files/home/faac/include'
make[1]: *** [Makefile:452: install-am] Error 2
make[1]: Leaving directory '/data/data/com.termux/files/home/faac/include'
make: *** [Makefile:399: install-recursive] Error 1
u0_a257@localhost ~/faac (master) [2]>

High quality VBR can easily exceed standard limit, break playback on iPhones

Hi.
There is a flaw in how the encoder decides what is needed for an AAC stream for complex sequences when the VBR quality is above 1000 that it can exceed the bitrate above the 264/288 standard limits per channel, making some tracks unplayable on some portables like the iPhone. It's a bit counter-intuitive that soft, noisy sequences (such as at the end of a track) can raise the bit rate all the way up to 800 kbps, whereas loud sequences remain moderated and lower.

At the very least, there ought to be an option to cap the outgoing rate to the standard limits.

Thanks for all of your efforts so far.

Sample with heavy distortion at default settings (and up to ~160kbps)

Here's a sample that exhibits heavy distortion after encoding with FAAC at default settings (faac original.wav) and even up to ~160kbps (faac -b 160 original.wav): sample.zip

The ZIP contains the original sample (the first 2 seconds of Mariah Carey's song Migrate) and the .wav after encoding and decoding at FAAC's default settings.

Looking at the waveforms in Audacity, it's obvious that the distortions come from the energy suddenly dropping significantly for durations of 1-2 frames.

These drops do not seem to be regular compression artifacts, but look like being caused by a bug in the encoder.

I reproduced this using my custom built FAAC.dll in fre:ac and verified using the faac.exe from RareWares to rule out a build/compile issue.

Would be great if someone could have a look at this.

Invalid memory address dereference in huffcode (in libfaac/huff2.c:217)

Hi, i found a issue in the FAAC 1.29.9.2, it is crashed by function huffcode .It just cause a Invalid memory address dereference.the details are below(ASAN):

./faac faac_res/unkown_addr_huff2_217  -o out.aac
Freeware Advanced Audio Coder
FAAC 1.29.9.2

Initial quantization quality: 50
Average bitrate: 64 kbps/channel
Bandwidth: 5512 Hz
PNS level: 4
Object type: Low Complexity(MPEG-2) + IS + PNS
Container format: Transport Stream (ADTS)
Encoding faac_res/unkown_addr_huff2_217 to out.aac
   frame          | bitrate | elapsed/estim | play/CPU | ETA
ASAN:SIGSEGV
=================================================================
==27227==ERROR: AddressSanitizer: SEGV on unknown address 0x7fed449de850 (pc 0x7fef447d5ad3 bp 0x7ffe2d8ee530 sp 0x7ffe2d8ee460 T0)
    #0 0x7fef447d5ad2 in huffcode /root/faac_asan/faac/libfaac/huff2.c:217
    #1 0x7fef447d682c in huffbook /root/faac_asan/faac/libfaac/huff2.c:421
    #2 0x7fef447d2be6 in qlevel /root/faac_asan/faac/libfaac/quantize.c:282
    #3 0x7fef447d2ff8 in BlocQuant /root/faac_asan/faac/libfaac/quantize.c:312
    #4 0x7fef447c638e in faacEncEncode /root/faac_asan/faac/libfaac/frame.c:586
    #5 0x4057cf in main /root/faac_asan/faac/frontend/main.c:1071
    #6 0x7fef4440e82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #7 0x401968 in _start (/usr/local/faac-asan/bin/faac+0x401968)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /root/faac_asan/faac/libfaac/huff2.c:217 huffcode
==27227==ABORTING

POC FILE:https://github.com/fantasy7082/image_test/blob/master/005_unkown_addr_huff2_217_wav

apostrophes show up as � in the encoded file's id3 tag

apostrophes show up as � in the encoded file's id3 tag

using EAC with FAAC 1.30, English, on Win10 x64 with the following settings

--overwrite -q 150 -w -o %dest% --artist "%artist%" --title "%title%" --album "%albumtitle%" --year "%year%" --track "%tracknr3%" --disc "%cdnumber%/%totalcds%" --genre "%genre%" --comment "%comment%" %hascover%--cover-art %coverfile%%hascover% %source%

encoding with different codecs, all other things being equal, didn't have the same issue

example file

https://1drv.ms/u/s!AsK3c06abHHFg8wJjQg1Ys1VOTC2yQ?e=qqoLmb

            \aac faac with EAC\03 Jade’s Song.m4a

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.