| 171 | |
| 172 | |
| 173 | bool Unpack::ReadFilter(BitInput &Inp,UnpackFilter &Filter) |
| 174 | { |
| 175 | if (!Inp.ExternalBuffer && Inp.InAddr>ReadTop-16) |
| 176 | if (!UnpReadBuf()) |
| 177 | return false; |
| 178 | |
| 179 | Filter.BlockStart=ReadFilterData(Inp); |
| 180 | Filter.BlockLength=ReadFilterData(Inp); |
| 181 | if (Filter.BlockLength>MAX_FILTER_BLOCK_SIZE) |
| 182 | Filter.BlockLength=0; |
| 183 | |
| 184 | Filter.Type=Inp.fgetbits()>>13; |
| 185 | Inp.faddbits(3); |
| 186 | |
| 187 | if (Filter.Type==FILTER_DELTA) |
| 188 | { |
| 189 | Filter.Channels=(Inp.fgetbits()>>11)+1; |
| 190 | Inp.faddbits(5); |
| 191 | } |
| 192 | |
| 193 | return true; |
| 194 | } |
| 195 | |
| 196 | |
| 197 | bool Unpack::AddFilter(UnpackFilter &Filter) |