Image encoding / decoding method, storage medium, and method for transmitting bitstream
By performing deblocking filtering based on whether the palette mode is applied in the image encoding/decoding method and device, the problem of low high-resolution and high-quality image encoding/decoding efficiency in the prior art is solved, and more efficient image transmission and storage are achieved.
Patent Information
- Application Number
- CN202510211046.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2019-07-21
- Filing Date
- 2020-07-21
- Publication Date
- 2025-05-13
AI Technical Summary
The prior art is difficult to effectively improve the encoding/decoding efficiency of high resolution and high-quality images, resulting in increased transmission and storage costs.
The encoding/decoding efficiency of the image encoding/decoding method and the device is improved by performing deblocking filtering based on whether the palette mode is applied.
Improve image encoding/decoding efficiency, reduce transmission and storage costs, and achieve higher quality image transmission and storage.
Smart Images

Figure CN119996656A_ABST
Abstract
Description
[0001] This application is a divisional application of the invention patent application with the original application number 202080065230.X (International application number: PCT / KR2020 / 009617, application date: July 21, 2020, invention name: Image encoding / decoding method and device for performing deblocking filtering according to whether a palette mode is applied, and a method for sending a bit stream). Technical Field
[0002] The present disclosure relates to an image encoding / decoding method and apparatus, and more particularly, to an image encoding / decoding method for performing deblocking filtering according to whether a palette mode is applied, and a method for transmitting a bit stream generated by the image encoding method / apparatus of the present disclosure. Background Art
[0003] Recently, the demand for high-resolution and high-quality images, such as high-definition (HD) images and ultra-high-definition (UHD) images, is increasing in various fields. As the resolution and quality of image data are improved, the amount of information or bit volume transmitted is relatively increased compared to existing image data. The increase in the amount of information or bit volume transmitted leads to an increase in transmission cost and storage cost.
[0004] Therefore, efficient image compression technology is needed to effectively transmit, store, and reproduce information about high-resolution and high-quality images. Summary of the invention
[0005] Technical issues
[0006] An object of the present disclosure is to provide an image encoding / decoding method and apparatus with improved encoding / decoding efficiency.
[0007] An object of the present disclosure is to provide an image encoding / decoding method and apparatus that improves encoding / decoding efficiency by performing deblocking filtering according to whether a palette mode is applied.
[0008] Another object of the present disclosure is to provide a method for transmitting a bit stream generated by the image encoding method or apparatus according to the present disclosure.
[0009] Another object of the present disclosure is to provide a recording medium storing a bit stream generated by the image encoding method or apparatus according to the present disclosure.
[0010] Another object of the present disclosure is to provide a recording medium storing a bit stream received and decoded by the image decoding apparatus according to the present disclosure and used to reconstruct an image.
[0011] The technical problems solved by the present disclosure are not limited to the above-mentioned technical problems, and other technical problems not described here will be clear to those skilled in the art through the following description.
[0012] Technical Solution
[0013] According to an aspect of the present disclosure, an image decoding method performed by an image decoding device may include the following steps: generating a reconstructed block of a current block; determining a target boundary of the reconstructed block; determining a first target block and a second target block based on samples adjacent to the target boundary; and performing deblocking filtering on samples adjacent to the target boundary based on a prediction mode of at least one of the first target block or the second target block. In this case, the prediction mode based on at least one of the first target block or the second target block is a palette mode, and the values of samples adjacent to the target boundary may not change.
[0014] In addition, an image decoding device according to an aspect of the present disclosure may include a memory and at least one processor. The at least one processor may generate a reconstructed block of a current block; determine a target boundary of the reconstructed block; determine a first target block and a second target block based on samples adjacent to the target boundary; and perform deblocking filtering on samples adjacent to the target boundary based on a prediction mode of at least one of the first target block or the second target block. In this case, the prediction mode based on at least one of the first target block or the second target block is a palette mode, and the values of samples adjacent to the target boundary may not change.
[0015] In addition, according to an aspect of the present disclosure, an image encoding method performed by an image encoding device may include the following steps: generating a reconstructed block of a current block; determining a target boundary of the reconstructed block; determining a first target block and a second target block based on samples adjacent to the target boundary; and performing deblocking filtering on samples adjacent to the target boundary based on a prediction mode of at least one of the first target block or the second target block. In this case, the prediction mode based on at least one of the first target block or the second target block is a palette mode, and the values of the samples adjacent to the target boundary may not change.
[0016] In addition, a transmission method according to another aspect of the present disclosure may transmit a bit stream generated by the image encoding device or the image encoding method of the present disclosure.
[0017] In addition, a computer-readable recording medium according to another aspect of the present disclosure may store a bit stream generated by the image encoding device or the image encoding method of the present disclosure.
[0018] The features described above in brief summary of the present disclosure are merely exemplary aspects of the following detailed description of the present disclosure and do not limit the scope of the present disclosure.
[0019] Beneficial Effects
[0020] According to the present disclosure, it is possible to provide an image encoding / decoding method and apparatus with improved encoding / decoding efficiency.
[0021] Furthermore, according to the present disclosure, it is possible to provide an image encoding / decoding method and apparatus which improve encoding / decoding efficiency by performing deblocking filtering according to whether a palette mode is applied.
[0022] Furthermore, according to the present disclosure, it is possible to provide a method of transmitting a bit stream generated by the image encoding method or apparatus according to the present disclosure.
[0023] Furthermore, according to the present disclosure, it is possible to provide a recording medium storing a bit stream generated by the image encoding method or apparatus according to the present disclosure.
[0024] Furthermore, according to the present disclosure, it is possible to provide a recording medium that stores a bit stream received and decoded by the image decoding device according to the present disclosure and used to reconstruct an image.
[0025] Those skilled in the art will understand that the effects that can be achieved through the present disclosure are not limited to what has been specifically described above, and other advantages of the present disclosure will be more clearly understood from the detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 is a diagram schematically showing a video encoding system to which an embodiment of the present disclosure is applicable.
[0027] Figure 2 is a view schematically showing an image encoding device to which an embodiment of the present disclosure is applicable.
[0028] Figure 3 is a view schematically showing an image decoding device to which an embodiment of the present disclosure is applicable.
[0029] Figure 4 is a view showing a segmentation structure of an image according to an embodiment.
[0030] Figure 5 is a view showing an embodiment of a partition type of a block according to a multi-type tree structure.
[0031] Figure 6 is a diagram illustrating a signaling mechanism of block partitioning information in a quadtree having a nested multi-type tree structure according to the present disclosure.
[0032] Figure 7 is a diagram showing an embodiment of dividing a CTU into a plurality of CUs.
[0033] Figure 8 is a view illustrating an embodiment of a redundancy division pattern.
[0034] Fig. 9 is a view illustrating the syntax of chroma format signaling according to an embodiment.
[0035] Fig.10 is a view illustrating a chroma format classification table according to an embodiment.
[0036] Fig.11 is a view illustrating horizontal scanning and vertical scanning according to an embodiment.
[0037] Figure 12 to Figure 13 is a view illustrating the syntax of the palette mode according to an embodiment.
[0038] Figures 14 to 19 is a view illustrating the syntax of the palette mode according to an embodiment.
[0039] Fig. 20 is a view illustrating a formula for determining PredictorPaletteEntries and CurrentPaletteEntries according to an embodiment.
[0040] Fig.21 is a view illustrating an application method of a deblocking filter according to an embodiment.
[0041] Fig. 22 is a view illustrating a reconstructed sample for applying filtering according to an embodiment.
[0042] Fig.23 is an example of the quantization parameter Q, the parameter β′ and the parameter t according to the embodiment. C 'A table of mapping relationships between .
[0043] Figure 24 to Figure 25 is a view illustrating a method of determining a boundary characteristic of a luminance block according to an embodiment.
[0044] Fig.26 is a flowchart illustrating a method in which an encoding device and a decoding device perform deblocking filtering according to an embodiment.
[0045] Fig. 27 is a diagram showing a content streaming system to which an embodiment of the present disclosure is applicable. DETAILED DESCRIPTION
[0046] Hereinafter, the embodiments of the present disclosure will be described in detail with reference to the accompanying drawings to facilitate implementation by those skilled in the art. However, the present disclosure can be implemented in various forms and is not limited to the embodiments described herein.
[0047] When describing the present disclosure, if it is determined that the detailed description of related known functions or configurations makes the scope of the present disclosure unnecessarily ambiguous, the detailed description thereof will be omitted. In the drawings, parts irrelevant to the description of the present disclosure are omitted, and like reference numerals are given to like parts.
[0048] In the present disclosure, when a component is "connected", "coupled" or "linked" to another component, it may include not only a direct connection relationship but also an indirect connection relationship with intermediate components. In addition, when a component "includes" or "has" other components, unless otherwise specified, it means that other components may also be included, rather than excluding other components.
[0049] In the present disclosure, the terms first, second, etc. are used only for the purpose of distinguishing one component from other components, and do not limit the order or importance of the components unless otherwise specified. Accordingly, within the scope of the present disclosure, a first component in one embodiment may be referred to as a second component in another embodiment, and similarly, a second component in one embodiment may be referred to as a first component in another embodiment.
[0050] In the present disclosure, components that are distinguished from each other are intended to clearly describe each feature and do not mean that the components must be separated. That is, multiple components can be integrated and implemented in one hardware or software unit, or one component can be distributed and implemented in multiple hardware or software units. Therefore, even if not specifically stated, implementations in which these components are integrated or distributed are also included in the scope of the present disclosure.
[0051] In the present disclosure, the components described in each embodiment are not necessarily indispensable components, and some components may be optional components. Therefore, the embodiments consisting of a subset of the components described in the embodiments are also included in the scope of the present disclosure. In addition, the embodiments including other components in addition to the components described in the various embodiments are included in the scope of the present disclosure.
[0052] The present disclosure relates to encoding and decoding of images. Unless otherwise defined in the present disclosure, terms used in the present disclosure may have general meanings commonly used in the technical field to which the present disclosure belongs.
[0053] In the present disclosure, a "picture" generally refers to a unit representing an image within a specific time period, and a slice / tile is a coding unit constituting a part of a picture, and a picture may be composed of one or more slices / tiles. In addition, a slice / tile may include one or more coding tree units (CTUs).
[0054] In the present disclosure, "pixel" or "pel" may refer to the smallest unit constituting a picture (or image). In addition, "sample" may be used as a term corresponding to a pixel. A sample may generally represent a pixel or a pixel value, or may represent only a pixel / pixel value of a luminance component or only a pixel / pixel value of a chrominance component.
[0055] In the present disclosure, a "unit" may refer to a basic unit of image processing. The unit may include at least one of a specific area of a picture and information related to the area. In some cases, the unit may be used interchangeably with terms such as "sample array", "block" or "area". In general, an M×N block may include M columns and N rows of samples (or sample arrays) or a set (or array) of transform coefficients.
[0056] In the present disclosure, "current block" may mean one of "current coding block", "current coding unit", "coding target block", "decoding target block" or "processing target block". When prediction is performed, "current block" may mean "current prediction block" or "prediction target block". When transform (inverse transform) / quantization (dequantization) is performed, "current block" may mean "current transform block" or "transform target block". When filtering is performed, "current block" may mean "filtering target block".
[0057] Furthermore, in the present disclosure, unless explicitly stated as a chroma block, “current block” may mean “luminance block of the current block.” “Chroma block of the current block” may be expressed by including an explicit description of a chroma block such as “chroma block” or “current chroma block.”
[0058] In the present disclosure, the term " / " or "," may be interpreted as indicating "and / or". For example, "A / B" and "A, B" may mean "A and / or B". In addition, "A / B / C" and "A / B / C" may mean "at least one of A, B, and / or C".
[0059] In the present disclosure, the term "or" should be interpreted to indicate "and / or". For example, the expression "A or B" may include 1) only "A", 2) only "B", or 3) both "A and B". In other words, in the present disclosure, "or" should be interpreted to indicate "additionally or alternatively".
[0060] Overview of Video Coding Systems
[0061] Figure 1 is a diagram schematically illustrating a video encoding system according to the present disclosure.
[0062] The video encoding system according to the embodiment may include an encoding device 10 and a decoding device 20. The encoding device 10 may deliver the encoded video and / or image information or data to the decoding device 20 via a digital storage medium or a network in the form of a file or a stream.
[0063] The encoding device 10 according to the embodiment may include a video source generator 11, an encoding unit 12, and a transmitter 13. The decoding device 20 according to the embodiment may include a receiver 21, a decoding unit 22, and a renderer 23. The encoding unit 12 may be called a video / image encoding unit, and the decoding unit 22 may be called a video / image decoding unit. The transmitter 13 may be included in the encoding unit 12. The receiver 21 may be included in the decoding unit 22. The renderer 23 may include a display and the display may be configured as a separate device or an external component.
[0064] The video source generator 11 can obtain the video / image by the process of capturing, synthesizing or generating the video / image. The video source generator 11 may include a video / image capturing device and / or a video / image generating device. The video / image capturing device may include, for example, one or more cameras, a video / image archive including previously captured videos / images, etc. The video / image generating device may include, for example, a computer, a tablet computer, and a smart phone, and may generate the video / image (electronically). For example, a virtual video / image may be generated by a computer, etc. In this case, the video / image capturing process may be replaced by a process of generating relevant data.
[0065] The encoding unit 12 may encode the input video / image. For compression and encoding efficiency, the encoding unit 12 may perform a series of processes such as prediction, transformation, and quantization. The encoding unit 12 may output encoded data (encoded video / image information) in the form of a bitstream.
[0066] The transmitter 13 transmits the encoded video / image information or data output in the form of a bit stream to the receiver 21 of the decoding device 20 in the form of a file or stream through a digital storage medium or a network. The digital storage medium may include various storage media, such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitter 13 may include an element for generating a media file in a predetermined file format and may include an element for transmission through a broadcast / communication network. The receiver 21 may extract / receive a bit stream from a storage medium or a network and transmit the bit stream to the decoding unit 22.
[0067] The decoding unit 22 may decode a video / image by performing a series of processes corresponding to the operations of the encoding unit 12, such as dequantization, inverse transformation, and prediction.
[0068] The renderer 23 may render the decoded video / image. The rendered video / image may be displayed through a display.
[0069] Overview of Image Coding Equipment
[0070] Figure 2is a view schematically showing an image encoding device to which an embodiment of the present disclosure is applicable.
[0071] like Figure 2 As shown, the image encoding device 100 may include an image segmenter 110, a subtractor 115, a transformer 120, a quantizer 130, a dequantizer 140, an inverse transformer 150, an adder 155, a filter 160, a memory 170, an inter-frame prediction unit 180, an intra-frame prediction unit 185, and an entropy encoder 190. The inter-frame prediction unit 180 and the intra-frame prediction unit 185 may be collectively referred to as a "prediction unit". The transformer 120, the quantizer 130, the dequantizer 140, and the inverse transformer 150 may be included in a residual processor. The residual processor may also include a subtractor 115.
[0072] In some embodiments, all or at least some of the components configuring the image encoding apparatus 100 may be configured by one hardware component (eg, an encoder or a processor). In addition, the memory 170 may include a decoded picture buffer (DPB) and may be configured by a digital storage medium.
[0073] The image segmenter 110 may segment the input image (or picture or frame) input to the image encoding device 100 into one or more processing units. For example, the processing unit may be referred to as a coding unit (CU). The coding unit may be obtained by recursively segmenting a coding tree unit (CTU) or a maximum coding unit (LCU) according to a quadtree binary tree ternary tree (QT / BT / TT) structure. For example, a coding unit may be segmented into a plurality of coding units of a deeper depth based on a quadtree structure, a binary tree structure, and / or a ternary tree structure. For the segmentation of the coding unit, the quadtree structure may be applied first, and then the binary tree structure and / or the ternary tree structure may be applied. The encoding process according to the present disclosure may be performed based on the final coding unit that is no longer segmented. The maximum coding unit may be used as the final coding unit, and the coding unit of a deeper depth obtained by segmenting the maximum coding unit may also be used as the final coding unit. Here, the encoding process may include the prediction, transformation, and reconstruction processes described later. As another example, the processing unit of the encoding process may be a prediction unit (PU) or a transformation unit (TU). The prediction unit and the transform unit may be divided or partitioned from the final coding unit. The prediction unit may be a sample prediction unit, and the transform unit may be a unit for deriving a transform coefficient and / or a unit for deriving a residual signal from the transform coefficient.
[0074] The prediction unit (inter prediction unit 180 or intra prediction unit 185) may perform prediction on the block to be processed (current block) and generate a prediction block including prediction samples of the current block. The prediction unit may determine whether to apply intra prediction or inter prediction based on the current block or CU. The prediction unit may generate various information related to the prediction of the current block and transmit the generated information to the entropy encoder 190. The information about the prediction may be encoded in the entropy encoder 190 and output in the form of a bitstream.
[0075] The intra prediction unit 185 can predict the current block by referring to the samples in the current picture. Depending on the intra prediction mode and / or the intra prediction technology, the reference samples can be located in the neighbors of the current block or can be placed separately. The intra prediction mode may include multiple non-directional modes and multiple directional modes. The non-directional mode may include, for example, a DC mode and a plane mode. Depending on the level of detail of the prediction direction, the directional mode may include, for example, 33 directional prediction modes or 65 directional prediction modes. However, this is only an example, and more or fewer directional prediction modes may be used according to the settings. The intra prediction unit 185 may determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring blocks.
[0076] The inter prediction unit 180 may derive a prediction block of the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. In this case, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may also include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter prediction, the neighboring blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different. The temporal neighboring block may be referred to as a collocated reference block, a collocated CU (colCU), etc. The reference picture including the temporal neighboring block may be referred to as a collocated picture (colPic). For example, the inter prediction unit 180 may configure a motion information candidate list based on the neighboring blocks and generate information specifying which candidate is used to derive the motion vector and / or reference picture index of the current block. Inter prediction may be performed based on various prediction modes. For example, in the case of skip mode and merge mode, the inter prediction unit 180 may use the motion information of the neighboring block as the motion information of the current block. In the case of skip mode, unlike the merge mode, the residual signal may not be transmitted. In the case of motion vector prediction (MVP) mode, the motion vector of the neighboring block may be used as a motion vector predictor, and the motion vector of the current block may be signaled by encoding the motion vector difference and an indicator of the motion vector predictor. The motion vector difference may mean the difference between the motion vector of the current block and the motion vector predictor.
[0077] The prediction unit may generate a prediction signal based on various prediction methods and prediction techniques described below. For example, the prediction unit may not only apply intra prediction or inter prediction, but may also apply intra prediction and inter prediction simultaneously to predict the current block. The prediction method of applying both intra prediction and inter prediction simultaneously to predict the current block may be referred to as combined inter and intra prediction (CIIP). In addition, the prediction unit may perform intra block copying (IBC) to predict the current block. Intra block copying may be used for content image / video encoding of games, etc., such as screen content coding (SCC). IBC is a method of predicting the current picture using a previously reconstructed reference block in the current picture at a position separated by a predetermined distance from the current block. When IBC is applied, the position of the reference block in the current picture may be encoded as a vector (block vector) corresponding to a predetermined distance. IBC basically performs prediction in the current picture, but may be performed similarly to inter prediction because the reference block is derived within the current picture. That is, IBC may use at least one of the inter prediction techniques described in the present disclosure.
[0078] The prediction signal generated by the prediction unit can be used to generate a reconstruction signal or to generate a residual signal. The subtractor 115 can generate a residual signal (residual block or residual sample array) by subtracting the prediction signal (prediction block or prediction sample array) output from the prediction unit from the input image signal (original block or original sample array). The generated residual signal can be transmitted to the transformer 120.
[0079] The transformer 120 may generate transform coefficients by applying a transform technique to the residual signal. For example, the transform technique may include at least one of a discrete cosine transform (DCT), a discrete sine transform (DST), a karhunen-loève transform (KLT), a graph-based transform (GBT), or a conditional nonlinear transform (CNT). Here, GBT refers to a transform obtained from a graph when relationship information between pixels is represented by a graph. CNT refers to a transform obtained based on a prediction signal generated using all previously reconstructed pixels. In addition, the transform process may be applied to square pixel blocks of the same size or may be applied to blocks of variable size rather than square.
[0080] The quantizer 130 may quantize the transform coefficients and transmit them to the entropy encoder 190. The entropy encoder 190 may encode the quantized signal (information about the quantized transform coefficients) and output a bitstream. The information about the quantized transform coefficients may be referred to as residual information. The quantizer 130 may rearrange the quantized transform coefficients in the block form into a one-dimensional vector form based on the coefficient scanning order, and generate information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form.
[0081] The entropy encoder 190 may perform various encoding methods, such as exponential Golomb, context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), etc. The entropy encoder 190 may encode information required for video / image reconstruction other than quantized transform coefficients together or separately (e.g., values of syntax elements, etc.). The encoded information (e.g., encoded video / image information) may be transmitted or stored in units of a network abstraction layer (NAL) in the form of a bitstream. The video / image information may also include information about various parameter sets, such as an adaptive parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may also include general constraint information. The signaled information, transmitted information, and / or syntax elements described in the present disclosure may be encoded and included in a bitstream through the above-described encoding process.
[0082] The bitstream may be transmitted over a network or may be stored in a digital storage medium. The network may include a broadcast network and / or a communication network, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitter (not shown) for transmitting a signal output from the entropy encoder 190 and / or a storage unit (not shown) for storing the signal may be included as an internal / external element of the image encoding device 100. Alternatively, a transmitter may be provided as a component of the entropy encoder 190.
[0083] The quantized transform coefficients output from the quantizer 130 may be used to generate a residual signal. For example, the residual signal (residual block or residual sample) may be reconstructed by applying dequantization and inverse transformation to the quantized transform coefficients through the dequantizer 140 and the inverse transformer 150.
[0084] The adder 155 adds the reconstructed residual signal to the prediction signal output from the inter-frame prediction unit 180 or the intra-frame prediction unit 185 to generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array). If the block to be processed has no residual, such as when the skip mode is applied, the prediction block can be used as a reconstructed block. The adder 155 can be called a reconstructor or a reconstructed block generator. The generated reconstructed signal can be used for intra-frame prediction of the next block to be processed in the current picture, and can be used for inter-frame prediction of the next picture by filtering as described below.
[0085] The filter 160 can improve the subjective / objective image quality by applying filtering to the reconstructed signal. For example, the filter 160 can generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture, and store the modified reconstructed picture in the memory 170, specifically, in the DPB of the memory 170. Various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filtering, bilateral filtering, etc. The filter 160 can generate various information related to filtering and transmit the generated information to the entropy encoder 190, as described later in the description of each filtering method. The information related to filtering can be encoded by the entropy encoder 190 and output in the form of a bit stream.
[0086] The modified reconstructed picture transferred to the memory 170 may be used as a reference picture in the inter prediction unit 180. When inter prediction is applied by the image encoding apparatus 100, prediction mismatch between the image encoding apparatus 100 and the image decoding apparatus may be avoided and encoding efficiency may be improved.
[0087] The DPB of the memory 170 may store the modified reconstructed picture for use as a reference picture in the inter-frame prediction unit 180. The memory 170 may store the motion information of the block from which the motion information in the current picture is derived (or encoded) and / or the motion information of the reconstructed block in the picture. The stored motion information may be transmitted to the inter-frame prediction unit 180 and used as the motion information of the spatial neighboring block or the motion information of the temporal neighboring block. The memory 170 may store the reconstructed samples of the reconstructed blocks in the current picture and may transmit the reconstructed samples to the intra-frame prediction unit 185.
[0088] Overview of Image Decoding Equipment
[0089] Figure 3 is a view schematically showing an image decoding device to which an embodiment of the present disclosure is applicable.
[0090] like Figure 3 As shown, the image decoding device 200 may include an entropy decoder 210, a dequantizer 220, an inverse transformer 230, an adder 235, a filter 240, a memory 250, an inter-frame prediction unit 260, and an intra-frame prediction unit 265. The inter-frame prediction unit 260 and the intra-frame prediction unit 265 may be collectively referred to as a "prediction unit". The dequantizer 220 and the inverse transformer 230 may be included in a residual processor.
[0091] According to an embodiment, all or at least some of the plurality of components configuring the image decoding apparatus 200 may be configured by hardware components (eg, a decoder or a processor). In addition, the memory 250 may include a decoded picture buffer (DPB) or may be configured by a digital storage medium.
[0092] The image decoding device 200 having received a bit stream including video / image information may perform the same Figure 2 The image encoding device 100 may reconstruct the image by processing corresponding to the processing performed by the image encoding device 100. For example, the image decoding device 200 may perform decoding using a processing unit applied in the image encoding device. Therefore, the processing unit of decoding may be, for example, a coding unit. The coding unit may be obtained by partitioning the coding tree unit or the maximum coding unit. The reconstructed image signal decoded and output by the image decoding device 200 may be reproduced by a reproduction device (not shown).
[0093] The image decoding device 200 may receive the image in the form of a bit stream from Figure 2The received signal may be decoded by the entropy decoder 210. For example, the entropy decoder 210 may parse the bitstream to derive information (e.g., video / image information) required for image reconstruction (or picture reconstruction). The video / image information may also include information about various parameter sets, such as an adaptive parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may also include general constraint information. The image decoding device may also decode the picture based on the information about the parameter set and / or the general constraint information. The information and / or syntax elements signaled / received described in the present disclosure may be decoded and obtained from the bitstream through a decoding process. For example, the entropy decoder 210 may decode the information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output the values of the syntax elements required for image reconstruction and the quantized values of the transform coefficients of the residual. More specifically, the CABAC entropy decoding method can receive a bin corresponding to each syntax element in the bitstream, use the decoding target syntax element information, the decoding information of the neighboring block and the decoding target block, or the information of the symbol / bin decoded in the previous stage to determine the context model, perform arithmetic decoding on the bin by predicting the probability of occurrence of the bin according to the determined context model, and generate a symbol corresponding to the value of each syntax element. In this case, the CABAC entropy decoding method can update the context model by using the information of the decoded symbol / bin for the context model of the next symbol / bin after determining the context model. The information related to the prediction in the information decoded by the entropy decoder 210 can be provided to the prediction unit (inter-frame prediction unit 260 and intra-frame prediction unit 265), and the residual value of the entropy decoding performed on it in the entropy decoder 210, that is, the quantized transform coefficient and the related parameter information can be input to the dequantizer 220. In addition, the information about filtering in the information decoded by the entropy decoder 210 can be provided to the filter 240. In addition, a receiver (not shown) for receiving a signal output from the image encoding apparatus may be further configured as an internal / external element of the image decoding apparatus 200 , or the receiver may be a component of the entropy decoder 210 .
[0094] In addition, the image decoding device according to the present disclosure may be referred to as a video / image / picture decoding device. The image decoding device may be divided into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder may include an entropy decoder 210. The sample decoder may include a dequantizer 220, an inverse transformer 230, an adder 235, a filter 240, a memory 250, an inter-frame prediction unit 260, or at least one of an intra-frame prediction unit 265.
[0095] The dequantizer 220 may dequantize the quantized transform coefficients and output the transform coefficients. The dequantizer 220 may rearrange the quantized transform coefficients in the form of two-dimensional blocks. In this case, the rearrangement may be performed based on the coefficient scanning order performed in the image encoding device. The dequantizer 220 may dequantize the quantized transform coefficients by using a quantization parameter (e.g., quantization step size information) and obtain the transform coefficients.
[0096] The inverse transformer 230 may inversely transform the transform coefficients to obtain a residual signal (residual block, residual sample array).
[0097] The prediction unit may perform prediction on the current block and generate a prediction block including prediction samples of the current block. The prediction unit may determine whether to apply intra prediction or inter prediction to the current block based on the information about prediction output from the entropy decoder 210, and may determine a specific intra / inter prediction mode (prediction technique).
[0098] The same as described in the prediction unit of the image encoding device 100 , the prediction unit can generate a prediction signal based on various prediction methods (techniques) described later.
[0099] The intra prediction unit 265 may predict the current block by referring to samples in the current picture. The description of the intra prediction unit 185 is also applicable to the intra prediction unit 265.
[0100] The inter-frame prediction unit 260 can derive the prediction block of the current block based on the reference block (reference sample array) specified by the motion vector on the reference picture. In this case, in order to reduce the amount of motion information transmitted in the inter-frame prediction mode, the motion information can be predicted in units of blocks, sub-blocks or samples based on the correlation of the motion information between the neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may also include inter-frame prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter-frame prediction, the neighboring blocks may include spatial neighboring blocks existing in the current picture and temporal neighboring blocks existing in the reference picture. For example, the inter-frame prediction unit 260 may configure a motion information candidate list based on the neighboring blocks, and derive the motion vector and / or reference picture index of the current block based on the received candidate selection information. Inter-frame prediction can be performed based on various prediction modes, and the information about the prediction may include information specifying the inter-frame prediction mode of the current block.
[0101] The adder 235 can generate a reconstruction signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the obtained residual signal to the prediction signal (prediction block, prediction sample array) output from the prediction unit (including the inter-frame prediction unit 260 and / or the intra-prediction unit 265). If the block to be processed has no residual, for example, when the skip mode is applied, the prediction block can be used as the reconstructed block. The description of the adder 155 also applies to the adder 235. The adder 235 can be called a reconstructor or a reconstructed block generator. The generated reconstruction signal can be used for intra-frame prediction of the next block to be processed in the current picture, and can be used for inter-frame prediction of the next picture by filtering as described below.
[0102] The filter 240 can improve the subjective / objective image quality by applying filtering to the reconstructed signal. For example, the filter 240 can generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture, and store the modified reconstructed picture in the memory 250, specifically, in the DPB of the memory 250. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filtering, bilateral filtering, etc.
[0103] The (modified) reconstructed picture stored in the DPB of the memory 250 may be used as a reference picture in the inter-frame prediction unit 260. The memory 250 may store the motion information of the block from which the motion information in the current picture is derived (or decoded) and / or the motion information of the reconstructed block in the picture. The stored motion information may be transmitted to the inter-frame prediction unit 260 to be used as the motion information of the spatial neighboring block or the motion information of the temporal neighboring block. The memory 250 may store the reconstructed samples of the reconstructed block in the current picture and transmit the reconstructed samples to the intra-frame prediction unit 265.
[0104] In the present disclosure, the implementations described in the filter 160, the inter-frame prediction unit 180 and the intra-frame prediction unit 185 of the image encoding device 100 can be equally or correspondingly applied to the filter 240, the inter-frame prediction unit 260 and the intra-frame prediction unit 265 of the image decoding device 200.
[0105] Overview of Image Segmentation
[0106] The video / image encoding method according to the present disclosure can be performed based on the image segmentation structure as follows. Specifically, the prediction, residual processing ((inverse) transform, (de)quantization, etc.), syntax element encoding and filtering processes described later can be performed based on the CTU, CU (and / or TU, PU) derived from the image segmentation structure. The image can be segmented in block units and the block segmentation process can be performed in the image segmentor 110 of the encoding device. The segmentation related information can be encoded by the entropy encoder 190 and sent to the decoding device in the form of a bitstream. The entropy decoder 210 of the decoding device can derive the block segmentation structure of the current picture based on the segmentation related information obtained from the bitstream, and based on this, a series of processes (e.g., prediction, residual processing, block / picture reconstruction, in-loop filtering, etc.) can be performed to perform image decoding.
[0107] A picture may be partitioned into a sequence of coding tree units (CTUs). Figure 4 An example of a picture being partitioned into CTUs is shown. A CTU may correspond to a coding tree block (CTB). Alternatively, a CTU may include a coding tree block of luma samples and two corresponding coding tree blocks of chroma samples. For example, for a picture containing three sample arrays, a CTU may include one N×N block of luma samples and two corresponding blocks of chroma samples.
[0108] Overview of CTU Segmentation
[0109] As described above, a coding unit may be obtained by recursively partitioning a coding tree unit (CTU) or a maximum coding unit (LCU) according to a quadtree / binary tree / ternary tree (QT / BT / TT) structure. For example, a CTU may be first partitioned into a quadtree structure. Thereafter, the leaf nodes of the quadtree structure may be further partitioned by a multi-type tree structure.
[0110] Partitioning according to the quadtree means that the current CU (or CTU) is equally divided into four. By partitioning according to the quadtree, the current CU can be partitioned into four CUs with the same width and the same height. When the current CU is no longer partitioned into a quadtree structure, the current CU corresponds to a leaf node of the quadtree structure. The CU corresponding to the leaf node of the quadtree structure may no longer be partitioned and may be used as the above-mentioned final coding unit. Alternatively, the CU corresponding to the leaf node of the quadtree structure may be further partitioned by a multi-type tree structure.
[0111] Figure 5 is a view showing an embodiment of a partition type of a block according to a multi-type tree structure. The partition according to the multi-type tree structure may include two types of partitions according to a binary tree structure and two types of partitions according to a ternary tree structure.
[0112] The two types of splits according to the binary tree structure may include vertical binary split (SPLIT_BT_VER) and horizontal binary split (SPLIT_BT_HOR). Vertical binary split (SPLIT_BT_VER) means that the current CU is equally split into two in the vertical direction. Figure 4 As shown in FIG, through vertical binary splitting, two CUs with the same height as the current CU and half the width of the current CU can be generated. Horizontal binary splitting (SPLIT_BT_HOR) means that the current CU is equally divided into two in the horizontal direction. Figure 5 As shown, through horizontal binary partitioning, two CUs with a height half of the height of the current CU and the same width as the current CU can be generated.
[0113] The two types of splits according to the triad structure may include vertical triad split (SPLIT_TT_VER) and horizontal triad split (SPLIT_TT_HOR). In vertical triad split (SPLIT_TT_VER), the current CU is split in a vertical direction at a ratio of 1:2:1. Figure 5 As shown, through vertical trisection, two CUs with the same height as the current CU and a width of 1 / 4 of the current CU width and one CU with the same height as the current CU and a width of half the current CU width can be generated. In horizontal trisection (SPLIT_TT_HOR), the current CU is split in the horizontal direction at a ratio of 1:2:1. Figure 5 As shown, through horizontal trifurcated division, two CUs whose height is 1 / 4 of the height of the current CU and whose width is the same as the current CU and one CU whose height is half of the height of the current CU and whose width is the same as the current CU can be generated.
[0114] Figure 6 is a diagram illustrating a signaling mechanism of block partitioning information in a quadtree having a nested multi-type tree structure according to the present disclosure.
[0115] Here, the CTU is regarded as the root node of the quadtree and is first split into a quadtree structure. Information (e.g., qt_split_flag) is used to signal whether to perform quadtree partitioning on the current CU (CTU or node (QT_node) of the quadtree). For example, when qt_split_flag has a first value (e.g., "1"), the current CU can be split by the quadtree. In addition, when qt_split_flag has a second value (e.g., "0"), the current CU is not split by the quadtree, but becomes a leaf node (QT_leaf_node) of the quadtree. Each quadtree leaf node can then be further split into a multi-type tree structure. That is, the leaf node of the quadtree can become a node (MTT_node) of a multi-type tree. In the multi-type tree structure, a first flag (e.g., Mtt_split_cu_flag) is signaled to specify whether the current node is additionally split. If the corresponding node is additionally split (for example, if the first flag is 1), the second flag (for example, Mtt_split_cu_vertical_flag) may be signaled to specify the split direction. For example, the split direction may be a vertical direction when the second flag is 1, and a horizontal direction when the second flag is 0. Then, a third flag (for example, Mtt_split_cu_binary_flag) may be signaled to specify whether the split type is a binary split type or a ternary split type. For example, the split type may be a binary split type when the third flag is 1, and a ternary split type when the third flag is 0. The nodes of the multi-type tree obtained by binary splitting or ternary splitting may be further split into a multi-type tree structure. However, the nodes of the multi-type tree may not be split into a quadtree structure. If the first flag is 0, the corresponding node of the multi-type tree is no longer split, but becomes a leaf node (MTT_leaf_node) of the multi-type tree. The CU corresponding to the leaf node of the multi-type tree may be used as the above-mentioned final coding unit.
[0116] Based on mtt_split_cu_vertical_flag and mtt_split_cu_binary_flag, a multi-type tree partitioning mode (MttSplitMode) of a CU may be derived as shown in the following Table 1. In the following description, a multi-type tree partitioning mode may be referred to as a multi-tree partitioning type or a partitioning type.
[0117] [Table 1]
[0118] MttSplitMode mtt_split_cu_vertical_flag mtt_split_cu_binary_flag SPLIT_TT_HOR 0 0 SPLIT_BT_HOR 0 1 SPLIT_TT_VER 1 0 SPLIT_BT_VER 1 1
[0119] Figure 7 is a view showing an example of splitting a CTU into a plurality of CUs by applying a multi-type tree after applying a quadtree. Figure 7, the bold block edge 710 represents quadtree partitioning, and the remaining edge 720 represents multi-type tree partitioning. The CU may correspond to a coding block (CB). In an embodiment, the CU may include one coding block of luma samples and two coding blocks of chroma samples corresponding to the luma samples. The chroma component (sample) CB or TB size may be derived based on the luma component (sample) CB or TB size based on the component ratio according to the color format (chroma format, e.g., 4:4:4, 4:2:2, 4:2:0, etc.) of the picture / image. In the case of a 4:4:4 color format, the chroma component CB / TB size may be set equal to the luma component CB / TB size. In the case of a 4:2:2 color format, the width of the chroma component CB / TB may be set to half the width of the luma component CB / TB and the height of the chroma component CB / TB may be set to the height of the luma component CB / TB. In the case of a 4:2:0 color format, the width of the chroma component CB / TB may be set to half the width of the luma component CB / TB and the height of the chroma component CB / TB may be set to half the height of the luma component CB / TB.
[0120] In an embodiment, when the size of the CTU is 128 based on the luma sample unit, the size of the CU may have a size from 128×128 to 4×4, which is the same size as the CTU. In an embodiment, in the case of a 4:2:0 color format (or chroma format), the chroma CB size may have a size from 64×64 to 2×2.
[0121] Furthermore, in an embodiment, the CU size and the TU size may be the same. Alternatively, there may be multiple TUs in a CU region. The TU size generally indicates the luma component (sample) transform block (TB) size.
[0122] The TU size can be derived based on the maximum allowed TB size maxTbSize as a predetermined value. For example, when the CU size is larger than maxTbSize, multiple TUs (TBs) with maxTbSize can be derived from the CU, and transform / inverse transform can be performed in units of TU (TB). For example, the maximum allowed luma TB size may be 64×64 and the maximum allowed chroma TB size may be 32×32. If the width or height of the CB split according to the tree structure is larger than the maximum transform width or height, the CB may be automatically (or implicitly) split until the TB size limits in the horizontal and vertical directions are met.
[0123] In addition, for example, when intra prediction is applied, the intra prediction mode / type may be derived in units of CU (or CB), and the neighboring reference sample derivation and prediction sample generation process may be performed in units of TU (or TB). In this case, there may be one or more TUs (or TBs) in a CU (or CB) region, and in this case, multiple TUs or (TBs) may share the same intra prediction mode / type.
[0124] In addition, for a quadtree coding tree scheme with nested multi-type trees, the following parameters may be signaled from an encoding device to a decoding device as SPS syntax elements. For example, at least one of a CTU size as a parameter representing the root node size of a quadtree, a MinQTSize as a parameter representing the minimum allowed quadtree leaf node size, a MaxBtSize as a parameter representing the maximum allowed binary tree root node size, a MaxTtSize as a parameter representing the maximum allowed ternary tree root node size, a MaxMttDepth as a parameter representing the maximum allowed hierarchical depth of multi-type tree partitioning from a quadtree leaf node, a MinBtSize as a parameter representing the minimum allowed binary tree leaf node size, or a MinTtSize as a parameter representing the minimum allowed ternary tree leaf node size may be signaled.
[0125] As an embodiment using a 4:2:0 chroma format, the CTU size may be set to 128×128 luminance blocks and two 64×64 chrominance blocks corresponding to these luminance blocks. In this case, MinOTSize may be set to 16×16, MaxBtSize may be set to 128×128, MaxTtSzie may be set to 64×64, MinBtSize and MinTtSize may be set to 4×4, and MaxMttDepth may be set to 4. Quadtree partitioning may be applied to the CTU to generate a quadtree leaf node. The quadtree leaf node may be referred to as a leaf QT node. The size of the quadtree leaf node may be from 16×16 size (e.g., MinOTSize) to 128×128 size (e.g., CTU size). If the leaf QT node is 128×128, it may not be additionally partitioned into a binary tree / ternary tree. This is because, in this case, even if it is partitioned, it exceeds MaxBtsize and MaxTtszie (e.g., 64×64). In other cases, the leaf QT node can be further split into a multi-type tree. Therefore, the leaf QT node is the root node of the multi-type tree, and the leaf QT node can have a multi-type tree depth (mttDepth) value of 0. If the multi-type tree depth reaches MaxMttdepth (for example, 4), further splitting can be ignored. If the width of the multi-type tree node is equal to MinBtSize and is less than or equal to 2xMinTtSize, further horizontal splitting can be ignored. If the height of the multi-type tree node is equal to MinBtSize and is less than or equal to 2xMinTtSize, further vertical splitting can be ignored. When splitting is not considered, the encoding device can skip the signaling of the splitting information. In this case, the decoding device can derive splitting information with a predetermined value.
[0126] In addition, one CTU may include a coding block of luma samples (hereinafter referred to as "luminance block") and two coding blocks of chroma samples corresponding thereto (hereinafter referred to as "chroma blocks"). The above coding tree scheme may be applied equally or individually to the luma block and chroma block of the current CU. Specifically, the luma block and chroma block in one CTU may be partitioned into the same block tree structure, and in this case, the tree structure is represented as SINGLE_TREE. Alternatively, the luma block and chroma block in one CTU may be partitioned into separate block tree structures, and in this case, the tree structure may be represented as DUAL_TREE. That is, when the CTU is partitioned into dual trees, the block tree structure for the luma block and the block tree structure for the chroma block may exist separately. In this case, the block tree structure for the luma block may be referred to as DUAL_TREE_LUMA, and the block tree structure for the chroma component may be referred to as DUAL_TREE_CHROMA. For P and B slices / block groups, the luma block and the chroma block in one CTU may be restricted to have the same coding tree structure. However, for I slices / patch groups, luma blocks and chroma blocks may have separate block tree structures from each other. If a separate block tree structure is applied, luma CTBs may be partitioned into CUs based on a specific coding tree structure, and chroma CTBs may be partitioned into chroma CUs based on another coding tree structure. That is, this means that a CU in an I slice / patch group to which a separate block tree structure is applied may include a coding block of a luma component or a coding block of two chroma components, and a CU of a P or B slice / patch group may include blocks of three color components (one luma component and two chroma components).
[0127] Although a quadtree coding tree structure with nested multi-type trees has been described, the structure for partitioning the CU is not limited thereto. For example, the BT structure and the TT structure may be interpreted as concepts included in a multi-partition tree (MPT) structure, and the CU may be interpreted as being partitioned by the QT structure and the MPT structure. In an example where the CU is partitioned by the QT structure and the MPT structure, a syntax element (e.g., MPT_split_type) including information about how many blocks a leaf node of the QT structure is partitioned into and a syntax element (e.g., MPT_split_mode) including information about which of the vertical and horizontal directions a leaf node of the QT structure is partitioned into may be signaled to determine the partition structure.
[0128] In another example, the CU may be partitioned in a manner different from the QT structure, the BT structure, or the TT structure. That is, unlike partitioning a CU of a lower depth into 1 / 4 of a CU of a higher depth according to the QT structure, partitioning a CU of a lower depth into 1 / 2 of a CU of a higher depth according to the BT structure, or partitioning a CU of a lower depth into 1 / 4 or 1 / 2 of a CU of a higher depth according to the TT structure, in some cases a CU of a lower depth may be partitioned into 1 / 5, 1 / 3, 3 / 8, 3 / 5, 2 / 3, or 5 / 8 of a CU of a higher depth, and the method of partitioning a CU is not limited thereto.
[0129] The quadtree coding block structure with multi-type trees can provide a very flexible block segmentation structure. Due to the segmentation types supported in the multi-type tree, different segmentation patterns can potentially produce the same coding block structure in some cases. In the encoding device and the decoding device, the amount of data of the segmentation information can be reduced by limiting the occurrence of such redundant segmentation patterns.
[0130] For example, Figure 8 The redundant partitioning patterns that may appear in binary tree partitioning and ternary tree partitioning are shown. Figure 8 As shown, the continuous binary partitions 810 and 820 for one direction of the two-step level have the same coding block structure as the binary partition for the center partition after the ternary partition. In this case, the binary tree partition for the center blocks 830 and 840 of the ternary tree partition can be prohibited. This prohibition applies to CUs of all pictures. When this particular partition is prohibited, the signaling of the corresponding syntax element can be modified by reflecting this prohibition, thereby reducing the number of bits for signaling the partition. For example, as Figure 8 As shown in the example shown in , when binary tree partitioning for the center block of a CU is prohibited, the syntax element mtt_split_cu_binary_flag specifying whether the partition is binary partitioning or ternary partitioning is not signaled and its value can be derived as 0 by the decoding device.
[0131] Overview of Chroma Formats
[0132] Hereinafter, the chroma format will be described. An image may be encoded as encoded data including a luminance component (e.g., Y) array and two chroma component (e.g., Cb and Cr) arrays. For example, one pixel of an encoded image may include a luminance sample and a chroma sample. A chroma format may be used to represent a configuration format of luminance samples and chroma samples, and a chroma format may be referred to as a color format.
[0133] In an embodiment, an image may be encoded in various chroma formats such as monochrome, 4:2:0, 4:2:2, or 4:4:4. In monochrome sampling, there may be one sample array and the sample array may be a luma array. In 4:2:0 sampling, there may be one luma sample array and two chroma sample arrays, each of which may have a height equal to half of the luma array and a width equal to half of the luma array. In 4:2:2 sampling, there may be one luma sample array and two chroma sample arrays, each of which may have a height equal to half of the luma array and a width equal to half of the luma array. In 4:4:4 sampling, there may be one luma sample array and two chroma sample arrays, and each of which may have a height and width equal to the luma array.
[0134] For example, in 4:2:0 sampling, a chroma sample may be located below its corresponding luma sample. In 4:2:2 sampling, a chroma sample may be positioned to overlap with its corresponding luma sample. In 4:4:4 sampling, both luma and chroma samples may be located in overlapping positions.
[0135] The chroma format used in the encoding device and the decoding device may be predetermined. Alternatively, the chroma format may be signaled from the encoding device to the decoding device to be adaptively used in the encoding device and the decoding device. In an embodiment, the chroma format may be signaled based on at least one of chroma_format_idc or separate_colour_plane_flag. At least one of chroma_format_idc or separate_colour_plane_flag may be signaled via a high-level syntax such as DPS, VPS, SPS, or PPS. For example, chroma_format_idc and separate_colour_plane_flag may be included in Fig. 9 In the SPS syntax shown.
[0136] also, Fig.10An embodiment of chroma format classification using signaling of chroma_format_idc and separate_colour_plane_flag is shown. chroma_format_idc may be information specifying a chroma format applied to a coded image. separate_colour_plane_flag may specify whether a color array is processed separately in a particular chroma format. For example, a first value (e.g., 0) of chroma_format_idc may specify monochrome sampling. A second value (e.g., 1) of chroma_format_idc may specify 4:2:0 sampling. A third value (e.g., 2) of chroma_format_idc may specify 4:2:2 sampling. A fourth value (e.g., 3) of chroma_format_idc may specify 4:4:4 sampling.
[0137] In 4:4:4, based on the value of separate_colour_plane_flag, the following may apply. If the value of separate_colour_plane_flag is a first value (e.g., 0), each of the two chroma arrays may have the same height and width as the luma array. In this case, the value of ChromaArrayType, which specifies the type of the chroma sample array, may be set equal to chroma_format_idc. If the value of separate_colour_plane_flag is a second value (e.g., 1), the luma sample array, Cb sample array, and Cr sample array may be processed separately as well as together with a monochrome sampled picture. In this case, ChromaArrayType may be set to 0.
[0138] Intra prediction of chroma blocks
[0139] When intra prediction is performed on the current block, prediction of the luminance component block (luminance block) and prediction of the chrominance component block (chrominance block) of the current block can be performed. In this case, the intra prediction mode of the chrominance block can be set separately from the intra prediction mode of the luminance block.
[0140] For example, the intra prediction mode of the chroma block can be specified based on the intra chroma prediction mode information, and the intra chroma prediction mode information can be signaled in the form of an intra_chroma_pred_mode syntax element. For example, the intra chroma prediction mode information can represent one of a plane mode, a DC mode, a vertical mode, a horizontal mode, a derivation mode (DM), and a cross component linear model (CCLM) mode. Here, the plane mode can specify intra prediction mode #0, the DC mode can specify intra prediction mode #1, the vertical mode can specify intra prediction mode #26, and the horizontal mode can specify intra prediction mode #10. DM can also be called a direct mode. CCLM can also be called a linear model (LM). The CCLM mode can include at least one of L_CCLM, T_CCLM, and LT_CCLM.
[0141] In addition, DM and CCLM are related intra prediction modes that use information about the luma block to predict the chroma block. DM may indicate a mode that applies the same intra prediction mode as the intra prediction mode of the luma component as the intra prediction mode of the chroma component. In addition, CCLM may indicate an intra prediction mode that uses samples derived by downsampling the reconstructed samples of the luma block and then applying CCLM parameters α and β to the downsampled samples in the process of generating the prediction block of the chroma block as the prediction samples of the chroma block.
[0142] CCLM (Cross-Component Linear Model) mode
[0143] As described above, the CCLM mode can be applied to the chrominance block. The CCLM mode is an intra-frame prediction mode using the correlation between the luminance block and the chrominance block corresponding to the luminance block, and is performed by deriving a linear model based on the neighboring samples of the luminance block and the neighboring samples of the chrominance block. In addition, the prediction sample of the chrominance block can be derived based on the derived linear model and the reconstructed sample of the luminance block.
[0144] Specifically, when the CCLM mode is applied to the current chrominance block, the parameters of the linear model can be derived based on the neighboring samples used for intra prediction of the current chrominance block and the neighboring samples used for intra prediction of the current luminance block. For example, the linear model for CCLM can be expressed based on the following formula.
[0145] [Formula 1]
[0146] pred c (i, j) = α·rec L' (i, j)+β
[0147] Among them, pred c (i, j) can represent the predicted sample of the (i, j) coordinate of the current chroma block in the current CU. L'(i,j) can represent the reconstructed sample of the (i,j) coordinate of the current luminance block in the CU. For example, rec L '(i,j) may represent the downsampled reconstructed sample of the current luma block. The linear model coefficients α and β may be signaled or derived from neighboring samples.
[0148] Overview of Palette Mode
[0149] Hereinafter, the palette mode will be described. An encoding device according to an embodiment may encode an image using the palette mode, and a decoding device may decode the image using the palette mode in a manner corresponding thereto. The palette mode may be referred to as a palette encoding mode, an intra-frame palette mode, an intra-frame palette encoding mode, and the like. The palette mode may be regarded as an intra-frame encoding mode, or may be regarded as an intra-frame prediction method. However, similar to the above-mentioned skip mode, a separate residual value for the corresponding block may not be signaled.
[0150] In an embodiment, when encoding a picture content that is a computer-generated image including a large amount of text and graphics, the palette mode can be used to improve coding efficiency. Typically, local areas of the image generated as the picture content are separated by sharp edges and represented by a small number of colors. In order to take advantage of this feature, in the palette mode, the sample of a block can be represented by an index of a color entry of a specified palette table.
[0151] To apply a palette mode, information about a palette table may be signaled. In an embodiment, the palette table may include index values corresponding to respective colors. To signal the index values, palette index prediction information may be signaled. The palette index prediction information may include index values of at least a portion of a palette index map. In the palette index map, pixels of the video data may be mapped to color indexes of the palette table.
[0152] The palette index prediction information may include run value information. For at least a portion of a palette index map, the run value information may associate a run value with an index value. A run value may be associated with an escape color index. A palette index map may be generated from the palette index prediction information. For example, at least a portion of a palette index map may be generated by determining whether to adjust an index value of the palette index prediction information based on a final index value.
[0153] The current block in the current picture can be encoded or reconstructed according to the palette index map. When the palette mode is applied, the pixel values in the current coding unit can be represented as a set of smaller representative color values. Such a set can be called a palette. For pixels whose values are close to the palette colors, the palette index can be signaled. For pixels whose values do not belong to the palette (outside the palette), the corresponding pixels can be represented by escape symbols, and the quantized pixel values can be directly signaled. In this document, pixels or pixel values can be described as samples.
[0154] In order to encode a block encoded in a palette mode, a decoding device may decode the palette colors and indexes. The palette colors may be described in a palette table and may be encoded using a palette table encoding tool. An escape flag may be signaled for each coding unit. The escape flag may specify whether an escape symbol exists in the current coding unit. If an escape symbol exists, the palette table may be increased by 1 unit (e.g., an index unit) and the last index may be specified as the escape mode. The palette indexes of all pixels of a coding unit may configure a palette index map and may be encoded using a palette index map encoding tool.
[0155] For example, to encode a palette table, a palette predictor may be maintained. The palette predictor may be initialized at the start of each slice. For example, the palette predictor may be reset to 0. For each entry of the palette predictor, a reuse flag may be signaled that specifies whether it is part of the current palette. A run-length encoding of value 0 may be used to signal the reuse flag.
[0156] Thereafter, a zero-order exponential Golomb code may be used to signal the number of the new palette entry. Finally, the component values of the new palette entry may be signaled. After encoding the current coding unit, the palette predictor may be updated using the current palette, and (until the maximum allowed size is reached) entries from the previous palette predictor that are not reused in the current palette may be added to the end of the new palette predictor, which may be referred to as palette filling.
[0157] For example, to encode a palette index map, the index may be encoded using horizontal scanning or vertical scanning. The scanning order may be signaled through the bitstream using a parameter palette_transpose_flag that specifies the scanning direction. For example, when horizontal scanning is applied to scan the index of the sample in the current coding unit, palette_transpose_flag may have a first value (e.g., 0), and when vertical scanning is applied, palette_transpose_flag may have a second value (e.g., 1). Fig.11Implementations of horizontal scanning and vertical scanning according to implementations are shown.
[0158] Additionally, in an embodiment, a palette index may be encoded using an "INDEX" mode and a "COPY_ABOVE" mode. Both modes may be signaled using one flag, except when the mode of the palette index is signaled for the top row when horizontal scanning is used, when the mode of the palette index is signaled for the leftmost column when vertical scanning is used, and when the immediately preceding mode is "COPY_ABOVE".
[0159] In "INDEX" mode, the palette index can be signaled explicitly. For "INDEX" mode and "COPY_ABOVE" mode, a run value specifying the number of pixels encoded using the same schema can be signaled.
[0160] The encoding order of the index map can be set as follows. First, the number of index values of the coding unit can be signaled. This can be performed after the actual index value of the entire coding unit is signaled using truncated binary encoding. Both the number of indexes and index values can be encoded in bypass mode. Thus, the bypass bins related to the index can be grouped. Then, the palette mode (INDEX or COPY_ABOVE) and the run value can be signaled using an interleaved method.
[0161] Finally, component escape values corresponding to escape samples of the entire coding unit may be grouped with each other and encoded in bypass mode. An additional syntax element last_run_type_flag may be signaled after the index value is signaled. By using last_run_type_flag together with the number of indices, the signaling of the run value corresponding to the last run in the block may be skipped.
[0162] In an embodiment, a dual tree type that performs independent coding unit partitioning on luma components and chroma components may be used for I slices. The palette mode may be applied to luma components and chroma components individually or together. If dual tree is not applied, the palette mode applies to all Y, Cb, and Cr components.
[0163] In an embodiment, the syntax elements of the palette mode may be as follows: Figures 12 to 19 The encoding shown is signaled. Figure 12 to Figure 13 The consecutive syntax in a coding unit (CU) showing the palette mode, Figures 14 to 19 Shows the sequential syntax of the palette mode.
[0164] Below, each syntax element will be described. The palette mode flag pred_mode_plt_flag may specify whether the palette mode is applied to the current coding unit. For example, the first value (e.g., 0) of pred_mode_plt_flag may specify that the palette mode is not applied to the current coding unit. The second value (e.g., 1) of pred_mode_plt_flag may specify that the palette mode is applied to the current coding unit. When pred_mode_plt_flag is not obtained from the bitstream, the value of pred_mode_plt_flag may be determined as the first value.
[0165] The parameter PredictorPaletteSize[startComp] may specify the size of the predictor palette for the first color component startComp of the current palette table.
[0166] The parameter PalettePredictorEntryReuseFlags[i] may be information specifying whether to reuse an entry. For example, a first value (e.g., 0) of PalettePredictorEntryReuseFlags[i] may specify that the i-th entry of the predictor palette is not an entry of the current palette, and a second value (e.g., 1) may specify that the i-th entry of the predictor palette may be reused in the current palette. For use of PalettePredictorEntryReuseFlags[i], the initial value may be set to 0.
[0167] The parameter palette_predictor_run may specify the number of zeros that exist before a non-zero entry in the array PalettePredictorEntryReuseFlags.
[0168] The parameter num_signalled_palette_entries may specify the number of entries in the current palette that are explicitly signaled for the first color component startComp of the current palette table. When num_signalled_palette_entries is not obtained from the bitstream, the value of num_signalled_palette_entries may be determined to be 0.
[0169] The parameter CurrentPaletteSize[startComp] may specify the size of the current palette for the first color component startComp of the current palette table. This may be calculated as shown below. The value of CurrentPaletteSize[startComp] may have a range from 0 to palette_max_size.
[0170] [Formula 2]
[0171] CurrentPaletteSize[startComp]=NumPredictedPaletteEntries+num_signalled_palette_entries
[0172] The parameter new_palette_entries[cIdx][i] may specify the value of the i-th signaled palette entry for the color component cIdx.
[0173] The parameter PredictorPaletteEntries[cIdx][i] may specify the i-th element in the predictor palette for the color component cIdx.
[0174] The parameter CurrentPaletteEntries[cIdx][i] can specify the i-th element in the current palette for the color component cIdx. PredictorPaletteEntries and CurrentPaletteEntries can be as follows Fig. 20 It is generated as shown in the formula.
[0175] The parameter palette_escape_val_present_flag may specify whether there is an escape coded sample. For example, a first value (e.g., 0) of palette_escape_val_present_flag may specify that there is an escape coded sample for the current coding unit, and a second value (e.g., 1) of palette_escape_val_present_flag may specify that the current coding unit includes at least one escape coded sample. When palette_escape_val_present_flag is not obtained from the bitstream, the value of palette_escape_val_present_flag may be determined to be 1.
[0176] The parameter MaxPaletteIndex may specify the maximum available value of the palette index for the current coding unit. The value of MaxPaletteIndex may be determined as CurrentPaletteSize[startComp]+palette_escape_val_present_flag.
[0177] The parameter num_palette_indices_minus1 may be specified as the number of palette indices explicitly or implicitly signaled by the current block. For example, a value obtained by adding 1 to num_palette_indices_minus1 may be specified as the number of palette indices explicitly or implicitly signaled by the current block. When num_palette_indices_minus1 is not included in the bitstream, the value of num_palette_indices_minus1 may be determined to be 0.
[0178] The parameter palette_idx_idc may be an indicator of the index of the palette table CurrentPaletteEntries. The value of palette_idx_idc may have a value of 0 to MaxPaletteIndex for the first index of the corresponding block, and may have a value of 0 to MaxPaletteIndex-1 for the remaining indexes of the corresponding block. When the value of palette_idx_idc is not obtained from the bitstream, the value of palette_idx_idc may be determined to be 0.
[0179] The parameter PaletteIndexIdc[i] may be an array storing the value of the th Palette_idx_idc signaled explicitly or implicitly. The values of all elements of PaletteIndexIdc[i] may be initialized to 0.
[0180] The parameter copy_above_indices_for_final_run_flag may specify information indicating whether to copy the previous index for the final run, a first value (e.g., 0) may specify that the palette index at the last position of the current coding unit is explicitly or implicitly signaled through the bitstream, and a second value (e.g., 1) may specify that the palette index at the last position of the current coding unit is explicitly or implicitly signaled through the bitstream. When copy_above_indices_for_final_run_flag is not obtained from the bitstream, the value of copy_above_indices_for_final_run_flag may be determined to be 0.
[0181] The parameter palette_transpose_flag may be information specifying a scanning method for scanning the index of the pixels of the current coding unit. For example, a first value (e.g., 0) of palette_transpose_flag may specify that horizontal scanning is applied to scan the index of the pixels of the current coding unit, and a second value (e.g., 1) of palette_transpose_flag may specify that vertical scanning is applied to scan the index of the pixels of the current coding unit. When palette_transpose_flag is not obtained from the bitstream, the value of palette_transpose_flag may be determined to be 0.
[0182] A first value (e.g., 0) of the parameter copy_above_palette_indices_flag may specify an indicator that the palette index of the specified sample is obtained or derived from the encoded value of the bitstream. A second value (e.g., 1) of copy_above_palette_indices_flag may specify that the palette index is the same as the palette index of the neighboring sample. For example, when vertical scanning is currently used, the neighboring sample may be a sample in the left column of the current sample that is at the same position as the current sample. Alternatively, when horizontal scanning is currently used, the neighboring sample may be a sample in the upper row of the current sample that is at the same position as the current sample.
[0183] The first value (e.g., 0) of the parameter CopyAboveIndicesFlag[xC][yC] can specify that the palette index is obtained explicitly or implicitly from the bitstream. The second value (e.g., 1) can specify that the palette index is generated by copying the palette index of the left column when vertical scanning is currently used, or by copying the palette index of the upper row when horizontal scanning is currently used. Here, xC and yC are coordinate indicators that relatively specify the position of the current sample relative to the upper left sample of the current picture. PaletteIndexMap[xC][yC] can have a value from 0 to (MaxPaletteIndex-1).
[0184] The parameter PaletteIndexMap[xC][yC] may specify a palette index, and for example, an index into an array represented by CurrentPaletteEntries. As described above, the array indexes xC and yC are coordinate indicators that specify the coordinates of the current sample relative to the top-left sample of the current picture. PaletteIndexMap[xC][yC] may have a value from 0 to (MaxPaletteIndex-1).
[0185] When the value of CopyAboveIndicesFlag[xC][yC] is 0, the parameter PaletteRun can specify the number of consecutive positions with the same palette index. In addition, when the value of CopyAboveIndicesFlag[xC][yC] is 1, PaletteRun can specify the number of consecutive positions whose palette index is the same as the palette index at the position in the upper row when the current scan direction is horizontal scan, and the same as the palette index at the position in the left column when the current scan direction is vertical scan.
[0186] The parameter PaletteMaxRun can specify the maximum available value of PaletteRun. The value of PaletteMaxRun can be an integer greater than 0.
[0187] The parameter palette_run_prefix can specify the prefix part used for the binarization of PaletteRun.
[0188] The parameter palette_run_suffix may specify the binarized suffix portion for PaletteRun. When palette_run_suffix is not obtained from the bitstream, its value may be determined to be 0.
[0189] The value of PaletteRun can be determined as follows. For example, when the value of palette_run_prefix is less than 2, this can be calculated as follows.
[0190] [Formula 3]
[0191] PaletteRun=palette_run_prefix
[0192] Otherwise, when the value of palette_run_prefix is equal to or greater than 2, this can be calculated as follows.
[0193] [Formula 4]
[0194] PrefixOffset=1<<(palette_run_prefix-1)
[0195] PaletteRun=PrefixOffset+palette_run_suffix
[0196] The parameter palette_escape_val may specify a quantized escape coded sample value for a component. The parameter PaletteEscapeVal[cIdx][xC][yC] may specify an escape value for a sample whose PaletteIndexMap[xC][yC] value is (MaxPaletteIndex-1) and whose palette_escape_val_present_flag value is 1. Here, cIdx may specify a color component. As described above, the array indicators xC and yC may be position indicators that specify the relative distance of the position of the current sample from the upper left sample of the current picture.
[0197] Overview of Filtering
[0198] Hereinafter, a filtering method according to the present disclosure will be described.
[0199] According to some embodiments of the present disclosure, filtering may be performed on a reconstructed picture generated by an image encoding / decoding device. As a result of performing the filtering, a modified reconstructed picture may be generated, and the image decoding device may determine the modified reconstructed picture as a final decoded picture. In addition, in the image encoding / decoding device, the modified reconstructed picture may be stored in a decoded picture buffer (DPB) or a memory, and may then be used as a reference picture when encoding / decoding the picture.
[0200] Filtering according to some embodiments of the present disclosure may be used as the same meaning as in-loop filtering. The filter used for filtering may include at least one of a deblocking filter, a sample offset filter (SAO) filter, an adaptive loop filter (SLF), or a bilateral filter. At least one of the deblocking filter, the SAO filter, the ALF, and / or the bilateral filter may be applied to the reconstructed picture in sequence to generate a modified reconstructed picture. The order in which the filters are applied may be preset in the image encoding / decoding device. For example, after the deblocking filter is applied to the reconstructed picture, the SAO filter may be applied. As another example, after the deblocking filter is applied to the reconstructed picture, the ALF may be applied. Filtering according to some embodiments of the present disclosure may be performed by Figure 2 The filter 160 and / or Figure 3 at least one of the filters 240 is executed.
[0201] For example, the deblocking filter can eliminate the distortion generated at the block boundary of the reconstructed picture. For example, the deblocking filter can derive a target boundary as the boundary between blocks in the reconstructed picture, and set the boundary strength (BS) of the target boundary. The image encoding / decoding device can perform deblocking filtering on the target boundary by applying filtering to the target boundary based on the set boundary strength. In this case, the boundary strength can be determined based on at least one of the prediction mode of two blocks adjacent to the target boundary, the motion vector difference, whether the reference picture is the same, or whether there is a non-zero significant coefficient.
[0202] As another example, the SAO filter can compensate for the offset difference between the reconstructed picture and the original picture in units of samples. For example, the SAO filter can be implemented by a filter type such as a band offset filter or an offset filter. When the SAO filter is applied, the samples can be classified into different categories according to the SAO type, and an offset value can be added to each sample based on the category. The information about the SAO filter may include at least one of information about whether the SAO filter is applied, SAO filter type information, and / or SAO offset value information. In addition, for example, the SAO filter can be limited to being applied to the reconstructed picture to which the deblocking filter is applied.
[0203] As another example, the ALF may be a sample unit filter that applies a filter coefficient according to a filter shape to a reconstructed picture. The image encoding device may signal whether the ALF, the shape of the ALF, and / or at least one of the filter coefficients are applied by comparing the reconstructed picture with the original picture. That is, the information about the ALF may include at least one of information about whether the ALF is applied, ALF filter shape information, and / or ALF filter coefficient information. In addition, for example, the ALF may be limited to being applied to a reconstructed picture to which a deblocking filter is applied.
[0204] Overview of Deblocking Filter
[0205] Fig.21 is a view illustrating a method of applying a deblocking filter.
[0206] As described above, the deblocking filter may be applied to the reconstructed picture. The deblocking filter may be applied to the boundary of each CU or TU included in the current block based on the encoding / decoding order of the picture.
[0207] In some embodiments, the deblocking filter may be applied first to the vertical boundaries and then to the horizontal boundaries. Alternatively, the deblocking filter may be applied first to the horizontal boundaries and then to the vertical boundaries. The deblocking filter may be applied to the boundaries of all coding blocks, the boundaries of all sub-blocks of all coding blocks, the boundaries of all transform blocks, and / or the boundaries of all sub-blocks of all transform blocks.
[0208] Reference Fig.21 According to some embodiments of the present disclosure, a method for applying a deblocking filter may include: deriving a target boundary to which the deblocking filter will be applied (S2110); determining a boundary strength (S2120); and applying the deblocking filter to the target boundary based on the determined boundary strength (S2130).
[0209] Boundary strength determination
[0210] Below, the determination of the boundary strength applied to the target boundary (S2120) will be described. According to some embodiments of the present disclosure, the boundary strength (bS) can be determined based on the condition of the transform block adjacent to the target boundary. The boundary strength may also be referred to as boundary filter strength or filter strength. In the following description, when the target boundary is a vertical boundary, the left block may be defined as a P block and the right block may be defined as a Q block based on the target boundary. In addition, when the target boundary is a horizontal boundary, the upper block may be defined as a P block and the lower block may be defined as a Q block based on the target boundary.
[0211] In the following description, a P block sample may be represented by p0, and a Q block sample may be represented by q0. p and q may be samples facing the target boundary in the P block and the Q block. For example, p0 may be a sample of a left or upper block adjacent to the target boundary, and q0 may be a sample of a right or lower block adjacent to the target boundary.
[0212] In addition, in the following description, the first value, the second value, and the third value of the boundary strength may mean 0, 1, and 2, respectively, but the scope of the present disclosure is not limited to this definition.
[0213] For example, when block-based quantized residual domain differential pulse code modulation (BDPCM) is applied to P block samples and Q block samples included in one luma CU, the boundary strength of the target boundary may be determined as a first value.
[0214] Alternatively, for example, when the palette mode is applied to all CUs belonging to P block samples and Q block samples, the boundary strength of the target boundary may be determined as the first value.
[0215] Alternatively, for example, when a palette mode is applied to a CU belonging to a P block sample or a palette mode is applied to a CU belonging to a Q block sample, the boundary strength of the target boundary may be determined as the first value.
[0216] As another example, when intra prediction is performed on P block samples and Q block samples included in a CU, the boundary strength of the target boundary may be determined as a third value. As another example, when the target boundary is a boundary of a TU and combined inter and intra prediction (CIIP) is applied to P block samples and Q block samples included in a CU, the boundary strength of the target boundary may be determined as a third value. As another example, when the target boundary is a boundary of a TU and at least one of the P block samples and Q block samples included in a TU has a non-zero transform coefficient level, the boundary strength of the target boundary may be determined as a second value. As another example, when the prediction mode of a sub-block of a CU including a P block sample is different from the prediction mode of a sub-block of a CU including a Q block sample, the boundary strength of the target boundary may be determined as a second value.
[0217] As another example, when the current block is a luminance block and satisfies at least one of the following conditions, the boundary strength of the target boundary may be determined as the second value. In addition, when all of the following conditions are not satisfied, the boundary strength of the target boundary may be determined as the first value.
[0218] For example, when a sub-block of a CU including P block samples and a sub-block of a CU including Q block samples are both encoded / decoded in IBC mode and the horizontal value or vertical value difference of the motion vectors of the respective sub-blocks is equal to or greater than a value of 4 units in units of 1 / 4 luminance samples, the boundary strength of the target boundary can be determined as the second value.
[0219] Alternatively, when a subblock of a CU including P block samples and a subblock of a CU including Q block samples refer to different reference pictures or have different numbers of motion vectors, the boundary strength of the target boundary may be determined as the second value.
[0220] Alternatively, when the difference between the horizontal value or the vertical value of the motion vector used to predict a sub-block of a CU including P block samples and a sub-block of a CU including Q block samples or each sub-block is equal to or greater than a value of 4 units in units of 1 / 4 luminance samples, the boundary strength of the target boundary can be determined as the second value.
[0221] Alternatively, when a sub-block of a CU including P block samples is predicted using two motion vectors and two different reference pictures and a sub-block of a CU including Q block samples is predicted using two motion vectors and two same reference pictures, and the difference between the horizontal values or vertical values of the motion vectors of the same reference pictures is equal to or greater than a value of 4 units in units of 1 / 4 luminance samples, the boundary strength of the target boundary may be determined as a second value.
[0222] Alternatively, when two motion vectors of the same reference picture are used to predict a sub-block of a CU including a P block sample and two motion vectors of the same reference picture are used to predict a sub-block of a CU including a Q block sample, if the following two conditions are satisfied, the boundary strength of the target boundary may be determined as the second value. The first condition may mean a condition in which, for a list 0 motion vector used to predict each sub-block, the absolute value difference between the horizontal component or the vertical component is equal to or greater than a value of 4 units in units of 1 / 4 luminance samples, or, for a list 1 motion vector used to predict each sub-block, the absolute value difference between the horizontal component or the vertical component is equal to or greater than a value of 4 units in units of 1 / 4 luminance samples.
[0223] The second condition may mean a condition in which the absolute value difference between the horizontal components or the absolute value difference between the vertical components between the list 0 motion vector for predicting the sub-block of the CU including the P block sample and the list 1 motion vector for predicting the sub-block of the CU including the Q block sample is equal to or greater than a value of 4 units in units of 1 / 4 luma samples, or the absolute value difference between the horizontal components or the absolute value difference between the vertical components between the list 1 motion vector for predicting the sub-block of the CU including the P block sample and the list 0 motion vector for predicting the sub-block of the CU including the Q block sample is equal to or greater than a value of 4 units in units of 1 / 4 luma samples.
[0224] Overview of Boundary Filtering Processing
[0225] The image encoding / decoding device may determine the boundary strength of the target boundary based on the above conditions, and apply a deblocking filter to the reconstructed picture based on at least one of the boundary strength and / or the filter length. For example, when the boundary strength has a first value (e.g., 0), the image encoding / decoding device may not perform filtering on the target boundary.
[0226] In the boundary filtering process, when the target sample is a luma sample, filtering may be performed using a short filter or a long filter. Alternatively, when the target sample is a chroma sample, filtering may be performed using a chroma filter.
[0227] Determination of samples to be filtered
[0228] In an embodiment, in case of vertical boundaries, the reconstructed samples p used to apply the filtering are i,k and q j,k It can be specified as follows.
[0229] [Formula 5]
[0230] q j,k =recPicture[xCb+xBl+j][yCb+yBl+k]
[0231] p i,k =recPicture[xCb+xBl-i-1][yCb+yBl+k]
[0232] In case of horizontal boundaries, the reconstructed samples p used to apply the filtering i,k and q j,k It can be specified as follows.
[0233] [Formula 6]
[0234] q j,k =recPicture[xCb+xBl+k][yCb+yBl+j]
[0235] p i,k =recPicture[xCb+xBl+k][yCb+yBl-i-1]
[0236] Among them, i may have a value of 0 to the maximum filter length of the P block (e.g., maxFilterLengthP), j may have a value of 0 to the maximum filter length of the Q block (e.g., maxFilterLengthQ), and k may have a value of 0 to 3. In addition, xCb and yCb may specify a position (xCb, yCb) of the upper left sample of the current CU where deblocking filtering is performed, and xBl and yBl may specify a position (xBl, yBl) of the boundary of the P block and the Q block where deblocking filtering is performed based on (xCb, yCb).
[0237] Fig. 22 is a diagram illustrating a reconstructed sample for applying filtering according to an embodiment. Fig. 22 , examples are shown of the position of the upper left sample of the current CU (xCb, yCb) (2210), the sample position (xCb+xBl1, yCb+yBl1) (2220) for specifying the P blocks and Q blocks for performing deblocking filtering when deblocking filtering is performed using a vertical boundary, and the sample position (xBl2, yBl2) (2230) for specifying the P blocks and Q blocks for performing deblocking filtering when deblocking filtering is performed using a horizontal boundary.
[0238] According to the above coordinates and formulas, when deblocking filtering is performed using a horizontal boundary, samples 2221 of the P block and samples 2222 of the Q block on which deblocking filtering is performed can be determined, and when deblocking filtering is performed using a vertical boundary, samples 2231 of the P block and samples 2232 of the Q block on which deblocking filtering is performed can be determined.
[0239] Determination of the filter used for deblocking filtering of luma samples
[0240] When deblocking filtering is performed on luma samples, a short filter or a long filter may be used. The short filter or the long filter may be used according to boundary characteristics of the luma block.
[0241] For example, for the sample position (xCb+xBl, yCb+yBl+k), k=0..3, when the edge type edgeType is the vertical edge EDGE_VER, the value of the parameter dE described below is not 0, and the value of dE is not 3, and the short filter described below can be used. In addition, when the value of dE is 3, the long filter described below can be used.
[0242] The boundary characteristics of the luminance block can be determined according to the following processing. The following parameters can be used to perform this step. For example, the reconstructed sample array recPicture, the coordinates (xCb, yCb) specifying the upper left sample position of the current coding unit compared to the upper left sample position of the current picture, the coordinates (xBl, yBl) specifying the upper left sample position of the current coding unit compared to the upper left sample of the current coding unit, the parameter specifying whether the boundary for performing deblocking filtering is a vertical boundary EDGE_VER or a horizontal boundary EDGE_HOR, the parameter bS specifying the boundary filter strength, the maxFilterLengthP specifying the maximum filter length, and the maxFilterLengthQ specifying the maximum filter length can be used.
[0243] By performing this step, the following result values specifying the boundary characteristics of the luminance block can be generated. For example, the parameters dE, dEp, and dEq specifying the result of determining the boundary characteristics of the luminance block and the parameter t C , and the parameters maxFilterLenghP and maxFilterLengthQ can be changed according to the boundary characteristics of the luminance block.
[0244] The sample value p of P block i,k and the sample value q of the Q block i,k It can be calculated as shown in the following formula (where i=0..Max(2,maxFilterLengthP), j=0..Max(2,maxFilterLengthQ), k=0 or 3). For example, when edgeType is EDGE_VER, the following determination can be made.
[0245] [Formula 7]
[0246] q j,k =recPicture[xCb+xBl+j][yCb+yBl+k]
[0247] p i,k=recPicture[xCb+xBl-i-1][yCb+yBl+k]
[0248] Otherwise, when edgeType is EDGE_HOR, the following determination may be made.
[0249] [Formula 8]
[0250] q j,k =recPicture[xCb+xBl+k][yCb+yBl+j]
[0251] p i,k =recPicture[xCb+xBl+k][yCb+yBl-i-1]
[0252] Next, the quantization parameter qP used to calculate the threshold parameter for deblocking filtering can be derived as shown in the following formula. Here, the parameter Qp Q and Qp p Yes 0,0 and p 0,0 The quantization parameter of the CU to which the corresponding sample belongs can be set.
[0253] [Formula 9]
[0254] qP=((Qp Q +Qp P +1)>>1)
[0255] Used to use the quantization parameter qP and auxiliary offset luma_beta_offset from Fig.23 The quantization parameter Q of the parameter β' determined by the table may be derived as shown in the following equation: In an embodiment, luma_beta_offset may be obtained from a bitstream. Fig.23 The table shows the quantization parameter Q, parameter β' and parameter t C 'The implementation method of the mapping relationship between. Fig.23 In the table, parameter β' can be set to a value corresponding to the quantization parameter Q.
[0256] [Formula 10]
[0257] Q=Clip3(0,63,qP+luma_beta_offset)
[0258] In addition, parameter β can be calculated as follows: Here, BitDepth is a parameter that specifies the bit depth of luma samples.
[0259] β=β′*(1<<(BitDepth-8))
[0260] Used to use the quantization parameter qP, boundary strength bS and auxiliary offset luma_tc_offset from Fig.23 The table determines the parameter t C The quantization parameter Q can be derived as shown below. luma_tc_offset can be obtained from the bitstream. Fig.23 In the table, parameter t C It can be set to a value corresponding to the quantization parameter Q.
[0261] [Formula 11]
[0262] Q=Clip3(0,65,qP+2*(bS-1)+luma_tc_offset)
[0263] In addition, the parameter t C It can be calculated as follows.
[0264] [Formula 12]
[0265] roundOffset=1<<(9-BitDepth)
[0266] t C =BitDepth<10? (t C ′+roundOffset)>>(10-BitDepth):t C ′*(1<<(BitDepth-10))
[0267] Below, we will refer to Fig.24 The method for determining the boundary characteristics of the luminance block is described. First, parameters for determining the boundary characteristics of the luminance block may be obtained (S2410). For example, the following parameters may be calculated according to the following formula.
[0268] [Formula 13]
[0269] dp0=Abs(p 2,0 -2*p 1,0 +p 0,0 )
[0270] dp3=Abs(p 2,3 -2*p 1,3 +p 0,3 )
[0271] dq0=Abs(q 2,0 -2*q 1,0 +q 0,0 )
[0272] dq3=Abs(q 2,3 -2*q 1,3 +q 0,3 )
[0273] In addition, when the values of maxFilterLengthP and maxFilterLengthQ are both 3, sp0, sq0, spq0, sp3, sq3, and spq3 can be calculated as follows.
[0274] [Formula 14]
[0275] sp0=Abs(p 3,0 -p 0,0 )
[0276] sq0=Abs(q 0,0 -q 3,0 )
[0277] spq0=Abs(p 0,0 -q 0,0 )
[0278] sp3=Abs(p 3,3 -p 0,3 )
[0279] sq3=Abs(q 0,3 -q 3,3 )
[0280] spq3=Abs(p 0,3 -q 0,3 )
[0281] In addition, parameters sidePisLargeBlk and sideQisLargeBlk may be set to 0, sidePisLargeBlk may be set to 1 when maxFilterLengthP is greater than 3, and sideQisLargeBlk may be set to 1 when maxFilterLengthQ is greater than 3. In addition, when edgeType is EDGE_HOR and the value of (yCb+yBl)%CtbSizeY is 0, the value of sidePisLargeBlk may be set to 0. Here, CtbSizeY may specify the size of the coding tree block. The coding tree block may be the block from which the CU is divided in the above description. In addition, parameters dSam0 and dSam3 may first be initialized to 0.
[0282] Next, the boundary characteristics of the luminance block can be determined according to the value of sidePisLargeBlk or sideQisLargeBlk (S2420). When sidePisLargeBlk or sideQisLargeBlk is not greater than 0, step S2420 may not be performed. When sidePisLargeBlk or sideQisLargeBlk is greater than 0, step S2420 may be performed as follows. First, the parameters dp0L and dp3L may be derived as follows, and maxFilterLengthP may be modified as follows. When the value of sidePisLargeBlk is 1, they may be derived as shown in the following formula.
[0283] [Formula 15]
[0284] dp0L=(dp0+Abs(p 5,0 -2*p 4,0 +p 3,0 )+1)>>1
[0285] dp3L=(dp3+Abs(p 5,3 -2*p 4,3 +p 3,3 )+1)>>1
[0286] Otherwise (the value of sidePisLargeBlk is not 1), they can be derived as shown below.
[0287] [Formula 16]
[0288] dp0L=dp0
[0289] dp3L=dp3
[0290] maxFilterLengthP=3
[0291] Next, the parameters dq0L and dq3L can be derived as follows. For example, when the value of sideQisLargeBlk is 1, they can be derived as follows.
[0292] [Formula 17]
[0293] dq0L=(dq0+Abs(q 5,0 -2*q 4,0 +q 3,0 )+1)>>1
[0294] dq3L=(dq3+Abs(q 5,3 -2*q 4,3 +q 3,3 )+1)>>1
[0295] Otherwise (the value of sideQisLargeBlk is not 1), they can be derived as follows.
[0296] [Formula 18]
[0297] dq0L=dq0
[0298] dq3L=dq3
[0299] In addition, the parameters sp0L and sp3L can be derived as follows. When the value of maxFilterLengthP is 7, they can be derived as follows.
[0300] [Formula 19]
[0301] sp0L=sp0+Abs(p 7,0 -p 6,0 -p 5,0 +p 4,0 )
[0302] sp3L=sp3+Abs(p 7,3 -p 6,3 -p 5,3 +p 4,3 )
[0303] Otherwise (the value of maxFilterLengthP is not 7), they can be derived as follows.
[0304] [Formula 20]
[0305] sp0L=sp0
[0306] sp3L=sp3
[0307] The parameters sq0L and sq3L can be derived as follows. When the value of maxFilterLengthQ is 7, they can be derived as follows.
[0308] [Formula 21]
[0309] sq0L=sq0+Abs(q 4,0 -q 5,0 -q 6,0 +q 7,0 )
[0310] sq3L=sq3+Abs(q 4,3 -q 5,3 -q 6,3 +q 7,3 )
[0311] Otherwise (the value of maxFilterLengthQ is not 7), they can be derived as follows.
[0312] [Formula 22]
[0313] sq0L=sq0
[0314] sq3L=sq3
[0315] Additionally, the parameters dpq0L, dpq3L, and dL may be derived as follows.
[0316] [Formula 23]
[0317] dpq0L=dp0L+dq0L
[0318] dpq3L=dp3L+dq3L
[0319] dL=dpq0L+dpq3L
[0320] In addition, when dL is less than β, the following processing may be further performed when executing step S2420. Parameter dpq may be set to 2*dpq0L. Parameter sp may be set to sp0L. Parameter sq may be set to sq0L, and parameter spq may be set to spq0. In addition, parameters p0 p3 q o and q3 may first be initialized to 0. Additionally, they may be modified as follows. When the value of sidePisLargeBlk is 1, the following may apply.
[0321] [Equation 24]
[0322] p3=p3 , 0
[0323] p0=p maxFilterLengthP,0
[0324] When the value of sideQislargeBlk is 1, the following may apply.
[0325] q3=q 3,0
[0326] q0=q maxFilterLengthQ,0
[0327] Using sample values p0, p3, q0, and q3 and parameters dpq, sp, sq, spq, sidePisLargeBlk, sideQisLargeBlk, β, and t C , the luminance sample characteristic of the sample position (xCb+xBl, yCb+yBl) can be determined, and the value of the parameter dSam0 can be set to the determined result value. The luminance sample characteristic determination method using the above parameters will be described later.
[0328] Then, parameter dqp can be set to 2*dpq3L. Parameter sp can be set to sp3L. In addition, parameter sq can be set to sq3L. In addition, parameter spq can be set to spq3. Parameters p0, p3, q0, and q3 can first be set to 0. In addition, they can be modified based on sidePisLargeBlk and sideQisLargeBlk. When the value of sidePisLargeBlk is 1, they can be modified as follows.
[0329] p3=p 3,3
[0330] p0=p maxFilterLengthP,3
[0331] When the value of sideQisLargeBlk is 1, they can be modified as follows.
[0332] q3=q 3,3
[0333] q0=q maxFilterLengthQ,3
[0334] In addition, using the sample values p0, p3, q0, and q3 and the parameters dpq, sp, sq, spq, sidePisLargeBlk, sideQisLargeBlk, β, and t C , the brightness sample characteristics of the sample position (xCb+xBl, yCb+yBl+3) when edgeType is EDGE_VER or the brightness sample characteristics of the sample position (xCb+xBl+3, yCb+yBl) when edgeType is EDGE_HOR can be determined, and the value of the parameter dSam3 can be set to the determined result value.
[0335] Next, after executing step S2420 (or after executing step S2410 if the execution is omitted), the parameters dE, dEp and dEq of the luminance block boundary characteristics may be calculated as follows (S2430). This will refer to Fig.25 Description: First, when the values of dSam0 and dSam3 are both 1, the value of parameter dE may be set to 3, the value of dEp may be set to 1, and the value of dEq may be set to 1 (S2510).
[0336] Otherwise (the values of dSam0 and dSam3 are not 1), the following steps may be performed. First, the values of the parameters may be updated as follows (S2530). The parameters dpq0, dpq3, dp, dq, and d may be determined as follows.
[0337] [Formula 25]
[0338] dpq0=dp0+dq0
[0339] dpq3=dp3+dq3
[0340] dp=dp0+dp3
[0341] dq=dq0+dq3
[0342] d=dpq0+dpq3
[0343] In addition, parameters dE, dEp, dEq, sidePisLargeBlk and sideQisLargeBlk can be set to 0.
[0344] Next, when d is less than β and the values of maxFilterLengthP and maxFilterLengthQ are greater than 2, the values of the parameters may be additionally updated as follows ( S2540 ).
[0345] First, the parameter dpq may be set to 2*dpq0, the parameter sp may be set to sp0, the parameter sq may be set to sq0, and the parameter spq may be determined to spq0.
[0346] Next, use the parameters dpq, sp, sq, spq, sidePisLargeBlk, sideQisLargeBlk, β, and t set to 0. C As well as the sample values p0, p3, q0 and q3, the brightness sample characteristics of the position sample (xCb+xBl, yCb+yBl) can be determined, and the value of the parameter dSam0 can be set to the determined value.
[0347] Next, parameter dpq may be set to 2*dpq3, parameter sp may be set to sp, parameter sq may be set to sq3, and parameter spq may be set to spq3.
[0348] Next, use the parameters dpq, sp, sq, spq, sidePisLargeBlk, sideQisLargeBlk, β, and t set to 0. C As well as sample values p0, p3, q0 and q3, the brightness sample characteristics of the sample position (xCb+xBl, yCb+yBl+3) when edgeType is EDGE_VER or the sample position (xCb+xBl+3, yCb+yBl) when edgeType is EDGE_HOR can be determined, and the value of the parameter dSam3 can be set to the determined result value.
[0349] Next, when d is less than β, the values of the parameters may be additionally updated as follows (S2550): Parameter dE may be set to 1. When the value of dSam0 is 1 and the value of dSam3 is 1, parameter dE may be set to 2, and maxFilterLengthP and maxFilterLengthQ may be set to 3.
[0350] Next, when the value of maxFilterLengthP is greater than 1, the value of maxFilterLengthQ is greater than 1, and dp is less than (β+(β>>1))>>3, the parameter dEp can be set to 1.
[0351] Next, when the value of maxFilterLengthP is greater than 1, the value of maxFilterLengthQ is greater than 1, and dq is less than (β+(β>>1))>>3, the parameter dEq can be set to 1.
[0352] Next, when the value of dE is 1, maxFilterLengthP may be set to 1+dEp, and maxFilterLengthQ may be set to 1+dEq.
[0353] Luminance sample characteristics determination method
[0354] To perform this step, the above sample values p0, p3, q0 and q3 and the parameters dpq, sp, sq, spq, sidePisLargeBlk, sideQisLargeBlk, β and t C As a result of executing this step, a parameter dSam specifying the characteristic determination result of the sample can be generated.
[0355] First, the parameters sp and aq can be modified as follows. When the value of sidePisLargeBlk is 1, they can be modified as follows.
[0356] [Equation 26]
[0357] sp=(sp+Abs(p3-p0)+1)>>1
[0358] Additionally, when the value of sideQisLargeBlk is 1, they can be modified as follows.
[0359] [Formula 27]
[0360] sq=(sq+Abs(q3-q0)+1)>>1
[0361] The parameters sThr1 and sThr2 may be determined as follows.
[0362] When the value of sidePisLargeBlk is 1 or the value of sideQisLargeBlk is 1, they can be determined as follows.
[0363] [Equation 28]
[0364] sThr1=3*β>>5
[0365] sThr2=β>>4
[0366] Otherwise (when the values of sidePisLargeBlk and sideQisLargeBlk are both 0), they can be determined as follows.
[0367] [Equation 29]
[0368] sThr1=β>>3
[0369] sThr2=β>>2
[0370] When all of the following conditions are true, the parameter dSam may be set to 1. Otherwise, dSam may be set to 0.
[0371] (Condition 1) The value of dpq is smaller than sThr2.
[0372] (Condition 2) The value of sp+sq is smaller than sThr1.
[0373] (Condition 3) The value of spq is less than (5*t C +1)>>1.
[0374] Perform a short filter on the luma samples
[0375] When a short filter is applied, the maximum filter length of a P block (e.g., maxFilterLengthP), the maximum filter length of a Q block (e.g., maxFilterLengthQ), the sample value of a P block (e.g., p i,k ), the sample values of the Q blocks (e.g., q j,k ) and the predetermined control parameters for the filter application can be used as inputs for the short filter. Here, for p i,k and q j,k , i can have a value from 0 to maxFilterLengthP, and j can have a value from 0 to maxFilterLengthQ.
[0376] When a short filter is applied, the number of samples to which the short filter is applied may be determined. For example, the number of samples to which the short filter is applied to a P block may be determined as nDp, and the number of samples to which the short filter is applied to a Q block may be determined as nDq. In addition, a sample value p to which the short filter is applied may be generated. i 'and qj '.
[0377] In an embodiment, when the value of dE is 2 and the values of nDp and nDq are both 3, strong filtering may be applied as shown below.
[0378] [Formula 30]
[0379] p0′=Clip3(p0-3*t C ,p0+3*t C ,(p2+2*p1+2*p0+2*q0+q1+4)>>3)
[0380] p1′=Clip3(p1-2*t C ,p1+2*t C ,(p2+p1+p0+q0+2)>>2)
[0381] p2′=Clip3(p2-1*t C ,p2+1*t C ,(2*p3+3*p2+p1+p0+q0+4)>>3)
[0382] q0′=Clip3(q0-3*t C ,q0+3*t C ,(p1+2*p0+2*q0+2*q1+q2+4)>>3)
[0383] q1′=Clip3(q1-2*t C ,q1+2*t C ,(p0+q0+q1+q2+2)>>2)
[0384] q2′=Clip3(q2-1*t C ,q2+1*t C ,(p0+q0+q1+3*q2+2*q3+4)>>3)
[0385] Otherwise (when the value of dE is not 2 or the values of nDp and nDq are not 3), when the values of nDp and nDq are both 0 and the value of Abs(Δ) is less than t C *10, weak filtering can be applied as follows. Here, the Δ value can be determined as shown in the following formula.
[0386] [Equation 31]
[0387] Δ=(9*(q0-p0)-3*(q1-p1)+8)>>4
[0388] First, the filtered sample values p0' and q0' may be calculated as follows.
[0389] [Formula 32]
[0390] Δ=Clip3(-t C ,t C ,Δ)
[0391] p0′=Clip1(p0+Δ)
[0392] q0′=Clip1(q0-Δ)
[0393] In this case, when the value of dEp is 1, p1′ can be calculated as follows.
[0394] [Formula 33]
[0395] Δp=Clip3(-(t C >>1),t C >>1,(((p2+p0+1)>>1)-p1+Δ)>>1) (1388)
[0396] p1′=Clip1(p1+Δp)
[0397] In this case, when the value of dEq is 1, q1′ can be calculated as follows.
[0398] Δq=Clip3(-(t C >>1),t C >>1,(((q2+q0+1)>>1)-q1-Δ)>>1)
[0399] q1′=Clip1(q1+Δq)
[0400] Next, nDp may be set to dEp+1, and nDq may be set to dEq+1.
[0401] When the value of nDp is greater than 0, the encoding / decoding device may utilize samples (eg, p i ') replaces the samples of the P block. Here, i can have a value from 0 to maxFilterLengthP-1. For example, the decoding device can replace the samples according to the following formula.
[0402] [Equation 34]
[0403] recPicture[xCb+xBl-i-1][yCb+yBl+k]=p i '
[0404] In addition, when the value of nDq is greater than 0, the encoding / decoding device may utilize samples (eg, q j') replaces the samples of the Q block. Here, j can have a value from 0 to maxFilterLengthQ-1. For example, the decoding device can replace the samples according to the following formula.
[0405] [Formula 35]
[0406] recPicture[xCb+xBl+j][yCb+yBl+k]=q j '
[0407] In addition, when the prediction mode of the CU including the filter application sample is the palette mode, short filtering may not be applied. In the case of short filtering, short filtering may not be applied by setting the values of parameters nDp and nDq that specify the number of samples to which the filter is applied. For example, when the prediction mode of the CU including p0 is the palette mode (e.g., pred_mode_plt_flag==1), the value of nDp may be set to 0. In the same manner, when the prediction mode of the CU including q0 is the palette mode (e.g., pred_mode_plt_flag==1), the value of nDq may be set to 0.
[0408] Perform a long filter on the luma samples
[0409] When a long filter is applied, the maximum filter length of a P block (e.g., maxFilterLengthP), the maximum filter length of a Q block (e.g., maxFilterLengthQ), the sample value of a P block (e.g., p i,k ), the sample values of the Q blocks (e.g., q j,k ) and the predetermined parameters for the filter application can be used as input for the long filter. Here, for p i,k and q j,k , i can have a value from 0 to maxFilterLengthP, and j can have a value from 0 to maxFilterLengthQ.
[0410] When a long filter is applied, a sample value p to which the long filter is applied may be generated i 'and q j '. For example, the sample value p of the long filter is applied i 'and q j ' can be derived as shown below.
[0411] [Equation 36]
[0412] p i ′=Clip3(p i -(t C *t C PD i >>1),p i +(tC *t C PD i >>1),(refMiddle*f i +refP*(64-f i )+32)>>6)
[0413] q j ′=Clip3(q j -(t C *t C QD j >>1),q j +(t C *t C QD j >>1),(refMiddle*g j +refQ*(64-g j )+32)>>6)
[0414] Among them, f i ,t C PD i , g j ,t C QD j and refMiddle are filter coefficients for long filtering and may be set as follows when the value of maxFilterLengthQ is 7 and the value of maxFilterLengthP is 5, and the following example may be changed according to changes in input variables.
[0415] [Formula 37]
[0416] refMiddle=(p5+p4+p3+p2+2*(p1+p0+q0+q1)+q2+q3+q4+q5+8)>>4
[0417] refP=(p maxFilterLengtP +p maxFilterLengthP-1 +1)>>1
[0418] refQ=(q maxFilterLengtQ +q maxFilterLengthQ-1 +1)>>1
[0419] f 0..4 ={58,45,32,19,6}
[0420] t C PD 0..4 ={6,5,4,3,2}
[0421] g 0..6 ={59,50,41,32,23,14,5}
[0422] t C QD 0..6 ={6,5,4,3,2,1,1}
[0423] The encoding / decoding device may utilize the samples (eg, p i ') replaces the samples of the P block. For example, the decoding device may replace the samples according to the following formula. Here, i may have a value of 0 to maxFilterLengthP-1.
[0424] [Equation 38]
[0425] recPicture[xCb+xBl-i-1][yCb+yBl+k]=p i '
[0426] In addition, the encoding / decoding device may replace the samples of the Q block (eg, q j '). For example, the decoding device may replace samples according to the following formula. Here, j may have a value of 0 to maxFilterLengthQ-1.
[0427] [Equation 39]
[0428] recPicture[xCb+xBl+j][yCb+yBl+k]=q j '
[0429] In addition, when the prediction mode of the CU including the filter application sample is the palette mode, the long filter may not be applied. In the case of the long filter, the long filter may not be applied by setting the filter application sample value back to the original sample value. i When the prediction mode of the CU is the palette mode (for example, pred_mode_plt_flag==1), p i The value of ′ can be set to p i Here, i can have a value from 0 to maxFilterLengthP-1. In the same way, when q is included j When the prediction mode of the CU is the palette mode (for example, pred_mode_plt_flag==1), q j The value of ' can be set to q j Here, j can have a value from 0 to maxFilterLengthQ-1.
[0430] Perform filtering on chroma samples
[0431] In an embodiment, the reconstructed samples for applying chroma filtering to the vertical boundary may be specified as shown below. Here, i may have a value of 0 to the maximum filter length of the P block (e.g., maxFilterLengthP), j may have a value of 0 to the maximum filter length of the Q block (e.g., maxFilterLengthQ), and k may have a value of 0 to maxK.
[0432] [Formula 40]
[0433] q j,k =recPicture[xCb+xBl+j][yCb+yBl+k]
[0434] p i,k =recPicture[xCb+xBl-i-1][yCb+yBl+k]
[0435] The reconstructed samples with chroma filtering applied to horizontal boundaries can be specified as shown below.
[0436] [Formula 41]
[0437] q j,k =recPicture[xCb+xBl+k][yCb+yBl+j]
[0438] p i,k =recPicture[xCb+xBl+k][yCb+yBl-i-1]
[0439] When the boundary type is a vertical boundary, maxK can be determined according to the following formula.
[0440] [Formula 42]
[0441] maxK=(SubHeightC==1)? 3:1
[0442] When the boundary type is a horizontal boundary, maxK can be determined according to the following formula.
[0443] [Formula 43]
[0444] maxK=(SubWidthC==1)? 3:1
[0445] Hereinafter, the application of the chroma sample filter to the vertical boundary will be described. i 'and q j ', the maximum filter length of the P block (eg, maxFilterLengthP), the maximum filter length of the Q block (eg, maxFilterLengthQ), the sample value of the P block (eg, p i,k), the sample values of the Q blocks (e.g., q j,k ) and the predetermined control parameters for the filter application. Here, for p i,k and q j,k , i can have a value from 0 to maxFilterLengthP, and j can have a value from 0 to maxFilterLengthQ.
[0446] When a chroma filter is applied, a sample value p to which the chroma filter is applied may be generated. i 'and q j Here, i may have a value of 0 to maxFilterLengthP-1. In addition, j may have a value of 0 to maxFilterLengthQ-1. In an embodiment, the chroma sample filtering result value p i 'and q j ' can be calculated as follows.
[0447] [Formula 44]
[0448] Δ=Clip3(-t C ,t C ,((((q0-p0)<<2)+p1-q1+4)>>3))
[0449] p0′=Clip1(p0+Δ)
[0450] q0′=Clip1(q0-Δ)
[0451] The encoding / decoding device may utilize the samples (eg, p i ',q j ') replaces the samples of the P block and the Q block. For example, when the boundary type is a vertical boundary, the decoding device can replace the samples according to the following formula.
[0452] [Formula 45]
[0453] recPicture[xCb+xBl+j][yCb+yBl+k]=q j '
[0454] recPicture[xCb+xBl-i-1][yCb+yBl+k]=p i '
[0455] In addition, when the prediction mode of the CU including the filter application sample is the palette mode, chroma filtering may not be applied. In the case of chroma filtering, chroma filtering may not be applied by setting the filter application sample value back to the original sample value. iWhen the prediction mode of the CU is the palette mode (for example, pred_mode_plt_flag==1), p i The value of ′ can be set to p i Here, i can have a value from 0 to maxFilterLengthP-1. In the same way, when q is included j When the prediction mode of the CU is the palette mode (for example, pred_mode_plt_flag==1), q j The value of ' can be set to q j Here, j can have a value from 0 to maxFilterLengthQ-1.
[0456] Encoding and decoding methods
[0457] Below, we will refer to Fig.26 A method for performing deblocking filtering in a process of performing encoding by an encoding device according to an embodiment and a method for performing deblocking filtering in a process of performing decoding by a decoding device using the above method are described. The encoding device and the decoding device according to the embodiment may include a memory and at least one processor. At least one processor may perform the following method. The following description will be given with reference to the decoding device and can also be used in the process of generating a reconstructed picture from the encoded data.
[0458] First, the decoding device can generate a reconstructed block of the current block according to the above-mentioned decoding method (S2610). Next, the decoding device can determine the target boundary of the reconstructed block according to the above-mentioned target boundary determination method (S2620). Next, the decoding device can determine the first target block and the second target block based on the samples adjacent to the target boundary (S2630). The samples adjacent to the target boundary may include a first sample and a second sample adjacent to each other and interposed with the target boundary, the first target block may belong to the first sample, and the second target block may belong to the second sample. In this case, the samples adjacent to the target boundary may be luminance component samples or chrominance component samples.
[0459] Next, the decoding apparatus may perform deblocking filtering on samples adjacent to the target boundary based on the prediction mode of at least one of the first target block or the second target block ( S2640 ).
[0460] In this case, when the prediction mode of at least one of the first target block or the second target block is the palette mode, the values of samples adjacent to the target boundary may not change. In this case, based on a palette mode flag (e.g., pred_mode_plt_flag) obtained from the bitstream, it may be determined whether the prediction mode of at least one of the first target block or the second target block is the palette mode.
[0461] For example, whether to perform deblocking filtering may be determined based on the prediction mode of the first target block, and when the prediction mode of the first target block is the palette mode, deblocking filtering is not performed on samples belonging to the first target block.
[0462] More specifically, whether to perform deblocking filtering can be determined based on the boundary strength of the target boundary. In this case, when the boundary strength is a first value, it can be determined that deblocking filtering is not performed on samples adjacent to the target boundary. In this embodiment, when the prediction mode of the first target block and the second target block is a palette mode, the boundary strength can be determined as a first value. Alternatively, when the prediction mode of either the first target block or the second target block is a palette mode, the boundary strength can be determined as a first value. By processing in this way, when the palette mode is applied to the CU including the samples to be filtered, deblocking filtering may not be performed.
[0463] Alternatively, whether the values of samples belonging to the first target block are updated can be determined based on the prediction mode of the first target block, and when the prediction mode of the first target block is the palette mode, the values of samples belonging to the first target block may not be updated to values to which deblocking filtering is applied.
[0464] In an embodiment, before determining whether to change the value of the sample belonging to the first target block, the value to which the deblocking filter is applied may be generated by applying the deblocking filter to the sample belonging to the first target block, and the value of the sample belonging to the first target block may be updated to the value to which the deblocking filter is applied according to the predetermined number of samples to be updated. In this case, by setting the predetermined number of samples to be updated (e.g., the number of samples for which the value of the sample belonging to the first target block is updated to the value to which the deblocking filter is applied) to 0, the value of the sample belonging to the first target block may not be updated.
[0465] In another embodiment, there may be a situation where the target sample is always updated to the sample value to which the deblocking filter is applied. Even in this case, when the prediction mode of the first target block is the palette mode, the following processing may be performed so that the value of the sample belonging to the first target block is not updated to the value to which the deblocking filter is applied. For example, after determining the sample value to which the deblocking filter is applied, by applying the deblocking filter to the sample belonging to the first target block, when the prediction mode of the first target block is the palette mode, the sample value to which the deblocking filter is applied may be updated to the value of the sample belonging to the first target block (e.g., the value before the filter is applied). Thereafter, by updating the value of the sample belonging to the first target block to the sample value to which the updated filter is applied (e.g., the value of the sample before the filter is applied), the value of the sample belonging to the first target block may be substantially unchanged.
[0466] Application Implementation
[0467] Although for the sake of clarity of description, the exemplary method of the present disclosure described above is represented as a series of operations, it is not intended to limit the order of executing the steps, and these steps can be performed simultaneously or in different orders when necessary. In order to implement the method according to the present invention, the steps described may further include other steps, may include the remaining steps except some steps, or may include other additional steps except some steps.
[0468] In the present disclosure, an image encoding device or an image decoding device that performs a predetermined operation (step) may perform an operation (step) of confirming an execution condition or situation of the corresponding operation (step). For example, if it is described that a predetermined operation is performed when a predetermined condition is met, the image encoding device or the image decoding device may perform the predetermined operation after determining whether the predetermined condition is met.
[0469] The various embodiments of the present disclosure are not a list of all possible combinations and are intended to describe representative aspects of the present disclosure, and matters described in the various embodiments may be applied independently or in combination of two or more.
[0470] Various embodiments of the present disclosure may be implemented in hardware, firmware, software or a combination thereof. In the case of implementing the present disclosure in hardware, the present disclosure may be implemented in an application specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a general purpose processor, a controller, a microcontroller, a microprocessor, etc.
[0471] In addition, the image decoding device and the image encoding device to which the embodiments of the present disclosure are applied may be included in a multimedia broadcast transmission and reception device, a mobile communication terminal, a home theater video device, a digital theater video device, a surveillance camera, a video chat device, a real-time communication device such as video communication, a mobile streaming device, a storage medium, a camera, a video on demand (VoD) service provider, an OTT video (over the top video) device, an Internet streaming service provider, a three-dimensional (3D) video device, a video phone video device, a medical video device, etc., and may be used to process a video signal or a data signal. For example, an OTT video device may include a game console, a Blu-ray player, an Internet access TV, a home theater system, a smart phone, a tablet PC, a digital video recorder (DVR), etc.
[0472] Fig. 27 is a diagram showing a content streaming system to which an embodiment of the present disclosure can be applied.
[0473] like Fig. 27As shown in , a content streaming system to which the embodiments of the present disclosure are applied may mainly include an encoding server, a streaming server, a network server, a media storage device, a user device, and a multimedia input device.
[0474] The encoding server compresses the content input from a multimedia input device such as a smart phone, camera, or camcorder into digital data to generate a bitstream and sends the bitstream to the streaming server. As another example, when a multimedia input device such as a smart phone, camera, or camcorder directly generates a bitstream, the encoding server can be omitted.
[0475] The bitstream may be generated by the image encoding method or the image encoding device to which the embodiments of the present disclosure are applied, and the streaming server may temporarily store the bitstream in the process of transmitting or receiving the bitstream.
[0476] The streaming server sends multimedia data to the user device based on the user's request through the network server, and the network server is used as a medium to inform the user of the service. When the user requests the required service from the network server, the network server can deliver it to the streaming server, and the streaming server can send the multimedia data to the user. In this case, the content streaming system may include a separate control server. In this case, the control server is used to control the command / response between the devices in the content streaming system.
[0477] The streaming server may receive content from a media storage device and / or an encoding server. For example, when receiving content from an encoding server, the content may be received in real time. In this case, in order to provide a smooth streaming service, the streaming server may store the bitstream within a predetermined time.
[0478] Examples of user devices may include mobile phones, smart phones, laptop computers, digital broadcast terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation devices, slate PCs, tablet PCs, ultrabooks, wearable devices (e.g., smart watches, smart glasses, head-mounted displays), digital televisions, desktop computers, digital signage, etc.
[0479] Each server in the content streaming system may operate as a distributed server, in which case data received from each server may be distributed.
[0480] The scope of the present disclosure includes software or machine-executable commands (e.g., operating systems, applications, firmware, programs, etc.) for enabling operations of methods according to various embodiments to be performed on a device or computer, and non-transitory computer-readable media having such software or commands stored thereon and executable on a device or computer.
[0481] Industrial Applicability
[0482] The embodiments of the present disclosure may be used to encode or decode an image.
Claims
1. An image decoding method performed by an image decoding device, the image decoding method comprising the following steps: deriving a target boundary of a deblocking filter in a reconstructed picture; performing filtering on one or more object samples adjacent to the object boundary by applying the deblocking filter to the object boundary; as well as The number of filtered target samples or the value of each filtered target sample is changed based on whether a prediction mode of a target block including the target sample is a palette mode.
2. The image decoding method according to claim 1, in, Based on the target boundary being a vertical boundary, the target block includes a first block adjacent to a left side of the target boundary and a second block adjacent to a right side of the target boundary, and Therein, the step of changing the number of the filtered target samples or the value of each of the filtered target samples is performed separately for the first block and the second block.
3. The image decoding method according to claim 1, in, Based on the target boundary being a horizontal boundary, the target block includes a third block adjacent to an upper side of the target boundary and a fourth block adjacent to a lower side of the target boundary, and Therein, the step of changing the number of the filtered target samples or the value of each of the filtered target samples is performed separately for the third block and the fourth block.
4. The image decoding method according to claim 1, in, The deblocking filter is determined to be one of a first luminance filter having a first filter length, a second luminance filter having a second filter length longer than the first filter length, or a chrominance filter.
5. The image decoding method according to claim 4, in, Based on the deblocking filter being the first luma filter and the prediction mode of the target block being the palette mode, the number of the filtered target samples is changed to 0.
6. The image decoding method according to claim 4, in, Based on the deblocking filter being the second luma filter and the prediction mode of the target block being the palette mode, the values of the respective filtered target samples are changed to values of the respective target samples before the filtering.
7. The image decoding method according to claim 1, in, Whether the prediction mode of the target block is the palette mode is determined based on a palette mode flag obtained from a bitstream.
8. An image encoding method performed by an image encoding device, the image encoding method comprising the following steps: deriving a target boundary of a deblocking filter in a reconstructed picture; performing filtering on one or more object samples adjacent to the object boundary by applying the deblocking filter to the object boundary; as well as The number of filtered target samples or the value of each filtered target sample is changed based on whether a prediction mode of a target block including the target sample is a palette mode.
9. The image encoding method according to claim 8, in, Based on the target boundary being a vertical boundary, the target block includes a first block adjacent to a left side of the target boundary and a second block adjacent to a right side of the target boundary, and Therein, the step of changing the number of the filtered target samples or the value of each of the filtered target samples is performed separately for the first block and the second block.
10. The image encoding method according to claim 8, in, Based on the target boundary being a horizontal boundary, the target block includes a third block adjacent to an upper side of the target boundary and a fourth block adjacent to a lower side of the target boundary, and Therein, the step of changing the number of the filtered target samples or the value of each of the filtered target samples is performed separately for the third block and the fourth block.
11. The image encoding method according to claim 8, in, The deblocking filter is determined to be one of a first luminance filter having a first filter length, a second luminance filter having a second filter length longer than the first filter length, or a chrominance filter.
12. The image encoding method according to claim 11, in, Based on the deblocking filter being the first luma filter and the prediction mode of the target block being the palette mode, the number of the filtered target samples is changed to 0.
13. The image encoding method according to claim 11, in, Based on the deblocking filter being the second luma filter and the prediction mode of the target block being the palette mode, the values of the respective filtered target samples are changed to values of the respective target samples before the filtering.
14. The image encoding method according to claim 8, in, A palette mode flag specifying whether the prediction mode of the target block is the palette mode is encoded into the bitstream.
15. A non-transitory computer-readable recording medium storing a bit stream generated by an image encoding method, the image encoding method comprising the steps of: deriving a target boundary of a deblocking filter in a reconstructed picture; performing filtering on one or more object samples adjacent to the object boundary by applying the deblocking filter to the object boundary; as well as The number of filtered target samples or the value of each filtered target sample is changed based on whether a prediction mode of a target block including the target sample is a palette mode.
16. A method for transmitting a bit stream, wherein the bit stream is generated by an image coding method, the image coding method comprising the following steps: deriving a target boundary of a deblocking filter in a reconstructed picture; performing filtering on one or more object samples adjacent to the object boundary by applying the deblocking filter to the object boundary; as well as The number of filtered target samples or the value of each filtered target sample is changed based on whether a prediction mode of a target block including the target sample is a palette mode.