Probe: residue upscaling — the anatomy 2000→4M technique on a codec residual (measured, honest-negative for scalar-dense)#231
Conversation
|
Warning Review limit reached
Next review available in: 37 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 21321d1b43
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| paeth / grid_total, | ||
| paeth / spiral_total, |
There was a problem hiding this comment.
Report ratios in the same direction as the header
The table labels these columns as /paeth and the conclusion says "grid 0.70× ... of paeth", but the code divides Paeth by the global totals. For the very-smooth row that prints 0.70 even though grid_total is 3648 bytes and Paeth is 2565 bytes, so grid is 1.42× Paeth in byte cost. Anyone using this probe to compare coders can read the result as a 30% saving instead of a loss; invert these divisions or relabel/reword as Paeth/global.
Useful? React with 👍 / 👎.
Columns were labeled /paeth but computed paeth/global, printing 0.70 for a case where grid (3648 B) actually costs MORE than paeth (2565 B) — readable as a 30% saving when it is a 42% loss. Invert to grid/paeth and spiral/paeth (byte-cost ratio, > 1 = the global upscaler loses to local DPCM), relabel the columns (>1=lose), and reword the conclusion: grid 1.42×, spiral 2.64× of paeth on very-smooth (loss); ~0.98× on noise (tie). Conclusion unchanged in substance — the anatomy upscaler loses to local DPCM on dense scalar residuals — now the numbers point the right way. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MLBnPuScZy6w9di2QEjsXM
…c residual
The operator's framing of M1: use the q2 FMA-anatomy upscaling (2000 surfels /
100k nodes → 4,000,000 vertices via deterministic golden-spiral placement +
coded residue) to get the codec residue in improved ways. This is the measured
test of whether that transfers.
Mechanism under test: sparse-anchor FMA extrapolation as a decorrelating PLACE
predictor (anchor positions deterministic/regenerable, never stored — the helix
"template is free, only the endpoint costs" principle), coding only the RESIDUE.
Baseline is entropy-coded (order-0 Shannon H0, what an ideal rANS coder spends),
and the FAIR rival is Paeth local DPCM (the standard lossless predictor, zero
anchors) — not a no-model strawman.
Measured (128x128, 256 anchors, H0 bytes):
dense paeth grid a+res spiral a+res grid/paeth spiral/paeth
very-smooth 14807 2565 3648 6780 0.70x 0.38x
weather-like 14700 3162 4796 7784 0.66x 0.41x
mid-freq 14720 5677 9170 11425 0.62x 0.50x
noise 16357 17886 17591 17454 1.02x 1.02x
Honest conclusion:
- Global sparse-anchor upscaling DOES decorrelate (grid 3648 << no-model 14807);
the anatomy 2000→4M mechanism is real.
- BUT for a DENSE SCALAR luma residual it LOSES to local DPCM (grid 0.70x,
spiral 0.38x of Paeth): the 256 anchor VALUES cost real bits and a sparse grid
can't model structure finer than its stride. For scalar-dense residuals the
analogy is rhyme, not a winning transfer — use DPCM / transform.
- grid > spiral: bilinear beats scattered IDW as a scalar interpolant. The
golden-spiral's win is NOT scalar fields.
- Where the anatomy technique is ALREADY measured to dominate is its native
domain: sparse DIRECTION fields on S² (surfel normals) — hpc::splat3d::
helix_orient measures 1-3 bytes at Pearson 0.9917, a regime with no dense
causal neighbor to DPCM against.
- The continuous motion-vector field as a directional target is a labeled
CONJECTURE (needs realistic MVs from a real decode, i.e. M2), not a result.
No S² encoder is forced onto the scalar residual (Frankenstein guard). Ties to
H-7 via the CellMode residue histogram. cargo fmt + clippy clean, feature-gated.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MLBnPuScZy6w9di2QEjsXM
Columns were labeled /paeth but computed paeth/global, printing 0.70 for a case where grid (3648 B) actually costs MORE than paeth (2565 B) — readable as a 30% saving when it is a 42% loss. Invert to grid/paeth and spiral/paeth (byte-cost ratio, > 1 = the global upscaler loses to local DPCM), relabel the columns (>1=lose), and reword the conclusion: grid 1.42×, spiral 2.64× of paeth on very-smooth (loss); ~0.98× on noise (tie). Conclusion unchanged in substance — the anatomy upscaler loses to local DPCM on dense scalar residuals — now the numbers point the right way. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MLBnPuScZy6w9di2QEjsXM
b6767ed to
f45b506
Compare
…ubstrate The durable ledger for the operator's thesis: use the BF16 16×16 AMX GEMM / blasgraph neighborhood / Morton-tile pyramid / perturbation-shader cascade to amortize H.265/HEVC — the per-block cost collapsing to a gather (bit shift) + one TDPBF16PS tile op over a deterministic pyramid built once. Maps every HEVC DSP stage to the substrate primitive, each row tagged MEASURED (#PR) / MECHANISM-unmeasured (probe named) / DOESN'T-FIT: - Motion estimation/compensation → i8/bf16 GEMM + gather [MEASURED #230] - Inverse transform → separable tile GEMM; WHT no-op [MEASURED #232] - Intra prediction / covariance → field-coupling tile op [MEASURED shape #233] - Sub-pel interpolation (8-tap) → separable tile GEMM [MECHANISM — probe] - CTU quad-tree → Morton/HHTL cascade [MECHANISM — shipped] - Deblock/SAO → masked tile op + LUT (the "AMX masking") [PARTIAL — masking] - CABAC entropy → serial arithmetic coding [DOESN'T FIT] Two honest boundaries recorded: (1) CABAC is not a GEMM — the entropy layer is the M2 serial front-end the tile substrate does not amortize; (2) the golden-spiral codec is for directional/sparse data, not dense scalar residuals (#231, measured negative). Cross-repo tie grounded: OGAR's perturbation pyramid IS the Walsh-Hadamard transform of the address tree = the same WHT #232 measured as the codec transform. Includes a probe queue (subpel_tap_tile, intra_angular_tile, deblock_masked_tile, CTU routing parity, M2 CABAC). Anchors: PRs #230–#233; hpc::bf16_tile_gemm, splat3d::spd3, cascade, codec; blasgraph HHTL; OGAR perturbation pyramid. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MLBnPuScZy6w9di2QEjsXM
…ubstrate The durable ledger for the operator's thesis: use the BF16 16×16 AMX GEMM / blasgraph neighborhood / Morton-tile pyramid / perturbation-shader cascade to amortize H.265/HEVC — the per-block cost collapsing to a gather (bit shift) + one TDPBF16PS tile op over a deterministic pyramid built once. Maps every HEVC DSP stage to the substrate primitive, each row tagged MEASURED (#PR) / MECHANISM-unmeasured (probe named) / DOESN'T-FIT: - Motion estimation/compensation → i8/bf16 GEMM + gather [MEASURED #230] - Inverse transform → separable tile GEMM; WHT no-op [MEASURED #232] - Intra prediction / covariance → field-coupling tile op [MEASURED shape #233] - Sub-pel interpolation (8-tap) → separable tile GEMM [MECHANISM — probe] - CTU quad-tree → Morton/HHTL cascade [MECHANISM — shipped] - Deblock/SAO → masked tile op + LUT (the "AMX masking") [PARTIAL — masking] - CABAC entropy → serial arithmetic coding [DOESN'T FIT] Two honest boundaries recorded: (1) CABAC is not a GEMM — the entropy layer is the M2 serial front-end the tile substrate does not amortize; (2) the golden-spiral codec is for directional/sparse data, not dense scalar residuals (#231, measured negative). Cross-repo tie grounded: OGAR's perturbation pyramid IS the Walsh-Hadamard transform of the address tree = the same WHT #232 measured as the codec transform. Includes a probe queue (subpel_tap_tile, intra_angular_tile, deblock_masked_tile, CTU routing parity, M2 CABAC). Anchors: PRs #230–#233; hpc::bf16_tile_gemm, splat3d::spd3, cascade, codec; blasgraph HHTL; OGAR perturbation pyramid. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MLBnPuScZy6w9di2QEjsXM
The question
M1 (#230) proved motion estimation is the shader's i8 GEMM and MC is bit-exact, but it stored the residual densely. The operator's framing of M1's real point: use the q2 FMA-anatomy upscaling — 2000 surfels / 100k nodes → 4,000,000 vertices, via a deterministic golden-spiral anchor placement + a coded residue — to get the codec residue cheaper. This PR is the measured test of whether that transfers, not a claim that it does.
The mechanism under test is the workspace's own PLACE/RESIDUE doctrine (
crates/helix: "HHTL is the deterministic PLACE; helix is the RESIDUE … the curve is regenerated from a φ-spiral template, not stored; the cost is only the endpoint pair"): sparse-anchor FMA extrapolation as a decorrelating predictor, anchor positions deterministic/regenerable (free), coding only the residue.Fairness (no strawman, no Frankenstein)
H₀— the bits an ideal rANS coder spends.hpc::splat3d::helix_orientis near-optimal; a luma residual is a scalar field. The golden-spiral enters here only as 2-D anchor placement (the surfel distribution), never as an S² angle codec.Measured (128×128, 256 anchors,
H₀bytes)Conclusion (honest, partly negative — that's the point)
helix_orientmeasures 1–3 bytes at Pearson 0.9917 — a regime with no dense causal neighbor to DPCM against.Ties to H-7 via the residue
CellModehistogram.cargo fmt --check+cargo clippyclean on 1.95.0, feature-gatedrequired-features = ["codec"].Run:
cargo run --release --example residue_upscale --features codec🤖 Generated with Claude Code
Generated by Claude Code