| | 559 | } |
|---|
| | 560 | } |
|---|
| | 561 | |
|---|
| | 562 | /* -------------------------------------------------------------------- */ |
|---|
| | 563 | /* In the fairly common case of pixel interleaved 8bit data */ |
|---|
| | 564 | /* that is multi-band, lets push the rest of the data into the */ |
|---|
| | 565 | /* block cache too, to avoid (hopefully) having to redecode it. */ |
|---|
| | 566 | /* */ |
|---|
| | 567 | /* Our following logic actually depends on the fact that the */ |
|---|
| | 568 | /* this block is already loaded, so subsequent calls will end */ |
|---|
| | 569 | /* up back in this method and pull from the loaded block. */ |
|---|
| | 570 | /* -------------------------------------------------------------------- */ |
|---|
| | 571 | if( poGDS->nBitsPerSample == 8 && poGDS->nBands != 1 |
|---|
| | 572 | && eErr == CE_None ) |
|---|
| | 573 | { |
|---|
| | 574 | int iOtherBand; |
|---|
| | 575 | |
|---|
| | 576 | for( iOtherBand = 1; iOtherBand <= poGDS->nBands; iOtherBand++ ) |
|---|
| | 577 | { |
|---|
| | 578 | if( iOtherBand == nBand ) |
|---|
| | 579 | continue; |
|---|
| | 580 | |
|---|
| | 581 | GDALRasterBlock *poBlock; |
|---|
| | 582 | |
|---|
| | 583 | poBlock = poGDS->GetRasterBand(iOtherBand)-> |
|---|
| | 584 | GetLockedBlockRef(nBlockXOff,nBlockYOff); |
|---|
| | 585 | poBlock->DropLock(); |
|---|