Encoding and decoding method, bitstream, encoder, decoder, and computer storage medium
View Patent ↗A decoding method, an encoding method, an encoder, and a decoder are provided. The decoding method includes that: determining, by parsing a bitstream, last significant coefficient location reverse identification information of a current slice, and coordinate information of a last significant coefficient of a current block of blocks in the current slice; in response to the last significant coefficient location reverse identification information indicating that last significant coefficient location reverse is applied to the blocks in the current slice, obtaining a location of the last significant coefficient of the current block by performing calculation on the coordinate information of the last significant coefficient; and determining coefficients of the current block by decoding coefficients located above the location of the last significant coefficient in a preset scanning order.
1 . A decoding method, performed by a decoder, the method comprising:
determining, by parsing a bitstream, last significant coefficient location reverse identification information, and coordinate information of a last significant coefficient of a current block;
obtaining a location of the last significant coefficient of the current block by performing calculation on the coordinate information of the last significant coefficient;
wherein in response to the last significant coefficient location reverse identification information indicating that the last significant coefficient location reverse is applied, determining the coordinate information of the last significant coefficient of the current block to be a horizontal distance and a vertical distance between the location of the last significant coefficient and a location of a bottom right sample of the current block; and
determining coefficients of the current block by decoding coefficients located ahead of the location of the last significant coefficient in a preset scanning order.
2 . The decoding method of claim 1 , further comprising:
determining first syntax element identification information by parsing the bitstream; and
performing the operation of determining the last significant coefficient location reverse identification information by parsing the bitstream, in response to the first syntax element identification information indicating that the last significant coefficient location reverse is enabled for a current sequence, wherein the current sequence comprises a current slice.
3 . The decoding method of claim 1 , wherein a component comprises at least one of a first colour component, a second colour component, or a third colour component,
wherein the first colour component is a luma component, the second colour component is a first chroma component, and the second colour component is a second chroma component, or
wherein the first colour component is a red component, the second colour component is a green component, and the third colour component is a blue component,
wherein determining the last significant coefficient location reverse identification information by parsing the bitstream comprises: determining first last significant coefficient location reverse identification information by parsing the bitstream,
wherein the method further comprises:
in response to a value of the first last significant coefficient location reverse identification information being a first value, determining that the last significant coefficient location reverse is applied to each of the first colour component, the second colour component, and the third colour component.
4 . An encoding method, performed by an encoder, the method comprising:
determining last significant coefficient location reverse identification information, and a location of a last significant coefficient of a current block;
determining coordinate information of the last significant coefficient of the current block according to the last significant coefficient location reverse identification information and the location of the last significant coefficient; and
encoding coefficients located ahead of the location of the last significant coefficient in a preset scanning order, and signalling, into a bitstream, bit information obtained through the encoding, the last significant coefficient location reverse identification information, and the coordinate information of the last significant coefficient,
wherein the location of the last significant coefficient comprises an initial horizontal coordinate and an initial vertical coordinate of the last significant coefficient, the initial horizontal coordinate and the initial vertical coordinate being a horizontal distance and a vertical distance between the location of the last significant coefficient and a location of a top left sample of the current block, respectively,
wherein determining the coordinate information of the last significant coefficient of the current block according to the last significant coefficient location reverse identification information and the location of the last significant coefficient comprises:
in response to a value of the last significant coefficient location reverse identification information being a first value, determining the coordinate information of the last significant coefficient by performing calculation on the initial horizontal coordinate and the initial vertical coordinate of the last significant coefficient,
wherein the method further comprises:
in response to the value of the last significant coefficient location reverse identification information being the first value, determining the coordinate information of the last significant coefficient to be a horizontal distance and a vertical distance between the location of the last significant coefficient and a location of a bottom right sample of the current block.
5 . The encoding method of claim 4 , further comprises: before determining the last significant coefficient location reverse identification information,
determining first syntax element identification information; and
performing the operation of determining the last significant coefficient location reverse identification information of in response to the first syntax element identification information indicating that the last significant coefficient location reverse is enabled for a current sequence, wherein the current sequence comprises a current slice.
6 . The encoding method of claim 4 , wherein a component comprises at least one of a first colour component, a second colour component, or a third colour component,
wherein the first colour component is a luma component, the second colour component is a first chroma component, and the second colour component is a second chroma component, or
wherein the first colour component is a red component, the second colour component is a green component, and the third colour component is a blue component,
wherein determining the last significant coefficient location reverse identification information comprises: determining first last significant coefficient location reverse identification information,
wherein the method further comprises:
determining a value of the first last significant coefficient location reverse identification information to be a first value in response to that the last significant coefficient location reverse is applied to each of the first colour component, the second colour component, and the third colour component.
7 . An encoder, comprising a first memory and a first processor, wherein
the first memory is configured to store thereon a computer program executable on the first processor; and
the first processor is configured to execute the computer program to perform:
determining last significant coefficient location reverse identification information, and a location of a last significant coefficient of a current block;
determining coordinate information of the last significant coefficient of the current block according to the last significant coefficient location reverse identification information and the location of the last significant coefficient; and
encoding coefficients located ahead of the location of the last significant coefficient in a preset scanning order, and signalling, into a bitstream, bit information obtained through the encoding, the last significant coefficient location reverse identification information, and the coordinate information of the last significant coefficient,
wherein the location of the last significant coefficient comprises an initial horizontal coordinate and an initial vertical coordinate of the last significant coefficient, the initial horizontal coordinate and the initial vertical coordinate being a horizontal distance and a vertical distance between the location of the last significant coefficient and a location of a top left sample of the current block, respectively,
wherein determining the coordinate information of the last significant coefficient of the current block according to the last significant coefficient location reverse identification information and the location of the last significant coefficient comprises:
in response to a value of the last significant coefficient location reverse identification information being a first value, determining the coordinate information of the last significant coefficient by performing calculation on the initial horizontal coordinate and the initial vertical coordinate of the last significant coefficient,
the first processor is further configured to execute the computer program to perform:
in response to the value of the last significant coefficient location reverse identification information being the first value, determining the coordinate information of the last significant coefficient to be a horizontal distance and a vertical distance between the location of the last significant coefficient and a location of a bottom right corner sample of the current block.
8 . A decoder, comprising a memory and a processor, wherein
the memory is configured to store thereon a computer program executable on the processor; and
the processor is configured to execute the computer program to perform:
determining, by parsing a bitstream, last significant coefficient location reverse identification information, and coordinate information of a last significant coefficient of a current block;
obtaining a location of the last significant coefficient of the current block by performing calculation on the coordinate information of the last significant coefficient;
in response to the last significant coefficient location reverse identification information indicating that the last significant coefficient location reverse is applied, determining the coordinate information of the last significant coefficient of the current block to be a horizontal distance and a vertical distance between the location of the last significant coefficient and a location of a bottom right sample of the current block; and
determining coefficients of the current block by decoding coefficients located ahead of the location of the last significant coefficient in a preset scanning order.
9 . A non-transitory computer-readable storage medium, having a computer program and a bitstream stored thereon, wherein the computer program, when executed by a processor, enables the processor to perform the steps of the encoding method of claim 4 to generate the bitstream.