BitMiracle.LibJpeg.Classic.Internal.my_trans_c_coef_controller.my_trans_c_coef_controller C# (CSharp) Method

my_trans_c_coef_controller() public method

Initialize coefficient buffer controller. Each passed coefficient array must be the right size for that coefficient: width_in_blocks wide and height_in_blocks high, with unit height at least v_samp_factor.
public my_trans_c_coef_controller ( jpeg_compress_struct cinfo, jvirt_array coef_arrays )
cinfo jpeg_compress_struct
coef_arrays jvirt_array
        public my_trans_c_coef_controller(jpeg_compress_struct cinfo, jvirt_array<JBLOCK>[] coef_arrays)
        {
            m_cinfo = cinfo;

            /* Save pointer to virtual arrays */
            m_whole_image = coef_arrays;

            /* Allocate and pre-zero space for dummy DCT blocks. */
            JBLOCK[] buffer = new JBLOCK[JpegConstants.C_MAX_BLOCKS_IN_MCU];
            for (int i = 0; i < JpegConstants.C_MAX_BLOCKS_IN_MCU; i++)
                buffer[i] = new JBLOCK();

            for (int i = 0; i < JpegConstants.C_MAX_BLOCKS_IN_MCU; i++)
            {
                m_dummy_buffer[i] = new JBLOCK[JpegConstants.C_MAX_BLOCKS_IN_MCU - i];
                for (int j = i; j < JpegConstants.C_MAX_BLOCKS_IN_MCU; j++)
                    m_dummy_buffer[i][j - i] = buffer[j];
            }
        }