Legal claims defining the scope of protection, as filed with the USPTO.
1. A JPEG encoding method, comprising: splitting an image into 8×8 pixel blocks and grouping the 8×8 pixel blocks into a number of minimum coded units according to a format of the image, such that each of the minimum coded units consists of a constant number of 8×8 pixel blocks; scanning the minimum coded units in a raster scan order, by subjecting each of the minimum coded units sequentially to forward discrete cosine transformation for converting the 8×8 pixel blocks of each of the minimum coded units into discrete cosine transformation (DCT) coefficients, quantization of the DCT coefficients according to a quantization table to obtain quantized DCT coefficients, zigzag scanning the quantized DCT coefficients to obtain sequenced DCT coefficients sequenced from a lowest frequency to a highest frequency, and entropy encoding for converting the sequenced DCT coefficients into bitstreams in correspondence with the minimum coded units, wherein the sequenced DCT coefficients include AC coefficients and DC coefficients, and the entropy encoding is accomplished by run-length encoding the AC coefficients while not performing differential pulse-code modulation on the DC coefficients; aligning the bitstreams by byte stuffing to obtain byte-aligned bitstreams in correspondence with the minimum coded units; generating compression data of a special JPEG file from the byte-aligned bitstreams; acquiring, in the raster scan order, positions of the byte-aligned bitstreams in correspondence with the minimum coded units in the compression data of the special JPEG file, wherein a position of a first byte-aligned bitstream is recorded as zero; and encoding the positions by a run-length coding and compressing the encoded positions by a Huffman coding to establish a position table.
2. The JPEG encoding method of claim 1 , wherein the image is of a YUV format.
3. The JPEG encoding method of claim 1 , wherein the byte stuffing includes inserting zeros to align the bitstreams.
4. The JPEG encoding method of claim 1 , wherein establishing a position table includes recording the positions of the byte-aligned bitstreams in correspondence with the minimum coded units in the compression data of the special JPEG file in storage spaces having a same size.
5. The JPEG encoding method of claim 4 , wherein the same size of the storage spaces is 4 bytes.
6. The JPEG encoding method of claim 1 , wherein the special JPEG file further includes, besides the compression data, a start of image (SOI), an end of image (EOI), tables and a frame header/scan header, respectively the same as an SOI, an EOI, tables and a frame header/scan header of a standard JPEG file.
7. The JPEG encoding method of claim 6 , further comprising the following steps after generating compression data of a special JPEG file or after establishing a position table: transcoding the header of the special JPEG file to a standard header by adding thereto a JPEG DRI marker that specifies a restart interval between the minimum coded units, wherein the JPEG DRI marker code is “0x FF DD 00 04 00 01”; transcoding the compression data of the special JPEG file to standard compression data by inserting therein a restart marker at an end of each of the minimum coded units, wherein the restart marker is inserted, with 2 bytes thereof cycling from “0x FF D0” to “0x FF D7”; and creating a standard JPEG file from the standard compression data, the SOI, the EOI, the tables and the frame header/scan header.
8. A method of decoding a special JPEG file established according to the method of claim 6 , comprising: determining, based on a top-left corner entry, a width and a height of an image region of interest, a position of a byte-aligned bitstream of a minimum coded unit in correspondence with the image region of interest in the compression data of the special JPEG file; extracting byte-aligned bitstreams from the compression data of the special JPEG file according to the determined position, and entropy decoding the extracted bitstreams to obtain corresponding quantized DCT coefficients sequenced from a lowest frequency to a highest frequency, wherein the quantized DCT coefficients include AC coefficients and DC coefficients, and the entropy encoding is accomplished by run-length encoding the AC coefficients while not performing differential pulse-code modulation on the DC coefficients; inverse quantizing the sequenced, quantized DCT coefficients to obtain inverse-quantized DCT coefficients; performing an inverse zigzag scan on the inverse-quantized DCT coefficients to rearrange the inverse-quantized DCT coefficients in a raster scan order; converting the rearranged DCT coefficients into reconstructed 8×8 pixel blocks using an inverse discrete cosine transformation; and combining the reconstructed 8×8 pixel blocks together in the raster scan order to generate an image.
9. A JPEG encoding system, comprising: an image splitting module for splitting an image into 8×8 pixel blocks and grouping the 8×8 pixel blocks into a number of minimum coded units according to a format of the image, such that each of the minimum coded units consists of a constant number of 8×8 pixel blocks; a scanning module for scanning the minimum coded units in a raster scan order, by subjecting each of the minimum coded units sequentially to forward discrete cosine transformation for converting the 8×8 pixel blocks of each of the minimum coded units into discrete cosine transformation (DCT) coefficients, quantization of the DCT coefficients using a quantization table to obtain quantized DCT coefficients, zigzag scanning the quantized DCT coefficients to obtain sequenced DCT coefficients sequenced from a lowest frequency to a highest frequency, and entropy encoding for converting the sequenced DCT coefficients into bitstreams in correspondence with the minimum coded units, wherein the sequenced DCT coefficients include AC coefficients and DC coefficients, and the entropy encoding is accomplished by run-length encoding the AC coefficients while not performing differential pulse-code modulation on the DC coefficients; an aligning module for aligning the bitstreams by byte stuffing to obtain byte-aligned bitstreams in correspondence with the minimum coded units; a generating module for generating compression data of a special JPEG file from the byte-aligned bitstreams; and a position-table module for acquiring, in the raster scan order, positions of the byte-aligned bitstreams in correspondence with the minimum coded units in the compression data of the special JPEG file, encoding the positions by a run-length coding and compressing the encoded positions by a Huffman coding to establish a position table, wherein a position of a first byte-aligned bitstream is recorded as zero.
10. The JPEG encoding system of claim 9 , wherein the image is of a YUV format.
11. The JPEG encoding system of claim 9 , wherein the aligning module aligns the bitstreams by inserting zeros.
12. The JPEG encoding system of claim 9 , wherein the position-table module records the positions of the byte-aligned bitstreams in correspondence with the minimum coded units in the compression data of the special JPEG file in storage spaces having a same size.
13. The JPEG encoding system of claim 12 , wherein the same size of the storage space is 4 bytes.
14. The JPEG encoding system of claim 9 , wherein the generating module is further configured to generate an SOI, an EOI, tables and a frame header/scan header respectively as same as an SOI, an EOI, tables and a frame header/scan header of a standard JPEG file.
15. The JPEG encoding system of claim 14 , further comprising a transcoding module configured to: transcode the header of the special JPEG file to a standard header by adding thereto a JPEG DRI marker that specifies a restart interval between the minimum coded units, wherein the JPEG DRI marker is “0x FF DD 00 04 00 01”; transcode the compression data of the special JPEG file to standard compression data by inserting therein a restart marker at an end of each of the minimum coded units, wherein the restart markers is inserted, with 2 bytes thereof cycling from “0x FF D0” to “0x FF D7”; and create a standard JPEG file from the standard compression data, the SOI, the EOI, the tables and the frame header/scan header.
16. A JPEG decoding system for decoding a special JPEG file establised using the system of claim 14 , the system comprising: a position module for determining, based on a top-left corner entry, a width and a height of an image region of interest, a position of a byte-aligned bitstream of a minimum coded unit in correspondence with the image region of interest in the compression data of the special JPEG file; an entropy decoding module for extracting byte-aligned bitstreams from the compression data of the special JPEG file according to the determined position, and entropy decoding the extracted bitstreams to obtain corresponding quantized DCT coefficients sequenced from a lowest frequency to a highest frequency, wherein the quantized DCT coefficients include AC coefficients and DC coefficients, and the entropy encoding is accomplished by run-length encoding the AC coefficients while not performing differential pulse-code modulation on the DC coefficients; an inverse-quantization module for inverse quantizing the sequenced, quantized DCT coefficients to obtain inverse-quantized DCT coefficients; an inverse-zigzag-scan module for performing an inverse zigzag scan on the inverse-quantized DCT coefficients to rearrange the inverse-quantized DCT coefficients in a raster scan order; an IDCT module for converting the rearranged DCT coefficients into reconstructed 8×8 pixel blocks using an inverse discrete cosine transformation; and a combination module for combining the reconstructed 8×8 pixel blocks together in the raster scan order to generate an image.
Unknown
April 26, 2016
Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.