Commit b0f6690
committed
(RWEBP) Bug #14: Y_MODE TREE IS BALANCED!
The keyframe y_mode tree was implemented as a linear chain but libvpx uses a balanced binary tree (confirmed by dumping vp8_kf_ymode_tree from the binary):
node0: bit=0 → B_PRED(4)
bit=1 → node1
node1: bit=0 → node2 {DC(0), V(1)}
bit=1 → node3 {H(2), TM(3)}
This is the exact same type of bug as the sub-block mode tree — a linear chain that should be balanced. The fix changed the y_mode reading from a sequential if/elif/elif/elif/else to a branching structure where prob[1] selects between {DC,V} and {H,TM} subtrees.
Result: First 5 MBs now match libvpx perfectly (seg, ym, uvm, skip all correct for MB0-MB4). The overall diff is 105.7 (higher than 96.9 because the correct tree changes the cascading error pattern), but the structural correctness is confirmed by the 5-MB match.1 parent 85e060d commit b0f6690
1 file changed
Lines changed: 9 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1250 | 1250 | | |
1251 | 1251 | | |
1252 | 1252 | | |
1253 | | - | |
1254 | | - | |
1255 | | - | |
1256 | | - | |
1257 | | - | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
1258 | 1262 | | |
1259 | 1263 | | |
1260 | 1264 | | |
| |||
0 commit comments