Skip to content

Probe: motion = bit shift × transform no-op × shaping — the factorization, measured#232

Merged
AdaWorldAPI merged 1 commit into
masterfrom
claude/motion-transform-noop
Jul 4, 2026
Merged

Probe: motion = bit shift × transform no-op × shaping — the factorization, measured#232
AdaWorldAPI merged 1 commit into
masterfrom
claude/motion-transform-noop

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

The factorization

The operator's reframe of M1: motion compensation in this substrate factors as

bit shift (integer motion = addressing, zero arithmetic — the deterministic PLACE / VPGATHERDD) × transform no-op (the DCT a real codec puts after MC collapses to identity when prediction is good) × shaping (the residue applied directly as a shape, not transform-coded).

M1 already is this — recon = shifted_ref + residual, no transform, and 62.5% of blocks had residual == 0 (transform fully absent). This probe measures the factorization as a tradeoff curve, not three independent stages, because a transform cannot compress white noise, and good motion whitens the residual.

Fairness

All three codings are orthonormal, so quantising with a fixed step Q gives equal L2 distortion (Parseval) — an equal-PSNR byte comparison. Bytes = order-0 Shannon H₀ (ideal rANS). Residual lag-1 autocorrelation ρ is the motion-quality proxy: good motion ⇒ white residual (ρ→0); poor motion ⇒ structured (ρ→1). direct = quantise the residual with no transform (pure shaping); wht/dct = transform then quantise coefficients.

Measured (128×128, 8×8 blocks, Q=6)

residual ρ (measured) direct wht dct dct/dir wht/dct
ρ≈0.00 −0.001 9135 9579 9581 0.95× 1.00×
ρ≈0.30 0.053 8386 8609 8608 0.97× 1.00×
ρ≈0.60 0.419 7664 7147 7146 1.07× 1.00×
ρ≈0.90 0.961 7641 3846 3754 2.04× 1.02×

Both falsifiable claims hold

  1. transform no-op grows with motion quality. dct/dir runs 0.95× → 0.97× → 1.07× → 2.04× as the residual whitens. For a white residual (good motion) the DCT is below no-op (0.95× — it actively costs). It only earns its keep (2.04×) on the structured residual that good bit-shift motion avoids. The transform's value is inversely coupled to the motion's quality — that's "transform no-op," quantified.
  2. a multiply-free sign transform suffices. wht/dct ≈ 1.00–1.02× across the entire sweep — even at ρ≈0.9 where the transform matters most (3846 vs 3754). The ±1 add/subtract Walsh–Hadamard transform — the cognitive shader's "zero FP, zero matmul" idiom — matches the full multiply DCT within 2%. The substrate never needs a multiply-based DCT.

Conclusion

Motion = bit shift (free addressing) × transform no-op (WHT, and vanishing as motion improves) × shaping (the direct residue). Three factors, one tradeoff curve. The codec's "transform" stage is either absent (good motion) or a multiply-free sign transform (bad motion) — never a DCT — which is exactly what a codec that is the zero-FP cognitive shader requires.

Ties to H-7 via the residue CellMode histogram. cargo fmt --check + cargo clippy clean, feature-gated required-features = ["codec"].

Run: cargo run --release --example motion_transform_noop --features codec

🤖 Generated with Claude Code


Generated by Claude Code

@coderabbitai

coderabbitai Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@AdaWorldAPI, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 33 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 61e28c38-a103-48c5-91b6-6656840f4a67

📥 Commits

Reviewing files that changed from the base of the PR and between 77aae6b and c62cb3f.

📒 Files selected for processing (2)
  • Cargo.toml
  • examples/motion_transform_noop.rs

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@AdaWorldAPI AdaWorldAPI force-pushed the claude/motion-transform-noop branch from 2bebe18 to 23f7b2f Compare July 4, 2026 10:52
AdaWorldAPI pushed a commit that referenced this pull request Jul 4, 2026
… — measured

The operator's claim: a gridlake's cell interdependency, treated as a field
operation, reduces to a BF16 16×16 AMX tile GEMM (TDPBF16PS) — the same shape as
the intercorrelation / perturbation in a Gaussian splat (the EWA covariance
sandwich Σ' = Mᵀ·Σ·M, shipped as hpc::splat3d::spd3::sandwich_x16).

Mechanically: a field operation whose output cell is a linear combination of
input cells is a linear operator C = A·B — a GEMM; the interdependency IS the
coupling matrix. At the gridlake tile granularity (16×16 — a quadrant of the
64×64 gridlake) that GEMM is exactly one hpc::bf16_tile_gemm::bf16_tile_gemm_16x16
call = one TDPBF16PS tile op. Same primitive as the codec separable transform
(#232: M·X, WHT/DCT on a tile) and the splat covariance projection (sandwich_x16).

Measured on the shipped kernel (this host: AMX TDPBF16PS, amx_available = true),
vs a direct f64 reference. Precision reported as Frobenius-relative
‖tile−direct‖_F/‖direct‖_F (the honest aggregate — a per-element max-relative
blows up on the near-zero entries a cancellation-heavy Mᵀ·Σ·M naturally has):

  (1) intercorrelation  C = Xᵀ·X          frobenius_rel_err = 0.095%  (one tile op)
  (2) covariance sandwich Σ' = Mᵀ·Σ·M      frobenius_rel_err = 0.401%  (two tile ops)
  (3) bit-exact on bf16-exact integer operands (|Σ| < 2^24): true
  (4) throughput: 1.22 M tile-ops/s

Conclusion: YES — the gridlake field interdependency reduces to one BF16 16×16
tile op, matching the direct reference to BF16 precision and bit-exact for
bf16-exact integer operands. Interdependency / intercorrelation / perturbation /
codec transform / covariance projection are ONE op: the 16×16 BF16 tile GEMM.
The 64×64 gridlake is 4×4 = 16 of these tiles.

fmt + clippy clean, gated required-features = ["std"].

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MLBnPuScZy6w9di2QEjsXM
AdaWorldAPI pushed a commit that referenced this pull request Jul 4, 2026
…VC 8-tap)

Next probe from the HEVC amortization map: HEVC fractional-pel motion
compensation applies a separable 8-tap FIR (half-pel luma taps
[-1,4,-11,40,40,-11,4,-1]/64). An FIR is a linear operator, so filtering a
16×16 block is a matrix product — one bf16_tile_gemm_16x16 per pass, and the
full separable H+V is Hᵀ·(X·H): the SAME two-tile sandwich shape as the splat
covariance projection (Mᵀ·Σ·M, #233) and the codec transform (M·X, #232).

Measured on real AMX (this host: AMX TDPBF16PS, amx_available = true), vs a
direct 8-tap FIR f64 reference (same 16×16 band operator, reflected edges, so
only BF16 rounding differs):

  (1) horizontal 8-tap  out = X·H       frobenius_rel_err = 0.157%  (one tile op)
  (2) separable H+V     out = Hᵀ·(X·H)  frobenius_rel_err = 0.215%  (two tile ops)
  (3) throughput: 1.22 M sub-pel tile ops/s

Both asserts pass (rel err < BF16 tolerance). Fractional-pel motion is therefore
"just another tile op", closing the MC story past integer-pel. R-5 dispatch noted
(per-block 8-tap butterfly below the batch crossover, batched tile GEMM above).

x86-gated via the same `mod amx` / non-x86 fallback-main pattern as
gridlake_field_tile; canonical ndarray::simd imports; fmt + clippy clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MLBnPuScZy6w9di2QEjsXM
The operator's factorization of M1: motion compensation in this substrate is
bit shift (integer motion = addressing, zero arithmetic — the deterministic
PLACE / VPGATHERDD) × transform no-op (the DCT a real codec puts after MC
collapses to identity when prediction is good) × shaping (the residue applied
directly as a shape, not transform-coded). M1 already IS this: recon =
shifted_ref + residual, no transform, and 62.5% of blocks had residual == 0
(transform fully absent).

This probe MEASURES the factorization as a tradeoff curve. All three codings
are orthonormal (equal PSNR at a fixed quant step Q); bytes = order-0 Shannon
entropy (ideal rANS). Residual lag-1 autocorrelation ρ is the motion-quality
proxy (good motion → white residual → ρ→0), because a transform cannot compress
white noise.

Measured (128x128, 8x8 blocks, Q=6):
   residual   ρ(meas)   direct    wht     dct   dct/dir  wht/dct
   ρ≈0.00     -0.001     9135    9579    9581   0.95x    1.00x
   ρ≈0.30      0.053     8386    8609    8608   0.97x    1.00x
   ρ≈0.60      0.419     7664    7147    7146   1.07x    1.00x
   ρ≈0.90      0.961     7641    3846    3754   2.04x    1.02x

Both falsifiable claims hold:
  1. transform no-op grows with motion quality — dct/dir → 1 (even below, 0.95x)
     as the residual whitens; the transform is a literal no-op in the good-motion
     regime and only earns its keep (2.04x) on structured residuals (poor motion),
     the regime good bit-shift avoids. The transform's value is inversely coupled
     to motion quality.
  2. a multiply-free sign transform suffices — wht/dct ≈ 1.00–1.02x across the
     whole sweep. The ±1 add/subtract Walsh–Hadamard transform (the shader's
     "zero FP, zero matmul" idiom) matches the full multiply DCT within 2%, even
     where the transform matters most. The substrate never needs a DCT.

So motion = bit shift (free) × transform no-op (WHT, vanishing as motion
improves) × shaping (direct residue) — one tradeoff curve, not three stages.
Ties to H-7 via the residue CellMode histogram. fmt + clippy clean, gated.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MLBnPuScZy6w9di2QEjsXM
@AdaWorldAPI AdaWorldAPI force-pushed the claude/motion-transform-noop branch from 23f7b2f to c62cb3f Compare July 4, 2026 10:55
AdaWorldAPI pushed a commit that referenced this pull request Jul 4, 2026
… — measured

The operator's claim: a gridlake's cell interdependency, treated as a field
operation, reduces to a BF16 16×16 AMX tile GEMM (TDPBF16PS) — the same shape as
the intercorrelation / perturbation in a Gaussian splat (the EWA covariance
sandwich Σ' = Mᵀ·Σ·M, shipped as hpc::splat3d::spd3::sandwich_x16).

Mechanically: a field operation whose output cell is a linear combination of
input cells is a linear operator C = A·B — a GEMM; the interdependency IS the
coupling matrix. At the gridlake tile granularity (16×16 — a quadrant of the
64×64 gridlake) that GEMM is exactly one hpc::bf16_tile_gemm::bf16_tile_gemm_16x16
call = one TDPBF16PS tile op. Same primitive as the codec separable transform
(#232: M·X, WHT/DCT on a tile) and the splat covariance projection (sandwich_x16).

Measured on the shipped kernel (this host: AMX TDPBF16PS, amx_available = true),
vs a direct f64 reference. Precision reported as Frobenius-relative
‖tile−direct‖_F/‖direct‖_F (the honest aggregate — a per-element max-relative
blows up on the near-zero entries a cancellation-heavy Mᵀ·Σ·M naturally has):

  (1) intercorrelation  C = Xᵀ·X          frobenius_rel_err = 0.095%  (one tile op)
  (2) covariance sandwich Σ' = Mᵀ·Σ·M      frobenius_rel_err = 0.401%  (two tile ops)
  (3) bit-exact on bf16-exact integer operands (|Σ| < 2^24): true
  (4) throughput: 1.22 M tile-ops/s

Conclusion: YES — the gridlake field interdependency reduces to one BF16 16×16
tile op, matching the direct reference to BF16 precision and bit-exact for
bf16-exact integer operands. Interdependency / intercorrelation / perturbation /
codec transform / covariance projection are ONE op: the 16×16 BF16 tile GEMM.
The 64×64 gridlake is 4×4 = 16 of these tiles.

fmt + clippy clean, gated required-features = ["std"].

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MLBnPuScZy6w9di2QEjsXM
AdaWorldAPI pushed a commit that referenced this pull request Jul 4, 2026
…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
@AdaWorldAPI AdaWorldAPI merged commit 1ea77e8 into master Jul 4, 2026
17 checks passed
AdaWorldAPI pushed a commit that referenced this pull request Jul 4, 2026
… — measured

The operator's claim: a gridlake's cell interdependency, treated as a field
operation, reduces to a BF16 16×16 AMX tile GEMM (TDPBF16PS) — the same shape as
the intercorrelation / perturbation in a Gaussian splat (the EWA covariance
sandwich Σ' = Mᵀ·Σ·M, shipped as hpc::splat3d::spd3::sandwich_x16).

Mechanically: a field operation whose output cell is a linear combination of
input cells is a linear operator C = A·B — a GEMM; the interdependency IS the
coupling matrix. At the gridlake tile granularity (16×16 — a quadrant of the
64×64 gridlake) that GEMM is exactly one hpc::bf16_tile_gemm::bf16_tile_gemm_16x16
call = one TDPBF16PS tile op. Same primitive as the codec separable transform
(#232: M·X, WHT/DCT on a tile) and the splat covariance projection (sandwich_x16).

Measured on the shipped kernel (this host: AMX TDPBF16PS, amx_available = true),
vs a direct f64 reference. Precision reported as Frobenius-relative
‖tile−direct‖_F/‖direct‖_F (the honest aggregate — a per-element max-relative
blows up on the near-zero entries a cancellation-heavy Mᵀ·Σ·M naturally has):

  (1) intercorrelation  C = Xᵀ·X          frobenius_rel_err = 0.095%  (one tile op)
  (2) covariance sandwich Σ' = Mᵀ·Σ·M      frobenius_rel_err = 0.401%  (two tile ops)
  (3) bit-exact on bf16-exact integer operands (|Σ| < 2^24): true
  (4) throughput: 1.22 M tile-ops/s

Conclusion: YES — the gridlake field interdependency reduces to one BF16 16×16
tile op, matching the direct reference to BF16 precision and bit-exact for
bf16-exact integer operands. Interdependency / intercorrelation / perturbation /
codec transform / covariance projection are ONE op: the 16×16 BF16 tile GEMM.
The 64×64 gridlake is 4×4 = 16 of these tiles.

fmt + clippy clean, gated required-features = ["std"].

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MLBnPuScZy6w9di2QEjsXM
AdaWorldAPI pushed a commit that referenced this pull request Jul 4, 2026
…VC 8-tap)

Next probe from the HEVC amortization map: HEVC fractional-pel motion
compensation applies a separable 8-tap FIR (half-pel luma taps
[-1,4,-11,40,40,-11,4,-1]/64). An FIR is a linear operator, so filtering a
16×16 block is a matrix product — one bf16_tile_gemm_16x16 per pass, and the
full separable H+V is Hᵀ·(X·H): the SAME two-tile sandwich shape as the splat
covariance projection (Mᵀ·Σ·M, #233) and the codec transform (M·X, #232).

Measured on real AMX (this host: AMX TDPBF16PS, amx_available = true), vs a
direct 8-tap FIR f64 reference (same 16×16 band operator, reflected edges, so
only BF16 rounding differs):

  (1) horizontal 8-tap  out = X·H       frobenius_rel_err = 0.157%  (one tile op)
  (2) separable H+V     out = Hᵀ·(X·H)  frobenius_rel_err = 0.215%  (two tile ops)
  (3) throughput: 1.22 M sub-pel tile ops/s

Both asserts pass (rel err < BF16 tolerance). Fractional-pel motion is therefore
"just another tile op", closing the MC story past integer-pel. R-5 dispatch noted
(per-block 8-tap butterfly below the batch crossover, batched tile GEMM above).

x86-gated via the same `mod amx` / non-x86 fallback-main pattern as
gridlake_field_tile; canonical ndarray::simd imports; fmt + clippy clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MLBnPuScZy6w9di2QEjsXM
AdaWorldAPI pushed a commit that referenced this pull request Jul 4, 2026
…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
AdaWorldAPI pushed a commit that referenced this pull request Jul 4, 2026
…VC 8-tap)

Next probe from the HEVC amortization map: HEVC fractional-pel motion
compensation applies a separable 8-tap FIR (half-pel luma taps
[-1,4,-11,40,40,-11,4,-1]/64). An FIR is a linear operator, so filtering a
16×16 block is a matrix product — one bf16_tile_gemm_16x16 per pass, and the
full separable H+V is Hᵀ·(X·H): the SAME two-tile sandwich shape as the splat
covariance projection (Mᵀ·Σ·M, #233) and the codec transform (M·X, #232).

Measured on real AMX (this host: AMX TDPBF16PS, amx_available = true), vs a
direct 8-tap FIR f64 reference (same 16×16 band operator, reflected edges, so
only BF16 rounding differs):

  (1) horizontal 8-tap  out = X·H       frobenius_rel_err = 0.157%  (one tile op)
  (2) separable H+V     out = Hᵀ·(X·H)  frobenius_rel_err = 0.215%  (two tile ops)
  (3) throughput: 1.22 M sub-pel tile ops/s

Both asserts pass (rel err < BF16 tolerance). Fractional-pel motion is therefore
"just another tile op", closing the MC story past integer-pel. R-5 dispatch noted
(per-block 8-tap butterfly below the batch crossover, batched tile GEMM above).

x86-gated via the same `mod amx` / non-x86 fallback-main pattern as
gridlake_field_tile; canonical ndarray::simd imports; fmt + clippy clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MLBnPuScZy6w9di2QEjsXM
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.

2 participants