FluxJpeg.Core.Decoder.JpegComponent.decode_ac_coefficients C# (CSharp) Method

decode_ac_coefficients() private method

Generated from text on F-23, F.13 - Huffman decoded of AC coefficients on ISO DIS 10918-1. Requirements and Guidelines.
private decode_ac_coefficients ( JPEGBinaryReader JPEGStream, float zz ) : void
JPEGStream FluxJpeg.Core.IO.JPEGBinaryReader
zz float
return void
        internal void decode_ac_coefficients(JPEGBinaryReader JPEGStream, float[] zz)
        {
            for (int k = 1; k < 64; k++)
            {
                int s = ACTable.Decode(JPEGStream);
                int r = s >> 4;
                s &= 15;


                if (s != 0)
                {
                    k += r;

                    r = (int)JPEGStream.ReadBits(s);
                    s = (int)HuffmanTable.Extend(r, s);
                    zz[k] = s;
                }
                else
                {
                    if (r != 15)
                    {
                        //throw new JPEGMarkerFoundException();
                        return;
                    }
                    k += 15;
                }
            }
        }
    }