BitMiracle.LibJpeg.Classic.Internal.jpeg_d_main_controller.set_wraparound_pointers C# (CSharp) Method

set_wraparound_pointers() private method

Set up the "wraparound" pointers at top and bottom of the pointer lists. This changes the pointer list state from top-of-image to the normal state.
private set_wraparound_pointers ( ) : void
return void
        private void set_wraparound_pointers()
        {
            int M = m_cinfo.min_DCT_v_scaled_size;
            for (int ci = 0; ci < m_cinfo.m_num_components; ci++)
            {
                /* height of a row group of component */
                int rgroup = (m_cinfo.Comp_info[ci].V_samp_factor * m_cinfo.Comp_info[ci].DCT_v_scaled_size) / m_cinfo.min_DCT_v_scaled_size;

                int[] ind0 = m_funnyIndices[0][ci];
                int[] ind1 = m_funnyIndices[1][ci];

                for (int i = 0; i < rgroup; i++)
                {
                    ind0[i] = ind0[rgroup * (M + 2) + i];
                    ind1[i] = ind1[rgroup * (M + 2) + i];

                    ind0[rgroup * (M + 3) + i] = ind0[i + rgroup];
                    ind1[rgroup * (M + 3) + i] = ind1[i + rgroup];
                }
            }
        }