Commit Graph
12 Commits
Author SHA1 Message Date
BFlat 5feecb679f Merge pull request #2403 from vangel76/opusenc-fft-radix
opusenc: radix-2/3/4 FFT kernels for the MDCT
2026-10-30 00:10:45 +07:00
BFlat 2ad5a5d124 Merge pull request #2404 from vangel76/opusenc-decimator-sums
opusenc: eight partial sums in the 48 kHz decimator
2026-10-30 00:09:12 +07:00
Dylan M. Taylor 7c27d88030 Refactor opusenc for strict Clippy checks 2026-10-28 06:09:21 +00:00
aiongg be942e5776 refactor(opusenc): move src/silk/mod.rs to src/silk.rs 2026-10-26 21:49:10 +00:00
vangel76andClaude Sonnet 5.5 611ffcb841 opusenc: eight partial sums in the 48 kHz decimator
The decimator computed each output as one sequential f32 dot product over
167 taps, which is bound by the 4-cycle latency of the float addition. Use
eight independent partial sums (combined pairwise) so the compiler can
vectorise the loop.

This changes the input of the SILK encoder at rounding level, so the
bitstream differs from before; decoded quality and size are unchanged to
within noise (see the PR for SNR, segmental SNR and size at several
bitrates). A test checks the dot product against an f64 reference.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 12:24:45 +01:00
vangel76andClaude Sonnet 5.5 9c1f8bfa41 opusenc: radix-2/3/4 FFT kernels for the MDCT
Every FFT stage was a generic DFT butterfly: p * p complex multiplications
per butterfly (16 for radix 4) and a modulo on every twiddle index. Add
kiss_fft-style kernels for radix 2, 3 and 4 (three twiddle multiplications
and eight additions for radix 4, a sqrt(3)/2 constant for radix 3, +-j done
by swapping parts). The generic butterfly stays for radix 5, which occurs
once per transform, with its roots precomputed. The modulo is dropped: the
twiddle index q * k * tw_stride is always below n.

The results differ from before at f32 rounding level, so a few packets
change on speech and hybrid input (CELT music stays byte-identical). A new
test checks the FFT against a direct DFT for every radix combination up to
the 480-point frame size.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 12:14:10 +01:00
aiongg 0173abde8c CI: dev-profile gate, one test binary per crate, nextest, line tables only (#2235)
* Dev profile: line tables only for workspace crates, no debug info for dependencies

* xtask ci: dev-profile gate, nextest, tests without examples, wasm --keep-going

* One integration-test binary per crate

* xtask ci: run effectcraft-gpu's shared-device tests in one cargo test process

* xtask ci: run every stage and report all failures

* xtask ci: name the stage type (clippy type_complexity)

* xtask ci: run every test pass and report all failures

* cargo fmt
2026-10-23 12:59:51 -04:00
Dexter 39e6907b5f G2: improve editing reliability and Windows rendering fidelity 2026-10-06 00:00:31 -05:00
Brandon ThomasandClaude Opus 5.5 5cc376a818 Never crash: Opus and VP9 encoders without expect()
opusenc: the SILK state is used through if-let / let-else instead of expect("SILK state").
vp9enc: the motion-search SAD and inter prediction return early without a reference frame
instead of expect("reference"). Denies the panic lints in both crates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 13:23:06 -04:00
Brandon ThomasandClaude Opus 5.5 374d21e6a5 M13.4: opus extreme-input tests, SILK doc
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 09:23:03 -04:00
Brandon ThomasandClaude Opus 5.5 3eeba31c43 M13.4: opus SILK (NB/MB/WB, mid/side stereo) and hybrid (SWB/FB) modes
Application/Mode/Bandwidth API with OpusEncoder::with_application and
with_mode; SILK analysis-by-synthesis encoder mirroring the decoder's
fixed-point reconstruction with noise feedback, LTP, NLSF quantisation and
per-frame rate control; hybrid CELT from band 17 in the shared range coder;
pre-skip 120 in every mode. Oracle tests against filmcraft-opus and ffmpeg
(native opus + libopus).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 09:16:07 -04:00
Brandon ThomasandClaude Opus 5.5 b936ed0055 OUT-2: Opus (CELT) encoder (effectcraft-opusenc)
New L0 crate effectcraft-opusenc: clean-room RFC 6716 CELT-only encoder
(fullband 48 kHz, 20 ms packets, mono/stereo as dual L/R stereo, constant
packet size from the bitrate) with the RFC 7845 OpusHead and pre-skip.
Forward low-overlap MDCT, inter/intra coarse energy, fine/final energy,
the decoder's exact allocation, recursive band splitting, PVQ search and
codeword indexing, silence frames.

crates/export depends on it; filmcraft-opus (dev) is the round-trip oracle
in tests/opus_roundtrip.rs, with ffmpeg reading an in-test Ogg Opus file
as a second oracle when installed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 21:41:29 -04:00