FAILURE MAP
← Case archive

FA-49276 / PCM sample encoding / Open access

Pcm mid side lifting: mid base · case 01

Lifting adds half-side to left instead of right.

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

ROOT CAUSE

Lifting adds half-side to left instead of right.

VERIFIED REPAIR

Use the stated conversion contract at mid base.

Unsuccessful approach: Omitting the base channel loses common-mode amplitude.

Case contract

Encode stereo integer PCM through reversible floor lifting: side=L-R, mid=R+floor(side/2), with an explicit odd-side parity sideband.

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(pairs):
    out=[]
    for left,right in pairs:
        side=left-right
        half=side//2
        mid=left+half
        parity=side&1
        out.append([mid,side,parity])
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([[5, 2], [2, 5]],)), [[3, 3, 1], [3, -3, 1]])
check('oracle 2', solve(*([[0, 0], [1, 1]],)), [[0, 0, 0], [1, 0, 0]])
check('oracle 3', solve(*([[-3, 2], [4, -1]],)), [[-1, -5, 1], [1, 5, 1]])
check('oracle 4', solve(*([],)), [])
check('oracle 5', solve(*([[1, 0], [0, 1]],)), [[0, 1, 1], [0, -1, 1]])
check('oracle 6', solve(*([[7, 7], [-7, -7]],)), [[7, 0, 0], [-7, 0, 0]])
check('oracle 7', solve(*([[3, 1], [-3, -1]],)), [[2, 2, 0], [-2, -2, 0]])
if N == 1: check('variant packet 1', solve(*[[[5, 2], [2, 5], [5, 2], [2, 5]]]), [[3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1]])
if N == 2: check('variant packet 2', solve(*[[[5, 2], [2, 5], [5, 2], [2, 5], [5, 2], [2, 5]]]), [[3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1]])
if N == 3: check('variant packet 3', solve(*[[[5, 2], [2, 5], [5, 2], [2, 5], [5, 2], [2, 5], [5, 2], [2, 5]]]), [[3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1]])
if N == 4: check('variant packet 4', solve(*[[[5, 2], [2, 5], [5, 2], [2, 5], [5, 2], [2, 5], [5, 2], [2, 5], [5, 2], [2, 5]]]), [[3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1]])
if N == 5: check('variant packet 5', solve(*[[[5, 2], [2, 5], [5, 2], [2, 5], [5, 2], [2, 5], [5, 2], [2, 5], [5, 2], [2, 5], [5, 2], [2, 5]]]), [[3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1]])
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[[6, 3, 1], [0, -3, 1]][[3, 3, 1], [3, -3, 1]]Failed
oracle 2[[0, 0, 0], [1, 0, 0]][[0, 0, 0], [1, 0, 0]]Passed
oracle 3[[-6, -5, 1], [6, 5, 1]][[-1, -5, 1], [1, 5, 1]]Failed
oracle 4[][]Passed
oracle 5[[1, 1, 1], [-1, -1, 1]][[0, 1, 1], [0, -1, 1]]Failed
oracle 6[[7, 0, 0], [-7, 0, 0]][[7, 0, 0], [-7, 0, 0]]Passed
oracle 7[[4, 2, 0], [-4, -2, 0]][[2, 2, 0], [-2, -2, 0]]Failed
variant packet 1[[6, 3, 1], [0, -3, 1], [6, 3, 1], [0, -3, 1]][[3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1]]Failed

SHA-256 / f7ec181ed164d1aae420257bcce324a7dbcd8b363ef5f241e45d79df4845f3f3

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(pairs):
    out=[]
    for left,right in pairs:
        side=left-right
        half=side//2
        mid=half
        parity=side&1
        out.append([mid,side,parity])
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([[5, 2], [2, 5]],)), [[3, 3, 1], [3, -3, 1]])
check('oracle 2', solve(*([[0, 0], [1, 1]],)), [[0, 0, 0], [1, 0, 0]])
check('oracle 3', solve(*([[-3, 2], [4, -1]],)), [[-1, -5, 1], [1, 5, 1]])
check('oracle 4', solve(*([],)), [])
check('oracle 5', solve(*([[1, 0], [0, 1]],)), [[0, 1, 1], [0, -1, 1]])
check('oracle 6', solve(*([[7, 7], [-7, -7]],)), [[7, 0, 0], [-7, 0, 0]])
check('oracle 7', solve(*([[3, 1], [-3, -1]],)), [[2, 2, 0], [-2, -2, 0]])
if N == 1: check('variant packet 1', solve(*[[[5, 2], [2, 5], [5, 2], [2, 5]]]), [[3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1]])
if N == 2: check('variant packet 2', solve(*[[[5, 2], [2, 5], [5, 2], [2, 5], [5, 2], [2, 5]]]), [[3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1]])
if N == 3: check('variant packet 3', solve(*[[[5, 2], [2, 5], [5, 2], [2, 5], [5, 2], [2, 5], [5, 2], [2, 5]]]), [[3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1]])
if N == 4: check('variant packet 4', solve(*[[[5, 2], [2, 5], [5, 2], [2, 5], [5, 2], [2, 5], [5, 2], [2, 5], [5, 2], [2, 5]]]), [[3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1]])
if N == 5: check('variant packet 5', solve(*[[[5, 2], [2, 5], [5, 2], [2, 5], [5, 2], [2, 5], [5, 2], [2, 5], [5, 2], [2, 5], [5, 2], [2, 5]]]), [[3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1]])
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, 3, 1], [-2, -3, 1]][[3, 3, 1], [3, -3, 1]]Failed
oracle 2[[0, 0, 0], [0, 0, 0]][[0, 0, 0], [1, 0, 0]]Failed
oracle 3[[-3, -5, 1], [2, 5, 1]][[-1, -5, 1], [1, 5, 1]]Failed
oracle 4[][]Passed
oracle 5[[0, 1, 1], [-1, -1, 1]][[0, 1, 1], [0, -1, 1]]Failed
oracle 6[[0, 0, 0], [0, 0, 0]][[7, 0, 0], [-7, 0, 0]]Failed
oracle 7[[1, 2, 0], [-1, -2, 0]][[2, 2, 0], [-2, -2, 0]]Failed
variant packet 1[[1, 3, 1], [-2, -3, 1], [1, 3, 1], [-2, -3, 1]][[3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1]]Failed

SHA-256 / 22569bbac24533423f3631c0be2780e58c211a0faeb4c076110251aa3847f39c

3 / The verified repair

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

N = 1
observations = []
def solve(pairs):
    out=[]
    for left,right in pairs:
        side=left-right
        half=side//2
        mid=right+half
        parity=side&1
        out.append([mid,side,parity])
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([[5, 2], [2, 5]],)), [[3, 3, 1], [3, -3, 1]])
check('oracle 2', solve(*([[0, 0], [1, 1]],)), [[0, 0, 0], [1, 0, 0]])
check('oracle 3', solve(*([[-3, 2], [4, -1]],)), [[-1, -5, 1], [1, 5, 1]])
check('oracle 4', solve(*([],)), [])
check('oracle 5', solve(*([[1, 0], [0, 1]],)), [[0, 1, 1], [0, -1, 1]])
check('oracle 6', solve(*([[7, 7], [-7, -7]],)), [[7, 0, 0], [-7, 0, 0]])
check('oracle 7', solve(*([[3, 1], [-3, -1]],)), [[2, 2, 0], [-2, -2, 0]])
if N == 1: check('variant packet 1', solve(*[[[5, 2], [2, 5], [5, 2], [2, 5]]]), [[3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1]])
if N == 2: check('variant packet 2', solve(*[[[5, 2], [2, 5], [5, 2], [2, 5], [5, 2], [2, 5]]]), [[3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1]])
if N == 3: check('variant packet 3', solve(*[[[5, 2], [2, 5], [5, 2], [2, 5], [5, 2], [2, 5], [5, 2], [2, 5]]]), [[3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1]])
if N == 4: check('variant packet 4', solve(*[[[5, 2], [2, 5], [5, 2], [2, 5], [5, 2], [2, 5], [5, 2], [2, 5], [5, 2], [2, 5]]]), [[3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1]])
if N == 5: check('variant packet 5', solve(*[[[5, 2], [2, 5], [5, 2], [2, 5], [5, 2], [2, 5], [5, 2], [2, 5], [5, 2], [2, 5], [5, 2], [2, 5]]]), [[3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1]])
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[[3, 3, 1], [3, -3, 1]][[3, 3, 1], [3, -3, 1]]Passed
oracle 2[[0, 0, 0], [1, 0, 0]][[0, 0, 0], [1, 0, 0]]Passed
oracle 3[[-1, -5, 1], [1, 5, 1]][[-1, -5, 1], [1, 5, 1]]Passed
oracle 4[][]Passed
oracle 5[[0, 1, 1], [0, -1, 1]][[0, 1, 1], [0, -1, 1]]Passed
oracle 6[[7, 0, 0], [-7, 0, 0]][[7, 0, 0], [-7, 0, 0]]Passed
oracle 7[[2, 2, 0], [-2, -2, 0]][[2, 2, 0], [-2, -2, 0]]Passed
variant packet 1[[3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1]][[3, 3, 1], [3, -3, 1], [3, 3, 1], [3, -3, 1]]Passed

SHA-256 / 79123109381cb1475989bf579dedc52eb22a62f4a4a76e3ca0d1b674ae109999

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

Case digest / 643f50e4e4813c705427ee8dbf9e65d1c402e86dece4ef837dd12348f52ba24a