Tighten ratio-4 dynamic NEAR thresholds

This commit is contained in:
2026-04-16 22:08:40 +08:00
parent 3a80e8bf9f
commit 5fedb4fb23
2 changed files with 89 additions and 29 deletions

View File

@@ -233,17 +233,29 @@ SOF 协议:
- 当前实现采用离散 `NEAR` 档位集合
`{0, 1, 2, 4, 8, 16, 31}`,而不是逐条带线性 `+1/-1`。
- 第一条带结束后,控制器根据首条带 `actual_bits / target_bits` 的粗分档直接跳到
一个离散 `NEAR` 档位;当前 RTL 为便于时序收敛,采用移位加法近似阈值
- `<= 1.125x target` -> `NEAR=0`
- `<= 1.25x target` -> `NEAR=1`
- `<= 1.5x target` -> `NEAR=2`
- `<= 2x target` -> `NEAR=4`
- `<= 3x target` -> `NEAR=8`
- `<= 5x target` -> `NEAR=16`
- `> 5x target` -> `NEAR=31`
一个离散 `NEAR` 档位;当前 RTL 为便于时序收敛,采用移位加法近似阈值
- 对 `ratio=1:4/1:8`,首条带跳档更激进:
- `<= 1.125x target` -> `NEAR=0`
- `<= 1.25x target` -> `NEAR=1`
- `<= 1.5x target` -> `NEAR=2`
- `<= 1.75x target` -> `NEAR=4`
- `<= 2.25x target` -> `NEAR=8`
- `> 2.25x target` -> `NEAR=31`
- 对 `ratio=1:2`,保留较保守的中间档:
- `<= 1.125x target` -> `NEAR=0`
- `<= 1.25x target` -> `NEAR=1`
- `<= 1.5x target` -> `NEAR=2`
- `<= 2x target` -> `NEAR=4`
- `<= 3x target` -> `NEAR=8`
- `<= 5x target` -> `NEAR=16`
- `> 5x target` -> `NEAR=31`
- 第二条带及后续条带使用累计 bit 偏差做离散档位微调,而不是重新全量估计:
- 若累计实际 bit 数 `> target + target/4`,档位 `+2`
- 若累计实际 bit 数 `> target + target/16`,档位 `+1`
- 对 `ratio=1:4/1:8`
- 若累计实际 bit 数 `> target + target/8`,档位 `+2`
- 若累计实际 bit 数 `> target + target/32`,档位 `+1`
- 对 `ratio=1:2`
- 若累计实际 bit 数 `> target + target/4`,档位 `+2`
- 若累计实际 bit 数 `> target + target/16`,档位 `+1`
- 若累计实际 bit 数 `< target - target/4`,档位 `-2`
- 若累计实际 bit 数 `< target - target/16`,档位 `-1`
- 否则保持当前档位不变