FA-49826 / PCM sample encoding / Open access
Pcm adaptation table: fixed point scale · case 01
Adaptation factor uses the wrong binary fixed-point denominator.
ROOT CAUSE
Adaptation factor uses the wrong binary fixed-point denominator.
VERIFIED REPAIR
Use the stated conversion contract at fixed point scale.
Unsuccessful approach: Removing normalization explodes step size on every sample.
Case contract
Apply a stipulated 16-code fixed-point PCM adaptation table sequentially, enforcing a minimum positive amplitude delta and returning continuation scale.
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(codes, delta, minimum, table):
out=[]
for code in codes:
factor=table[code&15]
product=delta*factor
delta=max(minimum,product//128)
out.append(delta)
return [out,delta]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([0, 7, 8, 15], 20, 4, [230, 230, 230, 230, 307, 409, 512, 614, 614, 512, 409, 307, 230, 230, 230, 230])), [[17, 40, 95, 85], 85])
check('oracle 2', solve(*([0, 0, 0, 0], 5, 4, [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128])), [[4, 4, 4, 4], 4])
check('oracle 3', solve(*([1, 2, 3], 10, 1, [200, 210, 220, 230, 240, 250, 260, 270, 280, 290, 300, 310, 320, 330, 340, 350])), [[8, 6, 5], 5])
check('oracle 4', solve(*([], 8, 2, [256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256])), [[], 8])
check('oracle 5', solve(*([15, 8, 0], 9, 3, [200, 208, 216, 224, 232, 240, 248, 256, 264, 272, 280, 288, 296, 304, 312, 320])), [[11, 11, 8], 8])
check('oracle 6', solve(*([7, 7], 4, 4, [256, 256, 256, 256, 256, 256, 256, 512, 256, 256, 256, 256, 256, 256, 256, 256])), [[8, 16], 16])
check('oracle 7', solve(*([0, 1], 1, 1, [128, 768, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256])), [[1, 3], 3])
if N == 1: check('variant packet 1', solve(*[[0, 7, 8, 15, 0, 7, 8, 15], 20, 4, [230, 230, 230, 230, 307, 409, 512, 614, 614, 512, 409, 307, 230, 230, 230, 230]]), [[17, 40, 95, 85, 76, 182, 436, 391], 391])
if N == 2: check('variant packet 2', solve(*[[0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15], 20, 4, [230, 230, 230, 230, 307, 409, 512, 614, 614, 512, 409, 307, 230, 230, 230, 230]]), [[17, 40, 95, 85, 76, 182, 436, 391, 351, 841, 2017, 1812], 1812])
if N == 3: check('variant packet 3', solve(*[[0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15], 20, 4, [230, 230, 230, 230, 307, 409, 512, 614, 614, 512, 409, 307, 230, 230, 230, 230]]), [[17, 40, 95, 85, 76, 182, 436, 391, 351, 841, 2017, 1812, 1627, 3902, 9358, 8407], 8407])
if N == 4: check('variant packet 4', solve(*[[0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15], 20, 4, [230, 230, 230, 230, 307, 409, 512, 614, 614, 512, 409, 307, 230, 230, 230, 230]]), [[17, 40, 95, 85, 76, 182, 436, 391, 351, 841, 2017, 1812, 1627, 3902, 9358, 8407, 7553, 18115, 43447, 39034], 39034])
if N == 5: check('variant packet 5', solve(*[[0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15], 20, 4, [230, 230, 230, 230, 307, 409, 512, 614, 614, 512, 409, 307, 230, 230, 230, 230]]), [[17, 40, 95, 85, 76, 182, 436, 391, 351, 841, 2017, 1812, 1627, 3902, 9358, 8407, 7553, 18115, 43447, 39034, 35069, 84110, 201732, 181243], 181243])
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 | [[35, 167, 801, 1439], 1439] | [[17, 40, 95, 85], 85] | Failed |
| oracle 2 | [[5, 5, 5, 5], 5] | [[4, 4, 4, 4], 4] | Failed |
| oracle 3 | [[16, 27, 48], 48] | [[8, 6, 5], 5] | Failed |
| oracle 4 | [[], 8] | [[], 8] | Passed |
| oracle 5 | [[22, 45, 70], 70] | [[11, 11, 8], 8] | Failed |
| oracle 6 | [[16, 64], 64] | [[8, 16], 16] | Failed |
| oracle 7 | [[1, 6], 6] | [[1, 3], 3] | Failed |
| variant packet 1 | [[35, 167, 801, 1439, 2585, 12399, 59476, 106870], 106870] | [[17, 40, 95, 85, 76, 182, 436, 391], 391] | Failed |
SHA-256 / b9e8972a610f9a0be5fd63aa7ec4f9eb94b6b0ab781c510f5fcca3cbd7bde4a1
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(codes, delta, minimum, table):
out=[]
for code in codes:
factor=table[code&15]
product=delta*factor
delta=max(minimum,product)
out.append(delta)
return [out,delta]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([0, 7, 8, 15], 20, 4, [230, 230, 230, 230, 307, 409, 512, 614, 614, 512, 409, 307, 230, 230, 230, 230])), [[17, 40, 95, 85], 85])
check('oracle 2', solve(*([0, 0, 0, 0], 5, 4, [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128])), [[4, 4, 4, 4], 4])
check('oracle 3', solve(*([1, 2, 3], 10, 1, [200, 210, 220, 230, 240, 250, 260, 270, 280, 290, 300, 310, 320, 330, 340, 350])), [[8, 6, 5], 5])
check('oracle 4', solve(*([], 8, 2, [256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256])), [[], 8])
check('oracle 5', solve(*([15, 8, 0], 9, 3, [200, 208, 216, 224, 232, 240, 248, 256, 264, 272, 280, 288, 296, 304, 312, 320])), [[11, 11, 8], 8])
check('oracle 6', solve(*([7, 7], 4, 4, [256, 256, 256, 256, 256, 256, 256, 512, 256, 256, 256, 256, 256, 256, 256, 256])), [[8, 16], 16])
check('oracle 7', solve(*([0, 1], 1, 1, [128, 768, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256])), [[1, 3], 3])
if N == 1: check('variant packet 1', solve(*[[0, 7, 8, 15, 0, 7, 8, 15], 20, 4, [230, 230, 230, 230, 307, 409, 512, 614, 614, 512, 409, 307, 230, 230, 230, 230]]), [[17, 40, 95, 85, 76, 182, 436, 391], 391])
if N == 2: check('variant packet 2', solve(*[[0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15], 20, 4, [230, 230, 230, 230, 307, 409, 512, 614, 614, 512, 409, 307, 230, 230, 230, 230]]), [[17, 40, 95, 85, 76, 182, 436, 391, 351, 841, 2017, 1812], 1812])
if N == 3: check('variant packet 3', solve(*[[0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15], 20, 4, [230, 230, 230, 230, 307, 409, 512, 614, 614, 512, 409, 307, 230, 230, 230, 230]]), [[17, 40, 95, 85, 76, 182, 436, 391, 351, 841, 2017, 1812, 1627, 3902, 9358, 8407], 8407])
if N == 4: check('variant packet 4', solve(*[[0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15], 20, 4, [230, 230, 230, 230, 307, 409, 512, 614, 614, 512, 409, 307, 230, 230, 230, 230]]), [[17, 40, 95, 85, 76, 182, 436, 391, 351, 841, 2017, 1812, 1627, 3902, 9358, 8407, 7553, 18115, 43447, 39034], 39034])
if N == 5: check('variant packet 5', solve(*[[0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15], 20, 4, [230, 230, 230, 230, 307, 409, 512, 614, 614, 512, 409, 307, 230, 230, 230, 230]]), [[17, 40, 95, 85, 76, 182, 436, 391, 351, 841, 2017, 1812, 1627, 3902, 9358, 8407, 7553, 18115, 43447, 39034, 35069, 84110, 201732, 181243], 181243])
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 | [[4600, 2824400, 1734181600, 398861768000], 398861768000] | [[17, 40, 95, 85], 85] | Failed |
| oracle 2 | [[640, 81920, 10485760, 1342177280], 1342177280] | [[4, 4, 4, 4], 4] | Failed |
| oracle 3 | [[2100, 462000, 106260000], 106260000] | [[8, 6, 5], 5] | Failed |
| oracle 4 | [[], 8] | [[], 8] | Passed |
| oracle 5 | [[2880, 760320, 152064000], 152064000] | [[11, 11, 8], 8] | Failed |
| oracle 6 | [[2048, 1048576], 1048576] | [[8, 16], 16] | Failed |
| oracle 7 | [[128, 98304], 98304] | [[1, 3], 3] | Failed |
| variant packet 1 | [[4600, 2824400, 1734181600, 398861768000, 91738206640000, 56327258876960000, 34584936950453440000, 7954535498604291200000], 7954535498604291200000] | [[17, 40, 95, 85, 76, 182, 436, 391], 391] | Failed |
SHA-256 / 457433e6056a09a1c0253868921e70713726d6feeba5b7103819f9eacc514e1a
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(codes, delta, minimum, table):
out=[]
for code in codes:
factor=table[code&15]
product=delta*factor
delta=max(minimum,product//256)
out.append(delta)
return [out,delta]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([0, 7, 8, 15], 20, 4, [230, 230, 230, 230, 307, 409, 512, 614, 614, 512, 409, 307, 230, 230, 230, 230])), [[17, 40, 95, 85], 85])
check('oracle 2', solve(*([0, 0, 0, 0], 5, 4, [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128])), [[4, 4, 4, 4], 4])
check('oracle 3', solve(*([1, 2, 3], 10, 1, [200, 210, 220, 230, 240, 250, 260, 270, 280, 290, 300, 310, 320, 330, 340, 350])), [[8, 6, 5], 5])
check('oracle 4', solve(*([], 8, 2, [256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256])), [[], 8])
check('oracle 5', solve(*([15, 8, 0], 9, 3, [200, 208, 216, 224, 232, 240, 248, 256, 264, 272, 280, 288, 296, 304, 312, 320])), [[11, 11, 8], 8])
check('oracle 6', solve(*([7, 7], 4, 4, [256, 256, 256, 256, 256, 256, 256, 512, 256, 256, 256, 256, 256, 256, 256, 256])), [[8, 16], 16])
check('oracle 7', solve(*([0, 1], 1, 1, [128, 768, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256])), [[1, 3], 3])
if N == 1: check('variant packet 1', solve(*[[0, 7, 8, 15, 0, 7, 8, 15], 20, 4, [230, 230, 230, 230, 307, 409, 512, 614, 614, 512, 409, 307, 230, 230, 230, 230]]), [[17, 40, 95, 85, 76, 182, 436, 391], 391])
if N == 2: check('variant packet 2', solve(*[[0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15], 20, 4, [230, 230, 230, 230, 307, 409, 512, 614, 614, 512, 409, 307, 230, 230, 230, 230]]), [[17, 40, 95, 85, 76, 182, 436, 391, 351, 841, 2017, 1812], 1812])
if N == 3: check('variant packet 3', solve(*[[0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15], 20, 4, [230, 230, 230, 230, 307, 409, 512, 614, 614, 512, 409, 307, 230, 230, 230, 230]]), [[17, 40, 95, 85, 76, 182, 436, 391, 351, 841, 2017, 1812, 1627, 3902, 9358, 8407], 8407])
if N == 4: check('variant packet 4', solve(*[[0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15], 20, 4, [230, 230, 230, 230, 307, 409, 512, 614, 614, 512, 409, 307, 230, 230, 230, 230]]), [[17, 40, 95, 85, 76, 182, 436, 391, 351, 841, 2017, 1812, 1627, 3902, 9358, 8407, 7553, 18115, 43447, 39034], 39034])
if N == 5: check('variant packet 5', solve(*[[0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15], 20, 4, [230, 230, 230, 230, 307, 409, 512, 614, 614, 512, 409, 307, 230, 230, 230, 230]]), [[17, 40, 95, 85, 76, 182, 436, 391, 351, 841, 2017, 1812, 1627, 3902, 9358, 8407, 7553, 18115, 43447, 39034, 35069, 84110, 201732, 181243], 181243])
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 | [[17, 40, 95, 85], 85] | [[17, 40, 95, 85], 85] | Passed |
| oracle 2 | [[4, 4, 4, 4], 4] | [[4, 4, 4, 4], 4] | Passed |
| oracle 3 | [[8, 6, 5], 5] | [[8, 6, 5], 5] | Passed |
| oracle 4 | [[], 8] | [[], 8] | Passed |
| oracle 5 | [[11, 11, 8], 8] | [[11, 11, 8], 8] | Passed |
| oracle 6 | [[8, 16], 16] | [[8, 16], 16] | Passed |
| oracle 7 | [[1, 3], 3] | [[1, 3], 3] | Passed |
| variant packet 1 | [[17, 40, 95, 85, 76, 182, 436, 391], 391] | [[17, 40, 95, 85, 76, 182, 436, 391], 391] | Passed |
SHA-256 / ac398c765caeb6f955461bf73fe9a2e69eb45dc120cf4f4fe5f557e917274543
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:45:03.588314+00:00.
Case digest / 0cfa9165f6a19084fc89e0e1a4e2b6e9c36db6091f4d983935400c4656d6baf1