Sync the Rosella filterbank choice into the plugin and the fork

The kernel can now render the Rosella path through either bank; expose
that choice in both front ends with the same values and the same
default.

- plugin: joc-rosella-filterbank = 1|2 (public|captured); unset means
  the kernel default (the public bank), and it applies only to
  joc-hrtf-source=rosella, logging a warning otherwise
- fork: --ad-joc-rosella-filterbank, the same values and default; it
  sits in the ad_joc option group, so it is read only when ad_joc
  decodes a Rosella model
- log the bank actually selected (public|captured) on both paths
- add a bank-2 case to tools/verify_parity.ps1
- document the key in both READMEs and the example config

Checked: the plugin builds, the option parser covers the numeric and
named spellings plus invalid values, and for both banks the plugin's
PCM is bit-identical to joc_cli with --rosella-filterbank 1|2.
This commit is contained in:
TheM14 committed 2026-10-31 02:29:23 +08:00
1 parent a9cbffa1cf
commit ecf14d8c32
12 files changed
+64

No files matched your search

+13
View File
@@ -66,6 +66,9 @@ const struct m_sub_options ad_joc_conf = {
{"layout", OPT_STRING(layout), .flags = M_OPT_FILE},
{"mode", OPT_CHOICE(binaural_mode,
{"near", 1}, {"far", 2}, {"mid", 3})},
{"rosella-filterbank", OPT_CHOICE(rosella_filterbank,
{"1", 1}, {"public", 1},
{"2", 2}, {"captured", 2})},
{"gain-db", OPT_DOUBLE(gain_db), M_RANGE(-60.0, 12.0)},
{"int24", OPT_BOOL(int24)},
{0}
@@ -77,6 +80,7 @@ const struct m_sub_options ad_joc_conf = {
.hrtf = "",
.layout = "7.1",
.binaural_mode = 3,
.rosella_filterbank = 0,
.gain_db = 0.0,
},
};
@@ -790,6 +794,15 @@ static struct mp_decoder *create(struct mp_filter *parent,
cfg.input = JOC_STREAM_IN_EAC3;
cfg.output = binaural ? JOC_STREAM_OUT_BINAURAL : JOC_STREAM_OUT_SPEAKER;
cfg.binaural_mode = (uint32_t)opts->binaural_mode;
/* 0 is the kernel's default (the public bank); a SOFA or .jochrtf input
* ignores the field, so say so instead of leaving the option a no-op. */
cfg.rosella_filterbank = (uint32_t)opts->rosella_filterbank;
if (binaural && hrtf_kind != HRTF_ROSELLA && opts->rosella_filterbank != 0)
MP_WARN(da, "--ad-joc-rosella-filterbank only applies to a Rosella "
"(.personalized_headphone) HRTF; ignoring it\n");
if (binaural && hrtf_kind == HRTF_ROSELLA)
MP_VERBOSE(da, "rosella filterbank: %s\n",
opts->rosella_filterbank == 2 ? "captured" : "public");
cfg.gain_db = opts->gain_db;
cfg.object_delay_samples = 1473;
if (binaural) {