FAILURE MAP
← Case archive

FA-49716 / PCM sample encoding / Open access

Pcm adaptive nibble reconstruction: base reconstruction · case 01

Adaptive PCM code reconstruction omits its half-bin base increment.

Verified by executionVariant 1 · 8 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Adaptive PCM code reconstruction omits its half-bin base increment.

VERIFIED REPAIR

Use the stated conversion contract at base reconstruction.

Unsuccessful approach: Using a full low-bit increment doubles the base reconstruction offset.

Case contract

Stipulated bounded adaptive differential PCM nibble model with a 16-entry step table, magnitude adaptation, signed predictor saturation and exported predictor/index state.

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, predictor, step_index):
    steps=[7,8,9,10,11,12,13,14,16,17,19,21,23,25,28,31]
    adjust=[-1,-1,-1,-1,2,4,6,8]
    out=[]
    for code in codes:
        step=steps[step_index]
        delta=0
        if code&1: delta+=step//4
        if code&2: delta+=step//2
        if code&4: delta+=step
        predictor+=-delta if code&8 else delta
        predictor=max(-128,min(127,predictor))
        step_index=max(0,min(len(steps)-1,step_index+adjust[code&7]))
        out.append(predictor)
    return [out,predictor,step_index]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([0, 1, 2, 3, 4, 7, 8, 15], 0, 4)), [[1, 4, 9, 16, 23, 39, 37, 6], 6, 15])
check('oracle 2', solve(*([7, 7, 7], 120, 14)), [[127, 127, 127], 127, 15])
check('oracle 3', solve(*([15, 15], -120, 15)), [[-128, -128], -128, 15])
check('oracle 4', solve(*([], 4, 2)), [[], 4, 2])
check('oracle 5', solve(*([0, 0, 0], 0, 1)), [[1, 1, 1], 1, 0])
check('oracle 6', solve(*([4, 12, 6, 14], 3, 8)), [[21, 0, 36, -13], -13, 15])
check('oracle 7', solve(*([1, 9, 2, 10], -4, 5)), [[0, -3, 3, -2], -2, 1])
if N == 1: check('variant packet 1', solve(*[[0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15], 0, 4]), [[1, 4, 9, 16, 23, 39, 37, 6, 9, 19, 34, 52, 75, 121, 118, 66], 66, 15])
if N == 2: check('variant packet 2', solve(*[[0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15], 0, 4]), [[1, 4, 9, 16, 23, 39, 37, 6, 9, 19, 34, 52, 75, 121, 118, 66, 69, 79, 94, 112, 127, 127, 124, 72], 72, 15])
if N == 3: check('variant packet 3', solve(*[[0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15], 0, 4]), [[1, 4, 9, 16, 23, 39, 37, 6, 9, 19, 34, 52, 75, 121, 118, 66, 69, 79, 94, 112, 127, 127, 124, 72, 75, 85, 100, 118, 127, 127, 124, 72], 72, 15])
if N == 4: check('variant packet 4', solve(*[[0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15], 0, 4]), [[1, 4, 9, 16, 23, 39, 37, 6, 9, 19, 34, 52, 75, 121, 118, 66, 69, 79, 94, 112, 127, 127, 124, 72, 75, 85, 100, 118, 127, 127, 124, 72, 75, 85, 100, 118, 127, 127, 124, 72], 72, 15])
if N == 5: check('variant packet 5', solve(*[[0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15], 0, 4]), [[1, 4, 9, 16, 23, 39, 37, 6, 9, 19, 34, 52, 75, 121, 118, 66, 69, 79, 94, 112, 127, 127, 124, 72, 75, 85, 100, 118, 127, 127, 124, 72, 75, 85, 100, 118, 127, 127, 124, 72, 75, 85, 100, 118, 127, 127, 124, 72], 72, 15])
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 fixtureActualExpectedOutcome
oracle 1[[0, 2, 6, 12, 19, 34, 34, 5], 5, 15][[1, 4, 9, 16, 23, 39, 37, 6], 6, 15]Failed
oracle 2[[127, 127, 127], 127, 15][[127, 127, 127], 127, 15]Passed
oracle 3[[-128, -128], -128, 15][[-128, -128], -128, 15]Passed
oracle 4[[], 4, 2][[], 4, 2]Passed
oracle 5[[0, 0, 0], 0, 0][[1, 1, 1], 1, 0]Failed
oracle 6[[19, 0, 34, -12], -12, 15][[21, 0, 36, -13], -13, 15]Failed
oracle 7[[-1, -3, 2, -2], -2, 1][[0, -3, 3, -2], -2, 1]Failed
variant packet 1[[0, 2, 6, 12, 19, 34, 34, 5, 5, 12, 24, 40, 61, 104, 104, 55], 55, 15][[1, 4, 9, 16, 23, 39, 37, 6, 9, 19, 34, 52, 75, 121, 118, 66], 66, 15]Failed

SHA-256 / 33b80c091c37d55c41d72d30d85f3926d83d67cc333988b693fdbfec4616ea16

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(codes, predictor, step_index):
    steps=[7,8,9,10,11,12,13,14,16,17,19,21,23,25,28,31]
    adjust=[-1,-1,-1,-1,2,4,6,8]
    out=[]
    for code in codes:
        step=steps[step_index]
        delta=step//4
        if code&1: delta+=step//4
        if code&2: delta+=step//2
        if code&4: delta+=step
        predictor+=-delta if code&8 else delta
        predictor=max(-128,min(127,predictor))
        step_index=max(0,min(len(steps)-1,step_index+adjust[code&7]))
        out.append(predictor)
    return [out,predictor,step_index]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([0, 1, 2, 3, 4, 7, 8, 15], 0, 4)), [[1, 4, 9, 16, 23, 39, 37, 6], 6, 15])
check('oracle 2', solve(*([7, 7, 7], 120, 14)), [[127, 127, 127], 127, 15])
check('oracle 3', solve(*([15, 15], -120, 15)), [[-128, -128], -128, 15])
check('oracle 4', solve(*([], 4, 2)), [[], 4, 2])
check('oracle 5', solve(*([0, 0, 0], 0, 1)), [[1, 1, 1], 1, 0])
check('oracle 6', solve(*([4, 12, 6, 14], 3, 8)), [[21, 0, 36, -13], -13, 15])
check('oracle 7', solve(*([1, 9, 2, 10], -4, 5)), [[0, -3, 3, -2], -2, 1])
if N == 1: check('variant packet 1', solve(*[[0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15], 0, 4]), [[1, 4, 9, 16, 23, 39, 37, 6, 9, 19, 34, 52, 75, 121, 118, 66], 66, 15])
if N == 2: check('variant packet 2', solve(*[[0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15], 0, 4]), [[1, 4, 9, 16, 23, 39, 37, 6, 9, 19, 34, 52, 75, 121, 118, 66, 69, 79, 94, 112, 127, 127, 124, 72], 72, 15])
if N == 3: check('variant packet 3', solve(*[[0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15], 0, 4]), [[1, 4, 9, 16, 23, 39, 37, 6, 9, 19, 34, 52, 75, 121, 118, 66, 69, 79, 94, 112, 127, 127, 124, 72, 75, 85, 100, 118, 127, 127, 124, 72], 72, 15])
if N == 4: check('variant packet 4', solve(*[[0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15], 0, 4]), [[1, 4, 9, 16, 23, 39, 37, 6, 9, 19, 34, 52, 75, 121, 118, 66, 69, 79, 94, 112, 127, 127, 124, 72, 75, 85, 100, 118, 127, 127, 124, 72, 75, 85, 100, 118, 127, 127, 124, 72], 72, 15])
if N == 5: check('variant packet 5', solve(*[[0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15], 0, 4]), [[1, 4, 9, 16, 23, 39, 37, 6, 9, 19, 34, 52, 75, 121, 118, 66, 69, 79, 94, 112, 127, 127, 124, 72, 75, 85, 100, 118, 127, 127, 124, 72, 75, 85, 100, 118, 127, 127, 124, 72, 75, 85, 100, 118, 127, 127, 124, 72], 72, 15])
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 fixtureActualExpectedOutcome
oracle 1[[2, 6, 12, 20, 28, 45, 41, 8], 8, 15][[1, 4, 9, 16, 23, 39, 37, 6], 6, 15]Failed
oracle 2[[127, 127, 127], 127, 15][[127, 127, 127], 127, 15]Passed
oracle 3[[-128, -128], -128, 15][[-128, -128], -128, 15]Passed
oracle 4[[], 4, 2][[], 4, 2]Passed
oracle 5[[2, 3, 4], 4, 0][[1, 1, 1], 1, 0]Failed
oracle 6[[23, 0, 39, -14], -14, 15][[21, 0, 36, -13], -13, 15]Failed
oracle 7[[2, -2, 5, -1], -1, 1][[0, -3, 3, -2], -2, 1]Failed
variant packet 1[[2, 6, 12, 20, 28, 45, 41, 8, 15, 29, 47, 68, 94, 127, 120, 64], 64, 15][[1, 4, 9, 16, 23, 39, 37, 6, 9, 19, 34, 52, 75, 121, 118, 66], 66, 15]Failed

SHA-256 / 3aeebf8d329f4f921f96dc2a2ca007d9f2ee2f1ae526a86a03f15ded74f1887e

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(codes, predictor, step_index):
    steps=[7,8,9,10,11,12,13,14,16,17,19,21,23,25,28,31]
    adjust=[-1,-1,-1,-1,2,4,6,8]
    out=[]
    for code in codes:
        step=steps[step_index]
        delta=step//8
        if code&1: delta+=step//4
        if code&2: delta+=step//2
        if code&4: delta+=step
        predictor+=-delta if code&8 else delta
        predictor=max(-128,min(127,predictor))
        step_index=max(0,min(len(steps)-1,step_index+adjust[code&7]))
        out.append(predictor)
    return [out,predictor,step_index]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([0, 1, 2, 3, 4, 7, 8, 15], 0, 4)), [[1, 4, 9, 16, 23, 39, 37, 6], 6, 15])
check('oracle 2', solve(*([7, 7, 7], 120, 14)), [[127, 127, 127], 127, 15])
check('oracle 3', solve(*([15, 15], -120, 15)), [[-128, -128], -128, 15])
check('oracle 4', solve(*([], 4, 2)), [[], 4, 2])
check('oracle 5', solve(*([0, 0, 0], 0, 1)), [[1, 1, 1], 1, 0])
check('oracle 6', solve(*([4, 12, 6, 14], 3, 8)), [[21, 0, 36, -13], -13, 15])
check('oracle 7', solve(*([1, 9, 2, 10], -4, 5)), [[0, -3, 3, -2], -2, 1])
if N == 1: check('variant packet 1', solve(*[[0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15], 0, 4]), [[1, 4, 9, 16, 23, 39, 37, 6, 9, 19, 34, 52, 75, 121, 118, 66], 66, 15])
if N == 2: check('variant packet 2', solve(*[[0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15], 0, 4]), [[1, 4, 9, 16, 23, 39, 37, 6, 9, 19, 34, 52, 75, 121, 118, 66, 69, 79, 94, 112, 127, 127, 124, 72], 72, 15])
if N == 3: check('variant packet 3', solve(*[[0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15], 0, 4]), [[1, 4, 9, 16, 23, 39, 37, 6, 9, 19, 34, 52, 75, 121, 118, 66, 69, 79, 94, 112, 127, 127, 124, 72, 75, 85, 100, 118, 127, 127, 124, 72], 72, 15])
if N == 4: check('variant packet 4', solve(*[[0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15], 0, 4]), [[1, 4, 9, 16, 23, 39, 37, 6, 9, 19, 34, 52, 75, 121, 118, 66, 69, 79, 94, 112, 127, 127, 124, 72, 75, 85, 100, 118, 127, 127, 124, 72, 75, 85, 100, 118, 127, 127, 124, 72], 72, 15])
if N == 5: check('variant packet 5', solve(*[[0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15], 0, 4]), [[1, 4, 9, 16, 23, 39, 37, 6, 9, 19, 34, 52, 75, 121, 118, 66, 69, 79, 94, 112, 127, 127, 124, 72, 75, 85, 100, 118, 127, 127, 124, 72, 75, 85, 100, 118, 127, 127, 124, 72, 75, 85, 100, 118, 127, 127, 124, 72], 72, 15])
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 fixtureActualExpectedOutcome
oracle 1[[1, 4, 9, 16, 23, 39, 37, 6], 6, 15][[1, 4, 9, 16, 23, 39, 37, 6], 6, 15]Passed
oracle 2[[127, 127, 127], 127, 15][[127, 127, 127], 127, 15]Passed
oracle 3[[-128, -128], -128, 15][[-128, -128], -128, 15]Passed
oracle 4[[], 4, 2][[], 4, 2]Passed
oracle 5[[1, 1, 1], 1, 0][[1, 1, 1], 1, 0]Passed
oracle 6[[21, 0, 36, -13], -13, 15][[21, 0, 36, -13], -13, 15]Passed
oracle 7[[0, -3, 3, -2], -2, 1][[0, -3, 3, -2], -2, 1]Passed
variant packet 1[[1, 4, 9, 16, 23, 39, 37, 6, 9, 19, 34, 52, 75, 121, 118, 66], 66, 15][[1, 4, 9, 16, 23, 39, 37, 6, 9, 19, 34, 52, 75, 121, 118, 66], 66, 15]Passed

SHA-256 / 2a132c685144716a4dd75f0dc0256939536edea1d2b830a2fdf440014140e03c

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:02.477063+00:00.

Case digest / 022b9b7220b20df85c4b83b240476cc8b4d6c7f5ce5798fc98124729e3da53a7