BitMiracle.LibJpeg.Classic.Internal.my_upsampler.h2v1_upsample C# (CSharp) 메소드

h2v1_upsample() 개인적인 메소드

Fast processing for the common case of 2:1 horizontal and 1:1 vertical. It's still a box filter.
private h2v1_upsample ( ComponentBuffer &input_data ) : void
input_data ComponentBuffer
리턴 void
        private void h2v1_upsample(ref ComponentBuffer input_data)
        {
            ComponentBuffer output_data = m_color_buf[m_currentComponent];

            for (int inrow = 0; inrow < m_cinfo.m_max_v_samp_factor; inrow++)
            {
                int row = m_upsampleRowOffset + inrow;
                int outIndex = 0;

                for (int col = 0; outIndex < m_cinfo.m_output_width; col++)
                {
                    byte invalue = input_data[row][col]; /* don't need GETJSAMPLE() here */
                    output_data[inrow][outIndex] = invalue;
                    outIndex++;
                    output_data[inrow][outIndex] = invalue;
                    outIndex++;
                }
            }
        }