CN110971911A - Method and apparatus for intra prediction in video encoding and decoding - Google Patents

Method and apparatus for intra prediction in video encoding and decoding Download PDF

Info

Publication number
CN110971911A
CN110971911A CN201811160032.2A CN201811160032A CN110971911A CN 110971911 A CN110971911 A CN 110971911A CN 201811160032 A CN201811160032 A CN 201811160032A CN 110971911 A CN110971911 A CN 110971911A
Authority
CN
China
Prior art keywords
image block
intra
prediction mode
frame prediction
pixels
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.)
Granted
Application number
CN201811160032.2A
Other languages
Chinese (zh)
Other versions
CN110971911B (en
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.)
Beijing Samsung Telecommunications Technology Research Co Ltd
Samsung Electronics Co Ltd
Original Assignee
Beijing Samsung Telecommunications Technology Research Co Ltd
Samsung Electronics 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 Beijing Samsung Telecommunications Technology Research Co Ltd, Samsung Electronics Co Ltd filed Critical Beijing Samsung Telecommunications Technology Research Co Ltd
Priority to CN201811160032.2A priority Critical patent/CN110971911B/en
Publication of CN110971911A publication Critical patent/CN110971911A/en
Application granted granted Critical
Publication of CN110971911B publication Critical patent/CN110971911B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/11Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock

Landscapes

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

Abstract

The invention provides a method and a device for intra-frame prediction in video coding and decoding, wherein the method comprises the following steps: receiving an image block and determining a first intra-frame prediction mode of the image block; if the first intra-frame prediction mode of the image block is a direction prediction mode, determining a second intra-frame prediction mode of the image block according to the first intra-frame prediction mode and the availability of pixels on the left side and the right side of the image block; determining a third intra-frame prediction mode of the image block according to the second intra-frame prediction mode, the availability of pixels on the left side and the right side of the image block and the shape of the image block; and carrying out intra-frame prediction on the image block according to the determined third intra-frame prediction mode.

Description

Method and apparatus for intra prediction in video encoding and decoding
Technical Field
The present invention relates to the field of video encoding and decoding technologies, and in particular, to a method and an apparatus for intra prediction in video encoding and decoding.
Background
In the existing video or image encoding and decoding method, an image is generally divided into a plurality of image blocks, and then each image block is sequentially encoded or decoded. For each image block, the encoding step can be divided into prediction, transformation, quantization and entropy coding, wherein the prediction is to predict the image block currently being encoded by using the reconstructed pixel values (these pixels are referred to as reference pixels) of the image block that has been encoded before to derive a predicted value, and then write the difference between the actual pixel value and the predicted value of the current image block into the code stream. During decoding, the decoder also needs to predict the currently decoded image block by using the reconstructed pixel values (these pixels are referred to as reference pixels) of the image block that has been decoded before to derive a prediction value, and then add the difference value decoded from the code stream to the prediction value to obtain the reconstructed value of the decoded image block. In order to ensure the consistency of encoding and decoding, the encoder and the decoder must use the same reference pixels and the same prediction method when performing prediction. There are many specific prediction methods, and in general, an encoder selects a current image block and then writes information about the selected prediction method into a code stream to transmit to a decoder, so that the decoder can predict a current decoded block using the same prediction method.
Currently, angle prediction is a very mainstream intra-frame prediction method. The term "angle prediction" refers to using the value of a reference pixel corresponding to each pixel to be predicted in one direction as the predicted value of the pixel to be predicted, for example, selecting the vertical direction, so that the pixel value of the reference pixel located directly above the pixel to be predicted in the current coding block or decoding block is used as the predicted value of the pixel to be predicted, and the other directions are similar. Likewise, the specific prediction direction is also selected by the encoder, which then writes information about the selected prediction direction into the code stream to be transmitted to the decoder. In general, the encoder can arbitrarily select one of all prediction directions supported in the video codec standard. And the candidate prediction directions are all located on one side of the 45 degree diagonal as shown in fig. 19.
With the development of video encoding and decoding technology, more and more methods for dividing image blocks are used, and besides common square image blocks, non-square image block division also begins to appear. In the case where the length and height of the image block to be predicted are not equal in the non-square image block, the range of the candidate prediction direction is not fixed on one side of the 45-degree line but is dynamically adjusted according to the length-height ratio in order to fully utilize the information of the peripheral pixels. As in fig. 20, when the width of an image block is larger than high, the angle between the boundary line of the candidate prediction direction and the horizontal right direction is smaller than 45 degrees, and the angle decreases as the length-to-height ratio increases; when the height of the image block is larger than a long length, the angle between the boundary line of the candidate prediction direction and the horizontal direction to the right is larger than 45 degrees, and the angle increases as the height ratio increases. This technique is called wide angle prediction because the angular total range of all prediction directions that can be used by an actual encoder is wider than 180 degrees.
Disclosure of Invention
The invention provides a method and a device for intra-frame prediction in video coding and decoding.
The invention discloses a method for intra-frame prediction in video coding and decoding, which comprises the following steps:
determining a first intra prediction mode for an image block;
if the first intra-frame prediction mode of the image block is a direction prediction mode, determining a second intra-frame prediction mode of the image block according to the first intra-frame prediction mode and the availability of pixels on the left side and the right side of the image block;
determining a third intra-frame prediction mode of the image block according to the second intra-frame prediction mode, the availability of pixels on the left side and the right side of the image block and the shape of the image block;
and carrying out intra-frame prediction on the image block according to the determined third intra-frame prediction mode.
Preferably, the determining the first intra prediction mode of the image comprises:
the decoder determines a first intra-frame prediction mode of the current image block according to the code stream indication and a first intra-frame prediction mode of an adjacent decoded image block.
Preferably, the determining, by the decoder, the first intra prediction mode of the current image block according to the code stream indication and the first intra prediction mode of the adjacent decoded image block includes:
the decoder analyzes the code stream to obtain a first intra-frame prediction mode index value of the current image block, and determines a first intra-frame prediction mode of the current image block according to the index value and the first intra-frame prediction mode of the adjacent decoded image block.
Preferably, if a certain side neighboring block exists and has been encoded or decoded, or a certain side neighboring block exists, has been encoded or decoded and is in the same slice as the current image block, the availability of neighboring pixels of that side is "available";
otherwise, the availability of the neighboring pixels of that side is "unavailable".
Preferably, the determining the second intra prediction mode for the image block according to the first intra prediction mode and the availability of the pixels on the left and right sides of the image block includes:
and deriving a second intra-frame prediction mode from the first intra-frame prediction mode of the image block according to the availability of pixels on the left side and the right side of the image block, wherein part of the first intra-frame prediction mode is adjusted and is used as the second intra-frame prediction mode of the image block, and the rest first intra-frame prediction modes are directly used as the second intra-frame prediction modes of the image block or are directly used as the second intra-frame prediction modes of the image block.
Preferably, the deriving the second intra prediction mode from the first intra prediction mode of the image block according to the availability of pixels on the left and right sides of the image block comprises at least one of:
if the left side pixel and the right side pixel of the image block are available, the first intra-frame prediction mode is not adjusted, and the second intra-frame prediction mode of the image block is determined to be the first intra-frame prediction mode;
if the right side pixel and the left side pixel of the image block are available, adjusting part of the first intra-frame prediction mode, taking the adjusted prediction mode as a second intra-frame prediction mode of the image block, and directly taking the rest part of the first intra-frame prediction mode as the second intra-frame prediction mode of the image block;
if the pixels on the left side and the right side of the image block are unavailable, determining a second intra-frame prediction mode of the image as a first intra-frame prediction mode;
if the pixels on the left side and the right side of the current image block are unavailable, adjusting one part of the first intra-frame prediction mode to obtain a second intra-frame prediction mode of the current image block, and directly taking the other part of the first intra-frame prediction mode as the second intra-frame prediction mode of the current image block without adjustment;
if the pixels on the left side and the right side of the current image block are available, adjusting one part of the first intra-frame prediction modes to obtain a second intra-frame prediction mode of the current image block, and directly taking the other part of the first intra-frame prediction modes as the second intra-frame prediction mode of the current image block without adjusting.
Preferably, the shape of the image block is an aspect ratio of the image block.
Preferably, the determining a third intra prediction mode for the image block according to the second intra prediction mode, the availability of pixels on left and right sides of the image block, and the shape of the image block includes:
if the current image block adopts left direction prediction or right direction prediction, adjusting part of the second intra-frame prediction modes, taking the adjusted prediction modes as third intra-frame prediction modes of the image block, and directly taking the rest second intra-frame prediction modes as the third intra-frame prediction modes of the image block; and/or the presence of a gas in the gas,
and if the current image block adopts bidirectional prediction, directly taking the second intra-frame prediction mode of the image block as a third intra-frame prediction mode of the image block.
Preferably, the determining the prediction direction of the image block according to the determined third intra prediction mode, and performing intra prediction according to the determined prediction direction to obtain the prediction value of the image block includes at least one of:
if the image block adopts left prediction, using left adjacent pixels, upper right pixels, lower left pixels and an upper left corner pixel to perform intra-frame prediction, wherein when the width-to-height ratio of the image block is greater than 1, the number of the upper adjacent pixels is equal to the width W of the image block, the number of the left adjacent pixels is equal to the height H of the image block, the number of the upper right pixels is the width W of the image block plus an offset d, the number of the lower left pixels is equal to the height H of the image block, when the width-to-height ratio of the image block is less than 1, the number of the upper adjacent pixels is equal to the width W of the image block, the number of the left adjacent pixels is equal to the height H of the image block, the number of the upper right pixels is the width W of the image block, the number of the lower left pixels is equal to the height H of the image block;
if the image block adopts right direction prediction, using a right adjacent pixel, an upper left pixel, a lower right pixel and an upper right pixel to perform intra-frame prediction, when the aspect ratio of the image block is more than 1, the number of the upper adjacent pixel is equal to the width W of the image block, the number of the right adjacent pixel is equal to the height H of the image block, the number of the upper left pixel is the width W of the image block plus an offset d, the number of the lower right pixel is equal to the height H of the image block, when the aspect ratio of the image block is less than 1, the number of the upper adjacent pixel is equal to the width W of the image block, the number of the right adjacent pixel is equal to the height H of the image block, the number of the upper left pixel is the width W of the image block, the number of the lower right pixel is equal to the height H of the image block plus an offset d, wherein d;
and if the image block adopts bidirectional prediction, using a left adjacent pixel, a right adjacent pixel, an upper adjacent pixel, a left upper corner pixel and a right upper corner pixel, wherein the number of the left adjacent pixels is equal to the height H of the image block, the number of the right adjacent pixels is equal to the height H of the image block, and the number of the upper adjacent pixels is equal to the width W of the image block.
Preferably, if the image block adopts left prediction, when the left adjacent pixel is not available, replacing the left adjacent pixel with an upper left pixel, wherein the number of the upper left pixels used for replacing the left adjacent pixel is H; and/or
If the image block adopts right direction prediction, when a right adjacent pixel is unavailable, replacing the right adjacent pixel with an upper right pixel, wherein the number of the upper right pixels used for replacing the right adjacent pixel is H; and/or
If the image block adopts bidirectional prediction, when the left adjacent pixel is unavailable, the left adjacent pixel is replaced by the upper left pixel, the number of the upper left pixels used for replacing the left adjacent pixel is H, when the right adjacent pixel is unavailable, the right adjacent pixel is replaced by the upper right pixel, and the number of the upper right pixels used for replacing the right adjacent pixel is H.
The invention discloses an intra-frame prediction device in video coding and decoding, which comprises:
a first intra prediction mode determination unit for determining a first intra prediction mode of the image block;
the second intra-frame prediction mode determination unit is used for determining a second intra-frame prediction mode of the image block according to the first intra-frame prediction mode and the availability of the pixels on the left side and the right side of the image block under the condition that the first intra-frame prediction mode of the image block is a direction prediction mode;
a third intra prediction mode determination unit for determining a third intra prediction mode of the image block according to the second intra prediction mode, the availability of pixels on the left and right sides of the image block, and the shape of the image block;
and the intra-frame prediction unit is used for performing intra-frame prediction on the image block according to the determined third intra-frame prediction mode.
Preferably, the intra prediction unit includes a reference pixel determination subunit configured to determine a reference pixel used for intra prediction according to a third intra prediction mode of the current image block and a possibility of adjacent pixels on left and right sides of the current image block.
The invention discloses a decoder or encoder comprising a memory for storing a computer program which, when executed by a processor, implements the method of any one of the above.
According to the technical scheme, the intra-frame prediction method provided by the invention firstly adjusts the intra-frame prediction mode for the first time according to the availability of adjacent pixels on the left side and the right side of the current coding or decoding image block so as to ensure that reference pixels used in the subsequent intra-frame prediction process are available to the maximum extent, thereby improving the intra-frame prediction efficiency. Then, the intra-frame prediction mode is adjusted secondly by combining the width-to-height ratio of the current image block on the basis, so that the information of peripheral reconstruction pixels is utilized to the maximum extent, and the intra-frame prediction efficiency can be further improved. On the other hand, the invention organically combines the flexible coding sequence and the wide-angle prediction technology, so that the two coding technologies are mutually coordinated and play the greatest role, which undoubtedly improves the coding performance of video coding.
Drawings
The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is a flow chart of an embodiment;
FIG. 2 is a schematic diagram of left direction prediction;
FIG. 3 is a schematic diagram of right direction prediction;
FIG. 4 is a schematic diagram of bi-prediction;
FIG. 5 is a diagram of mode adjustments for left predicted aspect ratios greater than 1;
FIG. 6 is a diagram of mode adjustments for a left predicted aspect ratio less than 1;
FIG. 7 is a diagram of mode adjustments for a right predicted aspect ratio greater than 1;
FIG. 8 is a diagram of mode adjustments for a right predicted aspect ratio less than 1;
FIG. 9 is a diagram of a reference pixel for a left predicted aspect ratio greater than 1;
FIG. 10 is a diagram of a reference pixel for a left predicted aspect ratio less than 1;
FIG. 11 is a diagram of reference pixels for a left predicted aspect ratio equal to 1;
FIG. 12 is a diagram of a reference pixel for a right predicted aspect ratio greater than 1;
FIG. 13 is a diagram of a reference pixel for a right predicted aspect ratio less than 1;
FIG. 14 is a diagram of a reference pixel when the right prediction aspect ratio is equal to 1;
FIG. 15 is a diagram of reference pixels in bi-directional prediction;
FIG. 16 is an alternative diagram of a reference pixel when left-predicted left-neighboring pixels are not available;
FIG. 17 is an alternative diagram of a reference pixel when a right prediction is not available for a right neighbor pixel;
FIG. 18 is an alternative diagram of a reference pixel when a left neighboring pixel and/or a right neighboring pixel is predicted to be unavailable in both directions;
FIG. 19 is a schematic diagram of candidate prediction directions;
FIG. 20 is a diagram illustrating prediction directions of non-square image blocks;
FIG. 21 is a diagram illustrating the relationship between the prediction direction range boundary line and the coding order;
fig. 22 is a schematic diagram of an intra prediction apparatus in video coding.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is further described in detail below with reference to the accompanying drawings. It should be noted that the following description is intended for illustration only and is not intended to limit the present disclosure. In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure. However, it will be apparent to one of ordinary skill in the art that: these specific details need not be employed to practice the present disclosure. In other instances, well-known circuits, materials, or methods have not been described in detail in order to avoid obscuring the present disclosure.
Throughout the specification, reference to "one embodiment," "an embodiment," "one example," or "an example" means: the particular features, structures, or characteristics described in connection with the embodiment or example are included in at least one embodiment of the present disclosure. Thus, the appearances of the phrases "in one embodiment," "in an embodiment," "one example" or "an example" in various places throughout this specification are not necessarily all referring to the same embodiment or example. Furthermore, the particular features, structures, or characteristics may be combined in any suitable combination and/or sub-combination in one or more embodiments or examples. Further, those of ordinary skill in the art will appreciate that the drawings provided herein are for illustrative purposes and are not necessarily drawn to scale. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
Problems with the prior art or where improvements are desired:
the existing wide-angle prediction technology considers the shape of the current image block, but does not consider the coding order between the image blocks. In fact, in addition to the conventional left-to-right coding order in the image block coding order, a right-to-left coding order has been proposed in recent years. In particular, the encoder can flexibly select whether the coding order is left-to-right or right-to-left for each horizontally arranged pair or group of blocks. Thus, for an image block currently encoded or decoded, a previously encoded or decoded image block may be located on the left side or the right side, and therefore, when performing intra-frame prediction, the prediction direction also needs to be adjusted according to the position of the encoded or decoded image block. Specifically, if the image block on the left side of the current image block is an encoded or decoded image block, the included angle between the candidate prediction direction range boundary and the horizontal right direction is 45 degrees; if the image block on the right side of the current image block is an encoded or decoded image block, an included angle between the boundary of the candidate prediction direction range and the horizontal right direction is 135 degrees; specifically, if image blocks on both left and right sides of the current image block are encoded or decoded image blocks, the candidate prediction direction range boundary is a horizontal direction, as in fig. 21.
However, the current wide-angle prediction technique does not consider the coding order from right to left, that is, the wide-angle prediction technique only adjusts the prediction direction near the 45-degree line, but does not adjust the prediction direction near the 135-degree line. Thus, after the right-to-left coding order is adopted, the wide-angle prediction technology has no way to use.
Solution of the problems and objects of the invention:
in order to enable wide-angle prediction to support different coding orders, the invention adjusts the prediction direction according to the availability of pixels on the left side and the right side of the current image block and the shape of the current image block. When the left pixel and the right pixel of the current image block are available, the adjustment method of the prediction direction is consistent with the existing wide-angle technology, so that the compatibility between the technologies is maintained to the maximum extent. When the right pixel of the current image block is available, the prediction direction is symmetrically adjusted, and then certain angles are adjusted according to the shape of the current image block, so that when a right-to-left coding sequence is adopted, the coded or decoded pixel information around the abnormal image block can still be used to the maximum extent, the intra-frame prediction efficiency is improved, and the performance of video coding is finally improved.
In order to achieve the purpose, the invention adopts the following technical scheme:
the invention provides a method for intra-frame prediction in video coding and decoding, which comprises the following steps:
step one, determining a first intra-frame prediction mode of a current image block.
At the encoding end, the encoder may determine the first intra prediction mode for the current image block by comparing the rate-distortion cost caused by encoding using each intra prediction mode, or may determine the first intra prediction mode according to other methods. During rate-distortion optimization, the encoder may traverse different intra modes, and the currently traversed intra mode is also the first intra prediction mode in this step.
At a decoding end, a decoder obtains an intra-frame prediction mode index value of a current image block according to code stream interpretation, and then determines a first intra-frame prediction mode of the current image block according to the index value and a first intra-frame prediction mode of an adjacent decoded image block.
And step two, if the first intra-frame prediction mode of the current image block is a direction prediction mode, determining a second intra-frame prediction mode of the current image block according to the first intra-frame prediction mode and the availability of pixels on the left side and the right side of the current image block.
And determining which first intra-frame prediction modes are adjusted and how to adjust according to the availability of the pixels on the left side and the right side of the current image block, and not adjusting which first intra-frame prediction modes.
And step three, determining a third intra-frame prediction mode of the current image block according to the second intra-frame prediction mode, the availability of the pixels on the left side and the right side of the image block and the shape of the current image block.
And determining which second intra-frame prediction modes are adjusted and how to adjust according to the shape of the current image block, and not adjusting which second intra-frame prediction modes. Preferably, when the image block is a rectangular block, the shape means a ratio of width to height.
And fourthly, determining the prediction direction of the current image block according to the third intra-frame prediction mode, and performing intra-frame prediction according to the determined prediction direction to obtain the prediction value of the current image block.
And the determined third intra-frame prediction mode is the intra-frame prediction mode actually adopted by the current image block. The current image block is intra-predicted according to the third intra mode, and any existing intra prediction method may be employed.
The present invention also provides an intra prediction apparatus in a video codec, comprising:
a first intra-frame prediction mode determining unit, configured to perform step one of the methods for intra-frame prediction in video encoding and decoding provided by the present invention;
a second intra-frame prediction mode determining unit, configured to perform step two of the method for intra-frame prediction in video encoding and decoding provided by the present invention;
a third intra-frame prediction mode determining unit, configured to perform step three of the method for intra-frame prediction in video encoding and decoding provided by the present invention;
and the intra-frame prediction unit is used for executing the step four of the method for intra-frame prediction in video coding and decoding provided by the invention.
The following describes the implementation of the present invention by way of specific examples.
Example one
FIG. 1 is a flow chart of a first embodiment provided herein; as shown in fig. 1, the present embodiment provides an intra prediction method in video encoding and decoding, including:
step 101, a first intra prediction mode for an image block is determined.
The encoder may determine the first intra prediction mode for the current image block by itself. For example, the first intra prediction mode to be finally used is determined by comparing the rate-distortion cost due to encoding using each intra prediction mode. In addition, when the encoder selects the first intra-frame prediction mode, the encoder may traverse different intra-frame prediction modes, and the currently traversed intra-frame prediction mode is also the first intra-frame prediction mode in this step.
The decoder determines a first intra-frame prediction mode of the current image block according to the code stream indication and a first intra-frame prediction mode of an adjacent decoded image block. The decoding firstly analyzes the code stream to obtain a first intra-frame prediction mode index value of the current image block, and then determines a first intra-frame prediction mode of the current image block according to the index value and the first intra-frame prediction mode of the adjacent decoded image block.
Step 102, if the first intra-frame prediction mode of the image block is the direction prediction mode, determining a second intra-frame prediction mode of the image block according to the first intra-frame prediction mode and the availability of the pixels on the left side and the right side of the image block.
Preferably, a side neighboring block is "available" if it exists and has been encoded or decoded, or if it exists, has been encoded or decoded and is in the same band as the current image block; otherwise, the adjacent pixel on that side is "unavailable".
And deriving a second intra-frame prediction mode from the first intra-frame prediction mode of the current image block according to the availability of the pixels on the left side and the right side of the current image block. If the left side pixel and the right side pixel of the current image block are available, the first intra-frame prediction mode is not adjusted, and the second intra-frame prediction mode of the current image is determined to be the first intra-frame prediction mode; and/or if the right side pixel and the left side pixel of the current image block are available, adjusting one part of the first intra-frame prediction mode and taking the adjusted prediction mode as the second intra-frame prediction mode of the current image block, and directly taking the other part of the first intra-frame prediction mode as the second intra-frame prediction mode of the current image block without adjusting the other part of the first intra-frame prediction mode; and/or if the pixels on the left side and the right side of the current image block are unavailable, the first intra-frame prediction mode is not adjusted, and the second intra-frame prediction mode of the current image is determined to be the first intra-frame prediction mode; and/or if the pixels on the left side and the right side of the current image block are unavailable, adjusting one part of the first intra-frame prediction modes and taking the adjusted prediction modes as the second intra-frame prediction modes of the current image block, and directly taking the other part of the first intra-frame prediction modes as the second intra-frame prediction modes of the current image block without adjusting the other part of the first intra-frame prediction modes; and/or if the pixels on the left side and the right side of the current image block are available, adjusting one part of the first intra-frame prediction modes, taking the adjusted prediction modes as the second intra-frame prediction modes of the current image block, and directly taking the first intra-frame prediction modes of the other part of the first intra-frame prediction modes as the second intra-frame prediction modes of the current image block without adjusting the first intra-frame prediction modes of the other part of the first intra-frame prediction modes.
Specifically, one possible implementation method is that, assuming that the intra prediction mode values are 0 to M, wherein the intra prediction mode with the mode values s to M is an angular prediction mode, when the first intra prediction mode value x1 of the current image block is greater than or equal to s and less than or equal to M:
if the left pixel and the right pixel of the current image block are available, the first intra prediction mode of the current image block is not adjusted, and it is determined that the second intra prediction mode value x2 of the current image block is equal to the first intra prediction mode value x1 (in this case, the present invention is referred to as left prediction, as in FIG. 2); and/or the presence of a gas in the gas,
if the right pixel and the left pixel of the current image block are available, adjusting a first intra prediction mode having a mode value greater than or equal to s and less than (s + M)/2 (or adjusting a first intra prediction mode having a mode value greater than or equal to s and less than or equal to (s + M)/2), and determining a second intra prediction mode x2 ═ x1+ M-s of the current image block; the first intra prediction mode with the mode value being other values is not adjusted, and the second intra prediction mode x2 of the current image block is determined to be x1 (in this case, the present invention is referred to as right direction prediction, as shown in fig. 3); and/or the presence of a gas in the gas,
if the pixels on the left side and the right side of the current image block are not available, the first intra-frame prediction mode of the current image block is not adjusted, and the second intra-frame prediction mode value x2 of the current image block is determined to be equal to the first intra-frame prediction mode value x1 (in this case, the case is marked as left-direction prediction); and/or the presence of a gas in the gas,
if the left and right pixels of the current image block are not available, adjusting a first intra prediction mode with a mode value greater than or equal to s and less than (M +3s)/4 (or adjusting the first intra prediction mode with a mode value greater than or equal to s and less than or equal to (M +3 s)/4), and determining that a second intra prediction mode x2 of the current image block is x1+ M-s; the first intra prediction mode with the mode value being other values is not adjusted, and the second intra prediction mode x2 of the current image block is determined to be x1 (in this case, the invention is referred to as bidirectional prediction, as shown in fig. 4); and/or
If both left and right pixels of the current image block are available, adjusting a first intra prediction mode having a mode value greater than or equal to s and less than (s + M)/2 (or adjusting a first intra prediction mode having a mode value greater than or equal to s and less than or equal to (s + M)/2), and determining a second intra prediction mode x2 ═ x1+ M-s for the current image block; the first intra prediction mode with the mode value being other value is not adjusted, and the second intra prediction mode x2 of the current image block is determined to be x1 (in this case, the present invention is called right direction prediction); and/or;
if both left and right pixels of the current image block are available, adjusting a first intra prediction mode having a mode value greater than or equal to s and less than (M +3s)/4 (or adjusting the first intra prediction mode having a mode value greater than or equal to s and less than or equal to (M +3 s)/4), and determining a second intra prediction mode x2 ═ x1+ M-s for the current image block; the first intra prediction mode having the other mode value is not adjusted, and the second intra prediction mode x2 of the current image block is determined to be x1 (this case is referred to as bidirectional prediction).
Preferably, s has a value of 2 and M has a value of 66 or 34.
And 103, determining a third intra-frame prediction mode of the image block according to the second intra-frame prediction mode, the availability of the pixels on the left side and the right side of the image block and the shape of the image block.
And deriving a second intra-frame prediction mode of the current image block from the first intra-frame prediction mode according to the availability of the pixels on the left side and the right side of the current image block and the shape of the current image block. If the current image block adopts left direction prediction or right direction prediction, adjusting a part of the second intra-frame prediction modes and taking the adjusted prediction modes as third intra-frame prediction modes of the current image block, and directly taking the other part of the second intra-frame prediction modes as the third intra-frame prediction modes of the current image block without adjusting; and if the current image block adopts bidirectional prediction, the second intra-frame prediction mode is not adjusted and is directly used as a third intra-frame prediction mode of the current image block. Since it may be determined whether the current image block employs left prediction, right prediction or bi-prediction only based on the availability of pixels on the left and right sides of the current image block, determining how to derive the third intra-prediction mode from the second intra-prediction mode based on whether the employed prediction of the image block is left prediction, right prediction or bi-prediction may also be considered as determining how to derive the third intra-prediction mode from the second intra-prediction mode based on the availability of pixels on the left and right sides of the image block.
Preferably, when the image block is a rectangular block, the shape of the image block is expressed as a ratio of width to length (i.e., aspect ratio) of the image block.
Specifically, one possible implementation method is as follows:
if the current image block adopts left prediction, when the aspect ratio of the image block is greater than 1, the value obtained by adding M-1 to the second intra-frame prediction mode value with the mode value smaller than a threshold is taken as the third prediction mode value of the current image block, as shown in FIG. 5, and the threshold depends on the aspect ratio. Preferably, if the aspect ratio is 2, the threshold is s + 6; if the aspect ratio is greater than 2, the threshold is s +10, i.e. the larger the aspect ratio, the larger the threshold. Preferably, M has a value of 66 and s has a value of 2. At this time, when the aspect ratio of the image block is 2, the second intra prediction modes having mode values of 2, 3, 4, 5, 6, and 7 are respectively adjusted to 67, 68, 69, 70, 71, and 72 and used as the third intra prediction mode of the current image block, and the second intra prediction modes having other mode values are directly used as the third intra prediction mode value of the current image block. At this time, when the aspect ratio of the image block is greater than 2, the second intra prediction modes having mode values of 2, 3, 4, 5, 6, 7, 8, 9, 10, and 11 are respectively adjusted to 67, 68, 69, 70, 71, 72, 73, 74, 75, and 76 and used as the third intra prediction mode of the current image block, and the second intra prediction modes having other mode values are directly used as the third intra prediction mode value of the current image block. And when the aspect ratio of the image block is less than 1, taking the value obtained by subtracting M-1 from the second intra-prediction mode value with the mode value greater than a threshold value as the third prediction mode value of the image block, as shown in FIG. 6, wherein the threshold value depends on the aspect ratio. Preferably, if the aspect ratio is 1/2, the threshold is M-6; if the aspect ratio is less than 1/2, the threshold is M-10, i.e., the smaller the aspect ratio, the smaller the threshold. Preferably, M has a value of 66 and s has a value of 2. At this time, when the aspect ratio of the image block is 1/2, the second intra prediction modes having mode values of 66, 65, 64, 63, 62, and 61 are respectively adjusted to 1, 0, -1, -2, -3, and-4 and are used as the third intra prediction mode of the current image block, and the second intra prediction mode values having other mode values are directly used as the third intra prediction mode value of the current image block. At this time, when the aspect ratio of the image block is less than 1/2, the second intra prediction mode having the mode values 66, 65, 64, 63, 62, 61, 60, 59, 58, and 57 is adjusted to 1, 0, -1, -2, -3, -4, -5, -6, -7, and-8, respectively, and is used as the third intra prediction mode for the current image block, and the second intra prediction mode having the mode value other than that is directly used as the third intra prediction mode value for the current image block. And when the aspect ratio of the image block is equal to 1, directly using the second intra prediction mode value of the current image block as a third intra prediction mode value of the current image block.
If the current image block adopts right direction prediction, when the image block aspect ratio is greater than 1, the value obtained by subtracting M-1 from the second intra-frame prediction mode value with the mode value greater than a threshold value is taken as the third prediction mode value of the image block, as shown in fig. 7, and the threshold value depends on the aspect ratio. Preferably, if the aspect ratio is 2, the threshold is (3M-s)/2-6; if the aspect ratio is greater than 2, the threshold is (3M-s)/2-10, i.e., the larger the aspect ratio, the smaller the threshold. Preferably, M has a value of 66 and s has a value of 2. At this time, when the aspect ratio of the image block is 2, the second intra prediction modes having the mode values of 98, 97, 96, 95, 94, and 93 are respectively adjusted to 33, 32, 31, 30, 29, and 28 and used as the third intra prediction mode of the current image block, and the second intra prediction modes having the other mode values are directly used as the third intra prediction mode value of the current image block. At this time, when the aspect ratio of the image block is greater than 2, the second intra prediction modes having the mode values of 98, 97, 96, 95, 94, 93, 92, 91, 90, and 89 are respectively adjusted to 33, 32, 31, 30, 29, 28, 27, 26, 25, and 24 and used as the third intra prediction mode for the current image block, and the second intra prediction mode having the mode values of the other values is directly used as the third intra prediction mode value for the current image block. And when the aspect ratio of the image block is less than 1, adding a value obtained by adding M-1 to a second intra-prediction mode value with a mode value less than a threshold value, as shown in FIG. 8, wherein the threshold value depends on the aspect ratio, as a third prediction mode value of the image block. Preferably, if the aspect ratio is 1/2, the threshold is (M + s)/2+ 6; if the aspect ratio is less than 1/2, the threshold is (M + s)/2+10, i.e., the smaller the aspect ratio, the larger the threshold. Preferably, M has a value of 66 and s has a value of 2. At this time, when the aspect ratio of the image block is 1/2, the second intra prediction modes having mode values of 34, 35, 36, 37, 38, and 39 are respectively adjusted to 99, 100, 101, 102, 103, and 104 and are used as the third intra prediction mode for the current image block, and the second intra prediction mode values having other mode values are directly used as the third intra prediction mode value for the current image block. At this time, when the aspect ratio of the image block is less than 1/2, the second intra prediction modes having mode values of 34, 35, 36, 37, 38, 39, 40, 41, 42, and 43 are respectively adjusted to 99, 100, 101, 102, 103, 104, 105, 106, 107, and 108 as the third intra prediction mode for the current image block, and the second intra prediction mode values having mode values of other values are directly used as the third intra prediction mode value for the current image block. And when the aspect ratio of the image block is equal to 1, directly using the second intra prediction mode value of the current image block as a third intra prediction mode value of the current image block.
And if the current image block adopts bidirectional prediction, the second intra-frame prediction mode of the image block is not adjusted, and the second intra-frame prediction mode value of the current image block is directly used as the third intra-frame prediction mode value of the current image block.
And 104, determining the prediction direction of the image block according to the determined third intra-frame prediction mode, and performing intra-frame prediction according to the determined prediction direction to obtain the prediction value of the current image block.
And the determined third intra-frame prediction mode is the intra-frame prediction mode actually adopted by the current image block, so that intra-frame prediction is carried out according to the third intra-frame prediction mode. The reference pixels used are determined according to the intra prediction mode before the intra prediction is performed.
Specifically, one possible implementation is (note that the width of the current image block is W, and the height is H):
if the image block uses left prediction, the left adjacent pixel, the upper right pixel, the lower left pixel and an upper left pixel are used. When the aspect ratio of the image block is greater than 1, the number of upper adjacent pixels is equal to W, the number of left adjacent pixels is equal to H, the number of upper right pixels is W + d, and the number of lower left pixels is equal to H, as shown in fig. 9, where the offset value d is related to the length and width of the image. Specifically, when the image aspect ratio is 2, d is (W/2-H + (W +31)/32), and when the image aspect ratio is greater than 2, d is (W/4-H + (W + 31)/32). When the aspect ratio of the image block is less than 1, the number of upper adjacent pixels is equal to W, the number of left adjacent pixels is equal to H, the number of upper right pixels is W, and the number of lower left pixels is equal to H + d, as shown in fig. 10, where the offset value d is related to the length and width of the image. Specifically, when the image aspect ratio is 1/2, d is (H/2-W + (H +31)/32), and when the image aspect ratio is less than 1/2, d is (H/4-W + (H + 31)/32). When the aspect ratio of the image block is 1, the number of upper-side adjacent pixels is equal to W, the number of left-side adjacent pixels is equal to H, the number of upper-right pixels is W, and the number of lower-left pixels is equal to H, as shown in fig. 11.
If the image block adopts right direction prediction, a right adjacent pixel, an upper left pixel, a lower right pixel and an upper right pixel are used. When the aspect ratio of the image block is greater than 1, the number of upper adjacent pixels is equal to W, the number of right adjacent pixels is equal to H, the number of upper left pixels is W + d, and the number of lower right pixels is equal to H, as shown in fig. 12, where the offset value d is related to the length and width of the image. Specifically, when the image aspect ratio is 2, d is (W/2-H + (W +31)/32), and when the image aspect ratio is greater than 2, d is (W/4-H + (W + 31)/32). When the aspect ratio of the image block is less than 1, the number of upper adjacent pixels is equal to W, the number of right adjacent pixels is equal to H, the number of upper left pixels is W, and the number of lower right pixels is equal to H + d, as shown in fig. 13, where the offset value d is related to the length and width of the image. Specifically, when the image aspect ratio is 1/2, d is (H/2-W + (H +31)/32), and when the image aspect ratio is less than 1/2, d is (H/4-W + (H + 31)/32). When the aspect ratio of the image block is 1, the number of upper adjacent pixels is equal to W, the number of right adjacent pixels is equal to H, the number of upper left pixels is W, and the number of lower right pixels is equal to H, as shown in fig. 14.
If the image block adopts bi-directional prediction, the left adjacent pixel, the right adjacent pixel, the upper adjacent pixel, a top left pixel and a top right pixel are used, wherein the number of the left adjacent pixel is equal to H, the number of the right adjacent pixel is equal to H, and the number of the upper adjacent pixel is equal to W, as shown in FIG. 15.
Preferably, in the above implementation method, if the pixels of one side are not available, the pixels of the other side may be used instead. Specifically, one possible implementation method is as follows: if the image block adopts left prediction, when the left adjacent pixel is not available, replacing the left adjacent pixel by an upper left pixel, wherein the number of the upper left pixels for replacing the left adjacent pixel is H, as shown in FIG. 16; if the image block adopts right direction prediction, when the right adjacent pixel is unavailable, replacing the right adjacent pixel by an upper right pixel, wherein the number of the upper right pixels for replacing the right adjacent pixel is H, as shown in FIG. 17; if the image block adopts bi-directional prediction, when the left adjacent pixel is not available, the left upper pixel is used for replacing, and the number of the left upper pixels used for replacing the left adjacent pixel is H, and when the right adjacent pixel is not available, the right upper pixel is used for replacing, and the number of the right upper pixels used for replacing the right adjacent pixel is H, as shown in FIG. 18.
After the reference pixel is determined, intra-frame prediction is performed according to a third intra-frame prediction mode of the current image block, and an existing intra-frame prediction method can be specifically adopted, which is not limited in the invention.
Example two
As shown in fig. 22, the present embodiment provides an intra prediction apparatus in video encoding and decoding, including: a first intra prediction mode determination unit 201, a second intra prediction mode determination unit 202, a third intra prediction mode determination unit 203, and an intra prediction unit 204.
The first intra prediction mode determining unit 201, configured to determine the first intra prediction mode of the image block, may perform, but is not limited to, step 101 in the first embodiment.
The second intra prediction mode determination unit 202 is configured to determine the second intra prediction mode of the image block according to the first intra prediction mode and the availability of the pixels on the left and right sides of the image block, and may specifically perform, but is not limited to step 102 in the first embodiment.
The third intra prediction mode determining unit 203 is configured to determine a third intra prediction mode for the image block according to the determined second intra prediction mode, the availability of pixels on left and right sides of the image block, and the shape of the image block, and may specifically perform, but is not limited to, step 103 in the first embodiment.
The intra-prediction unit 204 is configured to determine a prediction direction of the image block according to the determined third intra-prediction mode, and perform intra-prediction according to the determined prediction direction to obtain a prediction value of the image block, which may specifically be, but is not limited to, step 104 in the first embodiment. Further, the intra prediction unit may include a reference pixel determination subunit for determining a reference pixel for intra prediction according to a third intra prediction mode of the image block and a possibility of adjacent pixels on left and right sides of the image block.
The invention firstly adjusts the intra-frame prediction mode for the first time according to the availability of adjacent pixels on the left side and the right side of the current coding or decoding image block so as to ensure that reference pixels used in the subsequent intra-frame prediction process are available to the maximum extent, thereby improving the intra-frame prediction efficiency. After the step of the invention is adopted, the encoder can adopt flexible coding sequence without influencing the performance of intra-frame coding, thereby improving the coding performance of the whole encoder. Secondly, on the basis, the invention also expands the wide angle prediction technology, and gives out how to adjust the intra-frame prediction mode (namely the second intra-frame prediction mode adjustment in the invention) under the condition of adopting a right-to-left coding sequence, thereby enlarging the application range of the wide angle technology, organically combining the flexible coding sequence and the wide angle prediction technology, and further improving the coding performance of the coder. In addition, the invention also considers the special condition that the reference pixel is unavailable, and gives how to predict the current image block by using other available pixels under the condition that the original reference pixel is unavailable, thereby further improving the coding performance of the coder.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (13)

1. A method of intra prediction in video coding and decoding, comprising:
determining a first intra prediction mode for an image block;
if the first intra-frame prediction mode of the image block is a direction prediction mode, determining a second intra-frame prediction mode of the image block according to the first intra-frame prediction mode and the availability of pixels on the left side and the right side of the image block;
determining a third intra-frame prediction mode of the image block according to the second intra-frame prediction mode, the availability of pixels on the left side and the right side of the image block and the shape of the image block;
and carrying out intra-frame prediction on the image block according to the determined third intra-frame prediction mode.
2. The method of claim 1, wherein the determining the first intra prediction mode for the picture comprises:
the decoder determines a first intra-frame prediction mode of the current image block according to the code stream indication and a first intra-frame prediction mode of an adjacent decoded image block.
3. The method of claim 2, wherein the decoder determining the first intra prediction mode for the current image block based on the bitstream indication and the first intra prediction mode for the neighboring decoded image block comprises:
the decoder analyzes the code stream to obtain a first intra-frame prediction mode index value of the current image block, and determines a first intra-frame prediction mode of the current image block according to the index value and the first intra-frame prediction mode of the adjacent decoded image block.
4. The method according to any one of claims 1 to 3,
the availability of neighboring pixels of a side is "available" if a neighboring block of the side exists and has been encoded or decoded, or if a neighboring block of the side exists, has been encoded or decoded and is in the same slice as the current image block;
otherwise, the availability of the neighboring pixels of that side is "unavailable".
5. The method of claim 4, wherein determining the second intra prediction mode for the image block based on the first intra prediction mode and availability of pixels to the left and right of the image block comprises:
and deriving a second intra-frame prediction mode from the first intra-frame prediction mode of the image block according to the availability of pixels on the left side and the right side of the image block, wherein part of the first intra-frame prediction mode is adjusted and is used as the second intra-frame prediction mode of the image block, and the rest first intra-frame prediction modes are directly used as the second intra-frame prediction modes of the image block or are directly used as the second intra-frame prediction modes of the image block.
6. The method of claim 5, wherein deriving the second intra prediction mode from the first intra prediction mode for the image block based on availability of pixels on left and right sides of the image block comprises at least one of:
if the left side pixel and the right side pixel of the image block are available, the first intra-frame prediction mode is not adjusted, and the second intra-frame prediction mode of the image block is determined to be the first intra-frame prediction mode;
if the right side pixel and the left side pixel of the image block are available, adjusting part of the first intra-frame prediction mode, taking the adjusted prediction mode as a second intra-frame prediction mode of the image block, and directly taking the rest part of the first intra-frame prediction mode as the second intra-frame prediction mode of the image block;
if the pixels on the left side and the right side of the image block are unavailable, determining a second intra-frame prediction mode of the image as a first intra-frame prediction mode;
if the pixels on the left side and the right side of the current image block are unavailable, adjusting one part of the first intra-frame prediction mode to obtain a second intra-frame prediction mode of the current image block, and directly taking the other part of the first intra-frame prediction mode as the second intra-frame prediction mode of the current image block without adjustment;
if the pixels on the left side and the right side of the current image block are available, adjusting one part of the first intra-frame prediction modes to obtain a second intra-frame prediction mode of the current image block, and directly taking the other part of the first intra-frame prediction modes as the second intra-frame prediction mode of the current image block without adjusting.
7. The method of any one of claims 1 to 6, wherein the shape of the image block is an aspect ratio of the image block.
8. The method of claim 7, wherein determining the third intra prediction mode for the image block based on the second intra prediction mode, the availability of pixels on left and right sides of the image block, and the shape of the image block comprises:
if the current image block adopts left direction prediction or right direction prediction, adjusting part of the second intra-frame prediction modes, taking the adjusted prediction modes as third intra-frame prediction modes of the image block, and directly taking the rest second intra-frame prediction modes as the third intra-frame prediction modes of the image block; and/or the presence of a gas in the gas,
and if the current image block adopts bidirectional prediction, directly taking the second intra-frame prediction mode of the image block as a third intra-frame prediction mode of the image block.
9. The method according to claim 8, wherein the determining the prediction direction of the image block according to the determined third intra prediction mode and performing intra prediction according to the determined prediction direction to obtain the prediction value of the image block comprises at least one of:
if the image block adopts left prediction, using left adjacent pixels, upper right pixels, lower left pixels and an upper left corner pixel to perform intra-frame prediction, wherein when the width-to-height ratio of the image block is greater than 1, the number of the upper adjacent pixels is equal to the width W of the image block, the number of the left adjacent pixels is equal to the height H of the image block, the number of the upper right pixels is the width W of the image block plus an offset d, the number of the lower left pixels is equal to the height H of the image block, when the width-to-height ratio of the image block is less than 1, the number of the upper adjacent pixels is equal to the width W of the image block, the number of the left adjacent pixels is equal to the height H of the image block, the number of the upper right pixels is the width W of the image block, the number of the lower left pixels is equal to the height H of the image block;
if the image block adopts right direction prediction, using a right adjacent pixel, an upper left pixel, a lower right pixel and an upper right pixel to perform intra-frame prediction, when the aspect ratio of the image block is more than 1, the number of the upper adjacent pixel is equal to the width W of the image block, the number of the right adjacent pixel is equal to the height H of the image block, the number of the upper left pixel is the width W of the image block plus an offset d, the number of the lower right pixel is equal to the height H of the image block, when the aspect ratio of the image block is less than 1, the number of the upper adjacent pixel is equal to the width W of the image block, the number of the right adjacent pixel is equal to the height H of the image block, the number of the upper left pixel is the width W of the image block, the number of the lower right pixel is equal to the height H of the image block plus an offset d, wherein d;
and if the image block adopts bidirectional prediction, using a left adjacent pixel, a right adjacent pixel, an upper adjacent pixel, a left upper corner pixel and a right upper corner pixel, wherein the number of the left adjacent pixels is equal to the height H of the image block, the number of the right adjacent pixels is equal to the height H of the image block, and the number of the upper adjacent pixels is equal to the width W of the image block.
10. The method of claim 9,
if the image block adopts left direction prediction, when the left adjacent pixel is unavailable, replacing the left adjacent pixel by the upper left pixel, wherein the number of the upper left pixel used for replacing the left adjacent pixel is H; and/or
If the image block adopts right direction prediction, when a right adjacent pixel is unavailable, replacing the right adjacent pixel with an upper right pixel, wherein the number of the upper right pixels used for replacing the right adjacent pixel is H; and/or
If the image block adopts bidirectional prediction, when the left adjacent pixel is unavailable, the left adjacent pixel is replaced by the upper left pixel, the number of the upper left pixels used for replacing the left adjacent pixel is H, when the right adjacent pixel is unavailable, the right adjacent pixel is replaced by the upper right pixel, and the number of the upper right pixels used for replacing the right adjacent pixel is H.
11. An apparatus for intra prediction in video encoding/decoding, comprising
A first intra prediction mode determination unit for determining a first intra prediction mode of the image block;
the second intra-frame prediction mode determination unit is used for determining a second intra-frame prediction mode of the image block according to the first intra-frame prediction mode and the availability of the pixels on the left side and the right side of the image block under the condition that the first intra-frame prediction mode of the image block is a direction prediction mode;
a third intra prediction mode determination unit for determining a third intra prediction mode of the image block according to the second intra prediction mode, the availability of pixels on the left and right sides of the image block, and the shape of the image block;
and the intra-frame prediction unit is used for performing intra-frame prediction on the image block according to the determined third intra-frame prediction mode.
12. The apparatus of claim 11, wherein the intra prediction unit comprises a reference pixel determination subunit operable to determine a reference pixel for intra prediction according to a third intra prediction mode of the current image block and a possibility of adjacent pixels on left and right sides of the current image block.
13. A decoder or encoder comprising a memory for storing a computer program which, when executed by a processor, performs the steps of the method of any one of claims 1 to 11, and a processor.
CN201811160032.2A 2018-09-30 2018-09-30 Method and apparatus for intra prediction in video coding and decoding Active CN110971911B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811160032.2A CN110971911B (en) 2018-09-30 2018-09-30 Method and apparatus for intra prediction in video coding and decoding

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811160032.2A CN110971911B (en) 2018-09-30 2018-09-30 Method and apparatus for intra prediction in video coding and decoding

Publications (2)

Publication Number Publication Date
CN110971911A true CN110971911A (en) 2020-04-07
CN110971911B CN110971911B (en) 2023-09-19

Family

ID=70029056

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811160032.2A Active CN110971911B (en) 2018-09-30 2018-09-30 Method and apparatus for intra prediction in video coding and decoding

Country Status (1)

Country Link
CN (1) CN110971911B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023044618A1 (en) * 2021-09-22 2023-03-30 深圳市大疆创新科技有限公司 Encoding and decoding methods and apparatus

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1476253A (en) * 2003-07-04 2004-02-18 清华大学 Inframe coding frame coding method using inframe prediction based on prediction blockgroup
CN101854551A (en) * 2010-06-08 2010-10-06 浙江大学 Intra-frame prediction mode coding and decoding method and device
US20150319459A1 (en) * 2013-01-10 2015-11-05 Huawei Technologies Co., Ltd. Methods and apparatuses for coding and decoding depth map
WO2017160117A1 (en) * 2016-03-17 2017-09-21 세종대학교 산학협력단 Method and apparatus for processing intra-prediction-based video signal
CN107786874A (en) * 2016-08-24 2018-03-09 浙江大学 Directional prediction method and apparatus in two-way frame

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1476253A (en) * 2003-07-04 2004-02-18 清华大学 Inframe coding frame coding method using inframe prediction based on prediction blockgroup
CN101854551A (en) * 2010-06-08 2010-10-06 浙江大学 Intra-frame prediction mode coding and decoding method and device
US20150319459A1 (en) * 2013-01-10 2015-11-05 Huawei Technologies Co., Ltd. Methods and apparatuses for coding and decoding depth map
WO2017160117A1 (en) * 2016-03-17 2017-09-21 세종대학교 산학협력단 Method and apparatus for processing intra-prediction-based video signal
CN107786874A (en) * 2016-08-24 2018-03-09 浙江大学 Directional prediction method and apparatus in two-way frame

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023044618A1 (en) * 2021-09-22 2023-03-30 深圳市大疆创新科技有限公司 Encoding and decoding methods and apparatus

Also Published As

Publication number Publication date
CN110971911B (en) 2023-09-19

Similar Documents

Publication Publication Date Title
US10212452B2 (en) Method and apparatus for encoding and decoding image through intra prediction
US11265555B2 (en) Video encoding and decoding method
CN108028931B (en) Method and apparatus for adaptive inter-frame prediction for video coding and decoding
US20230239496A1 (en) Method and apparatus for encoding/decoding image
US20090310677A1 (en) Image encoding and decoding method and apparatus
US20130034166A1 (en) Image encoding method and image decoding method
KR101377528B1 (en) Motion Vector Coding and Decoding Method and Apparatus
BR112014004922B1 (en) Device for decoding movement information in fusion mode
BR112013025398B1 (en) METHOD TO DECODE AN IMAGE IN INTRA PREDICTION MODE
BR122013020552B1 (en) METHOD OF DECODING AN IMAGE
US20200228831A1 (en) Intra prediction mode based image processing method, and apparatus therefor
US20220191548A1 (en) Picture prediction method, encoder, decoder and storage medium
US20130301730A1 (en) Spatial domain prediction encoding method, decoding method, apparatus, and system
JP7311635B2 (en) Codec method, device and equipment therefor
MX2012009474A (en) Image encoding device, image decoding device, and data structure.
CN110971911B (en) Method and apparatus for intra prediction in video coding and decoding
JP7011571B2 (en) Image decoding device, image coding device, image decoding method and program
CN110337810B (en) Method and apparatus for video processing
GB2521117A (en) Method of encoding or decoding a video frame
JP2009005217A (en) Image encoding method, image decoding method, image encoding apparatus, image decoding apparatus, image encoding program, image decoding program, and computer readable recording medium
KR101144283B1 (en) Apparatus and method for concealing errors included in the decoded video
BR112021004690A2 (en) moving image code converting device, moving image code converting method, moving image decoding device and moving image decoding method
JP7299362B2 (en) Image decoding device, image encoding device, image decoding method and program
CN112055220B (en) Encoding and decoding method, device and equipment
KR101629999B1 (en) Apparatus and method for lossless video coding/decoding

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
GR01 Patent grant
GR01 Patent grant