Browse Source

Move check into if statement

pull/298/head
James Jackson-South 9 years ago
parent
commit
0ff77ec6d6
  1. 8
      src/ImageSharp/Formats/Jpeg/Port/Components/ScanDecoder.cs

8
src/ImageSharp/Formats/Jpeg/Port/Components/ScanDecoder.cs

@ -627,14 +627,16 @@ namespace ImageSharp.Formats.Jpeg.Port.Components
// if (this.bitsCount <= 0) // if (this.bitsCount <= 0)
// { // {
// code = (short)this.ReadBit(stream); // code = (short)this.ReadBit(stream);
// this.bitsUnRead += 8;
// }
// if (this.endOfStreamReached || this.unexpectedMarkerReached) // if (this.endOfStreamReached || this.unexpectedMarkerReached)
// { // {
// return -1; // return -1;
// } // }
//
// this.bitsUnRead += 8;
// }
//
// this.accumulator = (this.accumulator << 8) | this.bitsData; // this.accumulator = (this.accumulator << 8) | this.bitsData;
// int lutIndex = (this.accumulator >> (this.bitsUnRead - 8)) & 0xFF; // int lutIndex = (this.accumulator >> (8 - this.bitsUnRead)) & 0xFF;
// int v = tree.Lookahead[lutIndex]; // int v = tree.Lookahead[lutIndex];
// if (v != 0) // if (v != 0)
// { // {

Loading…
Cancel
Save