CN116156203A - Syntax element encoding and decoding methods and devices, electronic equipment and storage medium - Google Patents

Syntax element encoding and decoding methods and devices, electronic equipment and storage medium Download PDF

Info

Publication number
CN116156203A
CN116156203A CN202111389452.XA CN202111389452A CN116156203A CN 116156203 A CN116156203 A CN 116156203A CN 202111389452 A CN202111389452 A CN 202111389452A CN 116156203 A CN116156203 A CN 116156203A
Authority
CN
China
Prior art keywords
value
syntax element
coding
width
height
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111389452.XA
Other languages
Chinese (zh)
Inventor
李振纲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CN202111389452.XA priority Critical patent/CN116156203A/en
Priority to PCT/CN2022/130709 priority patent/WO2023088141A1/en
Publication of CN116156203A publication Critical patent/CN116156203A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The present invention relates to the field of video encoding and decoding technologies, and in particular, to a method and apparatus for encoding and decoding a syntax element, an electronic device, and a storage medium. In the present invention, the encoding method of the syntax element includes: acquiring a first coding value according to the smaller value of the width syntax element and the value of the height syntax element; acquiring a second coding value according to the absolute value of the difference value between the value of the width syntax element and the value of the height syntax element; acquiring a third coding value according to the magnitude relation between the value of the width syntax element and the value of the height syntax element; sequentially encoding the first encoding value, the second encoding value and the third encoding value; wherein the first encoded value and the second encoded value are subjected to unsigned exponential golomb encoding, and the third encoded value is subjected to unsigned exponential golomb encoding or u (1) encoding. The coding and decoding efficiency of the syntax element can be improved.

Description

Syntax element encoding and decoding methods and devices, electronic equipment and storage medium
Technical Field
The present invention relates to the field of video encoding and decoding technologies, and in particular, to a method and apparatus for encoding and decoding a syntax element, an electronic device, and a storage medium.
Background
In recent years, with the continuous increase of user experience demands, providing high-definition and even ultra-high-definition video for users has become a trend of video services. Video signals contain a large amount of data and require a large amount of transmission bandwidth and storage space. Therefore, when transmitting and storing video signals, compression encoding is required for the video signals, and video compression technology is becoming an essential key technology in the field of video applications. In this context, the international standards organization successively advances the H.265/HEVC and H.266/VVC coding standards with higher compression performance. Compared with the previous generation video coding standard H.264/AVC, the H.265/HEVC can save more than 50% of code rate under the condition of realizing the same image quality. Whereas the latest coding standard h.266/VVC can further save more than 40% of the code rate compared to h.265/HEVC.
The new coding standard achieves higher compression rate than before, however, the efficiency of coding the syntax elements is not high enough, and a certain improvement space exists.
Disclosure of Invention
The invention mainly aims to provide a method, a device, an electronic device and a storage medium for encoding and decoding a syntax element, which are used for improving the encoding and decoding efficiency of the syntax element.
In order to solve the above problems, an embodiment of the present invention provides a method of encoding a syntax element, including:
acquiring a first coding value according to the smaller value of the width syntax element and the value of the height syntax element; acquiring a second coding value according to the absolute value of the difference value between the value of the width syntax element and the value of the height syntax element; acquiring a third coding value according to the magnitude relation between the value of the width syntax element and the value of the height syntax element; sequentially encoding the first encoding value, the second encoding value and the third encoding value; wherein the first encoded value and the second encoded value are subjected to unsigned exponential golomb encoding, and the third encoded value is subjected to unsigned exponential golomb encoding or u (1) encoding.
The embodiment of the invention also provides a method for decoding the syntax element, which comprises the following steps:
decoding the received code stream to sequentially obtain a first code value, a second code value and a third code value; the first coding value and the second coding value are obtained by unsigned exponential golomb decoding, the third coding value is obtained by unsigned exponential golomb decoding or u (1) decoding, the first coding value represents a smaller value of the width syntax element and the value of the height syntax element, the second coding value represents an absolute value of a difference value between the value of the width syntax element and the value of the height syntax element, and the third coding value represents a magnitude relation between the value of the width syntax element and the value of the height syntax element; and acquiring the value of the width syntax element and the value of the height syntax element according to the first coding value, the second coding value and the third coding value.
The embodiment of the invention also provides a coding device of the syntax element, which comprises: the first acquisition module is used for acquiring a first coding value according to the smaller value of the width syntax element and the value of the height syntax element; a second obtaining module, configured to obtain a second encoded value according to an absolute value of a difference between a value of the width syntax element and a value of the height syntax element; a third obtaining module, configured to obtain a third encoded value according to a magnitude relation between a value of the width syntax element and a value of the height syntax element; the coding module is used for coding the first coding value, the second coding value and the third coding value in sequence; wherein the first encoded value and the second encoded value are subjected to unsigned exponential golomb encoding, and the third encoded value is subjected to unsigned exponential golomb encoding or u (1) encoding.
The embodiment of the invention also provides a decoding device of the syntax element, which comprises:
the analysis module is used for decoding the received code stream to sequentially obtain a first code value, a second code value and a third code value; the first coding value and the second coding value are obtained by unsigned exponential golomb decoding, the third coding value is obtained by unsigned exponential golomb decoding or u (1) decoding, the first coding value represents a smaller value of the width syntax element and the value of the height syntax element, the second coding value represents an absolute value of a difference value between the value of the width syntax element and the value of the height syntax element, and the third coding value represents a magnitude relation between the value of the width syntax element and the value of the height syntax element; and the acquisition module is used for acquiring the value of the width syntax element and the value of the height syntax element according to the first coding value, the second coding value and the third coding value.
The embodiment of the invention also provides a server, which comprises: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of syntax element encoding described above or to perform the method of syntax element decoding described above.
Embodiments of the present invention also provide a computer-readable storage medium storing a computer program which, when executed by a processor, implements the above-described method of encoding a syntax element or implements the above-described method of decoding a syntax element.
According to the embodiment of the invention, the image width value and the image height value are associated, the difference value between the image height value and the image width value is obtained, and a third coding value used for representing the size relation between the image height value and the image width value is set. And further, the smaller value of the height value and the width value, the difference value of the height value and the width value, and the third encoded value are encoded, and the larger value of the height value and the width value is not encoded any more. The difference value of the width and the height and the third coding value are far smaller than larger values in the two, compared with the coding of the width and the height of the image in the traditional method, the numerical value of coded data is obviously reduced, and the coding bit number can be shortened by combining the characteristic that the smaller the coding value of the unsigned exponential Columbus coding mode is, so that the coding efficiency of the syntax element is improved. The u (1) code has the characteristic of small number of code bits for one-bit unsigned integer, so that the third code value representing the relation of width and height of the image is coded by adopting a u (1) code mode, the code bit number can be further shortened, and the coding efficiency of the syntax element can be improved.
Drawings
One or more embodiments are illustrated by way of example and not limitation in the figures of the accompanying drawings, in which like references indicate similar elements, and in which the figures do not depict a proportional limitation unless expressly stated otherwise.
FIG. 1 is a flow chart of a method of syntax element encoding in an embodiment according to the invention;
FIG. 2 is a flow chart of a method of syntax element decoding in an embodiment according to the invention;
fig. 3 is a flowchart of a method of syntax element decoding in accordance with another embodiment of the invention;
fig. 4 is a schematic structural view of an encoding apparatus of syntax elements according to an embodiment of the present invention;
fig. 5 is a schematic structural view of a decoding apparatus of syntax elements according to an embodiment of the present invention;
fig. 6 is a schematic structural view of an electronic device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, those of ordinary skill in the art will understand that in various embodiments of the present invention, numerous technical details have been set forth in order to provide a better understanding of the present invention. However, the claimed invention may be practiced without these specific details and with various changes and modifications based on the following embodiments. The following divisions of the embodiments are for convenience of description, and should not be construed as limiting the specific embodiments of the present invention, and the embodiments may be mutually combined and referred to without contradiction.
In the technical field of video compression, the H.265/HEVC, H.266/VVC coding standard is the most commonly used coding standard at present. The h.265/HEVC can achieve more than 50% code rate savings over the previous generation video coding standard h.264/AVC in the case of equivalent image quality, while the latest h.266/VVC coding standard can further achieve more than 40% code rate savings over the h.265/HEVC.
The h.265/HEVC, h.266/VVC coding standards employ unsigned exponential golomb coding for both the width syntax element and the height syntax element that characterize the image resolution information. The unsigned exponential golomb encoding table is shown in table 1.
TABLE 1 unsigned exponential golomb encoding table
Bit string format Code value range
1 0
01x 0 1-2
001x 1 x 0 3-6
0001x 2 x 1 x 0 7-14
00001x 3 x 2 x 1 x 0 15-30
000001x 4 x 3 x 2 x 1 x 0 31-62
0000001x 5 x 4 x 3 x 2 x 1 x 0 63-126
00000001x 6 x 5 x 4 x 3 x 2 x 1 x 0 127-254
000000001x 7 x 6 x 5 x 4 x 3 x 2 x 1 x 0 255-510
0000000001x 8 x 7 x 6 x 5 x 4 x 3 x 2 x 1 x 0 511-1022
..... .....
As can be seen from the table, the characteristic of the unsigned exponential golomb code is that the number of code bits increases with the increase of the code value, and when the difference of the code values is large, the difference of the consumed code bits is also large. The unsigned exponential golomb coding is used for coding the wide and high syntax elements, and the number of consumed coding bits is large under the condition of large image resolution. The coding efficiency of the mode for coding the wide and high syntax elements is not high enough, and a certain lifting space exists.
An embodiment of the present invention relates to a method for encoding syntax elements, and a specific flow is shown in fig. 1. The method for encoding the syntax element according to the embodiment can be applied to products such as conference televisions, set top boxes, media encoding and decoding chips and the like.
In this embodiment, a first encoded value is obtained from a smaller value of the width syntax element and the value of the height syntax element; acquiring a second coding value according to the absolute value of the difference value between the value of the width syntax element and the value of the height syntax element; acquiring a third coding value according to the magnitude relation between the value of the width syntax element and the value of the height syntax element; sequentially encoding the first encoding value, the second encoding value and the third encoding value; the first code value and the second code value are subjected to unsigned exponential golomb coding, and the third code value is subjected to unsigned exponential golomb coding or u (1) coding, so as to improve coding and decoding efficiency of the syntax element.
Implementation details of the encoding method of the syntax element in the present embodiment are specifically described below, and the following is merely provided for convenience of understanding, and is not necessary to implement the present embodiment. The specific flow is shown in fig. 1, and at least comprises but is not limited to the following steps:
step 101, obtaining a first coding value according to the smaller value of the values of the width syntax element and the values of the height syntax element.
In this step, the value of the width syntax element is the width of the image in the video, and the value of the height syntax element is the height of the image in the video. Comparing the value of the width syntax element with the value of the height syntax element, and taking the smaller one as a first coding value. If the first code value is denoted as a, the first code value may be formulated as a=min (wide, high).
Step 102, obtaining a second coding value according to the absolute value of the difference between the value of the width syntax element and the value of the height syntax element.
In this step, a difference value between the value of the acquisition width syntax element and the value of the height syntax element is first calculated. And further sets the second encoded value to the absolute value of the difference. If the second code value is denoted B, the second code value can be formulated as b=abs (wide, high).
Step 103, obtaining a third coding value according to the magnitude relation between the value of the width syntax element and the value of the height syntax element.
In this step, a third encoded value is set to characterize the magnitude relation of the value of the width syntax element and the value of the height syntax element. The third encoded value in this step is preferably a value with a small number of encoded bits in the unsigned exponential golomb coding rule.
In one example, obtaining the third encoded value from a magnitude relation of the value of the width syntax element and the value of the height syntax element includes: taking the value of the width grammar element as a molecule, taking the value of the height grammar element as a denominator, and calculating the ratio of the width grammar element to the height grammar element; setting the third encoded value to a value that characterizes the value of the width syntax element being not less than the value of the height syntax element, in the case of a ratio not less than 1; in case the ratio is smaller than 1, the third encoded value is set to a value characterizing that the value of the width syntax element is smaller than the value of the height syntax element.
0 and 1 are values with the least number of encoding bits using the unsigned exponential golomb encoding rule, while the third encoding value only characterizes the magnitude relationship of the value of the width syntax element and the value of the height syntax element, and is not actually mathematically significant. The third encoding value may be set to 1 or 0 according to the ratio of the wide high syntax element values in this example. In practical implementation, the third coding value may be set to 1 to represent that the value of the width syntax element is not smaller than the value of the height syntax element, while the third coding value is set to 0 to represent that the value of the width syntax element is smaller than the value of the height syntax element. Alternatively, the third encoding value is set to 0 to represent that the value of the width syntax element is not smaller than the value of the height syntax element, and accordingly the third encoding value is set to 1 to represent that the value of the width syntax element is smaller than the value of the height syntax element.
In one example, the width syntax element and the height syntax element referred to in this embodiment both conform to the h.265/HEVC or h.266/VVC coding standard. It should be noted that the coding method of the syntax element in this embodiment is applicable not only to syntax elements conforming to the h.265/HEVC or h.266/VVC coding standard, but also to syntax elements conforming to other coding standards.
In an example where both the width syntax element and the height syntax element conform to the h.265/HEVC coding standard, the width syntax element is pic_width_in_luma_samples; the height syntax element is pic_height_in_luma_samples; in an example where both the width syntax element and the height syntax element are compliant with the h.266/VVC coding standard, the width syntax element may include: sps_pic_width_max_in_luma_samples and/or pps_pic_width_in_luma_samples; the height syntax element may include: sps_pic_height_max_in_luma_samples and/or pps_pic_height_in_luma_samples.
The h.266/VVC coding standard contains more syntax elements representing the image width and height information than the previous coding standard, so that the syntax elements representing the image width and height information are coded by the coding method in the embodiment, so that the code rate can be better saved, and the coding efficiency is improved greatly.
104, coding the first coding value, the second coding value and the third coding value in sequence; wherein the first encoded value and the second encoded value are subjected to unsigned exponential golomb encoding, and the third encoded value is subjected to unsigned exponential golomb encoding or u (1) encoding.
In this step, the encoded values obtained in the above steps are encoded, the first encoded value and the second encoded value are subjected to unsigned exponential golomb encoding, and the third encoded value may be encoded by unsigned exponential golomb encoding. The unsigned exponential golomb coding has the characteristics of smaller coding value and smaller coding bit number, so that the bit number consumed for coding the width and height information can be saved by combining the technical means of coding the coding value by adopting the unsigned exponential golomb coding on the basis of using the coding value with the greatly reduced value to replace the value of the width and height syntax element as the coding object in the step.
The u (1) code involved in this step is a one-bit unsigned integer code method, and both unsigned exponential golomb codes belong to entropy codes. For the case where the code value is 0 or 1, u (1) coding is one of the coding modes that most saves the number of coding bits. Therefore, in this step, u (1) encoding can also be performed on the third encoded value.
In an exemplary embodiment, the width syntax element and the height syntax element both conform to the h.265/HEVC coding standard. Wherein the width syntax element is pic_width_in_luma_samples; the height syntax element is pic_height_in_luma_samples. The process of encoding the above syntax elements is as follows: first the encoding device compares the magnitudes of the values of pic_width_in_luma_samples and pic_height_in_luma_samples syntax elements. The smaller value of the two, i.e. the first encoded value, may be represented by the syntax element pic_width_height_min. The acquisition of the first encoded value may be formulated as pic_width_height_min=min (pic_width_in_luma_samples, pic_height_in_luma_samples).
Subsequently, the syntax element pic_diff_width_height_abs may represent the absolute value of the difference between pic_width_in_luma_samples and pic_height_in_luma_samples syntax element values, i.e. the second coding value, which may be obtained by a formula as pic_diff_width_height_abs=abs (pic_width_in_luma_samples-pic_height_in_luma_samples).
When the third coding value is obtained, a size relation syntax element pic_aspect_ratio_flag indicating the size relation of the width and the height of the image may be added, and the value thereof is used as the third coding value, when width > =high, the value of pic_aspect_ratio_flag may be set to 0, and when width < high, pic_aspect_ratio_flag is set to 1, that is, the obtaining of the third coding value is completed. And finally, sequentially carrying out unsigned exponential golomb coding writing of the syntax elements according to the order of pic_width_height_min, pic_diff_width_height_abs and pic_aspect_ratio_flag.
According to the embodiment of the invention, the image width value and the image height value are associated, the difference value between the image height value and the image width value is obtained, and a third coding value used for representing the size relation between the image height value and the image width value is set. And further, the smaller value of the height value and the width value, the difference value of the height value and the width value, and the third encoded value are encoded, and the larger value of the height value and the width value is not encoded any more. The difference value of the width and the height and the third coding value are far smaller than larger values in the two, compared with the coding of the width and the height of the image in the traditional method, the numerical value of coded data is obviously reduced, and the coding bit number can be shortened by combining the characteristic that the smaller the coding value of the unsigned exponential Columbus coding mode is, so that the coding efficiency of the syntax element is improved. The u (1) code has the characteristic of small number of code bits for one-bit unsigned integer, so that the third code value representing the relation of width and height of the image is coded by adopting a u (1) code mode, the code bit number can be further shortened, and the coding efficiency of the syntax element can be improved.
Another embodiment of the present invention relates to a method for decoding syntax elements, and a specific flow is shown in fig. 2. In this embodiment, the received code stream is decoded to sequentially obtain a first code value, a second code value and a third code value; the first coding value and the second coding value are obtained by unsigned exponential golomb decoding, the third coding value is obtained by unsigned exponential golomb decoding or u (1) decoding, the first coding value represents a smaller value of the width syntax element and the value of the height syntax element, the second coding value represents an absolute value of a difference value between the value of the width syntax element and the value of the height syntax element, and the third coding value represents a magnitude relation between the value of the width syntax element and the value of the height syntax element; and acquiring the value of the width syntax element and the value of the height syntax element according to the first coding value, the second coding value and the third coding value.
Implementation details of the method of decoding syntax elements in this embodiment are specifically described below, and the following is merely provided for convenience of understanding, and is not necessary to implement this embodiment. The specific flow is shown in fig. 2, and at least comprises but is not limited to the following steps:
step 201, decoding the received code stream to obtain a first code value, a second code value and a third code value in sequence. The first code value and the second code value are obtained by unsigned exponential golomb decoding, and the third code value is obtained by unsigned exponential golomb decoding or u (1) decoding.
In this step, the first encoded value represents a smaller value of the width syntax element and the value of the height syntax element, the second encoded value represents an absolute value of a difference between the value of the width syntax element and the value of the height syntax element, and the third encoded value represents a magnitude relation between the value of the width syntax element and the value of the height syntax element.
Step 202, obtaining the value of the width syntax element and the value of the height syntax element according to the first encoded value, the second encoded value and the third encoded value.
In this step, the syntax element decoding apparatus can obtain the magnitude relation between the value of the width syntax element and the value of the height syntax element from the value of the third encoded value analyzed in the code stream. By combining the size relationship, the smaller value in the wide-high syntax element is the first coding value, and the larger value is the sum of the first coding value and the second coding value.
In one example, obtaining the value of the width syntax element and the value of the height syntax element from the first encoded value, the second encoded value, and the third encoded value may include: in the case where the third encoded value is a value that characterizes the value of the width syntax element being not less than the value of the height syntax element, taking the first encoded value as the value of the height syntax element and taking the sum of the first encoded value and the second encoded value as the value of the width syntax element; in the case where the third encoded value is a value representing that the value of the width syntax element is smaller than the value of the height syntax element, the first encoded value is taken as the value of the width syntax element, and the sum of the first encoded value and the second encoded value is taken as the value of the height syntax element.
In an example in which the third coding value is set to 0 or 1 according to the magnitude relation of the values of the wide high syntax element, in the case where the third coding value is 0, the value of the high syntax element is set to the first coding value, and the value of the wide syntax element is set to the sum of the first coding value and the second coding value; in the case where the third encoded value is 1, the value of the width syntax element is set to the first encoded value, and the value of the height syntax element is set to the sum of the first encoded value and the second encoded value. The flow chart relating to this example is shown in fig. 3.
The present embodiment can analyze the first code value, the second code value, and the third code value from the code stream encoded by the above-described encoding method. And further, according to the first coding value, the second coding value and the third coding value, obtaining a value of a width syntax element and a value of a height syntax element, and obtaining the height and width values of the image in the video. Compared with the traditional analysis mode of analyzing the image width and height information from the longer codes, the method and the device analyze the code values according to the shorter codes, further acquire the width and the height, and improve the decoding efficiency.
The above method is divided into steps, which are only for clarity of description, and may be combined into one step or split into multiple steps when implemented, so long as they include the same logic relationship, and they are all within the protection scope of this patent; it is within the scope of this patent to add insignificant modifications to the algorithm or flow or introduce insignificant designs, but not to alter the core design of its algorithm and flow.
An embodiment of the present invention relates to an encoding apparatus of syntax elements, as shown in fig. 4, including:
a first obtaining module 301, configured to obtain a first encoded value according to a smaller value of the width syntax element and the value of the height syntax element;
a second obtaining module 302, configured to obtain a second encoded value according to an absolute value of a difference between a value of the width syntax element and a value of the height syntax element;
a third obtaining module 303, configured to obtain a third encoded value according to a magnitude relation between a value of the width syntax element and a value of the height syntax element;
the encoding module 304 is configured to encode the first encoded value, the second encoded value, and the third encoded value in sequence; wherein the first encoded value and the second encoded value are subjected to unsigned exponential golomb encoding, and the third encoded value is subjected to unsigned exponential golomb encoding or u (1) encoding.
In one example, the encoding apparatus of the syntax element may further include: a calculating module (not shown in the figure) for calculating a ratio of the width syntax element and the height syntax element; setting the third encoded value to a value that characterizes the value of the width syntax element being not less than the value of the height syntax element, in the case of a ratio not less than 1; in case the ratio is smaller than 1, the third encoded value is set to a value characterizing that the value of the width syntax element is smaller than the value of the height syntax element.
The encoding device for the syntax element provided in this embodiment can correlate the image width value with the height value, obtain the difference between the image height value and the width value, and set a third encoding value for representing the magnitude relation between the image height value and the width value. And further, the smaller value of the height value and the width value, the difference value of the height value and the width value, and the third encoded value are encoded, and the larger value of the height value and the width value is not encoded any more. The difference value of the width and the height and the third coding value are far smaller than larger values in the two, compared with the coding of the width and the height of the image in the traditional method, the numerical value of coded data is obviously reduced, and the coding bit number can be shortened by combining the characteristic that the smaller the coding value of the unsigned exponential Columbus coding mode is, so that the coding efficiency of the syntax element is improved. The u (1) coding has the characteristic of small coding bit number of the one-bit unsigned integer, so that the third coding value representing the relation of the width and the height of the image is coded by adopting a u (1) coding mode, the coding bit number can be further shortened, and the coding efficiency of the syntax element can be improved.
An embodiment of the present invention relates to a decoding apparatus of syntax elements, as shown in fig. 5, including:
the parsing module 401 is configured to decode the received code stream, and sequentially obtain a first encoded value, a second encoded value and a third encoded value; the first coding value and the second coding value are obtained by unsigned exponential golomb decoding, the third coding value is obtained by unsigned exponential golomb decoding or u (1) decoding, the first coding value represents a smaller value of the width syntax element and the value of the height syntax element, the second coding value represents an absolute value of a difference value between the value of the width syntax element and the value of the height syntax element, and the third coding value represents a magnitude relation between the value of the width syntax element and the value of the height syntax element;
the obtaining module 402 is configured to obtain a value of the width syntax element and a value of the height syntax element according to the first encoded value, the second encoded value and the third encoded value.
In one example, the decoding apparatus of the syntax element may further include: an assignment module (not shown in the figure) for taking the first encoded value as the value of the height syntax element and taking the sum of the first encoded value and the second encoded value as the value of the width syntax element, in the case that the third encoded value is a value that characterizes the value of the width syntax element being not smaller than the value of the height syntax element; in the case where the third encoded value is a value representing that the value of the width syntax element is smaller than the value of the height syntax element, the first encoded value is taken as the value of the width syntax element, and the sum of the first encoded value and the second encoded value is taken as the value of the height syntax element.
The syntax element decoding apparatus according to the present embodiment can parse the first encoded value, the second encoded value, and the third encoded value from the code stream encoded by the encoding method. And further, according to the first coding value, the second coding value and the third coding value, obtaining a value of a width syntax element and a value of a height syntax element, and obtaining the height and width values of the image in the video. Compared with the traditional analysis mode of analyzing the image width and height information from the longer codes, the method and the device analyze the code values according to the shorter codes, further acquire the width and the height, and improve the decoding efficiency.
It should be noted that each module in this embodiment is a logic module, and in practical application, one logic unit may be one physical unit, or may be a part of one physical unit, or may be implemented by a combination of multiple physical units. In addition, in order to highlight the innovative part of the present invention, units that are not so close to solving the technical problem presented by the present invention are not introduced in the present embodiment, but this does not indicate that other units are not present in the present embodiment.
Embodiments of the present invention also provide an electronic device, as shown in fig. 6, comprising at least one processor 501; and a memory 502 communicatively coupled to the at least one processor 501; the memory 502 stores instructions executable by the at least one processor 501, and the instructions are executed by the at least one processor 501 to enable the at least one processor 501 to perform the above method of encoding syntax elements or to perform the above method of decoding syntax elements.
Where the memory 502 and the processor 501 are connected by a bus, the bus may comprise any number of interconnected buses and bridges, the buses connecting the various circuits of the one or more processors 501 and the memory 502. The bus may also connect various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art, and therefore, will not be described any further herein. The bus interface provides an interface between the bus and the transceiver. The transceiver may be one element or may be a plurality of elements, such as a plurality of receivers and transmitters, providing a means for communicating with various other apparatus over a transmission medium. The data processed by the processor 501 is transmitted over a wireless medium via an antenna, which further receives the data and transmits the data to the processor 501.
The processor 501 is responsible for managing the bus and general processing and may also provide various functions including timing, peripheral interfaces, voltage regulation, power management, and other control functions. And memory 502 may be used to store data used by processor 501 in performing operations.
The above product may perform the method provided by the embodiment of the present invention, and has the corresponding functional module and beneficial effect of the performing method, and technical details not described in detail in the embodiment of the present invention may be referred to the method provided by the embodiment of the present invention.
Embodiments of the present invention also provide a computer-readable storage medium storing a computer program. The computer program, when executed by a processor, implements the method of syntax element encoding described above, or the method of syntax element decoding described above.
Those skilled in the art will appreciate that all or part of the steps in implementing the methods of the embodiments described above may be implemented by a program stored in a storage medium, including instructions for causing a device (which may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps in the methods of the embodiments of the invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The embodiments described hereinabove are intended to provide those of ordinary skill in the art with a variety of modifications and variations to the embodiments described above without departing from the spirit of the invention, and therefore the scope of the invention is not limited by the embodiments described hereinabove, but is to be accorded the broadest scope of the innovative features recited in the claims.

Claims (10)

1. A method of syntax element encoding, comprising:
acquiring a first coding value according to the smaller value of the width syntax element and the value of the height syntax element;
acquiring a second coding value according to the absolute value of the difference value between the value of the width syntax element and the value of the height syntax element;
acquiring a third coding value according to the magnitude relation between the value of the width syntax element and the value of the height syntax element;
sequentially encoding the first encoded value, the second encoded value and the third encoded value; and performing unsigned exponential golomb coding on the first coding value and the second coding value, and performing unsigned exponential golomb coding or u (1) coding on the third coding value.
2. The method of encoding a syntax element according to claim 1, wherein said obtaining a third encoded value according to a magnitude relation between a value of said width syntax element and a value of said height syntax element comprises:
taking the value of the width grammar element as a molecule, taking the value of the height grammar element as a denominator, and calculating the ratio of the width grammar element to the height grammar element;
setting the third encoded value to a value that characterizes the value of the width syntax element being not less than the value of the height syntax element, in the case that the ratio is not less than 1;
in the case that the ratio is less than 1, the third encoded value is set to a value that characterizes the value of the width syntax element as being less than the value of the height syntax element.
3. The method of syntax element coding according to claim 1, wherein said width syntax element and said height syntax element both conform to h.265/HEVC or h.266/VVC coding standards.
4. A method of coding a syntax element according to claim 3, wherein in case both the width syntax element and the height syntax element conform to the h.265/HEVC coding standard, the width syntax element is pic_width_in_luma_samples; the height syntax element is pic_height_in_luma_samples;
in the case that both the width syntax element and the height syntax element conform to the h.266/VVC coding standard, the width syntax element comprises: sps_pic_width_max_in_luma_samples and/or pps_pic_width_in_luma_samples, the high syntax elements include: sps_pic_height_max_in_luma_samples and/or pps_pic_height_in_luma_samples.
5. A method of syntax element decoding, comprising:
decoding the received code stream to sequentially obtain a first code value, a second code value and a third code value; the first coding value and the second coding value are obtained by unsigned exponential golomb decoding, the third coding value is obtained by unsigned exponential golomb decoding or u (1) decoding, the first coding value represents the smaller value of the width syntax element and the value of the height syntax element, the second coding value represents the absolute value of the difference value between the value of the width syntax element and the value of the height syntax element, and the third coding value represents the size relation between the value of the width syntax element and the value of the height syntax element;
and acquiring the value of the width syntax element and the value of the height syntax element according to the first coding value, the second coding value and the third coding value.
6. The method of syntax element decoding according to claim 5, wherein obtaining the value of the width syntax element and the value of the height syntax element from the first encoded value, the second encoded value, and the third encoded value comprises:
in the case where the third encoded value is a value that characterizes the value of the width syntax element is not less than the value of the height syntax element, taking the first encoded value as the value of the height syntax element and taking the sum of the first encoded value and the second encoded value as the value of the width syntax element;
in the case where the third encoded value is a value that characterizes the value of the width syntax element as being smaller than the value of the height syntax element, the first encoded value is taken as the value of the width syntax element, and the sum of the first encoded value and the second encoded value is taken as the value of the height syntax element.
7. An apparatus for encoding a syntax element, comprising:
the first acquisition module is used for acquiring a first coding value according to the smaller value of the width syntax element and the value of the height syntax element;
a second obtaining module, configured to obtain a second encoded value according to an absolute value of a difference between the value of the width syntax element and the value of the height syntax element;
a third obtaining module, configured to obtain a third coding value according to a magnitude relation between the value of the width syntax element and the value of the height syntax element;
the coding module is used for coding the first coding value, the second coding value and the third coding value in sequence; and performing unsigned exponential golomb coding on the first coding value and the second coding value, and performing unsigned exponential golomb coding or u (1) coding on the third coding value.
8. A decoding apparatus for syntax elements, comprising:
the analysis module is used for decoding the received code stream to sequentially obtain a first code value, a second code value and a third code value; the first coding value and the second coding value are obtained by unsigned exponential golomb decoding, the third coding value is obtained by unsigned exponential golomb decoding or u (1) decoding, the first coding value represents the smaller value of the width syntax element and the value of the height syntax element, the second coding value represents the absolute value of the difference value between the value of the width syntax element and the value of the height syntax element, and the third coding value represents the size relation between the value of the width syntax element and the value of the height syntax element;
and the acquisition module is used for acquiring the value of the width syntax element and the value of the height syntax element according to the first coding value, the second coding value and the third coding value.
9. An electronic device, comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of syntax element encoding as claimed in any one of claims 1 to 4 or to perform the method of syntax element decoding as claimed in any one of claims 5 to 6.
10. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the method of syntax element encoding according to any one of claims 1 to 4 or the method of syntax element decoding according to any one of claims 5 to 6.
CN202111389452.XA 2021-11-22 2021-11-22 Syntax element encoding and decoding methods and devices, electronic equipment and storage medium Pending CN116156203A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111389452.XA CN116156203A (en) 2021-11-22 2021-11-22 Syntax element encoding and decoding methods and devices, electronic equipment and storage medium
PCT/CN2022/130709 WO2023088141A1 (en) 2021-11-22 2022-11-08 Syntax element coding method and apparatus, syntax element decoding method and apparatus, and electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111389452.XA CN116156203A (en) 2021-11-22 2021-11-22 Syntax element encoding and decoding methods and devices, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116156203A true CN116156203A (en) 2023-05-23

Family

ID=86358752

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111389452.XA Pending CN116156203A (en) 2021-11-22 2021-11-22 Syntax element encoding and decoding methods and devices, electronic equipment and storage medium

Country Status (2)

Country Link
CN (1) CN116156203A (en)
WO (1) WO2023088141A1 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10187659B2 (en) * 2014-04-25 2019-01-22 Sharp Kabushiki Kaisha Image decoding device, image coding device, and coding data transform device
CN114830672A (en) * 2019-12-18 2022-07-29 夏普株式会社 System and method for signaling picture output resolution in video coding
US11146824B2 (en) * 2019-12-30 2021-10-12 Mediatek Inc. Video encoding or decoding methods and apparatuses related to high-level information signaling
KR20220143843A (en) * 2020-02-29 2022-10-25 베이징 바이트댄스 네트워크 테크놀로지 컴퍼니, 리미티드 Constraints on high level syntax elements

Also Published As

Publication number Publication date
WO2023088141A1 (en) 2023-05-25

Similar Documents

Publication Publication Date Title
US9906789B2 (en) Encoding or decoding method and apparatus
US11006134B2 (en) Picture decoding and encoding methods and apparatuses, decoder, and encoder
JP6194427B2 (en) Coding and derivation of quantization parameters
EP3407605B1 (en) Method and device for encoding and decoding parameter sets at slice level
RU2565877C2 (en) Method and apparatus for determining correlation between syntax element and codeword for variable length coding
CN1787641B (en) Picture information decoding method and picture information encoding method
US20220222861A1 (en) Method, device, and storage medium for data encoding/decoding
CN102450014A (en) A framework for quality-aware video optimization
CN105284109A (en) Dynamic-image coding device, dynamic-image decoding device, dynamic-image coding method, dynamic-image decoding method, and program
US9326011B2 (en) Method and apparatus for generating bitstream based on syntax element
CN112369025A (en) Context-based binary arithmetic coding and decoding
US8938001B1 (en) Apparatus and method for coding using combinations
CN112335246B (en) Method and apparatus for adaptive coefficient set-based video encoding and decoding
CN110446045B (en) Video coding method, device, network equipment and storage medium
WO2020073671A1 (en) Video transcoding method and device and storage medium thereof
CN112565793B (en) Image lossless compression method based on prediction difference value classification entropy coding
CN101657973B (en) Recorded medium having program for coding and decoding using bit-precision, and apparatus thereof
CN116156203A (en) Syntax element encoding and decoding methods and devices, electronic equipment and storage medium
CN114208204A (en) Unification of context codec binary bit (CCB) counting methods
CN113170137A (en) Residual coding to reduce use of local neighborhood
KR20210133978A (en) Flexible Allocation of Normal Bins in Residual Coding for Video Coding
CN113508600A (en) Reducing the number of conventional codec bins
US9674523B2 (en) Methods and apparatus for transcoding digital video
US20140314329A1 (en) Efficient compression of bayer images
WO2021001687A1 (en) Systems and methods for encoding a deep neural network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication