AminetAminet
Search:
85764 packages online
• About
• Recent
• Browse
• Search
• Upload
• Setup
• Services

util/libs/faad2.lha

Mirror:Random
Showing: ppc-morphos icongeneric icon
No screenshot available
Short:AAC/HE-AAC decoder library + SDK
Author:FAAD2 team (M. Bakker, knik0 et al.), Matthias Muench (Port)
Uploader:faad2 amigaworld de (Matthias Muench)
Type:util/libs
Version:2.11.4
Architecture:m68k-amigaos >= 3.0.0
Date:2026-11-02
Requires:68020+ (fixed) or 68020+ with FPU (fpu)
Distribution:Aminet
Download:util/libs/faad2.lha - View contents
Readme:util/libs/faad2.readme
Downloads:80

faad2.library 2.11.4
====================

faad2.library is a port of FAAD2 2.11.4, the free AAC decoder
(https://github.com/knik0/faad2), as an AmigaOS 3.x shared library.
It decodes the formats used by internet radio stations, podcasts and
MP4/M4A files:

  * AAC-LC, HE-AAC (SBR), HE-AACv2 (PS), LTP, LD, ER
    (AAC Main in the fpu variant only)
  * ADTS, ADIF and MP4 containers (MP4 via the faad command)

The library offers the complete libfaad API (NeAACDec...), so existing
libfaad code usually works unchanged. It is reentrant: any number of
tasks may decode at the same time. Every decoder runs on its own
private stack, so callers do not need a large task stack.

This archive contains everything: the libraries, the command line
decoder and the developer files (headers, static libfaad.a, example).


Which variant?
--------------

  fpu     floating point decoder with hand optimised FPU assembler.
          For every 68k with FPU: 68020/030 + 68881/68882, 68040,
          68060, 68080 (Vampire V4/V4SA). Best sound quality.

  fixed   fixed point decoder for 68020-68060 without FPU
          (68020/030, 68LC040, 68LC060/EC060, Vampire V2).
          Contains two codes and picks the right one when loaded:
          native 64 bit multiplication + assembler for 68020-68040 and
          68080, C code for the 68060 (which lacks 64 bit muls.l in
          hardware). Force a choice with SetEnv FAAD2_CPU 68060 / 68020.

Rule of thumb: if your machine has an FPU, use fpu, otherwise fixed.
Since FAAD2 2.11.4 both are about equally accurate; on the 68080
fpu is faster for HE-AAC.


Installation
------------

Copy ONE of the two libraries to LIBS:

  Copy faad2/Libs/fpu/faad2.library LIBS:
or
  Copy faad2/Libs/fixed/faad2.library LIBS:

Optionally copy the matching command line decoder to C:

  Copy faad2/C/fpu/faad C:

"Version faad2.library FULL" shows which variant is installed. The
fixed point variant needs mathieeedoubbas.library (in ROM).


Speed
-----

Vampire V4 Standalone (Apollo 68080, ~93 MHz), 20 s of audio via
faad2.library, without file output:

  Stream                        fixed           fpu
  AAC-LC 128 kbit/s stereo      5.8 s (3.5x)    6.0 s (3.3x)
  HE-AAC 48 kHz stereo         17.2 s (1.2x)   13.4 s (1.5x)
  HE-AACv2 48 kHz              18.8 s (1.1x)   13.1 s (1.5x)

Real internet radio (fpu): AAC-LC 192 kbit/s 2.6x, HE-AAC 64 kbit/s
1.6x, HE-AACv2 48 kbit/s 1.5x real time.


For programmers
---------------

SDK/ contains the include files (proto, inline, clib, pragmas, fd,
lvo, neaacdec.h), the SFD, the static libfaad.a of both variants and
an example.

The library functions are identical to libfaad's neaacdec.h
(NeAACDecOpen, NeAACDecInit, NeAACDecDecode, ...). Include
<proto/faad2.h>, open "faad2.library" version 2 and existing libfaad
code usually works unchanged. Every decoder runs on its own private
stack (default 128 KB, NeAACDecSetStackSize() changes it), so your
program needs no large stack. Handles are reentrant per task.

In the directory SDK:

  GCC:       m68k-amigaos-gcc -noixemul -Iinclude examples/example.c
  VBCC/SAS:  include/pragmas/faad2_pragmas.h, or generate stubs from
             include/fd/faad2_lib.fd or sfd/faad2_lib.sfd

examples/example.c is a complete decoder using the library.

Static linking (bebbo GCC, libnix):

  lib/fixed/libfaad.a   fixed point, runs on 68020-68060 without FPU.
                        Contains a 68020-68040/68080 code and a 68060
                        code and picks the right one at run time.

      m68k-amigaos-gcc -noixemul -m68020 -O2 -o prog prog.c \
          -Iinclude lib/fixed/libfaad.a -lm

  lib/fpu/libfaad.a     floating point with FPU assembler, any 68k with
                        FPU (68881/68882, 68040, 68060, 68080).

      m68k-amigaos-gcc -noixemul -m68020 -m68881 -O2 -o prog prog.c \
          -Iinclude lib/fpu/libfaad.a -lm

libfaad needs up to ~96 KB of stack (HE-AACv2) when linked
statically, e.g. unsigned long __stack = 256 * 1024;


Changes in FAAD2 2.11.4
-----------------------

  * The fixed point decoder now really performs the SBR envelope
    adjustment (FAAD2 bug fix): HE-AAC and HE-AACv2 sound as good as
    with the fpu variant (69 dB / 46 dB against ffmpeg, before 33 dB
    / 15 dB). It needs ~10 % more CPU time for HE-AAC than before.
  * Mono streams now decode to ONE channel (before: duplicated to
    stereo). HE-AACv2 in ADTS, typical for radio streams, starts as
    mono (NeAACDecInit reports 1 channel) and switches to 2 channels
    when PS data appears. Programs must use
    NeAACDecFrameInfo.channels of every decoded frame and size buffers
    for the maximum - see README.amiga.md, "Changes in FAAD2 2.11.4".
  * mp4AudioSpecificConfig has a new last field ps_present_flag.
    faad2.library fills only the 2.11.3 part of the structure, so
    programs built with the old headers stay safe; ps_present_flag is
    filled by the static libfaad.a only.
  * HE-AACv2 in MP4 is recognised correctly, PNS fix, the faad
    command trims MP4 files gaplessly.

Older programs keep working with the new library; it stays
compatible with programs built with the 2.11.3 headers.


Skipping SBR (Amiga extension)
------------------------------

On slow machines HE-AAC can be decoded without SBR - only the AAC core,
at half the rate, for a fraction of the CPU time:

  cfg->dontUpSampleImplicitSBR = 2;   /* before NeAACDecInit/Init2 */

HE-AACv2 then comes out as mono (one channel). For MP4 files that
signal HE-AAC explicitly (object type 5 or 29), pass NeAACDecInit2 a
two byte AudioSpecificConfig that only describes the AAC-LC core.
Values 0 and 1 behave as in upstream FAAD2. An older library treats 2
like 1 and keeps decoding SBR - check the sample rate of the first
decoded frame.
Details in README.amiga.md, "Skipping SBR".


Tested
------

Tested on real hardware only on a Vampire V4 Standalone (68080,
Kickstart 3.2.1): output is bit-exact (fixed) or within 1 LSB (fpu)
compared to FAAD2 on x86-64, no memory leaks. The 68060 code of the
fixed variant was tested in an emulator only. Nothing has been tested
on real 68020/030/040/060 CPUs yet - reports are welcome.


Contents
--------

  faad2/Libs/fixed/faad2.library   fixed point library
  faad2/Libs/fpu/faad2.library     FPU library
  faad2/C/fixed/faad               command line decoder, fixed point
  faad2/C/fpu/faad                 command line decoder, FPU
  faad2/SDK/include/               neaacdec.h, proto/, inline/, clib/,
                                   pragmas/, fd/, lvo/
  faad2/SDK/lib/fixed/libfaad.a    static library, fixed point
  faad2/SDK/lib/fpu/libfaad.a      static library, FPU
  faad2/SDK/sfd/faad2_lib.sfd      interface description
  faad2/SDK/examples/example.c     example program
  faad2/README.amiga.md            full documentation
  faad2/faad2.readme               this file
  faad2/COPYING                    GNU GPL v2


History
-------

2.11.4 (1.10.2026)  update to FAAD2 2.11.4; since 1.11.2026 library and
                    SDK come in this one archive (before: separate
                    -lib and -sdk archives), the binaries are unchanged
2.11.3 (28.9.2026)  first release


License
-------

FAAD2 is licensed under the GNU GPL v2 or later; so are faad2.library,
libfaad.a and every program using them. Commercial use of AAC may
require patent licenses.


Contents of util/libs/faad2.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
drwxr-xr-x  1000/1000        0       0 ****** -lhd- 0000 Nov  1 08:42 faad2/
drwxr-xr-x  1000/1000        0       0 ****** -lhd- 0000 Nov  1 08:42 faad2/C/
drwxr-xr-x  1000/1000        0       0 ****** -lhd- 0000 Nov  1 08:42 faad2/C/fixed/
-rwxr-xr-x  1000/1000   311482  525832  59.2% -lh5- ac05 Nov  1 08:42 faad2/C/fixed/faad
drwxr-xr-x  1000/1000        0       0 ****** -lhd- 0000 Nov  1 08:42 faad2/C/fpu/
-rwxr-xr-x  1000/1000   189185  295056  64.1% -lh5- b885 Nov  1 08:42 faad2/C/fpu/faad
-rw-r--r--  1000/1000     7095   18272  38.8% -lh5- bb86 Nov  1 08:42 faad2/COPYING
drwxr-xr-x  1000/1000        0       0 ****** -lhd- 0000 Nov  1 08:42 faad2/Libs/
drwxr-xr-x  1000/1000        0       0 ****** -lhd- 0000 Nov  1 08:42 faad2/Libs/fixed/
-rw-r--r--  1000/1000   279978  465632  60.1% -lh5- 3b69 Nov  1 08:42 faad2/Libs/fixed/faad2.library
drwxr-xr-x  1000/1000        0       0 ****** -lhd- 0000 Nov  1 08:42 faad2/Libs/fpu/
-rw-r--r--  1000/1000   156374  236152  66.2% -lh5- 1c5d Nov  1 08:42 faad2/Libs/fpu/faad2.library
drwxr-xr-x  1000/1000        0       0 ****** -lhd- 0000 Nov  1 08:42 faad2/SDK/
drwxr-xr-x  1000/1000        0       0 ****** -lhd- 0000 Nov  1 08:42 faad2/SDK/examples/
-rw-r--r--  1000/1000     2179    5367  40.6% -lh5- d963 Nov  1 08:42 faad2/SDK/examples/example.c
drwxr-xr-x  1000/1000        0       0 ****** -lhd- 0000 Nov  1 08:42 faad2/SDK/include/
drwxr-xr-x  1000/1000        0       0 ****** -lhd- 0000 Nov  1 08:42 faad2/SDK/include/clib/
-rw-r--r--  1000/1000      699    1980  35.3% -lh5- b08d Nov  1 08:42 faad2/SDK/include/clib/faad2_protos.h
drwxr-xr-x  1000/1000        0       0 ****** -lhd- 0000 Nov  1 08:42 faad2/SDK/include/fd/
-rw-r--r--  1000/1000      392     940  41.7% -lh5- 7c64 Nov  1 08:42 faad2/SDK/include/fd/faad2_lib.fd
drwxr-xr-x  1000/1000        0       0 ****** -lhd- 0000 Nov  1 08:42 faad2/SDK/include/inline/
-rw-r--r--  1000/1000      905    3863  23.4% -lh5- 43d1 Nov  1 08:42 faad2/SDK/include/inline/faad2.h
drwxr-xr-x  1000/1000        0       0 ****** -lhd- 0000 Nov  1 08:42 faad2/SDK/include/lvo/
-rw-r--r--  1000/1000      284     713  39.8% -lh5- 71c7 Nov  1 08:42 faad2/SDK/include/lvo/faad2_lib.i
-rw-r--r--  1000/1000     2642    8733  30.3% -lh5- eb9f Nov  1 08:42 faad2/SDK/include/neaacdec.h
drwxr-xr-x  1000/1000        0       0 ****** -lhd- 0000 Nov  1 08:42 faad2/SDK/include/pragmas/
-rw-r--r--  1000/1000      804    4589  17.5% -lh5- b6ff Nov  1 08:42 faad2/SDK/include/pragmas/faad2_pragmas.h
drwxr-xr-x  1000/1000        0       0 ****** -lhd- 0000 Nov  1 08:42 faad2/SDK/include/proto/
-rw-r--r--  1000/1000      342     734  46.6% -lh5- fb59 Nov  1 08:42 faad2/SDK/include/proto/faad2.h
drwxr-xr-x  1000/1000        0       0 ****** -lhd- 0000 Nov  1 08:42 faad2/SDK/lib/
drwxr-xr-x  1000/1000        0       0 ****** -lhd- 0000 Nov  1 08:42 faad2/SDK/lib/fixed/
-rw-r--r--  1000/1000   294059  498412  59.0% -lh5- 0671 Nov  1 08:42 faad2/SDK/lib/fixed/libfaad.a
drwxr-xr-x  1000/1000        0       0 ****** -lhd- 0000 Nov  1 08:42 faad2/SDK/lib/fpu/
-rw-r--r--  1000/1000   162337  249656  65.0% -lh5- a5ae Nov  1 08:42 faad2/SDK/lib/fpu/libfaad.a
drwxr-xr-x  1000/1000        0       0 ****** -lhd- 0000 Nov  1 08:42 faad2/SDK/sfd/
-rw-r--r--  1000/1000      623    1820  34.2% -lh5- 2050 Nov  1 08:42 faad2/SDK/sfd/faad2_lib.sfd
[Amiga]                   3331    7746  43.0% -lh5- 835b Nov  1 11:57 faad2/faad2.readme
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total        37 files 1412711 2325497  60.7%            Nov  2 01:13
Page generated in 0.04 seconds
Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>