Repository navigation
Conversation
A DiscDirectoryReader whose listing holds VIDEO_TS/ files is now read as DVD-Video instead of Blu-ray. The title-set code of wrapDVD moves into dvdTitleSet, which takes a listing and a way to read one whole file, so an image and a folder share the VMGI filtering, durations, chapters, languages and the selected title's VTS IFO. wrapDVDFolder concatenates the selected title set's VOBs in part order with MultiFileConcatIOReader; that is the same run of bytes as their sectors on a disc, so the cell spans and the VTS time map apply unchanged. A listing without VIDEO_TS/ is read as Blu-ray, as before. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: OpenAI Codex <[email protected]>
… routed) Adds the pieces that rebuild a Profile 7 FEL picture, with nothing selecting them yet. - DoviFelComposer (Metal): rebuilds the 12-bit picture from base layer, enhancement layer and RPU: reshaping curves (polynomial and MMR), inverse NLQ, MMR chroma, bilinear EL upsampling, ordered dither down to 10-bit, output in a pooled P010 buffer, composeAsync bounded at maxFramesInFlight. DoviMetalParams is the parameter ABI, DoviShaderSource the kernels. The output pool survives a seek flush (flush() trims idle buffers, releaseOutputPool() drops it on teardown): dropping it made post-seek frames allocate a second full pool beside the buffers the renderer still held, about +260 MB at 4K for ~0.6 s per seek; measured end to end with the decoder in the next PRs, peak 674 -> 500 MB over 12 seeks. - DoviDisplayMetadata: attaches the Profile 8.1 RPU as DolbyVisionRPUData plus DolbyCompatibilityID (a CFString: a CFNumber aborts the render server). Both keys are undocumented; they are defined in this one file and UndocumentedDolbyVisionKeysTests fails if either literal appears in another source file. - DoviRpuConverter.separateDualLayers splits one packet into base layer, enhancement-layer packet, converted RPU and composer parameters; convertPacketToProfile81 is now that walk with the EL dropped. The RPU attached to composed frames is converted with mode 2 (the composer has already applied the reshaping and added the residual, so the display side must not reshape again); DoviComposedFrameRpuTests pins this. Nothing calls the composer, so no behaviour changes for any source. Public API: none. Not in this PR: the dual-layer decoder, the routing flag and host wiring, the aetherctl tooling, and dolby-vision-fel.md (comments here cite its section numbers; the document arrives with the route PR). Tests: GPU curve sweep, edge cases and adversarial inputs, layout probe (the GPU reads each parameter sub-block back at the offset Swift wrote it), shader/ABI sync, dither, enhancement upsampler, FEL math, FEL and CRC-valid-mutation fuzzers, converter and guard tests, async compose, look-ahead pool sizing. The real-clip tests skip without DV_FEL_TESTS_DIR.
…e dual-layer decoder Four self-contained pieces the dual-layer Profile 7 decoder is built from, none of them wired to anything yet: - HEVCPictureOrderCount: the H.265 picture order count (§8.3.1) of one layer, read from the parameter sets and each picture's first slice segment header. No decoding. Anything it cannot follow (unknown PPS/SPS, truncated header, pictures before the first IRAP) answers nil rather than a guess. - DualLayerPictureAlignment: derives each layer's display slot from its POC and gives each enhancement-layer packet the presentation time of the base-layer picture in the same slot, so a stream whose enhancement layer has B-frames over a base layer without them pairs the right pictures. Falls back to access-unit pairing when a layer's POC is unavailable or the slots disagree by more than 16. - FrameSideDataRing: fixed-capacity (32) ring of per-frame side data keyed by PTS, looked up within +-300 ticks. - OrderedDelivery: hands composed frames across the VideoToolbox / Metal queue boundary in decode order. Also exposes A53SEIParser.unescapeRBSP and parseHVCCParameterSets (DoviRpuConverter+Probe) at module scope, which the POC reader and its test use. No behaviour change: nothing calls these types. Not in this PR: the decoder that uses them, the routing, the docs. Tests: DualLayerPictureAlignmentTests, FrameSideDataRingTests, OrderedDeliveryTests.
libdovi is built panic=abort, so a single panic ends the host process. A CRC-valid but hostile Dolby Vision RPU could reach one on the native Profile 7 -> 8.1 conversion. Adds DoviRpuGuard: it checks the RPU CRC and pre-scans the payload for the inputs that make libdovi 3.4 panic or allocate without bound (linear interpolation pieces, polynomial/MMR mixes that break the writer, pivot and block counts the payload cannot hold, undefined display-management block lengths). The existing paths now check each RPU with it before parsing: the Profile 8.1 conversion in DoviRpuConverter (convertPacketToProfile81), the enhancement-layer-type probe, and the DolbyVisionRecordAudit RPU read. The mode 2 convert -> write pair on a parsed RPU is factored into DoviRpuConverter.convertedUnspec62 so the tests drive production's own entry point. A rejected RPU degrades the frame to the HDR10 base exactly as a libdovi failure already did (superuser404notfound#135). This hardens the existing native 8.1 conversion; it changes no routing and adds no Dolby Vision FEL code. The guard knows the paths listed above; it does not prove there are no others. Tests: DoviRpuGuardTests (crafted RPUs, verdicts, conversion round trip) and a DolbyVisionRecordAudit case. The CRC-valid mutation fuzz and the real-file guard test arrive with the composer, whose parameter walk they also exercise.
…or reordered streams Adds the SampleBufferRenderer pieces the dual-layer Dolby Vision path needs for pacing, as inert, opt-in additions: - felVideoLookaheadFrames (9) and mayEnqueueVideoFrame / setFELLookahead: a gate that runs BEFORE decode and refuses a compressed frame more than nine frame intervals ahead of the playback clock, so composed 4K frames (about 25 MB each) cannot pile up behind Apple's readiness gate alone. - displayOrderPTS: estimates a packet's display-order PTS in decode order from the largest amount a later packet fell below the highest PTS seen, so B-frame streams do not swing the cap with the position in the GOP. A gap larger than HEVC's 16-picture reorder ceiling is treated as a timestamp discontinuity and does not poison the learned lead. Nothing calls the gate yet and it is off unless setFELLookahead(enabled:) is called, so non-FEL pacing is unchanged. The decoder and the host wiring come in later PRs; the composer-side pool sizing that follows this cap (DoviFelComposer.outputPoolAllocationThreshold) is pinned in the composer PR. Tests: SampleBufferRendererLookaheadTests, SampleBufferRendererReorderDepthTests.
…tion Matroska TrueHD reaches the software read-ahead with no packet duration and millisecond timestamps that repeat (0.83 ms frames on a 1/1000 time base). SoftwarePacketCoverage.insert rejects a zero duration, so audio coverage stayed empty, the combined A/V frontier was nil, and no seek ever hit the packet cache: every seek, even back to a spot just played, refetched from the source. Audio arrives in presentation order, so a duration-less packet now proves coverage up to the next packet's timestamp, as long as the gap is at most 0.5 s (a larger one is a hole). Packets with a duration are unchanged. Apple TV 4K, 4K Matroska with TrueHD 7.1 over HTTP, 5 seeks per run: cache hits went from 0/10 to 5/5 in every run; AC-3 and video-only already hit 10/10. The new test fails without the change.
The software path's compressed packet cache was a session file on disk. On an Apple TV 4K (A12) appends to it took 100 to 600 ms while a download ran; the producer holds the store across an append, the demux thread's reads waited behind it (and its own reads stalled up to a second), and video it had already parked reached the decoder late. The layer dropped it. On tvOS the store now lives in memory (SoftwarePacketMemoryFIFO behind a SoftwarePacketStore protocol the disk FIFO also conforms to). Records keep the disk layout in chunks of purgeable VM: unread data stays resident, a chunk the reader has finished is made volatile, so the kernel may reclaim it and it stops counting against the footprint; a seek into reclaimed history is a cache miss and refetches. Bounds: 96 MB forward, 128 MB of played history. AVPlayer keeps its progressive-download cache in memory on tvOS as well. macOS, iOS and visionOS keep the disk store. Apple TV 4K (A12), 4K Dolby Vision title over HTTP, 150 s soaks with 5 seeks: disk store 42/39/22 drops, memory store 0 to 3 in 8 of 9 runs (one run 26, not reproduced), no slow reads left. Peak footprint ~655 MB against ~580 MB with the disk store.
DualLayerVideoDecoder: the decoder half of the dual-layer route. It splits each packet into base layer, enhancement layer and RPU (DoviRpuConverter.separateDualLayers), decodes both layers on VideoToolbox through two HardwareVideoDecoder sessions, pairs them by HEVC picture order, composes with DoviFelComposer and delivers the frames in decode order with the Profile 8.1 RPU attached per frame. - Pairing: DualLayerPictureAlignment restamps each enhancement-layer packet with the time of the base picture in the same display slot, so an enhancement layer coded with B-frames over a base layer without them is no longer paired with a neighbouring frame's residual. A layer keeps access-unit pairing until its next sequence-opening IRAP after a seek. - Bounded memory: base-layer skew K = 3 frames, at most 10 waiting enhancement frames, output pool 15 plus a reserve of 3. A late or broken EL falls back to the base layer for that frame. - Seeks: a seek flushes every stage. A stale EL is never paired with a post-seek base layer and a stale BL is never delivered. The composer's output pool is kept across the flush instead of being dropped (it made the frames after a seek allocate a second pool beside the buffers the renderer still held): peak footprint on a 12-seek run of one test clip went from 674 MB to 500 MB. The pool is dropped on close. - HardwareVideoDecoder gains an opt-in no-copy block source and a parameter-set open for the enhancement layer; both are off for every existing caller. FelResidualMeasure (the AETHER_FEL_MEASURE diagnostic, off by default) is here because the decoder calls it. Nothing constructs the decoder yet: no host code selects it until the route PR, so no source plays differently after this one. Public API: none. Not in this PR: the capability gate, the preferDualLayerDolbyVision flag, host wiring, dolby-vision-fel.md. Tests: decoder, GPU slot wait, seek realignment (flush of both sessions and the composer, stale EL not composed, waiting BL dropped at the seek, seek during an in-flight composition), stream classification and packet balance, CPU model, output-pool-across-flush, real-clip tests (gated on DV_FEL_TESTS_DIR, skipped without), and a subtitle compositor test that the Dolby Vision attachments survive compositing.
…erDualLayerDolbyVision Host wiring for the composer and decoder. LoadOptions.preferDualLayerDolbyVision (default false) makes a Profile 7 FEL file play through SoftwarePlaybackHost and DualLayerVideoDecoder when the box can afford it; otherwise the existing Profile 8.1 conversion is untouched. With the flag off no source plays differently. - DualLayerRouteDecision: a pure capability gate. The route is taken only for FEL, with a proven hardware HEVC session, a seekable VOD, dolbyVisionHandling .automatic and a stream inside the real-time budget ((3840x2160 + 1920x1080) x 30 = 311.04 Mpx/s; a 24p UHD FEL with a quarter-area EL needs 80%; an unknown frame rate is budgeted as 24). Every Profile 7 load logs exactly one `DV P7 dual-layer route: taken|not taken (<reason>)` line. It fails closed: when the base-layer size is unknown the budget cannot be evaluated, so the route is refused rather than assumed. The budget is an assumption until the Apple TV run confirms it. - Wiring in AetherEngine, SoftwarePlaybackHost, VideoRoutingPolicy, CodecRoutePolicy and the reload path (preferDualLayerDolbyVision is a tuning field, correctable through reloadAtCurrentPosition(applying:)). An `hev1` source with in-band parameter sets (an empty hvcC) is completed from the head of the stream so it can be classified and take the route, the same rebuild the native path already does for its init.mp4. - Audio trade-off, documented in LoadOptions, api.md and dolby-vision-fel.md and pinned by DualLayerRouteAudioTests: the route runs on the software host, whose audio FFmpeg decodes and the sample-buffer audio renderer plays, and on tvOS only AVPlayer emits Atmos objects. An E-AC-3 (JOC) track therefore plays as its 5.1 / 7.1 channel-bed core, without the objects, where the native route would hand it to AVPlayer unchanged. Not engineered around. - Docs: dolby-vision-fel.md (the design), api.md, formats.md, README, and the DocumentedConstantsTests pins that tie the document's numbers to the code (route budget, pipeline bounds, picture-order pairing bound). The document arrives here, whole; code comments in the earlier PRs cite its section numbers. Mac soak, measured BEFORE the output-pool fix of the decoder PR (peaks are pre-fix; with it 12 seeks peak at 500 MB instead of 674 MB), M2 Pro, debug aetherctl, --window: | Run | Route | Composed / failures | Seeks landed | Drops | Steady | Peak | |---|---|---|---|---|---|---| | 217 s, 12 seeks | taken, budget 80% | 6143 / 0 | 15 | 6 / 6206 | 328-331 MB | 674 MB | | 120 s, 11 seeks | taken | 4248 / 0 | 12 | 7 / 4275 | 282 MB | 600 MB | | pause + seek while paused | taken | 2005 / 0 | 1 | 1 / 1949 | 330 MB | 352 MB | Apple TV results: pending, nothing measured on device yet. Tests: DualLayerRouteDecisionTests (one per exit), VideoRoutingPolicyTests, SoftwareDecoderSelectionTests, InBandParameterSetRebuildTests, DualLayerEdgeCaseTests, DualLayerRouteAudioTests, LoadOptionsTests, DocumentedConstantsTests. Not in this PR: the pulse probe and the aetherctl tooling.
…ming harness, analysis) Probes/DolbyVisionPulse: a reproducible measurement of whether a panel follows Dolby Vision metadata. Clips keep the pixels constant and switch only the RPU (or, for the enhancement-layer clip, only the residual) every 72 frames, so a phone filming the television shows whether the display uses the metadata and the composed pixels. It is a measurement, not a unit test, and it commits no media. - Scripts: gen_pulse.py (pattern, RPU configs, EL residual design), build.sh, serve.py, run_tv.sh, cut.py (one phone recording per arm), analyze.py (verdict per arm), report.py (the change-per-patch table and phase-A levels), check_el.py (checks on the Mac that the EL clip carries the designed residual in phase B and none in A), dump_attachments.swift (what VideoToolbox attaches to a decoded frame), sim_recording.py (a fake recording that validates the analysis). - Device/: a minimal tvOS host that plays the clips through AVPlayer, VideoToolbox and the FEL route (preferDualLayerDolbyVision). It uses only public engine API. - CI: compiles the scripts and builds the host for the tvOS simulator, so a moved public API is found in CI instead of at the television. - The pulse test is the measurement behind the consumption evidence in docs/dolby-vision-fel.md section 4.5, which arrived with the route PR. No library code changes and no behaviour change. Public API: none. Not in this PR: the aetherctl tooling. The host builds in CI; the rest needs a television and a phone. Checked here: Python and shell syntax of the scripts, swiftc -typecheck of dump_attachments.swift, xcodebuild of the host for the tvOS simulator (BUILD SUCCEEDED), swift build --build-tests of the package.
The command-line and probe side of the dual-layer Dolby Vision work. Nothing here is host API: the probes are @_spi(Diagnostics), outside the SemVer contract, and the host surface of the FEL route stays LoadOptions.preferDualLayerDolbyVision alone. - aetherctl play: --cycle-el flips the residual on a timer over a visible surface, --no-fel plays the same file on the native route, --surface presents it, and --dv-pin (DEBUG builds only) arms the consumption pin test. - aetherctl dvsurvey: reports a title's L1 / L2 display-metadata distribution straight from its RPUs (DoviRpuSurvey: no decode, no GPU). - aetherctl feltest: decodes real Profile 7 files through the FEL path and checks the result (AetherEngine+FelProbe: felDecodeProbe, felResidualEnabled). - DoviDisplayMetadataDebug and AetherEngine+DolbyVisionTest: a DEBUG-only hook that substitutes a captured RPU on a duty cycle, the on-device consumption test. It compiles out of Release; DoviDisplayMetadata.attach gains one #if DEBUG call and is otherwise unchanged. - docs/cli.md, the docs/api.md "public but not host API" bullet, and the docs/architecture.md entries for these files. No behaviour change for a host: the SPI is unreachable without @_spi(Diagnostics) and the DEBUG hook is off unless armed. Not in this PR: anything on the route or the decoder. Tests: DoviRpuSurveyResultTests (the survey's pure summaries), DoviPinTestTests (the pin-spec grammar), and the DEBUG pin hook's disarm test in DualLayerVideoDecoderTests.
…readable source When the live HLS ingest's playlist was refused at the join, the probe saw no bytes and the load published customSourceProbeFailed, which a host reads as a stream it cannot play; one that falls back to another route on it moved the channel there for the rest of its session, over a 509 an IPTV panel gives while another device holds the account's last slot. The load now publishes the origin's answer, as an HTTP reader's failed open does: sourceRateLimited (429/503/509) or sourceRefused with the status in underlyingCode, or liveSourceUnavailable when the playlist could not be reached. docs/api.md says so beside customSourceProbeFailed. Tests: PlaybackErrorInfoTests (refused join for 509 and 403, unreachable join).
…nding the session An IPTV panel that limits an account's connections answers a live playlist refresh with 509 while another device holds the last slot, and goes on refusing a session it evicted while a fresh session from the loaded URL is admitted at once. The ingest retried 1, 2 and 4 s apart and went terminal at 12 s (on the software path, the end of the session), and each refusal armed the origin's request pacer, so the host's reload waited up to 10 s for its first request. - A refused or unreachable refresh (429, 5xx, transport) is asked again every second, or after the origin's Retry-After up to 5 s, for up to 60 s; a refused segment likewise, after its two quick retries. - A session URL the loaded URL led to through redirects is asked for afresh through the loaded URL once refused twice in a row, or at once when it answers as gone (a 4xx other than 429 and 408). The tracker follows MEDIA-SEQUENCE, so the segments continue where they left off. - The live ingest's refusals no longer arm OriginRequestBudget's pacer or lower its request budget; a ceiling the host declares or another path learns still binds it. Tests: HLSLiveIngestRefusalTests.
…by swapping its item The wireless-AirPlay route change rebuilt the session to serve it on the device's LAN address. A live session on the HLS ingest stands on a forward-only custom source, whose rebuild is refused (superuser404notfound#526), and the refusal was dropped: the receiver stayed on 127.0.0.1, which it cannot reach, and played nothing while the sender reported external playback. Such a session now swaps the player's item onto the receiver's address, and back onto the loopback when the receiver lets go, as a sequential origin already did. The session, its ingest and its segment cache carry on, so the source is asked for nothing again. The swapped item rejoins its live playlist at the player's join point, as a live reload does. On-demand sessions cross as before. AirPlayPlaylistDecision.routeChangeHop decides which sessions swap, with tests. docs/formats.md (Wireless AirPlay) and docs/architecture.md say how each kind crosses.
…DVD-Video VIDEO_TS folder over HTTP feat(disc): play a DVD-Video VIDEO_TS folder over HTTP
superuser404notfound#756 routed any listing that held a VIDEO_TS/ entry to the DVD path, and a DVD path that found no title VOBs did not fall back to Blu-ray. An image is recognized Blu-ray first with DVD as the fallback; a folder now follows the same order, so a hybrid rip plays its Blu-ray title and a folder whose BDMV tree holds no playable title still plays its DVD. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
…ctive-video-decoder fix(playback): report the software host's actual video decoder
…h264-missing-head-cadence fix(demux): repair variable-cadence H264 heads and hierarchical partial offsets Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
…peruser404notfound#761) When the whole-file probe hands its held sample to the slot session, nothing is dequeued in between. A non-video packet arriving while the session had no pending picture returned false and went back into the parent's own queue, which is drained ahead of the session's ready queue, so it overtook audio the session had already taken: on the missing-head fixture audio DTS -1024 left after 16384. It now queues behind the session's ready packets; in steady state the demuxer drains before every read, so nothing else changes. The runtime harness now requires every non-video stream to leave in DTS order (fails on the previous code), and the all-stream budget check drains between packets as the demuxer does. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
…64-frame-cadence # Conflicts: # CHANGELOG.md
…es (superuser404notfound#762) The clamped-CFR verdict and its rewriter derived PTS from picture order and DTS from decode order without checking that one does not precede the other. A stream whose ranks lag their decode index by more than the reorder delay would have been handed out with PTS < DTS. Both now fail closed on that, the verdict back to the previous path and the rewriter to untouched packets. Also covers the path superuser404notfound#762 changed for superuser404notfound#511 files: a coding-order ladder on a whole-tick lattice still classifies as a permutation, not a reconstruction. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
…pcoming hint The dual-layer decoder delivers frames in decode order. The renderer held four of them to reorder, which left the FEL look-ahead window four frames short and dropped about one frame in five on Apple TV. AVSampleBufferVideoRenderer sorts by presentation time itself if it is told the lowest timestamp still to come, so the FEL path now hands every frame over as it arrives and sets presentationTimeExpectation = .minimumUpcoming(floor). PresentationFloor computes that floor: the first gap in the frame grid, half a frame up, given up once the clock passes a slot that never arrives. After a seek it starts at the skip threshold, since B-frames below the next anchor arrive after it. Apple TV, three rounds: drops 17/296/289 -> 6/5/5, same memory footprint. Without a frame rate the renderer keeps the reorder buffer.
… asserting on a wall clock or purgeable memory Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
… first The feeder decided the placement and then wrote the cursor unconditionally, so a seek between the two had its target overwritten by the join. The write is now compare-and-set on the seek generation the feeder iteration read, and the placement is logged only when it took. Follow-up to superuser404notfound#797. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
…s to a seek that landed first Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
…efusal-retries fix(live): a live stream read off its URL rides out an IPTV panel's refusals
…ils typed superuser404notfound#796 throws a live open's first 4xx/5xx typed at once. Before it, the read loop gave a hard 5xx on a never-productive source one more attempt, which is what a 500 or 502 during a tuner or transcode spin-up needs. Refusals (429/503/509) and 4xx still fail at once. The live refusal budget's test seam is now read once at reader init, like the other reader hooks, so a parallel test cannot change it under a running reader. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
…r is asked once more before it fails typed
- the in-band HEVC record completion discards its Bool explicitly instead of letting the detached closure return it into an unused .value - channelLayoutDescription decodes its buffer instead of the deprecated String(cString: [CChar]) - aetherctl's elmode observer touches its AppKit views through MainActor.assumeIsolated - tests: #require calls the 6.4 Testing macro flags as redundant (an optional context picks the non-optional overload, so they never checked anything) become the plain expression; Sendable captures of CVPixelBuffer, AVAssetTrack and the accept handler go through nonisolated(unsafe) locals; unused results are discarded with _ = No behaviour change. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
LibDTSX compiles in harletty-bridge's `dca` crate, which is labelled Apache-2.0 but is a port of FFmpeg's LGPL-2.1-or-later dca decoder, so the built library is LGPL-3.0-or-later and was linked statically into every host (superuser404notfound#798). 2.0.0 ships DTSX.framework, dynamic, exporting only the C API, which Xcode embeds next to the FFmpeg frameworks; same decoder, bit-identical output. The README's license section says what a host now receives. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
… check A reconnect whose returning audio rolls back before the outgoing connection's last pictures leave the PES parser opened the overlap without a held damaged boundary. The flagged picture and its unflagged truncated successor stayed beyond the retained video frontier, so the returning copy of the first committed the batch and the returning copy of the truncated one was published after it with a bumped DTS (AE#747, cut 2 of 3 on an Apple TV, superseded=0). While no returning video has matched yet, a video packet past the frontier is now an outgoing straggler: it raises the retained frontier and joins the pending signatures, bounded like a held boundary. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
…t built in Same decoder. The CHANGELOG also gains the LibDTSX 2.0.0 entry that ede2539 left out: hosts with DTSXObjectAudio now embed a dynamic, LGPL-3.0-or-later DTSX.framework (superuser404notfound#798). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
…D route (superuser404notfound#800) The software host started its clock on the first video packet fed (no audio) or the first decoded audio, while the decoder was still working from the keyframe before the target up to it. The first frames then reached the layer late and were dropped: 0.9 s and 5 to 7 frames on a 4K HEVC title with no audio and 10 s GOPs after an in-place switch onto the software path, on an Apple TV 4K. The superuser404notfound#774 video preroll now covers every VOD software route, not only the FEL one: the gate opens once frames up to videoPrerollSeconds (0.125 s) past the clock are handed to the layer. A live stream off the FEL route still starts at once. aetherctl play --sw on a 4K 10 s GOP fixture: the clock now waits 889 ms and starts at the target, where it used to start at once. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
…ames, a live software join starts near the newest media, LibDTSX under the LGPL Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
Xcode 26.3 gave up on the closure FelResidualMeasure hands its queue (a Release x86_64 archive of AetherPlayer 1.0.0 failed with "unable to type-check this expression in reasonable time"): since Swift 5.7 a multi-statement closure is checked with its body, and the body built the luma-band line as one + chain of three map/joined expressions. The closure now calls measure(...), and the three parts are typed constants. No behaviour change. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
…ode 26 again Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
…/used-by/issue-801
Takes upstream main through fc6b412: 7.37.0, 7.38.0 and 7.38.1, plus the LillyPlayer used-by entry (superuser404notfound#804). Notable upstream changes for hosts: - LoadOptions.preferDualLayerDolbyVision routes Profile 7 FEL to the dual-layer decoder (superuser404notfound#769, superuser404notfound#770), which applies the enhancement layer. - objectAudioRendering covers DTS:X as well as TrueHD Atmos, and TrackInfo.isDTSX flags DTS:X tracks. LibTrueHD and LibDTSX sit behind the TrueHDObjectAudio and DTSXObjectAudio package traits, on by default. LibTrueHD moves to 2.3.1 and LibDTSX to 2.0.0 (LGPL). - Live sessions can rotate request headers without a rebuild (superuser404notfound#792), and a refused credential mid-session is typed and heals on renewal. - A software start holds the clock until its first frames are queued (superuser404notfound#800), and a software live join starts near the newest media (superuser404notfound#797). Conflicts resolved: - CHANGELOG: the fork's Unreleased entries stay under Unreleased; the live-playlist renewal entry (superuser404notfound#748) moves to upstream's 7.37.0 section. - SessionOptionCorrection.knownFields keeps the fork's httpRequestAuthorization beside upstream's preferDualLayerDolbyVision. - SoftwarePlaybackHost.play() takes upstream's stopped/failed guard first, then the fork's held end-of-media release (superuser404notfound#15). seek() clears the fork's paused-frame gate and upstream's resident-range publication. - DocumentedConstantsTests keeps both the fork's authorized-resource deadline check and upstream's 30 s positioning budget check. - docs/api.md takes upstream's objectAudioRendering row, with its package trait note, and keeps the `ObjectAudioRendering` reference that PublicAPIDocumentationTests requires. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SmKM2DtjCuccTfuQwQo7DF
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
|
The test plan explicitly records no build or playback testing yet. Please add device/OS, exact media details, and observed playback results for Profile 7 FEL with |
| rows = [r for r, k in zip(rows, ok) if k] | ||
|
|
||
| # Split into runs where the clip frame index restarts. | ||
| runs, cur = [], [rows[0]] |
There was a problem hiding this comment.
IndexError occurs at rows[0] because analyse() checks for empty rows only before the consistency filter, which rejects every candidate in a recording with four or fewer decodable frames. Check rows immediately after filtering, before initializing the first run, to report that no usable frames remain.
rows = [r for r, k in zip(rows, ok) if k]
if not rows:
sys.exit(f"no usable frames after counter consistency filtering ({bad} rejected)")
# Split into runs where the clip frame index restarts.
runs, cur = [], [rows[0]]Prompt for LLM
File Probes/DolbyVisionPulse/Scripts/analyze.py:
Line 205 to 208:
IndexError occurs at rows[0] because analyse() checks for empty rows only before the consistency filter, which rejects every candidate in a recording with four or fewer decodable frames. Check rows immediately after filtering, before initializing the first run, to report that no usable frames remain.
Suggested Code:
rows = [r for r, k in zip(rows, ok) if k]
if not rows:
sys.exit(f"no usable frames after counter consistency filtering ({bad} rejected)")
# Split into runs where the clip frame index restarts.
runs, cur = [], [rows[0]]
Talk to Kody by mentioning @kody
Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.
| p = subprocess.Popen(["ffmpeg", "-v", "error", "-i", el, "-f", "rawvideo", "-pix_fmt", "yuv420p10le", "-"], | ||
| stdout=subprocess.PIPE, stderr=subprocess.PIPE) |
There was a problem hiding this comment.
Subprocess pipe deadlock occurs because check_el.py leaves ffmpeg's piped stderr unread until the raw-video stdout loop finishes; enough enhancement-layer decoder errors fill stderr, block ffmpeg, and leave check_el.py waiting indefinitely on stdout. Redirect stderr to a temporary file and read it after the process exits, or drain stderr concurrently with stdout.
Prompt for LLM
File Probes/DolbyVisionPulse/Scripts/check_el.py:
Line 122 to 123:
Subprocess pipe deadlock occurs because check_el.py leaves ffmpeg's piped stderr unread until the raw-video stdout loop finishes; enough enhancement-layer decoder errors fill stderr, block ffmpeg, and leave check_el.py waiting indefinitely on stdout. Redirect stderr to a temporary file and read it after the process exits, or drain stderr concurrently with stdout.
Talk to Kody by mentioning @kody
Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.
| midnight = dt.datetime.fromtimestamp(day_of, dt.timezone.utc).replace(hour=0, minute=0, second=0, | ||
| microsecond=0).timestamp() | ||
| return midnight + int(h) * 3600 + int(m) * 60 + float(s) - float(vsec) |
There was a problem hiding this comment.
UTC-day rollover fails because sync_offset attaches the slate's clock to the recording's starting date: a recording starting at 23:59:50 with --sync 20=00:00:10.0 gets a start 24 hours too early, placing every subsequent ffmpeg seek outside the recording. Before cutting the arms, select the inferred start from neighboring UTC-day candidates closest to the approximate recording start.
midnight = dt.datetime.fromtimestamp(day_of, dt.timezone.utc).replace(hour=0, minute=0, second=0,
microsecond=0).timestamp()
start = midnight + int(h) * 3600 + int(m) * 60 + float(s) - float(vsec)
return min((start + days * 86400 for days in (-1, 0, 1)),
key=lambda candidate: abs(candidate - day_of))Prompt for LLM
File Probes/DolbyVisionPulse/Scripts/cut.py:
Line 76 to 78:
UTC-day rollover fails because sync_offset attaches the slate's clock to the recording's starting date: a recording starting at 23:59:50 with --sync 20=00:00:10.0 gets a start 24 hours too early, placing every subsequent ffmpeg seek outside the recording. Before cutting the arms, select the inferred start from neighboring UTC-day candidates closest to the approximate recording start.
Suggested Code:
midnight = dt.datetime.fromtimestamp(day_of, dt.timezone.utc).replace(hour=0, minute=0, second=0,
microsecond=0).timestamp()
start = midnight + int(h) * 3600 + int(m) * 60 + float(s) - float(vsec)
return min((start + days * 86400 for days in (-1, 0, 1)),
key=lambda candidate: abs(candidate - day_of))
Talk to Kody by mentioning @kody
Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.
| let sem = DispatchSemaphore(value: 0) | ||
| Task { |
There was a problem hiding this comment.
Main-actor deadlock occurs on current Swift toolchains because the top-level Task inherits main-actor isolation while sem.wait() blocks that actor, preventing the attachment dumper from starting decoding. Remove the semaphore bridge and execute the existing do/catch body with top-level await.
Prompt for LLM
File Probes/DolbyVisionPulse/Scripts/dump_attachments.swift:
Line 26 to 27:
Main-actor deadlock occurs on current Swift toolchains because the top-level Task inherits main-actor isolation while sem.wait() blocks that actor, preventing the attachment dumper from starting decoding. Remove the semaphore bridge and execute the existing do/catch body with top-level await.
Talk to Kody by mentioning @kody
Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.
Summary
Brings the Silo fork from upstream 7.36.0 up to upstream 7.38.1 (fc6b412), keeping every Silo patch. silo-apple needs it for the Dolby Vision FEL route (LoadOptions.preferDualLayerDolbyVision) and for DTS:X under objectAudioRendering.
What changed
Upstream changes that matter to hosts:
Merge conflicts, resolved by keeping both sides:
I also hand-checked the files that both sides changed but git merged on its own. Fork-only code doesn't call any API that upstream renamed or removed, and a scan for duplicate declarations in the merged files found none.
Test plan
Checklist
Note
Merge upstream AetherEngine 7.38.1 into the Silo fork
Brings the upstream 7.38.1 release into the fork. The largest functional changes are:
DualLayerVideoDecoderwith a Metal composer, route decision, andLoadOptions.preferDualLayerDolbyVision(default false). MEL and unsupported sources stay on the native route.RequestHeaderStoreand a publicupdateRequestHeadersAPI, so live request headers can be replaced without a session rebuild; 401/403 refusals get bounded retry, renewal windows, and typed refusal errors.DiscReader.wrapDVDFolderrecognizesVIDEO_TStrees, selects titles, and concatenates VOBs, with Blu-ray still preferred in hybrid listings.IFrameJPEGBuilder: HDR/Dolby Vision sources get SDR Motion JPEG I-frame renditions at 640px; the local server gates the JPEGiframe.m3u8playlist to 404 when no main variant is requested within three seconds.Retry-Afterwaits.SoftwarePacketReadAheadkeeps committed packets usable after source-read failures; TrueHD/MLP silent-decoder detection now waits 1,200 packets;Package.swiftrequires Swift tools 6.1 and gates LibTrueHD/LibDTSX behind default-on package traits.Macroscope summarized 8557ad9.