Method for encoding / decoding video signal and apparatus therefor
By partitioning the video picture into parallel blocks or stripes, and selectively encoding/decoding according to characteristics, the problems of large amount of high-definition video data and limited compression performance in the prior art are solved, and more efficient video encoding/decoding is achieved.
Patent Information
- Application Number
- CN202411667578.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2019-01-15
- Filing Date
- 2020-01-02
- Publication Date
- 2025-03-21
AI Technical Summary
When existing video encoding technology processes high-definition video, the data volume is large and the compression performance is limited, making it difficult to meet the needs of higher quality video services.
By partitioning the picture into multiple parallel blocks or strips, and selectively encoding/decoding according to the characteristics of the blocks or strips, the encoding/decoding efficiency is improved. The specific method includes determining the encoding/decoding strategy based on the matching of the width/height of the block and the adjacent blocks, and determining the structure of the band based on the number or index of parallel blocks in the band.
Improves the efficiency of video encoding/decoding, and can more effectively handle high-definition video and higher quality video services.
Smart Images

Figure CN119676435A_ABST
Abstract
Description
[0001] This application is a divisional application of the PCT international application with an international filing date of January 2, 2020, national application number 202080003179.X, and invention name “Method and device for encoding / decoding video signals” entering the Chinese national phase. Technical Field
[0002] The present disclosure relates to a method for encoding / decoding a video signal and an apparatus thereof. Background Art
[0003] As display panels become larger, higher quality video services are required. The biggest problem with high-definition video services is the greatly increased amount of data. In order to solve the above problems, research on improving video compression rates is being actively conducted. As a representative example, the Joint Collaboration Team on Video Coding (JCT-VC) was established in 2009 by the Moving Picture Experts Group (MPEG) and the Video Coding Experts Group (VCEG) under the International Telecommunication Union Telecommunication Standardization Sector (ITU-T). JCT-VC proposed a video compression standard: High Efficiency Video Coding (HEVC), which has a compression performance approximately twice that of H.264 / AVC, and was approved as a standard on January 25, 2013. However, with the rapid development of high-definition video services, the performance of HEVC has gradually shown its limitations. Summary of the invention
[0004] Technical issues
[0005] An object of the present disclosure is to provide a method for partitioning a picture into a plurality of tiles or a plurality of slices when encoding / decoding a video signal, and an apparatus for performing the method.
[0006] An object of the present disclosure is to provide a method for selectively encoding / decoding size information of a parallel block column / parallel block row according to whether the width / height is the same as the width / height of an adjacent parallel block column / parallel block row when partitioning a picture into multiple parallel blocks, and a device for performing the method.
[0007] An object of the present disclosure is to provide a method for determining a slice based on the number of tiles included in the slice or an index of a tile in the slice when partitioning a picture into a plurality of slices, and an apparatus for performing the method.
[0008] Technical objectives that can be obtained from the present disclosure are not limited to the above-mentioned technical objectives, and other unmentioned technical objectives can be clearly understood from the following description by a person of ordinary skill in the technical field to which the present disclosure belongs.
[0009] Solution
[0010] According to the present disclosure, a method for decoding a video signal may include: partitioning a picture into a plurality of parallel blocks; and determining at least one strip based on the plurality of parallel blocks. In this regard, the step of partitioning the picture into a plurality of parallel blocks may include: determining the width of a first parallel block column in the picture; and determining the width of a second parallel block column adjacent to the first parallel block column. In this regard, the width of the first parallel block column may be determined by a syntax representing the width of the first parallel block column, and when the width of the second parallel block column is the same as the width of the first parallel block column, decoding of the syntax representing the width of the second parallel block column may be omitted, and the width of the second parallel block column may be set to be the same as the width of the first parallel block column.
[0011] In the method of decoding a video signal according to the present disclosure, the second tile column may be a rightmost tile column in the picture.
[0012] In a method for decoding a video signal according to the present disclosure, the step of determining a slice may include: decoding information indicating a method for determining the slice; and decoding information for determining a parallel block included in the slice. In this regard, the information indicating the method for determining the slice may indicate whether the slice is defined based on a raster scan order or whether the slice is defined in a rectangular shape. When the slice is defined based on a raster scan order, the information for determining the parallel block may correspond to information indicating the number of parallel blocks included in the slice, and when the slice is defined in a rectangular shape, the information for determining the parallel block may correspond to information for determining at least one index of the parallel blocks included in the slice.
[0013] In the method of decoding a video signal according to the present disclosure, the information for determining the index may represent an index difference between a tile included in a predetermined position in a slice and a tile included in a predetermined position in a previous slice.
[0014] In the method of decoding a video signal according to the present disclosure, decoding of information for determining a tile may be omitted for the last slice in a picture.
[0015] It should be understood that the foregoing summarized features are exemplary aspects of the following detailed description of the present disclosure and do not limit the scope of the present disclosure.
[0016] Technical Effects
[0017] According to the present disclosure, encoding / decoding efficiency can be improved by partitioning a picture into a plurality of tiles or slices.
[0018] According to the present disclosure, encoding / decoding efficiency can be improved by selectively encoding / decoding size information of tile columns and tile rows according to whether the width / height is the same as the width / height of adjacent tile columns / tile rows.
[0019] According to the present disclosure, encoding / decoding efficiency may be improved by determining a slice based on the number of tiles included in the slice or the index of the tile in the slice.
[0020] Effects obtainable from the present disclosure may not be limited to the above-mentioned effects, and other unmentioned effects may be clearly understood from the following description by a person of ordinary skill in the technical field to which the present disclosure pertains. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 is a diagram illustrating a block diagram of a video encoding device (encoder) according to an embodiment of the present disclosure.
[0022] Figure 2 is a diagram showing a block diagram of a video decoding device (decoder) according to an embodiment of the present disclosure.
[0023] Figure 3 is a diagram illustrating a basic coding tree unit according to an embodiment of the present disclosure.
[0024] Figure 4 is a diagram illustrating various partition types of a coding block.
[0025] Figure 5 is a diagram illustrating an example of one aspect of partitioning a CTU.
[0026] Figure 6 is a flowchart of an inter-frame prediction method according to an embodiment of the present disclosure.
[0027] Figure 7 is a flow chart of the process of deriving current block motion information in merge mode.
[0028] Figure 8 is a diagram illustrating candidate blocks for deriving merge candidates.
[0029] Fig. 9 is a diagram for explaining an example of determining a motion vector for each subblock.
[0030] Fig.10 It is a diagram for explaining the updating aspect of the motion information table.
[0031] Fig.11 is a diagram illustrating an updating aspect of a motion information table.
[0032] Fig.12 is a diagram showing an example in which indexes of pre-stored motion information candidates are updated.
[0033] Fig.13 is a diagram showing the positions of representative sub-blocks.
[0034] Fig.14 An example of generating a motion information table according to the inter prediction mode is shown.
[0035] Fig.15 is a diagram illustrating an example of performing redundancy check on only a part of merge candidates.
[0036] Fig.16 is a diagram showing an example in which a redundancy check on a specific merge candidate is omitted.
[0037] Fig.17 is a flowchart of an intra-frame prediction method according to an embodiment of the present disclosure.
[0038] Fig.18 is a diagram showing an intra prediction mode.
[0039] Fig.19 and Fig. 20 is a diagram showing an example of a one-dimensional array in which reference samples are arranged in rows.
[0040] Fig.21 is a diagram showing an angle formed by a directional intra prediction mode and a straight line parallel to the x-axis.
[0041] Fig. 22 is a diagram illustrating an aspect in which prediction samples are obtained if a current block has a non-square shape.
[0042] Fig.23 is a diagram illustrating a wide-angle intra prediction mode.
[0043] Fig.24 is a flow chart illustrating a process for determining block strength.
[0044] Fig.25 Predefined filter candidates are shown.
[0045] Fig.26 is a diagram illustrating a screen partitioning method according to an embodiment of the present disclosure.
[0046] Fig. 27 An example in which a screen is partitioned into a plurality of tiles is shown.
[0047] Fig.28 is a diagram illustrating aspects of partitioning of a picture according to a flexible tile method.
[0048] Fig.29 is a diagram illustrating an example of determining a scanning order of tile blocks according to a tile group index.
[0049] Fig.30 is a diagram showing an example in which TileID is assigned to each coding tree unit.
[0050] Fig.31 and Fig.32 is a diagram showing an example of defining tile groups based on a raster order.
[0051] Fig.33 is a diagram showing an example in which only rectangular tile groups are allowed.
[0052] Fig.34 is a diagram showing an example in which a parallel block group is defined in a flexible parallel block partitioning method.
[0053] Fig.35 An example of selectively determining whether to apply an in-loop filter on a per-parallel block basis is shown. DETAILED DESCRIPTION
[0054] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings.
[0055] Image encoding and decoding are performed on a block basis. In an example, encoding / decoding processes such as transform, quantization, prediction, in-loop filtering, reconstruction, etc. may be performed on a coding block, a transform block, or a prediction block.
[0056] Hereinafter, the encoding / decoding target block is referred to as a “current block.” In an example, the current block may refer to a coding block, a transform block, or a prediction block according to a current encoding / decoding process.
[0057] In addition, the term "unit" used in this specification means a basic unit for performing a specific encoding / decoding process, and "block" can be understood to mean a sample array having a predetermined size. Unless otherwise specified, "block" and "unit" can be used interchangeably. In the example, the coding block and the coding unit can be understood to have the same meaning as each other in the examples described later.
[0058] Figure 1 is a diagram showing a block diagram of an image encoding device (encoder) according to an embodiment of the present disclosure.
[0059] Reference Figure 1 The image encoding apparatus may include a picture partition unit 110, prediction units 120 and 125, a transform unit 130, a quantization unit 135, a rearrangement unit 160, an entropy encoding unit 165, an inverse quantization unit 140, an inverse transform unit 145, a filter unit 150, and a memory 155.
[0060] Figure 1The components described in the figure are shown independently in order to illustrate different characteristic functions in the image encoding device, and the figure does not mean that each component is composed of separate hardware or a software unit. That is, each component is listed only for the convenience of explanation, at least two of the components may constitute one component, or one component may be partitioned into multiple components that can perform their functions. Even embodiments in which the components are integrated and embodiments in which the components are partitioned are included in the scope of the present disclosure unless they depart from the spirit of the present disclosure.
[0061] In addition, some components are not essential components for performing the essential functions of the present disclosure, but are optional components only for improving performance. The present disclosure may be implemented using essential components for implementing the spirit of the present disclosure other than components only for improving performance, and a structure including only essential components other than optional components only for improving performance is also included in the scope of the present disclosure.
[0062] The picture partition unit 110 may partition the input picture into at least one processing unit. In this regard, the processing unit may be a prediction unit (PU), a transform unit (TU), or a coding unit (CU). In the picture partition unit 110, a single picture may be partitioned into a plurality of combinations of a plurality of coding units, prediction units, and transform units, and the picture may be encoded by selecting a combination of coding units, prediction units, and transform units according to a predetermined condition (e.g., a cost function).
[0063] For example, a single picture may be partitioned into a plurality of coding units. In order to partition a picture into coding units, a recursive tree structure such as a quadtree structure may be used, and a coding unit derived from a root such as a single image or a maximum coding unit may be partitioned into other coding units and may have as many child nodes as the partitioned coding units. Coding units that are no longer partitioned according to certain restrictions become leaf nodes. That is, when it is assumed that only square partitions are available for a single coding unit, a single coding unit may be partitioned into up to four other coding units.
[0064] Hereinafter, in an embodiment of the present disclosure, a coding unit may be used as a unit for encoding, or may be used as a unit for decoding.
[0065] The prediction units may be obtained by partitioning a single coding unit into at least one square or rectangle having the same size, or may be partitioned into prediction units in such a manner that one prediction unit may be different in shape and / or size from another prediction unit.
[0066] In generating a prediction unit based on a coding block on which intra prediction is being performed, when the coding unit is not a minimum coding unit, intra prediction may be performed without performing partitioning into a plurality of N×N prediction units.
[0067] The prediction units 120 and 125 may include an inter-frame prediction unit 120 that performs inter-frame prediction and an intra-frame prediction unit 125 that performs intra-frame prediction. It may be determined whether inter-frame prediction or intra-frame prediction is performed on the prediction unit, and detailed information (e.g., intra-frame prediction mode, motion vector, reference picture, etc.) according to each prediction method may be determined. In this regard, the processing unit on which the prediction is performed may be different from the prediction unit on which the prediction method and its details are determined. For example, the prediction method, prediction mode, etc. may be determined based on the prediction unit, but the prediction may be performed based on the transform unit. The residual value (residual block) between the generated prediction block and the original block may be input to the transform unit 130. In addition, the prediction mode information, motion vector information, etc. used for prediction may be encoded by the entropy encoding unit 165 using the residual value and may be sent to the decoder. When a specific encoding mode is used, the original block is encoded as it is without generating a prediction block through the prediction unit 120 or 125 and is sent to the decoding unit.
[0068] The inter-frame prediction unit 120 may predict the prediction unit based on information about at least one of a previous picture and a subsequent picture of the current picture, or in some cases, may predict the prediction unit based on information about some encoded regions in the current picture. The inter-frame prediction unit 120 may include a reference picture interpolation unit, a motion prediction unit, and a motion compensation unit.
[0069] The reference picture interpolation unit may receive reference picture information from the memory 155, and may generate pixel information of integer pixels or smaller pixels from the reference picture. In the case of luma pixels, an 8-tap DCT-based interpolation filter with different coefficients may be used to generate pixel information about integer pixels or smaller pixels in units of 1 / 4 pixels. In the case of chroma pixels, a 4-tap DCT-based interpolation filter with different filter coefficients may be used to generate pixel information about integer pixels or smaller pixels in units of 1 / 8 pixels.
[0070] The motion prediction unit may perform motion prediction based on the reference picture interpolated by the reference picture interpolation unit. Various methods such as a full search based matching algorithm (FBMA), a three-step search (TSS) algorithm, a new three-step search (NTS) algorithm, etc. may be used as a method for calculating a motion vector. The motion vector may have a motion vector value in units of 1 / 2 pixel or 1 / 4 pixel based on the interpolated pixel. The motion prediction unit may predict the current prediction unit by changing the motion prediction method. Various methods such as a skip method, a merge method, an advanced motion vector prediction (AMVP) method, an intra-block copy method, etc. may be used as a motion prediction method.
[0071] The motion prediction unit 125 may generate a prediction unit based on information of reference pixels around the current block as pixel information in the current picture. When a neighboring block of the current prediction unit is a block on which inter-frame prediction is performed, and thus the reference pixel is a pixel on which inter-frame prediction is performed, the reference pixel included in the block on which inter-frame prediction is performed may be replaced with information about the reference pixel of the neighboring block on which intra-frame prediction is performed. In other words, when a reference pixel is unavailable, at least one reference pixel among available reference pixels may be used to replace the unavailable reference pixel information.
[0072] The prediction mode under the intra prediction may include a directional prediction mode that uses reference pixel information according to a prediction direction when performing prediction, and a non-directional mode that does not use directional information when performing prediction. The mode for predicting luma information may be different from the mode for predicting chroma information. In order to predict chroma information, information about the intra prediction mode for predicting luma information or information about the predicted luma signal may be used.
[0073] In the process of performing intra prediction, when the size of the prediction unit is the same as the size of the transformation unit, intra prediction can be performed on the prediction unit based on pixels located to the left, above the left, and above the prediction unit. However, in the process of performing intra prediction, when the size of the prediction unit is different from the size of the transformation unit, intra prediction can be performed by using reference pixels based on the transformation unit. In addition, intra prediction using N×N partitions can be used only for the minimum coding unit.
[0074] In the intra prediction method, a prediction block may be generated after an adaptive intra smoothing (AIS) filter is applied to reference pixels according to a prediction mode. The type of the AIS filter applied to the reference pixels may vary. In order to perform the intra prediction method, an intra prediction mode for a current prediction unit may be predicted from intra prediction modes of prediction units existing around the current prediction unit. In the process of predicting a prediction mode for a current prediction unit by using mode information predicted from a neighboring prediction unit, when the intra prediction mode for the current prediction unit is the same as the intra prediction mode of the neighboring prediction unit, information indicating that the current prediction unit has the same prediction mode as the neighboring prediction unit may be sent by using predetermined flag information. When the prediction mode for the current prediction unit is different from the prediction mode of the neighboring prediction unit, entropy coding may be performed to encode information about the prediction mode for the current block.
[0075] In addition, a residual block including information on a residual value which is a difference value between a prediction unit on which prediction is performed by the prediction unit 120 or 125 and an original block of the prediction unit may be generated. The generated residual block may be input to the transform unit 130.
[0076] The transform unit 130 may perform a transform on the residual block by using a transform method such as discrete cosine transform (DCT) or discrete sine transform (DST), wherein the residual block includes information about a residual value between the original block and the prediction unit generated by the prediction unit 120 or 125. In this regard, the DCT transform kernel includes at least one of DCT2 or DCT8, and the DST transform kernel includes DST7. Whether to apply DCT or DST to perform a transform on the residual block may be determined based on information about an intra-frame prediction mode of the prediction unit used to generate the residual block. The transform for the residual block may be skipped. A flag indicating whether to skip the transform for the residual block may be encoded. Transform skipping may be allowed for a residual block whose size is less than or equal to a threshold, a residual block of a luminance component in a 4:4:4 format, or a residual block of a chrominance component.
[0077] The quantization unit 135 may perform quantization on the value transformed into the frequency domain by the transformation unit 130. The quantization coefficient may vary according to the importance or block of the image. The value calculated in the quantization unit 135 may be provided to the inverse quantization unit 140 and the rearrangement unit 160.
[0078] The rearrangement unit 160 may perform rearrangement on the transform coefficients with respect to the quantized residual values.
[0079] The rearrangement unit 160 may change the coefficients in the two-dimensional block form into coefficients in the one-dimensional vector form by a coefficient scanning method. For example, the rearrangement unit 160 may scan from the DC coefficient to the coefficients in the high frequency domain by using a zigzag scanning method so as to change the coefficients into the one-dimensional vector form. Depending on the size of the transform unit and the intra-frame prediction mode, vertical direction scanning of scanning the coefficients in the two-dimensional block form along the column direction or horizontal direction scanning of scanning the coefficients in the two-dimensional block form along the row direction may be used instead of the zigzag scanning. In other words, which scanning method to use among the zigzag scanning, the vertical direction scanning, and the horizontal direction scanning may be determined according to the size of the transform unit and the intra-frame prediction mode.
[0080] The entropy encoding unit 165 may perform entropy encoding based on the value calculated by the rearrangement unit 160. The entropy encoding may use various encoding methods, for example, exponential Golomb encoding, context-adaptive variable length coding (CAVLC), or context-adaptive binary arithmetic coding (CABAC).
[0081] The entropy coding unit 165 may encode various types of information obtained from the rearrangement unit 160 and the prediction units 120 and 125 (such as information about residual value coefficients and information about block types of coding units, information about prediction modes, information about partition units, information about prediction units and information about transform units, information about motion vectors, information about reference frames, information about block interpolation, filtering information, and the like).
[0082] The entropy encoding unit 165 may entropy encode the coefficients of the coding unit input from the rearrangement unit 160 .
[0083] The inverse quantization unit 140 may perform inverse quantization on the value quantized in the quantization unit 135, and the inverse transform unit 145 may perform inverse transform on the value transformed in the transform unit 130. The residual value generated by the inverse quantization unit 140 and the inverse transform unit 145 may be added to a prediction unit predicted by a motion estimation unit, a motion compensation unit, or an intra prediction unit included in the prediction units 120 and 125 in order to generate a reconstructed block.
[0084] The filter unit 150 may include at least one of a deblocking filter, an offset correction unit, and an adaptive in-loop filter (ALF).
[0085] The deblocking filter can remove block distortion caused by the boundary between blocks in the reconstructed picture. In order to determine whether to perform the deblocking operation, it can be determined whether to apply the deblocking filter to the current block based on the pixels included in the rows or columns included in the block. When the deblocking filter is applied to the block, a strong filter or a weak filter is applied according to the required deblocking filter strength. In addition, in the process of applying the deblocking filter, when horizontal filtering and vertical filtering are performed, the horizontal filtering and the vertical filtering can be configured to be processed in parallel.
[0086] The offset correction unit can correct the original image with an offset in pixels for the image on which the deblocking operation is performed. In order to perform offset correction on a specific picture, a method of applying an offset to an area determined after partitioning the pixels of the image into a predetermined number of areas, or a method of applying an offset according to edge information of each pixel can be used.
[0087] Adaptive in-loop filtering (ALF) may be performed based on a value obtained by comparing a filtered reconstructed image with an original image. Pixels included in an image may be partitioned into predetermined groups, a filter to be applied to each group may be determined, and filtering may be performed separately for each group. Information on whether ALF is applied may be sent for each coding unit (CU) of a luminance signal, and the shape and filter coefficients of the ALF filter to be applied may vary based on each block. Alternatively, an ALF filter having the same shape (fixed shape) may be applied regardless of the characteristics of the block to which the filter is applied.
[0088] In the memory 155, a reconstructed block or a reconstructed picture calculated by the filter unit 150 may be stored. The stored reconstructed block or the reconstructed picture may be provided to the prediction unit 120 or 125 when inter prediction is performed.
[0089] Figure 2is a diagram showing a block diagram of an image decoding device (decoder) according to an embodiment of the present disclosure.
[0090] Reference Figure 2 , the image decoding apparatus includes an entropy decoding unit 210 , a rearrangement unit 215 , an inverse quantization unit 220 , an inverse transform unit 225 , prediction units 230 and 235 , a filter unit 240 , and a memory 245 .
[0091] When an image bitstream is input from an encoder, the input bitstream may be decoded according to an inverse process of the image encoding apparatus.
[0092] The entropy decoding unit 210 may perform entropy decoding according to an inverse process of entropy encoding performed by an entropy encoding unit of an image encoder. For example, in association with a method performed by an image encoder device, various methods such as exponential Golomb coding, context adaptive variable length coding (CAVLC), or context adaptive binary arithmetic coding (CABAC) may be applied.
[0093] The entropy decoding unit 210 may decode information about intra prediction and inter prediction performed by the encoder.
[0094] The rearrangement unit 215 may perform rearrangement on the bit stream entropy-decoded by the entropy decoding unit 210 based on the rearrangement method used in the encoder. The coefficients represented in the form of a one-dimensional vector may be reconstructed, and the coefficients represented in the form of a one-dimensional vector may be rearranged into coefficients in the form of a two-dimensional block. The rearrangement unit 215 may perform rearrangement by receiving information related to coefficient scanning performed in the encoder and performing inverse scanning based on the scanning order performed in the encoder.
[0095] The inverse quantization unit 220 may perform inverse quantization based on the quantization parameter received from the encoder and the coefficient value of the rearranged block.
[0096] The inverse transform unit 225 may perform an inverse transform (i.e., inverse DCT or inverse DST) for the transform (i.e., DCT or DST) performed on the quantization result by the transform unit in the image encoder. In this regard, the DCT transform core may include at least one of DCT2 or DCT8, and the DST transform core may include DST7. Optionally, when the transform is skipped in the image encoder, the inverse transform is also not performed in the inverse transform unit 225. The inverse transform may be performed based on the transform unit determined by the image encoder. The inverse transform unit 225 of the image decoder may selectively perform a transform method (e.g., DCT or DST) according to a plurality of pieces of information (such as a prediction method, a size of a current block, a prediction direction, etc.).
[0097] The prediction unit 230 or 235 may generate a prediction block based on information related to the prediction block received from the entropy decoding unit 210 and information about a previously decoded block or picture received from the memory 245 .
[0098] As described above, like the operation of the image encoder, in the process of performing intra-frame prediction, when the size of the prediction unit is the same as the size of the transformation unit, intra-frame prediction can be performed on the prediction unit based on the pixels located on the left, upper left, and above the prediction unit. However, in the process of performing intra-frame prediction, when the size of the prediction unit is different from the size of the transformation unit, intra-frame prediction can be performed by using reference pixels based on the transformation unit. In addition, intra-frame prediction using N×N partitions can be used only for the minimum coding unit.
[0099] The prediction units 230 and 235 may include a PU determination module, an inter prediction unit, and an intra prediction unit. The PU determination unit may receive various types of information (such as information about the prediction unit, information about the prediction mode of the intra prediction method, information about the motion prediction of the inter prediction method, etc.) input from the entropy decoding unit 210, may partition the prediction unit in the current coding unit, and may determine whether to perform inter prediction or intra prediction on the prediction unit. By using the information required for inter prediction of the current prediction unit received from the image encoder, the inter prediction unit 230 may perform inter prediction on the current prediction unit based on information about at least one of a previous picture and a subsequent picture of the current picture including the current prediction unit. Alternatively, inter prediction may be performed based on information about some pre-reconstructed areas in the current picture including the current prediction unit.
[0100] In order to perform inter prediction, which method of the skip mode, the merge mode, the AMVP mode, or the intra block copy mode is used as a motion prediction method for a prediction unit included in the coding unit may be determined based on the coding unit.
[0101] The intra prediction unit 235 may generate a prediction block based on information about pixels within the current picture. When the prediction unit is a prediction unit that has been subjected to intra prediction, intra prediction may be performed based on information about the intra prediction mode of the prediction unit received from the image encoder. The intra prediction unit 235 may include an adaptive intra smoothing (AIS) filter, a reference pixel interpolation module, or a DC filter. The AIS filter may perform filtering on the reference pixels of the current block, and may determine whether to apply the filter based on the prediction mode used for the current prediction unit. When AIS filtering is performed on the reference pixels of the current block, the prediction mode of the prediction unit received from the image encoder and information about the AIS filter may be used. When the prediction mode for the current block is a mode to which AIS filtering is not applied, the AIS filter may not be applied.
[0102] When the prediction mode of the prediction unit is a prediction mode for performing intra prediction based on a pixel value obtained by interpolating reference pixels, the reference pixel interpolation unit may interpolate the reference pixels so as to generate reference pixels having an integer or smaller unit. When the prediction mode for the current prediction unit is a prediction mode for generating a prediction block without interpolating reference pixels, the reference pixels may not be interpolated. When the prediction mode for the current block is a DC mode, the DC filter may generate a prediction block by filtering.
[0103] The reconstructed block or the reconstructed picture may be provided to the filter unit 240. The filter unit 240 may include a deblocking filter, an offset correction module, and an ALF.
[0104] Information about whether a deblocking filter has been applied to a corresponding block or picture and information about whether a strong filter or a weak filter is applied when the deblocking filter is applied may be received from the image encoder. A deblocking filter of an image decoder may receive information about the deblocking filter from the image encoder, and the image decoder may perform deblocking filtering on the corresponding block.
[0105] The offset correction unit may perform offset correction on the reconstructed image based on the type of offset correction applied to the image when encoding is performed, information about the offset value, and the like.
[0106] ALF may be applied to the coding unit based on information on whether ALF is applied, information on an ALF coefficient, etc. received from the encoder. The above ALF information may be provided by being included in a specific parameter set.
[0107] In the memory 245 , the reconstructed picture or the reconstructed block may be stored in order to be used as a reference picture or a reference block, and the reconstructed picture may be provided to the output unit.
[0108] Figure 3 is a diagram illustrating a basic coding tree unit according to an embodiment of the present disclosure.
[0109] The largest coding block may be defined as a coding tree block. A single picture may be partitioned into a plurality of coding tree units (CTUs). A CTU may be a coding unit of the largest size and may be referred to as a largest coding unit (LCU). Figure 3 is a diagram showing an example in which a single picture is partitioned into a plurality of CTUs.
[0110] The size of the CTU may be defined at a picture level or a sequence level. Similarly, information indicating the size of the CTU may be signaled through a picture parameter set or a sequence parameter set.
[0111] In an example, the size of the CTU for the entire picture within the sequence may be set to 128×128. Alternatively, any one of 128×128 or 256×256 may be determined as the size of the CTU at a picture level. In an example, the CTU may be set to have a size of 128×128 in a first picture, and may be set to have a size of 256×256 in a second picture.
[0112] A coding block may be generated by partitioning the CTU. A coding block represents a basic unit for performing encoding / decoding. In an example, prediction or transformation may be performed for each coding block, or a prediction coding mode may be determined for each coding block. In this regard, the prediction coding mode represents a method for generating a predicted image. In an example, the prediction coding mode may include intra prediction, inter prediction, current picture reference (CPR), intra block copy (IBC), or combined prediction. For a coding block, a prediction block of the coding block may be generated by using a prediction coding mode of at least one of intra prediction, inter prediction, current picture reference, or combined prediction.
[0113] Information indicating the prediction coding mode for the current block may be signaled in the bitstream. In an example, the information may be a 1-bit flag indicating whether the prediction coding mode is an intra mode or an inter mode. When the prediction coding mode for the current block is determined to be an inter mode, current picture reference or combined prediction may be available.
[0114] The current picture reference is to set the current picture as the reference picture and obtain the prediction block of the current block from the area in the current picture that has been encoded / decoded. In this regard, the current picture represents the picture including the current block. Information indicating whether the current picture reference is applied to the current block can be sent by signal in the bitstream. In an example, the information can be a 1-bit flag. When the flag is true (TRUE), the prediction coding mode for the current block can be determined as the current picture reference, and when the flag is false (FALSE), the prediction coding mode for the current block can be determined as inter-frame prediction.
[0115] Alternatively, the prediction coding mode for the current block may be determined based on the reference picture index. In an example, when the reference picture index indicates the current picture, the prediction coding mode for the current block may be determined as the current picture reference. When the reference picture index indicates a picture other than the current picture, the prediction coding mode for the current block may be determined as the inter-frame prediction. In other words, the current picture reference is a prediction method using information about an area that has been encoded / decoded within the current picture, and the inter-frame prediction is a prediction method using information about another picture that has been encoded / decoded.
[0116] Combined prediction refers to a combined coding mode that combines at least two of intra prediction, inter prediction, and current picture reference. In the example, when combined prediction is applied, a first prediction block may be generated based on any one of intra prediction, inter prediction, or current picture reference, and a second prediction block may be generated based on another one of intra prediction, inter prediction, or current picture reference. When the first prediction block and the second prediction block are generated, a final prediction block may be generated by calculating an average or weighted sum of the first prediction block and the second prediction block. Information indicating whether combined prediction is applied to the current block may be signaled in the bitstream. The information may be a 1-bit flag.
[0117] Figure 4 is a diagram illustrating various partition types of a coding block.
[0118] The coding block may be partitioned into a plurality of coding blocks based on quadtree partitioning, binary tree partitioning, or ternary tree partitioning. The partitioned coding block may be partitioned into a plurality of coding blocks based on quadtree partitioning, binary tree partitioning, or ternary tree partitioning.
[0119] Quadtree partitioning represents a method of partitioning the current block into four blocks. As a result of quadtree partitioning, the current block can be partitioned into four square partitions (refer to Figure 4 of "SPLIT_QT").
[0120] Binary tree partitioning refers to a method of partitioning a current block into two blocks. An operation of partitioning a current block into two blocks along a vertical direction (i.e., using a vertical line passing through the current block) may be referred to as vertical binary tree partitioning, and an operation of partitioning a current block into two blocks along a horizontal direction (i.e., using a horizontal line passing through the current block) may be referred to as horizontal binary tree partitioning. As a result of the binary tree partitioning, the current block may be partitioned into two non-square partitions. Figure 4 "SPLIT_BT_VER" is a diagram showing the result of binary tree partitioning in the vertical direction. Figure 4 “SPLIT_BT_HOR” is a diagram showing the result of binary tree partitioning in the horizontal direction.
[0121] Ternary tree partitioning means a method of partitioning a current block into three blocks. The operation of partitioning a current block into three blocks along a vertical direction (i.e., using two vertical lines passing through the current block) may be referred to as vertical ternary tree partitioning, and the operation of partitioning a current block into three blocks along a horizontal direction (i.e., using two horizontal lines passing through the current block) may be referred to as horizontal ternary tree partitioning. As a result of the ternary tree partitioning, the current block may be partitioned into three non-square partitions. In this regard, the width / height of the partition located at the center of the current block may be twice the width / height of the other partitions. Figure 4 "SPLIT_TT_VER" is a diagram showing the result of ternary tree partitioning in the vertical direction. Figure 4 “SPLIT_TT_HOR” is a diagram showing the result of ternary tree partitioning in the horizontal direction.
[0122] The number of partitions of a CTU may be defined as a partition depth. The maximum partition depth of a CTU may be determined at a sequence level or a picture level. Therefore, the maximum partition depth of a CTU may vary based on a sequence or a picture.
[0123] Optionally, the maximum partition depth may be determined independently for each partitioning method. In an example, the maximum partition depth allowed for quadtree partitioning may be different from the maximum partition depth allowed for binary tree partitioning and / or ternary tree partitioning.
[0124] The encoder may signal information indicating at least one of a partition type and a partition depth of a current block in a bitstream, and the decoder may determine a partition type and a partition depth of a CTU based on the information obtained by parsing the bitstream.
[0125] Figure 5 is a diagram illustrating an example of one aspect of partitioning a CTU.
[0126] An operation of partitioning a coding block by using quadtree partitioning, binary tree partitioning, and / or ternary tree partitioning may be referred to as multitree partitioning.
[0127] A coding block generated by partitioning a coding block by applying multi-tree partitioning may be referred to as a sub coding block. When the partition depth of the coding block is k, the partition depth of the sub coding block is set to k+1.
[0128] In contrast, for a coding block whose partition depth is k+1, the coding block whose partition depth is k may be referred to as a parent coding block.
[0129] The partition type of the current coding block may be determined based on at least one of the partition type of the parent coding block and the partition type of the adjacent coding block. In this regard, the adjacent coding block may be a block adjacent to the current coding block, and may include at least one of an upper adjacent block, a left adjacent block, or an adjacent block adjacent to the upper left corner of the current coding block. In this regard, the partition type may include whether quadtree partitioning is applied, whether binary tree partitioning is applied, the direction of binary tree partitioning, whether ternary tree partitioning is applied, or the direction of ternary tree partitioning.
[0130] In order to determine the partition type of the coding block, information indicating whether the coding block is partitioned may be signaled in the bitstream. This information may be a 1-bit flag "split_cu_flag", and when the flag is true, it may indicate that the coding block is partitioned by a multi-tree partitioning method.
[0131] When split_cu_flag is true, information indicating whether the coding block is partitioned by quadtree partitioning may be signaled in the bitstream. This information may be a 1-bit flag split_qt_flag, and when this flag is true, the coding block may be partitioned into four blocks.
[0132] In the example, Figure 5 In the example shown in , the CTU is partitioned by quadtree partitioning, and thus four coding blocks with a partition depth of 1 are generated. In addition, it is shown that quadtree partitioning is applied again to the first coding block and the fourth coding block among the four coding blocks generated by quadtree partitioning. As a result, four coding blocks with a partition depth of 2 can be generated.
[0133] In addition, by applying quadtree partitioning again to the coding block with a partition depth of 2, a coding block with a partition depth of 3 may be generated.
[0134] When quadtree partitioning is not applied to a coding block, it may be determined whether to perform binary tree partitioning or ternary tree partitioning on the coding block according to at least one of the size of the coding block, whether the coding block is located at a picture boundary, the maximum partition depth, or the partition type of the neighboring block. When it is determined that binary tree partitioning or ternary tree partitioning is performed on the coding block, information indicating the partition direction may be sent by signal in the bitstream. The information may be a 1-bit flag mtt_split_cu_vertical_flag. Based on the flag, it may be determined whether the partition direction is vertical or horizontal. In addition, information indicating which of binary tree partitioning or ternary tree partitioning is applied to the coding block may be sent by signal in the bitstream. The information may be a 1-bit flag mtt_split_cu_binary_flag. Based on the flag, it may be determined whether binary tree partitioning is applied to the coding block or ternary tree partitioning is applied to the coding block.
[0135] In the example, Figure 5 In the example shown in , vertical binary tree partitioning is applied to a coding block with a partition depth of 1, vertical ternary tree partitioning is applied to a left coding block among the coding blocks generated by the vertical binary tree partitioning, and vertical binary tree partitioning is applied to a right coding block.
[0136] Inter prediction is a prediction coding mode that predicts a current block by using information about a previous picture. In an example, a block in a previous picture that is located at the same position as the current block (hereinafter referred to as a co-located block) may be set as a prediction block of the current block. Hereinafter, a prediction block generated based on the co-located block of the current block may be referred to as a co-located prediction block.
[0137] In contrast, when an object existing in a previous picture has moved to another position in a current picture, the current block can be effectively predicted by using the motion of the object. For example, when the moving direction and size of the object are determined by comparing the previous picture with the current picture, a prediction block (or a prediction image) of the current block can be generated according to the motion information of the object. Hereinafter, the prediction block generated by using the motion information may be referred to as a motion prediction block.
[0138] The residual block may be generated by subtracting the prediction block from the current block. In this regard, in the case where the object moves, the energy of the residual block may be reduced by using the motion prediction block instead of using the co-located prediction block, and thus the compression performance of the residual block may be improved.
[0139] As above, the operation of generating a prediction block by using motion information may be referred to as motion estimation prediction. In most inter predictions, a prediction block may be generated based on motion compensation prediction.
[0140] The motion information may include at least one of a motion vector, a reference picture index, a prediction direction, and a bidirectional weighting factor index. The motion vector represents the moving direction and magnitude of an object. The reference picture index specifies a reference picture of a current block among reference pictures included in a reference picture list. The prediction direction indicates any one of unidirectional L0 prediction, unidirectional L1 prediction, or bidirectional prediction (L0 prediction and L1 prediction). At least one of L0 direction motion information and L1 direction motion information may be used according to the prediction direction of the current block. The bidirectional weighting factor index specifies a weighting factor applied to an L0 prediction block and a weighting factor applied to an L1 prediction block.
[0141] Figure 6 is a flowchart of an inter-frame prediction method according to an embodiment of the present disclosure.
[0142] Reference Figure 6 The inter-frame prediction method includes: determining an inter-frame prediction mode for a current block (S601), obtaining motion information of the current block according to the determined inter-frame prediction mode (S602), and performing motion compensation prediction on the current block based on the obtained motion information (S603).
[0143] In this regard, the inter prediction mode may represent various methods for determining motion information of the current block, and may include an inter prediction mode using translational motion information, an inter prediction mode using affine motion information. In an example, the inter prediction mode using translational motion information may include a merge mode and a motion vector prediction mode, and the inter prediction mode using affine motion information may include an affine merge mode and an affine motion vector prediction mode. The motion information about the current block may be determined based on neighboring blocks adjacent to the current block or information obtained by parsing a bitstream.
[0144] The motion information of the current block may be derived from the motion information of another block. In this regard, the other block may be a block that is encoded / decoded by inter-frame prediction before the current block. The operation of setting the motion information of the current block to be the same as the motion information of the other block may be defined as a merge mode. In addition, the operation of setting the motion vector of the other block to the predicted value of the motion vector of the current block may be referred to as a motion vector prediction mode.
[0145] Figure 7 is a flow chart of a process for deriving motion information for a current block in merge mode.
[0146] A merge candidate of a current block may be derived (S701). The merge candidate of the current block may be derived from a block encoded / decoded by inter prediction before the current block.
[0147] Figure 8 is a diagram illustrating candidate blocks for deriving merge candidates.
[0148] The candidate block may include at least one of a neighboring block including samples adjacent to the current block or a non-neighboring block including samples not adjacent to the current block. Hereinafter, samples for determining the candidate block are defined as basic samples. In addition, basic samples adjacent to the current block are referred to as neighboring basic samples, and basic samples not adjacent to the current block are referred to as non-neighboring basic samples.
[0149] The neighboring basic sample points may be included in the neighboring columns of the leftmost column of the current block or the neighboring rows of the uppermost row of the current block. In an example, when the coordinates of the upper left sample point of the current block are (0,0), at least one block among the blocks including the basic sample points at positions (-1,H-1), (W-1,-1), (W,-1), (-1,H) or (-1,1) may be used as a candidate block. Referring to the diagram, neighboring blocks of index 0 to index 4 may be used as candidate blocks.
[0150] The non-neighboring basic sample points represent samples having at least one of an x-axis distance or a y-axis distance with respect to the basic sample points adjacent to the current block having a predefined value. In an example, at least one of a block including a basic sample point having an x-axis distance with respect to the left basic sample point having a predefined value, a block including a non-neighboring sample point having a y-axis distance with respect to the upper basic sample point having a predefined value, or a block including a non-neighboring sample point having an x-axis distance and a y-axis distance with respect to the upper left basic sample point having predefined values may be used as a candidate block. The predefined value may be a natural number such as 4, 8, 12, 16, etc. Referring to the diagram, at least one block of index 5 to index 26 may be used as a candidate block.
[0151] Optionally, a candidate block that does not belong to the same coding tree unit as the current block may be set to be unavailable as a merge candidate. In an example, when the base sample is outside the upper boundary of the coding tree unit to which the current block belongs, the candidate block including the base sample may be set to be unavailable as a merge candidate.
[0152] The merge candidate may be derived from a temporally adjacent block included in a picture different from the current block. In an example, the merge candidate may be derived from a co-located block included in a co-located picture. Any one of the reference pictures included in the reference picture list may be set as the co-located picture. Index information identifying the co-located picture in the reference picture may be signaled in the bitstream. Optionally, a reference picture having a predefined index in the reference picture may be determined as the co-located picture.
[0153] The motion information of the merge candidate may be set to be the same as the motion information of the candidate block. In an example, at least one of a motion vector, a reference picture index, a prediction direction, or a bidirectional weight index of the candidate block may be set to the motion information of the merge candidate.
[0154] A merge candidate list including merge candidates may be generated ( S702 ).
[0155] The indexes of the merge candidates in the merge candidate list may be assigned according to a predetermined order. In an example, the indexes may be assigned in the order of: merge candidates derived from the left neighboring block, merge candidates derived from the upper neighboring block, merge candidates derived from the upper right neighboring block, merge candidates derived from the lower left neighboring block, merge candidates derived from the upper left neighboring block, and merge candidates derived from the temporal neighboring block.
[0156] When multiple merge candidates are included in the merge candidate list, at least one of the multiple merge candidates may be selected (S703). Specifically, information for specifying any one of the multiple merge candidates may be signaled in the bitstream. In the example, information merge_idx indicating an index of any one of the merge candidates included in the merge candidate list may be signaled in the bitstream.
[0157] The motion vector may be derived per sub-block.
[0158] Fig. 9 is a diagram explaining an example of determining a motion vector for each subblock.
[0159] Any motion vector among the multiple merge candidates included in the merge candidate list may be set as the initial motion vector of the current block. In this regard, the merge candidate used to derive the initial motion vector may be determined by the syntax merge_idx. Optionally, when searching for neighboring blocks adjacent to the current block in a predetermined scanning order, the initial motion vector may be derived from the first available merge candidate found. In this regard, the predetermined scanning order may be the order of the neighboring block (A1) adjacent to the left side of the current block, the neighboring block (B1) adjacent to the top of the current block, the neighboring block (B0) adjacent to the upper right corner of the current block, and the neighboring block (A0) adjacent to the lower left corner of the current block. Optionally, the predetermined scanning order may be defined in the order of B1, B0, A1, and A0 or may be determined in the order of B1, A1, B0, and A0.
[0160] If the initial motion vector is determined, the co-located picture of the current block may be determined. In this regard, the co-located picture may be set to a reference picture with a predefined index among the reference pictures included in the reference picture list. For example, the predefined index may be 0 or a maximum index. Optionally, information for determining the co-located picture may be signaled in the bitstream. In an example, a syntax collocated_ref_idx specifying a co-located picture in the reference picture list may be signaled in the bitstream.
[0161] If a co-located picture is determined, a block that is spaced apart from a co-located block having the same position and size as the current block in the co-located picture by an initial motion vector may be determined. The block specified by the initial motion vector may be referred to as a co-located picture corresponding block. In an example, when the initial motion vector (for Fig. 9 , when the motion vector of block A1 is (x1, y1), the block at the same position as the current block in the co-located picture (ie, the co-located block) and the distance therebetween (x1, y1) can be determined as the corresponding block of the co-located picture.
[0162] If the co-located picture corresponding block is determined, the motion vector of the sub-block in the co-located picture corresponding block may be set as the motion vector of the sub-block in the current block. In an example, when the current block is partitioned into 4×4-sized sub-blocks, the motion vector of the 4×4-sized sub-block in the co-located picture corresponding block may be set as the motion vector of each sub-block in the current block.
[0163] When a subblock in a corresponding block of a co-located picture has a bidirectional motion vector (e.g., an L0 motion vector and an L1 motion vector), the bidirectional motion vector of the subblock in the corresponding block of the co-located picture may be regarded as the bidirectional motion vector of the subblock in the current block. Alternatively, based on whether bidirectional prediction is applied to the current block, only the L0 motion vector or only the L1 motion vector may be obtained from the subblock in the corresponding block of the co-located picture.
[0164] Optionally, when the reference picture of the current block is different from the reference picture of the corresponding block in the same picture, the motion vector of the subblock in the corresponding block in the same picture may be scaled to derive the motion vector of the subblock in the current block.
[0165] The reference picture of the current block and whether bidirectional prediction is applied to the current block can be set to be the same as the merge candidate used to derive the initial motion vector. Optionally, information for specifying the reference picture of the current block and / or information indicating whether bidirectional prediction is applied to the current block can be signaled in the bitstream.
[0166] Information indicating whether motion vectors are to be derived per sub-block may be signaled in the bitstream. The information may be a 1-bit flag, but is not limited thereto. Optionally, whether motion vectors are to be derived per sub-block may be determined based on whether bidirectional prediction is applied to the current block or to at least one of the multiple available merge candidates.
[0167] When the number of merge candidates included in the merge candidate list is less than the threshold value, the motion information candidate included in the motion information table may be added to the merge candidate list as a merge candidate. In this regard, the threshold value may be the maximum number of merge candidates that may be included in the merge candidate list or a value minus an offset from the maximum number of merge candidates. The offset may be a natural number (such as 1 or 2, etc.).
[0168] The motion information table includes motion information candidates derived from a block encoded / decoded based on inter-frame prediction in a current picture. In an example, motion information of the motion information candidate included in the motion information table may be set to be the same as motion information of the block encoded / decoded based on inter-frame prediction. In this regard, the motion information may include at least one of a motion vector, a reference picture index, a prediction direction, or a bidirectional weight index.
[0169] The motion information candidates included in the motion information table may also be referred to as inter region merging candidates or prediction region merging candidates.
[0170] The maximum number of motion information candidates that can be included in the motion information table can be predefined in the encoder and the decoder. In an example, the maximum number of motion information candidates that can be included in the motion information table can be 1, 2, 3, 4, 5, 6, 7, 8 or more (e.g., 16).
[0171] Optionally, information indicating the maximum number of motion information candidates that can be included in the motion information table may be signaled in the bitstream. The information may be signaled at a sequence, picture, or slice level. The information may indicate the maximum number of motion information candidates that can be included in the motion information table. Optionally, the information may indicate the difference between the maximum number of motion information candidates that can be included in the motion information table and the maximum number of merge candidates that can be included in the merge candidate list.
[0172] Alternatively, the maximum number of motion information candidates that can be included in the motion information table may be determined according to a picture size, a slice size, or a coding tree unit size.
[0173] The motion information table may be initialized in units of pictures, slices, tiles, blocks, coding tree units, or coding tree unit lines (rows or columns). In an example, when a slice is initialized, the motion information table is also initialized, and thus the motion information table may not include any motion information candidates.
[0174] Optionally, information indicating whether the motion information table is to be initialized may be signaled in the bitstream. The information may be signaled at a slice, tile, tile or block level. Before the information indicates initialization of the motion information table, a pre-configured motion information table may be used.
[0175] Alternatively, information about the initial motion information candidate may be signaled in a picture parameter set or a slice header. Although the slice is initialized, the motion information table may include the initial motion information candidate. Therefore, the initial motion information candidate may be used for a block of the first encoding / decoding target in the slice.
[0176] Optionally, the motion information candidate included in the motion information table of the previous coding tree unit may be set as the initial motion information candidate. In an example, the motion information candidate having the smallest index or the largest index among the motion information candidates included in the motion information table of the previous coding tree unit may be set as the initial motion information candidate.
[0177] The blocks are encoded / decoded in the order of encoding / decoding, and the blocks encoded / decoded based on the inter prediction may be sequentially set as motion information candidates in the order of encoding / decoding.
[0178] Fig.10 is a diagram for explaining the updating aspect of the motion information table.
[0179] For a current block, when inter prediction is performed (S1001), a motion information candidate may be derived based on the current block (S1002). The motion information of the motion information candidate may be set to be the same as the motion information of the current block.
[0180] When the motion information table is empty ( S1003 ), the motion information candidate derived based on the current block may be added to the motion information table ( S1004 ).
[0181] When the motion information table already includes motion information candidates (S1003), a redundancy check of the motion information of the current block (or the motion information candidates derived therefrom) may be performed (S1005). The redundancy check is used to determine whether the motion information of the pre-stored motion information candidates in the motion information table is the same as the motion information of the current block. The redundancy check may be performed on all pre-stored motion information candidates in the motion information table. Optionally, the redundancy check may be performed on motion information candidates having an index exceeding or below a threshold among the pre-stored motion information candidates in the motion information table. Optionally, the redundancy check may be performed for a predefined number of motion information candidates. In an example, two motion information candidates having the smallest index or having the largest index may be determined as targets of the redundancy check.
[0182] When a motion information candidate having the same motion information as the current block is not included, a motion information candidate derived based on the current block may be added to the motion information table (S1008). Whether the motion information candidates are the same may be determined based on whether the motion information (e.g., motion vector / reference picture index, etc.) of the motion information candidates are the same.
[0183] In this regard, when the maximum number of motion information candidates is already stored in the motion information table (S1006), the oldest motion information candidate may be deleted (S1007), and the motion information candidate derived based on the current block may be added to the motion information table (S1008). In this regard, the oldest motion information candidate may be a motion information candidate having a maximum or minimum index.
[0184] The motion information candidate may be identified by a corresponding index. When a motion information candidate derived from the current block is added to the motion information table, a minimum index (e.g., 0) may be assigned to the motion information candidate, and the index of the pre-stored motion information candidate may be increased by 1. In this regard, when the maximum number of motion information candidates is already stored in the motion information table, the motion information candidate with the largest index is removed.
[0185] Optionally, when a motion information candidate derived from the current block is added to the motion information table, the maximum index may be assigned to the motion information candidate. In an example, when the number of pre-stored motion information candidates in the motion information table is less than the maximum value, an index having the same value as the number of pre-stored motion information candidates may be assigned to the motion information candidate. Optionally, when the number of pre-stored motion information candidates in the motion information table is equal to the maximum value, an index obtained by subtracting 1 from the maximum value may be assigned to the motion information candidate. Optionally, the motion information candidate having the smallest index is removed, and the index of the residual pre-stored motion information candidate is reduced by 1.
[0186] Fig.11 is a diagram illustrating an updating aspect of a motion information table.
[0187] It is assumed that when a motion information candidate derived from the current block is added to the motion information table, a maximum index is assigned to the motion information candidate. In addition, it is assumed that the maximum number of motion information candidates has been stored in the motion information table.
[0188] When the motion information candidate HmvpCand[n+1] derived from the current block is added to the motion information table HmvpCandList, the motion information candidate HmvpCand[0] having the smallest index among the pre-stored motion information candidates may be deleted, and the index of the residual motion information candidate may be reduced by 1. In addition, the index of the motion information candidate HmvpCand[n+1] derived from the current block may be set to the maximum value (for Fig.11 The example shown in , n).
[0189] When the same motion information candidate as the motion information candidate derived based on the current block is pre-stored ( S1005 ), the motion information candidate derived based on the current block may not be added to the motion information table ( S1009 ).
[0190] Optionally, when the motion information candidate derived based on the current block is added to the motion information table, the pre-stored motion information candidate identical to the motion information candidate may be removed. In this case, it produces the same effect as when the index of the pre-stored motion information candidate is newly updated.
[0191] Fig.12 is a diagram showing an example in which indexes of pre-stored motion information candidates are updated.
[0192] When the index of the pre-stored motion information candidate that is the same as the motion information candidate mvCand derived from the current block is hIdx, the pre-stored motion information candidate may be removed, and the index of the motion information candidate having an index greater than hIdx may be reduced by 1. In an example, Fig.12The example shown in shows that HmvpCand[2] identical to mvCand is deleted in the motion information table HvmpCandList, and the indexes from HmvpCand[3] to HmvpCand[n] are decreased by 1.
[0193] And, the motion information candidate mvCand derived based on the current block may be added to the end of the motion information table.
[0194] Alternatively, an index assigned to the same pre-stored motion information candidate as the motion information candidate derived based on the current block may be updated. For example, the index of the pre-stored motion information candidate may be changed to a minimum value or a maximum value.
[0195] The motion information of the blocks included in the predetermined area may be set not to be added to the motion information table. In an example, the motion information candidates derived based on the motion information of the blocks included in the merge processing area may not be added to the motion information table. Since the encoding / decoding order of the blocks included in the merge processing area is not defined, it is inappropriate to use the motion information of any one of them for inter-frame prediction of another one of them. Therefore, the motion information candidates derived based on the blocks included in the merge processing area may not be added to the motion information table.
[0196] Optionally, the motion information of a block smaller than a preset size may be set not to be added to the motion information table. In an example, the motion information candidate derived based on the motion information of a coding block with a width or height less than 4 or 8 or the motion information of a coding block of 4×4 size may not be added to the motion information table.
[0197] When motion compensated prediction is performed on a per-subblock basis, a motion information candidate may be derived based on motion information of a representative subblock among a plurality of subblocks included in the current block. In an example, when a subblock merge candidate is used for the current block, a motion information candidate may be derived based on motion information of a representative subblock among the subblocks.
[0198] The motion vector of the sub-block can be derived in the following order. First, any one of the merge candidates included in the candidate list of the current block can be selected, and the initial shift vector (shVector) can be derived based on the motion vector of the selected merge candidate. And, the shifted sub-block whose basic sample is located at (xColSb, yColSb) can be derived by adding the initial shift vector to the position (xSb, ySb) of the basic sample (e.g., the upper left sample or the center sample) of each sub-block in the coding block. The following equation 1 shows a formula for deriving a shifted sub-block.
[0199] [Equation 1]
[0200] (xColSb,yColSb)=(xSb+shVector[O]>>4,ySb+shVector[1]>>4)
[0201] Then, a motion vector of a co-located block corresponding to a center position of a sub-block including (xColSb, yColSb) may be set as a motion vector of a sub-block including (xSb, ySb).
[0202] The representative sub-block may mean a sub-block including an upper left sample or a center sample of the current block.
[0203] Fig.13 is a diagram showing the positions of representative sub-blocks.
[0204] Fig.13 (a) shows an example in which a sub-block located at the upper left of the current block is set as a representative sub-block, and Fig.13 (b) shows an example in which a subblock located at the center of the current block is set as a representative subblock. When motion compensation prediction is performed based on subblocks, a motion information candidate of the current block may be derived based on a motion vector of a subblock including a top left sample of the current block or a center sample of the current block.
[0205] Based on the inter prediction mode of the current block, it may be determined whether the current block will be used as a motion information candidate. In an example, a block encoded / decoded based on an affine motion model may be set to be unusable as a motion information candidate. Therefore, although the current block is encoded / decoded by inter prediction, when the inter prediction mode of the current block is an affine prediction mode, the motion information table may not be updated based on the current block.
[0206] Alternatively, the motion information candidate may be derived based on at least one sub-block vector of a sub-block included in a block encoded / decoded based on an affine motion model. In an example, the motion information candidate may be derived by using a sub-block located at the upper left, center, or upper right of the current block. Alternatively, an average value of sub-block vectors of a plurality of sub-blocks may be set as a motion vector of the motion information candidate.
[0207] Alternatively, the motion information candidate may be derived based on an average value of affine seed vectors of blocks encoded / decoded according to an affine motion model. In an example, at least an average value of a first affine seed vector, a second affine seed vector, or a third affine seed vector of the current block may be set as a motion vector of the motion information candidate.
[0208] Optionally, the motion information table may be configured according to the inter prediction mode. In an example, at least one of a motion information table of a block encoded / decoded by intra block copying, a motion information table of a block encoded / decoded based on a translational motion model, or a motion information table of a block encoded / decoded based on an affine motion model may be defined. Depending on the inter prediction mode of the current block, any one of the plurality of motion information tables may be selected.
[0209] Fig.14 An example of generating a motion information table according to the inter prediction mode is shown.
[0210] When a block is encoded / decoded based on a non-affine motion model, the motion information candidate mvCand derived based on the above block may be added to the non-affine motion information table HmvpCandList.
[0211] The motion information candidate may be set to include additional information in addition to the motion information. In an example, at least one of the size, shape, or partition information of the block may be additionally stored in the motion information candidate. When configuring the merge candidate list of the current block, only the motion information candidates whose size, shape, or partition information is the same as or similar to that of the current block among the motion information candidates may be used, or the motion information candidates whose size, shape, or partition information is the same as or similar to that of the current block may be pre-added to the merge candidate list.
[0212] When the number of merge candidates included in the merge candidate list of the current block is less than a threshold value, the motion information candidate included in the motion information table may be added to the merge candidate list as a merge candidate. The additional processing is performed in an order reflecting the sorting order of the indexes of the motion information candidates in ascending or descending order. In an example, the motion information candidate with the largest index may be first added to the merge candidate list of the current block.
[0213] When a motion information candidate included in the motion information table is added to the merge candidate list, a redundancy check between the motion information candidate and the pre-stored merge candidates in the merge candidate list may be performed. As a result of the redundancy check, a motion information candidate having the same motion information as the pre-stored merge candidate may not be added to the merge candidate list.
[0214] The redundancy check may be performed only on a portion of the motion information candidates included in the motion information table. In an example, the redundancy check may be performed only on motion information candidates having an index exceeding or below a threshold. Alternatively, the redundancy check may be performed only on N motion information candidates having a maximum index or a minimum index.
[0215] Optionally, redundancy check may be performed only on a portion of the pre-stored merge candidates in the merge candidate list. In an example, redundancy check may be performed only on merge candidates whose index exceeds or is below a threshold or merge candidates derived from a block at a specific position. In this regard, the specific position may include at least one of a left neighboring block, an upper neighboring block, an upper right neighboring block, or a lower left neighboring block of the current block.
[0216] Fig.15 is a diagram illustrating an example of performing redundancy check on only a part of merge candidates.
[0217] When the motion information candidate HmvpCand[j] is added to the merge candidate list, a redundancy check with 2 merge candidates mergeCandList[NumMerge-2] and mergeCandList[NumMerge-1] having the largest index may be performed for the motion information candidate. In this regard, NumMerge may show the number of available spatial merge candidates and temporal merge candidates.
[0218] Unlike the example shown, when the motion information candidate HmvpCand[j] is added to the merge candidate list, a redundancy check with two merge candidates with the smallest index may be performed for the motion information candidate. For example, it may be checked whether mergeCandList[0] and mergeCandList[1] are the same as HmvpCand[j].
[0219] Optionally, a redundancy check may be performed only on merge candidates derived from a specific position. In an example, a redundancy check may be performed on at least one of merge candidates derived from a neighboring block located to the left of the current block or above the current block. When there is no merge candidate derived from a specific position in the merge candidate list, the motion information candidate may be added to the merge candidate list without a redundancy check.
[0220] When the motion information candidate HmvpCand[j] is added to the merge candidate list, a redundancy check with 2 merge candidates mergeCandList[NumMerge-2] and mergeCandList[NumMerge-1] having the largest index may be performed for the motion information candidate. In this regard, NumMerge may show the number of available spatial merge candidates and temporal merge candidates.
[0221] A redundancy check with merge candidates may be performed only on a portion of the motion information candidates. In an example, a redundancy check may be performed only on N motion information candidates having large indexes or small indexes among the motion information candidates included in the motion information table. In an example, a redundancy check may be performed only on motion information candidates having indexes whose difference between the number of motion information candidates and the index is lower than a threshold among the motion information candidates included in the motion information table. When the threshold is 2, a redundancy check may be performed only on 3 motion information candidates having the largest index value among the motion information candidates included in the motion information table. For motion information candidates other than the above 3 motion information candidates, the redundancy check may be omitted. When the redundancy check is omitted, the motion information candidate may be added to the merge candidate list regardless of whether there is the same motion information as the merge candidate.
[0222] In contrast, the redundancy check is set to be performed only on the motion information candidates having the index whose difference between the number of motion information candidates and the index exceeds the threshold value among the motion information candidates included in the motion information table.
[0223] The number of motion information candidates for performing redundancy check may be redefined in the encoder and the decoder. In an example, the threshold may be an integer (such as 0, 1, or 2).
[0224] Alternatively, the threshold may be determined based on at least one of the number of merge candidates included in the merge candidate list or the number of motion information candidates included in the motion information table.
[0225] When the merge candidate identical to the first motion information candidate is found, redundant checking of the merge candidate identical to the first motion information candidate may be omitted in redundant checking of the second motion information candidate.
[0226] Fig.16 is a diagram showing an example in which a redundancy check on a specific merge candidate is omitted.
[0227] When the motion information candidate HmvpCand[i] with index i is added to the merge candidate list, a redundant check is performed between the motion information candidate and the pre-stored merge candidates in the merge candidate list. In this regard, when a merge candidate mergeCandlist[j] identical to the motion information candidate HmvpCand[i] is found, a redundant check can be performed between the motion information candidate HmvpCand[i-1] with index i-1 and the merge candidate without adding the motion information candidate HmvpCand[i] to the merge candidate list. In this regard, the redundant check between the motion information candidate HmvpCand[i-1] and the merge candidate mergeCandList[j] can be omitted.
[0228] In the example, Fig.16In the example shown, it is determined that HmvpCand[1] and mergeCandList[2] are the same. Therefore, a redundancy check of HmvpCand[i-1] may be performed without HmvpCand[i] being added to the merge candidate list. In this regard, a redundancy check between HmvpCand[i-1] and mergeCandList[2] may be omitted.
[0229] When the number of merge candidates included in the merge candidate list of the current block is less than a threshold value, at least one of a paired merge candidate or a zero merge candidate may be further included in addition to the motion information candidate. The paired merge candidate indicates a merge candidate having a value obtained by averaging motion vectors of more than 2 merge candidates as a motion vector, and the zero merge candidate indicates a merge candidate having a motion vector of 0.
[0230] For the merge candidate list of the current block, merge candidates may be added in the following order.
[0231] Spatial merging candidate - Temporal merging candidate - Motion information candidate - (affine motion information candidate) - Paired merging candidate - Zero merging candidate
[0232] The spatial merge candidate refers to a merge candidate derived from at least one of a neighboring block or a non-neighboring block, and the temporal merge candidate refers to a merge candidate derived from a previous reference picture. The affine motion information candidate refers to a motion information candidate derived from a block encoded / decoded by an affine motion model.
[0233] Intra-frame prediction predicts a current block by using reconstructed samples that have been encoded / decoded and are around the current block. In this regard, the reconstructed samples before applying the in-loop filter can be used for intra-frame prediction of the current block.
[0234] The intra prediction method includes matrix-based intra prediction and intra prediction according to a direction with adjacent reconstruction samples. Information indicating the intra prediction method of the current block can be sent by signal in the bit stream. The information can be a 1-bit flag. Optionally, the intra prediction of the current block can be determined based on at least one of the position of the current block, the size of the current block, the shape of the current block, or the intra prediction method of the neighboring block. In the example, when there is a current block across the picture boundary, it can be set so that the matrix-based intra prediction method is not applied to the current block.
[0235] The matrix-based intra prediction method is a method for obtaining a prediction block of a current block based on the matrix product of the matrix stored in the encoder and the decoder and the reconstructed samples around the current block. Information for specifying any one of a plurality of pre-stored matrices can be signaled in the bitstream. The decoder can determine the matrix for performing intra prediction on the current block based on the above information and the size of the current block.
[0236] Normal intra prediction is a method of obtaining a prediction block of a current block based on a non-directional intra prediction mode or a directional intra prediction mode. Hereinafter, a process of intra prediction based on normal intra prediction will be described in detail with reference to the accompanying drawings.
[0237] Fig.17 is a flowchart of an intra-frame prediction method according to an embodiment of the present disclosure.
[0238] A reference sample line of the current block may be determined (S1701). The reference sample line refers to a set of reference samples included in a kth line far above and / or to the left of the current block. The reference samples may be derived from reconstructed samples encoded / decoded around the current block.
[0239] Index information identifying a reference sample line of a current block among a plurality of reference sample lines may be signaled in a bitstream. In an example, index information intra_luma_ref_idx for specifying a reference sample line of a current block may be signaled in a bitstream. The index information may be signaled per coding block.
[0240] The plurality of reference sample lines may include at least one of a first line, a second line, or a third line above and / or on the left side of the current block. A reference sample line consisting of a row adjacent to the top of the current block and a column adjacent to the left side of the current block among the plurality of reference sample lines may be referred to as an adjacent reference sample line, and other reference sample lines may be referred to as a non-adjacent reference sample line.
[0241] Table 1 shows the index assigned to each candidate reference sample line.
[0242] [Table 1]
[0243] Index (intra_luma_ref_idx) Reference sample line 0 Adjacent reference sample point line 1 The first non-adjacent reference sample line 2 The second non-adjacent reference sample point line
[0244] Based on at least one of the position, size, shape of the current block or the prediction coding mode of the neighboring block, the reference sample line of the current block may be determined. In one example, when the current block is adjacent to a boundary of a picture, a tile, a slice or a coding tree unit, the adjacent reference sample line may be determined as the reference sample line of the current block.
[0245] The reference sample line may include an upper reference sample located above the current block and a left reference sample located on the left side of the current block. The upper reference sample and the left reference sample may be derived from reconstructed samples around the current block. The reconstructed samples may be in a state before applying the in-loop filter.
[0246] Next, the intra prediction mode of the current block may be determined (S1702). For the intra prediction mode of the current block, at least one of a non-directional intra prediction mode or a directional intra prediction mode may be determined as the intra prediction mode of the current block. The non-directional intra prediction mode includes plane and DC, and the directional intra prediction mode includes 33 or 65 modes from the lower left diagonal direction to the upper right diagonal direction.
[0247] Fig.18 is a diagram showing an intra prediction mode.
[0248] Fig.18 (a) shows 35 intra prediction modes, Fig.18 (b) shows 67 intra prediction modes.
[0249] Can define the ratio Fig.18 A greater or lesser number of intra prediction modes is shown.
[0250] Based on the intra prediction mode of the neighboring blocks adjacent to the current block, the MPM (Most Probable Mode) may be set. In this regard, the neighboring blocks may include a left neighboring block adjacent to the left side of the current block and an upper neighboring block adjacent to the upper side of the current block.
[0251] The number of MPMs included in the MPM list may be preset in the encoder and the decoder. In an example, the number of MPMs may be 3, 4, 5, or 6. Optionally, information indicating the number of MPMs may be signaled in the bitstream. Optionally, the number of MPMs may be determined based on at least one of the prediction coding mode of the neighboring block, the size, shape, or reference sample line index of the current block. In an example, although N MPMs may be used when an adjacent reference sample line is determined as a reference sample line of the current block, M MPMs may be used when a non-adjacent reference sample line is determined as a reference sample line of the current block. Since M is a natural number less than N, in an example, N may be 6 and M may be 5, 4, or 3. Therefore, although the intra prediction mode of the current block may be determined as any one of the 6 candidate intra prediction modes when the index of the reference sample line of the current block is 0 and the MPM flag is true, the intra prediction mode of the current block may be determined as any one of the 5 candidate intra prediction modes when the index of the reference sample line of the current block is greater than 0 and the MPM flag is true.
[0252] Alternatively, a fixed number (eg, 6 or 5) of MPM candidates may be used regardless of the index of the reference sample line of the current block.
[0253] An MPM list including a plurality of MPMs may be generated, and information indicating whether the same MPM as the intra prediction mode of the current block is included in the MPM list may be signaled in the bitstream. Since the information is a 1-bit flag, it may be referred to as an MPM flag. When the MPM flag indicates the same MPM as the current block included in the MPM list, index information identifying one of the MPMs may be signaled in the bitstream. In an example, index information mpm_idx specifying any one of a plurality of MPMs may be signaled in the bitstream. The MPM specified by the index information may be set as the intra prediction mode of the current block. When the MPM flag indicates that the same MPM as the current block is not included in the MPM list, the remaining mode information indicating any one of the remaining intra prediction modes other than the MPM may be signaled in the bitstream. The remaining mode information indicates an index value corresponding to the intra prediction mode of the current block when the index is reallocated to the remaining intra prediction modes other than the MPM. The decoder may determine the intra prediction mode of the current block by arranging the MPMs in ascending order and comparing the remaining mode information with the MPMs. In an example, when the remaining mode information is equal to or less than the MPM, the intra prediction mode of the current block may be derived by adding 1 to the remaining mode information.
[0254] When deriving the intra prediction mode of the current block, the process of comparing a part of the MPMs with the remaining mode information can be omitted. In the example, the MPMs in the non-directional intra prediction mode among the MPMs can be excluded from the comparison target. When the non-directional intra prediction mode is set to MPMs, the remaining mode information clearly indicates the directional intra prediction mode, so the intra prediction mode of the current block can be derived by comparing the remaining MPMs except the non-directional intra prediction mode with the remaining mode information. Instead of excluding the non-directional intra prediction mode from the comparison target, the resulting value can be compared with the remaining MPMs after adding the number of the non-directional intra prediction mode to the remaining mode information.
[0255] Instead of setting the default mode to MPM, information indicating whether the intra prediction mode of the current block is the default mode may be signaled in the bitstream. The information is a 1-bit flag, and the flag may be referred to as a default mode flag. The default mode flag may be signaled only when the MPM flag indicates that the same MPM as the current block is included in the MPM list. As described above, the default mode may include at least one of a plane, a DC, a vertical direction mode, or a horizontal direction mode. In the example, when the plane is set to the default mode, the default mode flag may indicate whether the intra prediction mode of the current block is a plane. When the default mode flag indicates that the intra prediction mode of the current block is not the default mode, one of the MPMs indicated by the index information may be set as the intra prediction mode of the current block.
[0256] When the default mode flag is used, it can be set so that the intra prediction mode that is the same as the default mode is not set to MPM. In the example, when the default mode flag indicates whether the intra prediction mode of the current block is plane, the intra prediction mode of the current block can be derived by using 5 MPMs that do not include the MPM corresponding to the plane.
[0257] When a plurality of intra prediction modes are set as a default mode, index information indicating any one of the default modes may also be signaled. The intra prediction mode of the current block may be set to the default mode indicated by the index information.
[0258] When the index of the reference sample line of the current block is not 0, it may be set not to use the default mode. In an example, when a non-adjacent reference sample line is determined as the reference sample line of the current block, it may be set not to use a non-directional intra prediction mode (such as a DC mode or a planar mode). Therefore, when the index of the reference sample line is not 0, the default mode flag may not be signaled, and the value of the default mode flag may be inferred to be a predefined value (i.e., false).
[0259] When the intra prediction mode of the current block is determined, prediction samples of the current block may be obtained based on the determined intra prediction mode ( S1703 ).
[0260] When the DC mode is selected, the prediction sample of the current block may be generated based on the average value of the reference samples. In detail, the values of all samples in the prediction block may be generated based on the average value of the reference samples. The average value may be derived using at least one of the upper reference sample adjacent to the upper side of the current block and the left reference sample adjacent to the left side of the current block.
[0261] The number or range of reference samples used when deriving the average value may vary based on the shape of the current block. In an example, when the current block is a non-square block with a width greater than a height, the average value may be calculated by using the upper reference sample. Conversely, when the current block is a non-square block with a width less than a height, the average value may be calculated by using the left reference sample. In other words, when the width and height of the current block are different, the average value may be calculated using the reference sample adjacent to the larger length. Alternatively, whether to calculate the average value by using the upper reference sample or by using the left reference sample may be determined based on the ratio between the width and the height of the current block.
[0262] When the planar mode is selected, the prediction sample can be obtained by using the horizontal prediction sample and the vertical prediction sample. In this regard, the horizontal prediction sample can be obtained based on the left reference sample and the right reference sample located on the same horizontal line as the prediction sample, and the vertical prediction sample can be obtained based on the upper reference sample and the lower reference sample located on the same vertical line as the prediction sample. In this regard, the right reference sample can be generated by copying the reference sample adjacent to the upper right corner of the current block, and the lower reference sample can be generated by copying the reference sample adjacent to the lower left corner of the current block. The horizontal prediction sample can be obtained based on the weighted sum of the left reference sample and the right reference sample, and the vertical prediction sample can be obtained based on the weighted sum of the upper reference sample and the lower reference sample. In this regard, the weighting factor assigned to each reference sample can be determined according to the position of the prediction sample. The prediction sample can be obtained based on the average or weighted sum of the horizontal prediction sample and the vertical prediction sample. When the weighted sum is used, the weighting factors assigned to the horizontal direction prediction samples and the vertical direction prediction samples may be determined based on the positions of the prediction samples.
[0263] When a directional prediction mode is selected, a parameter representing a prediction direction (or prediction angle) of the selected directional prediction mode may be determined. Table 2 below represents an intra directional parameter of intraPredAng for each intra prediction mode.
[0264] [Table 2]
[0265] PredModeIntra 1 2 3 4 5 6 7 IntraPredAng - 32 26 21 17 13 9 PredModeIntra 8 9 10 11 12 13 14 IntraPredAng 5 2 0 -2 -5 -9 -13 PredModeIntra 15 16 17 18 19 20 21 IntraPredAng -17 -21 -26 -32 -26 -21 -17 PredModeIntra 22 23 24 25 26 27 28 IntraPredAng -13 -9 -5 -2 0 2 5 PredModeIntra 29 30 31 32 33 34 IntraPredAng 9 13 17 21 26 32
[0266] Table 2 represents the intra-frame direction parameter of each intra-frame prediction mode, where, when 35 intra-frame prediction modes are defined, the index of the intra-frame prediction mode is one of 2 to 34. When the directional intra-frame prediction mode is defined to be greater than 33, the intra-frame direction parameter of each intra-frame prediction mode can be set by subdividing Table 2.
[0267] The upper reference sample and the left reference sample of the current block are arranged in a line, and then the prediction sample can be obtained based on the value of the intra-frame direction parameter. In this regard, when the value of the intra-frame direction parameter is a negative value, the left reference sample and the upper reference sample can be arranged in a line.
[0268] Fig.19 and Fig. 20 are diagrams each showing an example of a one-dimensional arrangement in which reference spots are arranged in a line.
[0269] Fig.19 is a diagram showing a one-dimensional arrangement of reference samples in the vertical direction, and Fig. 20is a diagram showing a horizontal one-dimensional arrangement of reference samples arranged in the horizontal direction. Assuming that 35 intra prediction modes are defined, the following description will be made. Fig.19 and Fig. 20 .
[0270] When the intra prediction mode index is any one of 11 to 18, a one-dimensional arrangement in the horizontal direction may be applied, wherein the upper reference sample is rotated counterclockwise, and when the intra prediction mode index is any one of 19 to 25, a one-dimensional arrangement in the vertical direction may be applied, wherein the left reference sample is rotated clockwise. When the reference samples are arranged in a line, the intra prediction mode angle may be considered.
[0271] The reference sample determination parameter may be determined based on the intra direction parameter. The reference sample determination parameter may include a reference sample index for specifying a sample, and a weighting factor parameter for determining a weighting factor applied to the reference sample.
[0272] The reference sample index iIdx and the weighting factor parameter ifact may be obtained by the following Equation 2 and Equation 3, respectively.
[0273] [Equation 2]
[0274] iIdx=(y+1)*P ang / 32
[0275] [Equation 3]
[0276] i fact =[(y+1)*P ang ]&31
[0277] In Equation 2 and Equation 3, P ang Indicates intra-frame direction parameters. The reference sample specified by the reference sample index iIdx corresponds to the integer pel.
[0278] In order to derive the prediction sample, at least one reference sample may be specified. Specifically, according to the slope of the prediction mode, the position of the reference sample used to derive the prediction sample may be specified. In an example, the reference sample used to derive the prediction sample may be specified by using the reference sample index iIdx.
[0279] In this regard, when the slope of the intra-frame prediction mode is not represented by one reference sample, the prediction sample can be generated by performing interpolation on multiple reference samples. In the example, when the slope of the intra-frame prediction mode is a value between the slope between the prediction sample and the first reference sample and the slope between the prediction sample and the second reference sample, the prediction sample can be obtained by performing interpolation on the first reference sample and the second reference sample. In other words, when the angle line according to the intra-frame prediction angle does not pass through the reference sample located at the integer pixel, the prediction sample can be obtained by performing interpolation on the reference samples located near the left and right sides or above and below the position where the angle line passes.
[0280] Equation 4 below represents an example of obtaining a prediction sample based on a reference sample.
[0281] [Equation 4]
[0282] P(x,y)=((32-i fact ) / 32)*Ref_1D(x+iIdx+1)+(i fact / 32)*Ref_1D(x+iIdx+2)
[0283] In Equation 4, P represents a prediction sample, and Ref_1D represents any one of the reference samples arranged in a line. In this regard, the position of the reference sample may be determined by the position (x, y) of the prediction sample and the reference sample index iIdx.
[0284] When the slope of the intra prediction mode may be represented by one reference sample, the weighting factor parameter ifact is set to 0. Therefore, Equation 4 can be simplified to the following Equation 5.
[0285] [Equation 5]
[0286] P(x,y)Ref_1D(x+iIdx+1)
[0287] Intra prediction of the current block may be performed based on a plurality of intra prediction modes. In an example, an intra prediction mode may be derived for each prediction sample, and the prediction sample may be derived based on the intra prediction mode assigned to each prediction sample.
[0288] Optionally, an intra prediction mode may be derived for each region, and intra prediction of each region may be performed based on the intra prediction mode assigned to each region. In this regard, the region may include at least one sample. At least one of the size and shape of the region may be adaptively determined based on at least one of the size of the current block, the shape of the current block, and the intra prediction mode of the current block. Optionally, at least one of the size and shape of the region may be predetermined in the encoder and the decoder independently of the size or shape of the current block.
[0289] Fig.21 is a diagram showing the number of angles formed between a directional intra prediction mode and a straight line parallel to the x-axis.
[0290] As Fig.21 In the example shown in , the directional prediction mode can exist between the lower left diagonal direction and the upper right diagonal direction. Describes the angle formed between the x-axis and the directional prediction mode, and the directional prediction mode can exist from 45 degrees (lower left diagonal direction) to -135 degrees (upper right diagonal direction).
[0291] When the current block is non-square, there may be a case where prediction samples are derived by using reference samples located at an angle line according to an intra prediction angle that are located farther than reference samples close to prediction samples according to an intra prediction mode of the current block.
[0292] Fig. 22 is a diagram showing an aspect of obtaining prediction samples when the current block is non-square.
[0293] In the example, as Fig. 22 In the example shown in (a), it is assumed that the current block is a non-square with a width greater than a height, and the intra prediction mode of the current block is a directional intra prediction mode with an angle of 0 to 45 degrees. In the above case, when the prediction samples A around the right column of the current block are derived from the reference samples located in the angular mode according to the above angle number, there may be a case where the left reference sample L far from the prediction sample is used instead of the upper reference sample T close to the prediction sample.
[0294] In another example, as Fig. 22 In the example shown in (b), it is assumed that the current block is a non-square whose height is greater than its width, and the intra prediction mode of the current block is a directional intra prediction mode from -90 degrees to -135 degrees. In the above case, when the prediction sample A around the lower row of the current block is derived from the reference sample located in the angular mode according to the above angle number, there may be a case where the upper reference sample T far from the prediction sample is used instead of the left reference sample L close to the prediction sample.
[0295] To solve the above problem, when the current block is non-square, the intra prediction mode of the current block can be replaced with the intra prediction mode in the opposite direction. Therefore, for non-square blocks, angles greater than or less than Fig.18 The directional prediction mode of the angle of the directional prediction mode shown in . The above directional intra prediction mode can be defined as a wide-angle intra prediction mode. The wide-angle intra prediction mode represents a directional intra prediction mode that does not belong to the range of 45 degrees to -135 degrees.
[0296] Fig.23is a diagram illustrating a wide-angle intra prediction mode.
[0297] exist Fig.23 In the illustrated example, the intra prediction modes having indices from -1 to -14 and the intra prediction modes having indices from 67 to 80 represent the wide-angle intra prediction modes.
[0298] exist Fig.23 , 14 wide-angle intra prediction modes (from -1 to -14) with angles greater than 45 degrees and 4 wide-angle intra prediction modes (from 67 to 80) with angles less than -135 degrees are shown. However, a greater or lesser number of wide-angle intra prediction modes may be defined.
[0299] When the wide-angle intra prediction mode is used, the length of the upper reference sample may be set to 2W+1, and the length of the left reference sample may be set to 2H+1.
[0300] By using the wide-angle intra prediction mode, it is possible to predict Fig. 22 (a) shows the sample point A, and can be predicted by the reference sample point L Fig. 22 (b) Sample point A shown.
[0301] In addition to the conventional intra prediction mode and the N wide-angle intra prediction modes, a total of 67+N intra prediction modes may be used. In an example, Table 3 represents intra direction parameters for intra prediction modes when 20 wide-angle intra prediction modes are defined.
[0302] [Table 3]
[0303] PredModeIntra -10 -9 -8 -7 -6 -5 -4 -3 -2 intraPredAngle 114 93 79 68 60 54 49 45 39 PredModeIntra -1 2 3 4 5 6 7 8 9 intraPredAngle 35 32 29 26 23 21 19 17 15 PredModeIntra 10 11 12 13 14 15 16 17 18 intraPredAngle 13 11 9 7 5 3 2 1 0 PredModeIntra 19 20 21 22 23 24 25 26 27 intraPredAngle -1 -2 -3 -5 -7 -9 -11 -13 -15 PredModeIntra 28 29 30 31 32 33 34 35 36 intraPredAngle -17 -19 -21 -23 -26 -29 -32 -29 -26 PredModeIntra 37 38 39 40 41 42 43 44 45 intraPredAngle -23 -21 -19 -17 -15 -13 -11 -9 -7 PredModeIntra 46 47 48 49 50 51 52 53 54 intraPredAngle -5 -3 -2 -1 0 1 2 3 5 PredModeIntra 55 56 57 58 59 60 61 62 63 intraPredAngle 7 9 11 13 15 17 19 21 23 PredModeIntra 64 65 66 67 68 69 70 71 72 intraPredAngle 26 29 32 35 39 45 49 54 60 PredModeIntra 73 74 75 76 intraPredAngle 68 79 93 114
[0304] When the current block is non-square and the intra prediction mode of the current block obtained in S2502 belongs to the transformation range, the intra prediction mode of the current block may be transformed into a wide-angle intra prediction mode. The transformation range may be determined based on at least one of a size, a shape, or a ratio of the current block. In this regard, the ratio may represent a ratio between a width and a height of the current block.
[0305] When the current block is a non-square with a width greater than a height, the transform range may be set to be from the intra prediction mode index in the upper right diagonal direction (e.g., 66) to (intra prediction mode index in the upper right diagonal direction - N). In this regard, N may be determined based on the ratio of the current block. When the intra prediction mode of the current block belongs to the transform range, the intra prediction mode may be transformed into a wide-angle intra prediction mode. The transform may be to subtract a predefined value from the intra prediction mode, and the predefined value may be the total number of intra prediction modes excluding the wide-angle intra prediction mode (e.g., 67).
[0306] In the above example, the intra prediction modes No. 66 to No. 53 may be transformed into the wide-angle intra prediction modes No. -1 to No. -14, respectively.
[0307] When the current block is a non-square with a height greater than a width, the transformation range may be set to be from the intra prediction mode index in the lower left diagonal direction (e.g., 2) to (the intra prediction mode index in the lower left diagonal direction + M). In this regard, M may be determined based on the ratio of the current block. When the intra prediction mode of the current block belongs to the transformation range, the intra prediction mode may be transformed into a wide-angle intra prediction mode. The transformation may be to add a predefined value to the intra prediction mode, and the predefined value may be the total number of directional intra prediction modes (e.g., 65) other than the wide-angle intra prediction mode.
[0308] In the above example, the intra prediction modes No. 2 to No. 15 may be transformed into the wide-angle intra prediction modes No. 67 to No. 80, respectively.
[0309] Hereinafter, the intra prediction mode belonging to the transform range is referred to as a wide-angle intra prediction alternative mode.
[0310] The transform range may be determined based on the ratio of the current block. In an example, Tables 4 and 5 show transform ranges for a case where 35 intra prediction modes other than the wide intra prediction mode are defined and a case where 67 intra prediction modes other than the wide intra prediction mode are defined, respectively.
[0311] [Table 4]
[0312] condition Alternative intra prediction modes W / H=2 Mode 2, 3, 4 W / H>2 Mode 2,3,4,5,6 W / H=1 none H / W=1 / 2 Mode 32,33,34 H / W<1 / 2 Mode 30,31,32,33,34
[0313] [Table 5]
[0314]
[0315]
[0316] As shown in the examples of Table 4 and Table 5, the number of wide-angle intra prediction alternative modes included in the transform range may vary according to the ratio of the current block.
[0317] The ratio of the current block may also be subdivided to set a transform range as shown in Table 6 below.
[0318] [Table 6]
[0319] condition Alternative intra prediction modes W / H=16 Mode 12,13,14,15 W / H=8 Mode 12,13 W / H=4 Mode 2,3,4,5,6,7,8,9,10,11 H / W=2 Mode 2,3,4,5,6,7 H / W=1 none W / H=1 / 2 Mode 61,62,63,64,65,66 W / H=1 / 4 Mode 57,58,59,60,61,62,63,64,65,66 W / H=1 / 8 Mode 55,56 H / W=1 / 16 Mode 53,54,55,56
[0320] When a non-adjacent reference sample line is determined as a reference sample line of a current block, or when a multi-line intra prediction encoding method for selecting one of a plurality of reference sample lines is used, the prediction method may be configured not to use the wide-angle intra prediction mode. That is, although the current block has a non-square shape and the intra prediction mode of the current block belongs to the transformation range, the intra prediction mode of the current block may not be transformed into the wide-angle intra prediction mode.
[0321] Optionally, when the intra prediction mode of the current block is determined to be the wide-angle intra prediction mode, the prediction method may be configured so that a non-adjacent reference sample line cannot be used as a reference sample line of the current block, or may be configured so that one of the multiple reference sample lines is not selected using the multi-line intra prediction encoding method. When the multi-line intra prediction encoding method is not used, the adjacent reference sample line may be determined as the reference sample line of the current block.
[0322] When the wide-angle intra prediction mode is not used, each of refW and refH may be set to the sum of nTbW and nTbH. Therefore, in addition to the upper left reference sample, the non-adjacent reference sample line with an interval of i from the current block may include (nTbW+nTbH+offsetX[i]) upper reference samples and (nTbW+nTbH+offsetY[i]) left reference samples. That is, the non-adjacent reference sample line with an interval of i from the current block may include (2nTbW+2nTbH+offsetX[i]+offsetY[i]+1) reference samples. For example, when the value of whRatio is greater than 1, the value of offsetX may be set to a value greater than offsetY. In one example, when the value of offsetX may be set to 1, the value of offsetY may be set to 0. Conversely, when the value of whRatio is less than 1, the value of offsetY may be set to a value greater than offsetX. In one example, the value of offsetX may be set to 0, and the value of offsetY may be set to 1.
[0323] Since the wide-angle intra-prediction mode is used in addition to the conventional intra-prediction mode, resources used to encode the wide-angle intra-prediction mode may be increased, thereby reducing encoding efficiency. Therefore, instead of encoding the wide-angle intra-prediction mode as is, an alternative intra-prediction mode of the wide-angle intra-prediction mode is encoded to improve encoding efficiency.
[0324] In an example, when the current block is encoded by using the wide-angle intra prediction mode number 67, number 2 as the wide-angle alternative intra prediction mode number 67 may be encoded as the intra prediction mode of the current block. In addition, when the current block is encoded by using the wide-angle intra prediction mode number -1, number 66 as the wide-angle alternative intra prediction mode number -1 may be encoded as the intra prediction mode of the current block.
[0325] The decoder may decode the intra prediction mode of the current block and determine whether the decoded intra prediction mode belongs to the transformation range. When the decoded intra prediction mode is the wide-angle substitute intra prediction mode, the intra prediction mode may be transformed into the wide-angle intra prediction mode.
[0326] Alternatively, when the current block is encoded by the wide-angle intra prediction mode, the wide-angle intra prediction mode may be encoded as it is.
[0327] The encoding of the intra prediction mode may be performed based on the MPM list described above. Specifically, when encoding a neighboring block in the wide-angle intra prediction mode, the MPM may be set based on the wide-angle alternative intra prediction mode corresponding to the wide-angle intra prediction mode.
[0328] The residual image can be derived by subtracting the predicted image from the original image. In this regard, when the residual image is converted to the frequency domain, the subjective image quality of the image will not be significantly reduced even if the high-frequency components are removed from the frequency components. Therefore, when the value of the high-frequency component is transformed to a small value, or when the value of the high-frequency component is set to 0, the compression efficiency can be improved without causing large visual distortion. Reflecting the above characteristics, a transformation can be performed on the current block so as to decompose the residual image into two-dimensional frequency components. The transformation can be performed by using a transformation method such as DCT (discrete cosine transform), DST (discrete sine transform), etc.
[0329] The transformation method may be determined based on a block. The transformation method may be determined based on at least one of a prediction coding mode of a current block or a size of a current block. In an example, when the current block is encoded by an intra prediction mode and the size of the current block is less than N×N, the transformation may be performed by a transformation method using DST. On the other hand, when the above conditions are not met, the transformation may be performed by a transformation method using DCT.
[0330] For some blocks of the residual image, two-dimensional image transform may not be performed. Not performing two-dimensional image transform may be referred to as transform skipping. When transform skipping is applied, quantization may be applied to the residual value for which transform is not performed.
[0331] After the current block is transformed by using DCT or DST, the transformed current block can be transformed again. In this regard, the transformation based on DCT or DST can be defined as a first transformation, and the transformation performed again on the block to which the first transformation is applied can be defined as a second transformation.
[0332] The first transform may be performed by using any one of a plurality of transform kernel candidates. In an example, the first transform may be performed by using any one of DCT2, DCT8, or DCT7.
[0333] Different transform kernels may be used for the horizontal direction and the vertical direction. Information indicating the combination of the transform kernel for the horizontal direction and the transform kernel for the vertical direction may be signaled in the bitstream.
[0334] The processing unit of the first transform may be different from that of the second transform. In an example, the first transform may be performed on an 8×8 block, and the second transform may be performed on a 4×4 sized sub-block within the transformed 8×8 block. In this regard, the transform coefficients of the remaining regions where the second transform is not performed may be set to 0.
[0335] Alternatively, the first transform may be performed on the 4×4 block, and the second transform may be performed on a region having an 8×8 size including the transformed 4×4 block.
[0336] Information indicating whether to perform the second transform may be signaled in the bitstream.
[0337] Alternatively, whether to perform the second transform may be determined based on whether the horizontal transform kernel and the vertical transform kernel are identical to each other. In one example, the second transform may be performed only when the horizontal transform kernel and the vertical transform kernel are identical to each other. Alternatively, the second transform may be performed only when the horizontal transform kernel and the vertical transform kernel are different from each other.
[0338] Alternatively, the second transform may be allowed only when a predetermined transform kernel is used for the horizontal transform and the vertical transform. In one example, the second transform may be allowed when a DCT2 transform kernel is used for the horizontal transform and the vertical transform.
[0339] Alternatively, whether to perform the second transform may be determined based on the number of non-zero transform coefficients of the current block. In one example, when the number of non-zero transform coefficients of the current block is less than or equal to a threshold, the prediction method may be configured not to use the second transform. When the number of non-zero transform coefficients of the current block is greater than a threshold, the prediction method may be configured to use the second transform. As long as the current block is encoded using intra prediction, the prediction method may be configured to use the second transform.
[0340] The decoder may perform inverse transform on the second transform (second inverse transform), and may perform inverse transform on the first transform result from the second inverse transform (first inverse transform). As a result of performing the second inverse transform and the first inverse transform, a residual signal of the current block may be obtained.
[0341] When the encoder performs transformation and quantization, the decoder can obtain a residual block through inverse quantization and inverse transformation. The decoder can add the prediction block and the residual block to each other to obtain a reconstructed block of the current block.
[0342] When obtaining a reconstructed block of the current block, information loss occurring in the quantization and encoding process can be reduced via in-loop filtering. The in-loop filter may include at least one of a deblocking filter, a sample adaptive offset filter (SAO), or an adaptive in-loop filter (ALF). Hereinafter, the reconstructed block before applying the in-loop filter is referred to as a first reconstructed block, and the reconstructed block after applying the in-loop filter is referred to as a second reconstructed block.
[0343] The second reconstructed block may be obtained by applying at least one of a deblocking filter, SAO, or ALF to the first reconstructed block. In this regard, the SAO or ALF may be applied after the deblocking filter is applied.
[0344] The deblocking filter is used to mitigate quality degradation (eg, blocking artifacts) on block boundaries, which occurs when quantization is performed per block. To apply the deblocking filter, a block strength (BS) between a first reconstructed block and adjacent reconstructed blocks may be determined.
[0345] Fig.24 is a flow chart illustrating a process for determining block strength.
[0346] exist Fig.24 In the example shown, P represents the first reconstructed block, and Q represents the adjacent reconstructed block. In this regard, the adjacent reconstructed block may be adjacent to the left or above the current block.
[0347] Fig.24 The illustrated example shows that block strength is determined considering the following items: prediction encoding modes of P and Q, whether transform coefficients other than 0 are included, whether inter-frame prediction is performed by using the same reference picture, or whether the difference in motion vectors is equal to or greater than a threshold.
[0348] Based on the block strength, it may be determined whether to apply a deblocking filter. In an example, when the block strength is 0, no filtering may be performed.
[0349] SAO is to mitigate ring artifacts that occur when quantization is performed in the frequency domain. SAO can be performed by adding or subtracting an offset determined by considering the pattern of the first reconstructed image. The offset determination method includes edge offset (EO) or band offset (BO). EO represents a method of determining the offset of the current sample according to the pattern of neighboring pixels. BO represents a method of applying a common offset to a group of pixels with similar brightness values in an area. Specifically, pixel brightness can be partitioned into 32 uniform parts, and pixels with similar brightness values can be set as a group. In the example, 4 adjacent bands out of 32 bands can be set as a group, and the same offset value can be applied to samples belonging to the 4 bands.
[0350] ALF is a method of generating a second reconstructed image by applying a filter having a predetermined size / shape to a first reconstructed image or a reconstructed image to which a deblocking filter is applied. The following Equation 6 represents an example of applying ALF.
[0351] [Equation 6]
[0352]
[0353] Any one of the predetermined filter candidates may be selected based on a picture, a coding tree unit, a coding block, a prediction block, or a transform block. At least one of a size or a shape of each filter candidate may be different.
[0354] Fig.25 Represents a predefined filter candidate.
[0355] As in Fig.25 In the example shown, at least any one of the diamond shapes of 5×5, 7×7, or 9×9 sizes may be selected.
[0356] Only diamond shapes of 5×5 size are available for chroma components.
[0357] For real-time or low-latency encoding of high-resolution images (such as panoramic videos, 360-degree videos, or 4K / 8K UHD (ultra-high definition)), a method of partitioning a picture into multiple regions and encoding / decoding the multiple regions in parallel can be considered. Specifically, the picture can be partitioned into parallel blocks or strips (or parallel block groups) according to the purpose of processing.
[0358] A parallel block represents a basic unit for parallel encoding / decoding. Each parallel block can be processed in parallel. A parallel block can have a rectangular shape. When encoding / decoding a parallel block, it can be set to not use data of other parallel blocks. Parallel processing of parallel blocks can be supported by removing the encoding / decoding dependency between parallel blocks. Specifically, a probability table of a CABAC (context adaptive binary arithmetic coding) context can be initialized according to the parallel block, and an in-loop filter can be set to not be applied to the boundary of the parallel block.
[0359] Information about video encoding / decoding may be signaled by a slice header. Information signaled by a slice header may be commonly applied to coding tree units or tiles included in a slice.
[0360] Fig.26 is a diagram illustrating a screen partitioning method according to an embodiment of the present disclosure.
[0361] First, it may be determined whether the current picture is partitioned into a plurality of processing units (S2610). In this regard, the processing unit may include at least one of a parallel block or a slice. In an example, a syntax no_pic_partition_flag indicating whether the current picture is partitioned into a plurality of parallel blocks or slices may be signaled in a bitstream. If the value of the syntax no_pic_partition_flag is 0, it indicates that the current picture is partitioned into at least one parallel block or at least one slice. On the other hand, if the value of the syntax no_pic_partition_flag is 1, it indicates that the current picture is not partitioned into a plurality of parallel blocks or slices.
[0362] When it is determined that the current picture is not partitioned into a plurality of processing units, the partitioning process of the current picture may be ended. In this regard, it may be understood that the current picture is composed of a single tile and a single slice (or a single tile group).
[0363] When it is determined that the current picture is to be partitioned into a plurality of processing units, tile partition information may be signaled in a bitstream.The picture may be partitioned into at least one tile based on the signaled tile partition information (S2620).
[0364] When the current picture is partitioned into a plurality of tiles, a tile group (or slice) may be determined by combining a plurality of tiles or partitioned tiles ( S2630 ).
[0365] Hereinafter, according to the present disclosure, a parallel block partitioning method and a parallel block group determining method will be described in detail.
[0366] Fig. 27 This shows an example where a screen is partitioned into multiple parallel blocks.
[0367] A tile may include at least one coding tree unit. The boundary of the tile may be set to match the boundary of the coding tree unit. In other words, a partition type that partitions a coding tree unit into multiple coding tree units may not be allowed.
[0368] Information indicating the partition shape of a picture may be signaled in a bitstream. The information may be encoded and signaled through a picture parameter set or a sequence parameter set.
[0369] The information indicating the partition shape of the picture may include at least one of the following: information indicating whether the tiles are partitioned in a uniform size, information indicating the number of tile columns, or information indicating the number of tile rows.
[0370] The information indicating whether the tiles are partitioned in a uniform size may be a 1-bit flag uniform_spacing_flag. When it is determined that the picture is partitioned in a uniform size, the remaining tiles except for tiles adjacent to the right and / or lower boundaries of the picture may have the same size.
[0371] When a picture is partitioned by using at least one of a vertical line or a horizontal line across the picture, each parallel block belongs to a different column and / or row. In order to determine the partition shape of the picture, information on the number of parallel block columns and / or parallel block rows may be sent by a signal. In an example, information num_tile_row_minus1 indicating the number of rows formed by parallel blocks and information num_tile_column_minus1 indicating the number of columns formed by parallel blocks generated by partitioning the picture may be sent by a signal in a bitstream. The syntax num_tile_row_minus1 indicates a value minus 1 from the number of parallel block rows, and the syntax num_tile_column_minus1 indicates a value minus 1 from the number of parallel block columns.
[0372] exist Fig. 27 In the example shown, the number of tile columns is 4, and the number of tile rows is 3. Therefore, num_tile_columns_minus1 may represent 3, and num_tile_rows_minus1 may represent 2.
[0373] A set of tiles belonging to one line (row or column) may be referred to as a tile set. In an example, a horizontal tile set may represent a set of tiles belonging to a row, and a vertical tile set may represent a set of tiles belonging to a column.
[0374] According to the partition shape of the picture, the tiles may have the same size in all areas except the picture boundary. Optionally, the heights of horizontally adjacent tiles may be set to be the same, or the widths of vertically adjacent tiles may be set to be the same.
[0375] Information indicating the size of a parallel block column and / or the size of a parallel block row may be signaled in a bitstream. The size of a parallel block column may be determined based on the number of coding tree unit columns included in the parallel block column, and the size of a parallel block row may be determined based on the number of coding tree unit rows included in the parallel block row.
[0376] In an example, when a picture is partitioned into a plurality of parallel block columns, information indicating the width of each parallel block column may be signaled in a bitstream, and when a picture is partitioned into a plurality of parallel block rows, information indicating the height of each parallel block row may be signaled in a bitstream. A syntax element column_width_minus1[i] indicating the size of a parallel block column may have a value of 1 minus the number of coding tree unit columns included in an i-th parallel block column. A syntax element row_height_minus1[i] indicating the size of a parallel block row may have a value of 1 minus the number of coding tree unit rows included in an i-th parallel block row.
[0377] For the last tile column, the encoding of the syntax element column_width_minus1 indicating the size of the tile column can be omitted. In addition, for the last tile row, the encoding of the syntax element row_height_minus1 indicating the size of the tile row can be omitted. The width of the last tile column and the height of the last tile row can be derived by considering the picture size.
[0378] When it is determined that the picture is partitioned into parallel blocks of non-uniform size, information indicating the size of parallel block columns and / or information indicating the size of parallel block rows may be sent with a signal. In an example, when uniform_spacing_flag is 0, information indicating the size of parallel block columns and / or information indicating the size of parallel block rows may be sent with a signal. When uniform_spacing_flag is 1, encoding of information indicating the size of parallel block columns and / or information indicating the size of parallel block rows may be omitted. In this case, based on the number of parallel block columns and / or the number of parallel block rows, the size of parallel block rows and / or the number of parallel block columns may be derived.
[0379] Table 7 shows a syntax table for determining the partition shape of a screen.
[0380] [Table 7]
[0381]
[0382] In Table 7, a syntax element num_tile_columns_minus1 indicating the number of tile columns and a syntax element num_tile_rows_minus1 indicating the number of tile rows may be signaled.
[0383] Next, a syntax element uniform_spacing_flag indicating whether the picture is partitioned into tiles of uniform size may be signaled. When uniform_spacing_flag is true, tiles may be partitioned with uniform size in the remaining areas except for picture boundaries.
[0384] When uniform_spacing_flag is false, a syntax element column_width_minus1 indicating the width of each tile column and a syntax element row_height_minus1 indicating the height of each tile row may be signaled.
[0385] The syntax element loop_filter_across_tiles_enabled_flag indicates whether to enable the use of in-loop filters at the boundary of tiles.
[0386] The picture may be partitioned so that the heights of the adjacent tiles on the left and right are different, or the widths of the adjacent tiles on the top and bottom are different. The above picture partitioning method may be referred to as a flexible tile partitioning method. In addition, a tile partitioned by a flexible tile partitioning method may be referred to as a flexible tile. The flexible tile partitioning method may be allowed only when it is determined that the tile is not uniformly partitioned (for example, when uniform_tile_spacing_flag is 0).
[0387] Fig.28 is a diagram illustrating aspects of partitioning of a picture according to a flexible tile method.
[0388] The search order between the tiles generated by partitioning the picture may follow a predetermined scanning order. In addition, an index may be assigned to each tile according to the predetermined scanning order.
[0389] The scanning order of the tile blocks may be any one of raster scanning, diagonal scanning, vertical scanning or horizontal scanning. Fig.28 (a) to (d) represent examples of assigning an index to each tile according to raster scanning, diagonal scanning, vertical scanning, or horizontal scanning.
[0390] The next scanning order may be determined according to the size or position of the current parallel block. In an example, when the height of the current parallel block is different from the height of the parallel block adjacent to the right side of the current parallel block (for example, when the height of the adjacent parallel block to the right side is greater than the height of the current parallel block), the parallel block at the leftmost position among the parallel blocks on the same vertical line as the parallel block adjacent to the bottom of the current parallel block may be determined as the next scanning target of the current parallel block.
[0391] The scanning order of tiles can be determined per picture or per sequence.
[0392] Optionally, the scanning order of the parallel blocks can be determined by considering the size of the first parallel block in the picture. In the example, when the width of the first parallel block is greater than the height, the scanning order of the parallel blocks can be set to horizontal scanning. When the height of the first parallel block is greater than the width, the scanning order of the parallel blocks can be set to vertical scanning. When the width and height of the first parallel block are the same, the scanning order of the parallel blocks can be set to raster scanning or diagonal scanning.
[0393] Optionally, based on the parallel block index or the index for the parallel block group mentioned later, the scanning order of the parallel blocks can be determined. Based on the index of the parallel block group, the scanning order between the parallel block groups can be determined.
[0394] Fig.29 is a diagram illustrating an example of determining a scanning order of tile blocks according to a tile group index.
[0395] When a plurality of tile groups are included in a picture, the tile groups included in the tile group with the lowest tile group index may be scanned first, and then the tile groups included in the tile group with the next sequential tile group index may be scanned. Fig.29 In the example shown, when the first parallel block group (parallel block group 0) includes parallel blocks 0 to 7 and the second parallel block group (parallel block group 1) includes only parallel block 8, the parallel blocks included in the parallel block group 1 may be scanned after scanning all the parallel blocks included in the parallel block group 0. Therefore, the scanning order of the parallel blocks may be determined as follows.
[0396] Parallel block 0, parallel block 1, parallel block 2, parallel block 3, parallel block 4, parallel block 5, parallel block 6, parallel block 7, parallel block 8
[0397] The scanning order of the coding tree units in the tile may be set to be the same as the scanning order of the tile. In an example, when the scanning order of the tile follows the raster scanning order, the coding tree units included in the tile may also be encoded / decoded in the raster scanning order.
[0398] Optionally, the scanning order of the coding tree units in a tile may be set to be different from the scanning order of the tile.
[0399] Information for determining the tile size may be encoded and signaled. In an example, a syntax element tile_width_minus1[i] indicating the width of an i-th tile column and a syntax element tile_height_minus1[i] indicating the height of an i-th tile row may be encoded in a bitstream.
[0400] When the width of the current parallel block column is equal to the width of the previous parallel block column, the encoding of the information indicating the width of the current parallel block column can be omitted, and the width of the current parallel block column can be derived from the width of the previous parallel block column. In the example, when the width of the current parallel block column is equal to the width of the previous parallel block column, the encoding of the syntax element tile_width_minus1 indicating the width of the current parallel block column can be omitted. In addition, for the rightmost parallel block column of the picture, the encoding of the syntax element tile_width_minus1 indicating the width can be omitted. The width of the rightmost parallel block column can be derived by subtracting the widths of the remaining parallel block columns from the width of the picture.
[0401] When the height of the current parallel block row is equal to the height of the previous parallel block row, the encoding of the information indicating the height of the current parallel block row can be omitted, and the height of the current parallel block row can be derived from the height of the previous parallel block row. In the example, when the height of the current parallel block row is equal to the height of the previous parallel block row, the encoding of the syntax element tile_height_minus1 indicating the height of the current parallel block row can be omitted. In addition, for the lowest parallel block row of the picture, the encoding of the syntax element tile_height_minus1 indicating the height can be omitted. The height of the lowest parallel block row can be derived by subtracting the heights of the remaining parallel block rows from the height of the picture.
[0402] For the remaining parallel block columns / rows except the first parallel block column / row, information indicating whether the size is the same as the size of the previous parallel block column / row may be encoded. In the example, a use_previous_tile_width_flag indicating whether the width of the current parallel block column is the same as the width of the previous parallel block column may be signaled. If use_previous_tile_width_flag is 1, it indicates that the width of the current parallel block column is the same as the width of the previous parallel block column. In this case, the encoding of the syntax element indicating the width of the current parallel block column may be omitted. If use_previous_tile_width_flag is 0, it indicates that the width of the current parallel block column is different from the width of the previous parallel block column. In this case, the syntax element indicating the width of the current parallel block column may be encoded. Optionally, when at least one parallel block column having the same width as the rightmost parallel block column in the current picture or the parallel block column located to the left of the rightmost parallel block column is continuously assigned to the left of the rightmost parallel block column or the left of the parallel block column located to the left of the rightmost parallel block column, the syntax element representing the width can be decoded only for one of the parallel block columns having the same width. For ease of explanation, the rightmost parallel block column in the picture or the parallel block column located to the left of the rightmost parallel block column is referred to as the first parallel block column. In the example, when a second parallel block column having the same width as the first parallel block column exists on the left of the first parallel block column, the syntax element representing the width of the second parallel block column can be encoded, and the encoding of the syntax element representing the width of the first parallel block column can be omitted. The width of the first parallel block column can be set to be the same as the width of the second parallel block column.
[0403] In another example, a use_previous_tile_height_flag indicating whether the height of the current parallel block row is the same as the height of the previous parallel block row may be sent by a signal. If use_previous_tile_height_flag is 1, it indicates that the height of the current parallel block row is the same as the height of the previous parallel block row. In this case, the encoding of the syntax element representing the height of the current parallel block row may be omitted. If use_previous_tile_height_flag is 0, it indicates that the height of the current parallel block row is different from the height of the previous parallel block row. In this case, the syntax element representing the height of the current parallel block row may be encoded. Optionally, when at least one parallel block row having the same height as the lower parallel block row or the parallel block row above the lower parallel block row in the current picture is continuously allocated above the lower parallel block row or above the parallel block row above the lower parallel block row, the syntax element representing the height may be encoded only for one of the parallel block rows having the same height. For ease of explanation, the lower parallel block row or the parallel block row above the lower parallel block row in the picture is referred to as the first parallel block row. In an example, when a second parallel block row having the same height as a first parallel block row exists above the first parallel block row, a syntax element indicating the height of the second parallel block row may be encoded, and encoding of the syntax element indicating the height of the first parallel block row may be omitted. The height of the first parallel block row may be set to be the same as the height of the second parallel block row.
[0404] In another example, information for specifying the number of parallel block columns whose width is signaled in the current picture may be signaled in the bitstream. In an example, the syntax num_exp_tile_columns_minus1 for determining the number of parallel block columns whose width is signaled may be signaled in the bitstream. The syntax num_exp_tile_columns_minus1 may be a value minus 1 from the number of parallel block columns whose width is signaled. When the index of the parallel block column is lower than the number of parallel block columns whose width is signaled, the width of the corresponding parallel block column may be determined based on the syntax tile_width_minus1 signaled in the bitstream. On the other hand, when the index of the parallel block column is equal to or greater than the number of parallel block columns whose width is signaled, the width of the corresponding parallel block column may be set to be the same as the last signaled syntax tile_width_minus1.
[0405] Optionally, information for specifying the number of parallel block rows whose height is signaled in the current picture may be signaled in the bitstream. In an example, the syntax num_exp_tile_rows_minus1 for determining the number of parallel block rows whose height is signaled may be signaled in the bitstream. The syntax num_exp_tile_rows_minus1 may be a value minus 1 from the number of parallel block rows whose height is signaled. When the index of a parallel block row is lower than the number of parallel block rows whose height is signaled, the height of the corresponding parallel block row may be determined based on the syntax tile_height_minus1 signaled in the bitstream. On the other hand, when the index of a parallel block row is equal to or greater than the number of parallel block rows whose height is signaled, the height of the corresponding parallel block row may be set to be the same as the last signaled syntax tile_height_minus1.
[0406] In another example, information indicating the height and width of a tile may be signaled per tile. In an example, when determining the number of tiles, information for determining the size of each tile may be encoded and signaled. In an example, a syntax element tile_width_minus1[i] indicating the width of the i-th tile and a syntax element tile_height_minus1[i] indicating the height of the i-th tile may be signaled in the bitstream. To this end, information indicating the total number of tiles in the picture may be encoded.
[0407] If the number of parallel blocks is determined, information defining information of each parallel block may be signaled for each parallel block.
[0408] First, for the remaining parallel blocks except the first parallel block, information indicating whether it has the same size as the previous parallel block can be encoded and sent with a signal. In the example, the syntax element use_previous_tile_size_flag indicates whether the size of the current parallel block is the same as the size of the previous parallel block. If use_previous_tile_size_flag is true, it means that the size of the current parallel block is the same as the size of the previous parallel block. In this case, the encoding of the information representing the size of the current parallel block can be omitted. If use_previous_tile_size_flag is false, the information representing the size of the current parallel block can be encoded and sent with a signal. For the first parallel block, the encoding of use_previous_tile_size_flag can be omitted, and the value of the flag can be inferred to be false. In the example, the syntax tile_width_minus1[i] representing the width of the i-th parallel block and the syntax tile_height_minus1[i] representing the height of the i-th parallel block can be encoded and sent with a signal.
[0409] The tile size may be determined using information indicating whether the width of the tile is the same as the width of the previous tile and / or information indicating whether the height of the tile is the same as the height of the previous tile.
[0410] Table 8 shows a syntax table including information indicating whether the width of a tile is the same as the width of a previous tile.
[0411] [Table 8]
[0412]
[0413] The syntax element use_previous_tile_width_flag indicates whether the width of the current tile is the same as the width of the previous tile. If use_previous_tile_width_flag is true, encoding of the syntax element indicating the width of the current tile may be omitted, and the width of the current tile may be set to be the same as the width of the previous tile.
[0414] When use_previous_tile_width_flag is false, information indicating the width of the current tile may be signaled. In an example, tile_width_minus1[i] may represent a value obtained by subtracting 1 from the number of coding tree unit rows included in an i-th tile.
[0415] The syntax element use_previous_tile_width_flag may be encoded and signaled only when it is determined that the size of the current tile is different from the size of the previous tile (eg, when the value of use_previous_tile_size_flag is 0).
[0416] Tile_width_minus1[i] may be a value minus 1 from the number of coding tree unit columns included in the i-th tile. The decoder may derive the number of coding tree unit columns included in the i-th tile by adding 1 to tile_width_minus1[i], and calculate the width of the tile by multiplying the derived value by the width of the coding tree unit.
[0417] Table 9 represents a syntax table which also includes information indicating whether the height of the current tile is the same as the height of the previous tile.
[0418] [Table 9]
[0419]
[0420]
[0421] The syntax element use_previous_tile_height_flag indicates whether the height of the current tile is the same as the height of the previous tile. If use_previous_tile_height_flag is true, encoding of information indicating the height of the current tile may be omitted, and the height of the current tile may be set to be the same as the height of the previous tile.
[0422] When use_previous_tile_height_flag is false, information indicating the height of the current tile may be signaled. In an example, tile_height_minus1[i] may indicate a value obtained by subtracting 1 from the number of coding tree unit rows included in the i-th tile.
[0423] The syntax element use_previous_tile_height_flag may be encoded and signaled only when it is determined that the size of the current tile is different from the size of the previous tile (eg, when the value of use_previous_tile_size_flag is 0). Additionally, the syntax element use_previous_tile_height_flag may be signaled only when use_previous_tile_width_flag is false.
[0424] Table 8 shows an example of the case of using use_previous_tile_width_flag, and Table 9 shows an example of the case of using use_previous_tile_width_flag and use_previous_tile_height_flag. Although not shown in the above table, encoding of use_previous_tile_width_flag may be omitted, and only use_previous_tile_height_flag may be used.
[0425] Whether to use use_previous_tile_height_flag or use_previous_tile_size_flag may be determined based on at least one of a tile scanning order, a width / height of a first tile, or a width / height of a previous tile. In an example, although use_previous_tile_height_flag may be used when the tile scanning order is a vertical direction, use_previous_tile_width_flag may be used when the tile scanning order is a horizontal direction. Alternatively, although use_previous_tile_width_flag may be used when a first tile or a previous tile has a non-square shape having a width greater than a height, use_previous_tile_height_flag may be used when a first tile or a previous tile has a non-square shape having a height greater than a width.
[0426] Although the number of tiles included in a picture is signaled, encoding of information related to a tile size of a last tile may be omitted.
[0427] Table 10 shows an example in which encoding of the tile size of the last tile is omitted.
[0428] [Table 10]
[0429]
[0430] If the size of a tile other than the last tile is designated, the remaining area in the picture may be set as the last tile.
[0431] The decoder may determine the size of the parallel block based on the number of coding tree unit columns and / or the number of coding tree unit rows derived from the above syntax elements and the size of the coding tree unit. In an example, the width of the i-th parallel block may be set by (tile_width_minus1[i]+1)*(width of the coding tree unit), and the height of the i-th parallel block may be set by (tile_height_minus1[i]+1)*(height of the coding tree unit).
[0432] On the other hand, information indicating the size of the coding tree unit may be signaled through a sequence parameter set or through a picture parameter set.
[0433] An identifier (hereinafter referred to as TileID) for identifying a tile to which the coding tree unit belongs may be allocated to each coding tree unit.
[0434] Fig.30 is a diagram showing an example in which TileID is assigned to each coding tree unit.
[0435] The same TileID may be assigned to coding tree units belonging to the same tile. Specifically, a TileID of N may be assigned to a coding tree unit belonging to tile N.
[0436] In order to determine the TileID assigned to each coding tree unit, variables x and y representing the position of the coding tree unit in the picture may be determined. In this regard, x represents a value derived by dividing the x-axis coordinate in (x0, y0) by the width of the coding tree unit, and y represents a value derived by dividing the y-axis coordinate in (x0, y0) by the height of the coding tree unit. Specifically, x and y may be derived from the following equations 7 and 8.
[0437] [Equation 7]
[0438] x=(xO / (CTU_width))
[0439] [Equation 8]
[0440] y(y0 / CTU_height))
[0441] TileID may be assigned to each coding tree unit in the following process.
[0442] i) Initialize TileID
[0443] The TileID of each coding tree unit may be initialized to a value minus 1 from the number of tiles in the picture.
[0444] [Table 11]
[0445]
[0446] ii) Derivation of TileID
[0447] [Table 12]
[0448]
[0449] Multiple parallel blocks may be defined as a processing unit. In an example, multiple parallel blocks may be defined as a parallel block group. A parallel block group may be referred to as a stripe.
[0450] Optionally, a parallel block may be partitioned into a plurality of processing units. In an example, a parallel block may be partitioned into a plurality of slices. In this regard, a slice may include at least one coding tree unit column. When a parallel block is partitioned into a plurality of slices, information indicating the height of each slice may be signaled in the bitstream.
[0451] Information indicating the total number of tile groups in a sequence or in a picture may be signaled in the bitstream. In an example, the syntax numTotalTileGroup_minus1 indicating the total number of tile groups in a sequence or in a picture may be signaled.
[0452] When a plurality of tile groups are included in a picture, address information of the tile group may be signaled to identify each tile group. In an example, a syntax tile_group_index representing an index of each tile group may be signaled per tile group.
[0453] Video encoding / decoding information may be signaled through the tile group header. Information signaled through the tile group header may be commonly applied to tiles belonging to the tile group.
[0454] Information for determining a tile group included in a picture may be signaled in a bitstream. The information may include information indicating a partition method of the tile group. In an example, a syntax rec_tile_group_flag indicating a partition method of the tile group may be signaled in a bitstream.
[0455] The syntax rec_tile_group_flag indicates whether the tile group is defined based on the raster scan order or whether the tile group is defined in a rectangular shape. In the example, if rec_tile_group_flag is 0, it indicates that the tile group is defined based on the raster scan order of the tile. On the other hand, if rec_tile_group_flag is 1, it indicates that the tile group is defined in a rectangular shape.
[0456] When the flexible tile partitioning method is applied, it may be allowed to define tile groups only in a rectangular shape. In other words, when the flexible tile partitioning method is applied, encoding of rec_tile_group_flag may be omitted and the value may be inferred to be 1.
[0457] Hereinafter, the above two methods for determining tile groups will be described in detail.
[0458] The tile group may be defined based on a raster scan order of the tile. In an example, at least one tile may be defined as one tile group, but the tile blocks included in the tile group should be determined in a raster scan order.
[0459] Fig.31 and Fig.32 Represents an example of defining parallel block groups based on raster order.
[0460] In the example, Fig.31 In the example shown, when it is assumed that the first parallel block group (parallel block group 0) includes 3 parallel blocks, the first parallel block group (parallel block group 0) may be defined to include parallel blocks 0 to 2 in a raster scan order. When it is assumed that the second parallel block group (parallel block group 1) includes 6 parallel blocks, the second parallel block group (parallel block group 1) may be defined to include parallel blocks 3 to 8 in a raster scan order. The last parallel block group (parallel block group 2) may include the remaining parallel blocks (parallel blocks 9 to 11) in a raster scan order.
[0461] When the tile groups are defined in a raster scan order, information indicating the number of tile blocks included in each tile group may be signaled to determine the tile blocks included in each tile group. For the last tile group, information indicating the number of tile blocks included in the tile group may be omitted.
[0462] The width or height of the tiles included in the tile group may be different. In the example, it is shown that the height of tile 3 among the tiles included in the second tile group (tile group 1) is different from the heights of the remaining tiles.
[0463] Optionally, parallel blocks with different widths or heights may be set not to be included in a parallel block group. In the example, Fig.31 The example shown shows that the parallel block 3 with a height of 2 and the parallel blocks 4 to 8 with a height of 3 constitute a parallel block group, but such a combination of parallel blocks can be set to be not allowed. Fig.32 In the example shown, it can be set so that one tile group does not include tile blocks having different heights. Fig.32 The example shown shows that the Fig.31The parallel block group of parallel blocks 3 to 8 shown is partitioned into two parallel block groups (parallel block group 1 and parallel block group 2). Therefore, the second parallel block group (parallel block group 1) includes only parallel blocks 3 with a height of 2, and the third parallel block group (parallel block group 2) includes only parallel blocks 4 to 8 with a height of 3.
[0464] The tile group can be defined in a rectangular shape. In this case, the tiles located at the four corners of the tile group belong to the same row or the same column.
[0465] Fig.33 is a diagram showing an example in which only rectangular tile groups are allowed.
[0466] As in Fig.33 In the example shown, the fourth parallel block group (parallel block group 3) includes parallel block 5, parallel block 6, parallel block 9, and parallel block 10. As in the example shown, when a parallel block group includes a plurality of parallel blocks, a rectangle having an upper left parallel block and a lower right parallel block constituting the parallel block group as two vertices may be defined as one parallel block group.
[0467] When the flexible parallel block partitioning method is applied, it may be allowed to define parallel block groups only in a rectangular shape.
[0468] Fig.34 is a diagram showing an example in which a parallel block group is defined in a flexible parallel block partitioning method.
[0469] As in Fig.34 In the example shown, the parallel block group can be set to have a rectangular shape. In other words, as in the example shown, when the parallel block group includes multiple parallel blocks, a rectangle with the upper left parallel block and the lower right parallel block constituting the parallel block group as two vertices can be defined as a parallel block group.
[0470] When the height of a predetermined parallel block is greater than the height of a previous parallel block group, the corresponding parallel blocks may be arranged to form a parallel block group. Fig.34 In the example shown in , since the height of tile 8 is greater than the height of the previous tile group (tile group 1 ), tile 8 may be defined as a separate tile group.
[0471] When a parallel block group is defined in a square shape, information for identifying the parallel blocks included in each parallel block group may be sent by a signal to determine the parallel blocks included in each parallel block group. The information may be used to identify the index of the parallel block located at the upper left of the parallel block group and the index of the parallel block located at the upper right of the parallel block group. In an example, the syntax top_left_tile_idx for identifying the index of the parallel block located at the upper left of the parallel block group and the syntax bottom_right_tile_idx for identifying the index of the parallel block located at the lower right of the parallel block group may be sent by a signal in the bitstream. For the last parallel block group, the encoding of at least one of the syntax for identifying the index of the parallel block located at the upper left of the parallel block group or the syntax for identifying the index of the parallel block located at the lower right of the parallel block group may be omitted.
[0472] In the example, Fig.33 In the example shown, for parallel block group 0, parallel block group 1, and parallel block group 2, the index top_left_tile_idx of the parallel block located at the top left of each parallel block group and the index bottom_right_tile_idx of the parallel block located at the bottom right of each parallel block group can be sent by a signal. On the other hand, for parallel block group 3, which is the last parallel block group in the picture, the encoding of top_left_tile_idx and bottom_right_tile_idx can be omitted. The index of the parallel block located at the top left of parallel block group 3 can be set to the index of the parallel block located at the top left of the remaining area in the picture except parallel block group 0, parallel block group 1, and parallel block group 2, and the index of the parallel block located at the bottom right of parallel block group 3 can be set to the index of the parallel block located at the bottom right of the remaining area above (or the parallel block located at the bottom right of the picture).
[0473] Optionally, information indicating the difference between the index of the parallel block located at the top left of the parallel block group and the index of the parallel block located at the top right of the parallel block group may be signaled in the bitstream. In an example, the syntax top_left_tile_idx for identifying the index of the parallel block located at the top left of the parallel block group and the syntax tile_delta_idx indicating the difference between the index of the parallel block located at the top left of the parallel block group and the index of the parallel block located at the bottom right of the parallel block group may be signaled. For the last parallel block group, at least one of the syntax indicating the index of the parallel block located at the top left of the parallel block group or the syntax indicating the difference between the index of the parallel block located at the top left of the parallel block group and the index of the parallel block located at the bottom right of the parallel block group is encoded.
[0474] Optionally, information indicating the difference between the index of the parallel block located at the bottom right of the previous parallel block group and the index of the parallel block located at the bottom right of the current parallel block group may be signaled in the bitstream. In an example, the syntax tile_delta_idx indicating the difference between the index of the parallel block located at the bottom right of the previous parallel block group and the index of the parallel block located at the bottom right of the current parallel block group may be signaled. For the first parallel block group, the syntax tile_delta_idx may indicate the difference between the index of the upper left parallel block and the index of the lower right parallel block in the first parallel block group. For the last parallel block group, the encoding of the syntax indicating the difference between the index of the parallel block located at the bottom right of the previous parallel block group and the index of the parallel block located at the bottom right of the current parallel block group may be omitted.
[0475] The tile group may be defined based on the index of the coding tree unit instead of the index of the tile group.
[0476] The above example describes that the tile group is defined according to the raster scanning order of the tile blocks, but the tile group may also be defined according to vertical scanning, horizontal scanning, or diagonal scanning.
[0477] Information indicating whether at least one parallel block group in a picture includes multiple parallel blocks can be sent with a signal. In an example, the syntax isMultipleTileInTileG_flag indicating whether there is a parallel block group including multiple parallel blocks can be sent with a signal. If the syntax isMultipleTileInTileG_flag is 1, it means that at least one parallel block group in the picture includes at least 2 parallel blocks or more parallel blocks. If the syntax isMultipleTileInTileG_flag is 0, it means that all parallel block groups in the picture include 1 parallel block. When isMultipleTileInTileG_flag is 0, each parallel block can be defined as a parallel block group.
[0478] Optionally, information indicating whether the number of parallel blocks constituting a parallel block group is multiple may be signaled per parallel block group. In an example, the syntax isMultipleTileInTileG_flag[i] indicates whether the i-th parallel block group includes multiple parallel blocks. When the number of parallel blocks included in the parallel block group is 1, encoding of information for determining the parallel blocks included in the parallel block group (e.g., information about the number of parallel blocks or information about parallel block indexes) may be omitted.
[0479] The syntax num_tile_inTG_minus2 indicating the number of parallel blocks in the parallel block group may be signaled. The syntax num_tile_inTG_minus2 may be set to a value obtained by subtracting 2 from the number of parallel blocks included in the parallel block group. The syntax num_tile_inTG_minus2 indicating the number of parallel blocks in the parallel block group may be encoded only when the parallel block group is determined to include multiple parallel blocks (e.g., when the value of isMultipleTileInTileG_flag is 1).
[0480] Alternatively, encoding of isMultipleTileInTileG_flag may be omitted, and syntax num_tile_inTG_minus1 indicating the number of tiles in a tile block group may be encoded. The syntax num_tile_inTG_minus1 may be set to a value minus 1 from the number of tiles included in the tile block group.
[0481] The syntax num_tile_inTG_minus2 or num_tile_inTG_minus1 indicating the number of parallel block groups may be encoded only when the parallel block group is defined based on the raster scan order of the parallel blocks. In the example, when the parallel block group is defined based on the raster scan order of the parallel blocks, the parallel block group may be determined based on the number of parallel blocks included in each parallel block group. In the example, num_tile_inTG_minus1[i] indicates the number of parallel blocks included in the i-th parallel block group. If the number of parallel blocks included in the parallel block group is determined, the parallel blocks included in the parallel block group may be determined in the raster scan order. For the last parallel block group, the encoding of the syntax indicating the number of parallel blocks included in the parallel block group may be omitted.
[0482] Information indicating whether the size of the previous parallel block group is the same as the size of the current parallel block group may be sent by a signal. In this regard, the previous parallel block group may be determined based on an index of the parallel block group or a predetermined scanning order. In an example, the previous parallel block group may be determined as a parallel block group whose index is 1 less than the current parallel block group. Alternatively, the previous parallel block group may be determined according to at least one of a raster scanning order, a horizontal scanning order, a vertical scanning order, or a diagonal scanning order.
[0483] The above information may include at least one of the following items: information indicating whether the size of the previous parallel block group is the same as the size of the current parallel block group, information indicating whether the width of the previous parallel block group is the same as the width of the current parallel block group, or information indicating whether the height of the previous parallel block group is the same as the height of the current parallel block group.
[0484] In an example, a syntax use_previous_TG_size_flag indicating whether the size of the current parallel block group is the same as the size of the previous parallel block group may be sent by a signal. If the syntax use_previous_TG_size_flag[i] is 1, it indicates that the size of the i-th parallel block group is the same as the size of the (i-1)-th parallel block group. When the syntax use_previous_TG_size_flag[i] is 1, the encoding of information for determining the parallel blocks included in the i-th parallel block group may be omitted. For example, the encoding of information indicating the number of parallel blocks included in the parallel block group or information indicating the index of the parallel blocks included in the parallel block group may be omitted.
[0485] If the syntax use_previous_TG_size_flag[i] is 0, it means that the size of the i-th tile block group is different from the size of the (i-1)-th tile block group. When the syntax use_previous_TG_size_flag[i] is 0, information for determining tiles included in the i-th tile block group may be encoded and signaled.
[0486] The above-mentioned embodiment describes that a flag indicating whether to allow the in-loop filter to be applied at the boundary of a parallel block is sent by a signal through a picture parameter set. However, when it is set not to use the in-loop filter at the boundary of all parallel blocks, the problem of reduced subjective image quality and reduced coding efficiency may occur.
[0487] Therefore, information indicating whether the in-loop filter is allowed may be encoded and signaled per tile.
[0488] Fig.35 An example of selectively determining whether to apply an in-loop filter on a per-parallel block basis is shown.
[0489] As in Fig.35 In the example shown, whether an in-loop filter (eg, deblocking filter, SAO, and / or ALF) is to be enabled at a horizontal boundary or a vertical boundary may be determined on a tile-by-tile basis.
[0490] Table 13 shows an example in which information indicating whether the in-loop filter is allowed is encoded per tile.
[0491] [Table 13]
[0492]
[0493] In the example in Table 13, the syntax element loop_filter_across_tiles_flag[i] indicates whether to allow the in-loop filter to be applied to the i-th tile. If the value of loop_filter_across_tile_flag[i] is 1, it indicates that the in-loop filter can be used at the horizontal and vertical boundaries of the tile with TileID i. If the value of loop_filter_across_tile_flag[i] is 0, it indicates that the in-loop filter may not be used at the horizontal and vertical boundaries of the tile with TileID i.
[0494] Information indicating whether an in-loop filter is allowed for each horizontal direction and vertical direction may be encoded.
[0495] Table 14 shows an example in which information indicating whether the in-loop filter is allowed is encoded separately for the horizontal direction and the vertical direction.
[0496] [Table 14]
[0497]
[0498] In the example of Table 14, the syntax element loop_filter_hor_across_tiles_flag[i] indicates whether the in-loop filter is allowed to be applied horizontally across the i-th tile. The syntax element loop_filter_ver_across_tiles_flag[i] indicates whether the in-loop filter is allowed to be applied vertically across the i-th tile.
[0499] If the value of loop_filter_hor_across_tile_flag[i] is 1, it indicates that the in-loop filter can be used at the horizontal boundary of the tile with TileID i. If the value of loop_filter_hor_across_tile_flag[i] is 0, it indicates that the in-loop filter cannot be used at the horizontal boundary of the tile with TileID i.
[0500] If the value of loop_filter_ver_across_tile_flag[i] is 1, it indicates that the in-loop filter can be used on the vertical boundary of the tile with TileID i. If the value of loop_filter_ver_across_tile_flag[i] is 0, it indicates that the in-loop filter cannot be used on the vertical boundary of the tile with TileID i.
[0501] Alternatively, in a tile group level, information indicating whether an in-loop filter is allowed may be signaled. Whether an in-loop filter is allowed for a plurality of tile blocks included in a tile group may be determined through the above information.
[0502] Encoding of information indicating whether an in-loop filter is allowed may be omitted, and whether an in-loop filter is allowed may be determined based on at least one of the number of coding tree units included in a parallel block, the width of the parallel block, or the height of the parallel block. In an example, when the width of the parallel block is less than a basic value, an in-loop filter for a horizontal direction may be allowed, and when the height of the parallel block is less than the basic value, an in-loop filter for a vertical direction may be allowed.
[0503] When an in-loop filter is used on a parallel block boundary, reconstruction data outside the parallel block can be generated based on the data included in the parallel block. In this regard, a reconstructed image outside the parallel block can be obtained by filling or interpolating the data included in the parallel block. Thereafter, the in-loop filter can be applied by using the reconstruction data outside the parallel block.
[0504] Applying the embodiments described with respect to the decoding process or the encoding process to the encoding process or the decoding process, respectively, may be included within the scope of the present disclosure. Within the scope of the present disclosure, embodiments in which operations occur in a predetermined order may be modified to embodiments in which operations occur in an order different from the predetermined order.
[0505] Although the above-mentioned embodiment is described based on a series of operations or flow charts, the embodiment does not limit the time series order of the operation of the method to this. In another example, the operation can be performed simultaneously or in a different order as needed. In addition, in the above-mentioned embodiment, each component (e.g., unit, module, etc.) constituting the block diagram can be implemented in the form of hardware devices or software. Multiple components can be combined with each other into a single component, wherein a single component can be implemented using a single hardware device or software. The above-mentioned embodiment can be implemented using program instructions that can be executed via various computer components. Instructions can be recorded in a computer-readable storage medium. The computer-readable storage medium can include program instructions, data files, data structures, etc., individually or in combination with each other. Examples of computer-readable storage media include magnetic media (such as hard disks, floppy disks, and tapes) that are specially configured to store and execute program instructions therein, optical storage media (such as CD-ROMs, DVDs), magneto-optical media (such as optical disks), and hardware devices (such as ROMs, RAMs, flash memories, etc.). Hardware devices can be configured to operate as one or more software modules to perform processing according to the present disclosure, and vice versa.
[0506] Industrial availability
[0507] The present disclosure may be applied to an electronic device that encodes / decodes a video.
Claims
1. A method for decoding a video, the method comprising: Partition the screen into multiple parallel block columns; as well as Partition the picture into a plurality of parallel block rows, Partitioning the picture into the plurality of parallel block columns comprises: Determining whether to decode width information of each parallel block column in a plurality of parallel block columns from a bitstream, wherein determining whether to decode width information of each parallel block column in the plurality of parallel block columns from a bitstream comprises: determining width information for a first parallel block column of the plurality of parallel block columns to be decoded from the bitstream, and in response, determining a width of the first parallel block column based on the width information decoded for the first parallel block column, and determining not to decode width information of two or more additional tile block columns of the plurality of tile block columns from the bitstream, and in response: determining that the width of at least one additional parallel block column is the width of the previous parallel block column, and The width of the at least one additional tile column is determined to be the remaining width of the current picture.
2. The method of claim 1, wherein: The method further includes decoding width quantity information from the bitstream, the width quantity information specifying a quantity of width information to be explicitly signaled, and The determination of whether to decode the width information of the current parallel block column is based on a comparison between the value of the width quantity information and the index of the current parallel block column.
3. The method of claim 2, wherein: When the index of the current tile column is equal to or less than the value of the width quantity information, decoding the width information of the current tile column from the bitstream, and When the index of the current parallel block column is greater than the value of the width quantity information, the width information of the current parallel block column is not decoded from the bit stream.
4. The method of claim 1, wherein: When it is determined not to decode the width information of the current tile column from the bitstream, the width of the current tile column is determined to be a smaller one of the width of the previous tile column and the remaining width of the current picture.
5. A system comprising: one or more processors; as well as One or more non-transitory computer-readable media storing instructions that, when executed by the one or more processors, cause the one or more processors to perform operations including: Partition the screen into multiple parallel block columns; as well as Partition the picture into a plurality of parallel block rows, Partitioning the picture into the plurality of parallel block columns comprises: Determining whether to decode width information of each parallel block column in a plurality of parallel block columns from a bitstream, wherein determining whether to decode width information of each parallel block column in the plurality of parallel block columns from a bitstream comprises: determining width information for a first parallel block column of the plurality of parallel block columns to be decoded from the bitstream, and in response, determining a width of the first parallel block column based on the width information decoded for the first parallel block column, and determining not to decode width information of two or more additional tile block columns of the plurality of tile block columns from the bitstream, and in response: determining that the width of at least one additional parallel block column is the width of the previous parallel block column, and The width of the at least one additional tile column is determined to be the remaining width of the current picture.
6. The system of claim 5, wherein: The method further includes decoding width quantity information from the bitstream, the width quantity information specifying a quantity of width information to be explicitly signaled, and The determination of whether to decode the width information of the current parallel block column is based on a comparison between the value of the width quantity information and the index of the current parallel block column.
7. The system of claim 6, wherein: When the index of the current tile column is equal to or less than the value of the width quantity information, decoding the width information of the current tile column from the bitstream, and When the index of the current parallel block column is greater than the value of the width quantity information, the width information of the current parallel block column is not decoded from the bit stream.
8. The system of claim 5, wherein: When it is determined not to decode the width information of the current tile column from the bitstream, the width of the current tile column is determined to be a smaller one of the width of the previous tile column and the remaining width of the current picture.
9. A method for encoding a video, the method comprising: Partition the screen into multiple parallel block columns; Partitioning the picture into a plurality of parallel block rows; as well as Determining whether to encode width information of each parallel block column into a bitstream, wherein determining whether to encode width information of each parallel block column into a bitstream comprises: determining that a width of a first parallel block column among the plurality of parallel block columns is neither a width of a previous parallel block column nor a remaining width of a current picture, encoding width information of the first parallel block column into the bitstream, and determining that width information of each of two or more additional parallel block columns of the plurality of parallel block columns is a width of a previous parallel block column or a remaining width of a current picture, and in response, omitting width information of the two or more second parallel block columns from the bitstream, wherein the width of at least one additional parallel block column is a width of a previous parallel block column, and The width of at least one additional parallel block column is the remaining width of the current picture.
10. The method of claim 9, wherein: The method further includes encoding width amount information into the bitstream, the width amount information specifying an amount of width information to be explicitly signaled.
11. The method of claim 10, wherein: When the index of the current parallel block column is equal to or less than the value of the width quantity information, encoding the width quantity information of the current parallel block column into the bit stream, and When the index of the current parallel block column is greater than the value of the width quantity information, encoding of the width information of the current parallel block column is omitted.
12. The method of claim 9, wherein: When encoding of the width information of the current tile column is omitted, the width of the current tile column is the same as the smaller one of the width of the previous tile column and the remaining width of the current picture.
13. A system comprising: one or more processors; as well as One or more non-transitory computer-readable media storing instructions that, when executed by the one or more processors, cause the one or more processors to perform operations including: Partition the screen into multiple parallel block columns; Partitioning the picture into a plurality of parallel block rows; as well as Determining whether to encode width information of each parallel block column into a bitstream, wherein determining whether to encode width information of each parallel block column into a bitstream comprises: determining that a width of a first parallel block column among the plurality of parallel block columns is neither a width of a previous parallel block column nor a remaining width of a current picture, encoding width information of the first parallel block column into the bitstream, and determining that width information of each of two or more additional parallel block columns of the plurality of parallel block columns is a width of a previous parallel block column or a remaining width of a current picture, and in response, omitting width information of the two or more second parallel block columns from the bitstream, wherein the width of at least one additional parallel block column is a width of a previous parallel block column, and The width of at least one additional parallel block column is the remaining width of the current picture.
14. The system of claim 13, wherein: The method further includes encoding width amount information into the bitstream, the width amount information specifying an amount of width information to be explicitly signaled.
15. The system of claim 14, wherein: When the index of the current parallel block column is equal to or less than the value of the width quantity information, encoding the width quantity information of the current parallel block column into the bit stream, and When the index of the current parallel block column is greater than the value of the width quantity information, encoding of the width information of the current parallel block column is omitted.
16. The system of claim 13, wherein: When encoding of the width information of the current tile column is omitted, the width of the current tile column is the same as the smaller one of the width of the previous tile column and the remaining width of the current picture.
