WO2020061784A1 - 编码方法、解码方法、编码设备和解码设备 - Google Patents

编码方法、解码方法、编码设备和解码设备 Download PDF

Info

Publication number
WO2020061784A1
WO2020061784A1 PCT/CN2018/107435 CN2018107435W WO2020061784A1 WO 2020061784 A1 WO2020061784 A1 WO 2020061784A1 CN 2018107435 W CN2018107435 W CN 2018107435W WO 2020061784 A1 WO2020061784 A1 WO 2020061784A1
Authority
WO
WIPO (PCT)
Prior art keywords
prediction mode
mode
prediction
intra prediction
intra
Prior art date
Application number
PCT/CN2018/107435
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 PCT/CN2018/107435 priority Critical patent/WO2020061784A1/zh
Priority to CN201880054725.5A priority patent/CN111108749A/zh
Publication of WO2020061784A1 publication Critical patent/WO2020061784A1/zh

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/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/46Embedding additional information in the video signal during the compression process
    • 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

Definitions

  • the present application relates to the field of video encoding and decoding, and in particular, to an encoding method, a decoding method, an encoding device, and a decoding device.
  • Intra prediction usually uses the correlation of video frames in the spatial domain to approximate the original texture through directional prediction.
  • CTUs equal-sized coding tree units
  • the size of the CTU can be 64x64 and 128x128.
  • Each CTU can be further divided into square or rectangular coding units (CUs), or "blocks”.
  • CUs square or rectangular coding units
  • the above intra-prediction process only works well for blocks with smooth texture or regular texture directions.
  • the above-mentioned intra prediction process will cause relatively large residuals, and from the perspective of block division, it requires that the blocks be more finely divided, which will cause more syntax element overhead and cause intra prediction.
  • the bit rate is high and the prediction efficiency is low.
  • the present application provides an encoding method, a decoding method, an encoding device, and a decoding device, which can reduce the bit rate of intra prediction and improve the efficiency of intra prediction.
  • an encoding method including: determining an intra prediction mode of a current block, the intra prediction mode selected from a single intra prediction mode and a combination of two intra prediction modes;
  • the instruction information of the intra prediction mode is encoded into a code stream, and the instruction information includes a first instruction for indicating whether the intra prediction mode is a single intra prediction mode or a combination of two intra prediction modes. information.
  • a decoding method including: obtaining a code stream, the code stream including indication information for indicating an intra prediction mode of a current block, the intra prediction mode selected from a single intra prediction A combination of a mode and two intra prediction modes, the instruction information includes first information used to indicate whether the intra prediction mode is a single intra prediction mode or a combination of two intra prediction modes; The instruction information is used to decode the current block.
  • an encoding device includes a processor and a memory, and the memory stores computer instructions.
  • the processor executes the computer instructions, the encoding device causes the encoding device to perform the following steps: Determine the intra prediction mode of the current block, the intra prediction mode is selected from a single intra prediction mode and a combination of two intra prediction modes; and the instruction information for indicating the intra prediction mode is encoded into a code stream
  • the instruction information the first information is used to indicate whether the intra prediction mode is a single intra prediction mode or a combination of two intra prediction modes.
  • a decoding device includes a processor and a memory, and the memory stores computer instructions.
  • the decoding device causes the decoding device to perform the following steps: Obtaining a code stream, where the code stream includes indication information for indicating an intra prediction mode of a current block, the intra prediction mode is selected from a single intra prediction mode and a combination of two intra prediction modes, the The instruction information includes first information for indicating whether the intra prediction mode is a single intra prediction mode or a combination of two intra prediction modes; and decoding the current block according to the instruction information.
  • a computer-readable storage medium on which instructions are stored, and when the instructions are run on a computer, the computer is caused to execute the encoding method according to the first aspect.
  • a computer-readable storage medium on which instructions are stored, and when the instructions are run on a computer, the computer is caused to execute the decoding method according to the second aspect.
  • a computer program that causes a computer to execute the encoding method of the first aspect.
  • a computer program that causes a computer to execute the decoding method of the second aspect.
  • a computer chip that causes a computer to execute the encoding method of the first aspect.
  • a computer chip that causes a computer to execute the decoding method of the second aspect.
  • the intra prediction mode of the current block is selected from a single intra prediction mode and a combination of two intra prediction modes, and the residual corresponding to the selected intra prediction mode is smaller, which can save coding. Overhead, reduce code rate, and improve prediction efficiency.
  • FIG. 1 is a schematic flowchart of an encoding method according to an embodiment of the present application.
  • FIG. 2 is a schematic flowchart of an encoding method according to another embodiment of the present application.
  • FIG. 3 is a schematic flowchart of a decoding method according to an embodiment of the present application.
  • FIG. 4 is a schematic block diagram of an encoding device according to an embodiment of the present application.
  • FIG. 5 is a schematic block diagram of an encoding device according to another embodiment of the present application.
  • FIG. 6 is a schematic block diagram of a decoding device according to an embodiment of the present application.
  • FIG. 7 is a schematic block diagram of a decoding device according to another embodiment of the present application.
  • video data is usually encoded and compressed at the encoding end and decoded at the decoding end.
  • the encoding and compression process includes prediction, transformation, quantization, and entropy encoding.
  • prediction includes two types of intra prediction and inter prediction, the purpose of which is to remove redundant information of the current image block to be encoded by using prediction block data.
  • Intra prediction uses the information of the frame image to obtain prediction block data.
  • the process includes dividing the current image to be encoded into several image blocks to be encoded, and then dividing the image block to be encoded at least once (for example, using the four in the HEVC standard).
  • a fork tree partition method or a quad-tree binary tree partition method
  • a fork tree partition method is divided into a number of sub-image blocks; then, for each sub-image block, the image block that best matches the current sub-image block is searched in the frame as a predicted image block, predicting The relative displacement between the image block and the current sub-image block is the motion vector; after that, the corresponding pixel values of the sub-image block and the predicted image block are subtracted to obtain a residual.
  • the residuals corresponding to the obtained sub-image blocks are combined together to obtain the residuals of the image blocks to be encoded. Residuals are transformed, quantized, and entropy-encoded to obtain an entropy-encoded bitstream.
  • Entropy-encoded bitstreams and encoding mode information are encoded, such as information such as intra prediction modes, motion vectors (or motion vector residuals), and so on. Store or send to the decoder.
  • the entropy decoding is performed to obtain the corresponding residual; the predicted image block corresponding to the image block to be decoded is found according to the decoded motion vector, intra prediction and other information; The residual is used to obtain the value of each pixel in the image block to be decoded.
  • images of different resolutions can be encoded / decoded by dividing the image into multiple small blocks, that is, the image can be divided into multiple image blocks.
  • the image can be divided into any number of image blocks.
  • the image can be divided into an array of m ⁇ n image blocks.
  • the image block may have a rectangular shape, a square shape, a circular shape, or any other shape.
  • An image block can have any size, such as p ⁇ q pixels.
  • Each image block can have the same size and / or shape.
  • two or more image blocks may have different sizes and / or shapes.
  • An image block may or may not have any overlapping portions.
  • the image block is referred to as a macroblock or a maximum coding unit (LCU) in some encoding / decoding standards.
  • this image block is called a macroblock, and its size can be 16 ⁇ 16 pixels.
  • an image block is called a CTU, and its size can be 8 ⁇ 8 pixels to 64 ⁇ 64 pixels.
  • an image block may not be a macro block or a CTU, but may include a macro block or a part of the CTU, or include at least two complete macro blocks (or CTUs), or at least one complete A macro block (or CTU) and a part of one macro block (or CTU), or a part containing at least two complete macro blocks (or CTU) and some macro blocks (or CTU).
  • these image blocks in the image data can be encoded / decoded separately.
  • an image block may refer to a macro block or a part of a CTU.
  • an image block may refer to a CU, a prediction unit (PU), or a transform unit (TU) in some video encoding / decoding standards.
  • FIG. 1 is a schematic flowchart of an encoding method 100 according to an embodiment of the present application.
  • the encoding method 100 may be performed by an encoding device.
  • the encoding device may also be referred to herein as an encoding end or encoder.
  • the encoding method 100 may include the following steps.
  • S110 Determine an intra prediction mode of the current block, where the intra prediction mode is selected from a combination of a single intra prediction mode and two intra prediction modes.
  • the intra prediction mode of the current block is selected from a combination of a single intra prediction mode and two intra prediction modes, and the residual corresponding to the selected intra prediction mode is smaller. It can save coding overhead, reduce code rate, and improve prediction efficiency.
  • the combination of the two intra prediction modes to be selected may include: a combination of two angle modes that are adjacent to each other (that is, a mode that is numbered 2 to a mode that is numbered 34 are adjacent A combination of two modes with a coding interval of 1); a combination of two angular modes with a coding interval of 1 (that is, a combination of two modes with an interval of 1 in the mode numbered 2 to 34); a planar mode ( That is, the combination of the number 0 mode) and the direct current (DC) mode (the number 1 mode); the flat mode (the number 0 mode) and any angle mode (the number 2 mode to the number) It is a combination of any one of the modes of 34); and a combination of a DC mode (that is, a mode numbered 1) and an angle mode (any of the mode numbered 2 to 34).
  • the intra prediction mode of the current block is one selected from the following: a combination of two angular modes with adjacent numbers; a combination of two angular modes with a coding interval of 1; Combination; a combination of a planar mode and any one angle mode; a combination of a DC mode and any one angle mode; and any one intra prediction mode of a single mode (for example, any one of 35 intra prediction modes).
  • the combination of the two types of intra prediction modes to be selected may include: a combination of two adjacent angle modes that are numbered (that is, a numbered phase in a mode that is numbered 2 to a mode that is numbered 34) Combination of two adjacent modes); Plane mode (that is, mode numbered 0) and DC mode (that is, mode numbered 1); and Plane mode (that is, mode numbered 0) and any angle mode ( Any one of the mode number 2 to the mode number 34).
  • the intra prediction mode of the current block is selected from one of the following: a combination of two angle modes adjacent to each other; a combination of a planar mode and a DC mode; a combination of a planar mode and an arbitrary angle mode; And any one intra prediction mode of a single mode (for example, any one of the 35 intra prediction modes).
  • the combination of the two intra prediction modes to be selected may include: a combination of any two of all intra prediction modes (any two of a mode numbered 0 to a mode of 34) Combination).
  • the intra prediction mode of the current block is one selected from the following: a combination of any two of all the intra prediction modes (for example, a combination of any two of the 35 intra prediction modes); and a single Any one of the intra prediction modes (for example, any one of the 35 intra prediction modes).
  • the combination of the two intra prediction modes to be selected may also be a combination of other forms.
  • the mode selected from the intra prediction mode of the current block may be other modes.
  • the combination of the intra prediction modes may also be a combination of three intra prediction modes or multiple intra prediction modes, which is not limited in this embodiment of the present application.
  • the combination of the two intra prediction modes in the embodiment of the present application refers to combining the existing intra prediction modes, using the two intra prediction modes to simultaneously predict the current block to obtain two prediction blocks, and performing two prediction blocks. Weighted sum or average to get the final predicted block of the current block.
  • the encoding method 100 may further include: obtaining a first prediction block according to the first prediction mode, and obtaining a second prediction according to the second prediction mode. Block; obtaining a prediction block of the current block according to the first prediction block and the second prediction block.
  • obtaining the prediction block of the current block according to the first prediction block and the second prediction block may include: obtaining a prediction of the current block according to an average value of the first prediction block and the second prediction block. Block; or obtain a prediction block of the current block according to a weighted sum of the first prediction block and the second prediction block.
  • S110 determining the intra prediction mode of the current block may include: determining, from N + 2 S intra prediction modes, P intra prediction modes with a minimum sum of absolute transformation difference and SATD; According to the intra prediction method of the left block of the current block and the intra prediction method of the upper block of the current block, determine the most probable mode MPM list of the current block, where the MPM list includes N intra prediction modes; determine T A combination of two intra prediction modes; performing rate distortion optimization RDO, selecting rate distortion optimization from the combination of the P intra prediction modes, the N intra prediction modes, and the T two intra prediction modes As the intra prediction method, a single intra prediction mode or a combination of two intra prediction modes with the least cost is used as the intra prediction mode, where N, S, P, and T are all positive integers.
  • a rough mode decision may be performed first. For example, from the N + 2 S intra prediction modes, P intra prediction modes with the smallest sum of absolute transformation differences and SATD are determined and added to the candidate mode list. In one example, P may be equal to three.
  • Then use the intra prediction methods of the current block, the encoded left block and the top block to build the most probable modes (MPM) list, and compare the intra prediction modes in the MPM list with those already in the candidate mode list
  • the mode is de-redundant and added to the candidate mode list.
  • a combination of T two intra prediction modes is determined, and the combination of the T two intra prediction modes can form a candidate combination list.
  • the combination of the two T intra prediction modes herein may be all combinations of the two intra prediction modes for selection described in the entire text.
  • the combination of the two two intra prediction modes may also be a partial combination of all the combinations, for example, a partial combination is selected from all the combinations, which is not limited in this embodiment of the present application.
  • the rate distortion optimization (RDO) criterion is used to calculate the rate distortion optimization cost (RD cost) corresponding to each intra prediction mode in the candidate mode list, and T two intra predictions.
  • the RD cost corresponding to the combination of modes is compared.
  • the RD cost is compared to determine the single intra prediction mode or the combination of two intra prediction modes with the smallest RD cost as the intra prediction mode of the current block.
  • the intra prediction mode of the current block determined in this way may be a single intra prediction mode or a combination of two intra prediction modes.
  • the intra prediction mode of the current block is a combination of two intra prediction modes
  • the combination may include a first prediction mode and a second prediction mode. Based on the foregoing description of the combination of the two intra prediction modes.
  • the first prediction mode and the second prediction mode may have the following various relationships.
  • the second prediction mode when the first prediction mode is an angle mode, the second prediction mode is an angle mode adjacent to the first prediction mode, or the second prediction mode is an angle mode spaced an angle from the first prediction mode. ;
  • the first prediction mode is a planar mode, the second prediction mode is a DC mode, or the second prediction mode is any of the angle modes;
  • the first prediction mode is a DC mode, the second The prediction mode is a planar mode, or the second prediction mode is any of the angle modes.
  • the second prediction mode when the first prediction mode is an angle mode, the second prediction mode is an angle mode adjacent to the first prediction mode; when the first prediction mode is a planar mode, the second prediction mode is DC Or the second prediction mode is any of the angle modes.
  • the intra prediction mode is a combination of any two of all intra prediction modes.
  • the combination of the two intra prediction modes has nothing to do with the order of the two intra prediction modes.
  • an effective combination with the first prediction mode is set in the encoding device and the decoding device in advance.
  • the combination of the two intra prediction modes available in the foregoing can be set in the encoding device and the decoding device in advance.
  • the encoding device determines a first prediction mode and a second prediction mode according to a preset combination. After encoding the first prediction mode, the encoding device can know how many intra prediction modes can be effectively combined with the first prediction mode. These intra prediction modes can be sorted by number, and the third information indicates the order of the second prediction modes, that is, the index.
  • an effective combination composed with the first prediction mode is carried in a video parameter set, a sequence parameter set, an image parameter set, a sequence header, an image header, or a slice header, and is sent by the encoding device to The decoding device.
  • the encoding device determines a first prediction mode and a second prediction mode. After the encoding device encodes the first prediction mode, it can know which ones can be effectively combined with the first prediction mode.
  • the encoding device may send an effective combination or another intra prediction mode in the effective combination to the decoding device through the video parameter set, sequence parameter set, image parameter set, sequence header, image header, or slice header. Meanwhile, the encoding device indicates the index of the second prediction mode through the third information.
  • the intra prediction mode when the intra prediction mode is a single intra prediction mode, the single intra prediction mode, that is, the intra prediction mode is a first prediction mode; when the intra prediction mode is two frames, When the intra prediction mode is combined, the intra prediction mode includes a first prediction mode and a second prediction mode. It should be understood that this is described in two different situations. In both cases, the first prediction mode has no correlation and is only used as an intra prediction mode in each case. In addition, in the encoding process, whether it is a single intra prediction mode or a combination of two intra prediction modes, the syntax elements of the first prediction mode may be the same, which will be described in detail below.
  • FIG. 2 is a schematic flowchart of an encoding method 200 according to another embodiment of the present application.
  • the encoding method 200 shown in FIG. 2 may include the following steps.
  • S220 Determine N intra-prediction modes from the intra-prediction mode of the left block of the current block and the intra-prediction mode of the upper block of the current block to form an MPM list of the current block.
  • the intra prediction mode in the MPM list is de-redundant and added to the candidate mode list to obtain a final candidate mode list (candidate mode 1, candidate mode 2, ..., candidate mode X).
  • the candidate mode list candidate mode list and the candidate combination list bicandidate modes list are merged into the final candidate list.
  • the following describes in detail the encoding of the intra prediction mode in each embodiment of the present application, that is, the instruction information used to indicate the intra prediction mode is encoded into a code stream.
  • the syntax elements when the encoder encodes the intra prediction method of each block will be described below.
  • Reasonably designing the syntax elements can save the extra overhead brought by the new coding mode and improve the final intra-frame coding efficiency.
  • the indication information may include first information used to indicate whether the intra prediction mode is a single intra prediction mode or a combination of two intra prediction modes.
  • the first information may be a flag variable, such as biIntraPred_flag.
  • the biIntraPred_flag may be 1 bit. For example, a value of biIntraPred_flag of 1 indicates that the intra prediction mode is a combination of two intra prediction modes, or a value of biIntraPred_flag is 0 indicates that the intra prediction mode is a single intra prediction mode.
  • the first information may multiplex bits indicating the intra prediction mode of the current block.
  • the intra prediction mode is a combination of two intra prediction modes
  • a part of the bits indicating the intra prediction mode of the current block is used to indicate the first prediction mode
  • another part is used to indicate the second prediction mode.
  • the intra prediction mode is a single intra prediction mode
  • part of the bits are used to indicate the first prediction mode (that is, the intra prediction mode, or the final prediction mode)
  • the other part is a preset specific value (that is, the first Information) to indicate that the intra prediction mode is a single intra prediction mode.
  • the common A + M bits indicate the intra prediction mode of the current block.
  • a bit is used to indicate the first prediction mode (when the intra prediction mode is a single intra prediction mode, it is an intra prediction mode; when the intra prediction mode is a combination of two intra prediction modes, it is a frame One intra prediction mode in the combination corresponding to the intra prediction mode).
  • the M bit is used to indicate the second prediction mode; when the intra prediction mode is a single intra prediction mode, the M bit is a preset specific value.
  • a and M can be fixed or variable. A and M may not be equal; A and M may also be equal, for example, they are both equal to 6.
  • the A bit is used to indicate the number of the first prediction mode; when the intra prediction method is a combination of two intra prediction modes, the M bit is used to indicate the number of the second prediction mode (the maximum value is 34 and the minimum value is 0) ; When the intra prediction mode is a single intra prediction mode, the M bit is a preset specific value 111111.
  • the indication information when the intra prediction mode is a single intra prediction mode, the indication information further includes second information indicating a first prediction mode that is the intra prediction mode.
  • second information indicating a first prediction mode that is the intra prediction mode.
  • biIntraPred_flag and A bits can be used to indicate the intra prediction mode.
  • a + M bits are used to indicate the intra prediction mode of the current block, where A bits are second information and M bits are first information .
  • the indication information when the intra prediction mode is a combination of two intra prediction modes, the indication information further includes a second instruction for indicating that the second prediction mode is the first prediction mode in the intra prediction mode.
  • Information, and third information for indicating a second prediction mode in the intra prediction method For example, when the intra prediction mode is a combination of two intra prediction modes, biIntraPred_flag, the second information, and the third information may be used to indicate the intra prediction mode.
  • a + M bits are used to indicate the intra prediction mode of the current block, where A bits are the second information and M bits both indicate The first information indicates the third information.
  • the second information may include an MPM list indicator and an index of the first prediction mode.
  • the MPM list indicator is used to indicate whether the first prediction mode is in the MPM list.
  • the MPM list includes N intra predictions. mode.
  • the MPM list indicator may be marked as mpm_flag. A value of mpm_flag is 1 indicates that the first prediction mode is in the MPM list; a value of mpm_flag is 0 indicates that the first prediction mode is not in the MPM list.
  • the encoding device acquires the MPM list of the current block, and determines whether the first prediction mode is in the MPM list. If so, the value of the encoded MPM list indicator mpm_flag is 1, otherwise the value of the encoded MPM list indicator mpm_flag is 0.
  • a description is given by taking three intra prediction modes included in the MPM list as an example.
  • the index of the first prediction mode may be represented by a variable-length truncation code.
  • the index of the first prediction mode may include K bits, where K is a variable value.
  • K is a variable value.
  • the first prediction mode is the first one in the MPM list
  • K is equal to 1
  • the 1 bit may take a third value.
  • the index value of the first prediction mode is equal to 0, and the binary representation is 0.
  • K is equal to 2
  • the first bit of the two bits can take a fourth value, for example, 1.
  • the index value of the first prediction mode is equal to 1, and the binary representation is 10; when the first prediction mode is the third in the MPM list At this time, the value of the index of the first prediction mode is equal to 2, and the binary representation is 11.
  • 1 bit or 2 bits can be used to specifically indicate which intra prediction mode in the MPM list the first prediction mode is. It should be understood that the above values are merely examples. The meaning represented by the specific value of each bit 0 or 1 can be set, which is not limited in the embodiment of the present application.
  • the index of the first prediction mode is represented by an S bit, which indicates that the first prediction mode is in a non- An index in the MPM list.
  • the non-MPM list includes 2 S intra prediction modes, where S is a positive integer. For example, a single intra prediction mode may include a total of 35 intra prediction modes.
  • the indication manner of the third information is related to the number of possible combinations of the first prediction mode and the second prediction mode.
  • the number of possible combinations (or called effective combinations) of the first prediction mode and the second prediction mode is large.
  • the second prediction mode may be expressed in the same expression manner as the first prediction mode. For example, as described above, it is represented by an MPM list indicator and a variable-length truncation code.
  • the number of possible combinations (or called effective combinations) of the first prediction mode and the second prediction mode is large. It may be indicated by directly indicating the number of the second prediction mode.
  • the number of possible combinations (or called effective combinations) of the first prediction mode and the second prediction mode is small.
  • M bits may be used to indicate that the second prediction mode is an intra prediction mode of a specific combination of the valid combinations of the first prediction mode.
  • the third information includes M bits, and the M bits indicate that a specific combination of valid combinations of the first prediction mode is included, and the specific combination is a combination of the first prediction mode and the second prediction mode, where , M is a positive integer. It should be understood that, since the first prediction mode has been indicated, indicating the combination of the first prediction mode and the second prediction mode is equivalent to indicating the second prediction mode.
  • M can be a fixed value, for example M is equal to 1 or 2.
  • M is equal to 1 or 2.
  • two bits can be used to indicate a specific combination among the valid combinations of the first prediction mode.
  • 1 bit can be used to indicate a specific combination among the valid combinations of the first prediction mode.
  • M may also be a variable value, that is, the second prediction mode may be indicated by a variable-length truncation code.
  • the second prediction mode may be indicated by a variable-length truncation code.
  • M is equal to 1 or 2.
  • the third information or the second prediction mode may also be expressed in other forms.
  • the encoding order of the first information, the second information, and the third information may be reasonably combined, which is not limited in the embodiments of the present application.
  • first information is encoded first, and then second information is encoded.
  • the third information may also be encoded.
  • the second information may be encoded first, and then the first information may be encoded.
  • the third information may also be encoded.
  • FIG. 3 is a schematic flowchart of a decoding method 300 according to an embodiment of the present application. As shown in FIG. 3, the decoding method 300 may include the following steps.
  • the intra prediction mode is selected from a single intra prediction mode and a combination of two intra prediction modes.
  • the information includes first information for indicating whether the intra prediction mode is a single intra prediction mode or a combination of two intra prediction modes.
  • the intra prediction mode of the current block is selected from a combination of a single intra prediction mode and two intra prediction modes, and the residual corresponding to the selected intra prediction mode is smaller. It can save overhead, reduce code rate, and improve prediction efficiency.
  • the indication information may further include second information indicating a first prediction mode that is the intra prediction method.
  • S220 decoding the current block according to the indication information may include: The first information determines that the intra prediction mode is a single intra prediction mode; and according to the second information, determines the first prediction mode as the intra prediction mode.
  • the indication information further includes second information used to indicate that it is the first prediction mode in the intra prediction mode, and used to indicate that it is the second prediction mode in the intra prediction mode.
  • the third information of S220; decoding the current block according to the instruction information may include: determining the intra prediction mode as a combination of two intra prediction modes according to the first information; and determining the intra prediction mode according to the second information. The first prediction mode in the intra prediction mode; and determining the second prediction mode in the intra prediction mode according to the third information.
  • the third information may include M bits, and the M bit indicates that a specific combination of valid combinations of the first prediction mode is included, and the specific combination is the first prediction mode and the second prediction mode.
  • M may be equal to two.
  • S220 decoding the current block according to the instruction information may include: decoding the first bit of the M bits; when the value of the first bit of the M bits is the first When the value is one, it is determined that the specific combination is the first group in the effective combination; when the value of the first bit in the M bits is the second value, it is determined that the specific combination is a non-number one in the effective combination.
  • One group decodes the second of the M bits to determine the position of the specific combination in the valid combination.
  • the second information may include an MPM list indicator of the most probable mode and an index of the first prediction mode, and the MPM list indicator is used to indicate whether the first prediction mode is in the MPM list.
  • the MPM list N intra prediction modes are included, where N is a positive integer.
  • the index of the first prediction mode is represented by a variable-length truncation code, and the index of the first prediction mode includes K bits;
  • S220 decoding the current block according to the instruction information may include: Determine that the first prediction mode is in the MPM list according to the MPM list indicator; decode the first bit in the K bits; and determine the first when the value of the first bit in the K bits is 0
  • the prediction mode is the first in the MPM list; when the value of the first bit in the K bits is 1, the second bit in the K bits is decoded, and when the binary representation of the K bits is 10, It is determined that the first prediction mode is the second one in the MPM list; when the binary representation of the K bits is 11, it is determined that the first prediction mode is the third one in the MPM list.
  • S220 decoding the current block according to the indication information may include: determining that the first prediction mode is not in the MPM list according to the MPM list indicator; decoding the next S bit, An index of the first prediction mode in a non-MPM list is determined according to the value of the S bit, and the non-MPM list includes 2 S intra prediction modes, where S is a positive integer.
  • the second prediction mode when the first prediction mode is an angle mode, the second prediction mode is an angle mode adjacent to the first prediction mode, or the second prediction mode is the first prediction mode.
  • the mode is an angular mode separated by an angle; when the first prediction mode is a planar mode, the second prediction mode is a DC mode, or the second prediction mode is any of the angle modes; when the first prediction mode is In the DC mode, the second prediction mode is a planar mode, or the second prediction mode is any of the angle modes.
  • the second prediction mode when the first prediction mode is an angle mode, the second prediction mode is an angle mode adjacent to the first prediction mode; when the first prediction mode is a planar mode, the The second prediction mode is a direct current mode, or the second prediction mode is any of the angle modes.
  • the intra prediction mode is a combination of any two of all intra prediction modes.
  • an effective combination composed with the first prediction mode is preset in an encoding device and a decoding device, or an effective combination composed with the first prediction mode is carried in a video parameter set,
  • the sequence parameter set, the image parameter set, the sequence header, the image header, or the slice header are sent by the encoding device to the decoding device.
  • the decoding method 300 may further include: obtaining a first prediction block according to the first prediction mode, and according to the second The prediction mode obtains a second prediction block; according to the first prediction block and the second prediction block, a prediction block of the current block is obtained.
  • obtaining the prediction block of the current block according to the first prediction block and the second prediction block may include: obtaining according to an average value of the first prediction block and the second prediction block. Obtaining a prediction block of the current block; or obtaining a prediction block of the current block according to a weighted sum of the first prediction block and the second prediction block.
  • FIG. 4 is a schematic block diagram of an encoding device 400 according to an embodiment of the present application.
  • the encoding device 400 includes: a processing module 410 for determining an intra prediction mode of a current block, the intra prediction mode being selected from a single intra prediction mode and a combination of two intra prediction modes; an encoding module 420, For encoding instruction information used to indicate the intra prediction mode into a bitstream, the instruction information includes an instruction used to indicate whether the intra prediction mode is a single intra prediction mode or two intra prediction modes The first information of the combination.
  • the intra prediction mode of the current block is selected from a combination of a single intra prediction mode and two intra prediction modes, and the residual corresponding to the selected intra prediction mode is smaller. It can save coding overhead, reduce code rate, and improve prediction efficiency.
  • the indication information when the intra prediction mode is a single intra prediction mode, the indication information further includes second information indicating a first prediction mode that is the intra prediction mode.
  • the indication information when the intra-prediction mode is a combination of two intra-prediction modes, the indication information further includes instructions for indicating a first prediction mode in the intra-prediction mode. Second information, and third information for indicating a second prediction mode in the intra prediction method.
  • the third information includes M bits, and the M bit indicates a specific combination including valid combinations of the first prediction mode, and the specific combination is the first prediction mode. And the second prediction mode, wherein M is a positive integer.
  • M is equal to two.
  • the third information is expressed by a variable length truncation code, and M is equal to 1 or 2.
  • M is equal to 1
  • 1 Bits take the first value; when the specific combination is a non-first group in the valid combination, M is equal to 2, and the first of the 2 bits takes the second value.
  • the second information includes a most probable mode MPM list indicator and an index of the first prediction mode
  • the MPM list indicator is used to indicate whether the first prediction mode is in
  • the MPM list includes N intra prediction modes, where N is a positive integer.
  • an index of the first prediction mode is represented by a variable length truncation code, and the first prediction mode
  • the index of K includes K bits.
  • K is equal to 1
  • the value of the index of the first prediction mode is equal to 0, and the binary representation is 0.
  • the first prediction mode is the second in the MPM list
  • K is equal to 2
  • the index value of the first prediction mode is equal to 1
  • the binary representation is 10
  • the first prediction mode is the MPM list
  • K is equal to 2
  • the value of the index of the first prediction mode is equal to 2
  • the binary representation is 11.
  • an index of the first prediction mode is represented by an S bit, and the S bit indicates whether the first prediction mode is in a non- An index in an MPM list, where the non-MPM list includes 2 S intra prediction modes, where S is a positive integer.
  • the processing module 410 may be specifically configured to: determine, from the N + 2 S intra prediction modes, P intra prediction modes with the smallest sum of absolute transformation differences and SATD; and according to the current block, Determine the most probable mode MPM list of the current block by using the intra prediction method of the left block and the intra prediction method of the upper block of the current block; the MPM list includes N intra prediction modes; determine T Combination of two intra prediction modes; performing rate distortion optimization RDO, selecting a rate from a combination of the P intra prediction modes, the N intra prediction modes, and the T two intra prediction modes As the intra prediction method, a single intra prediction mode or a combination of two intra prediction modes with the least distortion optimization cost is used, where N, S, P, and T are all positive integers.
  • the second prediction mode when the first prediction mode is an angle mode, the second prediction mode is an angle mode adjacent to the first prediction mode, or the second prediction mode is an angle mode
  • the first prediction mode is an angular mode spaced by an angle
  • the second prediction mode when the first prediction mode is a planar mode, the second prediction mode is a DC mode, or the second prediction mode is any mode of an angle mode ;
  • the first prediction mode is a direct current mode
  • the second prediction mode is a planar mode
  • the second prediction mode is any of the angle modes.
  • the second prediction mode when the first prediction mode is an angle mode, the second prediction mode is an angle mode adjacent to the first prediction mode; when the first prediction mode is a plane In the mode, the second prediction mode is a direct current mode, or the second prediction mode is any mode of an angle mode.
  • the intra prediction mode is a combination of any two of all intra prediction modes.
  • an effective combination composed with the first prediction mode is preset in an encoding device and a decoding device, or an effective combination composed with the first prediction mode is carried in a video parameter.
  • the encoding device sends a set, a sequence parameter set, an image parameter set, a sequence header, an image header, or a slice header to the decoding device.
  • the processing module 410 is further configured to obtain a first prediction block according to the first prediction mode, and Obtaining a second prediction block by the second prediction mode; obtaining a prediction block of the current block according to the first prediction block and the second prediction block.
  • the processing module 410 is specifically configured to: obtain a prediction block of the current block according to an average value of the first prediction block and the second prediction block; or according to the first A weighted sum of the prediction block and the second prediction block to obtain a prediction block of the current block.
  • FIG. 5 is a schematic block diagram of an encoding device 500 according to an embodiment of the present application.
  • the encoding device 500 shown in FIG. 5 may include a processor 510 and a memory 520.
  • the memory 520 stores computer instructions.
  • the processor 510 executes the computer instructions, the encoding device 500 causes the encoding device 500 to perform the following steps: Determine the intra prediction mode of the current block, the intra prediction mode is selected from a single intra prediction mode and a combination of two intra prediction modes; and the instruction information for indicating the intra prediction mode is encoded into a code stream In the instruction information, the first information is used to indicate whether the intra prediction mode is a single intra prediction mode or a combination of two intra prediction modes.
  • the encoding device 500 in the embodiment of the present application may further include a network interface for transmitting a code stream. For example, sending a code stream to a decoding device.
  • the indication information when the intra prediction mode is a single intra prediction mode, the indication information further includes second information indicating a first prediction mode that is the intra prediction mode.
  • the indication information when the intra-prediction mode is a combination of two intra-prediction modes, the indication information further includes instructions for indicating a first prediction mode in the intra-prediction mode. Second information, and third information for indicating a second prediction mode in the intra prediction method.
  • the third information includes M bits, and the M bit indicates a specific combination including valid combinations of the first prediction mode, and the specific combination is the first prediction mode. And the second prediction mode, wherein M is a positive integer.
  • M is equal to two.
  • the third information is expressed by a variable length truncation code, and M is equal to 1 or 2.
  • M is equal to 1
  • 1 Bits take the first value; when the specific combination is a non-first group in the valid combination, M is equal to 2, and the first of the 2 bits takes the second value.
  • the second information includes a most probable mode MPM list indicator and an index of the first prediction mode
  • the MPM list indicator is used to indicate whether the first prediction mode is in
  • the MPM list includes N intra prediction modes, where N is a positive integer.
  • an index of the first prediction mode is represented by a variable length truncation code, and the first prediction mode
  • the index of K includes K bits.
  • K is equal to 1
  • the value of the index of the first prediction mode is equal to 0, and the binary representation is 0.
  • the first prediction mode is the second in the MPM list
  • K is equal to 2
  • the index value of the first prediction mode is equal to 1
  • the binary representation is 10
  • the first prediction mode is the MPM list
  • K is equal to 2
  • the value of the index of the first prediction mode is equal to 2
  • the binary representation is 11.
  • an index of the first prediction mode is represented by an S bit, and the S bit indicates whether the first prediction mode is in a non- An index in an MPM list, where the non-MPM list includes 2 S intra prediction modes, where S is a positive integer.
  • the processor 510 executes computer instructions for determining an intra prediction mode of a current block, so that the encoding device 500 specifically performs the following steps: determining from N + 2 S intra prediction modes Determine the P intra prediction modes with the smallest sum of absolute transformation differences and SATD; and determine the most optimal value of the current block according to the intra prediction method of the left block of the current block and the intra prediction method of the upper block of the current block A list of possible modes MPM, where the MPM list includes N intra prediction modes; determining a combination of T two intra prediction modes; performing rate distortion optimization RDO, from the P intra prediction modes, the N In the combination of the intra prediction mode and the two T intra prediction modes, a single intra prediction mode or a combination of two intra prediction modes with the lowest rate distortion optimization cost is selected as the intra prediction mode, Among them, N, S, P, and T are all positive integers.
  • the second prediction mode when the first prediction mode is an angle mode, the second prediction mode is an angle mode adjacent to the first prediction mode, or the second prediction mode is an angle mode
  • the first prediction mode is an angular mode spaced by an angle
  • the second prediction mode when the first prediction mode is a planar mode, the second prediction mode is a DC mode, or the second prediction mode is any mode of an angle mode ;
  • the first prediction mode is a direct current mode
  • the second prediction mode is a planar mode
  • the second prediction mode is any of the angle modes.
  • the second prediction mode when the first prediction mode is an angle mode, the second prediction mode is an angle mode adjacent to the first prediction mode; when the first prediction mode is a plane In the mode, the second prediction mode is a direct current mode, or the second prediction mode is any mode of an angle mode.
  • the intra prediction mode is a combination of any two of all intra prediction modes.
  • an effective combination composed with the first prediction mode is preset in an encoding device and a decoding device, or an effective combination composed with the first prediction mode is carried in a video parameter.
  • the encoding device sends a set, a sequence parameter set, an image parameter set, a sequence header, an image header, or a slice header to the decoding device.
  • the processor 510 when the intra prediction mode is a combination of two intra prediction modes, the processor 510 is further configured to execute the computer instructions, so that the encoding device 500 performs the following steps : Obtaining a first prediction block according to the first prediction mode and obtaining a second prediction block according to the second prediction mode; obtaining a prediction block for the current block according to the first prediction block and the second prediction block .
  • the processor 510 executes computer instructions for obtaining a prediction block of the current block according to the first prediction block and the second prediction block, so that the encoding device 500 specifically executes The following steps: obtaining the prediction block of the current block according to the average of the first prediction block and the second prediction block; or obtaining the weighted sum of the first prediction block and the second prediction block according to the weighted sum.
  • the prediction block of the current block is described.
  • the encoding device 400 shown in FIG. 4 or the encoding device 500 shown in FIG. 5 may be used to execute the operation or process of the encoding device in the foregoing method embodiment, and each module and device in the encoding device 400 or the encoding device 500 The operations and / or functions are respectively implemented to implement the corresponding processes in the foregoing method embodiments, and are not repeated here for brevity.
  • FIG. 6 is a schematic block diagram of a decoding device 600 according to an embodiment of the present application.
  • the decoding device 600 includes: an obtaining module 610, configured to obtain a code stream, where the code stream includes indication information used to indicate an intra prediction mode of a current block, and the intra prediction mode is selected from a single intra prediction mode. And two types of intra prediction modes, the instruction information includes first information used to indicate whether the intra prediction mode is a single intra prediction mode or a combination of two intra prediction modes; the decoding module 620 Is configured to decode the current block according to the instruction information.
  • the intra prediction mode of the current block is selected from a combination of a single intra prediction mode and two intra prediction modes, and the residual corresponding to the selected intra prediction mode is smaller. It can save coding overhead, reduce code rate, and improve prediction efficiency.
  • the indication information further includes second information indicating a first prediction mode that is the intra prediction mode; the decoding module 620 is further configured to determine the intra frame according to the first information.
  • the prediction mode is a single intra prediction mode; and according to the second information, the first prediction mode that is the intra prediction mode is determined.
  • the instruction information further includes second information used to indicate that it is the first prediction mode in the intra prediction mode, and used to indicate that it is used as the first prediction mode in the intra prediction mode.
  • the third information of the two prediction modes; the decoding module 620 is further configured to determine that the intra prediction mode is a combination of two intra prediction modes according to the first information; and determine the intra prediction according to the second information The first prediction mode in the mode; and determining the second prediction mode in the intra prediction mode according to the third information.
  • the third information includes M bits, and the M bit indicates a specific combination including valid combinations of the first prediction mode, and the specific combination is the first prediction mode. And the second prediction mode, wherein M is a positive integer.
  • M is equal to two.
  • the decoding module 620 is further configured to decode the first bit of the M bits; when the value of the first bit of the M bits is the first value, determine the specific The combination is the first group of the effective combinations; when the value of the first bit of the M bits is the second value, determining that the specific combination is a non-first group of the effective combinations, Decoding the second of the M bits to determine the position of the specific combination in the valid combination.
  • the second information includes a most probable mode MPM list indicator and an index of the first prediction mode
  • the MPM list indicator is used to indicate whether the first prediction mode is in
  • the MPM list includes N intra prediction modes, where N is a positive integer.
  • the index of the first prediction mode is represented by a variable-length truncation code, and the index of the first prediction mode includes K bits; the decoding module 620 is further configured according to the MPM list indicator, Determining that the first prediction mode is in the MPM list; decoding the first bit in the K bits; and determining the first prediction mode when the value of the first bit in the K bits is 0 Is the first in the MPM list; when the value of the first bit in the K bits is 1, the second bit in the K bits is decoded, and when the binary representation of the K bits is 10 When the first prediction mode is determined to be the second in the MPM list; when the binary representation of the K bits is 11, the first prediction mode is determined to be the third in the MPM list.
  • the decoding module 620 is further configured to determine, according to the MPM list indicator, that the first prediction mode is not in the MPM list; decode the next S bit, and according to the value of the S bit Determining an index of the first prediction mode in a non-MPM list, where the non-MPM list includes 2 S intra prediction modes, where S is a positive integer.
  • the second prediction mode when the first prediction mode is an angle mode, the second prediction mode is an angle mode adjacent to the first prediction mode, or the second prediction mode is an angle mode
  • the first prediction mode is an angular mode spaced by an angle
  • the second prediction mode when the first prediction mode is a planar mode, the second prediction mode is a DC mode, or the second prediction mode is any mode of an angle mode ;
  • the first prediction mode is a direct current mode
  • the second prediction mode is a planar mode
  • the second prediction mode is any of the angle modes.
  • the second prediction mode when the first prediction mode is an angle mode, the second prediction mode is an angle mode adjacent to the first prediction mode; when the first prediction mode is a plane In the mode, the second prediction mode is a direct current mode, or the second prediction mode is any mode of an angle mode.
  • the intra prediction mode is a combination of any two of all intra prediction modes.
  • an effective combination composed with the first prediction mode is preset in an encoding device and a decoding device, or an effective combination composed with the first prediction mode is carried in a video parameter.
  • the encoding device sends a set, a sequence parameter set, an image parameter set, a sequence header, an image header, or a slice header to the decoding device.
  • the decoding module 620 is further configured to obtain a first prediction block according to the first prediction mode, and according to the first A second prediction mode obtains a second prediction block; and obtains a prediction block of the current block according to the first prediction block and the second prediction block.
  • the decoding module 620 obtaining the prediction block of the current block according to the first prediction block and the second prediction block may include: according to the first prediction block and the first prediction block Obtain the prediction block of the current block by averaging two prediction blocks; or obtain the prediction block of the current block according to the weighted sum of the first prediction block and the second prediction block.
  • FIG. 7 is a schematic block diagram of a decoding device 700 according to an embodiment of the present application.
  • the decoding device 700 shown in FIG. 7 may include a processor 710 and a memory 720.
  • the memory 720 stores computer instructions.
  • the decoding device 700 causes the decoding device 700 to perform the following steps: Obtaining a code stream, where the code stream includes indication information for indicating an intra prediction mode of a current block, the intra prediction mode is selected from a single intra prediction mode and a combination of two intra prediction modes, the The instruction information includes first information for indicating whether the intra prediction mode is a single intra prediction mode or a combination of two intra prediction modes; and decoding the current block according to the instruction information.
  • the decoding device 700 in the embodiment of the present application may further include a network interface for transmitting a code stream. For example, receiving a code stream sent by an encoding device.
  • the instruction information further includes second information indicating a first prediction mode that is the intra prediction method; and the processor 710 executes, according to the instruction information, the current block.
  • the computer instructions for decoding cause the decoding device 700 to specifically perform the following steps: determine that the intra prediction mode is a single intra prediction mode according to the first information; and determine as the frame according to the second information The first prediction mode in an intra prediction manner.
  • the instruction information further includes second information used to indicate that it is the first prediction mode in the intra prediction mode, and used to indicate that it is used as the first prediction mode in the intra prediction mode.
  • the intra-prediction mode is a combination of two intra-prediction modes; the first prediction mode in the intra-prediction mode is determined according to the second information; and the intra-frame is determined according to the third information.
  • the second prediction mode in a prediction manner.
  • the third information includes M bits, and the M bit indicates a specific combination including valid combinations of the first prediction mode, and the specific combination is the first prediction mode. And the second prediction mode, wherein M is a positive integer.
  • M is equal to two.
  • the processor 710 executes computer instructions for decoding the current block according to the instruction information, so that the decoding device 700 specifically performs the following steps: decoding the M bits The first bit; when the value of the first bit in the M bits is the first value, determining that the specific combination is the first group in the valid combination; when the first bit in the M bits is When the value of each bit is the second value, it is determined that the specific combination is a non-first group in the effective combination, the second bit in the M bits is decoded, and the specific combination is determined in the effective Position in the combination.
  • the second information includes a most probable mode MPM list indicator and an index of the first prediction mode
  • the MPM list indicator is used to indicate the first Whether the prediction mode is in the MPM list
  • the MPM list includes N intra prediction modes, where N is a positive integer.
  • the index of the first prediction mode is represented by a variable-length truncation code, and the index of the first prediction mode includes K bits.
  • the processor 710 executes The computer instructions for decoding the current block cause the decoding device 700 to specifically perform the following steps: determining that the first prediction mode is in the MPM list according to the MPM list indicator; and decoding the first One bit; when the value of the first bit in the K bits is 0, determining that the first prediction mode is the first in the MPM list; when the first bit in the K bits When the value of is 1, the second bit of the K bits is decoded, and when the binary representation of the K bits is 10, it is determined that the first prediction mode is the second one in the MPM list; when all When the binary representation of the K bits is 11, it is determined that the first prediction mode is the third one in the MPM list.
  • the processor 710 executes computer instructions for decoding the current block according to the instruction information, so that the decoding device 700 specifically performs the following steps: according to the MPM list indicator To determine that the first prediction mode is not in the MPM list; decode the next S bit, and determine an index of the first prediction mode in a non-MPM list according to the value of the S bit, where the non-MPM list includes 2 S intra prediction modes, where S is a positive integer.
  • the second prediction mode when the first prediction mode is an angle mode, the second prediction mode is an angle mode adjacent to the first prediction mode, or the second prediction mode is an angle mode
  • the first prediction mode is an angular mode spaced by an angle
  • the second prediction mode when the first prediction mode is a planar mode, the second prediction mode is a DC mode, or the second prediction mode is any mode of an angle mode ;
  • the first prediction mode is a direct current mode
  • the second prediction mode is a planar mode
  • the second prediction mode is any of the angle modes.
  • the second prediction mode when the first prediction mode is an angle mode, the second prediction mode is an angle mode adjacent to the first prediction mode; when the first prediction mode is a plane In the mode, the second prediction mode is a direct current mode, or the second prediction mode is any mode of an angle mode.
  • the intra prediction mode is a combination of any two of all intra prediction modes.
  • an effective combination composed with the first prediction mode is preset in an encoding device and a decoding device, or an effective combination composed with the first prediction mode is carried in a video parameter.
  • the encoding device sends a set, a sequence parameter set, an image parameter set, a sequence header, an image header, or a slice header to the decoding device.
  • the processor 710 when the intra prediction mode is a combination of two intra prediction modes, is further configured to execute the computer instructions, so that the decoding device 700 performs the following steps: : Obtaining a first prediction block according to the first prediction mode and obtaining a second prediction block according to the second prediction mode; obtaining a prediction block for the current block according to the first prediction block and the second prediction block .
  • the processor 710 executes computer instructions for obtaining a prediction block of the current block according to the first prediction block and the second prediction block, so that the decoding device 700 specifically performs the following steps: Obtaining an average value of the first prediction block and the second prediction block to obtain a prediction block of the current block; or obtaining a prediction of the current block according to a weighted sum of the first prediction block and the second prediction block Piece.
  • decoding device 600 shown in FIG. 6 or the decoding device 700 shown in FIG. 7 may be used to perform operations or processes of the decoding device in the foregoing method embodiment, and each module and device in the decoding device 600 or the decoding device 700 The operations and / or functions are respectively implemented to implement the corresponding processes in the foregoing method embodiments, and are not repeated here for brevity.
  • the devices of the embodiments of the present application may be implemented based on a memory and a processor.
  • Each memory is used to store instructions for executing the method of the embodiments of the present application.
  • the processor executes the foregoing instructions to enable the device to execute the embodiments of the present application Methods.
  • processors mentioned in the embodiments of the present application may include a central processing unit (CPU), a network processor (NP), or a combination of a CPU and an NP.
  • the processor may further include a hardware chip.
  • the hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof.
  • the PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a general array logic (GAL), or any combination thereof.
  • the memory mentioned in the embodiments of the present application may be volatile memory (non-volatile memory) or non-volatile memory (non-volatile memory), or may include both volatile and non-volatile memory .
  • the non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (erasable PROM, EPROM), electrical memory Erase programmable read-only memory (electrically EPROM, EEPROM), flash memory (flash memory), hard disk (hard disk drive) (HDD) or solid-state hard disk (solid-state drive (SSD)).
  • the volatile memory may be a random access memory (RAM), which is used as an external cache.
  • RAM random access memory
  • DRAM dynamic random access memory
  • SDRAM synchronous dynamic random access memory
  • double SDRAM double SDRAM
  • DDR SDRAM double data rate synchronous dynamic random access memory
  • enhanced SDRAM enhanced SDRAM
  • SLDRAM synchronous connection dynamic random access memory
  • direct RAMbus RAM direct RAMbus RAM
  • the processor is a general-purpose processor, DSP, ASIC, FPGA or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component
  • the memory storage module
  • memory described herein is intended to include, but is not limited to, these and any other suitable types of memory.
  • An embodiment of the present application further provides a computer-readable storage medium that stores instructions thereon.
  • the instructions When the instructions are run on a computer, the computer is caused to execute the steps performed by the encoding device in the foregoing method embodiment.
  • An embodiment of the present application further provides a computer-readable storage medium that stores instructions thereon, and when the instructions are run on a computer, the computer is caused to execute the steps performed by the decoding device in the foregoing method embodiment.
  • An embodiment of the present application further provides a computing device, where the computing device includes the computer-readable storage medium described above.
  • An embodiment of the present application further provides a computer program product including instructions, characterized in that when a computer runs the finger of the computer program product, the computer executes the steps performed by the encoding device in the foregoing method embodiment.
  • An embodiment of the present application further provides a computer program product including instructions, characterized in that, when a computer runs the finger of the computer program product, the computer executes the steps performed by the decoding device in the foregoing method embodiment.
  • An embodiment of the present application further provides a computer chip that enables a computer to execute the steps performed by the encoding device in the foregoing method embodiment.
  • An embodiment of the present application further provides a computer chip that enables a computer to execute the steps performed by the decoding device in the foregoing method embodiment.
  • the embodiments of the present application can be applied in the field of aircraft, especially in the field of drones.
  • circuits, sub-circuits, and sub-units in the embodiments of the present application is merely schematic. Those of ordinary skill in the art may realize that the circuits, sub-circuits, and sub-units of the various examples described in the embodiments disclosed herein can be further split or combined.
  • the devices provided in the embodiments of the present application may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
  • software When implemented in software, it may be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer instructions.
  • the computer instructions When the computer instructions are loaded and executed on a computer, the processes or functions according to the 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 devices.
  • the computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be from a website site, computer, server, or data center Transmission by wire (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) to another website site, computer, server, or data center.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, and the like that includes one or more available medium integration.
  • the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a high-density digital video disc (DVD)), or a semiconductor medium (for example, an SSD).
  • a magnetic medium for example, a floppy disk, a hard disk, a magnetic tape
  • an optical medium for example, a high-density digital video disc (DVD)
  • DVD high-density digital video disc
  • semiconductor medium for example, an SSD
  • the size of the sequence numbers of the above processes does not mean the order of execution.
  • the execution order of each process should be determined by its function and internal logic, and should not deal with the implementation process of the embodiment of this application. Constitute any limitation.
  • the disclosed systems, devices, and methods may be implemented in other ways.
  • the device embodiments described above are only schematic.
  • the division of the unit is only a logical function division.
  • multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, which may be electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objective of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each of the units may exist separately physically, or two or more units may be integrated into one unit.

Abstract

一种编码方法、解码方法、编码设备和解码设备,该编码方法包括:确定当前块的帧内预测方式,所述帧内预测方式选自单种帧内预测模式和两种帧内预测模式的组合;将用于指示所述帧内预测方式的指示信息编码到码流中,所述指示信息中包括用于指示所述帧内预测方式是单种帧内预测模式或是两种帧内预测模式的组合的第一信息。本申请的方法中,当前块的帧内预测方式是从单种帧内预测模式和两种帧内预测模式的组合中选择的,选择出的帧内预测方式对应的残差更小,可以节省编码开销,降低码率,提高预测效率。

Description

编码方法、解码方法、编码设备和解码设备
版权申明
本专利文件披露的内容包含受版权保护的材料。该版权为版权所有人所有。版权所有人不反对任何人复制专利与商标局的官方记录和档案中所存在的该专利文件或者该专利披露。
技术领域
本申请涉及视频编解码领域,尤其涉及一种编码方法、解码方法、编码设备和解码设备。
背景技术
预测是主流的视频编/解码过程的重要步骤。帧内预测通常利用视频帧在空间域上的相关性,通过方向预测来近似原始纹理。对于一帧图像,先将其划分成等大的编码树单元(coding tree unit,CTU),例如,CTU的尺寸可以为64x64、128x128。每个CTU又可以进一步划分成正方形或矩形的编码单元(coding unit,CU),或者称为“块”。现有的帧内预测模式包括35个。编码过程中需对每个CU决策最终预测模式,即对每个CU从35个帧内预测模式中选择一个帧内预测模式。
上述帧内预测过程只对纹理平滑或纹理方向规则的块预测效果较好。而对纹理复杂的块,上述帧内预测过程会造成比较大的残差,并且从块划分角度,其要求对块的划分更加精细,从而会导致更多的语法元素开销,造成帧内预测的码率高且预测效率低。
发明内容
本申请提供了一种编码方法、解码方法、编码设备和解码设备,能够降低帧内预测的码率,提高帧内预测的效率。
第一方面,提供了一种编码方法,包括:确定当前块的帧内预测方式,所述帧内预测方式选自单种帧内预测模式和两种帧内预测模式的组合;将用于指示所述帧内预测方式的指示信息编码到码流中,所述指示信息中包括用 于指示所述帧内预测方式是单种帧内预测模式或是两种帧内预测模式的组合的第一信息。
第二方面,提供了一种解码方法,包括:获取码流,所述码流中包括用于指示当前块的帧内预测方式的指示信息,所述帧内预测方式选自单种帧内预测模式和两种帧内预测模式的组合,所述指示信息中包括用于指示所述帧内预测方式是单种帧内预测模式或是两种帧内预测模式的组合的第一信息;根据所述指示信息,对所述当前块进行解码。
第三方面,提供了一种编码设备,所述编码设备包括处理器和存储器,所述存储器中存储有计算机指令,所述处理器执行所述计算机指令时,使得所述编码设备执行以下步骤:确定当前块的帧内预测方式,所述帧内预测方式选自单种帧内预测模式和两种帧内预测模式的组合;将用于指示所述帧内预测方式的指示信息编码到码流中,所述指示信息中包括用于指示所述帧内预测方式是单种帧内预测模式或是两种帧内预测模式的组合的第一信息。
第四方面,提供了一种解码设备,所述解码设备包括处理器和存储器,所述存储器中存储有计算机指令,所述处理器执行所述计算机指令时,使得所述解码设备执行以下步骤:获取码流,所述码流中包括用于指示当前块的帧内预测方式的指示信息,所述帧内预测方式选自单种帧内预测模式和两种帧内预测模式的组合,所述指示信息中包括用于指示所述帧内预测方式是单种帧内预测模式或是两种帧内预测模式的组合的第一信息;根据所述指示信息,对所述当前块进行解码。
第五方面,提供了一种计算机可读存储介质,其上存储有指令,当所述指令在计算机上运行时,使得所述计算机执行第一方面所述的编码方法。
第六方面,提供了一种计算机可读存储介质,其上存储有指令,当所述指令在计算机上运行时,使得所述计算机执行第二方面所述的解码方法。
第七方面,提供了一种计算机程序,该计算机程序使得计算机执行第一方面的编码方法。
第八方面,提供了一种计算机程序,该计算机程序使得计算机执行第二方面的解码方法。
第九方面,提供了一种计算机芯片,该计算机芯片使得计算机执行第一方面的编码方法。
第十方面,提供了一种计算机芯片,该计算机芯片使得计算机执行第二 方面的解码方法。
本申请各方面,当前块的帧内预测方式是从单种帧内预测模式和两种帧内预测模式的组合中选择的,选择出的帧内预测方式对应的残差更小,可以节省编码开销,降低码率,提高预测效率。
附图说明
图1是本申请一个实施例的编码方法的示意性流程图。
图2是本申请另一个实施例的编码方法的示意性流程图。
图3是本申请一个实施例的解码方法的示意性流程图。
图4是本申请一个实施例提供的编码设备的示意性框图。
图5是本申请另一个实施例提供的编码设备的示意性框图。
图6是本申请一个实施例提供的解码设备的示意性框图。
图7是本申请另一个实施例提供的解码设备的示意性框图。
具体实施方式
下面将结合附图,对本申请实施例中的技术方案进行描述。
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中在本申请的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本申请。
首先介绍本申请实施例涉及的相关技术及概念。
近年来,由于便携式设备、手持式设备以及可穿戴设备的盛行,视频的内容量不断增长。随着视频形式变得越来越复杂,视频的存储和传输变得越来越具有挑战性。为了减少视频存储和传输所占用的带宽,通常在编码端对视频数据进行编码压缩,在解码端进行解码。
编码压缩过程包括预测、变换、量化和熵编码等处理。其中,预测包括帧内预测和帧间预测两种类型,其目的在于利用预测块数据去除当前待编码图像块的冗余信息。帧内预测利用本帧图像的信息获得预测块数据,其过程包括将当前待编码图像划分成若干个待编码图像块,再针对待编码图像块进行至少一次的划分(例如利用HEVC标准中的四叉树划分方法,或者利用四叉树二叉树划分方法),划分成若干个子图像块;然后,针对每个子图像块,在帧内搜索与当前子图像块最匹配的图像块作为预测图像块,预测图像块与 当前子图像块的相对位移即为运动矢量;其后,将该子图像块与预测图像块的相应像素值相减得到残差。将得到的各子图像块对应的残差组合在一起,得到待编码图像块的残差。残差经过变换、量化和熵编码等处理后得到熵编码比特流,将熵编码比特流及进行编码后的编码模式信息,例如帧内预测模式、运动矢量(或运动矢量残差)等信息,进行存储或发送到解码端。
在图像的解码端,获得熵编码比特流后进行熵解码,得到相应的残差;根据解码得到的运动矢量、帧内预测等信息找到待解码图像块对应的预测图像块;根据预测图像块与残差得到待解码图像块中各像素点的值。
前文中提到,在现代视频编/解码标准中,可以通过将图像分成多个小块来对不同分辨率的图像进行编/解码,即图像可以被分成多个图像块。图像可以被分成任何数量的图像块。例如,该图像可以被分成一个m×n图像块阵列。图像块可以具有矩形形状、正方形形状、圆形形状或任何其他形状。图像块可以具有任何尺寸,例如p×q像素。每个图像块都可以具有相同尺寸和/或形状。可替代地,两个或更多图像块可以具有不同的尺寸和/或形状。图像块可以具有或者可以不具有任何重叠部分。在一些实施例中,该图像块在一些编/解码标准中被称为宏块或最大编码单元(largest coding unit,LCU)。对于H.264标准,该图像块被称为宏块,其大小可以是16×16像素。对于高效率视频编码(high efficiency video coding,HEVC)标准,图像块被称为CTU,其大小可以是8×8像素~64×64像素。
在另一些实施例中,一个图像块也可以不是一个宏块或CTU,而是包含一个宏块或CTU的部分,或者包含至少两个完整的宏块(或CTU),或者包含至少一个完整的宏块(或CTU)和一个宏块(或CTU)的部分,或者包含至少两个完整的宏块(或CTU)和一些宏块(或CTU)的部分。如此,在图像被分成多个图像块之后,可以分别对图像数据中的这些图像块进行编/解码。
在另一些实施例中,一个图像块可以指的是一个宏块或CTU的部分。例如,一个图像块可以指的是在一些视频编/解码标准中的CU、预测单元(prediction unit,PU)或变换单元(transform unit,TU)。
应理解,本申请各实施例的当前块可以是以上图像块中的任意一种。
还应理解,本申请可以应用于符合国际视频编/解码标准H.264/高级视频编码(advanced video coding,AVC),H.265/HEVC,H.266/多功能视频编码 (versatile video coding,VVC)和中国视频编码标准——信源编码标准(audio video coding standard,AVS)2等的编/解码器。
本申请提出了一种基于更有效的编码方式的包含双模式的帧内预测方案。图1是本申请一个实施例的编码方法100的示意性流程图。该编码方法100可以由编码设备执行。编码设备在本文中也可以称为编码端或编码器。如图1所示,该编码方法100可以包括以下步骤。
S110,确定当前块的帧内预测方式,该帧内预测方式选自单种帧内预测模式和两种帧内预测模式的组合。
S120,将用于指示该帧内预测方式的指示信息编码到码流中,该指示信息中包括用于指示该帧内预测方式是单种帧内预测模式或是两种帧内预测模式的组合的第一信息。
本申请实施例的编码方法,当前块的帧内预测方式是从单种帧内预测模式和两种帧内预测模式的组合中选择的,选择出的帧内预测方式对应的残差更小,可以节省编码开销,降低码率,提高预测效率。
在本申请的一些实施例中,供选择的两种帧内预测模式的组合可以包括:编号相邻的两个角度模式的组合(即编号为2的模式至编号为34的模式中编号相邻的两个模式的组合);编码间隔为1的两个角度模式的组合(即编号为2的模式至编号为34的模式中间隔为1的两个模式的组合);平面(planar)模式(即编号为0的模式)与直流(direct current,DC)模式(即编号为1的模式)的组合;平面模式(即编号为0的模式)与任意一个角度模式(编号为2的模式至编号为34的模式中任意一个模式)的组合;和直流模式(即编号为1的模式)与任意一个角度模式(编号为2的模式至编号为34的模式中任意一个模式)的组合。
换而言之,当前块的帧内预测方式为选自以下中的一种:编号相邻的两个角度模式的组合;编码间隔为1的两个角度模式的组合;平面模式与直流模式的组合;平面模式与任意一个角度模式的组合;直流模式与任意一个角度模式的组合;和单个模式的任意一个帧内预测模式(例如35个帧内预测模式中的任意一个)。
在本申请的另一些实施例中,供选择的两种帧内预测模式的组合可以包括:编号相邻的两个角度模式的组合(即编号为2的模式至编号为34的模式中编号相邻的两个模式的组合);平面模式(即编号为0的模式)与直流 模式(即编号为1的模式)的组合;和平面模式(即编号为0的模式)与任意一个角度模式(编号为2的模式至编号为34的模式中任意一个模式)的组合。
换而言之,当前块的帧内预测方式为选自以下中的一种:编号相邻的两个角度模式的组合;平面模式与直流模式的组合;平面模式与任意一个角度模式的组合;和单个模式的任意一个帧内预测模式(例如35个帧内预测模式中的任意一个)。
在本申请的又一些实施例中,供选择的两种帧内预测模式的组合可以包括:所有帧内预测模式中任意两个的组合(编号为0的模式至编号为34的模式中任意两个的组合)。
换而言之,当前块的帧内预测方式为选自以下中的一种:所有帧内预测模式中任意两个的组合(例如35个帧内预测模式中任意两个的组合);和单个模式的任意一个帧内预测模式(例如35个帧内预测模式中的任意一个)。
应理解,在本申请的其他实施例中,供选择的两种帧内预测模式的组合还可以是其他形式的组合。或者,当前块的帧内预测方式所选自的方式还可以是其他的方式。帧内预测模式的组合还可以是三种帧内预测模式或更多种帧内预测模式的组合,本申请实施例对此不作限定。
本申请实施例的两种帧内预测模式的组合,是指组合现有的帧内预测模式,用两个帧内预测模式同时对当前块进行预测得到两个预测块,对两个预测块进行加权求和或求均值,得到当前块的最终的预测块。
相应地,当该帧内预测方式为两种帧内预测模式的组合时,该编码方法100还可以包括:根据该第一预测模式获得第一预测块,根据该第二预测模式获得第二预测块;根据该第一预测块与该第二预测块,获得该当前块的预测块。
可选地,该根据该第一预测块与该第二预测块,获得该当前块的预测块,可以包括:根据该第一预测块与该第二预测块的均值,获得该当前块的预测块;或根据该第一预测块与该第二预测块的加权和,获得该当前块的预测块。
在本申请的一些实施例中,S110确定当前块的帧内预测方式,可以包括:从N+2 S个帧内预测模式中确定出绝对变换差之和SATD最小的P个帧内预测模式;根据该当前块的左边块的帧内预测方式和该当前块的上边块的帧内预测方式,确定该当前块的最可能模式MPM列表,该MPM列表中包括N 个帧内预测模式;确定T个两种帧内预测模式的组合;进行率失真优化RDO,从该P个帧内预测模式、该N个帧内预测模式和该T个两种帧内预测模式的组合中,选择率失真优化代价最小的单种帧内预测模式或两种帧内预测模式的组合,作为该帧内预测方式,其中,N、S、P和T均为正整数。
具体地,对于单种帧内预测模式,首先可以先进行粗略模式选择(rough mode decision,RMD)。例如,从N+2 S个帧内预测模式中确定出绝对变换差之和SATD最小的P个帧内预测模式,加入候选模式列表中。在一个例子中,P可以等于3。
然后利用当前块的、已编码的左边块和上边块的帧内预测方式,构建最可能模式(most probable modes,MPM)列表,把MPM列表中的帧内预测模式与候选模式列表中已有的模式进行去冗余后添加到候选模式列表中。
之后,确定T个两种帧内预测模式的组合,该T个两种帧内预测模式的组合可以形成候选组合列表。应理解,这里的T个两种帧内预测模式的组合可以是全文中所描述的供选择的两种帧内预测模式的所有组合。T个两种帧内预测模式的组合也可以是所有组合中的部分组合,例如从所有组合中选择出部分组合,本申请实施例对此不作限定。
最后,通过率失真优化(rate distortion optimization,RDO)准则,计算候选模式列表中的每个帧内预测模式对应的率失真优化代价(rate distortion cost,RD cost),以及T个两种帧内预测模式的组合对应的RD cost,比较这些RD cost,将RD cost最小的单种帧内预测模式或两种帧内预测模式的组合确定为当前块的帧内预测方式。通过这种方式确定的当前块的帧内预测方式可能是单种帧内预测模式,也可能是两种帧内预测模式的组合。
如果当前块的帧内预测方式是两种帧内预测模式的组合,那么该组合中可以包括第一预测模式和第二预测模式。基于前述对两种帧内预测模式的组合的说明。第一预测模式和第二预测模式可以有以下多种关系。
例如,当该第一预测模式为角度模式时,该第二预测模式为与该第一预测模式相邻的角度模式,或该第二预测模式为与该第一预测模式间隔一个角度的角度模式;当该第一预测模式为平面模式时,该第二预测模式为直流模式,或该第二预测模式为角度模式种的任一模式;当该第一预测模式为直流模式时,该第二预测模式为平面模式,或该第二预测模式为角度模式中的任一模式。
再如,当该第一预测模式为角度模式时,该第二预测模式为与该第一预测模式相邻的角度模式;当该第一预测模式为平面模式时,该第二预测模式为直流模式,或该第二预测模式为角度模式种的任一模式。
又如,该帧内预测方式为所有帧内预测模式中任意两个的组合。
应理解,本申请各实施例中,两个帧内预测模式的组合与其中该两个帧内预测模式的顺序无关。
在本申请的一些实施例中,与该第一预测模式组成的有效的组合是预先设置在编码设备和解码设备中的。例如,前文中供选择的两种帧内预测模式的组合,可以被预先设置在编码设备和解码设备中。编码设备根据预先设置的组合,确定出第一预测模式和第二预测模式。编码设备在编码第一预测模式后,可以得知能够与第一预测模式组成有效的组合的到底有多少个帧内预测模式。这些帧内预测模式可以以编号大小进行排序,第三信息指示第二预测模式在其中的顺序,即索引即可。
在本申请的另一些实施例中,与该第一预测模式组成的有效的组合携带在视频参数集、序列参数集、图像参数集、序列头、图像头或条带头中由该编码设备发送给该解码设备。例如,编码设备确定出第一预测模式和第二预测模式。编码设备在编码第一预测模式后,可以得知能够与第一预测模式组成有效的组合的到底有哪些。编码设备可以通过上述视频参数集、序列参数集、图像参数集、序列头、图像头或条带头,将有效的组合,或者将有效的组合中的另一帧内预测模式发送给解码设备。同时,编码设备通过第三信息指示第二预测模式的索引。
本申请中,当所述帧内预测方式为单种帧内预测模式时,该单种帧内预测模式,即帧内预测方式为第一预测模式;当所述帧内预测方式为两种帧内预测模式的组合时,帧内预测方式包括第一预测模式和第二预测模式。应理解,这是分两种不同情况进行描述的,两种情况下第一预测模式无关联关系,仅是作为各自情况下的一种帧内预测模式。另外,在编码过程中,不论是单种帧内预测模式还是两种帧内预测模式的组合,其中的第一预测模式的语法元素可以是相同,这将在下文中详细进行描述。
图2是本申请另一个实施例的编码方法200的示意性流程图。图2所示的编码方法200可以包括以下步骤。
S210,从N+2 S个帧内预测模式中确定出SATD最小的P个帧内预测模 式,将P个帧内预测模式加入候选模式列表中。
S220,从当前块的左边块的帧内预测方式和该当前块的上边块的帧内预测方式中,确定出N个帧内预测模式,形成该当前块的MPM列表。
S230,把MPM列表中的帧内预测模式去冗余后添加到候选模式列表中,得到最终的候选模式列表candidate mode list(候选模式1,候选模式2,…,候选模式X)。
S240,确定T个两种帧内预测模式的组合,该T个两种帧内预测模式的组合形成候选组合列表bicandidate modes list。
S250,将候选模式列表candidate mode list和候选组合列表bicandidate modes list合并为最终的候选列表。
S260,计算最终的候选列表中X+T个候选项中每个候选项对应的RD cost,将RD cost最小的候选项确定为当前块的帧内预测方式。
下面详细说明本申请各实施例对帧内预测方式的编码,即将用于指示该帧内预测方式的指示信息编码到码流中。换而言之,下面将说明编码器对每个块的帧内预测方式进行编码时的语法元素。本申请对帧内预测方式的编码可以有多种。合理设计语法元素,可以节省编码的新模式带来的额外开销,提升最终的帧内编码效率。
在本申请的一些实施例中,该指示信息中可以包括用于指示该帧内预测方式是单种帧内预测模式或是两种帧内预测模式的组合的第一信息。
在一种明式指示的方案中,该第一信息可以是一个标志变量(flag),例如本文中可以记为biIntraPred_flag。该biIntraPred_flag可以是1比特,例如,biIntraPred_flag的值为1表示该帧内预测方式是两种帧内预测模式的组合,或biIntraPred_flag的值为0表示帧内预测方式是单种帧内预测模式。
在一种暗式指示的方案中,该第一信息可以复用指示当前块的帧内预测方式的比特。例如,当帧内预测方式是两种帧内预测模式的组合时,指示当前块的帧内预测方式的比特的一部分用于指示第一预测模式,另一部分用于指示第二预测模式。当帧内预测方式是单种帧内预测模式时,比特的一部分用于指示第一预测模式(即帧内预测方式,或者称最终预测方式),另一部分为预设的特定值(即为第一信息),以指示帧内预测方式是单种帧内预测模式。例如,在本申请的一个例子中,共用A+M个比特指示当前块的帧内预测方式。A比特用于指示第一预测模式(当帧内预测方式是单种帧内预测 模式时,即为帧内预测方式;当帧内预测方式是两种帧内预测模式的组合时,即为帧内预测方式对应的组合中的一个帧内预测模式)。当帧内预测方式是两种帧内预测模式的组合时,M比特用于指示第二预测模式;当帧内预测方式是单种帧内预测模式时,M比特为预设的特定值。A和M可以为固定值,也可以为可变值。A和M可以不相等;A和M也可以相等,例如均等于6。A比特用于指示第一预测模式的编号;当帧内预测方式是两种帧内预测模式的组合时,M比特用于指示第二预测模式的编号(最大值为34,最小值为0);当帧内预测方式是单种帧内预测模式时,M比特为预设的特定值111111。
在本申请的一些实施例中,当该帧内预测方式为单种帧内预测模式时,该指示信息还包括指示作为该帧内预测方式的第一预测模式的第二信息。例如,当该帧内预测方式为单种帧内预测模式时,用biIntraPred_flag与A个比特,可以指示帧内预测方式。再如,当该帧内预测方式为单种帧内预测模式时,用A+M个比特指示当前块的帧内预测方式,其中,A个比特为第二信息,M个比特为第一信息。
在本申请的另一些实施例中,当该帧内预测方式为两种帧内预测模式的组合时,该指示信息还包括用于指示作为该帧内预测方式中的第一预测模式的第二信息,以及用于指示作为该帧内预测方式中的第二预测模式的第三信息。例如,当该帧内预测方式为两种帧内预测模式的组合时,用biIntraPred_flag与第二信息、第三信息,可以指示帧内预测方式。再如,当该帧内预测方式为两种帧内预测模式的组合时,用A+M个比特指示当前块的帧内预测方式,其中,A个比特为第二信息,M个比特既指示第一信息,同时又指示第三信息。
下面结合具体的例子,详细说明第二信息的具体表达形式。
该第二信息中可以包括MPM列表指示符以及该第一预测模式的索引,该MPM列表指示符用于指示该第一预测模式是否在该MPM列表中,该MPM列表中包括N个帧内预测模式。例如,MPM列表指示符可以标记为mpm_flag。mpm_flag的值为1表示该第一预测模式在MPM列表中;mpm_flag的值为0表示该第一预测模式不在MPM列表中。
具体而言,编码设备获取当前块的MPM列表,判断第一预测模式是否在该MPM列表中。若是,则编码MPM列表指示符mpm_flag的值为1,否则编码MPM列表指示符mpm_flag的值为0。
以MPM列表中包括3个帧内预测模式为例进行说明。
当编码MPM列表指示符mpm_flag的值为1时,即当该第一预测模式在该MPM列表中时,第一预测模式的索引可以用变长截断码表示。该第一预测模式的索引可以包括K比特,K为可变值。当该第一预测模式为该MPM列表中的第一个时,K等于1,该1比特可以取第三值,例如该第一预测模式的索引的值等于0,二进制表示为0。当该第一预测模式为该MPM列表中的第二个或第三个时,K等于2,该2比特的第1个比特可以取第四值,例如取1。例如,当该第一预测模式为该MPM列表中的第二个时,该第一预测模式的索引的值等于1,二进制表示为10;当该第一预测模式为该MPM列表中的第三个时,该第一预测模式的索引的值等于2,二进制表示为11。
由此,当该第一预测模式在该MPM列表中时,采用1比特或2比特即可具体指示该第一预测模式是MPM列表中的哪个帧内预测模式。应理解,上述取值仅为举例。每个比特的具体值0或1所代表的含义可以进行设定,本申请实施例对此不作限定。
当编码MPM列表指示符mpm_flag的值为0时,即当该第一预测模式不在该MPM列表中时,该第一预测模式的索引用S比特表示,该S比特指示该第一预测模式在非MPM列表中的索引,该非MPM列表中包括2 S个帧内预测模式,其中,S为正整数。例如,单种帧内预测模式可以包括共35种帧内预测模式。MPM列表中包括3个帧内预测模式,那么不在该MPM列表中的帧内预测模式共有32个,S=5,即用5比特就可以指示该第一预测模式在非MPM列表中的索引。
应理解,还有更多的方式可以用来指示第一预测模式,例如直接指示第一预测模式的编号等,此处不再赘述。
接下来,详细说明第三信息的具体表达形式。应理解,第三信息即第二预测模式的指示方式与第一预测模式与第二预测模式的可能组合的数量有关系。
在一些实施例中,第一预测模式与第二预测模式的可能组合(或者称为有效的组合)的数量较多。第二预测模式可以采用与第一预测模式相同的表达方式表达。例如,如前文所述的,用MPM列表指示符以及变长截断码来表示。
在另一些实施例中,第一预测模式与第二预测模式的可能组合(或者称 为有效的组合)的数量较多。可以采用直接指示第二预测模式的编号的方式来指示。
在又一些实施例中,第一预测模式与第二预测模式的可能组合(或者称为有效的组合)的数量较少。可以采用M比特指示第二预测模式是第一预测模式的有效的组合中的某特定组合种的帧内预测模式。相对应地,该第三信息包括M比特,该M比特指示包括该第一预测模式的有效的组合中的特定组合,该特定组合为该第一预测模式与该第二预测模式的组合,其中,M为正整数。应理解,由于第一预测模式已经指示过了,指示第一预测模式与第二预测模式的组合,与指示第二预测模式是等价的。
M可以是固定值,例如M等于1或2。当任一帧内预测模式与其他帧内预测模式的组合的数量小于或等于4个时,用2比特就可以指示第一预测模式的有效的组合中的特定组合。当任一帧内预测模式与其他帧内预测模式的组合的数量小于或等于2个时,用1比特就可以指示第一预测模式的有效的组合中的特定组合。
M也可以是可变值,即可以用变长截断码指示第二预测模式。例如,当任一帧内预测模式与其他帧内预测模式的组合的数量小于或等于3个时,可以用变长截断码指示第二预测模式。M等于1或2,当该特定组合为该有效的组合中的第一组时,M等于1,1比特取第一值;当该特定组合为该有效的组合中的非第一组时,M等于2,2比特中的第一位取第二值。
应理解,除以上描述的具体表达形式,第三信息或第二预测模式还可以以其他的形式进行表达。
还应理解,本申请的各实施例中,第一信息、第二信息和第三信息的编码顺序可以合理的进行组合,本申请实施例对此不作限定。例如,最先编码第一信息,继而编码第二信息,当当前块的帧内预测方式为两种帧内预测模式的组合时,还可以编码第三信息。再如,因为无论当前块的帧内预测方式是单种帧内预测模式还是两种帧内预测模式的组合,均需要编码第二信息。因此,可以最先编码第二信息,继而编码第一信息,当当前块的帧内预测方式为两种帧内预测模式的组合时,还可以编码第三信息。
以上从编码的角度详细说明了本申请的方法,下面从解码的角度说明本申请的方法。
本申请还提供了一种解码方法。图3是本申请一个实施例的解码方法 300的示意性流程图。如图3所示,解码方法300可以包括以下步骤。
S310,获取码流,该码流中包括用于指示当前块的帧内预测方式的指示信息,该帧内预测方式选自单种帧内预测模式和两种帧内预测模式的组合,该指示信息中包括用于指示该帧内预测方式是单种帧内预测模式或是两种帧内预测模式的组合的第一信息。
S320,根据该指示信息,对该当前块进行解码。
本申请实施例的解码方法,当前块的帧内预测方式是从单种帧内预测模式和两种帧内预测模式的组合中选择的,选择出的帧内预测方式对应的残差更小,可以节省开销,降低码率,提高预测效率。
在本申请的一些实施例中,该指示信息还可以包括指示作为该帧内预测方式的第一预测模式的第二信息;S220根据该指示信息,对该当前块进行解码,可以包括:根据该第一信息确定该帧内预测方式为单种帧内预测模式;根据该第二信息,确定作为该帧内预测方式的该第一预测模式。
在本申请的一些实施例中,该指示信息还包括用于指示作为该帧内预测方式中的第一预测模式的第二信息,以及用于指示作为该帧内预测方式中的第二预测模式的第三信息;S220根据该指示信息,对该当前块进行解码,可以包括:根据该第一信息确定该帧内预测方式为两种帧内预测模式的组合;根据该第二信息,确定该帧内预测方式中的该第一预测模式;根据该第三信息,确定该帧内预测方式中的该第二预测模式。
在本申请的一些实施例中,该第三信息可以包括M比特,该M比特指示包括该第一预测模式的有效的组合中的特定组合,该特定组合为该第一预测模式与该第二预测模式的组合,其中,M为正整数。
在本申请的一些实施例中,M可以等于2。
在本申请的一些实施例中,S220根据该指示信息,对该当前块进行解码,可以包括:解码该M比特中的第一个比特;当该M比特中的第一个比特的值为第一值时,确定该特定组合为该有效的组合中的第一组;当该M比特中的第一个比特的值为第二值时,确定该特定组合为该有效的组合中的非第一组,解码该M比特中的第二个比特,确定该特定组合在该有效的组合中的位置。
在本申请的一些实施例中,该第二信息中可以包括最可能模式MPM列表指示符以及该第一预测模式的索引,该MPM列表指示符用于指示该第一 预测模式是否在该MPM列表中,该MPM列表中包括N个帧内预测模式,其中,N为正整数。
在本申请的一些实施例中,该第一预测模式的索引用变长截断码表示,该第一预测模式的索引包括K比特;S220根据该指示信息,对该当前块进行解码,可以包括:根据该MPM列表指示符,确定该第一预测模式在该MPM列表中;解码该K比特中的第一个比特;当该K比特中的第一个比特的值为0时,确定该第一预测模式为该MPM列表中的第一个;当该K比特中的第一个比特的值为1时,解码该K比特中的第二个比特,当该K比特的二进制表示为10时,确定该第一预测模式为该MPM列表中的第二个;当该K比特的二进制表示为11时,确定该第一预测模式为该MPM列表中的第三个。
在本申请的一些实施例中,S220根据该指示信息,对该当前块进行解码,可以包括:根据该MPM列表指示符,确定该第一预测模式不在该MPM列表中;解码接下来S比特,根据该S比特的值确定该第一预测模式在非MPM列表中的索引,该非MPM列表中包括2 S个帧内预测模式,其中,S为正整数。
在本申请的一些实施例中,当该第一预测模式为角度模式时,该第二预测模式为与该第一预测模式相邻的角度模式,或该第二预测模式为与该第一预测模式间隔一个角度的角度模式;当该第一预测模式为平面模式时,该第二预测模式为直流模式,或该第二预测模式为角度模式种的任一模式;当该第一预测模式为直流模式时,该第二预测模式为平面模式,或该第二预测模式为角度模式中的任一模式。
在本申请的一些实施例中,当该第一预测模式为角度模式时,该第二预测模式为与该第一预测模式相邻的角度模式;当该第一预测模式为平面模式时,该第二预测模式为直流模式,或该第二预测模式为角度模式种的任一模式。
在本申请的一些实施例中,该帧内预测方式为所有帧内预测模式中任意两个的组合。
在本申请的一些实施例中,与该第一预测模式组成的有效的组合是预先设置在编码设备和解码设备中的,或者与该第一预测模式组成的有效的组合携带在视频参数集、序列参数集、图像参数集、序列头、图像头或条带头中 由该编码设备发送给该解码设备。
在本申请的一些实施例中,当该帧内预测方式为两种帧内预测模式的组合时,该解码方法300还可以包括:根据该第一预测模式获得第一预测块,根据该第二预测模式获得第二预测块;根据该第一预测块与该第二预测块,获得该当前块的预测块。
在本申请的一些实施例中,该根据该第一预测块与该第二预测块,获得该当前块的预测块,可以包括:根据该第一预测块与该第二预测块的均值,获得该当前块的预测块;或根据该第一预测块与该第二预测块的加权和,获得该当前块的预测块。
以上结合图1至图3详细说明了本申请实施例的方法,下面结合图4至图7详细说明本申请实施例的编码设备和解码设备。
图4是本申请实施例提供的编码设备400的示意性框图。该编码设备400包括:处理模块410,用于确定当前块的帧内预测方式,所述帧内预测方式选自单种帧内预测模式和两种帧内预测模式的组合;编码模块420,用于将用于指示所述帧内预测方式的指示信息编码到码流中,所述指示信息中包括用于指示所述帧内预测方式是单种帧内预测模式或是两种帧内预测模式的组合的第一信息。
本申请实施例的编码设备,当前块的帧内预测方式是从单种帧内预测模式和两种帧内预测模式的组合中选择的,选择出的帧内预测方式对应的残差更小,可以节省编码开销,降低码率,提高预测效率。
在本申请的一些实施例中,当所述帧内预测方式为单种帧内预测模式时,所述指示信息还包括指示作为所述帧内预测方式的第一预测模式的第二信息。
在本申请的一些实施例中,当所述帧内预测方式为两种帧内预测模式的组合时,所述指示信息还包括用于指示作为所述帧内预测方式中的第一预测模式的第二信息,以及用于指示作为所述帧内预测方式中的第二预测模式的第三信息。
在本申请的一些实施例中,所述第三信息包括M比特,所述M比特指示包括所述第一预测模式的有效的组合中的特定组合,所述特定组合为所述第一预测模式与所述第二预测模式的组合,其中,M为正整数。
在本申请的一些实施例中,M等于2。
在本申请的一些实施例中,所述第三信息用变长截断码表示,M等于1或2,当所述特定组合为所述有效的组合中的第一组时,M等于1,1比特取第一值;当所述特定组合为所述有效的组合中的非第一组时,M等于2,2比特中的第一位取第二值。
在本申请的一些实施例中,所述第二信息中包括最可能模式MPM列表指示符以及所述第一预测模式的索引,所述MPM列表指示符用于指示所述第一预测模式是否在所述MPM列表中,所述MPM列表中包括N个帧内预测模式,其中,N为正整数。
在本申请的一些实施例中,当所述第一预测模式在所述MPM列表中,且N等于3时,所述第一预测模式的索引用变长截断码表示,所述第一预测模式的索引包括K比特,当所述第一预测模式为所述MPM列表中的第一个时,K等于1,所述第一预测模式的索引的值等于0,二进制表示为0;当所述第一预测模式为所述MPM列表中的第二个时,K等于2,所述第一预测模式的索引的值等于1,二进制表示为10;当所述第一预测模式为所述MPM列表中的第三个时,K等于2,所述第一预测模式的索引的值等于2,二进制表示为11。
在本申请的一些实施例中,当所述第一预测模式不在所述MPM列表中时,所述第一预测模式的索引用S比特表示,所述S比特指示所述第一预测模式在非MPM列表中的索引,所述非MPM列表中包括2 S个帧内预测模式,其中,S为正整数。
在本申请的一些实施例中,处理模块410具体可以用于:从N+2 S个帧内预测模式中确定出绝对变换差之和SATD最小的P个帧内预测模式;根据所述当前块的左边块的帧内预测方式和所述当前块的上边块的帧内预测方式,确定所述当前块的最可能模式MPM列表,所述MPM列表中包括N个帧内预测模式;确定T个两种帧内预测模式的组合;进行率失真优化RDO,从所述P个帧内预测模式、所述N个帧内预测模式和所述T个两种帧内预测模式的组合中,选择率失真优化代价最小的单种帧内预测模式或两种帧内预测模式的组合,作为所述帧内预测方式,其中,N、S、P和T均为正整数。
在本申请的一些实施例中,当所述第一预测模式为角度模式时,所述第二预测模式为与所述第一预测模式相邻的角度模式,或所述第二预测模式为与所述第一预测模式间隔一个角度的角度模式;当所述第一预测模式为平面 模式时,所述第二预测模式为直流模式,或所述第二预测模式为角度模式种的任一模式;当所述第一预测模式为直流模式时,所述第二预测模式为平面模式,或所述第二预测模式为角度模式中的任一模式。
在本申请的一些实施例中,当所述第一预测模式为角度模式时,所述第二预测模式为与所述第一预测模式相邻的角度模式;当所述第一预测模式为平面模式时,所述第二预测模式为直流模式,或所述第二预测模式为角度模式种的任一模式。
在本申请的一些实施例中,所述帧内预测方式为所有帧内预测模式中任意两个的组合。
在本申请的一些实施例中,与所述第一预测模式组成的有效的组合是预先设置在编码设备和解码设备中的,或者与所述第一预测模式组成的有效的组合携带在视频参数集、序列参数集、图像参数集、序列头、图像头或条带头中由所述编码设备发送给所述解码设备。
在本申请的一些实施例中,当所述帧内预测方式为两种帧内预测模式的组合时,所述处理模块410还用于:根据所述第一预测模式获得第一预测块,根据所述第二预测模式获得第二预测块;根据所述第一预测块与所述第二预测块,获得所述当前块的预测块。
在本申请的一些实施例中,所述处理模块410具体用于:根据所述第一预测块与所述第二预测块的均值,获得所述当前块的预测块;或根据所述第一预测块与所述第二预测块的加权和,获得所述当前块的预测块。
图5是本申请实施例提供的编码设备500的示意性框图。如图5所示的编码设备500可以包括处理器510和存储器520,所述存储器520中存储有计算机指令,所述处理器510执行所述计算机指令时,使得所述编码设备500执行以下步骤:确定当前块的帧内预测方式,所述帧内预测方式选自单种帧内预测模式和两种帧内预测模式的组合;将用于指示所述帧内预测方式的指示信息编码到码流中,所述指示信息中包括用于指示所述帧内预测方式是单种帧内预测模式或是两种帧内预测模式的组合的第一信息。
应理解,本申请实施例的编码设备500还可以包括网络接口,以用于传输码流。例如将码流发送给解码设备。
在本申请的一些实施例中,当所述帧内预测方式为单种帧内预测模式时,所述指示信息还包括指示作为所述帧内预测方式的第一预测模式的第二信 息。
在本申请的一些实施例中,当所述帧内预测方式为两种帧内预测模式的组合时,所述指示信息还包括用于指示作为所述帧内预测方式中的第一预测模式的第二信息,以及用于指示作为所述帧内预测方式中的第二预测模式的第三信息。
在本申请的一些实施例中,所述第三信息包括M比特,所述M比特指示包括所述第一预测模式的有效的组合中的特定组合,所述特定组合为所述第一预测模式与所述第二预测模式的组合,其中,M为正整数。
在本申请的一些实施例中,M等于2。
在本申请的一些实施例中,所述第三信息用变长截断码表示,M等于1或2,当所述特定组合为所述有效的组合中的第一组时,M等于1,1比特取第一值;当所述特定组合为所述有效的组合中的非第一组时,M等于2,2比特中的第一位取第二值。
在本申请的一些实施例中,所述第二信息中包括最可能模式MPM列表指示符以及所述第一预测模式的索引,所述MPM列表指示符用于指示所述第一预测模式是否在所述MPM列表中,所述MPM列表中包括N个帧内预测模式,其中,N为正整数。
在本申请的一些实施例中,当所述第一预测模式在所述MPM列表中,且N等于3时,所述第一预测模式的索引用变长截断码表示,所述第一预测模式的索引包括K比特,当所述第一预测模式为所述MPM列表中的第一个时,K等于1,所述第一预测模式的索引的值等于0,二进制表示为0;当所述第一预测模式为所述MPM列表中的第二个时,K等于2,所述第一预测模式的索引的值等于1,二进制表示为10;当所述第一预测模式为所述MPM列表中的第三个时,K等于2,所述第一预测模式的索引的值等于2,二进制表示为11。
在本申请的一些实施例中,当所述第一预测模式不在所述MPM列表中时,所述第一预测模式的索引用S比特表示,所述S比特指示所述第一预测模式在非MPM列表中的索引,所述非MPM列表中包括2 S个帧内预测模式,其中,S为正整数。
在本申请的一些实施例中,所述处理器510执行确定当前块的帧内预测方式的计算机指令,使得所述编码设备500具体执行以下步骤:从N+2 S个 帧内预测模式中确定出绝对变换差之和SATD最小的P个帧内预测模式;根据所述当前块的左边块的帧内预测方式和所述当前块的上边块的帧内预测方式,确定所述当前块的最可能模式MPM列表,所述MPM列表中包括N个帧内预测模式;确定T个两种帧内预测模式的组合;进行率失真优化RDO,从所述P个帧内预测模式、所述N个帧内预测模式和所述T个两种帧内预测模式的组合中,选择率失真优化代价最小的单种帧内预测模式或两种帧内预测模式的组合,作为所述帧内预测方式,其中,N、S、P和T均为正整数。
在本申请的一些实施例中,当所述第一预测模式为角度模式时,所述第二预测模式为与所述第一预测模式相邻的角度模式,或所述第二预测模式为与所述第一预测模式间隔一个角度的角度模式;当所述第一预测模式为平面模式时,所述第二预测模式为直流模式,或所述第二预测模式为角度模式种的任一模式;当所述第一预测模式为直流模式时,所述第二预测模式为平面模式,或所述第二预测模式为角度模式中的任一模式。
在本申请的一些实施例中,当所述第一预测模式为角度模式时,所述第二预测模式为与所述第一预测模式相邻的角度模式;当所述第一预测模式为平面模式时,所述第二预测模式为直流模式,或所述第二预测模式为角度模式种的任一模式。
在本申请的一些实施例中,所述帧内预测方式为所有帧内预测模式中任意两个的组合。
在本申请的一些实施例中,与所述第一预测模式组成的有效的组合是预先设置在编码设备和解码设备中的,或者与所述第一预测模式组成的有效的组合携带在视频参数集、序列参数集、图像参数集、序列头、图像头或条带头中由所述编码设备发送给所述解码设备。
在本申请的一些实施例中,当所述帧内预测方式为两种帧内预测模式的组合时,所述处理器510还用于执行所述计算机指令,使得所述编码设备500执行以下步骤:根据所述第一预测模式获得第一预测块,根据所述第二预测模式获得第二预测块;根据所述第一预测块与所述第二预测块,获得所述当前块的预测块。
在本申请的一些实施例中,所述处理器510执行根据所述第一预测块与所述第二预测块,获得所述当前块的预测块的计算机指令,使得所述编码设备500具体执行以下步骤:根据所述第一预测块与所述第二预测块的均值, 获得所述当前块的预测块;或根据所述第一预测块与所述第二预测块的加权和,获得所述当前块的预测块。
应理解,图4所示的编码设备400或图5所示的编码设备500,可用于执行上述方法实施例中编码设备的操作或流程,并且编码设备400或编码设备500中的各个模块和器件的操作和/或功能分别为了实现上述方法实施例中的相应流程,为了简洁,在此不再赘述。
图6是本申请实施例提供的解码设备600的示意性框图。该解码设备600包括:获取模块610,用于获取码流,所述码流中包括用于指示当前块的帧内预测方式的指示信息,所述帧内预测方式选自单种帧内预测模式和两种帧内预测模式的组合,所述指示信息中包括用于指示所述帧内预测方式是单种帧内预测模式或是两种帧内预测模式的组合的第一信息;解码模块620,用于根据所述指示信息,对所述当前块进行解码。
本申请实施例的解码设备,当前块的帧内预测方式是从单种帧内预测模式和两种帧内预测模式的组合中选择的,选择出的帧内预测方式对应的残差更小,可以节省编码开销,降低码率,提高预测效率。
在本申请的一些实施例中,所述指示信息还包括指示作为所述帧内预测方式的第一预测模式的第二信息;解码模块620还用于根据所述第一信息确定所述帧内预测方式为单种帧内预测模式;根据所述第二信息,确定作为所述帧内预测方式的所述第一预测模式。
在本申请的一些实施例中,所述指示信息还包括用于指示作为所述帧内预测方式中的第一预测模式的第二信息,以及用于指示作为所述帧内预测方式中的第二预测模式的第三信息;解码模块620还用于根据所述第一信息确定所述帧内预测方式为两种帧内预测模式的组合;根据所述第二信息,确定所述帧内预测方式中的所述第一预测模式;根据所述第三信息,确定所述帧内预测方式中的所述第二预测模式。
在本申请的一些实施例中,所述第三信息包括M比特,所述M比特指示包括所述第一预测模式的有效的组合中的特定组合,所述特定组合为所述第一预测模式与所述第二预测模式的组合,其中,M为正整数。
在本申请的一些实施例中,M等于2。
在本申请的一些实施例中,解码模块620还用于解码所述M比特中的第一个比特;当所述M比特中的第一个比特的值为第一值时,确定所述特 定组合为所述有效的组合中的第一组;当所述M比特中的第一个比特的值为第二值时,确定所述特定组合为所述有效的组合中的非第一组,解码所述M比特中的第二个比特,确定所述特定组合在所述有效的组合中的位置。
在本申请的一些实施例中,所述第二信息中包括最可能模式MPM列表指示符以及所述第一预测模式的索引,所述MPM列表指示符用于指示所述第一预测模式是否在所述MPM列表中,所述MPM列表中包括N个帧内预测模式,其中,N为正整数。
在本申请的一些实施例中,所述第一预测模式的索引用变长截断码表示,所述第一预测模式的索引包括K比特;解码模块620还用于根据所述MPM列表指示符,确定所述第一预测模式在所述MPM列表中;解码所述K比特中的第一个比特;当所述K比特中的第一个比特的值为0时,确定所述第一预测模式为所述MPM列表中的第一个;当所述K比特中的第一个比特的值为1时,解码所述K比特中的第二个比特,当所述K比特的二进制表示为10时,确定所述第一预测模式为所述MPM列表中的第二个;当所述K比特的二进制表示为11时,确定所述第一预测模式为所述MPM列表中的第三个。
在本申请的一些实施例中,解码模块620还用于根据所述MPM列表指示符,确定所述第一预测模式不在所述MPM列表中;解码接下来S比特,根据所述S比特的值确定所述第一预测模式在非MPM列表中的索引,所述非MPM列表中包括2 S个帧内预测模式,其中,S为正整数。
在本申请的一些实施例中,当所述第一预测模式为角度模式时,所述第二预测模式为与所述第一预测模式相邻的角度模式,或所述第二预测模式为与所述第一预测模式间隔一个角度的角度模式;当所述第一预测模式为平面模式时,所述第二预测模式为直流模式,或所述第二预测模式为角度模式种的任一模式;当所述第一预测模式为直流模式时,所述第二预测模式为平面模式,或所述第二预测模式为角度模式中的任一模式。
在本申请的一些实施例中,当所述第一预测模式为角度模式时,所述第二预测模式为与所述第一预测模式相邻的角度模式;当所述第一预测模式为平面模式时,所述第二预测模式为直流模式,或所述第二预测模式为角度模式种的任一模式。
在本申请的一些实施例中,所述帧内预测方式为所有帧内预测模式中任 意两个的组合。
在本申请的一些实施例中,与所述第一预测模式组成的有效的组合是预先设置在编码设备和解码设备中的,或者与所述第一预测模式组成的有效的组合携带在视频参数集、序列参数集、图像参数集、序列头、图像头或条带头中由所述编码设备发送给所述解码设备。
在本申请的一些实施例中,当所述帧内预测方式为两种帧内预测模式的组合时,解码模块620还用于根据所述第一预测模式获得第一预测块,根据所述第二预测模式获得第二预测块;根据所述第一预测块与所述第二预测块,获得所述当前块的预测块。
在本申请的一些实施例中,解码模块620根据所述第一预测块与所述第二预测块,获得所述当前块的预测块,可以包括:根据所述第一预测块与所述第二预测块的均值,获得所述当前块的预测块;或根据所述第一预测块与所述第二预测块的加权和,获得所述当前块的预测块。
图7是本申请实施例提供的解码设备700的示意性框图。如图7所示的解码设备700可以包括处理器710和存储器720,所述存储器720中存储有计算机指令,所述处理器710执行所述计算机指令时,使得所述解码设备700执行以下步骤:获取码流,所述码流中包括用于指示当前块的帧内预测方式的指示信息,所述帧内预测方式选自单种帧内预测模式和两种帧内预测模式的组合,所述指示信息中包括用于指示所述帧内预测方式是单种帧内预测模式或是两种帧内预测模式的组合的第一信息;根据所述指示信息,对所述当前块进行解码。
应理解,本申请实施例的解码设备700还可以包括网络接口,以用于传输码流。例如接收编码设备发送的码流。
在本申请的一些实施例中,所述指示信息还包括指示作为所述帧内预测方式的第一预测模式的第二信息;所述处理器710执行根据所述指示信息,对所述当前块进行解码的计算机指令,使得所述解码设备700具体执行以下步骤:根据所述第一信息确定所述帧内预测方式为单种帧内预测模式;根据所述第二信息,确定作为所述帧内预测方式的所述第一预测模式。
在本申请的一些实施例中,所述指示信息还包括用于指示作为所述帧内预测方式中的第一预测模式的第二信息,以及用于指示作为所述帧内预测方式中的第二预测模式的第三信息;所述处理器710执行根据所述指示信息, 对所述当前块进行解码的计算机指令,使得所述解码设备700具体执行以下步骤:根据所述第一信息确定所述帧内预测方式为两种帧内预测模式的组合;根据所述第二信息,确定所述帧内预测方式中的所述第一预测模式;根据所述第三信息,确定所述帧内预测方式中的所述第二预测模式。
在本申请的一些实施例中,所述第三信息包括M比特,所述M比特指示包括所述第一预测模式的有效的组合中的特定组合,所述特定组合为所述第一预测模式与所述第二预测模式的组合,其中,M为正整数。
在本申请的一些实施例中,M等于2。
在本申请的一些实施例中,所述处理器710执行根据所述指示信息,对所述当前块进行解码的计算机指令,使得所述解码设备700具体执行以下步骤:解码所述M比特中的第一个比特;当所述M比特中的第一个比特的值为第一值时,确定所述特定组合为所述有效的组合中的第一组;当所述M比特中的第一个比特的值为第二值时,确定所述特定组合为所述有效的组合中的非第一组,解码所述M比特中的第二个比特,确定所述特定组合在所述有效的组合中的位置。
在本申请的一些实施例中,其特征在于,所述第二信息中包括最可能模式MPM列表指示符以及所述第一预测模式的索引,所述MPM列表指示符用于指示所述第一预测模式是否在所述MPM列表中,所述MPM列表中包括N个帧内预测模式,其中,N为正整数。
在本申请的一些实施例中,所述第一预测模式的索引用变长截断码表示,所述第一预测模式的索引包括K比特;所述处理器710执行根据所述指示信息,对所述当前块进行解码的计算机指令,使得所述解码设备700具体执行以下步骤:根据所述MPM列表指示符,确定所述第一预测模式在所述MPM列表中;解码所述K比特中的第一个比特;当所述K比特中的第一个比特的值为0时,确定所述第一预测模式为所述MPM列表中的第一个;当所述K比特中的第一个比特的值为1时,解码所述K比特中的第二个比特,当所述K比特的二进制表示为10时,确定所述第一预测模式为所述MPM列表中的第二个;当所述K比特的二进制表示为11时,确定所述第一预测模式为所述MPM列表中的第三个。
在本申请的一些实施例中,所述处理器710执行根据所述指示信息,对所述当前块进行解码的计算机指令,使得所述解码设备700具体执行以下步 骤:根据所述MPM列表指示符,确定所述第一预测模式不在所述MPM列表中;解码接下来S比特,根据所述S比特的值确定所述第一预测模式在非MPM列表中的索引,所述非MPM列表中包括2 S个帧内预测模式,其中,S为正整数。
在本申请的一些实施例中,当所述第一预测模式为角度模式时,所述第二预测模式为与所述第一预测模式相邻的角度模式,或所述第二预测模式为与所述第一预测模式间隔一个角度的角度模式;当所述第一预测模式为平面模式时,所述第二预测模式为直流模式,或所述第二预测模式为角度模式种的任一模式;当所述第一预测模式为直流模式时,所述第二预测模式为平面模式,或所述第二预测模式为角度模式中的任一模式。
在本申请的一些实施例中,当所述第一预测模式为角度模式时,所述第二预测模式为与所述第一预测模式相邻的角度模式;当所述第一预测模式为平面模式时,所述第二预测模式为直流模式,或所述第二预测模式为角度模式种的任一模式。
在本申请的一些实施例中,所述帧内预测方式为所有帧内预测模式中任意两个的组合。
在本申请的一些实施例中,与所述第一预测模式组成的有效的组合是预先设置在编码设备和解码设备中的,或者与所述第一预测模式组成的有效的组合携带在视频参数集、序列参数集、图像参数集、序列头、图像头或条带头中由所述编码设备发送给所述解码设备。
在本申请的一些实施例中,当所述帧内预测方式为两种帧内预测模式的组合时,所述处理器710还用于执行所述计算机指令,使得所述解码设备700执行以下步骤:根据所述第一预测模式获得第一预测块,根据所述第二预测模式获得第二预测块;根据所述第一预测块与所述第二预测块,获得所述当前块的预测块。
其特征在于,所述处理器710执行根据所述第一预测块与所述第二预测块,获得所述当前块的预测块的计算机指令,使得所述解码设备700具体执行以下步骤:根据所述第一预测块与所述第二预测块的均值,获得所述当前块的预测块;或根据所述第一预测块与所述第二预测块的加权和,获得所述当前块的预测块。
应理解,图6所示的解码设备600或图7所示的解码设备700,可用于 执行上述方法实施例中解码设备的操作或流程,并且解码设备600或解码设备700中的各个模块和器件的操作和/或功能分别为了实现上述方法实施例中的相应流程,为了简洁,在此不再赘述。
应理解,本申请各实施例的设备可以基于存储器和处理器实现,各存储器用于存储用于执行本申请个实施例的方法的指令,处理器执行上述指令,使得设备执行本申请各实施例的方法。
应理解,本申请实施例中提及的处理器可以包括中央处理器(central processing pnit,CPU),网络处理器(network processor,NP)或者CPU和NP的组合。处理器还可以进一步包括硬件芯片。上述硬件芯片可以是专用集成电路(application-specific integrated circuit,ASIC),可编程逻辑器件(programmable logic device,PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(complex programmable logic device,CPLD),现场可编程逻辑门阵列(field-programmable gate array,FPGA),通用阵列逻辑(generic array logic,GAL)或其任意组合。
还应理解,本申请实施例中提及的存储器可以是易失性存储器(volatile memory)或非易失性存储器(non-volatile memory),或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)、快闪存储器(flash memory)、硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD)。易失性存储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic RAM,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)。
需要说明的是,当处理器为通用处理器、DSP、ASIC、FPGA或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件时,存储器(存 储模块)集成在处理器中。
应注意,本文描述的存储器旨在包括但不限于这些和任意其它适合类型的存储器。
本申请实施例还提供一种计算机可读存储介质,其上存储有指令,当指令在计算机上运行时,使得所述计算机执行上述方法实施例的由编码设备执行的步骤。
本申请实施例还提供一种计算机可读存储介质,其上存储有指令,当指令在计算机上运行时,使得所述计算机执行上述方法实施例的由解码设备执行的步骤。
本申请实施例还提供一种计算设备,该计算设备包括上述计算机可读存储介质。
本申请实施例还提供一种包括指令的计算机程序产品,其特征在于,当计算机运行所述计算机程序产品的所述指时,所述计算机执行上述方法实施例的由编码设备执行的步骤。
本申请实施例还提供一种包括指令的计算机程序产品,其特征在于,当计算机运行所述计算机程序产品的所述指时,所述计算机执行上述方法实施例的由解码设备执行的步骤。
本申请实施例还提供一种计算机芯片,该计算机芯片使得计算机执行上述方法实施例的由编码设备执行的步骤。
本申请实施例还提供一种计算机芯片,该计算机芯片使得计算机执行上述方法实施例的由解码设备执行的步骤。
本申请实施例可以应用在飞行器,尤其是无人机领域。
应理解,本申请各实施例的电路、子电路、子单元的划分只是示意性的。本领域普通技术人员可以意识到,本文中所公开的实施例描述的各示例的电路、子电路和子单元,能够再行拆分或组合。
本申请实施例提供给的设备,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质 中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如,高密度数字视频光盘(digital video disc,DVD))、或者半导体介质(例如,SSD)等。
应理解,本文中涉及的第一、第二以及各种数字编号仅为描述方便进行的区分,并不用来限制本申请的范围。
应理解,本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。
应理解,在本申请实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间 的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应所述以权利要求的保护范围为准。

Claims (64)

  1. 一种编码方法,其特征在于,包括:
    确定当前块的帧内预测方式,所述帧内预测方式选自单种帧内预测模式和两种帧内预测模式的组合;
    将用于指示所述帧内预测方式的指示信息编码到码流中,所述指示信息中包括用于指示所述帧内预测方式是单种帧内预测模式或是两种帧内预测模式的组合的第一信息。
  2. 根据权利要求1所述的编码方法,其特征在于,当所述帧内预测方式为单种帧内预测模式时,所述指示信息还包括指示作为所述帧内预测方式的第一预测模式的第二信息。
  3. 根据权利要求1所述的编码方法,其特征在于,当所述帧内预测方式为两种帧内预测模式的组合时,所述指示信息还包括用于指示作为所述帧内预测方式中的第一预测模式的第二信息,以及用于指示作为所述帧内预测方式中的第二预测模式的第三信息。
  4. 根据权利要求3所述的编码方法,其特征在于,所述第三信息包括M比特,所述M比特指示包括所述第一预测模式的有效的组合中的特定组合,所述特定组合为所述第一预测模式与所述第二预测模式的组合,其中,M为正整数。
  5. 根据权利要求4所述的编码方法,其特征在于,M等于2。
  6. 根据权利要求4所述的编码方法,其特征在于,所述第三信息用变长截断码表示,M等于1或2,
    当所述特定组合为所述有效的组合中的第一组时,M等于1,1比特取第一值;
    当所述特定组合为所述有效的组合中的非第一组时,M等于2,2比特中的第一位取第二值。
  7. 根据权利要求2至6中任一项所述的编码方法,其特征在于,所述第二信息中包括最可能模式MPM列表指示符以及所述第一预测模式的索引,所述MPM列表指示符用于指示所述第一预测模式是否在所述MPM列表中,所述MPM列表中包括N个帧内预测模式,其中,N为正整数。
  8. 根据权利要求7所述的编码方法,其特征在于,当所述第一预测模式 在所述MPM列表中,且N等于3时,所述第一预测模式的索引用变长截断码表示,所述第一预测模式的索引包括K比特,
    当所述第一预测模式为所述MPM列表中的第一个时,K等于1,所述第一预测模式的索引的值等于0,二进制表示为0;
    当所述第一预测模式为所述MPM列表中的第二个时,K等于2,所述第一预测模式的索引的值等于1,二进制表示为10;
    当所述第一预测模式为所述MPM列表中的第三个时,K等于2,所述第一预测模式的索引的值等于2,二进制表示为11。
  9. 根据权利要求7所述的编码方法,其特征在于,当所述第一预测模式不在所述MPM列表中时,所述第一预测模式的索引用S比特表示,所述S比特指示所述第一预测模式在非MPM列表中的索引,所述非MPM列表中包括2 S个帧内预测模式,其中,S为正整数。
  10. 权利要求1至9中任一项所述的编码方法,其特征在于,确定当前块的帧内预测方式,包括:
    从N+2 S个帧内预测模式中确定出绝对变换差之和SATD最小的P个帧内预测模式;
    根据所述当前块的左边块的帧内预测方式和所述当前块的上边块的帧内预测方式,确定所述当前块的最可能模式MPM列表,所述MPM列表中包括N个帧内预测模式;
    确定T个两种帧内预测模式的组合;
    进行率失真优化RDO,从所述P个帧内预测模式、所述N个帧内预测模式和所述T个两种帧内预测模式的组合中,选择率失真优化代价最小的单种帧内预测模式或两种帧内预测模式的组合,作为所述帧内预测方式,其中,N、S、P和T均为正整数。
  11. 根据权利要求3至6中任一项所述的编码方法,其特征在于,
    当所述第一预测模式为角度模式时,所述第二预测模式为与所述第一预测模式相邻的角度模式,或所述第二预测模式为与所述第一预测模式间隔一个角度的角度模式;
    当所述第一预测模式为平面模式时,所述第二预测模式为直流模式,或所述第二预测模式为角度模式种的任一模式;
    当所述第一预测模式为直流模式时,所述第二预测模式为平面模式,或 所述第二预测模式为角度模式中的任一模式。
  12. 根据权利要求3至6中任一项所述的编码方法,其特征在于,
    当所述第一预测模式为角度模式时,所述第二预测模式为与所述第一预测模式相邻的角度模式;
    当所述第一预测模式为平面模式时,所述第二预测模式为直流模式,或所述第二预测模式为角度模式种的任一模式。
  13. 根据权利要求1至10中任一项所述的编码方法,其特征在于,所述帧内预测方式为所有帧内预测模式中任意两个的组合。
  14. 根据权利要求3至6和11至13中任一项所述的编码方法,其特征在于,与所述第一预测模式组成的有效的组合是预先设置在编码设备和解码设备中的,或者与所述第一预测模式组成的有效的组合携带在视频参数集、序列参数集、图像参数集、序列头、图像头或条带头中由所述编码设备发送给所述解码设备。
  15. 根据权利要求1至14中任一项所述的编码方法,其特征在于,当所述帧内预测方式为两种帧内预测模式的组合时,所述编码方法还包括:
    根据所述第一预测模式获得第一预测块,根据所述第二预测模式获得第二预测块;
    根据所述第一预测块与所述第二预测块,获得所述当前块的预测块。
  16. 根据权利要求15所述的编码方法,其特征在于,所述根据所述第一预测块与所述第二预测块,获得所述当前块的预测块,包括:
    根据所述第一预测块与所述第二预测块的均值,获得所述当前块的预测块;或
    根据所述第一预测块与所述第二预测块的加权和,获得所述当前块的预测块。
  17. 一种解码方法,其特征在于,包括:
    获取码流,所述码流中包括用于指示当前块的帧内预测方式的指示信息,所述帧内预测方式选自单种帧内预测模式和两种帧内预测模式的组合,所述指示信息中包括用于指示所述帧内预测方式是单种帧内预测模式或是两种帧内预测模式的组合的第一信息;
    根据所述指示信息,对所述当前块进行解码。
  18. 根据权利要求17所述的解码方法,其特征在于,所述指示信息还包 括指示作为所述帧内预测方式的第一预测模式的第二信息;
    所述根据所述指示信息,对所述当前块进行解码,包括:
    根据所述第一信息确定所述帧内预测方式为单种帧内预测模式;
    根据所述第二信息,确定作为所述帧内预测方式的所述第一预测模式。
  19. 根据权利要求17所述的解码方法,其特征在于,所述指示信息还包括用于指示作为所述帧内预测方式中的第一预测模式的第二信息,以及用于指示作为所述帧内预测方式中的第二预测模式的第三信息;
    所述根据所述指示信息,对所述当前块进行解码,包括:
    根据所述第一信息确定所述帧内预测方式为两种帧内预测模式的组合;
    根据所述第二信息,确定所述帧内预测方式中的所述第一预测模式;
    根据所述第三信息,确定所述帧内预测方式中的所述第二预测模式。
  20. 根据权利要求19所述的解码方法,其特征在于,所述第三信息包括M比特,所述M比特指示包括所述第一预测模式的有效的组合中的特定组合,所述特定组合为所述第一预测模式与所述第二预测模式的组合,其中,M为正整数。
  21. 根据权利要求20所述的解码方法,其特征在于,M等于2。
  22. 根据权利要求20所述的解码方法,其特征在于,所述根据所述指示信息,对所述当前块进行解码,包括:
    解码所述M比特中的第一个比特;
    当所述M比特中的第一个比特的值为第一值时,确定所述特定组合为所述有效的组合中的第一组;
    当所述M比特中的第一个比特的值为第二值时,确定所述特定组合为所述有效的组合中的非第一组,解码所述M比特中的第二个比特,确定所述特定组合在所述有效的组合中的位置。
  23. 根据权利要求18至22中任一项所述的解码方法,其特征在于,所述第二信息中包括最可能模式MPM列表指示符以及所述第一预测模式的索引,所述MPM列表指示符用于指示所述第一预测模式是否在所述MPM列表中,所述MPM列表中包括N个帧内预测模式,其中,N为正整数。
  24. 根据权利要求23所述的解码方法,其特征在于,所述第一预测模式的索引用变长截断码表示,所述第一预测模式的索引包括K比特;
    所述根据所述指示信息,对所述当前块进行解码,包括:
    根据所述MPM列表指示符,确定所述第一预测模式在所述MPM列表中;
    解码所述K比特中的第一个比特;
    当所述K比特中的第一个比特的值为0时,确定所述第一预测模式为所述MPM列表中的第一个;
    当所述K比特中的第一个比特的值为1时,解码所述K比特中的第二个比特,当所述K比特的二进制表示为10时,确定所述第一预测模式为所述MPM列表中的第二个;当所述K比特的二进制表示为11时,确定所述第一预测模式为所述MPM列表中的第三个。
  25. 根据权利要求23所述的解码方法,其特征在于,所述根据所述指示信息,对所述当前块进行解码,包括:
    根据所述MPM列表指示符,确定所述第一预测模式不在所述MPM列表中;
    解码接下来S比特,根据所述S比特的值确定所述第一预测模式在非MPM列表中的索引,所述非MPM列表中包括2 S个帧内预测模式,其中,S为正整数。
  26. 根据权利要求19至22中任一项所述的解码方法,其特征在于,当所述第一预测模式为角度模式时,所述第二预测模式为与所述第一预测模式相邻的角度模式,或所述第二预测模式为与所述第一预测模式间隔一个角度的角度模式;
    当所述第一预测模式为平面模式时,所述第二预测模式为直流模式,或所述第二预测模式为角度模式种的任一模式;
    当所述第一预测模式为直流模式时,所述第二预测模式为平面模式,或所述第二预测模式为角度模式中的任一模式。
  27. 根据权利要求19至22中任一项所述的解码方法,其特征在于,
    当所述第一预测模式为角度模式时,所述第二预测模式为与所述第一预测模式相邻的角度模式;
    当所述第一预测模式为平面模式时,所述第二预测模式为直流模式,或所述第二预测模式为角度模式种的任一模式。
  28. 根据权利要求17至25中任一项所述的解码方法,其特征在于,所述帧内预测方式为所有帧内预测模式中任意两个的组合。
  29. 根据权利要求19至22和26至28中任一项所述的解码方法,其特征在于,与所述第一预测模式组成的有效的组合是预先设置在编码设备和解码设备中的,或者与所述第一预测模式组成的有效的组合携带在视频参数集、序列参数集、图像参数集、序列头、图像头或条带头中由所述编码设备发送给所述解码设备。
  30. 根据权利要求17至29中任一项所述的解码方法,当所述帧内预测方式为两种帧内预测模式的组合时,所述解码方法还包括:
    根据所述第一预测模式获得第一预测块,根据所述第二预测模式获得第二预测块;
    根据所述第一预测块与所述第二预测块,获得所述当前块的预测块。
  31. 根据权利要求30所述的解码方法,其特征在于,所述根据所述第一预测块与所述第二预测块,获得所述当前块的预测块,包括:
    根据所述第一预测块与所述第二预测块的均值,获得所述当前块的预测块;或
    根据所述第一预测块与所述第二预测块的加权和,获得所述当前块的预测块。
  32. 一种编码设备,其特征在于,所述编码设备包括处理器和存储器,所述存储器中存储有计算机指令,所述处理器执行所述计算机指令时,使得所述编码设备执行以下步骤:
    确定当前块的帧内预测方式,所述帧内预测方式选自单种帧内预测模式和两种帧内预测模式的组合;
    将用于指示所述帧内预测方式的指示信息编码到码流中,所述指示信息中包括用于指示所述帧内预测方式是单种帧内预测模式或是两种帧内预测模式的组合的第一信息。
  33. 根据权利要求32所述的编码设备,其特征在于,当所述帧内预测方式为单种帧内预测模式时,所述指示信息还包括指示作为所述帧内预测方式的第一预测模式的第二信息。
  34. 根据权利要求32所述的编码设备,其特征在于,当所述帧内预测方式为两种帧内预测模式的组合时,所述指示信息还包括用于指示作为所述帧内预测方式中的第一预测模式的第二信息,以及用于指示作为所述帧内预测方式中的第二预测模式的第三信息。
  35. 根据权利要求34所述的编码设备,其特征在于,所述第三信息包括M比特,所述M比特指示包括所述第一预测模式的有效的组合中的特定组合,所述特定组合为所述第一预测模式与所述第二预测模式的组合,其中,M为正整数。
  36. 根据权利要求35所述的编码设备,其特征在于,M等于2。
  37. 根据权利要求35所述的编码设备,其特征在于,所述第三信息用变长截断码表示,M等于1或2,
    当所述特定组合为所述有效的组合中的第一组时,M等于1,1比特取第一值;
    当所述特定组合为所述有效的组合中的非第一组时,M等于2,2比特中的第一位取第二值。
  38. 根据权利要求33至37中任一项所述的编码设备,其特征在于,所述第二信息中包括最可能模式MPM列表指示符以及所述第一预测模式的索引,所述MPM列表指示符用于指示所述第一预测模式是否在所述MPM列表中,所述MPM列表中包括N个帧内预测模式,其中,N为正整数。
  39. 根据权利要求38所述的编码设备,其特征在于,当所述第一预测模式在所述MPM列表中,且N等于3时,所述第一预测模式的索引用变长截断码表示,所述第一预测模式的索引包括K比特,
    当所述第一预测模式为所述MPM列表中的第一个时,K等于1,所述第一预测模式的索引的值等于0,二进制表示为0;
    当所述第一预测模式为所述MPM列表中的第二个时,K等于2,所述第一预测模式的索引的值等于1,二进制表示为10;
    当所述第一预测模式为所述MPM列表中的第三个时,K等于2,所述第一预测模式的索引的值等于2,二进制表示为11。
  40. 根据权利要求38所述的编码设备,其特征在于,当所述第一预测模式不在所述MPM列表中时,所述第一预测模式的索引用S比特表示,所述S比特指示所述第一预测模式在非MPM列表中的索引,所述非MPM列表中包括2 S个帧内预测模式,其中,S为正整数。
  41. 权利要求32至40中任一项所述的编码设备,其特征在于,所述处理器执行确定当前块的帧内预测方式的计算机指令,使得所述编码设备具体执行以下步骤:
    从N+2 S个帧内预测模式中确定出绝对变换差之和SATD最小的P个帧内预测模式;
    根据所述当前块的左边块的帧内预测方式和所述当前块的上边块的帧内预测方式,确定所述当前块的最可能模式MPM列表,所述MPM列表中包括N个帧内预测模式;
    确定T个两种帧内预测模式的组合;
    进行率失真优化RDO,从所述P个帧内预测模式、所述N个帧内预测模式和所述T个两种帧内预测模式的组合中,选择率失真优化代价最小的单种帧内预测模式或两种帧内预测模式的组合,作为所述帧内预测方式,其中,N、S、P和T均为正整数。
  42. 根据权利要求34至37中任一项所述的编码设备,其特征在于,
    当所述第一预测模式为角度模式时,所述第二预测模式为与所述第一预测模式相邻的角度模式,或所述第二预测模式为与所述第一预测模式间隔一个角度的角度模式;
    当所述第一预测模式为平面模式时,所述第二预测模式为直流模式,或所述第二预测模式为角度模式种的任一模式;
    当所述第一预测模式为直流模式时,所述第二预测模式为平面模式,或所述第二预测模式为角度模式中的任一模式。
  43. 根据权利要求34至37中任一项所述的编码设备,其特征在于,
    当所述第一预测模式为角度模式时,所述第二预测模式为与所述第一预测模式相邻的角度模式;
    当所述第一预测模式为平面模式时,所述第二预测模式为直流模式,或所述第二预测模式为角度模式种的任一模式。
  44. 根据权利要求32至41中任一项所述的编码设备,其特征在于,所述帧内预测方式为所有帧内预测模式中任意两个的组合。
  45. 根据权利要求34至37和42至44中任一项所述的编码设备,其特征在于,与所述第一预测模式组成的有效的组合是预先设置在编码设备和解码设备中的,或者与所述第一预测模式组成的有效的组合携带在视频参数集、序列参数集、图像参数集、序列头、图像头或条带头中由所述编码设备发送给所述解码设备。
  46. 根据权利要求32至45中任一项所述的编码设备,其特征在于,当 所述帧内预测方式为两种帧内预测模式的组合时,所述处理器还用于执行所述计算机指令,使得所述编码设备执行以下步骤:
    根据所述第一预测模式获得第一预测块,根据所述第二预测模式获得第二预测块;
    根据所述第一预测块与所述第二预测块,获得所述当前块的预测块。
  47. 根据权利要求46所述的编码设备,其特征在于,所述处理器执行根据所述第一预测块与所述第二预测块,获得所述当前块的预测块的计算机指令,使得所述编码设备具体执行以下步骤:
    根据所述第一预测块与所述第二预测块的均值,获得所述当前块的预测块;或
    根据所述第一预测块与所述第二预测块的加权和,获得所述当前块的预测块。
  48. 一种解码设备,其特征在于,所述解码设备包括处理器和存储器,所述存储器中存储有计算机指令,所述处理器执行所述计算机指令时,使得所述解码设备执行以下步骤:
    获取码流,所述码流中包括用于指示当前块的帧内预测方式的指示信息,所述帧内预测方式选自单种帧内预测模式和两种帧内预测模式的组合,所述指示信息中包括用于指示所述帧内预测方式是单种帧内预测模式或是两种帧内预测模式的组合的第一信息;
    根据所述指示信息,对所述当前块进行解码。
  49. 根据权利要求48所述的解码设备,其特征在于,所述指示信息还包括指示作为所述帧内预测方式的第一预测模式的第二信息;
    所述处理器执行根据所述指示信息,对所述当前块进行解码的计算机指令,使得所述解码设备具体执行以下步骤:
    根据所述第一信息确定所述帧内预测方式为单种帧内预测模式;
    根据所述第二信息,确定作为所述帧内预测方式的所述第一预测模式。
  50. 根据权利要求48所述的解码设备,其特征在于,所述指示信息还包括用于指示作为所述帧内预测方式中的第一预测模式的第二信息,以及用于指示作为所述帧内预测方式中的第二预测模式的第三信息;
    所述处理器执行根据所述指示信息,对所述当前块进行解码的计算机指令,使得所述解码设备具体执行以下步骤:
    根据所述第一信息确定所述帧内预测方式为两种帧内预测模式的组合;
    根据所述第二信息,确定所述帧内预测方式中的所述第一预测模式;
    根据所述第三信息,确定所述帧内预测方式中的所述第二预测模式。
  51. 根据权利要求50所述的解码设备,其特征在于,所述第三信息包括M比特,所述M比特指示包括所述第一预测模式的有效的组合中的特定组合,所述特定组合为所述第一预测模式与所述第二预测模式的组合,其中,M为正整数。
  52. 根据权利要求51所述的解码设备,其特征在于,M等于2。
  53. 根据权利要求51所述的解码设备,其特征在于,所述处理器执行根据所述指示信息,对所述当前块进行解码的计算机指令,使得所述解码设备具体执行以下步骤:
    解码所述M比特中的第一个比特;
    当所述M比特中的第一个比特的值为第一值时,确定所述特定组合为所述有效的组合中的第一组;
    当所述M比特中的第一个比特的值为第二值时,确定所述特定组合为所述有效的组合中的非第一组,解码所述M比特中的第二个比特,确定所述特定组合在所述有效的组合中的位置。
  54. 根据权利要求48至53中任一项所述的解码设备,其特征在于,所述第二信息中包括最可能模式MPM列表指示符以及所述第一预测模式的索引,所述MPM列表指示符用于指示所述第一预测模式是否在所述MPM列表中,所述MPM列表中包括N个帧内预测模式,其中,N为正整数。
  55. 根据权利要求54所述的解码设备,其特征在于,所述第一预测模式的索引用变长截断码表示,所述第一预测模式的索引包括K比特;
    所述处理器执行根据所述指示信息,对所述当前块进行解码的计算机指令,使得所述解码设备具体执行以下步骤:
    根据所述MPM列表指示符,确定所述第一预测模式在所述MPM列表中;
    解码所述K比特中的第一个比特;
    当所述K比特中的第一个比特的值为0时,确定所述第一预测模式为所述MPM列表中的第一个;
    当所述K比特中的第一个比特的值为1时,解码所述K比特中的第二 个比特,当所述K比特的二进制表示为10时,确定所述第一预测模式为所述MPM列表中的第二个;当所述K比特的二进制表示为11时,确定所述第一预测模式为所述MPM列表中的第三个。
  56. 根据权利要求54所述的解码设备,其特征在于,所述处理器执行根据所述指示信息,对所述当前块进行解码的计算机指令,使得所述解码设备具体执行以下步骤:
    根据所述MPM列表指示符,确定所述第一预测模式不在所述MPM列表中;
    解码接下来S比特,根据所述S比特的值确定所述第一预测模式在非MPM列表中的索引,所述非MPM列表中包括2 S个帧内预测模式,其中,S为正整数。
  57. 根据权利要求50至53中任一项所述的解码设备,其特征在于,当所述第一预测模式为角度模式时,所述第二预测模式为与所述第一预测模式相邻的角度模式,或所述第二预测模式为与所述第一预测模式间隔一个角度的角度模式;
    当所述第一预测模式为平面模式时,所述第二预测模式为直流模式,或所述第二预测模式为角度模式种的任一模式;
    当所述第一预测模式为直流模式时,所述第二预测模式为平面模式,或所述第二预测模式为角度模式中的任一模式。
  58. 根据权利要求50至53中任一项所述的解码设备,其特征在于,
    当所述第一预测模式为角度模式时,所述第二预测模式为与所述第一预测模式相邻的角度模式;
    当所述第一预测模式为平面模式时,所述第二预测模式为直流模式,或所述第二预测模式为角度模式种的任一模式。
  59. 根据权利要求48至56中任一项所述的解码设备,其特征在于,所述帧内预测方式为所有帧内预测模式中任意两个的组合。
  60. 根据权利要求50至53和57至59中任一项所述的解码设备,其特征在于,与所述第一预测模式组成的有效的组合是预先设置在编码设备和解码设备中的,或者与所述第一预测模式组成的有效的组合携带在视频参数集、序列参数集、图像参数集、序列头、图像头或条带头中由所述编码设备发送给所述解码设备。
  61. 根据权利要求48至60中任一项所述的解码设备,其特征在于,当所述帧内预测方式为两种帧内预测模式的组合时,所述处理器还用于执行所述计算机指令,使得所述解码设备执行以下步骤:
    根据所述第一预测模式获得第一预测块,根据所述第二预测模式获得第二预测块;
    根据所述第一预测块与所述第二预测块,获得所述当前块的预测块。
  62. 根据权利要求61所述的解码设备,其特征在于,所述处理器执行根据所述第一预测块与所述第二预测块,获得所述当前块的预测块的计算机指令,使得所述解码设备具体执行以下步骤:
    根据所述第一预测块与所述第二预测块的均值,获得所述当前块的预测块;或
    根据所述第一预测块与所述第二预测块的加权和,获得所述当前块的预测块。
  63. 一种计算机可读存储介质,其特征在于,其上存储有指令,当所述指令在计算机上运行时,使得所述计算机执行权利要求1至16中任一项所述的编码方法。
  64. 一种计算机可读存储介质,其特征在于,其上存储有指令,当所述指令在计算机上运行时,使得所述计算机执行权利要求17至31中任一项所述的解码方法。
PCT/CN2018/107435 2018-09-25 2018-09-25 编码方法、解码方法、编码设备和解码设备 WO2020061784A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2018/107435 WO2020061784A1 (zh) 2018-09-25 2018-09-25 编码方法、解码方法、编码设备和解码设备
CN201880054725.5A CN111108749A (zh) 2018-09-25 2018-09-25 编码方法、解码方法、编码设备和解码设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/107435 WO2020061784A1 (zh) 2018-09-25 2018-09-25 编码方法、解码方法、编码设备和解码设备

Publications (1)

Publication Number Publication Date
WO2020061784A1 true WO2020061784A1 (zh) 2020-04-02

Family

ID=69949226

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/107435 WO2020061784A1 (zh) 2018-09-25 2018-09-25 编码方法、解码方法、编码设备和解码设备

Country Status (2)

Country Link
CN (1) CN111108749A (zh)
WO (1) WO2020061784A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022188114A1 (zh) * 2021-03-11 2022-09-15 Oppo广东移动通信有限公司 帧内预测方法、编码器、解码器以及存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101222641A (zh) * 2007-01-11 2008-07-16 华为技术有限公司 帧内预测编解码方法及其装置
WO2017123133A1 (en) * 2016-01-12 2017-07-20 Telefonaktiebolaget Lm Ericsson (Publ) Video coding using hybrid intra prediction
CN107465916A (zh) * 2011-06-28 2017-12-12 寰发股份有限公司 编码/解码帧内预测模式的方法及装置

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101418098B1 (ko) * 2009-02-12 2014-07-14 에스케이 텔레콤주식회사 영상 부호화/복호화 장치 및 방법
WO2011083573A1 (ja) * 2010-01-07 2011-07-14 株式会社 東芝 動画像符号化装置及び動画像復号化装置
WO2012035640A1 (ja) * 2010-09-16 2012-03-22 株式会社 東芝 動画像符号化方法及び動画像復号化方法
CN107623857B (zh) * 2011-04-12 2021-01-05 韩国电子通信研究院 视频编码/解码方法、设备以及生成和存储比特流的方法
CN115134595A (zh) * 2015-06-05 2022-09-30 杜比实验室特许公司 用于执行帧间预测的图像编解码方法、比特流存储方法
US10142627B2 (en) * 2015-06-18 2018-11-27 Qualcomm Incorporated Intra prediction and intra mode coding
US20160373770A1 (en) * 2015-06-18 2016-12-22 Qualcomm Incorporated Intra prediction and intra mode coding
US20180103251A1 (en) * 2016-10-07 2018-04-12 Industrial Technology Research Institute Method for selecting prediction mode of intra prediction, video encoding device and image processing apparatus

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101222641A (zh) * 2007-01-11 2008-07-16 华为技术有限公司 帧内预测编解码方法及其装置
WO2008083633A1 (en) * 2007-01-11 2008-07-17 Huawei Technologies Co., Ltd. A method and a device for intra frame prediction encoding/decoding
CN107465916A (zh) * 2011-06-28 2017-12-12 寰发股份有限公司 编码/解码帧内预测模式的方法及装置
WO2017123133A1 (en) * 2016-01-12 2017-07-20 Telefonaktiebolaget Lm Ericsson (Publ) Video coding using hybrid intra prediction

Also Published As

Publication number Publication date
CN111108749A (zh) 2020-05-05

Similar Documents

Publication Publication Date Title
JP2022050614A (ja) ビデオコード化のためのマルチタイプツリーフレームワーク
JP5869122B2 (ja) ビデオコーディングにおける予測データのバッファリング
US20230336749A1 (en) Simplifications of cross-component linear model
TW201924343A (zh) 視訊寫碼中之仿射預測
WO2020018486A1 (en) Methods and apparatus of video coding using history-based motion vector prediction
CN113727101A (zh) 编码器、解码器及对应帧间预测方法
WO2016155576A1 (zh) 图像编解码方法和相关装置
KR20180113515A (ko) 최적화된 컴팩트 다중 패스 변환을 사용한 효율적인 변환 코딩
CN116193131B (zh) 一种用于视频编码的方法、电子装置及存储介质
US9420285B2 (en) Inter-layer mode derivation for prediction in scalable video coding
US20210329252A1 (en) Motion information acquisition method and device for video encoding or decoding
US10812796B2 (en) Image decoding method and apparatus in image coding system
US11949875B2 (en) Method and apparatus for decoding image by using transform according to block size in image coding system
US20210409746A1 (en) Signaling of lossless coding in video coding
CN110505482B (zh) 一种编解码方法及装置
TW202112135A (zh) 用於視訊寫碼之色度內預測單元
CN113170178A (zh) 对合并候选列表的构建的修改
WO2020056779A1 (en) Adaptive construction of most probable modes candidate list for video data encoding and decoding
CN112997494B (zh) 用于视频编码的运动矢量存储
JP2022521933A (ja) 符号化方法、復号化方法、デコーダ、エンコーダー及び記憶媒体
CN110546957A (zh) 一种帧内预测的方法及装置
WO2020114356A1 (zh) 帧间预测方法和相关装置
WO2020061784A1 (zh) 编码方法、解码方法、编码设备和解码设备
WO2019219066A1 (zh) 一种编解码方法及装置
CN115004706A (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: 18935749

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18935749

Country of ref document: EP

Kind code of ref document: A1