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.
This commit is contained in:
TheM14 committed 2026-10-31 02:28:07 +08:00
1 parent d3c9818409
commit b566c364df
16 files changed
+759 -23

No files matched your search

+12 -3
View File
@@ -39,7 +39,7 @@
#define JOC_ABI_VERSION 5u
#define JOC_FRAME_PARAMS_VERSION 1u
#define JOC_EMDF_INFO_VERSION 1u
#define JOC_TASK_CONFIG_VERSION 3u
#define JOC_TASK_CONFIG_VERSION 4u
#define JOC_TASK_RESULT_VERSION 2u
#define JOC_EVENT_VERSION 1u
@@ -82,7 +82,7 @@ enum {
JOC_BINAURAL_QMF_BANDS = 64,
JOC_BINAURAL_HYBRID_BANDS = 77,
JOC_QMF_HOP_SAMPLES = 64,
JOC_BINAURAL_LATENCY_SAMPLES = 961,
JOC_BINAURAL_LATENCY_SAMPLES = 961, /* SOFA/.jochrtf and Rosella bank 1 */
JOC_LFE_DELAY_SAMPLES = 1217
};
@@ -366,6 +366,15 @@ typedef enum joc_hrtf_cache_policy {
JOC_HRTF_CACHE_DISK = 2 /* compile, reuse and write <cache_dir>/<name>.jochrtf */
} joc_hrtf_cache_policy;
/* Which 64-QMF / 77-hybrid filterbank the Rosella .personalized_headphone path
* renders through. The two banks differ in coefficients, hybrid tap count,
* high-band slot delay and total latency, so they are not interchangeable; the
* SOFA and .jochrtf paths always use JOC_ROSELLA_FILTERBANK_PUBLIC. */
typedef enum joc_rosella_filterbank {
JOC_ROSELLA_FILTERBANK_PUBLIC = 1, /* 13-tap hybrid, 6-slot delay, 961 samples */
JOC_ROSELLA_FILTERBANK_CAPTURED = 2 /* 11-tap hybrid, 3-slot delay, 448 samples */
} joc_rosella_filterbank;
enum { JOC_TASK_F_SKIP_SHA256 = 1u, JOC_TASK_F_KEEP_INTERMEDIATE = 2u,
JOC_TASK_F_QUIET = 4u, JOC_TASK_F_METADATA_ONLY = 8u };
@@ -423,7 +432,7 @@ typedef struct joc_task_config {
const char* personalized_headphone_path; /* Rosella .personalized_headphone input */
const char* hrtf_cache_dir; /* disk policy directory */
uint32_t hrtf_cache_policy; /* joc_hrtf_cache_policy */
uint32_t reserved0;
uint32_t rosella_filterbank; /* joc_rosella_filterbank; 0 = PUBLIC */
double hrtf_radius_m; /* SOFA measurement-radius shell */
} joc_task_config;
+1 -1
View File
@@ -63,7 +63,7 @@ typedef struct joc_stream_config {
uint32_t object_delay_samples; /* default 1473 */
double gain_db; /* default 0 */
uint32_t native_threads;
uint32_t reserved;
uint32_t rosella_filterbank; /* joc_rosella_filterbank; Rosella input, 0 = PUBLIC */
/* Binaural HRTF input, the same three shapes joc_task_config accepts: when
* hrtf_sofa_path is set the library compiles it with hrtf_cache_policy /
* hrtf_cache_dir / hrtf_radius_m and hrtf_path is unused; when