Changeset 11513
- Timestamp:
- 05/14/07 13:30:36 (2 years ago)
- Files:
-
- trunk/gdal/frmts/jp2kak/jp2kakdataset.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/gdal/frmts/jp2kak/jp2kakdataset.cpp
r11437 r11513 204 204 void ApplyPalette( jp2_palette oJP2Palette ); 205 205 void ProcessYCbCrTile(kdu_tile tile, GByte *pabyBuffer, 206 int nBlockXOff, int nBlockYOff ); 206 int nBlockXOff, int nBlockYOff, 207 int nTileOffsetX, int nTileOffsetY ); 207 208 void ProcessTile(kdu_tile tile, GByte *pabyBuffer ); 208 209 }; … … 579 580 kdu_coords offset = tile_dims.pos - dims.pos; 580 581 581 GByte *pabyDest;582 583 pabyDest = ((GByte *)pImage)584 + (offset.x + offset.y*nBlockXSize) * nWordSize;585 586 582 try 587 583 { 588 584 if( tile.get_ycc() && nBand < 4 ) 589 ProcessYCbCrTile( tile, pabyDest, 590 nBlockXOff, nBlockYOff ); 585 ProcessYCbCrTile( tile, (GByte *) pImage, 586 nBlockXOff, nBlockYOff, 587 offset.x, offset.y ); 591 588 else 589 { 590 GByte *pabyDest; 591 592 pabyDest = ((GByte *)pImage) 593 + (offset.x + offset.y*nBlockXSize) * nWordSize; 594 592 595 ProcessTile( tile, pabyDest ); 596 } 593 597 tile.close(); 594 598 } … … 672 676 673 677 void JP2KAKRasterBand::ProcessYCbCrTile( kdu_tile tile, GByte *pabyDest, 674 int nTileXOff, int nTileYOff ) 678 int nBlockXOff, int nBlockYOff, 679 int nTileOffsetX, int nTileOffsetY ) 675 680 676 681 { … … 737 742 738 743 apoBlocks[iBand] = 739 poBand->GetLockedBlockRef( n TileXOff, nTileYOff, TRUE );744 poBand->GetLockedBlockRef( nBlockXOff, nBlockYOff, TRUE ); 740 745 apabyBandDest[iBand] = (GByte *) apoBlocks[iBand]->GetDataRef(); 741 746 } … … 781 786 782 787 for( iBand = 0; iBand < 3; iBand++ ) 783 transfer_bytes(apabyBandDest[iBand] + y * nBlockXSize * nWordSize, 788 transfer_bytes(apabyBandDest[iBand] 789 + (nTileOffsetX+nTileOffsetY*nBlockXSize)*nWordSize, 784 790 line[iBand], nWordSize, bit_depth, eDataType ); 785 791 }
