WO2013107419A1 - 一种编解码方法和设备 - Google Patents

一种编解码方法和设备 Download PDF

Info

Publication number
WO2013107419A1
WO2013107419A1 PCT/CN2013/070778 CN2013070778W WO2013107419A1 WO 2013107419 A1 WO2013107419 A1 WO 2013107419A1 CN 2013070778 W CN2013070778 W CN 2013070778W WO 2013107419 A1 WO2013107419 A1 WO 2013107419A1
Authority
WO
WIPO (PCT)
Prior art keywords
prediction mode
intra
value
block
coded
Prior art date
Application number
PCT/CN2013/070778
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
Priority to CA2838890A priority Critical patent/CA2838890C/en
Priority to JP2014525307A priority patent/JP5969608B2/ja
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to KR1020157014413A priority patent/KR20150067396A/ko
Priority to EP16204557.9A priority patent/EP3232663B1/en
Priority to PL16204557T priority patent/PL3232663T3/pl
Priority to KR1020177022211A priority patent/KR101855974B1/ko
Priority to KR1020167032949A priority patent/KR101768203B1/ko
Priority to KR1020137033632A priority patent/KR101681237B1/ko
Priority to KR1020187012528A priority patent/KR101969003B1/ko
Priority to ES13738733.8T priority patent/ES2625276T3/es
Priority to EP13738733.8A priority patent/EP2709361B1/en
Priority to BR112013034060-6A priority patent/BR112013034060B1/pt
Priority to EP23169343.3A priority patent/EP4250736A3/en
Priority to AU2013211321A priority patent/AU2013211321B2/en
Priority to EP21170332.7A priority patent/EP3930322B1/en
Priority to RU2013158672/08A priority patent/RU2544756C1/ru
Publication of WO2013107419A1 publication Critical patent/WO2013107419A1/zh
Priority to US14/142,437 priority patent/US9769474B2/en
Priority to US15/616,677 priority patent/US10104380B2/en
Priority to US16/143,024 priority patent/US10511841B2/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/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/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/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for 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/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/12Selection from among a plurality of transforms or standards, e.g. selection between discrete cosine transform [DCT] and sub-band transform or selection between H.263 and H.264
    • H04N19/122Selection of transform size, e.g. 8x8 or 2x4x8 DCT; Selection of sub-band transforms of varying structure or type
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
    • 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/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/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
    • H04N19/463Embedding additional information in the video signal during the compression process by compressing encoding parameters before transmission
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques

Definitions

  • Embodiments of the present invention relate to a codec method and apparatus for video images. Background technique
  • the number of prediction blocks is preset to be different depending on the size of the prediction block. As shown in Table 1, when the size of the prediction block is 4x4, it selects the intra prediction mode (CurrMode) in the prediction mode with the prediction mode number 0-17, and the size of the prediction block is 8x8, 16x16 or 32x32. When it is in the prediction mode with the prediction mode number of 0-35, the current intra prediction mode is selected, and the prediction block of the 64x64 specification can only select the intra prediction mode in the prediction mode with the prediction mode number of 0-3.
  • the present invention provides an encoding method, including: obtaining an intra prediction mode of a current intra-coded block from a preset set of prediction modes, where the intra prediction mode is performing pixel on the current intra-coded block a prediction mode used in encoding; obtaining a reference prediction mode of the current intra-coded block, the reference prediction mode being an intra prediction mode of an available neighboring block of the current intra-coded block or a preset standby reference a prediction mode of the mode set, wherein the preset standby reference mode
  • the prediction modes in the set all belong to the prediction mode set; according to the reference prediction mode and the intra prediction mode, a first identification bit is written into the code stream, where the first identification bit is used to indicate the frame Whether the intra prediction mode is the same as one of the reference prediction modes; when the intra prediction mode of the coding block is different from the reference prediction mode, according to the size relationship between the intra prediction mode and the reference prediction mode Obtaining a prediction mode code value, and encoding the prediction mode code value.
  • the present invention further provides a decoding method, including: obtaining a first identification bit from a code stream, where the first identification bit is used to indicate whether an intra prediction mode of a current intra-coded block is the same as a reference prediction mode, when The first identifier bit indicates that when the intra prediction mode of the current intra-coded block is different from the reference prediction mode, the mode coded bit is obtained from the code stream according to the fixed number of bits, where the intra prediction mode is for the intra-coded block a prediction mode used when performing pixel decoding; obtaining a prediction mode code value according to the mode coded bit; obtaining a reference prediction mode of the intra prediction block, where the reference prediction mode is a usable phase of the current intra coding block An intra prediction mode of a neighboring block or a prediction mode in a preset set of spare reference modes; determining, according to a size relationship between the prediction mode coded value and a value of the reference prediction mode, obtaining an intra frame of the current intra decoding block Forecast mode.
  • an intra prediction mode for obtaining a current intra-coded block from a preset set of prediction modes, and a reference prediction mode for obtaining the current intra-coded block
  • the reference prediction mode is Determining an intra prediction mode of an available neighboring block of the current intra coding block or a prediction mode in a preset set of spare reference modes, wherein the prediction modes in the preset set of spare reference modes belong to the prediction mode set
  • An identifier module configured to write a first identifier bit into the code stream according to the reference prediction mode and the intra prediction mode, where the first identifier bit is used to indicate whether the intra prediction mode is related to the reference One of the prediction modes is the same
  • the prediction mode coding module is configured to: when the intra prediction mode of the coding block is different from the reference prediction mode, according to a size relationship between the intra prediction mode and the reference prediction mode, A prediction mode code value is obtained, and the prediction mode code value is encoded.
  • the present invention also provides a decoding apparatus to which the decoding method of the present invention is applied, comprising: a code reading stream module, configured to obtain a first identification bit from a code stream, where the first identification bit is used to indicate an intra prediction of a currently intra-coded block Whether the mode is the same as the reference prediction mode, when the first identification bit indicates that the intra prediction mode of the current intra decoding block is different from the reference prediction mode, acquiring the mode coded bit from the code stream according to the fixed number of bits, the intra frame a prediction mode is a prediction mode used when performing pixel decoding on the intra-coded block; a reference prediction mode obtaining module, configured to obtain a reference prediction mode of the intra prediction block, where the reference prediction mode is An intra prediction mode of an available neighboring block of the current intra-coded block or a prediction mode in a preset set of spare reference modes; a decoding module, configured to obtain a prediction mode code value according to the mode coded bit, according to the prediction a size relationship between the mode code value and the
  • the coding method provided by the invention can save the judgment logic of the codec system and improve the coding and decoding efficiency.
  • FIG. 1 is a schematic diagram of an encoding method according to an embodiment of the present invention.
  • Figure 2 is a schematic diagram showing the positional relationship between an image block and its adjacent blocks.
  • FIG. 3 is a schematic diagram of a decoding method according to an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of an encoding apparatus according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of a decoding apparatus according to an embodiment of the present invention. detailed description
  • an embodiment of the present invention provides an encoding method for any current intra-coded block, including:
  • Step 101 Obtain an intra prediction mode of a current intra-coded block from a fixed set of prediction modes.
  • intra prediction modes of the current intra-coded blocks of different sizes are all from the same The set of prediction modes.
  • the intra prediction mode is a prediction mode used when pixel coding an image block, and thus may also be referred to as a coding prediction mode. If at the decoding end, the intra prediction mode is a prediction mode used when pixel decoding is performed on an image block, and may also be referred to as a decoding prediction mode.
  • Step 102 Acquire a reference prediction mode of the current intra-coded block.
  • the reference prediction mode is an intra prediction mode of an available neighboring block of the current intra-coded block or a prediction mode of a preset set of spare reference modes, where the prediction mode in the preset set of alternate reference modes is set Both belong to the set of prediction modes.
  • Step 103 Encode the intra prediction mode according to the reference prediction mode, and write a first identifier bit into the code stream, where the first identifier bit is used to indicate whether the intra prediction mode is related to the reference One of the prediction modes is the same;
  • Step 104 When the intra prediction mode and the reference prediction mode are different, according to an intra prediction mode A size relationship between the expression and the reference prediction mode obtains a prediction mode code value, and encodes the prediction mode code value.
  • a size relationship between the prediction mode and the reference prediction mode, obtaining a prediction mode code value, and encoding the prediction mode code value includes:
  • Step 104a If the value of the intra prediction mode is only greater than the value of one reference prediction mode, the prediction mode coding value is equal to the value of the intra prediction mode minus 1, if the intra prediction mode is greater than two reference prediction modes, The prediction mode code value is equal to the value of the intra prediction mode minus 2;
  • Step 104b encoding the prediction mode coded value by using a fixed number of bits to obtain a mode coded bit, and writing the mode coded bit into the code stream, where if the coded code length of the prediction mode coded value is greater than the a fixed number of bits, each bit of the mode coded bit is 1 and a third identifier bit is further written in the code stream, where the third identifier bit is used to indicate that the prediction mode code value is in a preset set. The value.
  • the intra prediction mode is selected from the unified intra prediction mode regardless of the size of the current intra coding block (i.e., the prediction block in the intra coding). Specifically, 35 prediction modes for obtaining predicted pixel values of the current intra-coded block from the encoded pixel values of the available neighboring blocks are given in the HEVC standard. In the encoding process, the 35 prediction modes are sequentially selected to be predicted according to the available neighboring blocks of the intra-coded block.
  • the range of the intra prediction mode is 0-34, that is, greater than or equal to "0" and less than or equal to 34. Since the current intra-coded block and its neighboring blocks are predicted according to the same set of prediction modes, the reference prediction mode also has a value range of 0-34.
  • the type and number of prediction modes in the prediction mode set may be adjusted according to the development of the technology, and the number of prediction modes in the prediction mode set may be adjusted as needed.
  • the reference prediction mode is the intra prediction mode of the available neighboring blocks of the current intra-coded block.
  • the available neighboring blocks need to satisfy the following conditions: 1. It is in the same strip as the current intra-coded block; 2. It has been encoded (if it is in the decoding process, the available neighboring blocks need to be already decoded). For example, the current industry generally adopts a codec sequence from top to bottom and from left to right. Therefore, if it is in the same strip as the current intra-coded block, the left block and the upper block of the current intra-coded block may be selected. An available neighboring block that is the current intra-coded block. Neighboring blocks of the current intra-coded block that do not satisfy the above conditions are not available neighboring blocks. The positional relationship of the left and upper blocks with respect to the current intra-coded block can be referred to Fig. 2.
  • the reference prediction mode is obtained by using the intra prediction mode of the available neighboring block of the current intra-coded block as the reference prediction mode of the current intra-coded block according to the coding order. For example, the current industry uniformly adopts the encoding and decoding order from left to right and top to bottom. Therefore, if the upper block and the left block of the current intra coding mode are available, the prediction of the left block and the right block is performed. The mode is used as the reference prediction mode of the current intra-coded block. If one of the two is unavailable, the prediction mode may be selected from the preset set of spare reference modes as the reference prediction mode, such as the DC specified in the HEVC standard.
  • the prediction mode or the Planar prediction mode (both are prediction modes specified in the HEVC video codec standard, and the specific prediction method is not relevant to the present invention and will not be described here).
  • the reference prediction mode can also be selected from the preset set of spare reference patterns. If the two reference prediction modes are the same, one of the reference prediction modes may be replaced with the prediction mode in the set of spare reference modes according to a preset rule. For example, if the values of the intra prediction modes of the upper block and the left block of the current intra coding block are both 34, one of the reference prediction modes of the current intra coding block is 34, and the other is taken from the set of alternate reference modes. A smaller value, such as 0 or 3.
  • the prediction mode in the set of spare reference patterns needs to cope with the case where "neighboring blocks are not available" and "the intra prediction modes of neighboring blocks are the same"
  • the prediction mode in the set of spare reference patterns can be further processed.
  • the partitioning for example, divides the set of alternate reference patterns into a first reference set and a second reference set.
  • the prediction mode may be selected from the first reference set (eg.
  • the prediction mode is selected from the second reference set (such as a value) "0" or "3" prediction mode).
  • the prediction modes in the reference mode set can belong to both the first reference set and the second reference set, or both. Belongs to other types of reference collections.
  • the value of the intra prediction mode is CurrMode
  • the values of the two reference prediction modes are the first reference prediction mode ModeA and the second reference prediction mode ModeB, respectively.
  • the values of ModeA and ModeB can be in the default order. For example, ModeA can be set to the reference prediction mode from the left block, and ModeB is the reference prediction mode from the upper block.
  • the first identification bit (which may be 1 bit long) and the second identification bit are written into the code stream.
  • the first identification bit is used to identify whether the intra prediction mode of the current prediction unit is the same as one of the reference prediction modes, such as 0 indicating that the intra prediction mode is the same as one of the reference prediction modes, and 1 indicates the intra prediction mode and The reference prediction modes are all different; the second identification bit is used to indicate a reference prediction mode that is equal to the intra prediction mode. If 0 means equal to ModeA, 1 is marked with
  • the prediction mode coding value of the intra prediction mode is obtained according to the magnitude relationship between the value of the intra prediction mode and the value of the reference prediction mode, where if the intra prediction mode The value of the prediction mode is equal to the value of one reference prediction mode, and the prediction mode coding value is equal to the value of the intra prediction mode minus 1. If both the first reference prediction mode and the second reference prediction mode are smaller than the intra prediction mode, The prediction mode code value is equal to the value of the intra prediction mode minus 2; since the values of the intra prediction mode and the reference prediction mode are both 34, the prediction mode code value ranges from 0 to 32.
  • the prediction mode code value ranges from 0 to 31, it can be directly represented by a binary code of a fixed number of bits of 5 bits in length, and the binary code of 32 requires 6 bits. Therefore, when the prediction mode coding values are 31 and 32, the corresponding mode coded bits are set to 11111, and then the value of the corresponding third identification bit is written into the code stream to distinguish, for example, when Pre When the measured mode code value is 31, the corresponding mode coded bit is 11111, and the third flag bit is 0. When the prediction mode code value is 32, the corresponding mode coded bit is 11111, and the third flag bit is 1.
  • the prediction mode code value when the prediction mode code value is 31, the corresponding mode coded bit is 11111, and the third identifier bit is 1; when the prediction mode code value is 32, the corresponding mode coded bit is 11111.
  • the third identification bit is 0.
  • the current intra prediction mode value is 12
  • the same prediction mode set is set for each prediction block of various sizes, and in the process of encoding the value of the intra prediction mode, only 5 bits of fixed bits can be used in most cases.
  • the number encodes the prediction mode code value, and does not need to set additional decision logic to confirm the fixed number of bits of the intra prediction mode coding, thereby saving system resources.
  • the number of prediction modes in the prediction mode set is 35.
  • the prediction mode of the block is used as a reference prediction mode, or based on the available intra prediction modes of the left block and the upper block, and a predefined prediction mode is set as the third reference prediction mode.
  • the reference prediction mode is complemented according to the aforementioned set of reference mode sets.
  • the value of the intra prediction mode is decremented by 1 according to the number of reference prediction modes smaller than the intra prediction mode to obtain a prediction mode code value. Since there are three reference prediction modes, the range of the value of the intra prediction mode and the range of the three reference prediction modes are both 0-34, so that the value range of the prediction mode code value is between 0 and 31, In other words, it is always possible to encode with a fixed number of bits of 5 bits.
  • the obtaining, by the step 102, the reference prediction mode of the current intra-coded block includes: acquiring three reference prediction modes of the current intra-coded block;
  • the prediction mode coding value is obtained according to the size relationship between the intra prediction mode and the reference prediction mode, and encoding the prediction mode coding value includes:
  • Step 104a if the value of the intra prediction mode is only greater than the value of one reference prediction mode, the prediction mode coding value is equal to the value of the intra prediction mode minus 1, if the intra prediction mode is greater than two reference prediction modes, The prediction mode coding value is equal to the value of the intra prediction mode minus 2. If the intra prediction mode is greater than the three reference prediction modes, the prediction mode coding value is equal to the value of the intra prediction mode minus 3; Step 104b,: The prediction mode code value is encoded by the fixed number of bits to obtain a mode coded bit, and the mode coded bit is written into the code stream.
  • an embodiment of the present invention further provides a decoding method, including:
  • Step 301 Obtain a first identifier bit from the code stream, where the first identifier bit is used to indicate whether an intra prediction mode of the current intra-coded block is the same as a reference prediction mode, when the first identifier bit indicates When the intra prediction mode of the current intra decoding block is different from the reference prediction mode, the mode coded bits are obtained from the code stream according to the fixed number of bits;
  • Step 302 Obtain a prediction mode code value according to the mode coded bit.
  • Step 303 Acquire a reference prediction mode of the intra prediction block.
  • Step 304 Obtain an intra prediction mode of the current intra-coded block according to a relationship between the prediction mode coded value and a value of the reference prediction mode.
  • Step 305 Decode the current intra-coded block according to the intra prediction mode.
  • the intra prediction modes of the current intra-coded blocks of different sizes are all from the same set of prediction modes.
  • the set of prediction modes in the encoding end and the decoding end are the same or corresponding.
  • the reference prediction mode is obtained corresponding to the coding end, and only the decoding prediction mode of the available neighboring block of the current intra-coded block needs to be used as the reference prediction mode of the current intra-coded block.
  • the intra prediction mode of the upper block and the left block of the current intra decoding block is used as the reference prediction mode of the current intra decoding block.
  • the available neighboring blocks of the current intra-coded block need to meet the following conditions: 1.
  • the same intra-frame decoding block is in the same strip; 2. It has been decoded.
  • the prediction mode coding value is greater than or equal to all reference prediction modes, adding 2 to the prediction mode coding value to obtain a value of an intra prediction mode of a current intra decoding block; if the prediction mode coding value is only greater than or equal to And one of the two reference prediction modes, the value of the intra prediction mode of the current intra decoding block is obtained by adding 1 to the prediction mode coding value, and if the prediction mode coding value is smaller than all reference prediction modes, The prediction mode code value is used as the value of the intra prediction mode.
  • a second identification bit is further obtained from the code stream.
  • the second identification bit is used to indicate a reference prediction mode that is equal to an intra prediction mode of the current intra-coded block.
  • the prediction mode code value is equal to the coded bit; when the coded bit is "11111”, the third identifier bit is obtained from the code stream, according to The third identification bit obtains the prediction mode code value within a preset set.
  • the prediction mode code value is equal to the coded bit; when the coded bit is "11111”, Obtaining a third identifier bit in the code stream, and obtaining the prediction mode code value according to the third identifier bit in a preset set.
  • the acquiring a reference prediction mode of the intra prediction block includes: obtaining two reference prediction modes, where the obtaining is based on a magnitude relationship between the prediction mode coding value and a value of the reference prediction mode
  • the intra prediction mode of the current intra decoding block includes: if the prediction mode coding value is smaller than the values of the two reference prediction modes, the value of the intra prediction mode is equal to the prediction mode coding value; If the prediction mode code value is greater than or equal to one of the values of the two reference prediction modes, the result of adding 1 to the prediction mode code value is a value of the intra prediction mode; if the prediction mode code value is greater than or Equal to the values of the two reference prediction modes, the result of adding 2 to the prediction mode coding value is the value of the intra prediction mode.
  • three reference prediction modes are directly obtained, and then, if the prediction mode coding value is smaller than the values of the three reference prediction modes, the value of the intra prediction mode is equal to the a prediction mode code value; if the prediction mode code value is only greater than or equal to a value of one of the three reference prediction modes, a result of adding 1 to the prediction mode code value is a value of the intra prediction mode; If the prediction mode code value is only greater than or equal to a value of two of the three reference prediction modes, a result of adding 2 to the prediction mode code value is a value of the intra prediction mode; if the prediction The mode code value is greater than or equal to the value of the three reference prediction modes, and the result of adding 3 to the prediction mode code value is the value of the intra prediction mode.
  • the decoding operation of the current intra decoding block can be performed according to the intra prediction mode.
  • the embodiment of the present invention further provides a corresponding encoding device and decoding device.
  • an encoding apparatus includes:
  • the prediction module 401 is configured to obtain, from a preset set of prediction modes, an intra prediction mode of a current intra coding block, and an intra prediction mode according to available neighboring blocks of the current intra coding block. Obtaining a reference prediction mode of the current intra-coded block;
  • the identifier module 402 is configured to write a first identifier bit into the code stream according to the reference prediction mode and the intra prediction mode, where the first identifier bit is used to indicate whether the intra prediction mode is related to the One of the reference prediction modes is the same;
  • a prediction mode coding module 403 configured to obtain a prediction mode coding value according to a size relationship between the intra prediction mode and a reference prediction mode when the intra prediction mode of the coding block is different from the reference prediction mode, The prediction mode encoded value is encoded.
  • the specific operation result of the prediction module 401, the identifier module 402, and the prediction mode encoding module 403 is similar to the encoding method provided by the embodiment of the present invention.
  • the number of prediction modes in the prediction mode set is still 35.
  • the prediction module 401 is specifically configured to obtain a first reference prediction mode and a second reference prediction mode according to available neighboring blocks of the current intra coding block, where
  • the upper block and the left block of the current intra-coded block are both available neighboring blocks, and the intra-prediction modes of the upper block and the left block of the current intra-coded block are different, the upper block and the left block are The intra prediction mode is used as the first reference prediction mode and the second reference prediction mode of the current intra coding block; if the current intra coding block cannot obtain a sufficient number of reference prediction modes according to the available neighboring blocks, a preset reference may be used. The mode is used as a reference prediction mode to complement the quantity. specific:
  • the current intra-coded block is An intra prediction mode of the upper block or the left block as a first reference prediction mode, and selecting a preset prediction mode from the prediction mode set as a second reference prediction mode; or
  • the prediction mode of the upper block of the current intra-coded block is used as the first reference prediction mode, and Selecting one prediction mode as the second reference prediction mode in the set of alternate reference mode sets; or If the upper block of the current intra-coded block is an unavailable neighbor block and the left block is an available neighboring block, the prediction mode of the left block of the current intra-coded block is used as the first reference prediction mode, and Selecting one prediction mode as the second reference prediction mode in the set of alternate reference mode sets; or if the upper block and the left block of the current intra-coded block are both unavailable neighbor blocks, reselecting from the preset set of spare reference patterns
  • the two prediction modes are used as a first reference prediction mode and a second reference prediction mode.
  • the prediction mode encoding module 403 is specifically configured to:
  • the result of subtracting 1 from the value of the intra prediction mode is the prediction mode coding value, and if the intra prediction mode is greater than two reference prediction modes, The result of subtracting 2 from the value of the intra prediction mode is the prediction mode coded value; encoding the prediction mode coded value using a fixed number of bits to obtain a mode coded bit, and writing the mode coded bit into the code stream, wherein And if the binary code length of the prediction mode coded value is greater than the fixed number of bits, the mode coded bit is “11111”, and the third identifier bit is further written in the code stream, where the third identifier bit is used. And indicating that the prediction mode code value is within a preset set.
  • the prediction module 401 is specifically configured to obtain three reference prediction modes according to available neighboring blocks of the current intra-coded block.
  • the prediction mode encoding module 403 is specifically configured to: if the value of the intra prediction mode is only greater than a value of one of the three reference prediction modes, the intra prediction mode The result of subtracting 1 from the value is the prediction mode code value. If the value of the intra prediction mode is greater than the value of two of the three reference prediction modes, the result of subtracting 2 from the value of the intra prediction mode is The prediction mode coding value, if the intra prediction mode is greater than the values of the three reference prediction modes, the prediction mode coding value is equal to the value of the intra prediction mode minus 3;
  • the prediction mode coded values are encoded using a fixed number of bits to obtain mode coded bits, and the mode coded bits are written into the code stream.
  • FIG. 5 is a schematic diagram of a decoding apparatus according to an embodiment of the present invention.
  • the decoding apparatus provided by the embodiment of the present invention includes:
  • the code stream module 501 is configured to obtain a first identifier bit from the code stream, where the first identifier bit is used to indicate whether an intra prediction mode of the current intra-coded block is the same as a reference prediction mode, when the first identifier is When the bit indicates that the intra prediction mode of the current intra-coded block is different from the reference prediction mode, the mode-coded bit is obtained from the code stream according to the fixed number of bits, where the intra-prediction mode is performing pixel decoding on the intra-coded block.
  • a reference prediction mode obtaining module 502 configured to acquire a reference prediction mode of the intra prediction block
  • a decoding module 503 configured to obtain a prediction mode coding value according to the mode coding bit, and according to the prediction mode coding value and the reference A size relationship between values of the prediction mode, obtaining an intra prediction mode of the current intra-coded block, and decoding the current intra-coded block according to the intra-prediction mode.
  • the specific working mode of the read stream module 501, the reference prediction mode obtaining module 502, and the decoding module 503 is the same as the decoding method provided by the embodiment of the present invention.
  • the fixed number of bits is 5.
  • the code stream module 501 when the first identifier bit indicates that the intra prediction mode of the current intra-coded block is different from the reference prediction mode, the code stream module 501 performs the following steps: if the coded bit is not "11111", the prediction mode code value is equal to the coded bit; if the coded bit is "11111", one bit is obtained from the code stream, according to the obtaining of the bit in a preset set Predictive mode coded value.
  • the reference prediction mode obtaining module 502 obtains two reference prediction modes; the decoding module 503 performs the following steps: if the prediction mode coding value is smaller than the values of the two reference prediction modes, the intra prediction mode a value equal to the prediction mode code value; if the prediction mode code value is only greater than or equal to one of the two reference prediction modes, a result of adding 1 to the prediction mode code value is the intra prediction mode The value of the prediction mode code value plus 2 is the value of the intra prediction mode if the prediction mode code value is greater than or equal to the value of the two reference prediction modes.
  • the reference prediction mode obtaining module 502 obtains three reference prediction modes; correspondingly, the decoding module 503 performs the following steps: if the prediction mode coding value is smaller than the values of the three reference prediction modes And the value of the intra prediction mode is equal to the prediction mode code value; if the prediction mode code value is only greater than or equal to a value of one of the three reference prediction modes, the prediction mode code value is added
  • the result of 1 is the value of the intra prediction mode; if the prediction mode coded value is only greater than or equal to the value of two of the three reference prediction modes, the result of adding 2 to the prediction mode coding value is a value of the intra prediction mode; if the prediction mode code value is greater than or equal to a value of the three reference prediction modes, a result of adding 3 to the prediction mode code value is a value of the intra prediction mode.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Discrete Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Micro-Organisms Or Cultivation Processes Thereof (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Maintenance And Management Of Digital Transmission (AREA)

Abstract

本发明提供一种帧内预测模式的编码方法包括:从预先设定的的预测模式集合中,获得当前帧内编码块的帧内预测模式;获得所述当前帧内编码块的参考预测模式,所述参考预测模式为所述当前帧内编码块的可用相邻块的帧内预测模式或者预先设置的备用参考模式集合的预测模式;根据所述参考预测模式和所述帧内预测模式,向码流中写入第一标识比特;当所述编码块的帧内预测模式与所述参考预测模式均不同时,根据所述帧内预测模式与参考预测模式间的大小关系,获得预测模式编码值,对所述预测模式编码值进行编码。釆用本发明提供的编码方法,可以节省编码端的判断逻辑,提高编码的效率。本发明还提供相应的解码方法以及便解码装置。

Description

一种编解码方法和设备
技术领域
本发明实施例涉及视频图像的编解码方法和设备。 背景技术
在对视频图像进行编码和解码的过程中, 均需要对图像块划分得到的预测 单元进行预测。 在预测中, 通常会根据预测块的尺寸, 为预测块预先设置好可 的数目不同。 如表 1所示, 当预测块的尺寸规格为 4x4时, 其在预测模式号为 0-17的预测模式中选择帧内预测模式(CurrMode ), 当预测块的尺寸规格为 8x8、 16x16或 32x32时, 其在预测模式号为 0-35的预测模式中选择当前帧内预测模 式,而 64x64规格的预测块则仅可以在预测模式号为 0-3的预测模式中选择帧内 预测模式。
表 1.各尺寸预测块的预测模式数目
Figure imgf000003_0001
在编解码的过程中, 当确定好预测块的当前帧内预测模式之后, 还需要根 据预测块的尺寸来决定当前帧内预测模式号的编码方式(比如,采用 5bit还是 4bit 编码), 而解码过程中也设定特定的逻辑来判断当前帧内预测模式号的信息在码 流中所占的比特数, 影响编解码效率。 发明内容
本发明提供一种编码方法, 包括: 从预先设定的的预测模式集合中, 获得 当前帧内编码块的帧内预测模式, 所述帧内预测模式为对所述当前帧内编码块 进行像素编码时所采用的预测模式; 获得所述当前帧内编码块的参考预测模式, 所述参考预测模式为所述当前帧内编码块的可用相邻块的帧内预测模式或者预 先设置的备用参考模式集合的预测模式, 其中, 所述预先设置的备用参考模式 集合中的预测模式均属于所述预测模式集合; 根据所述参考预测模式和所述帧 内预测模式, 向码流中写入第一标识比特, 所述第一标识比特用于指示所述帧 内预测模式是否与所述参考预测模式中的一个相同; 当所述编码块的帧内预测 模式与所述参考预测模式均不同时, 根据所述帧内预测模式与参考预测模式间 的大小关系, 获得预测模式编码值, 对所述预测模式编码值进行编码。
本发明还提供一种解码方法, 包括: 从码流中获得第一标识比特, 所述第 一标识比特用于指示当前帧内解码块的帧内预测模式是否与参考预测模式相 同, 当所述第一标识比特指示当前帧内解码块的帧内预测模式与参考预测模式 不同时, 根据固定比特数从码流中获取模式编码比特, 所述帧内预测模式为对 所述帧内解码块在进行像素解码时所使用的预测模式; 根据所述模式编码比特 获得预测模式编码值; 获得所述帧内预测块的参考预测模式, 所述参考预测模 式为所述当前帧内编码块的可用相邻块的帧内预测模式或者预先设置的备用参 考模式集合中的预测模式; 根据所述预测模式编码值与所述参考预测模式的值 之间的大小关系, 得当前帧内解码块的帧内预测模式。 用于从预先设定的的预测模式集合中, 获得当前帧内编码块的帧内预测模式, 以及用于获得所述当前帧内编码块的参考预测模式, 其中, 所述参考预测模式 为所述当前帧内编码块的可用相邻块的帧内预测模式或者预先设置的备用参考 模式集合中的预测模式, 所述预先设置的备用参考模式集合中的预测模式均属 于所述预测模式集合; 标识模块, 用于根据所述参考预测模式和所述帧内预测 模式, 向码流中写入第一标识比特, 所述第一标识比特用于指示所述帧内预测 模式是否与所述参考预测模式中的一个相同; 预测模式编码模块, 用于当所述 编码块的帧内预测模式与所述参考预测模式均不同时, 根据所述帧内预测模式 与参考预测模式间的大小关系, 获得预测模式编码值, 对所述预测模式编码值 进行编码。
本发明还提供应用本发明解码方法的解码装置, 包括: 读码流模块, 用于 从码流中获得第一标识比特, 所述第一标识比特用于指示当前帧内解码块的帧 内预测模式是否与参考预测模式相同, 当所述第一标识比特指示当前帧内解码 块的帧内预测模式与参考预测模式不同时, 根据固定比特数从码流中获取模式 编码比特, 所述帧内预测模式为对所述帧内解码块在进行像素解码时所使用的 预测模式; 参考预测模式获得模块, 用于获得所述帧内预测块的参考预测模式, 其中, 所述参考预测模式为所述当前帧内编码块的可用相邻块的帧内预测模式 或者预先设置的备用参考模式集合中的预测模式; 解码模块, 用于根据所述模 式编码比特获得预测模式编码值, 根据所述预测模式编码值与所述参考预测模 式的值之间的大小关系, 获得当前帧内解码块的帧内预测模式, 以及根据所述 帧内预测模式对所述当前帧内解码块进行解码。
采用本发明提供的编码方法可以节省编解码系统的判断逻辑, 提高编解码 效率。 附图说明
为了更清楚地说明本发明实施例的技术方案, 下面将对实施例或现有技术 描述中所需要使用的附图作筒单地介绍, 显而易见地, 下面描述中的附图仅仅 是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动 性的前提下, 还可以根据这些附图获得其他的附图。
图 1所示为本发明实施例提供的编码方法的示意图。
图 2所示为图像块及其相邻块间的位置关系的示意图。
图 3所示为本发明实施例提供的解码方法的示意图。
图 4所示为本发明实施例提供的编码装置的示意图。
图 5所示为本发明实施例提供的解码装置的示意图。 具体实施方式
下面将结合本发明实施例中的附图, 对本发明实施例中的技术方案进行清 楚、 完整地描述, 显然, 所描述的实施例是本发明一部分实施例, 而不是全部 的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有作出创造性劳 动前提下获得的所有其他实施例, 都属于本发明保护的范围。
请参照图 1 , 本发明实施例提供了一种针对任意当前帧内编码块的编码方 法, 包括:
步骤 101:从固定的预测模式集合中,获得当前帧内编码块的帧内预测模式; 在本发明实施例中, 不同尺寸的所述当前帧内编码块的帧内预测模式均来 自于同一个所述预测模式集合。
在编码端, 所述帧内预测模式为对图像块进行像素编码时所采用的预测模 式, 因此也可以称为编码预测模式。 如果在解码端, 则所述帧内预测模式为对 图像块进行像素解码时所采用的预测模式, 也可以称为解码预测模式。
步骤 102: 获取所述当前帧内编码块的参考预测模式;
所述参考预测模式为所述当前帧内编码块的可用相邻块的帧内预测模式或 者预先设置的备用参考模式集合的预测模式, 其中, 所述预先设置的备用参考 模式集合中的预测模式均属于所述预测模式集合。
步骤 103: 根据所述参考预测模式对所述帧内预测模式进行编码, 向码流中 写入第一标识比特, 所述第一标识比特用于指示所述帧内预测模式是否与所述 参考预测模式中的一个相同;
步骤 104: 当所述帧内预测模式与参考预测模式均不同时, 根据帧内预测模 式与参考预测模式间的大小关系, 获得预测模式编码值, 对所述预测模式编码 值进行编码。
在本发明实施例中, 如果当前帧内编码块根据相邻块的帧内预测模式获得 两个参考预测模式(分别为第一参考预测模式和第二参考预测模式), 则所述根 据帧内预测模式与参考预测模式间的大小关系, 获得预测模式编码值, 对所述 预测模式编码值进行编码包括:
步骤 104a: 如果帧内预测模式的值仅大于一个参考预测模式的值, 则所述 预测模式编码值等于帧内预测模式的值减 1 ,如果帧内预测模式大于两个参考预 测模式, 则所述预测模式编码值等于帧内预测模式的值减 2;
步骤 104b: 使用固定比特数对所述预测模式编码值进行编码, 得到模式编 码比特, 将所述模式编码比特写入码流中, 其中, 如果所述预测模式编码值的 二进制码长度大于所述固定比特数, 则所述模式编码比特的各比特位均为 1 并 且在码流中再写入第三标识比特, 所述第三标识比特用于指示所述预测模式编 码值在预设集合内的取值。
在本发明实施例中, 无论当前帧内编码块(即帧内编码中的预测块) 的尺 寸如何, 均从统一的帧内预测模式中选择帧内预测模式。 具体的, HEVC 标准 中给出了 35种根据可用相邻块的已编码像素值获得当前帧内编码块的预测像素 值的预测模式。 在编码过程中, 依次选择这 35种预测模式根据帧内编码块的可 用相邻块进行预测。 比较 35种预测模式的预测结果, 并选择预测像素值与实际 图像像素值差距最小的预测模式, 作为所述帧内预测模式, 帧内预测模式的取 值范围是 0-34, 也就是大于等于 "0"且小于等于 34。 由于当前帧内编码块和其 相邻块均是根据同样的预测模式集合进行预测, 因此, 参考预测模式的取值范 围也是 0-34。 当然, 在其他可选择的实施例中, 预测模式集合中的预测模式的 种类和数量可以根据技术的发展进行调整, 预测模式集合中的预测模式的数量 可以根据需要进行调整。
在本发明实施例中, 参考预测模式即为当前帧内编码块的可用相邻块的帧 内预测模式。 所述可用相邻块需要满足以下条件: 1、 与所述当前帧内编码块处 于同一条带中; 2、 已经编码(如果是解码过程中, 则可用相邻块需要是已经解 码)。 比如, 目前业界采用的一般是从上到下, 从左到右的编解码顺序, 因此如 果与当前帧内编码块处于同一条带内, 则可以选用当前帧内编码块的左边块和 上边块作为当前帧内编码块的可用相邻块。 不满足以上条件的当前帧内编码块 的相邻块则为不可用相邻块。 所述左边块和上边块相对于当前帧内编码块的位 置关系可以参照图 2。
而参考预测模式的获得则可以根据编码顺序将当前帧内编码块的可用相邻 块的帧内预测模式作为当前帧内编码块的参考预测模式。 比如目前业界统一采 用的是从左到右, 从上到下的编码和解码顺序, 因此如果所述当前帧内编码方 式的上边块和左边块可用, 则将所述左边块和右边块的预测模式作为当前帧内 编码块的参考预测模式, 如果二者有一个不可用, 则可以从预先设置的备用参 考模式集合中选择预测模式作为参考预测模式, 比如 HEVC标准中规定的 DC 预测模式或 Planar预测模式(二者是 HEVC视频编解码标准中规定的预测模式, 其具体的预测方法与本发明无关, 在此不进行赞述)。 如果当前帧内编码块的上 边块和左边块均不可用, 则选用也同样可以从预先设置的备用参考模式集合中 选择参考预测模式。 如果两种参考预测模式相同, 则可以根据预先设定的规则 将其中一个参考预测模式替换所述备用参考模式集合中的预测模式。 比如假设 当前帧内编码块的上边块和左边块的帧内预测模式的值均为 34, 则当前帧内编 码块的参考预测模式中的一个取 34, 而另一个从备用参考模式集合中取一个较 小的值,比如 0或者 3。这里,由于备用参考模式集合中的预测模式需要应对 "相 邻块不可用" 以及 "相邻块的帧内预测模式相同" 的情况, 因此, 备用参考模 式集合中的预测模式可以再做进一步的划分, 比如将备用参考模式集合中又划 分出第一参考集合和第二参考集合。 当由于当前块的相邻块不可用, 而不足以 提供规定数目的参考预测模式时, 可以从第一参考集合中选择预测模式(比如
DC预测模式或 Planar预测模式); 当由于当前块的相邻块的帧内预测模式相同, 而不足以提供规定数目的参考模式集合时, 则从第二参考集合中选择预测模式 (比如值为 "0" 或者 "3" 的预测模式)。 当然, 如果需要的话, 参考模式集合 中可以划分出更多的集合来应对更多的各种情况, 而且参考模式集合中的预测 模式可以同时属于第一参考集合和第二参考集合, 也可以同时属于其他类型的 参考集合。
在步骤 104a中,设帧内预测模式的值为 CurrMode, 两种参考预测模式的值 分别为第一参考预测模式 ModeA和第二参考预测模式 ModeB。 ModeA和 ModeB 的取值可以按照默认的顺序进行, 比如可以设 ModeA为取自左边块的参考预测 模式, ModeB为取自上边块的参考预测模式。
如果 CurrMode == ModeA或^ CurrMode == ModeB,即帧内预测模式与其 中的一个参考预测模式相等时, 往码流中写入第一标识比特(长可以为 1比特) 和第二标识比特。 所述第一标识比特用于标识当前预测单元的帧内预测模式是 否与参考预测模式中的一个相同, 如 0表示帧内预测模式与参考预测模式中的 一个相同, 1表示帧内预测模式与参考预测模式均不同; 第二标识比特用于指示 与所述帧内预测模式相等的参考预测模式。 如 0表示与 ModeA相等, 1标识与
ModeB相等;
如果帧内预测模式与两个参考预测模式都不相等, 根据帧内预测模式的值 与参考预测模式的值间的大小关系获得帧内预测模式的预测模式编码值, 其中, 如果帧内预测模式的值仅大于一个参考预测模式的值, 则所述预测模式编码值 等于帧内预测模式的值减 1 ,如果第一参考预测模式和第二参考预测模式均小于 帧内预测模式, 则将所述预测模式编码值等于帧内预测模式的值减 2; 由于帧内 预测模式与参考预测模式的取值均为 34, 因此, 预测模式编码值的取值范围是 0-32。 很明显, 当预测模式编码值的取值范围是 0-31 的时候, 均可以直接用 5 比特长度的固定比特数的二进制编码来表示,而 32的二进制编码需要 6个比特。 因此, 当所述预测模式编码值为 31 和 32 时, 设定对应的模式编码比特均为 11111 , 然后再向码流中写入相应的第三标识比特的值来区分, 比如, 当所述预 测模式编码值为 31时, 对应的模式编码比特为 11111 , 第三标识比特为 0; 当所 述预测模式编码值为 32时, 对应的模式编码比特为 11111 , 第三标识比特为 1。 当然也可以设置成: 当当所述预测模式编码值为 31时, 对应的模式编码比特为 11111 , 第三标识比特为 1; 当所述预测模式编码值为 32时, 对应的模式编码比 特为 11111 , 第三标识比特为 0。
比如, 假设当前帧内预测模式值为 12, 最可能的帧内预测模式值分别为 10 和 20, 则 12-1=11 , 设固定比特数为 5, 则对帧内预测模式进行编码的结果就是 11的 5比特二进制码 01011。 如果最可能的模式分别为 13和 20, 则对帧内预测 模式进行编码的结果就是 12的 5比特二进制码 01100。 .如果最可能的模式分别 为 8和 10, 则对帧内预测模式进行编码的结果就是 10 ( 12-2 ) 的 5比特二进制 码 01010。
由于本发明实施例中, 为各种尺寸的预测块均设置同一个预测模式集合, 在对帧内预测模式的值进行编码的过程中, 在绝大多数情况下可以仅使用 5 比 特的固定比特数对预测模式编码值进行编码, 而且不用设定额外的判断逻辑来 确认帧内预测模式编码的固定比特数, 节约了系统资源。
在其他可选择的实施例中, 同样假设预测模式集合中的预测模式的数量为 35个。 为了解决模式编码比特的取值范围仅能在 0-31之间的问题, 也可以为当 前帧内编码块设置 3 个参考预测模式, 比如将可用相邻块中的上边块、 左边块 和左上块的预测模式作为参考预测模式,或者在使用可用的左边块和上边块的帧 内预测模式的基础上, 再设置一个预定义的预测模式作为第三参考预测模式。 同样的, 当可用相邻块的帧内预测模式相同时, 根据前述从参考模式集合中补 充参考预测模式。 在获得预测模式编码值的过程中, 根据小于帧内预测模式的 参考预测模式的数量对帧内预测模式的值进行减 1操作, 以获得预测模式编码 值。 由于有 3 个参考预测模式, 而帧内预测模式的取值范围和三个参考预测模 式的取值范围均是 0-34, 从而使得预测模式编码值的取值范围处于 0-31之间, 也就是说, 始终可以使用 5 个比特的固定比特数来进行编码。 也就是说在本发 明实施例中, 所述步骤 102获取所述当前帧内编码块的参考预测模式包括: 获 取所述当前帧内编码块的三个参考预测模式; 所述步骤 104 当所述帧内预测模 式与参考预测模式均不同时, 根据帧内预测模式与参考预测模式间的大小关系, 获得预测模式编码值, 对所述预测模式编码值进行编码包括:
步骤 104a,: 如果帧内预测模式的值仅大于一个参考预测模式的值, 则所述 预测模式编码值等于帧内预测模式的值减 1 ,如果帧内预测模式大于两个参考预 测模式, 则所述预测模式编码值等于帧内预测模式的值减 2, 如果帧内预测模式 大于三个参考预测模式, 则所述预测模式编码值等于帧内预测模式的值减 3; 步骤 104b,: 使用固定比特数对所述预测模式编码值进行编码,得到模式编 码比特, 将所述模式编码比特写入码流中。
请参照图 3, 本发明实施例还提供了一种解码方法, 其包括:
步骤 301: 从码流中获得第一标识比特, 所述第一标识比特用于指示当前帧 内解码块的帧内预测模式是否与参考预测模式相同, 当所述第一标识比特指示 当前帧内解码块的帧内预测模式与参考预测模式不同时, 根据固定比特数从码 流中获取模式编码比特;
步骤 302: 根据所述模式编码比特获得预测模式编码值;
步骤 303: 获取所述帧内预测块的参考预测模式;
步骤 304:根据所述预测模式编码值与所述参考预测模式的值之间的大小关 系, 获得当前帧内解码块的帧内预测模式;
步骤 305: 根据所述帧内预测模式对所述当前帧内解码块进行解码。
在本发明实施例中, 与编码端相应, 不同尺寸的所述当前帧内解码块的帧 内预测模式均来自于同一个所述预测模式集合。 当然, 编码端和解码端中的预 测模式集合相同或相应。
在解码端, 参考预测模式的获得与编码端相对应, 只需要将当前帧内解码 块的可用相邻块的解码预测方式作为当前帧内编码块的参考预测模式即可。 比 如将当前帧内解码块的上边块和左边块的帧内预测模式作为当前帧内解码块的 参考预测模式。
与编码端类似, 在本发明实施例中, 所述当前帧内解码块的可用相邻块需 要满足下列条件: 1、 与所述当前帧内解码块处于同一条带中; 2、 已经解码。
如果所述预测模式编码值大于或等于所有参考预测模式, 则将所述预测模 式编码值加 2得到当前帧内解码块的帧内预测模式的值; 如果所述预测模式编 码值仅大于或等于两个参考预测模式中的一个, 则将所述预测模式编码值加 1 得到当前帧内解码块的帧内预测模式的值, 如果所述预测模式编码值小于所有 参考预测模式, 则将所述预测模式编码值作为所述帧内预测模式的值。
在本发明实施例中, 当所述第一标识比特指示当前帧内解码块的帧内预测 模式与参考预测模式中的一个相同时, 从码流中再获得一个第二标识比特。 所 述第二标识比特用于指示与所述当前帧内解码块的帧内预测模式相等的参考预 测模式。
类似的, 如果当所述编码比特不为 "11111" 时, 所述预测模式编码值等于 所述编码比特; 当所述编码比特为 "11111" 时, 从码流中获得第三标识比特, 根据所述第三标识比特在预设集合内的获得所述预测模式编码值。
获得编码比特时, 在本发明一种实施例中, 当所述编码比特不为 "11111" 时, 所述预测模式编码值等于所述编码比特; 当所述编码比特为 "11111" 时, 从码流中获得第三标识比特, 根据所述第三标识比特在预设集合内的获得所述 预测模式编码值。 相对应的, 所述获取所述帧内预测块的参考预测模式包括: 获得两个参考预测模式, 所述根据所述预测模式编码值与所述参考预测模式的 值之间的大小关系, 获得当前帧内解码块的帧内预测模式包括: 如果所述预测 模式编码值小于所述两个参考预测模式的值, 则所述帧内预测模式的值等于所 述预测模式编码值; 如果所述预测模式编码值大于或等于所述两个参考预测模 式的值的其中一个, 则所述预测模式编码值加 1 的结果为所述帧内预测模式的 值; 如果所述预测模式编码值大于或等于所述两个参考预测模式的值, 则所述 预测模式编码值加 2的结果为所述帧内预测模式的值。 在本发明另一实施例中, 则直接获得三个参考预测模式, 然后, 如果所述 预测模式编码值小于所述三个参考预测模式的值, 则所述帧内预测模式的值等 于所述预测模式编码值; 如果所述预测模式编码值仅大于或等于所述三个参考 预测模式中的一个的值, 则所述预测模式编码值加 1 的结果为所述帧内预测模 式的值; 如果所述预测模式编码值仅大于或等于所述三个参考预测模式中的两 个的值, 则所述预测模式编码值加 2的结果为所述帧内预测模式的值; 如果所 述预测模式编码值大于或等于所述三个参考预测模式的值, 则所述预测模式编 码值加 3的结果为所述帧内预测模式的值。
得到了帧内预测模式, 就可以根据所述帧内预测模式对当前帧内解码块进 行解码操作。
对应于本发明实施例所提供的编码方法和解码方法, 本发明实施例还提供 了相应编码装置和解码装置。
请参照图 4, 本发明实施例提供的编码装置包括:
预测模块 401 , 用于从预先设定的的预测模式集合中, 获得当前帧内编码块 的帧内预测模式, 以及用于根据所述当前帧内编码块的可用相邻块的帧内预测 模式, 获得所述当前帧内编码块的参考预测模式;
标识模块 402, 用于根据所述参考预测模式和所述帧内预测模式, 向码流中 写入第一标识比特, 所述第一标识比特用于指示所述帧内预测模式是否与所述 参考预测模式中的一个相同;
预测模式编码模块 403 ,用于当所述编码块的帧内预测模式与所述参考预测 模式均不同时, 根据所述帧内预测模式与参考预测模式间的大小关系, 获得预 测模式编码值, 对所述预测模式编码值进行编码。
其中, 预测模块 401、 标识模块 402以及预测模式编码模块 403的具体运作 结果与本发明实施例提供的编码方法类似。
比如, 仍以预测模式集合中的预测模式数为 35种为例。
在本发明一个实施例中, 所述预测模块 401 具体用于根据所述当前帧内编 码块的可用相邻块获得第一参考预测模式和第二参考预测模式, 其中,
如果当前帧内编码块的上边块和左边块均为可用相邻块, 且所述当前帧内 编码块的上边块和左边块的帧内预测模式不同, 则将所述上边块和左边块的帧 内预测模式作为当前帧内编码块的第一参考预测模式和第二参考预测模式; 如 果当前帧内编码块无法根据可用相邻块获得足够数量的参考预测模式, 则可以 使用预先设置的参考模式作为参考预测模式, 以补足数量。 具体的:
如果当前帧内编码块的上边块和左边块均为可用相邻块, 且所述当前帧内 编码块的上边块和左边块的帧内预测模式相同, 则将所述当前帧内编码块的上 边块或者左边块的帧内预测模式作为第一参考预测模式, 以及从所述预测模式 集合中选择一个预先设置的预测模式作为第二参考预测模式; 或者
如果当前帧内编码块的上边块为可用相邻块, 而左边块为不可用相邻块, 则将所述当前帧内编码块的上边块的预测模式作为第一参考预测模式, 而从预 先设置的备用参考模式集合中选择一个预测模式作为第二参考预测模式; 或者 如果当前帧内编码块的上边块为不可用相邻块, 而左边块为可用相邻块, 则将所述当前帧内编码块的左边块的预测模式作为第一参考预测模式, 而从预 先设置的备用参考模式集合中选择一个预测模式作为第二参考预测模式; 或者 如果当前帧内编码块的上边块和左边块均为不可用相邻块, 则从预先设置 的备用参考模式集合重选择两个预测模式作为第一参考预测模式和第二参考预 测模式。
所述预测模式编码模块 403具体用于:
如果所述帧内预测模式的值仅大于一个参考预测模式的值, 则帧内预测模 式的值减 1 的结果为所述预测模式编码值, 如果帧内预测模式大于两个参考预 测模式, 则帧内预测模式的值减 2 的结果为所述预测模式编码值; 使用固定比 特数对所述预测模式编码值进行编码, 得到模式编码比特, 将所述模式编码比 特写入码流中, 其中, 如果所述预测模式编码值的二进制码长度大于所述固定 比特数, 则所述模式编码比特为 "11111" , 并且在码流中再写入第三标识比特, 所述第三标识比特用于指示所述预测模式编码值在预设集合内的取值。
在本发明又一个实施例中, 所述预测模块 401 具体用于根据所述当前帧内 编码块的可用相邻块, 获得三个参考预测模式。
在本发明又一个实施例中, 所述预测模式编码模块 403具体用于: 如果帧内预测模式的值仅大于所述三个参考预测模式中的一个的值, 则所 述帧内预测模式的值减 1 的结果为所述预测模式编码值, 如果帧内预测模式的 值大于所述三个参考预测模式中的两个的值, 则所述帧内预测模式的值减 2 的 结果为所述预测模式编码值, 如果帧内预测模式的大于所述三个参考预测模式 的值, 则所述预测模式编码值等于帧内预测模式的值减 3;
使用固定比特数对所述预测模式编码值进行编码, 得到模式编码比特, 将 所述模式编码比特写入码流中。
请参考图 5 , 图 5所示为本发明实施例所提供的解码装置的示意图。 本发明 实施例提供的解码装置包括:
读码流模块 501 , 用于从码流中获得第一标识比特, 所述第一标识比特用于 指示当前帧内解码块的帧内预测模式是否与参考预测模式相同, 当所述第一标 识比特指示当前帧内解码块的帧内预测模式与参考预测模式不同时, 根据固定 比特数从码流中获取模式编码比特, 所述帧内预测模式为对所述帧内解码块在 进行像素解码时所使用的预测模式;
参考预测模式获得模块 502, 用于获取所述帧内预测块的参考预测模式; 解码模块 503 , 用于根据所述模式编码比特获得预测模式编码值, 根据所述 预测模式编码值与所述参考预测模式的值之间的大小关系, 获得当前帧内解码 块的帧内预测模式, 以及根据所述帧内预测模式对所述当前帧内解码块进行解 码。
所述读码流模块 501、 参考预测模式获得模块 502、 解码模块 503的具体工 作方式与本发明实施例提供的解码方法相同。
具体的, 所述固定比特数为 5。 在本发明一个实施例中, 当所述第一标识比特指示当前帧内解码块的帧内 预测模式与参考预测模式不同时, 所述读码流模块 501 执行以下步骤: 如果所 述编码比特不为 "11111" , 则所述预测模式编码值等于所述编码比特; 如果所述 编码比特为 "11111" , 则从码流中获得一个比特, 根据所述比特在预设集合内的 获得所述预测模式编码值。 相应的, 参考预测模式获得模块 502获得两个参考 预测模式; 解码模块 503 则执行以下步骤: 如果所述预测模式编码值小于所述 两个参考预测模式的值, 则所述帧内预测模式的值等于所述预测模式编码值; 如果所述预测模式编码值仅大于或等于所述两个参考预测模式中的一个时, 则 所述预测模式编码值加 1 的结果为所述帧内预测模式的值; 如果所述预测模式 编码值大于或等于所述两个参考预测模式的值, 则所述预测模式编码值加 2 的 结果为所述帧内预测模式的值。
在本发明另一个实施例中, 参考预测模式获得模块 502获得三个参考预测 模式; 相应的, 解码模块 503 则执行以下步骤: 如果所述预测模式编码值小于 所述三个参考预测模式的值, 则所述帧内预测模式的值等于所述预测模式编码 值; 如果所述预测模式编码值仅大于或等于所述三个参考预测模式中的一个的 值, 则所述预测模式编码值加 1 的结果为所述帧内预测模式的值; 如果所述预 测模式编码值仅大于或等于所述三个参考预测模式中的两个的值, 则所述预测 模式编码值加 2 的结果为所述帧内预测模式的值; 如果所述预测模式编码值大 于或等于所述三个参考预测模式的值, 则所述预测模式编码值加 3 的结果为所 述帧内预测模式的值。
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围并不局限于 此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可轻易想到 变化或替换, 都应涵盖在本发明的保护范围之内。 因此, 本发明的保护范围应 所述以权利要求的保护范围为准。

Claims

权 利 要 求 书
1、 一种帧内预测模式的编码方法, 其特征在于, 包括:
从预先设定的的预测模式集合中, 获得当前帧内编码块的帧内预测模式, 所述帧内预测模式为对所述当前帧内编码块进行像素编码时所采用的预测模 式;
获得所述当前帧内编码块的参考预测模式, 所述参考预测模式为所述当前 帧内编码块的可用相邻块的帧内预测模式或者预先设置的备用参考模式集合的 预测模式, 其中, 所述预先设置的备用参考模式集合中的预测模式均属于所述 预测模式集合;
根据所述参考预测模式和所述帧内预测模式, 向码流中写入第一标识比特, 所述第一标识比特用于指示所述帧内预测模式是否与所述参考预测模式中的一 个相同;
当所述编码块的帧内预测模式与所述参考预测模式均不同时, 根据所述帧 内预测模式与参考预测模式间的大小关系, 获得预测模式编码值, 对所述预测 模式编码值进行编码。
2、 如权利要求 1中所述的编码方法, 其特征在于, 所述预测模式集合中包 括 35种预测模式, 所述帧内预测模式的取值范围为 0-34, 所述参考预测模式的 取值范围为 0-34。
3、 如权利要求 2中所述的编码方法, 其特征在于, 所述获取所述当前帧内 编码块的参考预测模式包括: 根据所述当前帧内编码块的可用相邻块的帧内预 测模式获得第一参考预测模式和第二参考预测模式。
4、 如权利要求 2中所述的编码方法, 其特征在于, 所述根据所述当前帧内 编码块的可用相邻块获得第一参考预测模式和第二参考预测模式包括:
如果当前帧内编码块的上边块和左边块均为可用相邻块, 且所述当前帧内 编码块的上边块和左边块的帧内预测模式不同, 则将所述上边块和左边块的帧 内预测模式作为当前帧内编码块的第一参考预测模式和第二参考预测模式; 或 者
如果当前帧内编码块的上边块和左边块均为可用相邻块, 且所述当前帧内 编码块的上边块和左边块的帧内预测模式相同, 则将所述当前帧内编码块的上 边块或者左边块的帧内预测模式作为第一参考预测模式, 以及从所述预先设置 的备用参考模式集合的预测模式中选择一个预测模式作为第二参考预测模式; 或者
如果当前帧内编码块的上边块为可用相邻块, 而左边块为不可用相邻块, 则将所述当前帧内编码块的上边块的预测模式作为第一参考预测模式, 而从所 述预先设置的备用参考模式集合中选择一个预测模式作为第二参考预测模式; 或者
如果当前帧内编码块的上边块为不可用相邻块, 而左边块为可用相邻块, 则将所述当前帧内编码块的左边块的预测模式作为第一参考预测模式, 而从预 先设置的备用参考模式集合中选择一个预测模式作为第二参考预测模式; 或者 如果当前帧内编码块的上边块和左边块均为不可用相邻块, 则从预先设置 的备用参考模式集合中选择两个预测模式作为第一参考预测模式和第二参考预 测模式。
5、 如权利要求 4中所述的编码方法, 其特征在于, 所述根据帧内预测模式 与参考预测模式间的大小关系, 获得预测模式编码值, 对所述预测模式编码值 进行编码包括:
如果所述帧内预测模式的值仅大于一个参考预测模式的值, 则帧内预测模 式的值减 1 的结果为所述预测模式编码值, 如果帧内预测模式大于两个参考预 测模式, 则帧内预测模式的值减 2的结果为所述预测模式编码值;
使用固定比特数对所述预测模式编码值进行编码, 得到模式编码比特, 将 所述模式编码比特写入码流中, 其中, 如果所述预测模式编码值的二进制码长 度大于所述固定比特数, 则所述模式编码比特为 "11111" , 并且在码流中再写入 第三标识比特, 所述第三标识比特用于指示所述预测模式编码值在预设集合内 的取值。
6、 如权利要求 2中所述的编码方法, 其特征在于, 所述获取所述当前帧内 编码块的参考预测模式包括: 根据所述当前帧内编码块的可用相邻块的帧内预 测模式, 或者根据所述当前帧内编码块的可用相邻块的帧内预测模式以及预设 的第三参考预测模式, 获得三个参考预测模式。
7、 如权利要求 2中所述的编码方法, 其特征在于, 所述根据帧内预测模式 与参考预测模式间的大小关系, 获得预测模式编码值, 对所述预测模式编码值 进行编码包括:
如果帧内预测模式的值仅大于所述三个参考预测模式中的一个的值, 则所 述帧内预测模式的值减 1 的结果为所述预测模式编码值, 如果帧内预测模式的 值大于所述三个参考预测模式中的两个的值, 则所述帧内预测模式的值减 2 的 结果为所述预测模式编码值, 如果帧内预测模式的大于所述三个参考预测模式 的值, 则所述预测模式编码值等于帧内预测模式的值减 3;
使用固定比特数对所述预测模式编码值进行编码, 得到模式编码比特, 将 所述模式编码比特写入码流中。
8、 如权利要求 1中所述的编码方法, 其特征在于, 不同尺寸的所述当前帧 内编码块均使用同一个所述预测模式集合。
9、 一种帧内预测模式的解码方法, 其特征在于, 包括:
从码流中获得第一标识比特, 所述第一标识比特用于指示当前帧内解码块 的帧内预测模式是否与参考预测模式相同, 当所述第一标识比特指示当前帧内 解码块的帧内预测模式与参考预测模式不同时, 根据固定比特数从码流中获取 模式编码比特, 所述帧内预测模式为对所述帧内解码块在进行像素解码时所使 用的预测模式;
根据所述模式编码比特获得预测模式编码值;
获得所述帧内预测块的参考预测模式, 所述参考预测模式为所述当前帧内 编码块的可用相邻块的帧内预测模式或者预先设置的备用参考模式集合中的预 测模式;
根据所述预测模式编码值与所述参考预测模式的值之间的大小关系, 获得 当前帧内解码块的帧内预测模式。
10、 如权利要求 9所述的解码方法, 其特征在于, 所述固定比特数为 5。
11、 如权利要求 10所述的解码方法, 其特征在于, 所述根据所述模式编码 比特获得预测模式编码值包括:
当所述编码比特不为 "11111"时, 所述预测模式编码值等于所述编码比特; 当所述编码比特为 "11111" 时, 从码流中获得一个第三标识比特, 根据所 述第三标识比特在预设集合内的获得所述预测模式编码值。
12、 如权利要求 11所述的解码方法, 其特征在于, 所述获取所述帧内预测 块的参考预测模式包括: 获得两个参考预测模式,
所述根据所述预测模式编码值与所述参考预测模式的值之间的大小关系, 获得当前帧内解码块的帧内预测模式包括:
如果所述预测模式编码值小于所述两个参考预测模式的值, 则所述帧内预 测模式的值等于所述预测模式编码值;
如果所述预测模式编码值仅大于或等于所述两个参考预测模式的中的一个 的值, 则所述预测模式编码值加 1的结果为所述帧内预测模式的值;
如果所述预测模式编码值大于或等于所述两个参考预测模式的值, 则所述 预测模式编码值加 2的结果为所述帧内预测模式的值。
13、 如权利要求 10所述的解码方法, 其特征在于, 所述获取所述帧内预测 块的参考预测模式包括: 获得三个参考预测模式,
所述根据所述预测模式编码值与所述参考预测模式的值之间的大小关系, 获得当前帧内解码块的帧内预测模式包括:
如果所述预测模式编码值小于所述三个参考预测模式的值, 则所述帧内预 测模式的值等于所述预测模式编码值; 如果所述预测模式编码值仅大于或等于所述三个参考预测模式中的一个的 值, 则所述预测模式编码值加 1的结果为所述帧内预测模式的值;
如果所述预测模式编码值仅大于或等于所述三个参考预测模式中的两个的 值, 则所述预测模式编码值加 2的结果为所述帧内预测模式的值;
如果所述预测模式编码值大于或等于所述三个参考预测模式的值, 则所述 预测模式编码值加 3的结果为所述帧内预测模式的值。
14、 如权利要求 9所述的解码方法, 其特征在于, 不同尺寸的所述当前帧 内解码块的帧内预测模式均来自于同一个所述预测模式集合, 所述备用参考模 式集合中的预测模式均属于所述预测模式集合。
15、 一种编码装置, 其特征在于, 包括:
预测模块, 用于从预先设定的的预测模式集合中, 获得当前帧内编码块的 帧内预测模式, 以及用于获得所述当前帧内编码块的参考预测模式, 其中, 所 述参考预测模式为所述当前帧内编码块的可用相邻块的帧内预测模式或者预先 设置的备用参考模式集合中的预测模式, 所述预先设置的备用参考模式集合中 的预测模式均属于所述预测模式集合;
标识模块, 用于根据所述参考预测模式和所述帧内预测模式, 向码流中写 入第一标识比特, 所述第一标识比特用于指示所述帧内预测模式是否与所述参 考预测模式中的一个相同;
预测模式编码模块, 用于当所述编码块的帧内预测模式与所述参考预测模 式均不同时, 根据所述帧内预测模式与参考预测模式间的大小关系, 获得预测 模式编码值, 对所述预测模式编码值进行编码。
16、 如权利要求 15所述的编码装置, 其特征在于, 所述预测模式集合中包 括 35种预测模式, 所述帧内预测模式的取值范围为 0-34, 所述参考预测模式的 取值范围为 0-34。
17、 如权利要求 16所述的编码装置, 其特征在于, 所述预测模块用于根据 所述当前帧内编码块的可用相邻块的帧内预测模式, 获得第一参考预测模式和 第二参考预测模式。
18、 如权利要求 17所述的编码装置, 其特征在于, 所述根据所述当前帧内 编码块的可用相邻块获得第一参考预测模式和第二参考预测模式包括:
如果当前帧内编码块的上边块和左边块均为可用相邻块, 且所述当前帧内 编码块的上边块和左边块的帧内预测模式不同, 则将所述上边块和左边块的帧 内预测模式作为当前帧内编码块的第一参考预测模式和第二参考预测模式; 或 者
如果当前帧内编码块的上边块和左边块均为可用相邻块, 且所述当前帧内 编码块的上边块和左边块的帧内预测模式相同, 则将所述当前帧内编码块的上 边块或者左边块的帧内预测模式作为第一参考预测模式, 以及从所述预先设置 的备用参考模式集合中获得所述第二参考预测模式; 或者
如果当前帧内编码块的上边块为可用相邻块, 而左边块为不可用相邻块, 则将所述当前帧内编码块的上边块的预测模式作为第一参考预测模式, 而从预 先设置的备用参考模式集合中选择一个预测模式作为第二参考预测模式; 或者 如果当前帧内编码块的上边块为不可用相邻块, 而左边块为可用相邻块, 则将所述当前帧内编码块的左边块的预测模式作为第一参考预测模式, 而从预 先设置的备用参考模式集合中选择一个预测模式作为第二参考预测模式; 或者 如果当前帧内编码块的上边块和左边块均为不可用相邻块, 则从预先设置 的备用参考模式集合重选择两个预测模式作为第一参考预测模式和第二参考预 测模式。
19、 如权利要求 18所述的编码装置, 其特征在于, 所述根据帧内预测模式 与参考预测模式间的大小关系, 获得预测模式编码值, 对所述预测模式编码值 进行编码包括:
如果所述帧内预测模式的值仅大于一个参考预测模式的值, 则帧内预测模 式的值减 1 的结果为所述预测模式编码值, 如果帧内预测模式大于两个参考预 测模式, 则帧内预测模式的值减 2的结果为所述预测模式编码值;
使用固定比特数对所述预测模式编码值进行编码, 得到模式编码比特, 将 所述模式编码比特写入码流中, 其中, 如果所述预测模式编码值的二进制码长 度大于所述固定比特数, 则所述模式编码比特为 "11111" , 并且在码流中再写入 第三标识比特, 所述第三标识比特用于指示所述预测模式编码值在预设集合内 的取值。
20、 如权利要求 16所述的编码装置, 其特征在于, 所述预测模块用于根据 所述当前帧内编码块的可用相邻块的帧内预测模式, 或者根据所述当前帧内编 码块的可用相邻块的帧内预测模式以及预设的第三参考预测模式, 获得三个参 考预测模式。
21、 如权利要求 20所述的编码装置, 其特征在于, 所述根据帧内预测模式 与参考预测模式间的大小关系, 获得预测模式编码值, 对所述预测模式编码值 进行编码包括:
如果帧内预测模式的值仅大于所述三个参考预测模式中的一个的值, 则所 述帧内预测模式的值减 1 的结果为所述预测模式编码值, 如果帧内预测模式的 值大于所述三个参考预测模式中的两个的值, 则所述帧内预测模式的值减 2 的 结果为所述预测模式编码值, 如果帧内预测模式的大于所述三个参考预测模式 的值, 则所述预测模式编码值等于帧内预测模式的值减 3;
使用固定比特数对所述预测模式编码值进行编码, 得到模式编码比特, 将 所述模式编码比特写入码流中。
22、 如权利要求 15所述的编码装置, 其特征在于, 不同尺寸的所述当前帧 内编码块均使用同一个所述预测模式集合。
23、 一种解码装置, 其特征在于, 包括:
读码流模块, 用于从码流中获得第一标识比特, 所述第一标识比特用于指 示当前帧内解码块的帧内预测模式是否与参考预测模式相同, 当所述第一标识 比特指示当前帧内解码块的帧内预测模式与参考预测模式不同时, 根据固定比 特数从码流中获取模式编码比特, 所述帧内预测模式为对所述帧内解码块在进 行像素解码时所使用的预测模式;
参考预测模式获得模块, 用于获得所述帧内预测块的参考预测模式, 其中, 所述参考预测模式为所述当前帧内编码块的可用相邻块的帧内预测模式或者预 先设置的备用参考模式集合中的预测模式;
解码模块, 用于根据所述模式编码比特获得预测模式编码值, 根据所述预 测模式编码值与所述参考预测模式的值之间的大小关系, 获得当前帧内解码块 的帧内预测模式, 以及根据所述帧内预测模式对所述当前帧内解码块进行解码。
24、 如权利要求 23所述的解码装置, 其特征在于, 所述固定比特数为 5。
25、 如权利要求 24所述的解码装置, 其特征在于, 所述根据所述模式编码 比特获得预测模式编码值包括:
当所述编码比特不为 "11111"时, 所述预测模式编码值等于所述编码比特; 当所述编码比特为 "11111" 时, 从码流中获得一个第三标识比特, 根据所 述第三标识比特在预设集合内的获得所述预测模式编码值。
26、 如权利要求 25所述的解码装置, 其特征在于, 所述参考预测模式获得 模块获得两个参考预测模式,
所述根据所述预测模式编码值与所述参考预测模式的值之间的大小关系, 获得当前帧内解码块的帧内预测模式包括:
如果所述预测模式编码值小于所述两个参考预测模式的值, 则所述帧内预 测模式的值等于所述预测模式编码值;
如果所述预测模式编码值仅大于或等于所述两个参考预测模式的中的一个 的值, 则所述预测模式编码值加 1的结果为所述帧内预测模式的值;
如果所述预测模式编码值大于或等于所述两个参考预测模式的值, 则所述 预测模式编码值加 2的结果为所述帧内预测模式的值。
27、 如权利要求 25所述的解码方法, 其特征在于, 所述参考预测模式获得 模块获得三个参考预测模式, 所述根据所述预测模式编码值与所述参考预测模式的值之间的大小关系, 获得当前帧内解码块的帧内预测模式包括:
如果所述预测模式编码值小于所述三个参考预测模式的值, 则所述帧内预 测模式的值等于所述预测模式编码值;
如果所述预测模式编码值仅大于或等于所述三个参考预测模式中的一个的 值, 则所述预测模式编码值加 1的结果为所述帧内预测模式的值;
如果所述预测模式编码值仅大于或等于所述三个参考预测模式中的两个的 值, 则所述预测模式编码值加 2的结果为所述帧内预测模式的值;
如果所述预测模式编码值大于或等于所述三个参考预测模式的值, 则所述 预测模式编码值加 3的结果为所述帧内预测模式的值。
28、 如权利要求 23所述的解码装置, 其特征在于, 不同尺寸的所述当前帧 内解码块的帧内预测模式均来自于同一个所述预测模式集合, 所述备用参考模 式集合中的预测模式均属于所述预测模式集合。
PCT/CN2013/070778 2012-01-19 2013-01-21 一种编解码方法和设备 WO2013107419A1 (zh)

Priority Applications (19)

Application Number Priority Date Filing Date Title
EP13738733.8A EP2709361B1 (en) 2012-01-19 2013-01-21 Encoding method and device
ES13738733.8T ES2625276T3 (es) 2012-01-19 2013-01-21 Método y dispositivo de codificación.
BR112013034060-6A BR112013034060B1 (pt) 2012-01-19 2013-01-21 métodos e aparelhos de codificação e decodificação
JP2014525307A JP5969608B2 (ja) 2012-01-19 2013-01-21 エンコーディングおよびデコーディングの方法および装置
PL16204557T PL3232663T3 (pl) 2012-01-19 2013-01-21 Sposoby i urządzenia dekodowania
KR1020177022211A KR101855974B1 (ko) 2012-01-19 2013-01-21 인코딩 및 디코딩 방법 및 장치
KR1020167032949A KR101768203B1 (ko) 2012-01-19 2013-01-21 인코딩 및 디코딩 방법 및 장치
KR1020137033632A KR101681237B1 (ko) 2012-01-19 2013-01-21 인코딩 및 디코딩 방법 및 장치
KR1020187012528A KR101969003B1 (ko) 2012-01-19 2013-01-21 인코딩 및 디코딩 방법 및 장치
CA2838890A CA2838890C (en) 2012-01-19 2013-01-21 Methods and apparatuses for video intra-frame prediction using a preset prediction mode set and intra-frame prediction modes of adjacent video blocks
EP16204557.9A EP3232663B1 (en) 2012-01-19 2013-01-21 Decoding methods and devices
KR1020157014413A KR20150067396A (ko) 2012-01-19 2013-01-21 인코딩 및 디코딩 방법 및 장치
EP23169343.3A EP4250736A3 (en) 2012-01-19 2013-01-21 Encoding methods and devices
AU2013211321A AU2013211321B2 (en) 2012-01-19 2013-01-21 Encoding and decoding methods and apparatuses
EP21170332.7A EP3930322B1 (en) 2012-01-19 2013-01-21 Encoding methods and devices
RU2013158672/08A RU2544756C1 (ru) 2012-01-19 2013-01-21 Способы и устройства кодирования и декодирования
US14/142,437 US9769474B2 (en) 2012-01-19 2013-12-27 Encoding and decoding methods and apparatuses
US15/616,677 US10104380B2 (en) 2012-01-19 2017-06-07 Encoding and decoding methods and apparatuses
US16/143,024 US10511841B2 (en) 2012-01-19 2018-09-26 Encoding and decoding methods and apparatuses

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210018036.3A CN103220506B (zh) 2012-01-19 2012-01-19 一种编解码方法和设备
CN201210018036.3 2012-01-19

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/142,437 Continuation US9769474B2 (en) 2012-01-19 2013-12-27 Encoding and decoding methods and apparatuses

Publications (1)

Publication Number Publication Date
WO2013107419A1 true WO2013107419A1 (zh) 2013-07-25

Family

ID=48798675

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/070778 WO2013107419A1 (zh) 2012-01-19 2013-01-21 一种编解码方法和设备

Country Status (19)

Country Link
US (3) US9769474B2 (zh)
EP (4) EP3930322B1 (zh)
JP (3) JP5969608B2 (zh)
KR (5) KR20150067396A (zh)
CN (1) CN103220506B (zh)
AU (1) AU2013211321B2 (zh)
BR (1) BR112013034060B1 (zh)
CA (1) CA2838890C (zh)
DK (2) DK3232663T3 (zh)
ES (3) ES2625276T3 (zh)
FI (1) FI3930322T3 (zh)
HK (1) HK1184944A1 (zh)
HU (2) HUE062148T2 (zh)
MY (1) MY165494A (zh)
PL (2) PL3232663T3 (zh)
PT (3) PT3232663T (zh)
RU (1) RU2544756C1 (zh)
SI (2) SI3930322T1 (zh)
WO (1) WO2013107419A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015507903A (ja) * 2012-01-20 2015-03-12 パンテック カンパニー リミテッド 画面内予測方法及び画像復号化装置

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5893346B2 (ja) * 2011-11-07 2016-03-23 キヤノン株式会社 画像符号化装置、画像符号化方法及びプログラム、画像復号装置、画像復号方法及びプログラム
CN103220506B (zh) 2012-01-19 2015-11-25 华为技术有限公司 一种编解码方法和设备
CN106412579B (zh) * 2015-07-30 2019-07-16 浙江大华技术股份有限公司 一种图像的编码、解码方法和装置
US11019365B2 (en) 2015-07-30 2021-05-25 Zhejiang Dahua Technology Co., Ltd. Methods and systems for image compression
CN108347602B (zh) * 2017-01-22 2021-07-30 上海澜至半导体有限公司 用于无损压缩视频数据的方法和装置
CA3113787C (en) 2018-12-25 2024-02-13 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Decoding prediction method, apparatus and computer storage medium which use reference samples adjacent to at least one side of decoding block
KR20200083321A (ko) * 2018-12-28 2020-07-08 한국전자통신연구원 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
CN110213594A (zh) * 2018-12-29 2019-09-06 腾讯科技(深圳)有限公司 用于帧内编码的方法、装置、帧编码器、帧编码系统以及计算机可读存储媒体
US11595662B2 (en) * 2019-02-06 2023-02-28 Tencent America LLC Method and apparatus for neighboring block availability in video coding
CN113453014B (zh) * 2019-06-21 2022-03-25 杭州海康威视数字技术股份有限公司 预测模式的解码、编码方法及装置
WO2020259476A1 (en) * 2019-06-24 2020-12-30 Huawei Technologies Co., Ltd. Sample distance calculation for geometric partition mode
CN110166775B (zh) * 2019-06-25 2021-05-11 浙江大华技术股份有限公司 帧内预测方法、编码器及存储装置
CN113596452B (zh) * 2021-06-17 2023-03-24 浙江大华技术股份有限公司 一种编码方法、装置、电子设备、存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1615020A (zh) * 2004-11-10 2005-05-11 华中科技大学 一种复杂度可分级的帧内预测方法
CN1809168A (zh) * 2005-01-21 2006-07-26 精工爱普生株式会社 编码器中的帧内预测模式选择
CN101971631A (zh) * 2007-12-21 2011-02-09 艾利森电话股份有限公司 自适应帧内模式选择
US20110038414A1 (en) * 2009-08-17 2011-02-17 Samsung Electronics Co., Ltd. Method and apparatus for encoding video, and method and apparatus for decoding video

Family Cites Families (34)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2697706B1 (fr) * 1992-11-03 1994-11-25 Thomson Csf Procédé et dispositif de réduction de débit pour l'enregistrement d'images sur magnétoscope.
US7170937B2 (en) * 2002-05-01 2007-01-30 Texas Instruments Incorporated Complexity-scalable intra-frame prediction technique
EP1558039A1 (en) * 2004-01-21 2005-07-27 Deutsche Thomson-Brandt Gmbh Method and apparatus for generating/evaluating prediction information in picture signal encoding/decoding
US20090123066A1 (en) * 2005-07-22 2009-05-14 Mitsubishi Electric Corporation Image encoding device, image decoding device, image encoding method, image decoding method, image encoding program, image decoding program, computer readable recording medium having image encoding program recorded therein,
US20080137732A1 (en) * 2005-09-20 2008-06-12 Mitsubishi Electric Corporation Image encoding method and image decoding method, image encoder and image decoder, and image encoded bit stream and recording medium
KR100750145B1 (ko) * 2005-12-12 2007-08-21 삼성전자주식회사 영상의 인트라 예측 부호화, 복호화 방법 및 장치
US8428133B2 (en) 2007-06-15 2013-04-23 Qualcomm Incorporated Adaptive coding of video block prediction mode
BRPI0818444A2 (pt) 2007-10-12 2016-10-11 Qualcomm Inc codificação adaptativa de informação de cabeçalho de bloco de vídeo
US10455248B2 (en) * 2008-10-06 2019-10-22 Lg Electronics Inc. Method and an apparatus for processing a video signal
KR101510108B1 (ko) * 2009-08-17 2015-04-10 삼성전자주식회사 영상의 부호화 방법 및 장치, 그 복호화 방법 및 장치
KR101507344B1 (ko) * 2009-08-21 2015-03-31 에스케이 텔레콤주식회사 가변 길이 부호를 이용한 인트라 예측모드 부호화 방법과 장치, 및 이를 위한기록 매체
CN102118613B (zh) * 2009-12-31 2012-11-21 华为技术有限公司 视频解码和编码方法及装置
US8588303B2 (en) * 2010-03-31 2013-11-19 Futurewei Technologies, Inc. Multiple predictor sets for intra-frame coding
EP2560387A4 (en) * 2010-04-13 2014-07-02 Samsung Electronics Co Ltd VIDEO CODING METHOD AND VIDEO CODING DEVICE, AND VIDEO ENCODING METHOD AND VIDEO ENCODING DEVICE FOR CARRYING OUT AN ABSORPTION FILTRATION BASED ON TREE STRUCTURE CODING UNITS
US8902978B2 (en) * 2010-05-30 2014-12-02 Lg Electronics Inc. Enhanced intra prediction mode signaling
KR101530284B1 (ko) * 2010-07-16 2015-06-19 삼성전자주식회사 영상의 인트라 예측 부호화, 복호화 방법 및 장치
ES2683793T3 (es) * 2010-09-30 2018-09-27 Sun Patent Trust Procedimiento de decodificación de imagen, procedimiento de codificación de imagen, dispositivo de decodificación de imagen, dispositivo de codificación de imagen, programa y circuito integrado
US9025661B2 (en) * 2010-10-01 2015-05-05 Qualcomm Incorporated Indicating intra-prediction mode selection for video coding
KR101756442B1 (ko) * 2010-11-29 2017-07-11 에스케이텔레콤 주식회사 인트라예측모드의 중복성을 최소화하기 위한 영상 부호화/복호화 방법 및 장치
SG191869A1 (en) * 2011-01-07 2013-08-30 Agency Science Tech & Res Method and an apparatus for coding an image
US9654785B2 (en) * 2011-06-09 2017-05-16 Qualcomm Incorporated Enhanced intra-prediction mode signaling for video coding using neighboring mode
CA2838214C (en) 2011-06-13 2019-02-12 Panasonic Corporation Image decoding method, image coding method, image decoding apparatus, image coding apparatus, and image coding and decoding apparatus
EP3624451A1 (en) * 2011-06-17 2020-03-18 HFI Innovation Inc. Method and apparatus for coding of intra prediction mode
ES2661699T3 (es) 2011-06-28 2018-04-03 Samsung Electronics Co., Ltd. Procedimiento de decodificación de vídeo con intra predicción
EP2988511A1 (en) * 2011-08-04 2016-02-24 MediaTek Inc. Method and apparatus for reordered binarization of syntax elements in cabac
EP2745519B1 (en) * 2011-08-17 2017-09-27 MediaTek Singapore Pte Ltd. Method and apparatus for intra prediction using non-square blocks
GB2494468B (en) 2011-09-12 2014-01-15 Canon Kk Method and device for encoding or decoding information representing prediction modes
US9363511B2 (en) * 2011-09-13 2016-06-07 Mediatek Singapore Pte. Ltd. Method and apparatus for Intra mode coding in HEVC
KR101974952B1 (ko) * 2011-10-06 2019-05-07 인텔렉추얼디스커버리 주식회사 두 개의 후보 인트라 예측 모드를 이용한 화면 내 예측 모드의 부/복호화 방법 및 이러한 방법을 사용하는 장치
JP5869681B2 (ja) 2011-10-07 2016-02-24 パンテック カンパニー リミテッド 候補画面内予測モードを利用した画面内予測モードの符号化/復号化方法及び装置
EP2942956B1 (en) * 2011-10-24 2020-06-03 Innotive Ltd Image decoding apparatus
EP2773118B1 (en) * 2011-10-24 2020-09-16 Innotive Ltd Method and apparatus for image decoding
US9088796B2 (en) * 2011-11-07 2015-07-21 Sharp Kabushiki Kaisha Video decoder with enhanced CABAC decoding
CN103220506B (zh) * 2012-01-19 2015-11-25 华为技术有限公司 一种编解码方法和设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1615020A (zh) * 2004-11-10 2005-05-11 华中科技大学 一种复杂度可分级的帧内预测方法
CN1809168A (zh) * 2005-01-21 2006-07-26 精工爱普生株式会社 编码器中的帧内预测模式选择
CN101971631A (zh) * 2007-12-21 2011-02-09 艾利森电话股份有限公司 自适应帧内模式选择
US20110038414A1 (en) * 2009-08-17 2011-02-17 Samsung Electronics Co., Ltd. Method and apparatus for encoding video, and method and apparatus for decoding video

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015507903A (ja) * 2012-01-20 2015-03-12 パンテック カンパニー リミテッド 画面内予測方法及び画像復号化装置
JP2017038382A (ja) * 2012-01-20 2017-02-16 パンテック カンパニー リミテッド 画面内予測方法及び画像復号化装置
US9854239B2 (en) 2012-01-20 2017-12-26 Intellectual Discovery Co., Ltd. Intra prediction mode mapping method and device using the method
US9986238B2 (en) 2012-01-20 2018-05-29 Intellectual Discovery Co., Ltd. Intra prediction mode mapping method and device using the method
JP2018152863A (ja) * 2012-01-20 2018-09-27 インテレクチュアル ディスカバリー カンパニー リミテッド 画面内予測方法及び画像復号化装置
US10158852B2 (en) 2012-01-20 2018-12-18 Intellectual Discovery Co., Ltd. Intra prediction mode mapping method and device using the method
US10616575B2 (en) 2012-01-20 2020-04-07 Intellectual Discovery Co., Ltd. Intra prediction mode mapping method and device using the method
US10863173B2 (en) 2012-01-20 2020-12-08 Dolby Laboratories Licensing Corporation Intra prediction mode mapping method and device using the method

Also Published As

Publication number Publication date
HUE062148T2 (hu) 2023-09-28
HUE055162T2 (hu) 2021-11-29
CN103220506B (zh) 2015-11-25
KR20180049248A (ko) 2018-05-10
DK3930322T3 (da) 2023-07-31
HK1184944A1 (zh) 2014-01-30
KR101855974B1 (ko) 2018-05-09
US9769474B2 (en) 2017-09-19
CN103220506A (zh) 2013-07-24
MY165494A (en) 2018-03-27
JP2018061263A (ja) 2018-04-12
AU2013211321A1 (en) 2014-01-09
DK3232663T3 (da) 2021-08-16
US10511841B2 (en) 2019-12-17
KR20140016385A (ko) 2014-02-07
PT3232663T (pt) 2021-08-03
EP2709361B1 (en) 2017-03-15
CA2838890A1 (en) 2013-07-25
US20190028713A1 (en) 2019-01-24
EP3232663B1 (en) 2021-05-26
US20170272760A1 (en) 2017-09-21
US20140112388A1 (en) 2014-04-24
JP6530467B2 (ja) 2019-06-12
US10104380B2 (en) 2018-10-16
CA2838890C (en) 2018-12-18
AU2013211321B2 (en) 2015-01-22
KR101768203B1 (ko) 2017-08-16
JP2016197894A (ja) 2016-11-24
PT3930322T (pt) 2023-07-25
KR20160140972A (ko) 2016-12-07
ES2883382T3 (es) 2021-12-07
FI3930322T3 (fi) 2023-07-28
PT2709361T (pt) 2017-05-18
EP3930322B1 (en) 2023-05-03
EP2709361A4 (en) 2015-01-21
BR112013034060B1 (pt) 2019-11-19
KR20150067396A (ko) 2015-06-17
RU2544756C1 (ru) 2015-03-20
EP4250736A2 (en) 2023-09-27
EP4250736A3 (en) 2023-11-08
ES2625276T3 (es) 2017-07-19
SI3930322T1 (sl) 2023-08-31
KR101969003B1 (ko) 2019-04-15
JP2014527361A (ja) 2014-10-09
EP3930322A1 (en) 2021-12-29
ES2951543T3 (es) 2023-10-23
JP5969608B2 (ja) 2016-08-17
KR101681237B1 (ko) 2016-11-30
PL3232663T3 (pl) 2021-12-27
BR112013034060A2 (pt) 2017-02-07
SI3232663T1 (sl) 2021-08-31
PL3930322T3 (pl) 2023-09-11
JP6240266B2 (ja) 2017-11-29
KR20170094014A (ko) 2017-08-16
EP3232663A1 (en) 2017-10-18
EP2709361A1 (en) 2014-03-19

Similar Documents

Publication Publication Date Title
WO2013107419A1 (zh) 一种编解码方法和设备
CN102685474B (zh) 预测模式的编解码方法、编解码设备及网络系统
WO2020253829A1 (zh) 一种编解码方法、装置及存储介质
CN102857764B (zh) 帧内预测模式处理的方法和装置
CN102685477B (zh) 获取用于合并模式的图像块的方法和设备
RU2013154106A (ru) Способ декодирования изображений, способ кодирования изображений, устройство декодирования изображений, устройство кодирования изображений и устройство кодирования и декодирования изображений
WO2012097675A1 (zh) 基于图像块的帧内预测模式的编解码方法和编解码器
KR101246119B1 (ko) 인트라 예측 모드 결정 방법 및 장치

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: 13738733

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2838890

Country of ref document: CA

REEP Request for entry into the european phase

Ref document number: 2013738733

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2013738733

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 20137033632

Country of ref document: KR

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2014525307

Country of ref document: JP

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2013158672

Country of ref document: RU

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2013211321

Country of ref document: AU

Date of ref document: 20130121

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

REG Reference to national code

Ref country code: BR

Ref legal event code: B01A

Ref document number: 112013034060

Country of ref document: BR

ENP Entry into the national phase

Ref document number: 112013034060

Country of ref document: BR

Kind code of ref document: A2

Effective date: 20131230