WO2024022039A1 - 一种视频图像解码方法、编码方法、装置及存储介质 - Google Patents

一种视频图像解码方法、编码方法、装置及存储介质 Download PDF

Info

Publication number
WO2024022039A1
WO2024022039A1 PCT/CN2023/105398 CN2023105398W WO2024022039A1 WO 2024022039 A1 WO2024022039 A1 WO 2024022039A1 CN 2023105398 W CN2023105398 W CN 2023105398W WO 2024022039 A1 WO2024022039 A1 WO 2024022039A1
Authority
WO
WIPO (PCT)
Prior art keywords
level
current block
bits
complexity
channel
Prior art date
Application number
PCT/CN2023/105398
Other languages
English (en)
French (fr)
Inventor
王岩
孙煜程
陈方栋
武晓阳
Original Assignee
杭州海康威视数字技术股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 杭州海康威视数字技术股份有限公司 filed Critical 杭州海康威视数字技术股份有限公司
Publication of WO2024022039A1 publication Critical patent/WO2024022039A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/182Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a pixel
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/186Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/94Vector quantisation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present application relates to the field of video decoding technology, and in particular, to a video image decoding method, encoding method, device and storage medium.
  • Video decoding technology plays an important role in the field of video processing.
  • Video decoding technology is a technology that reduces the amount of video data by encoding and decoding videos.
  • quantization is an important step in the above-mentioned video encoding and decoding process. It mainly uses quantization parameters to replace part of the original data in the code stream to reduce the redundancy of the original data in the code stream.
  • the quantization parameters used for quantization are written in the video encoding stage.
  • Code stream the video decoding end realizes decoding by analyzing the quantization parameters in the code stream.
  • quantization also brings the risk of image distortion. Choosing appropriate quantization parameters can improve image quality. Therefore, how to select quantization parameters has become the key to video decoding technology.
  • Embodiments of the present application provide a video image decoding method, encoding method, device and storage medium, which help to improve the image quality of video decoding and improve the visual experience.
  • embodiments of the present application provide a video image decoding method and encoding method, which method is applied to a video encoding device or a video decoding device or a chip of a video encoding and decoding device.
  • the method includes: obtaining a channel level from a code stream. Complexity level, the code stream is the encoded code stream of the current block, and the block-level complexity level of the current block is determined based on at least two channel-level complexity levels; the channel-level complexity level is used to characterize the current block-level complexity level.
  • the complexity of the channel-level texture of the block determining the target number of bits of the current block based on code control parameters, the code control parameters including the block-level complexity level of the current block; determining the target number of bits based on the target number the quantization parameter of the current block; decoding the current block based on the quantization parameter.
  • the video decoding device obtains the channel-level complexity level from the code stream, and determines the block-level complexity level of the current block based on at least two channel-level complexity levels, based on the following:
  • the coding control parameters including the block-level complexity level determine the target number of bits of the current block, and further determine the quantization parameters of the current block based on the target number of bits.
  • the video image decoding method and encoding method provided by this application can optimize the selection of quantization parameters, improve the image quality of video decoding, and improve the visual experience.
  • the above code control parameters include the average number of lossless encoding bits at the same level, the average number of lossless encoding bits, and the code stream buffer fullness;
  • Determining the target number of bits of the current block according to the code control parameters includes: determining the average number of lossless coding bits and the average number of lossless coding bits at the same level; determining the initial target number of bits based on the average number of lossless coding bits and the average number of lossless coding bits at the same level ; Determine the target number of bits of the current block based on the fullness of the code stream buffer, the block-level complexity level of the current block and the initial target number of bits; where the above average lossless coding bit number of the same level is the current block and multiple decoded images
  • the average number of bits required for block lossless encoding, and the complexity level of the multiple decoded image blocks and the current block is the same; the average number of bits for lossless encoding is the average number of bits required for lossless encoding of the current block and all decoded image blocks.
  • the average value of the predicted number of bits required; the fullness of the code stream buffer is used to characterize the fullness of the buffer, which is used
  • This possible implementation provides a method for determining the target number of bits of the current block. Determine the initial target number of bits by introducing the average number of lossless coding bits and the average number of lossless coding bits at the same level, and determine the target number of bits of the current block based on the initial target number of bits, code stream buffer fullness and block-level complexity level, you can This makes the determination of quantization parameters more accurate, thereby achieving the effect of improving image quality while ensuring decoding efficiency.
  • determining the average number of lossless coding bits and the average number of lossless coding bits at the same level includes: determining the number of lossless coding bits of the current block, where the number of lossless coding bits is 10 times the number of bits required for lossless coding of the current block.
  • Prediction value update the average number of lossless coding bits of the current block based on the number of lossless coding bits of the current block and the average number of lossless coding bits of multiple historical same levels; the historical average number of lossless coding bits of the same level is the same as the current block complexity level The average number of lossless encoding bits of the same decoded image block at the same level; the average number of lossless encoding bits of the current block is updated based on the number of lossless encoding bits of the current block and the average number of lossless encoding bits of all history; the historical average number of lossless encoding bits is the number of decoded image blocks. The average number of lossless bits of the coded image block.
  • This possible implementation method provides a method to determine the average number of lossless coding bits and the average lossless coding bits at the same level through the number of lossless coding bits of the current block, the historical average number of lossless coding bits at the same level, and the historical average number of lossless coding bits. Numerical methods can help improve the implementability of the plan. By corresponding the average number of lossless encoding bits at the same level to the block-level complexity level, the selection of quantization parameters can be optimized, thereby improving the image quality.
  • the above-mentioned current block is the first line block of the image to be processed
  • the above-mentioned code control parameters include first line quality improvement parameters
  • determining the target number of bits of the current block according to the code control parameters also includes: based on the first line quality
  • the boost parameter adjusts the target number of bits of the current block to reduce the quantization parameter of the current block.
  • This possible implementation provides another method of determining the target bit number of the current block, which is suitable for the scenario where the current block is a first-row block. It is more difficult to predict when the current block is the first row block, because the prediction error is transitive. This implementation reduces the above impact by introducing the first row quality improvement parameter and adjusting the quantization parameter of the first row block to improve the image quality of video decoding. Effect.
  • the above-mentioned current block is the first column block of the image to be processed
  • the above-mentioned code control parameters include the first column quality improvement parameters
  • determining the target number of bits of the current block according to the code control parameters also includes: based on the first row quality
  • the boost parameter adjusts the target number of bits of the current block to reduce the quantization parameter of the current block.
  • This possible implementation provides another method of determining the target bit number of the current block, which is suitable for the scenario where the current block is the first block. It is more difficult to predict when the current block is the first column block. Since the prediction error is transitive, this implementation reduces the above impact by introducing the first column quality improvement parameter and adjusting the quantization parameter of the first column block to improve the image quality of video decoding. Effect.
  • obtaining the channel-level complexity level from the code stream includes: obtaining the complexity information bits of the current block from the code stream.
  • the complexity information bits are used to represent the channel-level complexity of the current block. Level; determine the channel-level complexity level based on the complexity information bits.
  • This possible implementation provides a method for the decoding end to obtain the above-mentioned channel-level complexity level.
  • the above-mentioned channel-level complexity level is obtained by parsing the information bits used to represent the channel-level complexity level of the current block in the encoded code stream.
  • the complexity information bit can be 1 bit or 3 bits, and the first bit of the complexity information bit is used to represent the current channel level complexity level and the previous image block of the current block. Whether the complexity level of the same channel is the same and the change value between the two. Taking the YUV image as an example, if the current channel-level complexity level is the complexity level of the U channel of the current block, then the complexity level of the previous image block is the same.
  • the channel complexity represents the complexity level of the U channel of the image block decoded before the current block. If the first bit is the same, the complexity information bit is 1 bit; if it is different, the complexity information bit is 3 bits, and the last two bits represent the channel-level complexity of the current block and the previous image block of the current block.
  • the change value of the complexity level of the same channel Based on the change value and the channel complexity level of the same channel of the previous image block, the currently required channel-level complexity level can be determined. It can be understood that the above scenario is only an illustrative illustration, and the scope of protection of this possible implementation is not limited thereto.
  • the implementability of the solution is improved by proposing a specific method for the decoder to obtain the channel-level complexity level.
  • embodiments of the present application provide a video image encoding method, which is applied to a chip of a video encoding device.
  • the method includes: obtaining channel-level texture information of the current block, and determining the channel-level texture information of the current block based on the channel-level texture information.
  • the channel-level complexity level determines the block-level complexity level of the current block based on at least two channel-level complexity levels; the channel-level complexity level is used to characterize the complexity of the channel-level texture of the current block; the current block is determined based on the code control parameters
  • the target number of bits, the coding control parameters include the block-level complexity level of the current block; the quantization parameters of the current block are determined based on the target number of bits; the current block is encoded based on the quantization parameters.
  • This possible implementation provides a method to obtain the channel-level complexity level of the current block.
  • the channel-level complexity level of the current block is determined based on the channel-level texture information of the current block.
  • the channel-level complexity level of the current block is obtained from the received encoded code stream.
  • obtaining the channel-level texture information of the current block and determining the channel-level complexity level of the current block based on the channel-level texture information includes: using at least one channel image block in the current block as a processing unit, The processing unit is divided into at least two sub-units, and texture information of each sub-unit is determined; in the processing unit, the block-level complexity level of the current block is determined based on the texture information of each sub-unit.
  • This possible implementation provides a method suitable for the encoding end to determine the channel-level complexity level of the current block, which improves the implementability of the solution.
  • at least one channel image block of the current block is used as a processing unit, and each processing unit is further divided into at least two sub-units, which helps to improve the accuracy of the complexity information.
  • determining the texture information of each sub-unit includes: obtaining the original pixel value of the sub-unit, the original pixel value or reconstructed value of the left adjacent column of the sub-unit, and the upper adjacent column of the sub-unit.
  • the reconstructed value of the row is calculated correspondingly to the horizontal texture information and vertical texture information of the sub-unit; the minimum value is selected from the horizontal texture information and vertical texture information as the texture information of the corresponding sub-unit.
  • This possible implementation provides an implementation method for determining texture information of sub-units, which improves the implementability of the solution.
  • determining the block-level complexity level of the current block based on the texture information of each sub-unit includes: in the processing unit, dividing the texture information of each sub-unit based on multiple thresholds To the corresponding sub-unit complexity level, the above-mentioned plurality of thresholds are preset; the block complexity level of the current block is determined based on each sub-unit complexity level.
  • determining the block complexity level of the current block based on the complexity level of each subunit includes: mapping the complexity level of each subunit to the corresponding channel-level complexity level according to preset rules; The channel-level complexity level determines the block-level complexity level of the current block.
  • a method is proposed to map the complexity level of each sub-unit to the corresponding channel-level complexity level, and further determine the block-level complexity level of the current block through the channel-level complexity level of the current block. , which helps to improve the implementability of the plan.
  • mapping the complexity level of each subunit to the corresponding channel-level complexity level is based on preset rules, including: determining the channel-level complexity based on multiple thresholds and the sum of the complexity levels of each subunit. Level, the above multiple thresholds are preset.
  • This possible implementation provides a method for determining the channel-level complexity level based on multiple thresholds and the sum of the complexity levels of each subunit, which helps to improve the implementability of the solution.
  • mapping each sub-unit complexity level to a corresponding channel-level complexity level according to preset rules includes: determining the level composition of the sub-unit complexity level, and determining the corresponding channel according to the level composition. level complexity level.
  • This possible implementation provides a method of determining the corresponding channel-level complexity level based on the level composition of the sub-unit complexity level, which helps to improve the implementability of the solution.
  • determining the block-level complexity level of the current block based on each channel-level complexity level includes: taking the maximum value, minimum value, or weighted value of each channel-level complexity level as the block level of the current block. complexity level; or
  • the block-level complexity level of the current block is determined based on multiple thresholds and the sum of each channel-level complexity level.
  • the multiple thresholds are preset.
  • This possible implementation provides two methods for determining the block-level complexity level of the current block based on each channel-level complexity level, which helps to improve the implementability of the solution.
  • the current block is a multi-channel image block; each channel component of the multi-channel image block jointly or independently determines the same-level lossless encoding bit number and the target bit number.
  • each channel component of a multi-channel image block jointly or independently determines the above-mentioned number of lossless encoding bits and the target number of bits at the same level, which helps to improve the implementability of the solution.
  • the current block is a multi-channel image block; each channel component of the multi-channel image block jointly or independently determines the channel-level complexity level.
  • each channel component of a multi-channel image block jointly or independently determines the above-mentioned channel-level complexity level, which helps to improve the implementability of the solution.
  • embodiments of the present application provide a video decoding device, which has the function of implementing any one of the video image decoding method and encoding method in the first aspect.
  • This function can be implemented by hardware, or it can be implemented by hardware executing corresponding software.
  • the hardware or software includes one or more modules corresponding to the above functions.
  • a video encoder including: a processor and a memory; the memory is used to store computer execution instructions; when the video encoder is running, the processor executes the computer execution instructions stored in the memory, so that The video encoder performs the video image decoding method and encoding method according to any one of the above first aspects.
  • a video decoder including: a processor and a memory; the memory is used to store computer execution instructions; when the video decoder is running, the processor executes the computer execution instructions stored in the memory to enable The video decoder performs any one of the video image decoding methods and encoding methods of the first aspect above. code method.
  • a computer-readable storage medium is provided. Instructions are stored in the computer-readable storage medium. When the computer-readable storage medium is run on a computer, the computer can execute the video image decoding method of any one of the above-mentioned first aspects. Encoding method.
  • a sixth aspect provides a computer program product containing instructions that, when run on a computer, enable the computer to execute any of the video interpretation methods of the first aspect.
  • a seventh aspect provides an electronic device.
  • the electronic device includes a video decoding device, and the processing circuit is configured to execute the video image decoding method and encoding method according to any one of the above-mentioned first aspects.
  • a chip in an eighth aspect, includes a processor.
  • the processor is coupled to a memory.
  • the memory stores program instructions.
  • the program instructions stored in the memory are executed by the processor, the video image decoding in any one of the above first aspects is realized. methods, coding methods.
  • a ninth aspect provides a video encoding and decoding system.
  • the system includes a video encoder and a video decoder.
  • the video encoder is configured to perform the video image decoding method and encoding method according to any one of the above first aspects.
  • the video decoding The device is configured to perform the video image decoding method and encoding method according to any one of the above first aspects.
  • Figure 1 is a system architecture diagram of a coding and decoding system provided by an embodiment of the present application
  • Figure 2 is a schematic structural diagram of a video encoder provided by an embodiment of the present application.
  • Figure 3 is a schematic structural diagram of a video decoder provided by an embodiment of the present application.
  • Figure 4 is a schematic flow chart of video decoding provided by an embodiment of the present application.
  • Figure 5 is a schematic structural diagram of a video decoder provided by an embodiment of the present application.
  • Figure 6 is a flow chart of a video image decoding method and encoding method provided by an embodiment of the present application
  • Figure 7 is a flow chart of a specific embodiment of a video image decoding method and encoding method provided by the embodiment of the present application;
  • Figure 8 is a flow chart for determining the block-level complexity level of a video image decoding method and encoding method provided by an embodiment of the present application
  • Figure 9 is a schematic diagram of sub-block texture information of a specific embodiment of a video image decoding method and encoding method provided by an embodiment of the present application.
  • Figure 10 is a schematic diagram of the initial delay transmission mechanism in a video image decoding method and encoding method provided by an embodiment of the present application;
  • Figure 11 is a schematic diagram of a video decoding device provided by an embodiment of the present application.
  • Video decoding technology includes video encoding technology and video decoding technology, which can also be collectively referred to as video coding and decoding technology.
  • video sequences have a series of redundant information such as spatial redundancy, temporal redundancy, visual redundancy, information entropy redundancy, structural redundancy, knowledge redundancy, and importance redundancy.
  • video coding technology is proposed to reduce storage space and save transmission bandwidth.
  • Video encoding technology is also called video compression technology.
  • video compression coding standards are used to standardize video encoding and decoding methods, such as: Advanced Video Part 10 of the MPEG-2 and MPEG-4 standards developed by the Motion Picture Experts Group (MPEG) Codec (Advanced Video Coding, AVC), H.263, H.264 and H.265 (also known as high-efficiency video coding) formulated by the International Telecommunication Union Telecommunication Standardization Sector (ITU-T) Decoding (High Efficiency Video Coding standard, HEVC)).
  • MPEG Motion Picture Experts Group
  • AVC Advanced Video Coding
  • H.263, H.264 and H.265 also known as high-efficiency video coding
  • ITU-T International Telecommunication Union Telecommunication Standardization Sector
  • HEVC High Efficiency Video Coding standard
  • 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 row by row. Among them, the image block being processed is called the current block, and the image block that has been processed is called the encoded image block, or the decoded image block, or the decoded image block.
  • HEVC defines coding tree unit (Coding Tree Unit, CTU), coding unit (Coding Unit, CU), prediction unit (Prediction Unit, PU) and transformation unit (Transform Unit, TU).
  • CTU, CU, PU and TU can all be used as image blocks obtained after division. Both PU and TU are divided based on CU.
  • a pixel is the smallest complete sample of a video or image, so the data processing of image blocks is in pixels. Among them, each pixel records color information.
  • One sampling method is to represent color through RGB, which includes three image channels, R represents red, G represents green, and B represents blue.
  • Another sampling method is to represent color through YUV, which includes three image channels, Y represents brightness (luminance), U represents the first chromaticity Cb, and V represents the second chromaticity Cr. Since people are more sensitive to brightness than chroma, storage space can be reduced by storing more brightness and less chroma.
  • YUV format is usually used for video sampling, including 420 sampling format, 422 sampling format, etc.
  • This sampling format determines the number of samples for two chroma based on the number of luminance samples. For example, assuming a CU has 4 ⁇ 2 pixels, the format is as follows: [Y0,U0,V0][Y1,U1,V1][Y2,U2,V2][Y3,U3,V3]; [Y4, U4, V4] [Y5, U5, V5] [Y6, U6, V6] [Y7, U7, V7];
  • the 420 sampling format means 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 second chroma are selected alternately. Then the above-mentioned 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: [Y0][Y1][Y2][Y3]; [Y4][Y5][Y6][Y7];
  • the first chroma coding unit is: [U0][U2];
  • the second chroma coding unit is: [V4][V6];
  • the size of the image blocks sampled by the above sampling format has changed.
  • the block size of the brightness coding unit remains unchanged and is still 4 ⁇ 2, while the block size of the first chroma coding unit becomes 2 ⁇ 1, and the block size of the second chroma coding unit also becomes 2 ⁇ 1. Therefore, if it is assumed that the CU size is X ⁇ Y, the size of the chroma coding unit block sampled based on the 420 sampling format is
  • the 422 sampling format means that YUV is sampled in a 4:2:2 format, that is, the brightness, first chroma and second chroma are selected in a 4:2:2 ratio. Then the sampled brightness coding unit of the above CU is: [Y0][Y1][Y2][Y3]; [Y4][Y5][Y6][Y7];
  • the first chroma coding unit is: [U0][U2]; [U4][U6];
  • the second chroma coding unit is: [V1][V3]; [V5][V7];
  • the block size of the brightness coding unit remains unchanged and is still 4 ⁇ 2, while the block size of the first chroma coding unit becomes 2 ⁇ 2, and the block size of the second chroma coding unit also becomes 2 ⁇ 2. Therefore, if it is assumed that the CU size is X ⁇ Y, the size of the chroma coding unit block sampled based on the 422 sampling format is
  • the above-sampled brightness coding unit, first chroma coding unit and second chroma coding unit are used as data units of each channel that are subsequently processed for the current block.
  • the decoding method provided by this application is suitable for video encoding and decoding systems.
  • the video encoding and decoding system may also be called a video decoding system.
  • Figure 1 shows the structure of a video encoding and decoding system.
  • the video coding and decoding system includes a source device 10 and a destination device 11 .
  • the source device 10 generates encoded video data.
  • the source device 10 may also be called a video encoding device or a video encoding device.
  • the destination device 11 may decode the encoded video data generated by the source device 10.
  • the destination device 11 also Can be called a video decoding device or video decoding device.
  • Source device 10 and/or destination device 11 may include at least one processor and memory coupled to the at least one processor.
  • the memory may include but is not limited to Read-Only Memory (ROM), Random Access Memory (RAM), Electrically Erasable Programmable Read-Only Memory (EEPROM) ), flash memory or any other media that can be used to store the required program code in the form of instructions or data structures that can be accessed by a computer, which is not specifically limited by this application.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • EEPROM Electrically Erasable Programmable Read-Only Memory
  • flash memory any other media that can be used to store the required program code in the form of instructions or data structures that can be accessed by a computer, which is not specifically limited by this application.
  • Source device 10 and destination device 11 may include a variety of devices, including desktop computers, mobile computing devices, notebook (eg, laptop) computers, tablet computers, set-top boxes, telephone handsets such as so-called “smart” phones, Electronic devices such as televisions, cameras, display devices, digital media players, video game consoles, in-vehicle computers, or the like.
  • Link 12 may include one or more media and/or devices capable of moving encoded video data from source device 10 to destination device 11 .
  • link 12 may include one or more communication media that enables source device 10 to transmit encoded video data directly to destination device 11 in real time.
  • the source device 10 may modulate the encoded video data according to a communication standard (eg, a wireless communication protocol), and may transmit the modulated video data to the destination device 11 .
  • the above one or more communication media may include wireless and/or wired communication media, such as: radio frequency (Radio Frequency, RF) spectrum, one or more physical transmission lines.
  • the above 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 (eg, the Internet).
  • the one or more communication media mentioned above may include routers, switches, base stations, or other devices that implement communication from the source device 10 to the destination device 11 .
  • the encoded video data may be output from the output interface 103 to the storage device 13 .
  • encoded video data may be accessed from storage device 13 via input interface 113 .
  • the storage device 13 may include a variety of local access data storage media, such as Blu-ray Disc, High Density Digital Video Disc (DVD), Compact Disc Read-Only Memory (CD-ROM), Flash memory, or other suitable digital storage medium for storing encoded video data.
  • storage device 13 may correspond to a file server or another intermediate storage device that stores encoded video data generated by source device 10 .
  • destination device 11 may obtain its stored video data from storage device 13 via streaming or downloading.
  • the file server may be any type of server capable of storing encoded video data and transmitting the encoded video data to destination device 11 .
  • a 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 driver.
  • Web World Wide Web
  • FTP File Transfer Protocol
  • NAS Network Attached Storage
  • Destination device 11 may access the encoded video data through any standard data connection (eg, an Internet connection).
  • Example types of data connections include wireless channels, wired connections (eg, cable modems, etc.), or a combination of both, suitable for accessing encoded video data stored on a file server.
  • the encoded video data can be transmitted from the file server through streaming, downloading, or a combination of both.
  • the decoding method of this application is not limited to wireless application scenarios.
  • the decoding method of this application can be applied to video codecs that support the following multimedia applications: over-the-air TV broadcasting, cable TV transmission, satellite TV transmission, streaming Transmission of video transmission (eg, 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.
  • a video codec system may 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.
  • the video coding and decoding system shown in FIG. 1 is only an example of the video coding and decoding system, and does not limit the video coding and decoding system in this application.
  • the decoding method provided by this application can also be applied to scenarios where there is no data communication between the encoding device and the decoding device.
  • the video data to be encoded or the encoded video data may be retrieved from local storage, may be streamed over a network, etc.
  • the video encoding device may encode the video data to be encoded and store the encoded video data in a memory, and the video decoding device may also obtain the encoded video data from the memory and decode the encoded video data.
  • source device 10 includes a video source 101, a video encoder 102 and an output interface 103.
  • 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 video camera), a video archive containing previously captured video data, a video input interface to receive video data from a video content provider, and/or computer graphics for generating the video data. system, or a combination of these sources of video data.
  • Video encoder 102 may encode video data from video source 101 .
  • source device 10 transmits the encoded video data directly to destination device 11 via output interface 103 .
  • the encoded video data may also be stored on the storage device 13 for later access by the destination device 11 for decoding and/or playback.
  • destination device 11 includes display device 111 , video decoder 112 and input interface 113 .
  • input interface 113 includes a receiver and/or modem.
  • Input interface 113 may receive encoded video data via link 12 and/or from storage device 13 .
  • Display device 111 may be integrated with destination device 11 or may be external to destination device 11 . Generally, the display device 111 displays the decoded video data.
  • the display device 111 may 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.
  • video encoder 102 and 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 common Encoding of both audio and video in a data stream or separate data streams.
  • the video encoder 102 and the video decoder 112 may include at least one microprocessor, digital signal processor (Digital Signal Processor, DSP), application-specific integrated circuit (Application-Specific Integrated Circuit, ASIC), field programmable gate array (Field Programmable) Gate Array, FPGA), discrete logic, hardware, or any combination thereof. If the decoding method provided by this application is implemented by software, the instructions for the software can be stored in a suitable non-volatile computer-readable storage medium, and at least one processor can be used to execute the instructions to implement this application. .
  • DSP Digital Signal Processor
  • ASIC Application-Specific Integrated Circuit
  • FPGA Field Programmable gate array
  • the video encoder 102 and the video decoder 112 in this application may operate according to a video compression standard (such as HEVC) or other industry standards, which is not specifically limited in this application.
  • a video compression standard such as HEVC
  • other industry standards which is not specifically limited in this application.
  • FIG. 2 is a schematic block diagram of the video encoder 102 in the embodiment of the present application.
  • the video encoder 102 may 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 preprocessing module 20 and a summer 202, where the preprocessing module 20 includes a segmentation module and a code rate control module.
  • the video encoder 102 also includes an inverse quantization module 25, an inverse transform module 26, a summer 201 and a reference image memory 27.
  • the video encoder 102 receives video data and the pre-processing module 20 input parameters of the video data.
  • the input parameters include the resolution of the image in the video data, the sampling format of the image, pixel depth (bits per pixel, bpp), bit width and other information.
  • bpp refers to the number of bits occupied by one pixel component in a unit pixel.
  • the segmentation module in the preprocessing module 20 segments the image into original blocks.
  • This partitioning may also include partitioning into slices, image blocks, or other larger units, and video block partitioning, for example, based on a Largest Coding Unit (LCU) and a quadtree structure of a CU.
  • video encoder 102 encodes components of video blocks within a video slice to be encoded.
  • a strip may be divided into a plurality of original blocks (and possibly into a collection of original blocks called image blocks).
  • the size of CU, PU and TU is usually determined in the partitioning module.
  • the segmentation module is used to determine the size of the rate control unit.
  • the code rate control unit refers to the basic processing unit in the code rate control module.
  • the code rate control module calculates complexity information for the current block based on the code rate control unit, and then calculates the quantization parameters of the current block based on the complexity information.
  • the segmentation strategy of the segmentation module can be preset, or it can be continuously adjusted based on the image during the encoding process.
  • the segmentation strategy is a preset strategy, correspondingly, the same segmentation strategy is also preset in the decoder, thereby obtaining the same image processing unit.
  • the image processing unit is any one of the above image blocks, and corresponds one-to-one with the encoding side.
  • the segmentation strategy can be directly or indirectly encoded into the code stream.
  • the decoder obtains the corresponding parameters from the code stream, obtains the same segmentation strategy, and obtains the same image processing unit.
  • the code 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 correlation calculations.
  • the code 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 reconstructed value obtained by the summer 201 for calculation. This application does not do this. limit.
  • 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 reconstruction block, which is used as a reference pixel for subsequent prediction.
  • the video encoder 102 forms a pixel difference value by subtracting the pixel value of the prediction block from the pixel value of the original block.
  • the pixel difference value is a residual block.
  • the data in the residual block may include a brightness difference and a chroma difference. .
  • Summer 201 represents one or more components that perform this subtraction operation.
  • the prediction module 21 may also send the relevant syntax elements to the entropy encoding module 24 for merging into the code stream.
  • Transform module 22 may divide the residual block into one or more TUs for transformation. Transform module 22 may transform the residual block from the pixel domain to the transform domain (eg, frequency domain). For example, the residual block is transformed using Discrete Cosine Transform (DCT) or Discrete Sine Transform (DST) to obtain transformation coefficients. Transform module 32 may send the resulting transform coefficients to quantization module 23.
  • DCT Discrete Cosine Transform
  • DST Discrete Sine Transform
  • the quantization module 23 may perform quantization based on quantization units.
  • the quantization unit may be the same as the above-mentioned CU, TU, and PU, or may be further divided in the segmentation module.
  • the quantization module 23 quantizes the transform coefficients to further reduce the code 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 can be modified by adjusting the quantization parameters.
  • quantization module 23 may then perform a scan of the matrix containing the quantized transform coefficients.
  • entropy encoding module 24 may perform a scan.
  • entropy encoding module 24 may entropy encode the quantized coefficients.
  • the entropy coding module 24 can perform Context-Adaptive Variable-Length Coding (CAVLC), Context-based Adaptive Binary Arithmetic Coding (CABAC), Grammar-based Context-adaptive binary arithmetic decoding (SBAC), Probabilistic Interval Partition Entropy (PIPE) decoding, or another entropy coding method or technique.
  • CAVLC Context-Adaptive Variable-Length Coding
  • CABAC Context-based Adaptive Binary Arithmetic Coding
  • SBAC Grammar-based Context-adaptive binary arithmetic decoding
  • PIPE Probabilistic Interval Partition Entropy
  • the code stream may be transmitted to the video decoder 112 or archived for later transmission or retrieval by the video decoder 112 .
  • the inverse quantization module 25 and the inverse transform module 26 respectively apply inverse quantization and inverse transform.
  • the summer 201 adds the inversely transformed residual block and the predicted residual block to generate a reconstructed block, which is used as a subsequent original block. Reference pixel for prediction.
  • the reconstructed block is stored in the reference image memory 27 .
  • FIG. 3 is a schematic structural diagram of the video decoder 112 in the embodiment of the present application.
  • the video decoder 112 includes an entropy decoding module 30 , a prediction module 31 , an inverse quantization module 32 , an inverse transform module 33 , a summer 301 and a reference image memory 34 .
  • the entropy decoding module 30 includes a parsing module and a code rate control module.
  • video decoder 112 may perform an exemplary reciprocal decoding process to the encoding process described with respect to video encoder 102 from FIG. 2 .
  • video decoder 112 receives a codestream of encoded video from video encoder 102 .
  • the parsing module in the entropy decoding module 30 of the video decoder 112 entropy decodes the code stream to generate quantization coefficients and syntax elements.
  • Entropy decoding module 30 passes the syntax elements to prediction module 31.
  • Video decoder 112 may receive syntax elements at the video slice level and/or the video block level.
  • the code 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 performs related calculations.
  • the code rate control module can also calculate the quantization parameter based on the reconstructed block reconstructed by the summer 301.
  • the inverse quantization module 32 performs inverse quantization (eg, dequantization) on the quantization coefficients provided in the code stream and decoded by the entropy decoding module 30 and the generated quantization parameters.
  • the inverse quantization process may include determining the degree of quantization using quantization parameters calculated by video encoder 102 for each video block in the video slice, and likewise determining the degree of inverse quantization applied.
  • the inverse transform module 33 applies inverse transform (for example, DCT, DST and other transform methods) to the inversely quantized transform coefficients, and uses the inversely quantized transform coefficients to generate inversely transformed residual blocks in the pixel domain according to the inverse transform unit.
  • the size of the inverse transformation unit is the same as the size of the TU, and the inverse transformation method and the transformation method adopt the corresponding forward transformation and inverse transformation in the same transformation method.
  • the inverse transformation of DCT and DST is inverse DCT, inverse DST or conceptually Similar inverse transformation process.
  • video decoder 112 forms a decoded video block by summing the inverse-transformed residual block from inverse-transform module 33 with the prediction block.
  • Summer 301 represents one or more components that perform this summation operation.
  • a deblocking filter may also be applied to filter the decoded blocks in order to remove blocking artifacts. Decoded image blocks in a given frame or image are stored in reference image memory 34 as reference pixels for subsequent predictions.
  • FIG. 4 is a schematic flow chart of a video encoding/decoding method provided by this application.
  • the video encoding/decoding implementation method includes process 1 to process 5 , processes 1 to process 5 may be executed by any one or more of the above-mentioned source device 10, video encoder 102, destination device 11 or video decoder 112.
  • Process 1 Divide a frame of image into one or more parallel coding units that do not overlap with each other. There is no dependency between the one or more parallel coding units, and they can be completely parallel/independently encoded and decoded, as shown in Figure 4, parallel coding unit 1 and parallel coding unit 2.
  • each parallel coding unit it can be divided into one or more independent coding units that do not overlap with each other.
  • the independent coding units may not depend on each other, but they can share some parallel coding unit header information.
  • the independent coding unit may include three components of brightness Y, first chroma Cb, and second chroma Cr, or three components of RGB, or may include only one of the components. If the independent coding unit contains three components, the sizes of the three components can be exactly the same or different, depending on the input format of the image.
  • the independent coding unit can also be understood as one or more processing units formed by N channels included in each parallel coding unit.
  • the above three components of Y, Cb, and Cr are the three channels that constitute the parallel coding unit, and each of them can be an independent coding unit, or Cb and Cr can be collectively referred to as the chroma channel, then the parallel coding unit includes the brightness channel.
  • each independent coding unit it can be divided into one or more non-overlapping coding units.
  • Each coding unit within the independent coding unit can be interdependent.
  • multiple coding units can perform mutual reference precoding and decoding. .
  • the coding unit and the independent coding unit have the same size (that is, the independent coding unit is only divided into one coding unit), its size can be all the sizes described in process 2.
  • the coding unit may include three components of brightness Y, first chroma Cb, and second chroma Cr (or three RGB components), or may include only one of the components. If it contains three components, the sizes of the components can be exactly the same or different, depending on the image input format.
  • process 3 is an optional step in the video encoding and decoding method.
  • the video encoder/decoder can encode/decode the residual coefficients (or residual values) of the independent coding units obtained in process 2.
  • PG non-overlapping prediction groups
  • PG can also be referred to as Group for short.
  • Each PG is encoded and decoded according to the selected prediction mode.
  • the predicted value of the PG is obtained to form the predicted value of the entire coding unit.
  • the residual value of the coding unit is obtained.
  • Process 5 Based on the residual value of the coding unit, group the coding units to obtain one or more non-overlapping residual blocks (RB).
  • the residual coefficients of each RB are encoded and decoded according to the selected mode. , forming a residual coefficient stream. Specifically, it can be divided into two categories: transforming the residual coefficients and not transforming them.
  • the selected mode of the residual coefficient encoding and decoding method in process 5 may include, but is not limited to any of the following: semi-fixed length encoding method, exponential Golomb encoding method, Golomb-Rice encoding method, truncated unary code Encoding method, run length encoding method, direct encoding of original residual value, etc.
  • the video encoder may directly encode the coefficients within the RB.
  • the video encoder can also transform the residual block, such as DCT, DST, Hadamard transform, etc., and then encode the transformed coefficients.
  • the residual block such as DCT, DST, Hadamard transform, etc.
  • the video encoder can directly quantize each coefficient in the RB uniformly, and then perform binary encoding. If the RB is large, it can be further divided into multiple 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) may be the same.
  • the maximum value of the absolute value of the residual within an RB block is defined as the modified maximum (mm).
  • the number of coded bits of the residual coefficient in the RB block is determined (the number of coded bits of 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 needed 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 all residuals of the current sub-block to be within the range of [-2 ⁇ (M-1), 2 ⁇ (M-1)]. If there are two boundary values -2 ⁇ (M-1) and 2 ⁇ (M-1) at the same time, M should be increased by 1, that is, M+1 bits are needed to encode all the residuals of the current RB block; if there are only - One of the two boundary values 2 ⁇ (M-1) and 2 ⁇ (M-1), you need to encode a Trailing bit to determine whether the boundary value is -2 ⁇ (M-1) or 2 ⁇ (M-1 ); If none of -2 ⁇ (M-1) and 2 ⁇ (M-1) exists in all residuals, there is no need to encode the Trailing bit.
  • the video encoder can also directly encode the original value of the image instead of the residual value.
  • the above-mentioned video encoder 102 and video decoder 112 can also be implemented in another implementation form, for example, using a general digital processor system, such as the codec device 50 shown in Figure 5.
  • the codec device 50 can be Some of the devices in the video encoder 102 may also be some of the devices in the video decoder 112 .
  • the codec device 50 may be applied to the encoding side or the decoding side.
  • the encoding and decoding device 50 includes a processor 501 and a memory 502. described Processor 501 and memory 502 are connected (eg, to each other via bus 504).
  • the encoding and decoding device 50 may also include a communication interface 503, which is connected to the processor 501 and the memory 502 for receiving/transmitting data.
  • the memory 502 can be a random access memory (Random Access Memory, RAM), a read-only memory (Read-Only Memory, ROM), an erasable programmable read-only memory (Erasable Programmable Read Only Memory, EPROM) or a portable read-only memory. (Compact Disc Read-Only Memory, CD-ROM).
  • RAM Random Access Memory
  • ROM read-only memory
  • EPROM erasable programmable read-only memory
  • portable read-only memory Compact Disc Read-Only Memory, CD-ROM.
  • CD-ROM Compact Disc Read-Only Memory
  • the processor 501 may be one or more central processing units (Central Processing Units, CPUs), such as CPU 0 and CPU 1 shown in Figure 5.
  • CPUs Central Processing Units
  • the CPU may be a single-core CPU or a multi-core CPU.
  • the processor 501 is used to read the program code stored in the memory 502 and perform the operations of any one of the implementations corresponding to Figure 6 and its various feasible implementations.
  • FIG. 6 it is a flow chart of a video image decoding method and encoding method provided by this application.
  • the method includes:
  • Video data is composed of a frame of images, and a frame is a static image, which synthesizes a sequence of consecutive frames in time. Together they form a dynamic video.
  • the above image to be processed is the image to be decoded in the video data.
  • the image to be processed is divided into multiple image blocks, and the image blocks are used as basic processing units and processed line by line. Among them, the image block being processed is called the current block.
  • the image to be processed may be a multi-channel image, the above-mentioned acquisition of at least two channel-level complexity levels of the current block in the image to be processed, and the block level of the current block is determined based on the at least two channel-level complexity levels.
  • the complexity level is to obtain the complexity level of at least two channels of the current multi-channel image block, and determine the block-level complexity level of the current block accordingly.
  • the image to be processed can be an image in YUV format, then the complexity levels of the Y channel and the U channel can be obtained, and the block-level complexity level of the current block can be determined accordingly. It can be understood that obtaining the complexity level of YV or UV or YUV can also determine the block-level complexity level of the current block.
  • the multi-channel in this application is not limited to the aforementioned three-channel YUV. There can also be more channels.
  • the corresponding image to be processed includes four-channel image information.
  • the image sensor is a five-channel sensor.
  • the corresponding image to be processed includes five-channel image information.
  • the multiple channels in this 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, W channel.
  • multiple channels include Y channel, U channel, and V channel, or multiple channels include R channel, G channel, and B channel, or multiple channels include R channel, G channel, B channel, and alpha channel
  • the multiple channels may include R channel, G channel, B channel, and IR channel
  • the multiple channels may include R channel, G channel, B channel, and W channel
  • the multiple channels may include R channel, G channel, B channel.
  • RGB color photosensitive channels there may also be IR channels (infrared or near-infrared photosensitive channels), D channels (dark light channels, mainly through infrared light or near-infrared light), and W channels (full-color photosensitive channels).
  • the sensors have different channels, for example, the sensor type can be RGB sensor, RGBIR sensor, RGBW sensor, RGBIRW sensor, RGBD sensor, RGBDW sensor, etc.
  • Texture is a visual feature that reflects homogeneous phenomena in an image. It is used to represent the slowly changing or periodically changing surface structure organization and arrangement attributes of the object surface.
  • the above channel level complexity level is used to characterize the channel level of the current block. Texture complexity. The more complex the channel-level texture information of the current block is, the higher the channel-level complexity level is. Similarly, the simpler the above-mentioned channel-level texture information, the lower the channel-level complexity level.
  • the above method obtains at least two channel-level complexity levels of the current block in the image to be processed, and determines the block-level complexity level of the current block based on at least two channel-level complexity levels.
  • this process can be implemented as follows: taking at least one channel image block in the current block as a processing unit, dividing each processing unit into at least two sub-units, and determining the texture information of each sub-unit; in each processing unit, based on The texture information of each subunit determines the block-level complexity level of the current block.
  • At least one channel image block in the current block is used as a processing unit, and each processing unit is divided into at least two sub-units.
  • the process can be implemented as follows: using the Y channel of the current block as a processing unit, and further dividing the processing unit into four sub-units.
  • this process can also be implemented as follows: using the two channels Y channel and U channel as a processing unit, and further dividing the processing unit into two sub-units. It can be understood that the above scenario is only an illustrative description, and the protection scope of this exemplary embodiment is not limited to this.
  • the U channel, V channel, YU channel, YV channel, UV channel, and YUV channel can also be regarded as one Processing unit, the number of the above-mentioned sub-units can also be any integer greater than or equal to two.
  • the above-mentioned determination of the texture information of each sub-unit can be implemented as follows: obtaining the original pixel value of the sub-unit, the original pixel value or reconstructed value of the left adjacent column of the sub-unit, and the upper side of the sub-unit.
  • the reconstructed values of adjacent rows are calculated correspondingly to the horizontal texture information and vertical texture information of the sub-unit; the minimum value is selected from the horizontal texture information and vertical texture information as the texture information of the corresponding sub-unit.
  • the above-mentioned texture information can be pixel information, taking the image to be processed as a YUV image, and taking the Y, U, and V channels as a processing unit respectively.
  • the above-mentioned determiner The unit texture information can calculate the horizontal complexity and vertical complexity of the subunit based on the original pixel value of the subunit, the original pixel value or reconstructed value of the left adjacent column of the subunit, and the reconstructed value of the upper adjacent row of the subunit. Degree, select the minimum value among the horizontal complexity and vertical complexity as the texture information of the corresponding sub-unit.
  • the above-mentioned horizontal complexity and vertical complexity can be calculated based on the degree of difference between the pixels of the sub-units in the horizontal direction and the vertical direction. It can be understood that the above scene is only an exemplary illustration, and the above texture information can also be obtained in other ways. For example, it can be determined by image information other than pixel points, or the weighting of the above horizontal complexity and vertical complexity can be selected. The value is used as the texture information of the corresponding sub-unit, and it can also be other methods that can achieve the same effect. This example implementation does not specifically limit this.
  • the above-mentioned determination of the block-level complexity level of the current block based on the texture information of each sub-unit in each processing unit can be implemented in the following manner: in the above-mentioned processing unit, based on multiple thresholds, The texture information of each sub-unit is divided into corresponding sub-unit complexity levels, and the above-mentioned plurality of thresholds are preset; the block-level complexity level of the current block is determined based on the complexity level of each sub-unit.
  • the above process may be: setting two thresholds, Threshold 1 and Threshold 2, and dividing the subunit complexity levels into three levels from 0 to 2 based on the set thresholds. class. If it is determined that the complexity of the texture information of the sub-unit is less than or equal to threshold 1, then the texture information of the sub-unit is classified into level 0; if it is determined that the complexity of the texture information of the sub-unit is greater than threshold 1 and less than threshold 2, then the texture information of the sub-unit is classified into level 0. The texture information of the sub-unit is classified into level 1; if it is determined that the complexity of the obtained texture information of the sub-unit is greater than or equal to the threshold 2, the texture information of the sub-unit is classified into level 2. It can be understood that the above scenario is only an exemplary scenario, and the protection scope of the present application is not limited thereto.
  • the above-mentioned determination of the block-level complexity level of the current block based on the complexity level of each sub-unit can be implemented as follows: mapping each sub-unit complexity level to the corresponding channel-level complexity level according to preset rules ; Determine the block-level complexity level of the current block based on each channel-level complexity level.
  • Implementation method 1 Determine the channel-level complexity level based on multiple thresholds and the sum of the complexity levels of each subunit. The above multiple thresholds are preset.
  • the above process can be implemented as follows: determining multiple channel-level complexity levels based on the multiple thresholds, performing a sum operation on the complexity levels of each sub-unit, and dividing the obtained sum into the corresponding channels.
  • level complexity level Specifically, the above thresholds can be three thresholds: 2, 4, and 7. These three thresholds can divide the channel-level complexity level into five levels from level 0 to level 4. The subunit complexity level calculated above is from 0 to level 4.
  • Implementation method 2 Determine the level composition of the sub-unit complexity level, and determine the corresponding channel-level complexity level based on this level composition.
  • the above process can be implemented as follows: for example, the above-mentioned sub-unit complexity level is multiple levels, and the corresponding channel-level complexity is determined according to the level and arrangement of each sub-unit. grade. For example, when the above processing unit is divided into 4 sub-units, and the complexity levels of the 4 sub-units are 1, 2, 2, 2 respectively, if the preset rule includes a decision-making method: each sub-unit complexity level has three 2's, Then the channel-level complexity level is 2, and the corresponding channel-level complexity level is 2. It can be understood that the above scenario is only an illustrative description, and other sub-unit division methods and decision-making methods also fall within the scope of protection of this application.
  • Implementation method 1 Take the maximum value, minimum value or weighted value of each channel-level complexity level as the block-level complexity level of the current block.
  • Implementation Mode 2 Determine the block-level complexity level of the current block based on multiple thresholds and the sum of each channel-level complexity level.
  • the above-mentioned multiple thresholds are preset.
  • each channel component of the current block can jointly or independently determine the channel-level complexity level.
  • the U channel and the V channel can share a channel-level complexity level, or their respective channel-level complexity levels can be determined separately.
  • the decoding end can be implemented as follows: obtaining the channel-level complexity level of the current block from the code stream, where the above code stream is the encoding code stream of the current block.
  • the decoding end can receive the encoded code stream of the current block from the encoding end.
  • the encoded code stream contains complexity information bits used to represent the channel-level complexity level. Based on the information bits, the encoding end can obtain the channel-level code stream based on the channel-level complexity level.
  • the channel-level complexity level is determined by the texture information, and the block-level complexity level is determined based on the channel-level complexity level.
  • the implementation of determining the block-level complexity level through at least two channel-level complexity levels is the same as that on the encoding side, and will not be described again here.
  • the above-mentioned implementation of determining the channel-level complexity level through the complexity information bits can be as follows: obtaining the complexity information bits of the above-mentioned current block from the above-mentioned encoded code stream; determining the channel-level complexity level based on the complexity information bits.
  • the above complexity information bits may be 1 bit or 3 bits, and the first bit of the complexity information bit is used to indicate that the current channel level complexity level is the same channel complexity level as the previous image block of the current block. Is it the same and the change value between the two.
  • the current channel-level complexity level is the complexity level of the U channel of the current block
  • the same channel complexity of the previous image block represents the complexity of the U channel of the image block decoded before the current block. degree level. If the first bit is the same, the complexity information bit is 1 bit; if it is different, the complexity information bit is 3 bits, and the last two bits represent the channel-level complexity of the current block and the previous image block of the current block.
  • the change value of the complexity level of the same channel Based on the change value and the channel complexity level of the same channel of the previous image block, the currently required channel-level complexity level can be determined.
  • the above complexity information bits can also indicate whether the complexity of the U channel of the current block and the Y channel of the current block are the same and the change value when they are different. This application does not make a special limitation on this.
  • S602. Determine the target number of bits of the current block according to the code control parameters.
  • the code control parameters include the block-level complexity level of the current block.
  • the code control parameters include the block-level complexity level of the current block calculated in the above step S601, which is used to determine the target number of bits of the current block.
  • the target number of bits is the bits required to predict the coding of the current block. number.
  • the above code control parameters may also include at least one of the following parameters: image bit width bpc, target bits per pixel bpp, image format, average number of lossless encoding bits at the same level, average number of lossless encoding bits, code stream buffer fullness , first row quality improvement parameter, first column quality improvement parameter, the target number of bits of the current block can be determined through one or more of the above code control parameters.
  • the above-mentioned average number of bits for lossless encoding at the same level is the average of the predicted number of bits required for lossless encoding of the current block and multiple decoded image blocks, and the complexity levels of the multiple decoded image blocks and the current block are the same ;
  • the above-mentioned average number of bits for lossless coding is the average of the predicted number of bits required for lossless encoding of the current block and all decoded image blocks;
  • the above-mentioned code stream buffer fullness is used to characterize the fullness of the buffer, and the above-mentioned buffer Used to store the code stream of the image to be processed;
  • the above-mentioned first-line quality improvement parameters are used to lower the quantization parameters of the first-line block when the current block is the first-line block in the image to be processed, so as to alleviate the difficulty of predicting the first-line block.
  • the impact is caused by large and transitive prediction errors.
  • the above-mentioned code control parameters may include the average number of lossless encoding bits at the same level, the average number of lossless encoding bits, and the fullness of the code stream buffer. Determining the target number of bits of the current block according to the code control parameters can be implemented as : Determine the above-mentioned average number of lossless encoding bits and the average number of lossless encoding bits at the same level; determine the initial target number of bits based on the average number of lossless encoding bits and the average number of lossless encoding bits at the same level; based on the above-mentioned code stream buffer fullness, the block of the current block The level complexity level and the initial target number of bits determine the target number of bits for the current block.
  • the initial transmission delay mechanism refers to the impact on the buffer fullness of some invalid bits that exist in the buffer before the encoded code stream of the current block is stored.
  • the above determination of the average number of lossless coding bits and the average number of coding bits of the same level can be implemented by: determining the number of lossless coding bits of the current block, and the number of lossless coding bits is a prediction of the number of bits required for lossless coding of the current block. value; update the current block's average lossless encoding bit number at the same level based on the current block's lossless encoding bit number and multiple historical average lossless encoding bit numbers at the same level; update based on the current block's lossless encoding bit number and all historical average lossless encoding bit numbers The average number of lossless coded bits for the current block.
  • the above-mentioned historical average number of lossless encoding bits at the same level is the average number of lossless bits at the same level for decoded image blocks with the same complexity level as the current block.
  • the above-mentioned historical average number of lossless encoding bits is the average lossless number of decoded image blocks. Number of bits.
  • the above code control parameters when the current block is the first row block in the image to be processed, also include the first row quality improvement parameter.
  • the above determination of the target number of bits of the current block based on the code control parameters can be implemented as: The initial target number of bits is determined based on the average number of lossless coding bits at the same level and the average number of lossless coding bits; The code stream buffer fullness, the block-level complexity level of the current block, the first line quality improvement parameter and the initial target number of bits determine the target number of bits of the current block.
  • the above-mentioned first row of quality improvement parameters mainly improves the image quality of the current block by reducing the quantization parameter of the current block.
  • the above code control parameters when the current block is the first column block in the image to be processed, also include the first column quality improvement parameter.
  • the above determination of the target number of bits of the current block based on the code control parameters can be implemented as: Determine the initial target number of bits based on the average number of lossless encoding bits at the same level and the average number of lossless encoding bits; determine the current block based on the fullness of the code stream buffer, the block-level complexity level of the current block, the first column quality improvement parameters, and the initial target number of bits the target number of bits.
  • the above-mentioned first column of quality improvement parameters mainly improves the image quality of the current block by reducing the quantization parameter of the current block.
  • the multi-channel image block that is, the channel components of the current block, can jointly or independently determine the above-mentioned number of lossless encoding bits and the target number of bits at the same level.
  • the above-mentioned determination of the quantization parameters of the current block based on the target number of bits can be implemented as: calculation based on the above-mentioned average number of lossless encoding bits at the same level, the target number of bits, and the sampling rate corresponding to the image format of the image to be processed.
  • the reference quantization parameter of the current block is obtained, and further the component quantization parameters corresponding to each channel of the current block can be calculated based on the reference quantization parameter.
  • the video coder decodes the current block based on its quantization parameters.
  • the video encoder encodes the channel-level complexity level of the current block into the code stream, that is, the above-mentioned complexity information bits.
  • encode the quantization parameters of the current block into the code stream Accordingly, the decoding end obtains the complexity information bits in the code stream to calculate the quantization parameters for decoding, or the decoding end obtains the quantization parameters in the code stream for decoding.
  • the video encoder can also encode both of the above information into the code stream.
  • Step S701 Determine the block-level complexity level of the current block.
  • This step is used to determine the complexity level of the current block, and there are differences in the implementation process at the video encoding end and the video decoding end.
  • This step can be implemented by using at least one channel image block in the current block as a processing unit, dividing each processing unit into at least two sub-units, and determining the complexity of the texture information of each sub-unit.
  • each 16x2 channel can be divided into four 4x2 sub-blocks, as shown in Figure 9.
  • the texture information of the current block is the pixel information of the current block.
  • the calculation of the complexity of the current block requires the use of the following three parts of pixels, as shown in Figure 9: (1) the original pixel value of the current block; (2) the left column of the current block, that is, the left column of sub-block 1 The original pixel value of the adjacent column. It should be noted that when the original pixel value cannot be obtained, the reconstructed value can also be used; (3) The reconstructed value of the previous row adjacent to the current block, that is, the gray square in Figure 9 Grid area.
  • sub-block 1 in Figure 9 is an example to explain the calculation process of sub-block complexity, that is, the above-mentioned process of determining the texture information of each sub-unit.
  • This can usually be done by calculating the horizontal complexity and vertical complexity of each sub-block.
  • the complexity is obtained and can be implemented as follows: the horizontal complexity calculation method is: the sum of the absolute value of the pixel value of the current column and the pixel value of the adjacent column to the left; the vertical complexity calculation method is: the pixel value of the current row and the sum of the pixel values above it The sum of the absolute values of the pixel values of adjacent rows.
  • the above-mentioned horizontal complexity calculation uses the padding value of the left boundary, and the padding value is the pixel value of the current column; accordingly, the current block is the upper boundary of the current video slice.
  • the above vertical complexity calculation uses the padding value of the upper boundary, which is the pixel value of the current row.
  • the horizontal complexity sub_comp_hor of sub-block 1 Specifically, it can be calculated by the set ori_pix[i][j] that constitutes the pixel value of sub-block 1, the pixel value or reconstruction value of the adjacent left column of sub-block 1, and the adjacent upper row. Among them, i and j represent the row and column where the pixel value is located. The pixel value in the first row and first column of sub-block 1 is represented as ori_pix[0][0], and the representation of other pixel values is by analogy.
  • sub_comp_hor 2+ ori_pix[0][i]-ori_pix[0][i+1]
  • sub_comp_hor 3+ ori_pix[1][-1]-ori_pix[1][0]
  • sub_comp_hor4+ ori_pix[1][i]-ori_pix[1][i+1]
  • the vertical complexity sub_comp_ver of sub-block 1 refers to the degree of difference between pixels of sub-block 1 in the vertical direction.
  • sub_comp_hor 2+ ori_pix[0][i]-ori_pix[1][i]
  • sub_comp min(sub_comp_hor,sub_comp_ver)
  • Step S802 Determine the block-level complexity level of the current block based on the complexity of the sub-block texture information of each channel.
  • this step can be implemented in three steps:
  • S8021 Determine the complexity level of each channel sub-block based on the complexity of the texture information of each channel sub-block.
  • This process can be implemented by setting multiple thresholds.
  • the specific implementation can be as follows:
  • Implementation method 1 Set two thresholds, thres1 and thres2:
  • the texture information complexity sub_comp of each sub-block is divided into three complexity levels: level 0, level 1 and level 2, which are specifically divided into:
  • the texture information complexity sub_comp_level of each sub-block is divided into levels 0, 1, 2, 3, and 4, specifically divided into:
  • mapping of the complexity level of each channel sub-block to the channel-level complexity level can be implemented by presetting multiple thresholds and mapping based on the thresholds or based on a preset mapping strategy.
  • Implementation method 1 Set multiple thresholds, calculate the sum of the thresholds of each sub-block sub_comp_level in the corresponding channel, and map the texture information complexity of each sub-block to the channel-level complexity level of the corresponding channel based on the above multiple thresholds.
  • the process can be as follows:
  • Implementation method 2 Preset 4 thresholds 5, 7, 10, and 12, sum all sub_comp_levels, and then obtain comp_level based on the above 4 thresholds, where the possible values of comp_level are (0, 1, 2, 3, 4). In this implementation, unlike implementation 1, four 5-level sub_comp_levels can be mapped to one 5-level comp_level.
  • Implementation method 3 Obtain comp_level according to the preset logical rules.
  • the decision-making method of the logical rule can be as follows:
  • the decision-making method of the above logical rules can be:
  • comp_level sub_comp_level1+sub_comp_level2, where sub_comp_level1 and sub_comp_level2 are chroma respectively.
  • S8023 Determine the block-level complexity level of the current block based on each channel-level complexity level.
  • the channel-level complexity levels of the three channels of Y, U, and V can be determined.
  • the above-mentioned based on the channel-level complexity Level An implementation that determines the block-level complexity level of the current block can be implemented as follows:
  • blk_comp_level (luma_comp_level+chroma_comp_level*sample_rate)/(1+sample_rate)
  • sample_rate is the sampling rate of the image to be processed, which is determined by the image format of the image to be processed.
  • sample_rate is the sampling rate of the image to be processed
  • format_bias is the offset set when calculating the quantization parameters.
  • the channel-level complexity level can be shared by multiple channels or can be independent. For example, if it is a YUV or YCoCg format image, one complexity is used for brightness and a common complexity for chrominance, or the three channels independently determine the channel complexity level.
  • the calculation method of the complexity level is:
  • Implementation method 1 Take the minimum, maximum or weighted value of the two chroma channel-level complexity levels.
  • Implementation method 2 Take the minimum value, maximum value or weighted value of the texture information complexity of the two chroma channels as the texture complexity of the chroma, and then obtain the channel-level complexity of the chroma according to the method from step S8021 to step 8023 above. grade.
  • obtaining the above-mentioned channel-level complexity levels from the code stream encoded by the encoding end can be implemented as: obtaining the complexity information bits of the above-mentioned current block from the above-mentioned encoded code stream; determining based on the complexity information bits Channel level complexity level.
  • the above complexity information bits may be 1 bit or 3 bits, and the first bit of the complexity information bit is used to indicate that the current channel level complexity level is the same channel complexity level as the previous image block of the current block. Is it the same and the change value between the two.
  • the decoder can obtain the channel-level complexity level as follows: if the current channel-level complexity level is the complexity level of the U channel of the current block, then the same as that of the previous image block
  • the channel complexity represents the complexity level of the U channel of the image block decoded before the current block. If the first bit is the same, the complexity information bit is 1 bit; if it is different, the complexity information bit is 3 bits, and the last two bits represent the channel-level complexity of the current block and the previous image block of the current block.
  • the change value of the complexity level of the same channel Based on the change value and the channel complexity level of the same channel of the previous image block, the currently required channel-level complexity level can be determined.
  • the above complexity information bits may also indicate whether the complexity of the U channel of the current block and the Y channel of the current block are the same and the change value when they are different.
  • Step S702 Determine the average number of lossless coding bits and the average number of lossless coding bits at the same level of the current block.
  • the above-mentioned implementation of determining the average number of lossless coding bits and the average number of lossless coding bits at the same level of the current block can be as follows:
  • pred_lossless_bits (cu_bits/(width x height)+luma_qp/a+sample_rate*chroma_qp/b)/(1+sample_rate)
  • pred_lossless_bits bpc+c
  • parameter c is related to the image format, and is 0.67 only in RGB mode, and is 0 in other formats.
  • the average number of lossless encoding bits at the same level lossless_bits[blk_comp_level] corresponds to the block-level complexity level of the current block.
  • lossless_bits[blk_comp_level] lossless_bits[blk_comp_level]*(1–d)+pred_lossless_bits*d
  • a specific setting method of the above update rate d can be: for the first four image blocks of any complexity, the update rate d is set to 3/4, 5/8, 1/2, and 3 respectively. /8, and 1/4 in other cases.
  • avg_lossless_bits avg_lossless_bits*(1-e)+pred_lossless_bits*e
  • e is the update rate
  • Step S703 Determine the target number of bits of the current block.
  • the above-mentioned determination of the target number of bits of the current block can be achieved through the following steps:
  • the initial target number of bits is the target number of bits calculated without considering the buffer fullness, and can be calculated in the following way:
  • quality_ratio bpp/(ave_lossless_bits–comp_offset)*(1+sample_rate)
  • comp_offset is the default value.
  • Table 2 One setting method is shown in Table 2 below:
  • bpp target_bpp/16+(end_target_fullness–(cur_total_bits–((target_bpp ⁇ 1) ⁇ (cur_blocks–1))))/max(16, slice_width_in_cu ⁇ slice_height_in_cu–cur_blocks)/32
  • end_target_fullness is a default value.
  • a specific setting value of end_target_fullness may be (delay_bits–133)*3/4.
  • delay_bits is the default value, which is related to the initial transmission delay mechanism, and delay_bits is the number of delay bits.
  • the characteristics of the above-mentioned initial transmission delay mechanism include: a) When the video slice starts to be transmitted, it is delayed by delay_blks image blocks before being transmitted, and these image blocks are not subject to underflow processing. b) The buffer status of the buffer at the end of the video slice is always the number of delay_bits delay bits (if insufficient, fill in zeros).
  • Figure 10 is a schematic diagram of the initial transmission delay mechanism.
  • One or more image blocks in the video slice are between the initial position and the second position.
  • the maximum value of the corresponding buffer is based on the position between the initial position and the second position.
  • the maximum value of the corresponding buffer decreases between the threshold position and the final position based on the position of the image patch that increases at the second position and is between the threshold position and the final position of the slice.
  • the size of the buffer corresponding to the image block remains unchanged.
  • the above quality_ratio needs to limit the value range to 0-0.6.
  • the above initial target number of bits pre_target_bits can be determined by the following formula:
  • pre_target_bits quality_ratio*(lossless_bits[blk_comp_level]-comp_offset)*(1+sample_rate); among them, comp_offset is the default value.
  • Table 2 For a setting method, see Table 2 above, and for sample_rate, see Table 1 above.
  • S7032 Limit the initial target number of bits according to the buffer status and the block-level complexity level of the current block, and determine the final target number of bits of the current block.
  • the specific implementation can be as follows:
  • cur_total_bits represents the number of bits currently consumed
  • target_bpp represents the target bits per pixel bpp
  • cur_blocks represents the number of image blocks currently processed
  • available_buffer_size represents the size of the available buffer.
  • Delay_blks blocks from the beginning of the video slice, that is, from the initial position to the second position, the above available_buffer_size can be linearly increased from delay_bits to max_buffer_size.
  • available_buffer_size remains unchanged from the second position to the threshold position, and is always equal to max_buffer_size.
  • delay_blks has been explained in detail in calculating the mass ratio, so it will not be described again here.
  • k Clip3(0,2.5,max_lossless_bits lossless_bits[blk_comp_level]); max_lossless_bits is the default value. Please see Table 2 for a specific setting method.
  • the above process of determining the upper and lower bounds also needs to consider the impact of the initial transmission delay mechanism on the buffer fullness.
  • target_bits Clip3(min_bits, max_bits, target_bits).
  • the current block is the first row block of the image to be processed, it is difficult to predict the parameters of the first row block and the prediction error is transitive. Therefore, when the current block is a first-line block, the quality of the current block can be improved by introducing a first-line quality improvement parameter. This process is mainly achieved by adjusting the quantization parameter of the first-line block.
  • the adjustment of the bpp parameter can be realized as follows: Let the increase in bpp of the first row of image blocks be bpp_delta_row. From the first block to the last block in the first row, bpp_delta_row gradually decreases from 2.5 to 0.5.
  • the initial target number of bits is limited according to the buffer status and block-level complexity level to determine the target number of bits.
  • the image quality of the current block can be improved in the following ways: According to the buffer status After limiting the target number of bits and complexity, if the current block is the first row block of the slice and target_bits ⁇ 7, where 7 is the preset experience threshold, target_bits will be increased, and the increased target_bits must be within the given range. .
  • improving the quality of the current block through the first row quality improvement parameter can also be performed only when certain conditions are met. For example, first line quality improvement is performed only when the complexity level of the current block is low.
  • the quality of the current block can also be improved by introducing the first column quality improvement parameter. This process is mainly achieved by reducing the quantization parameter of the first column block.
  • the adjustment of the bpp parameter can be realized as follows: Let the amount of bpp increase of the image block in the first column be bpp_delta_col. From the first block to the last block in the first row, bpp_delta_col gradually decreases from 2.5 to 0.5.
  • the initial target number of bits is limited according to the buffer status and block-level complexity level to determine the target number of bits.
  • the image quality of the current block can be improved in the following ways: According to the buffer status After limiting the target number of bits and complexity, if the current block is the first column block of the slice and target_bits ⁇ 7, where 7 is the preset experience threshold, target_bits will be increased, and the increased target_bits must be within the given range. .
  • improving the quality of the current block through the first column quality improvement parameter can also be performed only when certain conditions are met. For example, first line quality improvement is performed only when the complexity level of the current block is higher.
  • Step S704 Determine the quantization parameter of the current block.
  • ref_qp (lossless_bits[blk_comp_level]target_bits/(1+sample_rate))*p
  • the default value of p is 8.
  • this process is to calculate the quantization parameters of each YUV channel. Specifically, it can be implemented as:
  • bias_init bias_init*format_bias; among them, bias_init and format_bias are preset values. For bias_init, see Table 3 below, and for format_bias, see Table 1 above.
  • chroma_qp Clip3(0,chroma_max_qp,ref_qp+bias)
  • comp_level[0] represents the luminance component
  • comp_level[1] represents the chrominance component
  • two YUV420 images can be combined into one YUV444 image for processing.
  • the above brightness component complexity level can also take the maximum value or the minimum value of the two, which is not specifically limited in this application.
  • Step S705 Video decode the current block based on the quantization parameters.
  • the video decoder decodes the current block based on the quantization parameters of the current block. It can be understood that during encoding, the video encoder can encode the channel-level complexity level of the current block into the code stream, Or encode the quantization parameters of the current block into the code stream. Accordingly, the decoding end obtains the channel-level complexity level in the code stream to calculate the quantization parameters for decoding, or the decoding end obtains the quantization parameters in the code stream for decoding. Of course, the video encoder can also encode both of the above information into the code stream.
  • each channel component of the current block can also independently determine the above-mentioned average number of lossless coding bits, average number of lossless coding bits, and target number of bits at the same level.
  • the above process can be implemented as follows:
  • pred_lossless_bits[i] (cu_bits[i]/(width[i]x height[i])+qp[i]/a[i]
  • pred_lossless_bits[i] bpc[i]+c[i];
  • i is the number of channels of the current block, indicating the actual number of encoding bits of the current channel; width and height respectively represent the width and height of the current channel coding unit, and qp represents the quantization parameter of the current channel.
  • lossless_bits[i][comp_level[i]] is the average number of lossless coding bits at the same level for coded channels with the same complexity level as the current channel, and d[i] is the update rate.
  • Determining the target number of bits for each channel component of the current block can be achieved in the following ways:
  • Implementation method 2 The calculation of quality_ratio still uses the cu (Coding Unit, coding unit) level. The calculation process is the same as the above step S7031, but the above ave_lossless_bits[i] needs to be merged into a cu level variable.
  • target_bits and lossless_bits need to be synthesized from the cb level (channel level) to the cu level.
  • Implementation mode 2 corresponds to implementation mode 2 in step (1).
  • the calculation method of the target bit number target_bits is the same as in the above step S703, and the obtained target_bits is already a cu-level variable.
  • Determining the quantization parameters of each channel component of the current block can be implemented as follows:
  • step (3) takes effect, that is, the upper limit and lower limit have a limiting effect, and the value of target_bits is modified to the upper limit or lower limit, then the target_bits will be redistributed according to the ratio of target_bits[i] obtained in steps (1) to (2). New target_bits[i]; if target_bits has not been modified in step (3), the value of target_bits[i] will not change at this time.
  • Implementation method 2 If the target_bits have not been separated before, the target_bits are separated according to the complexity level at this time.
  • the value of k is related to the complexity.
  • the code control parameters of the above video image decoding method and encoding method can also be fixed-pointed. Specifically, this can be achieved through the following process:
  • K2, K3, K4 are fixed empirical values used in the code control algorithm;
  • DelayBits represents the number of delay bits;
  • TargetBpp represents the target bpp, configured externally;
  • TransmissionDelayCu represents the number of CUs in the initial transmission delay;
  • EndDecreaseBits represents the slice due to the initial delay function The number of bits that need to be reduced at the end;
  • RcBufferSize represents the buffer size considered by the code control;
  • MuxWordSize represents the number of bits of header information required for the substream parallel function;
  • EndControlBlocks represents the need to operate on the maximum buffer value due to the initial transmission delay at the end of the slice.
  • DecreaseStepLog2 indicates the logarithmic value of the step size of the MaxBufferSize used by the code rate control module at the end of the slice for each control block to decrease, and its value is in the code stream header;
  • EndControlBegin indicates the index of the block that starts to be controlled at the end of the slice;
  • SliceWidthInCu Indicates the width of how many CUs are in the slice width;
  • SliceHeightInCu indicates how many CU heights are in the slice height;
  • EndTargetFullness indicates the target fullness at the end of the slice;
  • RemainBlksLog2 indicates the highest binary digit of the total number of coding units in a slice;
  • MaxBufferSize indicates The maximum size of the buffer.
  • ImageFormat looks up Table 1 to obtain AdjComplexity (number of lossless encoding bits at the same level), AvgComplexity (average number of lossless encoding bits), ComplexityOffset (offset value for complexity calculation), MaxComp ( The maximum number of lossless coding bits) and the initialization value of K1 (empirical value).
  • Table 4 above shows the correspondence between AdjComplexity, AvgComplexity, ComplexityOffset, MaxComp and K1, BitDepth[0] and ImageFormat.
  • ImageFormat image format
  • ChromaSampleRate sampling rate
  • InvElem removing the multiplier required for division related to sampling rate
  • InvElemShift removing the shift value required for division related to sampling rate
  • FormatBias Different The initialization value of the image format's offset value for qp
  • S2 Determine the quantization parameters. This step can be implemented as follows:
  • S21 Calculate the quantization parameter MasterQp of the coding unit according to the brightness complexity level ComplexityLevel[0] and the chroma complexity level ComplexityLevel[1] of the current coding unit.
  • the above calculation of the quantization parameter MasterQp of the coding unit based on the brightness complexity level ComplexityLevel[0] and the chroma complexity level ComplexityLevel[1] of the current coding unit can be implemented as follows:
  • bppAdj represents the adjustment value of bpp
  • BitsRecord represents the total number of bits that have been decoded so far
  • CurrBlocks represents the number of blocks that have been currently decoded
  • maxComp represents the conversion value required for MaxComp to perform code control fixed-point
  • complexityOffset represents ComplexityOffset for code control fixed-point
  • RcBufferSizeMaxBit represents the code stream cache size. The value of RcBufferSize is equal to the value of rc_buffer_size.
  • RcBufferSizeMaxBit represents the highest binary digit of RcBufferSize
  • shiftCur represents the current shift value
  • tmp represents the intermediate variable generated during the code control fixed-point process
  • fullness represents fullness
  • infoRatio represents quality.
  • Ratio; relativeComplexity represents the relative number of lossless encoding bits
  • minRate1, minRate2, and minRate13 represent the intermediate variables for calculating minRate
  • minRate represents the lower limit of targetRate
  • targetRate represents the target number of bits
  • bppOffset1, bppOffset2, and bppOffset3 calculate the intermediate variables of bppOffset
  • bppOffset represents the bias of bpp set value
  • maxRate represents the upper limit of targetRate
  • BiasInit is obtained from the table 6 below;
  • Embodiments of the present application provide a video decoding device.
  • the video decoding device may be a video decoder, a video encoder, or a video decoder. Specifically, the video decoding device is used to perform the steps performed by the video decoder in the above video image decoding method and encoding method.
  • the video decoding device provided by the embodiment of the present application may include modules corresponding to corresponding steps.
  • Embodiments of the present application can divide the video decoding device into functional modules according to the above method examples.
  • each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module.
  • the above integrated modules can be implemented in the form of hardware or software function modules.
  • the division of modules in the embodiments of this application is schematic and is only a logical function division. There may be other division methods in actual implementation.
  • FIG. 11 shows a possible structural diagram of the video decoding device involved in the above embodiment.
  • the video decoding device 1100 includes a complexity level determination module 1101 , a coding control parameter determination module 1102 , a quantization parameter determination module 1103 and a decoding module 1104 .
  • the complexity level determination module 1101 is used to obtain at least two channel-level complexity levels of the current block in the image to be processed, and determine the block-level complexity level of the current block based on the at least two channel-level complexity levels; the above-mentioned channel-level complexity Level is used to characterize the complexity of the channel-level texture of the current block.
  • the code control parameter determination module 1102 is used to determine the target number of bits of the current block according to the code control parameters, where the code control parameters include the block level complexity level of the current block.
  • the quantization parameter determination module 1103 is used to determine the quantization parameter of the current block based on the target number of bits.
  • the decoding module 1104 is used to decode the current block based on the quantization parameters.
  • the above-mentioned code control parameters include the average number of lossless encoding bits at the same level, the average number of lossless encoding bits, and the code stream buffer fullness; the above-mentioned code control parameter determination module is specifically used to: determine the average number of lossless encoding bits at the same level and the average number of lossless encoding bits; determine the initial target number of bits based on the average number of lossless encoding bits and the average number of lossless encoding bits at the same level; determine the current number of bits based on the fullness of the code stream buffer, the block-level complexity level of the current block, and the initial target number of bits The target number of bits of the block; wherein, the above-mentioned average number of lossless coding bits of the same level is the average of the predicted number of bits required when the current block and multiple decoded image blocks are losslessly encoded, and the above-mentioned multiple decoded image blocks and The complexity level of the current block is the same; the average number of lossless
  • the above-mentioned code control parameter determination module is specifically used to determine the average number of lossless coding bits and the average number of lossless coding bits at the same level: determine the number of lossless coding bits of the current block, and the number of lossless coding bits is the number of lossless coding bits of the current block when the current block is lossless coding.
  • the prediction value of the required number of bits updates the average number of lossless encoding bits of the current block at the same level based on the number of lossless encoding bits of the current block and the average number of lossless encoding bits of multiple historical same levels; the historical average number of lossless encoding bits at the same level is the same as the current block.
  • the average number of lossless coded bits of the same level for decoded image blocks with the same block complexity level update the average number of lossless coded bits of the current block based on the number of lossless coded bits of the current block and the average number of lossless coded bits of all history; the historical average number of lossless coded bits
  • the number is the average number of lossless bits of the decoded image block.
  • the above-mentioned current block is the first row block of the image to be processed, and the above-mentioned code control parameters include the first row quality improvement parameters; the above-mentioned code control parameter determination module is specifically used to determine the target of the current block according to the code control parameters.
  • the number of bits also includes: adjusting the target number of bits of the current block according to the first row of quality improvement parameters to reduce the quantization parameter of the current block.
  • the above-mentioned current block is the first column block of the image to be processed, and the above-mentioned code control parameters include the first column quality improvement parameters; the above-mentioned code control parameter determination module is specifically used to determine the target of the current block according to the code control parameters.
  • the number of bits also includes: adjusting the target number of bits of the current block according to the first row of quality improvement parameters to reduce the quantization parameter of the current block.
  • the above complexity level determination module is specifically configured to: obtain at least two channel-level complexity levels of the current block in the image to be processed, and at the encoding end, obtain the channel-level texture information of the current block, and based on the channel-level The texture information determines the channel-level complexity level of the current block; or at the decoding end, the channel-level complexity level is obtained from the code stream, which is the encoding code stream of the current block.
  • the above complexity level determination module is specifically used to obtain the channel-level complexity level from the code stream: obtain the complexity information bits of the current block from the code stream, and the complexity information bits are used to represent the current block's complexity level.
  • Channel-level complexity level determine the channel-level complexity level based on the complexity information bits.
  • the above-mentioned complexity level determination module is specifically configured to obtain the channel-level texture information of the current block, and determine the channel-level complexity level of the current block based on the channel-level texture information: taking at least one channel image block in the current block as The processing unit divides the processing unit into at least two sub-units and determines texture information of each sub-unit; in the processing unit, determines the block-level complexity level of the current block based on the texture information of each sub-unit.
  • the above complexity level determination module is specifically used to determine the texture information of each subunit: obtain the original pixel value of the subunit, the original pixel value or reconstructed value of the left adjacent column of the subunit, and the subunit The reconstructed values of the adjacent rows above and correspondingly calculate the horizontal texture information and vertical texture information of the sub-unit; select the minimum value from the horizontal texture information and vertical texture information as the texture information of the corresponding sub-unit.
  • the above complexity level determination module is specifically configured to determine the block-level complexity level of the current block based on the texture information of each sub-unit in the processing unit: in the processing unit, each sub-unit is determined based on multiple thresholds.
  • the texture information is divided into corresponding sub-unit complexity levels, and the above-mentioned multiple thresholds are preset; the block complexity level of the current block is determined based on the complexity level of each sub-unit.
  • the above-mentioned complexity level determination module is specifically used to determine the block complexity level of the current block based on the complexity level of each sub-unit: mapping each sub-unit complexity level to the corresponding channel-level complexity according to preset rules Level; determine the block-level complexity level of the current block based on each channel-level complexity level.
  • the above-mentioned complexity level determination module is specifically used to map each sub-unit complexity level to the corresponding channel-level complexity level according to preset rules: determined based on multiple thresholds and the sum of the complexity levels of each sub-unit.
  • preset rules determined based on multiple thresholds and the sum of the complexity levels of each sub-unit.
  • the multiple thresholds mentioned above are preset.
  • the above-mentioned complexity level determination module is specifically used to map each sub-unit complexity level to the corresponding channel-level complexity level according to preset rules: determine the level composition of the sub-unit complexity level, and determine the level composition according to the level composition. Determine the corresponding channel-level complexity level.
  • the above complexity level determination module is specifically used to determine the block level complexity level of the current block based on each channel level complexity level: taking the maximum value, minimum value or weighted value of each channel level complexity level as the current The block-level complexity level of the block; or the block-level complexity level of the current block is determined based on multiple thresholds and the sum of each channel-level complexity level, where the multiple thresholds are preset.
  • the video decoding device provided by the embodiment of the present application includes but is not limited to the above-mentioned modules.
  • the video decoding device may also include a storage module.
  • the storage module can be used to store program codes and data of the video decoding device.
  • An embodiment of the present application also provides an electronic device.
  • the electronic device includes the above-mentioned video decoding device 1100.
  • the video decoding device 1100 executes any of the methods performed by the video decoder provided above.
  • Embodiments of the present application also provide a computer-readable storage medium.
  • a computer program is stored on the computer-readable storage medium. When the computer program is run on a computer, it causes the computer to perform any of the video decoding provided above. The method executed by the implementer.
  • An embodiment of the present application also provides a chip.
  • the chip integrates a control circuit and one or more ports for realizing the functions of the video decoding device 100 described above.
  • the functions supported by this chip can be referred to above and will not be described again here.
  • the program may be stored in a computer-readable storage medium.
  • the storage medium mentioned above may 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 gate array, FPGA) or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof.
  • ASIC application specific integrated circuit
  • DSP digital signal processor
  • FPGA field programmable gate array
  • Embodiments of the present application also provide a computer program product containing instructions. When the instructions are run on a computer, they cause the computer to perform any of the methods in the above embodiments.
  • the computer program product includes one or more computer instructions. When computer program instructions are loaded and executed on a computer, processes or functions according to embodiments of the present application are 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.
  • Computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, e.g., computer instructions may be transmitted from a website, computer, server or data center via a wired (e.g.
  • Coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless means to transmit to another website, computer, server or data center.
  • Computer-readable storage media can be any available media that can be accessed by a computer or include one or more data storage devices such as servers and data centers that can be integrated with the media. Available media may be magnetic media (eg, floppy disk, hard disk, magnetic tape), optical media (eg, DVD), or semiconductor media (eg, SSD), etc.
  • the computer program product includes one or more computer instructions.
  • Computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, e.g., computer instructions may be transmitted from a website, computer, server or data center via a wired link (e.g.
  • Coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless means to transmit to another website, computer, server or data center.
  • Computer-readable storage media can be any available media that can be accessed by a computer or include one or more data storage devices such as servers and data centers that can be integrated with the media. Available media may be magnetic media (eg, floppy disk, hard disk, tape), optical media (eg, DVD), or semiconductor media (eg, solid state disk (SSD)), etc.

Landscapes

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

Abstract

本申请实施例提供一种视频图像解码方法、编码方法、装置及存储介质,涉及视频译码技术领域,有助于提升图像质量。该方法包括:从码流中获取通道级复杂度等级,码流为当前块的编码码流,根据至少两个通道级复杂度等级确定当前块的块级复杂度等级;通道级复杂度等级用于表征所述当前块的通道级纹理的复杂程度,通道级复杂度等级用于表征当前块的通道级纹理的复杂程度;根据码控参数确定当前块的目标比特数,码控参数包括当前块的块级复杂度等级;基于目标比特数确定当前块的量化参数;基于量化参数对当前块进行解码。

Description

一种视频图像解码方法、编码方法、装置及存储介质
相关申请
本申请要求于2022年7月26日申请的、申请号为202210887907.9的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及视频译码技术领域,尤其涉及一种视频图像解码方法、编码方法、装置及存储介质。
背景技术
视频译码技术在视频处理领域发挥着重要的作用。视频译码技术是一种通过对视频进行编解码减少视频数据量的技术。其中,量化是上述视频编解码过程中的重要步骤,主要通过量化参数替代码流中部分原始数据,实现减少码流中原始数据的冗余,用于进行量化的量化参数在视频编码阶段写入码流,视频解码端通过解析码流中的量化参数,实现解码。但量化同时也会带来图像失真的风险,选择适当的量化参数可以起到改善图像质量的效果。因此,如何选择量化参数也就成为了视频译码技术的关键。
发明内容
本申请实施例提供一种视频图像解码方法、编码方法、装置及存储介质,有助于提高视频译码的图像质量,改善视觉体验。
为达到上述目的,本申请实施例采用如下技术方案:
第一方面,本申请实施例提供一种视频图像解码方法、编码方法,该方法应用于视频编码设备或视频解码设备或视频编解码设备的芯片中,该方法包括:从码流中获取通道级复杂度等级,所述码流为当前块的编码码流,根据至少两个通道级复杂度等级确定所述当前块的块级复杂度等级;所述通道级复杂度等级用于表征所述当前块的通道级纹理的复杂程度;根据码控参数确定所述当前块的目标比特数,所述码控参数包括所述当前块的所述块级复杂度等级;基于所述目标比特数确定所述当前块的量化参数;基于所述量化参数对所述当前块进行解码。
上述量化参数在视频编解码过程中具有重要的作用。采用本申请提出的视频图像解码方法、编码方法,视频译码装置从码流中获取通道级复杂度等级,并根据至少两个通道级复杂度等级确定当前块的块级复杂度等级,依据包括该块级复杂度等级在内的码控参数确定当前块的目标比特数,进一步基于该目标比特数确定当前块的量化参数。基于上述过程,本申请所提供的视频图像解码方法、编码方法可以优化量化参数的选择,提高视频译码的图像质量,改善视觉体验。
在一种可能的实现方式中,上述码控参数包括同等级平均无损编码比特数、平均无损编码比特数以及码流缓冲区满度;
根据所述码控参数确定当前块的目标比特数,包括:确定同等级平均无损编码比特数及平均无损编码比特数;基于同等级平均无损编码比特数及平均无损编码比特数确定初始目标比特数;基于码流缓冲区满度,当前块的块级复杂度等级以及初始目标比特数确定当前块的目标比特数;其中,上述同等级平均无损编码比特数为当前块与多个已译码图像块无损编码时所需比特数预测值的平均值,且上述多个已译码图像块与当前块的复杂度等级相同;平均无损编码比特数为当前块与所有已译码图像块无损编码时所需的比特数预测值的平均值;码流缓冲区满度用于表征缓冲区的满度,上述缓冲区用于存储待处理图像的码流。
该种可能的实现方式中,提供了一种确定当前块的目标比特数的方法。通过引入同等级平均无损编码比特数及平均无损编码比特数确定初始目标比特数,并基于该初始目标比特数、码流缓冲区满度和块级复杂度等级确定当前块的目标比特数,可以使得量化参数的确定更加准确,进而达到在保证译码效率的同时改善图像质量的效果。
在一种可能的实现方式中,确定同等级平均无损编码比特数及平均无损编码比特数,包括:确定当前块的无损编码比特数,无损编码比特数为当前块无损编码时所需比特数的预测值;依据当前块的无损编码比特数以及多个历史同等级平均无损编码比特数更新当前块的同等级平均无损编码比特数;历史同等级平均无损编码比特数为与当前块块复杂度等级相同的已译码图像块的同等级平均无损比特数;依据当前块的无损编码比特数以及全部历史平均无损编码比特数更新当前块的平均无损编码比特数;历史平均无损编码比特数为已译码图像块的平均无损比特数。
该种可能的实现方式中,提供了一种通过当前块的无损编码比特数、历史同等级平均无损编码比特数及历史平均无损编码比特数确定上述同等级平均无损编码比特数及平均无损编码比特数的方法,有助于提升方案的可实施性。通过将同等级平均无损编码比特数与块级复杂度等级相对应,可以优化量化参数的选择,进而得到改善图像质量的效果。
在一种可能的实现方式中,上述当前块为待处理图像的首行块,上述码控参数包括首行质量提升参数;根据码控参数确定当前块的目标比特数还包括:依据首行质量提升参数调整当前块的目标比特数,以调小当前块的量化参数。
该种可能的实现方式中,提供了另一种确定当前块目标比特数的方法,适用于当前块为首行块的场景。当前块为首行块时预测难度较大,因预测误差具有传递性,本实现方式通过引入首行质量提升参数调小首行块的量化参数来减少上述影响,以达到提高视频译码的图像质量的效果。
在一种可能的实现方式中,上述当前块为待处理图像的首列块,上述码控参数包括首列质量提升参数;根据码控参数确定当前块的目标比特数还包括:依据首行质量提升参数调整当前块的目标比特数,以调小当前块的量化参数。
该种可能的实现方式中,提供了另一种确定当前块目标比特数的方法,适用于当前块为首列块的场景。当前块为首列块时预测难度较大,因预测误差具有传递性,本实现方式通过引入首列质量提升参数调小首列块的量化参数来减少上述影响,以达到提高视频译码的图像质量的效果。
在一种可能的实现方式中,从码流中获取通道级复杂度等级,包括:从码流中获取当前块的复杂度信息位,该复杂度信息位用于表示当前块的通道级复杂度等级;依据复杂度信息位确定通道级复杂度等级。
该种可能的实现方式中,提供了一种解码端获取上述通道级复杂度等级的方法。通过解析已编码码流中用于表示当前块通道级复杂度等级的信息位获取上述通道级复杂度等级。在一种可能的场景中,该复杂度信息位可以为1比特位或3比特位,且该复杂度信息位的第一位用于表示当前通道级复杂度等级与当前块的前一个图像块的相同通道复杂度等级是否相同以及两者之间的变化值。以YUV图像为例,若当前通道级复杂度等级为当前块的U通道的复杂度等级,则前一个图像块的相同 通道复杂度表示在当前块之前进行译码的图像块的U通道的复杂度等级。若根据第一位判断相同,则复杂度信息位为1位;若不同,则复杂度信息位为3位,且后两位表示当前块的通道级复杂度与当前块的前一个图像块的相同通道的复杂度等级的变化值,基于该变化值与前一个图像块的相同通道的通道复杂度等级可以确定当前所求的通道级复杂度等级。可以理解的是,上述场景只是示例性说明,该种可能的实现方式的保护范围并不以此为限,且通过提出解码端获取通道级复杂度等级的具体方法提升了方案的可实施性。
第二方面,本申请实施例提供一种视频图像编码方法,该方法应用于视频编码设备的芯片中,该方法包括:获取当前块的通道级纹理信息,并基于通道级纹理信息确定当前块的通道级复杂度等级,根据至少两个通道级复杂度等级确定当前块的块级复杂度等级;通道级复杂度等级用于表征当前块的通道级纹理的复杂程度;根据码控参数确定当前块的目标比特数,码控参数包括当前块的块级复杂度等级;基于目标比特数确定当前块的量化参数;基于量化参数对当前块进行编码。
该种可能的实现方式中,提供了获取当前块的通道级复杂度等级的方法。在编码端,基于当前块的通道级纹理信息确定当前块的通道级复杂度等级,在解码端,从接收到的已编码码流中获取当前块的通道级复杂度等级。通过给出编解码中获取当前块通道级复杂度等级的方法,提升了方案的可实施性,便于后续基于得到的通道级复杂度等级确定其他码控参数及目标比特数,从而优化量化参数。
在一种可能的实现方式中,获取当前块的通道级纹理信息,并基于通道级纹理信息确定当前块的通道级复杂度等级,包括:以当前块中至少一个通道图像块为处理单元,将处理单元划分为至少两个子单元,并确定各子单元的纹理信息;在处理单元中,基于各子单元的纹理信息确定当前块的块级复杂度等级。
该种可能的实现方式中,提供了一种适用于编码端的确定当前块的通道级复杂度等级的方法,提升了方案的可实施性。其中,将当前块的至少一个通道图像块作为一个处理单元,并进一步将各处理单元划分为至少两个子单元,有助于提升复杂度信息的准确性。
在一种可能的实现方式中,确定各子单元的纹理信息,包括:获取子单元的原始像素值、子单元的左侧相邻列的原始像素值或重建值,以及子单元的上方相邻行的重建值,并对应计算子单元的水平纹理信息及垂直纹理信息;在水平纹理信息及垂直纹理信息中选择最小值作为对应子单元的纹理信息。
该种可能的实现方式中,提供了一种确定子单元的纹理信息的实现方式,提升了方案的可实施性。
在一种可能的实现方式中,在处理单元中,基于各子单元的纹理信息确定当前块的块级复杂度等级,包括:在处理单元中,基于多个阈值将各子单元的纹理信息划分至对应的子单元复杂度等级,上述多个阈值是预先设定的;基于各子单元复杂度等级确定当前块的块复杂度等级。
该种可能的实现方式中,提出了通过设置多个阈值将各子单元的纹理信息划分至对应的子单元复杂度等级,并基于各子单元复杂度等级确定当前块的块复杂度等级,有助于提升方案的可实施性。
在一种可能的实现方式中,基于各子单元复杂度等级确定当前块的块复杂度等级,包括:依据预设规则将各子单元复杂度等级映射为对应的通道级复杂度等级;基于各通道级复杂度等级确定当前块的块级复杂度等级。
该种可能的实现方式中,提出了将各子单元的复杂度等级映射为对应的通道级复杂度等级,并进一步通过当前块的通道级复杂度等级确定当前块的块级复杂度等级的方法,有助于提升方案的可实施性。
在一种可能的实现方式中,依据预设规则将各子单元复杂度等级映射为对应的通道级复杂度等级,包括:基于多个阈值以及各子单元复杂度等级之和确定通道级复杂度等级,上述多个阈值是预先设定的。
该种可能的实现方式中,提供了一种基于多个阈值以及各子单元复杂度等级之和确定通道级复杂度等级的方法,有助于提升方案的可实施性。
在一种可能的实现方式中,依据预设规则将各子单元复杂度等级映射为对应的通道级复杂度等级,包括:确定子单元复杂度等级的级别构成,并依据级别构成确定对应的通道级复杂度等级。
该种可能的实现方式中,提供了一种基于子单元复杂度等级的级别构成确定对应的通道级复杂度等级的方法,有助于提升方案的可实施性。
在一种可能的实现方式中,基于各通道级复杂度等级确定当前块的块级复杂度等级,包括:取各通道级复杂度等级的最大值、最小值或加权值作为当前块的块级复杂度等级;或者
基于多个阈值以及各通道级复杂度等级之和确定当前块的块级复杂度等级,上述多个阈值是预先设定的。
该种可能的实现方式中,提供了两种基于各通道级复杂度等级确定当前块的块级复杂度等级的方法,有助于提升方案的可实施性。
在一种可能的实现方式中,上述当前块为多通道图像块;该多通道图像块的各通道分量共同或独立确定上述同等级无损编码比特数与目标比特数。
该种可能的实现方式中,提出了多通道图像块的各通道分量共同或独立确定上述同等级无损编码比特数与目标比特数,有助于提升方案的可实施性。
在一种可能的实现方式中,上述当前块为多通道图像块;该多通道图像块的各通道分量共同或独立确定上述通道级复杂度等级。
该种可能的实现方式中,提出了多通道图像块的各通道分量共同或独立确定上述通道级复杂度等级,有助于提升方案的可实施性。
第二方面,本申请实施例提供一种视频译码装置,该装置具有实现上述第一方面中任一项的视频图像解码方法、编码方法的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。
第三方面,提供一种视频编码器,包括:处理器和存储器;该存储器用于存储计算机执行指令,当该视频编码器运行时,该处理器执行该存储器存储的该计算机执行指令,以使该视频编码器执行如上述第一方面中任一项的视频图像解码方法、编码方法。
第四方面,提供一种视频解码器,包括:处理器和存储器;该存储器用于存储计算机执行指令,当该视频解码器运行时,该处理器执行该存储器存储的该计算机执行指令,以使该视频解码器执行如上述第一方面中任一项的视频图像解码方法、编 码方法。
第五方面,提供一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机可以执行上述第一方面中任一项的视频图像解码方法、编码方法。
第六方面,提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机可以执行上述第一方面中任一项的视频解译方法。
第七方面,提供一种电子设备,电子设备包括视频译码装置,处理电路被配置为执行如上述第一方面中任一项的视频图像解码方法、编码方法。
第八方面,提供一种芯片,芯片包括处理器,处理器和存储器耦合,存储器存储有程序指令,当存储器存储的程序指令被处理器执行时实现上述第一方面中任意一项的视频图像解码方法、编码方法。
第九方面,提供一种视频编解码系统,该系统包括视频编码器和视频解码器,视频编码器被配置为执行如上述第一方面中任一项的视频图像解码方法、编码方法,视频解码器被配置为执行如上述第一方面中任一项的视频图像解码方法、编码方法。
第二方面至第九方面中的任一种实现方式所带来的技术效果可参见第一方面中对应实现方式所带来的技术效果,此处不再赘述。
附图说明
图1为本申请实施例提供的编解码系统的系统架构图;
图2为本申请实施例提供的视频编码器的结构示意图;
图3为本申请实施例提供的视频解码器的结构示意图;
图4为本申请实施例提供的一种视频解码的流程示意图;
图5为本申请实施例提供的视频解码器结构示意图;
图6为本申请实施例提供的一种视频图像解码方法、编码方法的流程图;
图7为本申请实施例提供的一种视频图像解码方法、编码方法的具体实施例的流程图;
图8为本申请实施例提供的一种视频图像解码方法、编码方法确定块级复杂度等级的流程图;
图9为本申请实施例提供的一种视频图像解码方法、编码方法的具体实施例的子块纹理信息示意图;
图10为本申请实施例提供的一种视频图像解码方法、编码方法中初始延迟传输机制的示意图;
图11为本申请实施例提供的一种视频译码装置的示意图。
具体实施方式
在本申请的描述中,除非另有说明,“/”表示“或”的意思,例如,A/B可以表示A或B。本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。此外,“至少一个”是指一个或多个,“多个”是指两个或两个以上。“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。
需要说明的是,本申请中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其他实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。
首先,对本申请实施例涉及的技术术语进行介绍:
1、视频译码技术
视频译码技术包括视频编码技术和视频解码技术,也可以统称为视频编解码技术。
其中,视频序列存在空间冗余、时间冗余、视觉冗余、信息熵冗余、结构冗余、知识冗余、重要性冗余等一系列的冗余信息。为了尽可能的去除视频序列中的冗余信息,减少表征视频的数据量,提出了视频编码技术,以达到减小存储空间和节省传输带宽的效果。视频编码技术也称为视频压缩技术。
为了获取基于上述视频压缩技术的存储或传输的数据,相应地,需要视频解码技术来实现。
在国际通用范围内,视频压缩编码标准用于规范视频编解码方法,例如:由运动图像专家组(Motion Picture Experts Group,MPEG)制定的MPEG-2和MPEG-4标准中第10部分的高级视频编解码(Advanced Video Coding,AVC),由国际电信联盟电信标准化部门(International Telecommunication Uion-Telecommunication Standardization Sector,ITU-T)制定的H.263、H.264和H.265(又称高效率视频编解码(High Efficiency Video Coding standard,HEVC))。
需要说明的是,在基于混合编码架构的编码算法中,上述压缩编码方式可以被混合使用。
视频编解码过程中的基本处理单位是图像块,该图像块是编码端将一帧/幅图像进行划分得到的。针对划分后的图像块,通常采用逐行逐个的方式进行处理。其中,将正在处理的图像块称为当前块,已处理的图像块称为已编码图像块,或已解码图像块,或已译码图像块。以HEVC为例,HEVC定义了编码树单元(Coding Tree Unit,CTU)、编码单元(Coding Unit,CU)、预测单元(Prediction Unit,PU)和变换单元(Transform Unit,TU)。CTU、CU、PU和TU均可作为划分后得到的图像块。其中PU和TU均基于CU进行划分。
2、视频采样
像素为视频或图像最小的完整采样,因此,对图像块进行数据处理是以像素为单位。其中,每个像素记录颜色信息。一种采样方式为通过RGB表示颜色,其中,包括三个图像通道,R表示红色red,G表示绿色green,B表示蓝色blue。另一种采样方式为通过YUV表示颜色,其中,包括三个图像通道,Y表示亮度(luminance),U表示第一色度Cb,V表示第二色度Cr。由于人们对亮度的敏感程度强于对色度的敏感程度,因此,可以通过多存储亮度,少存储色度实现减少存储空间。具体地,在视频编解码中,通常采用YUV格式进行视频采样,包括420采样格式、422采样格式等。该采样格式基于亮度的取样数量,确定两个色度的取样数量,例如,假设一个CU有4×2个像素,格式如下:
[Y0,U0,V0][Y1,U1,V1][Y2,U2,V2][Y3,U3,V3];
[Y4,U4,V4][Y5,U5,V5][Y6,U6,V6][Y7,U7,V7];
420采样格式表示YUV以4:2:0的格式进行采样,即亮度与第一色度或第二色度以4:2的比例进行选取,其中第一 色度与第二色度隔行选取。则上述CU采样选取第一行的亮度Y0-Y3,以及第一色度U0和U2,选取第二行的亮度Y4-Y7,以及第二色度V4和V6。该CU经采样由亮度编码单元及色度编码单元构成,其中,亮度编码单元为:
[Y0][Y1][Y2][Y3];
[Y4][Y5][Y6][Y7];
第一色度编码单元为:
[U0][U2];
第二色度编码单元为:
[V4][V6];
可以看出,经上述采样格式采样后的图像块大小发生了变化。其中亮度编码单元块大小不变,仍为4×2,而第一色度编码单元块大小变为2×1,第二色度编码单元块大小也变为2×1。因此,若假设CU大小为X×Y,则基于420采样格式采样后的色度编码单元块大小为
类似地,422采样格式表示YUV以4:2:2的格式进行采样,即亮度与第一色度和第二色度以4:2:2的比例进行选取。则上述CU经采样的亮度编码单元为:
[Y0][Y1][Y2][Y3];
[Y4][Y5][Y6][Y7];
第一色度编码单元为:
[U0][U2];
[U4][U6];
第二色度编码单元为:
[V1][V3];
[V5][V7];
其中,亮度编码单元块大小不变,仍为4×2,而第一色度编码单元块大小变为2×2,第二色度编码单元块大小也变为2×2。因此,若假设CU大小为X×Y,则基于422采样格式采样后的色度编码单元块大小为
上述经采样得到的亮度编码单元、第一色度编码单元和第二色度编码单元作为后续针对当前块进行处理的各通道的数据单元。
本申请提供的译码方法适用于视频编解码系统。该视频编解码系统也可以称为视频译码系统。图1示出了视频编解码系统的结构。
如图1所示,视频编解码系统包含源装置10和目的装置11。源装置10产生经过编码后的视频数据,源装置10也可以被称为视频编码装置或视频编码设备,目的装置11可以对源装置10产生的经过编码后的视频数据进行解码,目的装置11也可以被称为视频解码装置或视频解码设备。源装置10和/或目的装置11可包含至少一个处理器以及耦合到所述至少一个处理器的存储器。所述存储器可包含但不限于只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、带电可擦可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM)、快闪存储器或可用于以可由计算机存取的指令或数据结构的形式存储所要的程序代码的任何其它媒体,本申请对此不作具体限定。
源装置10和目的装置11可以包括各种装置,包含桌上型计算机、移动计算装置、笔记本(例如,膝上型)计算机、平板计算机、机顶盒、例如所谓的“智能”电话等电话手持机、电视机、相机、显示装置、数字媒体播放器、视频游戏控制台、车载计算机或其类似者等电子设备。
目的装置11可经由链路12从源装置10接收经编码视频数据。链路12可包括能够将经编码视频数据从源装置10移动到目的装置11的一个或多个媒体和/或装置。在一个实例中,链路12可包括使得源装置10能够实时地将编码后的视频数据直接发射到目的装置11的一个或多个通信媒体。在此实例中,源装置10可根据通信标准(例如:无线通信协议)来调制编码后的视频数据,并且可以将调制后的视频数据发射到目的装置11。上述一个或多个通信媒体可包含无线和/或有线通信媒体,例如:射频(Radio Frequency,RF)频谱、一个或多个物理传输线。上述一个或多个通信媒体可形成基于分组的网络的一部分,基于分组的网络例如为局域网、广域网或全球网络(例如,因特网)等。上述一个或多个通信媒体可以包含路由器、交换器、基站,或者实现从源装置10到目的装置11的通信的其它设备。
在另一实例中,可将编码后的视频数据从输出接口103输出到存储装置13。类似地,可通过输入接口113从存储装置13存取编码后的视频数据。存储装置13可包含多种本地存取式数据存储媒体,例如蓝光光盘、高密度数字视频光盘(Digital Video Disc,DVD)、只读光盘(Compact Disc Read-Only Memory,CD-ROM)、快闪存储器,或用于存储经编码视频数据的其它合适数字存储媒体。
在另一实例中,存储装置13可对应于文件服务器或存储由源装置10产生的编码后的视频数据的另一中间存储装置。在此实例中,目的装置11可经由流式传输或下载从存储装置13获取其存储的视频数据。文件服务器可为任何类型的能够存储经编码的视频数据并且将经编码的视频数据发射到目的装置11的服务器。例如,文件服务器可以包含全球广域网(World Wide Web,Web)服务器(例如,用于网站)、文件传送协议(File Transfer Protocol,FTP)服务器、网络附加存储(Network Attached Storage,NAS)装置以及本地磁盘驱动器。
目的装置11可通过任何标准数据连接(例如,因特网连接)存取编码后的视频数据。数据连接的实例类型包含适合于存取存储于文件服务器上的编码后的视频数据的无线信道、有线连接(例如,缆线调制解调器等),或两者的组合。编码后的视频数据从文件服务器发射的方式可为流式传输、下载传输或两者的组合。
本申请的译码方法不限于无线应用场景,示例性的,本申请的译码方法可以应用于支持以下多种多媒体应用的视频编解码:空中电视广播、有线电视发射、卫星电视发射、流式传输视频发射(例如,经由因特网)、存储于数据存储媒体上的视频数据的编码、存储于数据存储媒体上的视频数据的解码,或其它应用。在一些实例中,视频编解码系统可经配置,以支持单向或双向视频发射,以支持例如视频流式传输、视频播放、视频广播及/或视频电话等应用。
需要说明的是,图1示出的视频编解码系统仅仅是视频编解码系统的示例,并不是对本申请中视频编解码系统的限定。本申请提供的译码方法还可适用于编码装置与解码装置之间无数据通信的场景。在其它实例中,待编码视频数据或编码后的视频数据可以从本地存储器检索,也可以在网络上流式传输等。视频编码装置可对待编码视频数据进行编码并且将编码后的视频数据存储到存储器,视频解码装置也可从存储器中获取编码后的视频数据并且对该编码后的视频数据进行解码。
在图1中,源装置10包含视频源101、视频编码器102和输出接口103。在一些实例中,输出接口103可包含调制器/解调器(调制解调器)和/或发射器。视频源101可包括视频捕获装置(例如,摄像机)、含有先前捕获的视频数据的视频存档、用以从视频内容提供者接收视频数据的视频输入接口,和/或用于产生视频数据的计算机图形系统,或视频数据的此些来源的组合。
视频编码器102可对来自视频源101的视频数据进行编码。在一些实例中,源装置10经由输出接口103将编码后的视频数据直接发射到目的装置11。在其它实例中,编码后的视频数据还可存储到存储装置13上,供目的装置11稍后存取来用于解码和/或播放。
在图1的实例中,目的装置11包含显示装置111、视频解码器112以及输入接口113。在一些实例中,输入接口113包含接收器和/或调制解调器。输入接口113可经由链路12和/或从存储装置13接收编码后的视频数据。显示装置111可与目的装置11集成或可在目的装置11外部。一般来说,显示装置111显示解码后的视频数据。显示装置111可包括多种显示装置,例如,液晶显示器、等离子显示器、有机发光二极管显示器或其它类型的显示装置。
可选的,视频编码器102和视频解码器112可各自与音频编码器和解码器集成,且可包含适当的多路复用器-多路分用器单元或其它硬件和软件,以处理共同数据流或单独数据流中的音频和视频两者的编码。
视频编码器102和视频解码器112可以包括至少一个微处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application-Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field Programmable Gate Array,FPGA)、离散逻辑、硬件或其任何组合。若本申请提供的译码方法采用软件实现,则可将用于软件的指令存储在合适的非易失性计算机可读存储媒体中,且可使用至少一个处理器执行所述指令从而实施本申请。
本申请中的视频编码器102和视频解码器112可以根据视频压缩标准(例如HEVC)操作,也可根据其它业界标准操作,本申请对此不作具体限定。
图2是本申请实施例中视频编码器102的一种示意性框图。视频编码器102可以在预测模块21、变换模块22、量化模块23以及熵编码模块24分别进行预测、变换、量化以及熵编码的过程。视频编码器102中还包括预处理模块20和求和器202,其中预处理模块20包括分割模块和码率控制模块。对于视频块重构建,视频编码器102也包括反量化模块25、反变换模块26、求和器201和参考图像存储器27。
如图2中所展示,视频编码器102接收视频数据,预处理模块20视频数据的输入参数。其中,该输入参数包括该视频数据中图像的分辨率、图像的采样格式、像素深度(bits per pixel,bpp)、位宽等信息。其中,bpp是指单位像素中一个像素分量所占用的比特数。位宽是指单位像素所占用的比特数。例如,以RGB三个像素分量的值表示一个像素,若每个像素分量占用8比特(bits),则该像素的像素深度为8,并且该像素的位宽为3×8=24bits。
预处理模块20中的分割模块将图像分割成原始块。此分割也可包含分割成条带(slice)、图像块或其它较大单元,以及(例如)根据最大编码单元(Largest Coding Unit,LCU)及CU的四叉树结构进行视频块分割。示例性的,视频编码器102编码在待编码的视频条带内的视频块的组件。一般的,条带可划分成多个原始块(且可能划分成称作图像块的原始块的集合)。通常在分割模块中确定CU、PU以及TU的尺寸。此外,分割模块还用于确定码率控制单元的尺寸。该码率控制单元是指码率控制模块中的基本处理单元,例如在码率控制模块基于码率控制单元,为当前块计算复杂度信息,再根据复杂度信息计算当前块的量化参数。其中,分割模块的分割策略可以是预设的,也可以是编码过程中基于图像不断调整的。当分割策略是预设策略时,相应地,解码端中也预设相同的分割策略,从而获取相同的图像处理单元。该图像处理单元为上述任意一种图像块,且与编码侧一一对应。当分割策略在编码过程中基于图像不断调整时,该分割策略可以直接或间接地编入码流,相应地,解码端从码流中获取相应参数,得到相同的分割策略,获取相同的图像处理单元。
预处理模块20中的码率控制模块用于生成量化参数以使得量化模块23和反量化模块25进行相关计算。其中,码率控制模块在计算量化参数过程中,可以获取当前块的图像信息进行计算,例如上述输入信息;还可以获取求和器201经重构得到的重建值进行计算,本申请对此不作限制。
预测模块21可将预测块提供到求和器202以产生残差块,且将该预测块提供到求和器201经重构得到重建块,该重建块用于后续进行预测的参考像素。其中,视频编码器102通过原始块的像素值减去预测块的像素值来形成像素差值,该像素差值即为残差块,该残差块中的数据可包含亮度差及色度差。求和器201表示执行此减法运算的一个或多个组件。预测模块21还可将相关的语法元素发送至熵编码模块24用于合并至码流。
变换模块22可将残差块划分为一个或多个TU进行变换。变换模块22可将残差块从像素域转换到变换域(例如,频域)。例如,使用离散余弦变换(Discrete Cosine Transform,DCT)或离散正弦变换(Discrete Sine Transform,DST)将残差块经变换得到变换系数。变换模块32可将所得变换系数发送到量化模块23。
量化模块23可基于量化单元进行量化。其中,量化单元可以与上述CU、TU、PU相同,也可以在分割模块中进一步地划分。量化模块23对变换系数进行量化以进一步减小码率得到量化系数。其中,量化过程可减少与系数中的一些或全部相关联的比特深度。可通过调整量化参数来修改量化的程度。在一些可行的实施方式中,量化模块23可接着执行包含经量化变换系数的矩阵的扫描。替代的,熵编码模块24可执行扫描。
在量化之后,熵编码模块24可熵编码量化系数。例如,熵编码模块24可执行上下文自适应性可变长度编码(Context-Adaptive Variable-Length Coding,CAVLC)、上下文自适应性二进制算术编码(Context-based Adaptive Binary Arithmetic Coding,CABAC)、基于语法的上下文自适应性二进制算术解码(SBAC)、概率区间分割熵(PIPE)解码或另一熵编码方法或技术。在通过熵编码模块24进行熵编码之后得到码流,可将码流传输到视频解码器112或存档以供稍后传输或由视频解码器112检索。
反量化模块25及反变换模块26分别应用反量化与反变换,求和器201将反变换后的残差块得和预测的残差块相加以产生重建块,该重建块用作后续原始块进行预测的参考像素。该重建块存储于参考图像存储器27中。
图3是本申请实施例中视频解码器112的结构示意图。如图3所示,视频解码器112包含熵解码模块30、预测模块31、反量化模块32、反变换模块33、求和器301和参考图像存储器34。其中,熵解码模块30包括解析模块和码率控制模块。在一些可行的实施方式中,视频解码器112可执行与关于来自图2的视频编码器102描述的编码流程的示例性地互逆的解码流程。
在解码过程期间,视频解码器112从视频编码器102接收经编码的视频的码流。视频解码器112的熵解码模块30中的解析模块对码流进行熵解码,以产生量化系数和语法元素。熵解码模块30将语法元素转递到预测模块31。视频解码器112可在视频条带层级和/或视频块层级处接收语法元素。
熵解码模块30中的码率控制模块根据解析模块得到的待解码图像的信息,生成量化参数以使得反量化模块32进行相关计算。码率控制模块还可以根据求和器301经重构得到的重建块,以计算量化参数。
反量化模块32对码流中所提供且通过熵解码模块30所解码的量化系数以及所生成的量化参数进行反量化(例如,解量化)。反量化过程可包含使用通过视频编码器102针对视频条带中的每一视频块所计算的量化参数确定量化的程度,且同样地确定应用的反量化的程度。反变换模块33将反变换(例如,DCT、DST等变换方法)应用于反量化后的变换系数,将反量化后的变换系数按照反变换单元在像素域中产生反变换后的残差块。其中,反变换单元的尺寸与TU的尺寸相同,反变换方法与变换方法采用同样的变换方法中相应的正变换与反变换,例如,DCT、DST的反变换为反DCT、反DST或概念上类似的反变换过程。
预测模块31生成预测块后,视频解码器112通过将来自反变换模块33的反变换后的残差块与通过与预测块求和来形成经解码视频块。求和器301表示执行此求和运算的一个或多个组件。在需要时,也可应用解块滤波器来对经解码块进行滤波以便去除块效应伪影。给定帧或图像中的经解码的图像块存储于参考图像存储器34中,作为后续进行预测的参考像素。
本申请提供一种可能的视频编/解码实现方式,如图4所示,图4为本申请提供的一种视频编/解码的流程示意图,该视频编/解码实现方式包括过程①至过程⑤,过程①至过程⑤可以由上述的源装置10、视频编码器102、目的装置11或视频解码器112中的任意一个或多个执行。
过程①:将一帧图像分成一个或多个互相不重叠的并行编码单元。该一个或多个并行编码单元间无依赖关系,可完全并行/独立编码和解码,如图4所示出的并行编码单元1和并行编码单元2。
过程②:对于每个并行编码单元,可再将其分成一个或多个互相不重叠的独立编码单元,各个独立编码单元间可相互不依赖,但可以共用一些并行编码单元头信息。
独立编码单元既可以是包括亮度Y、第一色度Cb、第二色度Cr三个分量,或RGB三个分量,也可以仅包含其中的某一个分量。若独立编码单元包含三个分量,则这三个分量的尺寸可以完全一样,也可以不一样,具体与图像的输入格式相关。该独立编码单元也可以理解为每个并行编码单元所包含N个通道形成的一个或多个处理单元。例如上述Y、Cb、Cr三个分量即为构成该并行编码单元的三个通道,其分别可以为一个独立编码单元,或者Cb和Cr可以统称为色度通道,则该并行编码单元包括亮度通道构成的独立编码单元,以及色度通道构成的独立编码单元。
过程③:对于每个独立编码单元,可再将其分成一个或多个互相不重叠的编码单元,独立编码单元内的各个编码单元可相互依赖,如多个编码单元可以进行相互参考预编解码。
若编码单元与独立编码单元尺寸相同(即独立编码单元仅分成一个编码单元),则其尺寸可为过程②所述的所有尺寸。
编码单元既可以是包括亮度Y、第一色度Cb、第二色度Cr三个分量(或RGB三分量),也可以仅包含其中的某一个分量。若包含三个分量,几个分量的尺寸可以完全一样,也可以不一样,具体与图像输入格式相关。
值得注意的是,过程③是视频编解码方法中一个可选的步骤,视频编/解码器可以对过程②获得的独立编码单元进行残差系数(或残差值)进行编/解码。
过程④:对于编码单元,可以将其可再将其分成一个或多个互相不重叠的预测组(Prediction Group,PG),PG也可简称为Group,各个PG按照选定预测模式进行编解码,得到PG的预测值,组成整个编码单元的预测值,基于预测值和编码单元的原始值,获得编码单元的残差值。
过程⑤:基于编码单元的残差值,对编码单元进行分组,获得一个或多个相不重叠的残差小块(residual block,RB),各个RB的残差系数按照选定模式进行编解码,形成残差系数流。具体的,可分为对残差系数进行变换和不进行变换两类。
其中,过程⑤中残差系数编解码方法的选定模式可以包括,但不限于下述任一种:半定长编码方式、指数哥伦布(Golomb)编码方法、Golomb-Rice编码方法、截断一元码编码方法、游程编码方法、直接编码原始残差值等。
例如,视频编码器可直接对RB内的系数进行编码。
又如,视频编码器也可对残差块进行变换,如DCT、DST、Hadamard变换等,再对变换后的系数进行编码。
作为一种可能的示例,当RB较小时,视频编码器可直接对RB内的各个系数进行统一量化,再进行二值化编码。若RB较大,可进一步划分为多个系数组(coefficient group,CG),再对各个CG进行统一量化,再进行二值化编码。在本申请的一些实施例中,系数组(CG)和量化组(QG)可以相同。
下面以半定长编码方式对残差系数编码的部分进行示例性说明。首先,将一个RB块内残差绝对值的最大值定义为修整最大值(modified maximum,mm)。其次,确定该RB块内残差系数的编码比特数(同一个RB块内残差系数的编码比特数一致)。例如,若当前RB块的关键限值(critical limit,CL)为2,当前残差系数为1,则编码残差系数1需要2个比特,表示为01。若当前RB块的CL为7,则表示编码8-bit的残差系数和1-bit的符号位。CL的确定是去找满足当前子块所有残差都在[-2^(M-1),2^(M-1)]范围之内的最小M值。若同时存在-2^(M-1)和2^(M-1)两个边界值,则M应增加1,即需要M+1个比特编码当前RB块的所有残差;若仅存在-2^(M-1)和2^(M-1)两个边界值中的一个,则需要编码一个Trailing位来确定该边界值是-2^(M-1)还是2^(M-1);若所有残差均不存在-2^(M-1)和2^(M-1)中的任何一个,则无需编码该Trailing位。
另外,对于某些特殊的情况,视频编码器也可以直接编码图像的原始值,而不是残差值。
上述视频编码器102以及视频解码器112也可以通过另外一种实现形态来实现,例如,采用通用的数字处理器系统实现,如图5所示的编解码装置50,该编解码装置50可以为上述视频编码器102中的部分装置,也可以为上述视频解码器112中的部分装置。
该编解码装置50可以是应用于编码侧,也可以是应用于解码侧。编解码装置50包括处理器501以及存储器502。所述 处理器501与存储器502相连接(如通过总线504相互连接)。可选的,编解码装置50还可包括通信接口503,通信接口503连接处理器501和存储器502,用于接收/发送数据。
存储器502可以为随机存储记忆体(Random Access Memory,RAM)、只读存储器(Read-Only Memory,ROM)、可擦除可编程只读存储器(Erasable Programmable Read Only Memory,EPROM)或便携式只读存储器(Compact Disc Read-Only Memory,CD-ROM)。该存储器502用于存储相关程序代码及视频数据。
处理器501可以是一个或多个中央处理器(Central Processing Unit,CPU),例如图5中所示的CPU 0和CPU 1。在处理器501是一个CPU的情况下,该CPU可以是单核CPU,也可以是多核CPU。
该处理器501用于读取所存储器502中存储的程序代码,执行图6所对应的任意一个实施方案及其各种可行的实施方式的操作。
以下,结合上述图1示出的视频编解码系统、图2示出的视频编码器102以及图3示出的视频解码器112对本申请提供的译码方法进行详细描述。
如图6所示,为本申请提供的一种视频图像解码方法、编码方法的流程图。该方法包括:
S601、获取待处理图像中当前块的至少两个通道级复杂度等级,根据至少两个通道级复杂度等级确定当前块的块级复杂度等级;该通道级复杂度等级用于表征当前块的通道级纹理的复杂程度。
本申请所提供的视频图像解码方法、编码方法应用于对视频数据的编解码场景,视频数据是由一帧帧图像组成的,一帧是一幅静态的图像,将时间上连续的帧序列合成到一起便形成动态视频。上述待处理图像即为视频数据中待译码的图像。在视频译码时,将该待处理图像划分为多个图像块,并将图像块作为基本处理单位,采用逐行逐个的方式进行处理。其中,将正在处理的图像块称为当前块。
在本示例实施方式中,上述待处理图像可以为多通道图像,上述获取待处理图像中当前块的至少两个通道级复杂度等级,根据至少两个通道级复杂度等级确定当前块的块级复杂度等级,也即获取当前多通道图像块的至少两个通道的复杂度等级,并据此确定当前块的块级复杂度等级。例如,该待处理图像可以为YUV格式的图像,则可以获取Y通道和U通道的复杂度等级,并据此确定当前块的块级复杂度等级。可以理解的是,获取YV或UV或YUV的复杂度等级也可以确定当前块的块级复杂度等级。
本申请的多通道不限于前述的YUV三通道,也可以有更多通道,比如当图像传感器为四通道传感器时,对应的待处理图像包括四通道的图像信息,比如当图像传感器为五通道传感器时,对应的待处理图像包括五通道的图像信息。
本申请中的多个通道可以包括如下通道中的至少一种或几种:Y通道、U通道、V通道、Co通道、Cg通道、R通道、G通道、B通道、alpha通道、IR通道、D通道、W通道。比如说,多个通道包括Y通道、U通道、V通道,或者,多个通道包括R通道、G通道、B通道,或者,多个通道包括、R通道、G通道、B通道、alpha通道,或者,多个通道可以包括R通道、G通道、B通道、IR通道,或者,多个通道包括R通道、G通道、B通道、W通道,或者,多个通道包括R通道、G通道、B通道、IR通道、W通道,或者,多个通道包括R通道、G通道、B通道、D通道,或者,多个通道可以包括R通道、G通道、B通道、D通道、W通道。其中,除了RGB彩色感光通道,也可能有IR通道(红外或近红外感光通道),D通道(暗光通道,主要通过红外光或近红外光),W通道(全色感光通道),针对不同的传感器有不同的通道,比如说,传感器类型可以是RGB传感器,RGBIR传感器,RGBW传感器,RGBIRW传感器,RGBD传感器,RGBDW传感器等。
纹理是一种反映图像中同质现象的视觉特征,用于表示物体表面的具有缓慢变化或者周期性变化的表面结构组织排列属性,上述通道级复杂度等级即用于表征当前块的通道级别的纹理的复杂程度。当前块的通道级纹理信息越复杂,通道级复杂度等级越高。类似地,上述通道级纹理信息越简单,则通道级复杂度等级越低。
上述获取待处理图像中当前块的至少两个通道级复杂度等级,根据至少两个通道级复杂度等级确定当前块的块级复杂度等级,在视频译码的编码端和解码端有不同的实现方式,在一实施例中:
在编码端,可实现如下:获取当前块的通道级纹理信息,基于通道级纹理信息确定当前块的块级复杂度等级。具体地,该过程可实现为:以当前块中至少一个通道图像块为处理单元,并将各处理单元划分为至少两个子单元,确定各子单元的纹理信息;在每个处理单元中,基于各子单元的纹理信息确定当前块的块级复杂度等级。
其中,上述以当前块中的至少一个通道图像块为处理单元,并将各处理单元划分为至少两个子单元。以待处理图像为YUV图像为例,在一种可能的场景中,该过程可实现为:将当前块的Y通道作为一个处理单元,并将该处理单元进一步划分为四个子单元。在另一种可能的场景中,该过程也可实现为:将Y通道和U通道这两个通道作为一个处理单元,并将该处理单元进一步划分为两个子单元。可以理解的是,上述场景只是示例性说明,本示例实施方式的保护范畴并不以此为限,例如,也可将U通道、V通道、YU通道、YV通道、UV通道、YUV通道作为一个处理单元,上述子单元的数目也可以为大于等于二的任意整数。
在一种可能的实现方式中,上述确定各子单元的纹理信息可实现如下:获取子单元的原始像素值、子单元的左侧相邻列的原始像素值或重建值,以及子单元的上方相邻行的重建值,并对应计算子单元的水平纹理信息及垂直纹理信息;在水平纹理信息及垂直纹理信息中选择最小值作为对应子单元的纹理信息。
具体地,上述纹理信息可以为像素点信息,以待处理图像为YUV图像,将Y、U、V通道分别作为一个处理单元为例,在将处理单元划分为至少两个子单元后,上述确定子单元纹理信息可以为基于子单元的原始像素值、子单元的左侧相邻列的原始像素值或重建值,以及子单元的上方相邻行的重建值计算子单元的水平复杂度及垂直复杂度,在水平复杂度和垂直复杂度中选择最小值作为对应子单元的纹理信息。上述水平复杂度及垂直复杂度可以基于子单元在水平方向和垂直方向上像素点的差异程度计算得到。可以理解的是,上述场景只是一种示例性说明,上述纹理信息也可以由其他方式获得,例如,可以通过像素点之外的图像信息确定,也可以选上述水平复杂度和垂直复杂度的加权值作为对应子单元的纹理信息,还可以是其他可达到同样效果的方式,本示例实施方式并不对此做特殊限定。
在一种可能的实现方式中,上述在每个处理单元中,基于各子单元的纹理信息确定当前块的块级复杂度等级可通过以下方式实现:在上述处理单元中,基于多个阈值将各子单元的纹理信息划分至对应的子单元复杂度等级,上述多个阈值是预先设定的;基于各子单元复杂度等级确定当前块的块级复杂度等级。
具体地,上述过程可以为:设置阈值1和阈值2两个阈值,基于所设置的阈值将子单元复杂度等级划分为0至2三个等 级。若确定得到的子单元的纹理信息的复杂度小于等于阈值1,则将该子单元的纹理信息划分等级0;若确定得到的子单元的纹理信息的复杂度大于阈值1小于阈值2,则将该子单元的纹理信息划分等级1;若确定得到的子单元的纹理信息的复杂度大于等于阈值2,则将该子单元的纹理信息划分等级2。可以理解的是,上述场景只是一种示例性场景,本申请的保护范畴并不以此为限。
在一种可能的实现方式中,上述基于各子单元复杂度等级确定当前块的块级复杂度等级可实现如下:依据预设规则将各子单元复杂度等级映射为对应的通道级复杂度等级;基于各通道级复杂度等级确定当前块的块级复杂度等级。
上述依据预设规则将各子单元复杂度等级映射为对应的通道级复杂度等级可通过以下方式实现:
实现方式1:基于多个阈值以及各子单元复杂度等级之和确定通道级复杂度等级,上述多个阈值是预先设定的。
在一实施例中,上述过程可实现为:基于上述多个阈值确定多个通道级复杂度等级,将上述各子单元复杂度等级进行求和运算,并将求得的和划分至对应的通道级复杂度等级。具体地,上述阈值可以为2,4,7三个阈值,这三个阈值可以将通道级复杂度等级划分为等级0至等级4五个等级,上述计算得到的子单元复杂度等级为0至2三个级别,通过对各子单元复杂度等级求和,若子单元复杂度等级和小于2,则对应的通道级复杂度等级为0;若子单元复杂度等级和大于等于2小于4,则对应的通道等级为1;若子单元复杂度等级和等于4,则对应的通道级复杂度等级为2;若子单元复杂度等级和大于4小于7,则对应的通道级复杂度等级为3;若子单元复杂度等级和大于等于7,则对应的通道级复杂度等级为4。可以理解的是,上述场景只是一种示例性场景,本申请的保护范畴并不以此为限。
实现方式2:确定子单元复杂度等级的级别构成,并依据该级别构成确定对应的通道级复杂度等级。
在一实施例中,在一种具体场景中,上述过程可以实现如下:例如,上述子单元复杂度等级为多个级别,依据各子单元所属的等级级别以及排列方式确定对应的通道级复杂度等级。例如,当上述处理单元被划分为4个子单元,且4个子单元复杂度级别分别为1,2,2,2时,若预设规则包括决策方式:各子单元复杂度等级有3个2,则通道级复杂度等级为2,那么对应的通道级复杂度等级为2。可以理解的是,上述场景只是一种示例性说明,其他子单元划分方法以及决策方式也属于本申请的保护范畴。
在一种可能的实现方式中,上述基于各通道级复杂度等级确定当前块的块级复杂度等级有多种方式,示例性地:
实现方式1:取各通道级复杂度等级的最大值、最小值或加权值作为当前块的块级复杂度等级。
实现方式2:基于多个阈值以及各通道级复杂度等级之和确定当前块的块级复杂度等级,上述多个阈值是预先设定的。
此外,在本申请中,上述多通道图像块,也即当前块的各通道分量可共同或独立确定通道级复杂度等级。例如,当待处理图像为YUV图像时,U通道和V通道可以共用一个通道级复杂度等级,也可分别确定各自的通道级复杂度等级。
在解码端,可实现为:从码流中获取当前块的通道级复杂度等级其中,上述码流为当前块的编码码流。具体地,解码端可接收编码端传来的当前块的已编码码流,该编码码流中有用于表示通道级复杂度等级的复杂度信息位,基于该信息位可以得到编码端基于通道级的纹理信息确定的通道级复杂度等级,并基于通道级复杂度等级确定块级复杂度等级。其中,通过至少两个通道级复杂度等级确定块级复杂度等级的实现与编码端相同,此处不再赘述。
上述通过复杂度信息位确定通道级复杂度等级的实现可如下:从上述已编码码流中获取上述当前块的复杂度信息位;依据复杂度信息位确定通道级复杂度等级。其中,上述复杂度信息位可以为1比特位或3比特位,且该复杂度信息位的第一位用于表示当前通道级复杂度等级与当前块的前一个图像块的相同通道复杂度等级是否相同以及两者之间的变化值。以YUV图像为例,若当前通道级复杂度等级为当前块的U通道的复杂度等级,则前一个图像块的相同通道复杂度表示在当前块之前进行译码的图像块的U通道的复杂度等级。若根据第一位判断相同,则复杂度信息位为1位;若不同,则复杂度信息位为3位,且后两位表示当前块的通道级复杂度与当前块的前一个图像块的相同通道的复杂度等级的变化值,基于该变化值与前一个图像块的相同通道的通道复杂度等级可以确定当前所求的通道级复杂度等级。可以理解的是,上述场景只是一种示例性说明,本申请的保护范畴并不以此为限。例如,上述复杂度信息位也可以表示当前块的U通道与当前块的Y通道复杂度是否相同以及在不相同时的变化值,本申请对此不做特殊限定。
S602、根据码控参数确定当前块的目标比特数,该码控参数包括当前块的块级复杂度等级。
在一种可能实现的方式中,码控参数包括上述步骤S601计算得到的当前块的块级复杂度等级,用于确定当前块的目标比特数,目标比特数为预测当前块编码所需的比特数。上述码控参数还可包括以下参数中的至少一种:图像位宽bpc、目标每像素比特数bpp、图像格式、同等级平均无损编码比特数、平均无损编码比特数、码流缓冲区满度、首行质量提升参数、首列质量提升参数,通过上述码控参数中的一种或多种都可确定当前块的目标比特数。
其中,上述同等级平均无损编码比特数为当前块与多个已译码图像块无损编码时所需比特数预测值的平均值,且多个已译码图像块与当前块的复杂度等级相同;上述平均无损编码比特数为当前块与所有已译码图像块无损编码时所需的比特数预测值的平均值;上述码流缓冲区满度用于表征缓冲区的满度,上述缓冲区用于存储待处理图像的码流;上述首行质量提升参数用于在当前块为待处理图像中的首行块时,调低首行块的量化参数,以减轻因首行块预测难度较大且预测误差具有传递性而带来的影响。
在一种可能的实现方式中,上述码控参数可包括同等级平均无损编码比特数、平均无损编码比特数以及码流缓冲区满度,根据码控参数确定当前块的目标比特数可实现为:确定上述同等级平均无损编码比特数及平均无损编码比特数;基于同等级平均无损编码比特数及平均无损编码比特数确定初始目标比特数;基于上述码流缓冲区满度,当前块的块级复杂度等级以及初始目标比特数确定当前块的目标比特数。其中,上述码流缓冲区满度的计算会受到初始传输延迟机制的影响,该初始传输延迟机制指缓冲区在当前块的编码码流存储前存在的一些无效位对缓存区满度的影响。
在一实施例中,上述确定同等级平均无损编码比特数及平均编码比特数可实现为:确定当前块的无损编码比特数,该无损编码比特数为当前块无损编码时所需比特数的预测值;依据当前块的无损编码比特数以及多个历史同等级平均无损编码比特数更新当前块的同等级平均无损编码比特数;依据当前块的无损编码比特数以及全部历史平均无损编码比特数更新当前块的平均无损编码比特数。其中,上述历史同等级平均无损编码比特数为与当前块块复杂度等级相同的已译码图像块的同等级平均无损比特数,上述历史平均无损编码比特数为已译码图像块的平均无损比特数。
在一种可能的实现方式中,当前块为待处理图像中的首行块时,上述码控参数还包括首行质量提升参数,上述根据码控参数确定当前块的目标比特数可实现为:基于同等级平均无损编码比特数及平均无损编码比特数确定初始目标比特数;基于 码流缓冲区满度,当前块的块级复杂度等级、首行质量提升参数以及初始目标比特数确定当前块的目标比特数。其中,上述首行质量提升参数主要通过调小当前块的量化参数来提升当前块的图像质量。
在一种可能的实现方式中,当前块为待处理图像中的首列块时,上述码控参数还包括首列质量提升参数,上述根据码控参数确定当前块的目标比特数可实现为:基于同等级平均无损编码比特数及平均无损编码比特数确定初始目标比特数;基于码流缓冲区满度,当前块的块级复杂度等级、首列质量提升参数以及初始目标比特数确定当前块的目标比特数。其中,上述首列质量提升参数主要通过调小当前块的量化参数来提升当前块的图像质量。
此外,在上述过程中,上述多通道图像块,也即当前块的通道分量可共同或独立确定上述同等级无损编码比特数与目标比特数。
S603、基于目标比特数确定当前块的量化参数。
在一种可能的实现方式中,上述基于目标比特数确定当前块的量化参数可以实现为:基于上述同等级平均无损编码比特数、目标比特数、上述待处理图像的图像格式对应的采样率计算得到当前块的参考量化参数,进一步的还可基于该参考量化参数计算当前块的各通道对应的各分量量化参数。
S604、基于量化参数对当前块进行译码。
在该步骤中,视频译码器基于当前块的量化参数对当前块进行译码。可选的,在编码时,视频编码器将当前块的通道级复杂度等级编入码流,即上述复杂度信息位。或者将当前块的量化参数编入码流。相应地,解码端获取码流中的复杂度信息位计算量化参数进行解码,或者解码端获取码流中的量化参数进行解码。当然,视频编码器也可以将上述两种信息均编入码流中。
接下来,以上述待处理图像为YUV图像为应用场景,结合如图7所示的流程,通过一系列具体实施例对上述视频图像解码方法、编码方法进行详细地阐述:
步骤S701、确定当前块的块级复杂度等级。
该步骤用于确定当前块的复杂度等级,且在视频编码端与视频解码端的实施过程存在区别。
在视频编码端,该过程主要由如图8所示的流程实现:
S801、确定当前块的纹理信息的复杂度。
该步骤可实现为:通过将当前块中至少一个通道图像块作为处理单元,并将各处理单元划分为至少两个子单元,并确定各子单元的纹理信息的复杂度。
具体地,以YUV444格式为例,每个16x2的通道都可以划分为4个4x2的子块,如图9所示。
上述当前块的纹理信息为当前块的像素信息。对于当前块复杂度的计算需要用到如下三个部分的像素点,如图9所示:(1)当前块的原始像素值;(2)当前块左边一列,也即子块1左侧相邻列的原始像素值,需注意的是,当获取不到原始像素值时,也可使用重建值;(3)与当前块相邻的上一行的重建值,也即图9中的灰色方格区域。
接下来,以图9中的子块1为例,解释子块复杂度的计算过程,也即上述确定各子单元的纹理信息的过程,该通常可以通过计算各子块的水平复杂度和垂直复杂度得到,可以实现如下:水平复杂度计算方式为:当前列的像素值和与其左侧相邻列的像素值绝对值之和;垂直复杂度计算方式为:当前行的像素值以及与其上侧相邻行的像素值的绝对值之和。
在一实施例中,当前块为当前视频切片的左边界时,上述水平复杂度计算使用左边界的填充值,该填充值为当前列的像素值;相应地,当前块为当前视频切片的上边界时,上述垂直复杂度计算使用上边界的填充值,该填充值为当前行的像素值。
具体地,上述过程可以实现为:
首先计算子块1的水平复杂度sub_comp_hor。具体地,可通过构成子块1的像素值、子块1相邻左侧一列的像素值或重建值以及相邻上方一行构成的集合ori_pix[i][j]来计算。其中,i,j代表像素值所处的行列,子块1的第一行第一列的像素值表示为ori_pix[0][0],其他像素值的表示以此类推。子块1的水平复杂度sub_comp_hor指子块1在水平方向上像素点间的差异程度,具体计算如下:
sub_comp_hor 1+=ori_pix[0][-1]-ori_pix[0][0]
取上述表达式的绝对值,作为子块1第一行第一列的像素值与其左侧相邻的像素值之间的水平复杂度。
sub_comp_hor 2+=ori_pix[0][i]-ori_pix[0][i+1]
取上述表达式的绝对值,作为子块1第一行各像素值之间的水平复杂度。
sub_comp_hor 3+=ori_pix[1][-1]-ori_pix[1][0]
取上述表达式的绝对值,作为子块1第二行第一列的像素值与其左侧相邻的像素值之间的水平复杂度。
sub_comp_hor4+=ori_pix[1][i]-ori_pix[1][i+1]
取上述表达式的绝对值,作为子块1第二行各像素值之间的水平复杂度。
子块1的垂直复杂度sub_comp_ver指子块1在垂直方向上像素点间的差异程度,类似地,垂直复杂度sub_comp_ver可具体计算如下:
sub_comp_ver 1+=rec_pix[-1][i]-ori_pix[0][i]
取上述表达式的绝对值,作为子块1第一行与上方相邻行像素值之间的垂直复杂度。
sub_comp_hor 2+=ori_pix[0][i]-ori_pix[1][i]
取上述表达式的绝对值,作为子块1第二行与第一行的像素值之间的垂直复杂度。
在得到子块1的多个水平复杂度及多个垂直复杂度后,将其中的最小值作为子块1的纹理信息的复杂度comp,也即子块1的复杂度为:
sub_comp=min(sub_comp_hor,sub_comp_ver)
上述子块2,3,4的纹理信息的复杂度的计算方式与子块1一致,且通道U与通道V纹理划分为子块并计算子块纹理信息复杂度的方式与通道Y相同,故在此均不再赘述。
此外,若多个通道需要合并一同计算复杂度,例如,当U通道及V通道需要合并计算复杂度时,可通过如下公式实现:
sub_comp=sub_comp1*a+sub_comp2*b,其中0<=a,b<=1,a+b=1
步骤S802、基于各通道子块纹理信息的复杂度确定当前块的块级复杂度等级。
在一实施例中,该步骤可分三步实现为:
S8021:通过各通道子块纹理信息的复杂度确定各通道子块的复杂度等级。
该过程可通过设置多个阈值实现,在一实施例中,具体实现可以如下:
实现方式1:设定thres1和thres2两个阈值:
thres1=2*(1<<(bpc 8));thres2=6*(1<<(bpc 8)),其中,bpc>=8,bpc为图像位宽。
当bpc小于8的时候,上述两个阈值默认为2和6。
通过上述两个阈值将各子块的纹理信息复杂度sub_comp划分为级别0、级别1和级别2三个复杂度等级,具体划分为:
若sub_comp<=thres1,则sub_comp_level=0;若thres1<sub_comp<thres2,则sub_comp_level=1;若sub_comp>=thres2,则sub_comp_level=2。
实现方式2:设定thres1、thres2、thres3和thres4四个阈值:thres1=2*(1<<(bpc 8)),thres2=4*(1<<(bpc 8)),thres3=6*(1<<(bpc 8)),thres4=8*(1<<(bpc 8))。且其中bpc>=8。
通过上述四个阈值,将各子块的纹理信息复杂度sub_comp_level划分为0,1,2,3,4等级,具体划分为:
若sub_comp<=thres1,则sub_comp_level=0;若thres1<sub_comp<thres2,则sub_comp_level=1;若thres2<sub_comp<thres3,则sub_comp_level=2;若thres3<sub_comp<thres4,则sub_comp_level=3;若sub_comp>=thres4,则sub_comp_level=4。
S8022:将各通道子块的复杂度等级映射为通道级复杂度等级。
上述将各通道子块的复杂度等级映射为通道级复杂度等级可通过预设多个阈值并基于阈值映射或者基于预设映射策略实现。在一实施例中,有以下3种实现方式:
实现方式1:设置多个阈值,在对应通道内计算各子块的阈值之和sub_comp_level,并根据上述多个阈值将各子块的纹理信息复杂度映射为对应通道的通道级复杂度等级。以上述图9所示的通道子块为例,该过程具体可以如下:
设置三个阈值2,4,7,计算子块1至子块4的复杂度等级之和sum_sub_comp_level,依据上述三个阈值将4个3级别各子块的纹理信息复杂度sub_comp_level(0,1,2)映射为1个5级别通道级复杂度等级comp_level(0,1,2,3,4)。
上述根据阈值将各子块的纹理信息复杂度映射为得到通道级复杂度等级comp_level(0,1,2,3,4)的过程为:若sum_sub_comp_level<2,则comp_level=0;若2<=sum_sub_comp_level<4,则comp_level=1;若sum_sub_comp_level==4,则comp_level=2;若4<sum_sub_comp_level<7,则comp_level=3;若7<=sum_sub_comp_level,则comp_level=4。
实现方式2:预设4个阈值5、7、10、12,对所有sub_comp_level求和,然后根据上述4个阈值得到comp_level,其中comp_level可能的值为(0,1,2,3,4)。在该实现方式中,不同于实现方式1,可以将从4个5级别sub_comp_level映射为1个5级别comp_level。
实现方式3:根据预设的逻辑规则得到comp_level。在一实施例中,以当前块的亮度通道为例,该逻辑规则的决策方式可以如下:
对于上述确定的4个子块的sub_comp_level组成的复杂度等级的级别构成:
当复杂度等级的级别构成为包含2个0,或1个0和3个1时:
若有2个连续0且2的个数小于2,comp_level=0;否则comp_level=1。
当复杂度等级的级别构成为包含3个2,或有2个连续2时:
若有3个2,comp_level=4;否则comp_level=3。
在其他情况下,comp_level=2。
以当前块的16x2色度通道为例,上述逻辑规则的决策方式可以为:
当复杂度等级的级别构成为包含2个0且2的个数小于2时:
若有3个0,或有2个连续0且0个2,comp_level=0;否则comp_level=1。
当复杂度等级的级别构成为包含2个2,或有1个2和3个1时:
若有3个2,或有2个连续2且0个0,comp_level=4;否则comp_level=3。
在其他情况下,comp_level=2。
此外,在另一种可能的实现方式中,以当前块的8x2或8x1色度通道为例,上述逻辑规则的决策方式也可以为:comp_level=sub_comp_level1+sub_comp_level2,其中,sub_comp_level1、sub_comp_level2分别为色度通道的两个子块的复杂度等级。
S8023:基于各通道级复杂度等级确定当前块的块级复杂度等级。
以上述待处理图像为YUV图像为例,经过上述步骤S8021和步骤S8022,可以确定Y、U、V三个通道的通道级复杂度等级,则在一实施例中,上述基于各通道级复杂度等级确定当前块的块级复杂度等级的实现可以如下:
实现方式1:基于上述各通道级复杂度等级之和确定当前块的块级复杂度等级blk_comp_level:
chroma_comp_level=(u_comp_level+v_comp_level)/2
blk_comp_level=(luma_comp_level+chroma_comp_level*sample_rate)/(1+sample_rate)其中,sample_rate为待处理图像的采样率,由待处理图像的图像格式确定。sample_rate的一种设置方式可以参见下表1:
表1:
在上表1中,sample_rate为待处理图像的采样率,format_bias为计算量化参数时设置的偏置量。
在上述步骤S8021至步骤8023中,通道级复杂度等级可以被多个通道公用也可独立。例如,若是YUV或者YCoCg格式图像,亮度使用一个复杂度,色度公用一个复杂度,或三个通道单独确定通道复杂度等级。
其中,当第一色度和第二色度共用一个复杂度等级时,则该复杂度等级计算方式为:
实现方式1:取两个色度通道级复杂度等级的最小值、最大值或加权值。
实现方式2:取两个色度通道纹理信息复杂度的最小值、最大值或加权值作为色度的纹理复杂度,再根据上述步骤步骤S8021至步骤8023的方法获取色度的通道级复杂度等级。
在视频解码端,从经过编码端编码的码流中获取上述各通道级复杂度等级,可实现为:从上述已编码码流中获取上述当前块的复杂度信息位;依据复杂度信息位确定通道级复杂度等级。其中,上述复杂度信息位可以为1比特位或3比特位,且该复杂度信息位的第一位用于表示当前通道级复杂度等级与当前块的前一个图像块的相同通道复杂度等级是否相同以及两者之间的变化值。
具体地,以待处理图像为YUV图像为例,解码端获取通道级复杂度等级可实现为:若当前通道级复杂度等级为当前块的U通道的复杂度等级,则前一个图像块的相同通道复杂度表示在当前块之前进行译码的图像块的U通道的复杂度等级。若根据第一位判断相同,则复杂度信息位为1位;若不同,则复杂度信息位为3位,且后两位表示当前块的通道级复杂度与当前块的前一个图像块的相同通道的复杂度等级的变化值,基于该变化值与前一个图像块的相同通道的通道复杂度等级可以确定当前所求的通道级复杂度等级。可以理解的是,上述场景只是一种示例性说明,本申请的保护范畴并不以此为限。例如,上述复杂度信息位也可以表示当前块的U通道与当前块的Y通道复杂度是否相同以及在不相同时的变化值。
步骤S702、确定当前块的同等级平均无损编码比特数与平均无损编码比特数。
当上述YUV图像的第一色度和第二色度共用一个通道级复杂度等级时,上述确定当前块的同等级平均无损编码比特数与平均无损编码比特数的实现可以如下:
S7021、确定无损编码比特数pred_lossless_bits。
pred_lossless_bits=(cu_bits/(width x height)+luma_qp/a+sample_rate*chroma_qp/b)/(1+sample_rate)
其中,cu_bits表示当前块的实际编码比特数,可基于已译码图像的编码比特数确定;width和height分别表示编码块的宽高,luma_qp表示已译码图像的亮度通道的量化参数,chroam_qp表示已译码图像的色度通道的量化参数;a和b为权重值,其设置与预测模式相关,默认值均为8:对于IBC模式,a,b>=8;对于点预测模式,a,b>=8;对于调色板模式、原始值模式以及残差跳过模式,因量化参数失效,故a,b==0。
此外,当缓冲区buffer过满且为残差跳过模式时:
pred_lossless_bits=bpc+c
其中,参数c与图像格式有关,且只有在RGB模式时为0.67,其它格式均为0。
S7022、确定同等级平均无损编码比特数lossless_bits[blk_comp_level]。
同等级平均无损编码比特数lossless_bits[blk_comp_level]与当前块的块级复杂度等级相对应,在当前块的块级复杂度等级与已译码图像块的块级复杂度等级相同时,通过以下公式更新:
lossless_bits[blk_comp_level]=lossless_bits[blk_comp_level]*(1–d)+pred_lossless_bits*d
其中,d为更新率,且0<=d<=1。
在一实施例中,上述更新率d的一种具体设置方式可以为:对于任意复杂度的前4个图像块,将更新率d分别设置为3/4,5/8,1/2,3/8,其余情况均为1/4。
S7023、确定平均无损编码比特数avg_lossless_bits。
不同于同等级平均无损编码比特数,平均无损编码比特数avg_lossless_bits在每个块都会更新,具体更新方式可以为:
avg_lossless_bits=avg_lossless_bits*(1-e)+pred_lossless_bits*e
其中e是更新率,0<=e<=1。在一实施例中,e的一种设置可以为e=0.01。
步骤S703、确定当前块的目标比特数。
在一实施例中,上述确定当前块的目标比特数可以通过以下步骤实现:
S7031、确定初始目标比特数。
该初始目标比特数为不考虑缓冲区满度时计算得到的目标比特数,可以通过以下方式计算得到:
(1)计算质量比率quality_ratio:
quality_ratio=bpp/(ave_lossless_bits–comp_offset)*(1+sample_rate)
其中,comp_offset是预设值,一种设置方式见参见下表2:
表2:
上述bpp的计算方式为:
bpp=target_bpp/16+(end_target_fullness–(cur_total_bits–((target_bpp<<1)×(cur_blocks–1))))/max(16,
slice_width_in_cu×slice_height_in_cu–cur_blocks)/32
其中,end_target_fullness为预设值,在一实施例中,end_target_fullness的一种具体设置值可以为(delay_bits–1533)*3/4。
其中,delay_bits为预设值,与初始传输延迟机制有关,delay_bits是延迟bits数。
上述初始传输延迟机制的特征包括:a)视频切片slice在开始传输时,延迟delay_blks个图像块后再进行传输,且这些图像块不进行下溢处理。b)视频切片结尾缓冲区的buffer状态恒为delay_bits延迟比特数(若不足,则填零)。如图10所示,图10为初始传输延迟机制的示意图,视频切片中的一个或多个图像块在初始位置与第二位置之间,对应缓冲区的最大值基于所处位置在初始位置与第二位置而增加,且在切片的阈值位置与最终位置之间的位置的图像块,对应缓冲区的最大值基于所处位置在阈值位置与最终位置之间减少,在第二位置和阈值位置之间,图像块对应的缓冲区大小不变。
上述delay_bits可以通过以下计算确定:delay_bits=delay_blks*bpp*blk_size;其中,blk_size表示块大小。delay_blks是预设值。
此外,若待处理图像为YUV444或RGB图像,上述quality_ratio需要限制取值范围到0-0.6之间。
在一实施例中,在确定得到质量比率后,还可以通过计算之前所有图像块的平均复杂度等级ave_comp_level来更新质量比率,具体可实现如下:
avg_comp_level=avg_comp_level*(1-k)+blk_comp_level*k
如果avg_comp_level>blk_comp_level,quality_ratio-=0.05;
如果avg_comp_level<blk_comp_level,quality_ratio+=0.05。
(2)确定初始目标比特数。
上述初始目标比特数pre_target_bits可以通过以下公式确定:
pre_target_bits=quality_ratio*(lossless_bits[blk_comp_level]-comp_offset)*(1+sample_rate);其中,comp_offset为预设值,一种设置方式可以参见上表2,sample_rate可以参见上表1。
S7032、根据缓冲区状态和当前块的块级复杂度等级对初始目标比特数进行限制,确定最终的当前块的目标比特数,具体可实现如下:
(1)上述缓冲区状态可由缓冲区满度表示,缓冲区满度fullness可基于以下公式确定:
fullness=(cur_total_bits–((target_bpp<<1)×(cur_blocks–1))/available_buffer_size
其中,cur_total_bits表示当前消耗的比特数,target_bpp表示目标每像素比特数bpp,cur_blocks表示当前处理的图像块的块数,available_buffer_size表示可用缓冲区的大小。
此外,在上述过程中,确定available_buffer_size时,若考虑到初始传输延迟功能的影响,则依据当前块在视频切片中所处位置的不同,该available_buffer_size也不同,如图10所示:
视频切片开始的delay_blks个块,也即初始位置到第二位置,上述available_buffer_size可从delay_bits线性增加到max_buffer_size。增加的步长start_step为:start_step=(max_buffer_size–delay_bits)/delay_blks;其中,max_buffer_size表示最大的可用缓冲区大小,是一个预设固定值。
第二位置到阈值位置available_buffer_size保持不变,且恒等于max_buffer_size。
阈值位置到最终位置available_buffer_size从max_buffer_size线性下降到delay_bits。降低的步长end_step为:end_step=-(max_buffer_size–delay_bits)/(end_blks–thres_blks);其中,end_blks表示最终位置的块数目,thres_blks表示阈值位置的块数目。
其中,上述delay_blks的计算在计算质量比率已详细说明,故在此不再赘述。
(2)在确定缓冲区满度后,进一步确定用于限制目标比特数的上界与下界,具体可实现如下:
计算下界min_bits:
min_bits=max((1.5–10*fullness)*bpp,0.9*bpp/max_lossless_bits*min(lossless_bits[blk_comp_level],max_lossless_bits))
min_rate=max(min_rate,bpp-(1+sample_rate)*k-2*(fullness-0.85)))
其中,k=Clip3(0,2.5,max_lossless_bits lossless_bits[blk_comp_level]);max_lossless_bits是预设值,一种具体设置方式请见表2。
计算上界max_bits:
bpp_offset=min(max_bpp_offset–k,14.29*(0.85-fullness))
bpp_offset=min(bpp_offset,-8.46*fullness+8.76-(1+sample_rate)*k)
max_bits=max(bpp+bpp_offset,min_rate)
其中,max_bpp_offset=12 bpp<4?4:12 bpp
若考虑到初始传输延迟机制,则上述确定上下界的过程也需考虑初始传输延迟机制对缓冲区满度fullness的影响。
(3)基于确定的上下界对初始目标比特数进行限制,得到当前块的目标比特数,具体可实现为:target_bits=Clip3(min_bits,max_bits,target_bits)。
此外,若当前块为待处理图像的首行块,因首行块的参数预测难度较大,且预测误差具有传递性。因此,在当前块为首行块时,可通过引入首行质量提升参数来对当前块的质量进行提升,该过程主要通过调小首行块的量化参数来实现。
具体地,在上述确定目标比特数的过程中,可实现如下:
若当前块为首行块,则将bpp增加2。
对于待处理图像中的全部首行块,bpp参数的调整可实现为:设首行的图像块bpp增加的量为bpp_delta_row,首行从第一个块到最后一个块,bpp_delta_row从2.5逐渐降低为0.5。
当前块为首行块时,在根据缓冲区状态和块级复杂度等级对初始目标比特数进行限定,以确定目标比特数的过程中,可通过以下方式提升当前块的图像质量:在根据buffer状态和复杂度对目标比特数进行限制之后,若当前块是slice首行块且target_bits<7,其中,7为预设经验阈值,则增大target_bits,且增大后的target_bits必须在给定范围内。具体实现可为:target_bits+=Clip3(0,2,7-target_bits)。
当前块为首行块时,还可通过以下公式确定上界来提升当前块质量:max_bits=max(bpp+bpp_offset,min_rate),bpp_offset=max(bpp_offset,-1),其中,1是预设经验参数。
可以理解的是,上述当前块为首行块时,通过首行质量提升参数提升当前块的质量也可在满足一定条件时才执行。例如,当前块的复杂度等级较低时才进行首行质量提升。
此外,当前块为待处理图像的首列块时,也可通过引入首列质量提升参数来对当前块的质量进行提升,该过程主要通过调小首列块的量化参数来实现。
若当前块为首列块,则将bpp增加2。
对于待处理图像中的全部首列块,bpp参数的调整可实现为:设首列的图像块bpp增加的量为bpp_delta_col,首行从第一个块到最后一个块,bpp_delta_col从2.5逐渐降低为0.5。
当前块为首列块时,在根据缓冲区状态和块级复杂度等级对初始目标比特数进行限定,以确定目标比特数的过程中,可通过以下方式提升当前块的图像质量:在根据buffer状态和复杂度对目标比特数进行限制之后,若当前块是slice首列块且target_bits<7,其中,7为预设经验阈值,则增大target_bits,且增大后的target_bits必须在给定范围内。具体实现可为:target_bits+=Clip3(0,2,7-target_bits)。
当前块为首列块时,还可通过以下公式确定上界来提升当前块质量:max_bits=max(bpp+bpp_offset,min_rate),bpp_offset=max(bpp_offset,-1),其中,1是预设经验参数。
可以理解的是,上述当前块为首列块时,通过首列质量提升参数提升当前块的质量也可在满足一定条件时才执行。例如,当前块的复杂度等级较高时才进行首行质量提升。
步骤S704、确定当前块的量化参数。
在该步骤中,上述确定当前块的量化参数实现如下:
(1)计算参考量化参数ref_qp:
ref_qp=(lossless_bits[blk_comp_level]target_bits/(1+sample_rate))*p
其中,p的默认值为8。
(2)计算各分量量化参数,以待处理图像为YUV图像为例,该过程为计算YUV各通道的量化参数,具体可实现为:
计算偏移量:bias=bias_init*format_bias;其中,bias_init和format_bias为预设值,其中bias_init参见下表3,format_bias见上表1。
计算亮度通道量化参数:luma_qp=Clip3(0,luma_max_qp,ref_qp sample_rate*bias)
计算色度通道量化参数:chroma_qp=Clip3(0,chroma_max_qp,ref_qp+bias)
其中bias_init请见表3,format_bias请见表2。
表3:
在上表3中,comp_level[0]表示亮度分量,comp_level[1]表示色度分量。
此外,对于YUV420格式图像,两张YUV420可以拼成1张YUV444的图像进行处理。此时,上述亮度分量复杂度等级可由两者的加权值确定:
comp_level[0]=m*y1_comp_level+(1-m)*y2_comp_level,其中,0<=m<=1。
可以理解的是,上述亮度分量复杂度等级也可以取两者的最大值或最小值,本申请对此不做特殊限定。
步骤S705、基于量化参数对当前块进行视频译码。
在一实施例中,视频译码器基于当前块的量化参数对当前块进行译码,可以理解的是,在编码过时,视频编码器可将当前块的通道级复杂度等级编入码流,或者将当前块的量化参数编入码流。相应地,解码端获取码流中的通道级复杂度等级计算量化参数进行解码,或者解码端获取码流中的量化参数进行解码。当然,视频编码器也可以将上述两种信息均编入码流中。
此外,在确定量化参数的过程中,当前块的各通道分量也可独立确定上述同等级平均无损编码比特数、平均无损编码比特数及目标比特数等参数,则上述过程可实现如下:
确定当前块各通道分量的同等级平均无损编码比特数及平均无损编码比特数,具体地:
(1)确定当前块各通道分量的无损编码比特数pred_lossless_bits[i]:
pred_lossless_bits[i]=(cu_bits[i]/(width[i]x height[i])+qp[i]/a[i]
当缓冲区过满且为残差跳过模式时,pred_lossless_bits[i]=bpc[i]+c[i];
其中,i为当前块的通道数目,表示当前通道的实际编码比特数;width和height分别表示当前通道编码单元的宽和高,qp表示当前通道的量化参数。
(2)确定各通道分量的同等级平均无损编码比特数:lossless_bits[i][comp_level[i]]:
lossless_bits[i][comp_level[i]]=lossless_bits[i][comp_level[i]]*(1–d[i])+pred_lossless_bits[i]*d[i]
其中,lossless_bits[i][comp_level[i]]为与当前通道同复杂度等级的已编码通道的同等级平均无损编码比特数,d[i]为更新率。
(3)确定平均无损编码比特数avg_lossless_bits:
avg_lossless_bits[i]=avg_lossless_bits[i]*(1–e[i])+pred_lossless_bits[i]*e[i]
确定当前块各通道分量的目标比特数,可通过以下方式实现:
(1)确定质量比率quality_ratio:
实现方式1:确定当前块的各通道分量的质量比率quality_ratio[i]:
quality_ratio[i]=bpp[i]/(ave_lossless_bits[i]–comp_offset[i])
实现方式2:quality_ratio的计算仍采用cu(Coding Unit,编码单元)级别,计算过程同上述步骤S7031,但需将上述ave_lossless_bits[i]合并成cu级别变量。
(2)确定目标比特数target_bits:
实现方式1:target_bits[i]=quality_ratio[i]*(lossless_bits[i][comp_level[i]]-comp_offset[i])
其中,为了后续步骤(3),需要将target_bits和lossless_bits从cb级别(通道级别)合成cu级别。
实现方式2,对应步骤(1)里面的实现方式2,此时,目标比特数target_bits的计算方式和上述步骤S703中相同,得到的target_bits已是cu级别变量。为了后续步骤(3),同样需要将cb级别的lossless_bits[i]合并成cu级别。
(3)根据buffer状态和复杂度对目标比特数进行限制,同上述步骤S703,此处不再赘述。
确定当前块的各通道分量的量化参数,可实现如下:
实现方式1:确定各通道分量的量化参数:
qp[i]=(lossless_bits[i][comp_level[i]]–target_bits[i])*p[i]
若步骤(3)生效,即上限和下限起了限制作用,target_bits的值被修改为上限或下限,则按照步骤(1)至(2)求得的target_bits[i]的比例,重新分配target_bits得到新的target_bits[i];若target_bits未被步骤(3)修改,此时target_bits[i]的值不会发生变化。
实现方式2:若之前未对target_bits进行分离,此时根据复杂度等级分离target_bits。
实现方式3:该步骤之前的所有变量都为cu级别,此时根据复杂度对参考量化参数ref_qp进行分离,分离后得到的qp作为最终的亮度和色度qp。
在上述过程中,设需要拆分的cu变量为temp,则从cu级别变量拆分为cb级别的实现可以为:
temp[i]=temp*k[i],其中0<=k[i]<=1且∑k[i]=1。
其中,k的值和复杂度相关,k的一种实现方式为k[i]=comp_level[i]/∑comp_level[i];另一种实现方式为预设表格,表格索引值为复杂度等级。
此外,还需要将cb级别变量合成为cu级别变量,设需要合并的cu变量为temp[i],则合并过程具体为,
temp=(temp[0]+temp[1]*sample_rate)/(1+sample_rate)
在本申请的另一个具体实施例中,还可对上述视频图像解码方法、编码方法的码控参数定点化,具体可通过如下过程实现:
S1:码控初始化
在解码每个视频切片前初始化码控参数:WarmUp,EndControlLine,EndControlBlocks,EndControlBegin,EndTargetFullness以及MaxBufferSize,具体可初始化如下:

上述参数均为码控初始化过程的中间参数,用于实现码控参数的定点化。其中WarmUp[i](0<=i<=4)表示开始若干个块更新率参数,用于更新同等级无损编码比特数AdjComplexity;ComplexityShift表示复杂度相关运算定点化进行的移位位数;InfoRatioShift表示质量比率相关运算定点化进行的移位位数;BppShift表示bpp相关运算定点化进行的移位位数;FullnessShift表示满度相关运算定点化进行的移位位数;AvgComplexityShift表示平均无损编码比特数相关运算定点化进行的移位位数;ChromaSampleRateShift表示采样率相关运算定点化进行的移位位数;K1Shift表示k1(见表4)相关运算定点化进行的移位位数;K2Shift表示k2相关运算定点化进行的移位位数;K3Shift表示k3相关运算定点化进行的移位位数;K4Shift表示k4相关运算定点化进行的移位位数;BiasShift表示Bias相关运算定点化进行的移位位数;K2,K3,K4为码控算法中用到的固定经验值;DelayBits表示延迟比特数;TargetBpp表示目标bpp,由外部配置;TransmissionDelayCu表示初始传输延迟的cu个数;EndDecreaseBits表示由于初始延迟功能slice结尾需要减少的比特数;RcBufferSize表示码控所认为的缓冲区大小;MuxWordSize表示子流并行功能所需的头信息所占比特数;EndControlBlocks表示由于初始传输延迟slice结尾需要对缓冲区最大值操作的块的数目;DecreaseStepLog2表示规定码率控制模块使用的MaxBufferSize在slice结尾每个控制块下降的步长的对数值,其值在码流头中;EndControlBegin表示slice结尾开始进行控制的块的索引;SliceWidthInCu表示slice宽度中有多少个cu的宽度;SliceHeightInCu表示slice高度中有多少个cu的高度;EndTargetFullness表示slice结尾的目标满度;RemainBlksLog2表示一个条带中编码单元总数量的二进制最高位数;MaxBufferSize表示缓冲区的最大值。
根据BitDepth[0](表示Y通道的bpc),ImageFormat查表1得到AdjComplexity(同等级无损编码比特数),AvgComplexity(平均无损编码比特数),ComplexityOffset(复杂度计算的偏置值),MaxComp(最大无损编码比特数)以及K1(经验值)的初始化值。
表4:
上表4表示AdjComplexity,AvgComplexity,ComplexityOffset,MaxComp以及K1与BitDepth[0],ImageFormat的对应关系。
根据ImageFormat(图像格式)可从下表5得到ChromaSampleRate(采样率),InvElem(去除和采样率有关除法需要的乘数),InvElemShift(去除和采样率有关除法需要的移位数值)以及FormatBias(不同图像格式对于qp的偏置值)的初始化值。
表5:
上述表5表示ChromaSampleRate,InvElem,InvElemShift以及FormatBias与ImageFormat的对应关系。
S2:确定量化参数,该步骤可实现如下:
S21:根据当前编码单元的亮度复杂度等级ComplexityLevel[0]与色度复杂度等级ComplexityLevel[1]计算编码单元的量化参数MasterQp。
S22:根据MasterQp计算当前编码单元亮度编码块和色度编码块的量化参数Qp[0]和Qp[1]。
其中,上述根据当前编码单元的亮度复杂度等级ComplexityLevel[0]与色度复杂度等级ComplexityLevel[1]计算编码单元的量化参数MasterQp可实现如下:

其中,bppAdj表示bpp的调整值;BitsRecord表示目前已译码的总比特数;CurrBlocks表示当前已译码的块数目;maxComp表示MaxComp进行码控定点化需要进行变换值;complexityOffset表示ComplexityOffset进行码控定点化需要进行变换值;RcBufferSizeMaxBit表示码流缓存大小。RcBufferSize的值等于rc_buffer_size的值,RcBufferSizeMaxBit的值表示RcBufferSize的二进制的最高位数;shiftCur表示当前的移位数值;tmp表示进行码控定点化过程中产生的中间变量;fullness表示满度;infoRatio表示质量比率;relativeComplexity表示相对无损编码比特数;minRate1和minRate2和minRate13表示计算minRate的中间变量;minRate表示targetRate的下限;targetRate表示目标比特数;bppOffset1和bppOffset2和bppOffset3计算bppOffset的中间变量;bppOffset表示bpp的偏置值;maxRate表示targetRate的上限;InverseTable是一个预设表格其的定义为:InverseTable={1024,512,341,256,205,171,146,128,114,102,93,85,79,73,68,64,60,57,54,51,49,47,45,43,41,39,38,37,35,34,33,32}。
上述根据MasterQp计算当前编码单元亮度编码块和色度编码块的量化参数Qp[0]和Qp[1]可实现如下:
根据前编码单元的亮度复杂度等级ComplexityLevel[0]与色度复杂度等级ComplexityLevel[1]从下查表6中得到BiasInit;
表6:BiasInit的定义
计算亮度量化参数Qp[0]以及色度量化参数Qp[1],Qp[2]可具体实现如下:
S3:码控参数更新
输入当前编码单元的实际比特数CuBits、亮度量化参数Qp[0]、色度量化参数Qp[1]和当前编码单元复杂度CuComplexityLevel,根据实际编码开销和量化参数计算当前块的实际无损编码比特数compCur,可实现如下:
根据当前块的实际无损编码比特数compCur更新码控参数AvgComplexity,AdjComplexity,可实现如下:
更新码控参数MaxBufferSize,可实现如下:
需要说明的是,上述方案中未进行特殊说明的方案,均可在解码侧或编码侧进行。
需要说明的是,在不冲突的情况下是,上文中任意多个实施例中的部分或全部内容可以构成新的实施例。
本申请实施例提供一种视频译码装置,该视频译码装置可以为视频译码器或视频编码器或视频解码器。具体的,视频译码装置用于执行以上视频图像解码方法、编码方法中的视频译码器所执行的步骤。本申请实施例提供的视频译码装置可以包括相应步骤所对应的模块。
本申请实施例可以根据上述方法示例对视频译码装置进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
在采用对应各个功能划分各个功能模块的情况下,图11示出上述实施例中所涉及的视频译码装置的一种可能的结构示意图。如图11所示,视频译码装置1100包括复杂度等级确定模块1101、码控参数确定模块1102、量化参数确定模块1103及译码模块1104。
复杂度等级确定模块1101,用于获取待处理图像中当前块的至少两个通道级复杂度等级,根据至少两个通道级复杂度等级确定当前块的块级复杂度等级;上述通道级复杂度等级用于表征当前块的通道级纹理的复杂程度。
码控参数确定模块1102,用于根据码控参数确定当前块的目标比特数,上述码控参数包括当前块的块级复杂度等级。
量化参数确定模块1103,用于基于目标比特数确定当前块的量化参数。
译码模块1104,用于基于量化参数对当前块进行译码。
在一种示例中,上述码控参数包括同等级平均无损编码比特数、平均无损编码比特数以及码流缓冲区满度;上述码控参数确定模块具体用于:确定同等级平均无损编码比特数及平均无损编码比特数;基于同等级平均无损编码比特数及平均无损编码比特数确定初始目标比特数;基于码流缓冲区满度,当前块的块级复杂度等级以及初始目标比特数确定当前块的目标比特数;其中,上述同等级平均无损编码比特数为当前块与多个已译码图像块无损编码时所需比特数预测值的平均值,且上述多个已译码图像块与当前块的复杂度等级相同;平均无损编码比特数为当前块与所有已译码图像块无损编码时所需的比特数预测值的平均值;码流缓冲区满度用于表征缓冲区的满度,上述缓冲区用于存储待处理图像的码流。
在一种示例中,上述码控参数确定模块具体用于确定同等级平均无损编码比特数及平均无损编码比特数:确定当前块的无损编码比特数,无损编码比特数为当前块无损编码时所需比特数的预测值;依据当前块的无损编码比特数以及多个历史同等级平均无损编码比特数更新当前块的同等级平均无损编码比特数;历史同等级平均无损编码比特数为与当前块块复杂度等级相同的已译码图像块的同等级平均无损比特数;依据当前块的无损编码比特数以及全部历史平均无损编码比特数更新当前块的平均无损编码比特数;历史平均无损编码比特数为已译码图像块的平均无损比特数。
在一种可能的实现方式中,上述当前块为待处理图像的首行块,上述码控参数包括首行质量提升参数;上述码控参数确定模块具体用于根据码控参数确定当前块的目标比特数还包括:依据首行质量提升参数调整当前块的目标比特数,以调小当前块的量化参数。
在一种可能的实现方式中,上述当前块为待处理图像的首列块,上述码控参数包括首列质量提升参数;上述码控参数确定模块具体用于根据码控参数确定当前块的目标比特数还包括:依据首行质量提升参数调整当前块的目标比特数,以调小当前块的量化参数。
在一种示例中,上述复杂度等级确定模块具体用于:获取待处理图像中当前块的至少两个通道级复杂度等级,在编码端,获取当前块的通道级纹理信息,并基于通道级纹理信息确定当前块的通道级复杂度等级;或者在解码端,从码流中获取通道级复杂度等级,上述码流为当前块的编码码流。
在一种示例中,上述复杂度等级确定模块具体用于从码流中获取通道级复杂度等级:从码流中获取当前块的复杂度信息位,该复杂度信息位用于表示当前块的通道级复杂度等级;依据复杂度信息位确定通道级复杂度等级。
在一种示例中,上述复杂度等级确定模块具体用于获取当前块的通道级纹理信息,并基于通道级纹理信息确定当前块的通道级复杂度等级:以当前块中至少一个通道图像块为处理单元,将处理单元划分为至少两个子单元,并确定各子单元的纹理信息;在处理单元中,基于各子单元的纹理信息确定当前块的块级复杂度等级。
在一种示例中,上述复杂度等级确定模块具体用于确定各子单元的纹理信息:获取子单元的原始像素值、子单元的左侧相邻列的原始像素值或重建值,以及子单元的上方相邻行的重建值,并对应计算子单元的水平纹理信息及垂直纹理信息;在水平纹理信息及垂直纹理信息中选择最小值作为对应子单元的纹理信息。
在一种示例中,上述复杂度等级确定模块具体用于在处理单元中,基于各子单元的纹理信息确定当前块的块级复杂度等级:在处理单元中,基于多个阈值将各子单元的纹理信息划分至对应的子单元复杂度等级,上述多个阈值是预先设定的;基于各子单元复杂度等级确定当前块的块复杂度等级。
在一种示例中,上述复杂度等级确定模块具体用于基于各子单元复杂度等级确定当前块的块复杂度等级:依据预设规则将各子单元复杂度等级映射为对应的通道级复杂度等级;基于各通道级复杂度等级确定当前块的块级复杂度等级。
在一种示例中,上述复杂度等级确定模块具体用于依据预设规则将各子单元复杂度等级映射为对应的通道级复杂度等级:基于多个阈值以及各子单元复杂度等级之和确定通道级复杂度等级,上述多个阈值是预先设定的。
在一种示例中,上述复杂度等级确定模块具体用于依据预设规则将各子单元复杂度等级映射为对应的通道级复杂度等级:确定子单元复杂度等级的级别构成,并依据级别构成确定对应的通道级复杂度等级。
在一种示例中,上述复杂度等级确定模块具体用于基于各通道级复杂度等级确定当前块的块级复杂度等级:取各通道级复杂度等级的最大值、最小值或加权值作为当前块的块级复杂度等级;或者基于多个阈值以及各通道级复杂度等级之和确定当前块的块级复杂度等级,上述多个阈值是预先设定的。
其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。
当然,本申请实施例提供的视频译码装置包括但不限于上述模块,例如:视频译码装置还可以包括存储模块。
存储模块可以用于存储该视频译码装置的程序代码和数据。
本申请实施例还提供了一种电子设备,该电子设备包括上述视频译码装置1100,该视频译码装置1100执行上文提供的任意一种视频译码器所执行的方法。
本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,当该计算机程序在计算机上运行时,使得该计算机执行上文提供的任意一种视频解码器所执行的方法。
关于上述提供的任一种计算机可读存储介质中相关内容的解释及有益效果的描述,均可以参考上述对应的实施例,此处不再赘述。
本申请实施例还提供了一种芯片。该芯片中集成了用于实现上述视频译码装置100的功能的控制电路和一个或者多个端口。可选的,该芯片支持的功能可以参考上文,此处不再赘述。本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可通过程序来指令相关的硬件完成。所述的程序可以存储于一种计算机可读存储介质中。上述提到的存储介质可以是只读存储器,随机接入存储器等。上述处理单元或处理器可以是中央处理器,通用处理器、特定集成电路(application specific integrated circuit,ASIC)、微处理器(digital signal processor,DSP),现场可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。
本申请实施例还提供了一种包含指令的计算机程序产品,当该指令在计算机上运行时,使得计算机执行上述实施例中的任意一种方法。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施例的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,计算机指令可以从一个网站站点、计算机、服务器或者数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可以用介质集成的服务器、数据中心等数据存储设备。可用介质可以是磁性介质(例如,软盘、硬盘、磁带),光介质(例如,DVD)、或者半导体介质(例如SSD)等。
应注意,本申请实施例提供的上述用于存储计算机指令或者计算机程序的器件,例如但不限于,上述存储器、计算机可读存储介质和通信芯片等,均具有非易失性(non-transitory)。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件程序实现时,可以全部或部分地以计算机程序产品的形式来实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施例的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,计算机指令可以从一个网站站点、计算机、服务器或者数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可以用介质集成的服务器、数据中心等数据存储设备。可用介质可以是磁性介质(例如,软盘、硬盘、磁带),光介质(例如,DVD)、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。
尽管在此结合各实施例对本申请进行了描述,然而,在实施所要求保护的本申请过程中,本领域技术人员通过查看附图、公开内容、以及所附权利要求书,可理解并实现公开实施例的其他变化。在权利要求中,“包括”(comprising)一词不排除其他组成部分或步骤,“一”或“一个”不排除多个的情况。单个处理器或其他单元可以实现权利要求中列举的若干项功能。相互不同的从属权利要求中记载了某些措施,但这并不表示这些措施不能组合起来产生良好的效果。
尽管结合具体特征及其实施例对本申请进行了描述,显而易见的,在不脱离本申请的精神和范围的情况下,可对其进行各种修改和组合。相应地,本说明书和附图仅仅是所附权利要求所界定的本申请的示例性说明,且视为已覆盖本申请范围内的任意和所有修改、变化、组合或等同物。显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。

Claims (24)

  1. 一种视频图像解码方法,包括:
    从码流中获取通道级复杂度等级,所述码流为当前块的编码码流,根据至少两个通道级复杂度等级确定所述当前块的块级复杂度等级;所述通道级复杂度等级用于表征所述当前块的通道级纹理的复杂程度;
    根据码控参数确定所述当前块的目标比特数,所述码控参数包括所述当前块的所述块级复杂度等级;
    基于所述目标比特数确定所述当前块的量化参数;
    基于所述量化参数对所述当前块进行解码。
  2. 根据权利要求1所述的视频图像解码方法,其中,所述码控参数包括同等级平均无损编码比特数、平均无损编码比特数以及码流缓冲区满度;
    所述根据码控参数确定所述当前块的目标比特数,包括:
    确定所述同等级平均无损编码比特数及所述平均无损编码比特数;
    基于所述同等级平均无损编码比特数及所述平均无损编码比特数确定初始目标比特数;
    基于所述码流缓冲区满度,所述当前块的所述块级复杂度等级以及所述初始目标比特数确定所述当前块的目标比特数;
    其中,所述同等级平均无损编码比特数为所述当前块与多个已译码图像块无损编码时所需比特数预测值的平均值,且所述多个已译码图像块与所述当前块的复杂度等级相同;所述平均无损编码比特数为所述当前块与所有已译码图像块无损编码时所需的比特数预测值的平均值;所述码流缓冲区满度用于表征缓冲区的满度,所述缓冲区用于存储待处理图像的码流。
  3. 根据权利要求2所述的视频图像解码方法,其中,所述确定所述同等级平均无损编码比特数及所述平均无损编码比特数,包括:
    确定所述当前块的无损编码比特数,所述无损编码比特数为所述当前块无损编码时所需比特数的预测值;
    依据所述当前块的所述无损编码比特数以及多个历史同等级平均无损编码比特数更新所述当前块的所述同等级平均无损编码比特数;所述历史同等级平均无损编码比特数为与所述当前块块复杂度等级相同的已译码图像块的同等级平均无损比特数;
    依据所述当前块的所述无损编码比特数以及全部历史平均无损编码比特数更新所述当前块的所述平均无损编码比特数;所述历史平均无损编码比特数为已译码图像块的平均无损比特数。
  4. 根据权利要求1-3任一项所述的视频图像解码方法,其中,所述当前块为待处理图像的首行块,所述码控参数包括首行质量提升参数;
    在所述根据码控参数确定所述当前块的目标比特数时,所述方法还包括:
    依据所述首行质量提升参数调整所述当前块的所述目标比特数,以调小所述当前块的量化参数。
  5. 根据权利要求1-3任一项所述的视频图像解码方法,其中,所述当前块为待处理图像的首列块,所述码控参数包括首列质量提升参数;
    在所述根据码控参数确定所述当前块的目标比特数时,所述方法还包括:
    依据所述首列质量提升参数调整所述当前块的所述目标比特数,以调小所述当前块的量化参数。
  6. 根据权利要求1-5任一项所述的视频图像解码方法,其中,所述从码流中获取通道级复杂度等级包括:
    从码流中获取当前块的复杂度信息位,所述复杂度信息位用于表示所述当前块的通道级复杂度等级;依据所述复杂度信息位确定所述通道级复杂度等级。
  7. 根据权利要求6所述的视频图像解码方法,其中,所述复杂度信息位的第一位用于表示当前通道级复杂度等级与当前块的前一个图像块的相同通道复杂度等级是否相同以及两者之间的变化值;若相同,则复杂度信息位为1位;若不同,则复杂度信息位为3位。
  8. 一种视频图像编码方法,包括:
    获取当前块的通道级纹理信息,并基于所述通道级纹理信息确定所述当前块的通道级复杂度等级,根据至少两个通道级复杂度等级确定所述当前块的块级复杂度等级;所述通道级复杂度等级用于表征所述当前块的通道级纹理的复杂程度;
    根据码控参数确定所述当前块的目标比特数,所述码控参数包括所述当前块的所述块级复杂度等级;
    基于所述目标比特数确定所述当前块的量化参数;
    基于所述量化参数对所述当前块进行编码。
  9. 根据权利要求8所述的视频图像编码方法,其中,所述获取所述当前块的通道级纹理信息,并基于所述通道级纹理信息确定所述当前块的所述通道级复杂度等级,包括:
    以所述当前块中至少一个通道图像块为处理单元,将所述处理单元划分为至少两个子单元,并确定各所述子单元的纹理信息;
    在所述处理单元中,基于各所述子单元的纹理信息确定所述当前块的所述块级复杂度等级。
  10. 根据权利要求9所述的视频图像编码方法,其中,所述确定各所述子单元的纹理信息,包括:
    获取所述子单元的原始像素值、所述子单元的左侧相邻列的原始像素值或重建值,以及所述子单元的上方相邻行的重建值,并对应计算所述子单元的水平纹理信息及垂直纹理信息;
    在所述水平纹理信息及所述垂直纹理信息中选择最小值作为对应的所述子单元的所述纹理信息。
  11. 根据权利要求9所述的视频图像编码方法,其中,所述在所述处理单元中,基于各所述子单元的纹理信息确定所述当前块的块级复杂度等级,包括:
    在所述处理单元中,基于多个阈值将各所述子单元的纹理信息划分至对应的子单元复杂度等级,所述多个阈值是预先设定的;
    基于各所述子单元复杂度等级确定所述当前块的所述块级复杂度等级。
  12. 根据权利要求11所述的视频图像编码方法,其中,所述基于各所述子单元复杂度等级确定所述当前块的块复杂度等级,包括:
    依据预设规则将各所述子单元复杂度等级映射为对应的所述通道级复杂度等级;
    基于各所述通道级复杂度等级确定所述当前块的所述块级复杂度等级。
  13. 根据权利要求12所述的视频图像编码方法,其中,所述依据预设规则将各所述子单元复杂度等级映射为对应的所述通道级复杂度等级,包括:
    基于多个阈值以及各所述子单元复杂度等级之和确定通道级复杂度等级,所述多个阈值是预先设定的。
  14. 根据权利要求12所述的视频图像编码方法,其中,所述依据预设规则将各所述子单元复杂度等级映射为对应的所述通道级复杂度等级,包括:
    确定所述子单元复杂度等级的级别构成,并依据所述级别构成确定对应的所述通道级复杂度等级。
  15. 根据权利要求8所述的视频图像编码方法,其中,所述码控参数包括同等级平均无损编码比特数、平均无损编码比特数以及码流缓冲区满度;
    所述根据码控参数确定所述当前块的目标比特数,包括:
    确定所述同等级平均无损编码比特数及所述平均无损编码比特数;
    基于所述同等级平均无损编码比特数及所述平均无损编码比特数确定初始目标比特数;
    基于所述码流缓冲区满度,所述当前块的所述块级复杂度等级以及所述初始目标比特数确定所述当前块的目标比特数;
    其中,所述同等级平均无损编码比特数为所述当前块与多个已译码图像块无损编码时所需比特数预测值的平均值,且所述多个已译码图像块与所述当前块的复杂度等级相同;所述平均无损编码比特数为所述当前块与所有已译码图像块无损编码时所需的比特数预测值的平均值;所述码流缓冲区满度用于表征缓冲区的满度,所述缓冲区用于存储所述待处理图像的码流。
  16. 根据权利要求15所述的视频图像编码方法,其中,所述确定所述同等级平均无损编码比特数及所述平均无损编码比特数,包括:
    确定所述当前块的无损编码比特数,所述无损编码比特数为所述当前块无损编码时所需比特数的预测值;
    依据所述当前块的所述无损编码比特数以及多个历史同等级平均无损编码比特数更新所述当前块的所述同等级平均无损编码比特数;所述历史同等级平均无损编码比特数为与所述当前块块复杂度等级相同的已译码图像块的同等级平均无损比特数;
    依据所述当前块的所述无损编码比特数以及全部历史平均无损编码比特数更新所述当前块的所述平均无损编码比特数;所述历史平均无损编码比特数为已译码图像块的平均无损比特数。
  17. 根据权利要求8所述的视频图像编码方法,其中,所述当前块为所述待处理图像的首行块,所述码控参数包括首行质量提升参数;
    在所述根据码控参数确定所述当前块的目标比特数时,所述方法还包括:
    依据所述首行质量提升参数调整所述当前块的所述目标比特数,以调小所述当前块的量化参数。
  18. 根据权利要求8所述的视频图像编码方法,其中,所述当前块为所述待处理图像的首列块,所述码控参数包括首列质量提升参数;
    在所述根据码控参数确定所述当前块的目标比特数时,所述方法还包括:
    依据所述首列质量提升参数调整所述当前块的所述目标比特数,以调小所述当前块的量化参数。
  19. 一种视频图像解码装置,包括:
    复杂度等级确定模块,用于从码流中获取通道级复杂度等级,所述码流为当前块的编码码流,根据至少两个通道级复杂度等级确定所述当前块的块级复杂度等级;所述通道级复杂度等级用于表征所述当前块的通道级纹理的复杂程度;
    码控参数确定模块,用于根据码控参数确定所述当前块的目标比特数,上述码控参数包括所述当前块的块级复杂度等级;
    量化参数确定模块,用于基于所述目标比特数确定所述当前块的量化参数;
    译码模块,用于基于所述量化参数对所述当前块进行解码。
  20. 一种视频图像编码装置,包括:
    复杂度等级确定模块,用于获取当前块的通道级纹理信息,并基于所述通道级纹理信息确定所述当前块的通道级复杂度等级,根据至少两个通道级复杂度等级确定所述当前块的块级复杂度等级;所述通道级复杂度等级用于表征所述当前块的通道级纹理的复杂程度;
    码控参数确定模块,用于根据码控参数确定所述当前块的目标比特数,所述码控参数包括所述当前块的所述块级复杂度等级;
    量化参数确定模块,用于基于所述目标比特数确定所述当前块的量化参数;
    译码模块,用于基于所述量化参数对所述当前块进行编码。
  21. 一种解码器,其中,所述视频解码器用于执行如权利要求1-7中任一项所述的方法。
  22. 一种编码器,其中,所述视频编码器用于执行如权利要求8-18中任一项所述的方法。
  23. 一种视频编解码系统,其中,包括视频编码器和/或视频解码器,所述视频编码器用于执行如权利要求8-18任一项所述的方法,所述视频解码器用于执行如权利要求1-7任一项所述的方法。
  24. 一种计算机可读存储介质,其中,所述计算机可读存储介质中存储有程序,当所述程序在所述计算机上运行时,使得所述计算机执行如权利要求1-18中任一项所述的方法。
PCT/CN2023/105398 2022-07-26 2023-06-30 一种视频图像解码方法、编码方法、装置及存储介质 WO2024022039A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210887907.9 2022-07-26
CN202210887907.9A CN116095319A (zh) 2022-07-26 2022-07-26 一种视频译码方法、装置及存储介质

Publications (1)

Publication Number Publication Date
WO2024022039A1 true WO2024022039A1 (zh) 2024-02-01

Family

ID=86210844

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/105398 WO2024022039A1 (zh) 2022-07-26 2023-06-30 一种视频图像解码方法、编码方法、装置及存储介质

Country Status (3)

Country Link
CN (2) CN116366847A (zh)
TW (1) TW202406339A (zh)
WO (1) WO2024022039A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116366847A (zh) * 2022-07-26 2023-06-30 杭州海康威视数字技术股份有限公司 一种视频图像解码方法、装置及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019191983A1 (zh) * 2018-04-04 2019-10-10 深圳市大疆创新科技有限公司 编码方法、装置、图像处理系统和计算机可读存储介质
CN110740324A (zh) * 2019-09-11 2020-01-31 浙江大华技术股份有限公司 编码控制方法及相关装置
CN111866504A (zh) * 2020-07-17 2020-10-30 Oppo广东移动通信有限公司 一种编码方法、编码器及计算机可读存储介质
CN113784126A (zh) * 2021-09-17 2021-12-10 Oppo广东移动通信有限公司 图像编码方法、装置、设备及存储介质
CN114466189A (zh) * 2021-12-27 2022-05-10 浙江大华技术股份有限公司 码率控制方法、电子设备及存储介质
CN116095319A (zh) * 2022-07-26 2023-05-09 杭州海康威视数字技术股份有限公司 一种视频译码方法、装置及存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019191983A1 (zh) * 2018-04-04 2019-10-10 深圳市大疆创新科技有限公司 编码方法、装置、图像处理系统和计算机可读存储介质
CN110740324A (zh) * 2019-09-11 2020-01-31 浙江大华技术股份有限公司 编码控制方法及相关装置
CN111866504A (zh) * 2020-07-17 2020-10-30 Oppo广东移动通信有限公司 一种编码方法、编码器及计算机可读存储介质
CN113784126A (zh) * 2021-09-17 2021-12-10 Oppo广东移动通信有限公司 图像编码方法、装置、设备及存储介质
CN114466189A (zh) * 2021-12-27 2022-05-10 浙江大华技术股份有限公司 码率控制方法、电子设备及存储介质
CN116095319A (zh) * 2022-07-26 2023-05-09 杭州海康威视数字技术股份有限公司 一种视频译码方法、装置及存储介质

Also Published As

Publication number Publication date
CN116095319A (zh) 2023-05-09
CN116366847A (zh) 2023-06-30
TW202406339A (zh) 2024-02-01

Similar Documents

Publication Publication Date Title
KR102229045B1 (ko) 디스플레이 스트림 압축 (dsc) 을 위한 엔트로피 코딩 기법들
KR102120571B1 (ko) 넌-4:4:4 크로마 서브-샘플링의 디스플레이 스트림 압축 (dsc) 을 위한 엔트로피 코딩 기법들
WO2023231866A1 (zh) 一种视频译码方法、装置及存储介质
WO2024022039A1 (zh) 一种视频图像解码方法、编码方法、装置及存储介质
WO2024104382A1 (zh) 图像编解码方法、装置及存储介质
CN116489360A (zh) 一种图像编解码方法及装置
WO2024022359A1 (zh) 一种图像编解码方法及装置
WO2024061055A1 (zh) 图像编码方法和图像解码方法、装置及存储介质
WO2024022367A1 (zh) 图像解码方法、编码方法及装置
CN115550666A (zh) 用于视频数据的编码方法、解码方法、计算设备和介质
WO2023138532A1 (zh) 一种视频解码方法、装置、视频解码器及存储介质
TWI821013B (zh) 視頻編解碼方法及裝置
WO2023138562A1 (zh) 图像解码方法、图像编码方法及相应的装置
TWI838089B (zh) 一種視頻解碼方法、裝置、視頻解碼器及存儲介質
TWI829424B (zh) 解碼方法、編碼方法及裝置
WO2022217447A1 (zh) 视频编解码方法与系统、及视频编解码器
WO2023138391A1 (zh) 系数解码方法、装置、图像解码器及电子设备
TW202415067A (zh) 圖像編碼方法和圖像解碼方法、裝置及存儲介質

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23845252

Country of ref document: EP

Kind code of ref document: A1