Method, apparatus, device, medium and program product for video coding and decoding
By adapting the intra prediction direction according to the shape of the rectangular block in the video compression standard, the problem of mismatch between the prediction direction and the block shape in the prior art is solved, and the efficiency and performance of video compression are improved.
Patent Information
- Application Number
- CN202411647433.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2018-08-06
- Filing Date
- 2019-05-10
- Publication Date
- 2025-03-14
AI Technical Summary
In the existing video compression standards, the definition of intra prediction direction is independent of the block shape, resulting in the prediction direction in the rectangular block not adapting to the block shape, which reduces the compression performance.
By adapting intra-prediction directions according to the shape of the rectangular block, a more flexible predictive direction index and pattern mapping method is used to ensure that the predictive direction matches the block shape.
Improve the prediction efficiency of rectangular blocks and enhance video compression performance, especially when processing rectangular blocks to capture object directionality more accurately.
Smart Images

Figure CN119629335A_ABST
Abstract
Description
[0001] This application is a divisional application of the invention patent application with application date of May 10, 2019, application number 201980032249.1, and invention name “Block shape adaptive intra-frame prediction direction for quadtree-binarytree”. Technical Field
[0002] This aspect relates to video compression as well as video encoding and decoding. Background Art
[0003] In the HEVC (High Efficiency Video Coding, ISO / IEC 23008-2, ITU-T H.265) video compression standard, motion compensated temporal prediction is used to exploit the redundancy existing between consecutive pictures of a video.
[0004] To do this, a motion vector is associated with each prediction unit (PU). In the compressed domain, each coding tree unit (CTU) is represented by a coding tree. This is a quadtree partitioning of the CTU, where each leaf is called a coding unit (CU).
[0005] Each CU is then given some intra or inter prediction parameters (Prediction Info). To this end, it is spatially partitioned into one or more prediction units (PUs), each of which is assigned some prediction information. Intra or inter coding modes are assigned at the CU level.
[0006] In the JVET (Joint Video Exploration Team) proposal for a new video compression standard, known as the Joint Exploration Model (JEM), it has been proposed to accept a quadtree-binary tree (QTBT) block partition structure due to high compression performance. A block in a binary tree (BT) can be split into two sub-blocks of equal size by splitting it horizontally or vertically in the middle. Therefore, unlike blocks in QT where blocks always have a square shape with equal height and width, BT blocks can have a rectangular shape with unequal width and height. In HEVC, the angular intra-frame prediction directions are defined to be from 45 degrees to -135 degrees over a 180-degree angle, and these directions have been maintained in JEM, which makes the definition of the angular direction independent of the shape of the target block. Summary of the invention
[0007] The general aspects described herein address limitations and disadvantages of the prior art related to block shape adaptive intra prediction direction in encoding and decoding.
[0008] According to a first aspect, a method is provided. The method comprises the following steps: predicting a video sample belonging to a rectangular block based on at least one sample of a neighboring block arranged along a direction based on a block shape of the rectangular block; and encoding the rectangular block using intra prediction based on the predicted video sample.
[0009] According to another aspect, a second method is provided. The method comprises the steps of predicting a video sample belonging to a rectangular block based on at least one sample of an adjacent reconstructed block arranged along a direction based on a block shape of the rectangular block; and decoding the rectangular block using intra prediction based on the predicted video sample.
[0010] According to another aspect, a device is provided. The device includes a memory and a processor. The processor can be configured to encode a block of a video or decode a bitstream by executing any one of the aforementioned methods.
[0011] According to another general aspect of at least one embodiment, there is provided an apparatus comprising the device according to any decoding embodiment; and at least one of: (i) an antenna configured to receive a signal comprising a video block; (ii) a band limiter configured to limit the received signal to a frequency band comprising the video block; or (iii) a display configured to display an output.
[0012] According to another general aspect of at least one embodiment, there is provided a non-transitory computer-readable medium containing data content generated according to any of the described encoding embodiments or variations.
[0013] According to another general aspect of at least one embodiment, there is provided a signal comprising video data generated according to any of the described encoding embodiments or variations.
[0014] According to another general aspect of at least one embodiment, a bitstream is formatted to include data content generated according to any of the described encoding embodiments or variations.
[0015] According to another general aspect of at least one embodiment, there is provided a computer program product comprising instructions which, when executed by a computer, cause the computer to implement any of the described decoding embodiments or variations.
[0016] According to a second aspect, a method is provided, the method comprising: predicting video samples belonging to a rectangular block based on at least one sample of an adjacent reconstructed block arranged along a direction based on a block shape of the rectangular block, wherein a greater number of prediction directions are available along a longer side of the rectangular block than along a shorter side of the rectangular block; and encoding the rectangular block using intra-frame prediction based on the predicted video samples, wherein a mapping of a normal mode to a wide-angle mode is performed at a prediction stage and the mapping is based on a ratio of a block width to a block height corresponding to a prediction direction of the coded rectangular block, wherein a fixed number of prediction directions are available. The index is used to indicate a range of intra-frame prediction directions, the total number of intra-frame prediction directions is fixed, when a first value corresponding to the shape of the rectangular block is used to map the angle prediction mode to the wide-angle mode, the range of the intra-frame prediction direction is adapted to the shape of the rectangular block and the range of the intra-frame prediction direction exceeds the prediction direction of the square block, and wherein the number of wide-angle prediction modes used depends on the shape of the rectangular block, the length of the reference sample array above the rectangular block is 2W+1 and the height of the reference sample array on the left side of the rectangular block is 2H+1, where W is the width of the rectangular block and H is the height of the rectangular block.
[0017] According to a third aspect, a device for encoding a video block is provided, the device comprising: a memory, and a processor, the processor being configured to: predict a video sample belonging to the rectangular block based on at least one sample of an adjacent reconstructed block arranged along a direction based on a block shape of the rectangular block, wherein a greater number of prediction directions are available along a longer side of the rectangular block than along a shorter side of the rectangular block; and encode the rectangular block using intra-frame prediction based on the predicted video sample, wherein mapping of a normal mode to a wide-angle mode is performed at a prediction stage, and the mapping is based on a block width corresponding to a prediction direction of the coded rectangular block and a A method for mapping an angular prediction mode to a wide-angle mode according to the present invention, wherein a fixed number of prediction indices are used to indicate a range of intra-frame prediction directions, the total number of intra-frame prediction directions is fixed, when a first value corresponding to the shape of the rectangular block is used to map the angular prediction mode to the wide-angle mode, the range of the intra-frame prediction directions is adapted to the shape of the rectangular block and the range of the intra-frame prediction directions exceeds the prediction direction of the square block, and wherein the number of wide-angle prediction modes used depends on the shape of the rectangular block, the length of the reference sample array above the rectangular block is 2W+1 and the height of the reference sample array to the left of the rectangular block is 2H+1, where W is the width of the rectangular block and H is the height of the rectangular block.
[0018] According to a fourth aspect, a method is provided, the method comprising: predicting video samples belonging to a rectangular block based on at least one sample of an adjacent reconstructed block arranged along a direction based on a block shape of the rectangular block, wherein a greater number of prediction directions are available along a longer side of the rectangular block than along a shorter side of the rectangular block; and decoding the rectangular block using intra-frame prediction based on the predicted video samples, wherein a mapping of a normal mode to a wide-angle mode is performed at a prediction stage and the mapping is based on a ratio of a block width to a block height corresponding to a prediction direction of the decoded rectangular block, wherein a fixed number of prediction directions are available. The index is used to indicate a range of intra-frame prediction directions, the total number of intra-frame prediction directions is fixed, when a first value corresponding to the shape of the rectangular block is used to map the angle prediction mode to the wide-angle mode, the range of the intra-frame prediction direction is adapted to the shape of the rectangular block and the range of the intra-frame prediction direction exceeds the prediction direction of the square block, and wherein the number of wide-angle prediction modes used depends on the shape of the rectangular block, the length of the reference sample array above the rectangular block is 2W+1 and the height of the reference sample array on the left side of the rectangular block is 2H+1, where W is the width of the rectangular block and H is the height of the rectangular block.
[0019] According to a fifth aspect, a device for decoding a video block is provided, the device comprising: a memory, and a processor, the processor being configured to: predict a video sample belonging to the rectangular block based on at least one sample of an adjacent reconstructed block arranged along a direction based on a block shape of the rectangular block, wherein a greater number of prediction directions are available along a longer side of the rectangular block than along a shorter side of the rectangular block; and decode the rectangular block using intra-frame prediction based on the predicted video sample, wherein mapping of a normal mode to a wide-angle mode is performed at a prediction stage, and the mapping is based on a block width corresponding to a prediction direction of the decoded rectangular block and A method for mapping an angular prediction mode to a wide-angle mode according to the present invention, wherein a fixed number of prediction indices are used to indicate a range of intra-frame prediction directions, the total number of intra-frame prediction directions is fixed, when a first value corresponding to the shape of the rectangular block is used to map the angular prediction mode to the wide-angle mode, the range of the intra-frame prediction directions is adapted to the shape of the rectangular block and the range of the intra-frame prediction directions exceeds the prediction direction of the square block, and wherein the number of wide-angle prediction modes used depends on the shape of the rectangular block, the length of the reference sample array above the rectangular block is 2W+1 and the height of the reference sample array to the left of the rectangular block is 2H+1, where W is the width of the rectangular block and H is the height of the rectangular block.
[0020] According to a sixth aspect, a device is provided, comprising: an apparatus according to the third or fifth aspect above; and at least one of the following: (i) an antenna configured to receive a signal, the signal including the video block, (ii) a band limiter configured to limit the received signal to a frequency band including the video block, and (iii) a display configured to display output.
[0021] According to a seventh aspect, a non-transitory computer-readable medium is provided, on which instructions are stored, and when the instructions are executed by a processor, the processor executes the method as described in the second or fourth aspect above.
[0022] According to an eighth aspect, a computer program product is provided, which comprises instructions. When the instructions are executed by a computer, the computer is caused to perform the method according to the second or fourth aspect.
[0023] These and other aspects, features and advantages of the general aspects will become apparent from the following detailed description of exemplary embodiments, which is to be read in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 A square target block is shown with its top and left reference arrays.
[0025] Figure 2 Rectangular target blocks (flat blocks on the left, tall blocks on the right) and their top and left reference arrays are shown.
[0026] Figure 3 Rectangular target blocks (flat blocks on the left, tall blocks on the right) and their top and left reference arrays are shown.
[0027] Figure 4 The properties of the rectangular block are shown.
[0028] Figure 5 The definition of the prediction direction of a rectangular block is shown.
[0029] Figure 6 The top reference array is shown to have a length of 2W+1 and the left reference array to have a length of 2H+1.
[0030] Figure 7 It is shown that blocks with the same block shape or aspect ratio have the same prediction direction and therefore the same modeShift.
[0031] Figure 8 An example derivation of the angle parameter A for directions exceeding -135 degrees from vertical is shown.
[0032] Figure 9ashows the dirIndex (shown as dir#) associated with different directions, and Figure 9b An example of reduced prediction directions is shown.
[0033] Fig.10 The encoder and decoder flow chart of the LUMA block in Example 1 is shown.
[0034] Fig.11 The encoder and decoder flow chart of the LUMA block in Example 2 is shown.
[0035] Fig.12 A general encoding embodiment to which the present embodiment can be applied is shown.
[0036] Fig.13 A general decoding embodiment to which the present embodiment can be applied is shown.
[0037] Fig.14 A block diagram of an exemplary communication channel is shown in which various aspects and exemplary embodiments are implemented.
[0038] Fig.15 One embodiment of a method for encoding under the generally described aspects is shown.
[0039] Fig.16 One embodiment of a method for decoding under the generally described aspects is shown.
[0040] Fig.17 One embodiment of an apparatus for encoding or decoding under the generally described aspects is shown. DETAILED DESCRIPTION
[0041] In the JVET (Joint Video Exploration Team) proposal for a new video compression standard, known as the Joint Exploration Model (JEM), it has been proposed to accept a quadtree-binary tree (QTBT) block partition structure due to high compression performance. A block in a binary tree (BT) can be split into two sub-blocks of equal size by splitting it horizontally or vertically in the middle. Therefore, unlike blocks in a quadtree (QT) where blocks always have a square shape with equal height and width, BT blocks can have a rectangular shape with unequal width and height. In HEVC, the angular intra prediction direction is defined as from 45 degrees to -135 degrees over an angle of 180 degrees, and these directions have been maintained in JEM, which makes the definition of the angular direction independent of the shape of the target block. However, since the idea of partitioning a coding tree unit (CTU) into CUs is to capture an object or a part of an object, and the shape of the block is associated with the directionality of the object, it makes sense to adapt the defined prediction direction according to the block shape for higher compression efficiency. In this context, the general aspects described propose to redefine the intra prediction direction of a rectangular target block.
[0042] The general aspects described herein aim to improve the compression performance of conventional video by improving intra prediction using a QTBT structure. It proposes to adapt the intra prediction directions according to the shape of the CU. If the shape of the CU is square, the directions already defined in JEM remain unchanged. Otherwise, the search directions are modified according to the shape of the CU. However, the total number of angular directions used for any CU remains unchanged. The purpose of adapting the prediction direction to the block shape is to improve the prediction accuracy over the currently defined set of prediction directions, which is independent of the block shape.
[0043] In addition, since the total number of prediction directions for the target CU remains unchanged, the encoding and decoding of prediction modes using the MPM (Most Probable Mode) set remains unchanged. However, since CUs with different shapes have different defined sets of directions, the prediction modes of neighboring blocks are mapped to the prediction mode of the target block. The mapping is only a re-index of the mode, but the actual prediction direction does not change.
[0044] In HEVC (High Efficiency Video Coding, H.265), the encoding of video sequence frames is based on a quadtree (QT) block partition structure. Frames are divided into square coding tree units (CTUs), all of which are partitioned into multiple coding units (CUs) based on a quadtree-based partitioning based on a rate-distortion (RD) criterion. Each CU is intra-predicted (i.e., spatially predicted from causally adjacent CUs) or inter-predicted (i.e., temporally predicted from an already decoded reference frame). In I slices, all CUs are intra-predicted, while in P and B slices, CUs can be intra-predicted or inter-predicted. For intra prediction, HEVC defines 35 prediction modes, including one plane mode (indexed as mode 0), one DC mode (indexed as mode 1), and 33 angular modes (indexed as modes 2-34). The angular mode is associated with a prediction direction ranging from 45 degrees to -135 degrees in a clockwise direction. Since HEVC supports a quadtree (QT) block partition structure, all prediction units (PUs) have a square shape. Therefore, from the perspective of PU (prediction unit) shape, the definition of prediction angles from 45 degrees to -135 degrees is reasonable. For a target prediction unit of size N×N pixels, the top reference array and the left reference array are each of size 2N+1 samples, which is required to cover the above angle range of all target pixels. Considering that the height and width of the PU are equal lengths, it also makes sense that the lengths of the two reference arrays are equal.
[0045] For the next generation video coding standard, JVET proposed 65 angular intra prediction modes in addition to the planar and DC modes as an attempt of the Joint Exploration Model (JEM). However, the prediction directions are defined over the same angular range, i.e., from 45 degrees to -135 degrees in the clockwise direction. For a target block of size WXH pixels, the top reference array and the left reference array are each of size (W+H+1) pixels, which is required to cover the above angular range of all target pixels. This definition of angles in JEM is more for simplicity than for any other specific reason. However, doing so introduces some inefficiencies.
[0046] In JEM, due to higher compression performance, it has been proposed to use a Quadtree-Binary Tree (QTBT) block partitioning structure instead of only using the quadtree structure. Different from QT blocks (which are always square-shaped), BT blocks can be rectangles with unequal width and height due to horizontal or vertical binary splitting. In the current JEM code, the aspect ratio of rectangular blocks can vary from 2:1 to 8:1. Therefore, the idea of different angular prediction modes is to capture different object directivities, and the idea of partitioning a CTU into CUs is to capture an object or a part of an object with such directivity. Therefore, the shape of the target block is structurally related to the directivity of the object in the block. If the shape of the block is rectangular, some prediction directions may be more likely to occur than others, and thus, the definition of prediction directions should not be independent of the target block shape, which is the case in JEM.
[0047] In the case of a square block, there is structural symmetry. As Figure 1 shown, the square block is symmetric not only along both the height and width, but also symmetrically placed with respect to the two reference arrays.
[0048] Figure 1 shows a square target block and its top and left reference arrays. The target block is symmetrically placed with respect to the two reference arrays. The prediction directions are defined from 45 degrees to -135 degrees in the clockwise direction, where mode 2 corresponds to the 45-degree angle and mode 66 corresponds to the -135-degree angle.
[0049] In the case of a rectangular block, it is not the case with the currently defined directions. When the block is wide (i.e., W>H), it is placed closer to the top reference array but is not symmetric. Similarly, when the block is tall (i.e., W<H), it is placed closer to the left reference array but is not symmetric. Figure 2 shows this asymmetry.
[0050] Figure 2 shows rectangular target blocks (a wide block on the left, a tall block on the right) and their top and left reference arrays. The target blocks are not symmetrically placed with respect to the two reference arrays.
[0051] The consequence of this asymmetry is that for some prediction modes, the target pixel will be predicted from the more distant reference arrays to the exclusion of the closer reference arrays due to the defined angle. Figure 3 Shown in.
[0052] Figure 3 Rectangular target blocks (flat block on the left, tall block on the right) and their top and left reference arrays are shown. On the left, target pixel A has a predictor sample L with a horizontal prediction direction on the left reference array. Although sample T on the top reference array is closer, it is a vertical prediction direction, so that T is not allowed to be a predictor sample for A in JEM. The right figure shows a similar situation for a target pixel in the tall block.
[0053] The flatter or taller the block (ie, the higher the ratio of long side to short side), the more pronounced this asymmetry is. Due to the inaccuracy of the prediction, it can be seen from the actual test results that this predicted pattern becomes unlikely.
[0054] Another argument for inefficiency in the currently defined directions is that the number of prediction directions is equal in horizontal and vertical directions. In JEM, there are 32 modes in both horizontal and vertical directions, except for the diagonal mode (mode 34). For square CUs with equal height and width, it makes sense to have the same number of prediction modes along the horizontal and vertical directions. When the block is rectangular with one side longer than the other, the number of prediction directions should be higher in the longer side, simply because the number of structural directionalities may be higher in that side. For flat blocks, the ratio of the number of vertical to horizontal modes should be approximately the ratio of width to height. Similarly, for tall blocks, the ratio of the number of horizontal to vertical modes should be approximately the ratio of height to width. A related point to consider is the length of the reference arrays. For square CUs with equal height and width, it makes sense for the reference arrays to have the same length. However, for rectangular blocks, intuitively, if the width is greater than the height, the top reference array should have more samples than the left reference array.
[0055] Similarly, for blocks that are taller than they are wide, the left reference array should have more samples than the top reference array. This intuition is based on the fact that a flat (tall) rectangular block has more samples or information in the horizontal (vertical) direction. Likewise, a tall rectangular block has more samples or information in the vertical direction. Therefore, the currently defined directions from 45 degrees to -135 degrees (resulting in an equal number of prediction modes and equal length reference arrays in the horizontal and vertical directions) are somewhat inefficient for rectangular blocks.
[0056] To address the above issues and improve the prediction efficiency for rectangular blocks, a systematic approach to define and index angular prediction modes for various block shapes is proposed below. Then, in the next section, the proposed changes in prediction mode coding to support this mode definition are presented.
[0057] In JEM, BT (binary tree) target blocks can have different shapes depending on the length of their width and height. In order to define a mode that depends on the block shape, a general method is given below. In this method, the number of prediction modes for any block is the same as in JEM, but the prediction direction can be different for blocks of different shapes. In addition, square blocks are just special cases with equal height and width, in which case nothing changes. In other words, for square target blocks, the prediction mode and the associated prediction direction remain unchanged.
[0058] A rectangle is defined by its width W and height H, as Figure 4 If A, B, C and D represent its four vertices as shown in the figure, then AC is its main diagonal and BD is its secondary diagonal. A square is a special rectangle when W=H. Figure 4 The properties of the rectangular block are shown.
[0059] For any target block of width W and height H, along the minor diagonal, mode 2 will be associated with the direction from vertex D toward vertex B, and mode 66 will be associated with the direction from vertex B toward vertex D, as Figure 5 As shown. The diagonal mode is associated with the direction along the main diagonal from vertex A towards vertex C. All modes from mode 2 up to the diagonal mode will be referred to as left modes. Similarly, all modes from the diagonal mode to mode 66 (including the diagonal mode) will be referred to as top modes. The left mode is associated with the horizontal direction. Similarly, the top mode is associated with the vertical direction. The horizontal mode or pure horizontal mode is the left mode corresponding to the zero degree angle. The vertical mode or pure vertical mode is the top mode corresponding to the -90 degree angle.
[0060] Figure 5 The definition of the prediction direction for a rectangular block is shown. Mode 2 is along the minor diagonal from vertex D towards vertex B. Mode 66 is along the opposite direction of mode 2. The diagonal mode is along the major diagonal from vertex A towards vertex C.
[0061] Figure 6 The top reference array is shown to have a length of 2W+1 and the left reference array has a length of 2H+1. The width W and height H are Figure 6 The size of the medium white block.
[0062] To support these predictions, Figure 6The figure shows that a top reference of length 2W+1 and a left reference of length 2H+1 are defined. In the case of a square block, this figure will be the same as Figure 1 The same as in, where W=H=N.
[0063] Note that for the flat block, the length of the top reference is greater than the length of the left reference array. The same is true for the number of top patterns compared to the left patterns. Similarly, for the tall block, the opposite is true. In that case, the length of the left reference is greater than the length of the top reference array.
[0064] Moreover, the position of the blocks is symmetric with respect to the reference array. When the target blocks are square, there is perfect symmetry and the prediction direction and the length of the reference array exactly match the JEM definition, as Figure 1 shown.
[0065] The beauty of the above definition lies in the adaptability of the prediction direction to the block shape. Note that here, modes 2 and 66 are not defined to correspond to directions along angles 45 degrees and -135 degrees, but to directions along the sub-diagonals. In the case of flat blocks, some directions around (including) 45 degrees are removed, but exactly the same number of directions are added in the opposite direction beyond the -135 degree angle. Similarly, in the case of tall blocks, some directions around (including) -135 degrees are removed, but exactly the same number of directions are added in the opposite direction beyond the 45 degree angle. We call the offset of mode 2 from the 45 degree angle "modeShift", which is defined as the number of modes removed (between mode 2 and the 45 degree angle), or equivalently, the number of modes added (between the angle -135 degrees and mode 66). Flat blocks have a positive modeShift, while tall blocks have a negative modeShift. For square blocks, modeShift is equal to 0.
[0066] The modeShift of a block represents the offset of its starting mode (i.e., mode 2) relative to the starting mode of a square block. Clearly, it is a function of the block shape. An important observation to make is that the modeShift of a block does not depend on the absolute values of its width and height, but on their ratio. This is in Figure 7 . Rectangle ABCD (width W1 and height H1) and rectangle EFGH (width W2 and height H2) have the same prediction direction (thus, the same modeShift). Using the similarity of triangles, it can be shown that W1 / W2=H1 / H2. Therefore, W1 / H1=W2 / H2. Therefore, blocks with the same aspect ratio (and vice versa) will have the same prediction mode in both horizontal and vertical directions.
[0067] Figure 7Blocks with the same aspect ratio (width-to-height ratio) are shown to have the same prediction direction and thus the same modeShift.
[0068] The mode number (2 - 66) is just an index or label for the prediction direction. The corresponding direction is specified by the angular parameter A in HEVC and JEM. The A values for different prediction modes in JEM are shown in Table 1.
[0069] The angular parameter for directions introduced beyond 45 degrees or -135 degrees can be easily derived from the angular parameter in the opposite direction. Consider Figure 8 , where the target pixel is predicted vertically along a prediction direction beyond -135 degrees. Let W and H represent the width and height of the block. Denote the coordinates of the target pixel as (x, y), where 0 <= x < W and 0 <= y < H. The horizontal displacement between the predictor sample on the top reference array and the target sample is given by Δ x . If the prediction direction extends to intersect with the left reference array, the vertical displacement between the intersection point and the target sample is Δ y .
[0070] Figure 8 is an example of deriving the angular parameter A for vertical directions beyond -135 degrees. Δ x is the horizontal displacement of the predictor for the target pixel at (x, y). If the prediction is in the opposite direction (which is horizontal), the predictor will have a vertical displacement Δ y .
[0071] Using the similarity of triangles, we get:
[0072]
[0073] Horizontal direction:
[0074]
[0075] Table 1: Angular parameter A defined in JEM
[0076] A 1 2 3 5 7 9 11 13 15 17 19 21 23 26 29 32 <![CDATA[A n ]]> 1024 512 341 205 146 114 93 79 68 60 54 49 45 39 35 32
[0077] Table 2: Angular parameter for the opposite angle corresponding to the positive A value.
[0078] As used in JEM, the calculations here use the fact that with a (1 / 32) sample resolution, the distance between two nearest samples is (1 << 5). After simplification, we get:
[0079] Δ x Δ y = ((1 + x)(1 + y) << 10)
[0080] The predicted angle is related to the y =(1+x)A is opposite to the horizontal direction, where A represents the value of the angle parameter used in the horizontal direction. Substituting into the above formula, we get:
[0081] Δ x A=((1+y)<<10),
[0082] or,
[0083] Therefore, the angle parameter for the vertical direction is given by
[0084]
[0085] where A is the angle parameter in the opposite direction. Since A has only integer values, for A n , the above expression may result in fractional values. Therefore, round the value to the nearest integer:
[0086]
[0087] The same expression is obtained if the horizontal direction is considered at an angle exceeding 45 degrees.
[0088] In this case, A will represent the angle parameter of the opposite vertical direction. Note that regardless of the BT block shape, if the block is rectangular, the newly introduced direction is exactly opposite to the removed direction (within rounding). Therefore, the A parameter of the removed direction can be used to calculate the A parameter of the newly introduced opposite direction. Both the removed direction and the newly introduced direction are always positive (positive horizontal or positive vertical). Therefore, they have positive A parameter values. Table 2 lists the positive A values in JEM and the A calculated as above. n The corresponding value of .
[0089] Using the values of Table 2, the angle parameters for different flat block shapes are given below. The angle parameters for tall blocks can be derived in a similar manner, but are not shown here. Before specifying the table, two points need to be noted. First, as shown in the table above, JEM specifies angles for discrete angular directions. Therefore, the starting and ending directions may not exactly match the sub-diagonal. Similarly, a direction may not exactly match the diagonal direction. In this case, there is no need to change the specified direction in JEM, and the proposed method will use the nearest direction for this purpose. Secondly, in JEM, for BT blocks, the ratio of the length of the longer side to the shorter side can only have values 1, 2, 4, and 8. When the ratio is equal to 1, it is a square block, in which case the direction remains unchanged. Therefore, the A values of the blocks corresponding to the mode numbers when W / H (width / height) is only equal to 2, 4, and 8 are given below. As the W / H value increases, the number of horizontal directions decreases and the number of vertical directions increases. Thus, for W / H equals 4, the vertical direction from W / H equals 2 is reused, and for W / H equals 8, the vertical direction for W / H equals 4 is reused. These are shown in bold in the table. By convention, diagonal patterns in the vertical direction are included. Note that for higher W / H ratios such as 16 and 32 (which may be allowed in future changes to JEM or any standard), a similar approach can be as follows.
[0090] Case 1: W / H = 2
[0091] modeShift=6
[0092] Number of horizontal directions (left mode) = 20
[0093] Number of vertical directions (top mode) = 2*6+33 = 45
[0094] Note that in Table 3, the directions corresponding to modes 22-27 were already defined in JEM as horizontal directions. Here, they are grouped in the vertical directions because the diagonal directions now correspond to mode 22. The A parameter values must be recalculated based on the displacement along the top edge of the block.
[0095] Case 2: W / H = 4
[0096] modeShift: 10
[0097] Number of horizontal directions (left mode) = 12
[0098] Number of vertical directions (top mode) = 2*4+45 = 53
[0099]
[0100] Table 3: Angular parameter A for flat blocks when W / H equals 2.
[0101]
[0102]
[0103] Table 4: Angular parameter A for flat blocks when W / H equals 4.
[0104] Note that in Table 4, the directions corresponding to modes 14-17 have been defined in JEM as horizontal directions. Here, they have been grouped in the vertical directions because the diagonal directions now correspond to mode 14.
[0105] Case 3: W / H = 8
[0106] modeShift: 12
[0107] Number of horizontal directions (left mode) = 8
[0108] Number of vertical directions (top mode) = 2*2+53 = 57
[0109] Note that in Table 5, the directions corresponding to modes 10-11 have been defined in JEM as horizontal directions. Here, they have been grouped in the vertical directions because the diagonal directions now correspond to mode 10.
[0110] As can be seen in the table, the mode index will always vary between 2-66, regardless of the block shape. However, for different blocks, the same mode index can correspond to different prediction directions. Therefore, in order to distinguish between them, it is proposed to introduce a parameter called dirIndex, which is defined as:
[0111] dirIndex=modeIndex+modeShift–2……… (1)
[0112] dirIndex corresponds to only one prediction direction and vice versa. Table 6 shows the dirIndex range and modeShift value for different target block shapes.
[0113] Figure 9a The prediction directions specified by the direction index (such as dir#) are shown. There are 89 possible prediction directions in total, spanning angles greater than 180 degrees. Although the total number of directions is greater than 65, for any given target block, only 65 neighboring directions are checked for prediction. These 65 directions span 180 degrees along the line. The directions are adapted to the target block size to check a greater or lesser number of directions in the vertical or horizontal directions.
[0114] In JEM's prediction direction definition, there is only one pair of directions (dir#0 and dir#64) that are completely opposite to each other. Note that there is now a series of completely opposite pairs of directions. For any direction with an index less than or equal to 0, or greater than or equal to 64,
[0115]
[0116] Table 5: Angular parameter A for flat blocks when W / H equals 8.
[0117] W / H Range of dirIndex modeShift 1 0:64 0 2 6:70 6 4 10:74 10 8 12:76 12 1 / 2 -6:58 -6 1 / 4 -10:54 -10 1 / 8 -12:52 -12
[0118] Table 6: modeShift and dirIndex for different block shapes
[0119] The opposite direction is included in the set of all possible directions. However, for any given target block, only the directions corresponding to mode 2 and mode 66 are opposite. Directions with dirIndex less than or equal to 0 correspond to positive horizontal directions exceeding an angle of 45 degrees, which have positive A values. Similarly, directions with dirIndex greater than or equal to 64 correspond to positive vertical directions exceeding an angle of -135 degrees, which have positive A values.
[0120] Figure 9a The dirIndex (shown as dir#) associated with different directions is shown. For a square block, dirIndex varies from 0 to 64, corresponding to 65 directions defined from 45 degrees to -135 degrees. For a flat block, dirIndex is greater than 64 for some vertical directions, depending on the shape. Similarly, for a tall block, dirIndex is less than 0 for some horizontal directions, depending on the shape.
[0121] The number of directions can also be limited or expanded beyond the number given above. Consider Figure 9b The hypothetical case of 33 HEVC directions in 16-bit HEVC is taken and the operation is restricted to the two modes that are closest to the diagonal mode. In this case, if the block width is larger than its height, then Mode 2 and Mode 3 will be the horizontal modes that are removed. In addition, Mode 3 and Mode 4 will have an additional flag that indicates whether to use the traditional mode or the flipped wide angle direction with the newly created Mode 35 and Mode 36, which are new vertical modes that take into account the new prediction direction.
[0122] In the above definition of the angle parameter A, the diagonal direction has been changed according to the block shape. However, this is not a mandatory requirement. The change of the diagonal pattern only converts some horizontal negative directions to vertical negative directions and vice versa. The conversion makes the new direction have a new angle parameter A. nBecause in deriving the angle parameter A n There is rounding involved, so these angles may be different from the original angles associated with the original negative directions before the conversion. However, they will be very close. Therefore, the change in the diagonal pattern will not basically increase the performance gain too much. It is the wide angles in the positive directions (positive vertical for flat blocks and positive horizontal for tall blocks) that are added to replace some important existing positive directions (positive horizontal for flat blocks and positive vertical for tall blocks). Therefore, for all practical purposes, the original diagonal directions can remain unchanged. In Tables 3, 4 and 5, this will involve moving the patterns from the vertical side to the horizontal side and replacing their A values with the old A values. This means that for all tables, the last column of the horizontal pattern will have an A value equal to 29, and the first column of the vertical pattern will have an A value equal to -32. Keeping the diagonal pattern unchanged will also meet the following goals: adding new wide angle directions (just over -135 degrees for flat blocks and over 45 degrees for tall blocks). Tables for various W / H ratios are given in Tables 3-b, 4-b and 5-b below.
[0123]
[0124]
[0125] Table 3-b: Angle parameter A for flat blocks in case of W / H = 2. ModeShift = 6, number of horizontal directions = 32-6 = 26, number of vertical directions = 6+33 = 39
[0126]
[0127] Table 4-b: Angle parameters A for flat blocks in case of W / H = 4. ModeShift = 10, number of horizontal directions = 32-10 = 22, number of vertical directions = 10+33 = 43.
[0128]
[0129] Table 5-b: Angle parameter A for flat blocks in case of W / H = 8. ModeShift = 12, number of horizontal directions = 32-12 = 20, number of vertical directions = 12+33 = 45
[0130] To support new prediction directions, the length of the reference arrays needs to be adjusted. As already mentioned before, with the proposed prediction method, the length of the top reference array is 2*W+1, while the length of the left reference array is 2*H+1, where W and H represent the width and height of the target block. However, since the directions defined for different block shapes do not match the block shape in an exact way, the shorter reference array needs to be expanded by a few samples. The longer reference array is of sufficient size to support the directions defined on its side. This is explained below.
[0131] Consider first the case where W>H. Referring to Tables 3, 4, and 5, note that the angle parameter A corresponding to mode index 2 is equal to ((H*32) / W)+1. Therefore, for W / H equal to 2, 4, and 8, the angle parameter A is equal to 17, 9, and 5, respectively. For a given value of A, the portion of the reference array that supports prediction of W samples along any row is equal to (A*W+31)>>5. Applying this to the last row of the target block, using the above angles, requires 1+H+((A*W+31)>>5) reference samples on the left reference array. Therefore, the required dilation on the left reference array is given by:
[0132] H_Ext=1+H+((A*W+31)>>5)–(1+2*H)=((A*W+31)>>5)–H.
[0133] Substituting the A value corresponding to mode 2, the above expression can be simplified to:
[0134] H_Ext=(W+31)>>5
[0135] The following gives the H_Ext values for different block sizes. It is assumed here that the maximum block size is 128, as used in JEM. Also, it is assumed that the maximum value of (W / H) is equal to 8.
[0136] 4×8:H_Ext=1 8×16:H_Ext=1 16×32:H_Ext=1 32×64:H_Ext=2
[0137] 4×16:H_Ext=1 8×32:H_Ext=1 16×64:H_Ext=2 32×128:H_Ext=4
[0138] 4×32:H_Ext=1 8×64:H_Ext=2 16×128:H_Ext=4 64×128:H_Ext=4
[0139] When H>W, the top reference needs to be expanded by a few samples. The number of samples can be derived in a similar way:
[0140] W_Ext=1+W+((A*H+31)>>5)–(1+2*W)=((A*H+31)>>5)–W
[0141] Due to the symmetry of the angle parameter A, the value of A here is the same as for the case where W>H. The angle parameter corresponding to mode index 66 will be equal to ((W*32) / H+1. Using this value, the above expression can be simplified to:
[0142] W_Ext=(H+31)>>5.
[0143] The following gives the W_Ext values for different block sizes. It is assumed here that the maximum block size is 128, as used in JEM. Also, it is assumed that the maximum value of (H / W) is equal to 8.
[0144] 8×4:W_Ext=1 16×8:W_Ext=1 32×16:W_Ext=1 64×32:W_Ext=2
[0145] 16×4:W_Ext=1 32×8:W_Ext=1 64×16:W_Ext=2 128×32:W_Ext=4
[0146] 32×4:W_Ext=1 64×8:W_Ext=2 128×16:W_Ext=4 128×64:W_Ext=4
[0147] For higher aspect ratios or height-to-width ratios, the dilation values H_Ext and W_Ext can be calculated in the same way.
[0148] The above expansion is the minimum number of additional samples required on the shorter reference array. However, for implementation advantages, it may be preferred to take an additional number of reference samples compared to the minimum number required to support all prediction angles. In the following, several variations are provided.
[0149] In one variation, the number of samples on the top reference array or the left reference array is equal to 2*max(W,H)+1, where if W>=H, then max(W,H)=W, otherwise max(W,H)=H.
[0150] In another variation, the number of samples on the top reference array is W+max(W,H)+1, while the number of samples on the left reference array is equal to H+max(W,H)+1.
[0151] The number of samples on the longer reference array is sufficient, but not always necessary. In some cases, there are some redundant samples in the longer reference array that are not used for any prediction mode. Therefore, the number of reference samples on the longer side can be reduced. In another variant, if W>H, the number of samples on the left reference is equal to (2*H+1+d_h), and the number of samples on the top reference array is equal to (2*W+1-d_h), where the parameter d depends on the block size. For example, if W=8 and H=4, then d_h=0, otherwise d_h=H_ext. If H>W, the number of samples on the left reference is equal to (2*H+1-d_w), and the number of samples on the top reference array is equal to (2*W+1+d_w), where the parameter d_w depends on the block size. For example, if H=8 and W=4, then d_w=0, otherwise d_w=W_ext. The advantage of this variant is that the total number of samples on both reference arrays (excluding the copy of the top left sample) remains approximately 2*W+2*H+1, which is equal to the total number of reference samples for a square target block.
[0152] In the case where the number of wide angles is limited to a certain maximum value due to hardware or system constraints, the required number of additional samples can be calculated exactly in the same way as given above, using the angle parameter corresponding to mode index 2 if W>H or mode index 66 if H>W. In "CE3-related: Wide angle intraprediction for non-square blocks, JVET-K0500, Ljubljana, SI, 10-18 July 2018", the maximum number of wide angles is 10, which corresponds to W / H=4 or H / W=4. For higher W / H (or H / W) values, the number of wide angles is still 10, and they are exactly the same as for W / H=4 (or H / W=4). Due to this limitation, the total number of additional reference samples required as an expansion on the shorter reference side can exceed only 4 samples.
[0153] For example, for 4×32 blocks, the number of additional samples is equal to 5 instead of 1. Similarly, for blocks of size 4×64 and 4×128 allowed in the random access configurations in JEM (with W / H=16 and 32, respectively), the number of additional samples is 14 and 32, respectively, instead of 2 and 4. In this case, the following variant is proposed.
[0154] In another variation, the reference array length can be calculated as follows:
[0155]
[0156] In another variation, the reference array length can be calculated so that the total number of samples is approximately 1+2*W+2*H:
[0157]
[0158] Note that in the above variants a dilation of 4 pixels is used to consider all possible block sizes up to 64×128 or 128×64. If the maximum block size is limited due to system or hardware constraints, smaller values such as 1 or 2 can be used. The following variants use the exact minimum number of samples required on the shorter reference side.
[0159] Note that the operations in the pseudocode are integer operations, for example, W / H can only be equal to 1, 2, 4, 8, 16, 32... (ie, no decimals). In one variation, the reference array length can be calculated as follows:
[0160]
[0161] In the above variation, the length of the longer reference array is not changed. In another variation, the reference array length can be calculated as follows:
[0162]
[0163] When the maximum number of wide angles is limited as above, if W>H, then H_Ext or if H>W then W_Ext can be expressed in a simplified form as:
[0164] If W>H, then H_Ext=max(0,((W>>2)-H))+((W+31)>>5);
[0165] Otherwise, if H>W, then W_Ext=max(0,((H>>2)-W))+((H+31)>>5) which can be equivalently expressed as:
[0166] If W>H, then H_Ext = ((W>>blockShapeRatio)-H)+((W+31)>>5); otherwise, if H>W, then W_Ext = ((H>>blockShapeRatio)-W))+((H+31)>>5)
[0167] Among them, blockShapeRatio=min(2,abs(log2(W)-log2(H))).
[0168] Using these simplified expressions, the two variants given above can be equivalently expressed as follows: In one variant, when only the shorter reference array is expanded:
[0169]
[0170] In another variation, the length of the longer reference is also changed so that the total number of reference samples is approximately 1+2*W+2*H.
[0171]
[0172] In order to encode the prediction mode of brightness, the concept of the most probable mode (MPM) is maintained in JVET. Using the prediction modes of causal neighboring blocks (if available and intra-predicted), planar and DC prediction modes, and some fixed angle modes such as direct vertical, direct horizontal, mode 2, mode 66, and mode 34, a set of MPMs of 6 modes is constructed. The remaining prediction modes are partitioned into a selected set of 16 modes and a set of 45 remaining modes. If the prediction mode of the target block belongs to the MPM set, it is encoded with the index of the member MPM. If it belongs to the selected set, it is encoded with 4 bits. Otherwise, it is encoded with a truncated binary code.
[0173] The proposed modification of prediction directions for rectangular BT blocks keeps the same coding scheme as JEM, but with some changes. The causal neighbors of the target block can have different shapes. Therefore, they can have different prediction direction ranges. In addition, they can have the same prediction mode even if they are associated with different prediction directions. This will cause problems in the construction of the MPM set. Therefore, in the first step, the prediction mode of the neighboring blocks is mapped to the prediction mode of the target block through the prediction direction index (dirIndex).
[0174] Secondly, for a given target block, dirIndex can have only 65 neighboring directions as well as PLANAR and DC modes. If the prediction mode of the neighboring block is 0 (PLANAR) or 1 (DC), no mapping is done and the mode is checked if it is contained in the MPM set. If the mode is greater than 1, the mode is mapped to the corresponding direction index. If the direction index belongs to the range of 65 directions for the target block, it is checked if the corresponding mode number for the target block is contained in the MPM set. Otherwise, it is checked if the mode corresponding to the opposite direction is contained in the MPM set. Note that if a direction does not belong to the direction set of the target block, the corresponding wide-angle direction must belong to that set.
[0175] The mapping from mode to direction is performed using equation 1. Then, given the direction, the mapping to the mode of the target block is performed using the following equation:
[0176] modeIndex=dirIndex-modeShift+2……… (2)
[0177] Among them, the modeShift of the target block is used. Using the dirIndex in formula 1, we get:
[0178] modeIndex TB =modeIndex NB +modeShift NB -modeShift TB ,.... (3)
[0179] The subscripts TB and NB are used to indicate the target block and the adjacent block respectively. TB If modeIndex is less than 0 or greater than 66, it implies that the direction associated with the mode of the neighboring block does not belong to the set of prediction directions for the target block. In this case, the associated wide-angle direction is used. TB <0, add 67; or if modeIndex TB >66, then subtract 65. The resulting mode is associated with the associated wide angle direction.
[0180] Two examples are given below to illustrate the above mapping.
[0181] Example 1: The target block has W = 8 and H = 8. Its left neighbor has W = 8 and H = 4, and prediction mode m = 2.
[0182] Since W / H=2, the modeShift of the left neighbor is 6. The target block is a square and its modeShift is 0. Therefore, a new modeIndex is obtained as m=2+6-0=8.
[0183] Example 2: The target block has W=4 and H=32. Its left neighbor has W=16 and H=4, and prediction mode m=8.
[0184] Since W / H=16 / 4=4, the modeShift of the left neighbor is 10. For the target block, W / H=4 / 32=1 / 8. Its modeShift is -12, and the direction index ranges from -12 to 52. Therefore, the new modeIndex is m=8+10-(-12)=30.
[0185] The rest of the pattern encoding process remains unchanged. Except for the six patterns in the MPM set, the remaining patterns are divided into a selected set of 16 patterns and a set consisting of the remaining 45 patterns.
[0186] Note that even if the target block is square, mapping is necessary to construct the MPM set with prediction modes of neighboring blocks that may not all be square.
[0187] It should be noted that even if the number of MPMs is changed, the prediction mode encoding algorithm used will remain unchanged as long as the prediction modes of the neighbors are mapped to the prediction mode set of the target block.
[0188] In the case where the luma and chroma component trees are separated (ie, in an I slice), for the chroma CU, at least one embodiment also performs the same remapping of the prediction mode to obtain a direct mode. The prediction mode of the collocated and neighboring luma CU can be remapped to the mode of the target chroma block.
[0189] An alternative method to avoid mode mapping for intra-mode coding is to keep the original mode and its associated direction. This is done by assigning a new mode index to the new direction, which can be called the wide-angle direction (i.e., the direction exceeding -135 degrees or 45 degrees). So, for example, wide-angle directions exceeding mode 66 are assigned mode indices 67, 68, and so on. Similarly, wide-angle directions exceeding mode 2 are assigned mode indices -1, -2, etc. (because modes 0 and 1 are already associated with PLANAR and DC modes). This is similar to the dirIndex given previously, and no modeShift is required. In this case, there is a one-to-one mapping between dirIndex and modeIndex as follows:
[0190] modeIndex=dirIndex+2, if dirIndex>=0
[0191] modeIndex=dirIndex, if dirIndex<0
[0192] Table 7 shows the modeIndex range values for different block shapes. It can be seen that for a given block shape value, the maximum value of modeIndex is 78 and the minimum value is -12. It should be noted here that if the number of maximum directions is limited to a certain value due to hardware or system constraints, the range of modeIndex values can be determined accordingly. For example, if the number of added directions exceeding -135 degrees or exceeding 45 degrees is limited to 10, as proposed in "CE3-related: Wide angle intraprediction for non-square blocks, JVET-K0500, Ljubljana, SI, 10-18July 2018", the ranges of dirIndex and modeIndex for the cases of W / H=8 and 1 / 8 are the same as those for the cases of W / H=4 and W / H=1 / 4, respectively.
[0193]
[0194]
[0195] Table 7: Ranges of modeIndex values for different block shapes
[0196] Since dirIndex and modeIndex have a one-to-one correspondence, you can now work with only modeIndex.
[0197] Since the added wide-angle directions correspond to some of the removed original directions, there is also a one-to-one correspondence between their modeIndex values.
[0198] In general, let origMode and waMode denote the original modeIndex and wide-angle modeIndex of the block, respectively. Since modeIndex values 0 (PLANAR mode) and 1 (DC mode) do not correspond to angle modes, they are not considered here. The value of waMode is obtained from the value of origMode as follows:
[0199]
[0200] Since the angle parameter A (intraPredAngle in the JEM code) is related to modeShift, the above mapping can also be equivalently performed as follows:
[0201]
[0202] The above wide-angle mapping ensures that each removed mode is replaced by a mode close to the opposite direction. For example, for flat blocks with W / H>1, mode 2 is replaced by mode 67. Mode 67 is the closest wide-angle direction to the opposite direction of mode 2 (mode 66). Those modes that are not removed continue to have the same modeIndex value after mapping.
[0203] When the number of wide angles is limited to 10 as in "CE3-related: Wide angle intra prediction for non-square blocks, JVET-K0500, Ljubljana, SI, 10-18 July 2018", the mapping can be obtained as follows:
[0204]
[0205] or equivalently:
[0206]
[0207] This can also be equivalently given as:
[0208]
[0209] The above mapping also ensures that for the 65 original angle modes, there are 65 unique angle modes after the above wide angle mapping. Note that this is not the only unique mapping, and there may be various other mappings between the set of directions removed and the set of wide angle directions added. But the above mapping makes the added wide angle mode close to the opposite direction of the removed mode.
[0210] As mentioned before, the above method indirectly helps to avoid the mapping of mode indices of neighboring blocks during intra-mode encoding. The mapping of raw mode indices to wide mode indices will be done only at the prediction step. Intra-mode encoding after the prediction step at the encoder will use the raw mode indices instead of the wide mode indices. Similarly, at the decoder, intra-mode decoding before the prediction step will use the raw mode indices, but the mapping to the wide mode indices will be done at the prediction step.
[0211] The present technology has considered rectangular block shapes with aspect ratios in the range of [1 / 8, 8]. However, it is noted that the principle can be extended to a larger range of aspect ratios in a very straightforward manner. Table 8 contains modeIndex values for higher values of block shape ratios. In this case, there are 14 wide-angle directions exceeding -135 degrees or 45 degrees. Here, corresponding to larger values of W / H or (H / W), the number of added wide-angle directions increases further. However, the mapping from origMode to waMode as given previously still applies.
[0212] W / H dirIndex modeShift 1 0-64 0 2 6-70 6 4 10-74 10 8 12-76 12 16 13:77 13 32 14:78 14 1 / 2 -6:58 -6 1 / 4 -10:54 -10 1 / 8 -12:52 -12 1 / 16 -13:51 -13 1 / 32 -14:50 -14
[0213] Table 8: modeShift values for all block sizes up to 4x128 or 128x4 with maximum width or height set to 128.
[0214] Based on the proposed direction definition, several embodiments are presented as possible implementation options. These can be implemented in JEM, for example.
[0215] In a first exemplary embodiment, referred to as Embodiment 1, the angular prediction direction for the target block is modified to include a wide-angle direction. If the target block is a square, there is no change in the prediction direction. For a given prediction mode, the encoder and decoder perform prediction in an existing manner. On the other hand, if the target block is a rectangle, the angular prediction mode is first mapped to the wide-angle mode using the modeShift value corresponding to the shape of the target block as previously given. The encoder and decoder perform prediction along the direction corresponding to the wide-angle mode. The mapping to the wide-angle mode occurs only in the prediction phase. Intra-mode encoding at the encoder and intra-mode decoding at the decoder remain unchanged. The encoder performs the best prediction mode search in the usual manner using RD (rate-distortion) optimization, and encodes the original mode index value using an MPM set consisting of the original mode index. Similarly, the decoder decodes the original mode index value using an MPM set consisting of the original mode index.
[0216] In a second exemplary embodiment, referred to as embodiment 2, the angular prediction direction for the target block is modified as previously given. If the target block is square, there is no change in the prediction direction. Otherwise, if the target block is rectangular, the prediction mode is associated with a defined direction according to the aspect ratio of the block. The encoder performs the best prediction mode search in the usual manner using RD (rate distortion) optimization, except that for modes 2 to 66, the associated prediction direction depends on the block shape.
[0217] For luma target blocks, the encoder encodes the prediction mode using an MPM set constructed using a mapping of prediction modes of neighboring blocks as explained in the previous section. For chroma target blocks, it derives the direct mode by mapping the prediction modes of collocated and neighboring luma blocks. This mapping is not necessary for blocks in inter-coded slices where luma and chroma components have the same coding tree structure.
[0218] For luma target blocks, the decoder decodes the prediction mode using the set of MPMs constructed in the same way as the encoder. For chroma target blocks, it derives the direct mode in the same way as the encoder, after accurately mapping the prediction modes of the collocated and neighboring luma blocks. It constructs the prediction for the target block in the usual way, except that for modes 2 to 66, the associated prediction direction depends on the block shape.
[0219] Fig.10 A flowchart of an encoder and a decoder for a luminance block in Embodiment 1 is shown.
[0220] In embodiment 3, embodiment 2 is enhanced with respect to the prediction direction. For any target block, the prediction direction is defined as the union of the set of directions defined in JEM (i.e., 65 directions from 45 degrees to -135 degrees in a clockwise direction) and the set of directions defined in the proposal that depends on the shape of the target block. Since the set of defined directions for any target block consists of a subset of the JEM directions and some newly introduced directions, the union of these two sets will consist of a set of 65 JEM directions plus the newly introduced directions that depend on the shape of the block. The newly introduced directions are opposite to some positive directions in the JEM direction set (which have been removed in the proposal). A 1-bit flag called modeFlag is used to distinguish these opposite pairs of directions, and the number of pairs of directions varies depending on the shape of the block. Since the JEM direction is included, this embodiment also maintains the same mode index as in JEM. That is, mode 2 will correspond to an angle of 45 degrees, while mode 66 will correspond to an angle of -135 degrees. Modes that also have opposite directions (except mode 2 and mode 66) will have a modeFlag value equal to 0. The opposite direction will use the same mode number, but with a modeFlag value equal to 1. That is, a pair of opposite directions will be associated with the same mode number, but with modeFlag equal to 0 and 1, respectively.
[0221] The prediction mode coding remains the same as in JEM. However, for modes with opposite directions (except modes 2 and 66), modeFlag is encoded with fixed, mode-dependent, or neighbor-dependent context.
[0222] Note that since the directional set is an augmented set, the lengths of the top and left reference arrays also change. The length of the top reference array is H+W+1 or 2W+1, whichever is larger. Similarly, the length of the left reference array is H+W+1 or 2H+1, whichever is larger. This means that for flat blocks, the top reference array will have 2W+1 samples, while the left reference array will have H+W+1 samples. Similarly, for tall blocks, the top reference array will have H+W+1 samples, while the left reference array will have 2H+1 samples. If the block is a square, then as in JEM, both the top and left reference arrays will have H+W+1 (=2H+1=2W+1, because W=H) samples.
[0223] On the decoder side, the prediction mode is decoded using a conventional MPM-based approach. If the mode belongs to a set of directions with an opposite direction, the modeFlag value is also decoded. If the prediction mode is planar or DC, the decoder computes the prediction as in JEM. Otherwise, if modeFlag has not been decoded, or if it has been decoded and its value is zero, the decoder builds the prediction in the corresponding direction as in JEM. Otherwise, the decoder builds the prediction in the opposite direction of the direction associated with the decoded mode using the new angle parameter A.
[0224] For chroma target blocks, direct modes are calculated in the same way as in JEM, regardless of the modeFlag value used for the corresponding luminance block (if the modes have opposite directions). Depending on the target block aspect ratio, if any direct mode has opposite directions, the encoder includes the opposite direction in the search while searching for the best prediction mode. If this mode is ultimately determined to be the best mode, a one-bit modeFlag is encoded according to the best direction. At the decoder, the derivation of direct modes, decoding of prediction modes, and modeFlag (in the case of opposite directions) are exactly the same as in the encoder.
[0225] Fig.11 The encoder and decoder flow chart for luma blocks is shown in .
[0226] In a fourth exemplary embodiment, referred to as Embodiment 4, the changes described in Embodiments 1-3 are applied only when relevant reference samples are available. For example, in the case of a flat block, the present invention dilates the direction after -135°. However, independent of the current block shape, the upper right neighboring block may not be available. In that case, the target block is predicted as in JEM, i.e., using 65 angular directions spanning from 45 degrees to -135 degrees in a clockwise direction. Since both the encoder and the decoder can easily detect the presence of reconstructed neighboring blocks, they will decide whether to apply the dilation direction in a corresponding manner.
[0227] In a fifth embodiment (Embodiment 5), all target blocks in a slice are predicted as in Embodiments 1 to 4, and signaled to the decoder using a 1-bit flag in the slice header.
[0228] In a sixth embodiment (Embodiment 6), all target blocks in a frame are predicted as in Embodiments 1 to 4 and signaled to the decoder using a 1-bit flag in the Picture Parameter Set (PPS) header.
[0229] In a seventh embodiment (Embodiment 7), all target blocks in any frame of the sequence are predicted as in Embodiments 1 to 4 and signaled to the decoder using a 1-bit flag in the sequence parameter set (SPS) header.
[0230] An advantage of the proposed embodiments is that they adapt the prediction direction for rectangular blocks to the block shape.An object is to improve compression performance without increasing complexity.
[0231] Fig.15 One embodiment of a method 1500 for intra prediction with adaptive block size in an encoder is shown. The method starts at start block 1501, and control proceeds to block 1510 to predict video samples belonging to a rectangular block based on at least one sample of a neighboring block arranged along a direction based on an aspect ratio of the rectangular block. Control proceeds from block 1510 to block 1520 to encode the rectangular block using intra prediction based on the predicted video samples.
[0232] Fig.16 One embodiment of a method 1600 for intra prediction with adaptive block size in an encoder is shown. The method starts at start block 1601, and control proceeds to block 1610 to predict video samples belonging to a rectangular block based on at least one sample of a neighboring reconstructed block arranged along a direction based on an aspect ratio of the rectangular block. Control proceeds from block 1610 to block 1620 to decode the rectangular block using intra prediction based on the predicted video samples.
[0233] Fig.17 One embodiment of a device 1700 for encoding or decoding video blocks using intra prediction with adaptive block size is shown. The device includes a processor 1710 having one or more input and output ports and interconnected with a memory 1720 via one or more communication ports. The device 1700 is capable of performing Fig.15 or Fig.16 or any variation thereof.
[0234] This document describes various aspects, including tools, features, embodiments, models, methods, etc. Many of these aspects are described with specificity, at least to illustrate the characteristics of each, and are often described in a manner that may sound restrictive. However, this is for the purpose of clarity of description and is not intended to limit the application or scope of those aspects. In fact, all of the different aspects can be combined and interchanged to provide further aspects. In addition, these aspects can also be combined and interchanged with aspects described in previous applications.
[0235] The aspects described and contemplated in this document can be implemented in many different forms. Fig.12 , Fig.13 and Fig.14 Some embodiments are provided, but other embodiments are also contemplated, and Fig.12 , Fig.13 and Fig.14 The breadth of implementations is not limited. At least one of these aspects generally relates to video encoding and decoding, and at least another aspect generally relates to transmitting a generated or encoded bitstream. These and other aspects can be implemented as methods, devices, computer-readable storage media having stored thereon instructions for encoding or decoding video data according to any of the methods described, and / or computer-readable storage media having stored thereon a bitstream generated according to any of the methods described.
[0236] In this application, the terms "reconstruction" and "decoding" can be used interchangeably, the terms "pixel" and "sample" can be used interchangeably, and the terms "image", "picture" and "frame" can be used interchangeably. Usually, but not necessarily, the term "reconstruction" is used on the encoder side, while "decoding" is used on the decoder side.
[0237] Various methods are described above, and each method includes one or more steps or actions for implementing the described method. Unless a specific order of steps or actions is required for the correct operation of the method, the order and / or use of specific steps and / or actions can be modified or combined.
[0238] The various methods and other aspects described in this document can be used to modify modules, such as for example Fig.12 Motion compensation 170 and motion estimation 175 and Fig.13 Motion estimation 275. Moreover, the present aspects are not limited to JVET or HEVC, and can be applied to, for example, other standards and recommendations (whether pre-existing or developed in the future), as well as extensions of any such standards and recommendations (including JVET and HEVC). Unless otherwise specified or technically exclusive, the various aspects described in this document can be used alone or in combination.
[0239] Various numerical values may be shown in this document. The specific values are for exemplary purposes, and the described aspects are not limited to these specific values.
[0240] Fig.12 An exemplary encoder 100 is illustrated. Variations of the encoder 100 are also contemplated, but for the sake of clarity, the encoder 100 is described below without describing all contemplated variations.
[0241] Prior to encoding, the video sequence may undergo pre-encoding processing (101), such as color conversion of the input color picture (e.g., conversion from RGB 4:4:4 to YCbCr 4:2:0), or remapping of the input picture components to obtain a signal distribution that is more resilient to compression (e.g., using histogram equalization of one of the color components). Metadata can be associated with the pre-processing and appended to the bitstream.
[0242] In an exemplary encoder 100, a picture is encoded by an encoder element as described below. The picture to be encoded is partitioned (102) and processed in units such as CUs. Each unit is encoded using, for example, intra or inter mode. When the unit is encoded in intra mode, it performs intra prediction (160). In inter mode, motion estimation (175) and compensation (170) are performed. The encoder decides (105) which of intra mode or inter mode to use for encoding the unit, and indicates the intra / inter decision by, for example, a prediction mode flag. For example, a prediction residual is calculated by subtracting (110) the predicted block from the original image block.
[0243] The prediction residual is then transformed (125) and quantized (130). The quantized transform coefficients, along with motion vectors and other syntax elements, are entropy encoded (145) to output a bitstream. The encoder can skip the transform and apply quantization directly to the untransformed residual signal. The encoder can bypass both the transform and quantization, i.e., the residual is directly encoded without applying a transform or quantization process.
[0244] The encoder decodes the coded block to provide a reference for further prediction. The quantized transform coefficients are dequantized (140) and inverse transformed (150) to decode the prediction residual. The decoded prediction residual and the predicted block are combined (155) to reconstruct the image block. An in-loop filter (165) is applied to the reconstructed picture to perform, for example, deblocking / SAO (sample adaptive offset) filtering to reduce coding artifacts. The filtered image is stored in a reference picture buffer (180).
[0245] Fig.13FIG. 2 is a block diagram of an exemplary video decoder 200. In the exemplary decoder 200, a bitstream is decoded by decoder elements as described below. The video decoder 200 generally performs the same operations as described below. Fig.12 The encoding pass described in is the opposite of the decoding pass. Encoder 100 also typically performs video decoding as part of encoding the video data.
[0246] Specifically, the input to the decoder includes a video bitstream that can be generated by the video encoder 100. The bitstream is first entropy decoded (230) to obtain transform coefficients, motion vectors and other encoding information. Picture partition information indicates how the picture is partitioned. Therefore, the decoder can divide (235) the picture according to the decoded picture partition information. The transform coefficients are dequantized (240) and inverse transformed (250) to decode the prediction residual. The decoded prediction residual and the predicted block are combined (255) to reconstruct the image block. The predicted block can be obtained (270) from intra-frame prediction (260) or motion compensated prediction (i.e., inter-frame prediction) (275). An in-loop filter (265) is applied to the reconstructed image. The filtered image is stored in a reference picture buffer (280).
[0247] The decoded picture can be further subjected to post-decoding processing (285), such as an inverse color transform (e.g., conversion from YCbCr 4:2:0 to RGB 4:4:4) or inverse remapping, which performs the inverse of the remapping process performed in the pre-encoding process (101). The post-decoding process can use metadata derived in the pre-encoding process and signaled in the bitstream.
[0248] Fig.14 A block diagram of an example of a system in which various aspects and embodiments are implemented is illustrated. System 1000 can be embodied as a device including various components described below, and is configured to perform one or more aspects described in this document. Examples of such devices include, but are not limited to, various electronic devices, such as personal computers, laptop computers, smart phones, tablet computers, digital multimedia set-top boxes, digital television receivers, personal video recording systems, networked home appliances, and servers. The elements of system 1000 can be embodied in a single integrated circuit, multiple ICs, and / or discrete components, either individually or in combination. For example, in at least one embodiment, the processing and encoder / decoder elements of system 1000 are distributed over multiple ICs and / or discrete components. In various embodiments, system 1000 is communicatively coupled to other systems or other electronic devices via, for example, a communication bus or through dedicated input and / or output ports. In various embodiments, system 1000 is configured to implement one or more aspects described in this document.
[0249] The system 1000 includes at least one processor 1010 configured to execute instructions loaded therein to implement, for example, various aspects described in this document. The processor 1010 can include embedded memory, input-output interfaces, and various other circuits known in the art. The system 1000 includes at least one memory 1020 (e.g., a volatile storage device and / or a non-volatile storage device). The system 1000 includes a storage device 1040, which can include a non-volatile memory and / or a volatile memory, including but not limited to an EEPROM, a ROM, a PROM, a RAM, a DRAM, an SRAM, a flash memory, a disk drive, and / or an optical drive. As a non-limiting example, the storage device 1040 can include an internal storage device, an attached storage device, and / or a network-accessible storage device.
[0250] The system 1000 includes a coder / decoder module 1030 configured to, for example, process data to provide encoded video or decoded video, and the coder / decoder module 1030 can include its own processor and memory. The coder / decoder module 1030 represents a module that can be included in a device to perform encoding and / or decoding functions. As is well known, a device can include one or both of the encoding and decoding modules. In addition, the coder / decoder module 103 can be implemented as a separate element of the system 1000, or can be incorporated into the processor 1010 as a combination of hardware and software known to those skilled in the art.
[0251] Program code to be loaded onto the processor 1010 or encoder / decoder 1030 to perform various aspects described in this document can be stored in the storage device 1040 and then loaded into the memory 1020 for execution by the processor 1010. According to various embodiments, one or more of the processor 1010, memory 1020, storage device 1040, and encoder / decoder module 1030 can store one or more of various items during the execution of the processes described in this document. Such stored items can include, but are not limited to, input video, decoded video or a portion of decoded video, bitstreams, matrices, variables, and intermediate or final results from the processing of equations, formulas, operations, and operation logic.
[0252] In several embodiments, memory inside the processor 1010 and / or the encoder / decoder module 1030 is used to store instructions and provide working memory for processing required during encoding or decoding. However, in other embodiments, memory external to the processing device (e.g., the processing device can be the processor 1010 or the encoder / decoder module 1030) is used for one or more of these functions. The external memory can be a memory 1020 and / or a storage device 1040, for example, a dynamic volatile memory and / or a non-volatile flash memory. In several embodiments, the external non-volatile flash memory is used to store the operating system of the television. In at least one embodiment, a fast external dynamic volatile memory such as RAM is used as working memory for video encoding and decoding operations such as MPEG-2, HEVC, or VVC (universal video coding).
[0253] As shown in block 1130, input to the elements of system 1000 can be provided through various input devices. Such input devices include, but are not limited to, (i) an RF section that receives an RF signal sent over the air, such as by a broadcaster; (ii) a composite input terminal; (iii) a USB input terminal, and / or (iv) an HDMI input terminal.
[0254] In various embodiments, the input device of block 1130 has associated various input processing elements, as known in the art. For example, the RF portion can be associated with elements suitable for: (i) selecting a desired frequency (also referred to as selecting a signal, or band limiting a signal to a frequency band); (ii) down-converting the selected signal; (iii) again band-limiting to a narrower frequency band to select a signal band that can be referred to as a channel in some embodiments; (iv) demodulating the down-converted and band-limited signal; (v) performing error correction; and (vi) demultiplexing to select a desired stream of data packets. The RF portion of various embodiments includes one or more elements that perform these functions, such as a frequency selector, a signal selector, a band limiter, a channel selector, a filter, a down-converter, a demodulator, an error corrector, and a demultiplexer. The RF portion can include a tuner that performs various of these functions, including, for example, down-converting a received signal to a lower frequency (e.g., an intermediate frequency or near baseband frequency) or baseband. In a set-top box embodiment, the RF part and its associated input processing element receive the RF signal that sends on wired (for example, cable) medium, and filter to the desired frequency band by filtering, down-conversion and again to perform frequency selection.Various embodiments rearrange the order of above-mentioned (and other) elements, remove some in these elements, and / or add other elements that perform similar or different functions.Adding element can include inserting element between existing element, for example, inserting amplifier and analog-to-digital converter.In various embodiments, the RF part comprises antenna.
[0255] In addition, the USB and / or HDMI terminals can include various interface processors for connecting the system 1000 to other electronic devices via USB and / or HDMI connections. It should be understood that various aspects of input processing, such as Reed-Solomon error correction, can be implemented, for example, in a separate input processing IC or in the processor 1010. Similarly, various aspects of USB or HDMI interface processing can be implemented in a separate interface IC or in the processor 1010. The streams of demodulation, error correction, and demultiplexing are provided to various processing elements, including, for example, encoders / decoders 1030 and processors 1010 that operate in conjunction with memory and storage elements to process data streams for presentation on output devices.
[0256] The various components of the system 1000 can be arranged in an integrated housing. In the integrated housing, the various components can be interconnected and transmit data between them using suitable connection means 1140 (eg, internal buses known in the art, including I2C buses, wiring and printed circuit boards).
[0257] The system 1000 includes a communication interface 1050 that enables communication with other devices via a communication channel 1060. The communication interface 1050 can include, but is not limited to, a transceiver configured to send and receive data through the communication channel 1060. The communication interface 1050 can include, but is not limited to, a modem or a network card, and the communication channel 1060 can be implemented, for example, within a wired and / or wireless medium.
[0258] In various embodiments, the data stream is transmitted to the system 1000 using a wireless network such as IEEE 802.11. The wireless signals of these embodiments are received through a communication channel 1060 and a communication interface 1050 suitable for wireless communication such as Wi-Fi communication. The communication channel 1060 of these embodiments is typically connected to an access point or router that provides access to external networks including the Internet to allow streaming applications and other over-the-top communications. Other embodiments provide the streaming data to the system 1000 using a set-top box that passes the data through the HDMI connection of the input box 1130. Other embodiments provide the streaming data to the system 1000 using the RF connection of the input box 1130.
[0259] The system 1000 can provide output signals to various output devices including a display 1100, a speaker 1110, and other peripheral devices 1120. In various examples of embodiments, the other peripheral devices 1120 include one or more separate DVRs, disk players, stereo systems, lighting systems, and other devices that provide functions based on the output of the system 1000. In various embodiments, control signals are passed between the system 1000 and the display 1100, the speaker 1110, or other peripheral devices 1120 using signaling such as AV.Link, CEC, or other communication protocols that can perform device-to-device control with or without user intervention. The output devices can be communicatively coupled to the system 1000 via dedicated connections through respective interfaces 1070, 1080, and 1090. Alternatively, the output devices can be connected to the system 1000 using a communication channel 1060 via a communication interface 1050. In an electronic device such as a television, the display 1100 and the speaker 1110 can be integrated into a single unit with the other components of the system 1000. In various embodiments, the display interface 1070 includes a display driver, such as a timing controller (T Con) chip.
[0260] For example, if the RF portion of input 1130 is part of a separate set-top box, the display 1100 and speaker 1110 can be separate from one or more other components. In various embodiments where the display 1100 and speaker 1110 are external components, the output signal can be provided via a dedicated output connection, including, for example, an HDMI port, a USB port, or a COMP output.
[0261] The exemplary embodiments can be performed by computer software implemented by the processor 1010, or by hardware, or by a combination of hardware and software. As a non-limiting example, the exemplary embodiments can be implemented by one or more integrated circuits. As a non-limiting example, the memory 1020 can be any type suitable for the technical environment, and can be implemented using any appropriate data storage technology (such as, optical storage devices, magnetic storage devices, semiconductor-based storage devices, fixed memory, and removable memory). As a non-limiting example, the processor 1010 can be any type suitable for the technical environment, and can include one or more of a microprocessor, a general-purpose computer, a special-purpose computer, and a processor based on a multi-core architecture.
[0262] The implementations and aspects described herein can be implemented, for example, in methods or processes, devices, software programs, data streams, or signals. Even if only discussed in the context of a single form of implementation (e.g., discussed only as a method), the implementation of the features discussed can be implemented in other forms (e.g., devices or programs). Devices can be implemented, for example, with appropriate hardware, software, and firmware. For example, methods can be implemented in devices such as, for example, processors, which are generally referred to as processing devices, including, for example, computers, microprocessors, integrated circuits, or programmable logic devices. Processors also include communication devices, such as, for example, computers, cellular phones, portable / personal digital assistants ("PDAs"), and other devices that facilitate information communication between end users.
[0263] Reference to "one embodiment" or "an embodiment" or "one implementation" or "an implementation" and other variations thereof mean that a particular feature, structure, characteristic, etc. described in connection with the embodiment is included in at least one embodiment. Thus, the phrases "in one embodiment" or "in an embodiment" or "in one implementation" or "in an implementation" and any other variations appearing in various places throughout this document are not necessarily all referring to the same embodiment.
[0264] Additionally, this document may refer to "determining" various information. Determining information can include, for example, one or more of: estimating information, calculating information, predicting information, or retrieving information from a memory.
[0265] Additionally, this document may refer to "accessing" various information. Accessing information can include, for example, one or more of: receiving information, retrieving information (e.g., from a memory), storing information, processing information, sending information, moving information, copying information, erasing information, calculating information, determining information, predicting information, or estimating information.
[0266] Additionally, this document may refer to "receiving" various information. Receiving, like "accessing," is intended to be a broad term. Receiving information can include, for example, one or more of: accessing the information or retrieving the information (e.g., from a memory). Additionally, during operations such as, for example, storing information, processing information, sending information, moving information, copying information, erasing information, calculating information, determining information, predicting information, or estimating information, "receiving" is generally referred to in one way or another.
[0267] It is obvious to those skilled in the art that the implementation can generate various signals formatted to carry information that can be stored or transmitted, for example. The information can include, for example, instructions for executing the method or data generated by one of the described implementations. For example, the signal can be formatted to carry a bit stream of the described embodiment. Such a signal can be formatted as, for example, an electromagnetic wave (e.g., using a radio frequency portion of a spectrum) or a baseband signal. Formatting can include, for example, encoding a data stream and modulating a carrier with the encoded data stream. The information carried by the signal can be, for example, analog or digital information. As is well known, the signal can be transmitted via a variety of different wired or wireless links. The signal can be stored on a processor readable medium.
[0268] The foregoing description has described a number of embodiments. These embodiments include the following optional features, alone or in any combination, in various claim categories and types:
[0269] -Use prediction directions exceeding -135 degrees and 45 degrees during intra prediction in encoding and decoding
[0270] - Dilate the predicted directions horizontally or vertically while removing some directions in the opposite direction to keep the same number of total directions
[0271] - The number of directions where the expansion exceeds -135 degrees and exceeds 45 degrees
[0272] - The length of the shorter reference array is based on both the width and height of the block.
[0273] -The length of the shorter reference array is 1 plus twice the length of the corresponding side of the block, plus a small dilation.
[0274] - Since the angle parameter value is not a power of 2, dilation is required.
[0275] - To compensate for the expansion on the smaller side, the reference array size on the longer side of the block can be appropriately reduced so that the total number of reference samples required for wide-angle prediction remains the same as for normal intra prediction.
[0276] -The length of the reference array is determined based on both the height and width of the block to be encoded or decoded
[0277] - Signaling from the encoder to the decoder which prediction directions are being used
[0278] -Use a subset of prediction directions
[0279] - A block is a CU with a rectangular shape
[0280] - The other block is an adjacent block
[0281] - Map the angular prediction mode to the wide-angle mode by a value corresponding to the target block shape
[0282] - The mapping of Angle mode to Wide mode is one-to-one.
[0283] - The number of wide-angle directions used for a block depends on the target block shape.
[0284] - Intra-frame prediction based on wide-angle mode
[0285] - a bitstream or signal comprising one or more of the described syntax elements or variants thereof.
[0286] - Insertion of syntax elements in the signaling that enable the decoder to process the bitstream in the opposite way to that performed by the encoder.
[0287] - creating and / or sending and / or receiving and / or decoding a bitstream or signal comprising one or more of the described syntax elements or variations thereof.
[0288] - A TV, set-top box, cell phone, tablet or other electronic device implementing any of the described embodiments.
[0289] - A TV, set-top box, cell phone, tablet or other electronic device that executes any of the described embodiments and displays (eg, using a monitor, screen or other type of display) the resulting images.
[0290] - A TV, set-top box, cellular phone, tablet or other electronic device that tunes (eg, using a tuner) to a channel to receive a signal including an encoded image and performs any of the described embodiments.
[0291] - A TV, set-top box, cell phone, tablet or other electronic device that receives (eg, using an antenna) a signal including the encoded image and performs any of the described embodiments.
[0292] - Throughout this disclosure, various other general and specific features are also supported and contemplated.
Claims
1. A method, comprising: predicting a video sample belonging to a rectangular block based on at least one sample of a neighboring reconstructed block arranged along a direction based on a block shape of the rectangular block, wherein a greater number of prediction directions are available along a longer side of the rectangular block than along a shorter side of the rectangular block; and The rectangular block is encoded using intra-frame prediction based on the predicted video samples, wherein the mapping of the normal mode to the wide-angle mode is performed in the prediction stage and the mapping is based on the ratio of the block width to the block height corresponding to the prediction direction of the rectangular block being encoded, wherein a fixed number of prediction indices are used to indicate the range of intra-frame prediction directions, the total number of intra-frame prediction directions is fixed, when a first value corresponding to the shape of the rectangular block is used to map the angle prediction mode to the wide-angle mode, the range of the intra-frame prediction direction is adapted to the shape of the rectangular block and the range of the intra-frame prediction direction exceeds the prediction direction of the square block, and wherein the number of wide-angle prediction modes used depends on the shape of the rectangular block, the length of the reference sample array above the rectangular block is 2W+1 and the height of the reference sample array to the left of the rectangular block is 2H+1, wherein W is the width of the rectangular block and H is the height of the rectangular block.
2. The method according to claim 1, wherein: Neighboring blocks along the longer edges of the rectangular block have more prediction samples.
3. The method according to claim 1, wherein: Directions are added along the longer sides of the rectangular block, and directions are removed along the shorter sides of the rectangular block.
4. The method according to claim 1, wherein: Use a flag to signal the prediction mode.
5. The method according to claim 1, wherein: The prediction mode is signaled differently based on whether the mode belongs to the most probable mode list or not.
6. The method according to claim 1, wherein: The prediction mode of the neighboring block is mapped to the prediction mode of the rectangular block using an index.
7. The method according to claim 1, wherein: Perform rate-distortion optimization to find the prediction.
8. A device for encoding a video block, the device comprising: Memory, and A processor, the processor being configured to: predicting a video sample belonging to a rectangular block based on at least one sample of a neighboring reconstructed block arranged along a direction based on a block shape of the rectangular block, wherein a greater number of prediction directions are available along a longer side of the rectangular block than along a shorter side of the rectangular block; and The rectangular block is encoded using intra-frame prediction based on the predicted video samples, wherein the mapping of the normal mode to the wide-angle mode is performed in the prediction stage and the mapping is based on the ratio of the block width to the block height corresponding to the prediction direction of the rectangular block being encoded, wherein a fixed number of prediction indices are used to indicate the range of intra-frame prediction directions, the total number of intra-frame prediction directions is fixed, when a first value corresponding to the shape of the rectangular block is used to map the angle prediction mode to the wide-angle mode, the range of the intra-frame prediction direction is adapted to the shape of the rectangular block and the range of the intra-frame prediction direction exceeds the prediction direction of the square block, and wherein the number of wide-angle prediction modes used depends on the shape of the rectangular block, the length of the reference sample array above the rectangular block is 2W+1 and the height of the reference sample array to the left of the rectangular block is 2H+1, wherein W is the width of the rectangular block and H is the height of the rectangular block.
9. A method comprising: predicting a video sample belonging to a rectangular block based on at least one sample of a neighboring reconstructed block arranged along a direction based on a block shape of the rectangular block, wherein a greater number of prediction directions are available along a longer side of the rectangular block than along a shorter side of the rectangular block; and The rectangular block is decoded using intra-frame prediction based on the predicted video samples, wherein the mapping of the normal mode to the wide-angle mode is performed in the prediction stage and the mapping is based on the ratio of the block width to the block height corresponding to the prediction direction of the decoded rectangular block, wherein a fixed number of prediction indices are used to indicate the range of intra-frame prediction directions, the total number of intra-frame prediction directions is fixed, when a first value corresponding to the shape of the rectangular block is used to map the angle prediction mode to the wide-angle mode, the range of the intra-frame prediction direction is adapted to the shape of the rectangular block and the range of the intra-frame prediction direction exceeds the prediction direction of the square block, and wherein the number of wide-angle prediction modes used depends on the shape of the rectangular block, the length of the reference sample array above the rectangular block is 2W+1 and the height of the reference sample array to the left of the rectangular block is 2H+1, wherein W is the width of the rectangular block and H is the height of the rectangular block.
10. An apparatus for decoding a video block, the apparatus comprising: Memory, and A processor, the processor being configured to: predicting a video sample belonging to a rectangular block based on at least one sample of a neighboring reconstructed block arranged along a direction based on a block shape of the rectangular block, wherein a greater number of prediction directions are available along a longer side of the rectangular block than along a shorter side of the rectangular block; and The rectangular block is decoded using intra-frame prediction based on the predicted video samples, wherein the mapping of the normal mode to the wide-angle mode is performed in the prediction stage and the mapping is based on the ratio of the block width to the block height corresponding to the prediction direction of the decoded rectangular block, wherein a fixed number of prediction indices are used to indicate the range of intra-frame prediction directions, the total number of intra-frame prediction directions is fixed, when a first value corresponding to the shape of the rectangular block is used to map the angle prediction mode to the wide-angle mode, the range of the intra-frame prediction direction is adapted to the shape of the rectangular block and the range of the intra-frame prediction direction exceeds the prediction direction of the square block, and wherein the number of wide-angle prediction modes used depends on the shape of the rectangular block, the length of the reference sample array above the rectangular block is 2W+1 and the height of the reference sample array to the left of the rectangular block is 2H+1, wherein W is the width of the rectangular block and H is the height of the rectangular block.
11. A device, comprising: The device according to any one of claims 4 to 11; as well as At least one of: (i) an antenna configured to receive a signal, the signal including the video block, (ii) a band limiter configured to limit the received signal to a frequency band including the video block, and (iii) a display configured to display an output.
12. A non-transitory computer-readable medium having instructions stored thereon, which, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 10.
13. A computer program product comprising instructions, which, when executed by a computer, cause the computer to perform the method of claim 1.