FA-49441 / PCM sample encoding / Open access
Pcm progressive refinement: coarse scale · case 01
Progressive PCM scales coarse samples by bit count instead of bit weight.
ROOT CAUSE
Progressive PCM scales coarse samples by bit count instead of bit weight.
VERIFIED REPAIR
Use the stated conversion contract at coarse scale.
Unsuccessful approach: One extra shift doubles the coarse contribution.
Case contract
Restore PCM from arithmetic-shift coarse samples and optional unsigned low-bit refinements; missing refinement bits are zero and out-of-field residual bits are masked.
Why this case matters
Offline PCM interchange uses these exact bounded packet and sample representation decisions.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(coarse, residuals, missing_bits):
scale=missing_bits
out=[]
for index,base in enumerate(coarse):
tail=residuals[index] if index<len(residuals) else 0
tail &= scale-1
out.append(base*scale+tail)
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([1, -2, 3], [3, 1, 2], 2)), [7, -7, 14])
check('oracle 2', solve(*([-1, 0], [7, 4], 2)), [-1, 0])
check('oracle 3', solve(*([2, 3, 4], [1], 3)), [17, 24, 32])
check('oracle 4', solve(*([], [], 2)), [])
check('oracle 5', solve(*([1, -1], [0, 0], 0)), [1, -1])
check('oracle 6', solve(*([0, 0], [3, -1], 2)), [3, 3])
check('oracle 7', solve(*([3, -3], [2, 1], 1)), [6, -5])
if N == 1: check('variant packet 1', solve(*[[1, -2, 3, 1, -2, 3], [3, 1, 2], 2]), [7, -7, 14, 4, -8, 12])
if N == 2: check('variant packet 2', solve(*[[1, -2, 3, 1, -2, 3, 1, -2, 3], [3, 1, 2], 2]), [7, -7, 14, 4, -8, 12, 4, -8, 12])
if N == 3: check('variant packet 3', solve(*[[1, -2, 3, 1, -2, 3, 1, -2, 3, 1, -2, 3], [3, 1, 2], 2]), [7, -7, 14, 4, -8, 12, 4, -8, 12, 4, -8, 12])
if N == 4: check('variant packet 4', solve(*[[1, -2, 3, 1, -2, 3, 1, -2, 3, 1, -2, 3, 1, -2, 3], [3, 1, 2], 2]), [7, -7, 14, 4, -8, 12, 4, -8, 12, 4, -8, 12, 4, -8, 12])
if N == 5: check('variant packet 5', solve(*[[1, -2, 3, 1, -2, 3, 1, -2, 3, 1, -2, 3, 1, -2, 3, 1, -2, 3], [3, 1, 2], 2]), [7, -7, 14, 4, -8, 12, 4, -8, 12, 4, -8, 12, 4, -8, 12, 4, -8, 12])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| oracle 1 | [3, -3, 6] | [7, -7, 14] | Failed |
| oracle 2 | [-1, 0] | [-1, 0] | Passed |
| oracle 3 | [6, 9, 12] | [17, 24, 32] | Failed |
| oracle 4 | [] | [] | Passed |
| oracle 5 | [0, 0] | [1, -1] | Failed |
| oracle 6 | [1, 1] | [3, 3] | Failed |
| oracle 7 | [3, -3] | [6, -5] | Failed |
| variant packet 1 | [3, -3, 6, 2, -4, 6] | [7, -7, 14, 4, -8, 12] | Failed |
SHA-256 / 47fab77a56664105839b1a1bafb6ca3e9382ddb2cc0dc94fddb5ef93b4e1a2b0
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(coarse, residuals, missing_bits):
scale=1<<(missing_bits+1)
out=[]
for index,base in enumerate(coarse):
tail=residuals[index] if index<len(residuals) else 0
tail &= scale-1
out.append(base*scale+tail)
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([1, -2, 3], [3, 1, 2], 2)), [7, -7, 14])
check('oracle 2', solve(*([-1, 0], [7, 4], 2)), [-1, 0])
check('oracle 3', solve(*([2, 3, 4], [1], 3)), [17, 24, 32])
check('oracle 4', solve(*([], [], 2)), [])
check('oracle 5', solve(*([1, -1], [0, 0], 0)), [1, -1])
check('oracle 6', solve(*([0, 0], [3, -1], 2)), [3, 3])
check('oracle 7', solve(*([3, -3], [2, 1], 1)), [6, -5])
if N == 1: check('variant packet 1', solve(*[[1, -2, 3, 1, -2, 3], [3, 1, 2], 2]), [7, -7, 14, 4, -8, 12])
if N == 2: check('variant packet 2', solve(*[[1, -2, 3, 1, -2, 3, 1, -2, 3], [3, 1, 2], 2]), [7, -7, 14, 4, -8, 12, 4, -8, 12])
if N == 3: check('variant packet 3', solve(*[[1, -2, 3, 1, -2, 3, 1, -2, 3, 1, -2, 3], [3, 1, 2], 2]), [7, -7, 14, 4, -8, 12, 4, -8, 12, 4, -8, 12])
if N == 4: check('variant packet 4', solve(*[[1, -2, 3, 1, -2, 3, 1, -2, 3, 1, -2, 3, 1, -2, 3], [3, 1, 2], 2]), [7, -7, 14, 4, -8, 12, 4, -8, 12, 4, -8, 12, 4, -8, 12])
if N == 5: check('variant packet 5', solve(*[[1, -2, 3, 1, -2, 3, 1, -2, 3, 1, -2, 3, 1, -2, 3, 1, -2, 3], [3, 1, 2], 2]), [7, -7, 14, 4, -8, 12, 4, -8, 12, 4, -8, 12, 4, -8, 12, 4, -8, 12])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| oracle 1 | [11, -15, 26] | [7, -7, 14] | Failed |
| oracle 2 | [-1, 4] | [-1, 0] | Failed |
| oracle 3 | [33, 48, 64] | [17, 24, 32] | Failed |
| oracle 4 | [] | [] | Passed |
| oracle 5 | [2, -2] | [1, -1] | Failed |
| oracle 6 | [3, 7] | [3, 3] | Failed |
| oracle 7 | [14, -11] | [6, -5] | Failed |
| variant packet 1 | [11, -15, 26, 8, -16, 24] | [7, -7, 14, 4, -8, 12] | Failed |
SHA-256 / 360024baf5e9a9e92450ff98cb89493e4ff513c13542502cba53120512b645c1
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(coarse, residuals, missing_bits):
scale=1<<missing_bits
out=[]
for index,base in enumerate(coarse):
tail=residuals[index] if index<len(residuals) else 0
tail &= scale-1
out.append(base*scale+tail)
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([1, -2, 3], [3, 1, 2], 2)), [7, -7, 14])
check('oracle 2', solve(*([-1, 0], [7, 4], 2)), [-1, 0])
check('oracle 3', solve(*([2, 3, 4], [1], 3)), [17, 24, 32])
check('oracle 4', solve(*([], [], 2)), [])
check('oracle 5', solve(*([1, -1], [0, 0], 0)), [1, -1])
check('oracle 6', solve(*([0, 0], [3, -1], 2)), [3, 3])
check('oracle 7', solve(*([3, -3], [2, 1], 1)), [6, -5])
if N == 1: check('variant packet 1', solve(*[[1, -2, 3, 1, -2, 3], [3, 1, 2], 2]), [7, -7, 14, 4, -8, 12])
if N == 2: check('variant packet 2', solve(*[[1, -2, 3, 1, -2, 3, 1, -2, 3], [3, 1, 2], 2]), [7, -7, 14, 4, -8, 12, 4, -8, 12])
if N == 3: check('variant packet 3', solve(*[[1, -2, 3, 1, -2, 3, 1, -2, 3, 1, -2, 3], [3, 1, 2], 2]), [7, -7, 14, 4, -8, 12, 4, -8, 12, 4, -8, 12])
if N == 4: check('variant packet 4', solve(*[[1, -2, 3, 1, -2, 3, 1, -2, 3, 1, -2, 3, 1, -2, 3], [3, 1, 2], 2]), [7, -7, 14, 4, -8, 12, 4, -8, 12, 4, -8, 12, 4, -8, 12])
if N == 5: check('variant packet 5', solve(*[[1, -2, 3, 1, -2, 3, 1, -2, 3, 1, -2, 3, 1, -2, 3, 1, -2, 3], [3, 1, 2], 2]), [7, -7, 14, 4, -8, 12, 4, -8, 12, 4, -8, 12, 4, -8, 12, 4, -8, 12])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| oracle 1 | [7, -7, 14] | [7, -7, 14] | Passed |
| oracle 2 | [-1, 0] | [-1, 0] | Passed |
| oracle 3 | [17, 24, 32] | [17, 24, 32] | Passed |
| oracle 4 | [] | [] | Passed |
| oracle 5 | [1, -1] | [1, -1] | Passed |
| oracle 6 | [3, 3] | [3, 3] | Passed |
| oracle 7 | [6, -5] | [6, -5] | Passed |
| variant packet 1 | [7, -7, 14, 4, -8, 12] | [7, -7, 14, 4, -8, 12] | Passed |
SHA-256 / 8bea1a4700c378aff21411c9a049fc5b0a4e68405eb7934ec7cfee54df52d31f
Verification & scope
Stipulated finite model; no claim of hardware timing or full file-format conformance. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.
Observations recorded using Python 3.12.14 at 2026-09-29T14:44:59.951721+00:00.
Case digest / dcda0f3072a7bab51802c3db10a3cd1c9cddaf220ae45572b4efd8f5ada3adad