# US 2016/0366403 A1 · Adaptive Motion JPEG Encoding Method and System

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2016/0366403 A1
- Document ID: US20160366403A1
- Status: Published application
- Kind: A1
- Application number: 15/010,171
- Filed: 2016-01-29
- Published: 2016-12-15
- Earliest claimed: 2015-06-15
- Assignees: Zhuhai Jieli Technology Co., Ltd
- Applicants: Zhuhai Jieli Technology Co., Ltd.
- Inventors: Guibin Wang; Jiada Chen
- Web page: https://patentgrep.com/patent/US20160366403A1

## CPC

- H04N 19/11: among a plurality of spatial predictive coding modes
- H04N 19/13: Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
- H04N 19/137: Motion inside a coding unit, e.g. average field, frame or block difference
- H04N 19/149: by estimating the code amount by means of a model, e.g. mathematical model or statistical model
- H04N 19/172: the region being a picture, frame or field
- H04N 19/186: the unit being a colour or a chrominance component
- H04N 19/96: Tree coding, e.g. quad-tree coding
- H04N 19/593: involving spatial prediction techniques
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

An adaptive Motion JPEG encoding method is disclosed, including: acquiring a video sequence; encoding a current video frame of the video sequence into JPEG format based on a Huffman description table, generating encoded symbols corresponding to the current video frame and counting frequencies of occurrence of the encoded symbols corresponding to the current video frame; and updating the Huffman description table with Canonical Huffman encoding based on the frequencies of occurrence of the encoded symbols corresponding to the current video frame, the updated Huffman description table being used for encoding a next video frame adjacent to the current video frame of the video sequence into JPEG format. The adaptive Motion JPEG encoding method uses the correlation between the Huffman description tables of the adjacent frames to reduce the redundant information between the video frames. An adaptive Motion JPEG encoding system is also disclosed.

## Claims

### Claim 1

An adaptive Motion JPEG encoding method, comprising:
acquiring a video sequence;
encoding a current video frame of the video sequence into JPEG format based on a Huffman description table, generating encoded symbols corresponding to the current video frame and counting frequencies of occurrence of the encoded symbols corresponding to the current video frame; and
updating the Huffman description table with Canonical Huffman encoding based on the frequencies of occurrence of the encoded symbols corresponding to the current video frame, the updated Huffman description table being used for encoding a next video frame adjacent to the current video frame of the video sequence into JPEG format.

### Claim 2 (depends on 1)

The method of claim 1, wherein the step of generating encoded symbols corresponding to the current video frame and counting the frequencies of occurrence of the encoded symbols corresponding to the current video frame includes:
counting, based on a statistical proportion of the encoded symbols, the frequencies of occurrence of the encoding symbols corresponding to the current video frame.

### Claim 3 (depends on 2)

The method of claim 2, wherein the step of updating the Huffman description table with Canonical Huffman encoding based on the frequencies of occurrence of the encoded symbols corresponding to the current video frame includes:
constructing a further Huffman description table, after counting the frequencies of occurrence of the encoded symbols based on the statistical proportion of the encoded symbols;
updating the Huffman description table with the constructed further Huffman description table, after the current video frame have been encoded into JPEG format.

### Claim 4 (depends on 2)

The method of claim 2, further comprising determining the statistical proportion of the encoded symbols based on an output encoding bit rate of a JPEG encoding unit and/or a usage ratio of a control unit.

### Claim 5 (depends on 4)

The method of claim 4, wherein the step of determining the statistical proportion of the encoded symbols based on the output encoding bit rate of the JPEG encoding unit and the usage ratio of the control unit includes:
setting a first proportion as the statistical proportion when the usage ratio of the control unit is less than or equal to a first threshold and the encoding bit rate is less than or equal to a second threshold;
setting a second proportion as the statistical proportion when the usage ratio of the control unit is less than or equal to the first threshold and the encoding bit rate is greater than the second threshold and less than or equal to a third threshold; and
setting a third proportion as the statistical proportion when the usage ratio of the control unit is less than or equal to the first threshold and the encoding bit rate is greater than the third threshold.

### Claim 6 (depends on 4)

The method of claim 4, further comprising determining statistical objects of the encoded symbols based on the output encoding bit rate of the JPEG encoding unit and the usage ratio of the control unit.

### Claim 7 (depends on 6)

The method of claim 6, wherein the encoded symbol includes a DC and AC intermediate symbols, the DC intermediate symbol includes a DC intermediate symbol of a luminance component and a DC intermediate symbol of a chrominance component, the AC intermediate symbol includes an AC intermediate symbol of a luminance component and an AC intermediate symbol of a chrominance component, and determining the statistical objects of the encoded symbol includes:
setting the DC intermediate symbol of the luminance component, the AC intermediate symbol of the luminance component, the DC intermediate symbol of the chrominance component and the AC intermediate symbol of the chrominance component as statistical objects of the encoded symbol when the usage ratio of the control unit is less than or equal to a first threshold, and the encoding bit rate is less than or equal to a second threshold;
setting the DC intermediate symbol of the luminance component, the AC intermediate symbol of the luminance component, the DC intermediate symbol of the chrominance component and the AC intermediate symbol of the chrominance component as statistical objects of the encoded symbol when the usage ratio of the control unit is less than or equal to the first threshold, and the encoding bit rate is greater than the second threshold and less than or equal to a third threshold; and
setting the DC intermediate symbol of the luminance component and the AC intermediate symbol of the luminance component as statistical objects of the encoded symbol when the usage ratio of the control unit is less than or equal to the first threshold, and the encoding bit rate is greater than the third threshold.

### Claim 8 (depends on 2)

The method of claim 2, wherein the encoded symbol includes a DC intermediate symbol which includes a DC intermediate symbol of a luminance component, and the statistical proportion of the encoded symbols is a ratio between the number of the DC intermediate symbols of the luminance components currently generated for the current video frame and the number of the DC intermediate symbols of all the luminance components corresponding to the current video frame.

### Claim 9 (depends on 1)

The method of claim 1, further comprising:
storing the updated Huffman description table in a custom Huffman tag field of the next video frame adjacent to the current video frame.

### Claim 10

An adaptive Motion JPEG encoding system, comprising:
an acquisition unit configure to acquire a video sequence;
a JPEG encoding unit configure to encode a current video frame of the video sequence output from the acquisition unit into JPEG format based on a Huffman description table, generate encoded symbols corresponding to the current video frame, and output a video compression stream;
a Huffman symbols statistic unit configured to count the frequencies of occurrence of the encoded symbols corresponding to the current video frame; and
a control unit configured to update the Huffman description table with Canonical Huffman encoding based on the frequencies of occurrence of the encoded symbols corresponding to the current video frame, the updated Huffman description table being used for encoding a next video frame adjacent to the current video frame of the video sequence into JPEG format.

### Claim 11 (depends on 10)

The system of claim 10, further comprising:
a Huffman statistic control unit configured to set a statistical proportion of the encoded symbols for the Huffman symbols statistic unit, the Huffman symbols statistic unit counting the frequencies of occurrence of the encoding symbols corresponding to the current video frame based on the statistical proportion of the encoded symbol.

### Claim 12 (depends on 11)

The system of claim 11, wherein the control unit is configured to construct a further Huffman description table, after the Huffman symbols statistic unit counts the frequencies of occurrence of the encoded symbols based on the statistical proportion of the encoded symbols; and
the control unit is further configured to update the Huffman description table with the constructed further Huffman description table, after the JPEG encoding unit has encoded the current video frame into JPEG format.

### Claim 13 (depends on 11)

The system of claim 11, wherein the Huffman statistic control unit is further configured to determine the statistical proportion of the encoded symbols based on an output encoding bit rate of the JPEG encoding unit and/or a usage ratio of a control unit.

### Claim 14 (depends on 13)

The system of claim 13, wherein,
the Huffman statistic control unit is configured to set a first proportion as the statistical proportion when the usage ratio of the control unit is less than or equal to a first threshold, and the encoding bit rate is less than or equal to a second threshold;
the Huffman statistic control unit is configured to set a second proportion as the statistical proportion when the usage ratio of the control unit is less than or equal to the first threshold, and the encoding bit rate is greater than the second threshold and less than or equal to a third threshold; and
the Huffman statistic control unit is configured to set a third proportion as the statistical proportion when the usage ratio of the control unit is less than or equal to the first threshold, and the encoding bit rate is greater than the third threshold.

### Claim 15 (depends on 13)

The system of claim 13, wherein the Huffman statistic control unit is further configured to determine statistical objects of the encoded symbols based on the output encoding bit rate of the JPEG encoding unit and the usage ratio of the control unit.

### Claim 16 (depends on 15)

The system of claim 15, wherein the encoded symbol includes a DC intermediate symbol and an AC intermediate symbol, the DC intermediate symbol includes a DC intermediate symbol of a luminance component and a DC intermediate symbol of a chrominance component, the AC intermediate symbol includes an AC intermediate symbol of a luminance component and an AC intermediate symbol of a chrominance component, and determining the statistical objects of the encoded symbol comprises:
the Huffman statistic control unit is configured to set the DC intermediate symbol of the luminance component, the AC intermediate symbol of the luminance component, the DC intermediate symbol of the chrominance component and the AC intermediate symbol of the chrominance component as statistical objects of the encoded symbol when the usage ratio of the control unit is less than or equal to a first threshold, and the encoding bit rate is less than or equal to a second threshold;
the Huffman statistic control unit is configured to set the DC intermediate symbol of the luminance component, the AC intermediate symbol of the luminance component, the DC intermediate symbol of the chrominance component and the AC intermediate symbol of the chrominance component as statistical objects of the encoded symbol when the usage ratio of the control unit is less than or equal to the first threshold, and the encoding bit rate is greater than the second threshold and less than or equal to a third threshold; and
the Huffman statistic control unit is configured to set the DC intermediate symbol of the luminance component and the AC intermediate symbol of the luminance component as statistical objects of the encoded symbol when the usage ratio of the control unit is less than or equal to the first threshold, and the encoding bit rate is greater than the third threshold.

### Claim 17 (depends on 11)

The system of claim 11, wherein the encoded symbol includes a DC intermediate symbol which comprises a DC intermediate symbol of a luminance component, and the statistical proportion of the encoded symbols is a ratio between the number of the DC intermediate symbols of the luminance components currently generated for the current video frame and the number of the DC intermediate symbols of all the luminance components corresponding to the current video frame.

### Claim 18 (depends on 10)

The system of claim 10, wherein the JPEG encoding unit is further configured to store the updated Huffman description table in a custom Huffman tag field of the next video frame adjacent to the current video frame.
