Skip to content
Snippets Groups Projects
Commit 168a1bdf authored by Vojtech Moravec's avatar Vojtech Moravec
Browse files

Rename the BitStream functions.

parent fd6697ff
No related branches found
No related tags found
No related merge requests found
...@@ -95,7 +95,7 @@ public class SQImageDecompressor extends CompressorDecompressorBase implements I ...@@ -95,7 +95,7 @@ public class SQImageDecompressor extends CompressorDecompressorBase implements I
try (final InBitStream inBitStream = new InBitStream(compressedStream, try (final InBitStream inBitStream = new InBitStream(compressedStream,
header.getBitsPerCodebookIndex(), header.getBitsPerCodebookIndex(),
planeDataSize)) { planeDataSize)) {
inBitStream.readToBuffer(); inBitStream.fillEntireBuffer();
inBitStream.setAllowReadFromUnderlyingStream(false); inBitStream.setAllowReadFromUnderlyingStream(false);
final int[] decompressedValues = new int[planePixelCount]; final int[] decompressedValues = new int[planePixelCount];
...@@ -166,7 +166,7 @@ public class SQImageDecompressor extends CompressorDecompressorBase implements I ...@@ -166,7 +166,7 @@ public class SQImageDecompressor extends CompressorDecompressorBase implements I
final int planeDataSize = (int) header.getPlaneDataSizes()[planeIndex]; final int planeDataSize = (int) header.getPlaneDataSizes()[planeIndex];
try (final InBitStream inBitStream = new InBitStream(compressedStream, header.getBitsPerCodebookIndex(), planeDataSize)) { try (final InBitStream inBitStream = new InBitStream(compressedStream, header.getBitsPerCodebookIndex(), planeDataSize)) {
inBitStream.readToBuffer(); inBitStream.fillEntireBuffer();
inBitStream.setAllowReadFromUnderlyingStream(false); inBitStream.setAllowReadFromUnderlyingStream(false);
final int[] decompressedValues = new int[planePixelCount]; final int[] decompressedValues = new int[planePixelCount];
...@@ -191,7 +191,8 @@ public class SQImageDecompressor extends CompressorDecompressorBase implements I ...@@ -191,7 +191,8 @@ public class SQImageDecompressor extends CompressorDecompressorBase implements I
} }
@Override @Override
public short[] decompressStreamMode(final DataInputStream compressedStream, final QCMPFileHeader header) throws ImageDecompressionException { public short[] decompressStreamMode(final DataInputStream compressedStream,
final QCMPFileHeader header) throws ImageDecompressionException {
throw new ImageDecompressionException("Not implemented yet."); throw new ImageDecompressionException("Not implemented yet.");
} }
} }
...@@ -162,7 +162,7 @@ public class VQImageDecompressor extends CompressorDecompressorBase implements I ...@@ -162,7 +162,7 @@ public class VQImageDecompressor extends CompressorDecompressorBase implements I
try (final InBitStream inBitStream = new InBitStream(compressedStream, try (final InBitStream inBitStream = new InBitStream(compressedStream,
header.getBitsPerCodebookIndex(), header.getBitsPerCodebookIndex(),
planeDataSize)) { planeDataSize)) {
inBitStream.readToBuffer(); inBitStream.fillEntireBuffer();
inBitStream.setAllowReadFromUnderlyingStream(false); inBitStream.setAllowReadFromUnderlyingStream(false);
final int[][] decompressedVectors = new int[(int) planeVectorCount][vectorSize]; final int[][] decompressedVectors = new int[(int) planeVectorCount][vectorSize];
...@@ -212,7 +212,7 @@ public class VQImageDecompressor extends CompressorDecompressorBase implements I ...@@ -212,7 +212,7 @@ public class VQImageDecompressor extends CompressorDecompressorBase implements I
try (final InBitStream inBitStream = new InBitStream(compressedStream, try (final InBitStream inBitStream = new InBitStream(compressedStream,
header.getBitsPerCodebookIndex(), header.getBitsPerCodebookIndex(),
planeDataSize)) { planeDataSize)) {
inBitStream.readToBuffer(); inBitStream.fillEntireBuffer();
inBitStream.setAllowReadFromUnderlyingStream(false); inBitStream.setAllowReadFromUnderlyingStream(false);
final int[][] decompressedVectors = new int[(int) planeVectorCount][vectorSize]; final int[][] decompressedVectors = new int[(int) planeVectorCount][vectorSize];
...@@ -284,7 +284,7 @@ public class VQImageDecompressor extends CompressorDecompressorBase implements I ...@@ -284,7 +284,7 @@ public class VQImageDecompressor extends CompressorDecompressorBase implements I
final int[][] decompressedVoxels = new int[voxelLayerVoxelCount][vectorSize]; final int[][] decompressedVoxels = new int[voxelLayerVoxelCount][vectorSize];
try (final InBitStream inBitStream = new InBitStream(compressedStream, header.getBitsPerCodebookIndex(), voxelLayerDataSize)) { try (final InBitStream inBitStream = new InBitStream(compressedStream, header.getBitsPerCodebookIndex(), voxelLayerDataSize)) {
inBitStream.readToBuffer(); inBitStream.fillEntireBuffer();
inBitStream.setAllowReadFromUnderlyingStream(false); inBitStream.setAllowReadFromUnderlyingStream(false);
for (int voxelIndex = 0; voxelIndex < voxelLayerVoxelCount; voxelIndex++) { for (int voxelIndex = 0; voxelIndex < voxelLayerVoxelCount; voxelIndex++) {
...@@ -342,7 +342,7 @@ public class VQImageDecompressor extends CompressorDecompressorBase implements I ...@@ -342,7 +342,7 @@ public class VQImageDecompressor extends CompressorDecompressorBase implements I
final int[][] decompressedVoxels = new int[voxelLayerVoxelCount][vectorSize]; final int[][] decompressedVoxels = new int[voxelLayerVoxelCount][vectorSize];
try (final InBitStream inBitStream = new InBitStream(compressedStream, header.getBitsPerCodebookIndex(), voxelLayerDataSize)) { try (final InBitStream inBitStream = new InBitStream(compressedStream, header.getBitsPerCodebookIndex(), voxelLayerDataSize)) {
inBitStream.readToBuffer(); inBitStream.fillEntireBuffer();
inBitStream.setAllowReadFromUnderlyingStream(false); inBitStream.setAllowReadFromUnderlyingStream(false);
for (int voxelIndex = 0; voxelIndex < voxelLayerVoxelCount; voxelIndex++) { for (int voxelIndex = 0; voxelIndex < voxelLayerVoxelCount; voxelIndex++) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment