This series adds a native AC-4 audio decoder. It is the second link
of a six-series stack that applies in one order with plain `git am`
on master 3e6cd5e: A0 (raw demux params) -> A (this decoder) -> B
(decoder docs/FATE) -> C (encoder) -> E (TS mux) -> D (parser +
MP4). Stack parent: A0 (assumes the carriage fill; decode-to-PCM
needs only this series' two patches, while stream copy and seekable
pts need A0's fill).
Patches:
[PATCH 1/2] avcodec: add native AC-4 decoder core
Decoder engine: bit reader, entropy, IMDCT, QMF, A-SPX, ACPL,
loudness, channel/render logic, static tables (landing as
*_tab.c/h: *_tables.c/h would match libavcodec's generated-tables
CLEANFILES pattern and be deleted by `make clean`). No lavc API
surface yet; in-tree port of the dec-lib snapshot (FFmpeg LGPL
headers + CLI/shim strip, zero behavior edits). Builds inert
under the not-yet-defined CONFIG_AC4_DECODER guard.
[PATCH 2/2] avcodec: wire ff_ac4_decoder
AVCodec wrapper: init/decode/flush/close, re-framed raw input,
drain-per-feed to NEED_MORE, seek as close+reopen, process-wide
lib serialization, S16-only v1, EXPERIMENTAL (decode needs
-strict experimental). Truncated-tail rule: a lone unanchored
framing fails loud at EOF (no-sync diagnostic, zero output).
Private options: pres_sel only (DRC/DE options deleted as
never-working, no reserved surface). First patch exposing
decoder behavior.
Why here: FFmpeg has no AC-4 decoder, and this series has zero
sample dependencies, so it posts without waiting on the samples
mail that gates the FATE-carrying patches (A0's folded M3 tests,
Series B). Minimal reviewable unit before docs/FATE (Series B) and
encoder (Series C) build on it.
Testing:
./ffmpeg -strict experimental -i clip.ac4 -map 0:a out.wav
byte-identical to the dec-lib snapshot it ports (11/11
cmp-identical; pins the port, not an independent reference --
an external output anchor is pending); negative controls loud and
terminating (mid-stream config change, garbage cap, no-bed,
truncated tail); standalone --enable-decoder=ac4 build; ASan/UBSan
clean on decode paths; full make fate green; `make clean`
preserves all committed sources.
FATE: none in this series; decoder tests land in Series B (B2),
which posts only after the samples-request mail is confirmed and
`make fate-rsync` shows ac4/clip-* (+24 h clock). No suite files
needed for this series.
N5 note (rate labels, fix LANDED): the wrapper passes lib rate
labels straight through, now the FIXED output values -- output rate
= base_fs x sf_mult on all fri rows, each internal frame mapped to
Table-70 output counts (e.g. the gpac vector: 48000 Hz with
1601/1602-sample frames, 298 frames = 5727312 bytes; container and
lib timing agree at 48 kHz). The wrapper latches spf from the
get_info max and sizes each frame from its actual count. This series
pins no goldens; Series B FATE goldens are recorded against these
fixed labels.
Provenance: this AC-4 decoder is an independent cleanroom
implementation in C, written from the published ETSI specifications
TS 103 190-1 V1.4.1 and TS 103 190-2 V1.3.1 plus black-box behavioral
observation. No Dolby SDK, reference code, or disassembly was used in
the submitted code; numeric codebook/coefficient tables are
value-only transcriptions from the ETSI deliverables (source
versions cited per table), and comments are original prose (stray
internal pointers folded to table/clause citations in this
re-cut). Note AC-4 is covered by Dolby patents; this submission
addresses copyright-clean code only and implementers/distributors
should consider patent licensing.
Signed-off-by on each patch: Michael Rowlinson <[email protected]>
_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]