WO2020207162A1 - 帧内预测编码方法、装置、电子设备及计算机存储介质 - Google Patents

帧内预测编码方法、装置、电子设备及计算机存储介质 Download PDF

Info

Publication number
WO2020207162A1
WO2020207162A1 PCT/CN2020/078147 CN2020078147W WO2020207162A1 WO 2020207162 A1 WO2020207162 A1 WO 2020207162A1 CN 2020078147 W CN2020078147 W CN 2020078147W WO 2020207162 A1 WO2020207162 A1 WO 2020207162A1
Authority
WO
WIPO (PCT)
Prior art keywords
mode
coding
candidate
coding block
block
Prior art date
Application number
PCT/CN2020/078147
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 腾讯科技(深圳)有限公司
Priority to JP2021529273A priority Critical patent/JP7250927B2/ja
Publication of WO2020207162A1 publication Critical patent/WO2020207162A1/zh
Priority to US17/319,465 priority patent/US11451772B2/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/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/103Selection of coding mode or of prediction mode
    • H04N19/11Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes
    • 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/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • H04N19/147Data rate or code amount at the encoder output according to rate distortion criteria
    • 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/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • H04N19/159Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
    • 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/17Methods 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 an image region, e.g. an object
    • H04N19/176Methods 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 an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques

Definitions

  • This application relates to the technical field of video coding. Specifically, this application relates to an intra-frame prediction coding method, device, electronic equipment, and computer storage medium.
  • RDO Rate Distortion Optimization
  • HEVC High Efficiency Video Coding
  • RDO Rate Distortion Optimization
  • the encoder tries to encode each possible mode separately and calculates the rate-distortion cost corresponding to the mode, then selects the mode with the least rate-distortion cost as the optimal mode, and finally encodes the optimal mode into the code stream in. Since the encoder needs to try to encode each mode and complete all the coding links, the amount of calculation involved in RDO is very huge, especially the addition of many coding modes in the HEVC standard, which directly causes the amount of RDO calculation to increase exponentially.
  • the two-step search strategy of rough selection and selection is adopted for intra prediction coding.
  • the simplified SATD (Sum of Absolute Transformed Differences) algorithm is used in the rough selection stage to facilitate rapid identification of the most likely optimal mode, and the fine selection stage uses the fine RDO algorithm to ensure the frame The compression efficiency of intra prediction coding.
  • the inventor of the present application found in the specific implementation process that the rate-distortion optimization cost (RdoCost) of the selection stage of x265 has invalid calculations, especially the probability that the mode at the end of the candidate list is the optimal mode is very low.
  • the RdoCost calculation of these modes has very low gains, thus reducing the coding speed and coding efficiency as a whole.
  • the embodiment of the present application provides an intra-frame prediction encoding method, which can effectively reduce the calculation amount of the encoder and greatly improve the encoding speed and encoding efficiency. among them:
  • an embodiment of the present application provides an intra-frame prediction encoding method, including:
  • N N candidate intra prediction modes of the current coding block, and save the N candidate intra prediction modes to the candidate mode list, where N is a positive integer;
  • the optimal coding mode of the current coding block is determined.
  • an embodiment of the present application provides an intra-frame prediction encoding device, including:
  • the first processing module is used to determine N candidate intra prediction modes of the current coding block, and save the N candidate intra prediction modes to the candidate mode list, where N is a positive integer;
  • the second processing module is used to obtain the optimal coding modes corresponding to the spatially adjacent coding blocks of the current coding block and the upper-layer coding block respectively, and to save the optimal coding modes respectively corresponding to the spatially adjacent coding blocks and the upper-layer coding block to the corresponding Neighbor mode list;
  • the determining module is used to determine the optimal coding mode of the current coding block based on the candidate mode list and the adjacent mode list.
  • an embodiment of the present application provides an electronic device, including a memory and a processor, the memory is used to store a computer program, and the processor is used to execute the computer program to implement the above intra-frame prediction encoding method.
  • an embodiment of the present application provides a computer-readable storage medium having a computer program stored on the computer-readable storage medium, and when the computer program is executed by one or more processors, the aforementioned intra prediction is implemented. Encoding method.
  • the intra-frame prediction coding method saves the candidate mode list of N candidate intra-prediction modes of the current coding block, and saves the optimal spatial neighboring coding blocks corresponding to the upper coding block of the current coding block.
  • the neighboring mode list of coding modes determines the optimal coding mode of the current coding block, so that the optimal coding modes corresponding to the spatial neighboring coding blocks and the upper coding blocks of the current coding block can be fully utilized, thereby assisting the encoder to adaptively
  • the RDO decision-making process of certain coding modes of the current coding block is skipped, effectively reducing the calculation amount of the encoder, and greatly improving the coding speed and coding efficiency.
  • Fig. 1 is a schematic diagram of an application environment of an intra-frame prediction coding method according to an embodiment of the present application
  • FIG. 2 is a schematic flowchart of an intra-frame prediction encoding method according to an embodiment of the application
  • FIG. 3 is a schematic diagram of spatially adjacent coding blocks and upper-layer coding blocks according to an embodiment of the application;
  • FIG. 4 is a schematic diagram of quadtree division of high-performance video coding HEVC according to an embodiment of the application
  • FIG. 5 is a schematic diagram of an intra-frame prediction coding process according to an embodiment of the application.
  • FIG. 6 is a schematic diagram of using an intra-frame prediction coding method to determine an optimal coding mode of a current coding block according to an embodiment of the present application
  • FIG. 7 is a schematic structural diagram of an intra-frame prediction encoding apparatus according to an embodiment of the application.
  • FIG. 8 is a schematic structural diagram of another intra-frame prediction encoding apparatus according to an embodiment of the application.
  • FIG. 9 is a schematic structural diagram of an electronic device according to an embodiment of the application.
  • Fig. 1 is a schematic diagram of an application environment of an intra-frame prediction coding method according to an embodiment of the present application.
  • the communication system 100 includes one or more terminal devices 10 and a server 11, wherein the terminal device 10 and the server 11 are connected through a network 12, for example, through a wired or wireless network connection, etc., for performing this The intra-frame prediction coding method of the application embodiment.
  • the terminal device 10 can encode the encoding block in the data frame, and send the encoded data frame to the server 11 or other devices through the network 12, or to the server 11 or other devices.
  • the encoded data frame is decoded.
  • the terminal device 10 may be a mobile phone, a tablet computer, a notebook computer, or a personal computer (PC, Personal Computer), a smart TV, and the like.
  • the terminal device 10 may be installed with a client, and the client may be a video client, a browser client, or an instant messaging client.
  • the server 11 may encode the encoded block in the data frame, and send the encoded data frame to the terminal device 10 or other devices through the network 12, or decode the encoded data frame received from the terminal device 10 or other devices.
  • the server 11 may be a single server, or a server cluster composed of multiple servers, or a cloud computing platform.
  • the embodiment of this application provides an intra-frame prediction encoding method, which is executed by an encoder, where the encoder can be located in the server, the client, or other possible terminal devices.
  • This application implements The example does not restrict it.
  • the intra-frame prediction coding method provided by the embodiment of the present application can be applied to the terminal device as shown in FIG. 1.
  • the intra-frame prediction coding method includes:
  • Step S110 Determine N candidate intra prediction modes of the current coding block, and save the N candidate intra prediction modes to the candidate mode list, where N is a positive integer.
  • the encoder can use a simplified SATD algorithm to determine N candidate intra prediction modes of the current coding block. After the encoder determines the N candidate intra prediction modes, it can save the N candidate intra prediction modes to the corresponding list.
  • the list is marked as a candidate mode list, that is, the encoder
  • the N candidate intra prediction modes are stored in the candidate mode list, thereby providing a prerequisite guarantee for the subsequent determination of the optimal coding mode of the current coding block.
  • Step S120 Obtain the optimal encoding modes respectively corresponding to the spatially adjacent encoding blocks of the current encoding block and the upper-layer encoding block, and save the optimal encoding modes respectively corresponding to the spatially adjacent encoding blocks and the upper-layer encoding blocks to adjacent modes List.
  • the encoder after the encoder determines the optimal coding mode corresponding to the spatially adjacent coding block of the current coding block and the upper-layer coding block respectively, it can change the optimal coding mode of the spatially adjacent coding block and the upper-layer coding block
  • the optimal encoding mode is stored in a predetermined storage space.
  • the encoder may use the spatially adjacent coded block or the upper-layer coded block as the current coding block, using this application
  • the method of the embodiment determines its optimal coding mode.
  • the spatially adjacent coded block or the upper-layer coded block is regarded as the current coded block, and the encoder determines the optimal coding mode of the current coded block, thereby determining the maximum value of the spatially adjacent coded block or the upper-layer coded block.
  • Optimal coding mode is regarded as the current coded block, and the encoder determines the optimal coding mode of the current coded block, thereby determining the maximum value of the spatially adjacent coded block or the upper-layer coded block.
  • the encoder when it needs to use the optimal encoding mode of the spatially adjacent encoding block and the optimal encoding mode of the upper-layer encoding block in the process of determining the optimal encoding mode of the current encoding block, it can select from a predetermined In the storage space, the optimal coding modes respectively corresponding to the spatially adjacent coding blocks of the current coding block and the upper coding block are obtained. After obtaining the optimal coding modes corresponding to the spatially adjacent coding blocks and the upper-layer coding blocks, the optimal coding modes corresponding to the spatially neighboring coding blocks and the upper-layer coding blocks can be saved to the list, so as to facilitate the subsequent distinction.
  • the list is recorded as a neighboring mode list, that is, the optimal coding modes corresponding to the spatially neighboring coding blocks and the upper coding blocks are saved to the neighboring mode list, so as to provide a prerequisite guarantee for the subsequent determination of the optimal coding mode of the current coding block.
  • Step S130 based on the candidate mode list and the adjacent mode list, determine the optimal coding mode of the current coding block.
  • the encoder saves the N candidate intra prediction modes to the candidate mode list, and saves the optimal coding modes corresponding to the spatially adjacent coding blocks and the upper coding blocks to the adjacent mode list
  • the optimal coding mode of the current coding block can be determined based on the candidate mode list and the adjacent mode list, so as to make full use of the optimal coding modes corresponding to the spatial neighboring coding blocks of the current coding block and the upper coding block, so that the encoder
  • the RDO decision-making process of certain coding modes of the current coding block is adaptively skipped, which reduces the calculation amount of the encoder and improves the coding speed and coding efficiency.
  • the intra-frame prediction coding method saves the candidate mode list of N candidate intra-prediction modes of the current coding block, and saves the optimal spatial neighboring coding blocks corresponding to the upper coding block of the current coding block.
  • the neighboring mode list of coding modes determines the optimal coding mode of the current coding block, so that the optimal coding modes corresponding to the spatial neighboring coding blocks and the upper coding blocks of the current coding block can be fully utilized, thereby assisting the encoder to adaptively
  • the RDO decision-making process of certain coding modes of the current coding block is skipped, effectively reducing the calculation amount of the encoder, and greatly improving the coding speed and coding efficiency.
  • the spatially adjacent coding blocks include at least one of the following: the first coding block immediately adjacent to the current coding block and located to the left of the current coding block, the first coding block immediately adjacent to the current coding block and located above the current coding block Two coding blocks, a third coding next to the first coding block and located above the first coding block, a fourth coding block next to the first coding block and located below the first coding block, and a second coding block next to the second coding block The fifth coding block to the right of the coding block.
  • Figure 3 shows a schematic diagram of spatially adjacent coding blocks and upper-layer coding blocks.
  • C is the current coding block
  • L is the spatial neighbor coding of the current coding block C Block
  • A is also the spatial neighboring block of the current coding block C
  • U is the upper coding block of the current coding block C in the quad-tree structure
  • C is one of U's sub coding blocks.
  • L is next to the current coding block C and is located on the left side of the current coding block C.
  • L can be recorded as the first coding block, that is, L is the first coding block next to the current coding block and located on the left side of the current coding block ; A is next to the current coding block C and located on the upper side of the current coding block C.
  • A can be marked as the second coding block, that is, A is the second coding block next to the current coding block and located on the upper side of the current coding block.
  • the spatially adjacent coding blocks may also include a third coding block, a fourth coding block, and a fifth coding block, as shown in the schematic diagram on the right side of FIG. 3 Show.
  • C is the current coding block
  • L is the first coding block
  • A is the second coding block
  • B is the third coding block immediately above and above the first coding block L.
  • Block in other words, B is the third coding block immediately adjacent to the second coding block A and located to the left of the second coding block A
  • D is the fourth coding block immediately adjacent to the first coding block L and located below the first coding block L
  • E is the fifth coding block immediately adjacent to and on the right of the second coding block A.
  • the spatial neighboring blocks of the current coding block C include the first coding block L and the second coding block A as an example to describe the embodiments of the present application in detail.
  • the spatially adjacent blocks of the current encoding block C include the first encoding block L and the second encoding block A
  • obtaining the optimal encoding mode of the spatially adjacent encoding blocks of the current encoding block is to obtain
  • the optimal encoding mode of the first encoding block and the optimal encoding mode of the second encoding block are obtained, and the optimal encoding modes corresponding to the spatially adjacent encoding blocks of the current encoding block and the upper encoding block respectively are obtained, which is to obtain the optimal encoding mode of the first encoding block.
  • the optimal coding mode, the optimal coding mode of the second coding block, and the optimal coding mode of the upper coding block are obtained.
  • the order may be set in advance (denoted as The second predetermined order), the optimal encoding mode of the first encoding block, the optimal encoding mode of the second encoding block, and the optimal encoding mode of the upper encoding block are sequentially saved to the adjacent mode list.
  • the second predetermined order may be that the optimal encoding mode of the first encoding block is saved to the adjacent mode list, and then the optimal encoding mode of the second encoding block is saved to the adjacent mode list, and then the upper encoding block
  • the optimal coding mode of is saved to the adjacent mode list, of course, it can also be other writing order, which is not limited in the embodiment of the application.
  • the optimal encoding mode of the first encoding block, the optimal encoding mode of the second encoding block, and the optimal encoding mode of the upper layer encoding block are sequentially saved to the adjacent mode list.
  • HEVC adopts a flexible quadtree coding block division structure
  • the largest coding block is a CTU (Coding Tree Unit, coding tree unit), and its size is 64x64 pixels.
  • the CTU can continue to be recursively divided into smaller CUs (Coding Units), that is, the CTU can continue to be divided into 4 32x32 CUs, and each 32x32 CU can continue to be divided into 4 16x16 CU, until the CU is 8x8, the division cannot be continued. Therefore, the process of obtaining the optimal coding modes respectively corresponding to the spatially adjacent coding blocks of the current coding block and the upper coding block includes the following situations:
  • the DC mode can be used as the optimal encoding mode of the encoding block L at this time, that is, in the adjacent mode list, the optimal encoding mode of the first encoding block is replaced with the DC mode.
  • the DC mode can be used as the optimal encoding mode of the encoding block A, that is, in the adjacent mode list, the optimal encoding mode of the second encoding block is replaced with the DC mode.
  • the current coded block C is the largest intra-frame prediction coded block, and there is no upper coded block in the quad-tree structure, that is, the coded block C is not other
  • the sub-coding block of the coding block that is, the upper coding block U of the current coding block C in the quad-tree structure, exceeds the boundary of the largest intra-frame prediction coding block.
  • the DC mode can be used as the optimal coding block U Coding mode, that is, in the adjacent mode list, the optimal coding mode of the upper coding block is replaced with the DC mode.
  • the process of obtaining the optimal coding modes corresponding to the spatially adjacent coding blocks of the current coding block and the upper coding block respectively includes: when the first coding block and/or the second coding block exceed the image boundary, the DC mode is used as The optimal coding mode of the coding block that exceeds the image boundary; and when the upper coding block exceeds the boundary of the largest intra prediction coding block, the DC mode is used as the optimal coding mode of the upper coding block.
  • the first coding block and the second coding block may exceed the coding tree unit boundary or the slice (slice) boundary, and are not restricted by the video coding standard on obtaining coding information of spatially adjacent coding blocks.
  • the size of N (that is, the length of the candidate mode list) depends on the size of the current coding block and the rate set by the user.
  • the distortion level RdLevel where N increases as the size of the coding block decreases, and increases as the RdLevel increases, as shown in Table 1. Therefore, in the process of determining the N candidate intra prediction modes of the current coding block, it is first necessary to calculate the length N of the candidate mode list of the current coding block according to the RdLevel set by the user and the size of the current coding block, where the current coding block The size of is known to the encoder.
  • the predetermined rate-distortion optimization cost value corresponding to a plurality of predetermined intra prediction modes respectively is calculated, wherein the predetermined rate-distortion optimization cost value can be For the absolute conversion error and cost value (denoted as satdCost), for the convenience of introducing the subsequent use of satdCost, the predetermined rate-distortion optimization cost value.
  • the predetermined rate-distortion optimization cost (satdCost) corresponding to each predetermined intra prediction mode sort the calculated satdCost according to the first predetermined order, and use the sorted first N intra prediction modes as The candidate intra prediction mode of the current coding block, and then the N candidate intra prediction modes are saved in the candidate mode list.
  • the foregoing multiple predetermined intra prediction modes are 35 intra prediction modes of the HEVC standard, and the satdCost corresponding to the multiple predetermined intra prediction modes is calculated, that is, the satdCost corresponding to the 35 intra prediction modes is calculated.
  • the predicted value of the current coding block in the process of calculating the satdCost corresponding to multiple predetermined intra prediction modes, can be calculated according to the 35 intra prediction modes, and then the predicted value of the current coding block can be calculated according to the calculated intra prediction
  • the predicted value corresponding to each mode calculate the satd (absolute transformation error sum) and the number of bits corresponding to each intra prediction mode, and then according to the satd (absolute transformation error sum) and the number of bits corresponding to each intra prediction mode, Calculate the satdCost corresponding to each intra prediction mode.
  • the above-mentioned first predetermined order may be an order from small to large, or may be other order, which is not limited by the embodiment of the present application. If the above-mentioned first predetermined order is from small to large, after calculating the satdCost corresponding to each predetermined intra prediction mode, each satdCost can be sorted in the order from small to large, and then after sorting
  • the first N intra-frame prediction modes of as the candidate intra-frame prediction modes of the current coding block that is, from the satdCost corresponding to the 35 intra-frame prediction modes, the N intra-frame prediction modes with the smallest satdCost are selected as candidates for the current coding block Intra prediction mode, and in the order of N satdCost from small to large, the intra prediction mode corresponding to the N satdCost is saved in the candidate mode list as the candidate intra prediction mode of the current coding block.
  • the candidate mode list can be denoted as Rdo
  • the determination of the N candidate intra prediction modes of the current coding block in this implementation can be summarized as: according to the first predetermined order, the absolute transformation errors and cost values corresponding to the multiple predetermined intra prediction modes are sorted. And the first N intra prediction modes after sorting are used as candidate intra prediction modes of the current coding block. Saving the N candidate intra prediction modes to the candidate mode list can be summarized as: according to the first predetermined order, the N candidate intra prediction modes are sequentially saved to the candidate mode list.
  • the candidate frame corresponding to the first index value in the candidate mode list may be determined first Whether the prediction mode or the candidate intra prediction mode corresponding to the second index value exists in the adjacent mode list; then, if the candidate intra prediction mode corresponding to the first index value or the candidate intra prediction mode corresponding to the second index value If the mode exists in the adjacent mode list, update N to the first index value by increasing the first preset value or the second index value by increasing the first preset value, and based on the updated N to determine the optimal coding of the current coding block Mode; then, if the candidate intra prediction mode corresponding to the first index value and the candidate intra prediction mode corresponding to the second index value do not exist in the adjacent mode list, the current coding block is determined based on the adjacent mode list The optimal encoding mode.
  • the above-mentioned first preset value may be 1, or may be set to other values as required, and the embodiment of the present application does not limit it.
  • N when the candidate intra prediction mode corresponding to the first index value in the candidate mode list exists in the adjacent mode list, N is updated.
  • N when updating N, if the candidate intra prediction mode corresponding to the first index value in the candidate mode list exists in the adjacent mode list, then N is updated to the first index value plus 1 (1 is The first preset value), if the candidate intra prediction mode corresponding to the first index value in the candidate mode list does not exist in the adjacent mode list, and the candidate intra prediction mode corresponding to the second index value exists in the adjacent mode In the list, update N to the second index value plus 1 (1 is the first preset value). After the update of N is completed, the optimal coding mode of the current coding block can be determined based on the updated N.
  • the optimal coding mode of the current coding block in the process of determining the optimal coding mode of the current coding block based on the updated N, it may first be determined whether the updated N is equal to the second preset value; then, if the updated N is equal to the first Two preset values, the candidate intra prediction mode corresponding to the first index value in the candidate mode list is determined as the optimal coding mode of the current coding block; then, if the updated N is not equal to the second preset value, then Based on the updated N, the optimal coding mode of the current coding block is determined according to the candidate mode list.
  • the above-mentioned second preset value may be 1, or may be set to other values as required.
  • the embodiment of the present application does not limit it, and the embodiment of the present application sets the second preset value to 1 as required.
  • the candidate intra prediction mode corresponding to the first index value of the candidate mode list and the candidate intra prediction mode corresponding to the second index value do not exist in the adjacent mode list, it is based on the adjacent mode list.
  • the mode list and the candidate mode list determine the optimal coding mode of the current coding block.
  • the optimal encoding mode corresponding to the first index value of the adjacent mode list and the adjacent mode list can be determined first.
  • the optimal encoding mode corresponding to the second index value is the same; then, if the two are the same, that is, the optimal encoding mode corresponding to the first index value in the adjacent mode list is the same as the optimal encoding mode corresponding to the second index value , Determine the candidate index value (denoted as nIdx) in the candidate mode list of the optimal encoding mode corresponding to the first index value, and determine the optimal encoding mode of the current encoding block based on the candidate index value and the candidate mode list; If the two are not the same, that is, the optimal encoding mode corresponding to the first index value in the adjacent mode list is not the same as the optimal encoding mode corresponding to the second index value, then the optimal encoding mode of the current encoding block is determined according to the candidate mode list. Optimal coding mode.
  • the optimal coding mode corresponding to the first index value in the process of determining the optimal coding mode corresponding to the first index value of the adjacent mode list and the candidate index value in the candidate mode list, can be determined first Whether it exists in the candidate mode list; if the optimal encoding mode corresponding to the first index value exists in the candidate mode list, the candidate index value is determined as the optimal corresponding to the first index value in the candidate mode list.
  • the index value of the coding mode in the candidate mode list that is, the index value of the optimal coding mode corresponding to the first index value in the candidate mode list is determined as the candidate index value.
  • N minus the third predetermined value is determined as the candidate index value, where the third predetermined value can be 1, or as required It is set to other values, and the embodiment of the present application does not limit it.
  • the embodiment of the present application sets the third preset value as 1 as needed, that is, determines the candidate index value as N minus 1 (ie, N-1).
  • N in the process of determining the candidate index value and determining the optimal coding mode of the current coding block based on the candidate index value and the candidate mode list, N may be updated to the determined candidate index value (nIdx).
  • the fourth preset value is increased, and then based on the updated N, the optimal coding mode of the current coding block is determined according to the candidate mode list.
  • the above-mentioned fourth preset value can be 1, or can be set to other values as required.
  • the embodiment of the present application does not limit it.
  • the embodiment of the present application sets the fourth preset value to 1 as required, namely N is updated to nIdx+1.
  • the rate-distortion cost value corresponding to each candidate intra prediction mode currently included in the candidate mode list may be determined first; then Determine the minimum value of each rate-distortion cost value, and determine the candidate intra prediction mode corresponding to the minimum value as the optimal coding mode of the current coding block.
  • the calculation process of the rate-distortion cost value may specifically be: first determine the The predetermined predicted value of any candidate intra prediction mode; then, according to the determined predetermined predicted value, the coding distortion (such as square error and SSD distortion) of any candidate intra prediction mode is calculated, and the intra prediction of any candidate The number of bits after prediction mode encoding (for example, entropy encoding); then, according to the calculated encoding distortion (for example, SSD distortion) and the number of bits, the rate-distortion optimization cost value of any candidate intra prediction mode is calculated.
  • the coding distortion such as square error and SSD distortion
  • Figure 5 shows a schematic diagram of an intra-frame prediction encoding process in an embodiment of the present application.
  • adjacent coding blocks include the coding block on the left of the current coding block (ie the first coding block) and the coding block above (ie the second coding block).
  • the candidate mode list is marked as RdoCandList, and the adjacent mode list Denoted as nbModeList, the absolute conversion error and cost value are denoted as satdCost, the rate-distortion priority cost value is denoted as RdoCost, the candidate intra prediction mode corresponding to the first index value in the candidate mode list is denoted as RdoCandList[0], the candidate mode list
  • the candidate intra prediction mode corresponding to the second index value in the adjacent mode list is recorded as RdoCandList[1]
  • the candidate intra prediction mode corresponding to the first index value in the adjacent mode list is recorded as nbModeList[0]
  • the second in the adjacent mode list The candidate intra prediction modes corresponding to each index value are denoted as nbModeList[1].
  • the above and the first preset value, the second preset value, the third preset value, and the fourth preset value are all taken as 1, and the candidate index value is recorded as nIdx.
  • the process in FIG. 5 is executed by an encoder.
  • the encoder may be located in the server, the client, or other possible terminal devices.
  • the embodiment of the present application does not limit it.
  • the process in FIG. 5 is generally It can be described as the following steps:
  • Step S401 Calculate the length N of the candidate mode list RdoCandList. Specifically, according to the RdLevel set by the user and the size of the current coding block, the length N of the candidate mode list in the current coding block selection stage is calculated;
  • Step S402 Calculate satdCost of 35 intra-frame prediction modes. Specifically, for 35 intra prediction modes, each mode is used to calculate the prediction value of the current coding block, and the SATD distortion and the estimated number of bits are calculated, and then the satdCost is calculated;
  • step S403 the N intra-frame prediction modes with the smallest satdCost are selected and stored in the RdoCandList. Specifically, from the satdCost of the 35 intra-frame prediction modes, select the N intra-frame prediction modes with the smallest satdCost as candidate intra-frame prediction modes, and write them into RdoCandList in order of corresponding satdCost from small to large;
  • Step S404 Obtain the adjacent mode list nbModeList. Specifically, the best intra mode of the coding block on the left of the current coding block, the best intra mode of the coding block above the current coding block, and the best intra mode of the upper coding block of the current coding block are obtained, and in order Write to nbModeList;
  • Step S406 set N equal to i+1;
  • Step S407 execute the second fast condition judgment, that is, judge whether N is equal to 1, if it is equal, execute step S408, otherwise execute step S412;
  • Step S408 it is judged that RdoCandList[0] is the optimal coding mode of the current coding block, and the process ends;
  • Step S409 perform the third fast condition determination, that is, determine whether nbModeList[0] is equal to nbModeList[1], if they are equal, perform step S410, otherwise, perform step S412;
  • Step S410 Calculate the index nIdx of nbModeList[0] in RdoCandList. Specifically, if nbModeList[0] exists in RdoCandList, then nIdx is the index of nbModeList[0] in RdoCandList, otherwise let nIdx be N-1;
  • Step S411, set N equal to nIdx+1;
  • Step S412 Calculate the RdoCost of the candidate intra prediction mode in the RdoCandList.
  • the first N candidate intra prediction modes in RdoCandList are used to calculate the prediction value of the current coding block, and the coding distortion (for example, SSD distortion) and coding (for example, SSD distortion) of the current coding block are calculated according to the calculated prediction values.
  • the calculated coding distortion such as SSD distortion
  • the number of bits after coding such as entropy coding
  • Step S413 Select the candidate intra prediction mode with the smallest RdoCost as the optimal coding mode of the current coding block, and the process ends.
  • test data when the intra-frame prediction coding method of the embodiment of the application was tested in x265, the test data showed that the method can save coding time by nearly 30% on average, which is equivalent to increasing the coding speed by 42%, while BD-rate only increases 0.8%. It can be seen that this method has basically no impact on compression efficiency while significantly reducing coding complexity.
  • Table 2 the test data is shown in Table 2, and the test conditions are as follows:
  • Fig. 6 shows a schematic diagram of determining an optimal coding mode of a current coding block by using an intra-frame prediction coding method according to an embodiment of the present application.
  • Fig. 6 takes the spatially adjacent coding blocks including the coding block on the left side of the current coding block (that is, the first coding block) and the coding block on the upper side (that is, the second coding block) as an example for introduction, and assumes that the first preset The value, the second preset value, the third preset value, and the fourth preset value are all 1.
  • nbEM_1 represents the optimal encoding mode of the first encoding block
  • nbEM_2 represents the optimal encoding mode of the second encoding block
  • nbEM_3 represents the optimal encoding mode of the upper encoding block of the current encoding block.
  • CandEM_1 represents the intra prediction mode corresponding to the first index of the candidate mode list
  • CandEM_2 represents the intra prediction mode corresponding to the second index of the candidate mode list
  • CandEM_N represents the candidate mode The intra prediction mode corresponding to the Nth index in the list.
  • the process of determining the optimal encoding mode of the current encoding block is executed by the encoder, where the encoder can be located in the server, the client, or other possible terminal devices.
  • the encoder can be located in the server, the client, or other possible terminal devices.
  • the application embodiment does not restrict it, and the specific process can be:
  • the candidate intra prediction mode corresponding to the first index value in the candidate mode list or the candidate intra prediction mode corresponding to the second index value exists in the adjacent mode list if the candidate mode list corresponds to the first index value If the candidate intra prediction mode exists in the adjacent mode list, update N to the first index value and increase by 1, and determine whether the updated N is equal to 1. If it is equal to 1, then the first index value corresponds to the candidate frame
  • the prediction mode is determined as the optimal encoding mode of the current encoding block. For example, CandEM_1 is determined as the optimal encoding mode of the current encoding block. If it is not equal to 1, then based on the updated N and the candidate mode list, determine the current encoding block
  • the optimal encoding mode for example, CandEM_3 is determined as the optimal encoding mode of the current encoding block.
  • N is updated to increase the second index value by 1, and judge whether the updated N is equal to 1. If it is equal to 1, the candidate intra prediction mode corresponding to the second index value is determined as the optimal coding mode of the current coding block For example, CandEM_2 is determined as the optimal encoding mode of the current encoding block. If it is not equal to 1, then based on the updated N, the optimal encoding mode of the current encoding block is determined according to the candidate mode list. For example, CandEM_3 is determined as the current The optimal coding mode of the coding block.
  • the optimal coding mode of the current coding block is determined. Specifically, it can be: judging the optimal coding mode corresponding to the first index value in the adjacent mode list and the best coding mode corresponding to the second index value.
  • the process of determining the candidate index value of the optimal coding mode corresponding to the first index value in the candidate mode list may specifically be: if the optimal coding mode corresponding to the first index value exists in the candidate mode list , The candidate index value is determined as the index value of the optimal encoding mode corresponding to the first index value in the candidate mode list; if the optimal encoding mode corresponding to the first index value does not exist in the candidate mode list, the The candidate index value is determined to be N minus 1.
  • the above process of determining the optimal coding mode of the current coding block according to the candidate mode list may specifically be: calculating the rate-distortion cost value (denoted as RdoCost) of the candidate intra prediction mode in the candidate mode list, And select the candidate intra prediction mode with the smallest RdoCost as the final optimal mode of the current encoding block, for example, select CandEM_3 as the final optimal mode of the current encoding block.
  • the calculation of the rate-distortion cost value of the candidate intra prediction modes in the candidate mode list may be specifically: using the first N candidate intra prediction modes in the candidate mode list to calculate the prediction value of the current coding block, and according to the calculated values Predicted value, respectively calculate the coding distortion (such as SSD distortion) of the current coding block and the number of bits after coding (such as entropy coding), and then according to the calculated coding distortion (such as SSD distortion) and coding (such as entropy coding) Calculate the RdoCost corresponding to each candidate intra prediction mode.
  • the coding distortion such as SSD distortion
  • coding such as coding distortion
  • the optimal coding mode corresponding to the spatial neighboring block of the current coding block and the upper coding block are used to assist the encoder to adaptively skip the RDO decision-making process of certain coding modes of the current coding block, effectively
  • the calculation amount of the encoder is reduced, and the coding speed and coding efficiency are greatly improved.
  • FIG. 7 is a schematic structural diagram of an intra-frame prediction encoding apparatus provided by an embodiment of the application.
  • the device 60 may include a first processing module 61, a second processing module 62, and a determining module 63, where:
  • the first processing module 61 is configured to determine N candidate intra prediction modes of the current coding block, and save the N candidate intra prediction modes to the candidate mode list, where N is a positive integer;
  • the second processing module 62 is configured to obtain the optimal coding modes corresponding to the spatially adjacent coding blocks of the current coding block and the upper-layer coding block respectively, and save the optimal coding modes respectively corresponding to the spatially adjacent coding blocks and the upper-layer coding block to the corresponding Neighbor mode list;
  • the determining module 63 is configured to determine the optimal coding mode of the current coding block based on the candidate mode list and the adjacent mode list.
  • the device provided by the embodiment of the present application saves the candidate mode list of N candidate intra prediction modes of the current coding block, and saves the correlation between the spatially adjacent coding blocks of the current coding block and the optimal coding mode corresponding to the upper coding block.
  • the neighbor mode list determines the optimal encoding mode of the current encoding block, so that the optimal encoding modes corresponding to the spatial neighboring blocks of the current encoding block and the upper encoding block can be fully utilized, thereby adaptively skipping some of the current encoding blocks
  • the RDO decision-making process of the coding mode effectively reduces the calculation amount of the encoder and greatly improves the coding speed and coding efficiency.
  • Fig. 8 is a schematic structural diagram of another intra-frame prediction encoding apparatus provided by an embodiment of the application.
  • the device 70 may include a first processing module 71, a second processing module 72, and a determining module 73.
  • the functions implemented by the first processing module 71 in FIG. 8 are the same as those of the first processing module in FIG.
  • the modules 61 are the same.
  • the second processing module 72 in FIG. 8 implements the same functions as the second processing module 62 in FIG. 7, and the recommendation module 73 in FIG. 8 implements the same functions as the recommendation module 63 in FIG. I will not repeat them here.
  • the intra-frame prediction encoding device shown in FIG. 8 is described in detail below:
  • the spatially adjacent coding blocks include at least one of the following: a first coding block immediately adjacent to the current coding block and located to the left of the current coding block, a second coding block immediately adjacent to the current coding block and located above the current coding block Block, the third code next to the first code block and located above the first code block, the fourth code next to the first code block and located below the first code block, and the second code block next to and located on the right of the second code block The fifth code on the side.
  • the second processing module 72 is specifically configured to obtain the optimal encoding mode of at least one of the first encoding block, the second encoding block, the third encoding block, the fourth encoding block, and the fifth encoding, and the optimal encoding of the upper encoding block mode.
  • the first processing module 71 is specifically configured to sort the predetermined rate-distortion optimization cost values corresponding to multiple predetermined intra prediction modes in a first predetermined order, and to sort the first N frames after the sorting.
  • the intra prediction mode is used as a candidate intra prediction mode for the current coding block; and used to sequentially save the N candidate intra prediction modes to the candidate mode list according to a first predetermined order;
  • the second processing module 72 is specifically configured to, according to a second predetermined order, combine the optimal encoding mode of at least one of the first encoding block, the second encoding block, the third encoding block, the fourth encoding block, and the fifth encoding, and the upper layer
  • the optimal coding mode of the coding block is sequentially saved to the adjacent mode list.
  • the second processing module 72 is specifically configured to: when any one of the first coding block, the second coding block, the third coding block, the fourth coding block, and the fifth coding block does not exceed the image boundary , Obtain the pre-stored optimal coding mode of the coding block that does not exceed the image boundary; and when any one of the first coding block, the second coding block, the third coding block, the fourth coding block, and the fifth coding block
  • the DC mode is used as the optimal encoding mode for the encoding block beyond the image boundary; and when the upper layer encoding block does not exceed the image boundary, the pre-stored optimal encoding mode of the upper layer encoding block is obtained; and when the upper layer encoding When the block exceeds the maximum intra-frame prediction coding block boundary, the DC mode is used as the optimal coding mode of the upper coding block.
  • the determining module 73 includes a first determining sub-module 731, a first mode determining sub-module 732, a second mode determining sub-module 733, and a third mode determining sub-module 734, wherein:
  • the first determining sub-module 731 is configured to determine whether the candidate intra prediction mode corresponding to the first index value in the candidate mode list or the candidate intra prediction mode corresponding to the second index value exists in the adjacent mode list;
  • the first mode determination sub-module 732 is configured to update N to be the first index value and increase the first preset value by the first preset value when the candidate intra prediction mode corresponding to the first index value in the candidate mode list exists in the adjacent mode list.
  • the next N determines the optimal coding mode of the current coding block;
  • the second mode determination submodule 733 is used for when the candidate intra prediction mode corresponding to the first index value in the candidate mode list does not exist in the adjacent mode list, and the candidate intra prediction mode corresponding to the second index value in the candidate mode list If the mode exists in the adjacent mode list, update N to the second index value and increase the first preset value, and determine the optimal coding mode of the current coding block based on the updated N;
  • the third mode determination sub-module 734 is used for when the candidate intra prediction mode corresponding to the first index value and the candidate intra prediction mode corresponding to the second index value do not exist in the adjacent mode list, based on the adjacent mode list With the candidate mode list, the optimal coding mode of the current coding block is determined.
  • the first mode determination submodule 732 is specifically configured to determine the candidate intra prediction mode corresponding to the first index value as the optimal current coding block when the updated N is equal to the second preset value. Coding mode; and when the updated N is not equal to the second preset value, based on the updated N, the optimal coding mode of the current coding block is determined according to the candidate mode list.
  • the second mode determining submodule 733 is specifically configured to determine the first mode when the optimal encoding mode corresponding to the first index value in the adjacent mode list is the same as the optimal encoding mode corresponding to the second index value.
  • the candidate index value of the optimal coding mode corresponding to each index value in the candidate mode list, and based on the candidate index value and the candidate mode list, the optimal coding mode of the current coding block is determined; and used when the first one in the adjacent mode list
  • the optimal encoding mode of the current encoding block is determined according to the candidate mode list.
  • the second mode determining submodule 733 is specifically configured to select the optimal coding mode corresponding to the first index value in the candidate mode list when the optimal coding mode corresponding to the first index value exists in the candidate mode list.
  • the index value in the list is determined as the candidate index value; and when the optimal coding mode corresponding to the first index value does not exist in the candidate mode list, N minus the third predetermined value is determined as the candidate index value.
  • the second mode determination submodule 733 is specifically configured to update N as a candidate index value by a fourth preset value, and based on the updated N, determine the optimal current coding block according to the candidate mode list. Encoding mode.
  • the determining module 73 includes a cost value determining sub-module 735 and an encoding mode determining sub-module 736;
  • the cost value determination sub-module 735 is configured to determine the rate-distortion cost value corresponding to each candidate intra prediction mode currently included in the candidate mode list;
  • the coding mode determination sub-module 736 is configured to determine the minimum value of each rate-distortion cost value, and determine the candidate intra prediction mode corresponding to the minimum value as the optimal coding mode of the current coding block.
  • the cost value determination submodule 735 is specifically configured to determine the predetermined prediction value of any candidate intra prediction mode; and to calculate the coding distortion of any candidate intra prediction mode according to the predetermined prediction value, and The number of bits after encoding any candidate intra prediction mode; and used to calculate the rate-distortion optimization cost value of any candidate intra prediction mode according to the encoding distortion and the number of bits.
  • the electronic device 800 shown in FIG. 9 includes a processor 801 and a memory 803. Wherein, the processor 801 and the memory 803 are connected, such as through a bus 802. Further, the electronic device 800 may further include a transceiver 804. In practical applications, the transceiver 804 may not be limited to one, and the structure of the electronic device 800 does not constitute a limitation to the embodiment of the present application.
  • the processor 801 is applied in the embodiment of the present application, and is used to implement the functions of the first processing module, the second processing module, and the determining module shown in FIG. 7 and FIG. 8.
  • the processor 801 may be a CPU, a general-purpose processor, DSP, ASIC, FPGA or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute various exemplary logical blocks, modules and circuits described in conjunction with the disclosure of this application.
  • the processor 801 may also be a combination that implements computing functions, for example, including a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and so on.
  • the bus 802 may include a path for transferring information between the aforementioned components.
  • the bus 802 may be a PCI bus or an EISA bus.
  • the bus 802 can be divided into an address bus, a data bus, a control bus, and so on. For ease of representation, only one thick line is used in FIG. 9, but it does not mean that there is only one bus or one type of bus.
  • the memory 803 can be ROM or other types of static storage devices that can store static information and instructions, RAM or other types of dynamic storage devices that can store information and instructions, or it can be EEPROM, CD-ROM or other optical disk storage, or optical disk storage. (Including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store desired program codes in the form of instructions or data structures and can be used by a computer Any other media accessed, but not limited to this.
  • the memory 803 is used to store application program codes for executing the solutions of the present application, and the processor 801 controls the execution.
  • the processor 801 is configured to execute application program codes stored in the memory 803 to implement the function of the intra-frame prediction encoding apparatus provided in the embodiment shown in FIG. 7 or FIG. 8.
  • Another electronic device includes a memory and a processor.
  • the memory stores a computer program that can be run on the processor.
  • the processor executes the computer program, the frame described in the foregoing embodiment can be implemented. Intra prediction coding method.
  • the embodiment of the present application provides a computer-readable storage medium with a computer program stored on the computer-readable storage medium, and when the computer program is executed by one or more processors, the intra-frame prediction encoding method described in the foregoing embodiment is implemented .
  • Determine the current coding block by saving the candidate mode list of N candidate intra prediction modes of the current coding block, and saving the neighboring mode list of the optimal coding mode corresponding to the spatial neighboring coding block of the current coding block and the upper coding block respectively
  • the optimal coding mode of the current coding block can make full use of the optimal coding modes corresponding to the spatial neighboring coding blocks of the current coding block and the upper coding block, so as to assist the encoder to adaptively skip the RDO of certain coding modes of the current coding block
  • the decision-making process effectively reduces the amount of calculation of the encoder and greatly improves the coding speed and coding efficiency.
  • the computer-readable storage medium provided in the embodiment of the present application is applicable to any embodiment of the foregoing method.

Landscapes

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

Abstract

本申请涉及视频编码技术领域,公开了一种帧内视频编码方法、装置、电子设备及计算机可读存储介质,其中,帧内视频编码方法包括:确定当前编码块的N个候选帧内预测模式,并将N个候选帧内预测模式保存至候选模式列表,N为正整数;获取当前编码块的空间相邻编码块与上层编码块分别对应的最优编码模式,并将空间相邻编码块与上层编码块分别对应的最优编码模式保存至相邻模式列表;基于候选模式列表与相邻模式列表,确定当前编码块的最优编码模式。

Description

帧内预测编码方法、装置、电子设备及计算机存储介质
本申请要求于2019年4月11日提交中国专利局、申请号为201910290936.5、发明名称为“帧内预测编码方法、装置、电子设备及计算机存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及视频编码技术领域,具体而言,本申请涉及一种帧内预测编码方法、装置、电子设备及计算机存储介质。
背景技术
在利用HEVC(High Efficiency Video Coding,高性能视频编码)标准进行编码的过程中,涉及到许多模式决策过程。其中,RDO(Rate Distortion Optimization,率失真优化)是当前业界最重要的视频编码决策技术,其能有效地为视频编码的各个环节选择最优的编码模式,进而提升压缩效率。在编码过程中,编码器尝试对每个可能的模式分别编码,并计算该模式对应的率失真代价,然后选择率失真代价最小的模式作为最优模式,最终将最优模式编码写入码流中。由于编码器需要对每个模式尝试编码,并完成所有编码环节,所以RDO涉及的计算量非常巨大,特别是HEVC标准中增加了众多的编码模式,直接导致RDO计算量成倍增长。
目前,在HEVC的参考软件HM和著名的开源软件x265中,帧内预测编码都采用了粗选和精选的两步搜索策略。在x265中,粗选阶段使用简化的SATD(Sum of Absolute Transformed Differences,绝对变换误差和)算法,便于快速识别可能性较大的最优模式,精选阶段则使用精细的RDO算法,以保证帧内预测编码的压缩效率。
然而,本申请的发明人在具体实施过程中发现:x265的精选阶段的率失真优化代价(RdoCost)存在无效计算的情况,特别是处于候选列表末端的模式作为最优模式的概率非常低,计算这些模式的RdoCost的收益非常低,因而总体上降低了编码速度与编码效率。
技术内容
本申请实施例提供了一种帧内预测编码方法,能够有效减少编码器的计算量,极大提高编码速度与编码效率。其中:
一方面,本申请实施例提供了一种帧内预测编码方法,包括:
确定当前编码块的N个候选帧内预测模式,并将N个候选帧内预测模式保存至候选模式列表,N为正整数;
获取当前编码块的空间相邻编码块与上层编码块分别对应的最优编码模式,并将空间相邻编码块与上层编码块分别对应的最优编码模式保存至相邻模式列表;
基于候选模式列表与相邻模式列表,确定当前编码块的最优编码模式。
另一方面,本申请实施例提供了一种帧内预测编码装置,包括:
第一处理模块,用于确定当前编码块的N个候选帧内预测模式,并将N个候选帧内预测模式保存至候选模式列表,N为正整数;
第二处理模块,用于获取当前编码块的空间相邻编码块与上层编码块分别对应的最优编码模式,并将空间相邻编码块与上层编码块分别对应的最优编码模式保存至相邻模式列表;
确定模块,用于基于候选模式列表与相邻模式列表,确定当前编码块的最优编码模式。
另一方面,本申请实施例提供了一种电子设备,包括存储器和处理器,所述存储器用于存储计算机程序,所述处理器用于执行所述计算机程序以实现上述的帧内预测编码方法。
另一方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被一个或多个处理器执行时实现上述的帧内预测编码方法。
本申请实施例提供的帧内预测编码方法,通过保存当前编码块的N个候选帧内预测模式的候选模式列表,以及保存当前编码块的空间相邻编码块与上层编码块分别对应的最优编码模式的相邻模式列表,确定当前编码块的最优编码模式,使得能够充分利用当前编码块的空间相邻编码块和上层编码块分别对应的最优编码模式,从而辅助编码器自适应地跳过当前编码块的某些编码模式的RDO决策过程,有效地减少了编码器的计算量,极大地提高了编码速度与编码效率。
本申请附加的方面和优点将在下面的描述中部分给出,这些将从下面的描述中变得明显,或通过本申请的实践了解到。
附图简要说明
本申请上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:
图1是本申请实施例的帧内预测编码方法的应用环境示意图;
图2为本申请实施例的帧内预测编码方法的流程示意图;
图3为本申请实施例的空间相邻编码块和上层编码块的示意图;
图4为本申请实施例的高性能视频编码HEVC的四叉树划分示意图;
图5为本申请实施例的帧内预测编码的过程示意图;
图6为根据本申请实施例的利用帧内预测编码方法确定当前编码块的最优编码模式的示意图;
图7为本申请实施例的帧内预测编码装置的结构示意图;
图8为本申请实施例的另一帧内预测编码装置的结构示意图;
图9为本申请实施例的电子设备的结构示意图。
具体实施方式
下面详细描述本申请的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本申请,而不能解释为对本申请的限制。
本技术领域技术人员可以理解,除非特意声明,这里使用的单数形式“一”、“一个”、“所述”和“该”也可包括复数形式。应该进一步理解的是,本申请的说明书中使用的措辞“包括”是指存在所述特征、整数、步骤、操作、元件和/或组件,但是并不排除存在或添加一个或多个其他特征、整数、步骤、操作、元件、组件和/或它们的组合。应该理解,当我们称元件被“连接”或“耦接”到另一元件时,它可以直接连接或耦接到其他元件,或者也可以存在中间元件。此外,这里使用的“连接”或“耦接”可以包括无线连接或无线耦接。这里使用的措辞“和/或”包括一个或更多个相关联的列出项的全部或任一单元和全部组合。
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
下面以具体地实施例对本申请的技术方案以及本申请的技术方案如何解决上述技术问题进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。下面将结合附图,对本申请的实施例进行描述。
图1是本申请实施例的帧内预测编码方法的应用环境示意图。如图1所示,通信系统100包括一个或多个终端设备10和服务器11,其中,终端设备10和服务器11之间通过网络12连接,比如,通过有线或无线网络连接等,用于执行本申请实施例的帧内预测编码方法。
在图1的实施例中,终端设备10可以对数据帧中的编码块进行编码,并将编码后的数据帧通过网络12发送给服务器11或其它设备,或者对接收自服务器11或其它设备的已编码数据帧进行解码。其中,终端设备10可以为手机、平板电脑、笔记本电脑、或个人计算机(PC,Personal Computer)、智能电视等。终端设备10可以安装有客户端,该客户端可以是视频客户端、浏览器客户端或即时通信客户端等。服务器11可以对数据帧中的编码块进行编码,并将编码后的数据帧通过网络12发送给终端设备10或其它设备,或者对接收自终端设备10或其它设备的已编码数据帧进行解码。其中,服务器11可以是单台服务器,也可以是由多台服务器组成的服务器集群,或云计算平台等。
本申请实施例提供了一种帧内预测编码方法,该方法由编码器执行,其中,编码器可以位于服务器中,也可以位于客户端中,还可以位于其它可能的终端设备中,本申请实施例不对其做限制。例如本申请实施例提供的帧内预测编码方法可应用于如图1所示的终端设备中。如图2所示,该帧内预测编码方法包括:
步骤S110,确定当前编码块的N个候选帧内预测模式,并将N个候选帧内预测模式保存至候选模式列表,N为正整数。
在本申请实施例中,编码器可以使用简化的SATD算法,确定当前编码块的N个候选帧内预测模式。编码器在确定出该N个候选帧内预测模式后,可以将该N个候选帧内预测模式保存至相应的列表中,为后续便于区分将该列表记作候选模式列表,即编码器将该N个候选帧内预测模式保存至候选模式列表中,从而为后续确定当前编码块的最优编码模式提供前提保障。
步骤S120,获取当前编码块的空间相邻编码块与上层编码块分别对应的最优编码模式,并将空间相邻编码块与所述上层编码块分别对应的最优编码模式保存至相邻模式列表。
在本申请实施例中,编码器在确定出当前编码块的空间相邻编码块与上层编码块分别对应的最优编码模式后,可以将空间相邻编码块的最优编码模式以及上层编码块的最优编码模式存储至预定的存储空间中。其中,编码器在确定该空间相邻编码块的最优编码模式或上层编码块的最优编码模式的过程中,可以将该空间相邻编码块或上层编码块作为当前编码块,利用本申请实施例的方法确定其最优编码模式。在这种情况下,该空间相邻编码块或上层编码块被作为当前编码块,由编码器确定当前编码块的最优编码模式,从而确定出该空间相邻编码块或上层编码块的最优编码模式。
在本申请实施例中,编码器在确定当前编码块的最优编码模式过程中,需要利用该空间相邻编码块的最优编码模式以及上层编码块的最优编码模式时,可以从预定的 存储空间中获取当前编码块的空间相邻编码块与上层编码块分别对应的最优编码模式。在获取到空间相邻编码块与上层编码块分别对应的最优编码模式后,可以将空间相邻编码块与上层编码块分别对应的最优编码模式保存至列表中,为后续便于区分将该列表记作相邻模式列表,即将空间相邻编码块与上层编码块分别对应的最优编码模式保存至相邻模式列表,从而为后续确定当前编码块的最优编码模式提供前提保障。
步骤S130,基于候选模式列表与相邻模式列表,确定当前编码块的最优编码模式。
在本申请实施例中,编码器在将N个候选帧内预测模式保存至候选模式列表,以及将空间相邻编码块与上层编码块分别对应的最优编码模式保存至相邻模式列表后,可以基于该候选模式列表与该相邻模式列表,确定当前编码块的最优编码模式,从而充分利用当前编码块的空间相邻编码块和上层编码块分别对应的最优编码模式,使得编码器自适应地跳过当前编码块的某些编码模式的RDO决策过程,减少了编码器的计算量,提高了编码速度与编码效率。
本申请实施例提供的帧内预测编码方法,通过保存当前编码块的N个候选帧内预测模式的候选模式列表,以及保存当前编码块的空间相邻编码块与上层编码块分别对应的最优编码模式的相邻模式列表,确定当前编码块的最优编码模式,使得能够充分利用当前编码块的空间相邻编码块和上层编码块分别对应的最优编码模式,从而辅助编码器自适应地跳过当前编码块的某些编码模式的RDO决策过程,有效地减少了编码器的计算量,极大地提高了编码速度与编码效率。
在一种可能的实现方式中,空间相邻编码块包括以下至少一种:紧邻当前编码块且位于当前编码块左侧的第一编码块、紧邻当前编码块且位于当前编码块上侧的第二编码块、紧邻第一编码块且位于第一编码块上侧的第三编码、紧邻第一编码块且位于第一编码块下侧的第四编码块以及紧邻第二编码块且位于第二编码块右侧的第五编码块。
在本申请实施例中,图3给出了空间相邻编码块和上层编码块的示意图,在图3左侧的示意图中,C为当前编码块,L为当前编码块C的空间相邻编码块,A也为当前编码块C的空间相邻块,U为当前编码块C在四叉树结构中的上层编码块,C为U的子编码块之一。其中,L紧邻当前编码块C且位于当前编码块C的左侧,为便于区分可以将L记作第一编码块,即L为紧邻当前编码块且位于当前编码块左侧的第一编码块;A紧邻当前编码块C且位于当前编码块C的上侧,为便于区分可以将A记作第二编码块,即A为紧邻当前编码块且位于当前编码块上侧的第二编码块。当然,空间相邻编码块除可以包括上述的第一编码块与第二编码块之外,还可以包括第三编码块、第四编码块及第五编码块,如图3右侧的示意图所示。在图3右侧的示意图中,C为 当前编码块,L为第一编码块,A为第二编码块,B为紧邻第一编码块L且位于第一编码块L上侧的第三编码块,换言之,B为紧邻第二编码块A且位于第二编码块A左侧的第三编码块,D为紧邻第一编码块L且位于第一编码块L下侧的第四编码块,E为紧邻第二编码块A且位于第二编码块A右侧的第五编码块。
下面均以当前编码块C的空间相邻块包括第一编码块L与第二编码块A为例,对本申请实施例进行具体介绍。
在本申请实施例中,由于当前编码块C的空间相邻块包括第一编码块L与第二编码块A,因此获取当前编码块的空间相邻编码块的最优编码模式,即为获取第一编码块的最优编码模式与第二编码块的最优编码模式,获取当前编码块的空间相邻编码块与上层编码块分别对应的最优编码模式,即为获取第一编码块的最优编码模式、第二编码块的最优编码模式以及上层编码块的最优编码模式。
在本申请实施例中,在获取到第一编码块的最优编码模式、第二编码块的最优编码模式以及上层编码块的最优编码模式之后,可以依据预先设定的顺序(记作第二预定顺序),将第一编码块的最优编码模式、第二编码块的最优编码模式以及上层编码块的最优编码模式,依次保存至相邻模式列表。其中,该第二预定顺序可以为先将第一编码块的最优编码模式保存至相邻模式列表,再将第二编码块的最优编码模式保存至相邻模式列表,再将上层编码块的最优编码模式保存至相邻模式列表,当然也可以为其它的写入顺序,本申请实施例不对其做限制。换言之,依据第二预定顺序,将第一编码块的最优编码模式、第二编码块的最优编码模式以及上层编码块的最优编码模式,依次保存至相邻模式列表。
在本申请实施例中,HEVC采用灵活的四叉树编码块划分结构,最大的编码块是CTU(Coding Tree Unit,编码树单元),其尺寸为64x64像素。如图4所示,CTU可继续递归地往下划分为更小的CU(Coding Unit,编码单元),即CTU可继续划分为4个32x32的CU,每个32x32的CU可继续划分为4个16x16的CU,直到CU为8x8,不能继续划分为止。于是,获取当前编码块的空间相邻编码块与上层编码块分别对应的最优编码模式的过程,包括如下几种情况:
(1)若当前编码块C处于图像的最左侧,则当前编码块C的左侧不存在其它编码块,即紧邻当前编码块C且位于当前编码块C的左侧的编码块L,超出了图像边界,此时可以使用直流模式作为编码块L的最优编码模式,即在相邻模式列表中,将第一编码块的最优编码模式替换为直流模式。
(2)若当前编码块C处于图像的最上侧,则当前编码块C的上侧不存在其它编码块,即紧邻当前编码块C且位于当前编码块C的上侧的编码块A,超出了图像边界, 此时可以使用直流模式作为编码块A的最优编码模式,即在相邻模式列表中,将第二编码块的最优编码模式替换为直流模式。
(3)若当前编码块C的大小为32*32像素,则当前编码块C即为最大的帧内预测编码块,其在四叉树结构中不存在上层编码块,即编码块C不是其它编码块的子编码块,也即当前编码块C在四叉树结构中的上层编码块U,超出了最大的帧内预测编码块的边界,此时可以使用直流模式作为编码块U的最优编码模式,即在相邻模式列表中,将上层编码块的最优编码模式替换为直流模式。
(4)当第一编码块、第二编码块以及上层编码块中的任一种未超出图像边界时,获取预存储的该未超出图像边界的编码块的最优编码模式。
换言之,获取当前编码块的空间相邻编码块与上层编码块分别对应的最优编码模式的过程,具体包括:当第一编码块和/或第二编码块超出图像边界时,将直流模式作为超出图像边界的编码块的最优编码模式;以及当上层编码块超出最大的帧内预测编码块的边界时,将直流模式作为上层编码块的最优编码模式。其中,第一编码块、第二编码块可超出编码树单元边界或slice(条带)边界,不受视频编码标准中关于获取空间相邻编码块的编码信息的约束。
在又一种可能的实现方式中,在确定当前编码块的N个候选帧内预测模式的过程中,N的大小(即候选模式列表的长度)取决于当前编码块的大小和用户设置的率失真档位RdLevel,其中,N随着编码块大小的减小而增加,随着RdLevel的增大而增大,如表1所示。因此,在确定当前编码块的N个候选帧内预测模式的过程中,首先需要根据用户设置的RdLevel和当前编码块的大小,计算当前编码块的候选模式列表的长度N,其中,当前编码块的大小对于编码器来说是已知的。
表1候选模式列表长度N的取值
Figure PCTCN2020078147-appb-000001
在本申请实施例中,在计算出当前编码块的候选模式列表的长度N后,接着计算多个预定帧内预测模式分别对应的预定率失真优化代价值,其中,预定率失真优化代 价值可以为绝对变换误差和代价值(记作satdCost),为方便介绍后续使用satdCost这一预定率失真优化代价值进行介绍。在计算出各个预定帧内预测模式分别对应的预定率失真优化代价值(satdCost)后,对计算得到的各个satdCost按照第一预定顺序进行排序,并将排序后的前N个帧内预测模式作为当前编码块的候选帧内预测模式,接着将该N个候选帧内预测模式保存至候选模式列表中。
其中,上述的多个预定帧内预测模式为HEVC标准的35种帧内预测模式,计算多个预定帧内预测模式分别对应的satdCost,即计算35种帧内预测模式分别对应的satdCost。
在本申请实施例中,计算多个预定帧内预测模式分别对应的satdCost的过程中,可以根据该35种帧内预测模式分别计算当前编码块的预测值,接着依据计算出的各个帧内预测模式分别对应的预测值,计算各个帧内预测模式分别对应的satd(绝对变换误差和)和比特数bits,接着根据各个帧内预测模式分别对应的satd(绝对变换误差和)和比特数bits,计算各个帧内预测模式分别对应的satdCost。
在本申请实施例中,上述第一预定顺序可以为从小到大的排列顺序,也可以为其它排列顺序,本申请实施例不对其做限制。如果上述的第一预定顺序为从小到大的排列顺序,则在计算出各个预定帧内预测模式分别对应的satdCost后,可以对各个satdCost按照从小到大的排列顺序进行排序,接着,将排序后的前N个帧内预测模式作为当前编码块的候选帧内预测模式,即从35种帧内预测模式分别对应的satdCost中,选取satdCost最小的N个帧内预测模式,作为当前编码块的候选帧内预测模式,并按N个satdCost从小到大的顺序,将该N个satdCost对应的帧内预测模式保存至候选模式列表中,作为当前编码块的候选帧内预测模式,在实际应用中,该候选模式列表可以记作RdoCandList。
换言之,本实现方式中的确定当前编码块的N个候选帧内预测模式,可以概括为:按照第一预定顺序,对多个预定帧内预测模式分别对应的绝对变换误差和代价值进行排序,并将排序后的前N个帧内预测模式作为当前编码块的候选帧内预测模式。将N个候选帧内预测模式保存至候选模式列表,可以概括为:依据第一预定顺序,将N个候选帧内预测模式,依次保存至候选模式列表。
在又一种可能的实现方式中,在基于候选模式列表与相邻模式列表,确定当前编码块的最优编码模式的过程中,可以先确定候选模式列表中首个索引值对应的候选帧内预测模式或第二个索引值对应的候选帧内预测模式是否存在于相邻模式列表中;接着,如果首个索引值对应的候选帧内预测模式或者第二个索引值对应的候选帧内预测模式存在于相邻模式列表中,则将N更新为首个索引值增加第一预设数值或者第二个 索引值增加第一预设数值,并基于更新后的N确定当前编码块的最优编码模式;接着,如果首个索引值对应的候选帧内预测模式与第二个索引值对应的候选帧内预测模式均不存在于相邻模式列表中,则基于相邻模式列表,确定当前编码块的最优编码模式。
其中,上述的第一预设数值可以为1,也可以根据需要设定为其它值,本申请实施例不对其做限制,下面以第一预设数值为1作为示例,对本实现方式进行详细介绍。
在本申请实施例中,当候选模式列表中的首个索引值对应的候选帧内预测模式存在于相邻模式列表中时,则对N进行更新。其中,在对N进行更新时,若候选模式列表中的首个索引值对应的候选帧内预测模式存在于相邻模式列表中,则将N更新为该首个索引值加1(1即为第一预设数值),若候选模式列表中首个索引值对应的候选帧内预测模式不存在于相邻模式列表中,且第二个索引值对应的候选帧内预测模式存在于相邻模式列表中,则将N更新为该第二个索引值加1(1即为第一预设数值)。在完成N的更新以后,可以基于更新后的N确定当前编码块的最优编码模式。
在本申请实施例中,在基于更新后的N确定当前编码块的最优编码模式的过程中,可以首先确定更新后的N是否等于第二预设数值;接着,若更新后的N等于第二预设数值,则将候选模式列表中的首个索引值对应的候选帧内预测模式确定为当前编码块的最优编码模式;接着,若更新后的N不等于第二预设数值,则基于该更新后的N,根据候选模式列表,确定当前编码块的最优编码模式。其中,上述的第二预设数值可以为1,也可以根据需要设定为其它值,本申请实施例不对其做限制,本申请实施例根据需要将第二预设数值取值为1。
在本申请实施例中,若候选模式列表的首个索引值对应的候选帧内预测模式与第二个索引值对应的候选帧内预测模式均不存在于相邻模式列表中,则基于相邻模式列表与候选模式列表,确定当前编码块的最优编码模式。
其中,在基于相邻模式列表与候选模式列表确定当前编码块的最优编码模式的过程中,可以首先确定相邻模式列表的首个索引值对应的最优编码模式与该相邻模式列表的第二个索引值对应的最优编码模式是否相同;接着,如果两者相同,即相邻模式列表中首个索引值对应的最优编码模式与第二个索引值对应的最优编码模式相同,则确定该首个索引值对应的最优编码模式在候选模式列表中的候选索引值(记作nIdx),并基于该候选索引值与候选模式列表确定当前编码块的最优编码模式;接着,如果两者不相同,即相邻模式列表中首个索引值对应的最优编码模式与第二个索引值对应的最优编码模式不相同,则根据候选模式列表,确定当前编码块的最优编码模式。
在本申请实施例中,确定相邻模式列表的首个索引值对应的最优编码模式在候选模式列表中的候选索引值的过程中,首先可以确定该首个索引值对应的最优编码模式 是否存在于该候选模式列表中;如果该首个索引值对应的最优编码模式存在于该候选模式列表中,则将候选索引值确定为该候选模式列表中的首个索引值对应的最优编码模式在该候选模式列表中的索引值,即将该首个索引值对应的最优编码模式在候选模式列表中的索引值确定为候选索引值。如果该首个索引值对应的最优编码模式不存在于该候选模式列表中,则将N减第三预定数值确定为候选索引值,其中,第三预设数值可以为1,也可以根据需要设定为其它值,本申请实施例不对其做限制,本申请实施例根据需要将第三预设数值取值为1,即将候选索引值确定为N减1(即N-1)。
在本申请实施例中,在确定出候选索引值,基于候选索引值与候选模式列表确定当前编码块的最优编码模式的过程中,可以先将N更新为确定出的候选索引值(nIdx)增加第四预设数值,接着基于更新后的N,根据候选模式列表,确定当前编码块的最优编码模式。其中,上述的第四预设数值可以为1,也可以根据需要设定为其它值,本申请实施例不对其做限制,本申请实施例根据需要将第四预设数值取值为1,即将N更新为nIdx+1。
在本申请实施例中,上述的根据候选模式列表确定当前编码块的最优编码模式的过程中,可以先确定候选模式列表当前包括的各个候选帧内预测模式分别对应的率失真代价值;接着确定各个率失真代价值中的最小值,并将该最小值对应的候选帧内预测模式确定为当前编码块的最优编码模式。
其中,确定候选模式列表当前包括的各个候选帧内预测模式分别对应的率失真代价值的过程中,针对任一候选帧内预测模式,其率失真代价值的计算过程具体可以为:先确定该任一候选帧内预测模式的预定预测值;接着根据确定出的预定预测值,计算该任一候选帧内预测模式的编码失真(例如平方误差和SSD失真),以及对该任一候选帧内预测模式编码(例如熵编码)后的比特数;接着根据计算得到的编码失真(例如SSD失真)与比特数,计算该任一候选帧内预测模式的率失真优化代价值。
图5给出了本申请实施例的帧内预测编码过程的示意图。在图5中,相邻编码块包括当前编码块左边的编码块(即第一编码块)和上边的编码块(即第二编码块),将候选模式列表记作RdoCandList,将相邻模式列表记作nbModeList,将绝对变换误差和代价值记作satdCost,将率失真优先代价值记作RdoCost,候选模式列表中首个索引值对应的候选帧内预测模式记作RdoCandList[0],候选模式列表中第二个索引值对应的候选帧内预测模式记作RdoCandList[1],相邻模式列表中首个索引值对应的候选帧内预测模式记作nbModeList[0],相邻模式列表中第二个索引值对应的候选帧内预测模式记作nbModeList[1]。同时,为方便描述,将上述和第一预设数值、第二预设数值、第三预设数值及第四预设数值等均取值为1,将候选索引值记作nIdx。
其中,图5中的流程由编码器执行,编码器可以位于服务器中,也可以位于客户端中,还可以位于其它可能的终端设备中,本申请实施例不对其做限制,图5的流程大体可以描述为如下步骤:
步骤S401,计算候选模式列表RdoCandList的长度N。具体地,根据用户设置的RdLevel和当前编码块的大小,计算当前编码块精选阶段的候选模式列表的长度N;
步骤S402,计算35种帧内预测模式的satdCost。具体地,对35种帧内预测模式,分别使用各模式计算当前编码块的预测值,并计算SATD失真和估计比特数bits,进而计算得出satdCost;
步骤S403,选取satdCost最小的N种帧内预测模式,并保存到RdoCandList。具体地,从35种帧内预测模式的satdCost中,选取satdCost最小的N个帧内预测模式作为候选帧内预测模式,并按对应的satdCost从小到大的顺序依次写入RdoCandList中;
步骤S404,获取相邻模式列表nbModeList。具体地,获取当前编码块左边的编码块的最佳帧内模式、当前编码块上边的编码块的最佳帧内模式、以及当前编码块的上层编码块的最佳帧内模式,并按顺序写入nbModeList中;
步骤S405,执行第一快速条件判决,即判断RdoCandList[i]是否存在于相邻模式列表nbModeList中,若存在,则执行步骤S406,否则执行步骤S409,其中,i=0,1;
步骤S406,令N等于i+1;
步骤S407,执行第二快速条件判决,即判断N是否等于1,若等于,则执行步骤S408,否则执行步骤S412;
步骤S408,判决RdoCandList[0]为当前编码块的最优编码模式,流程结束;
步骤S409,执行第三快速条件判决,即判断nbModeList[0]是否等于nbModeList[1],若相等,则执行步骤S410,否则执行步骤S412;
步骤S410,计算nbModeList[0]在RdoCandList中的索引nIdx。具体地,若nbModeList[0]在RdoCandList中存在,则nIdx为nbModeList[0]在RdoCandList中的索引,否则令nIdx为N-1;
步骤S411,令N等于nIdx+1;
步骤S412,计算RdoCandList中候选帧内预测模式的RdoCost。具体地,分别使用RdoCandList中的前N种候选帧内预测模式计算当前编码块的预测值,并依据计算出的各个预测值,分别计算当前编码块的编码失真(例如SSD失真)和编码(例如熵编码)之后的比特数bits,接着,依据计算出的编码失真(例如SSD失真)和编码(例如熵编码)之后的比特数bits,分别计算每个候选帧内预测模式对应的RdoCost;
步骤S413,选择RdoCost最小的候选帧内预测模式为当前编码块的最优编码模式,流程结束。
另外,在x265中对本申请实施例的帧内预测编码方法进行测试时,测试数据显示,该方法可平均节省编码时间接近30%,等价于提高编码速度42%,而BD-rate只增加了0.8%。可见,该方法在显著降低编码复杂度的同时,对压缩效率基本没有影响。其中,测试数据如表2所示,测试条件具体如下所示:
(1)处理器Intel(R)Xeon(R)CPU E5-2670v3@2.30GHz 48核,内存128GB;
(2)HEVC标准测试序列;
(3)x265:全I帧配置,preset为slow,固定QP(Quantization Parameter,量化参数);
(4)测试点:QP为22、27、32、37。
表2本申请实施例的帧内预测编码方法的测试数据
标准测试序列类别 BD-rate(%) 编码时间节省(%)
B 0.8 -29.94
C 0.8 -30.94
D 0.8 -29.28
E 0.9 -28.97
F 0.7 -29.67
All 0.8 -29.81
图6给出了根据本申请实施例的利用帧内预测编码方法确定当前编码块的最优编码模式的示意图。其中,图6以空间相邻编码块包括当前编码块左侧的编码块(即第一编码块)和上侧的编码块(即第二编码块)为例进行介绍,并假定第一预设数值、第二预设数值、第三预设数值及第四预设数值均为1。在图6的相邻模式列表中,nbEM_1表示第一编码块的最优编码模式,nbEM_2表示第二编码块的最优编码模式,nbEM_3表示当前编码块的上层编码块的最优编码模式。在图6的候选模式列表中,CandEM_1表示候选模式列表的首个索引对应的帧内预测模式,CandEM_2表示候选模式列表的第二个索引对应的帧内预测模式,依此类推,CandEM_N表示候选模式列表的第N个索引对应的帧内预测模式。
在图6中,确定当前编码块的最优编码模式的过程是由编码器执行的,其中,编码器可以位于服务器中,也可以位于客户端中,还可以位于其它可能的终端设备中,本申请实施例不对其做限制,该过程具体可以为:
首先判断候选模式列表中首个索引值对应的候选帧内预测模式或者第二个索引值对应的候选帧内预测模式是否存在于相邻模式列表中,若候选模式列表中首个索引值对应的候选帧内预测模式存在于相邻模式列表中,则将N更新为首个索引值增加1,并判断更新后的N是否等于1,如果等于1,则将该首个索引值对应的候选帧内预测模式确定为当前编码块的最优编码模式,例如将CandEM_1确定为当前编码块的最优编码模式,如果不等于1,则基于该更新后的N,根据候选模式列表,确定当前编码块的最优编码模式,例如将CandEM_3确定为当前编码块的最优编码模式。
接着,若候选模式列表中首个索引值对应的候选帧内预测模式不存在于相邻模式列表中,且第二个索引值对应的候选帧内预测模式存在于相邻模式列表中,则将N更新为第二个索引值增加1,并判断更新后的N是否等于1,如果等于1,则将该第二个索引值对应的候选帧内预测模式确定为当前编码块的最优编码模式,例如,将CandEM_2确定为当前编码块的最优编码模式,如果不等于1,则基于该更新后的N,根据候选模式列表,确定当前编码块的最优编码模式,例如将CandEM_3确定为当前编码块的最优编码模式。
接着,若候选模式列表中首个索引值对应的候选帧内预测模式与候选模式列表中第二个索引值对应的候选帧预测模式均不存在于相邻模式列表中,则基于相邻模式列表与候选模式列表,确定当前编码块的最优编码模式。其中,基于候选索引值与候选模式列表,确定当前编码块的最优编码模式,具体可以为:判断相邻模式列表中首个索引值对应的最优编码模式与第二个索引值对应的最优编码模式是否相同,如果相同,则确定该首个索引值对应的最优编码模式在候选模式列表中的候选索引值(记作nIdx),并将N更新为候选索引值增加1(记作N=nIdx+1),并基于更新后的N,根据候选模式列表,确定当前编码块的最优编码模式;如果不相同,则根据候选模式列表,确定当前编码块的最优编码模式。
在本申请实施例中,确定首个索引值对应的最优编码模式在候选模式列表中的候选索引值的过程,具体可以为:若首个索引值对应的最优编码模式存在于候选模式列表中,则将该候选索引值确定为该首个索引值对应的最优编码模式在候选模式列表中的索引值;若首个索引值对应的最优编码模式不存在于候选模式列表中,将候选索引值确定为N减1。
在本申请实施例中,上述根据候选模式列表,确定当前编码块的最优编码模式的过程,具体可以为:计算候选模式列表中候选帧内预测模式的率失真代价值(记作RdoCost),并选择RdoCost最小的候选帧内预测模式为当前编码块最终的最优模式,例如选择CandEM_3为当前编码块最终的最优模式。其中,计算候选模式列表中候选 帧内预测模式的率失真代价值具体可以为:分别使用候选模式列表中的前N种候选帧内预测模式计算当前编码块的预测值,并依据计算出的各个预测值,分别计算当前编码块的编码失真(例如SSD失真)和编码(例如熵编码)之后的比特数bits,接着,依据计算出的编码失真(例如SSD失真)和编码(例如熵编码)之后的比特数bits,分别计算每个候选帧内预测模式对应的RdoCost。
本申请实施例中,利用当前编码块的空间相邻块和上层编码块分别对应的最优编码模式,辅助编码器自适应地跳过当前编码块的某些编码模式的RDO决策过程,有效地减少了编码器的计算量,极大地提高了编码速度与编码效率。
图7为本申请实施例提供的一种帧内预测编码装置的结构示意图。如图7所示,该装置60可以包括第一处理模块61、第二处理模块62及确定模块63,其中:
第一处理模块61用于确定当前编码块的N个候选帧内预测模式,并将N个候选帧内预测模式保存至候选模式列表,N为正整数;
第二处理模块62用于获取当前编码块的空间相邻编码块与上层编码块分别对应的最优编码模式,并将空间相邻编码块与上层编码块分别对应的最优编码模式保存至相邻模式列表;
确定模块63用于基于候选模式列表与相邻模式列表,确定当前编码块的最优编码模式。
本申请实施例提供的装置,通过保存当前编码块的N个候选帧内预测模式的候选模式列表,以及保存当前编码块的空间相邻编码块与上层编码块分别对应的最优编码模式的相邻模式列表,确定当前编码块的最优编码模式,使得能够充分利用当前编码块的空间相邻块和上层编码块分别对应的最优编码模式,从而自适应地跳过当前编码块的某些编码模式的RDO决策过程,有效地减少了编码器的计算量,极大地提高了编码速度与编码效率。
图8为本申请实施例提供的另一种帧内预测编码装置的结构示意图。如图8所示,该装置70可以包括第一处理模块71、第二处理模块72及确定模块73,其中,图8中的第一处理模块71所实现的功能与图7中的第一处理模块61相同,图8中的第二处理模块72所实现的功能与图7中的第二处理模块62相同,图8中的推荐模块73所实现的功能与图7中的推荐模块63相同,在此不再赘述。下面对图8所示的帧内预测编码装置进行详细介绍:
在本申请实施例中,空间相邻编码块包括以下至少一种:紧邻当前编码块且位于当前编码块左侧的第一编码块、紧邻当前编码块且位于当前编码块上侧的第二编码块、紧邻第一编码块且位于第一编码块上侧的第三编码、紧邻第一编码块且位于第一编码 块下侧的第四编码以及紧邻第二编码块且位于第二编码块右侧的第五编码。
第二处理模块72具体用于获取第一编码块、第二编码块、第三编码块、第四编码块以及第五编码中至少一种的最优编码模式,以及上层编码块的最优编码模式。
在本申请实施例中,第一处理模块71具体用于按照第一预定顺序,对多个预定帧内预测模式分别对应的预定率失真优化代价值进行排序,并将排序后的前N个帧内预测模式作为当前编码块的候选帧内预测模式;以及用于依据第一预定顺序,将N个候选帧内预测模式,依次保存至候选模式列表;
第二处理模块72具体用于依据第二预定顺序,将第一编码块、第二编码块、第三编码块、第四编码块以及第五编码中至少一种的最优编码模式,以及上层编码块的最优编码模式,依次保存至相邻模式列表。
在本申请实施例中,第二处理模块72具体用于当第一编码块、第二编码块、第三编码块、第四编码块以及第五编码块中的任一种未超出图像边界时,获取预存储的该未超出图像边界的编码块的最优编码模式;以及当第一编码块、第二编码块、第三编码块、第四编码块以及第五编码块中的任一种超出图像边界时,将直流模式作为超出图像边界的编码块的最优编码模式;以及当上层编码块未超出图像边界时,获取预存储的该上层编码块的最优编码模式;以及当上层编码块超出最大的帧内预测编码块边界时,将直流模式作为上层编码块的最优编码模式。
在本申请实施例中,确定模块73包括第一确定子模块731、第一模式确定子模块732、第二模式确定子模块733与第三模式确定子模块734,其中:
第一确定子模块731用于确定候选模式列表中首个索引值对应的候选帧内预测模式或第二个索引值对应的候选帧内预测模式是否存在于相邻模式列表中;
第一模式确定子模块732用于当候选模式列表中首个索引值对应的候选帧内预测模式存在于相邻模式列表中,则将N更新为首个索引值增加第一预设数值,基于更新后的N确定当前编码块的最优编码模式;
第二模式确定子模块733用于当候选模式列表中首个索引值对应的候选帧内预测模式不存在于相邻模式列表中,且候选模式列表中第二个索引值对应的候选帧内预测模式存在于相邻模式列表中,则将N更新为第二个索引值增加第一预设数值,并基于更新后的N确定当前编码块的最优编码模式;
第三模式确定子模块734用于当首个索引值对应的候选帧内预测模式与第二个索引值对应的候选帧内预测模式均不存在于相邻模式列表中时,基于相邻模式列表与候选模式列表,确定当前编码块的最优编码模式。
在本申请实施例中,第一模式确定子模块732具体用于当更新后的N等于第二预 设数值时,将首个索引值对应的候选帧内预测模式确定为当前编码块的最优编码模式;以及当更新后的N不等于第二预设数值时,基于该更新后的N,根据候选模式列表,确定当前编码块的最优编码模式。
在本申请实施例中,第二模式确定子模块733具体用于当相邻模式列表中首个索引值对应的最优编码模式与第二个索引值对应的最优编码模式相同时,确定首个索引值对应的最优编码模式在候选模式列表中的候选索引值,并基于候选索引值与候选模式列表,确定当前编码块的最优编码模式;以及用于当相邻模式列表中首个索引值对应的最优编码模式与第二个索引值对应的最优编码模式不相同时,根据候选模式列表,确定当前编码块的最优编码模式。
在本申请实施例中,第二模式确定子模块733具体用于当首个索引值对应的最优编码模式存在于候选模式列表中时,将首个索引值对应的最优编码模式在候选模式列表中的索引值确定为候选索引值;以及当首个索引值对应的最优编码模式不存在于候选模式列表中时,将N减第三预定数值确定为候选索引值。
在本申请实施例中,第二模式确定子模块733具体用于将N更新为候选索引值增加第四预设数值,并基于更新后的N,根据候选模式列表,确定当前编码块的最优编码模式。
在本申请实施例中,确定模块73包括代价值确定子模块735与编码模式确定子模块736;
代价值确定子模块735用于确定候选模式列表当前包括的各个候选帧内预测模式分别对应的率失真代价值;
编码模式确定子模块736用于确定各个率失真代价值中的最小值,并将该最小值对应的候选帧内预测模式确定为当前编码块的最优编码模式。
在本申请实施例中,代价值确定子模块735具体用于确定任一候选帧内预测模式的预定预测值;以及用于根据预定预测值,计算任一候选帧内预测模式的编码失真,以及对任一候选帧内预测模式编码后的比特数;以及用于根据编码失真与比特数,计算任一候选帧内预测模式的率失真优化代价值。
本申请实施例提供了一种电子设备,如图9所示,图9所示的电子设备800包括:处理器801和存储器803。其中,处理器801和存储器803相连,如通过总线802相连。进一步地,电子设备800还可以包括收发器804。实际应用中收发器804可以不限于一个,该电子设备800的结构并不构成对本申请实施例的限定。
其中,处理器801应用于本申请实施例中,用于实现图7与图8所示的第一处理模块、第二处理模块及确定模块的功能。
处理器801可以是CPU,通用处理器,DSP,ASIC,FPGA或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器801也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等。
总线802可包括一通路,在上述组件之间传送信息。总线802可以是PCI总线或EISA总线等。总线802可以分为地址总线、数据总线、控制总线等。为便于表示,图9中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
存储器803可以是ROM或可存储静态信息和指令的其他类型的静态存储设备,RAM或者可存储信息和指令的其他类型的动态存储设备,也可以是EEPROM、CD-ROM或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。
存储器803用于存储执行本申请方案的应用程序代码,并由处理器801来控制执行。处理器801用于执行存储器803中存储的应用程序代码,以实现图7或图8所示实施例提供的帧内预测编码装置的功能。
本申请实施例提供的另一种电子设备,包括存储器和处理器,该存储器上存储可在处理器上运行的计算机程序,该处理器执行该计算机程序时,可实现上述实施例所述的帧内预测编码方法。
本申请实施例提供了一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,该计算机程序被一个或多个处理器执行时实现上述实施例所述的帧内预测编码方法。通过保存当前编码块的N个候选帧内预测模式的候选模式列表,以及保存当前编码块的空间相邻编码块与上层编码块分别对应的最优编码模式的相邻模式列表,确定当前编码块的最优编码模式,使得能够充分利用当前编码块的空间相邻编码块和上层编码块分别对应的最优编码模式,从而辅助编码器自适应地跳过当前编码块的某些编码模式的RDO决策过程,有效地减少了编码器的计算量,极大地提高了编码速度与编码效率。
本申请实施例提供的计算机可读存储介质适用于上述方法的任一实施例。
应该理解的是,虽然附图的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,其可以以其他的顺序执行。而且,附图的流程图中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,其执行顺序也不必然是依次 进行,而是可以与其他步骤或者其他步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。
以上所述仅是本申请的部分实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本申请的保护范围。

Claims (20)

  1. 一种帧内预测编码方法,由编码器执行,包括:
    确定当前编码块的N个候选帧内预测模式,并将所述N个候选帧内预测模式保存至候选模式列表,N为正整数;
    获取当前编码块的空间相邻编码块与上层编码块分别对应的最优编码模式,并将所述空间相邻编码块与所述上层编码块分别对应的最优编码模式保存至相邻模式列表;
    基于所述候选模式列表与所述相邻模式列表,确定当前编码块的最优编码模式。
  2. 根据权利要求1所述的方法,其中,所述空间相邻编码块包括以下至少一种:紧邻当前编码块且位于当前编码块左侧的第一编码块、紧邻当前编码块且位于当前编码块上侧的第二编码块、紧邻所述第一编码块且位于所述第一编码块上侧的第三编码块、紧邻所述第一编码块且位于所述第一编码块下侧的第四编码块以及紧邻所述第二编码块且位于所述第二编码块右侧的第五编码块;
    所述获取当前编码块的空间相邻编码块与上层编码块分别对应的最优编码模式,包括:
    获取所述第一编码块、所述第二编码块、所述第三编码块、所述第四编码块以及所述第五编码块中至少一种的最优编码模式、以及所述上层编码块的最优编码模式。
  3. 根据权利要求2所述的方法,其中,所述确定当前编码块的N个候选帧内预测模式,包括:
    按照第一预定顺序,对多个预定帧内预测模式分别对应的预定率失真优化代价值进行排序,并将排序后的前N个帧内预测模式作为当前编码块的候选帧内预测模式;
    所述将N个候选帧内预测模式保存至候选模式列表,包括:
    依据所述第一预定顺序,将所述N个候选帧内预测模式,依次保存至所述候选模式列表;
    所述将所述空间相邻编码块与所述上层编码块分别对应的最优编码模式保存至相邻模式列表,包括:
    依据第二预定顺序,将所述第一编码块、所述第二编码块、所述第三编码块、所述第四编码块以及所述第五编码块中至少一种的最优编码模式以及所述上层编码块的最优编码模式,依次保存至所述相邻模式列表。
  4. 根据权利要求2或3所述的方法,其中,所述获取所述第一编码块、所述第二编码块、所述第三编码块、所述第四编码块以及所述第五编码块中至少一种的最优编码模式、以及所述上层编码块的最优编码模式,包括:
    当所述第一编码块、所述第二编码块、所述第三编码块、所述第四编码块以及所述第五编码块中的任一种未超出图像边界时,获取预存储的该未超出图像边界的编码块的最优编码模式;
    当所述第一编码块、所述第二编码块、所述第三编码块、所述第四编码块以及所述第五编码块中的任一种超出图像边界时,将直流模式作为超出所述图像边界的编码块的最优编码模式;
    当所述上层编码块未超出图像边界时,获取预存储的该上层编码块的最优编码模式;
    当所述上层编码块超出最大的帧内预测编码块边界时,将直流模式作为所述上层编码块的最优编码模式。
  5. 根据权利要求1所述的方法,其中,基于所述候选模式列表与所述相邻模式列表,确定当前编码块的最优编码模式,包括:
    确定所述候选模式列表中首个索引值对应的候选帧内预测模式或第二个索引值对应的候选帧内预测模式是否存在于所述相邻模式列表中;
    若所述候选模式列表中首个索引值对应的候选帧内预测模式存在于所述相邻模式列表中,则将所述N更新为所述首个索引值增加第一预设数值,基于更新后的N确定当前编码块的最优编码模式;
    若所述候选模式列表中首个索引值对应的候选帧内预测模式不存在于所述相邻模式列表中,且所述候选模式列表中第二个索引值对应的候选帧内预测模式存在于所述相邻模式列表中,则将所述N更新为所述第二个索引值增加第一预设数值,并基于更新后的N确定当前编码块的最优编码模式;
    若所述候选模式列表中首个索引值对应的候选帧内预测模式与所述候选模式列表中第二个索引值对应的候选帧预测模式均不存在于所述相邻模式列表中,则基于所述相邻模式列表与所述候选模式列表,确定当前编码块的最优编码模式。
  6. 根据权利要求5所述的方法,其中,所述基于更新后的N确定当前编码块的最优编码模式,包括:
    当更新后的N等于第二预设数值时,将所述首个索引值对应的候选帧内预测模式确定为当前编码块的最优编码模式;
    当更新后的N不等于第二预设数值时,基于该更新后的N,根据所述候选模式列表,确定当前编码块的最优编码模式。
  7. 根据权利要求5所述的方法,其中,所述基于所述相邻模式列表与所述候选模式列表,确定当前编码块的最优编码模式,包括:
    当所述相邻模式列表中首个索引值对应的最优编码模式与第二个索引值对应的最优编码模式相同时,确定所述首个索引值对应的最优编码模式在所述候选模式列表中的候选索引值,并基于所述候选索引值与所述候选模式列表,确定当前编码块的最优编码模式;
    当所述相邻模式列表中首个索引值对应的最优编码模式与第二个索引值对应的最优编码模式不相同时,根据所述候选模式列表,确定当前编码块的最优编码模式。
  8. 根据权利要求7所述的方法,其中,所述确定所述首个索引值对应的最优编码模式在所述候选模式列表中的候选索引值,包括:
    当所述首个索引值对应的最优编码模式存在于所述候选模式列表中时,将所述首个索引值对应的最优编码模式在所述候选模式列表中的索引值确定为所述候选索引值;
    当所述首个索引值对应的最优编码模式不存在于所述候选模式列表中时,将所述N减第三预定数值确定为所述候选索引值。
  9. 根据权利要求8所述的方法,其中,所述基于所述候选索引值与所述候选模式列表,确定当前编码块的最优编码模式,包括:
    将所述N更新为所述候选索引值增加第四预设数值,并基于更新后的N,根据所述候选模式列表,确定当前编码块的最优编码模式。
  10. 根据权利要求6-9任一项所述的方法,其中,所述根据所述候选模式列表,确定当前编码块的最优编码模式,包括:
    确定所述候选模式列表当前包括的各个候选帧内预测模式分别对应的率失真 代价值;
    确定各个率失真代价值中的最小值,并将该最小值对应的候选帧内预测模式确定为当前编码块的最优编码模式。
  11. 根据权利要求10所述的方法,其中,所述确定所述候选模式列表当前包括的各个候选帧内预测模式分别对应的率失真代价值,包括:
    确定候选帧内预测模式的预定预测值;
    根据所述预定预测值,计算所述候选帧内预测模式的编码失真,以及对所述候选帧内预测模式编码后的比特数;
    根据所述编码失真与所述比特数,计算所述候选帧内预测模式的率失真优化代价值。
  12. 一种帧内预测编码装置,包括:
    第一处理模块,用于确定当前编码块的N个候选帧内预测模式,并将所述N个候选帧内预测模式保存至候选模式列表,N为正整数;
    第二处理模块,用于获取当前编码块的空间相邻编码块与上层编码块分别对应的最优编码模式,并将所述空间相邻编码块与所述上层编码块分别对应的最优编码模式保存至相邻模式列表;
    确定模块,用于基于所述候选模式列表与所述相邻模式列表,确定当前编码块的最优编码模式。
  13. 根据权利要求12所述的装置,其中,所述空间相邻编码块包括以下至少一种:紧邻当前编码块且位于当前编码块左侧的第一编码块、紧邻当前编码块且位于当前编码块上侧的第二编码块、紧邻所述第一编码块且位于所述第一编码块上侧的第三编码块、紧邻所述第一编码块且位于所述第一编码块下侧的第四编码块以及紧邻所述第二编码块且位于所述第二编码块右侧的第五编码块;
    所述第二处理模块用于获取所述第一编码块、所述第二编码块、所述第三编码块、所述第四编码块以及所述第五编码块中至少一种的最优编码模式、以及所述上层编码块的最优编码模式。
  14. 根据权利要求13所述的装置,其中,所述第一处理模块用于按照第一预定顺序,对多个预定帧内预测模式分别对应的预定率失真优化代价值进行排序,并将排序后的前N个帧内预测模式作为当前编码块的候选帧内预测模式;以及用于依据所述 第一预定顺序,将所述N个候选帧内预测模式,依次保存至所述候选模式列表;
    所述第二处理模块用于依据第二预定顺序,将所述第一编码块、所述第二编码块、所述第三编码块、所述第四编码块以及所述第五编码块中至少一种的最优编码模式以及所述上层编码块的最优编码模式,依次保存至所述相邻模式列表。
  15. 根据权利要求13或14所述的装置,其中,所述第二处理模块用于当所述第一编码块、所述第二编码块、所述第三编码块、所述第四编码块以及所述第五编码块中的任一种未超出图像边界时,获取预存储的该未超出图像边界的编码块的最优编码模式;以及当所述第一编码块、所述第二编码块、所述第三编码块、所述第四编码块以及所述第五编码块中的任一种超出图像边界时,将直流模式作为超出所述图像边界的编码块的最优编码模式;以及当所述编码块未超出图像边界时,获取预存储的该上层编码块的最优编码模式;以及当所述上层编码块超出最大的帧内预测编码块边界时,将直流模式作为所述上层编码块的最优编码模式。
  16. 根据权利要求12所述的装置,其中,所述确定模块包括第一确定子模块、第一模式确定子模块与第二模式确定子模块;
    所述第一确定子模块,用于确定所述候选模式列表中首个索引值对应的候选帧内预测模式或第二个索引值对应的候选帧内预测模式是否存在于所述相邻模式列表中;
    所述第一模式确定子模块,用于当所述候选模式列表中首个索引值对应的候选帧内预测模式存在于所述相邻模式列表中,则将所述N更新为所述首个索引值增加第一预设数值,基于更新后的N确定当前编码块的最优编码模式;
    所述第二模式确定子模块,用于当所述候选模式列表中首个索引值对应的候选帧内预测模式不存在于所述相邻模式列表中,且所述候选模式列表中第二个索引值对应的候选帧内预测模式存在于所述相邻模式列表中,则将所述N更新为所述第二个索引值增加第一预设数值,并基于更新后的N确定当前编码块的最优编码模式;
    所述第三模式确定子模块,用于当所述候选模式列表中首个索引值对应的候选帧内预测模式与所述候选模式列表中第二个索引值对应的候选帧内预测模式均不存在于所述相邻模式列表中时,基于所述相邻模式列表与所述候选模式列表,确定当前编码块的最优编码模式。
  17. 根据权利要求16所述的装置,其中,所述第一模式确定子模块用于当更新后的N等于第二预设数值时,将所述首个索引值对应的候选帧内预测模式确定为当前编码块的最优编码模式;以及当更新后的N不等于第二预设数值时,基于该更新后的 N,根据所述候选模式列表,确定当前编码块的最优编码模式。
  18. 根据权利要求16所述的装置,其中,所述第二模式确定子模块用于当所述相邻模式列表中首个索引值对应的最优编码模式与第二个索引值对应的最优编码模式相同时,确定所述首个索引值对应的最优编码模式在候选模式列表中的候选索引值,并基于所述候选索引值与所述候选模式列表,确定当前编码块的最优编码模式;以及用于当所述相邻模式列表中首个索引值对应的最优编码模式与第二个索引值对应的最优编码模式不相同时,根据所述候选模式列表,确定当前编码块的最优编码模式。
  19. 一种电子设备,包括存储器和处理器,所述存储器用于存储计算机程序,所述处理器用于执行所述计算机程序以实现权利要求1-11任一项所述的帧内预测编码方法。
  20. 一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被一个或多个处理器执行时实现权利要求1-11任一项所述的帧内预测编码方法。
PCT/CN2020/078147 2019-04-11 2020-03-06 帧内预测编码方法、装置、电子设备及计算机存储介质 WO2020207162A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2021529273A JP7250927B2 (ja) 2019-04-11 2020-03-06 フレーム内予測符号化方法、装置、電子デバイスおよびコンピュータプログラム
US17/319,465 US11451772B2 (en) 2019-04-11 2021-05-13 Intra-frame prediction coding method and apparatus, electronic device, and computer storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910290936.5 2019-04-11
CN201910290936.5A CN109889827B (zh) 2019-04-11 2019-04-11 帧内预测编码方法、装置、电子设备及计算机存储介质

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/319,465 Continuation US11451772B2 (en) 2019-04-11 2021-05-13 Intra-frame prediction coding method and apparatus, electronic device, and computer storage medium

Publications (1)

Publication Number Publication Date
WO2020207162A1 true WO2020207162A1 (zh) 2020-10-15

Family

ID=66937090

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/078147 WO2020207162A1 (zh) 2019-04-11 2020-03-06 帧内预测编码方法、装置、电子设备及计算机存储介质

Country Status (4)

Country Link
US (1) US11451772B2 (zh)
JP (1) JP7250927B2 (zh)
CN (1) CN109889827B (zh)
WO (1) WO2020207162A1 (zh)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109889827B (zh) * 2019-04-11 2021-01-29 腾讯科技(深圳)有限公司 帧内预测编码方法、装置、电子设备及计算机存储介质
CN110166775B (zh) * 2019-06-25 2021-05-11 浙江大华技术股份有限公司 帧内预测方法、编码器及存储装置
CN110267041B (zh) * 2019-06-28 2021-11-09 Oppo广东移动通信有限公司 图像编码方法、装置、电子设备和计算机可读存储介质
CN111757105B (zh) * 2020-06-30 2023-07-04 北京百度网讯科技有限公司 图像编码处理方法、装置、设备和介质
CN112055209B (zh) * 2020-08-06 2024-08-02 浙江大华技术股份有限公司 图像编码方法及图像处理装置、计算机可读存储介质
CN113891074B (zh) * 2021-11-18 2023-08-01 北京达佳互联信息技术有限公司 视频编码方法和装置、电子装置和计算机可读存储介质
WO2023177198A1 (ko) * 2022-03-15 2023-09-21 주식회사 케이티 영상 부호화/복호화 방법 및 장치

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102685474A (zh) * 2011-03-10 2012-09-19 华为技术有限公司 预测模式的编解码方法、编解码设备及网络系统
CN103997646A (zh) * 2014-05-13 2014-08-20 北京航空航天大学 一种高清视频编码中快速帧内预测模式选择方法
WO2018124843A1 (ko) * 2017-01-02 2018-07-05 한국전자통신연구원 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
US20180324418A1 (en) * 2015-10-13 2018-11-08 Lg Electronics Inc. Method and apparatus for encoding and decoding video signal
CN109889827A (zh) * 2019-04-11 2019-06-14 腾讯科技(深圳)有限公司 帧内预测编码方法、装置、电子设备及计算机存储介质

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5400876B2 (ja) * 2008-06-16 2014-01-29 ドルビー ラボラトリーズ ライセンシング コーポレイション ビデオ符号化のための、スライス依存性に基づくレート制御モデル適合化
WO2011077566A1 (ja) 2009-12-25 2011-06-30 Ykk株式会社 スライドファスナー用スライダー
US9253508B2 (en) * 2011-11-04 2016-02-02 Futurewei Technologies, Inc. Differential pulse code modulation intra prediction for high efficiency video coding
US9344722B2 (en) * 2011-11-18 2016-05-17 Futurewei Technologies, Inc. Scanning of prediction residuals in high efficiency video coding
US10142626B2 (en) * 2014-10-31 2018-11-27 Ecole De Technologie Superieure Method and system for fast mode decision for high efficiency video coding
KR101896263B1 (ko) 2016-12-29 2018-09-07 방정호 수소수 제조장치
CN110278443B (zh) * 2018-03-16 2022-02-11 华为技术有限公司 划分标志位的上下文建模方法及装置
CN110650337B (zh) * 2018-06-26 2022-04-01 中兴通讯股份有限公司 一种图像编码方法、解码方法、编码器、解码器及存储介质
CN110213594A (zh) * 2018-12-29 2019-09-06 腾讯科技(深圳)有限公司 用于帧内编码的方法、装置、帧编码器、帧编码系统以及计算机可读存储媒体
CN113574870B (zh) * 2019-02-25 2023-02-10 华为技术有限公司 编码器、解码器及其实现的对当前块进行预测译码的方法
CN109889627B (zh) 2019-03-26 2020-08-25 常州索维尔电子科技有限公司 一种can总线节点id自动分配方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102685474A (zh) * 2011-03-10 2012-09-19 华为技术有限公司 预测模式的编解码方法、编解码设备及网络系统
CN103997646A (zh) * 2014-05-13 2014-08-20 北京航空航天大学 一种高清视频编码中快速帧内预测模式选择方法
US20180324418A1 (en) * 2015-10-13 2018-11-08 Lg Electronics Inc. Method and apparatus for encoding and decoding video signal
WO2018124843A1 (ko) * 2017-01-02 2018-07-05 한국전자통신연구원 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
CN109889827A (zh) * 2019-04-11 2019-06-14 腾讯科技(深圳)有限公司 帧内预测编码方法、装置、电子设备及计算机存储介质

Also Published As

Publication number Publication date
JP2022527685A (ja) 2022-06-03
CN109889827B (zh) 2021-01-29
US11451772B2 (en) 2022-09-20
CN109889827A (zh) 2019-06-14
US20210266534A1 (en) 2021-08-26
JP7250927B2 (ja) 2023-04-03

Similar Documents

Publication Publication Date Title
WO2020207162A1 (zh) 帧内预测编码方法、装置、电子设备及计算机存储介质
WO2020253828A1 (zh) 一种编解码方法、装置及存储介质
EP3560198B1 (en) Low-complexity sign prediction for video coding
US10742984B2 (en) Method and apparatus for multi-table based context adaptive binary arithmetic coding
WO2018010492A1 (zh) 视频编码中帧内预测模式的快速决策方法
WO2022116317A1 (zh) 帧内预测方法、编码器、解码器以及存储介质
KR102306484B1 (ko) 비디오 인코딩을 위한 처리 방법 및 장치, 그리고 저장 매체
CN112738511B (zh) 一种结合视频分析的快速模式决策方法及装置
JP6953067B2 (ja) 符号化単位分割決定方法及び装置、コンピューティングデバイス及び読み取り可能な記憶媒体
WO2019085942A1 (zh) Sao模式决策方法、装置、电子设备及可读存储介质
CN111246219B (zh) 一种vvc帧内cu深度快速划分方法
EP3761646B1 (en) Context modelling method and device for partition flag bit
CN101969561A (zh) 一种帧内模式选取方法、装置及一种编码器
CN112312133A (zh) 一种视频编码方法、装置、电子设备及可读存储介质
WO2021168817A1 (zh) 视频处理的方法及装置
KR20230173695A (ko) 엔트로피 인코딩, 디코딩 방법 및 장치
KR20210113389A (ko) 코딩 및 디코딩을 진행하는 방법, 디코더, 코더 및 저장 매체
US11323746B2 (en) Context modeling method and apparatus of split flag
JP2022522487A (ja) 画像成分予測方法、エンコーダ、デコーダ及び記憶媒体
WO2022188114A1 (zh) 帧内预测方法、编码器、解码器以及存储介质
CN109618152B (zh) 深度划分编码方法、装置和电子设备
WO2020258039A1 (zh) 运动补偿的处理方法、编码器、解码器以及存储介质
CN116830584A (zh) 帧内预测方法、编码器、解码器以及存储介质
WO2020061784A1 (zh) 编码方法、解码方法、编码设备和解码设备
WO2023197104A1 (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: 20788002

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021529273

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20788002

Country of ref document: EP

Kind code of ref document: A1