| 125 | |
| 126 | |
| 127 | _forceinline uint Unpack::SlotToLength(BitInput &Inp,uint Slot) |
| 128 | { |
| 129 | uint LBits,Length=2; |
| 130 | if (Slot<8) |
| 131 | { |
| 132 | LBits=0; |
| 133 | Length+=Slot; |
| 134 | } |
| 135 | else |
| 136 | { |
| 137 | LBits=Slot/4-1; |
| 138 | Length+=(4 | (Slot & 3)) << LBits; |
| 139 | } |
| 140 | |
| 141 | if (LBits>0) |
| 142 | { |
| 143 | Length+=Inp.getbits()>>(16-LBits); |
| 144 | Inp.addbits(LBits); |
| 145 | } |
| 146 | return Length; |
| 147 | } |