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.
This commit is contained in:
1 parent
5b41868e94
commit
defe9538fe
39 files changed
+6714
-616
No files matched your search
@@ -348,7 +348,7 @@ Status probe_atmos_trim(const std::string& path, std::uint64_t max_frames,
|
||||
continue;
|
||||
}
|
||||
oamd::OamdUpdate update;
|
||||
if (!oamd::parse_id11(bytes.data(), bytes.size(), &update).ok() ||
|
||||
if (!oamd::parse_id11_state(bytes.data(), bytes.size(), &update).ok() ||
|
||||
!update.has_trim) {
|
||||
continue;
|
||||
}
|
||||
@@ -1429,6 +1429,11 @@ Status run(const joc_task_config& raw, const joc_event_sink* sink, joc_task_resu
|
||||
return finalize_with_error(seeded.code(), "render", seeded.message());
|
||||
}
|
||||
speaker.controls_ready = true;
|
||||
// The metadata path needs the programme trim before its own event
|
||||
// arrives; the probe above read it from the leading frames.
|
||||
speaker.trim = initial_trim;
|
||||
speaker.has_trim = true;
|
||||
speaker.raw_trim_mode = initial_trim.global_trim_mode;
|
||||
}
|
||||
bus.emit(JOC_EV_RENDERER_INITIALIZED, JOC_STAGE_RENDER, JOC_LOG_INFO,
|
||||
fmt("speaker renderer: %s, %u channels", speaker.layout.name,
|
||||
@@ -1590,6 +1595,9 @@ Status run(const joc_task_config& raw, const joc_event_sink* sink, joc_task_resu
|
||||
// container that is not this frame's JOC metadata.
|
||||
std::uint64_t missing_joc_frames = 0;
|
||||
std::uint64_t objects_clamped_frames = 0;
|
||||
std::uint64_t bad_parameter_band_frames = 0;
|
||||
std::uint64_t bad_offset_ts_frames = 0;
|
||||
std::uint64_t trailing_data_frames = 0;
|
||||
std::uint64_t extra_container_frames = 0;
|
||||
std::uint64_t chanmap_pair_mismatch_frames = 0;
|
||||
std::uint64_t bed_mask_mismatch_frames = 0;
|
||||
@@ -1660,6 +1668,19 @@ Status run(const joc_task_config& raw, const joc_event_sink* sink, joc_task_resu
|
||||
if (params.objects_clamped != 0u) {
|
||||
++objects_clamped_frames;
|
||||
}
|
||||
switch (params.status) {
|
||||
case JOC_FRAME_STATUS_BAD_PARAMETER_BAND:
|
||||
++bad_parameter_band_frames;
|
||||
break;
|
||||
case JOC_FRAME_STATUS_BAD_OFFSET_TS:
|
||||
++bad_offset_ts_frames;
|
||||
break;
|
||||
case JOC_FRAME_STATUS_TRAILING_DATA:
|
||||
++trailing_data_frames;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
++missing_joc_frames;
|
||||
}
|
||||
@@ -1691,8 +1712,9 @@ Status run(const joc_task_config& raw, const joc_event_sink* sink, joc_task_resu
|
||||
}
|
||||
std::string dsp_error;
|
||||
const Status rebuilt = ::joc::joc::rebuild_objects16(
|
||||
rebuilder, params, bed5.data(), lfe.data(), gain, &objects16,
|
||||
&dsp_error);
|
||||
rebuilder, params, bed5.data(), lfe.data(),
|
||||
static_cast<std::uint32_t>(resolved_core_channels), has_joc, gain,
|
||||
&objects16, &dsp_error);
|
||||
if (!rebuilt.ok()) {
|
||||
return Status::fail(rebuilt.code(), "joc", dsp_error);
|
||||
}
|
||||
@@ -1819,8 +1841,16 @@ Status run(const joc_task_config& raw, const joc_event_sink* sink, joc_task_resu
|
||||
stream_done = true;
|
||||
break;
|
||||
}
|
||||
// The speaker and binaural renderers consume the full per-object
|
||||
// block state (multi-block and every declared object); the ADM
|
||||
// export path keeps the reference's 15-track single-block view.
|
||||
const bool full_metadata_state = speaker_enabled || binaural_enabled;
|
||||
const Status oamd =
|
||||
::joc::oamd::parse_id11(bytes.data(), bytes.size(), &job.update);
|
||||
full_metadata_state
|
||||
? ::joc::oamd::parse_id11_state(bytes.data(), bytes.size(),
|
||||
&job.update)
|
||||
: ::joc::oamd::parse_id11(bytes.data(), bytes.size(),
|
||||
&job.update);
|
||||
if (!oamd.ok()) {
|
||||
failures.record(produced, StageRank::kJoc, oamd.code(), oamd.stage(),
|
||||
"frame " + std::to_string(produced) + ": " +
|
||||
@@ -2166,11 +2196,28 @@ Status run(const joc_task_config& raw, const joc_event_sink* sink, joc_task_resu
|
||||
joiner.shutdown(false);
|
||||
if (missing_joc_frames != 0u) {
|
||||
bus.warning(std::to_string(missing_joc_frames) +
|
||||
" audio frame(s) carried no JOC payload; their object channels stay silent");
|
||||
" audio frame(s) carried no JOC payload; their core PCM was passed "
|
||||
"through (8 core planes, 1217-sample delay)");
|
||||
}
|
||||
if (objects_clamped_frames != 0u) {
|
||||
bus.warning(std::to_string(objects_clamped_frames) +
|
||||
" audio frame(s) declared more than 15 objects; the count was clamped to 15");
|
||||
" audio frame(s) declared more than 15 objects; the count was clamped "
|
||||
"to 15 and the frame took the invalid-frame path");
|
||||
}
|
||||
if (bad_parameter_band_frames != 0u) {
|
||||
bus.warning(std::to_string(bad_parameter_band_frames) +
|
||||
" audio frame(s) declared an unknown JOC parameter-band count; the "
|
||||
"frame took the invalid-frame path");
|
||||
}
|
||||
if (bad_offset_ts_frames != 0u) {
|
||||
bus.warning(std::to_string(bad_offset_ts_frames) +
|
||||
" audio frame(s) carried an invalid JOC offset_ts value; the frame "
|
||||
"took the invalid-frame path");
|
||||
}
|
||||
if (trailing_data_frames != 0u) {
|
||||
bus.warning(std::to_string(trailing_data_frames) +
|
||||
" audio frame(s) carried JOC data after the byte-alignment padding; "
|
||||
"the frame took the invalid-frame path");
|
||||
}
|
||||
if (extra_container_frames != 0u) {
|
||||
bus.warning(std::to_string(extra_container_frames) +
|
||||
|
||||
Reference in new issue
Block a user