BitMiracle.LibJpeg.Classic.Internal.huff_entropy_encoder.emit_restart_e C# (CSharp) Method

emit_restart_e() private method

private emit_restart_e ( int restart_num ) : void
restart_num int
return void
        private void emit_restart_e(int restart_num)
        {
            emit_eobrun();

            if (!m_gather_statistics)
            {
                flush_bits_e();
                emit_byte_e(0xFF);
                emit_byte_e((int)(JPEG_MARKER.RST0 + restart_num));
            }

            if (m_cinfo.m_Ss == 0)
            {
                /* Re-initialize DC predictions to 0 */
                for (int ci = 0; ci < m_cinfo.m_comps_in_scan; ci++)
                    m_saved.last_dc_val[ci] = 0;
            }
            else
            {
                /* Re-initialize all AC-related fields to 0 */
                EOBRUN = 0;
                BE = 0;
            }
        }