Remote desktop protocol compression acceleration using single instruction, multiple dispatch instructions
AssigneeMicrosoft Corporation
InventorNadim Y. Abdo
Life of this patent
Estimating the term…
Abstract
Techniques are disclosed for compressing image data using the parallel instructions available on a vector processor. In an embodiment, a source image in RGBA format is received. A series of vector processor instructions are used to perform parallel processing steps of splitting the image into separate R, G, B, and A channels, then converting it into a YCoCg colorspace, compressing the Y, Co, and Cg channels separately, then saving an output image corresponding to a compressed version of the source image.
Claims20
A method for compressing a source image on a processor comprising a single instruction, multiple data instruction set (SIMD), comprising:
- aligning each channel of the source image, the source image comprising at least one pixel, each pixel comprising a red (R) value, a green (G) value, a blue (B) value, and an alpha (A) value;
- planarizing the source image to produce a R vector, a G vector and a B vector, the R vector comprising the R value of each pixel, the G vector comprising the G value of each pixel and the B vector comprising the B value of each pixel;
- unpacking each of the R vector, the G vector, and the B vector;
- setting a Co vector to equal the R vector minus the B vector;
- setting a Y vector to equal the sum of the B vector Co vector arithmetically divided by two;
- setting a Cg vector to equal the G vector minus the Y vector;
- setting the Y vector to equal the Y vector added to the Cg vector arithmetically divided by two;
- setting the Co vector to equal the Co vector divided by a color loss level and then added to a chroma mask;
- setting the Cg vector to equal the Cg vector divided by a color loss level and then added to a chroma mask;
- run-length encoding the Y vector;
- run-length encoding the Co vector;
- run-length encoding the Cg vector;
- and
- storing an output image, wherein the output image comprises the Y vector, the Co vector and the Cg vector, and the output image corresponds to the source image.
A method for compressing a source image on a processor that supports vector processing, comprising:
- receiving a source image comprising pixels, each pixel comprising red-green-blue-alpha (RGBA) image data;
- planarizing the image into its R, G and B components by sending a series of processor instructions to the processor, each processor instruction operating on data plurality of pixels simultaneously;
- converting the planarized image into luminance-orange-green (YCoCg) image data by sending a series of processor instructions to the processor, each processor instruction operating on data plurality of pixels simultaneously;
- compressing the Co and Co components of the YCoCg image by sending a series of processor instructions to the processor, each processor instruction operating on data plurality of pixels simultaneously;
- and
- storing the compressed image data as an output image.
A computer-readable storage medium, comprising computer-readable instructions that when executed upon a single-instruction multiple dispatch (SIMD) processor, the processor being capable of operating upon 128 bits simultaneously, perform operations comprising:
- 16-bit aligning each channel of the source image, the source image comprising at least one 32-bit pixel, each pixel comprising an 8-bit red (R) value, an 8-bit green (G) value, an 8-bit blue (B) value, and an 8-bit alpha (A) value;
- planarizing the source image to produce a R vector, a G vector and a B vector, the R vector comprising the R value of each pixel, the G vector comprising the G value of each pixel and the B vector comprising the B value of each pixel;
- unpacking each of the R vector, the G vector, and the B vector, such that eight zeros precede each 8-bit value in each vector;
- setting a Co vector to equal the R vector minus the B vector through a series of processor instructions that operate on 128-bits of each vector simultaneously;
- setting a Y vector to equal the sum of the B vector Co vector arithmetically bitwise shifted once to the right through a series of processor instructions that operate on 128-bits of each vector simultaneously;
- setting a Cg vector to equal the Y vector minus the G vector through a series of processor instructions that operate on 128-bits of each vector simultaneously;
- setting the Y vector to equal the Y vector added to the Cg vector arithmetically bitwise shifted once to the right through a series of processor instructions that operate on 128-bits of each vector simultaneously;
- setting the Co vector to equal the Co vector arithmetically bitwise shifted to the right by a color loss level and then added to a chroma mask through a series of processor instructions that operate on 128-bits of each vector simultaneously;
- setting the Cg vector to equal the Cg vector bitwise shifted to the right by a color loss level and then added to a chroma mask;
- through a series of processor instructions that operate on 128-bits of each vector simultaneously
- run-length encoding the Y vector through a series of processor instructions that operate on 128-bits of each vector simultaneously;
- run-length encoding the Co vector through a series of processor instructions that operate on 128-bits of each vector simultaneously;
- run-length encoding the Cg vector through a series of processor instructions that operate on 128-bits of each vector simultaneously;
- and
- storing an output image, wherein the output image comprises the Y vector, the Co vector and the Cg vector, the output image is in luminance-orange-green (YCoCg) colorspace, and the output image corresponds to the source image.
Dependencies are inferred from the claim text.