Re: [OpenJDK 2D-Dev] [9] RFR JDK-8154075: [TIFF] AIOOB Exception from TIFFLZWDecompressor

2016-09-02 Thread Phil Race

+1

-phil.

On 09/02/2016 07:59 AM, Brian Burkhalter wrote:

Here is a somewhat less inane version:

http://cr.openjdk.java.net/~bpb/8154075/webrev.01/ 



All the same tests still pass.

Thanks,

Brian

On Sep 1, 2016, at 1:37 PM, Brian Burkhalter 
> wrote:


I did not notice that. It is indeed bizarre. I was trying to take 
some calculations outside the loops to obtain a small performance 
improvement and did not notice the name transposition. I’ll update it.


Thanks,

Brian

On Sep 1, 2016, at 1:27 PM, Phil Race > wrote:



168 int gain = step * srcWidth;
169 int bound = srcWidth * step;

This looks odd. Is it what you meant ?






Re: [OpenJDK 2D-Dev] [9] RFR JDK-8154075: [TIFF] AIOOB Exception from TIFFLZWDecompressor

2016-09-02 Thread Brian Burkhalter
Here is a somewhat less inane version:

http://cr.openjdk.java.net/~bpb/8154075/webrev.01/

All the same tests still pass.

Thanks,

Brian

On Sep 1, 2016, at 1:37 PM, Brian Burkhalter  
wrote:

> I did not notice that. It is indeed bizarre. I was trying to take some 
> calculations outside the loops to obtain a small performance improvement and 
> did not notice the name transposition. I’ll update it.
> 
> Thanks,
> 
> Brian
> 
> On Sep 1, 2016, at 1:27 PM, Phil Race  wrote:
> 
>> 168 int gain = step * srcWidth;
>> 169 int bound = srcWidth * step;
>> 
>> This looks odd. Is it what you meant ?



Re: [OpenJDK 2D-Dev] [9] RFR JDK-8154075: [TIFF] AIOOB Exception from TIFFLZWDecompressor

2016-09-01 Thread Brian Burkhalter
I did not notice that. It is indeed bizarre. I was trying to take some 
calculations outside the loops to obtain a small performance improvement and 
did not notice the name transposition. I’ll update it.

Thanks,

Brian

On Sep 1, 2016, at 1:27 PM, Phil Race  wrote:

> 168 int gain = step * srcWidth;
> 169 int bound = srcWidth * step;
> 
> This looks odd. Is it what you meant ?



Re: [OpenJDK 2D-Dev] [9] RFR JDK-8154075: [TIFF] AIOOB Exception from TIFFLZWDecompressor

2016-09-01 Thread Phil Race

 168 int gain = step * srcWidth;
 169 int bound = srcWidth * step;

This looks odd. Is it what you meant ?

-phil.



On 09/01/2016 08:57 AM, Brian Burkhalter wrote:

Please review at your convenience.

Issue:  https://bugs.openjdk.java.net/browse/JDK-8154075
Patch:  http://cr.openjdk.java.net/~bpb/8154075/webrev.00/

For banded images make sure the step in the horizontal differencing predictor 
calculations for Deflate and LZW compression is unity (1) instead of the number 
of samples per pixel.

This change was verified with the two images attached to the issue along with 
six 8 bits-per-sample images compressed using the horizontal differencing 
predictor and having the following characteristics:

1 - grayscale, single image plane, Deflate compression (created using tiffcp)
2 - grayscale, single image plane, LZW compression (created using tiffcp)
3 - RGB, separate image planes, Deflate compression (attached to issue)
4 - RGB, separate image planes, LZW compression (attached to issue)
5 - RGB, single image plane, Deflate compression (created using tiffcp)
6 - RGB, single image plane, LZW compression (created using tiffcp)

Thanks,

Brian