Changeset 11514
- Timestamp:
- 05/14/07 13:39:27 (2 years ago)
- Files:
-
- branches/1.4/gdal/frmts/jp2kak/jp2kakdataset.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.4/gdal/frmts/jp2kak/jp2kakdataset.cpp
r10646 r11514 185 185 void ApplyPalette( jp2_palette oJP2Palette ); 186 186 void ProcessYCbCrTile(kdu_tile tile, GByte *pabyBuffer, 187 int nBlockXOff, int nBlockYOff ); 187 int nBlockXOff, int nBlockYOff, 188 int nTileOffsetX, int nTileOffsetY ); 188 189 void ProcessTile(kdu_tile tile, GByte *pabyBuffer ); 189 190 }; … … 557 558 kdu_coords offset = tile_dims.pos - dims.pos; 558 559 559 GByte *pabyDest;560 561 pabyDest = ((GByte *)pImage)562 + (offset.x + offset.y*nBlockXSize) * nWordSize;563 564 560 try 565 561 { 566 562 if( tile.get_ycc() && nBand < 4 ) 567 ProcessYCbCrTile( tile, pabyDest, 568 nBlockXOff, nBlockYOff ); 563 ProcessYCbCrTile( tile, (GByte *) pImage, 564 nBlockXOff, nBlockYOff, 565 offset.x, offset.y ); 569 566 else 567 { 568 GByte *pabyDest; 569 570 pabyDest = ((GByte *)pImage) 571 + (offset.x + offset.y*nBlockXSize) * nWordSize; 572 570 573 ProcessTile( tile, pabyDest ); 574 } 571 575 tile.close(); 572 576 } … … 650 654 651 655 void JP2KAKRasterBand::ProcessYCbCrTile( kdu_tile tile, GByte *pabyDest, 652 int nTileXOff, int nTileYOff ) 656 int nBlockXOff, int nBlockYOff, 657 int nTileOffsetX, int nTileOffsetY ) 653 658 654 659 { … … 715 720 716 721 apoBlocks[iBand] = 717 poBand->GetLockedBlockRef( n TileXOff, nTileYOff, TRUE );722 poBand->GetLockedBlockRef( nBlockXOff, nBlockYOff, TRUE ); 718 723 apabyBandDest[iBand] = (GByte *) apoBlocks[iBand]->GetDataRef(); 719 724 } … … 759 764 760 765 for( iBand = 0; iBand < 3; iBand++ ) 761 transfer_bytes(apabyBandDest[iBand] + y * nBlockXSize * nWordSize, 766 transfer_bytes(apabyBandDest[iBand] 767 + (nTileOffsetX+nTileOffsetY*nBlockXSize)*nWordSize, 762 768 line[iBand], nWordSize, bit_depth, eDataType ); 763 769 }
