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;
        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++] << 16; uVal = u[iOffs+i] - 128; vVal = v[iOffs+i] - 128;         
                r = yVal +  91881*vVal;
                g = yVal -  22554*uVal - 46802*vVal;
                b = yVal + 116130*uVal;

                if (r >= 16678912) r = 0x00FF0000;
                else { r &= ~(r >> 31); r = (r + 32768) >> 16; r <<= 16; }

                if (g >= 16678912) g = 0x0000FF00;
                else { g &= ~(g >> 31); g = (g + 32768) >> 16; g <<= 8; }

                if (b >= 16678912) b = 0x000000FF;
                else { b &= ~(b >> 31); b = (b + 32768) >> 16; }
                // ------- toRGB 'Macro' END

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

                // ------- toRGB 'Macro'
                yVal = y[k++] << 16; 
                r = yVal +  91881*vVal;
                g = yVal -  22554*uVal - 46802*vVal;
                b = yVal + 116130*uVal;

                if (r >= 16678912) r = 0x00FF0000;
                else { r &= ~(r >> 31); r = (r + 32768) >> 16; r <<= 16; }

                if (g >= 16678912) g = 0x0000FF00;
                else { g &= ~(g >> 31); g = (g + 32768) >> 16; g <<= 8; }

                if (b >= 16678912) b = 0x000000FF;
                else { b &= ~(b >> 31); b = (b + 32768) >> 16; }
                // ------- toRGB 'Macro' END

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

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

        return true;
    }