diff --git a/CSJ2K/J2kImage.cs b/CSJ2K/J2kImage.cs
index 3634a3e4..b5804cfd 100644
--- a/CSJ2K/J2kImage.cs
+++ b/CSJ2K/J2kImage.cs
@@ -27,7 +27,6 @@ namespace CSJ2K
{
public class J2kImage
{
-
#region Static Decoder Methods
public static Image FromFile(string filename)
{
diff --git a/CSJ2K/j2k/IntegerSpec.cs b/CSJ2K/j2k/IntegerSpec.cs
index 853e759e..540e0ad8 100644
--- a/CSJ2K/j2k/IntegerSpec.cs
+++ b/CSJ2K/j2k/IntegerSpec.cs
@@ -167,7 +167,7 @@ namespace CSJ2K.j2k
{
setDefault((System.Object) System.Int32.Parse(param));
}
- catch (System.FormatException e)
+ catch (System.FormatException)
{
throw new System.ArgumentException("Non recognized value" + " for option -" + optName + ": " + param);
}
@@ -218,7 +218,7 @@ namespace CSJ2K.j2k
{
value_Renamed = System.Int32.Parse(word);
}
- catch (System.FormatException e)
+ catch (System.FormatException)
{
throw new System.ArgumentException("Non recognized value" + " for option -" + optName + ": " + word);
}
@@ -290,7 +290,7 @@ namespace CSJ2K.j2k
{
setDefault((System.Object) System.Int32.Parse(param));
}
- catch (System.FormatException e)
+ catch (System.FormatException)
{
throw new System.ArgumentException("Non recognized value" + " for option -" + optName + ": " + param);
}
diff --git a/CSJ2K/j2k/ModuleSpec.cs b/CSJ2K/j2k/ModuleSpec.cs
index 05302144..8e8de139 100644
--- a/CSJ2K/j2k/ModuleSpec.cs
+++ b/CSJ2K/j2k/ModuleSpec.cs
@@ -139,7 +139,7 @@ namespace CSJ2K.j2k
ms = (ModuleSpec) base.MemberwiseClone();
}
//UPGRADE_NOTE: Exception 'java.lang.CloneNotSupportedException' was converted to 'System.Exception' which has different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1100'"
- catch (System.Exception e)
+ catch (System.Exception)
{
throw new System.ApplicationException("Error when cloning ModuleSpec instance");
}
diff --git a/CSJ2K/j2k/codestream/HeaderInfo.cs b/CSJ2K/j2k/codestream/HeaderInfo.cs
index 3c4e0cee..eceb71a3 100644
--- a/CSJ2K/j2k/codestream/HeaderInfo.cs
+++ b/CSJ2K/j2k/codestream/HeaderInfo.cs
@@ -242,7 +242,7 @@ namespace CSJ2K.j2k.codestream
ms = (SIZ) this.Clone();
}
//UPGRADE_NOTE: Exception 'java.lang.CloneNotSupportedException' was converted to 'System.Exception' which has different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1100'"
- catch (System.Exception e)
+ catch (System.Exception)
{
throw new System.ApplicationException("Cannot clone SIZ marker segment");
}
@@ -442,7 +442,7 @@ namespace CSJ2K.j2k.codestream
ms = (COD) this.Clone();
}
//UPGRADE_NOTE: Exception 'java.lang.CloneNotSupportedException' was converted to 'System.Exception' which has different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1100'"
- catch (System.Exception e)
+ catch (System.Exception)
{
throw new System.ApplicationException("Cannot clone SIZ marker segment");
}
@@ -1339,7 +1339,7 @@ namespace CSJ2K.j2k.codestream
nhi = (HeaderInfo) Clone();
}
//UPGRADE_NOTE: Exception 'java.lang.CloneNotSupportedException' was converted to 'System.Exception' which has different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1100'"
- catch (System.Exception e)
+ catch (System.Exception)
{
throw new System.ApplicationException("Cannot clone HeaderInfo instance");
}
diff --git a/CSJ2K/j2k/codestream/reader/FileBitstreamReaderAgent.cs b/CSJ2K/j2k/codestream/reader/FileBitstreamReaderAgent.cs
index 5e85c47e..986d355f 100644
--- a/CSJ2K/j2k/codestream/reader/FileBitstreamReaderAgent.cs
+++ b/CSJ2K/j2k/codestream/reader/FileBitstreamReaderAgent.cs
@@ -256,11 +256,11 @@ namespace CSJ2K.j2k.codestream.reader
trate = System.Single.MaxValue;
}
}
- catch (System.FormatException e)
+ catch (System.FormatException)
{
throw new System.ApplicationException("Invalid value in 'rate' option: " + pl.getParameter("rate"));
}
- catch (System.ArgumentException e)
+ catch (System.ArgumentException)
{
throw new System.ApplicationException("'rate' option is missing");
}
@@ -269,11 +269,11 @@ namespace CSJ2K.j2k.codestream.reader
{
tnbytes = pl.getIntParameter("nbytes");
}
- catch (System.FormatException e)
+ catch (System.FormatException)
{
throw new System.ApplicationException("Invalid value in 'nbytes' option: " + pl.getParameter("nbytes"));
}
- catch (System.ArgumentException e)
+ catch (System.ArgumentException)
{
throw new System.ApplicationException("'nbytes' option is missing");
}
@@ -307,11 +307,11 @@ namespace CSJ2K.j2k.codestream.reader
{
ncbQuit = pl.getIntParameter("ncb_quit");
}
- catch (System.FormatException e)
+ catch (System.FormatException)
{
throw new System.ApplicationException("Invalid value in 'ncb_quit' option: " + pl.getParameter("ncb_quit"));
}
- catch (System.ArgumentException e)
+ catch (System.ArgumentException)
{
throw new System.ApplicationException("'ncb_quit' option is missing");
}
@@ -324,11 +324,11 @@ namespace CSJ2K.j2k.codestream.reader
{
lQuit = pl.getIntParameter("l_quit");
}
- catch (System.FormatException e)
+ catch (System.FormatException)
{
throw new System.ApplicationException("Invalid value in 'l_quit' option: " + pl.getParameter("l_quit"));
}
- catch (System.ArgumentException e)
+ catch (System.ArgumentException)
{
throw new System.ApplicationException("'l_quit' option is missing");
}
@@ -494,7 +494,7 @@ namespace CSJ2K.j2k.codestream.reader
}
}
}
- catch (System.IO.EndOfStreamException e)
+ catch (System.IO.EndOfStreamException)
{
if (printInfo)
{
@@ -531,7 +531,7 @@ namespace CSJ2K.j2k.codestream.reader
throw new System.ArgumentException("Specified negative " + "resolution level " + "index: " + targetRes);
}
}
- catch (System.FormatException f)
+ catch (System.FormatException)
{
throw new System.ArgumentException("Invalid resolution level " + "index ('-res' option) " + pl.getParameter("res"));
}
@@ -570,7 +570,7 @@ namespace CSJ2K.j2k.codestream.reader
throw new System.ArgumentException("Specified negative " + "resolution level index: " + targetRes);
}
}
- catch (System.FormatException e)
+ catch (System.FormatException)
{
throw new System.ArgumentException("Invalid resolution level " + "index ('-res' option) " + pl.getParameter("res"));
}
@@ -600,7 +600,7 @@ namespace CSJ2K.j2k.codestream.reader
FacilityManager.getMsgLogger().printmsg(CSJ2K.j2k.util.MsgLogger_Fields.WARNING, "EOC marker not found. " + "Codestream is corrupted.");
}
}
- catch (System.IO.EndOfStreamException e)
+ catch (System.IO.EndOfStreamException)
{
FacilityManager.getMsgLogger().printmsg(CSJ2K.j2k.util.MsgLogger_Fields.WARNING, "EOC marker is missing");
}
@@ -2056,7 +2056,7 @@ namespace CSJ2K.j2k.codestream.reader
}
in_Renamed.seek(firstPackOff[t][0]);
}
- catch (System.IO.EndOfStreamException e)
+ catch (System.IO.EndOfStreamException)
{
FacilityManager.getMsgLogger().printmsg(CSJ2K.j2k.util.MsgLogger_Fields.WARNING, "Codestream truncated in tile " + t);
return ;
@@ -2521,11 +2521,11 @@ namespace CSJ2K.j2k.codestream.reader
throw new System.ArgumentException();
}
}
- catch (System.IndexOutOfRangeException e)
+ catch (System.IndexOutOfRangeException)
{
throw new System.ArgumentException("Code-block (t:" + t + ", c:" + c + ", r:" + r + ", s:" + s + ", " + m + "x" + (+ n) + ") not found in codestream");
}
- catch (System.NullReferenceException e)
+ catch (System.NullReferenceException)
{
throw new System.ArgumentException("Code-block (t:" + t + ", c:" + c + ", r:" + r + ", s:" + s + ", " + m + "x" + n + ") not found in bit stream");
}
diff --git a/CSJ2K/j2k/codestream/reader/PktDecoder.cs b/CSJ2K/j2k/codestream/reader/PktDecoder.cs
index 1a57e136..27a4ec59 100644
--- a/CSJ2K/j2k/codestream/reader/PktDecoder.cs
+++ b/CSJ2K/j2k/codestream/reader/PktDecoder.cs
@@ -1310,7 +1310,7 @@ namespace CSJ2K.j2k.codestream.reader
}
}
}
- catch (System.IO.EndOfStreamException e)
+ catch (System.IO.EndOfStreamException)
{
// Remove found information in this code-block
if (l == 0)
@@ -1420,7 +1420,7 @@ namespace CSJ2K.j2k.codestream.reader
{
ehs.seek(curOff);
}
- catch (System.IO.EndOfStreamException e)
+ catch (System.IO.EndOfStreamException)
{
if (l == 0)
{
diff --git a/CSJ2K/j2k/decoder/DecoderSpecs.cs b/CSJ2K/j2k/decoder/DecoderSpecs.cs
index 994e669c..707cb183 100644
--- a/CSJ2K/j2k/decoder/DecoderSpecs.cs
+++ b/CSJ2K/j2k/decoder/DecoderSpecs.cs
@@ -77,7 +77,7 @@ namespace CSJ2K.j2k.decoder
decSpec2 = (DecoderSpecs) this.Clone();
}
//UPGRADE_NOTE: Exception 'java.lang.CloneNotSupportedException' was converted to 'System.Exception' which has different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1100'"
- catch (System.Exception e)
+ catch (System.Exception)
{
throw new System.ApplicationException("Cannot clone the DecoderSpecs instance");
}
diff --git a/CSJ2K/j2k/entropy/CBlkSizeSpec.cs b/CSJ2K/j2k/entropy/CBlkSizeSpec.cs
index a4c32840..fd2cd3e2 100644
--- a/CSJ2K/j2k/entropy/CBlkSizeSpec.cs
+++ b/CSJ2K/j2k/entropy/CBlkSizeSpec.cs
@@ -208,7 +208,7 @@ namespace CSJ2K.j2k.entropy
throw new System.ArgumentException(errMsg);
}
}
- catch (System.FormatException e)
+ catch (System.FormatException)
{
errMsg = "'" + optName + "' option : the code-block's " + "width could not be parsed.";
throw new System.ArgumentException(errMsg);
@@ -218,7 +218,7 @@ namespace CSJ2K.j2k.entropy
{
word = stk.NextToken();
}
- catch (System.ArgumentOutOfRangeException e)
+ catch (System.ArgumentOutOfRangeException)
{
errMsg = "'" + optName + "' option : could not parse the " + "code-block's height";
throw new System.ArgumentException(errMsg);
@@ -255,7 +255,7 @@ namespace CSJ2K.j2k.entropy
throw new System.ArgumentException(errMsg);
}
}
- catch (System.FormatException e)
+ catch (System.FormatException)
{
errMsg = "'" + optName + "' option : the code-block's height " + "could not be parsed.";
throw new System.ArgumentException(errMsg);
diff --git a/CSJ2K/j2k/entropy/PrecinctSizeSpec.cs b/CSJ2K/j2k/entropy/PrecinctSizeSpec.cs
index 0e366c71..4ecfe182 100644
--- a/CSJ2K/j2k/entropy/PrecinctSizeSpec.cs
+++ b/CSJ2K/j2k/entropy/PrecinctSizeSpec.cs
@@ -233,7 +233,7 @@ namespace CSJ2K.j2k.entropy
{
word = stk.NextToken();
}
- catch (System.ArgumentOutOfRangeException e)
+ catch (System.ArgumentOutOfRangeException)
{
errMsg = "'" + optName + "' option : could not " + "parse the precinct's width";
throw new System.ArgumentException(errMsg);
@@ -246,7 +246,7 @@ namespace CSJ2K.j2k.entropy
throw new System.ArgumentException(errMsg);
}
}
- catch (System.FormatException e)
+ catch (System.FormatException)
{
errMsg = "'" + optName + "' option : the argument '" + word + "' could not be parsed.";
throw new System.ArgumentException(errMsg);
diff --git a/CSJ2K/j2k/entropy/ProgressionSpec.cs b/CSJ2K/j2k/entropy/ProgressionSpec.cs
index f9fb2329..b6bb4368 100644
--- a/CSJ2K/j2k/entropy/ProgressionSpec.cs
+++ b/CSJ2K/j2k/entropy/ProgressionSpec.cs
@@ -200,7 +200,7 @@ namespace CSJ2K.j2k.entropy
{
tmp = (System.Int32.Parse(word));
}
- catch (System.FormatException e)
+ catch (System.FormatException)
{
// Progression has missing parameters
throw new System.ArgumentException("Progression " + "order" + " specification " + "has missing " + "parameters: " + param);
diff --git a/CSJ2K/j2k/entropy/encoder/PostCompRateAllocator.cs b/CSJ2K/j2k/entropy/encoder/PostCompRateAllocator.cs
index 9af7c967..51813164 100644
--- a/CSJ2K/j2k/entropy/encoder/PostCompRateAllocator.cs
+++ b/CSJ2K/j2k/entropy/encoder/PostCompRateAllocator.cs
@@ -262,7 +262,7 @@ namespace CSJ2K.j2k.entropy.encoder
{
stok.NextToken();
}
- catch (System.IO.IOException e)
+ catch (System.IO.IOException)
{
throw new System.ApplicationException("An IOException has ocurred where it " + "should never occur");
}
@@ -327,7 +327,7 @@ namespace CSJ2K.j2k.entropy.encoder
{
stok.NextToken();
}
- catch (System.IO.IOException e)
+ catch (System.IO.IOException)
{
throw new System.ApplicationException("An IOException has ocurred where it " + "should never occur");
}
@@ -345,7 +345,7 @@ namespace CSJ2K.j2k.entropy.encoder
{
stok.NextToken();
}
- catch (System.IO.IOException e)
+ catch (System.IO.IOException)
{
throw new System.ApplicationException("An IOException has ocurred where it " + "should never occur");
}
diff --git a/CSJ2K/j2k/entropy/encoder/StdEntropyCoder.cs b/CSJ2K/j2k/entropy/encoder/StdEntropyCoder.cs
index 23220ed1..fc44ff87 100644
--- a/CSJ2K/j2k/entropy/encoder/StdEntropyCoder.cs
+++ b/CSJ2K/j2k/entropy/encoder/StdEntropyCoder.cs
@@ -555,6 +555,8 @@ namespace CSJ2K.j2k.entropy.encoder
/// table is indexed with one less bit.
///
private const int MSE_LKP_BITS = 7;
+
+ private const int MSE_LKP_BITS_M1 = 6;
/// The number of fractional bits used to store data in the 'fm' and 'fs'
/// lookup tables.
@@ -565,7 +567,7 @@ namespace CSJ2K.j2k.entropy.encoder
/// (SC) primative, for lossy coding (i.e. normal).
///
//UPGRADE_NOTE: Final was removed from the declaration of 'FS_LOSSY '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'"
- private static readonly int[] FS_LOSSY = new int[1 << (MSE_LKP_BITS - 1)];
+ private static readonly int[] FS_LOSSY = new int[1 << MSE_LKP_BITS_M1];
/// Distortion estimation lookup table for bits coded using the
/// magnitude-refinement (MR) primative, for lossy coding (i.e. normal)
@@ -579,7 +581,7 @@ namespace CSJ2K.j2k.entropy.encoder
/// distortion after the last bit-plane is coded is strictly 0.
///
//UPGRADE_NOTE: Final was removed from the declaration of 'FS_LOSSLESS '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'"
- private static readonly int[] FS_LOSSLESS = new int[1 << (MSE_LKP_BITS - 1)];
+ private static readonly int[] FS_LOSSLESS = new int[1 << MSE_LKP_BITS_M1];
/// Distortion estimation lookup table for bits coded using the
/// magnitude-refinement (MR) primative, for lossless coding and last
@@ -1189,7 +1191,7 @@ namespace CSJ2K.j2k.entropy.encoder
stime = (System.DateTime.Now.Ticks - 621355968000000000) / 10000;
#endif
}
- catch (System.Threading.ThreadInterruptedException e)
+ catch (System.Threading.ThreadInterruptedException)
{
}
}
@@ -1663,7 +1665,7 @@ namespace CSJ2K.j2k.entropy.encoder
dist = 0;
// We use the MSE_LKP_BITS-1 bits below the bit just coded for
// distortion estimation.
- shift = bp - (MSE_LKP_BITS - 1);
+ shift = bp - MSE_LKP_BITS_M1;
upshift = (shift >= 0)?0:- shift;
downshift = (shift <= 0)?0:shift;
causal = (options & CSJ2K.j2k.entropy.StdEntropyCoderOptions.OPT_VERT_STR_CAUSAL) != 0;
@@ -1744,7 +1746,7 @@ namespace CSJ2K.j2k.entropy.encoder
}
// Update distortion
normval = (data[k] >> downshift) << upshift;
- dist += fs[normval & ((1 << (MSE_LKP_BITS - 1)) - 1)];
+ dist += fs[normval & ((1 << MSE_LKP_BITS_M1) - 1)];
}
else
{
@@ -1793,7 +1795,7 @@ namespace CSJ2K.j2k.entropy.encoder
}
// Update distortion
normval = (data[k] >> downshift) << upshift;
- dist += fs[normval & ((1 << (MSE_LKP_BITS - 1)) - 1)];
+ dist += fs[normval & ((1 << MSE_LKP_BITS_M1) - 1)];
}
else
{
@@ -1849,7 +1851,7 @@ namespace CSJ2K.j2k.entropy.encoder
}
// Update distortion
normval = (data[k] >> downshift) << upshift;
- dist += fs[normval & ((1 << (MSE_LKP_BITS - 1)) - 1)];
+ dist += fs[normval & ((1 << MSE_LKP_BITS_M1) - 1)];
}
else
{
@@ -1898,7 +1900,7 @@ namespace CSJ2K.j2k.entropy.encoder
}
// Update distortion
normval = (data[k] >> downshift) << upshift;
- dist += fs[normval & ((1 << (MSE_LKP_BITS - 1)) - 1)];
+ dist += fs[normval & ((1 << MSE_LKP_BITS_M1) - 1)];
}
else
{
@@ -2030,7 +2032,7 @@ namespace CSJ2K.j2k.entropy.encoder
dist = 0;
// We use the MSE_LKP_BITS-1 bits below the bit just coded for
// distortion estimation.
- shift = bp - (MSE_LKP_BITS - 1);
+ shift = bp - MSE_LKP_BITS_M1;
upshift = (shift >= 0)?0:- shift;
downshift = (shift <= 0)?0:shift;
causal = (options & CSJ2K.j2k.entropy.StdEntropyCoderOptions.OPT_VERT_STR_CAUSAL) != 0;
@@ -2112,7 +2114,7 @@ namespace CSJ2K.j2k.entropy.encoder
}
// Update distortion
normval = (data[k] >> downshift) << upshift;
- dist += fs[normval & ((1 << (MSE_LKP_BITS - 1)) - 1)];
+ dist += fs[normval & ((1 << MSE_LKP_BITS_M1) - 1)];
}
else
{
@@ -2162,7 +2164,7 @@ namespace CSJ2K.j2k.entropy.encoder
}
// Update distortion
normval = (data[k] >> downshift) << upshift;
- dist += fs[normval & ((1 << (MSE_LKP_BITS - 1)) - 1)];
+ dist += fs[normval & ((1 << MSE_LKP_BITS_M1) - 1)];
}
else
{
@@ -2218,7 +2220,7 @@ namespace CSJ2K.j2k.entropy.encoder
}
// Update distortion
normval = (data[k] >> downshift) << upshift;
- dist += fs[normval & ((1 << (MSE_LKP_BITS - 1)) - 1)];
+ dist += fs[normval & ((1 << MSE_LKP_BITS_M1) - 1)];
}
else
{
@@ -2267,7 +2269,7 @@ namespace CSJ2K.j2k.entropy.encoder
}
// Update distortion
normval = (data[k] >> downshift) << upshift;
- dist += fs[normval & ((1 << (MSE_LKP_BITS - 1)) - 1)];
+ dist += fs[normval & ((1 << MSE_LKP_BITS_M1) - 1)];
}
else
{
@@ -2383,7 +2385,7 @@ namespace CSJ2K.j2k.entropy.encoder
dist = 0;
// We use the bit just coded plus MSE_LKP_BITS-1 bits below the bit
// just coded for distortion estimation.
- shift = bp - (MSE_LKP_BITS - 1);
+ shift = bp - MSE_LKP_BITS_M1;
upshift = (shift >= 0)?0:- shift;
downshift = (shift <= 0)?0:shift;
@@ -2602,7 +2604,7 @@ namespace CSJ2K.j2k.entropy.encoder
dist = 0;
// We use the bit just coded plus MSE_LKP_BITS-1 bits below the bit
// just coded for distortion estimation.
- shift = bp - (MSE_LKP_BITS - 1);
+ shift = bp - MSE_LKP_BITS_M1;
upshift = (shift >= 0)?0:- shift;
downshift = (shift <= 0)?0:shift;
@@ -2812,7 +2814,7 @@ namespace CSJ2K.j2k.entropy.encoder
dist = 0;
// We use the MSE_LKP_BITS-1 bits below the bit just coded for
// distortion estimation.
- shift = bp - (MSE_LKP_BITS - 1);
+ shift = bp - MSE_LKP_BITS_M1;
upshift = (shift >= 0)?0:- shift;
downshift = (shift <= 0)?0:shift;
causal = (options & CSJ2K.j2k.entropy.StdEntropyCoderOptions.OPT_VERT_STR_CAUSAL) != 0;
@@ -2883,7 +2885,7 @@ namespace CSJ2K.j2k.entropy.encoder
// Code sign of sample that became significant
// Update distortion
normval = (data[k] >> downshift) << upshift;
- dist += fs[normval & ((1 << (MSE_LKP_BITS - 1)) - 1)];
+ dist += fs[normval & ((1 << MSE_LKP_BITS_M1) - 1)];
// Apply sign coding
sym = SupportClass.URShift(data[k], 31);
if ((rlclen & 0x01) == 0)
@@ -3043,7 +3045,7 @@ namespace CSJ2K.j2k.entropy.encoder
}
// Update distortion
normval = (data[k] >> downshift) << upshift;
- dist += fs[normval & ((1 << (MSE_LKP_BITS - 1)) - 1)];
+ dist += fs[normval & ((1 << MSE_LKP_BITS_M1) - 1)];
}
}
if (sheight < 2)
@@ -3089,7 +3091,7 @@ namespace CSJ2K.j2k.entropy.encoder
}
// Update distortion
normval = (data[k] >> downshift) << upshift;
- dist += fs[normval & ((1 << (MSE_LKP_BITS - 1)) - 1)];
+ dist += fs[normval & ((1 << MSE_LKP_BITS_M1) - 1)];
}
}
}
@@ -3147,7 +3149,7 @@ top_half_brk: ;
}
// Update distortion
normval = (data[k] >> downshift) << upshift;
- dist += fs[normval & ((1 << (MSE_LKP_BITS - 1)) - 1)];
+ dist += fs[normval & ((1 << MSE_LKP_BITS_M1) - 1)];
}
}
if (sheight < 4)
@@ -3193,7 +3195,7 @@ top_half_brk: ;
}
// Update distortion
normval = (data[k] >> downshift) << upshift;
- dist += fs[normval & ((1 << (MSE_LKP_BITS - 1)) - 1)];
+ dist += fs[normval & ((1 << MSE_LKP_BITS_M1) - 1)];
}
}
}
@@ -3721,10 +3723,10 @@ top_half_brk: ;
// Initialize the distortion estimation lookup tables
// fs tables
- for (i = 0; i < (1 << (MSE_LKP_BITS - 1)); i++)
+ for (i = 0; i < (1 << MSE_LKP_BITS_M1); i++)
{
// In fs we index by val-1, since val is really: 1 <= val < 2
- val = (double) i / (1 << (MSE_LKP_BITS - 1)) + 1.0;
+ val = (double) i / (1 << MSE_LKP_BITS_M1) + 1.0;
deltaMSE = val * val;
//UPGRADE_WARNING: Data types in Visual C# might be different. Verify the accuracy of narrowing conversions. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1042'"
FS_LOSSLESS[i] = (int) System.Math.Floor(deltaMSE * ((double) (1 << MSE_LKP_FRAC_BITS)) + 0.5);
@@ -3737,11 +3739,11 @@ top_half_brk: ;
// fm tables
for (i = 0; i < (1 << MSE_LKP_BITS); i++)
{
- val = (double) i / (1 << (MSE_LKP_BITS - 1));
+ val = (double) i / (1 << MSE_LKP_BITS_M1);
deltaMSE = (val - 1.0) * (val - 1.0);
//UPGRADE_WARNING: Data types in Visual C# might be different. Verify the accuracy of narrowing conversions. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1042'"
FM_LOSSLESS[i] = (int) System.Math.Floor(deltaMSE * ((double) (1 << MSE_LKP_FRAC_BITS)) + 0.5);
- val -= ((i < (1 << (MSE_LKP_BITS - 1)))?0.5:1.5);
+ val -= ((i < (1 << MSE_LKP_BITS_M1))?0.5:1.5);
deltaMSE -= val * val;
//UPGRADE_WARNING: Data types in Visual C# might be different. Verify the accuracy of narrowing conversions. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1042'"
FM_LOSSY[i] = (int) System.Math.Floor(deltaMSE * ((double) (1 << MSE_LKP_FRAC_BITS)) + 0.5);
diff --git a/CSJ2K/j2k/fileformat/reader/FileFormatReader.cs b/CSJ2K/j2k/fileformat/reader/FileFormatReader.cs
index b36d721f..4fc488cf 100644
--- a/CSJ2K/j2k/fileformat/reader/FileFormatReader.cs
+++ b/CSJ2K/j2k/fileformat/reader/FileFormatReader.cs
@@ -259,7 +259,7 @@ namespace CSJ2K.j2k.fileformat.reader
in_Renamed.seek(pos + length);
}
}
- catch (System.IO.EndOfStreamException e)
+ catch (System.IO.EndOfStreamException)
{
throw new System.ApplicationException("EOF reached before finding Contiguous " + "Codestream Box");
}
diff --git a/CSJ2K/j2k/image/input/ImgReaderPGX.cs b/CSJ2K/j2k/image/input/ImgReaderPGX.cs
index 2fa1413d..0ccfee87 100644
--- a/CSJ2K/j2k/image/input/ImgReaderPGX.cs
+++ b/CSJ2K/j2k/image/input/ImgReaderPGX.cs
@@ -168,7 +168,7 @@ namespace CSJ2K.j2k.image.input
//UPGRADE_ISSUE: Method 'java.io.RandomAccessFile.readLine' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javaioRandomAccessFilereadLine'"
header = in_reader.ReadLine();
}
- catch (System.IO.IOException e)
+ catch (System.IO.IOException)
{
throw new System.IO.IOException(in_Renamed.Name + " is not a PGX file");
}
@@ -220,12 +220,12 @@ namespace CSJ2K.j2k.image.input
w = (System.Int32.Parse(st.NextToken()));
h = (System.Int32.Parse(st.NextToken()));
}
- catch (System.FormatException e)
+ catch (System.FormatException)
{
throw new System.IO.IOException(in_Renamed.Name + " is not a PGX file");
}
}
- catch (System.ArgumentOutOfRangeException e)
+ catch (System.ArgumentOutOfRangeException)
{
throw new System.IO.IOException(in_Renamed.Name + " is not a PGX file");
}
diff --git a/CSJ2K/j2k/quantization/GuardBitsSpec.cs b/CSJ2K/j2k/quantization/GuardBitsSpec.cs
index 3c7a40b5..b630e5ca 100644
--- a/CSJ2K/j2k/quantization/GuardBitsSpec.cs
+++ b/CSJ2K/j2k/quantization/GuardBitsSpec.cs
@@ -138,7 +138,7 @@ namespace CSJ2K.j2k.quantization
{
value_Renamed = System.Int32.Parse(word);
}
- catch (System.FormatException e)
+ catch (System.FormatException)
{
throw new System.ArgumentException("Bad parameter for " + "-Qguard_bits option" + " : " + word);
}
diff --git a/CSJ2K/j2k/quantization/QuantStepSizeSpec.cs b/CSJ2K/j2k/quantization/QuantStepSizeSpec.cs
index a725f47d..7856325a 100644
--- a/CSJ2K/j2k/quantization/QuantStepSizeSpec.cs
+++ b/CSJ2K/j2k/quantization/QuantStepSizeSpec.cs
@@ -138,7 +138,7 @@ namespace CSJ2K.j2k.quantization
//UPGRADE_WARNING: Data types in Visual C# might be different. Verify the accuracy of narrowing conversions. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1042'"
value_Renamed = System.Single.Parse(word);
}
- catch (System.FormatException e)
+ catch (System.FormatException)
{
throw new System.ArgumentException("Bad parameter for " + "-Qstep option : " + word);
}
diff --git a/CSJ2K/j2k/roi/encoder/ROIScaler.cs b/CSJ2K/j2k/roi/encoder/ROIScaler.cs
index a29da1d9..44fd19b1 100644
--- a/CSJ2K/j2k/roi/encoder/ROIScaler.cs
+++ b/CSJ2K/j2k/roi/encoder/ROIScaler.cs
@@ -402,11 +402,11 @@ namespace CSJ2K.j2k.roi.encoder
word = stok.NextToken();
h = (System.Int32.Parse(word));
}
- catch (System.FormatException e)
+ catch (System.FormatException)
{
throw new System.ArgumentException("Bad parameter for " + "'-Rroi R' option : " + word);
}
- catch (System.ArgumentOutOfRangeException f)
+ catch (System.ArgumentOutOfRangeException)
{
throw new System.ArgumentException("Wrong number of " + "parameters for " + "h'-Rroi R' option.");
}
@@ -444,11 +444,11 @@ namespace CSJ2K.j2k.roi.encoder
word = stok.NextToken();
rad = (System.Int32.Parse(word));
}
- catch (System.FormatException e)
+ catch (System.FormatException)
{
throw new System.ArgumentException("Bad parameter for " + "'-Rroi C' option : " + word);
}
- catch (System.ArgumentOutOfRangeException f)
+ catch (System.ArgumentOutOfRangeException)
{
throw new System.ArgumentException("Wrong number of " + "parameters for " + "'-Rroi C' option.");
}
@@ -484,7 +484,7 @@ namespace CSJ2K.j2k.roi.encoder
{
filename = stok.NextToken();
}
- catch (System.ArgumentOutOfRangeException e)
+ catch (System.ArgumentOutOfRangeException)
{
throw new System.ArgumentException("Wrong number of " + "parameters for " + "'-Rroi A' option.");
}
@@ -492,7 +492,7 @@ namespace CSJ2K.j2k.roi.encoder
{
maskPGM = new ImgReaderPGM(filename);
}
- catch (System.IO.IOException e)
+ catch (System.IO.IOException)
{
throw new System.ApplicationException("Cannot read PGM file with ROI");
}
diff --git a/CSJ2K/j2k/util/ISRandomAccessIO.cs b/CSJ2K/j2k/util/ISRandomAccessIO.cs
index 92a0163b..a3b634ef 100644
--- a/CSJ2K/j2k/util/ISRandomAccessIO.cs
+++ b/CSJ2K/j2k/util/ISRandomAccessIO.cs
@@ -213,7 +213,7 @@ namespace CSJ2K.j2k.util
{
newbuf = new byte[buf.Length + inc];
}
- catch (System.OutOfMemoryException e)
+ catch (System.OutOfMemoryException)
{
throw new System.IO.IOException("Out of memory to cache input data");
}
diff --git a/CSJ2K/j2k/util/ThreadPool.cs b/CSJ2K/j2k/util/ThreadPool.cs
index 4288766b..3033c76e 100644
--- a/CSJ2K/j2k/util/ThreadPool.cs
+++ b/CSJ2K/j2k/util/ThreadPool.cs
@@ -251,7 +251,7 @@ namespace CSJ2K.j2k.util
{
System.Threading.Monitor.Wait(this);
}
- catch (System.Threading.ThreadInterruptedException e)
+ catch (System.Threading.ThreadInterruptedException)
{
}
}
@@ -278,7 +278,7 @@ namespace CSJ2K.j2k.util
Enclosing_Instance.targetRE = re;
}
//UPGRADE_NOTE: Exception 'java.lang.Throwable' was converted to 'System.Exception' which has different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1100'"
- catch (System.Exception e)
+ catch (System.Exception)
{
// A totally unexpected error has occurred
// (Thread.stop(Throwable) has been used, which should
@@ -632,7 +632,7 @@ namespace CSJ2K.j2k.util
{
System.Threading.Monitor.Wait(idle);
}
- catch (System.Threading.ThreadInterruptedException e)
+ catch (System.Threading.ThreadInterruptedException)
{
// If we were interrupted just return null
return null;
diff --git a/CSJ2K/j2k/wavelet/analysis/ForwardWT.cs b/CSJ2K/j2k/wavelet/analysis/ForwardWT.cs
index 83cf8e3d..1335eb15 100644
--- a/CSJ2K/j2k/wavelet/analysis/ForwardWT.cs
+++ b/CSJ2K/j2k/wavelet/analysis/ForwardWT.cs
@@ -170,7 +170,7 @@ namespace CSJ2K.j2k.wavelet.analysis
{
cb0x = (System.Int32.Parse(str));
}
- catch (System.FormatException e)
+ catch (System.FormatException)
{
throw new System.ArgumentException("Bad first parameter for the " + "'-Wcboff' option: " + str);
}
@@ -184,7 +184,7 @@ namespace CSJ2K.j2k.wavelet.analysis
{
cb0y = (System.Int32.Parse(str));
}
- catch (System.FormatException e)
+ catch (System.FormatException)
{
throw new System.ArgumentException("Bad second parameter for the " + "'-Wcboff' option: " + str);
}
diff --git a/bin/CSJ2K.dll b/bin/CSJ2K.dll
deleted file mode 100644
index 522f3739..00000000
Binary files a/bin/CSJ2K.dll and /dev/null differ