WO2023044617A1 - 编解码方法及装置 - Google Patents

编解码方法及装置 Download PDF

Info

Publication number
WO2023044617A1
WO2023044617A1 PCT/CN2021/119696 CN2021119696W WO2023044617A1 WO 2023044617 A1 WO2023044617 A1 WO 2023044617A1 CN 2021119696 W CN2021119696 W CN 2021119696W WO 2023044617 A1 WO2023044617 A1 WO 2023044617A1
Authority
WO
WIPO (PCT)
Prior art keywords
angle
mode
mapping
index
image block
Prior art date
Application number
PCT/CN2021/119696
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 CN202180101495.5A priority Critical patent/CN117882378A/zh
Priority to PCT/CN2021/119696 priority patent/WO2023044617A1/zh
Publication of WO2023044617A1 publication Critical patent/WO2023044617A1/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/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • H04N19/159Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques

Definitions

  • the present application relates to the technical field of encoding and decoding, and in particular, relates to an encoding method and device, and a decoding method and device.
  • AV1 is a video coding standard developed by the Alliance of Open Media Video.
  • AV1 Open Media Video
  • it mainly performs a series of processing such as image block division, prediction, transformation, quantization, entropy encoding, and loop filtering on the input image to obtain the final code stream for storage or network. transmission.
  • Prediction is an important link in the encoding process, and accurate prediction of image blocks is the key to improving encoding efficiency.
  • the existing angle mode design of the AV1 standard is not reasonable enough, its utilization rate of reference pixels is not sufficient, and the coding efficiency needs to be improved.
  • the present application provides an encoding method and device, and a decoding method and device.
  • a decoding method comprising:
  • the angle indicated by the index of the angle mode is within the first angle range
  • the angle indicated by the index is used as the prediction angle corresponding to the angle mode, wherein the mapping angle is located in the second angle range, the angles in the first angle range point to the upper right of the image block, and the angles in the second angle range The angle of is pointing to the lower left of the image block;
  • a decoding method comprising:
  • the angle indicated by the index of the angle mode is within the first angle range
  • the angle indicated by the index is used as the prediction angle corresponding to the angle mode, wherein the mapping angle is located in a second angle range, and the angle in the second angle range is greater than the angle in the first angle range;
  • an encoding method comprising:
  • the prediction mode of the image block is an angle mode in the intra prediction mode
  • encoding processing is performed on the image block and an index of the angle mode based on the angle mode to obtain a code of the image block flow
  • the predicted angle corresponding to the angle mode is the mapping angle of the angle indicated by the index, and the mapping angle is within the second angle range, so The angles in the first angle range point to the upper right of the image block, and the angles in the second angle range point to the lower left of the image block.
  • an encoding method comprising:
  • the prediction mode of the image block is an angle mode in the intra prediction mode
  • encoding processing is performed on the image block and an index of the angle mode based on the angle mode to obtain a code of the image block flow
  • the predicted angle corresponding to the angle mode is the mapping angle of the angle indicated by the index, and the mapping angle is within the second angle range, so The angles in the second angle range are larger than the angles in the first angle range.
  • a decoding device includes a processor, a memory, and a computer program stored in the memory for execution by the processor, and the processor executes the computer program , perform the following steps:
  • the angle indicated by the index is The mapping angle is used as the prediction angle corresponding to the angle mode, wherein the mapping angle is located in the second angle range, the angles in the first angle range point to the upper right of the image block, and the angles in the second angle range The angle points to the bottom left of the image block;
  • a decoding device the processor includes a processor, a memory, and a computer program stored in the memory for execution by the processor, when the processor executes the computer program , implement the following steps:
  • the angle indicated by the index of the angle mode is within the first angle range
  • the angle indicated by the index is used as the prediction angle corresponding to the angle mode, wherein the mapping angle is located in a second angle range, and the angle in the second angle range is greater than the angle in the first angle range;
  • an encoding device includes a processor, a memory, and a computer program stored in the memory for execution by the processor, when the processor executes the computer program , implement the following steps:
  • the prediction mode of the image block is an angle mode in the intra prediction mode
  • encoding processing is performed on the image block and an index of the angle mode based on the angle mode to obtain a code of the image block flow
  • the predicted angle corresponding to the angle mode is the mapping angle of the angle indicated by the index, and the mapping angle is within the second angle range, so The angles in the first angle range point to the upper right of the image block, and the angles in the second angle range point to the lower left of the image block.
  • an encoding device which acquires an image block to be encoded
  • the prediction mode of the image block is an angle mode in the intra prediction mode
  • encoding processing is performed on the image block and an index of the angle mode based on the angle mode to obtain a code of the image block flow
  • the predicted angle corresponding to the angle mode is the mapping angle of the angle indicated by the index, and the mapping angle is within the second angle range, so The angles in the second angle range are larger than the angles in the first angle range.
  • the angle mode in the original AV1 standard is optimized, and some original prediction angles in the angle mode of the AV1 standard can be mapped to other
  • the prediction angle of the prediction angle makes the distribution of the prediction angle after mapping more reasonable, and the correlation between the reference pixel and the image block pointed by the prediction angle after mapping is stronger, and the coding efficiency is improved.
  • Fig. 1 is a schematic diagram of 56 angle modes in the AV1 standard of an embodiment of the present application.
  • Fig. 2 is a schematic diagram of reference pixels of an image block in the AV1 standard according to an embodiment of the present application.
  • Fig. 3 is a schematic diagram of determining a predicted pixel value based on an angle mode according to an embodiment of the present application
  • Fig. 4 is a flowchart of an encoding method according to an embodiment of the present application.
  • Fig. 5(a) and Fig. 5(b) are schematic diagrams of an image block division method according to an embodiment of the present application.
  • Fig. 6 is a schematic diagram of the upper right and lower left of an image block according to an embodiment of the present application.
  • Fig. 7 is a schematic diagram of mapping prediction angles according to an embodiment of the present application.
  • Fig. 8 is a flowchart of a decoding method according to an embodiment of the present application.
  • FIG. 9 is a schematic diagram of a logical structure of an encoding device according to an embodiment of the present application.
  • Fig. 10 is a schematic diagram of a logic structure of a decoding device according to an embodiment of the present application.
  • AV1 is a video coding standard developed by the Alliance of Open Media Video.
  • the image to be encoded is divided into blocks to obtain multiple image blocks .
  • the encoded image block can be used to perform intra-frame prediction or inter-frame prediction on the image block, determine the predicted pixel value of each pixel in the image block, and determine the actual pixel value of each pixel in the image block.
  • the residual of the pixel value and the predicted pixel value is encoded to obtain a code stream of the image block for storage or network transmission. Since there is no need to store and transmit the original pixel values of the image block, but only the residual, the amount of data can be greatly reduced.
  • predicting the current image block to be encoded based on the encoded image block, and determining the predicted pixel value of the current image block to be encoded is an important link in the encoding process. Accurately predicting the image block to be encoded is important. The key to improving coding efficiency.
  • the AV1 encoding standard there are mainly two modes for predicting an image block to be encoded, an intra-frame prediction mode and an inter-frame pre-mode.
  • the inter-frame prediction mode uses other coded frame images to predict the image block to be encoded, while the intra-frame prediction mode refers to using the video spatial correlation to use the pixels of the encoded image block on the left and above the image block to be encoded The value generates the predicted pixel value of the image block to be encoded.
  • the intra-frame prediction modes in the AV1 standard include two types: angle mode and non-angle mode. Both non-angular and angular modes can be further subdivided into multiple modes.
  • the angle mode in the AV1 standard supports a total of 56 angle modes from 36° to 212°, which can better fit the texture direction of the image for prediction.
  • Figure 1 shows the angle mode in the AV1 standard, where the prediction directions indicated by the 8 black arrows are defined as the main angle mode, and each main angle is shifted to both sides by 3 degrees, 6 degrees, and 9 degrees to obtain 6 extended angles mode (the gray arrow in Figure 1), there are 48 extended angle modes in total.
  • the direction indicated by the prediction angle corresponding to each angle mode is the prediction direction of the angle mode, and the prediction angle corresponding to each angle mode is shown in Table 1.
  • intra prediction uses adjacent pixels of an image block as reference pixels. Taking a W ⁇ H image block as an example, the reference pixels required for intra-frame prediction are shown in Figure 2, including W+H pixels on the left, W+H pixels on the top, and 1 pixel on the upper left. A total of 2 (W+H)+1 reference pixels. If any reference pixel is unavailable, it will be filled with the last available reference pixel value.
  • the pixels above and to the left of the image block are its reference pixels
  • the reference pixel in the 45° direction of pixel a is b, so the pixel value of pixel b can be used as its predicted pixel value.
  • the last reference pixel for example, pixel c
  • each angle mode corresponds to an index, which is used to uniquely identify the angle mode. Since the prediction angles corresponding to each angle mode are different, the index of the angle mode is determined, that is, the prediction angle corresponding to the angle mode can be known.
  • the AV1 standard includes 8 main angles, and each main angle is extended by 6 extended angles. There are 56 angle modes in total, and each angle mode has an index for identifying the angle mode. For example, the indexes of the 8 main angle modes can be represented by 0-7, and the indexes of the extended angle modes can be represented by the main angle index and the offset of the extended angle relative to the main angle.
  • the 56 angle modes in the AV1 standard correspond to angle values ranging from 36° to 212°, which has the following problems: the angle values corresponding to the angle modes range from 213° to 225°, and there is an angle missing, and the adjacent pixels on the lower left It has not been fully utilized, and the upper right adjacent pixels are used too much for prediction, which affects the coding efficiency, especially for square image blocks and rectangular image blocks whose width is smaller than the height, because the pixels of the image block to be encoded are different from the left adjacent pixels The correlation is stronger, and the current angle mode in the AV1 standard lacks part of the angle at the lower left, resulting in a loss of coding efficiency, and when the aspect ratio is larger, the correlation between the pixel of the current image block and the upper adjacent pixel is weaker. At this time, excessive use of upper adjacent pixels will reduce the prediction accuracy. In addition, since the image block uses W+H adjacent pixels on the left and above as reference pixels, the reference pixels with an expansion angle of less than 45°
  • the embodiment of the present application provides a codec method.
  • the angle mode in the original AV1 standard is optimized, and some of the original angle modes in the AV1 standard can be
  • the prediction angle is mapped to other prediction angles, so that the reference pixel pointed to by the mapped prediction angle has a stronger correlation with the image block, and the coding efficiency is improved.
  • the prediction angle at the upper right of the image block can be mapped to the prediction angle at the lower left of the image block, so that the prediction angle at the upper right of the image block can be reduced, and the prediction angle at the lower left of the image block can be increased, which can make full use of
  • the adjacent pixels in the lower left improve the coding efficiency, especially for rectangular blocks whose height is greater than the width.
  • the pixels of the rectangular block are more correlated with the adjacent pixels on the left. It is more accurate and efficient to use the lower left adjacent pixels for prediction. , and because the prediction angle of the upper right is reduced, the problem of insufficient reference pixels in the upper left can also be solved.
  • the encoding method provided by the embodiment of the present application can be used in various encoding devices, the decoding method can be used in various decoding devices, and the encoding and decoding method can be applied to encoding and decoding of various images or videos.
  • the encoding method and the decoding method provided by the embodiment of the present application are introduced below in conjunction with the processing flow of the encoding end and the decoding end.
  • the predicted angle corresponding to the angle mode is the mapping angle of the angle indicated by the index, and the mapping angle is within the second angle range, so The angles in the first angle range are smaller than the angles in the second angle range.
  • the image or video frame to be encoded can be divided to obtain multiple image blocks.
  • dividing the image block you can refer to the method of dividing the image in the AV1 standard , for example, firstly, the image can be divided into 128x128 image blocks, and then the divided square image blocks can be further divided, as shown in Fig. 5(a), and the image block division method with the least coding cost is selected.
  • the image block can be further divided according to the 10 division methods shown in Fig. 5(b). It can be seen from Fig. 5(b) that the divided image may be a square image block or a rectangular image block.
  • each image block can be encoded.
  • the prediction mode with the smallest encoding cost can be selected from various intra prediction modes, and used for this Image blocks are intra-predicted.
  • each angle mode can be used to predict the predicted pixel value of the image block, determine its encoding cost, and select the optimal angle mode from the angle modes, and then compete with other non-angle modes to determine the final prediction mode.
  • the image block may be encoded based on the selected angle mode. For example, as shown in FIG. 3 , for each pixel in the image block to be encoded, the predicted pixel value of the pixel can be determined based on the pixel value of the reference pixel pointed to by the prediction angle corresponding to the angle mode. If the prediction angle just points to one reference pixel, the pixel value of the reference pixel is used as the predicted pixel value; if it points to multiple reference pixels, the predicted pixel value is determined by combining the pixel values of the multiple reference pixels.
  • the residual between the actual pixel value and the predicted pixel value of each pixel of the image block can be determined, and then the residual is encoded.
  • the index of the angle mode can be encoded and written into the code stream, so that the decoding end can determine the angle mode used during encoding, and use the angle mode to restore the predicted pixel value.
  • the embodiment of the present application optimizes the original prediction angle in the AV1 standard when constructing the angle mode, that is, the original Some or all of the prediction angles are mapped to other prediction angles.
  • the mapping relationship can be preset and mapped to other prediction angles, so that the distribution of prediction angles is more reasonable.
  • the original index can still be used to represent the reconstructed angle mode, but the predicted angle indicated by the index has changed, not the original Some prediction angles are the prediction angles after mapping the original prediction angles.
  • the original prediction angles in other directions in the AV1 standard can be mapped to the lower left.
  • an angle range can be set in advance, hereinafter referred to as the first angle range.
  • the predicted angle in the first angle range is the angle that needs to be mapped.
  • the specific mapping relationship can be set based on the actual situation.
  • the mapped mapping angle is within the second angle range.
  • the larger the angle value of the prediction angle therefore, some prediction angles with smaller angle values can be mapped to mapping angles with larger angle values at the lower left, that is, the angles in the second angle range
  • the angles are greater than angles within the first range of angles.
  • the angles in the first angle range point to the upper right of the image block, and the angles in the second angle range point to the lower left of the image block point to the lower left of the image block.
  • the upper right refers to an angle range pointing to the upper right of the image block, for example, it may be an angle range determined with a 45° angle as the center
  • the lower left refers to an angle range pointing to the upper right of the image block.
  • An angle range at the lower left for example, may be an angle range determined with an angle of 225° as the center, such as the area selected by the dashed line in FIG. 6 , not just an angle.
  • the first angle range may be 36°-45°
  • the second angle range may be 212°-225°.
  • the expansion angle smaller than 45° in the AV1 standard can be mapped to between 212° and 225°.
  • the extended angle smaller than the target main angle in the AV1 standard can be mapped to an angle at the lower left of the image block, that is, the first angle range can be an angle range smaller than the target main angle in the AV1 standard, in It is determined to map the original predicted angle to obtain the mapped angle, firstly expand the target main angle to obtain the expanded angle of the target main angle, and then perform mapping processing on the expanded angle to obtain the mapped angle of the expanded angle.
  • the target main angle when it is determined to map the original predicted angle to obtain the mapped angle, can be mapped first to obtain the mapped angle of the target main angle, and then the mapped angle of the target main angle can be extended Process to get the mapping angle.
  • the angle mode in the AV1 standard defines 8 main angles, as shown by the black arrows in Figure 1, the corresponding angle values are 45°, 67°, 90°, 113°, 135°, 157°, 180° °, 203°.
  • Step 1 Construct the extended angle pattern from the main angle pattern angle value:
  • Step 2 Extended angle mapping less than 45 degrees
  • the expansion angle less than 45 degrees is mapped as shown in Figure 7, and the expansion angle less than 45 degrees (the angle in the first angle range in the figure) is mapped to the angle value in The expansion angle in the range of 212 degrees to 225 degrees (as shown in the second angle range in the figure), the specific formula is as follows:
  • the main angle may be extended from 45° to 225° first, and then extended to 225° to obtain angles in the range of 212°-225°.
  • mapping the angle indicated by the index An angle is used as a prediction angle corresponding to the angle mode, wherein the mapping angle is located in a second angle range, and angles in the first angle range are smaller than angles in the second angle range;
  • the code stream of the image block to be decoded can be obtained, wherein the code stream will include the indication information of the prediction mode of the image block, so the prediction mode of the image block can be determined based on the code stream, if the prediction mode is an angle mode, and the If the angle indicated by the index of the angle mode is within the first angle range, the mapped angle of the angle indicated by the index is used as the predicted angle corresponding to the angle mode, wherein the mapped angle is within the second angle range. Then, the image block can be decoded according to the prediction angle.
  • the reference pixel of the image block is determined from the reconstructed adjacent pixels based on the prediction angle, the predicted pixel value of the image block is determined based on the pixel value of the reference pixel, and the predicted pixel value of the image block is determined based on the code stream.
  • the residual and predicted pixel values determine the pixel values of the image block, and thus, the image block is obtained by decoding.
  • angles in the first range of angles are smaller than the angles in the second range of angles. In some embodiments, angles in the first range of angles point to the upper right of the image block, and angles in the second range of angles point to the lower left of the image block.
  • the angle indicated by the index of this part of the angle mode is the predicted angle of the angle mode. Therefore, in some embodiments, if the angle indicated by the index of the angle mode is outside the first angle range, the predicted angle corresponding to the angle mode is the angle indicated by the index.
  • the decoder determines that the index of the angle mode used for intra prediction is outside the first angle range based on the code stream, the angle indicated by the index can be used as the prediction angle of the angle mode, and then use The prediction angle performs decoding processing on the code stream of the image block.
  • the finally obtained image blocks to be coded may be square image blocks, rectangular image blocks whose width is greater than height, and rectangular image blocks whose height is greater than width.
  • the distribution of prediction angles in the current AV1 standard will result in the lack of angles at the lower left, and the pixels at the lower left cannot be fully utilized, so it is necessary to perform mapping processing on the prediction angles.
  • For a rectangular image block whose width is greater than its height since it has a stronger correlation with the upper right adjacent pixel, there is no need to perform mapping processing on the current prediction angle. Therefore, in some embodiments, when the encoding end encodes the image block to be encoded, it can process it differently.
  • the prediction angle in the original AV1 standard is used.
  • the prediction angle corresponding to the angle mode is the angle indicated by the index.
  • one or more prediction angles located in the first angle range in the original AV1 standard are mapped to one or more prediction angles in the second angle range Forecast angle. Therefore, when the angle indicated by the index is within the first angle range, the predicted angle of the angle mode is the mapping angle of the angle indicated by the index. When the angle indicated by the index is not in the first angle range, the predicted angle of the angle mode is the angle indicated by the index.
  • the decoder can first determine whether the height of the image block is greater than or equal to the width of the image block based on the code stream, and if so, further determine whether the angle indicated by the index is at the first within the angle range, if it is within the first angle range, use the mapping angle of the angle indicated by the index as the predicted angle of the angle mode, if it is not in the first angle range, use the angle indicated by the index as the predicted angle, and use the predicted angle Decode the stream.
  • the angle indicated by the index is directly used as the prediction angle, and then the code stream is decoded using the prediction angle.
  • the intra prediction mode may include a mapping mode and a non-mapping mode.
  • the intra prediction mode is a non-mapping mode
  • the original prediction angle in the AV1 standard is not mapped, and the original prediction angle is used.
  • the prediction angle corresponding to each angle mode in the intra prediction mode is the angle indicated by the index of each angle mode.
  • the intra prediction mode is the mapping mode
  • the original partial prediction angle mode in the AV1 standard is mapped
  • the prediction angle corresponding to the partial angle mode in the intra prediction mode is the mapping angle of the angle indicated by the index.
  • the code stream should also include indication information indicating whether the intra prediction mode is the mapping mode, so that the decoding end can determine the angle mode based on the indication information forecast angle.
  • the decoder can obtain the indication information from the code stream to indicate whether the intra prediction mode is the mapping mode, and determine the intra prediction mode based on the indication information in the code stream.
  • the mapping mode the mapping angle of the angle indicated by the index is used as the prediction angle corresponding to the angle mode. If the intra prediction mode is determined to be a non-mapping mode, the angle indicated by the index is used as the prediction angle corresponding to the angle mode, and then use The predicted angle decodes the bitstream.
  • the AV1 standard includes 8 main angles, and each main angle is extended by 6 extended angles. There are 56 angle modes in total. Each of the 56 angle modes has an index for identifying the angle mode. Therefore, in some embodiments, the angle indicated by the index of the angle mode may be the main angle or the extended angle. When the index of the angle mode indicates the extended angle, the index may adopt the main angle index corresponding to the extended angle, and Indicates the relative offset of the extension angle from the main angle.
  • the indexes of the 8 main angle modes can be represented by 0-7
  • the indexes of the extended angle modes can be represented by the main angle index and the offset of the extended angle relative to the main angle. For example, 36° is the extended angle of the main angle 45°, so its index can be represented by the index 0 of 45° and the relative angle offset of -9°.
  • the decoder can obtain the index of the main angle and the relative angle offset from the code stream, determine the index of the extension angle based on the two, and determine the prediction angle based on the index of the extension angle , for decoding.
  • the embodiment of the present application also provides an encoding device. As shown in FIG. , when the processor 91 executes the computer program, the following steps are implemented:
  • the prediction mode of the image block is an angle mode in the intra prediction mode
  • encoding processing is performed on the image block and an index of the angle mode based on the angle mode to obtain a code of the image block flow
  • the predicted angle corresponding to the angle mode is the mapping angle of the angle indicated by the index, and the mapping angle is within the second angle range, so The angles in the first angle range are smaller than the angles in the second angle range.
  • the predicted angle corresponding to the angle mode is the angle indicated by the index.
  • the prediction angle corresponding to the angle mode is the The mapping angle for the angle indicated by the above index.
  • the prediction angle corresponding to the angle mode is the angle indicated by the index.
  • the intra prediction mode includes a mapped mode and a non-mapped mode
  • the prediction angle corresponding to each angle mode in the intra prediction mode is the angle indicated by the index of each angle mode
  • the prediction angle corresponding to the partial angle mode in the intra prediction mode is the mapping angle of the angle indicated by the index of the partial angle mode.
  • the code stream further includes indication information for indicating whether the intra prediction mode is the mapping mode.
  • the angle indicated by the index of the angle mode includes: a main angle, or an extended angle of the main angle.
  • the first angular range includes a range smaller than the target principal angle, and the mapped angle is determined based on:
  • the first angular range includes a range smaller than the target principal angle, and the mapped angle is determined based on:
  • mapping processing on the target main angle to obtain a mapping angle of the target main angle
  • the angle indicated by the index is an extended angle
  • the index is represented by an index of the main angle mode and a relative offset between the extended angle and the main angle.
  • the first angle range is 36°-45°
  • the second angle range is 212°-225°.
  • angles in the second angle range point to the lower left of the image block, and the angles in the first angle range point to the upper right of the image block.
  • the embodiment of the present application also provides a decoding device.
  • FIG. program when the processor 101 executes the computer program, the following steps are implemented:
  • the angle indicated by the index is The mapping angle is used as the predicted angle corresponding to the angle mode, wherein the mapping angle is located in a second angle range, and the angles in the first angle range are smaller than the angles in the second angle range;
  • the processor is configured to determine that the image block prediction mode is an angle mode in an intra prediction mode based on the code stream, and the angle indicated by the index of the angle mode is not within the first angle range In the case of , the angle indicated by the index is used as the predicted angle corresponding to the angle mode.
  • the processor when configured to use the mapping angle of the angle indicated by the index as the predicted angle corresponding to the angle mode, it is specifically configured to:
  • the mapping angle of the angle indicated by the index is used as the prediction angle corresponding to the angle mode.
  • the processor is configured to use the angle indicated by the index as the prediction angle corresponding to the angle mode when it is determined that the height of the image block is smaller than the width of the image block.
  • the intra prediction mode includes a mapped mode and a non-mapped mode
  • the prediction angle corresponding to each angle mode in the intra prediction mode is the angle indicated by the index of each angle mode
  • the prediction angle corresponding to the partial angle mode in the intra prediction mode is the mapping angle of the angle indicated by the index of the partial angle mode.
  • the code stream further includes indication information for indicating whether the intra prediction mode is the mapping mode
  • the processor When the processor is used to use the mapping angle of the angle indicated by the index as the predicted angle corresponding to the angle mode, it is specifically used for:
  • the mapping angle of the angle indicated by the index is used as the prediction angle corresponding to the angle mode.
  • the angle indicated by the index of the angle mode includes: a main angle, or an extended angle of the main angle.
  • the index when the angle indicated by the index is an extended angle, the index is represented by the index of the main angle of the extended angle, and the relative offset between the extended angle and the main angle .
  • the first angular range includes an angular range smaller than the target principal angle, and the mapping angle is determined based on:
  • the first angular range includes an angular range smaller than the target principal angle, and the mapping angle is determined based on:
  • mapping processing on the target main angle to obtain a mapping angle of the target main angle
  • the first angle range is 36°-45°
  • the second angle range is 212°-225°.
  • angles in the first angle range point to the upper right of the image block, and the angles in the second angle range point to the lower left of the image block.
  • the embodiment of this specification also provides a computer storage medium, the storage medium stores a program, and when the program is executed by a processor, the encoding method and the decoding method in any of the foregoing embodiments are implemented.
  • Embodiments of the present description may take the form of a computer program product embodied on one or more storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) having program code embodied therein.
  • Computer usable storage media includes both volatile and non-permanent, removable and non-removable media, and may be implemented by any method or technology for information storage.
  • Information may be computer readable instructions, data structures, modules of a program, or other data.
  • Examples of storage media for computers include, but are not limited to: phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Flash memory or other memory technology, Compact Disc Read-Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, Magnetic tape cartridge, tape magnetic disk storage or other magnetic storage device or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
  • PRAM phase change memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • RAM random access memory
  • ROM read only memory
  • EEPROM Electrically Erasable Programmable Read-Only Memory
  • Flash memory or other memory technology
  • CD-ROM Compact Disc Read-Only Memory
  • DVD Digital Versatile Disc
  • Magnetic tape cartridge tape magnetic disk storage or other magnetic storage device or any other non-transmission medium that can be used to
  • the device embodiment since it basically corresponds to the method embodiment, for related parts, please refer to the part description of the method embodiment.
  • the device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in One place, or it can be distributed to multiple network elements. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. It can be understood and implemented by those skilled in the art without creative effort.

Abstract

一种编解码方法及装置。在构造帧内预测中的角度模式时,对原有AV1标准中的角度模式进行了优化,可以将AV1标准的角度模式中原有的一些预测角度进行映射,映射成其他的预测角度,使得映射后的预测角度分布更加合理,映射后的预测角度指向的参考像素与图像块的相关性更强,提高编码效率。

Description

编解码方法及装置 技术领域
本申请涉及编解码技术领域,具体而言,涉及一种编码方法及装置、解码方法及装置。
背景技术
AV1是由开放媒体视频联盟(Alliance of Open Media Video)开发的视频编码标准。基于AV1标准对图像或视频进行编码时,主要是对输入的图像进行图像块划分、预测、变换、量化、熵编码、环路滤波等一系列处理,得到最终的码流,用于存储或网络传输。预测是编码过程中的一个重要的环节,准确的对图像块进行预测,是提升编码效率的关键。AV1标准现有的角度模式的设计不够合理,其对参考像素的利用率不够充分,编码效率还有待提高。
发明内容
有鉴于此,本申请提供一种编码方法及装置、解码方法及装置。
根据本申请的第一方面,提供一种解码方法,所述方法包括:
获取待解码的图像块的码流;
在基于所述码流确定所述图像块的预测模式为帧内预测模式中的角度模式,且所述角度模式的索引指示的角度位于第一角度范围的情况下,将所述索引指示的角度的映射角度作为所述角度模式对应的预测角度,其中,所述映射角度位于第二角度范围,所述第一角度范围内的角度指向所述图像块的右上方,所述第二角度范围内的角度指向所述图像块的左下方;
基于所述预测角度对所述码流进行解码处理。
根据本申请的第二方面,提供一种解码方法,所述解码方法包括:
获取待解码的图像块的码流;
在基于所述码流确定所述图像块的预测模式为帧内预测模式中的角度模式,且所述角度模式的索引指示的角度位于第一角度范围的情况下,将所述索引指示的角度的映射角度作为所述角度模式对应的预测角度,其中,所述映射角度位于第二角度范围,所述第二角度范围内的角度大于所述第一角度范围内的角度;
基于所述预测角度对所述码流进行解码处理。
根据本申请的第三方面,提供一种编码方法,所述方法包括:
获取待编码的图像块;
在确定所述图像块的预测模式为帧内预测模式中的角度模式的情况下,基于所述角度模式对所述图像块以及所述角度模式的索引进行编码处理,得到所述图像块的码流;
其中,当所述索引指示的角度位于第一角度范围内的情况下,所述角度模式对应的预测角度为所述索引指示的角度的映射角度,所述映射角度位于第二角度范围内,所述第一角度范围内的角度指向所述图像块的右上方,所述第二角度范围内的角度指向所述图像块的左下方。
根据本申请的第四方面,提供一种编码方法,所述方法包括:
获取待编码的图像块;
在确定所述图像块的预测模式为帧内预测模式中的角度模式的情况下,基于所述角度模式对所述图像块以及所述角度模式的索引进行编码处理,得到所述图像块的码流;
其中,当所述索引指示的角度位于第一角度范围内的情况下,所述角度模式对应的预测角度为所述索引指示的角度的映射角度,所述映射角度位于第二角度范围内,所述第二角度范围内的角度大于所述第一角度范围内的角度。
根据本申请的第五方面,提供一种解码装置,所述解码装置包括处理器、存储器、存储于所述存储器可供所述处理器执行的计算机程序,所述处理器器执行所述计算机程序时,实现以下步骤:
获取待解码的图像块的码流;
在基于所述码流确定所述图像块预测模式为帧内预测模式中的角度模式,且所述角度模式的索引指示的角度位于第一角度范围的情况下,将所述索引指示的角度的映射角度作为所述角度模式对应的预测角度,其中,所述映射角度位于第二角度范围,所述第一角度范围内的角度指向所述图像块的右上方,所述第二角度范围内的角度指向所述图像块的左下方;
基于所述预测角度对所述码流进行解码处理。
根据本申请的第六方面,提供一种解码装置,所述处理器包括处理器、存储器、存储于所述存储器可供所述处理器执行的计算机程序,所述处理器执行所述计算机程序时,实现以下步骤:
获取待解码的图像块的码流;
在基于所述码流确定所述图像块的预测模式为帧内预测模式中的角度模式,且所述角度模式的索引指示的角度位于第一角度范围的情况下,将所述索引指示的角度的映射角度作为所述角度模式对应的预测角度,其中,所述映射角度位于第二角度范围,所述第二角度范围内的角度大于所述第一角度范围内的角度;
基于所述预测角度对所述码流进行解码处理。
根据本申请的第七方面,提供一种编码装置,所述处理器包括处理器、存储器、存储于所述存储器可供所述处理器执行的计算机程序,所述处理器执行所述计算机程序时,实现以下步骤:
获取待编码的图像块;
在确定所述图像块的预测模式为帧内预测模式中的角度模式的情况下,基于所述角度模式对所述图像块以及所述角度模式的索引进行编码处理,得到所述图像块的码流;
其中,当所述索引指示的角度位于第一角度范围内的情况下,所述角度模式对应的预测角度为所述索引指示的角度的映射角度,所述映射角度位于第二角度范围内,所述第一角度范围内的角度指向所述图像块的右上方,所述第二角度范围内的角度指向所述图像块的左下方。
根据本申请的第八方面,提供一种编码装置,获取待编码的图像块;
在确定所述图像块的预测模式为帧内预测模式中的角度模式的情况下,基于所述角度模式对所述图像块以及所述角度模式的索引进行编码处理,得到所述图像块的码流;
其中,当所述索引指示的角度位于第一角度范围内的情况下,所述角度模式对应的预测角度为所述索引指示的角度的映射角度,所述映射角度位于第二角度范围内,所述第二角度范围内的角度大于所述第一角度范围内的角度。
应用本申请提供的方案,在构造帧内预测中的角度模式时,对原有AV1标准中的角度模式进行了优化,可以将AV1标准的角度模式中原有的一些预测角度进行映射,映射成其他的预测角度,使得映射后的预测角度分布更加合理,映射后的预测角度指向的参考像素与图像块的相关性更强,提高编码效率。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本申请一个实施例AV1标准中56种角度模式的示意图。
图2是本申请一个实施例AV1标准中图像块的参考像素的示意图。
图3是本申请一个实施例的基于角度模式确定预测像素值的示意图
图4是本申请一个实施例的一种编码方法的流程图。
图5(a)和图5(b)是本申请一个实施例的一种图像块的划分方式的示意图。
图6是本申请一个实施例的图像块的右上方和左下方的示意图。
图7是本申请一个实施例的对预测角度进行映射的示意图。
图8是本申请一个实施例的解码方法的流程图。
图9是本申请一个实施例的编码装置的逻辑结构示意图。
图10是本申请一个实施例的解码装置的逻辑结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
AV1是由开放媒体视频联盟(Alliance of Open Media Video)开发的视频编码标准,采用AV1标准对图像或视频进行编码时,主要包括以下步骤:首先对待编码的图像进行块划分,得到多个图像块。针对当前待编码的图像块,可以利用已编码的图像块对该图像块进行帧内预测或者帧间预测,确定该图像块中各像素的预测像素值,并且确定该图像块中各像素的实际像素值和预测像素值的残差,对该残差进行编码,得到图像块的码流,用于存储或网络传输。由于无需存储和传输图像块的原始像素值,而是仅存储或传输残差,可以大大减小数据量。
其中,基于已编码的图像块对当前待编码的图像块进行预测,确定当前待编码的图像块的预测像素值,是编码过程中的一个重要环节,准确地 对待编码的图像块进行预测,是提升编码效率的关键。在AV1编码标准中,对待编码的图像块进行预测的模式主要有两种,帧内预测模式和帧间预模式。帧间预测模式是利用已编码的其他帧图像对待编码的图像块进行预测,而帧内预测模式是指利用视频空域相关性,利用待编码的图像块左侧和上方的已编码图像块的像素值生成待编码图像块的预测像素值。AV1标准中的帧内预测模式包含角度模式和非角度模式两大类。非角度模式和角度模式均可以进一步细分成多种模式。
AV1标准中的角度模式,支持预测角度从36°到212°共56种角度模式,可以更好的贴合图像的纹理方向进行预测。图1展示了AV1标准中的角度模式,其中,8个黑色箭头表示的预测方向被定义为主角度模式,每个主角度向两侧偏移3度、6度、9度得到6个扩展角度模式(如图1中的灰色箭头),共有48个扩展角度模式。其中,每一种角度模式对应的预测角度指示的方向为该角度模式的预测方向,每一种角度模式对应的预测角度如表1所示。
表1、AV1各角度模式对应的预测角度
Figure PCTCN2021119696-appb-000001
在选用某种角度模式进行帧内预测时,针对待编码图像块中的每个像素,在确定其预测像素值时,会基于该像素在该角度模式对应的预测角度所指向的方向上的参考像素确定该像素的预测像素值。在AV1编码标准中,帧内预测会使用图像块的相邻像素作为参考像素。以一个W×H的图像块为例,其帧内预测所需要的参考像素如图2所示,包括左侧W+H个像素, 上方W+H个像素,左上1个像素,共需要2(W+H)+1个参考像素。如果存在参考像素不可用时,会使用最后一个可用的参考像素值进行填充。
举个例子,如图3所示,假设图中4x4的图像块为当前待预测的图像块,在对该图像块进行帧内预测时,该图像块上方和左侧的像素为其参考像素,针对图像块中的像素a,如果是按照45°角度模式确定其预测像素值,像素a的45°方向上的参考像素为b,因而可以以像素b的像素值作为其预测像素值。当然,如果当某个角度模式的预测方向指向的像素超出参考像素的范围(比如,指向像素d或者像素d右边的像素),则以最后一个参考像素(比如,像素c)代替,作为其预测像素值。
如果是采用帧内预测的方式,帧内预测会通过竞争的方式从所有角度模式中选出一种最优角度模式(即编码代价最小的角度模式),并与其他帧内预测模式进行竞争得到最终的帧内预测模式,写入码流中。如果最终选中角度模式,则会将该角度模式的索引写入码流。AV1标准中,每种角度模式对应一个索引,用于唯一标识该角度模式,由于每种角度模式对应的预测角度不一样,确定了角度模式的索引,即可以知道该角度模式对应的预测角度。AV1标准中包括8个主角度,每个主角度又扩展了6个扩展角度,一共有56个角度模式,每个角度模式都有一个索引,用于标识该角度模式。比如,8个主角度模式的索引可以用0-7表示,而扩展角度模式的索引可以用主角度索引,以及扩展角度相对于主角度的偏移量表示。
结合图1可知,AV1标准中的56种角度模式对应角度值范围从36°到212°,其存在以下问题:角度模式对应的角度值从213°到225°部分存在角度缺失,左下相邻像素没有得到充分利用,过多的使用了右上相邻像素进行预测,影响了编码效率,尤其是对于方形图像块和宽小于高的矩形图像块,由于待编码图像块的像素与左侧相邻像素的相关性更强,而AV1标准中目前的角度模式左下缺失了部分角度,造成编码效率的损失,并且当高宽比越大,当前图像块的像素与上方相邻像素的相关性越弱,此时过多使用上方相邻像素会降低预测准确度。另外,由于图像块使用左侧和上方的W+H个相邻像素作为参 考像素,小于45°的扩展角度的参考像素通常会不够用,会影响预测效率。
基于此,本申请实施例提供了一种编解码方法,在构造帧内预测中的角度模式时,对原有AV1标准中的角度模式进行了优化,可以将AV1标准的角度模式中原有的一些预测角度进行映射,映射成其他的预测角度,使得映射后的预测角度指向的参考像素与图像块的相关性更强,提高编码效率。比如,可以将位于图像块右上方的预测角度映射成位于图像块左下方的预测角度,从而可以减少位于图像块右上方的预测角度,增加位于图像块左下方的预测角度,可以更加充分的利用左下方的相邻像素,提高编码效率,尤其是高大于宽的矩形块,该矩形块的像素与左侧相邻像素的相关性更强,利用左下相邻像素进行预测更加准确,效率更高,并且由于减少了右上方的预测角度,也可以解决左上方参考像素不够用问题。
本申请实施例提供的编码方法可以用于各种编码装置,解码方法可以用于各种解码装置,该编解码方法可以适用于各种图像或视频的编解码。
以下结合编码端和解码端的处理流程对本申请实施例提供的编码方法和解码方法进行介绍。
其中,编码方法的具体流程如图4所示,具体包括以下步骤:
S402、获取待编码的图像块;
S404、在确定所述图像块的预测模式为帧内预测模式中的角度模式的情况下,基于所述角度模式对所述图像块以及所述角度模式的索引进行编码处理,得到所述图像块的码流;
其中,当所述索引指示的角度位于第一角度范围内的情况下,所述角度模式对应的预测角度为所述索引指示的角度的映射角度,所述映射角度位于第二角度范围内,所述第一角度范围内的角度小于所述第二角度范围内的角度。
在对图像或视频帧进行编码时,可以将先对待编码的图像或视频帧进行划分,得到多个图像块,其中,在对图像块进行划分时,可以参考AV1标准中对图像进行划分的方法,比如,首先可以将图像分为128x128的图像块, 然后可以对划分得到的方形图像块进行进一步划分,如图5(a)所示,选出编码代价最小的图像块划分方式。在对图像块进行进一步划分时,可以按照图5(b)给出的10种划分方式对图像块进行进一步划分。从图5(b)可知,划分后的图像可能是方形图像块,也可能是矩形图像块。
在划分得到图像块后,可以针对每个图像块进行编码处理,在获取到当前待编码的图像块后,可以从多种帧内预测模式中筛选出编码代价最小的预测模式,用于对该图像块进行帧内预测。比如,可以先用每种角度模式预测该图像块的预测像素值,确定其编码代价,从角度模式中竞选出最优角度模式,然后再与其他非角度模式竞选,确定最终的预测模式。
在确定待编码的图像块的预测模式为帧内预测模式中的角度模式的情况下,则可以基于所选出的角度模式对图像块进行编码处理。比如,如图3所示,针对待编码图像块中的每个像素,都可以以该角度模式对应的预测角度所指向的参考像素的像素值确定该像素的预测像素值。如果该预测角度刚好指向一个参考像素,则以该参考像素的像素值作为该预测像素值,如果指向多个参考像素,则结合该多个参考像素的像素值确定该预测像素值。在确定图像块各像素的预测像素值后,可以确定图像块各像素的实际像素值和预测像素值的残差,然后对残差进行编码。同时,可以对角度模式的索引进行编码,写入码流中,以便解码端确定编码时所用的角度模式,并利用该角度模式还原出预测像素值。
鉴于AV1标准中原有的预测角度设计不太合理,未能充分利用图像块左下方的相邻像素,本申请实施例在构造角度模式时,将AV1标准中原有的预测角度进行了优化,即将原有的部分或全部预测角度映射成了其他的预测角度。比如,针对AV1标准的某些预测角度,可以预先设置好映射关系,将其映射成其他的预测角度,使得预测角度的分布更加合理。将AV1标准中的部分角度进行映射后,为了可以避免对原有标准进行较大改动,依然可以采用原有的索引表示重新构造的角度模式,但是索引所指示的预测角度发生了变化,不是原有的预测角度,而是对原有的预测角度进行映射后的预测角度。
在一些实施例中,为了弥补原有的AV1标准中左下方角度缺失,无法充分利用左下方的参考像素,可以将AV1标准中原有的其他方向上的预测角度映射至左下方。比如,可以预先设置一个角度范围,以下称为第一角度范围,第一角度范围中的预测角度即为需要映射的角度,具体的映射关系可以基于实际情况设定,对原有的预测角度进行映射后的映射角度位于第二角度范围内。由于越往图像块的左下方,预测角度的角度值越大,因而,可以将一些角度值较小的预测角度映射成位于左下方的角度值较大的映射角度,即第二角度范围内的角度大于第一角度范围内的角度。
当然,由于目前的AV1标准中右上方的预测角度分布较多,比如在36°-45°这一范围内还分布有预测角度,针对方形和高大于宽的矩形块来说,通常会出现右上方的参考像素不够用,而左下方参考像素无法充分利用的问题,且右上方的相邻像素与图像块的相关性会比左下方的相邻像素与图像块的相关性弱。所以,可以减少右上方预测角度的数量,增加左下方预测角度的数量,即可以将图像块右上方的一部分预测角度映射到图像块的左下方。所以,在一些实施例中,第一角度范围内的角度指向图像块的右上方,第二角度范围内的角度指向图像块的左下方。需要指出的是,如图6所示,右上方指的是指向图像块右上方的一个角度范围,比如,可以是以45°角为中心确定的一个角度范围,左下方指的是指向图像块左下方的一个角度范围,比如,可以是以225°角为中心确定的一个角度范围,如图6中虚线框选的区域范围,并非仅仅指一个角度。
在一些实施例中,第一角度范围可以是36°~45°,第二角度范围可以是212°~225°。比如,可以将AV1标准中小于45°的扩展角度映射至212°~225°之间。
当然,在对AV1标准中原有的预测角度进行映射时,可以基于实际需求确定待映射的预测角度的数量、待映射的预测角度是哪些角度,以及映射后的预测角度是哪些角度。在一些实施例中,可以对AV1标准中小于目标主角度的扩展角度进行映射,映射成图像块左下方的角度,即第一角度范围可以 是小于AV1标准中的目标主角度的角度范围,在确定对原有的预测角度进行映射,得到映射角度时,可以先对目标主角度进行扩展处理,得到目标主角度的扩展角度,然后,对扩展角度进行映射处理,得到扩展角度的映射角度。
在一些实施例中,在确定对原有的预测角度进行映射,得到映射角度时,可以先对目标主角度进行映射处理,得到目标主角度的映射角度,然后对目标主角度的映射角度进行扩展处理,得到映射角度。
举个例子,AV1标准中角度模式定义了8个主角度,如图1中黑色箭头所示,对应的角度值分别为45°,67°,90°,113°,135°,157°,180°,203°。
步骤1.根据主角度模式角度值构造扩展角度模式:
设主角度模式为nominal_angle[m],在主角度基础上偏移角度±delta_angle[0],±delta_angle[1],±delta_angle[2]求得扩展角度的对应角度值derived_angle[m][n],0<delta_angle[0](3°)<delta_angle[1](6°)<delta_angle[2](9°)<11计算。具体公式如下:
If n<3
derived_angle[m][n]=nominal_angle[m]-delta_angle[3-n]
If n>=3
derived_angle[m][n]=nominal_angle[m]+delta_angle[n-3]
其中,m=0,1,…8,n=0,1,…5。
步骤2.小于45度的扩展角度映射
根据步骤1计算得到扩展角度值后,对小于45度的扩展角度进行如图7所示的映射,将小于45度的扩展角度(如图中第一角度范围内的角度)映射为角度值在212度到225度范围的扩展角度(如图图中第二角度范围内的角度),具体公式如下:
If derived_angle[m][n]<45
derived_angle[m][n]=225-delta_angle[|n-3|]
当然,在一些实施例中,也可以先将主角度45°到225°,然后再对225°进行扩展,得到212°-225°范围内的角度。
相应的,解码端在接收到采用上述编码方式编码的码流后,解码端的处理流程如图8所示,包括以下步骤:
S802、获取待解码的图像块的码流;
S804、在基于所述码流确定所述图像块的帧内预测模式为角度模式,且所述角度模式的索引指示的角度位于第一角度范围的情况下,将所述索引指示的角度的映射角度作为所述角度模式对应的预测角度,其中,所述映射角度位于第二角度范围,所述第一角度范围内的角度小于所述第二角度范围内的角度;
S806、基于所述预测角度对所述图像块进行解码处理。
首先,可以获取待解码的图像块的码流,其中,码流中会包括图像块的预测模式的指示信息,因而可以基于码流确定图像块的预测模式,如果预测模式为角度模式,且该角度模式的索引指示的角度位于第一角度范围,则将索引指示的角度的映射角度作为角度模式对应的预测角度,其中,映射角度位于第二角度范围。然后可以根据预测角度对图像块进行解码处理,比如,基于预测角度从重新构建的相邻像素确定图像块的参考像素,基于参考像素的像素值确定图像块的预测像素值,基于码流中的残差和预测像素值确定图像块的像素值,从而,解码得到图像块。
在一些实施例中,第一角度范围内的小于第二角度范围内的角度。在一些实施例中,第一角度范围内的角度指向图像块的右上方,第二角度范围内的角度指向图像块的左下方。
由于AV1标准中只有部分角度模式的预测角度发生了映射,其余的角度模式的预测角度不变,因而,这部分角度模式的索引指示的角度即为该角度模式的预测角度。所以,在一些实施例中,如果角度模式的索引指示的角度位于第一角度范围外,则该角度模式对应的预测角度就是索引指示的角度。
相应的,解码端在接收码流后,如果基于码流判定帧内预测采用的角度模式的索引位于第一角度范围以外,则可以将该索引指示的角度作为该角度模式的预测角度,然后利用该预测角度对图像块的码流进行解码处理。
由于在划分图像块时,有多种划分方式,最后得到的待编码的图像块可能是方形图像块、宽大于高的矩形图像块、高大于宽的矩形图像块,针对方形图像块和高大于宽的矩形图像块,目前AV1标准中的预测角度的分布会导致左下方的角度缺失,未能充分利用左下方的像素,因而需要进行对预测角度进行映射处理。而针对宽大于高的矩形图像块,由于其与右上方的相邻像素相关性更强,因而无需对目前的预测角度进行映射处理。所以,在一些实施例中,编码端在对待编码的图像块进行编码时,可以区别处理,针对图像块的高度大于或等于图像块的宽度的情况,则利用原有AV1标准中的预测角度进行帧内预测,角度模式对应的预测角度均为索引指示的角度。在一些实施例中,针对图像块的高度小于图像块的宽度的情况,则对原有AV1标准中的位于第一角度范围的一个或多个预测角度进行映射,映射成第二角度范围内的预测角度。所以,当索引指示的角度位于第一角度范围时,则角度模式的预测角度为该索引指示的角度的映射角度。当索引指示的角度不在第一角度范围时,则角度模式的预测角度为该索引指示的角度。
相应的,解码端在接收到图像块的码流后,也可以先基于码流判定图像块的高度是否大于或等于图像块的宽度,如果是,则进一步判定且索引指示的角度是否位于第一角度范围内,如果位于第一角度范围内,则将索引指示的角度的映射角度作为该角度模式的预测角度,如果不在第一角度范围,则将索引指示的角度作为预测角度,并利用预测角度对码流进行解码。在一些实施例中,如果图像块的高度小于图像块的宽度,则直接将索引指示的角度作为预测角度,然后利用预测角度对码流进行解码。
在一些实施例中,为了让编码端在进行帧内预测时可以更加灵活,选择更加多样化。帧内预测模式可以包括映射模式和非映射模式,在帧内预测模式为非映射模式的情况下,不对AV1标准中的原有的预测角度进行映射,均采用原有的预测角度。帧内预测模式中的每个角度模式对应的预测角度均为每个角度模式的索引指示的角度。在帧内预测模式为映射模式的情况下,则对AV1标准中原有的部分预测角度模式进行映射处理,帧内预测模式中的部 分角度模式对应的预测角度为索引指示的角度的映射角度。
因而,在一些实施例中,编码端在对图像块进行编码后,码流中还应包括用于指示帧内预测模式是否为映射模式的指示信息,以便解码端可以基于该指示信息确定角度模式的预测角度。
相应的,解码端在接收到图像块的码流后,可以先从码流中获取用于指示帧内预测模式是否为映射模式的指示信息,在基于码流中的指示信息判定帧内预测模式为映射模式的情况下,将索引指示的角度的映射角度作为角度模式对应的预测角度,如果判定帧内预测模式为非映射模式,则将索引指示的角度作为角度模式对应的预测角度,然后利用预测角度对码流进行解码。
AV1标准中包括8个主角度,每个主角度又扩展了6个扩展角度,一共有56个角度模式,这56个角度模式中每个角度模式都有一个索引,用于标识该角度模式。因而,在一些实施例中,角度模式的索引指示的角度可以是主角度,也可以扩展角度,当角度模式的索引指示的是扩展角度时,该索引可以采用扩展角度对应的主角度索引,以及扩展角度与主角度的相对偏移量表示。比如,8个主角度模式的索引可以用0-7表示,而扩展角度模式的索引可以用主角度索引,以及扩展角度相对于主角度的偏移量表示。举个例子,36°为主角度45°的扩展角度,因而,其索引可以用45°的索引0,以及相对角度偏移量-9°表示。
相应的,解码端在接收到图像块的码流后,可以从码流中获取主角度的索引和相对角度偏移量,基于两者确定扩展角度的索引,并基于扩展角度的索引确定预测角度,以用于解码。
进一步的,本申请实施例还提供一种编码装置,如图9所示,所述编码装置90包括处理器91、存储器92、存储于所述存储器92可供所述处理器91执行的计算机程序,所述处理器91执行所述计算机程序时,实现以下步骤:
获取待编码的图像块;
在确定所述图像块的预测模式为帧内预测模式中的角度模式的情况下,基于所述角度模式对所述图像块以及所述角度模式的索引进行编码处理,得 到所述图像块的码流;
其中,当所述索引指示的角度位于第一角度范围内的情况下,所述角度模式对应的预测角度为所述索引指示的角度的映射角度,所述映射角度位于第二角度范围内,所述第一角度范围内的角度小于所述第二角度范围内的角度。
在一些实施例中,当所述索引指示的角度位于第一角度范围外的情况下,所述角度模式对应的预测角度为所述索引指示的角度。
在一些实施例中,在所述图像块的高度大于或等于所述图像块的宽度,且所述索引指示的角度位于第一角度范围内的情况下,所述角度模式对应的预测角度为所述索引指示的角度的映射角度。
在一些实施例中,在所述图像块的高度小于所述图像块的宽度的情况下,所述角度模式对应的预测角度为所述索引指示的角度。
在一些实施例中,所述帧内预测模式包括映射模式和非映射模式,
在帧内预测模式为非映射模式的情况下,所述帧内预测模式中的每个角度模式对应的预测角度均为所述每个角度模式的索引指示的角度;
在帧内预测模式为映射模式的情况下,所述帧内预测模式中的部分角度模式对应的预测角度为所述部分角度模式的索引指示的角度的映射角度。
在一些实施例中,所述码流中还包括用于指示所述帧内预测模式是否为所述映射模式的指示信息。
在一些实施例中,所述角度模式的索引指示的角度包括:主角度,或主角度的扩展角度。
在一些实施例中,所述第一角度范围包括小于目标主角度的范围,所述映射角度基于以下方式确定:
根据所述目标主角度进行扩展处理,得到所述目标主角度的扩展角度;
对所述扩展角度进行映射处理,得到所述映射角度。
在一些实施例中,所述第一角度范围包括小于目标主角度的范围,所述映射角度基于以下方式确定:
对所述目标主角度进行映射处理,得到所述目标主角度的映射角度;
对所述目标主角度的映射角度进行扩展处理,得到所述映射角度。
在一些实施例中,所述索引指示的角度为扩展角度,所述索引通过所述主角度模式的索引,以及所述扩展角度与所述主角度的相对偏移量表示。
在一些实施例中,所述第一角度范围为36°~45°,所述第二角度范围为212°~225°。
在一些实施例中,所述第二角度范围内的角度指向所述图像块的左下方,所述第一角度范围内的角度指向所述图像块的右上方。
相应地,本申请实施例还提供一种解码装置,如图10所示,所述解码装置100包括处理器101、存储器·102、存储于所述存储器102可供所述处理器101执行的计算机程序,所述处理器101执行所述计算机程序时,实现以下步骤:
获取待解码的图像块的码流;
在基于所述码流确定所述图像块预测模式为帧内预测模式中的角度模式,且所述角度模式的索引指示的角度位于第一角度范围的情况下,将所述索引指示的角度的映射角度作为所述角度模式对应的预测角度,其中,所述映射角度位于第二角度范围,所述第一角度范围内的角度小于所述第二角度范围内的角度;
基于所述预测角度对所述码流进行解码处理。
在一些实施例中,所述处理器用于在基于所述码流确定所述图像块预测模式为帧内预测模式中的角度模式,且所述角度模式的索引指示的角度不在第一角度范围内的情况下,将所述索引指示的角度作为所述角度模式对应的预测角度。
在一些实施例中,所述处理器用于将所述索引指示的角度的映射角度作为所述角度模式对应的预测角度时,具体用于:
在判定所述图像块的高度大于或等于所述图像块的宽度的情况下,将所述索引指示的角度的映射角度作为所述角度模式对应的预测角度。
在一些实施例中,所述处理器用于在判定所述图像块的高度小于所述图像块的宽度的情况下,将所述索引指示的角度作为所述角度模式对应的预测角度。
在一些实施例中,所述帧内预测模式包括映射模式和非映射模式,
在帧内预测模式为非映射模式的情况下,所述帧内预测模式中的每个角度模式对应的预测角度均为所述每个角度模式的索引指示的角度;
在帧内预测模式为映射模式的情况下,所述帧内预测模式中的部分角度模式对应的预测角度为所述部分角度模式的索引指示的角度的映射角度。
在一些实施例中,所述码流中还包括用于指示所述帧内预测模式是否为所述映射模式的指示信息;
所述处理器用于将所述索引指示的角度的映射角度作为所述角度模式对应的预测角度时,具体用于:
在基于所述指示信息判定所述帧内预测模式为所述映射模式的情况下,将所述索引指示的角度的映射角度作为所述角度模式对应的预测角度。
在一些实施例中,所述角度模式的索引指示的角度包括:主角度,或主角度的扩展角度。
在一些实施例中,在所述索引指示的角度为扩展角度的情况下,所述索引通过所述扩展角度的主角度的索引,以及所述扩展角度与所述主角度的相对偏移量表示。
在一些实施例中,所述第一角度范围包括小于目标主角度的角度范围,所述映射角度基于以下方式确定:
对所述目标主角度进行扩展处理,得到所述目标主角度的扩展角度;
对所述扩展角度进行映射处理,得到所述映射角度。
在一些实施例中,所述第一角度范围包括小于目标主角度的角度范围,所述映射角度基于以下方式确定:
对所述目标主角度进行映射处理,得到所述目标主角度的映射角度;
对所述目标主角度的映射角度进行扩展处理,得到所述映射角度。
在一些实施例中,所述第一角度范围为36°~45°,所述第二角度范围为212°~225°。
在一些实施例中,所述第一角度范围内的角度指向所述图像块的右上方,所述第二角度范围内的角度指向所述图像块的左下方。
相应地,本说明书实施例还提供一种计算机存储介质,所述存储介质中存储有程序,所述程序被处理器执行时实现上述任一实施例中的编码方法和解码方法。
本说明书实施例可采用在一个或多个其中包含有程序代码的存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。计算机可用存储介质包括永久性和非永久性、可移动和非可移动媒体,可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括但不限于:相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。
对于装置实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者 暗示这些实体或操作之间存在任何这种实际的关系或者顺序。术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
以上对本发明实施例所提供的方法和装置进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。

Claims (49)

  1. 一种解码方法,其特征在于,所述方法包括:
    获取待解码的图像块的码流;
    在基于所述码流确定所述图像块的预测模式为帧内预测模式中的角度模式,且所述角度模式的索引指示的角度位于第一角度范围的情况下,将所述索引指示的角度的映射角度作为所述角度模式对应的预测角度,其中,所述映射角度位于第二角度范围,所述第一角度范围内的角度指向所述图像块的右上方,所述第二角度范围内的角度指向所述图像块的左下方;
    基于所述预测角度对所述图像块进行解码处理。
  2. 根据权利要求1所述的方法,其特征在于,在基于所述码流确定所述图像块的预测模式为帧内预测模式中的角度模式,且所述角度模式的索引指示的角度不在第一角度范围内的情况下,将所述索引指示的角度作为所述角度模式对应的预测角度。
  3. 根据权利要求1或2任一项所述的方法,其特征在于,将所述索引指示的角度的映射角度作为所述角度模式对应的预测角度,包括:
    在判定所述图像块的高度大于或等于所述图像块的宽度的情况下,将所述索引指示的角度的映射角度作为所述角度模式对应的预测角度。
  4. 根据权利要求3所述的方法,其特征在于,在判定所述图像块的高度小于所述图像块的宽度的情况下,将所述索引指示的角度作为所述角度模式对应的预测角度。
  5. 根据权利要求1所述的方法,其特征在于,所述帧内预测模式包括映射模式和非映射模式,
    在帧内预测模式为非映射模式的情况下,所述帧内预测模式中的每个角度模式对应的预测角度均为所述每个角度模式的索引指示的角度;
    在帧内预测模式为映射模式的情况下,所述帧内预测模式中的部分角度模式对应的预测角度为所述部分角度模式的索引指示的角度的映射角度。
  6. 根据权利要求5所述的方法,其特征在于,所述码流中还包括用于指 示所述帧内预测模式是否为所述映射模式的指示信息;
    将所述索引指示的角度的映射角度作为所述角度模式对应的预测角度,包括:
    在基于所述指示信息判定所述帧内预测模式为所述映射模式的情况下,将所述索引指示的角度的映射角度作为所述角度模式对应的预测角度。
  7. 根据权利要求1-6任一项所述的方法,其特征在于,所述角度模式的索引指示的角度包括:主角度,或主角度的扩展角度。
  8. 根据权利要求7所述的方法,其特征在于,在所述索引指示的角度为扩展角度的情况下,所述索引通过所述扩展角度的主角度的索引,以及所述扩展角度与所述主角度的相对偏移量表示。
  9. 根据权利要求1-8任一项所述的方法,其特征在于,所述第一角度范围包括小于目标主角度的角度范围,所述映射角度基于以下方式确定:
    对所述目标主角度进行扩展处理,得到所述目标主角度的扩展角度;
    对所述扩展角度进行映射处理,得到所述映射角度。
  10. 根据权利要求1-8任一项所述的方法,其特征在于,所述第一角度范围包括小于目标主角度的角度范围,所述映射角度基于以下方式确定:
    对所述目标主角度进行映射处理,得到所述目标主角度的映射角度;
    对所述目标主角度的映射角度进行扩展处理,得到所述映射角度。
  11. 根据权利要求1-10任一项所述的方法,其特征在于,所述第一角度范围为36°~45°,所述第二角度范围为212°~225°。
  12. 一种解码方法,其特征在于,所述方法包括:
    获取待解码的图像块的码流;
    在基于所述码流确定所述图像块的帧内预测模式为角度模式,且所述角度模式的索引指示的角度位于第一角度范围的情况下,将所述索引指示的角度的映射角度作为所述角度模式对应的预测角度,其中,所述映射角度位于第二角度范围,所述第二角度范围内的角度大于所述第一角度范围内的角度;
    基于所述预测角度对所述图像块进行解码处理。
  13. 一种编码方法,其特征在于,所述方法包括:
    获取待编码的图像块;
    在确定所述图像块的预测模式为帧内预测模式中的角度模式的情况下,基于所述角度模式对所述图像块以及所述角度模式的索引进行编码处理,得到所述图像块的码流;
    其中,当所述索引指示的角度位于第一角度范围内的情况下,所述角度模式对应的预测角度为所述索引指示的角度的映射角度,所述映射角度位于第二角度范围内,所述第一角度范围内的角度指向所述图像块的右上方,所述第二角度范围内的角度指向所述图像块的左下方。
  14. 根据权利要求13所述的方法,其特征在于,当所述索引指示的角度位于第一角度范围外的情况下,所述角度模式对应的预测角度为所述索引指示的角度。
  15. 根据权利要求13所述的方法,其特征在于,在所述图像块的高度大于或等于所述图像块的宽度,且所述索引指示的角度位于第一角度范围内的情况下,所述角度模式对应的预测角度为所述索引指示的角度的映射角度。
  16. 根据权利要求13所述的方法,其特征在于,在所述图像块的高度小于所述图像块的宽度的情况下,所述角度模式对应的预测角度为所述索引指示的角度。
  17. 根据权利要求13所述的方法,其特征在于,所述帧内预测模式包括映射模式和非映射模式,
    在帧内预测模式为非映射模式的情况下,所述帧内预测模式中的每个角度模式对应的预测角度均为所述每个角度模式的索引指示的角度;
    在帧内预测模式为映射模式的情况下,所述帧内预测模式中的部分角度模式对应的预测角度为所述部分角度模式的索引指示的角度的映射角度。
  18. 根据权利要求17所述的方法,其特征在于,所述码流中还包括用于指示所述帧内预测模式是否为所述映射模式的指示信息。
  19. 根据权利要求13-18任一项所述的方法,其特征在于,所述角度模式 的索引指示的角度包括:主角度,或主角度的扩展角度。
  20. 根据权利要求13-18任一项所述的方法,其特征在于,所述第一角度范围包括小于目标主角度的角度范围,所述映射角度基于以下方式确定:
    根据所述目标主角度进行扩展处理,得到所述目标主角度的扩展角度;
    对所述扩展角度进行映射处理,得到所述映射角度。
  21. 根据权利要求13-18任一项所述的方法,其特征在于,所述第一角度范围包括小于目标主角度的角度范围,所述映射角度基于以下方式确定:
    对所述目标主角度进行映射处理,得到所述目标主角度的映射角度;
    对所述目标主角度的映射角度进行扩展处理,得到所述映射角度。
  22. 根据权利要求13-18任一项所述的方法,其特征在于,在所述索引指示的角度为扩展角度的情况下,所述索引通过所述扩展角度的主角度的索引,以及所述扩展角度与所述主角度的相对偏移量表示。
  23. 根据权利要求13-22任一项所述的方法,其特征在于,所述第一角度范围为36°~45°,所述第二角度范围为212°~225°。
  24. 一种编码方法,其特征在于,所述方法包括:
    获取待编码的图像块;
    在确定所述图像块的预测模式为帧内预测模式中的角度模式的情况下,基于所述角度模式对所述图像块以及所述角度模式的索引进行编码处理,得到所述图像块的码流;
    其中,当所述索引指示的角度位于第一角度范围内的情况下,所述角度模式对应的预测角度为所述索引指示的角度的映射角度,所述映射角度位于第二角度范围内,所述第二角度范围内的角度大于所述第一角度范围内的角度。
  25. 一种解码装置,其特征在于,所述解码装置包括处理器、存储器、存储于所述存储器可供所述处理器执行的计算机程序,所述处理器器执行所述计算机程序时,实现以下步骤:
    获取待解码的图像块的码流;
    在基于所述码流确定所述图像块预测模式为帧内预测模式中的角度模式,且所述角度模式的索引指示的角度位于第一角度范围的情况下,将所述索引指示的角度的映射角度作为所述角度模式对应的预测角度,其中,所述映射角度位于第二角度范围,所述第一角度范围内的角度指向所述图像块的右上方,所述第二角度范围内的角度指向所述图像块的左下方;
    基于所述预测角度对所述图像块进行解码处理。
  26. 根据权利要求25所述的装置,其特征在于,所述处理器用于在基于所述码流确定所述图像块预测模式为帧内预测模式中的角度模式,且所述角度模式的索引指示的角度不在第一角度范围内的情况下,将所述索引指示的角度作为所述角度模式对应的预测角度。
  27. 根据权利要求25或26所述的装置,其特征在于,所述处理器用于将所述索引指示的角度的映射角度作为所述角度模式对应的预测角度时,具体用于:
    在判定所述图像块的高度大于或等于所述图像块的宽度的情况下,将所述索引指示的角度的映射角度作为所述角度模式对应的预测角度。
  28. 根据权利要求27所述的装置,其特征在于,所述处理器用于在判定所述图像块的高度小于所述图像块的宽度的情况下,将所述索引指示的角度作为所述角度模式对应的预测角度。
  29. 根据权利要求25所述的装置,其特征在于,所述帧内预测模式包括映射模式和非映射模式,
    在帧内预测模式为非映射模式的情况下,所述帧内预测模式中的每个角度模式对应的预测角度均为所述每个角度模式的索引指示的角度;
    在帧内预测模式为映射模式的情况下,所述帧内预测模式中的部分角度模式对应的预测角度为所述部分角度模式的索引指示的角度的映射角度。
  30. 根据权利要求29所述的装置,其特征在于,所述码流中还包括用于指示所述帧内预测模式是否为所述映射模式的指示信息;
    所述处理器用于将所述索引指示的角度的映射角度作为所述角度模式对 应的预测角度时,具体用于:
    在基于所述指示信息判定所述帧内预测模式为所述映射模式的情况下,将所述索引指示的角度的映射角度作为所述角度模式对应的预测角度。
  31. 根据权利要求25-30任一项所述的装置,其特征在于,所述角度模式的索引指示的角度包括:主角度,或主角度的扩展角度。
  32. 根据权利要求31所述的装置,其特征在于,在所述索引指示的角度为扩展角度的情况下,所述索引通过所述扩展角度的主角度的索引,以及所述扩展角度与所述主角度的相对偏移量表示。
  33. 根据权利要求25-32任一项所述的装置,其特征在于,所述第一角度范围包括小于目标主角度的角度范围,所述映射角度基于以下方式确定:
    对所述目标主角度进行扩展处理,得到所述目标主角度的扩展角度;
    对所述扩展角度进行映射处理,得到所述映射角度。
  34. 根据权利要求25-32任一项所述的装置,其特征在于,所述第一角度范围包括小于目标主角度的角度范围,所述映射角度基于以下方式确定:
    对所述目标主角度进行映射处理,得到所述目标主角度的映射角度;
    对所述目标主角度的映射角度进行扩展处理,得到所述映射角度。
  35. 根据权利要求25-34任一项所述的装置,其特征在于,所述第一角度范围为36°~45°,所述第二角度范围为212°~225°。
  36. 一种解码装置,其特征在于,所述处理器包括处理器、存储器、存储于所述存储器可供所述处理器执行的计算机程序,所述处理器执行所述计算机程序时,实现以下步骤:
    获取待解码的图像块的码流;
    在基于所述码流确定所述图像块的预测模式为帧内预测模式中的角度模式,且所述角度模式的索引指示的角度位于第一角度范围的情况下,将所述索引指示的角度的映射角度作为所述角度模式对应的预测角度,其中,所述映射角度位于第二角度范围,所述第二角度范围内的角度大于所述第一角度范围内的角度;
    基于所述预测角度对所述图像块进行解码处理。
  37. 一种编码装置,其特征在于,所述编码装置包括处理器、存储器、存储于所述存储器可供所述处理器执行的计算机程序,所述处理器执行所述计算机程序时,实现以下步骤:
    获取待编码的图像块;
    在确定所述图像块的预测模式为帧内预测模式中的角度模式的情况下,基于所述角度模式对所述图像块以及所述角度模式的索引进行编码处理,得到所述图像块的码流;
    其中,当所述索引指示的角度位于第一角度范围内的情况下,所述角度模式对应的预测角度为所述索引指示的角度的映射角度,所述映射角度位于第二角度范围内,所述第一角度范围内的角度指向所述图像块的右上方,所述第二角度范围内的角度指向所述图像块的左下方。
  38. 根据权利要求37所述的装置,其特征在于,当所述索引指示的角度位于第一角度范围外的情况下,所述角度模式对应的预测角度为所述索引指示的角度。
  39. 根据权利要求37所述的装置,其特征在于,在所述图像块的高度大于或等于所述图像块的宽度,且所述索引指示的角度位于第一角度范围内的情况下,所述角度模式对应的预测角度为所述索引指示的角度的映射角度。
  40. 根据权利要求37所述的装置,其特征在于,在所述图像块的高度小于所述图像块的宽度的情况下,所述角度模式对应的预测角度为所述索引指示的角度。
  41. 根据权利要求37所述的装置,其特征在于,所述帧内预测模式包括映射模式和非映射模式,
    在帧内预测模式为非映射模式的情况下,所述帧内预测模式中的每个角度模式对应的预测角度均为所述每个角度模式的索引指示的角度;
    在帧内预测模式为映射模式的情况下,所述帧内预测模式中的部分角度模式对应的预测角度为所述部分角度模式的索引指示的角度的映射角度。
  42. 根据权利要求41所述的装置,其特征在于,所述码流中还包括用于指示所述帧内预测模式是否为所述映射模式的指示信息。
  43. 根据权利要求37-42任一项所述的装置,其特征在于,所述角度模式的索引指示的角度包括:主角度,或主角度的扩展角度。
  44. 根据权利要求37-42任一项所述的装置,其特征在于,所述第一角度范围包括小于目标主角度的范围,所述映射角度基于以下方式确定:
    根据所述目标主角度进行扩展处理,得到所述目标主角度的扩展角度;
    对所述扩展角度进行映射处理,得到所述映射角度。
  45. 根据权利要求37-42任一项所述的装置,其特征在于,所述第一角度范围包括小于目标主角度的范围,所述映射角度基于以下方式确定:
    对所述目标主角度进行映射处理,得到所述目标主角度的映射角度;
    对所述目标主角度的映射角度进行扩展处理,得到所述映射角度。
  46. 根据权利要求37-42任一项所述的装置,其特征在于,所述索引指示的角度为扩展角度,所述索引通过所述主角度模式的索引,以及所述扩展角度与所述主角度的相对偏移量表示。
  47. 根据权利要求37-46任一项所述的装置,其特征在于,所述第一角度范围为36°~45°,所述第二角度范围为212°~225°。
  48. 一种编码装置,其特征在于,所述处理器包括处理器、存储器、存储于所述存储器可供所述处理器执行的计算机程序,所述处理器执行所述计算机程序时,实现以下步骤:
    获取待编码的图像块;
    在确定所述图像块的预测模式为帧内预测模式中的角度模式的情况下,基于所述角度模式对所述图像块以及所述角度模式的索引进行编码处理,得到所述图像块的码流;
    其中,当所述索引指示的角度位于第一角度范围内的情况下,所述角度模式对应的预测角度为所述索引指示的角度的映射角度,所述映射角度位于第二角度范围内,所述第二角度范围内的角度大于所述第一角度范围内的角 度。
  49. 一种机器可读存储介质,其特征在于,所述机器可读存储介质上存储有计算机指令,所述计算机指令被执行时进行如权利要求1至12任一项所述的编码方法或如权利要求13至24任一项所述的解码方法。
PCT/CN2021/119696 2021-09-22 2021-09-22 编解码方法及装置 WO2023044617A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202180101495.5A CN117882378A (zh) 2021-09-22 2021-09-22 编解码方法及装置
PCT/CN2021/119696 WO2023044617A1 (zh) 2021-09-22 2021-09-22 编解码方法及装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/119696 WO2023044617A1 (zh) 2021-09-22 2021-09-22 编解码方法及装置

Publications (1)

Publication Number Publication Date
WO2023044617A1 true WO2023044617A1 (zh) 2023-03-30

Family

ID=85719794

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/119696 WO2023044617A1 (zh) 2021-09-22 2021-09-22 编解码方法及装置

Country Status (2)

Country Link
CN (1) CN117882378A (zh)
WO (1) WO2023044617A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110140356A (zh) * 2017-01-03 2019-08-16 诺基亚技术有限公司 使用广角帧内预测的视频和图像编码
CN111989921A (zh) * 2018-07-02 2020-11-24 腾讯美国有限责任公司 用于视频编码的方法和装置
WO2020242183A1 (ko) * 2019-05-27 2020-12-03 엘지전자 주식회사 광각 인트라 예측 및 변환에 기반한 영상 코딩 방법 및 그 장치
CN112740676A (zh) * 2018-09-21 2021-04-30 交互数字Vc控股公司 帧内变换译码和广角帧内预测的协调
CN112930681A (zh) * 2018-08-24 2021-06-08 三星电子株式会社 编码方法和编码装置及解码方法和解码装置
WO2021158615A1 (en) * 2020-02-05 2021-08-12 Tencent America LLC Method and apparatus for interactions between decoder-side intra mode derivation and adaptive intra prediction modes

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110140356A (zh) * 2017-01-03 2019-08-16 诺基亚技术有限公司 使用广角帧内预测的视频和图像编码
CN111989921A (zh) * 2018-07-02 2020-11-24 腾讯美国有限责任公司 用于视频编码的方法和装置
CN112930681A (zh) * 2018-08-24 2021-06-08 三星电子株式会社 编码方法和编码装置及解码方法和解码装置
CN112740676A (zh) * 2018-09-21 2021-04-30 交互数字Vc控股公司 帧内变换译码和广角帧内预测的协调
WO2020242183A1 (ko) * 2019-05-27 2020-12-03 엘지전자 주식회사 광각 인트라 예측 및 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021158615A1 (en) * 2020-02-05 2021-08-12 Tencent America LLC Method and apparatus for interactions between decoder-side intra mode derivation and adaptive intra prediction modes

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
L. ZHAO (TENCENT), X. ZHAO (TENCENT), S. LIU (TENCENT), X. LI (TENCENT): "CE3-related: Unification of angular intra prediction for square and non-square blocks", 12. JVET MEETING; 20181003 - 20181012; MACAO; (THE JOINT VIDEO EXPLORATION TEAM OF ISO/IEC JTC1/SC29/WG11 AND ITU-T SG.16 ), no. JVET-L0279, 25 September 2018 (2018-09-25), XP030193815 *

Also Published As

Publication number Publication date
CN117882378A (zh) 2024-04-12

Similar Documents

Publication Publication Date Title
CN102550025B (zh) 用于对模式信息进行编码和解码的方法和设备
WO2020182166A1 (zh) 运动信息候选者列表构建方法及装置
US9106897B2 (en) Picture encoding and decoding method, picture encoding and decoding device and network system
WO2018072487A1 (zh) 全景视频感兴趣区域的描述方法和编码方法
WO2012097743A1 (zh) 图像编解码方法及编解码设备
WO2022121648A1 (zh) 点云数据编码方法、解码方法、设备、介质及程序产品
US20230396787A1 (en) Video compression method and apparatus, computer device, and storage medium
WO2012097746A1 (zh) 一种编解码方法和装置
WO2023230996A1 (zh) 编解码方法、编码器、解码器以及可读存储介质
CN111586410A (zh) 视频编码方法、解码方法及其相关装置
WO2021056433A1 (zh) 预测值的确定方法、解码器以及计算机存储介质
CN102377992B (zh) 运动矢量的预测值的获取方法和装置
WO2018040869A1 (zh) 一种帧间预测编码方法及装置
WO2023044617A1 (zh) 编解码方法及装置
WO2019184489A1 (zh) 图像块编码中的变换方法、解码中的反变换方法及装置
WO2022116246A1 (zh) 帧间预测方法、视频编解码方法、装置及介质
WO2021203924A1 (zh) 编码方法、解码方法、编码器、解码器以及存储介质
TWI738167B (zh) 圖像編碼及解碼技術
US20230351639A1 (en) Point cloud encoding and decoding method, encoder and decoder
BR112021013784A2 (pt) Rotação de patch efeciente em codificação de nuvem de pontos
WO2023044618A1 (zh) 编解码方法及装置
TW202139707A (zh) 幀間預測方法、編碼器、解碼器以及儲存媒介
TW202139704A (zh) 在4:4:4色度格式及單一樹狀結構情況下針對所有通道之基於矩陣的內部預測技術
CN101841701B (zh) 基于宏块对的编解码方法及装置
WO2024007144A1 (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: 21957759

Country of ref document: EP

Kind code of ref document: A1