Commit Graph
17 Commits
Author SHA1 Message Date
TheM14 8372c1160c Bump foo_input_joc to 0.6.4 and sync the vendored kernel to 1.3.4
build / windows (push) Waiting to run
- Bump JOC_VERSION to 0.6.4.
- Bed channel table: Tfl/Tfr, Tsl/Tsr and Tbl/Tbr take x = -1 / +1 with Y =
  1 / 0 / -1, Lw/Rw take Y = 21/31, and LFE/LFE2 stay at the origin.
- bed_channel_q15 converts with the 32768 full scale and rounds instead of
  truncating, so half-step positions (16384, 5285) come out exact.
- layout_bed_anchor resolves a bed channel by its own index instead of passing
  its name through standard_from_internal, which had swapped the side/rear
  anchors of 7.1.x/9.1.x and the top front/back anchors of 9.1.6.
- 5.1, 5.1.2 and 5.1.4 keep their single surround pair at the rear corners
  (Y = 32767) instead of Y = 16384.
- Report kernel 1.3.4 and component 0.6.4; the notices and READMEs that name
  the vendored version follow.
2026-11-18 19:53:47 +08:00
TheM14 b52b384145 Bump component to 0.6.2 and add Dolby Dialnorm loudness control
build / windows (push) Canceled after 0s
build / release (push) Canceled after 0s
- Bump JOC_VERSION to 0.6.2.
- Add a "Dolby Dialnorm loudness (-31 dBFS)" preference switch.
- Persist the setting as dialnorm and allow JOC_DIALNORM to override it.
- Apply -target_level -31 only to the ffmpeg-decoded 5.1 E-AC-3 core; leave
  the 7-channel core and ordinary PCM takeover paths unchanged.
- Remove stale SOFA measurement-set wording from the READMEs.
- Rebuild and deploy both x86 and x64 components.
2026-11-12 14:53:32 +08:00
TheM14 b0751d82b6 Add ffmpeg PCM and non-JOC E-AC-3/TrueHD takeover
build / windows (push) Canceled after 0s
build / release (push) Canceled after 0s
- Add the take_over_pcm preference, persistence and input registration.
- Decode takeover sources with ffmpeg to 48 kHz float32 and feed the kernel
  PCM_LAYOUT stream for binaural output.
- Keep JOC priority: bare E-AC-3/EC3 and MP4/Matroska/WebM are probed first,
  then non-JOC audio falls back to ffmpeg.
- Cover AC3, DTS/DTS-HD, WavPack, APE, TTA, MPC, AU/SND/CAF and TrueHD/MLP;
  TrueHD in containers follows the same fallback.
- Sync the kernel to 1.3.3 with the virtual_speaker module and fix the PCM
  gain path.
- Update the preferences UI, HRTF hint and README.
2026-11-12 14:32:45 +08:00
TheM14 5c0f9ea2ff Sync the 1.3.1 kernel and read the stream until its first JOC frame
build / windows (push) Canceled after 0s
build / release (push) Canceled after 0s
The kernel copy follows JustOneCacophonyCXX 1.3.1: a frame without JOC metadata
mid-stream now holds the previous matrices instead of switching to the core
planes, which removes the clicks the 6.0 kernels produced on encoders that drop
the JOC metadata for single frames.

resolve_bed_channels() called ReadFile once and scanned that single chunk.  A
read returns only the bytes that are available (a pipe hands over a partial
chunk), and an encoder may leave the first audio frames without JOC metadata,
so the first JOC frame could sit past the window.  The scan then fell back to 6
bed channels, and the first JOC frame (joc_dmx_config_idx=1, 8 channels) was
rejected with core_channel_count_mismatch.  The scan now reads 64 KiB chunks
until the first syncframe carrying the JOC EMDF container is seen, keeps the
trailing partial frame between reads, and rewinds the stream as before; the
container path and the bare-file path both use it.

Bump the component version to 0.6.1, and pin the kernel notices to 1.3.1.

Verified with the offline harness: the reported GNR M4A now reports
"joc_dmx_config_idx=1 -> 8 bed channel(s)" and decodes the whole track (8906
frames), and the Smooth Criminal opening no longer steps at the two frames
without metadata (6.016 s and 7.328 s).
2026-11-10 15:35:32 +08:00
TheM14 b0ce3a162f Sync the kernel copy with the truncated JOC payload fix
build / windows (push) Canceled after 0s
build / release (push) Canceled after 0s
The kernel copy follows JustOneCacophonyCXX abce846 (version 1.3.0).  An ID14
payload that ends inside joc_data is now a frame status (7) instead of a
stream error, so the renderer holds the previous matrices and playback
continues; the file task counts those frames and the stream status struct
gains an appended truncated_joc_frames field that joc_stream_status()
accepts in both struct sizes.  The nine kernel files are byte-identical to
the upstream checkout again, and the component needs no code change because
the fix lives inside the vendored kernel.

README, THIRD_PARTY_NOTICES, the kernel project and the CI comment now pin
the copy to abce846 (version 1.3.0).

Built Release-Static|x64.  The offline test tools build and pass, and
render_harness decodes the reported M4A to the end: 8 channels, 13,441,536
samples (8751 frames), peak 0.742114365, byte-identical to the fixed core
CLI output.
2026-11-10 00:08:19 +08:00
TheM14 defe9538fe Sync the kernel copy with the OAMD frame-level core
The kernel copy follows the new kernel. The renderer has a frame-level state
machine (normal, hold, hard cut and passthrough, the 8-plane passthrough, the
LFE clipgain ramp and interpolation when no previous state exists), the OAMD
parser carries the complete frame state (several blocks, more than 16 objects)
and the speaker renderer applies the metadata (gain and inactive flags,
zone/elevation, size, snap, divergence, ISF and bed distribution). oamd_math and
oamd_params are new modules, the ISF tables are compiled in now that the
upstream data/ directory is gone, and the binaural timeline accepts a complete
frame state. joc_core.h moves to ABI 6 (frame parameters and EMDF payload info
at v2, JOC_FRAME_STATUS_*, raw 5-bit offset_ts) and eac3joc_core.h to EJOC ABI 4
(EJOC_FRAME_STATUS_*, ejoc_frame_input v1, ejoc_renderer_render_frame,
EJOC_CORE_OUT_CHANNELS and EJOC_LFE_SLOT; the old ejoc_renderer_process stays).
joc_stream.h and joc_version.h are unchanged.

joc_kernel.vcxproj lists the two new translation units and the four new
headers. The component's layout table gains the kernel's 6.0 layout (L R Ls Rs
Lrs Rrs) after 9.1.6, and layout_table_test expects twelve layouts, so the list
the preferences page shows and the list the renderer accepts are the same
again. README, THIRD_PARTY_NOTICES and the CI comment pin the copy to commit
3f0d5e87fe41b90d9350528d2dca2ca82a637a3f; tag v1.2.0 points at the older
a276028 and is not the sync baseline.

Builds Release-Static|x64 and |Win32 with no errors. The offline test tools
build and pass on both architectures: layout_table_test reports 12 layouts, and
channel_swap_test, log_rotation_test and long_path_test pass. scan_crosscheck
agrees with the core on the upstream test material, and the render harness
delivers 7.1.4 speaker output and binaural output on both architectures, with
the speaker-path WAV byte-identical between them.

The core is still vendored under kernel/; building it from the upstream
checkout at build time is a separate change.
2026-11-08 16:11:57 +08:00
TheM14 43b16687cc Add a side/rear channel swap for speaker output
build / windows (push) Canceled after 0s
build / release (push) Canceled after 0s
Some receivers and players expect the side pair (Ls/Rs) where the renderer puts
the rear pair (Lrs/Rrs) and the other way round, and the layouts here follow the
reference table, so the delivered PCM cannot match both. The new preference does
the reorder on the way out: Ls with Lrs, Rs with Rrs, everything else untouched.

Which channels to move is decided by name in the layout table, not by channel
count. 7.1, 7.1.2, 7.1.4, 9.1.4 and 9.1.6 carry both pairs; 5.1.2 and 5.1.4 fill
the last two slots with top channels and are left alone, and a layout that has no
rear pair makes the swap a no-op. The decoder only enables it when the layout the
core rendered is the one being delivered, so a binaural stream is never touched.

The reorder happens once per read, before the float32 and the forced int24
delivery branch, so both formats carry it and the peak and clip accounting see the
same samples as before. Decoding, object positions, the layout table and the
rendering itself are unchanged.

channel_swap_test checks the layout selection, the reorder, its inverse and the
int24 packing order. The render harness gained --swap-side-rear and the text fit
check now measures the new label in both languages.

Verified on a 7.1 render: only channels 5-8 change, 5<->7 and 6<->8 byte-exactly,
with float32 and int24 alike; a 5.1.2 render is identical with the switch on.
2026-11-01 23:53:54 +08:00
TheM14 b43ee8f685 Sync the kernel copy with the bed layout map and the stream path
build / windows (push) Canceled after 0s
build / release (push) Canceled after 0s
2026-10-30 04:20:06 +08:00
TheM14 9dca991e03 Deliver the renderer's channel order with the host's channel map
build / windows (push) Canceled after 0s
build / release (push) Canceled after 0s
2026-10-29 01:02:56 +08:00
TheM14 dc3372be27 Support the two 4.0 layouts and localize the preferences page
build / windows (push) Has been cancelled
build / release (push) Has been cancelled
2026-10-27 23:51:57 +08:00
TheM14 0b9f3321fd Support speaker layouts up to 9.1.6 and deliver their channel masks
build / windows (push) Has been cancelled
build / release (push) Has been cancelled
2026-10-25 00:15:02 +08:00
TheM14 2cfebe914d Support JOC downmix configurations 0..4 and update the vendored kernel
build / windows (push) Has been cancelled
build / release (push) Has been cancelled
2026-10-16 19:56:00 +08:00
TheM14 5c3083b11c Add forced 24-bit output (int24) for the delivered samples
build / windows (push) Has been cancelled
build / release (push) Has been cancelled
2026-10-14 17:34:29 +08:00
TheM14 89508a372a Bound the diagnostic log and cut the per-file scan noise
build / windows (push) Has been cancelled
build / release (push) Has been cancelled
2026-09-29 18:44:14 +08:00
TheM14 65f56990aa Fix missing tags, broken seeking, and the x64 playback crash
build / windows (push) Has been cancelled
build / release (push) Has been cancelled
2026-09-26 03:14:02 +08:00
TheM14 188cb9ebfb Fix JOC detection inside mp4/mkv containers
build / windows (push) Has been cancelled
build / release (push) Has been cancelled
2026-09-25 20:10:08 +08:00
TheM14 ad62a914e6 Init foo_input_joc
build / windows (push) Has been cancelled
2026-09-25 17:07:04 +08:00