private boolean convertYUV422toRGB(int[] y, int[] u, int[] v, int[] rgb)
    {
        if (this.upSampler != null)
        {
           // Requires u & v of same size as y
           this.upSampler.superSampleHorizontal(u, u);
           this.upSampler.superSampleHorizontal(v, v);
           return this.convertYUV444toRGB(y, u, v, rgb);
        }

        final int half = this.width >> 1;
        final int rgbOffs = this.offset;
        final int rshift = this.iShift;
        final int adjust = (1 << rshift) >> 1;
        final int maxVal = (255 << rshift) - adjust;
        int oOffs = 0;
        int iOffs = 0;
        int k = 0;

        for (int j=0; j<this.height; j++)
        {
            for (int i=0; i<half; i++)
            {
                int r, g, b, yVal, uVal, vVal;
                final int idx = oOffs + i + i;

                // ------- toRGB 'Macro'
                yVal = y[k++] << 11; 
                uVal = u[iOffs+i]; 
                vVal = v[iOffs+i];
                r = yVal - 2489*uVal -  881*vVal;
                g = yVal +  491*uVal + 2583*vVal;
                b = yVal + 1907*uVal - 1813*vVal;
                
                if (r >= maxVal) r = 0x00FF0000;
                else { r &= ~(r >> 31); r = (r + adjust) >> rshift; r <<= 16; }
               
                if (g >= maxVal) g = 0x0000FF00;
                else { g &= ~(g >> 31); g = (g + adjust) >> rshift; g <<= 8; }

                if (b >= maxVal) b = 0x000000FF;
                else { b &= ~(b >> 31); b = (b + adjust) >> rshift; }
                // ------- toRGB 'Macro' END

                rgb[idx+rgbOffs] = r | g | b;

                // ------- toRGB 'Macro'
                yVal = y[k++] << 11;
                r = yVal - 2489*uVal -  881*vVal;
                g = yVal +  491*uVal + 2583*vVal;
                b = yVal + 1907*uVal - 1813*vVal;
                
                if (r >= maxVal) r = 0x00FF0000;
                else { r &= ~(r >> 31); r = (r + adjust) >> rshift; r <<= 16; }
               
                if (g >= maxVal) g = 0x0000FF00;
                else { g &= ~(g >> 31); g = (g + adjust) >> rshift; g <<= 8; }

                if (b >= maxVal) b = 0x000000FF;
                else { b &= ~(b >> 31); b = (b + adjust) >> rshift; }
                // ------- toRGB 'Macro' END

                rgb[idx+rgbOffs+1] = r | g | b;
            }

            oOffs += this.stride;
            iOffs += half;
        }

        return true;
    }