Video decoding method, device and storage medium
By calculating the complexity information and angle gradient of the image block in video decoding technology, more accurate quantization parameters are determined, and the risk of image distortion during the quantization process is solved and the video decoding efficiency and transmission efficiency are improved.
Patent Information
- Application Number
- CN202310476176.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-31
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2042-05-31
AI Technical Summary
In the existing video decoding technology, the quantization process leads to the risk of image distortion, and it is difficult to determine more accurate quantization parameters, affecting the video decoding efficiency.
By obtaining the current block complexity information in the image to be processed, quantization parameters are calculated based on the angle gradient, and the accuracy of the quantization parameters is improved, thereby improving the video decoding efficiency.
More accurate quantitative parameter determination is achieved, video decoding efficiency is improved, resource use in code streams is optimized, and transmission efficiency is improved.
Smart Images

Figure CN116506613B_ABST
Abstract
Description
[0001] This application is a divisional application. The application number of the original application is 202210612716.1, and the original application date is May 31, 2022. The entire contents of the original application are incorporated into this application by reference. Technical Field
[0002] The present application relates to the field of video decoding technology, and in particular to a video decoding method, device and storage medium. Background Art
[0003] Video decoding technology plays an important role in the field of video processing. Among them, video decoding technology includes video encoding and decoding. In the process of video encoding and decoding, the process of quantizing or dequantizing the images in the video is the key to determining the image quality. Quantization mainly replaces part of the original data in the bitstream with quantization parameters to reduce the redundancy of the original data in the bitstream. However, the quantization process also brings the risk of image distortion. Therefore, in order to improve the efficiency of video decoding, determining more accurate quantization parameters for the images in the video is an urgent problem to be solved. Summary of the invention
[0004] The embodiments of the present application provide a video decoding method, device and storage medium, which are helpful to improve the efficiency of video decoding.
[0005] In order to achieve the above purpose, the embodiment of the present application adopts the following technical solution:
[0006] In a first aspect, an embodiment of the present application provides a video decoding method, which is applied to a video encoding device or a video decoding device or a chip of a video codec device, and the method includes: obtaining complexity information of a current block in an image to be processed, the complexity information of the current block being obtained by calculating at least one angular gradient of the current block based on at least one pixel value of the current block; determining a quantization parameter of the current block based on the complexity information of the current block; and decoding the current block based on the quantization parameter.
[0007] The current quantization parameter plays an important role in the video encoding and decoding process. Using the video decoding method proposed in this application, the video decoding device obtains the complexity of the current block in the image to be processed, and the complexity is calculated based on the information of the current block. The quantization parameter of the current block is determined based on the complexity and decoded, which helps to determine a more accurate quantization parameter for the current block, thereby improving the decoding efficiency of the video. In addition, if the above method is used for video decoding, the decoding end obtains the complexity of the current block from the bitstream to determine the quantization parameter, which helps to reduce the resources occupied by the quantization parameter in the bitstream, so that more effective data can be transmitted in the bitstream, thereby improving the transmission efficiency.
[0008] In one possible implementation, complexity information of a current block in an image to be processed is obtained, including: calculating at least one angular gradient of the current block based on pixel values of the current block and reconstructed values of decoded pixel values of the current block; and obtaining complexity information of the current block based on at least one angular gradient of the current block.
[0009] In this possible implementation, the complexity of the current block is calculated by using the pixel value and the reconstruction value of the current block, which helps to determine a more accurate quantization parameter for the current block, thereby improving the decoding efficiency of the video.
[0010] In one possible implementation, complexity information of a current block in an image to be processed is obtained, including: calculating at least one angular gradient of the current block based on pixel values of the current block and pixel values adjacent to the current block in the image to be processed; and obtaining complexity information of the current block based on at least one angular gradient of the current block.
[0011] In this possible implementation, the complexity of the current block is calculated by using the pixel values of the current block and the pixel values adjacent to the current block, which helps to determine a more accurate quantization parameter for the current block, thereby improving the decoding efficiency of the video.
[0012] In one possible implementation, complexity information of a current block in an image to be processed is obtained, including: obtaining a prediction angle adopted by an angle prediction mode of the current block; based on the prediction angle, calculating an angle gradient to obtain corresponding complexity information; and using the corresponding complexity information as complexity information of the current block.
[0013] In this possible implementation, determining the corresponding complexity through the angle prediction mode of the current block helps to determine a more accurate quantization parameter for the current block. For the decoding end, it helps to save resources in the bitstream and improve the decoding efficiency of the video.
[0014] In a possible implementation, the current block is an N-channel image block, and the complexity information of the current block in the image to be processed is obtained, including: based on the pixel value of each channel image block in the N-channel image block, obtaining the complexity information of each channel image block; N is an integer greater than zero; and determining the complexity information of the current block based on the complexity information of each channel image block.
[0015] In this possible implementation, an implementation method for determining the complexity of a current block based on the complexity of multiple channel image blocks is provided, which improves the feasibility of the solution. In addition, dividing the image into multiple channels and performing calculations separately helps to improve the accuracy of the complexity.
[0016] In a possible implementation, based on the pixel value of each channel image block in N channel image blocks, complexity information of each channel image block is obtained, including: dividing each channel image block into at least two sub-blocks; determining complexity information of at least two sub-blocks of each channel image block; and determining complexity information of a corresponding channel image block in each channel image block based on the complexity information of at least two sub-blocks of each channel image block.
[0017] In this possible implementation, a method for determining the complexity of a current block based on the complexity of multiple channel image blocks is provided, wherein the complexity is determined by further dividing the multiple channel image blocks, which helps to improve the accuracy of the complexity.
[0018] In one possible implementation, complexity information of a corresponding channel image block is determined based on complexity information of at least two sub-blocks of each channel image block, including: determining a minimum value of complexity information of at least two sub-blocks of each channel image block as complexity information of the corresponding channel image block.
[0019] In this possible implementation, an implementation method is provided for determining the complexity of multiple channel image blocks based on the complexity of the multiple channel image blocks after division, thereby improving the feasibility of the solution.
[0020] In a possible implementation, the complexity information of the current block is determined based on the complexity information of each channel image block, including: determining the minimum value of the complexity information of each channel image block as the complexity information of the current block.
[0021] In this possible implementation, an implementation method for determining the complexity of multiple channel image blocks based on the complexity of multiple channel image blocks is provided, thereby improving the feasibility of the solution.
[0022] In a possible implementation, the complexity of the current block is determined based on the complexity of each channel image block, including: determining the complexity level of each channel image block based on the complexity of each channel image block; determining the complexity information of the current block based on the complexity level of each channel image block.
[0023] In this possible implementation, an implementation method is provided for determining the complexity of multiple channel image blocks based on the complexity of the multiple channel image blocks after division, thereby improving the feasibility of the solution.
[0024] In a possible implementation, determining the quantization parameter of the current block according to the complexity of the current block includes: determining a reference quantization parameter of the current block according to the complexity of the current block; and determining the quantization parameter of the current block according to the reference quantization parameter of the current block.
[0025] In this possible implementation, a method for determining a quantization parameter based on a reference quantization parameter is provided to improve the accuracy of the quantization parameter.
[0026] In a possible implementation, when the video decoding method is a video encoding method, a reference quantization parameter of the current block is determined according to complexity information of the current block, including: obtaining a buffer area status of the image to be processed, the buffer area status being used to characterize the number of bits occupied in the buffer area by an image block that has been encoded in the image to be processed, wherein the buffer area is used to control the uniform output of a code stream of the image to be processed; and determining a reference quantization parameter of the current block according to a correspondence between the buffer area status and the complexity information of the current block.
[0027] In this possible implementation, an implementation method for determining a reference quantization parameter of a current block according to a buffer area state and complexity information of the current block is provided, thereby improving the feasibility of the solution.
[0028] In a possible implementation, a reference quantization parameter of the current block is determined based on complexity information of the current block, including: determining a complexity level of the current block; determining a corresponding target bit based on the complexity level of the current block, where the target bit refers to the number of bits occupied by the current block in a bitstream; and obtaining a reference quantization parameter of the current block based on the target bit.
[0029] In this possible implementation, an implementation method for determining a reference quantization parameter of a current block according to a target bit is provided, thereby improving the feasibility of the solution.
[0030] In a possible implementation, the quantization parameter of the current block is determined according to the reference quantization parameter of the current block, including: determining a weighting coefficient according to complexity information of the current block, the weighting coefficient being used to adjust the quantization parameter of the current block according to the complexity of the current block; and determining the quantization parameter of the current block according to the first weighting coefficient and the reference quantization parameter of the current block.
[0031] In this possible implementation, an implementation method for determining the quantization parameter of the current block according to the reference quantization parameter is provided, which improves the feasibility of the solution.
[0032] In a possible implementation, complexity information of the current block is calculated based on a rate control unit of the current block, which is a basic processing unit for calculating complexity information of the current block; a quantization parameter of the current block is a quantization parameter of the rate control unit of the current block, and decoding the current block based on the quantization parameter of the current block includes: determining a quantization parameter of a decoding unit of the current block according to the quantization parameter of the rate control unit; and decoding the current block according to the quantization parameter of the decoding unit.
[0033] In this possible implementation, an implementation method for determining the quantization parameter of the current block is provided, wherein, when the size of the rate control unit is smaller than the size of the quantization unit, the corresponding calculated multiple quantization parameters are used for quantization in one quantization unit. In response to this problem, the above method provides a corresponding solution to improve the feasibility of the solution.
[0034] In a second aspect, an embodiment of the present application provides a video decoding device, which has the function of implementing any one of the video decoding methods in the first aspect. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.
[0035] In a third aspect, a video encoder is provided, comprising: a processor and a memory; the memory is used to store computer execution instructions, and when the video encoder is running, the processor executes the computer execution instructions stored in the memory to enable the video encoder to perform a video decoding method as described in any one of the first aspects above.
[0036] In a fourth aspect, a video decoder is provided, comprising: a processor and a memory; the memory is used to store computer execution instructions, and when the video decoder is running, the processor executes the computer execution instructions stored in the memory to enable the video decoder to perform a video decoding method as described in any one of the first aspects above.
[0037] In a fifth aspect, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer, the computer can execute any one of the video decoding methods in the first aspect.
[0038] In a sixth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute any one of the video interpretation methods in the first aspect.
[0039] According to a seventh aspect, an electronic device is provided, the electronic device comprising a video decoding device, wherein the processing circuit is configured to execute the video decoding method as described in any one of the first aspects above.
[0040] In an eighth aspect, a chip is provided, the chip including a processor, the processor and a memory are coupled, the memory stores program instructions, and when the program instructions stored in the memory are executed by the processor, the video decoding method of any one of the above-mentioned first aspects is implemented.
[0041] In a ninth aspect, a video encoding and decoding system is provided, the system comprising a video encoder and a video decoder, the video encoder being configured to execute a video decoding method as described in any one of the first aspects above, and the video decoder being configured to execute a video decoding method as described in any one of the first aspects above.
[0042] The technical effects brought about by any implementation method in the second to ninth aspects can refer to the technical effects brought about by the corresponding implementation method in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 A system architecture diagram of a coding and decoding system provided in an embodiment of the present application;
[0044] Figure 2 A schematic diagram of the structure of a video encoder provided in an embodiment of the present application;
[0045] Figure 3 A schematic diagram of the structure of a video decoder provided in an embodiment of the present application;
[0046] Figure 4 A schematic diagram of a video decoding process provided by an embodiment of the present application;
[0047] Figure 5 A schematic diagram of the structure of a video decoder provided in an embodiment of the present application;
[0048] Figure 6 A flowchart of a video decoding method provided in an embodiment of the present application;
[0049] Figure 7 A schematic diagram of calculating an angle gradient provided in an embodiment of the present application;
[0050] Figure 8 A schematic diagram of calculating an angle gradient provided in an embodiment of the present application;
[0051] Fig. 9 A schematic diagram of calculating an angle gradient provided in an embodiment of the present application;
[0052] Fig.10 A schematic diagram of dividing an image block and calculating an angle gradient provided in an embodiment of the present application;
[0053] Fig.11 A schematic diagram of calculating an angle gradient provided in an embodiment of the present application;
[0054] Fig.12a A function image of a reference quantization parameter, complexity and buffer area status provided in an embodiment of the present application;
[0055] Figure 12b A function image of a reference quantization parameter and a buffer area state provided in an embodiment of the present application;
[0056] Fig.12c A function image of a reference quantization parameter and complexity provided in an embodiment of the present application;
[0057] Fig.13a A schematic diagram of an image boundary provided in an embodiment of the present application;
[0058] Fig.13b A strip schematic diagram provided for an embodiment of the present application;
[0059] Fig.14a A schematic diagram of a flow chart of a code stream grouping method provided in an embodiment of the present application;
[0060] Fig.14b A schematic diagram of a flow chart of a code stream grouping method provided in an embodiment of the present application;
[0061] Fig.15 A schematic diagram of an interleaving method based on a code stream grouping method chunk provided in an embodiment of the present application;
[0062] Fig.16a A schematic diagram of a flow chart of a code stream grouping method provided in an embodiment of the present application;
[0063] Fig.16b A schematic diagram of a flow chart of a code stream grouping method provided in an embodiment of the present application;
[0064] Fig.17 A schematic diagram of an interleaving method based on a code stream grouping method chunk provided in an embodiment of the present application;
[0065] Fig.18 A schematic diagram of the composition of a video decoding device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0066] In the description of this application, unless otherwise specified, " / " means "or", for example, A / B can mean A or B. "And / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, "at least one" means one or more, and "plurality" means two or more. The words "first", "second", etc. do not limit the quantity and execution order, and the words "first", "second", etc. do not limit them to be different.
[0067] It should be noted that, in this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0068] First, the technical terms involved in the embodiments of the present application are introduced:
[0069] 1. Video decoding technology
[0070] Video decoding technology includes video encoding technology and video decoding technology, which can also be collectively referred to as video coding and decoding technology.
[0071] Among them, video sequences contain a series of redundant information, such as spatial redundancy, temporal redundancy, visual redundancy, information entropy redundancy, structural redundancy, knowledge redundancy, and importance redundancy. In order to remove the redundant information in the video sequence as much as possible and reduce the amount of data representing the video, video coding technology is proposed to achieve the effect of reducing storage space and saving transmission bandwidth. Video coding technology is also called video compression technology.
[0072] In order to obtain the data stored or transmitted based on the above video compression technology, video decoding technology is required to implement it accordingly.
[0073] Within the international scope, video compression coding standards are used to standardize video coding and decoding methods, such as: Advanced Video Coding (AVC) in Part 10 of the MPEG-2 and MPEG-4 standards developed by the Motion Picture Experts Group (MPEG), and H.263, H.264 and H.265 (also known as High Efficiency Video Coding standard, HEVC) developed by the International Telecommunication Union-Telecommunication Standardization Sector (ITU-T).
[0074] It should be noted that in a coding algorithm based on a hybrid coding architecture, the above compression coding methods can be used in a mixed manner.
[0075] The basic processing unit in the video encoding and decoding process is the image block, which is obtained by dividing a frame / image at the encoding end. The divided image blocks are usually processed line by line. Among them, the image block being processed is called the current block, and the processed image block is called the encoded image block, or the decoded image block, or the decoded image block. Taking HEVC as an example, HEVC defines the Coding Tree Unit (CTU), Coding Unit (CU), Prediction Unit (PU) and Transform Unit (TU). CTU, CU, PU and TU can all be used as image blocks obtained after division. Among them, PU and TU are divided based on CU.
[0076] 2. Video sampling
[0077] A pixel is the smallest complete sample of a video or image, so the data processing of an image block is done in units of pixels. Each pixel records color information. One sampling method is to represent the color through RGB, which includes three image channels, R represents red, G represents green, and B represents blue. Another sampling method is to represent the color through YUV, which includes three image channels, Y represents luminance, U represents the first chrominance Cb, and V represents the second chrominance Cr. Since people are more sensitive to brightness than to chrominance, storage space can be reduced by storing more brightness and less chrominance. Specifically, in video encoding and decoding, the YUV format is usually used for video sampling, including 420 sampling format, 422 sampling format, etc. This sampling format determines the number of samples of two chrominances based on the number of samples of brightness. For example, assuming that a CU has 4×2 pixels, the format is as follows:
[0078] [Y0,U0,V0][Y1,U1,V1][Y2,U2,V2][Y3,U3,V3];
[0079] [Y4, U4, V4] [Y5, U5, V5] [Y6, U6, V6] [Y7, U7, V7];
[0080] The 420 sampling format indicates that YUV is sampled in a 4:2:0 format, that is, the brightness and the first chroma or the second chroma are selected in a 4:2 ratio, where the first chroma and the second chroma are selected in alternate lines. The above CU sampling selects the brightness Y0-Y3 of the first row, and the first chroma U0 and U2, and selects the brightness Y4-Y7 of the second row, and the second chroma V4 and V6. The CU is sampled and composed of a brightness coding unit and a chroma coding unit, where the brightness coding unit is:
[0081] [Y0][Y1][Y2][Y3];
[0082] [Y4][Y5][Y6][Y7];
[0083] The first chroma coding unit is:
[0084] [U0][U2];
[0085] The second chroma coding unit is:
[0086] [V4][V6];
[0087] It can be seen that the image block size after sampling in the above sampling format has changed. The luminance coding unit block size remains unchanged, still 4×2, while the first chroma coding unit block size becomes 2×1, and the second chroma coding unit block size also becomes 2×1. Therefore, if the CU size is assumed to be X×Y, the chroma coding unit block size after sampling based on the 420 sampling format is
[0088] Similarly, the 422 sampling format indicates that YUV is sampled in a 4:2:2 format, that is, the brightness, the first chroma, and the second chroma are selected in a ratio of 4:2:2. Then the sampled brightness coding unit of the above CU is:
[0089] [Y0][Y1][Y2][Y3];
[0090] [Y4][Y5][Y6][Y7];
[0091] The first chroma coding unit is:
[0092] [U0][U2];
[0093] [U4][U6];
[0094] The second chroma coding unit is:
[0095] [V1][V3];
[0096] [V5][V7];
[0097] Among them, the luma coding unit block size remains unchanged, still 4×2, while the first chroma coding unit block size becomes 2×2, and the second chroma coding unit block size also becomes 2×2. Therefore, if the CU size is assumed to be X×Y, the chroma coding unit block size after sampling based on the 422 sampling format is
[0098] The luminance coding unit, the first chrominance coding unit and the second chrominance coding unit obtained through sampling are used as data units of each channel to be subsequently processed for the current block.
[0099] The decoding method provided in this application is applicable to a video encoding and decoding system, which may also be referred to as a video decoding system. Figure 1 The structure of the video coding system is shown.
[0100] like Figure 1 As shown, the video encoding and decoding system includes a source device 10 and a destination device 11. The source device 10 generates encoded video data, and the source device 10 can also be called a video encoding device or a video encoding device. The destination device 11 can decode the encoded video data generated by the source device 10, and the destination device 11 can also be called a video decoding device or a video decoding device. The source device 10 and / or the destination device 11 may include at least one processor and a memory coupled to the at least one processor. The memory may include but is not limited to a read-only memory (ROM), a random access memory (RAM), an electrically erasable programmable read-only memory (EEPROM), a flash memory, or any other medium that can be used to store the desired program code in the form of instructions or data structures that can be accessed by a computer, and the present application does not make specific limitations on this.
[0101] The source device 10 and the destination device 11 may include a variety of devices, including electronic devices such as desktop computers, mobile computing devices, notebook (e.g., laptop) computers, tablet computers, set-top boxes, telephone handsets such as so-called "smart" phones, televisions, cameras, display devices, digital media players, video game consoles, in-vehicle computers, or the like.
[0102] The destination device 11 may receive the encoded video data from the source device 10 via the link 12. The link 12 may include one or more media and / or devices capable of moving the encoded video data from the source device 10 to the destination device 11. In one example, the link 12 may include one or more communication media that enable the source device 10 to transmit the encoded video data directly to the destination device 11 in real time. In this example, the source device 10 may modulate the encoded video data according to a communication standard (e.g., a wireless communication protocol) and may transmit the modulated video data to the destination device 11. The one or more communication media may include wireless and / or wired communication media, such as a radio frequency (RF) spectrum, one or more physical transmission lines. The one or more communication media may form part of a packet-based network, such as a local area network, a wide area network, or a global network (e.g., the Internet). The one or more communication media may include routers, switches, base stations, or other devices that enable communication from the source device 10 to the destination device 11.
[0103] In another example, the encoded video data may be output from the output interface 103 to the storage device 13. Similarly, the encoded video data may be accessed from the storage device 13 through the input interface 113. The storage device 13 may include a variety of locally accessible data storage media, such as a Blu-ray disc, a high-density digital video disc (DVD), a compact disc read-only memory (CD-ROM), a flash memory, or other suitable digital storage media for storing encoded video data.
[0104] In another example, the storage device 13 may correspond to a file server or another intermediate storage device storing the encoded video data generated by the source device 10. In this example, the destination device 11 may obtain the video data stored therein from the storage device 13 via streaming or downloading. The file server may be any type of server capable of storing the encoded video data and transmitting the encoded video data to the destination device 11. For example, the file server may include a World Wide Web (Web) server (e.g., for a website), a File Transfer Protocol (FTP) server, a Network Attached Storage (NAS) device, and a local disk drive.
[0105] The destination device 11 can access the encoded video data through any standard data connection (e.g., an Internet connection). Example types of data connections include wireless channels suitable for accessing the encoded video data stored on a file server, wired connections (e.g., cable modems, etc.), or a combination of both. The encoded video data can be transmitted from the file server in the form of streaming, downloading, or a combination of both.
[0106] The decoding method of the present application is not limited to wireless application scenarios. For example, the decoding method of the present application can be applied to video encoding and decoding supporting the following multimedia applications: over-the-air television broadcasting, cable television transmission, satellite television transmission, streaming video transmission (e.g., via the Internet), encoding of video data stored on a data storage medium, decoding of video data stored on a data storage medium, or other applications. In some examples, the video encoding and decoding system can be configured to support one-way or two-way video transmission to support applications such as video streaming, video playback, video broadcasting, and / or video telephony.
[0107] It should be noted that Figure 1 The video coding and decoding system shown is only an example of a video coding and decoding system, and is not a limitation of the video coding and decoding system in the present application. The decoding method provided in the present application can also be applied to a scenario where there is no data communication between the coding device and the decoding device. In other examples, the video data to be encoded or the encoded video data can be retrieved from a local memory, or can be streamed on a network, etc. The video coding device can encode the video data to be encoded and store the encoded video data in a memory, and the video decoding device can also obtain the encoded video data from the memory and decode the encoded video data.
[0108] exist Figure 1 , source device 10 includes a video source 101, a video encoder 102, and an output interface 103. In some examples, output interface 103 may include a modulator / demodulator (modem) and / or a transmitter. Video source 101 may include a video capture device (e.g., a camera), a video archive containing previously captured video data, a video input interface for receiving video data from a video content provider, and / or a computer graphics system for generating video data, or a combination of such sources of video data.
[0109] Video encoder 102 may encode video data from video source 101. In some examples, source device 10 transmits the encoded video data directly to destination device 11 via output interface 103. In other examples, the encoded video data may also be stored on storage device 13 for later access by destination device 11 for decoding and / or playback.
[0110] exist Figure 1 In an example of the present invention, the destination device 11 includes a display device 111, a video decoder 112, and an input interface 113. In some examples, the input interface 113 includes a receiver and / or a modem. The input interface 113 can receive the encoded video data via the link 12 and / or from the storage device 13. The display device 111 can be integrated with the destination device 11 or can be external to the destination device 11. In general, the display device 111 displays the decoded video data. The display device 111 can include a variety of display devices, such as a liquid crystal display, a plasma display, an organic light emitting diode display, or other types of display devices.
[0111] Alternatively, the video encoder 102 and the video decoder 112 may each be integrated with an audio encoder and decoder, and may include appropriate multiplexer-demultiplexer units or other hardware and software to handle the encoding of both audio and video in a common data stream or in separate data streams.
[0112] The video encoder 102 and the video decoder 112 may include at least one microprocessor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), discrete logic, hardware, or any combination thereof. If the decoding method provided in the present application is implemented in software, the instructions for the software may be stored in a suitable non-volatile computer-readable storage medium, and at least one processor may be used to execute the instructions to implement the present application.
[0113] The video encoder 102 and the video decoder 112 in the present application may operate according to a video compression standard (eg, HEVC), or may operate according to other industry standards, which is not specifically limited in the present application.
[0114] Figure 2 1 is a schematic block diagram of a video encoder 102 in an embodiment of the present application. The video encoder 102 can perform prediction, transformation, quantization and entropy coding processes in the prediction module 21, the transformation module 22, the quantization module 23 and the entropy coding module 24 respectively. The video encoder 102 also includes a pre-processing module 20 and a summer 202, wherein the pre-processing module 20 includes a segmentation module and a bit rate control module. For video block reconstruction, the video encoder 102 also includes an inverse quantization module 25, an inverse transformation module 26, a summer 201 and a reference image memory 27.
[0115] like Figure 2As shown in , the video encoder 102 receives video data, and the preprocessing module 20 receives input parameters of the video data. The input parameters include information such as the resolution of the image in the video data, the sampling format of the image, the pixel depth (bits per pixel, bpp), and the bit width. Bpp refers to the number of bits occupied by a pixel component in a unit pixel. The bit width refers to the number of bits occupied by a unit pixel. For example, if a pixel is represented by the values of the three pixel components RGB, and each pixel component occupies 8 bits (bits), the pixel depth of the pixel is 8, and the bit width of the pixel is 3×8=24 bits.
[0116] The segmentation module in the preprocessing module 20 divides the image into original blocks. This segmentation may also include segmentation into slices, image blocks or other larger units, and (for example) segmentation of video blocks according to the quadtree structure of the largest coding unit (LCU) and CU. Exemplarily, the video encoder 102 encodes the components of the video block in the video slice to be encoded. Generally, the slice can be divided into multiple original blocks (and may be divided into a set of original blocks called image blocks). The sizes of CU, PU and TU are usually determined in the segmentation module. In addition, the segmentation module is also used to determine the size of the rate control unit. The rate control unit refers to the basic processing unit in the rate control module. For example, the rate control module calculates complexity information for the current block based on the rate control unit, and then calculates the quantization parameter of the current block based on the complexity information. Among them, the segmentation strategy of the segmentation module can be preset, or it can be continuously adjusted based on the image during the encoding process. When the segmentation strategy is a preset strategy, the same segmentation strategy is also preset in the decoding end accordingly, so as to obtain the same image processing unit. The image processing unit is any of the above-mentioned image blocks and corresponds one-to-one with the encoding side. When the segmentation strategy is continuously adjusted based on the image during the encoding process, the segmentation strategy can be directly or indirectly encoded into the bitstream, and accordingly, the decoding end obtains the corresponding parameters from the bitstream, obtains the same segmentation strategy, and obtains the same image processing unit.
[0117] The rate control module in the preprocessing module 20 is used to generate quantization parameters so that the quantization module 23 and the inverse quantization module 25 perform related calculations. In the process of calculating the quantization parameters, the rate control module can obtain the image information of the current block for calculation, such as the above-mentioned input information; it can also obtain the reconstruction value obtained by the summer 201 after reconstruction for calculation, and this application does not limit this.
[0118] The prediction module 21 may provide the prediction block to the summer 202 to generate a residual block, and provide the prediction block to the summer 201 for reconstruction to obtain a reconstructed block, which is used as a reference pixel for subsequent prediction. The video encoder 102 forms a pixel difference by subtracting the pixel value of the prediction block from the pixel value of the original block. The pixel difference is the residual block, and the data in the residual block may include brightness difference and chrominance difference. The summer 201 represents one or more components that perform this subtraction operation. The prediction module 21 may also send related syntax elements to the entropy coding module 24 for merging into the bitstream.
[0119] The transform module 22 may divide the residual block into one or more TUs for transformation. The transform module 22 may convert the residual block from the pixel domain to the transform domain (e.g., the frequency domain). For example, the residual block may be transformed using a discrete cosine transform (DCT) or a discrete sine transform (DST) to obtain a transform coefficient. The transform module 32 may send the obtained transform coefficient to the quantization module 23.
[0120] The quantization module 23 may perform quantization based on the quantization unit. The quantization unit may be the same as the CU, TU, and PU described above, or may be further divided in the segmentation module. The quantization module 23 quantizes the transform coefficients to further reduce the bit rate to obtain quantized coefficients. The quantization process may reduce the bit depth associated with some or all of the coefficients. The degree of quantization may be modified by adjusting the quantization parameter. In some feasible embodiments, the quantization module 23 may then perform a scan of the matrix containing the quantized transform coefficients. Alternatively, the entropy coding module 24 may perform the scan.
[0121] After quantization, entropy encoding module 24 may entropy encode the quantized coefficients. For example, entropy encoding module 24 may perform context-adaptive variable-length coding (CAVLC), context-based adaptive binary arithmetic coding (CABAC), syntax-based context-adaptive binary arithmetic decoding (SBAC), probability interval partitioning entropy (PIPE) decoding, or another entropy encoding method or technique. After entropy encoding by entropy encoding module 24, a bitstream is obtained, which can be transmitted to video decoder 112 or archived for later transmission or retrieval by video decoder 112.
[0122] The inverse quantization module 25 and the inverse transform module 26 apply inverse quantization and inverse transform respectively, and the summer 201 adds the inverse transformed residual block to the predicted residual block to generate a reconstructed block, which is used as a reference pixel for subsequent prediction of the original block. The reconstructed block is stored in the reference image memory 27.
[0123] Figure 3 1 is a schematic diagram of the structure of the video decoder 112 in the embodiment of the present application. Figure 3 As shown, the video decoder 112 includes an entropy decoding module 30, a prediction module 31, an inverse quantization module 32, an inverse transformation module 33, a summer 301 and a reference image memory 34. The entropy decoding module 30 includes a parsing module and a bit rate control module. In some feasible embodiments, the video decoder 112 may perform Figure 2 The decoding process of the video encoder 102 is an exemplary reciprocal of the encoding process described.
[0124] During the decoding process, the video decoder 112 receives a bitstream of the encoded video from the video encoder 102. The parsing module in the entropy decoding module 30 of the video decoder 112 entropy decodes the bitstream to generate quantized coefficients and syntax elements. The entropy decoding module 30 transfers the syntax elements to the prediction module 31. The video decoder 112 may receive the syntax elements at the video slice level and / or the video block level.
[0125] The rate control module in the entropy decoding module 30 generates quantization parameters based on the information of the image to be decoded obtained by the analysis module so that the inverse quantization module 32 can perform relevant calculations. The rate control module can also calculate the quantization parameters based on the reconstructed block obtained by the summer 301 through reconstruction.
[0126] The inverse quantization module 32 inversely quantizes (e.g., dequantizes) the quantization coefficients and the generated quantization parameters provided in the bitstream and decoded by the entropy decoding module 30. The inverse quantization process may include determining the degree of quantization using the quantization parameters calculated by the video encoder 102 for each video block in the video slice, and similarly determining the degree of inverse quantization to be applied. The inverse transform module 33 applies an inverse transform (e.g., a transform method such as DCT, DST, etc.) to the inversely quantized transform coefficients, and generates an inversely transformed residual block in the pixel domain from the inversely quantized transform coefficients according to an inverse transform unit. The size of the inverse transform unit is the same as the size of the TU, and the inverse transform method and the transform method use the corresponding forward transform and inverse transform in the same transform method, for example, the inverse transform of DCT, DST is an inverse DCT, an inverse DST, or a conceptually similar inverse transform process.
[0127] After the prediction module 31 generates the prediction block, the video decoder 112 forms a decoded video block by summing the inverse transformed residual block from the inverse transform module 33 with the prediction block. The summer 301 represents one or more components that perform this summing operation. If necessary, a deblocking filter may also be applied to filter the decoded block to remove blocking artifacts. The decoded image blocks in a given frame or image are stored in the reference image memory 34 as reference pixels for subsequent prediction.
[0128] This application provides a possible video encoding / decoding implementation, such as Figure 4 As shown, Figure 4 A schematic diagram of a video encoding / decoding process provided in the present application, wherein the video encoding / decoding implementation method includes process ① to process ⑤, and process ① to process ⑤ can be executed by any one or more of the above-mentioned source device 10, video encoder 102, destination device 11 or video decoder 112.
[0129] Process ①: Divide a frame of image into one or more non-overlapping parallel coding units. The one or more parallel coding units have no dependencies and can be completely parallel / independently encoded and decoded, such as Figure 4 A parallel encoding unit 1 and a parallel encoding unit 2 are shown.
[0130] Process ②: Each parallel coding unit can be further divided into one or more non-overlapping independent coding units. The independent coding units may not depend on each other, but may share some parallel coding unit header information.
[0131] The independent coding unit may include three components, namely, brightness Y, first chromaticity Cb, and second chromaticity Cr, or three components, namely, RGB, or may include only one of the components. If the independent coding unit includes three components, the sizes of the three components may be exactly the same or different, which is related to the input format of the image. The independent coding unit may also be understood as one or more processing units formed by the N channels contained in each parallel coding unit. For example, the three components Y, Cb, and Cr mentioned above are the three channels constituting the parallel coding unit, each of which may be an independent coding unit, or Cb and Cr may be collectively referred to as chromaticity channels. Then, the parallel coding unit includes an independent coding unit consisting of a brightness channel and an independent coding unit consisting of a chromaticity channel.
[0132] Process ③: Each independent coding unit can be further divided into one or more non-overlapping coding units. The coding units within the independent coding unit can be interdependent, such as multiple coding units can perform mutual reference pre-coding and decoding.
[0133] If the coding unit and the independent coding unit have the same size (ie, the independent coding unit is divided into only one coding unit), the size thereof can be any size described in process ②.
[0134] The coding unit may include three components (or three components of RGB) including brightness Y, first chrominance Cb, and second chrominance Cr, or only one of them. If it includes three components, the sizes of the components may be completely the same or different, which is related to the image input format.
[0135] It is worth noting that process ③ is an optional step in the video coding and decoding method, and the video codec can encode / decode the residual coefficients (or residual values) of the independent coding units obtained in process ②.
[0136] Process ④: For the coding unit, it can be further divided into one or more non-overlapping prediction groups (Prediction Group, PG), PG can also be referred to as Group, each PG is encoded and decoded according to the selected prediction mode to obtain the prediction value of PG, which constitutes the prediction value of the entire coding unit, and the residual value of the coding unit is obtained based on the prediction value and the original value of the coding unit.
[0137] Process ⑤: Based on the residual values of the coding units, the coding units are grouped to obtain one or more non-overlapping residual blocks (RBs). The residual coefficients of each RB are encoded and decoded according to the selected mode to form a residual coefficient stream. Specifically, it can be divided into two categories: transforming the residual coefficients and not transforming them.
[0138] Among them, the selected mode of the residual coefficient encoding and decoding method in process ⑤ may include, but is not limited to any of the following: semi-fixed length coding method, exponential Golomb coding method, Golomb-Rice coding method, truncated unary code coding method, run-length coding method, direct encoding of the original residual value, etc.
[0139] For example, a video encoder may directly encode coefficients within an RB.
[0140] For another example, the video encoder may also transform the residual block, such as DCT, DST, Hadamard transform, etc., and then encode the transformed coefficients.
[0141] As a possible example, when RB is small, the video encoder can directly perform uniform quantization on each coefficient in RB, and then perform binary encoding. If RB is large, it can be further divided into multiple coefficient groups (coefficient groups, CG), and then each CG is uniformly quantized and then binary encoded. In some embodiments of the present application, the coefficient group (CG) and the quantization group (QG) can be the same.
[0142] The following is an exemplary explanation of the residual coefficient encoding part in a semi-fixed length coding method. First, the maximum value of the absolute value of the residual in an RB block is defined as the modified maximum value (modified maximum, mm). Secondly, the number of coding bits for the residual coefficient in the RB block is determined (the number of coding bits for the residual coefficient in the same RB block is consistent). For example, if the critical limit (CL) of the current RB block is 2 and the current residual coefficient is 1, then 2 bits are required to encode the residual coefficient 1, which is expressed as 01. If the CL of the current RB block is 7, it means encoding an 8-bit residual coefficient and a 1-bit sign bit. The determination of CL is to find the minimum M value that satisfies that all residuals of the current sub-block are within the range of [-2^(M-1), 2^(M-1)]. If both -2^(M-1) and 2^(M-1) exist, M should be increased by 1, that is, M+1 bits are required to encode all residuals of the current RB block; if only one of the two boundary values of -2^(M-1) and 2^(M-1) exists, a Trailing bit needs to be encoded to determine whether the boundary value is -2^(M-1) or 2^(M-1); if all residuals do not exist in either -2^(M-1) or 2^(M-1), there is no need to encode the Trailing bit.
[0143] In addition, for some special cases, the video encoder can also directly encode the original value of the image instead of the residual value.
[0144] The video encoder 102 and the video decoder 112 may also be implemented in another implementation form, for example, by using a general digital processor system, such as Figure 5 The coding and decoding device 50 shown in the figure may be a part of the video encoder 102 or a part of the video decoder 112 .
[0145] The coding and decoding device 50 can be applied to the coding side or the decoding side. The coding and decoding device 50 includes a processor 501 and a memory 502. The processor 501 is connected to the memory 502 (such as being connected to each other through a bus 504). Optionally, the coding and decoding device 50 may also include a communication interface 503, which connects the processor 501 and the memory 502 for receiving / sending data.
[0146] The memory 502 may be a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM) or a compact disc read-only memory (CD-ROM). The memory 502 is used to store relevant program codes and video data.
[0147] The processor 501 may be one or more central processing units (CPUs), such as Figure 5 In the example shown in FIG. 5 , CPU 0 and CPU 1 are shown in FIG. 5 . In the case where processor 501 is a CPU, the CPU may be a single-core CPU or a multi-core CPU.
[0148] The processor 501 is used to read the program code stored in the memory 502 and execute Figure 6 The operations of any corresponding implementation scheme and its various feasible implementation modes.
[0149] Below, combined with the above Figure 1 The video coding system shown, Figure 2 The video encoder 102 is shown as well as Figure 3 The video decoder 112 shown describes the decoding method provided by the present application in detail.
[0150] like Figure 6 FIG. 1 is a flowchart of a video decoding method provided by the present application. The method comprises:
[0151] S601. The video decoder obtains complexity information of a current block in an image to be processed, where the complexity information of the current block is used to characterize the degree of difference of pixel values of the current block, and the complexity information of the current block is obtained by calculating at least one angular gradient of the current block based on the pixel values of the current block.
[0152] It is understandable that the information of an image block is usually represented by the pixels contained in the image block. When the difference in pixel values of each pixel in an image block is small, that is, the complexity is low, indicating that the color change of the image block is small, the image block is considered to be relatively simple. Similarly, when the difference in pixel values of each pixel in an image block is large, that is, the complexity is high, indicating that the color change of the image block is large, the image block is considered to be relatively complex.
[0153] Specifically, the complexity information of the current block is obtained by calculating at least one angle gradient of the current block based on the pixel value of the current block. The angle gradient of the current block refers to the difference of the pixel value of the current block calculated based on the gradient direction of a certain angle. The angle gradient includes horizontal gradient, vertical gradient and other angle gradients.
[0154] The horizontal gradient of the current block refers to the set of differences between the pixel values in the tth column and the pixel values in the t-1th column of the current block calculated based on the horizontal gradient direction to the left or right. Where t is an integer greater than 1. The formula is as follows:
[0155] Horizontal gradient H = pixel value of the tth column - pixel value of the t-1th column;
[0156] like Figure 7 As shown in Figure (a), taking a 4×2 image block as an example, the image block is calculated according to the above formula in the direction shown in the figure, and 3×2 differences can be obtained. Then the horizontal gradient of the image block is the set of the above 3×2 differences.
[0157] Based on the above horizontal gradient, the horizontal complexity (hor) is calculated by the following formula:
[0158] complexity_hor = the sum of elements in the horizontal gradient (gradH) / the number of elements (grad_block_size);
[0159] In combination with the above example, when 3×2 difference values are obtained, the complexity_hor of the current block=the sum of 6 difference values / 6.
[0160] Similarly, the vertical gradient of the current block refers to the set of differences between the pixel values of the sth row and the pixel values of the s-1th row of the current block calculated based on the vertical upward or downward gradient direction. Where s is an integer greater than 1. The formula is as follows:
[0161] Vertical gradient V = pixel value of the sth column - pixel value of the s-1th column;
[0162] like Figure 7As shown in Figure (b), taking a 4×2 image block as an example, the image block is calculated according to the above formula in the direction shown in the figure, and 4×1 differences can be obtained. Then the horizontal gradient of the image block is the set of the above 4×1 differences.
[0163] Based on the vertical gradient above, the vertical complexity (vertical complexity, complexity_ver) is calculated using the following formula:
[0164] complexity_ver = sum of elements in vertical gradient (gradV) / number of elements (grad_block_size);
[0165] In combination with the above example, complexity_ver=the sum of 4 difference values / 4.
[0166] Similarly, other angle gradients of the current block include a 45° gradient, a 125° gradient, a 225° gradient, or a 315° gradient. Figure 8 As shown in Figures (a) to (d).
[0167] By calculating the complexity information of the current block based on the pixel values of the current block in the above manner, it is helpful to determine more accurate decoding parameters, such as quantization parameters, for the current block, thereby improving the decoding efficiency of the image.
[0168] In the above scheme, the number of elements contained in the gradient of the current block is less than the number of pixels of the current block. Considering a more accurate calculation method of the complexity of the current block, the video decoder can also refer to the reconstructed value of the pixel value decoded by the current block to determine the complexity information of the current block.
[0169] Optionally, the video decoder calculates at least one angle gradient of the current block based on the pixel value of the current block and the reconstructed value of the edge pixel value of the current block; and obtains the complexity information of the current block according to the at least one angle gradient of the current block. Fig. 9 As shown in (a) to (f) of FIG. 1 , the blank part represents the original pixel, that is, the pixel value of the current block; the shaded part represents the reconstructed pixel, that is, the reconstructed value of the decoded pixel value of the current block. (a) is a schematic diagram of calculating the gradient row by row based on the reconstructed value of the edge pixel value of the current block based on the gradient direction. In this way, the number of elements contained in each gradient of the current block is equal to the number of pixels of the current block, which helps to obtain more accurate complexity information of the current block.
[0170] Optionally, the video decoder calculates the complexity information of the current block based on the pixel values of the current block and the pixel values adjacent to the current block in the image to be processed. It can be understood that this is similar to the above method of calculating the complexity information based on the reconstructed values of the edge pixel values of the current block. Fig. 9As shown, the reconstructed pixels are adjacent pixels, indicating pixel values adjacent to the pixel values of the current block.
[0171] For example, when Fig. 9 When the horizontal gradient is calculated in Figure (e), the current block includes 16×2 pixels. The horizontal gradient calculated based on the reconstructed value of the first column of pixel values of the current block or the pixel value of the previous column of the current block includes 16×2 differences. Then, the complexity_hor of the current block = the sum of 32 differences / 32.
[0172] It should be noted that the above optional methods are only examples. In fact, there may be multiple selections of reconstructed pixels and adjacent pixels. For example, the reconstructed pixels are the average of the first n rows or columns or the first n reconstruction values of the current block, and the adjacent pixels are the average of the first n rows or columns or the first n pixel values of the current block, and this application does not limit this.
[0173] Optionally, complexity information of the current block is obtained according to at least one angle gradient of the current block, including the following three possible implementation methods.
[0174] In a first possible implementation, the video decoder uses the minimum value of the complexity information obtained by at least one angle gradient as the complexity information of the current block. In other words, if the difference of the pixel values of the current block calculated based on a certain angle gradient is the smallest, the minimum complexity information is used as the complexity information of the current block.
[0175] Optionally, during the video decoding process, multi-channel sampling is performed on the image to be processed, so that the current block is composed of multiple channel image blocks. In the above-mentioned first possible implementation, the video decoder determines the complexity information of N channel image blocks, and determines the minimum value of the complexity information of the N channel image blocks as the complexity information of the current block.
[0176] In a second possible implementation, the video decoder divides each channel image block among the multiple channel image blocks constituting the current block, and determines the complexity information of the current block based on the divided sub-blocks. Specifically, the video decoder divides each channel image block into at least two sub-blocks, obtains the complexity information of at least two sub-blocks of each channel image block, and determines the corresponding channel image block complexity information in each channel image block based on the complexity information of at least two sub-blocks of each channel image block.
[0177] For example, Fig.10 As shown, a 4×2 channel image block of the current block is divided into 8×2 image blocks and then the angle gradient is calculated to obtain the complexity information of the current block.
[0178] Optionally, the video decoder determines the minimum value of complexity information of at least two sub-blocks of each channel image block as the corresponding channel image block complexity information.
[0179] It should be noted that the division rules of each channel image block for the above sub-blocks can be the same or different. Among them, the sampling format of the image may cause the sizes of each channel image block to be different. When the YUV format is used for sampling based on the 420 sampling format, the block sizes after the brightness, the first chromaticity and the second chromaticity sampling are different. Therefore, the relatively large channel image block can be segmented and then the complexity information of the channel image block can be determined, which helps to improve the accuracy of determining the complexity information.
[0180] Not limited to the above two implementation methods, the multi-channel of the present application is not limited to the aforementioned RGB three channels, and there may be more channels. For example, when the image sensor is a four-channel sensor, the corresponding image to be processed includes image information of four channels. For example, when the image sensor is a five-channel sensor, the corresponding image to be processed includes image information of five channels.
[0181] The multiple channels in the present application may include at least one or more of the following channels: Y channel, U channel, V channel, Co channel, Cg channel, R channel, G channel, B channel, alpha channel, IR channel, D channel, and W channel. For example, the multiple channels include Y channel, U channel, and V channel, or the multiple channels include R channel, G channel, and B channel, or the multiple channels include R channel, G channel, B channel, and alpha channel, or the multiple channels may include R channel, G channel, B channel, and IR channel, or the multiple channels include R channel, G channel, B channel, and W channel, or the multiple channels include R channel, G channel, B channel, IR channel, and W channel, or the multiple channels include R channel, G channel, B channel, and D channel, or the multiple channels may include R channel, G channel, B channel, D channel, and W channel. Among them, in addition to the RGB color photosensitivity channel, there may also be an IR channel (infrared or near-infrared photosensitivity channel), a D channel (dark light channel, mainly through infrared light or near-infrared light), and a W channel (full-color photosensitivity channel). There are different channels for different sensors. For example, the sensor type can be an RGB sensor, an RGBIR sensor, an RGBW sensor, an RGBIRW sensor, an RGBD sensor, an RGBDW sensor, and the like.
[0182] In a third possible implementation, the video decoder obtains a prediction angle adopted by an angle prediction mode of the current block, calculates an angle gradient based on the prediction angle to obtain corresponding complexity information, and uses the corresponding complexity information as the complexity information of the current block.
[0183] Among them, the angle prediction mode is a common prediction mode, which is used to determine the residual between the pixel value of the current block and the reconstructed value according to the specified angle. The prediction angle can also be called the prediction direction, which is similar to the other angle gradients mentioned above, such as 45° prediction, 135° prediction, and so on.
[0184] Through the above method, the prediction mode of the current block is associated with the calculation of complexity information, so that the processing of the current block is more targeted.
[0185] Optionally, the prediction mode also includes multiple prediction modes such as mean (DC) prediction mode and planar prediction mode. The video decoder presets multiple complexity information for the current block, which is used to determine the complexity information of the current block according to the prediction mode. The preset multiple complexity information can be obtained according to the above-mentioned multiple angle gradient calculations, or can be preset in the video decoder. The preset multiple complexity information has a corresponding relationship with the prediction mode, for example, the multiple complexity information includes first complexity information and second complexity information, the first complexity information corresponds to the angle prediction mode (which may include one or more angle prediction modes), and the second complexity information corresponds to the DC prediction mode and the Planar prediction mode. When predicting the current block, multiple prediction results may be obtained based on multiple prediction modes, and the optimal prediction mode is determined as the prediction mode of the current block based on the rate-distortion optimized (RDO) cost. The complexity information of the current block can be obtained by determining the correspondence between the prediction mode and the preset complexity information according to the RDO cost. In combination with the above example, if the prediction mode of the current block is determined to be the DC prediction mode based on the RDO cost, according to the above corresponding relationship, the complexity information of the current block should be the second complexity information.
[0186] Optionally, the above prediction modes are divided into multiple categories, wherein each category can correspond to a complexity information respectively. The multiple categories include intra mode, point prediction mode, screen content coding (Screen Content Coding, SCC) mode, original value mode and fallback mode. For example, the angle prediction mode belongs to the intra mode category. In addition, the above multiple categories can be further divided according to whether a transformation is performed. For example, the intra mode is divided into intra mode + transformation, and intra mode + no transformation. The correspondence between complexity information and categories is similar to the above-mentioned first complexity information corresponding to one or more prediction modes. When determining the category to which the prediction mode of the current block belongs, the corresponding complexity information is used to calculate the quantization parameter.
[0187] Optionally, in the above-mentioned first and second possible implementations, the video decoder determines the complexity information of the current block according to at least one angular gradient of the N-channel image block of the current block through the following steps S11-S12.
[0188] S11. The video decoder obtains complexity information of each channel image block in the N channel image blocks based on the pixel value of each channel image block; N is an integer greater than zero.
[0189] S12. The video decoder determines the complexity information of the current block based on the complexity information of each channel image block.
[0190] Implementation method 1: The minimum value of the complexity calculated based on each angle gradient is used as the complexity information of the current block.
[0191] complexity=min(complexity_ver,complexity_hor,complexity_45,complexity_135,complexity_225,complexity_315)
[0192] Among them, complexity_45 is the complexity of calculation based on 45° angle gradient, complexity_225 is the complexity of calculation based on 225° angle gradient, complexity_135 is the complexity of calculation based on 135° angle gradient, complexity_315 is the complexity of calculation based on 315° angle gradient.
[0193] Implementation method 2: using the weighted value of the complexity calculated based on each angle gradient as the complexity information of the current block.
[0194] complexity=complexity_ver×a+complexity_hor×b+complexity_225×c+complexity_315×d
[0195] Among them, 0≤a,b,c,d≤1 and a+b+c+d=1.
[0196] Implementation method 3: Calculate the complexity level (complexity_level) of the original image blocks of each channel, and determine the complexity_level of the current block based on the complexity_level of the original image blocks of each channel. The method includes the following steps S21-S23.
[0197] Step S21: The video decoder determines the complexity_level of each channel image block according to the complexity of each channel image block.
[0198] Case 1: Considering the human eye subjective model, set A - 1 absolute thresholds, and divide the image blocks into A levels from simple to complex.
[0199] For example, for an image block with bpp of 8 bits and sampling format of YUV444, the complexity_level of each channel is divided based on the following method, including: complexity ≤ 4 belongs to level 1, 4 < complexity < 16 belongs to level 2, complexity ≥ 16 belongs to level 3. Another example, for an image block with bpp of 10 bits and sampling format of YUV444, the complexity_level of each channel is divided based on the following method, including: complexity ≤ 8 belongs to level 1, 8 < complexity < 64 belongs to level 2, complexity ≥ 64 belongs to level 3. Still another example, for an image block with bpp of 12 bits and sampling format of YUV444, the complexity_level of each channel is divided based on the following method, including: complexity ≤ 16 belongs to level 1, 16 < complexity < 256 belongs to level 2, complexity ≥ 256 belongs to level 3.
[0200] Case 2: Considering the human eye subjective model, set B - 1 absolute thresholds, and then set C relative thresholds that update with the image block, and divide the image blocks into B + C levels in total.
[0201] As Fig.11 shown, it is a schematic diagram of the relationship between the dynamic threshold and the absolute threshold. Among them, the absolute threshold 1 is 4, the absolute threshold 2 is 16, then 0 < dynamic threshold (thread) 1 < 4, 4 < thread2 < 16. Assume that complexity ≤ thread1 belongs to level 1, thread1 < complexity ≤ 4 belongs to level 2, 4 < complexity ≤ thread2 belongs to level 3, thread2 < complexity ≤ 16 belongs to level 4, complexity > 16 belongs to level 5. Among them, the above dynamic threshold updates with the block. If the complexity information of the current block is weighted smaller than the complexity information of several previous blocks, the dynamic threshold becomes smaller; if the complexity information of the current block is weighted equal to the complexity information of several previous blocks, the dynamic threshold remains unchanged; if the complexity information of the current block is weighted larger than the complexity information of several previous blocks, the dynamic threshold becomes larger.
[0202] Step S22: The video decoder determines the complexity level (block_complexity_level) of the current block based on the complexity_level of each channel image block.
[0203] A larger weight is given to the channel that is sensitive to the human eye, and a smaller weight is given to the channel that is sensitive to the human eye. The complexity level of the current block is obtained by adding the weighted complexity levels of each channel.
[0204] block_complexity_level=complexity_level1×w1+complexity_level2×w2+complexity_level3×w3
[0205] Wherein, w may be 0. For example, for an image block whose sampling format is YUV444, a larger weight is assigned to the Y channel coefficient, w1=2, w2=w3=1.
[0206] Step S23: The video decoder represents the complexity information of the current block based on block_complexity_level.
[0207] For implementation method 3, the video decoder may not perform the above step S21, and directly determine the complexity information (block_complexity) of the current block according to the complexity of each channel image block, that is, implementation method 4 described below.
[0208] Implementation method 4: The video decoder directly weights the complexity of each channel image block to obtain the complexity information of the current block.
[0209] block_complexity=complexity1×w4+complexity2×w5+complexity3×w6
[0210] Wherein, w represents a weight related to the subjective model of human eyes, a greater weight is given to the sensitive channel of human eyes, and w can be 0. Then, the above step S22 is adopted to classify block_complexity to obtain block_complexity_level.
[0211] It should be noted that, if the N-channel image block is divided into at least two sub-blocks, the video decoder can still use the above method to determine the complexity information of the N-channel image block, and then determine the complexity information of the current block.
[0212] Specifically, taking a channel image block divided into two sub-blocks as an example, the complexity information of the two sub-blocks are sub_complexity1 and sub_complexity2 respectively. When the complexity information (complexity1) of the channel image block is determined based on the complexity information of the two sub-blocks, the following implementation methods 5 to 7 are included.
[0213] Implementation method 5: taking the minimum value of the complexity of each sub-block as the complexity information of the channel image block.
[0214] complexity=min(sub_complexity1,sub_complexity2).
[0215] Implementation method 6: Obtain complexity information of the channel image block by weighting the complexity of each sub-block.
[0216] complexity=sub_complexity1×w1+sub_complexity2×w2, 0≤w1≤1, 0≤w2≤1.
[0217] Implementation method 7: Calculate the complexity level of each sub-block (sub_complexity_level), and determine the complexity level of the channel image block (complexity_level 1) based on the complexity level of each sub-block.
[0218] The method of determining sub_complexity_level is the same as the description of step S21 above.
[0219] The sub_complexity_level of each sub-block is weighted to obtain complexity_level 1, or the minimum value of the sub_complexity_level of each sub-block is used as complexity_level 1.
[0220] S 602. The video decoder determines a quantization parameter of the current block according to complexity information of the current block.
[0221] Optionally, the video decoder determines the quantization parameter of the current block according to the complexity information, including the following steps S31-S32.
[0222] S31. The video decoder determines a reference quantization parameter (ref_qp) of the current block according to complexity information of the current block.
[0223] S32. Determine a quantization parameter of the current block according to a reference quantization parameter of the current block.
[0224] The reference quantization parameter is used to guide the generation of the quantization parameter.
[0225] Optionally, the video decoder obtains the buffer area status of the image to be processed, and the correspondence between the buffer area status and the complexity information of the current block, and determines the reference quantization parameter of the current block according to the correspondence between the buffer area status and the complexity information.
[0226] During the video encoding process, due to the different encoding rates of different image blocks, the output code stream fluctuates, affecting the transmission stability. In this regard, before transmitting the code stream, the video encoder also includes a buffer module, and the buffer area in the buffer module is used to control the uniform output of the code stream. It can be understood that the uniform output of the code stream refers to the uniform output of the proportion of the code stream, which means that the buffer area will make the code stream that flows in at a non-uniform speed after encoding flow out in a uniform form to achieve stable output. In addition, overflow is not allowed in the buffer area, where overflow includes overflow and underflow. Exceeding the maximum value (max_buffer) of the buffer area state is overflow, and being lower than the minimum value (0) of the buffer area state is underflow.
[0227] The above buffer area status is used to characterize the number of bits occupied by the image block that has been encoded in the image to be processed in the buffer area. It can be understood that the buffer area status is updated with the block. For example, after encoding, a certain image block flows into the buffer area at a speed of 100 bits per second, and the preset buffer area flows out at a uniform speed of 50 bits per second. At this time, the number of bits in the buffer area status should be 100-50=50 bits.
[0228] The above buffer area status may also be referred to as a physical buffer status (physical_buffer).
[0229] Specifically, the video decoder may obtain the corresponding relationship between the buffer area state of the image to be processed and the complexity information of the current block through the following steps S41-S42.
[0230] S41 . The video decoder determines fullness according to a buffer area status.
[0231] Fullness refers to the piecewise linear mapping of the buffer area state, indicating the degree of fullness of the buffer area. Refer to the following formula:
[0232] fullness=physical_buffer×a+b;
[0233] Among them, a and b are fullness based on physical_buffer piecewise linear mapping parameters, a represents the scaling ratio for physical_buffer, and b represents the offset degree for physical_buffer. This parameter can be adjusted according to the buffer area status, image information and complexity information.
[0234] Case 1: Determine parameters a and b based on image information.
[0235] At the beginning of the slice, a=0.8. Where block_size indicates the size of the block.
[0236] It can be understood that in the first several blocks of the slice, the buffer area state is small, so the fullness can be further reduced to obtain a smaller ref_qp for easy decoding.
[0237] Or, for blocks at slice boundaries (such as the first row and first column), a = 0, b = –bpp x block_size.
[0238] It can be understood that the boundary block has no reference pixels and the prediction result is poor. By determining a smaller ref_qp, the fullness is reduced.
[0239] Case 2: Determine parameters a and b based on image information and buffer area status.
[0240] Adjust parameters a and b according to the relationship between bpp and buffer area status.
[0241] For example, when bpp is 8, When a=1, b=0. For example, when bpp is 6, When, a=1.1, b=block_size.
[0242] It can be understood that when the buffer area state is relatively full at low bpp, fullness is further increased to obtain a larger ref_qp to prevent the buffer area state from exceeding the maximum value.
[0243] Case 3: Determine parameters a and b based on image information and complexity information.
[0244] For image blocks with higher complexity information, a=1, b=bpp×block_size; for image blocks with average complexity information, a=1, b=0; for image blocks with lower complexity information, a=1, b=-bpp×block_size.
[0245] Optionally, the level of complexity information may correspond to the above complexity information level.
[0246] Case 4: Determine parameters a and b according to the buffer area status.
[0247] when When a=0.9,b=0. When a=1.0,b=0. , a=1.2, b=0.
[0248] It can be understood that when the buffer area is relatively empty, the effect of reducing ref_qp is achieved by reducing fullness; similarly, when the buffer area is relatively slow, the effect of increasing ref_qp is achieved by increasing fullness.
[0249] It should be noted that the above four cases are only examples for determining the relevant parameters of parameters a and b, wherein the values of the parameters may be other values and there is no limitation on this.
[0250] S42. The video decoder calculates ref_qp according to the full scale.
[0251] Refer to the following formula:
[0252] ref_qp=fullness×c+d;
[0253] Among them, c and d are parameters that can be adjusted according to the buffer area status, image information and complexity information.
[0254] Among them, c and d are the piecewise linear mapping parameters of ref_qp based on fullness, c represents the scaling ratio for fullness, and d represents the offset degree for fullness. This parameter can be adjusted according to image information, complexity information and fullness.
[0255] Case 1: Determine parameters c and d based on image information.
[0256] For example, fixed parameters, c = 1, d = 1. Different c and d may be used for different bit widths.
[0257] Alternatively, special processing is performed on the blocks at the slice boundary (such as the first row and the first column) so that ref_qp becomes smaller than the original one, that is, smaller c and d are used.
[0258] Case 2: Determine parameters c and d based on full scale and image information.
[0259] For example, the parameters c and d are determined with respect to the bit width and pixel depth in the image information.
[0260] For 8bpp images with fullness < 0.1, when it is an 8-bit image, c = 0, d = 2; when it is a 10-bit image, c = 0, d = 4; when it is a 12-bit image, c = 0, d = 6. For 8bpp images with fullness > 0.8, when it is an 8-bit image, c = 1, d = 2; when it is a 10-bit image, c = 1, d = 4; when it is a 12-bit image, c = 1, d = 6. Where c and d can be updated with each block.
[0261] Alternatively, a range is determined for ref_qp based on the image information, wherein when the image information changes, the corresponding range of ref_qp is different. Specifically, the range is an interval consisting of a minimum reference quantization parameter (min_ref_qp) and a maximum reference quantization parameter (max_ref_qp). For example, for an image of 8bpp, 8bit, and sampling format YUV444, when fullness<0.25, min_ref_qp=0, max_ref_qp=8, ref_qp is selected from (0, 8); when fullness>0.85, min_ref_qp=4, max_ref_qp=56, ref_qp is selected from (4, 56); otherwise, min_ref_qp=0, max_ref_qp=32, ref_qp is selected from (0, 32).
[0262] Case 3: Determine parameters c and d according to the buffer area status.
[0263] Specifically, the parameters c and d are determined according to the relationship between physical_buffer and max_buffer.
[0264] when When a=0.5,b=0, When a=1.0,b=0, When , a=1.3, b=0.
[0265] Case 4: Determine parameters c and d based on complexity information and fullness.
[0266] For blocks with high complexity information, the mapping results are different at different fullness. For example, when fullness=0.5, for complex blocks, ref_qp is mapped to 32, and for simple blocks, ref_qp is mapped to 16.
[0267] Or, for example, for a simple block, when fullness < 0.2, c > 0, d = 0, that is, ref_qp increases with the increase of fullness; when 0.2 ≤ fullness ≤ 0.8, c = 0, d > 0, the value of d will be updated with the block, ref_qp increases with the increase of fullness and remains constant within a certain fullness; when fullness > 0.8, c > 0, that is, ref_qp increases with the increase of fullness; similar operations are performed for ordinary blocks and complex blocks.
[0268] Case 5: Determine parameters c and d based on complexity information.
[0269] For blocks with higher complexity, c=1.1; for blocks with lower complexity, c=0.9.
[0270] Case 6: Determine parameters c and d according to complexity information, maximum complexity (max_complexity), and maximum quantization parameter (max_qp).
[0271] ref_qp=complexity / max_complexity×max_qp×e+f, where e and f are parameters related to the full scale, buffer status and image information.
[0272] The above-mentioned determination of the reference quantization parameter based on the complexity information and the fullness or buffer area status can also refer to the following Fig.12a As shown in the curve graph. As the buffer area state increases, the reference quantization parameter increases, and the complexity information can have different effects on the growth of the reference quantization parameter according to the buffer area state. For example, for an image block with a higher complexity, the reference quantization parameter also increases with the increase of the buffer area state. For an image block with a lower complexity, the increase of the buffer area state can be smaller than the increase of the reference quantization parameter of an image block with a higher complexity. Of course, the influence of complexity and buffer area state on the reference quantization parameter is always positively correlated.
[0273] Specifically, Figure 12bAs shown, it is assumed that in the intervals (0, max_buffer×0.15), and (max_buffer×0.85), the influence of the buffer area state on the reference quantization parameter is dominant, that is, when the buffer area state is relatively empty or relatively full, the influence of complexity is relatively small. In the interval (max_buffer×0.15, max_buffer×0.85), the influence of complexity is relatively large. When the influence of complexity information on the reference quantization parameter is further considered, five possibilities may be generated as shown in the figure. When the influence of complexity is relatively small, the reference quantization parameter may remain unchanged in this interval, corresponding to L3. When the influence of complexity is average, the reference quantization parameter may increase slowly in this interval, corresponding to L2 or L4. When the influence of complexity is relatively large, the reference quantization parameter may suddenly change in this interval, corresponding to L1 or L5. Among them, the starting point based on the complexity change is determined according to the complexity information itself.
[0274] exist Figure 12b The influence of the complexity information considered in each interval can be referred to Fig.12c .
[0275] Optionally, the video decoder determines the complexity level of the current block, determines the target bit (target_cost) according to the complexity level of the current block, and obtains the reference quantization parameter of the current block according to the target bit. The target bit refers to the predicted number of bits of the current block after decoding. The actual number of bits of the current block after decoding may be greater than or less than or equal to the target bit. Among them, the complexity level of the current block can refer to the above embodiment part about the complexity level, which will not be repeated here.
[0276] Specifically, the video decoder may determine the target bit according to the level of the current block complexity through the following situations.
[0277] Case 1: Determine target_cost based on image information and complexity.
[0278] Specifically, each complexity information stores a reference bit number (ref_cost) and is updated with the block, ref_costt = 0.75×ref_cost t-1+0.25×real_cost, where real_cost represents the predicted lossless consumption bit number of the current block, which is related to the quantization parameter (qp) and the actual number of coded bits; the ref_cost at the current block complexity level is used to perform a piecewise linear transformation to obtain the target bit. Refer to the following formula:
[0279] target_cost=ref_cost×g+h;
[0280] Among them, g and h are the target_cost piecewise linear mapping parameters based on ref_cost, g represents the scaling ratio for target_cost, and h represents the offset degree for ref_cost. This parameter is related to the image information. For example, for 8bpp, 8bitYUV444 images, when ref_cost>1.1×average bit number (ave_cost), a=1.8, b=-9; when ref_cost<0.9×ave_cost, a=1.2, b=-6. Among them, g and h are used to correct ref_cost according to ave_cost to obtain target_cost.
[0281] Case 2: Determine target_cost based on complexity information.
[0282] Specifically, there are I complexity information and J modes, which are divided into I×J categories, and each category corresponds to a target_cost. For example, the complexity information indicates whether the current block is simple or complex, and the modes include intrablock copy (IBC) mode and non-IBC mode. There are 4 categories, including simple IBC, simple non-IBC, complex IBC and complex non-IBC, and each category corresponds to a target_cost. By first estimating the number of reference bits for each category: ref_cost = real_bit + qp / 8, updating the predicted number of bits for each category (pred_cost t) = 0.75 × pred_cost t-1 + 0.25 × ref_cost; then calculating the coefficient: scale = bpp / (avg_complexity-offset), where avg_complexity represents the sliding average complexity of all blocks up to the current block position, and offset is related to the image format and bpp; finally, target_cost = scale × (pred_cost–offset) is obtained.
[0283] Case 3: Determine target_cost based on image information, which includes bit width, image sampling format, or other information.
[0284] Specifically, there are K bit widths and L image sampling formats, which are divided into K×L categories, and each category corresponds to a target_cost. For example, there are 2 bit widths (8bit, 12bit), 2 image sampling formats (YUV and RGB), and there are 4 target_cost categories, including 8bitYUV, 8bitRGB, 12bitYUV and 12bitRGB.
[0285] Case 4: Get the fullness, and determine the target_cost based on the fullness combined with the complexity information of the current block, the buffer area status or the image information.
[0286] The process of obtaining the full scale is the same as step S41.
[0287] Case 4.1: Determine target_cost based on the fullness and buffer area status.
[0288] Specifically, target_cost=m×ref_cost+n×physical_buffer+o, where m, n, and o are parameters.
[0289] If fullness>0.85, the setting of target_cost is dominated by fullness, that is, the value of n is larger than m; if fullness<0.25, m is larger than n.
[0290] Case 4.2: determine target_cost based on full scale, image information and complexity information.
[0291] Among them, different fullness corresponds to different minimum target bits (min_target_cost) and maximum target bits (max_target_cost), and the target_cost is restricted.
[0292] For example, for an 8-bit YUV444 image, min_target_cost = bpp×fullness×p1+q1, max_target_cost = bpp×fullness×p2+q2; where p1 and q1 make min_target_cost smaller when fullness<0.25, and make min_target_cost larger when fullness>0.75; where p2 and q2 make max_target_cost smaller when fullness<0.25, and make max_target_cost larger when fullness>0.75.
[0293] Case 4.3: Determine target_cost based on fullness and complexity information.
[0294] For simple blocks with low complexity, when fullness < 0.1, m > 0, n = 0, that is, ref_qp increases with the increase of fullness; when 0.1 ≤ fullness ≤ 0.9, m = 0, n > 0, the value of n will be updated with the block, ref_qp will remain constant within a fullness range as fullness increases; when fullness > 0.9, m > 0, that is, ref_qp will increase with the increase of fullness; similar operations are performed for ordinary blocks and complex blocks. For the constant segment of simple blocks and ordinary blocks, when the actual coded bits are greater than the target bits, the value of n increases, otherwise it decreases, that is, by adjusting n, the actual bit consumption is less than or equal to target_cost; for complex blocks, by adjusting n, the actual bit consumption is greater than or equal to target_cost (if the simple and ordinary blocks do not save bits, the complex blocks have no extra bits available, which must be strictly less than or equal to target_cost).
[0295] Optionally, the video decoder determines a reference quantization parameter of the current block according to the target bit. Refer to the following formula:
[0296] ref_qp=target_cost×u+v;
[0297] Among them, u and v are parameters. u and v are the piecewise linear mapping parameters of ref_qp based on target_cost, u represents the scaling ratio for target_cost, and v represents the offset degree for target_cost. For example, u = 8 / 3, v = ref_cost × 8.
[0298] Optionally, the video decoder determines the quantization parameter according to the reference quantization parameter. Refer to the following formula: qp = ref_qp × x + y. x and y are piecewise linear mapping parameters of qp based on ref_qp, x represents the scaling ratio for ref_qp, and y represents the offset degree for ref_qp.
[0299] Specifically, the video decoder may determine the quantization parameter according to the reference quantization parameter through the following situations.
[0300] Case 1: Determine parameters x and y based on image information.
[0301] When x is 1 and y is 0, the reference quantization parameter is the quantization parameter.
[0302] Or, for YUV444 images, each channel y=0. Or Y channel y=0, chrominance channel, x=1, y=0.
[0303] Or, ref_qp is (0, 16), for the Y channel y=0, for chroma channel y=0;ref_qp is (17,32), for Y channel y=2, for chroma channel y=4; when ref_qp is (33, 63), x=1, y=0 for the Y channel, and x=1, y=0 for the chrominance channel.
[0304] Case 2: Determine parameters x and y based on complexity information.
[0305] Specifically, the video decoder determines a weighting coefficient according to the complexity information of the current block, and the weighting coefficient is used to adjust the quantization parameter of the current block according to the complexity of the current block; and determines the quantization parameter of the current block according to the weighting coefficient and the reference quantization parameter of the current block.
[0306] x=complexity1×w1 / (complexity1×w1+complexity2×w2+complexity3×w3)
[0307] Where w represents the weight, including w1, w2, w3, 0≤w≤1. complexity1, complexity2 and complexity3 represent the complexity information of the three channels of the current block respectively.
[0308] Case 3: determining a weighting coefficient according to the complexity information of the M decoded image blocks and the complexity information of the current block; and determining a quantization parameter of the current block according to the weighting coefficient and a reference quantization parameter of the current block.
[0309] Wherein, window_complexity represents the complexity of the image block included in the sliding window. As the image block in the sliding window changes, the window_complexity is updated accordingly. Specifically, it can be calculated according to the following formula.
[0310] window_complexity z=window_complexity z-1×0.75+complexity×0.25;
[0311] x=window_complexity1×w4 / (window_complexity1×w4+window_complexity2×w5+window_complexity3×w6);
[0312] y=0.
[0313] S 603. The video decoder decodes the current block based on the quantization parameter.
[0314] Optionally, the quantization parameter of the current block is the quantization parameter of the rate control unit of the current block, and the video decoder decodes the current block based on the quantization parameter of the current block, including: determining the quantization parameter of the coding unit of the current block according to the quantization parameter of the rate control unit; and decoding the current block according to the quantization parameter of the coding unit.
[0315] It can be understood that when the rate control module determines the quantization parameter, it is calculated based on the rate control unit. When the size of the rate control unit is larger than the size of the basic coding unit (quantization unit), it means that multiple basic coding units use the same quantization parameter. When the size of the rate control unit is equal to the size of the quantization unit, a one-to-one corresponding quantization parameter can be obtained. When the size of the rate control unit is smaller than the size of the quantization unit, it means that one quantization unit corresponds to multiple quantization parameters. At this time, a certain strategy needs to be adopted to determine the final quantization parameter for the quantization unit based on the multiple quantization parameters.
[0316] In a first possible implementation manner, the video decoder divides the quantization unit based on the rate control unit, that is, a plurality of quantization parameters correspond to a plurality of quantization units in a one-to-one manner.
[0317] In a second possible implementation manner, multiple quantization parameters are weighted or a minimum value is selected to obtain a quantization parameter corresponding to the one quantization unit.
[0318] In a third possible implementation, multiple quantization parameters are merged based on complexity information and buffer region status. Exemplarily, quantization parameters with similar complexity information are merged into one, and the similar complexity information may be multiple complexity information satisfying a certain difference range.
[0319] The above merging method can be to weight similar quantization parameters to obtain a quantization parameter, or select the minimum value of similar quantization parameters as the merged quantization parameter.
[0320] The merged one or more quantization parameters are then implemented in the first possible manner to obtain multiple quantization units corresponding to the quantization parameters; or the second possible manner can be implemented to obtain a quantization parameter corresponding to a quantization unit. There is no limitation on this.
[0321] It can be understood that step S603 includes the video decoder encoding or decoding the current block based on the quantization parameter.
[0322] Optionally, during encoding, the video encoder encodes the complexity information of the current block into the bitstream, or encodes the quantization parameter of the current block into the bitstream. Accordingly, the decoding end obtains the complexity information in the bitstream to calculate the quantization parameter for decoding, or the decoding end obtains the quantization parameter in the bitstream for decoding. Of course, the video encoder can also encode both of the above information into the bitstream.
[0323] It should be noted that when the video encoder encodes the complexity information of the current block into the bitstream, the video decoder obtains the complexity information to calculate the quantization parameter, but the video decoder may not use the complexity information to update other parameters. Exemplarily, the above-mentioned target_cost determination method involves updating according to the complexity information of the current block, but in the specific implementation, the update based on the complexity may be different from the result of the update based on the historical information (such as the number of bits occupied by the decoded image block and the quantization parameter of the decoded image block). In this case, the complexity information may not be used to update the parameter, and the original parameter update method is still retained.
[0324] By using the above method, the complexity information of the current block is calculated, which is conducive to determining more accurate decoding parameters, such as quantization parameters, for the current block, thereby improving the decoding efficiency of the image.
[0325] Optionally, the code stream obtained based on the above decoding method may be grouped in the following code stream method before being encoded into the code stream.
[0326] As can be seen from the above description of the stripes, the image can be divided into multiple stripes based on the image width (image_width) and the image height (image_height). Image_width is used to specify the width of the image brightness component, that is, the number of samples in the horizontal direction, and is a 16-bit unsigned integer. The unit of image_width should be the number of samples per line of the image. The upper left corner sample of the displayable area should be aligned with the upper left corner sample of the decoded image. The value of ImageWidth is equal to the value of image_width, and the value of ImageWidth should not be 0 and should be an integer multiple of 16. Image_height is used to specify the height of the image brightness component, that is, the number of scan lines in the vertical direction, a 16-bit unsigned integer. The unit of image_height should be the number of lines of image samples, and the value of ImageHeight is equal to the value of image_height, and the value of ImageHeight should not be 0 and should be an integer multiple of 2.
[0327] A strip is a fixed rectangular area in an image, which contains the parts of several coding units in the image, and the strips do not overlap. The division method is not limited. CUs can be further divided based on strips. When dividing strips based on an image, in order to divide an integer number of strips, the current image width or image height may be adjusted. Fig.13a As shown in the figure, real_width and real_height are the boundaries of the real image, that is, the boundaries of the image displayable area. In order to divide the strips, the width and height of the image are adaptively increased, thereby obtaining image_width and image_height in the figure.
[0328] A strip has a width (slice_width) and a height (slice_height). For example, SliceNum X can be used to represent the number of slices in the horizontal direction of an image, and SliceNum Y can be used to represent the number of slices in the vertical direction of an image. Fig.13b A schematic diagram of a strip is shown.
[0329] In a code stream grouping method, the length of each slice code stream is fixed, wherein the length of the first R-1 segments (chunks) is fixed, and the length of the last one is not fixed. Fig.14a and Fig.14b As shown in FIG. 1 , it is a flow chart showing the code stream grouping method for the encoding end and the decoding end respectively.
[0330] like Fig.14a , which is a flow chart of a code stream grouping method at an encoding end, including steps S1401a-S1406a.
[0331] S1401a. Divide the image in the horizontal direction and the vertical direction to obtain sliceNumX rectangular strips in the horizontal direction and sliceNumY rectangular strips in the vertical direction.
[0332] S1402a, calculate total resources total_resourec
[0333] Total_resoure refers to the resources occupied by the strip calculated based on the number of bits required for each pixel.
[0334] total_resourec=((slice_width×slice_height×target pixel depth (target_bpp)+7)>>3)<<3.
[0335] Determine the number of chunks (chunkNum) based on the total resource total_resource,
[0336] chunkNum=total_resoure / size+n,
[0337] Among them, n=total_resoure%size==0?0:1, size is an integer multiple of 8, for example, size=target_bpp×32×block_num.
[0338] Among them, block_num is a preset configuration parameter, and block_num is an integer multiple of 4.
[0339] Among them, target_bpp refers to the parameter specified by the encoding end, which indicates the average number of bits required for each pixel after compression. For example, for an original image in a 10-bit YUV444 format, if target_bpp is 5, it means compression by 6 times.
[0340] S1403a. Encode sliceNumX slices in each slice row in sequence, generate sliceNumX bitstream buffers slicebuffer[sliceNumX], and fill the bitstream buffers with zeros and align the bytes.
[0341] S1404a, each bit stream buffer is divided into chunkNum chunk segments, and chunksize is calculated as follows: the length of the first chunkNum-1 chunks is chunksize=size1, and the length of the last chunk is size2, where size1=size, size2=total_resouce-(chunkNum-1)×size.
[0342] S1405a. For sliceNum slices in a slice row, encode chunkNum times in sequence, and interleave the chunk segments of each slice together each time to form a final bitstream.
[0343] S1406a: Check if the slice encoding is complete. If not, return to step 3 to encode the next slice row.
[0344] like Fig.14b As shown, it is a flowchart of a code stream grouping method at a decoding end, including steps S1401b-S1406b.
[0345] S1401b is the same as the above step S1402a.
[0346] S1402b is the same as the above step S1402b.
[0347] S1403b, receiving the code stream, for each slice row sliceNumX slices, parse chunkNum times in sequence, each time parsing sliceenumX code stream segments and deinterleave them into the code stream buffer of each slice, and the calculation method of chunksize is: the length of the first chunkNum-1 chunks chunksize=size1, the length of the last chunk is size2, where size1=size, size2=total_resouce-(chunkNum-1)×size.
[0348] S1404b. Decode each slice based on the bit buffer of each slice.
[0349] S1405b. Obtain a reconstructed image of each rectangular strip.
[0350] S1406b: Check whether the slice code stream parsing is completed. If not, return to step 3 and parse the next slice line in sequence.
[0351] like Fig.15 As shown, when sliceNumX is 2, it is a schematic diagram of the interleaving of chunk segments based on the above-mentioned code stream grouping method.
[0352] In another bitstream grouping method, the length of each slice bitstream is fixed, the length of the rth chunk is not fixed, and the lengths of the other r-1 chunks are fixed. Fig.16a and Fig.16b As shown in FIG. 1 , it is a flow chart showing the code stream grouping method for the encoding end and the decoding end respectively.
[0353] like Fig.16a , which is a flow chart of a code stream grouping method at an encoding end, including steps S1601a-S1606a.
[0354] S1601a is the same as the above step S1402a.
[0355] S1602a is the same as the above step S1402b.
[0356] S1603a, sequentially encode sliceNumX slices in each slice row, generate sliceNumX bitstream buffers slicebuffer[sliceNumX], and fill the bitstream buffers with zeros and align the bytes;
[0357] S1604a, each bit stream buffer is divided into chunkNum chunk segments, and the length of each chunk chunksize is not fixed.
[0358] Among them, chunksize is calculated as follows: the length of the kth chunk is size1, and the length of other chunkNum-1 chunks is chunksize=size2, where size2=size, size1=total_resouce–(chunkNum-1)×size, and the value range of k is 1 to chunkNum.
[0359] S1605a. For sliceNum slices in a slice row, encode chunkNum times in sequence, and interleave the chunk segments of each slice together each time to form a final bitstream.
[0360] S1606a: Check if the slice encoding is complete. If not, return to step 3 to encode the next slice row.
[0361] like Fig.16b As shown, it is a flowchart of a code stream grouping method at a decoding end, including steps S1601b-S1606b.
[0362] S1601b is the same as the above step S1402a.
[0363] S1602b is the same as the above step S1402b.
[0364] S1603b, receiving the code stream, for each slice row sliceNumX slices, parse chunkNum times in sequence, each time parsing sliceenumX code stream segments and deinterleave them into the code stream buffer of each slice, chunksize is calculated as follows: the length of the kth chunk is size1, the length of the other chunkNum-1 chunks is chunksize=size2, where size2=size, size1=total_resouce-(chunkNum-1)×size, and the value range of k is 1 to chunkNum.
[0365] S1604b: Decode each slice based on the bit buffer of each slice.
[0366] S1605b, obtain a reconstructed image of each rectangular strip.
[0367] S1606b: Check whether the slice code stream parsing is completed. If not, return to step 3 and parse the next slice line in sequence.
[0368] like Fig.17As shown, when sliceNumX is 2, it is a schematic diagram of the interleaving of chunk segments based on the above another code stream grouping method.
[0369] It should be noted that any solution not specifically described in the above solution can be performed on the decoding side or the encoding side.
[0370] It should be noted that, in the absence of conflict, part or all of the contents of any multiple embodiments above may constitute a new embodiment.
[0371] The embodiment of the present application provides a video decoding device, which may be a video decoder, a video encoder, or a video decoder. Specifically, the video decoding device is used to execute the steps executed by the video decoder in the above video decoding method. The video decoding device provided in the embodiment of the present application may include modules corresponding to the corresponding steps.
[0372] The embodiment of the present application can divide the functional modules of the video decoding device according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. The division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0373] In the case of dividing each functional module into corresponding functional modules, Fig.18 A possible structural diagram of the video decoding device involved in the above embodiment is shown. Fig.18 As shown, the video decoding device 180 includes an acquisition module 1801 , a determination module 1802 and a decoding module 1803 .
[0374] The acquisition module 1801 is used to acquire complexity information of the current block in the image to be processed. The complexity information of the current block is acquired by calculating at least one angular gradient of the current block based on pixel values of the current block, such as the above step S601.
[0375] The determination module 1802 is used to determine the quantization parameter of the current block according to the complexity information of the current block; for example, the above step S602.
[0376] The decoding module 1803 is used to decode the current block based on the quantization parameter, such as the above step S603.
[0377] In one example, the acquisition module 1801 is specifically used to calculate at least one angular gradient of the current block based on the pixel value of the current block and the reconstructed value of the decoded pixel value of the current block; and obtain complexity information of the current block according to at least one angular gradient of the current block.
[0378] In one example, the acquisition module 1801 is specifically used to calculate at least one angular gradient of the current block based on the pixel value of the current block and the pixel value adjacent to the current block in the image to be processed; and obtain complexity information of the current block based on at least one angular gradient of the current block.
[0379] In one example, the acquisition module 1801 is specifically used to obtain the prediction angle adopted by the angle prediction mode of the current block; based on the prediction angle, calculate the angle gradient to obtain corresponding complexity information; and use the corresponding complexity information as the complexity information of the current block.
[0380] In one example, the current block is an N-channel image block, and the acquisition module 1801 is specifically used to obtain the complexity information of each channel image block based on the pixel value of each channel image block in the N-channel image block; N is an integer greater than zero; and the complexity information of the current block is determined based on the complexity information of each channel image block.
[0381] In one example, the acquisition module 1801 is specifically used to divide each channel image block into at least two sub-blocks; determine the complexity information of at least two sub-blocks of each channel image block; and determine the complexity information of the corresponding channel image block in each channel image block based on the complexity information of at least two sub-blocks of each channel image block.
[0382] In an example, the acquisition module 1801 is specifically configured to determine the minimum value of complexity information of at least two sub-blocks of each channel image block as the complexity information of the corresponding channel image block.
[0383] In an example, the acquisition module 1801 is specifically configured to determine the minimum value in the complexity information of each channel image block as the complexity information of the current block.
[0384] In an example, the acquisition module 1801 is specifically used to determine the complexity level of each channel image block based on the complexity of each channel image block; and determine the complexity information of the current block based on the complexity level of each channel image block.
[0385] In an example, the determination module 1802 is specifically configured to determine a reference quantization parameter of the current block according to the complexity of the current block; and determine a quantization parameter of the current block according to the reference quantization parameter of the current block.
[0386] In one example, when the video decoding method is a video encoding method, the determination module 1802 is specifically used to obtain the buffer area status of the image to be processed, and the buffer area status is used to characterize the number of bits occupied by the image blocks that have completed encoding in the image to be processed in the buffer area, wherein the buffer area is used to control the uniform speed output of the code stream of the image to be processed; according to the correspondence between the buffer area status and the complexity information of the current block, the reference quantization parameter of the current block is determined.
[0387] In one example, the determination module 1802 is specifically used to determine the complexity level of the current block; determine the corresponding target bit according to the complexity level of the current block, the target bit refers to the number of bits occupied by the current block in the code stream; and obtain the reference quantization parameter of the current block according to the target bit.
[0388] In one example, the determination module 1802 is specifically used to determine a weighting coefficient based on the complexity information of the current block, and the weighting coefficient is used to adjust the quantization parameter of the current block according to the complexity of the current block; the quantization parameter of the current block is determined based on the first weighting coefficient and the reference quantization parameter of the current block.
[0389] In one example, the complexity information of the current block is calculated based on the rate control unit of the current block, which is a basic processing unit for calculating the complexity information of the current block; the quantization parameter of the current block is the quantization parameter of the rate control unit of the current block, and the decoding module 1803 is specifically used to determine the quantization parameter of the decoding unit of the current block according to the quantization parameter of the rate control unit; and decode the current block according to the quantization parameter of the decoding unit.
[0390] Among them, all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here.
[0391] Of course, the video decoding device provided in the embodiment of the present application includes but is not limited to the above modules. For example, the video decoding device may also include a storage module 1804 .
[0392] The storage module 1804 may be configured to store program codes and data of the video decoding apparatus.
[0393] An embodiment of the present application further provides an electronic device, which includes the above-mentioned video decoding device 180, and the video decoding device 180 executes the method executed by any one of the video decoders provided above.
[0394] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed on a computer, the computer executes the method executed by any one of the video decoders provided above.
[0395] For the explanation of the relevant contents and description of the beneficial effects of any of the above-mentioned computer-readable storage media, reference may be made to the above-mentioned corresponding embodiments, which will not be repeated here.
[0396] The embodiment of the present application also provides a chip. The chip integrates a control circuit and one or more ports for implementing the functions of the above-mentioned video decoding device 100. Optionally, the functions supported by the chip can be referred to above and will not be repeated here. A person of ordinary skill in the art can understand that all or part of the steps of implementing the above-mentioned embodiment can be completed by instructing the relevant hardware through a program. The program can be stored in a computer-readable storage medium. The storage medium mentioned above can be a read-only memory, a random access memory, etc. The above-mentioned processing unit or processor can be a central processing unit, a general-purpose processor, an application specific integrated circuit (ASIC), a microprocessor (digital signal processor, DSP), a field programmable gate array (field programmable gatearray, FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof.
[0397] The embodiment of the present application also provides a computer program product including instructions, when the instructions are run on a computer, the computer executes any one of the methods in the above embodiments. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a server, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means to another website site, computer, server, or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more servers that can be integrated with the medium. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., an SSD), etc.
[0398] It should be noted that the above-mentioned devices for storing computer instructions or computer programs provided in the embodiments of the present application, such as but not limited to the above-mentioned memories, computer-readable storage media and communication chips, etc., are all non-transitory.
[0399] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loading and executing computer program instructions on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. Computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, data center, etc. that contains one or more servers that can be integrated with a medium. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).
[0400] Although the present application is described herein in conjunction with various embodiments, in the process of implementing the claimed application, those skilled in the art may understand and implement other changes to the disclosed embodiments by viewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "one" or "an" does not exclude multiple situations. A single processor or other unit may implement several functions listed in the claims. Certain measures are recorded in different dependent claims, but this does not mean that these measures cannot be combined to produce good results.
[0401] Although the present application has been described in conjunction with specific features and embodiments thereof, it is obvious that various modifications and combinations may be made thereto without departing from the spirit and scope of the present application. Accordingly, this specification and the drawings are merely exemplary illustrations of the present application as defined by the appended claims, and are deemed to have covered any and all modifications, variations, combinations or equivalents within the scope of the present application. Obviously, those skilled in the art may make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A video image decoding method, applied to a decoding end, characterized in that: include: Obtaining the complexity level of each channel image block in the N-channel image blocks of the current block in the image to be processed from the bitstream; The N-channel image block includes at least a luminance channel image block and a chrominance channel image block, and N is an integer greater than zero; Obtaining the complexity level of the current block based on the weighted value of the complexity level of each channel image block; Determining a target number of bits of the current block according to a complexity level of the current block; Determining a quantization parameter of the current block according to a target number of bits of the current block; The current block is decoded based on the quantization parameter.
2. The method according to claim 1, characterized in that The determining the quantization parameter of the current block according to the target number of bits of the current block includes: Determining a reference quantization parameter of the current block according to a target number of bits of the current block; A quantization parameter of the current block is determined according to a reference quantization parameter of the current block.
3. The method according to claim 1 or 2, characterized in that: The decoding the current block based on the quantization parameter includes: Based on the quantization parameter of the current block, dequantize the current block to obtain a dequantized transform coefficient of the current block; Performing an inverse transformation on the inverse quantized transformation coefficients of the current block to obtain an inverse transformed residual block; Based on the inverse transformed residual block, the decoded current block is obtained.
4. A video image encoding method, applied to an encoding end, characterized in that: include: Obtaining a pixel value of a current block in the image to be processed, wherein the pixel value of the current block includes a pixel value of each channel image block in the N-channel image block; The N-channel image block includes at least a luminance channel image block and a chrominance channel image block, and N is an integer greater than zero; Based on the pixel value of each channel image block in the N channel image blocks, obtaining complexity information of each channel image block; Obtaining a complexity level of the channel image block based on the complexity information of the channel image block; Obtaining the complexity level of the current block based on the weighted value of the complexity level of each channel image block; Determining a target number of bits of the current block according to a complexity level of the current block; Determining a quantization parameter of the current block according to a target number of bits of the current block; encoding the current block based on the quantization parameter; The bitstream obtained after encoding includes the complexity level of each channel image block.
5. The method according to claim 4, characterized in that The obtaining, based on the pixel value of each channel image block in the N channel image blocks, the complexity information of each channel image block includes: Calculating at least one angular gradient of each channel image block based on the pixel value of each channel image block and the reconstructed value of the decoded pixel value of each channel image block; According to at least one angle gradient of each channel image block, complexity information of each channel image block is obtained.
6. The method according to claim 4, characterized in that The obtaining, based on the pixel value of each channel image block in the N channel image blocks, the complexity information of each channel image block includes: Calculating at least one angular gradient of each channel image block based on the pixel value of each channel image block and the pixel values adjacent to each channel image block in the image to be processed; According to at least one angle gradient of each channel image block, complexity information of each channel image block is obtained.
7. The method according to claim 4, characterized in that The obtaining, based on the pixel value of each channel image block in the N channel image blocks, the complexity information of each channel image block includes: Obtaining a prediction angle adopted by an angle prediction mode of each channel image block; Based on the predicted angle, calculating the angle gradient to obtain corresponding complexity information; The corresponding complexity information is used as the complexity information of each channel image block.
8. The method according to claim 4, characterized in that The prediction mode of each channel image block includes a first prediction mode and a second prediction mode, the first prediction mode and the second prediction mode are respectively preset with corresponding complexity information, and the obtaining the complexity information of each channel image block based on the pixel value of each channel image block in the N channel image blocks includes: Obtaining prediction results based on the first prediction mode and the second prediction mode; determining an optimal prediction mode among the prediction results based on a rate-distortion cost; The complexity information of the optimal prediction mode is used as the complexity information of each channel image block.
9. The method according to claim 4, characterized in that The obtaining, based on the pixel value of each channel image block in the N channel image blocks, the complexity information of each channel image block includes: The complexity information of each channel image block is obtained based on a weighted value of the complexity information calculated based on at least one angle gradient.
10. The method according to claim 4, characterized in that The obtaining, based on the pixel value of each channel image block in the N channel image blocks, the complexity information of each channel image block includes: Dividing each channel image block into at least two sub-blocks; Determining complexity information of at least two sub-blocks of each channel image block; Based on the complexity information of at least two sub-blocks of each channel image block, the complexity information of the corresponding channel image block in each channel image block is determined.
11. The method according to claim 10, characterized in that The determining, based on the complexity information of at least two sub-blocks of each channel image block, the complexity information of the corresponding channel image block in each channel image block comprises: The complexity information of the corresponding channel image block is obtained based on the weighted value of the complexity information of the at least two sub-blocks.
12. A video decoding device, characterized in that: include: An acquisition module, used for acquiring the complexity level of each channel image block in the N channel image blocks of the current block in the image to be processed from the bitstream; The N-channel image block includes at least a luminance channel image block and a chrominance channel image block, and N is an integer greater than zero; A determination module, configured to obtain a complexity level of a current block based on a weighted value of the complexity level of each channel image block; The determination module is further configured to determine a target number of bits of the current block according to a complexity level of the current block; The determination module is further configured to determine a quantization parameter of the current block according to a target number of bits of the current block; A decoding module is used to decode the current block based on the quantization parameter.
13. A video encoding device, characterized in that: include: An acquisition module, used for acquiring a pixel value of a current block in the image to be processed, wherein the pixel value of the current block includes a pixel value of each channel image block in the N-channel image block; The N-channel image block includes at least a luminance channel image block and a chrominance channel image block, and N is an integer greater than zero; The acquisition module is further used to acquire complexity information of each channel image block in the N channel image blocks based on the pixel value of each channel image block; A determination module, configured to obtain a complexity level of the channel image block based on the complexity information of the channel image block; The determination module is further configured to obtain the complexity level of the current block based on the weighted value of the complexity level of each channel image block; The determination module is further configured to determine a target number of bits of the current block according to a complexity level of the current block; The determination module is further configured to determine a quantization parameter of the current block according to a target number of bits of the current block; A decoding module, configured to encode the current block based on the quantization parameter; The bitstream obtained after encoding includes the complexity level of each channel image block.
14. A video decoder, characterized in that: including a processor and a memory; The memory stores instructions executable by the processor; When the processor is configured to execute the instructions, the video decoder implements the video image decoding method according to any one of claims 1 to 3.
15. A video encoder, characterized in that: including a processor and a memory; The memory stores instructions executable by the processor; When the processor is configured to execute the instructions, the video encoder implements the video image encoding method according to any one of claims 4 to 11.
16. A video encoding and decoding system, characterized in that: The method comprises a video encoder and a video decoder, wherein the video decoder is used to execute the method according to any one of claims 1 to 3, and the video encoder is used to execute the method according to any one of claims 4 to 11.
17. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program, and when the program is executed on the computer, the computer is caused to execute the method according to any one of claims 1 to 3 or 4 to 11.
Citation Information
Patent Citations
Video decoding macro-block-grade parallel scheduling method for perceiving calculation complexity
CN105491377A
Image coding method and device, equipment and storage medium
CN113784126A