Skip to content

Report progress while the resident video VAE decodes - #35

Open
AlexanderIstomin wants to merge 1 commit into
antirez:mainfrom
AlexanderIstomin:upstream-vae-decode-progress
Open

Report progress while the resident video VAE decodes#35
AlexanderIstomin wants to merge 1 commit into
antirez:mainfrom
AlexanderIstomin:upstream-vae-decode-progress

Conversation

@AlexanderIstomin

Copy link
Copy Markdown

The resident decoder reports progress while loading its 36 blocks, then
decodes in silence. A caller's progress display therefore holds its last
value for the entire decode.

That is not a small tail. On a still — where one frame is kept from a
decoded chunk — the decode is about a quarter of the whole generation.
In our app it presented as the progress bar sitting at 100% for two to
three minutes, and users reasonably read it as a hang.

The change

run_resident_tile reports each block it runs, and
h3_video_vae_decoder gained an optional progress sink so callers can
label the decode separately from the load. A decoder without a sink
decodes exactly as before, so this is additive: h3_video_vae_decode
and every existing caller are unaffected.

Spatial tiles each run the full block stack, so a raw per-tile count
would restart the reported figure once per tile. The decoder tracks its
place in the tiling and forwards position in the whole decode instead —
a four-tile canvas advances 1/144 to 144/144 rather than counting to 36
four times, so the figure only ever moves forward.

Measured on an M1 Pro: a 352-square still decodes in four tiles, and the
reported sequence is monotonic across all of them.

The resident decoder reports progress while loading its 36 blocks and
then decodes in silence, so a caller's progress display holds its last
value for the whole decode. That is not a small tail: on a still, where
one frame is kept from a decoded chunk, the decode is a quarter of the
entire generation, and it reads as a hang.

run_resident_tile now reports each block it runs, and the decoder gained
an optional progress sink for that phase, so callers can label it
separately from the load. Decoders without a sink decode exactly as
before.

Spatial tiles each run the full block stack, so a raw per-tile count
would restart the reported figure once per tile. The decoder tracks its
place in the tiling and forwards position in the whole decode instead: a
four-tile canvas advances 1/144 to 144/144 rather than counting to 36
four times.
LachlanStuart added a commit to LachlanStuart/h3.c that referenced this pull request Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant