Patent ID: 11902524
Assignee: PEKING UNIVERSITY SHENZHEN GRADUATE SCHOOL
Field: Audio-visual technology (Electrical engineering)
Classification: CPC H | IPC H

Claim 5:
6. A decoding device for a quantization block, comprising a processor, configured to execute the following program modules stored in a memory:
determining module, for determining the scanning order of quantization coefficients in the quantization block according to a determined scanning method;
initialization module, for initializing, according to the scanning order, the scanning position of the quantization coefficients in the quantization block, and decoding a run-length starting from the initial scanning position; wherein the scanning position is a subscript of the quantization coefficients under the scanning order;
decoding module, for adding the subscript value corresponding to the current scanning position and the value of the next run-length starting from the current scanning position to obtain a scanning position of nonzero coefficients, decoding the values of the nonzero coefficients;
judging module, for judging whether the subscript value of the nonzero coefficients is the maximum subscript value, if yes, ending the decoding of the quantization block; if not, decoding the end flag bit of the quantization coefficients, and judging, according to the decoding result of the end flag bit of the quantization coefficients, whether there are undecoded nonzero coefficients, and if there are no undecoded nonzero coefficients, ending the decoding of the quantization block;
updating module, for updating the current scanning position if there are undecoded nonzero coefficients, adding 1 to the subscript value of the decoded nonzero coefficients, which is used as the current scanning position to decode the next run-length starting from the updated current scanning position, and for calling the decoding module;
wherein, the initialization module is further configured to perform the following operations:
step 310: pre-configuring a variable, and the initial value of the variable is set as zero;
step 320: parsing a bitstream in turn to obtain binary symbols, and for each binary symbol, judging whether the binary symbol is 1 or not: if yes, setting the current value of the variable as the value of the run-length, and ending the run-length decoding; if not, adding 1 to the value of the variable to obtain an updated current value of the variable, and judging whether the current value of the variable is less than a threshold;
step 330: if the current value of the variable is less than the threshold, returning to step 320;
step 340: if the current value of the variable is greater than or equal to the threshold, parsing the subsequent binary symbol string in a zero-order exponential Golomb code manner to obtain a value corresponding to the subsequent binary symbol string, and adding the value corresponding to the subsequent binary symbol string to the threshold to obtain the value of the run-length, and ending the run-length decoding.