Commit Graph
40 Commits
Author SHA1 Message Date
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 886ff036cd Release 0.6.0
build / windows (push) Canceled after 0s
build / release (push) Canceled after 0s
Bump JOC_VERSION to 0.6.0.  The component ships the 1.3.0 kernel (abce846),
which carries the truncated-JOC-payload fix: an ID14 payload that ends inside
joc_data is a frame status (7) instead of a stream error, so the renderer
holds the previous matrices and playback continues; the stream status struct
gains an appended truncated_joc_frames field.  The offline render harness
decodes the reported M4A to the end (8751 frames, 13,441,536 samples) and the
output is byte-identical to the fixed core CLI.

tools/package.ps1 and the workflow's tag check read this define, so the
packages are named foo_input_joc-0.6.0-{x86,x64}.fb2k-component and the
release tag must be v0.6.0.
2026-11-10 00:17:12 +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 5b41868e94 Sync the kernel copy with the warp 2/3 surround fold
build / windows (push) Canceled after 0s
build / release (push) Canceled after 0s
The kernel copy follows the new kernel: the OAMD parser and the speaker
controls accept warp modes 2 and 3, and the renderer pans the 5.1-family and
4.0 layouts in an expanded surround layout before folding the rear pair into
the target. Trim selection, balance and automatic compensation stay with the
final target layout, and the folded result feeds the existing ramp and mix.

Builds Release-Static|x64 and |Win32. layout_table_test and
channel_swap_test still pass; the render harness now renders a warp-3
stream instead of reporting the unimplemented mode.
2026-11-03 13:36:40 +08:00
TheM14 d35f6abe7a Sync the kernel copy with the OAMD warp and trim controls
The kernel copy follows the new kernel: the OAMD parser reads the trim
element, the speaker renderer applies warp, per-object trim and the
front-back balance, and the ADM writer carries them into the BWF metadata.
joc_kernel.vcxproj lists the new speaker_trim translation unit and header,
and the copied joc_version.h reports kernel 1.2.0 in the session log.

The component keeps its playback settings, its speaker layout table and
the side/rear channel swap; the stream interface is unchanged, so the
decoder wrapper needs no edit. A stream whose OAMD asks for warp 2/3 now
stops at the speaker renderer with JOC_ERR_NOT_SUPPORTED, as the reference
refuses it.

Builds Release-Static|x64 and |Win32. layout_table_test and channel_swap_test
still pass; the render harness renders a warp-1 stream and reports the
unimplemented mode for a warp-3 stream.
2026-11-03 13:35:01 +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 a06ffbdcb9 Offer the model file in the HRTF browse dialog
build / windows (push) Canceled after 0s
build / release (push) Canceled after 0s
The page still filtered for *.sofa and titled the dialog for a SOFA file unless
the Rosella radio was selected. Only the model is a user-facing input now, so the
picker offers *.personalized_headphone and is titled for it unconditionally, and
the SOFA radio handler and label call go with the control.
2026-11-01 19:58:41 +08:00
TheM14 5d6c6bc45c Sync the kernel copy and drop the SOFA source choice
build / windows (push) Canceled after 0s
build / release (push) Canceled after 0s
The kernel copy follows the new kernel: the SOFA reader, its compile cache and
the field fit are gone, the compiled-field renderer is jochrtf_renderer.cpp with
jochrtf_runtime.*, and joc_kernel.vcxproj lists the new translation units.

With the Rosella model as the only user-facing input, the preferences page loses
its SOFA radio and the settings drop HrtfSource, hrtf_source,
hrtf_cache_policy, hrtf_cache_dir and hrtf_radius_m. Decoding always sets
personalized_headphone_path, the default lookup is
HRTF\binaural.personalized_headphone, and the page hint names that file alone.
The compiled .jochrtf stays internal: the page names a model file, never a cache.

Builds Release-Static|x64 (foo_input_joc.dll and joc_kernel.lib).
2026-11-01 19:37:51 +08:00
TheM14 b566c364df Sync the kernel copy with the Rosella filterbank changes
build / windows (push) Canceled after 0s
build / release (push) Canceled after 0s
Bring the kernel copy up to the upstream state that adds the captured
Rosella filterbank and the bank selector: bank 1 is the shared public
bank (13 taps / 6 slots, 961 samples), bank 2 is the captured bank
(11 taps / 3 slots, 448 samples). The copy was still at the state
before the filterbank fix, so both upstream changes land here.

- Add src/hrtf/rosella_bank.{h,cpp}, rosella_filterbank.{h,cpp} and
  rosella_filterbank_tables.h, and list them in joc_kernel.vcxproj
- Carry the updated joc_core.h / joc_stream.h, the renderer, the
  stream and task paths, and the kernel CLI's --rosella-filterbank

The host code needs no change: joc_task_config and joc_stream_config
keep their sizes (the reserved word became rosella_filterbank, and the
task config version went 3 -> 4), so src/joc_decode.cpp builds as is.

Checked: joc_kernel.vcxproj builds for Release-Static|x64, and
`diff -rq kernel\src <upstream>\src` plus the include tree are clean.
2026-10-31 02:28:07 +08:00
TheM14 d3c9818409 Sync the kernel copy with the HRTF bed position fixes
build / windows (push) Canceled after 0s
build / release (push) Canceled after 0s
2026-10-30 05:23:35 +08:00
TheM14 30e2654a3e Add the missing bed layout map sources
build / windows (push) Canceled after 0s
build / release (push) Canceled after 0s
2026-10-30 04:25:47 +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 8c7d253d47 Sync the kernel copy with the clipgain fix
build / windows (push) Canceled after 0s
build / release (push) Canceled after 0s
2026-10-28 19:21:39 +08:00
TheM14 7cebf3e22e Sync the kernel copy with the OAMD ramp timing port
build / windows (push) Canceled after 0s
build / release (push) Canceled after 0s
2026-10-28 18:11:57 +08:00
TheM14 ff83912f46 Sync the kernel copy with the dbmd identity rename 2026-10-28 18:11:47 +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 2ed87d1dce Synchronize the joc_decoder version with the upstream repository
build / windows (push) Has been cancelled
build / release (push) Has been cancelled
2026-10-17 00:23:19 +08:00
TheM14 40b0b4b6c4 Sync the kernel with the single-definition error detail
build / windows (push) Has been cancelled
build / release (push) Has been cancelled
2026-10-16 20:26:30 +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 cb840af52f Update the vendored kernel to the temporary path fix
build / windows (push) Has been cancelled
build / release (push) Has been cancelled
2026-10-14 18:08:43 +08:00
TheM14 f0cab2eec5 Update the vendored kernel to the ffmpeg path fix
build / windows (push) Has been cancelled
build / release (push) Has been cancelled
2026-10-14 17:37:17 +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 ce3de51f8f Update the vendored kernel to the JSON writer fix
build / windows (push) Has been cancelled
build / release (push) Has been cancelled
2026-10-09 00:12:41 +08:00
TheM14 49f3a0f040 Update the vendored kernel to the bounded objects16 render-ahead
build / windows (push) Has been cancelled
build / release (push) Has been cancelled
2026-10-06 15:05:35 +08:00
TheM14 4d22797130 Fix 32-bit dropouts: enable AVX2 and bound the render-ahead
build / windows (push) Has been cancelled
build / release (push) Has been cancelled
2026-10-06 02:43:44 +08:00
TheM14 ea30786711 Fix files past MAX_PATH not being claimed or decoded
build / windows (push) Has been cancelled
build / release (push) Has been cancelled
2026-10-01 14:07:34 +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 8f28c69df7 Fix THIRD_PARTY_NOTICES to cover third-party sources only
build / windows (push) Has been cancelled
build / release (push) Has been cancelled
2026-09-28 22:56:02 +08:00
TheM14 8f44bf8a68 Clean up leftover gain assignments in the kernel
build / windows (push) Has been cancelled
build / release (push) Has been cancelled
2026-09-28 19:02:14 +08:00
TheM14 4d8118684f Fix MP4 probe when moov exceeds the window
build / windows (push) Has been cancelled
build / release (push) Has been cancelled
2026-09-27 15:58:23 +08:00
TheM14 bb464b2c03 Fix bed decoded off the E-AC-3 frame grid
build / windows (push) Has been cancelled
build / release (push) Has been cancelled
2026-09-27 14:46:12 +08:00
TheM14 71bec4bda3 Fix band-0 DC filter gating and improve settings UI
build / windows (push) Has been cancelled
build / release (push) Has been cancelled
2026-09-27 01:24:53 +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 259688ef1b Fix doubled Rosella gain and bed DRC decoding
build / windows (push) Has been cancelled
build / release (push) Has been cancelled
2026-09-25 21:23:13 +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