Commit Graph
5 Commits
Author SHA1 Message Date
TheM14 a8a40c2d20 Correct the bed channel positions, the bed anchor order and the 5.1 surrounds
ci / macos-latest (push) Waiting to run
ci / windows-latest (push) Waiting to run
ci / ubuntu-latest (push) Failing after 15s
- Put the height row of the bed channel table on the ADM 62-level grid:
  Tfl/Tfr, Tsl/Tsr and Tbl/Tbr take x = -0.516113 / 0.516113 (Q15 7928 /
  24840) with Y = 1 / 0 / -1 instead of the older (-0.5, 0.5, 1) values, and
  Lw/Rw take Y = 21/31 (Q15 5285) instead of 0.5; LFE and LFE2 take the same
  non-spatial entries as the ADM label table.
- Scale bed_channel_q15 by 32768 and round instead of truncating, so the
  half-step positions come out exact (16384, 7928, 24840, 5285).
- Anchor a bed channel to its same-named speaker by that channel's own index:
  channel_names shares the internal order of the region speaker ids, so the
  extra standard_from_internal lookup swapped the side/rear anchors of
  7.1.x/9.1.x and the top front/top back anchors of 9.1.6.
- Keep the single surround pair of 5.1, 5.1.2 and 5.1.4 at the rear corners
  (Y = 32767) instead of Y = 16384.
- Refresh the 5.1 gain expectations in the core tests for the moved surround
  pair; the new values match the Python reference bit for bit.
2026-11-18 17:05:52 +08:00
TheM14 0bb82e4115 Port the OAMD metadata rendering and the frame-level JOC core
ci / ubuntu-latest (push) Failing after 19s
ci / macos-latest (push) Canceled after 0s
ci / windows-latest (push) Canceled after 0s
ci / release (push) Canceled after 0s
The JOC bitstream reports a per-frame parse status instead of treating every
anomaly as an exception: an unsupported downmix configuration, a clamped
object count, an unknown parameter-band count, bad offset_ts values and
trailing bytes each get their own status. The raw 5-bit offset_ts values are
kept as coded and validated to be strictly increasing per object, and the
clipgain uses 2^(x-4) * (1 + y/32).

The JOC core gains a frame-level state machine. It keeps the per-object
previous matrix and its presence marker, the seq counter, the 8-plane
passthrough history, the LFE clipgain ramp start and the previous actual
core-channel count. Normal, hold, hard-cut and passthrough frames are
distinguished: a frame without a previous state interpolates per the
data-point rules, an object that disappears keeps publishing a zero matrix,
a frame without metadata passes the 8 core planes through to slots 0..7 with
the 1217-sample delay, and a declared core-channel-count change hard-cuts and
clears the LFE ring while the clipgain ramp state is kept. The core LFE
applies the full clipgain as a sample-wise ramp before its delay.

The OAMD parser exposes the full frame state: every object's state in every
position block, the programme assignment and the trim element, with multiple
blocks and up to 30 declared objects accepted. The speaker renderer applies
this state: per-block gain/inactive, zone/elevation, the size kernel, snap,
divergence, element 5 refinement, the priority size budget, ISF basis
matrices and bed channel distribution, scheduled on the 32-sample metadata
grid with block alignment and gain ramps. The size kernel, ISF basis
assembly, bed routing and compensation are computed in oamd_math from the
speaker layout geometry; bed labels and reference positions derive from the
layout tables. The six ISF configurations and twelve layout descriptors are
compiled in as static tables (oamd/isf_tables.h); the JSON loader and the
configure-time embedding are gone. The layout tables gain 6.0, and the layout
lookup, bed map and trim probe follow.

The binaural position timeline consumes the full frame state as well: every
position block is scheduled at its own offset and ramp, and its track list
grows with the declared object count, so multi-block and over-16-object
programmes are rendered instead of rejected. The JOC binaural input stays one
LFE plus fifteen object sources; the extra tracks are followed but not
panned.

The file task and the stream parse the full state for speaker and binaural,
while the ADM export keeps the 15-track single-block view. The public headers
carry the new status values, the frame-level entry point and the raw offset_ts
description; the internal ABI versions go to 6 (joc_core), 2 (frame params and
EMDF info) and 4 (eac3joc).

ctest covers the frame-level core (clipgain formula and LFE ramp, offset_ts
validation, frame statuses, the 8-plane passthrough, the seq state machine and
the no-previous-state interpolation), the OAMD parser state, the compiled-in
ISF tables and the binaural timeline. The READMEs and the mathematical notes
describe the 6.0 layout, the frame state machine, the metadata application and
the ISF lookup tables.
2026-11-08 14:04:21 +08:00
TheM14 c8d2b09357 Remove the 4.0 Surround layout and make 4.0 the quad layout 2026-10-29 00:52:17 +08:00
TheM14 d2d6ac0e6f Add the 4.0 Surround and 4.0 Quad speaker layouts to the kernel
ci / ubuntu-latest (push) Failing after 14s
ci / macos-latest (push) Has been cancelled
ci / windows-latest (push) Has been cancelled
ci / release (push) Has been cancelled
2026-10-27 23:44:51 +08:00
TheM14 42d6da6302 Initial pure C++ implementation
ci / ubuntu-latest (push) Failing after 13s
ci / macos-latest (push) Has been cancelled
ci / windows-latest (push) Has been cancelled
2026-09-25 04:17:30 +08:00