Generating entropy encoded data indexing auxiliary information to assist quick JPEG decoding at JPEG encoding phase
View Patent ↗A JPEG encoding process may generate entropy encoded data indexing auxiliary information. With the assistance of such auxiliary information, a quick JPEG decoder is implemented to significantly improve the performance of processing large sized JPEG images on the mobile systems with limited computation power.
1. A method for processing an image, comprising:
searching for define restart interval and restart markers in a JPEG bitstream of the image;
based on said searching, recording in an auxiliary information, using a processor, a restart interval, a total number of the restart markers, and bit offsets of the restart markers in the JPEG bitstream;
inserting the auxiliary information as a reserved segment in the JPEG bitstream; and
transmitting or saving the JPEG bitstream.
2. A method for processing a JPEG bitstream of an image, the JPEG bitstream including restart markers inserted at a restart interval between segments of minimum coded units (MCUs), the method comprising:
parsing auxiliary information that was inserted as a reserved segment in the JPEG bitstream, the auxiliary information including the restart interval, a total number of the restart markers, and bit offsets of the restart markers in the JPEG bitstream;
determining, using a processor, the restart interval, the total number of the restart markers, and the bit offsets of the restart markers in the JPEG bitstream included in the auxiliary information;
receiving a request for MCUs;
determining one or more restart markers that demarcate one or more segments of MCUs including the requested MCUs based on a size of the image, a size of the MCUs, the restart interval, and the total number of the restart markers;
retrieving one or more segments of MCUs including the requested MCUs from the JPEG bitstream based on one or more bit offsets of the one or more restart markers;
decoding the one or more segments of MCUs to form an other image composed of the requested MCUs;
encoding the other image to form an other bitstream; and
transmitting or saving the other bitstream.
3. The method of claim 2 , further comprising displaying the other image.