CN117882378A - Encoding and decoding method and device - Google Patents

Encoding and decoding method and device Download PDF

Info

Publication number
CN117882378A
CN117882378A CN202180101495.5A CN202180101495A CN117882378A CN 117882378 A CN117882378 A CN 117882378A CN 202180101495 A CN202180101495 A CN 202180101495A CN 117882378 A CN117882378 A CN 117882378A
Authority
CN
China
Prior art keywords
angle
mode
mapping
index
image block
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202180101495.5A
Other languages
Chinese (zh)
Inventor
王江林
郭泽
郑萧桢
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SZ DJI Technology Co Ltd
Original Assignee
SZ DJI Technology Co Ltd
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 SZ DJI Technology Co Ltd filed Critical SZ DJI Technology Co Ltd
Publication of CN117882378A publication Critical patent/CN117882378A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/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

Landscapes

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

Abstract

A coding and decoding method and device. When the angle mode in intra prediction is constructed, the angle mode in the original AV1 standard is optimized, some original prediction angles in the angle mode of the AV1 standard can be mapped into other prediction angles, so that the distribution of the mapped prediction angles is more reasonable, the relevance between the reference pixels pointed by the mapped prediction angles and the image block is stronger, and the coding efficiency is improved.

Description

Encoding and decoding method and device Technical Field
The present invention relates to the field of coding and decoding technologies, and in particular, to a coding method and apparatus, and a decoding method and apparatus.
Background
AV1 is a video coding standard developed by the open media video alliance (Alliance of Open Media Video). When an image or video is encoded based on the AV1 standard, a series of processes such as image block division, prediction, transformation, quantization, entropy coding, loop filtering and the like are mainly performed on an input image to obtain a final code stream for storage or network transmission. Prediction is an important link in the coding process, and accurately predicting the image block is a key for improving coding efficiency. The existing angle mode of the AV1 standard is not reasonable enough in design, the utilization rate of the reference pixels is insufficient, and the coding efficiency is still to be improved.
Disclosure of Invention
In view of this, the present application provides an encoding method and apparatus, and a decoding method and apparatus.
According to a first aspect of the present application, there is provided a decoding method, the method comprising:
acquiring a code stream of an image block to be decoded;
when the prediction mode of the image block is determined to be an angle mode in an intra-frame prediction mode based on the code stream, and an angle indicated by an index of the angle mode is located in a first angle range, taking a mapping angle of the angle indicated by the index as a prediction angle corresponding to the angle mode, wherein the mapping angle is located in a second angle range, an angle in the first angle range points to the upper right of the image block, and an angle in the second angle range points to the lower left of the image block;
and decoding the code stream based on the prediction angle.
According to a second aspect of the present application, there is provided a decoding method comprising:
acquiring a code stream of an image block to be decoded;
when the prediction mode of the image block is determined to be an angle mode in an intra-frame prediction mode based on the code stream, and an angle indicated by an index of the angle mode is located in a first angle range, taking a mapping angle of the angle indicated by the index as a prediction angle corresponding to the angle mode, wherein the mapping angle is located in a second angle range, and an angle in the second angle range is larger than an angle in the first angle range;
And decoding the code stream based on the prediction angle.
According to a third aspect of the present application, there is provided a coding method, the method comprising:
acquiring an image block to be encoded;
under the condition that the prediction mode of the image block is determined to be an angle mode in an intra-frame prediction mode, encoding the image block and the index of the angle mode based on the angle mode to obtain a code stream of the image block;
when the angle indicated by the index is located in a first angle range, the predicted angle corresponding to the angle mode is a mapping angle of the angle indicated by the index, the mapping angle is located in a second angle range, the angle in the first angle range points to the upper right of the image block, and the angle in the second angle range points to the lower left of the image block.
According to a fourth aspect of the present application, there is provided a coding method, the method comprising:
acquiring an image block to be encoded;
under the condition that the prediction mode of the image block is determined to be an angle mode in an intra-frame prediction mode, encoding the image block and the index of the angle mode based on the angle mode to obtain a code stream of the image block;
When the angle indicated by the index is located in a first angle range, the predicted angle corresponding to the angle mode is a mapping angle of the angle indicated by the index, the mapping angle is located in a second angle range, and the angle in the second angle range is larger than the angle in the first angle range.
According to a fifth aspect of the present application, there is provided a decoding device comprising a processor, a memory, a computer program stored in the memory for execution by the processor, the processor implementing the following steps when executing the computer program:
acquiring a code stream of an image block to be decoded;
when the image block prediction mode is determined to be an angle mode in an intra prediction mode based on the code stream, and an angle indicated by an index of the angle mode is located in a first angle range, taking a mapping angle of the angle indicated by the index as a prediction angle corresponding to the angle mode, wherein the mapping angle is located in a second angle range, an angle in the first angle range points to the upper right of the image block, and an angle in the second angle range points to the lower left of the image block;
And decoding the code stream based on the prediction angle.
According to a sixth aspect of the present application, there is provided a decoding device, the processor comprising a processor, a memory, a computer program stored in the memory for execution by the processor, the processor implementing the following steps when executing the computer program:
acquiring a code stream of an image block to be decoded;
when the prediction mode of the image block is determined to be an angle mode in an intra-frame prediction mode based on the code stream, and an angle indicated by an index of the angle mode is located in a first angle range, taking a mapping angle of the angle indicated by the index as a prediction angle corresponding to the angle mode, wherein the mapping angle is located in a second angle range, and an angle in the second angle range is larger than an angle in the first angle range;
and decoding the code stream based on the prediction angle.
According to a seventh aspect of the present application, there is provided an encoding apparatus, the processor including a processor, a memory, a computer program stored in the memory for execution by the processor, the processor implementing the steps of:
Acquiring an image block to be encoded;
under the condition that the prediction mode of the image block is determined to be an angle mode in an intra-frame prediction mode, encoding the image block and the index of the angle mode based on the angle mode to obtain a code stream of the image block;
when the angle indicated by the index is located in a first angle range, the predicted angle corresponding to the angle mode is a mapping angle of the angle indicated by the index, the mapping angle is located in a second angle range, the angle in the first angle range points to the upper right of the image block, and the angle in the second angle range points to the lower left of the image block.
According to an eighth aspect of the present application, there is provided an encoding apparatus that acquires an image block to be encoded;
under the condition that the prediction mode of the image block is determined to be an angle mode in an intra-frame prediction mode, encoding the image block and the index of the angle mode based on the angle mode to obtain a code stream of the image block;
when the angle indicated by the index is located in a first angle range, the predicted angle corresponding to the angle mode is a mapping angle of the angle indicated by the index, the mapping angle is located in a second angle range, and the angle in the second angle range is larger than the angle in the first angle range.
By applying the scheme provided by the application, when the angle mode in intra-frame prediction is constructed, the angle mode in the original AV1 standard is optimized, some original prediction angles in the angle mode of the AV1 standard can be mapped into other prediction angles, so that the distribution of the mapped prediction angles is more reasonable, the relevance between the reference pixels pointed by the mapped prediction angles and the image block is stronger, and the coding efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort to a person skilled in the art.
Fig. 1 is a schematic diagram of 56 angle modes in the AV1 standard according to one embodiment of the present application.
Fig. 2 is a schematic diagram of reference pixels of an image block in the AV1 standard according to one embodiment of the present application.
FIG. 3 is a schematic diagram of determining predicted pixel values based on an angular pattern in accordance with one embodiment of the present application
Fig. 4 is a flow chart of a coding method according to an embodiment of the present application.
Fig. 5 (a) and 5 (b) are schematic diagrams of a division manner of image blocks 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 of one embodiment of the present application.
Fig. 7 is a schematic diagram of mapping prediction angles according to one embodiment of the present application.
Fig. 8 is a flow chart of a decoding method of an embodiment of the present application.
Fig. 9 is a schematic diagram of a logic structure of an encoding apparatus according to an embodiment of the present application.
Fig. 10 is a schematic diagram of a logic structure of a decoding apparatus according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
AV1 is a video coding standard developed by the open media video alliance (Alliance of Open Media Video), and when an image or video is coded using the AV1 standard, the method mainly comprises the following steps: firstly, carrying out block division on an image to be coded to obtain a plurality of image blocks. For the current image block to be coded, intra-frame prediction or inter-frame prediction can be performed on the image block by using the coded image block, the predicted pixel value of each pixel in the image block is determined, the actual pixel value of each pixel in the image block and the residual error of the predicted pixel value are determined, and the residual error is coded to obtain the code stream of the image block for storage or network transmission. Since the original pixel values of the image block do not need to be stored and transmitted, but only the residual is stored or transmitted, the amount of data can be greatly reduced.
The method comprises the steps of carrying out prediction on a current image block to be encoded based on the encoded image block, determining a predicted pixel value of the current image block to be encoded, wherein the prediction is an important link in the encoding process, and accurately predicting the image block to be encoded is a key for improving the encoding efficiency. In the AV1 coding standard, there are mainly two modes of predicting an image block to be coded, an intra prediction mode and an inter prediction mode. The inter prediction mode predicts an image block to be encoded by using other encoded frame images, and the intra prediction mode generates predicted pixel values of the image block to be encoded by using pixel values of the encoded image block on the left side and above the image block to be encoded by using video spatial correlation. Intra prediction modes in the AV1 standard include two major classes, angular mode and non-angular mode. Both the non-angular mode and the angular mode can be further subdivided into a plurality of modes.
The angle mode in the AV1 standard supports 56 angle modes from 36 degrees to 212 degrees, and can better predict the texture direction of the laminated image. Fig. 1 illustrates an angle pattern in the AV1 standard, in which a prediction direction indicated by 8 black arrows is defined as a main angle pattern, each of which is shifted to both sides by 3 degrees, 6 degrees, 9 degrees to obtain 6 expansion angle patterns (as gray arrows in fig. 1), and 48 expansion angle patterns in total. The direction indicated by the predicted angle corresponding to each angle mode is the predicted direction of the angle mode, and the predicted angle corresponding to each angle mode is shown in table 1.
Predicted angles corresponding to each angle mode of tables 1 and AV1
When a certain angle mode is selected for intra prediction, for each pixel in an image block to be encoded, when determining a predicted pixel value, determining the predicted pixel value of the pixel based on a reference pixel of the pixel in a direction pointed by a predicted angle corresponding to the angle mode. In the AV1 coding standard, intra prediction uses neighboring pixels of an image block as reference pixels. Taking a w×h image block as an example, reference pixels required for intra prediction are shown in fig. 2, and include left w+h pixels, upper w+h pixels, and upper left 1 pixel, and 2 (w+h) +1 reference pixels are required in total. If there are reference pixels not available, the last available reference pixel value is used for padding.
For example, as shown in fig. 3, assuming that a 4x4 image block in the figure is a current image block to be predicted, when intra-prediction is performed on the image block, pixels above and to the left of the image block are reference pixels thereof, and for a pixel a in the image block, if its predicted pixel value is determined according to a 45 ° angle mode, the reference pixel in the 45 ° direction of the pixel a is b, so the pixel value of the pixel b may be used as its predicted pixel value. Of course, if a pixel pointed to by the prediction direction of a certain angle pattern is out of the range of the reference pixel (for example, a pixel pointed to the pixel d or a pixel to the right of the pixel d), the last reference pixel (for example, the pixel c) is substituted as its predicted pixel value.
If the intra-frame prediction mode is adopted, the intra-frame prediction selects an optimal angle mode (namely, the angle mode with the minimum coding cost) from all the angle modes in a competition mode, competes with other intra-frame prediction modes to obtain a final intra-frame prediction mode, and is written into the code stream. If the angle mode is finally selected, an index of the angle mode is written into the code stream. In the AV1 standard, each angle mode corresponds to an index, which is used for uniquely identifying the angle mode, and since the predicted angles corresponding to each angle mode are different, the index of the angle mode is determined, i.e. the predicted angle corresponding to the angle mode can be known. The AV1 standard includes 8 main angles, each of which is extended by 6 extension angles, and there are 56 angle patterns, each of which has an index for identifying the angle pattern. For example, an index of 8 main angle modes may be represented by 0-7, and an index of an extension angle mode may be represented by a main angle index, and an offset of the extension angle with respect to the main angle.
As can be seen from fig. 1, 56 angle modes in the AV1 standard correspond to angle values ranging from 36 ° to 212 °, which has the following problems: the angle value corresponding to the angle mode has angle deletion from 213 degrees to 225 degrees, the left lower adjacent pixel is not fully utilized, the right upper adjacent pixel is used for prediction in excess, the coding efficiency is affected, especially for square image blocks and rectangular image blocks with width smaller than high, the correlation between the pixels of the image block to be coded and the left adjacent pixel is stronger, the current angle mode in the AV1 standard has partial angle deletion left lower, the loss of the coding efficiency is caused, and when the aspect ratio is larger, the correlation between the pixels of the current image block and the upper adjacent pixel is weaker, and at the moment, the prediction accuracy is reduced due to the fact that the upper adjacent pixel is used in excess. In addition, since the image block uses w+h adjacent pixels on the left and above as reference pixels, reference pixels of an extension angle smaller than 45 ° are often not enough, which affects prediction efficiency.
Based on this, the embodiment of the application provides a coding and decoding method, when the angle mode in intra-frame prediction is constructed, 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 into other prediction angles, so that the relevance between the reference pixels pointed by the mapped prediction angles and the image blocks is stronger, and the coding efficiency is improved. For example, the prediction angle at the upper right of the image block can be mapped into 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, the prediction angle at the lower left of the image block is increased, the adjacent pixels at the lower left can be more fully utilized, the coding efficiency is improved, especially for rectangular blocks with height larger than width, the correlation between the pixels of the rectangular blocks and the adjacent pixels at the left is stronger, the prediction is more accurate by utilizing the adjacent pixels at the lower left, the efficiency is higher, and the problem that the reference pixels at the upper left are not enough can be solved due to the reduction of the prediction angle at the upper right.
The encoding method provided by the embodiment of the application can be used for various encoding devices, the decoding method can be used for various decoding devices, and the encoding and decoding method can be suitable for encoding and decoding various images or videos.
The following describes an encoding method and a decoding method provided by the embodiments of the present application in connection with a processing flow of an encoding end and a decoding end.
The specific flow of the encoding method is shown in fig. 4, and specifically includes the following steps:
s402, acquiring an image block to be encoded;
s404, under the condition that the prediction mode of the image block is determined to be an angle mode in an intra-frame prediction mode, encoding the image block and the index of the angle mode based on the angle mode to obtain a code stream of the image block;
when the angle indicated by the index is located in a first angle range, the predicted angle corresponding to the angle mode is a mapping angle of the angle indicated by the index, the mapping angle is located in a second angle range, and the angle in the first angle range is smaller than the angle in the second angle range.
When encoding an image or video frame, the image or video frame to be encoded may be first divided to obtain a plurality of image blocks, where when dividing the image blocks, reference may be made to a method for dividing the image in the AV1 standard, for example, the image may be first divided into 128×128 image blocks, and then the square image blocks obtained by the division may be further divided, as shown in fig. 5 (a), and an image block division mode with the minimum encoding cost may be selected. In further dividing the image block, the image block may be further divided in 10 division manners given in fig. 5 (b). As can be seen from fig. 5 (b), the divided image may be a square image block or a rectangular image block.
After the image blocks are obtained by dividing, coding processing can be carried out for each image block, and after the image block to be coded currently is obtained, the prediction mode with the minimum coding cost can be screened out from a plurality of intra-frame prediction modes and used for carrying out intra-frame prediction on the image block. For example, the prediction pixel value of the image block may be predicted by each angle mode, the encoding cost may be determined, the optimal angle mode may be selected from the angle modes, and then the final prediction mode may be determined by competing with other non-angle modes.
In the case where it is determined that the prediction mode of the image block to be encoded is an angle mode in the intra 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, a predicted pixel value of the pixel may be determined with a pixel value of a reference pixel to which the prediction angle corresponding to the angle mode points. If the predicted angle is directed to exactly one reference pixel, the pixel value of the reference pixel is taken as the predicted pixel value, and if the predicted angle is directed to a plurality of reference pixels, the predicted pixel value is determined by combining the pixel values of the plurality of reference pixels. After determining the predicted pixel value for each pixel of the image block, a residual of the actual pixel value and the predicted pixel value for each pixel of the image block may be determined and then encoded. Meanwhile, 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 in encoding and restore the predicted pixel value by using the angle mode.
In view of unreasonable design of the original prediction angle in the AV1 standard, the adjacent pixels at the lower left of the image block cannot be fully utilized, and in the embodiment of the application, when the angle mode is constructed, the original prediction angle in the AV1 standard is optimized, that is, the original partial or all prediction angles are mapped into other prediction angles. For example, for some prediction angles of the AV1 standard, a mapping relationship may be preset, and mapped into other prediction angles, so that the distribution of the prediction angles is more reasonable. After mapping part of angles in the AV1 standard, in order to avoid a large change to the original standard, the reconstructed angle mode may still be represented by the original index, but the predicted angle indicated by the index changes, not the original predicted angle, but the predicted angle after mapping the original predicted angle.
In some embodiments, in order to compensate for the lack of the left lower angle in the original AV1 standard, the left lower reference pixel cannot be fully utilized, and the predicted angle in other directions in the original AV1 standard may be mapped to the left lower. For example, an angle range may be preset, hereinafter referred to as a first angle range, where a predicted angle in the first angle range is an angle to be mapped, and a specific mapping relationship may be set based on an actual situation, where a mapping angle after mapping an original predicted angle is located in a second angle range. Since the angle value of the prediction angle is larger toward the lower left of the image block, some prediction angles having smaller angle values may be mapped to mapping angles having larger angle values located at the lower left, i.e., angles in the second angle range are larger than those in the first angle range.
Of course, since the current AV1 standard has more prediction angles at the upper right side, for example, in the range of 36 ° -45 °, for square and rectangular blocks with a height greater than the width, the problem that the reference pixels at the upper right side are insufficient and the reference pixels at the lower left side are not fully utilized generally occurs, and the correlation between the adjacent pixels at the upper right side and the image block is weaker than the correlation between the adjacent pixels at the lower left side and the image block. Therefore, the number of upper right prediction angles can be reduced, and the number of lower left prediction angles can be increased, i.e., a part of the upper right prediction angles of the image block can be mapped to the lower left of the image block. Therefore, in some embodiments, the angle in the first range of angles points to the upper right of the image block and the angle in the second range of angles points to the lower left of the image block. It should be noted that, as shown in fig. 6, the upper right refers to an angle range pointing to the upper right of the image block, for example, an angle range that is determined by centering on an angle of 45 °, and the lower left refers to an angle range pointing to the lower left of the image block, for example, an angle range that is determined by centering on an angle of 225 °, such as the area range outlined by the dotted line in fig. 6, and does not refer to an angle only.
In some embodiments, the first angular range may be 36 ° to 45 °, and the second angular range may be 212 ° to 225 °. For example, expansion angles less than 45 ° in the AV1 standard may be mapped to between 212 ° and 225 °.
Of course, when mapping the original predicted angles in the AV1 standard, the number of predicted angles to be mapped, which angles the predicted angles to be mapped are, and which angles the predicted angles after mapping are may be determined based on actual requirements. In some embodiments, the expansion angle smaller than the target main angle in the AV1 standard may be mapped to an angle at the lower left of the image block, that is, the first angle range may be an angle range smaller than the target main angle in the AV1 standard, when the mapping angle is determined to be mapped to the original predicted angle, the expansion process may be performed on the target main angle to obtain the expansion angle of the target main angle, and then the mapping process may be performed on the expansion angle to obtain the mapping angle of the expansion angle.
In some embodiments, when determining to map the original predicted angle to obtain the mapped angle, the mapping process may be performed on the target main angle to obtain the mapped angle of the target main angle, and then the mapping angle of the target main angle is subjected to the expansion process to obtain the mapped angle.
For example, the angle pattern in the AV1 standard defines 8 main angles, and the corresponding angle values are 45 °,67 °,90 °,113 °,135 °,157 °,180 °,203 °, respectively, as indicated by black arrows in fig. 1.
Step 1, constructing an expansion angle mode according to the angle value of the main angle mode:
the main angle mode is set as normal_angle [ m ], the angles of + -delta_angle [0], + -delta_angle [1], + -delta_angle [2] are shifted based on the main angle, corresponding angle values of the expansion angle are calculated, namely, the expanded angle is calculated by using the values of + -delta_angle [ m ] [ n ],0< delta_angle [0] (3 °) < delta_angle [1] (6 °) < delta_angle [2] (9 °) < 11. The specific formula is as follows:
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]
where m=0, 1, … 8, n=0, 1, ….
Step 2. Spread Angle mapping of less than 45 degrees
After the expansion angle value is calculated according to the step 1, mapping is performed on the expansion angle smaller than 45 degrees as shown in fig. 7, and the expansion angle smaller than 45 degrees (such as an angle in a first angle range in the figure) is mapped into an expansion angle with an angle value ranging from 212 degrees to 225 degrees (such as an angle in a second angle range in the figure), wherein the specific formula is as follows:
If derived_angle[m][n]<45
derived_angle[m][n]=225-delta_angle[|n-3|]
of course, in some embodiments, the main angle may be 45 ° to 225 ° and then the 225 ° may be expanded to obtain an angle in the range of 212 ° -225 °.
Correspondingly, after the decoding end receives the code stream encoded by the encoding mode, the processing flow of the decoding end is shown in fig. 8, and the method comprises the following steps:
s802, acquiring a code stream of an image block to be decoded;
s804, when the intra-frame prediction mode of the image block is determined to be an angle mode based on the code stream, and an angle indicated by an index of the angle mode is located in a first angle range, taking a mapping angle of the angle indicated by the index as a prediction angle corresponding to the angle mode, wherein the mapping angle is located in a second angle range, and the angle in the first angle range is smaller than the angle in the second angle range;
s806, decoding the image block based on the prediction angle.
Firstly, a code stream of an image block to be decoded can be obtained, wherein the code stream comprises indication information of a prediction mode of the image block, so that the prediction mode of the image block can be determined based on the code stream, and if the prediction mode is an angle mode and an angle indicated by an index of the angle mode is located in a first angle range, a mapping angle of the angle indicated by the index is taken as a prediction angle corresponding to the angle mode, wherein the mapping angle is located in a second angle range. The image block may then be subjected to a decoding process according to the prediction angle, e.g., a reference pixel of the image block is determined from the reconstructed neighboring pixels based on the prediction angle, a predicted pixel value of the image block is determined based on the pixel value of the reference pixel, and the pixel value of the image block is determined based on the residual and the predicted pixel value in the code stream, thereby decoding the image block.
In some embodiments, the angles in the first range of angles are less than the angles in the second range of angles. In some embodiments, the angle in the first range of angles points to the upper right of the image block and the angle in the second range of angles points to the lower left of the image block.
Since only the predicted angles of a part of the angle modes in the AV1 standard are mapped, the predicted angles of the rest of the angle modes are unchanged, and therefore, the angle indicated by the index of the part of angle modes is the predicted angle of the angle mode. Therefore, in some embodiments, if the angle indicated by the index of the angle pattern is outside the first angle range, the predicted angle corresponding to the angle pattern is the angle indicated by the index.
Correspondingly, after receiving the code stream, the decoding end can take the angle indicated by the index as the prediction angle of the angle mode if the index of the angle mode adopted by the intra-frame prediction based on the code stream is judged to be outside the first angle range, and then decode the code stream of the image block by utilizing the prediction angle.
Since there are various dividing modes when dividing the image blocks, the finally obtained image block to be encoded may be a square image block, a rectangular image block with a width larger than a height, or a rectangular image block with a height larger than a width, and the distribution of the prediction angles in the current AV1 standard may cause the angle deletion at the lower left and fail to fully utilize the pixels at the lower left, so that the mapping processing of the prediction angles is required. And for rectangular image blocks with larger width than high, the correlation between the rectangular image blocks and adjacent pixels at the upper right is stronger, so that the mapping processing of the current prediction angle is not needed. Therefore, in some embodiments, when the encoding end encodes the image block to be encoded, the encoding end may perform differential processing, and, for the case that the height of the image block is greater than or equal to the width of the image block, intra-frame prediction is performed by using the prediction angle in the original AV1 standard, where the prediction angles corresponding to the angle modes are all the angles indicated by the indexes. In some embodiments, for the case where the height of the image block is smaller than the width of the image block, one or more prediction angles in the original AV1 standard that lie in the first angle range are mapped to prediction angles in the second angle range. Therefore, when the angle indicated by the index is located in 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.
Correspondingly, after receiving the code stream of the image block, the decoding end can also judge whether the height of the image block is larger than or equal to the width of the image block based on the code stream, if so, further judge whether the angle indicated by the index is positioned in a first angle range, if so, take the mapping angle of the angle indicated by the index as the prediction angle of the angle mode, and if not, take the angle indicated by the index as the prediction angle, and decode the code stream by utilizing the prediction angle. In some embodiments, if the height of the image block is less than the width of the image block, the angle indicated by the index is directly taken as the prediction angle, and then the code stream is decoded using the prediction angle.
In some embodiments, in order to make the encoding end more flexible in intra prediction, the selection is more diversified. The intra prediction mode may include a mapping mode and a non-mapping mode, and when the intra prediction mode is the 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 modes is the angle indicated by the index of each angle mode. When the intra-frame prediction mode is a mapping mode, mapping processing is performed on the partial prediction angle modes which are original in the AV1 standard, and the prediction angle corresponding to the partial angle mode in the intra-frame prediction mode is the mapping angle of the angle indicated by the index.
Thus, in some embodiments, after encoding the image block, the encoding end should further include indication information for indicating whether the intra prediction mode is a mapping mode in the code stream, so that the decoding end can determine a prediction angle of the angle mode based on the indication information.
Accordingly, after receiving the code stream of the image block, the decoding end may first obtain, from the code stream, indication information for indicating whether the intra-frame prediction mode is a mapping mode, and when it is determined that the intra-frame prediction mode is the mapping mode based on the indication information in the code stream, take the mapping angle of the angle indicated by the index as the prediction angle corresponding to the angle mode, and if it is determined that the intra-frame prediction mode is the non-mapping mode, take the angle indicated by the index as the prediction angle corresponding to the angle mode, and then decode the code stream by using the prediction angle.
The AV1 standard includes 8 main angles, each of which is further extended by 6 extension angles, and there are 56 angle patterns, and each of the 56 angle patterns has an index for identifying the angle pattern. Thus, in some embodiments, the index of the angle mode may indicate an angle that is a main angle or an expanded angle, and when the index of the angle mode indicates an expanded angle, the index may be represented by a main angle index corresponding to the expanded angle and a relative offset of the expanded angle from the main angle. For example, an index of 8 main angle modes may be represented by 0-7, and an index of an extension angle mode may be represented by a main angle index, and an offset of the extension angle with respect to the main angle. For example, 36 is an extension of the main angle of 45, and thus its index may be represented by index 0 of 45, and a relative angular offset of-9.
Correspondingly, after receiving the code stream of the image block, the decoding end can acquire the index of the main angle and the relative angle offset from the code stream, determine the index of the expansion angle based on the index of the main angle and the relative angle offset, and determine the prediction angle based on the index of the expansion angle for decoding.
Further, as shown in fig. 9, the encoding apparatus 90 includes a processor 91, a memory 92, and a computer program stored in the memory 92 and executable by the processor 91, where the processor 91 executes the computer program to implement the following steps:
acquiring an image block to be encoded;
under the condition that the prediction mode of the image block is determined to be an angle mode in an intra-frame prediction mode, encoding the image block and the index of the angle mode based on the angle mode to obtain a code stream of the image block;
when the angle indicated by the index is located in a first angle range, the predicted angle corresponding to the angle mode is a mapping angle of the angle indicated by the index, the mapping angle is located in a second angle range, and the angle in the first angle range is smaller than the angle in the second angle range.
In some embodiments, when the angle indicated by the index is located outside the first angle range, the predicted angle corresponding to the angle mode is the angle indicated by the index.
In some embodiments, when the height of the image block is greater than or equal to the width of the image block, and the angle indicated by the index is within the first angle range, the prediction angle corresponding to the angle mode is a mapping angle of the angle indicated by the index.
In some embodiments, in a case where the height of the image block is smaller than the width of the image block, the prediction angle corresponding to the angle mode is the angle indicated by the index.
In some embodiments, the intra-prediction modes include a mapped mode and a non-mapped mode,
under the condition that an intra-frame prediction mode is a non-mapping mode, a prediction angle corresponding to each angle mode in the intra-frame prediction mode is an angle indicated by an index of each angle mode;
when the intra-prediction mode is a mapping mode, a prediction angle corresponding to a partial angle mode in the intra-prediction mode is a mapping angle of an angle indicated by an index of the partial angle mode.
In some embodiments, the code stream further includes indication information for indicating whether the intra prediction mode is the mapping mode.
In some embodiments, the index of the angle pattern indicates an angle comprising: a main angle, or an extension of the main angle.
In some embodiments, the first range of angles includes a range less than a target main angle, the mapping angle being determined based on:
performing expansion processing according to the target main angle to obtain an expansion angle of the target main angle;
and mapping the expansion angle to obtain the mapping angle.
In some embodiments, the first range of angles includes a range less than a target main angle, the mapping angle being determined based on:
mapping the target main angle to obtain a mapping angle of the target main angle;
and performing expansion processing on the mapping angle of the target main angle to obtain the mapping angle.
In some embodiments, the index indicates an angle that is an extension angle, the index being represented by an index of the primary angle pattern, and a relative offset of the extension angle from the primary angle.
In some embodiments, the first angle range is 36 ° to 45 ° and the second angle range is 212 ° to 225 °.
In some embodiments, the angle in the second range of angles points to the lower left of the image block and the angle in the first range of angles points to the upper right of the image block.
Accordingly, the embodiment of the present application further provides a decoding device, as shown in fig. 10, where the decoding device 100 includes a processor 101, a memory 102, and a computer program stored in the memory 102 and executable by the processor 101, and when the processor 101 executes the computer program, the following steps are implemented:
acquiring a code stream of an image block to be decoded;
when the image block prediction mode is determined to be an angle mode in an intra prediction mode based on the code stream, and an angle indicated by an index of the angle mode is located in a first angle range, taking a mapping angle of the angle indicated by the index as a prediction angle corresponding to the angle mode, wherein the mapping angle is located in a second angle range, and an angle in the first angle range is smaller than an angle in the second angle range;
and decoding the code stream based on the prediction angle.
In some embodiments, the processor is configured to, when it is determined that the image block prediction mode is an angle mode in an intra prediction mode based on the bitstream, and an angle indicated by an index of the angle mode is not within a first angle range, take the angle indicated by the index as a prediction angle corresponding to the angle mode.
In some embodiments, when the processor is configured to take the mapping angle of the angle indicated by the index as the predicted angle corresponding to the angle mode, the processor is specifically configured to:
and when the height of the image block is larger than or equal to the width of the image block, taking the mapping angle of the angle indicated by the index as the prediction angle corresponding to the angle mode.
In some embodiments, the processor is configured to, when it is determined that the height of the image block is smaller than the width of the image block, take the angle indicated by the index as the prediction angle corresponding to the angle mode.
In some embodiments, the intra-prediction modes include a mapped mode and a non-mapped mode,
under the condition that an intra-frame prediction mode is a non-mapping mode, a prediction angle corresponding to each angle mode in the intra-frame prediction mode is an angle indicated by an index of each angle mode;
When the intra-prediction mode is a mapping mode, a prediction angle corresponding to a partial angle mode in the intra-prediction mode is a mapping angle of an angle indicated by an index of the partial angle mode.
In some embodiments, the code stream further includes indication information for indicating whether the intra prediction mode is the mapping mode;
the processor is configured to, when a mapping angle of the angle indicated by the index is used as a predicted angle corresponding to the angle mode, specifically:
and when the intra prediction mode is determined to be the mapping mode based on the instruction information, setting a mapping angle of the angle instructed by the index as a prediction angle corresponding to the angle mode.
In some embodiments, the index of the angle pattern indicates an angle comprising: a main angle, or an extension of the main angle.
In some embodiments, in the case where the angle indicated by the index is an expanded angle, the index is represented by an index of a main angle of the expanded angle, and a relative offset of the expanded angle from the main angle.
In some embodiments, the first angular range includes an angular range less than a target main angle, the mapping angle being determined based on:
Performing expansion processing on the target main angle to obtain an expansion angle of the target main angle;
and mapping the expansion angle to obtain the mapping angle.
In some embodiments, the first angular range includes an angular range less than a target main angle, the mapping angle being determined based on:
mapping the target main angle to obtain a mapping angle of the target main angle;
and performing expansion processing on the mapping angle of the target main angle to obtain the mapping angle.
In some embodiments, the first angle range is 36 ° to 45 ° and the second angle range is 212 ° to 225 °.
In some embodiments, the angle in the first range of angles points to an upper right of the image block and the angle in the second range of angles points to a lower left of the image block.
Accordingly, the present embodiment also provides a computer storage medium in which a program is stored, which when executed by a processor, implements the encoding method and decoding method in any of the above embodiments.
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, disk storage, CD-ROM, optical storage, etc.) having program code embodied therein. Computer-usable storage media include both permanent and non-permanent, removable and non-removable media, and information storage may be implemented by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer 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 Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, may be used to store information that may be accessed by the computing device.
For the device embodiments, reference is made to the description of the method embodiments for the relevant points, since they essentially correspond to the method embodiments. The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. The terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing has outlined rather broadly the methods and apparatus provided in embodiments of the present invention in order that the detailed description of the principles and embodiments of the present invention may be implemented in any way that is used to facilitate the understanding of the method and core concepts of the present invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (49)

  1. A decoding method, the method comprising:
    acquiring a code stream of an image block to be decoded;
    when the prediction mode of the image block is determined to be an angle mode in an intra-frame prediction mode based on the code stream, and an angle indicated by an index of the angle mode is located in a first angle range, taking a mapping angle of the angle indicated by the index as a prediction angle corresponding to the angle mode, wherein the mapping angle is located in a second angle range, an angle in the first angle range points to the upper right of the image block, and an angle in the second angle range points to the lower left of the image block;
    And decoding the image block based on the prediction angle.
  2. The method according to claim 1, wherein when it is determined that the prediction mode of the image block is an angle mode in an intra prediction mode based on the code stream, and an angle indicated by an index of the angle mode is not within a first angle range, the angle indicated by the index is taken as a prediction angle corresponding to the angle mode.
  3. The method according to any one of claims 1 or 2, wherein regarding the mapping angle of the angle indicated by the index as the predicted angle corresponding to the angle pattern, comprises:
    and when the height of the image block is larger than or equal to the width of the image block, taking the mapping angle of the angle indicated by the index as the prediction angle corresponding to the angle mode.
  4. A method according to claim 3, wherein in the case where it is determined that the height of the image block is smaller than the width of the image block, the angle indicated by the index is taken as the predicted angle corresponding to the angle pattern.
  5. The method of claim 1, wherein the intra-prediction modes include a mapped mode and a non-mapped mode,
    Under the condition that an intra-frame prediction mode is a non-mapping mode, a prediction angle corresponding to each angle mode in the intra-frame prediction mode is an angle indicated by an index of each angle mode;
    when the intra-prediction mode is a mapping mode, a prediction angle corresponding to a partial angle mode in the intra-prediction mode is a mapping angle of an angle indicated by an index of the partial angle mode.
  6. The method according to claim 5, wherein the code stream further includes indication information for indicating whether the intra prediction mode is the mapping mode;
    taking the mapping angle of the angle indicated by the index as the predicted angle corresponding to the angle mode, wherein the mapping angle comprises the following steps:
    and when the intra prediction mode is determined to be the mapping mode based on the instruction information, setting a mapping angle of the angle instructed by the index as a prediction angle corresponding to the angle mode.
  7. The method of any of claims 1-6, wherein the indexing of the angular pattern indicates an angle comprising: a main angle, or an extension of the main angle.
  8. The method according to claim 7, wherein in the case where the angle indicated by the index is an extension angle, the index is represented by an index of a main angle of the extension angle, and a relative offset of the extension angle from the main angle.
  9. The method of any of claims 1-8, wherein the first angular range comprises an angular range less than a target main angle, the mapping angle being determined based on:
    performing expansion processing on the target main angle to obtain an expansion angle of the target main angle;
    and mapping the expansion angle to obtain the mapping angle.
  10. The method of any of claims 1-8, wherein the first angular range comprises an angular range less than a target main angle, the mapping angle being determined based on:
    mapping the target main angle to obtain a mapping angle of the target main angle;
    and performing expansion processing on the mapping angle of the target main angle to obtain the mapping angle.
  11. The method of any one of claims 1-10, wherein the first angular range is 36 ° to 45 ° and the second angular range is 212 ° to 225 °.
  12. A decoding method, the method comprising:
    acquiring a code stream of an image block to be decoded;
    when the intra-frame prediction mode of the image block is determined to be an angle mode based on the code stream, and an angle indicated by an index of the angle mode is located in a first angle range, taking a mapping angle of the angle indicated by the index as a 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 larger than the angle in the first angle range;
    And decoding the image block based on the prediction angle.
  13. A method of encoding, the method comprising:
    acquiring an image block to be encoded;
    under the condition that the prediction mode of the image block is determined to be an angle mode in an intra-frame prediction mode, encoding the image block and the index of the angle mode based on the angle mode to obtain a code stream of the image block;
    when the angle indicated by the index is located in a first angle range, the predicted angle corresponding to the angle mode is a mapping angle of the angle indicated by the index, the mapping angle is located in a second angle range, the angle in the first angle range points to the upper right of the image block, and the angle in the second angle range points to the lower left of the image block.
  14. The method of claim 13, wherein the predicted angle corresponding to the angle mode is the angle indicated by the index when the angle indicated by the index is outside a first angle range.
  15. The method of claim 13, wherein the predicted angle corresponding to the angle mode is a mapping angle of the angle indicated by the index when the height of the image block is greater than or equal to the width of the image block and the angle indicated by the index is within a first angle range.
  16. The method according to claim 13, wherein the prediction angle corresponding to the angle mode is the angle indicated by the index in case the height of the image block is smaller than the width of the image block.
  17. The method of claim 13, wherein the intra-prediction modes include a mapped mode and a non-mapped mode,
    under the condition that an intra-frame prediction mode is a non-mapping mode, a prediction angle corresponding to each angle mode in the intra-frame prediction mode is an angle indicated by an index of each angle mode;
    when the intra-prediction mode is a mapping mode, a prediction angle corresponding to a partial angle mode in the intra-prediction mode is a mapping angle of an angle indicated by an index of the partial angle mode.
  18. The method of claim 17, wherein the code stream further includes indication information for indicating whether the intra prediction mode is the mapping mode.
  19. The method of any of claims 13-18, wherein the indexing of the angular pattern indicates an angle comprising: a main angle, or an extension of the main angle.
  20. The method of any of claims 13-18, wherein the first angular range comprises an angular range less than a target main angle, the mapping angle being determined based on:
    Performing expansion processing according to the target main angle to obtain an expansion angle of the target main angle;
    and mapping the expansion angle to obtain the mapping angle.
  21. The method of any of claims 13-18, wherein the first angular range comprises an angular range less than a target main angle, the mapping angle being determined based on:
    mapping the target main angle to obtain a mapping angle of the target main angle;
    and performing expansion processing on the mapping angle of the target main angle to obtain the mapping angle.
  22. The method according to any one of claims 13-18, wherein in case the angle indicated by the index is an extension angle, the index is represented by an index of a main angle of the extension angle, and a relative offset of the extension angle from the main angle.
  23. The method of any one of claims 13-22, wherein the first angular range is 36 ° to 45 ° and the second angular range is 212 ° to 225 °.
  24. A method of encoding, the method comprising:
    acquiring an image block to be encoded;
    Under the condition that the prediction mode of the image block is determined to be an angle mode in an intra-frame prediction mode, encoding the image block and the index of the angle mode based on the angle mode to obtain a code stream of the image block;
    when the angle indicated by the index is located in a first angle range, the predicted angle corresponding to the angle mode is a mapping angle of the angle indicated by the index, the mapping angle is located in a second angle range, and the angle in the second angle range is larger than the angle in the first angle range.
  25. A decoding device, comprising a processor, a memory, a computer program stored in the memory for execution by the processor, the processor implementing the following steps when executing the computer program:
    acquiring a code stream of an image block to be decoded;
    when the image block prediction mode is determined to be an angle mode in an intra prediction mode based on the code stream, and an angle indicated by an index of the angle mode is located in a first angle range, taking a mapping angle of the angle indicated by the index as a prediction angle corresponding to the angle mode, wherein the mapping angle is located in a second angle range, an angle in the first angle range points to the upper right of the image block, and an angle in the second angle range points to the lower left of the image block;
    And decoding the image block based on the prediction angle.
  26. The apparatus of claim 25, wherein the processor is configured to, when the image block prediction mode is determined to be an angle mode in an intra prediction mode based on the bitstream, and an angle indicated by an index of the angle mode is not within a first angle range, take the angle indicated by the index as a prediction angle corresponding to the angle mode.
  27. The apparatus according to claim 25 or 26, wherein the processor is configured to, when using the mapping angle of the angle indicated by the index as the predicted angle corresponding to the angle mode, specifically:
    and when the height of the image block is larger than or equal to the width of the image block, taking the mapping angle of the angle indicated by the index as the prediction angle corresponding to the angle mode.
  28. The apparatus of claim 27, wherein the processor is configured to use an angle indicated by the index as the predicted angle corresponding to the angle mode if the height of the image block is determined to be less than the width of the image block.
  29. The apparatus of claim 25, wherein the intra-prediction modes include a mapped mode and a non-mapped mode,
    Under the condition that an intra-frame prediction mode is a non-mapping mode, a prediction angle corresponding to each angle mode in the intra-frame prediction mode is an angle indicated by an index of each angle mode;
    when the intra-prediction mode is a mapping mode, a prediction angle corresponding to a partial angle mode in the intra-prediction mode is a mapping angle of an angle indicated by an index of the partial angle mode.
  30. The apparatus according to claim 29, wherein the code stream further includes indication information for indicating whether the intra prediction mode is the mapping mode;
    the processor is configured to, when using the mapping angle of the angle indicated by the index as the predicted angle corresponding to the angle mode, specifically:
    and when the intra prediction mode is determined to be the mapping mode based on the instruction information, setting a mapping angle of the angle instructed by the index as a prediction angle corresponding to the angle mode.
  31. The apparatus of any of claims 25-30, wherein the index of the angular pattern indicates an angle comprising: a main angle, or an extension of the main angle.
  32. The apparatus of claim 31, wherein in the case where the angle indicated by the index is an expanded angle, the index is represented by an index of a main angle of the expanded angle, and a relative offset of the expanded angle from the main angle.
  33. The apparatus of any of claims 25-32, wherein the first angular range comprises an angular range less than a target main angle, the mapping angle determined based on:
    performing expansion processing on the target main angle to obtain an expansion angle of the target main angle;
    and mapping the expansion angle to obtain the mapping angle.
  34. The apparatus of any of claims 25-32, wherein the first angular range comprises an angular range less than a target main angle, the mapping angle determined based on:
    mapping the target main angle to obtain a mapping angle of the target main angle;
    and performing expansion processing on the mapping angle of the target main angle to obtain the mapping angle.
  35. The device of any one of claims 25-34, wherein the first angular range is 36 ° to 45 ° and the second angular range is 212 ° to 225 °.
  36. A decoding device, wherein the processor includes a processor, a memory, and a computer program stored in the memory and executable by the processor, and the processor implements the following steps when executing the computer program:
    Acquiring a code stream of an image block to be decoded;
    when the prediction mode of the image block is determined to be an angle mode in an intra-frame prediction mode based on the code stream, and an angle indicated by an index of the angle mode is located in a first angle range, taking a mapping angle of the angle indicated by the index as a prediction angle corresponding to the angle mode, wherein the mapping angle is located in a second angle range, and an angle in the second angle range is larger than an angle in the first angle range;
    and decoding the image block based on the prediction angle.
  37. An encoding apparatus, comprising a processor, a memory, and a computer program stored in the memory for execution by the processor, when executing the computer program, performing the steps of:
    acquiring an image block to be encoded;
    under the condition that the prediction mode of the image block is determined to be an angle mode in an intra-frame prediction mode, encoding the image block and the index of the angle mode based on the angle mode to obtain a code stream of the image block;
    when the angle indicated by the index is located in a first angle range, the predicted angle corresponding to the angle mode is a mapping angle of the angle indicated by the index, the mapping angle is located in a second angle range, the angle in the first angle range points to the upper right of the image block, and the angle in the second angle range points to the lower left of the image block.
  38. The apparatus of claim 37, wherein the predicted angle corresponding to the angle mode is the angle indicated by the index when the angle indicated by the index is outside a first angular range.
  39. The apparatus of claim 37, wherein the predicted angle corresponding to the angle mode is a mapping angle of the angle indicated by the index if the height of the image block is greater than or equal to the width of the image block and the angle indicated by the index is within a first angle range.
  40. The apparatus of claim 37, wherein the prediction angle corresponding to the angle mode is the angle indicated by the index in the case where the height of the image block is smaller than the width of the image block.
  41. The apparatus of claim 37, wherein the intra-prediction modes include a mapped mode and a non-mapped mode,
    under the condition that an intra-frame prediction mode is a non-mapping mode, a prediction angle corresponding to each angle mode in the intra-frame prediction mode is an angle indicated by an index of each angle mode;
    when the intra-prediction mode is a mapping mode, a prediction angle corresponding to a partial angle mode in the intra-prediction mode is a mapping angle of an angle indicated by an index of the partial angle mode.
  42. The apparatus of claim 41, wherein the code stream further includes indication information for indicating whether the intra prediction mode is the mapping mode.
  43. The apparatus of any one of claims 37-42, wherein the index of the angular pattern indicates an angle comprising: a main angle, or an extension of the main angle.
  44. The apparatus of any one of claims 37-42, wherein the first range of angles comprises a range less than a target main angle, the mapping angle being determined based on:
    performing expansion processing according to the target main angle to obtain an expansion angle of the target main angle;
    and mapping the expansion angle to obtain the mapping angle.
  45. The apparatus of any one of claims 37-42, wherein the first range of angles comprises a range less than a target main angle, the mapping angle being determined based on:
    mapping the target main angle to obtain a mapping angle of the target main angle;
    and performing expansion processing on the mapping angle of the target main angle to obtain the mapping angle.
  46. The apparatus of any one of claims 37-42, wherein the index indicates an angle that is an extension angle, the index being represented by an index of the master angle pattern, and a relative offset of the extension angle from the master angle.
  47. The device of any one of claims 37-46, wherein the first angular range is 36 ° to 45 ° and the second angular range is 212 ° to 225 °.
  48. An encoding apparatus, wherein the processor comprises a processor, a memory, and a computer program stored in the memory for execution by the processor, and wherein the processor, when executing the computer program, performs the steps of:
    acquiring an image block to be encoded;
    under the condition that the prediction mode of the image block is determined to be an angle mode in an intra-frame prediction mode, encoding the image block and the index of the angle mode based on the angle mode to obtain a code stream of the image block;
    when the angle indicated by the index is located in a first angle range, the predicted angle corresponding to the angle mode is a mapping angle of the angle indicated by the index, the mapping angle is located in a second angle range, and the angle in the second angle range is larger than the angle in the first angle range.
  49. A machine-readable storage medium having stored thereon computer instructions which, when executed, perform the encoding method of any of claims 1 to 12 or the decoding method of any of claims 13 to 24.
CN202180101495.5A 2021-09-22 2021-09-22 Encoding and decoding method and device Pending CN117882378A (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/119696 WO2023044617A1 (en) 2021-09-22 2021-09-22 Encoding method and apparatus, and decoding method and apparatus

Publications (1)

Publication Number Publication Date
CN117882378A true CN117882378A (en) 2024-04-12

Family

ID=85719794

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202180101495.5A Pending CN117882378A (en) 2021-09-22 2021-09-22 Encoding and decoding method and device

Country Status (2)

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

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FI20175006A1 (en) * 2017-01-03 2019-02-15 Nokia Technologies Oy Video and image coding with wide-angle intra prediction
US10382772B1 (en) * 2018-07-02 2019-08-13 Tencent America LLC Method and apparatus for video coding
KR20230104769A (en) * 2018-08-24 2023-07-10 삼성전자주식회사 Encoding method and device, and decoding method and device
AU2019342129A1 (en) * 2018-09-21 2021-05-20 Interdigital Vc Holdings, Inc. Harmonization of intra transform coding and wide angle intra prediction
US11641471B2 (en) * 2019-05-27 2023-05-02 Lg Electronics Inc. Image coding method and device on basis of wide-angle intra prediction and transform
US11197001B2 (en) * 2020-02-05 2021-12-07 Tencent America LLC Method and apparatus for interactions between decoder-side intra mode derivation and adaptive intra prediction modes

Also Published As

Publication number Publication date
WO2023044617A1 (en) 2023-03-30

Similar Documents

Publication Publication Date Title
CN102835113B (en) The method and apparatus processing video signal
CN102939752B (en) By the data cell execution loop filtering based on tree structure, video is carried out to the method and apparatus of encoding and decoding
WO2020182166A1 (en) Method and device for constructing motion information candidate list
CN109644276A (en) Image coding/decoding method
CN110121884A (en) Method and apparatus for filtering
CN108141605A (en) Intra block replicates merging patterns and unavailable intra block replicates the filling of reference zone
CN104904202A (en) Video encoding method and apparatus for parallel processing using reference picture information, and video decoding method and apparatus for parallel processing using reference picture information
US20220210436A1 (en) Method for acquiring motion vectors, prediction method and device
CN105474639A (en) Video encoding device, video decoding device, video system, video encoding method, video decoding method, and program
CN103220511A (en) Logical intra mode naming in HEVC video coding
CN104780381A (en) Method and apparatus for decoding video
CN110476425A (en) Prediction technique and device based on block form
EP3908002A1 (en) Video processing method and apparatus
CN103891278A (en) Method, device, and program for encoding and decoding image
TWI727826B (en) Coding using intra-prediction
CN103109530A (en) Method and apparatus for encoding video using adjustable loop filtering, and method and apparatus for decoding video using adjustable loop filtering
CN102883161A (en) Video encoding and decoding processing method and device
CN114900691B (en) Encoding method, encoder, and computer-readable storage medium
CN104205848A (en) Video encoding method and apparatus and video decoding method and apparatus using unified syntax for parallel processing
AU2017317848B2 (en) Interframe predictive coding method and device
RU2719334C1 (en) Prediction motion video encoding method, a prediction motion video encoding device, a prediction motion video encoding program, a prediction motion video decoding method, a prediction motion video decoding device and a prediction motion video decoding program
CN117882378A (en) Encoding and decoding method and device
CN113225555A (en) Geometric partition mode prediction method and device in video coding and decoding
CN116569554A (en) Inter-frame prediction method, video encoding and decoding method, device and medium
CN103716622B (en) Image processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination