WO2021194283A1 - Method and device for processing video signal - Google Patents

Method and device for processing video signal Download PDF

Info

Publication number
WO2021194283A1
WO2021194283A1 PCT/KR2021/003725 KR2021003725W WO2021194283A1 WO 2021194283 A1 WO2021194283 A1 WO 2021194283A1 KR 2021003725 W KR2021003725 W KR 2021003725W WO 2021194283 A1 WO2021194283 A1 WO 2021194283A1
Authority
WO
WIPO (PCT)
Prior art keywords
palette
block
pixel
current block
value
Prior art date
Application number
PCT/KR2021/003725
Other languages
French (fr)
Korean (ko)
Inventor
임성원
Original Assignee
주식회사 케이티
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 주식회사 케이티 filed Critical 주식회사 케이티
Publication of WO2021194283A1 publication Critical patent/WO2021194283A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/57Motion estimation characterised by a search window with variable size or shape
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • H04N19/137Motion inside a coding unit, e.g. average field, frame or block difference
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards

Definitions

  • the present disclosure relates to a video signal processing method and apparatus.
  • HD High Definition
  • UHD Ultra High Definition
  • Inter-screen prediction technology that predicts pixel values included in the current picture from pictures before or after the current picture with image compression technology
  • intra-picture prediction technology that predicts pixel values included in the current picture using pixel information in the current picture
  • Various techniques exist such as entropy encoding technology in which a short code is assigned to a value with a high frequency of occurrence and a long code is assigned to a value with a low frequency of occurrence.
  • An object of the present disclosure is to provide a method and apparatus for intra prediction in encoding/decoding a video signal.
  • An object of the present disclosure is to provide a method and apparatus for intra prediction based on a palette mode in encoding/decoding a video signal.
  • An object of the present disclosure is to provide a method and apparatus for applying a palette mode under a lossless coding technique in encoding/decoding a video signal.
  • the video signal decoding method includes the steps of determining whether lossless coding is applied, when the lossless coding is applied, determining whether palette prediction is applied to the current block, the palette table for the current block and, based on the palette table, reconstructing pixels in the current block.
  • the video signal encoding method includes the steps of determining whether lossless encoding is applied, determining whether palette prediction is applied to a current block when the lossless encoding is applied, and a palette table for the current block and encoding the pixels in the current block based on the palette table.
  • the size of the palette table when lossless coding is applied to the current block and when lossy coding is applied to the current block, the size of the palette table may be different.
  • difference information indicating a difference between the size of the palette table when the lossy coding is applied and the size of the palette table when the lossless coding is applied is decoded from a bitstream can be
  • the escape mode is applied to all pixels in the current block.
  • escape value information for a pixel in the current block may be decoded from a bitstream.
  • the escape value information may indicate a difference between an escape value and an escape predicted value.
  • the escape prediction value may be derived based on an intra prediction mode or a block vector of the current block.
  • the palette table of the current block by configuring the palette table of the current block based on the previous palette table, it is possible to improve the encoding/decoding efficiency of the palette mode.
  • encoding/decoding efficiency of the palette mode can be improved by adaptively using the scan order of the palette mode.
  • FIG. 1 is a block diagram illustrating an image encoding apparatus according to an embodiment of the present disclosure.
  • FIG. 2 is a block diagram illustrating an image decoding apparatus according to an embodiment of the present disclosure.
  • 3 and 4 illustrate a lossless encoding method according to the present disclosure.
  • FIG 5 to 7 are diagrams for explaining the concept of the palette mode (palette mode) according to the present disclosure.
  • FIG. 8 illustrates a method of performing intra prediction based on a palette mode according to the present disclosure.
  • FIG. 9 and 10 show a method of configuring a pallet table according to the present disclosure.
  • 11 is a diagram illustrating an example in which palette entries are added to the palette entry candidate list.
  • FIG. 12 shows an example in which a palette table predefined in an encoder and a decoder is used.
  • FIG. 13 illustrates a method of signaling a palette prediction flag in the form of a binary vector based on run length encoding as an embodiment to which the present disclosure is applied.
  • FIG. 14 illustrates a method of encoding/decoding a palette index according to a scan order according to the present disclosure.
  • 15 is an exemplary diagram for describing a pixel adjacent to a current pixel.
  • 16 shows an example of encoding a run merge flag using context information.
  • 17 is an example showing a range of a context information index.
  • index-related information is encoded in units of a region having a preset size.
  • FIG 19 shows an example in which index-related information is encoded using inter-block dependency.
  • 20 is an exemplary diagram for explaining an aspect of encoding an escape value.
  • 21 shows an example of deriving a difference value with respect to an escape value based on an intra prediction mode.
  • first, second, etc. may be used to describe various elements, but the elements should not be limited by the terms. The above terms are used only for the purpose of distinguishing one component from another. For example, without departing from the scope of the present disclosure, a first component may be referred to as a second component, and similarly, a second component may also be referred to as a first component. and/or includes a combination of a plurality of related listed items or any of a plurality of related listed items.
  • FIG. 1 is a block diagram illustrating an image encoding apparatus according to an embodiment of the present disclosure.
  • the image encoding apparatus 100 includes a picture division unit 110 , prediction units 120 and 125 , a transform unit 130 , a quantization unit 135 , a rearrangement unit 160 , and an entropy encoding unit ( 165 ), an inverse quantization unit 140 , an inverse transform unit 145 , a filter unit 150 , and a memory 155 .
  • each of the constituent units shown in FIG. 1 is independently illustrated to represent different characteristic functions in the image encoding apparatus, and does not mean that each constituent unit is composed of separate hardware or one software constituent unit. That is, each component is listed as each component for convenience of description, and at least two components of each component are combined to form one component, or one component can be divided into a plurality of components to perform a function, and each Integrated embodiments and separate embodiments of the components are also included in the scope of the present disclosure without departing from the essence of the present disclosure.
  • components are not essential components to perform an essential function in the present disclosure, but may be optional components for merely improving performance.
  • the present disclosure may be implemented by including only essential components to implement the essence of the present disclosure, except for components used for performance improvement, and a structure including only essential components excluding optional components used for performance improvement Also included in the scope of the present disclosure.
  • the picture divider 110 may divide the input picture into at least one processing unit.
  • the processing unit may be a prediction unit (PU), a transform unit (TU), or a coding unit (CU).
  • the picture splitter 110 divides one picture into a combination of a plurality of coding units, prediction units, and transformation units, and combines one coding unit, prediction unit, and transformation unit based on a predetermined criterion (eg, a cost function). can be selected to encode the picture.
  • a predetermined criterion eg, a cost function
  • one picture may be divided into a plurality of coding units.
  • a recursive tree structure such as a quad tree, a ternary tree, or a binary tree may be used.
  • a coding unit divided into other coding units with the coding unit as a root may be divided having as many child nodes as the number of the divided coding units.
  • a coding unit that is no longer split according to certain restrictions becomes a leaf node. For example, when it is assumed that quad tree splitting is applied to one coding unit, one coding unit may be split into up to four different coding units.
  • a coding unit may be used as a unit for performing encoding or may be used as a meaning for a unit for performing decoding.
  • a prediction unit may be split in the form of at least one square or rectangle of the same size within one coding unit, and one prediction unit among the split prediction units within one coding unit is a prediction of another. It may be divided to have a shape and/or size different from that of the unit.
  • the transformation unit and the prediction unit may be set to be the same. In this case, after dividing the coding unit into a plurality of transform units, intra prediction may be performed for each transform unit.
  • a coding unit may be divided in a horizontal direction or a vertical direction. The number of transformation units generated by dividing the coding unit may be 2 or 4 according to the size of the coding unit.
  • the prediction units 120 and 125 may include an inter prediction unit 120 performing inter prediction and an intra prediction unit 125 performing intra prediction. Whether to use inter prediction or to perform intra prediction on a coding unit may be determined, and specific information (eg, intra prediction mode, motion vector, reference picture, etc.) according to each prediction method may be determined. In this case, a processing unit in which prediction is performed and a processing unit in which a prediction method and specific content are determined may be different. For example, a prediction method and a prediction mode may be determined in a coding unit, and prediction may be performed in a prediction unit or a transformation unit. A residual value (residual block) between the generated prediction block and the original block may be input to the transform unit 130 . Also, prediction mode information, motion vector information, etc.
  • the entropy encoder 165 may be encoded by the entropy encoder 165 together with the residual value and transmitted to the decoding apparatus.
  • a specific encoding mode it is also possible to encode the original block as it is without generating the prediction block through the prediction units 120 and 125 and transmit it to the decoder.
  • the inter prediction unit 120 may predict a prediction unit based on information on at least one of a picture before or after a picture of the current picture, and in some cases, prediction based on information of a partial region in the current picture that has been encoded Units can also be predicted.
  • the inter prediction unit 120 may include a reference picture interpolator, a motion prediction unit, and a motion compensator.
  • the reference picture interpolator may receive reference picture information from the memory 155 and generate pixel information of integer pixels or less in the reference picture.
  • a DCT-based 8-tap interpolation filter (DCT-based Interpolation Filter) with different filter coefficients may be used to generate pixel information of integer pixels or less in units of 1/4 pixels.
  • a DCT-based 4-tap interpolation filter in which filter coefficients are different to generate pixel information of integer pixels or less in units of 1/8 pixels may be used.
  • the motion prediction unit may perform motion prediction based on the reference picture interpolated by the reference picture interpolator.
  • various methods such as Full search-based Block Matching Algorithm (FBMA), Three Step Search (TSS), and New Three-Step Search Algorithm (NTS) may be used.
  • the motion vector may have a motion vector value of 1/2 or 1/4 pixel unit based on the interpolated pixel.
  • the motion prediction unit may predict the current prediction unit by using a different motion prediction method.
  • Various methods such as a skip method, a merge method, an AMVP (Advanced Motion Vector Prediction) method, an intra block copy method, etc., may be used as the motion prediction method.
  • the intra prediction unit 125 may generate a prediction block based on reference pixel information that is pixel information in the current picture.
  • Reference pixel information may be derived from a selected one of a plurality of reference pixel lines.
  • An Nth reference pixel line among the plurality of reference pixel lines may include left pixels having an x-axis difference of N from an upper-left pixel in the current block and upper pixels having an y-axis difference of N from the upper-left pixel.
  • the number of reference pixel lines that the current block can select may be one, two, three, or four.
  • a reference pixel included in the block on which inter prediction is performed is a reference pixel of the block on which intra prediction has been performed.
  • information can be used instead. That is, when the reference pixel is not available, the unavailable reference pixel information may be replaced with information of at least one of the available reference pixels.
  • the prediction mode may have a directional prediction mode in which reference pixel information is used according to a prediction direction and a non-directional mode in which directional information is not used when prediction is performed.
  • a mode for predicting luminance information and a mode for predicting chrominance information may be different, and intra prediction mode information used for predicting luminance information or predicted luminance signal information may be utilized to predict chrominance information.
  • intra prediction When intra prediction is performed, if the size of the prediction unit and the size of the transformation unit are the same, intra prediction for the prediction unit based on the pixel present on the left side, the pixel present on the upper left side, and the pixel present on the upper side of the prediction unit can be performed.
  • the intra prediction method may generate a prediction block after applying a smoothing filter to a reference pixel according to a prediction mode. Whether to apply the smoothing filter may be determined according to the selected reference pixel line.
  • the intra prediction mode of the current prediction unit may be predicted from the intra prediction mode of the prediction unit existing around the current prediction unit.
  • the prediction mode of the current prediction unit is predicted using the mode information predicted from the neighboring prediction unit, if the intra prediction mode of the current prediction unit and the neighboring prediction unit are the same, the current prediction unit and the neighboring prediction unit are used using predetermined flag information It is possible to transmit information that the prediction modes of . , and if the prediction modes of the current prediction unit and the neighboring prediction units are different from each other, entropy encoding may be performed to encode prediction mode information of the current block.
  • a residual block including residual information which is a difference value between a prediction unit and an original block of the prediction unit, in which prediction is performed based on the prediction unit generated by the prediction units 120 and 125 may be generated.
  • the generated residual block may be input to the transform unit 130 .
  • the transform unit 130 converts the original block and the residual block including residual information of the prediction unit generated by the prediction units 120 and 125 to DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), KLT and It can be converted using the same conversion method. Whether to apply DCT, DST, or KLT to transform the residual block is based on at least one of the size of the transform unit, the shape of the transform unit, the prediction mode of the prediction unit, or the intra prediction mode information of the prediction unit. can decide
  • the quantizer 135 may quantize the values transformed by the transform unit 130 into the frequency domain.
  • the quantization coefficient may change according to blocks or the importance of an image.
  • the value calculated by the quantization unit 135 may be provided to the inverse quantization unit 140 and the rearrangement unit 160 .
  • the rearrangement unit 160 may rearrange the coefficient values on the quantized residual values.
  • the reordering unit 160 may change the two-dimensional block form coefficient into a one-dimensional vector form through a coefficient scanning method.
  • the rearranging unit 160 may use a Zig-Zag Scan method to scan from DC coefficients to coefficients in a high-frequency region and change them into a one-dimensional vector form.
  • a zig-zag scan instead of a zig-zag scan, a vertical scan that scans a two-dimensional block shape coefficient in a column direction, a horizontal scan that scans a two-dimensional block shape coefficient in a row direction, or a two-dimensional block
  • a diagonal scan that scans the shape coefficients in the diagonal direction may be used. That is, it may be determined whether any of the zig-zag scan, vertical scan, horizontal scan, or diagonal scan is to be used according to the size of the transform unit and the intra prediction mode.
  • the entropy encoding unit 165 may perform entropy encoding based on the values calculated by the reordering unit 160 .
  • various encoding methods such as Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC) may be used.
  • the entropy encoding unit 165 receives the residual value coefficient information and block type information, prediction mode information, division unit information, prediction unit information and transmission unit information, motion of the coding unit from the reordering unit 160 and the prediction units 120 and 125 .
  • Various information such as vector information, reference frame information, interpolation information of a block, and filtering information may be encoded.
  • the entropy encoder 165 may entropy-encode the coefficient values of the coding units input from the reordering unit 160 .
  • the inverse quantizer 140 and the inverse transform unit 145 inversely quantize the values quantized by the quantizer 135 and inversely transform the values transformed by the transform unit 130 .
  • the residual values generated by the inverse quantizer 140 and the inverse transform unit 145 are combined with the prediction units predicted through the motion estimation unit, the motion compensator, and the intra prediction unit included in the prediction units 120 and 125 and restored. You can create a Reconstructed Block.
  • the filter unit 150 may include at least one of a deblocking filter, an offset correcting unit, and an adaptive loop filter (ALF).
  • a deblocking filter may include at least one of a deblocking filter, an offset correcting unit, and an adaptive loop filter (ALF).
  • ALF adaptive loop filter
  • the deblocking filter may remove block distortion caused by the boundary between blocks in the reconstructed picture.
  • it may be determined whether to apply the deblocking filter to the current block based on pixels included in several columns or rows included in the block.
  • a strong filter or a weak filter can be applied according to the required deblocking filtering strength.
  • horizontal filtering and vertical filtering may be concurrently processed when performing vertical filtering and horizontal filtering.
  • the offset correcting unit may correct an offset from the original image in units of pixels with respect to the image on which the deblocking has been performed.
  • a method of dividing pixels included in an image into a certain number of regions, determining the region to be offset and applying the offset to the region, or taking edge information of each pixel into consideration can be used to apply
  • Adaptive loop filtering may be performed based on a value obtained by comparing the filtered reconstructed image and the original image. After dividing the pixels included in the image into a predetermined group, one filter to be applied to the corresponding group is determined, and filtering can be performed differentially for each group.
  • the luminance signal may be transmitted for each coding unit (CU), and the shape and filter coefficients of the ALF filter to be applied may vary according to each block.
  • the ALF filter of the same type may be applied regardless of the characteristics of the target block.
  • the memory 155 may store the reconstructed block or picture calculated through the filter unit 150 , and the stored reconstructed block or picture may be provided to the predictors 120 and 125 when inter prediction is performed.
  • FIG. 2 is a block diagram illustrating an image decoding apparatus according to an embodiment of the present disclosure.
  • the image decoding apparatus 200 includes an entropy decoding unit 210, a reordering unit 215, an inverse quantization unit 220, an inverse transform unit 225, prediction units 230 and 235, and a filter unit ( 240) and a memory 245 may be included.
  • the input bitstream may be decoded by a procedure opposite to that of the image encoding apparatus.
  • the entropy decoding unit 210 may perform entropy decoding in a procedure opposite to that performed by the entropy encoding unit of the image encoding apparatus. For example, various methods such as Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC) may be applied corresponding to the method performed by the image encoding apparatus.
  • various methods such as Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC) may be applied corresponding to the method performed by the image encoding apparatus.
  • CAVLC Context-Adaptive Variable Length Coding
  • CABAC Context-Adaptive Binary Arithmetic Coding
  • the entropy decoding unit 210 may decode information related to intra prediction and inter prediction performed by the encoding apparatus.
  • the reordering unit 215 may perform reordering based on a method of rearranging the entropy-decoded bitstream by the entropy decoding unit 210 by the encoder. Coefficients expressed in the form of a one-dimensional vector may be restored and rearranged as coefficients in the form of a two-dimensional block.
  • the reordering unit 215 may receive information related to coefficient scanning performed by the encoder and perform the reordering by performing a reverse scanning method based on the scanning order performed by the corresponding encoder.
  • the inverse quantization unit 220 may perform inverse quantization based on the quantization parameter provided by the encoding apparatus and the reordered coefficient values of the blocks.
  • the inverse transform unit 225 may perform inverse transforms, ie, inverse DCT, inverse DST, and inverse KLT, on the transforms performed by the transform unit, ie, DCT, DST, and KLT, on the quantization result performed by the image encoding apparatus.
  • Inverse transform may be performed based on a transmission unit determined by the image encoding apparatus.
  • a transformation technique eg, DCT, DST, KLT
  • a transformation technique may be selectively performed according to a plurality of pieces of information such as a prediction method, a size, a shape of a current block, a prediction mode, and an intra prediction direction.
  • the prediction units 230 and 235 may generate a prediction block based on the prediction block generation related information provided from the entropy decoding unit 210 and previously decoded block or picture information provided from the memory 245 .
  • intra prediction when intra prediction is performed in the same manner as in the operation in the image encoding apparatus, when the size of the prediction unit and the size of the transformation unit are the same, the pixel present on the left side of the prediction unit, the pixel present on the upper left side, and the upper Intra prediction is performed on the prediction unit based on the existing pixel, but when the size of the prediction unit and the size of the transformation unit are different when performing intra prediction, intra prediction is performed using the reference pixel based on the transformation unit can do. Also, intra prediction using NxN splitting may be used only for the smallest coding unit.
  • the prediction units 230 and 235 may include a prediction unit determiner, an inter prediction unit, and an intra prediction unit.
  • the prediction unit determining unit receives various information such as prediction unit information input from the entropy decoder 210, prediction mode information of the intra prediction method, and motion prediction related information of the inter prediction method, and divides the prediction unit from the current coding unit, and predicts It may be determined whether the unit performs inter prediction or intra prediction.
  • the inter prediction unit 230 uses information required for inter prediction of the current prediction unit provided from the image encoding apparatus based on information included in at least one of a picture before or after the current picture including the current prediction unit. Inter prediction may be performed on the prediction unit. Alternatively, inter prediction may be performed based on information of a pre-restored partial region in the current picture including the current prediction unit.
  • a motion prediction method of a prediction unit included in a corresponding coding unit based on a coding unit is selected from among skip mode, merge mode, AMVP mode, and intra block copy mode. You can decide which way to go.
  • the intra prediction unit 235 may generate a prediction block based on pixel information in the current picture.
  • intra prediction may be performed based on intra prediction mode information of the prediction unit provided by the image encoding apparatus.
  • the intra prediction unit 235 may include an Adaptive Intra Smoothing (AIS) filter, a reference pixel interpolator, and a DC filter.
  • the AIS filter is a part that performs filtering on the reference pixel of the current block, and may be applied by determining whether to apply the filter according to the prediction mode of the current prediction unit.
  • AIS filtering may be performed on the reference pixel of the current block by using the prediction mode and AIS filter information of the prediction unit provided by the image encoding apparatus.
  • the prediction mode of the current block is a mode in which AIS filtering is not performed, the AIS filter may not be applied.
  • the reference pixel interpolator may interpolate the reference pixel to generate a reference pixel of a pixel unit having an integer value or less.
  • the prediction mode of the current prediction unit is a prediction mode that generates a prediction block without interpolating the reference pixel
  • the reference pixel may not be interpolated.
  • the DC filter may generate the prediction block through filtering when the prediction mode of the current block is the DC mode.
  • the reconstructed block or picture may be provided to the filter unit 240 .
  • the filter unit 240 may include a deblocking filter, an offset correction unit, and an ALF.
  • the deblocking filter of the image decoding apparatus may receive deblocking filter-related information provided from the image encoding apparatus, and the image decoding apparatus may perform deblocking filtering on the corresponding block.
  • the offset correction unit may perform offset correction on the reconstructed image based on the type of offset correction applied to the image during encoding, information on the offset value, and the like.
  • ALF may be applied to a coding unit based on information on whether ALF is applied, ALF coefficient information, etc. provided from the encoding apparatus. Such ALF information may be provided by being included in a specific parameter set.
  • the memory 245 may store the reconstructed picture or block to be used as a reference picture or reference block, and may also provide the reconstructed picture to an output unit.
  • a coding unit is used as a term for a coding unit for convenience of description, but may also be a unit for performing decoding as well as coding.
  • the current block indicates a block to be encoded/decoded, and according to the encoding/decoding step, a coding tree block (or coding tree unit), a coding block (or a coding unit), a transform block (or a transform unit), and a prediction block (or a prediction unit) or a block to which an in-loop filter is applied.
  • a 'unit' may indicate a basic unit for performing a specific encoding/decoding process
  • a 'block' may indicate a pixel array of a predetermined size.
  • 'block' and 'unit' may be used interchangeably.
  • the coding block (coding block) and the coding unit (coding unit) are mutually equivalent.
  • 3 and 4 illustrate a lossless encoding method according to the present disclosure.
  • Image compression can be broadly classified into lossy coding and lossless coding.
  • the biggest difference between the two encodings is the presence or absence of a quantization process.
  • lossy coding greater compression efficiency than lossless coding can be obtained through a quantization process, but data loss may occur.
  • lossless encoding the original data can be maintained as it is, but compression efficiency is lower than that of lossy encoding.
  • reconstructed data different from the original data may be generated (ie, loss occurs). Accordingly, in lossless coding, a quantization process and an in-loop filtering process may be skipped. In this case, if the quantization process is omitted, the transform process for transforming the residual data into frequency domain components becomes meaningless, so that the transform process can be further omitted when lossless coding is applied.
  • information indicating whether lossless encoding is applied must be transmitted to the decoder.
  • information indicating whether lossless encoding is performed may be encoded through an upper header (eg, SPS, PPS, or slice header). If the upper header indicates that lossless encoding has been performed using 1-bit information (flag), the decoder determines that lossless encoding has been performed using the 1-bit information. When it is determined that lossless encoding has been performed, the decoder may omit the quantization and in-loop filtering processes and decode the image.
  • lossless coding it may be determined whether lossless coding is applied in units of sub-pictures, tile units, or coding tree units.
  • a flag for determining a variable lossless_coding for determining whether to use lossless encoding may be signaled through a bitstream.
  • a value of the variable lossless_coding being true indicates that lossless encoding is applied, and a value of the variable lossless_coding being false indicates that lossless encoding is not applied.
  • Variables indicating whether transform, quantization, deblocking filter, SAO, or ALF are used may be defined as t_skip, q_skip, d_skip, s_skip, and a_skip. A value of true of the variables indicates that a corresponding coding process is omitted, and a value of false indicates that a corresponding coding process is not omitted.
  • variable lossless_coding it may be determined whether a flag for determining the values of the variables is signaled through the bitstream. For example, when the value of the variable lossless_coding is true, signaling of a flag for determining the variables t_skip, q_skip, d_skip, s_skip, and a_skip may be omitted. Variables whose encoding is omitted may be estimated as pre-defined values. A pre-defined value may be true.
  • flags for determining variables t_skip, q_skip, d_skip, s_skip, and a_skip may be decoded. Based on whether the value of each variable is true or false, it is possible to determine whether to skip the corresponding coding process.
  • t_skip when the value of lossless_coding is false, at least one of t_skip, q_skip, d_skip, s_skip, and a_skip may be set to true. Accordingly, when values of variables other than the first variable are false, signaling of a flag for determining the value of the first variable may be omitted and the value of the first variable may be set to true. For example, when values of t_skip, q_skip, d_skip, and s_skip are false, encoding of a flag for determining a_skip may be omitted and the variable a_skip may be set to true.
  • lossless_coding may be defined as an internal variable.
  • the value of the internal variable lossless_coding may be determined based on the variables t_skip, q_skip, d_skip, s_skip, and a_skip.
  • a flag for determining a value of each of variables t_skip, q_skip, d_skip, s_skip, and a_skip may be signaled through a bitstream.
  • the variable lossless_coding may be set to true.
  • the variable lossless_coding may be determined to be false.
  • blk_lossless_coding the value of blk_lossless_coding may be set to the value of the variable lossless_coding set in FIG. 3 or FIG. 4 .
  • blk_lossless_coding may be encoded for each block to determine whether to perform lossless encoding in units of blocks.
  • FIG 5 to 7 are diagrams for explaining the concept of the palette mode (palette mode) according to the present disclosure.
  • a current block pixels occurring a lot in a block to be encoded (hereinafter referred to as a current block) are displayed with a specific index, and then the specific index is encoded instead of the pixel and transmitted to the decoding device.
  • a flag indicating whether the palette mode is permitted may be encoded and transmitted to the decoding apparatus.
  • the flag may be coded only when the size of the current block is less than or equal to a preset size.
  • the preset size may be determined based on the slice type of the slice to which the current block belongs, the encoding mode or the prediction mode of the current block. For example, when the current block belongs to the I slice, the palette mode may be used only when the size of the current block is 4x4. When the current block belongs to the B or P slice, the palette mode may be used only when the size of the current block is larger than 4x4 and smaller than 64x64.
  • FIG. 5 is an example of a process of generating a pallet table.
  • the size of the current block is 8x8.
  • a histogram of 64 pixels existing in the current block is shown in FIG. 5 .
  • the horizontal axis indicates a pixel value (for example, a value from 0 to 255 in the case of a pixel quantized to 8 bits), and the vertical axis indicates the frequency of pixel values.
  • a quantization zone is set based on pixels that occur frequently. Pixels existing in the quantization zone are replaced with the pixel with the highest frequency, and one index is assigned to the pixel with the highest frequency.
  • Information indicating the size of the quantization zone may be encoded and transmitted to a decoding apparatus. Alternatively, the size of the quantization zone may be determined based on at least one of the size, shape, and bit depth of the current block.
  • parts represented by thick solid lines in the quantization zone denote pixels a8, a20, a31, and a40 having the highest frequency, and parts denoted by thin solid lines denote other pixels.
  • pixels that are not included in the quantization zone are expressed as escape values, and these values are quantized and encoded in addition to encoding with an index.
  • Figure 6 shows an example for the palette table set in Figure 5.
  • each row of the palette table is expressed as a palette entry, and a different index is assigned to each entry. That is, the size of the palette table may mean the number of entries.
  • An entry is formed using pixels a8, a20, a31, and a40 having the highest frequency in each quantization zone, and an index is assigned to each entry. If an escape value exists, it can be assigned an index by placing the escape at the last entry. That is, the last index in the palette can mean an escape value.
  • FIG. 7 is an example of a process in which pixels in a block are allocated as indexes using a set palette table.
  • the allocated indexes are expressed as palette indexes.
  • Pixels existing in the block are replaced with indexes according to the set palette table, and the indexes are encoded and transmitted to the decoding device.
  • quantized a50' and a62' are additionally encoded in addition to the index.
  • the used palette table is also encoded and transmitted to the decoding device.
  • FIG. 8 illustrates a method of performing intra prediction based on a palette mode according to the present disclosure.
  • the palette mode may be applied on a block-by-block basis (eg, a coding unit, a prediction unit), and for this, flag information (pred_mode_plt_flag) indicating whether to use the palette mode may be signaled on a block-by-block basis. That is, when the value of the flag is 1, the palette mode is applied to the current block, and when the value of the flag is 0, the palette mode is not applied to the current block.
  • a block-by-block basis eg, a coding unit, a prediction unit
  • the flag may be adaptively encoded/decoded based on at least one of a prediction mode of the current block and a size of the current block. For example, the flag may be encoded/decoded only when the prediction mode of the current block is the intra mode. The flag may be encoded/decoded only when the prediction mode of the current block is not a skip mode. The flag may be encoded/decoded only when at least one of a width or a height of the current block is less than or equal to a predetermined first threshold size.
  • the first threshold size is a pre-defined value in the encoding/decoding apparatus, and may be any one of 16, 32, or 64.
  • the flag may be encoded/decoded only when the product of the width and height of the current block is greater than a predetermined second threshold size.
  • the second threshold size is a value pre-defined in the encoding/decoding apparatus, and may be any one of 16, 32, or 64.
  • the first threshold size and the second threshold size may be different values. If any one of the above conditions is not satisfied, the flag is not encoded/decoded, and in this case, the value of the flag may be set to 0.
  • a palette table for the palette mode of the current block may be configured (S800).
  • the palette table may consist of at least one palette entry and a palette index identifying each palette entry.
  • the palette table of the current block may be determined using the palette table of the previous block (hereinafter referred to as the previous palette table).
  • the previous block may mean a block coded or decoded before the current block.
  • the palette entry of the current block may include at least one of a predicted palette entry or a signaled palette entry.
  • the current block may use all or part of the palette entries used by the previous block, and among the palette entries used in the previous block, the palette entry reused in the current block is called a predicted palette entry.
  • the current block can use all of the palette entries in the previous palette table.
  • the current block may use some of the palette entries of the previous palette table, and for this, a flag (PalettePredictorEntryReuseFlag, hereinafter referred to as a palette prediction flag) for specifying whether to reuse the palette entry may be used.
  • the value of the palette prediction flag is assigned to each palette entry of the previous palette table, and the palette prediction flag (PalettePredictorEntryReuseFlag[i]) determines whether the palette entry corresponding to the palette index i in the previous palette table is reused in the palette table of the current block.
  • a palette table of the current block may be constructed by extracting a palette entry having a value of the palette prediction flag of 1 from the previous palette table, and arranging them sequentially.
  • the palette table of the current block may be initialized in units of a predetermined area.
  • the predetermined region may mean a parallel processing region or a CTU row of the current picture.
  • the palette table of the current block may be initialized with the palette table of the neighboring CTU of the CTU to which the current block belongs.
  • the neighboring CTU may mean a CTU located above the CTU to which the current block belongs. That is, the palette table for the first CTU of the N-th CTU row may be initialized based on the palette table for the first CTU of the (N-1)-th CTU row.
  • the initialized palette table may be updated based on the palette table of the previous block belonging to the same CTU row.
  • the palette prediction flag may be signaled in the form of an encoded/decoded flag for each palette entry.
  • the palette prediction flag may be encoded/decoded in the form of a binary vector based on run length encoding. That is, in the palette prediction flag array that specifies whether to reuse the previous palette entry, a syntax palette_predictor_run that specifies the number of palette prediction flags that is 0 between non-zero palette prediction flags may be encoded/decoded. This will be described later.
  • the palette prediction flag values may be directly encoded. This will be described later.
  • the palette table of the current block may further include a palette entry signaled through a bitstream, wherein the signaled palette entry is a palette entry that is not included in the previous palette table among the palette entries used by the current block can mean
  • the signaled palette entry may be added after the predicted palette entry of the palette table.
  • a palette index may be determined in units of pixels of the current block ( S810 ).
  • the current block may determine the palette index using at least one of an index mode (INDEX MODE) or a copy mode (COPY MODE).
  • the index mode may mean a method of encoding the palette index information (palette_idx_idc) in the encoding apparatus to specify the palette index used in the current block.
  • the decoding apparatus may derive the palette index of the current pixel based on the encoded palette index information.
  • the palette index information has a value between 0 and (MaxPaletteIndex-1), where MaxPaletteIndex may mean the size of the palette table of the current block or the number of palette entries constituting the palette table.
  • MaxPaletteIndex may mean the size of the palette table of the current block or the number of palette entries constituting the palette table.
  • the value of the palette index information signaled through the bitstream may be allocated as the palette index of the current pixel.
  • the copy mode may refer to a method of determining the palette index of the current pixel by using the palette index of the neighboring pixel according to a predetermined scan order.
  • a horizontal scan, a vertical scan, a diagonal scan, etc. may be used, and any one of them may be selectively used.
  • a predetermined flag or index may be encoded/decoded.
  • the encoding apparatus encodes the flag as 0 when horizontal scan is applied as the scan order of the current block, and codes the flag as 1 when vertical scan is applied as the scan order of the current block. can do.
  • the decoding apparatus may adaptively determine the scan order of the current block according to the coded flag.
  • the present invention is not limited thereto, and a method of encoding/decoding the palette index according to the scan order will be described later.
  • the palette index of the current pixel may be predicted based on the palette index of the neighboring pixel, or the palette index of the neighboring pixel may be copied and set as the palette index of the current pixel as it is.
  • the neighboring pixel may mean a pixel adjacent to the top, bottom, left, or right of the current pixel.
  • the neighboring pixel may be located on the same horizontal line or the same vertical line as the current pixel.
  • the copy mode is the first copy mode in which the palette index used by the pixel adjacent to the top or bottom of the current pixel is identically used as the palette index of the current pixel, the palette index used by the pixel adjacent to the left or right of the current pixel At least one of a second copy mode that uses the same as the palette index of the current pixel, or a third copy mode that uses the palette index used by diagonally adjacent pixels of the current pixel equally as the palette index of the current pixel can
  • any one of the above-described first to third copy modes may be selectively used according to the scan order of the current block.
  • the first copy mode may be applied when the scan order of the current block is a vertical scan
  • the second copy mode may be applied when the scan order of the current block is a horizontal scan.
  • the scan start position of the current block is not limited to the upper-left pixel of the current block, and other corner pixels of the current block (eg, lower-left pixel, upper-right pixel, and lower-right pixel) may be used as the scan start position.
  • other corner pixels of the current block eg, lower-left pixel, upper-right pixel, and lower-right pixel
  • the same palette index as the pixel adjacent to the top or left may be used as described above, or the same palette index as the pixel adjacent to the bottom or right may be used.
  • the encoding apparatus may encode a flag (run_copy_flag) indicating whether the copy mode is used.
  • the encoding apparatus may encode the flag as 1, otherwise (ie, if the index mode is used), the encoding apparatus may encode the flag as 0.
  • the pixel of the current block may be predicted based on the palette table and the palette index ( S820 ).
  • the value of the palette entry extracted from the palette table may be set as the predicted value or the restored value of the pixel of the current block.
  • the pixel when the palette index indicates the last palette entry among the palette entries in the palette table of the current block, the pixel may be inferred as being encoded in the escape mode (ESCAPE MODE).
  • the escape mode does not use the palette entry of the pre-configured palette table, but instead predicts / restores the pixel based on the additionally signaled palette escape value It can mean a method.
  • a pixel having a palette index equal to (the number of palette entries - 1) may be predicted/restored using the additionally signaled palette escape value.
  • FIG. 9 and 10 show a method of configuring a pallet table according to the present disclosure.
  • the same palette table used in the encoding apparatus must also exist in the decoding apparatus. Therefore, it is necessary to encode the palette table in the encoding device. Therefore, it is possible to encode the number of palette entries existing in the palette table, and to encode the pixel value assigned to each entry.
  • the palette mode was used in the previous block, the amount of bits required to encode the palette table can be greatly reduced by generating the palette table of the current block based on the palette table used in the previous block.
  • the previous block means a block that has been encoded/decoded before the current block. Specifically, at least one of a flag indicating whether to configure the palette table of the current block based on the previous palette table, or a palette prediction flag indicating whether to add an entry included in the palette table of the previous block to the palette table of the current block is available.
  • 9 is a method of reducing the bit amount of a palette table to be currently encoded by using a palette prediction flag.
  • the palette table A may mean a palette table existing in a block encoded using a palette mode before the current block.
  • the previous block may be a neighboring block adjacent to the current block.
  • the neighboring block may include at least one of an upper neighboring block, a left neighboring block, an upper left neighboring block, an upper right neighboring block, or a lower left neighboring block.
  • the palette table A it is possible to specify whether or not to be used as it is in the current palette table by using a palette prediction flag for each entry. For example, if the palette prediction flag is 1, it may mean that the corresponding entry is used as it is in the current palette table, and if 0, it may mean that the corresponding entry is not used in the current palette table.
  • the index allocated to the entries predicted from the palette table A may be set to be the same as the index allocated to the palette table A. Alternatively, the index of each entry in the ascending/descending order of the indexes allocated to each entry in the palette table A may be reassigned.
  • the first entry, the third entry, and the fifth entry are used in the current palette table, so you can put them in order from the first entry to the third entry of the current palette table and configure a new entry only from the fourth entry to the fifth entry. have.
  • the palette prediction flag is encoded first, and the number of remaining entries (two in the example of FIG. 9: the fourth entry and the fifth entry of the current palette table) can be encoded. After that, the remaining entries may be encoded as much as the number of remaining entries.
  • the decoding device can also generate the same palette table as the coding device and predict/restore the current block.
  • information related to the palette table may be encoded and signaled.
  • the size of the palette table may indicate the maximum number of palette entries that the palette table can contain.
  • the size of the palette table may have a fixed value in the encoder and decoder.
  • the bit depth of the current image, the color component of the current block eg, whether it is a luminance component or a chrominance component
  • the size of the current block or Based on at least one of the shapes, the size of the pallet table may be determined.
  • the palette table of the current block may consist of palette entries reused in the previous palette table and palette entries newly added. Information about the reused palette entries constituting the palette table and the newly added palette entries may be encoded and signaled.
  • a palette prediction flag indicating whether a palette entry included in a previous palette table is reused may be encoded.
  • the number of palette entries to be newly added to the palette table may be a value obtained by subtracting the number of palette entries reused from the size of the palette table. For example, if the maximum number of palette entries that the palette table can contain is 40, the sum of the number of reused palette entries and the number of new palette entries cannot exceed 40.
  • the number of palette prediction flags may be set so as not to exceed a threshold value. For example, if the threshold value is 10, for up to 10 of the palette entries included in the previous palette table, it can be determined whether to reuse. Accordingly, a maximum of 10 palette prediction flags may be generated.
  • the number of reused palette entries may be set so that the number of reused palette entries does not exceed a threshold value. That is, the number of palette prediction flags having a value of True may be set so as not to exceed a threshold value.
  • the threshold value may be encoded through an upper header such as a slice, a picture, or a sequence. Alternatively, information for specifying a threshold value for each block may be encoded and signaled.
  • an encoder and a decoder may use a fixed value threshold.
  • the threshold value may be determined based on at least one of a size, a shape, a color component (eg, a luminance component or a chrominance component) of the block, or a bit depth.
  • a size e.g., a size, a shape, a color component (eg, a luminance component or a chrominance component) of the block, or a bit depth.
  • the maximum number of predictions it is possible to limit the number of entries (hereinafter, referred to as the maximum number of predictions) that can be brought by using the palette prediction flag.
  • information on the maximum number of predictions may be signaled through a bitstream.
  • the maximum number of predictions may be determined based on at least one of the size of the palette table, the size/shape of the current block, the size/shape of the previous block, or the size of the previous palette table.
  • an entry from the previous palette table is fetched using the palette prediction flag only as much as a certain percentage of the size of the current palette table, and the remaining ratio may be unconditionally generated from the current palette table. For example, if the size of the current palette table is 6 and the ratio is set to 50%, up to 3 entries from the previous palette table are fetched using the palette prediction flag, and the remaining 3 entries can be created unconditionally from the current palette table. have. Accordingly, when the number of entries having the value of the palette prediction flag of 1 reaches three, encoding of the palette prediction flag may be omitted for subsequent entries.
  • the size of the previous block when the size of the previous block is smaller than a preset threshold, it may be set so that the palette entries included in the palette table of the previous block are not added to the palette table of the current block. That is, when the size of the previous block is smaller than a preset threshold, encoding of the palette entry prediction flag for the palette entries of the previous block may be omitted, and the value may be regarded as 0.
  • the palette entry of the previous block may not be added to the palette table of the current block.
  • the threshold value may be encoded in an upper header and transmitted to a decoder.
  • the encoder and the decoder may use a fixed threshold.
  • the number of palette entries that can be added to the palette table of the current block from the palette table of the previous block may be determined.
  • a method of continuously allocating palette prediction flags using a second previous palette table that is earlier than the first previous palette table is also possible.
  • the encoding order of the palette prediction flag may be determined by considering the indexes of the entries included in the first previous palette table and the entries included in the second previous palette table.
  • the palette prediction flag may be encoded for the entry with index 0 included in the second previous palette table. Then, after encoding the palette prediction flag for the entry with index 1 included in the first previous palette table, it is possible to encode the palette prediction flag for the entry with index 1 included in the second previous palette table.
  • the palette table candidate list may be configured, and at least one of a plurality of previous palette table candidates included in the palette table candidate list may be used when encoding the current palette table.
  • RT denotes a pixel located at the upper right of the block
  • LB denotes a pixel located at the bottom left of the block.
  • the referenced block may be encoded as an index and transmitted to a decoding apparatus.
  • the pre-defined position may be the upper block (B) or the left block (A). In this case, encoding of an index specifying the referenced block may be omitted.
  • the palette table to be currently encoded can be filled by additionally designating a block based on an additional index.
  • the encoding/decoding apparatus may refer to a pre-promised fixed number of blocks, and information specifying the number of referenced blocks may be transmitted through an upper header.
  • a method in which the encoding/decoding apparatus refers to the same fixed number of neighboring blocks according to the size/form of the block and the size of the palette table is also possible.
  • a method of fetching the palette table from the corresponding block by designating M blocks encoded in the palette mode before the current block in the encoding order as indexes is also possible.
  • a method of fetching the palette table from the block by designating the block included in the collocated picture as an index is also possible.
  • a method of constructing a palette table candidate list is also possible. All used palette tables are stored in the candidate list starting from the block existing in the first position of the image until just before the current block. Alternatively, after setting the number N of tables to be stored in the candidate list, the N palette tables are stored in the candidate list. That is, when the encoding of the block is completed, the palette table of the encoded block may be stored in the candidate list. In this case, if the same palette table candidate as the palette table to be added to the candidate list exists, the palette table may not be added to the candidate list. Alternatively, the palette table may be added to the candidate list, and the same palette table candidate as the palette table may be deleted from the candidate list.
  • the method in which the palette table candidates in the candidate list are stored has a higher priority as it is closer to the current block, and may have a lower priority as it is further away from the current block.
  • the priority may be set according to the size or reference frequency of the palette table. According to this priority, when the number of stored tables exceeds N, it can be deleted from the candidate list starting from the palette table with a lower priority.
  • a method of configuring a palette table list separately for each area to be processed in parallel is also possible.
  • the number of palette tables stored in the palette table list may be very small in the initial part of the area. Therefore, it is also possible to fill a preset initial palette table without filling the palette table from the beginning for each area in which parallel processing is performed.
  • the initial palette table may be the palette table of the first CTU of the previous CTU row.
  • the preset initial palette table may be a palette table derived from the entire image, not a palette table derived for each block.
  • each entry value of the palette table derived from the entire image may be encoded through a higher header along with the number of entries.
  • a method of configuring the entries included in the palette table as a palette entry candidate list is also possible. Entries included in the palette table of the encoded block can be added to the entry candidate list. In this case, among the entries included in the palette table, only entries having an index smaller than the threshold may be included in the entry candidate list. When the number of entries included in the palette table of the current block is less than the maximum number, the palette table may be configured with reference to the candidate entries included in the palette entry candidate list.
  • Palette entries included in the palette table of the encoded/decoded block may be added to the palette entry candidate list.
  • the smallest index may be assigned to the newly added palette entries.
  • the existing palette entries may be removed from the palette entry candidate list in the order of the highest index.
  • 11 is a diagram illustrating an example in which palette entries are added to the palette entry candidate list.
  • blocks may be encoded/decoded using the configured palette table.
  • the palette entry candidate list may add palette entries included in the palette table.
  • the above palette entries may be added to the palette entry candidate list.
  • the duplicate palette entry may not be added to the palette entry candidate list.
  • the same palette entry as the palette entry to be added to the palette entry candidate list is already stored in the palette entry candidate list, the previously stored palette entry is removed from the palette entry candidate list, and the duplicate palette entry is removed from the palette entry candidate list can be added to
  • palette entry candidate list In order to reduce the complexity of constructing the palette entry candidate list, only those whose index is less than or equal to a threshold value among palette entries may be added to the palette entry candidate list.
  • the palette entries included in the palette table may not be added to the palette entry candidate list.
  • the palette entries included in the palette table of the block may not be added to the palette entry candidate list. Accordingly, the palette entry included in the palette table of the block in which the number of pixels included in the block is less than or equal to the threshold value cannot be utilized as a prediction palette entry in constructing the palette table of the next block.
  • the palette entries included in the palette table may be added to the palette entry candidate list.
  • the threshold value may be encoded in an upper header and transmitted to a decoder.
  • the encoder and the decoder may use a fixed threshold.
  • the threshold may be a natural number such as 4, 8, 16, or 32.
  • the number of palette entries that can be added to the palette entry candidate list may be determined. For example, if the size of the block is less than or equal to the threshold, a maximum of n palette entries may be added to the palette entry candidate list, whereas if the size of the block is greater than the threshold, a maximum of m palette entries are palette entry candidates can be added to the list.
  • n may be a natural number smaller than m.
  • a palette table predefined in the encoder and the decoder may be used.
  • FIG. 12 shows an example in which a palette table predefined in an encoder and a decoder is used.
  • the predefined palette table means that the size of the palette table and/or pixel values allocated to palette entries are predefined in the encoder and the decoder.
  • an index specifying one of the plurality of palette tables may be encoded and transmitted to the decoder.
  • palette entries after defining only pixel values allocated to each palette entry, only information indicating an index allocation order between palette entries may be encoded.
  • index 0 is assigned to a palette entry having a pixel value of -3
  • index 1 is assigned to a palette entry having a pixel value of +4
  • a pixel value of -4 Index 2 can be assigned to the in-palette entry.
  • the minimum value m in the block may be encoded and transmitted to the decoding apparatus, and an index of each of the palette entries may be determined based on the minimum value m.
  • index 0 may be allocated to the palette entry equal to the minimum value m, and indexes may be allocated in an order similar to the minimum value m.
  • an index assigned to a palette entry having a small difference from the minimum value m may have a smaller value than an index assigned to a palette entry having a large difference from the minimum value m.
  • Whether to use the predefined palette table may be determined based on whether lossless encoding is applied. For example, when lossless encoding is applied, a predefined palette table is used, and when lossless encoding is not applied, the decoder may configure and use the palette table in the same way as the encoder.
  • the method of configuring the palette table may be set differently depending on whether lossless encoding is applied.
  • the above-described palette table may be used to derive a predicted value, a reconstructed value, or a residual value of a sample.
  • a run length encoding method may be used.
  • a continuous sequence of identical data is called a run, and the continuous length is expressed as a run length.
  • a run length For example, if there is a string aaaaaabbccccccc, 6 a, 2 B, and 7 c, so it can be expressed as 6a2b7c.
  • Such an encoding method is called a run-length encoding method.
  • run-length encoding method When encoding the palette prediction flags using run-length encoding, the number of 0's, the number of 1's, etc. can be expressed. Alternatively, run-length encoding may be performed only on 0, and conversely, run-length encoding may be performed on only 1 as well.
  • FIG. 13 illustrates a method of signaling a palette prediction flag in the form of a binary vector based on run length encoding as an embodiment to which the present disclosure is applied.
  • the palette table of the previous block uses 8 palette entries with palette indexes of 0 to 7.
  • the image encoding apparatus determines whether the corresponding palette entry is reused as the palette entry of the current block for each of the palette entries 0 to 7 of the previous block, and if the palette entry is reused as the palette entry of the current block, the corresponding palette
  • the value of the palette prediction flag for the entry can be set to 1, otherwise 0, respectively. For example, as shown in FIG. 13, among the palette entries of the previous block, the palette entries 0, 1, 3, and 7 are reused as the palette entries of the current block, and the remaining palette entries are not reused, A binary vector represented by 11010001 may be generated.
  • encoding at least one of the number of 1s in the binary vector (that is, the number of palette entries reused as the palette entry of the current block among the palette entries of the previous block) or the number of 0s preceding 1 in the binary vector Signaling may be performed by a decoding device.
  • the number of 1s in the binary vector is 4, 4 can be encoded as the number of palette entries of the previous block that is reused as the palette entry of the current block.
  • the number of 0s preceding 1 in the binary vector that is, 0, 0, 1, 3 may be sequentially encoded.
  • the decoding apparatus receives at least one of information (palette_entry_run) about the number of 0's preceding 1 in the binary vector or information about the number of palette entries of the previous block reused as the palette entry of the current block from the encoding device, and It can be used to compose the palette table of the current block.
  • information palette_entry_run
  • the decoding apparatus sequentially extracts information (palette_entry_run), that is, 0, 0, 1, 3 about the number of 0s before 1 in the binary vector, from the bitstream, and using this, the palette entry of the previous block A binary vector indicating whether to reuse or not, that is, 11010001 may be restored. If a value of 1 occurs in the process of restoring a binary vector, the palette entry of the previous block corresponding to the value of 1 may be inserted into the palette table of the current block. Through this process, the palette table of the current block can be configured by selectively reusing some palette entries from the palette table of the previous block.
  • FIG. 14 illustrates a method of encoding/decoding a palette index according to a scan order according to the present disclosure.
  • the palette index assigned to each pixel of the current block must also be encoded. 14 is an example of a scan order performed in a current block.
  • the main purpose of the scan sequence shown in FIG. 14 is to perform scanning in consideration of directionality. As shown in FIG. 14(a) , if characteristics of pixels existing in the current block have similar values in the horizontal or vertical direction, as shown in FIG. 14(a), if the scan is performed, the possibility of clustering among the same indices increases. Alternatively, if characteristics of pixels existing in a block have similar values in the z-direction or diagonal direction as shown in FIG. 14(b) , the probability of clustering among the same indices increases when scanning is performed as shown in FIG. 14(b).
  • the encoding apparatus may indicate which scan method is used as an index, encode it, and transmit it to the decoding apparatus.
  • the scan order may be determined according to the size and shape of the current block.
  • the index for each pixel may be encoded.
  • the index of the current pixel may be derived using run merge encoding.
  • the run merge encoding method represents a method of deriving an index of a current pixel from an index of an adjacent pixel.
  • the adjacent pixel may include at least one of left and right adjacent pixels, an upper adjacent pixel, a lower adjacent pixel, or diagonally adjacent pixels of the current pixel, and the location of the adjacent pixel is determined by the scan applied to the current block. It may be adaptively determined according to the direction.
  • 15 is an exemplary diagram for describing a pixel adjacent to a current pixel.
  • A indicates a current pixel to be encoded
  • B indicates a pixel immediately preceding the current pixel in a scan order
  • C indicates a neighboring pixel adjacent to the current pixel among pixels included in an adjacent line (row/column).
  • the adjacent line may be one of a top row, a bottom row, a left column, or a right column, depending on the scan direction.
  • the run type flag may be set.
  • the run type is 'ABOVE' indicating that the index of the current pixel A is the same as the index of the neighboring pixel (ie, the neighboring pixel C) included in the adjacent line, or 'INDEX' indicating that the index of the current pixel A is encoded as it is. can point to one of them.
  • the value of the run merge flag may be set based on the run type of the previous pixel B and whether the index of the current pixel A is the same as that of the adjacent pixel B or C.
  • the run type of the previous pixel B is 'ABOVE'
  • the value of the run merge flag may be set to 1 (true).
  • the run type of the previous pixel B is 'INDEX' and the indexes of the current pixel A and the previous pixel B are the same
  • the value of the run merge flag may be set to true.
  • the decoder may derive the index of the current pixel with reference to the run type of the previous pixel B.
  • the run type of the previous pixel B is 'ABOVE'
  • the run type 'ABOVE' may be applied to the current pixel A to derive the index of the neighboring pixel C as the index of the current pixel A.
  • the index of the previous pixel B may be derived as the index of the current pixel A.
  • the value of the run merge flag may be set to 0 (false).
  • run type information indicating the run type of the current pixel A may be encoded/decoded.
  • the run type may indicate either 'ABOVE' indicating that the index of the current pixel A is the same as the index of the neighboring pixel C or 'INDEX' in which the index of the current pixel A is encoded as it is.
  • the run type information may be a 1-bit flag or an index specifying one of a plurality of run types. For example, when the syntax run_type indicating the run type indicates 'ABOVE', it indicates that the index of the current pixel A is the same as the index of the neighboring pixel C. In this case, the index of the neighboring pixel C may be derived as the index of the current pixel A.
  • the syntax run_type indicating the run type indicates 'INDEX'
  • palette_idx specifying one of a plurality of palette entries included in the palette table may be encoded/decoded.
  • information for deriving an escape value may be additionally encoded.
  • a pixel located at the top row in the current block does not have a pixel adjacent to the top. Accordingly, with respect to the pixel located in the uppermost row, encoding of run type information may be omitted and it may be estimated that the run type is 'INDEX'.
  • the decoder may derive the index of the current pixel A using the run type information. For example, when the run type information indicates 'ABOVE', the index of the neighboring pixel C may be derived as the index of the current pixel A. On the other hand, when the run type information indicates 'INDEX', index information may be additionally parsed, and the index information of the current pixel A may be derived based on the parsed index information.
  • encoding/decoding of the run merge flag may be omitted. This is because, for the first pixel, there is no previous pixel whose index is coded.
  • the encoding of the run merge flag is omitted, it can be estimated that the value is 0 (false).
  • the index of the current pixel may be derived based on at least one of the syntax run_merge_flag, run_type, and palette_idx.
  • the above syntaxes may be encoded without using context information.
  • a coding method that does not use context information may be defined as bypass coding.
  • At least one of the above syntaxes may be set to be encoded using context information.
  • context information may be referred to.
  • the probability that the value of the run merge flag is 1 or the probability that the value of the run merge flag is 0 may be determined based on the value of the previous run merge flag.
  • 16 shows an example of encoding a run merge flag using context information.
  • a variable PREV_POS indicating the scan order of a pixel having the highest scan order among pixels in which the value of the run merge flag is set to 0 may be used.
  • a context information index value may be derived by differentiating variables PREV_POS and 1, and a run merge flag may be encoded using the derived context information index value.
  • the value of the variable PREV_POS may be set to an initial value (eg, 0). Accordingly, for the first palette prediction flag, the context information index value may be set to -1.
  • variable PREV_POS may be updated.
  • the run merge flag having a value of 1 is encoded, the variable PREV_POS may be maintained as it is.
  • a context information index for a pixel having a scan order of 6 may be set to 2.
  • the probability of the run merge flag may be determined according to the value of the context information index, and the palette prediction flag may be encoded based on the determined probability.
  • variable PREV_POS has been described as indicating the position of a pixel having the run merge flag having a value of 0, but the variable PREV_POS may be set to indicate the position of a pixel having the run merge flag having a value of 1.
  • 17 is an example showing a range of a context information index.
  • the maximum value of the context information index may be set not to exceed a predefined threshold.
  • the value of the context information index may be set to the maximum value. In FIG. 17 , it is illustrated that the maximum value is 4.
  • the minimum value of the context information index does not become less than a predefined threshold.
  • the value of the context information index may be set to the minimum value.
  • the minimum value is exemplified as zero. Accordingly, the context information index for the first pixel may be changed from -1 to 0.
  • the maximum and/or minimum values of the context information index may be defined in the encoder and the decoder. Alternatively, information indicating the maximum and/or minimum values of the context information index may be signaled through the bitstream. For example, the information may be encoded and signaled at a higher level such as a slice, a picture, or a sequence.
  • index-related information may be encoded for each region.
  • index-related information is encoded in units of a region having a preset size.
  • FIG. 18A shows a case where the block size is 16x4, and the example of FIG. 18B shows a case where the block size is 8x8.
  • the block size is 16x4
  • the example of FIG. 18B shows a case where the block size is 8x8.
  • a horizontal scan is applied to a block.
  • a block may be divided into regions of a predefined size. For example, when the predefined size is 16, the block may be divided into a plurality of regions in units of 16 pixels. For example, in the example of FIG. 18A , the block is divided into 16x1 sized regions, and in the example of FIG. 18B , the block is divided into 8x2 sized regions.
  • Index-related information may be encoded for each region. For example, after encoding of the index-related information in the N-th region (eg, at least one of run_merge_flag, run_type, or palette_idx) is completed, the index-related information in the N+1 th region may be encoded. Alternatively, the encoding of index-related information may be parallel-processed between regions.
  • Index-related information may be coded independently between regions. For example, when encoding index-related information within a predetermined region, other regions may not be referred. For example, when the first pixel of the region 2 is encoded, information on the last pixel of the region 1 may not be referenced. Accordingly, encoding of the run merge flag may be omitted for the first pixel in each region. Since index-related information is coded independently between regions, a scan order may be independently assigned between regions. For example, by allocating scan order numbers from 0 to 15 for each area, pixels may be distinguished.
  • encoding of run type information may be omitted for pixels located in the uppermost row in each region.
  • index-related information may be encoded by providing inter-region dependency.
  • index-related information of pixels positioned in the uppermost row of region 2 may be encoded with reference to index-related information of pixels positioned in the lowermost row of region 1.
  • the pixels may be distinguished by assigning a continuous scan order between the regions. For example, scan orders 0 to 15 may be allocated to pixels belonging to region 1, while scan orders 16 to 31 may be allocated to pixels belonging to region 2 .
  • the value of the run merge flag may be coded for the first pixel in the remaining area except for the first area.
  • the run merge flag of the first pixel of the region 2 may be encoded with reference to the last pixel of the region 1 (eg, a pixel having a scan order of 15).
  • Information indicating whether inter-region index-related information is independently encoded or dependently encoded may be encoded and signaled. Alternatively, based on at least one of the size or shape of the current block, it may be determined whether the inter-region index-related information is independently coded or dependently coded.
  • index-related information can be encoded by dividing one block into a plurality of regions and then providing dependencies between regions. By extending this, inter-block dependency may be given to encode index-related information.
  • FIG 19 shows an example in which index-related information is encoded using inter-block dependency.
  • index-related information may be coded with reference to the neighboring block.
  • the run merge flag for the first pixel in the current block may be encoded with reference to the neighboring block.
  • the run merge flag for the first pixel of the current block is set by referring to the pixel having the last scan order in the upper neighboring block or the left neighboring block, or the pixel adjacent to the first pixel of the current block in the upper neighboring block or the left neighboring block. can be encoded.
  • the run merge flag for the first pixel C in the current block may be encoded with reference to the pixel A neighboring to the top or the pixel B neighboring to the left.
  • run type information may be coded with reference to a neighboring block even for pixels located in the uppermost row in the current block.
  • the upper neighboring block may be referred to when the left neighboring block is unavailable. That is, when the run-type flag encoding for the first pixel C in the current block is performed, the pixel B is preferentially referenced, but when the pixel B is unavailable, the pixel A may be referenced.
  • the escape value must be additionally encoded.
  • An escape value may be quantized, and the quantized escape value may be encoded.
  • quantization may be performed using an initial quantization parameter (QP) defined at the SLAS level. Through the SLAS header, an initial quantization parameter may be signaled.
  • QP initial quantization parameter
  • an offset value indicating a difference between a quantization parameter defined at the slice level and a quantization parameter applied to the current block may be encoded.
  • the offset may be coded in units of blocks.
  • an offset having a value of 4 may be encoded and signaled.
  • the size of the palette table (ie, the maximum number of palette entries) and/or the binarization method of the index may be different. Accordingly, information indicating whether an escape exists in the current palette table may be encoded and signaled. The information may be a 1-bit flag.
  • the size of the current palette table may be increased by one.
  • the flag indicates that there is no escape, it is possible to maintain the size of the current palette table.
  • a difference between the escape value and a prediction value derived through intra prediction may be encoded.
  • 20 is an exemplary diagram for explaining an aspect of encoding an escape value.
  • Fig. 20 (a) shows a current block and reference pixels adjacent to the current block
  • Fig. 20 (b) shows a palette entry for the current block.
  • the pixel to which the index 4 is assigned is encoded as an escape value.
  • a difference value derived by differentiating a prediction value obtained through intra prediction from the value A of the pixel may be encoded.
  • a difference value (ie, A-R2) derived by differentiating the upper reference pixel R2 from the pixel value A may be encoded.
  • the quantized difference value may be encoded.
  • the intra prediction mode used to derive the difference value may be at least one of planar, DC, vertical direction, horizontal direction, upper right diagonal direction, upper left diagonal direction, or lower left diagonal direction.
  • An escape value may be derived by using a fixed intra prediction mode in the encoder and decoder.
  • information specifying an intra prediction mode for deriving an escape value among a plurality of intra prediction modes may be encoded and signaled.
  • the information when there are two available intra prediction modes, the information may be a 1-bit flag.
  • the intra prediction mode used to derive the escape value may be determined based on the flag.
  • the intra prediction mode used to derive the escape value may be determined based on at least one of the size and shape of the current block and the intra prediction mode of the neighboring block.
  • a difference value may be derived using an adjacent pixel in the current block.
  • the adjacent pixel indicates a pixel whose index is determined before the current pixel in the scan order.
  • 21 shows an example of deriving a difference value with respect to an escape value based on an intra prediction mode.
  • FIG. 21A is an example of deriving a difference value with respect to an escape value using a reference pixel
  • FIG. 21B is an example of deriving a difference value with respect to an escape value using an adjacent pixel.
  • the scan order is in the horizontal direction.
  • a difference value between a value of the current pixel and a reference pixel positioned in a vertical or horizontal direction of the current pixel may be derived.
  • a difference value may be derived by differentiating the reference pixel R2 or the reference pixel R6 from the value A of the pixel having the index 4 .
  • the difference value can be derived using the reference pixel in the horizontal direction.
  • a difference value between the value of the current pixel and a neighboring pixel adjacent to the current pixel may be derived.
  • a difference value may be derived by differentiating the value of the right neighboring pixel or the value of the upper neighboring pixel from the value A of the pixel having the index 4 .
  • the vertical intra prediction mode when the vertical intra prediction mode is applied, a difference value is derived using the neighboring pixels in the vertical direction, and when the horizontal intra prediction mode is applied, the difference value can be derived using the neighboring pixels in the horizontal direction. have.
  • a method of deriving a difference value may be determined. For example, when lossless encoding is not applied, as in the example shown in FIG. 21A , a difference value may be derived using a reference pixel outside the current block. On the other hand, when lossless encoding is applied, as in the example shown in FIG. 21B , a difference value can be derived using neighboring pixels in the current block.
  • the decoder may derive an escape value for the current pixel by summing the difference value and the prediction value. For example, when a difference value is derived using a reference pixel outside the current block, an escape value may be derived by adding the difference value decoded from the bitstream and the upper reference pixel or the left reference pixel. On the other hand, when the difference value is encoded using the reference pixel in the current block, the escape value is derived by adding the difference value decoded from the bitstream and the value of the reconstructed neighboring pixel (eg, the upper neighboring pixel or the right neighboring pixel). can do.
  • an escape value may be derived by adding the difference value decoded from the bitstream and the value of the reconstructed neighboring pixel (eg, the upper neighboring pixel or the right neighboring pixel).
  • a prediction value for an escape value may be generated using a block vector.
  • the reference block specified through the block vector may be specified.
  • a value of a pixel at the same position as a current pixel to which an escape value is assigned in the reference block may be set as the predicted value.
  • a difference value may be derived by differentiating A5, which is a pixel at the same position as the pixel in the reference block, from the value A of the pixel to which the escape value is assigned.
  • the quantized difference value may be encoded by encoding the difference value or quantizing the difference value.
  • Whether to generate a prediction value for an escape value by using the block vector may be determined based on whether lossless coding is applied. For example, only when lossless encoding is applied to the current image, a prediction value for an escape value may be generated using a block vector.
  • information specifying a method of generating a prediction value for an escape value may be signaled through a bitstream.
  • the information may specify at least one of an intra prediction mode use mode and a block vector use mode.
  • the intra prediction mode or block vector of the current block may be derived with reference to a neighboring block adjacent to the current block.
  • the neighboring block may include at least one of an upper neighboring block, a left neighboring block, an upper left neighboring block, an upper right neighboring block, or a lower left neighboring block of the current block.
  • RT indicates a pixel located at the upper right of the block
  • LB indicates a pixel located at the bottom left of the block.
  • a block vector candidate list may be constructed by searching for neighboring blocks according to a predefined priority. For example, an upper neighboring block including a pixel at position A, a left neighboring block including a pixel at position L, an upper right neighboring block including a pixel at position e, a lower left neighboring block including a pixel at position i, and position a
  • the neighboring blocks may be searched in the order of the upper left neighboring blocks including the pixel of .
  • a block vector candidate list may be constructed based on the block vector of the searched block.
  • index information specifying one of the plurality of block vector candidates may be encoded and signaled.
  • a block vector of a first found block ie, a first block encoded as a block vector
  • a block vector of the current block may be set as a block vector of the current block.
  • the escape mode is applied to all pixels. That is, when lossless encoding is applied, the palette escape value may be encoded and signaled for each pixel regardless of the size of the palette table.
  • the palette index may be encoded/decoded for each pixel.
  • Information indicating which of the above two palette encoding methods is applied may be encoded and signaled. For example, when lossless encoding is applied, a flag specifying one of the above two palette encoding methods may be further encoded and signaled.
  • one of the palette encoding methods may be adaptively selected based on at least one of a color format, a color component, a size of a current block, or a shape of the current block.
  • information indicating the encoding mode of the escape value may be additionally encoded.
  • the information may indicate at least one of a mode for encoding escape values as they are, a mode for encoding escape values using intra prediction, and a mode for encoding escape values using block vectors.
  • the palette encoding method in which the escape mode is applied to all pixels can be applied only when lossless encoding is applied.
  • a palette encoding method in which an escape mode is applied to all pixels may be applied.
  • the palette encoding method may be determined by the information signaled through the bitstream, or the palette encoding method may be determined based on at least one of a color component, a color format, the size of the current block, or the shape of the current block. have.
  • the size of the palette table may be set differently.
  • the size of the palette table when lossy coding is applied, the size of the palette table may be set to M, and when lossless coding is applied, the size of the palette table may be set to N.
  • M and N may have different values.
  • N may be a natural number greater than M.
  • the values of M and N may be fixed in the encoder and the decoder.
  • information for determining the values of M and N may be encoded and signaled through the upper header.
  • information indicating the size M of the palette table when lossy encoding is applied and information indicating the size N of the palette table when lossless encoding is applied may be each encoded and signaled.
  • a relationship between the size M of the palette table when lossy coding is applied and the size N of the palette table when lossless coding is applied may be predefined in the encoder and decoder.
  • information indicating a difference value between two variables may be encoded.
  • information indicating a difference between the size N of the palette table when lossless coding is applied and the size M of the palette table when lossy coding is applied may be encoded and signaled.
  • the minimum size of the palette table may be encoded and signaled.
  • the higher level header indicates a parameter set commonly referenced by a plurality of lower levels.
  • the upper level is any one of a coding tree unit, a slice, a tile, a subpicture, a picture, or a sequence
  • a lower level is a processing unit (eg, a block, a coding tree unit, a slice, a tile) having a size smaller than that of the upper level. , subpicture or picture).
  • the size of the palette table for the current block may be determined as a value obtained by adding a difference between a minimum size determined at a higher level and a size decoded with respect to the current block. That is, when the difference value is encoded/decoded at the block level, a palette table having a different size for each block may be used.
  • the configuration of the palette table is determined based on whether lossy coding or lossless coding is applied.
  • that the configuration between the palette tables is different indicates that at least one of the size of each of the palette tables or the method of encoding the escape values of each of the palette tables is different.
  • the configuration of the palette table may be adaptively selected according to a color component or a color format.
  • a palette table composed of M palette entries may be used for a luminance component block
  • a palette table composed of N palette entries may be used for a chrominance component block.
  • the color format it may be determined whether or not to configure the palette table individually for each color component. For example, when the color format is 4:2:0, it may be determined whether to configure the integrated palette table according to the tree structure between the luminance component and the chrominance component.
  • an integrated palette table applied to both the luminance component and the chrominance component may be used.
  • the integrated palette table indicates that the palette table of the luminance component and the palette table of the chrominance component are identical to each other.
  • the palette table can be configured independently between the luminance component and the chrominance component. At least one of a size of the palette table and an encoding mode of an escape value may be different between the palette table of the luminance component and the palette table of the chrominance component.
  • each of the components (eg, unit, module, etc.) constituting the block diagram in the above-described embodiment may be implemented as a hardware device or software, or a plurality of components may be combined to form one hardware device or software. may be implemented.
  • the above-described embodiment may be implemented in the form of program instructions that can be executed through various computer components and recorded in a computer-readable recording medium.
  • the computer-readable recording medium may include program instructions, data files, data structures, etc. alone or in combination.
  • Examples of the computer-readable recording medium include a hard disk, a magnetic medium such as a floppy disk and a magnetic tape, an optical recording medium such as a CD-ROM, a DVD, and a magneto-optical medium such as a floppy disk. media), and hardware devices specially configured to store and execute program instructions, such as ROM, RAM, flash memory, and the like.
  • the hardware device may be configured to operate as one or more software modules to perform processing according to the present disclosure, and vice versa.
  • the present disclosure may be used to encode/decode a video signal.

Abstract

An image decoding method, according to the present disclosure, comprises the steps of: determining whether lossless encoding is applied; when the lossless encoding is applied, determining whether palette prediction is applied to a current block; configuring a palette table for the current block; and reconstructing pixels in the current block on the basis of the palette table.

Description

비디오 신호 처리 방법 및 장치Video signal processing method and apparatus
본 개시는 비디오 신호 처리 방법 및 장치에 관한 것이다.The present disclosure relates to a video signal processing method and apparatus.
최근 HD(High Definition) 영상 및 UHD(Ultra High Definition) 영상과 같은 고해상도, 고품질의 영상에 대한 수요가 다양한 응용 분야에서 증가하고 있다. 영상 데이터가 고해상도, 고품질이 될수록 기존의 영상 데이터에 비해 상대적으로 데이터량이 증가하기 때문에 기존의 유무선 광대역 회선과 같은 매체를 이용하여 영상 데이터를 전송하거나 기존의 저장 매체를 이용해 저장하는 경우, 전송 비용과 저장 비용이 증가하게 된다. 영상 데이터가 고해상도, 고품질화 됨에 따라 발생하는 이러한 문제들을 해결하기 위해서는 고효율의 영상 압축 기술들이 활용될 수 있다.Recently, demand for high-resolution and high-quality images such as HD (High Definition) images and UHD (Ultra High Definition) images is increasing in various application fields. As the image data becomes higher resolution and higher quality, the amount of data relatively increases compared to the existing image data. storage costs will increase. High-efficiency image compression techniques can be used to solve these problems that occur as image data becomes high-resolution and high-quality.
영상 압축 기술로 현재 픽쳐의 이전 또는 이후 픽쳐로부터 현재 픽쳐에 포함된 화소값을 예측하는 화면 간 예측 기술, 현재 픽쳐 내의 화소 정보를 이용하여 현재 픽쳐에 포함된 화소값을 예측하는 화면 내 예측 기술, 출현 빈도가 높은 값에 짧은 부호를 할당하고 출현 빈도가 낮은 값에 긴 부호를 할당하는 엔트로피 부호화 기술 등 다양한 기술이 존재하고 이러한 영상 압축 기술을 이용해 영상 데이터를 효과적으로 압축하여 전송 또는 저장할 수 있다.Inter-screen prediction technology that predicts pixel values included in the current picture from pictures before or after the current picture with image compression technology, intra-picture prediction technology that predicts pixel values included in the current picture using pixel information in the current picture, Various techniques exist, such as entropy encoding technology in which a short code is assigned to a value with a high frequency of occurrence and a long code is assigned to a value with a low frequency of occurrence.
한편, 고해상도 영상에 대한 수요가 증가함과 함께, 새로운 영상 서비스로서 입체 영상 컨텐츠에 대한 수요도 함께 증가하고 있다. 고해상도 및 초고해상도의 입체 영상 콘텐츠를 효과적으로 제공하기 위한 비디오 압축 기술에 대하여 논의가 진행되고 있다.Meanwhile, as the demand for high-resolution images increases, the demand for stereoscopic image content as a new image service is also increasing. A video compression technique for effectively providing high-resolution and ultra-high-resolution stereoscopic image content is being discussed.
본 개시는 비디오 신호를 부호화/복호화함에 있어서, 인트라 예측 방법 및 장치를 제공하는 것을 목적으로 한다.An object of the present disclosure is to provide a method and apparatus for intra prediction in encoding/decoding a video signal.
본 개시는 비디오 신호를 부호화/복호화함에 있어서, 팔레트 모드 기반의 인트라 예측 방법 및 장치를 제공하는 것을 목적으로 한다.An object of the present disclosure is to provide a method and apparatus for intra prediction based on a palette mode in encoding/decoding a video signal.
본 개시는 비디오 신호를 부호화/복호화함에 있어서, 무손실 부호화 기법 하에서 팔레트 모드를 적용하는 방법 및 장치를 제공하는 것을 목적으로 한다. An object of the present disclosure is to provide a method and apparatus for applying a palette mode under a lossless coding technique in encoding/decoding a video signal.
본 개시에서 이루고자 하는 기술적 과제들은 이상에서 언급한 기술적 과제들로 제한되지 않으며, 언급하지 않은 또 다른 기술적 과제들은 아래의 기재로부터 본 개시가 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.The technical problems to be achieved in the present disclosure are not limited to the technical problems mentioned above, and other technical problems not mentioned will be clearly understood by those of ordinary skill in the art to which the present disclosure belongs from the description below. will be able
본 개시에 따른 비디오 신호 복호화 방법은, 무손실 부호화가 적용되는지 여부를 결정하는 단계, 상기 무손실 부호화가 적용되는 경우, 현재 블록에 팔레트 예측이 적용되는지 여부를 결정하는 단계, 상기 현재 블록에 대한 팔레트 테이블을 구성하는 단계, 및 상기 팔레트 테이블에 기초하여, 상기 현재 블록 내 화소를 복원하는 단계를 포함한다.The video signal decoding method according to the present disclosure includes the steps of determining whether lossless coding is applied, when the lossless coding is applied, determining whether palette prediction is applied to the current block, the palette table for the current block and, based on the palette table, reconstructing pixels in the current block.
본 개시에 따른 비디오 신호 부호화 방법은, 무손실 부호화가 적용되는지 여부를 결정하는 단계, 상기 무손실 부호화가 적용되는 경우, 현재 블록에 팔레트 예측이 적용되는지 여부를 결정하는 단계, 상기 현재 블록에 대한 팔레트 테이블을 구성하는 단계, 및 상기 팔레트 테이블에 기초하여, 상기 현재 블록 내 화소를 부호화하는 단계를 포함한다. The video signal encoding method according to the present disclosure includes the steps of determining whether lossless encoding is applied, determining whether palette prediction is applied to a current block when the lossless encoding is applied, and a palette table for the current block and encoding the pixels in the current block based on the palette table.
본 개시에 따른 비디오 신호 복호화 방법에 있어서, 상기 현재 블록에 상기 무손실 부호화가 적용되는 경우와 상기 현재 블록에 손실 부호화가 적용되는 경우에 있어서, 상기 팔레트 테이블의 크기가 상이할 수 있다. In the video signal decoding method according to the present disclosure, when lossless coding is applied to the current block and when lossy coding is applied to the current block, the size of the palette table may be different.
본 개시에 따른 비디오 신호 복호화 방법에 있어서, 상기 손실 부호화가 적용되는 경우의 상기 팔레트 테이블의 크기와 상기 무손실 부호화가 적용되는 경우의 상기 팔레트 테이블의 크기 사이의 차분을 나타내는 차분 정보가 비트스트림으로부터 복호화될 수 있다. In the video signal decoding method according to the present disclosure, difference information indicating a difference between the size of the palette table when the lossy coding is applied and the size of the palette table when the lossless coding is applied is decoded from a bitstream can be
본 개시에 따른 비디오 신호 복호화 방법에 있어서, 상기 현재 블록 내 모든 화소들이 이스케이프 모드가 적용되는 것으로 결정될 수 있다. In the video signal decoding method according to the present disclosure, it may be determined that the escape mode is applied to all pixels in the current block.
본 개시에 따른 비디오 신호 복호화 방법에 있어서, 비트스트림으로부터, 상기 현재 블록 내 화소에 대한 이스케이프 값 정보가 복호화될 수 있다.In the video signal decoding method according to the present disclosure, escape value information for a pixel in the current block may be decoded from a bitstream.
본 개시에 따른 비디오 신호 복호화 방법에 있어서, 상기 이스케이프 값 정보는, 이스케이프 값과 이스케이프 예측값 사이의 차분을 나타낼 수 있다.In the video signal decoding method according to the present disclosure, the escape value information may indicate a difference between an escape value and an escape predicted value.
본 개시에 따른 비디오 신호 복호화 방법에 있어서, 상기 이스케이프 예측값은, 상기 현재 블록의 인트라 예측 모드 또는 블록 벡터를 기초로 유도될 수 있다.In the video signal decoding method according to the present disclosure, the escape prediction value may be derived based on an intra prediction mode or a block vector of the current block.
본 개시에 의하면, 이전 팔레트 테이블을 기반으로 현재 블록의 팔레트 테이블을 구성함으로써, 팔레트 모드의 부호화/복호화 효율을 향상시킬 수 있다. According to the present disclosure, by configuring the palette table of the current block based on the previous palette table, it is possible to improve the encoding/decoding efficiency of the palette mode.
본 개시에 의하면, 팔레트 모드의 스캔 순서를 적응적으로 이용함으로써, 팔레트 모드의 부호화/복호화 효율을 향상시킬 수 있다.According to the present disclosure, encoding/decoding efficiency of the palette mode can be improved by adaptively using the scan order of the palette mode.
본 개시에 의하면, 현재 블록의 각 화소에 대한 팔레트 인덱스의 부호화/복호화 효율을 향상시킬 수 있다.According to the present disclosure, it is possible to improve the encoding/decoding efficiency of the palette index for each pixel of the current block.
본 개시에 의하면, 무손실 부호화가 적용되는 경우에도, 팔레트 모드를 통해 부호화/복호화 효율을 향상시킬 수 있다.According to the present disclosure, even when lossless encoding is applied, encoding/decoding efficiency can be improved through the palette mode.
본 개시에서 얻을 수 있는 효과는 이상에서 언급한 효과들로 제한되지 않으며, 언급하지 않은 또 다른 효과들은 아래의 기재로부터 본 개시가 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.Effects obtainable in the present disclosure are not limited to the above-mentioned effects, and other effects not mentioned may be clearly understood by those of ordinary skill in the art to which the present disclosure belongs from the description below. will be.
도 1은 본 개시의 일실시예에 따른 영상 부호화 장치를 나타낸 블록도이다. 1 is a block diagram illustrating an image encoding apparatus according to an embodiment of the present disclosure.
도 2는 본 개시의 일실시예에 따른 영상 복호화 장치를 나타낸 블록도이다.2 is a block diagram illustrating an image decoding apparatus according to an embodiment of the present disclosure.
도 3 및 도 4는 본 개시에 따른 무손실 부호화 방법을 도시한 것이다.3 and 4 illustrate a lossless encoding method according to the present disclosure.
도 5 내지 도 7은, 본 개시에 따른 팔레트 모드(palette mode)의 개념을 설명하기 위한 도면이다.5 to 7 are diagrams for explaining the concept of the palette mode (palette mode) according to the present disclosure.
도 8은 본 개시에 따른 팔레트 모드(palette mode)에 기반하여 인트라 예측을 수행하는 방법을 도시한 것이다.8 illustrates a method of performing intra prediction based on a palette mode according to the present disclosure.
도 9 및 도 10은 본 개시에 따른 팔레트 테이블을 구성하는 방법을 도시한 것이다.9 and 10 show a method of configuring a pallet table according to the present disclosure.
도 11은 팔레트 엔트리 후보 리스트에 팔레트 엔트리들이 추가되는 예를 나타낸 도면이다.11 is a diagram illustrating an example in which palette entries are added to the palette entry candidate list.
도 12는 부호화기 및 복호화기에서 기 정의된 팔레트 테이블이 이용되는 예를 나타낸다.12 shows an example in which a palette table predefined in an encoder and a decoder is used.
도 13은 본 개시가 적용되는 일실시예로서, 런 렝스 부호화 기반의 바이너리 벡터의 형태로 팔레트 예측 플래그를 시그날링하는 방법을 도시한 것이다.13 illustrates a method of signaling a palette prediction flag in the form of a binary vector based on run length encoding as an embodiment to which the present disclosure is applied.
도 14는 본 개시에 따른 스캔 순서에 따라 팔레트 인덱스를 부호화/복호화하는 방법을 도시한 것이다.14 illustrates a method of encoding/decoding a palette index according to a scan order according to the present disclosure.
도 15는 현재 화소의 인접 화소를 설명하기 위한 예시도이다.15 is an exemplary diagram for describing a pixel adjacent to a current pixel.
도 16은 문맥 정보를 이용하여 런 머지 플래그를 부호화하는 예를 나타낸 것이다.16 shows an example of encoding a run merge flag using context information.
도 17은 문맥 정보 인덱스의 범위를 나타낸 예시이다.17 is an example showing a range of a context information index.
도 18은 기 설정된 크기의 영역 단위로 인덱스 관련 정보가 부호화되는 예를 나타낸 것이다.18 illustrates an example in which index-related information is encoded in units of a region having a preset size.
도 19는 블록간 종속성을 이용하여 인덱스 관련 정보가 부호화되는 예를 나타낸 것이다.19 shows an example in which index-related information is encoded using inter-block dependency.
도 20은 이스케이프 값의 부호화 양상을 설명하기 위한 예시도이다.20 is an exemplary diagram for explaining an aspect of encoding an escape value.
도 21은 인트라 예측 모드에 기초하여, 이스케이프 값에 대한 차분값을 유도하는 예를 나타낸다.21 shows an example of deriving a difference value with respect to an escape value based on an intra prediction mode.
도 22는 블록 벡터를 이용하여, 이스케이프 값에 대한 차분값을 유도하는 예를 나타낸다.22 shows an example of deriving a difference value with respect to an escape value using a block vector.
도 23은 현재 블록의 이웃 블록을 설명하기 위한 예시이다.23 is an example for describing a neighboring block of the current block.
본 개시는 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세한 설명에 상세하게 설명하고자 한다. 그러나, 이는 본 개시를 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 개시의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 각 도면을 설명하면서 유사한 참조부호를 유사한 구성요소에 대해 사용하였다.Since the present disclosure can make various changes and can have various embodiments, specific embodiments are illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the present disclosure to specific embodiments, and should be understood to include all modifications, equivalents and substitutes included in the spirit and scope of the present disclosure. In describing each figure, like reference numerals have been used for like elements.
제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 본 개시의 권리 범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다. 및/또는 이라는 용어는 복수의 관련된 기재된 항목들의 조합 또는 복수의 관련된 기재된 항목들 중의 어느 항목을 포함한다.Terms such as first, second, etc. may be used to describe various elements, but the elements should not be limited by the terms. The above terms are used only for the purpose of distinguishing one component from another. For example, without departing from the scope of the present disclosure, a first component may be referred to as a second component, and similarly, a second component may also be referred to as a first component. and/or includes a combination of a plurality of related listed items or any of a plurality of related listed items.
어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어"있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어"있다거나 "직접 접속되어"있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다.When a component is referred to as being “connected” or “connected” to another component, it is understood that the other component may be directly connected or connected to the other component, but other components may exist in between. it should be On the other hand, when it is said that a certain element is "directly connected" or "directly connected" to another element, it should be understood that no other element is present in the middle.
본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 개시를 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terms used in the present application are used only to describe specific embodiments, and are not intended to limit the present disclosure. The singular expression includes the plural expression unless the context clearly dictates otherwise. In the present application, terms such as “comprise” or “have” are intended to designate that a feature, number, step, operation, component, part, or combination thereof described in the specification exists, but one or more other features It should be understood that this does not preclude the existence or addition of numbers, steps, operations, components, parts, or combinations thereof.
이하, 첨부한 도면들을 참조하여, 본 개시의 바람직한 실시예를 보다 상세하게 설명하고자 한다. 이하, 도면상의 동일한 구성요소에 대해서는 동일한 참조부호를 사용하고 동일한 구성요소에 대해서 중복된 설명은 생략한다.Hereinafter, preferred embodiments of the present disclosure will be described in more detail with reference to the accompanying drawings. Hereinafter, the same reference numerals are used for the same components in the drawings, and repeated descriptions of the same components are omitted.
도 1은 본 개시의 일실시예에 따른 영상 부호화 장치를 나타낸 블록도이다. 1 is a block diagram illustrating an image encoding apparatus according to an embodiment of the present disclosure.
도 1을 참조하면, 영상 부호화 장치(100)는 픽쳐 분할부(110), 예측부(120, 125), 변환부(130), 양자화부(135), 재정렬부(160), 엔트로피 부호화부(165), 역양자화부(140), 역변환부(145), 필터부(150) 및 메모리(155)를 포함할 수 있다.Referring to FIG. 1 , the image encoding apparatus 100 includes a picture division unit 110 , prediction units 120 and 125 , a transform unit 130 , a quantization unit 135 , a rearrangement unit 160 , and an entropy encoding unit ( 165 ), an inverse quantization unit 140 , an inverse transform unit 145 , a filter unit 150 , and a memory 155 .
도 1에 나타난 각 구성부들은 영상 부호화 장치에서 서로 다른 특징적인 기능들을 나타내기 위해 독립적으로 도시한 것으로, 각 구성부들이 분리된 하드웨어나 하나의 소프트웨어 구성단위로 이루어짐을 의미하지 않는다. 즉, 각 구성부는 설명의 편의상 각각의 구성부로 나열하여 포함한 것으로 각 구성부 중 적어도 두 개의 구성부가 합쳐져 하나의 구성부로 이루어지거나, 하나의 구성부가 복수개의 구성부로 나뉘어져 기능을 수행할 수 있고 이러한 각 구성부의 통합된 실시예 및 분리된 실시예도 본 개시의 본질에서 벗어나지 않는 한 본 개시의 권리범위에 포함된다.Each of the constituent units shown in FIG. 1 is independently illustrated to represent different characteristic functions in the image encoding apparatus, and does not mean that each constituent unit is composed of separate hardware or one software constituent unit. That is, each component is listed as each component for convenience of description, and at least two components of each component are combined to form one component, or one component can be divided into a plurality of components to perform a function, and each Integrated embodiments and separate embodiments of the components are also included in the scope of the present disclosure without departing from the essence of the present disclosure.
또한, 일부의 구성 요소는 본 개시에서 본질적인 기능을 수행하는 필수적인 구성 요소는 아니고 단지 성능을 향상시키기 위한 선택적 구성 요소일 수 있다. 본 개시는 단지 성능 향상을 위해 사용되는 구성 요소를 제외한 본 개시의 본질을 구현하는데 필수적인 구성부만을 포함하여 구현될 수 있고, 단지 성능 향상을 위해 사용되는 선택적 구성 요소를 제외한 필수 구성 요소만을 포함한 구조도 본 개시의 권리범위에 포함된다.In addition, some components are not essential components to perform an essential function in the present disclosure, but may be optional components for merely improving performance. The present disclosure may be implemented by including only essential components to implement the essence of the present disclosure, except for components used for performance improvement, and a structure including only essential components excluding optional components used for performance improvement Also included in the scope of the present disclosure.
픽쳐 분할부(110)는 입력된 픽쳐를 적어도 하나의 처리 단위로 분할할 수 있다. 이때, 처리 단위는 예측 단위(Prediction Unit: PU)일 수도 있고, 변환 단위(Transform Unit: TU)일 수도 있으며, 부호화 단위(Coding Unit: CU)일 수도 있다. 픽쳐 분할부(110)에서는 하나의 픽쳐에 대해 복수의 부호화 단위, 예측 단위 및 변환 단위의 조합으로 분할하고 소정의 기준(예를 들어, 비용 함수)으로 하나의 부호화 단위, 예측 단위 및 변환 단위 조합을 선택하여 픽쳐를 부호화 할 수 있다.The picture divider 110 may divide the input picture into at least one processing unit. In this case, the processing unit may be a prediction unit (PU), a transform unit (TU), or a coding unit (CU). The picture splitter 110 divides one picture into a combination of a plurality of coding units, prediction units, and transformation units, and combines one coding unit, prediction unit, and transformation unit based on a predetermined criterion (eg, a cost function). can be selected to encode the picture.
예를 들어, 하나의 픽쳐는 복수개의 부호화 단위로 분할될 수 있다. 픽쳐에서 부호화 단위를 분할하기 위해서는 쿼드 트리(Quad Tree), 터너리 트리 (Ternary Tree), 또는 바이너리 트리(Binary Tree) 와 같은 재귀적인 트리 구조를 사용할 수 있는데 하나의 영상 또는 최대 크기 부호화 단위(largest coding unit)를 루트로 하여 다른 부호화 단위로 분할되는 부호화 유닛은 분할된 부호화 단위의 개수만큼의 자식 노드를 가지고 분할될 수 있다. 일정한 제한에 따라 더 이상 분할되지 않는 부호화 단위는 리프 노드가 된다. 일 예로, 하나의 코딩 유닛에 대해 쿼드 트리 분할이 적용되는 것으로 가정하는 경우, 하나의 부호화 단위는 최대 4개의 다른 부호화 단위로 분할될 수 있다.For example, one picture may be divided into a plurality of coding units. In order to split a coding unit in a picture, a recursive tree structure such as a quad tree, a ternary tree, or a binary tree may be used. A coding unit divided into other coding units with the coding unit as a root may be divided having as many child nodes as the number of the divided coding units. A coding unit that is no longer split according to certain restrictions becomes a leaf node. For example, when it is assumed that quad tree splitting is applied to one coding unit, one coding unit may be split into up to four different coding units.
이하, 본 개시의 실시예에서는 부호화 단위는 부호화를 수행하는 단위의 의미로 사용할 수도 있고, 복호화를 수행하는 단위의 의미로 사용할 수도 있다.Hereinafter, in an embodiment of the present disclosure, a coding unit may be used as a unit for performing encoding or may be used as a meaning for a unit for performing decoding.
예측 단위는 하나의 부호화 단위 내에서 동일한 크기의 적어도 하나의 정사각형 또는 직사각형 등의 형태를 가지고 분할된 것일 수도 있고, 하나의 부호화 단위 내에서 분할된 예측 단위 중 어느 하나의 예측 단위가 다른 하나의 예측 단위와 상이한 형태 및/또는 크기를 가지도록 분할된 것일 수도 있다.A prediction unit may be split in the form of at least one square or rectangle of the same size within one coding unit, and one prediction unit among the split prediction units within one coding unit is a prediction of another. It may be divided to have a shape and/or size different from that of the unit.
인트라 예측시, 변환 단위와 예측 단위가 동일하게 설정될 수 있다. 이때, 부호화 유닛을 복수의 변환 단위들로 분할한 뒤, 각 변환 단위마다 인트라 예측을 수행할 수도 있다. 부호화 유닛은, 수평 방향 또는 수직 방향으로 분할될 수 있다. 부호화 단위를 분할하여 생성되는 변환 단위들의 개수는 부호화 단위의 크기에 따라, 2개 또는 4개일 수 있다.In intra prediction, the transformation unit and the prediction unit may be set to be the same. In this case, after dividing the coding unit into a plurality of transform units, intra prediction may be performed for each transform unit. A coding unit may be divided in a horizontal direction or a vertical direction. The number of transformation units generated by dividing the coding unit may be 2 or 4 according to the size of the coding unit.
예측부(120, 125)는 인터 예측을 수행하는 인터 예측부(120)와 인트라 예측을 수행하는 인트라 예측부(125)를 포함할 수 있다. 부호화 단위에 대해 인터 예측을 사용할 것인지 또는 인트라 예측을 수행할 것인지를 결정하고, 각 예측 방법에 따른 구체적인 정보(예컨대, 인트라 예측 모드, 모션 벡터, 참조 픽쳐 등)를 결정할 수 있다. 이때, 예측이 수행되는 처리 단위와 예측 방법 및 구체적인 내용이 정해지는 처리 단위는 다를 수 있다. 예컨대, 예측의 방법과 예측 모드 등은 부호화 단위로 결정되고, 예측의 수행은 예측 단위 또는 변환 단위로 수행될 수도 있다. 생성된 예측 블록과 원본 블록 사이의 잔차값(잔차 블록)은 변환부(130)로 입력될 수 있다. 또한, 예측을 위해 사용한 예측 모드 정보, 모션 벡터 정보 등은 잔차값과 함께 엔트로피 부호화부(165)에서 부호화되어 복호화 장치에 전달될 수 있다. 특정한 부호화 모드를 사용할 경우, 예측부(120, 125)를 통해 예측 블록을 생성하지 않고, 원본 블록을 그대로 부호화하여 복호화부에 전송하는 것도 가능하다.The prediction units 120 and 125 may include an inter prediction unit 120 performing inter prediction and an intra prediction unit 125 performing intra prediction. Whether to use inter prediction or to perform intra prediction on a coding unit may be determined, and specific information (eg, intra prediction mode, motion vector, reference picture, etc.) according to each prediction method may be determined. In this case, a processing unit in which prediction is performed and a processing unit in which a prediction method and specific content are determined may be different. For example, a prediction method and a prediction mode may be determined in a coding unit, and prediction may be performed in a prediction unit or a transformation unit. A residual value (residual block) between the generated prediction block and the original block may be input to the transform unit 130 . Also, prediction mode information, motion vector information, etc. used for prediction may be encoded by the entropy encoder 165 together with the residual value and transmitted to the decoding apparatus. When a specific encoding mode is used, it is also possible to encode the original block as it is without generating the prediction block through the prediction units 120 and 125 and transmit it to the decoder.
인터 예측부(120)는 현재 픽쳐의 이전 픽쳐 또는 이후 픽쳐 중 적어도 하나의 픽쳐의 정보를 기초로 예측 단위를 예측할 수도 있고, 경우에 따라서는 현재 픽쳐 내의 부호화가 완료된 일부 영역의 정보를 기초로 예측 단위를 예측할 수도 있다. 인터 예측부(120)는 참조 픽쳐 보간부, 모션 예측부, 움직임 보상부를 포함할 수 있다. The inter prediction unit 120 may predict a prediction unit based on information on at least one of a picture before or after a picture of the current picture, and in some cases, prediction based on information of a partial region in the current picture that has been encoded Units can also be predicted. The inter prediction unit 120 may include a reference picture interpolator, a motion prediction unit, and a motion compensator.
참조 픽쳐 보간부에서는 메모리(155)로부터 참조 픽쳐 정보를 제공받고 참조 픽쳐에서 정수 화소 이하의 화소 정보를 생성할 수 있다. 휘도 화소의 경우, 1/4 화소 단위로 정수 화소 이하의 화소 정보를 생성하기 위해 필터 계수를 달리하는 DCT 기반의 8탭 보간 필터(DCT-based Interpolation Filter)가 사용될 수 있다. 색차 신호의 경우 1/8 화소 단위로 정수 화소 이하의 화소 정보를 생성하기 위해 필터 계수를 달리하는 DCT 기반의 4탭 보간 필터(DCT-based Interpolation Filter)가 사용될 수 있다.The reference picture interpolator may receive reference picture information from the memory 155 and generate pixel information of integer pixels or less in the reference picture. In the case of luminance pixels, a DCT-based 8-tap interpolation filter (DCT-based Interpolation Filter) with different filter coefficients may be used to generate pixel information of integer pixels or less in units of 1/4 pixels. In the case of the color difference signal, a DCT-based 4-tap interpolation filter in which filter coefficients are different to generate pixel information of integer pixels or less in units of 1/8 pixels may be used.
모션 예측부는 참조 픽쳐 보간부에 의해 보간된 참조 픽쳐를 기초로 모션 예측을 수행할 수 있다. 모션 벡터를 산출하기 위한 방법으로 FBMA(Full search-based Block Matching Algorithm), TSS(Three Step Search), NTS(New Three-Step Search Algorithm) 등 다양한 방법이 사용될 수 있다. 모션 벡터는 보간된 화소를 기초로 1/2 또는 1/4 화소 단위의 모션 벡터값을 가질 수 있다. 모션 예측부에서는 모션 예측 방법을 다르게 하여 현재 예측 단위를 예측할 수 있다. 모션 예측 방법으로 스킵(Skip) 방법, 머지(Merge) 방법, AMVP(Advanced Motion Vector Prediction) 방법, 인트라 블록 카피(Intra Block Copy) 방법 등 다양한 방법이 사용될 수 있다.The motion prediction unit may perform motion prediction based on the reference picture interpolated by the reference picture interpolator. As a method for calculating the motion vector, various methods such as Full search-based Block Matching Algorithm (FBMA), Three Step Search (TSS), and New Three-Step Search Algorithm (NTS) may be used. The motion vector may have a motion vector value of 1/2 or 1/4 pixel unit based on the interpolated pixel. The motion prediction unit may predict the current prediction unit by using a different motion prediction method. Various methods, such as a skip method, a merge method, an AMVP (Advanced Motion Vector Prediction) method, an intra block copy method, etc., may be used as the motion prediction method.
인트라 예측부(125)는 현재 픽쳐 내의 화소 정보인 참조 픽셀 정보를 기초로 예측 블록을 생성할 수 있다. 복수의 참조 픽셀 라인들 중 선택된 하나로부터 참조 픽셀 정보를 유도할 수 있다. 복수의 참조 픽셀 라인들 중 N번째 참조 픽셀 라인은, 현재 블록 내 좌상단 픽셀과의 x축 차분이 N인 좌측 픽셀들 및 상기 좌상단 픽셀과의 y축 차분이 N인 상단 픽셀들을 포함할 수 있다. 현재 블록이 선택할 수 있는 참조 픽셀 라인들의 개수는, 1개, 2개, 3개 또는 4개일 수 있다.The intra prediction unit 125 may generate a prediction block based on reference pixel information that is pixel information in the current picture. Reference pixel information may be derived from a selected one of a plurality of reference pixel lines. An Nth reference pixel line among the plurality of reference pixel lines may include left pixels having an x-axis difference of N from an upper-left pixel in the current block and upper pixels having an y-axis difference of N from the upper-left pixel. The number of reference pixel lines that the current block can select may be one, two, three, or four.
현재 예측 단위의 주변 블록이 인터 예측을 수행한 블록이어서, 참조 픽셀이 인터 예측을 수행한 픽셀일 경우, 인터 예측을 수행한 블록에 포함되는 참조 픽셀을 주변의 인트라 예측을 수행한 블록의 참조 픽셀 정보로 대체하여 사용할 수 있다. 즉, 참조 픽셀이 가용하지 않는 경우, 가용하지 않은 참조 픽셀 정보를 가용한 참조 픽셀들 중 적어도 하나의 정보로 대체하여 사용할 수 있다.When a neighboring block of the current prediction unit is a block on which inter prediction is performed, and thus a reference pixel is a pixel on which inter prediction is performed, a reference pixel included in the block on which inter prediction is performed is a reference pixel of the block on which intra prediction has been performed. information can be used instead. That is, when the reference pixel is not available, the unavailable reference pixel information may be replaced with information of at least one of the available reference pixels.
인트라 예측에서 예측 모드는 참조 픽셀 정보를 예측 방향에 따라 사용하는 방향성 예측 모드와 예측을 수행시 방향성 정보를 사용하지 않는 비방향성 모드를 가질 수 있다. 휘도 정보를 예측하기 위한 모드와 색차 정보를 예측하기 위한 모드가 상이할 수 있고, 색차 정보를 예측하기 위해 휘도 정보를 예측하기 위해 사용된 인트라 예측 모드 정보 또는 예측된 휘도 신호 정보를 활용할 수 있다.In intra prediction, the prediction mode may have a directional prediction mode in which reference pixel information is used according to a prediction direction and a non-directional mode in which directional information is not used when prediction is performed. A mode for predicting luminance information and a mode for predicting chrominance information may be different, and intra prediction mode information used for predicting luminance information or predicted luminance signal information may be utilized to predict chrominance information.
인트라 예측을 수행할 때 예측 단위의 크기와 변환 단위의 크기가 동일할 경우, 예측 단위의 좌측에 존재하는 픽셀, 좌측 상단에 존재하는 픽셀, 상단에 존재하는 픽셀을 기초로 예측 단위에 대한 인트라 예측을 수행할 수 있다. When intra prediction is performed, if the size of the prediction unit and the size of the transformation unit are the same, intra prediction for the prediction unit based on the pixel present on the left side, the pixel present on the upper left side, and the pixel present on the upper side of the prediction unit can be performed.
인트라 예측 방법은 예측 모드에 따라 참조 화소에 스무딩(Smoothing) 필터를 적용한 후 예측 블록을 생성할 수 있다. 선택된 참조 픽셀 라인에 따라, 스무딩 필터의 적용 여부가 결정될 수 있다. The intra prediction method may generate a prediction block after applying a smoothing filter to a reference pixel according to a prediction mode. Whether to apply the smoothing filter may be determined according to the selected reference pixel line.
인트라 예측 방법을 수행하기 위해 현재 예측 단위의 인트라 예측 모드는 현재 예측 단위의 주변에 존재하는 예측 단위의 인트라 예측 모드로부터 예측할 수 있다. 주변 예측 단위로부터 예측된 모드 정보를 이용하여 현재 예측 단위의 예측 모드를 예측하는 경우, 현재 예측 단위와 주변 예측 단위의 인트라 예측 모드가 동일하면 소정의 플래그 정보를 이용하여 현재 예측 단위와 주변 예측 단위의 예측 모드가 동일하다는 정보를 전송할 수 있고, 만약 현재 예측 단위와 주변 예측 단위의 예측 모드가 상이하면 엔트로피 부호화를 수행하여 현재 블록의 예측 모드 정보를 부호화할 수 있다.In order to perform the intra prediction method, the intra prediction mode of the current prediction unit may be predicted from the intra prediction mode of the prediction unit existing around the current prediction unit. When the prediction mode of the current prediction unit is predicted using the mode information predicted from the neighboring prediction unit, if the intra prediction mode of the current prediction unit and the neighboring prediction unit are the same, the current prediction unit and the neighboring prediction unit are used using predetermined flag information It is possible to transmit information that the prediction modes of . , and if the prediction modes of the current prediction unit and the neighboring prediction units are different from each other, entropy encoding may be performed to encode prediction mode information of the current block.
또한, 예측부(120, 125)에서 생성된 예측 단위를 기초로 예측을 수행한 예측 단위와 예측 단위의 원본 블록과 차이값인 잔차값(Residual) 정보를 포함하는 잔차 블록이 생성될 수 있다. 생성된 잔차 블록은 변환부(130)로 입력될 수 있다. In addition, a residual block including residual information, which is a difference value between a prediction unit and an original block of the prediction unit, in which prediction is performed based on the prediction unit generated by the prediction units 120 and 125 may be generated. The generated residual block may be input to the transform unit 130 .
변환부(130)에서는 원본 블록과 예측부(120, 125)를 통해 생성된 예측 단위의 잔차값(residual)정보를 포함한 잔차 블록을 DCT(Discrete Cosine Transform), DST(Discrete Sine Transform), KLT와 같은 변환 방법을 사용하여 변환시킬 수 있다. 잔차 블록을 변환하기 위해 DCT를 적용할지, DST를 적용할지 또는 KLT를 적용할지는, 변환 단위의 크기, 변환 단위의 형태, 예측 단위의 예측 모드 또는 예측 단위의 인트라 예측 모드 정보 중 적어도 하나를 기초로 결정할 수 있다. The transform unit 130 converts the original block and the residual block including residual information of the prediction unit generated by the prediction units 120 and 125 to DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), KLT and It can be converted using the same conversion method. Whether to apply DCT, DST, or KLT to transform the residual block is based on at least one of the size of the transform unit, the shape of the transform unit, the prediction mode of the prediction unit, or the intra prediction mode information of the prediction unit. can decide
양자화부(135)는 변환부(130)에서 주파수 영역으로 변환된 값들을 양자화할 수 있다. 블록에 따라 또는 영상의 중요도에 따라 양자화 계수는 변할 수 있다. 양자화부(135)에서 산출된 값은 역양자화부(140)와 재정렬부(160)에 제공될 수 있다.The quantizer 135 may quantize the values transformed by the transform unit 130 into the frequency domain. The quantization coefficient may change according to blocks or the importance of an image. The value calculated by the quantization unit 135 may be provided to the inverse quantization unit 140 and the rearrangement unit 160 .
재정렬부(160)는 양자화된 잔차값에 대해 계수값의 재정렬을 수행할 수 있다.The rearrangement unit 160 may rearrange the coefficient values on the quantized residual values.
재정렬부(160)는 계수 스캐닝(Coefficient Scanning) 방법을 통해 2차원의 블록 형태 계수를 1차원의 벡터 형태로 변경할 수 있다. 예를 들어, 재정렬부(160)에서는 지그-재그 스캔(Zig-Zag Scan)방법을 이용하여 DC 계수부터 고주파수 영역의 계수까지 스캔하여 1차원 벡터 형태로 변경시킬 수 있다. 변환 단위의 크기 및 인트라 예측 모드에 따라 지그-재그 스캔 대신 2차원의 블록 형태 계수를 열 방향으로 스캔하는 수직 스캔, 2차원의 블록 형태 계수를 행 방향으로 스캔하는 수평 스캔, 또는 2차원의 블록 형태 계수를 대각 방향으로 스캔하는 대각 스캔이 사용될 수도 있다. 즉, 변환 단위의 크기 및 인트라 예측 모드에 따라 지그-재그 스캔, 수직 방향 스캔, 수평 방향 스캔 또는 대각 스캔 중 어떠한 스캔 방법이 사용될지 여부를 결정할 수 있다.The reordering unit 160 may change the two-dimensional block form coefficient into a one-dimensional vector form through a coefficient scanning method. For example, the rearranging unit 160 may use a Zig-Zag Scan method to scan from DC coefficients to coefficients in a high-frequency region and change them into a one-dimensional vector form. Depending on the size of the transform unit and the intra prediction mode, instead of a zig-zag scan, a vertical scan that scans a two-dimensional block shape coefficient in a column direction, a horizontal scan that scans a two-dimensional block shape coefficient in a row direction, or a two-dimensional block A diagonal scan that scans the shape coefficients in the diagonal direction may be used. That is, it may be determined whether any of the zig-zag scan, vertical scan, horizontal scan, or diagonal scan is to be used according to the size of the transform unit and the intra prediction mode.
엔트로피 부호화부(165)는 재정렬부(160)에 의해 산출된 값들을 기초로 엔트로피 부호화를 수행할 수 있다. 엔트로피 부호화는 예를 들어, 지수 골롬(Exponential Golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 다양한 부호화 방법을 사용할 수 있다. The entropy encoding unit 165 may perform entropy encoding based on the values calculated by the reordering unit 160 . For entropy encoding, various encoding methods such as Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC) may be used.
엔트로피 부호화부(165)는 재정렬부(160) 및 예측부(120, 125)로부터 부호화 단위의 잔차값 계수 정보 및 블록 타입 정보, 예측 모드 정보, 분할 단위 정보, 예측 단위 정보 및 전송 단위 정보, 모션 벡터 정보, 참조 프레임 정보, 블록의 보간 정보, 필터링 정보 등 다양한 정보를 부호화할 수 있다. The entropy encoding unit 165 receives the residual value coefficient information and block type information, prediction mode information, division unit information, prediction unit information and transmission unit information, motion of the coding unit from the reordering unit 160 and the prediction units 120 and 125 . Various information such as vector information, reference frame information, interpolation information of a block, and filtering information may be encoded.
엔트로피 부호화부(165)에서는 재정렬부(160)에서 입력된 부호화 단위의 계수값을 엔트로피 부호화할 수 있다.The entropy encoder 165 may entropy-encode the coefficient values of the coding units input from the reordering unit 160 .
역양자화부(140) 및 역변환부(145)에서는 양자화부(135)에서 양자화된 값들을 역양자화하고 변환부(130)에서 변환된 값들을 역변환한다. 역양자화부(140) 및 역변환부(145)에서 생성된 잔차값(Residual)은 예측부(120, 125)에 포함된 움직임 추정부, 움직임 보상부 및 인트라 예측부를 통해서 예측된 예측 단위와 합쳐져 복원 블록(Reconstructed Block)을 생성할 수 있다. The inverse quantizer 140 and the inverse transform unit 145 inversely quantize the values quantized by the quantizer 135 and inversely transform the values transformed by the transform unit 130 . The residual values generated by the inverse quantizer 140 and the inverse transform unit 145 are combined with the prediction units predicted through the motion estimation unit, the motion compensator, and the intra prediction unit included in the prediction units 120 and 125 and restored. You can create a Reconstructed Block.
필터부(150)는 디블록킹 필터, 오프셋 보정부, ALF(Adaptive Loop Filter)중 적어도 하나를 포함할 수 있다.The filter unit 150 may include at least one of a deblocking filter, an offset correcting unit, and an adaptive loop filter (ALF).
디블록킹 필터는 복원된 픽쳐에서 블록간의 경계로 인해 생긴 블록 왜곡을 제거할 수 있다. 디블록킹을 수행할지 여부를 판단하기 위해 블록에 포함된 몇 개의 열 또는 행에 포함된 픽셀을 기초로 현재 블록에 디블록킹 필터 적용할지 여부를 판단할 수 있다. 블록에 디블록킹 필터를 적용하는 경우 필요한 디블록킹 필터링 강도에 따라 강한 필터(Strong Filter) 또는 약한 필터(Weak Filter)를 적용할 수 있다. 또한 디블록킹 필터를 적용함에 있어 수직 필터링 및 수평 필터링 수행시 수평 방향 필터링 및 수직 방향 필터링이 병행 처리되도록 할 수 있다.The deblocking filter may remove block distortion caused by the boundary between blocks in the reconstructed picture. In order to determine whether to perform deblocking, it may be determined whether to apply the deblocking filter to the current block based on pixels included in several columns or rows included in the block. When a deblocking filter is applied to a block, a strong filter or a weak filter can be applied according to the required deblocking filtering strength. In addition, in applying the deblocking filter, horizontal filtering and vertical filtering may be concurrently processed when performing vertical filtering and horizontal filtering.
오프셋 보정부는 디블록킹을 수행한 영상에 대해 픽셀 단위로 원본 영상과의 오프셋을 보정할 수 있다. 특정 픽쳐에 대한 오프셋 보정을 수행하기 위해 영상에 포함된 픽셀을 일정한 수의 영역으로 구분한 후 오프셋을 수행할 영역을 결정하고 해당 영역에 오프셋을 적용하는 방법 또는 각 픽셀의 에지 정보를 고려하여 오프셋을 적용하는 방법을 사용할 수 있다.The offset correcting unit may correct an offset from the original image in units of pixels with respect to the image on which the deblocking has been performed. In order to perform offset correction on a specific picture, a method of dividing pixels included in an image into a certain number of regions, determining the region to be offset and applying the offset to the region, or taking edge information of each pixel into consideration can be used to apply
ALF(Adaptive Loop Filtering)는 필터링한 복원 영상과 원래의 영상을 비교한 값을 기초로 수행될 수 있다. 영상에 포함된 픽셀을 소정의 그룹으로 나눈 후 해당 그룹에 적용될 하나의 필터를 결정하여 그룹마다 차별적으로 필터링을 수행할 수 있다. ALF를 적용할지 여부에 관련된 정보는 휘도 신호는 부호화 단위(Coding Unit, CU) 별로 전송될 수 있고, 각각의 블록에 따라 적용될 ALF 필터의 모양 및 필터 계수는 달라질 수 있다. 또한, 적용 대상 블록의 특성에 상관없이 동일한 형태(고정된 형태)의 ALF 필터가 적용될 수도 있다. Adaptive loop filtering (ALF) may be performed based on a value obtained by comparing the filtered reconstructed image and the original image. After dividing the pixels included in the image into a predetermined group, one filter to be applied to the corresponding group is determined, and filtering can be performed differentially for each group. As for information on whether to apply ALF, the luminance signal may be transmitted for each coding unit (CU), and the shape and filter coefficients of the ALF filter to be applied may vary according to each block. In addition, the ALF filter of the same type (fixed type) may be applied regardless of the characteristics of the target block.
메모리(155)는 필터부(150)를 통해 산출된 복원 블록 또는 픽쳐를 저장할 수 있고, 저장된 복원 블록 또는 픽쳐는 인터 예측을 수행 시 예측부(120, 125)에 제공될 수 있다.The memory 155 may store the reconstructed block or picture calculated through the filter unit 150 , and the stored reconstructed block or picture may be provided to the predictors 120 and 125 when inter prediction is performed.
도 2는 본 개시의 일실시예에 따른 영상 복호화 장치를 나타낸 블록도이다.2 is a block diagram illustrating an image decoding apparatus according to an embodiment of the present disclosure.
도 2를 참조하면, 영상 복호화 장치(200)는 엔트로피 복호화부(210), 재정렬부(215), 역양자화부(220), 역변환부(225), 예측부(230, 235), 필터부(240), 메모리(245)가 포함될 수 있다.Referring to FIG. 2 , the image decoding apparatus 200 includes an entropy decoding unit 210, a reordering unit 215, an inverse quantization unit 220, an inverse transform unit 225, prediction units 230 and 235, and a filter unit ( 240) and a memory 245 may be included.
영상 부호화 장치에서 영상 비트스트림이 입력된 경우, 입력된 비트스트림은 영상 부호화 장치와 반대의 절차로 복호화될 수 있다.When an image bitstream is input by the image encoding apparatus, the input bitstream may be decoded by a procedure opposite to that of the image encoding apparatus.
엔트로피 복호화부(210)는 영상 부호화 장치의 엔트로피 부호화부에서 엔트로피 부호화를 수행한 것과 반대의 절차로 엔트로피 복호화를 수행할 수 있다. 예를 들어, 영상 부호화 장치에서 수행된 방법에 대응하여 지수 골롬(Exponential Golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 다양한 방법이 적용될 수 있다. The entropy decoding unit 210 may perform entropy decoding in a procedure opposite to that performed by the entropy encoding unit of the image encoding apparatus. For example, various methods such as Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC) may be applied corresponding to the method performed by the image encoding apparatus.
엔트로피 복호화부(210)에서는 부호화 장치에서 수행된 인트라 예측 및 인터 예측에 관련된 정보를 복호화할 수 있다.The entropy decoding unit 210 may decode information related to intra prediction and inter prediction performed by the encoding apparatus.
재정렬부(215)는 엔트로피 복호화부(210)에서 엔트로피 복호화된 비트스트림을 부호화부에서 재정렬한 방법을 기초로 재정렬을 수행할 수 있다. 1차원 벡터 형태로 표현된 계수들을 다시 2차원의 블록 형태의 계수로 복원하여 재정렬할 수 있다. 재정렬부(215)에서는 부호화부에서 수행된 계수 스캐닝에 관련된 정보를 제공받고 해당 부호화부에서 수행된 스캐닝 순서에 기초하여 역으로 스캐닝하는 방법을 통해 재정렬을 수행할 수 있다.The reordering unit 215 may perform reordering based on a method of rearranging the entropy-decoded bitstream by the entropy decoding unit 210 by the encoder. Coefficients expressed in the form of a one-dimensional vector may be restored and rearranged as coefficients in the form of a two-dimensional block. The reordering unit 215 may receive information related to coefficient scanning performed by the encoder and perform the reordering by performing a reverse scanning method based on the scanning order performed by the corresponding encoder.
역양자화부(220)는 부호화 장치에서 제공된 양자화 파라미터와 재정렬된 블록의 계수값을 기초로 역양자화를 수행할 수 있다. The inverse quantization unit 220 may perform inverse quantization based on the quantization parameter provided by the encoding apparatus and the reordered coefficient values of the blocks.
역변환부(225)는 영상 부호화 장치에서 수행한 양자화 결과에 대해 변환부에서 수행한 변환 즉, DCT, DST, 및 KLT에 대해 역변환 즉, 역 DCT, 역 DST 및 역 KLT를 수행할 수 있다. 역변환은 영상 부호화 장치에서 결정된 전송 단위를 기초로 수행될 수 있다. 영상 복호화 장치의 역변환부(225)에서는 예측 방법, 현재 블록의 크기, 형태, 예측 모드 및 인트라 예측 방향 등 복수의 정보에 따라 변환 기법(예를 들어, DCT, DST, KLT)이 선택적으로 수행될 수 있다.The inverse transform unit 225 may perform inverse transforms, ie, inverse DCT, inverse DST, and inverse KLT, on the transforms performed by the transform unit, ie, DCT, DST, and KLT, on the quantization result performed by the image encoding apparatus. Inverse transform may be performed based on a transmission unit determined by the image encoding apparatus. In the inverse transform unit 225 of the image decoding apparatus, a transformation technique (eg, DCT, DST, KLT) may be selectively performed according to a plurality of pieces of information such as a prediction method, a size, a shape of a current block, a prediction mode, and an intra prediction direction. can
예측부(230, 235)는 엔트로피 복호화부(210)에서 제공된 예측 블록 생성 관련 정보와 메모리(245)에서 제공된 이전에 복호화된 블록 또는 픽쳐 정보를 기초로 예측 블록을 생성할 수 있다. The prediction units 230 and 235 may generate a prediction block based on the prediction block generation related information provided from the entropy decoding unit 210 and previously decoded block or picture information provided from the memory 245 .
전술한 바와 같이 영상 부호화 장치에서의 동작과 동일하게 인트라 예측을 수행시 예측 단위의 크기와 변환 단위의 크기가 동일할 경우, 예측 단위의 좌측에 존재하는 픽셀, 좌측 상단에 존재하는 픽셀, 상단에 존재하는 픽셀을 기초로 예측 단위에 대한 인트라 예측을 수행하지만, 인트라 예측을 수행시 예측 단위의 크기와 변환 단위의 크기가 상이할 경우, 변환 단위를 기초로 한 참조 픽셀을 이용하여 인트라 예측을 수행할 수 있다. 또한, 최소 부호화 단위에 대해서만 NxN 분할을 사용하는 인트라 예측을 사용할 수도 있다.As described above, when intra prediction is performed in the same manner as in the operation in the image encoding apparatus, when the size of the prediction unit and the size of the transformation unit are the same, the pixel present on the left side of the prediction unit, the pixel present on the upper left side, and the upper Intra prediction is performed on the prediction unit based on the existing pixel, but when the size of the prediction unit and the size of the transformation unit are different when performing intra prediction, intra prediction is performed using the reference pixel based on the transformation unit can do. Also, intra prediction using NxN splitting may be used only for the smallest coding unit.
예측부(230, 235)는 예측 단위 판별부, 인터 예측부 및 인트라 예측부를 포함할 수 있다. 예측 단위 판별부는 엔트로피 복호화부(210)에서 입력되는 예측 단위 정보, 인트라 예측 방법의 예측 모드 정보, 인터 예측 방법의 모션 예측 관련 정보 등 다양한 정보를 입력 받고 현재 부호화 단위에서 예측 단위를 구분하고, 예측 단위가 인터 예측을 수행하는지 아니면 인트라 예측을 수행하는지 여부를 판별할 수 있다. 인터 예측부(230)는 영상 부호화 장치에서 제공된 현재 예측 단위의 인터 예측에 필요한 정보를 이용해 현재 예측 단위가 포함된 현재 픽쳐의 이전 픽쳐 또는 이후 픽쳐 중 적어도 하나의 픽쳐에 포함된 정보를 기초로 현재 예측 단위에 대한 인터 예측을 수행할 수 있다. 또는, 현재 예측 단위가 포함된 현재 픽쳐 내에서 기-복원된 일부 영역의 정보를 기초로 인터 예측을 수행할 수도 있다.The prediction units 230 and 235 may include a prediction unit determiner, an inter prediction unit, and an intra prediction unit. The prediction unit determining unit receives various information such as prediction unit information input from the entropy decoder 210, prediction mode information of the intra prediction method, and motion prediction related information of the inter prediction method, and divides the prediction unit from the current coding unit, and predicts It may be determined whether the unit performs inter prediction or intra prediction. The inter prediction unit 230 uses information required for inter prediction of the current prediction unit provided from the image encoding apparatus based on information included in at least one of a picture before or after the current picture including the current prediction unit. Inter prediction may be performed on the prediction unit. Alternatively, inter prediction may be performed based on information of a pre-restored partial region in the current picture including the current prediction unit.
인터 예측을 수행하기 위해 부호화 단위를 기준으로 해당 부호화 단위에 포함된 예측 단위의 모션 예측 방법이 스킵 모드(Skip Mode), 머지 모드(Merge 모드), AMVP 모드(AMVP Mode), 인트라 블록 카피 모드 중 어떠한 방법인지 여부를 판단할 수 있다.In order to perform inter prediction, a motion prediction method of a prediction unit included in a corresponding coding unit based on a coding unit is selected from among skip mode, merge mode, AMVP mode, and intra block copy mode. You can decide which way to go.
인트라 예측부(235)는 현재 픽쳐 내의 화소 정보를 기초로 예측 블록을 생성할 수 있다. 예측 단위가 인트라 예측을 수행한 예측 단위인 경우, 영상 부호화 장치에서 제공된 예측 단위의 인트라 예측 모드 정보를 기초로 인트라 예측을 수행할 수 있다. 인트라 예측부(235)에는 AIS(Adaptive Intra Smoothing) 필터, 참조 화소 보간부, DC 필터를 포함할 수 있다. AIS 필터는 현재 블록의 참조 화소에 필터링을 수행하는 부분으로써 현재 예측 단위의 예측 모드에 따라 필터의 적용 여부를 결정하여 적용할 수 있다. 영상 부호화 장치에서 제공된 예측 단위의 예측 모드 및 AIS 필터 정보를 이용하여 현재 블록의 참조 화소에 AIS 필터링을 수행할 수 있다. 현재 블록의 예측 모드가 AIS 필터링을 수행하지 않는 모드일 경우, AIS 필터는 적용되지 않을 수 있다.The intra prediction unit 235 may generate a prediction block based on pixel information in the current picture. When the prediction unit is a prediction unit on which intra prediction is performed, intra prediction may be performed based on intra prediction mode information of the prediction unit provided by the image encoding apparatus. The intra prediction unit 235 may include an Adaptive Intra Smoothing (AIS) filter, a reference pixel interpolator, and a DC filter. The AIS filter is a part that performs filtering on the reference pixel of the current block, and may be applied by determining whether to apply the filter according to the prediction mode of the current prediction unit. AIS filtering may be performed on the reference pixel of the current block by using the prediction mode and AIS filter information of the prediction unit provided by the image encoding apparatus. When the prediction mode of the current block is a mode in which AIS filtering is not performed, the AIS filter may not be applied.
참조 화소 보간부는 예측 단위의 예측 모드가 참조 화소를 보간한 화소값을 기초로 인트라 예측을 수행하는 예측 단위일 경우, 참조 화소를 보간하여 정수값 이하의 화소 단위의 참조 화소를 생성할 수 있다. 현재 예측 단위의 예측 모드가 참조 화소를 보간하지 않고 예측 블록을 생성하는 예측 모드일 경우 참조 화소는 보간되지 않을 수 있다. DC 필터는 현재 블록의 예측 모드가 DC 모드일 경우 필터링을 통해서 예측 블록을 생성할 수 있다.When the prediction mode of the prediction unit is a prediction unit in which intra prediction is performed based on a pixel value obtained by interpolating the reference pixel, the reference pixel interpolator may interpolate the reference pixel to generate a reference pixel of a pixel unit having an integer value or less. When the prediction mode of the current prediction unit is a prediction mode that generates a prediction block without interpolating the reference pixel, the reference pixel may not be interpolated. The DC filter may generate the prediction block through filtering when the prediction mode of the current block is the DC mode.
복원된 블록 또는 픽쳐는 필터부(240)로 제공될 수 있다. 필터부(240)는 디블록킹 필터, 오프셋 보정부, ALF를 포함할 수 있다.The reconstructed block or picture may be provided to the filter unit 240 . The filter unit 240 may include a deblocking filter, an offset correction unit, and an ALF.
영상 부호화 장치로부터 해당 블록 또는 픽쳐에 디블록킹 필터를 적용하였는지 여부에 대한 정보 및 디블록킹 필터를 적용하였을 경우, 강한 필터를 적용하였는지 또는 약한 필터를 적용하였는지에 대한 정보를 제공받을 수 있다. 영상 복호화 장치의 디블록킹 필터에서는 영상 부호화 장치에서 제공된 디블록킹 필터 관련 정보를 제공받고 영상 복호화 장치에서 해당 블록에 대한 디블록킹 필터링을 수행할 수 있다. Information on whether a deblocking filter is applied to a corresponding block or picture and information on whether a strong filter or a weak filter is applied when the deblocking filter is applied may be provided from the image encoding apparatus. The deblocking filter of the image decoding apparatus may receive deblocking filter-related information provided from the image encoding apparatus, and the image decoding apparatus may perform deblocking filtering on the corresponding block.
오프셋 보정부는 부호화시 영상에 적용된 오프셋 보정의 종류 및 오프셋 값 정보 등을 기초로 복원된 영상에 오프셋 보정을 수행할 수 있다.The offset correction unit may perform offset correction on the reconstructed image based on the type of offset correction applied to the image during encoding, information on the offset value, and the like.
ALF는 부호화 장치로부터 제공된 ALF 적용 여부 정보, ALF 계수 정보 등을 기초로 부호화 단위에 적용될 수 있다. 이러한 ALF 정보는 특정한 파라메터 셋에 포함되어 제공될 수 있다.ALF may be applied to a coding unit based on information on whether ALF is applied, ALF coefficient information, etc. provided from the encoding apparatus. Such ALF information may be provided by being included in a specific parameter set.
메모리(245)는 복원된 픽쳐 또는 블록을 저장하여 참조 픽쳐 또는 참조 블록으로 사용할 수 있도록 할 수 있고 또한 복원된 픽쳐를 출력부로 제공할 수 있다. The memory 245 may store the reconstructed picture or block to be used as a reference picture or reference block, and may also provide the reconstructed picture to an output unit.
전술한 바와 같이 이하, 본 개시의 실시예에서는 설명의 편의상 코딩 유닛(Coding Unit)을 부호화 단위라는 용어로 사용하지만, 부호화뿐만 아니라 복호화를 수행하는 단위가 될 수도 있다.As described above, hereinafter, in the embodiments of the present disclosure, a coding unit is used as a term for a coding unit for convenience of description, but may also be a unit for performing decoding as well as coding.
또한, 현재 블록은, 부호화/복호화 대상 블록을 나타내는 것으로, 부호화/복호화 단계에 따라, 코딩 트리 블록(또는 코딩 트리 유닛), 부호화 블록(또는 부호화 유닛), 변환 블록(또는 변환 유닛), 예측 블록(또는 예측 유닛) 또는 인루프 필터의 적용 대상인 블록 등을 나타내는 것일 수 있다. 본 명세서에서, '유닛'은 특정 부호화/복호화 프로세스를 수행하기 위한 기본 단위를 나타내고, '블록'은 소정 크기의 화소 어레이를 나타낼 수 있다. 별도의 구분이 없는 한, '블록'과 '유닛'은 동등한 의미로 사용될 수 있다. 예컨대, 후술되는 실시예에서, 부호화 블록(코딩 블록) 및 부호화 유닛(코딩 유닛)은 상호 동등한 의미인 것으로 이해될 수 있다. In addition, the current block indicates a block to be encoded/decoded, and according to the encoding/decoding step, a coding tree block (or coding tree unit), a coding block (or a coding unit), a transform block (or a transform unit), and a prediction block (or a prediction unit) or a block to which an in-loop filter is applied. In this specification, a 'unit' may indicate a basic unit for performing a specific encoding/decoding process, and a 'block' may indicate a pixel array of a predetermined size. Unless otherwise specified, 'block' and 'unit' may be used interchangeably. For example, in the embodiments to be described below, it may be understood that the coding block (coding block) and the coding unit (coding unit) are mutually equivalent.
도 3 및 도 4는 본 개시에 따른 무손실 부호화 방법을 도시한 것이다.3 and 4 illustrate a lossless encoding method according to the present disclosure.
영상 압축은 크게 손실 부호화와 무손실 부호화로 분류될 수 있다. 두 부호화 간 가장 큰 차이점은 양자화 과정의 유무이다. 손실 부호화에서는 양자화 과정을 통해 비손실 부호화 대비 큰 압축 효율을 얻을 수 있지만, 데이터의 손실이 발생할 수 있다. 무손실 부호화에서는 원본 데이터를 그대로 유지할 수 있지만, 손실 부호화 대비 압축 효율이 떨어진다.Image compression can be broadly classified into lossy coding and lossless coding. The biggest difference between the two encodings is the presence or absence of a quantization process. In lossy coding, greater compression efficiency than lossless coding can be obtained through a quantization process, but data loss may occur. In lossless encoding, the original data can be maintained as it is, but compression efficiency is lower than that of lossy encoding.
도 1에서 살펴본 부호화 과정들 중에서, 양자화 및 인루프 필터링 과정을 이용함에 따라, 원본 데이터와는 다른 복원 데이터가 생성(즉, 손실이 발생)될 수 있다. 따라서, 무손실 부호화(lossless coding)에서는 양자화 과정 및 인루프 필터링 과정을 생략(skip)할 수 있다. 이때, 양자화 과정이 생략된다면, 잔차 데이터를 주파수 도메인 성분들로 변환하는 변환 과정이 무의미해지므로, 무손실 부호화 적용시 변환 과정을 더 생략할 수 있다. Among the encoding processes illustrated in FIG. 1 , by using the quantization and in-loop filtering processes, reconstructed data different from the original data may be generated (ie, loss occurs). Accordingly, in lossless coding, a quantization process and an in-loop filtering process may be skipped. In this case, if the quantization process is omitted, the transform process for transforming the residual data into frequency domain components becomes meaningless, so that the transform process can be further omitted when lossless coding is applied.
손실 부호화 및 무손실 부호화의 과정들이 상이한 바, 무손실 부호화의 적용 여부를 알려주는 정보를 복호화기로 전송하여야 한다. 일 예로, 상위 헤더(SPS, PPS 또는 슬라이스 헤더 등)를 통해 무손실 부호화의 수행 여부를 나타내는 정보를 부호화할 수 있다. 상위 헤더에서 1비트 정보(플래그)를 이용하여 무손실 부호화가 수행되었다는 것을 표시하였다면, 복호화기에서는 상기 1비트 정보를 이용하여 무손실 부호화가 수행되었다는 것을 판단한다. 무손실 부호화가 수행된 것으로 판단된 경우, 복호화기는 양자화 및 인루프 필터링 과정을 생략하고, 영상을 복호화할 수 있다. Since the processes of lossless encoding and lossless encoding are different, information indicating whether lossless encoding is applied must be transmitted to the decoder. For example, information indicating whether lossless encoding is performed may be encoded through an upper header (eg, SPS, PPS, or slice header). If the upper header indicates that lossless encoding has been performed using 1-bit information (flag), the decoder determines that lossless encoding has been performed using the 1-bit information. When it is determined that lossless encoding has been performed, the decoder may omit the quantization and in-loop filtering processes and decode the image.
또는, 서브 픽처 단위, 타일 단위 또는 코딩 트리 유닛 단위로 무손실 부호화의 적용 여부가 결정될 수도 있다.Alternatively, it may be determined whether lossless coding is applied in units of sub-pictures, tile units, or coding tree units.
일 예로, 무손실 부호화의 사용 여부를 결정하기 위한 변수 lossless_coding를 결정하기 위한 플래그가 비트스트림을 통해 시그날링될 수 있다. 변수 lossless_coding의 값이 true인 것은, 무손실 부호화가 적용됨을 나타내고, 변수 lossless_coding의 값이 false인 것은, 무손실 부호화가 적용되지 않음을 나타낸다.As an example, a flag for determining a variable lossless_coding for determining whether to use lossless encoding may be signaled through a bitstream. A value of the variable lossless_coding being true indicates that lossless encoding is applied, and a value of the variable lossless_coding being false indicates that lossless encoding is not applied.
변환, 양자화, 디블로킹 필터, SAO 또는 ALF의 사용 여부를 알려주는 변수들을 t_skip, q_skip, d_skip, s_skip, a_skip이라 정의할 수 있다. 상기 변수들의 값이 true인 것은 대응되는 코딩 과정이 생략됨을 나타내고, 상기 변수들의 값이 false인 것은 대응되는 코딩 과정이 생략되지 않음을 나타낸다.Variables indicating whether transform, quantization, deblocking filter, SAO, or ALF are used may be defined as t_skip, q_skip, d_skip, s_skip, and a_skip. A value of true of the variables indicates that a corresponding coding process is omitted, and a value of false indicates that a corresponding coding process is not omitted.
변수 lossless_coding의 값에 따라, 상기 변수들의 값을 결정하기 위한 플래그가 비트스트림을 통해 시그날링되는지 여부가 결정될 수 있다. 일 예로, 변수 lossless_coding의 값이 true인 경우, 변수 t_skip, q_skip, d_skip, s_skip, a_skip를 결정하기 위한 플래그의 시그날링이 생략될 수 있다. 부호화가 생략된 변수들은 기-정의된 값으로 추정될 수 있다. 기-정의된 값은 true일 수 있다. lossless_coding의 값이 true인 경우, 변수 t_skip, q_skip, d_skip, s_skip, a_skip들의 값과는 무관하게, 변환, 양자화 디블로킹 필터, SAO, ALF의 적용이 스킵될 수 있다.According to the value of the variable lossless_coding, it may be determined whether a flag for determining the values of the variables is signaled through the bitstream. For example, when the value of the variable lossless_coding is true, signaling of a flag for determining the variables t_skip, q_skip, d_skip, s_skip, and a_skip may be omitted. Variables whose encoding is omitted may be estimated as pre-defined values. A pre-defined value may be true. When the value of lossless_coding is true, application of the transform, quantization deblocking filter, SAO, and ALF may be skipped regardless of the values of the variables t_skip, q_skip, d_skip, s_skip, and a_skip.
변수 lossless_coding의 값이 false인 경우, t_skip, q_skip, d_skip, s_skip, a_skip 변수를 결정하기 위한 플래그를 복호화할 수 있다. 각 변수의 값이 true인지 또는 false인지 여부에 기초하여, 대응하는 코딩 과정의 스킵 여부를 결정할 수 있다. When the value of the variable lossless_coding is false, flags for determining variables t_skip, q_skip, d_skip, s_skip, and a_skip may be decoded. Based on whether the value of each variable is true or false, it is possible to determine whether to skip the corresponding coding process.
도 3을 참조하면, lossless_coding의 값이 false인 경우, t_skip, q_skip, d_skip, s_skip, a_skip 중 적어도 하나는 true로 설정될 수 있다. 이에 따라, 제1 변수를 제외한 나머지 변수들의 값이 false인 경우, 제1 변수의 값을 결정하기 위한 플래그의 시그날링을 생략하고, 제1 변수의 값을 true로 설정할 수 있다. 일 예로, t_skip, q_skip, d_skip, s_skip의 값이 false인 경우, a_skip을 결정하기 위한 플래그의 부호화를 생략하고, 변수 a_skip을 true로 설정할 수 있다.Referring to FIG. 3 , when the value of lossless_coding is false, at least one of t_skip, q_skip, d_skip, s_skip, and a_skip may be set to true. Accordingly, when values of variables other than the first variable are false, signaling of a flag for determining the value of the first variable may be omitted and the value of the first variable may be set to true. For example, when values of t_skip, q_skip, d_skip, and s_skip are false, encoding of a flag for determining a_skip may be omitted and the variable a_skip may be set to true.
또는, 변수 lossless_coding의 값을 결정하기 위한 플래그를 시그날링하는 대신, lossless_coding을 내부 변수로 정의할 수 있다. 내부 변수 lossless_coding의 값은, 변수 t_skip, q_skip, d_skip, s_skip, a_skip에 기초하여 결정될 수 있다. Alternatively, instead of signaling a flag for determining the value of the variable lossless_coding, lossless_coding may be defined as an internal variable. The value of the internal variable lossless_coding may be determined based on the variables t_skip, q_skip, d_skip, s_skip, and a_skip.
도 4를 참조하면, 변수 t_skip, q_skip, d_skip, s_skip, a_skip 각각의 값을 결정하기 위한 플래그가 비트스트림을 통해 시그날링될 수 있다. 이때, 변수, t_skip, q_skip, d_skip, s_skip, a_skip의 값이 모두 true인 경우, 변수 lossless_coding이 true로 설정될 수 있다. 반면, t_skip, q_skip, d_skip, s_skip, a_skip 중 적어도 하나가 false인 경우, 변수 lossless_coding이 false로 결정될 수 있다.Referring to FIG. 4 , a flag for determining a value of each of variables t_skip, q_skip, d_skip, s_skip, and a_skip may be signaled through a bitstream. In this case, when values of the variables t_skip, q_skip, d_skip, s_skip, and a_skip are all true, the variable lossless_coding may be set to true. On the other hand, when at least one of t_skip, q_skip, d_skip, s_skip, and a_skip is false, the variable lossless_coding may be determined to be false.
그런 다음, 블록 단위로 무손실 부호화와 관련된 내부 변수를 정의할 수 있다. 이 변수를 blk_lossless_coding이라 정의 할 때, blk_lossless_coding의 값을 도 3 또는 도 4에서 설정된 변수 lossless_coding의 값으로 설정할 수 있다. Then, it is possible to define internal variables related to lossless coding in units of blocks. When this variable is defined as blk_lossless_coding, the value of blk_lossless_coding may be set to the value of the variable lossless_coding set in FIG. 3 or FIG. 4 .
혹은 lossless_coding이 true로 설정된 경우, 블록마다 blk_lossless_coding를 부호화하여, 블록 단위로 무손실 부호화의 수행 여부를 결정할 수도 있다. Alternatively, when lossless_coding is set to true, blk_lossless_coding may be encoded for each block to determine whether to perform lossless encoding in units of blocks.
위 예시에서는 설명의 편의성을 위해 변환, 양자화, 디블로킹 필터, SAO, ALF에 대해서만 예를 들었지만, joint_CbCr 부호화 방법과 LMCS(luma mapping with chroma scaling)과 같은, 무손실 부호화를 불가능하게 하는 모든 기술들에 대해 전술한 방식이 동일/유사하게 적용될 수 있다.In the above example, for convenience of explanation, only transform, quantization, deblocking filter, SAO, and ALF are given as examples, but for all techniques that make lossless coding impossible, such as the joint_CbCr coding method and LMCS (luma mapping with chroma scaling), The above-described method may be applied in the same/similar manner.
도 5 내지 도 7은, 본 개시에 따른 팔레트 모드(palette mode)의 개념을 설명하기 위한 도면이다.5 to 7 are diagrams for explaining the concept of the palette mode (palette mode) according to the present disclosure.
팔레트 모드는 부호화 대상 블록(이하, 현재 블록이라 함) 내에 많이 발생하는 화소를 특정 인덱스로 표시한 후, 화소 대신 그 특정 인덱스를 부호화 하여 복호화 장치로 전송하는 방식이다. 팔레트 모드가 허용되는지 여부를 나타내는 플래그를 부호화하여 복호화 장치로 전송할 수 있다. 이때, 상기 플래그는 현재 블록의 크기가 기-설정된 크기 이하인 경우에 한하여 부호화될 수 있다. 기-설정된 크기는 현재 블록이 속한 슬라이스의 슬라이스 타입, 현재 블록의 부호화 모드 또는 예측 모드에 기초하여 결정될 수 있다. 일 예로, 현재 블록이 I 슬라이스에 속한 경우, 현재 블록의 크기가 4x4인 경우에 한하여, 팔레트 모드가 이용될 수 있다. 현재 블록이 B 또는 P 슬라이스에 속한 경우, 현재 블록의 크기가 4x4보다 크고, 64x64 보다 작은 경우에 한하여, 팔레트 모드가 이용될 수 있다.In the palette mode, pixels occurring a lot in a block to be encoded (hereinafter referred to as a current block) are displayed with a specific index, and then the specific index is encoded instead of the pixel and transmitted to the decoding device. A flag indicating whether the palette mode is permitted may be encoded and transmitted to the decoding apparatus. In this case, the flag may be coded only when the size of the current block is less than or equal to a preset size. The preset size may be determined based on the slice type of the slice to which the current block belongs, the encoding mode or the prediction mode of the current block. For example, when the current block belongs to the I slice, the palette mode may be used only when the size of the current block is 4x4. When the current block belongs to the B or P slice, the palette mode may be used only when the size of the current block is larger than 4x4 and smaller than 64x64.
도 5는 팔레트 테이블을 생성하는 과정에 대한 예시이다. 설명의 편의성을 위해 현재 블록의 크기는 8x8라고 가정하고 설명한다. 우선 현재 블록 안에 존재하는 64개의 화소들에 대한 히스토그램은 도 5와 같다. 도 5에서, 가로축은 화소 값(예를 들어 8 비트로 양자화된 화소인 경우 0~255 중 하나의 값)을 의미하며, 세로축은 화소 값의 빈도수를 의미한다. 그 후, 빈도수가 많이 발생하는 화소들을 기준으로 양자화 존을 설정한다. 양자화 존 안에 존재하는 화소들은 빈도수가 가장 높은 화소로 대체되고, 빈도수가 가장 높은 화소에 하나의 인덱스를 할당한다. 양자화 존의 크기를 나타내는 정보가 부호화되어 복호화 장치에 전송될 수 있다. 또는, 현재 블록의 크기, 형태, 또는 비트 뎁스 중 적어도 하나에 기초하여, 양자화 존의 크기를 결정할 수 있다.5 is an example of a process of generating a pallet table. For convenience of explanation, it is assumed that the size of the current block is 8x8. First, a histogram of 64 pixels existing in the current block is shown in FIG. 5 . In FIG. 5 , the horizontal axis indicates a pixel value (for example, a value from 0 to 255 in the case of a pixel quantized to 8 bits), and the vertical axis indicates the frequency of pixel values. Thereafter, a quantization zone is set based on pixels that occur frequently. Pixels existing in the quantization zone are replaced with the pixel with the highest frequency, and one index is assigned to the pixel with the highest frequency. Information indicating the size of the quantization zone may be encoded and transmitted to a decoding apparatus. Alternatively, the size of the quantization zone may be determined based on at least one of the size, shape, and bit depth of the current block.
도 5에서, 양자화 존 안에 굵은 실선으로 표현된 부분이 빈도수가 가장 높은 화소들(a8, a20, a31, a40)을 의미하며, 가는 실선으로 표현된 부분은 그 외 화소들을 의미한다. 그리고 양자화존에 포함되지 않는 화소(양자화존 바깥에서 굵은 실선으로 표시된 부분)는 이스케이프(escape) 값이라고 표현하며, 이 값의 경우 인덱스로 부호화 외에 추가적으로 양자화하여 부호화한다. In FIG. 5 , parts represented by thick solid lines in the quantization zone denote pixels a8, a20, a31, and a40 having the highest frequency, and parts denoted by thin solid lines denote other pixels. In addition, pixels that are not included in the quantization zone (parts indicated by thick solid lines outside the quantization zone) are expressed as escape values, and these values are quantized and encoded in addition to encoding with an index.
도 6은, 도 5에서 설정된 팔레트 테이블에 대한 예시를 보여준다. Figure 6 shows an example for the palette table set in Figure 5.
도 6에서 팔레트 테이블의 각 행을 팔레트 엔트리라고 표현하며, 각 엔트리마다 상이한 인덱스를 할당한다. 즉 팔레트 테이블의 크기는 엔트리의 개수를 의미할 수 있다. In Figure 6, each row of the palette table is expressed as a palette entry, and a different index is assigned to each entry. That is, the size of the palette table may mean the number of entries.
각 양자화 존에서 가장 빈도수가 높았던 화소들(a8, a20, a31, a40)을 이용하여 엔트리를 구성하고, 각 엔트리마다 인덱스를 할당한다. 만약 이스케이프 값이 존재한다면, 마지막 엔트리에 이스케이프를 배치하고 인덱스를 할당할 수 있다. 즉, 팔레트 내 마지막 인덱스는 이스케이프 값을 의미하게 할 수 있다. An entry is formed using pixels a8, a20, a31, and a40 having the highest frequency in each quantization zone, and an index is assigned to each entry. If an escape value exists, it can be assigned an index by placing the escape at the last entry. That is, the last index in the palette can mean an escape value.
도 7은 설정된 팔레트 테이블을 이용하여, 블록 안의 화소들이 인덱스로 할당되는 과정에 대한 예시이다. 도 7에서, 할당된 인덱스들을 팔레트 인덱스라고 표현한다.7 is an example of a process in which pixels in a block are allocated as indexes using a set palette table. In Figure 7, the allocated indexes are expressed as palette indexes.
블록 안에 존재하던 화소들은 설정된 팔레트 테이블에 따라 인덱스로 대체되며, 인덱스가 부호화되어 복호화 장치로 전송된다. 그리고 이스케이프 값으로 표시된 경우 (도 7에서 a50, a62), 인덱스 외에 추가적으로 양자화된 a50'와 a62'가 부호화된다. 또한 사용된 팔레트 테이블 또한 부호화되어 복호화 장치로 전송된다.Pixels existing in the block are replaced with indexes according to the set palette table, and the indexes are encoded and transmitted to the decoding device. In addition, when indicated as escape values (a50 and a62 in FIG. 7 ), quantized a50' and a62' are additionally encoded in addition to the index. In addition, the used palette table is also encoded and transmitted to the decoding device.
도 8은 본 개시에 따른 팔레트 모드(palette mode)에 기반하여 인트라 예측을 수행하는 방법을 도시한 것이다.8 illustrates a method of performing intra prediction based on a palette mode according to the present disclosure.
팔레트 모드는 블록 단위(예를 들어, 코딩 유닛, 예측 유닛)로 적용될 수 있으며, 이를 위해 블록 단위로 팔레트 모드의 사용 여부를 나타내는 플래그 정보(pred_mode_plt_flag)를 시그날링할 수도 있다. 즉, 상기 플래그의 값이 1인 경우, 현재 블록에 대해 팔레트 모드가 적용되고, 상기 플래그의 값이 0인 경우, 현재 블록에 대해서 팔레트 모드가 적용되지 않는다.The palette mode may be applied on a block-by-block basis (eg, a coding unit, a prediction unit), and for this, flag information (pred_mode_plt_flag) indicating whether to use the palette mode may be signaled on a block-by-block basis. That is, when the value of the flag is 1, the palette mode is applied to the current block, and when the value of the flag is 0, the palette mode is not applied to the current block.
상기 플래그는, 현재 블록의 예측 모드 또는 현재 블록의 크기 중 적어도 하나에 기초하여 적응적으로 부호화/복호화될 수 있다. 예를 들어, 상기 플래그는 현재 블록의 예측 모드가 인트라 모드인 경우에 한하여 부호화/복호화될 수 있다. 상기 플래그는 현재 블록의 예측 모드가 스킵 모드(skip mode)가 아닌 경우에 한하여 부호화/복호화될 수 있다. 상기 플래그는 현재 블록의 너비 또는 높이 중 적어도 하나가 소정의 제1 문턱크기보다 작거나 같은 경우에 한하여 부호화/복호화될 수 있다. 여기서, 제1 문턱크기는 부호화/복호화 장치에 기-정의된 값으로서, 16, 32, 또는 64 중 어느 하나일 수 있다. 상기 플래그는 현재 블록의 너비와 높이의 곱이 소정의 제2 문턱크기보다 큰 경우에 한하여 부호화/복호화될 수 있다. 여기서, 제2 문턱크기는 부호화/복호화 장치에 기-정의된 값으로서, 16, 32, 또는 64 중 어느 하나일 수 있다. 다만, 상기 제1 문턱크기와 제2 문턱크기는 서로 다른 값일 수 있다. 전술한 조건 중 어느 하나라도 만족하지 않는 경우, 상기 플래그는 부호화/복호화되지 않으며, 이 경우 상기 플래그의 값은 0으로 설정될 수 있다.The flag may be adaptively encoded/decoded based on at least one of a prediction mode of the current block and a size of the current block. For example, the flag may be encoded/decoded only when the prediction mode of the current block is the intra mode. The flag may be encoded/decoded only when the prediction mode of the current block is not a skip mode. The flag may be encoded/decoded only when at least one of a width or a height of the current block is less than or equal to a predetermined first threshold size. Here, the first threshold size is a pre-defined value in the encoding/decoding apparatus, and may be any one of 16, 32, or 64. The flag may be encoded/decoded only when the product of the width and height of the current block is greater than a predetermined second threshold size. Here, the second threshold size is a value pre-defined in the encoding/decoding apparatus, and may be any one of 16, 32, or 64. However, the first threshold size and the second threshold size may be different values. If any one of the above conditions is not satisfied, the flag is not encoded/decoded, and in this case, the value of the flag may be set to 0.
도 8을 참조하면, 현재 블록의 팔레트 모드를 위한 팔레트 테이블(palette table)을 구성할 수 있다(S800).Referring to FIG. 8, a palette table for the palette mode of the current block may be configured (S800).
팔레트 테이블은 적어도 하나의 팔레트 엔트리(palette entry)와 각각의 팔레트 엔트리를 식별하는 팔레트 인덱스(palette index)로 구성될 수 있다. 현재 블록의 팔레트 테이블은 이전 블록의 팔레트 테이블(이하, 이전 팔레트 테이블이라 함)를 이용하여 결정될 수 있다. 여기서, 이전 블록은 현재 블록 이전에 부호화 또는 복호화된 블록을 의미할 수 있다.The palette table may consist of at least one palette entry and a palette index identifying each palette entry. The palette table of the current block may be determined using the palette table of the previous block (hereinafter referred to as the previous palette table). Here, the previous block may mean a block coded or decoded before the current block.
구체적으로, 현재 블록의 팔레트 엔트리는 예측된 팔레트 엔트리 또는 시그널링된 팔레트 엔트리 중 적어도 하나를 포함할 수 있다. 현재 블록은 이전 블록이 사용한 팔레트 엔트리의 전부 또는 일부를 사용할 수 있으며, 이와 같이 이전 블록에서 사용된 팔레트 엔트리 중 현재 블록에서 재사용되는 팔레트 엔트리를 예측된 팔레트 엔트리라 부르기로 한다.Specifically, the palette entry of the current block may include at least one of a predicted palette entry or a signaled palette entry. The current block may use all or part of the palette entries used by the previous block, and among the palette entries used in the previous block, the palette entry reused in the current block is called a predicted palette entry.
현재 블록은 이전 팔레트 테이블의 팔레트 엔트리 전부 이용할 수 있다. 또는, 현재 블록은 이전 팔레트 테이블의 팔레트 엔트리 중 일부를 이용할 수도 있으며, 이를 위해 팔레트 엔트리의 재사용 여부를 특정하는 플래그(PalettePredictorEntryReuseFlag, 이하 팔레트 예측 플래그라 함)가 이용될 수 있다. 이전 팔레트 테이블의 팔레트 엔트리 각각에 상기 팔레트 예측 플래그의 값이 할당되며, 상기 팔레트 예측 플래그(PalettePredictorEntryReuseFlag[i])는 이전 팔레트 테이블에서 팔레트 인덱스 i에 대응하는 팔레트 엔트리가 현재 블록의 팔레트 테이블에 재사용되는지 여부를 나타낼 수 있다. 예를 들어, 상기 팔레트 예측 플래그의 값이 1인 경우에는 이전 팔레트 테이블에서 팔레트 인덱스 i에 대응하는 팔레트 엔트리가 현재 블록의 팔레트 테이블에 재사용되고, 상기 팔레트 예측 플래그의 값이 0인 경우에는 재사용되지 아니한다. 이전 팔레트 테이블로부터 팔레트 예측 플래그의 값이 1인 팔레트 엔트리를 추출하고, 이를 순차적으로 배열하여 현재 블록의 팔레트 테이블을 구성할 수 있다.The current block can use all of the palette entries in the previous palette table. Alternatively, the current block may use some of the palette entries of the previous palette table, and for this, a flag (PalettePredictorEntryReuseFlag, hereinafter referred to as a palette prediction flag) for specifying whether to reuse the palette entry may be used. The value of the palette prediction flag is assigned to each palette entry of the previous palette table, and the palette prediction flag (PalettePredictorEntryReuseFlag[i]) determines whether the palette entry corresponding to the palette index i in the previous palette table is reused in the palette table of the current block. can indicate whether For example, when the value of the palette prediction flag is 1, the palette entry corresponding to the palette index i in the previous palette table is reused in the palette table of the current block, and when the value of the palette prediction flag is 0, it is not reused No. A palette table of the current block may be constructed by extracting a palette entry having a value of the palette prediction flag of 1 from the previous palette table, and arranging them sequentially.
한편, 현재 블록의 팔레트 테이블은 소정의 영역 단위로 초기화될 수 있다. 여기서, 소정의 영역은 병렬 처리 영역을 의미하거나, 현재 픽쳐의 CTU 행을 의미할 수도 있다. 만일 현재 블록이 CTU 행의 첫번째 CTU에 속한 경우, 현재 블록의 팔레트 테이블은 현재 블록이 속한 CTU의 이웃 CTU의 팔레트 테이블로 초기화될 수 있다. 여기서, 이웃 CTU는 현재 블록이 속한 CTU의 상단에 위치한 CTU를 의미할 수 있다. 즉, N번째 CTU 행의 첫번째 CTU에 대한 팔레트 테이블은 (N-1)번째 CTU 행의 첫번째 CTU에 대한 팔레트 테이블을 기반으로 초기화될 수 있다. 초기화된 팔레트 테이블은, 동일 CTU 행에 속한 이전 블록의 팔레트 테이블을 기반으로 업데이트될 수 있다. 전술한 실시예는 일예에 불과하며, 현재 블록의 팔레트 테이블을 구성하는 방법에 대해서는 도 9 내지 도 10을 참조하여 자세히 살펴보도록 한다.Meanwhile, the palette table of the current block may be initialized in units of a predetermined area. Here, the predetermined region may mean a parallel processing region or a CTU row of the current picture. If the current block belongs to the first CTU of the CTU row, the palette table of the current block may be initialized with the palette table of the neighboring CTU of the CTU to which the current block belongs. Here, the neighboring CTU may mean a CTU located above the CTU to which the current block belongs. That is, the palette table for the first CTU of the N-th CTU row may be initialized based on the palette table for the first CTU of the (N-1)-th CTU row. The initialized palette table may be updated based on the palette table of the previous block belonging to the same CTU row. The above-described embodiment is merely an example, and the method of configuring the palette table of the current block will be described in detail with reference to FIGS. 9 to 10 .
한편, 상기 팔레트 예측 플래그는 팔레트 엔트리 별로 부호화/복호화된 플래그의 형태로 시그날링될 수 있다. 또는, 상기 팔레트 예측 플래그는 런 렝스(run length) 부호화 기반의 바이너리 벡터의 형태로 부호화/복호화될 수 있다. 즉, 이전 팔레트 엔트리의 재사용 여부를 특정하는 팔레트 예측 플래그 어레이에서, 0이 아닌 팔레트 예측 플래그들 사이에 있는 0인 팔레트 예측 플래그의 개수를 특정하는 신택스 palette_predictor_run가 부호화/복호화될 수 있다. 이에 대해서는 후술하기로 한다.Meanwhile, the palette prediction flag may be signaled in the form of an encoded/decoded flag for each palette entry. Alternatively, the palette prediction flag may be encoded/decoded in the form of a binary vector based on run length encoding. That is, in the palette prediction flag array that specifies whether to reuse the previous palette entry, a syntax palette_predictor_run that specifies the number of palette prediction flags that is 0 between non-zero palette prediction flags may be encoded/decoded. This will be described later.
또는, 런 렝스를 부호화하는 대신, 팔레트 예측 플래그 값들을 직접 부호화할 수도 있다. 이에 대해서는, 후술하기로 한다.Alternatively, instead of encoding the run length, the palette prediction flag values may be directly encoded. This will be described later.
또한, 현재 블록의 팔레트 테이블은 비트스트림을 통해 시그날링된 팔레트 엔트리를 더 포함할 수 있으며, 여기서, 상기 시그날링된 팔레트 엔트리는 현재 블록이 사용하는 팔레트 엔트리 중 이전 팔레트 테이블에 포함되지 않은 팔레트 엔트리를 의미할 수 있다. 시그날링된 팔레트 엔트리는 팔레트 테이블의 예측된 팔레트 엔트리 이후에 추가될 수 있다.In addition, the palette table of the current block may further include a palette entry signaled through a bitstream, wherein the signaled palette entry is a palette entry that is not included in the previous palette table among the palette entries used by the current block can mean The signaled palette entry may be added after the predicted palette entry of the palette table.
도 8을 참조하면, 현재 블록의 화소 단위로 팔레트 인덱스(palette index)를 결정할 수 있다(S810).Referring to FIG. 8 , a palette index may be determined in units of pixels of the current block ( S810 ).
현재 블록은 인덱스 모드(INDEX MODE) 또는 카피 모드(COPY MODE) 중 적어도 하나를 이용하여 팔레트 인덱스를 결정할 수 있다. The current block may determine the palette index using at least one of an index mode (INDEX MODE) or a copy mode (COPY MODE).
여기서, 인덱스 모드(INDEX MODE)는 현재 블록에서 사용되는 팔레트 인덱스를 특정하기 위해 부호화 장치에서 팔레트 인덱스 정보(palette_idx_idc)를 부호화하는 방식을 의미할 수 있다. 복호화 장치는, 부호화된 팔레트 인덱스 정보에 기반하여 현재 화소의 팔레트 인덱스를 유도할 수 있다. 팔레트 인덱스 정보는 0에서 (MaxPaletteIndex-1) 사이의 값을 가지며, 여기서 MaxPaletteIndex는 현재 블록의 팔레트 테이블의 크기 또는 팔레트 테이블을 구성하는 팔레트 엔트리의 개수를 의미할 수 있다. 인덱스 모드에서는, 비트스트림을 통해 시그날링된 팔레트 인덱스 정보의 값이 현재 화소의 팔레트 인덱스로 할당될 수 있다.Here, the index mode (INDEX MODE) may mean a method of encoding the palette index information (palette_idx_idc) in the encoding apparatus to specify the palette index used in the current block. The decoding apparatus may derive the palette index of the current pixel based on the encoded palette index information. The palette index information has a value between 0 and (MaxPaletteIndex-1), where MaxPaletteIndex may mean the size of the palette table of the current block or the number of palette entries constituting the palette table. In the index mode, the value of the palette index information signaled through the bitstream may be allocated as the palette index of the current pixel.
카피 모드(COPY MODE)는 소정의 스캔 순서에 따른 이웃 화소의 팔레트 인덱스를 이용하여 현재 화소의 팔레트 인덱스를 결정하는 방식을 의미할 수 있다. 여기서, 본 개시에 따른 스캔 순서로서, 수평 방향 스캔, 수직 방향 스캔, 대각 방향 스캔 등이 이용될 수 있으며, 이 중 어느 하나가 선택적으로 이용될 수 있다. 이를 위해, 소정의 플래그 또는 인덱스가 부호화/복호화될 수 있다. 예를 들어, 부호화 장치는, 현재 블록의 스캔 순서로서 수평 방향 스캔이 적용되는 경우, 상기 플래그를 0으로 부호화하고, 현재 블록의 스캔 순서로서 수직 방향 스캔이 적용되는 경우, 상기 플래그를 1로 부호화할 수 있다. 복호화 장치는, 부호화된 플래그에 따라 현재 블록의 스캔 순서를 적응적으로 결정할 수 있다. 다만, 이에 한정되지 아니하며, 스캔 순서에 따라 팔레트 인덱스를 부호화/복호화하는 방법에 대해서는 후술하기로 한다.The copy mode (COPY MODE) may refer to a method of determining the palette index of the current pixel by using the palette index of the neighboring pixel according to a predetermined scan order. Here, as the scan order according to the present disclosure, a horizontal scan, a vertical scan, a diagonal scan, etc. may be used, and any one of them may be selectively used. To this end, a predetermined flag or index may be encoded/decoded. For example, the encoding apparatus encodes the flag as 0 when horizontal scan is applied as the scan order of the current block, and codes the flag as 1 when vertical scan is applied as the scan order of the current block. can do. The decoding apparatus may adaptively determine the scan order of the current block according to the coded flag. However, the present invention is not limited thereto, and a method of encoding/decoding the palette index according to the scan order will be described later.
카피 모드에서는, 이웃 화소의 팔레트 인덱스에 기초하여 현재 화소의 팔레트 인덱스를 예측할 수도 있고, 이웃 화소의 팔레트 인덱스를 복사하여 그대로 현재 화소의 팔레트 인덱스로 설정할 수도 있다. 여기서, 이웃 화소는 현재 화소의 상단, 하단, 좌측 또는 우측에 인접한 화소를 의미할 수 있다. 특히, 상기 이웃 화소는 현재 화소와 동일 수평 라인 또는 동일 수직 라인에 위치한 것일 수 있다.In the copy mode, the palette index of the current pixel may be predicted based on the palette index of the neighboring pixel, or the palette index of the neighboring pixel may be copied and set as the palette index of the current pixel as it is. Here, the neighboring pixel may mean a pixel adjacent to the top, bottom, left, or right of the current pixel. In particular, the neighboring pixel may be located on the same horizontal line or the same vertical line as the current pixel.
예를 들어, 상기 카피 모드는 현재 화소의 상단 또는 하단에 인접한 화소가 사용한 팔레트 인덱스를 현재 화소의 팔레트 인덱스로 동일하게 사용하는 제1 카피 모드, 현재 화소의 좌측 또는 우측에 인접한 화소가 사용한 팔레트 인덱스를 현재 화소의 팔레트 인덱스로 동일하게 사용하는 제2 카피 모드, 또는 현재 화소의 대각 방향으로 인접한 화소가 사용한 팔레트 인덱스를 현재 화소의 팔레트 인덱스로 동일하게 사용하는 제3 카피 모드 중 적어도 하나를 포함할 수 있다. For example, the copy mode is the first copy mode in which the palette index used by the pixel adjacent to the top or bottom of the current pixel is identically used as the palette index of the current pixel, the palette index used by the pixel adjacent to the left or right of the current pixel At least one of a second copy mode that uses the same as the palette index of the current pixel, or a third copy mode that uses the palette index used by diagonally adjacent pixels of the current pixel equally as the palette index of the current pixel can
한편, 현재 블록의 스캔 순서에 따라 전술한 제1 내지 제3 카피 모드 중 어느 하나가 선택적으로 사용될 수 있다. 예를 들어, 상기 제1 카피 모드는 현재 블록의 스캔 순서가 수직 방향 스캔인 경우에 적용되고, 제2 카피 모드는 현재 블록의 스캔 순서가 수평 방향 스캔인 경우에 적용될 수 있다.Meanwhile, any one of the above-described first to third copy modes may be selectively used according to the scan order of the current block. For example, the first copy mode may be applied when the scan order of the current block is a vertical scan, and the second copy mode may be applied when the scan order of the current block is a horizontal scan.
또한, 현재 블록의 스캔 시작 위치는 현재 블록의 좌상단 화소로 한정되지 아니하며, 현재 블록의 다른 코너 화소(예를 들어, 좌하단 화소, 우상단 화소, 우하단 화소)이 스캔 시작 위치로 이용될 수도 있다. 따라서, 현재 블록의 스캔 순서 및 스캔 시작 위치에 따라 상술한 바와 같이 상단 또는 좌측에 인접한 화소와 동일한 팔레트 인덱스를 사용할 수도 있고, 하단 또는 우측에 인접한 화소와 동일한 팔레트 인덱스를 사용할 수도 있다.In addition, the scan start position of the current block is not limited to the upper-left pixel of the current block, and other corner pixels of the current block (eg, lower-left pixel, upper-right pixel, and lower-right pixel) may be used as the scan start position. . Accordingly, according to the scan order and scan start position of the current block, the same palette index as the pixel adjacent to the top or left may be used as described above, or the same palette index as the pixel adjacent to the bottom or right may be used.
전술한 인덱스 모드와 카피 모드 중 어느 하나가 선택적으로 이용될 수 있다. 예를 들어, 부호화 장치는 카피 모드가 사용되는지 여부를 나타내는 플래그(run_copy_flag)를 부호화할 수 있다. 여기서, 만일 카피 모드가 사용되는 경우, 부호화 장치는 상기 플래그를 1로 부호화하고, 그렇지 않은 경우(즉, 인덱스 모드가 사용되는 경우), 부호화 장치는 상기 플래그를 0으로 부호화할 수 있다.Any one of the above-described index mode and copy mode may be selectively used. For example, the encoding apparatus may encode a flag (run_copy_flag) indicating whether the copy mode is used. Here, if the copy mode is used, the encoding apparatus may encode the flag as 1, otherwise (ie, if the index mode is used), the encoding apparatus may encode the flag as 0.
도 8을 참조하면, 상기 팔레트 테이블과 팔레트 인덱스에 기반하여, 현재 블록의 화소를 예측할 수 있다(S820).Referring to FIG. 8 , the pixel of the current block may be predicted based on the palette table and the palette index ( S820 ).
구체적으로, 현재 블록의 팔레트 테이블로부터 상기 팔레트 인덱스와 동일한 값의 팔레트 인덱스를 가진 팔레트 엔트리를 추출하고, 이를 이용하여 현재 블록의 화소를 예측/복원할 수 있다. 예를 들어, 팔레트 테이블로부터 추출된 팔레트 엔트리의 값이 현재 블록의 화소의 예측값 또는 복원값으로 설정될 수 있다.Specifically, it is possible to extract a palette entry having a palette index of the same value as the palette index from the palette table of the current block, and predict/restore the pixel of the current block using this. For example, the value of the palette entry extracted from the palette table may be set as the predicted value or the restored value of the pixel of the current block.
다만, 상기 팔레트 인덱스가 현재 블록의 팔레트 테이블 내 팔레트 엔트리 중 마지막 팔레트 엔트리를 지시하는 경우, 해당 화소는 이스케이프 모드(ESCAPE MODE)로 부호화된 것으로 유추될 수 있다. 여기서, 이스케이프 모드라 함은, 기-구성된 팔레트 테이블의 팔레트 엔트리를 이용하지 않고, 대신에 추가적으로 시그날링되는 팔레트 이스케이프 값(palette escape value)에 기반하여 화소를 예측/복원하는 방식을 의미할 수 있다. 따라서, (팔레트 엔트리의 개수-1)과 동일한 값의 팔레트 인덱스를 가진 화소는 상기 추가적으로 시그날링되는 팔레트 이스케이프 값을 이용하여 예측/복원될 수 있다.However, when the palette index indicates the last palette entry among the palette entries in the palette table of the current block, the pixel may be inferred as being encoded in the escape mode (ESCAPE MODE). Here, the escape mode does not use the palette entry of the pre-configured palette table, but instead predicts / restores the pixel based on the additionally signaled palette escape value It can mean a method. . Accordingly, a pixel having a palette index equal to (the number of palette entries - 1) may be predicted/restored using the additionally signaled palette escape value.
전술한 실시예는 일예에 불과하며, 팔레트 테이블을 구성하는 다양한 방법에 대해서는 이하의 도면을 참조하여 상세히 설명하기로 한다.The above-described embodiment is merely an example, and various methods of configuring the pallet table will be described in detail with reference to the following drawings.
도 9 및 도 10은 본 개시에 따른 팔레트 테이블을 구성하는 방법을 도시한 것이다.9 and 10 show a method of configuring a pallet table according to the present disclosure.
현재 블록이 팔레트 모드로 부호화된 경우, 부호화 장치에서 사용한 동일한 팔레트 테이블이 복호화 장치에서도 존재해야 한다. 따라서 부호화 장치에서 팔레트 테이블을 부호화해야만 한다. 따라서 팔레트 테이블에 존재하는 팔레트 엔트리의 개수를 부호화하고, 각 엔트리마다 할당된 화소값을 부호화할 수 있다. 하지만 이러한 방식은 블록의 크기가 커질수록, 엔트리의 개수가 많아 질수록 부호화 되는 비트량이 급격히 증가하게 된다. 따라서 이전 블록에서 팔레트 모드를 사용했다면, 이전 블록에서 사용했던 팔레트 테이블을 기초로 현재 블록의 팔레트 테이블을 생성함으로써, 팔레트 테이블을 부호화하는데 필요한 비트량을 크게 줄여줄 수 있다. 여기서, 이전 블록은 현재 블록 이전에 부호화/복호화가 완료된 블록을 의미한다. 구체적으로, 이전 팔레트 테이블을 기초로 현재 블록의 팔레트 테이블을 구성하는지 여부를 나타내는 플래그 또는 이전 블록의 팔레트 테이블에 포함된 엔트리를 현재 블록의 팔레트 테이블에 추가할 것인지 여부를 나타내는 팔레트 예측 플래그 중 적어도 하나를 이용할 수 있다. When the current block is encoded in the palette mode, the same palette table used in the encoding apparatus must also exist in the decoding apparatus. Therefore, it is necessary to encode the palette table in the encoding device. Therefore, it is possible to encode the number of palette entries existing in the palette table, and to encode the pixel value assigned to each entry. However, in this method, as the size of the block increases and the number of entries increases, the amount of encoded bits rapidly increases. Therefore, if the palette mode was used in the previous block, the amount of bits required to encode the palette table can be greatly reduced by generating the palette table of the current block based on the palette table used in the previous block. Here, the previous block means a block that has been encoded/decoded before the current block. Specifically, at least one of a flag indicating whether to configure the palette table of the current block based on the previous palette table, or a palette prediction flag indicating whether to add an entry included in the palette table of the previous block to the palette table of the current block is available.
도 9는 팔레트 예측 플래그를 이용하여, 현재 부호화 하려는 팔레트 테이블의 비트량을 줄이는 방법이다. 9 is a method of reducing the bit amount of a palette table to be currently encoded by using a palette prediction flag.
도 9에서 팔레트 테이블 A는, 현재 블록 이전에 팔레트 모드를 이용하여 부호화된 블록에 존재하는 팔레트 테이블을 의미할 수 있다. 여기서, 이전 블록은 현재 블록에 인접하는 이웃 블록일 수 있다. 이웃 블록은, 상단 이웃 블록, 좌측 이웃 블록, 좌상단 이웃 블록, 우상단 이웃 블록 또는 좌하단 이웃 블록 중 적어도 하나를 포함할 수 있다. In FIG. 9 , the palette table A may mean a palette table existing in a block encoded using a palette mode before the current block. Here, the previous block may be a neighboring block adjacent to the current block. The neighboring block may include at least one of an upper neighboring block, a left neighboring block, an upper left neighboring block, an upper right neighboring block, or a lower left neighboring block.
팔레트 테이블 A에서, 각 엔트리마다 팔레트 예측 플래그를 이용하여 현제 팔레트 테이블에 그대로 사용되는지 여부를 특정할 수 있다. 예를 들어 팔레트 예측 플래그가 1이면 해당 엔트리가 현재 팔레트 테이블에 그대로 사용됨을 의미하고, 0이면 해당 엔트리가 현재 팔레트 테이블에 사용되지 않음을 의미할 수 있다. 팔레트 테이블 A로부터 예측된 엔트리들에 할당되는 인덱스는 팔레트 테이블 A에 할당된 인덱스와 동일하게 설정될 수 있다. 또는, 팔레트 테이블 A에서 각 엔트리에 할당되었던 인덱스들의 오름차순/내림차순으로 각 엔트리들의 인덱스를 재할당할 수 있다. In the palette table A, it is possible to specify whether or not to be used as it is in the current palette table by using a palette prediction flag for each entry. For example, if the palette prediction flag is 1, it may mean that the corresponding entry is used as it is in the current palette table, and if 0, it may mean that the corresponding entry is not used in the current palette table. The index allocated to the entries predicted from the palette table A may be set to be the same as the index allocated to the palette table A. Alternatively, the index of each entry in the ascending/descending order of the indexes allocated to each entry in the palette table A may be reassigned.
도 9의 예에서는, 첫번째 엔트리, 세번째 엔트리, 다섯번째 엔트리는 현재 팔레트 테이블에서 사용되므로, 현재 팔레트 테이블의 첫번째 엔트리부터 세번째 엔트리까지 순서대로 넣어주고 네번째 엔트리부터 다섯 번째 엔트리까지만 새로운 엔트리를 구성할 수 있다. 이러한 방식의 경우 팔레트 예측 플래그를 먼저 부호화하고, 나머지 엔트리의 개수(도 9의 예에서는 2개: 현재 팔레트 테이블의 네번째 엔트리와 다섯번째 엔트리)를 부호화할 수 있다. 그 후 나머지 엔트리의 개수만큼 나머지 엔트리를 부호화할 수 있다. 상기 정보들을 복호화 장치로 전송하여 복호화 장치에서도 부호화 장치와 동일한 팔레트 테이블을 생성하고 현재 블록을 예측/복원할 수 있게 한다. In the example of FIG. 9 , the first entry, the third entry, and the fifth entry are used in the current palette table, so you can put them in order from the first entry to the third entry of the current palette table and configure a new entry only from the fourth entry to the fifth entry. have. In this case, the palette prediction flag is encoded first, and the number of remaining entries (two in the example of FIG. 9: the fourth entry and the fifth entry of the current palette table) can be encoded. After that, the remaining entries may be encoded as much as the number of remaining entries. By transmitting the information to the decoding device, the decoding device can also generate the same palette table as the coding device and predict/restore the current block.
복호화 장치에서도 부호화 장치와 동일한 팔레트 테이블을 구성하기 위해, 팔레트 테이블과 관련한 정보를 부호화하여 시그날링 할 수 있다. In order to configure the same palette table as the encoding apparatus in the decoding apparatus, information related to the palette table may be encoded and signaled.
일 예로, 비트스트림을 통해 현재 팔레트 테이블에 포함된 엔트리의 개수를 나타내는 정보 또는 이전 팔레트 테이블의 크기와의 차분값을 나타내는 정보 중 적어도 하나가 부호화되어 복호화 장치로 전송될 수 있다. 여기서, 팔레트 테이블의 크기는 팔레트 테이블이 포함할 수 있는 최대 팔레트 엔트리의 개수를 나타낼 수 있다. For example, through a bitstream, at least one of information indicating the number of entries included in the current palette table or information indicating a difference value with the size of the previous palette table may be encoded and transmitted to the decoding apparatus. Here, the size of the palette table may indicate the maximum number of palette entries that the palette table can contain.
또는, 팔레트 테이블의 크기는 부호화기 및 복호화기에서 고정된 값을 가질 수도 있다.또는, 현재 영상의 비트 심도, 현재 블록의 컬러 성분(예컨대, 휘도 성분 또는 색차 성분인지 여부), 현재 블록의 크기 또는 형태 중 적어도 하나에 기초하여, 팔레트 테이블의 크기가 결정될 수도 있다. Alternatively, the size of the palette table may have a fixed value in the encoder and decoder. Alternatively, the bit depth of the current image, the color component of the current block (eg, whether it is a luminance component or a chrominance component), the size of the current block, or Based on at least one of the shapes, the size of the pallet table may be determined.
현재 블록의 팔레트 테이블은 이전 팔레트 테이블에서 재사용된 팔레트 엔트리들과 새롭게 추가된 팔레트 엔트리들로 구성될 수 있다. 팔레트 테이블을 구성하는 재사용된 팔레트 엔트리들과 새롭게 추가된 팔레트 엔트리들에 대한 정보가 부호화되어 시그날링될 수 있다. The palette table of the current block may consist of palette entries reused in the previous palette table and palette entries newly added. Information about the reused palette entries constituting the palette table and the newly added palette entries may be encoded and signaled.
일 예로, 이전 팔레트 테이블에 포함된 팔레트 엔트리가 재사용되는지 여부를 나타내는 팔레트 예측 플래그가 부호화될 수 있다. As an example, a palette prediction flag indicating whether a palette entry included in a previous palette table is reused may be encoded.
팔레트 테이블이 포함할 수 있는 최대 팔레트 엔트리의 개수보다 이전 팔레트 테이블에서 재사용되는 팔레트 엔트리의 개수가 작은 경우, 새로운 팔레트 엔트리에 대한 정보가 추가 부호화될 수 있다. 이때, 팔레트 테이블에 새롭게 추가될 팔레트 엔트리의 개수는 팔레트 테이블의 크기에서 재사용된 팔레트 엔트리의 개수를 차분한 값일 수 있다. 일 예로, 팔레트 테이블이 포함할 수 있는 최대 팔레트 엔트리의 개수가 40개인 경우, 재사용된 팔레트 엔트리의 개수와 새로운 팔레트 엔트리의 개수의 합은 40을 초과할 수 없다. When the number of palette entries reused in the previous palette table is smaller than the maximum number of palette entries that the palette table can contain, information on the new palette entry may be additionally encoded. In this case, the number of palette entries to be newly added to the palette table may be a value obtained by subtracting the number of palette entries reused from the size of the palette table. For example, if the maximum number of palette entries that the palette table can contain is 40, the sum of the number of reused palette entries and the number of new palette entries cannot exceed 40.
반면, 재사용된 팔레트 엔트리의 개수가 팔레트 테이블이 포함할 수 있는 최대 팔레트 엔트리의 개수와 동일한 경우, 더 이상 팔레트 테이블에 새로운 팔레트 엔트리가 추가되지 않는다. 이 경우, 새로운 팔레트 엔트리에 대한 정보의 부호화가 생략될 수 있다. On the other hand, when the number of reused palette entries is the same as the maximum number of palette entries that the palette table can contain, no new palette entries are added to the palette table anymore. In this case, encoding of information for a new palette entry may be omitted.
팔레트 엔트리의 재사용 여부의 판단 횟수가 임계값을 초과하지 않도록 설정할 수 있다. 즉, 팔레트 예측 플래그의 개수가 임계값을 초과하지 않도록 설정될 수 있다. 일 예로, 임계값이 10인 경우, 이전 팔레트 테이블에 포함된 팔레트 엔트리들 중 최대 10개에 대해, 재사용 여부를 판단할 수 있다. 이에 따라, 최대 10개의 팔레트 예측 플래그가 생성될 수 있다.It can be set so that the number of times of determining whether to reuse the palette entry does not exceed a threshold value. That is, the number of palette prediction flags may be set so as not to exceed a threshold value. For example, if the threshold value is 10, for up to 10 of the palette entries included in the previous palette table, it can be determined whether to reuse. Accordingly, a maximum of 10 palette prediction flags may be generated.
다른 예로, 재사용되는 팔레트 엔트리의 개수가 임계값을 초과하지 않도록 설정할 수 있다. 즉, 값이 참(True)인 팔레트 예측 플래그의 개수가 임계값을 초과하지 않도록 설정될 수 있다.As another example, it may be set so that the number of reused palette entries does not exceed a threshold value. That is, the number of palette prediction flags having a value of True may be set so as not to exceed a threshold value.
임계값은, 슬라이스, 픽처 또는 시퀀스 등 상위 헤더를 통해 부호화될 수 있다. 또는, 블록 별로 임계값을 특정하기 위한 정보가 부호화되어 시그날링될 수 있다.The threshold value may be encoded through an upper header such as a slice, a picture, or a sequence. Alternatively, information for specifying a threshold value for each block may be encoded and signaled.
다른 예로, 부호화기 및 복호화기에서 고정된 값의 임계값을 사용할 수 있다.As another example, an encoder and a decoder may use a fixed value threshold.
또는, 블록의 크기, 형태, 컬러 성분(예컨대, 휘도 성분인지 여부 또는 색차 성분인지 여부), 또는 비트 심도 중 적어도 하나에 기초하여 임계값이 결정될 수 있다. Alternatively, the threshold value may be determined based on at least one of a size, a shape, a color component (eg, a luminance component or a chrominance component) of the block, or a bit depth.
혹은 팔레트 예측 플래그를 이용하여 가져올 수 있는 엔트리의 개수(이하, 최대 예측 개수라 함)를 제한할 수 있다. 일 예로, 최대 예측 개수에 대한 정보가 비트스트림을 통해 시그날링될 수 있다. 또는, 팔레트 테이블의 크기, 현재 블록의 크기/형태, 이전 블록의 크기/형태 또는 이전 팔레트 테이블의 크기 중 적어도 하나에 기초하여 최대 예측 개수가 결정될 수 있다. Alternatively, it is possible to limit the number of entries (hereinafter, referred to as the maximum number of predictions) that can be brought by using the palette prediction flag. As an example, information on the maximum number of predictions may be signaled through a bitstream. Alternatively, the maximum number of predictions may be determined based on at least one of the size of the palette table, the size/shape of the current block, the size/shape of the previous block, or the size of the previous palette table.
일 예로, 현재 팔레트 테이블의 크기의 일정 비율만큼만 팔레트 예측 플래그를 이용하여 이전 팔레트 테이블에서 엔트리를 가져오고, 나머지 비율은 무조건 현재 팔레트 테이블에서 생성하는 방식으로 할 수도 있다. 예를 들어 현재 팔레트 테이블의 크기가 6이고 비율이 50%로 설정된 경우, 팔레트 예측 플래그를 이용하여 이전 팔레트 테이블에서 최대 3개의 엔트리를 가져오고, 나머지 3개의 엔트리는 무조건 현재 팔레트 테이블에서 생성할 수 있다. 이에 따라, 팔레트 예측 플래그의 값이 1인 엔트리가 3개에 다다른 경우, 이후 엔트리에 대해서는 팔레트 예측 플래그의 부호화가 생략될 수 있다. As an example, an entry from the previous palette table is fetched using the palette prediction flag only as much as a certain percentage of the size of the current palette table, and the remaining ratio may be unconditionally generated from the current palette table. For example, if the size of the current palette table is 6 and the ratio is set to 50%, up to 3 entries from the previous palette table are fetched using the palette prediction flag, and the remaining 3 entries can be created unconditionally from the current palette table. have. Accordingly, when the number of entries having the value of the palette prediction flag of 1 reaches three, encoding of the palette prediction flag may be omitted for subsequent entries.
또는, 이전 블록의 크기가 기 설정된 임계값보다 작은 경우, 이전 블록의 팔레트 테이블에 포함된 팔레트 엔트리들이 현재 블록의 팔레트 테이블에 추가되지 않도록 설정할 수 있다. 즉, 이전 블록의 크기가 기 설정된 임계값보다 작은 경우, 이전 블록의 팔레트 엔트리들에 대해서는 팔레트 엔트리 예측 플래그의 부호화를 생략하고, 그 값이 0인 것으로 간주할 수 있다.Alternatively, when the size of the previous block is smaller than a preset threshold, it may be set so that the palette entries included in the palette table of the previous block are not added to the palette table of the current block. That is, when the size of the previous block is smaller than a preset threshold, encoding of the palette entry prediction flag for the palette entries of the previous block may be omitted, and the value may be regarded as 0.
일 예로, 임계값이 16이고, 이전 블록이 포함된 샘플의 개수가 16개보다 작은 경우, 이전 블록의 팔레트 엔트리를 현재 블록의 팔레트 테이블에 추가하지 않을 수 있다. For example, if the threshold value is 16 and the number of samples including the previous block is less than 16, the palette entry of the previous block may not be added to the palette table of the current block.
임계값은 상위 헤더에서 부호화되어 복호화기로 전송될 수 있다. 또는, 부호화기 및 복호화기에서 고정된 임계값을 사용할 수 있다. The threshold value may be encoded in an upper header and transmitted to a decoder. Alternatively, the encoder and the decoder may use a fixed threshold.
또는, 이전 블록의 크기에 따라, 이전 블록의 팔레트 테이블로부터 현재 블록의 팔레트 테이블에 추가될 수 있는 팔레트 엔트리의 개수가 결정될 수 있다. Alternatively, according to the size of the previous block, the number of palette entries that can be added to the palette table of the current block from the palette table of the previous block may be determined.
혹은, 복수의 이전 팔레트 테이블들로부터 현재 팔레트 테이블에 포함될 엔트리들을 예측할 수 있다. 일 예로, 제1 이전 팔레트 테이블에 포함된 엔트리들 각각에 대해 예측 플래그를 이용하여 현재 팔레트 테이블로 엔트리를 가져오되, 1의 값을 가진 팔레트 예측 플래그의 개수가 현재 팔레트 테이블의 크기보다 작다면 제1 이전 팔레트 테이블보다 더 이전인 제2 이전 팔레트 테이블을 이용하여 연속적으로 팔레트 예측 플래그를 할당하는 방식 또한 가능하다.Alternatively, it is possible to predict entries to be included in the current palette table from a plurality of previous palette tables. For example, if the number of palette prediction flags having a value of 1 is smaller than the size of the current palette table, the entry is brought to the current palette table using a prediction flag for each of the entries included in the first previous palette table. A method of continuously allocating palette prediction flags using a second previous palette table that is earlier than the first previous palette table is also possible.
또는, 제1 이전 팔레트 테이블에 포함된 엔트리들 및 제2 이전 팔레트 테이블에 포함된 엔트리들의 인덱스를 고려하여, 팔레트 예측 플래그의 부호화 순서를 결정할 수 있다. 일 예로, 제1 이전 팔레트 테이블에 포함된 인덱스 0인 엔트리에 대해 팔레트 예측 플래그를 부호화한 뒤, 제2 이전 팔레트 테이블에 포함된 인덱스 0인 엔트리에 대해 팔레트 예측 플래그를 부호화할 수 있다. 그리고 나서, 제1 이전 팔레트 테이블에 포함된 인덱스 1인 엔트리에 대해 팔레트 예측 플래그를 부호화한 뒤, 제2 이전 팔레트 테이블에 포함된 인덱스 1인 엔트리에 대해 팔레트 예측 플래그를 부호화할 수 있다. Alternatively, the encoding order of the palette prediction flag may be determined by considering the indexes of the entries included in the first previous palette table and the entries included in the second previous palette table. As an example, after encoding the palette prediction flag for the entry with index 0 included in the first previous palette table, the palette prediction flag may be encoded for the entry with index 0 included in the second previous palette table. Then, after encoding the palette prediction flag for the entry with index 1 included in the first previous palette table, it is possible to encode the palette prediction flag for the entry with index 1 included in the second previous palette table.
혹은 팔레트 테이블 후보 리스트를 구성하고, 상기 팔레트 테이블 후보 리스트에 포함된 복수의 이전 팔레트 테이블 후보들 중 적어도 하나를 현재 팔레트 테이블을 부호화할 때 이용할 수도 있다. Alternatively, the palette table candidate list may be configured, and at least one of a plurality of previous palette table candidates included in the palette table candidate list may be used when encoding the current palette table.
도 10은 팔레트 예측 플래그를 이용하여, 현재 부호화 하려는 팔레트 테이블의 비트량을 줄이는 방법이다. 도 10에서 RT는 블록 내의 가장 오른쪽 위에 위치한 화소를 의미하며 LB는 블록 내의 가장 왼쪽 아래에 존재하는 화소를 의미한다. 예를 들어 도 10에서 5개 주변 블록 즉, A 내지 E 화소를 각각 포함한 블록 중 적어도 하나를 참조할 수 있다. 그 후, 참조된 블록을 인덱스로 표시하여 부호화하고 복호화 장치로 전송할 수 있다. 또는, 전술한 A 내지 E 화소를 각각 포함한 블록 중 부호화/복호화 장치에 기-정의된 위치의 블록만을 참조할 수도 있다. 여기서, 기-정의된 위치는, 상단 블록 (B)일 수도 있고, 좌측 블록(A)일 수도 있다. 이 경우, 참조된 블록을 특정하는 인덱스의 부호화가 생략될 수 있다.10 is a method of reducing the bit amount of a palette table to be currently encoded by using a palette prediction flag. In FIG. 10 , RT denotes a pixel located at the upper right of the block, and LB denotes a pixel located at the bottom left of the block. For example, in FIG. 10 , at least one of five neighboring blocks, that is, blocks including pixels A to E, may be referred to. Thereafter, the referenced block may be encoded as an index and transmitted to a decoding apparatus. Alternatively, only blocks at positions pre-defined in the encoding/decoding apparatus may be referred to among the blocks each including the pixels A to E described above. Here, the pre-defined position may be the upper block (B) or the left block (A). In this case, encoding of an index specifying the referenced block may be omitted.
상기 인덱스에 대응하는 블록의 팔레트 엔트리만을 이용하여 현재 블록을 위한 팔레트 테이블을 초기화/구성할 수 있다. It is possible to initialize / configure the palette table for the current block using only the palette entry of the block corresponding to the index.
혹은 참조한 블록의 팔레트 테이블만을 이용하여 현재 블록의 팔레트 테이블을 기준치 이상 채우지 못했다면, 추가적인 인덱스를 기반으로 블록을 추가 지정하여 현재 부호화 하려는 팔레트 테이블을 채울 수도 있다. 이때, 부호화/복호화 장치는, 기-약속된 고정된 개수의 블록을 참조할 수도 있고, 참조되는 블록의 개수를 특정하는 정보가 상위 헤더를 통해 전송될 수도 있다. 또는 블록의 크기/형태, 팔레트 테이블의 크기에 따라 부호화/복호화 장치가 동일하게 고정된 개수의 주변 블록을 참조하는 방식 또한 가능하다. 혹은 도 10의 위치 이외에 부호화 순서상 현재 블록보다 먼저 팔레트 모드로 부호화된 M개의 블록을 인덱스로 지정하여 해당 블록에서 팔레트 테이블을 가져오는 방식 또한 가능하다. 혹은 콜로케이티드 픽처(Collocated Picture)에 포함된 블록을 인덱스로 지정하여 해당 블록에서 팔레트 테이블을 가져오는 방식 또한 가능하다.Alternatively, if the palette table of the current block cannot be filled beyond the standard value using only the palette table of the referenced block, the palette table to be currently encoded can be filled by additionally designating a block based on an additional index. In this case, the encoding/decoding apparatus may refer to a pre-promised fixed number of blocks, and information specifying the number of referenced blocks may be transmitted through an upper header. Alternatively, a method in which the encoding/decoding apparatus refers to the same fixed number of neighboring blocks according to the size/form of the block and the size of the palette table is also possible. Alternatively, in addition to the position of FIG. 10, a method of fetching the palette table from the corresponding block by designating M blocks encoded in the palette mode before the current block in the encoding order as indexes is also possible. Alternatively, a method of fetching the palette table from the block by designating the block included in the collocated picture as an index is also possible.
혹은 팔레트 테이블 후보 리스트를 구성하는 방식 또한 가능하다. 영상의 첫 위치에 존재하는 블록부터 시작하여 현재 블록 직전까지, 사용된 모든 팔레트 테이블을 후보 리스트에 저장한다. 혹은, 후보 리스트에 저장할 테이블의 개수 N을 설정한 후, N개의 팔레트 테이블을 후보 리스트에 저장한다. 즉, 블록의 부호화가 완료되면, 부호화가 완료된 블록의 팔레트 테이블을 후보 리스트에 저장할 수 있다. 이때, 후보 리스트에 추가하고자 하는 팔레트 테이블과 동일한 팔레트 테이블 후보가 존재하는 경우, 상기 팔레트 테이블을 상기 후보 리스트에 추가하지 않을 수 있다. 또는, 상기 팔레트 테이블을 상기 후보 리스트에 추가하고, 상기 팔레트 테이블과 동일한 팔레트 테이블 후보를 상기 후보 리스트에서 삭제할 수 있다. Alternatively, a method of constructing a palette table candidate list is also possible. All used palette tables are stored in the candidate list starting from the block existing in the first position of the image until just before the current block. Alternatively, after setting the number N of tables to be stored in the candidate list, the N palette tables are stored in the candidate list. That is, when the encoding of the block is completed, the palette table of the encoded block may be stored in the candidate list. In this case, if the same palette table candidate as the palette table to be added to the candidate list exists, the palette table may not be added to the candidate list. Alternatively, the palette table may be added to the candidate list, and the same palette table candidate as the palette table may be deleted from the candidate list.
이때 후보 리스트 내 팔레트 테이블 후보들이 저장되는 방식은, 현재 블록과 가까울수록 높은 우선순위를 가지며, 현재 블록과 멀리 떨어져 있을수록 낮은 우선순위를 가질 수 있다. 또는, 팔레트 테이블의 크기 또는 참조 빈도 등에 따라 우선 순위가 설정될 수 있다. 이 우선순위에 따라, 저장된 테이블의 개수가 N을 넘어설 때 낮은 우선순위를 가진 팔레트 테이블부터 후보 리스트에서 삭제될 수 있다. In this case, the method in which the palette table candidates in the candidate list are stored has a higher priority as it is closer to the current block, and may have a lower priority as it is further away from the current block. Alternatively, the priority may be set according to the size or reference frequency of the palette table. According to this priority, when the number of stored tables exceeds N, it can be deleted from the candidate list starting from the palette table with a lower priority.
혹은 병렬 처리 구조에서, 병렬 처리되는 각 영역마다 따로 팔레트 테이블 리스트를 구성하는 방식 또한 가능하다. 혹은 영역의 CTU 행마다 팔레트 테이블 리스트를 따로 구성하는 방식 또한 가능하다. 이때, 팔레트 테이블 리스트를 각 병렬 처리가 수행되는 영역마다 따로 가지는 경우, 영역의 초반 부분에는 팔레트 테이블 리스트에 저장되는 팔레트 테이블의 수가 매우 적을 수 있다. 따라서 각 병렬 처리가 수행되는 영역마다 팔레트 테이블을 처음부터 채워 넣지 말고, 기-설정된 초기 팔레트 테이블을 채워 넣는 것 또한 가능하다. 예를 들어, 도 8에서 살펴본 바와 같이, 초기 팔레트 테이블은 이전 CTU 행의 첫번째 CTU의 팔레트 테이블일 수 있다. 또는, 기-설정된 초기 팔레트 테이블은, 블록 단위로 유도되는 팔레트 테이블이 아니라 영상 전체에서 유도된 팔레트 테이블일 수 있다. 이러한 경우, 영상 전체에서 유도된 팔레트 테이블의 각 엔트리 값들은 엔트리 개수와 함께 상위 헤더를 통해 부호화될 수 있다. 혹은 초기 팔레트 테이블을 구성할 때, 화소의 표현 비트에 따라 양자화된 값을 엔트리 값으로 설정하는 것 또한 가능하다. 예를 들어 8 비트 화소를 5개로 양자화 한 경우(5개의 엔트리), 0~255를 5개의 구역으로 나누어 각 구역의 대표 값을 이용하여 엔트리로 설정하고 부호화할 수 있다. 혹은, 0~255를 균등하게 양자화를 하였다면, 균등하게 양자화하였다는 정보와 몇 개로 양자화를 하였는지 알려주는 정보만 상위 헤더를 통해 부호화할 수도 있다. Alternatively, in a parallel processing structure, a method of configuring a palette table list separately for each area to be processed in parallel is also possible. Alternatively, it is also possible to separately configure the palette table list for each CTU row of the area. In this case, if the palette table list is separately for each area in which parallel processing is performed, the number of palette tables stored in the palette table list may be very small in the initial part of the area. Therefore, it is also possible to fill a preset initial palette table without filling the palette table from the beginning for each area in which parallel processing is performed. For example, as shown in FIG. 8 , the initial palette table may be the palette table of the first CTU of the previous CTU row. Alternatively, the preset initial palette table may be a palette table derived from the entire image, not a palette table derived for each block. In this case, each entry value of the palette table derived from the entire image may be encoded through a higher header along with the number of entries. Alternatively, when constructing the initial palette table, it is also possible to set a quantized value as an entry value according to the representation bit of a pixel. For example, if an 8-bit pixel is quantized into 5 (5 entries), 0 to 255 can be divided into 5 zones and set as entries and encoded using the representative values of each zone. Alternatively, if 0 to 255 are equally quantized, only information indicating that quantization was performed equally and information indicating how many quantizations were performed may be encoded through the upper header.
또는, 팔레트 테이블이 포함하는 엔트리들을 팔레트 엔트리 후보 리스트로 구성하는 방식 또한 가능하다. 부호화가 완료된 블록의 팔레트 테이블에 포함된 엔트리들을 엔트리 후보 리스트에 추가할 수 있다. 이때, 팔레트 테이블에 포함된 엔트리들 중 인덱스가 문턱값보다 작은 엔트리들만 엔트리 후보 리스트에 포함할 수 있다. 현재 블록의 팔레트 테이블에 포함된 엔트리의 개수가 최대 개수보다 작은 경우, 팔레트 엔트리 후보 리스트에 포함된 후보 엔트리들을 참조하여 팔레트 테이블을 구성할 수 있다.Alternatively, a method of configuring the entries included in the palette table as a palette entry candidate list is also possible. Entries included in the palette table of the encoded block can be added to the entry candidate list. In this case, among the entries included in the palette table, only entries having an index smaller than the threshold may be included in the entry candidate list. When the number of entries included in the palette table of the current block is less than the maximum number, the palette table may be configured with reference to the candidate entries included in the palette entry candidate list.
부호화/복호화가 완료된 블록의 팔레트 테이블에 포함된 팔레트 엔트리들을 팔레트 엔트리 후보 리스트에 추가할 수 있다. 새로운 팔레트 엔트리들이 팔레트 엔트리 후보 리스트에 추가되는 경우, 새롭게 추가되는 팔레트 엔트리들에 가장 작은 인덱스를 할당할 수 있다. 그리고, 팔레트 엔트리 후보 리스트에 기 존재하던 팔레트 엔트리들의 인덱스들에 새롭게 추가되는 팔레트 엔트리들의 개수를 더하여, 기 존재하던 팔레트 엔트리들의 인덱스들을 갱신할 수 있다. Palette entries included in the palette table of the encoded/decoded block may be added to the palette entry candidate list. When new palette entries are added to the palette entry candidate list, the smallest index may be assigned to the newly added palette entries. And, by adding the number of palette entries that are newly added to the indexes of the palette entries existing in the palette entry candidate list, it is possible to update the indexes of the existing palette entries.
새로운 팔레트 인덱스들이 추가됨에 따라, 팔레트 엔트리 후보 리스트가 포함하는 팔레트 엔트리들의 개수가 최대값을 초과하는 경우, 인덱스가 높은 순으로, 기 존재하던 팔레트 엔트리들을 팔레트 엔트리 후보 리스트에서 제거할 수 있다.As new palette indices are added, when the number of palette entries included in the palette entry candidate list exceeds the maximum value, the existing palette entries may be removed from the palette entry candidate list in the order of the highest index.
도 11은 팔레트 엔트리 후보 리스트에 팔레트 엔트리들이 추가되는 예를 나타낸 도면이다. 11 is a diagram illustrating an example in which palette entries are added to the palette entry candidate list.
팔레트 예측 플래그를 기초로, 팔레트 테이블을 구성한 뒤, 구성된 팔레트 테이블을 이용하여, 블록을 부호화/복호화할 수 있다. 블록의 부호화/복호화가 완료되면, 팔레트 테이블에 포함된 팔레트 엔트리들을 팔레트 엔트리 후보 리스트가 추가할 수 있다.After configuring a palette table based on the palette prediction flag, blocks may be encoded/decoded using the configured palette table. When the encoding/decoding of the block is completed, the palette entry candidate list may add palette entries included in the palette table.
일 예로, 팔레트 테이블이 a0, a2, a4, a5, a7을 포함하는 경우, 위 팔레트 엔트리들을 팔레트 엔트리 후보 리스트에 추가할 수 있다.For example, when the palette table includes a0, a2, a4, a5, a7, the above palette entries may be added to the palette entry candidate list.
만약, 팔레트 엔트리 후보 리스테에 추가하고자 하는 팔레트 엔트리와 동일한 팔레트 엔트리가 이미 팔레트 엔트리 후보 리스트에 저장되어 있을 경우, 중복되는 팔레트 엔트리를 팔레트 엔트리 후보 리스트에 추가하지 않을 수 있다. If the same palette entry as the palette entry to be added to the palette entry candidate list is already stored in the palette entry candidate list, the duplicate palette entry may not be added to the palette entry candidate list.
또는, 팔레트 엔트리 후보 리스트에 추가하고자 하는 팔레트 엔트리와 동일한 팔레트 엔트리가 이미 팔레트 엔트리 후보 리스트에 저장되어 있을 경우, 기 저장된 팔레트 엔트리를 팔레트 엔트리 후보 리스트에서 제거하고, 중복되는 팔레트 엔트리를 팔레트 엔트리 후보 리스트에 추가할 수 있다.Alternatively, if the same palette entry as the palette entry to be added to the palette entry candidate list is already stored in the palette entry candidate list, the previously stored palette entry is removed from the palette entry candidate list, and the duplicate palette entry is removed from the palette entry candidate list can be added to
상술한 예에서는, 부호화/복호화가 완료된 블록의 팔레트 테이블에 포함된 모든 팔레트 엔트리들이 팔레트 엔트리 후보 리스트에 추가되는 것으로 설명하였다.In the above-described example, it has been described that all palette entries included in the palette table of the encoded/decoded block are added to the palette entry candidate list.
팔레트 엔트리 후보 리스트 구성의 복잡도를 감소시키기 위해, 팔레트 엔트리들 중 인덱스가 문턱값 이하인 것만을 팔레트 엔트리 후보 리스트에 추가할 수 있다.In order to reduce the complexity of constructing the palette entry candidate list, only those whose index is less than or equal to a threshold value among palette entries may be added to the palette entry candidate list.
또는, 블록의 크기가 기 설정된 임계값보다 작은 경우, 팔레트 테이블에 포함된 팔레트 엔트리들을 팔레트 엔트리 후보 리스트에 추가하지 않을 수 있다. 일 예로, 블록에 포함된 픽셀들의 개수가 임계값 이하인 경우, 해당 블록의 팔레트 테이블에 포함된 팔레트 엔트리들을 팔레트 엔트리 후보 리스트에 추가하지 않을 수 있다. 이에 따라, 블록에 포함된 픽셀들의 개수가 임계값 이하인 블록의 팔레트 테이블에 포함된 팔레트 엔트리는, 다음 블록의 팔레트 테이블을 구성하는데 있어서, 예측 팔레트 엔트리로 활용될 수 없다. Alternatively, when the size of the block is smaller than a preset threshold, the palette entries included in the palette table may not be added to the palette entry candidate list. For example, when the number of pixels included in the block is less than or equal to the threshold, the palette entries included in the palette table of the block may not be added to the palette entry candidate list. Accordingly, the palette entry included in the palette table of the block in which the number of pixels included in the block is less than or equal to the threshold value cannot be utilized as a prediction palette entry in constructing the palette table of the next block.
반면, 블록의 크기가 기 설정된 임계값 이상인 경우, 팔레트 테이블에 포함된 팔레트 엔트리들을 팔레트 엔트리 후보 리스트에 추가할 수 있다. On the other hand, when the size of the block is greater than or equal to a preset threshold, the palette entries included in the palette table may be added to the palette entry candidate list.
임계값은 상위 헤더에서 부호화되어 복호화기로 전송될 수 있다. 또는, 부호화기 및 복호화기에서 고정된 임계값을 사용할 수 있다. 일 예로, 임계값은, 4, 8, 16 또는 32와 같은 자연수일 수 있다. The threshold value may be encoded in an upper header and transmitted to a decoder. Alternatively, the encoder and the decoder may use a fixed threshold. For example, the threshold may be a natural number such as 4, 8, 16, or 32.
또는, 블록의 크기 또는 다음 블록의 크기에 기초하여, 팔레트 엔트리 후보 리스트에 추가할 수 있는 팔레트 엔트리들의 개수를 결정할 수도 있다. 일 예로, 블록의 크기가 임계값 이하인 경우에는, 최대 n개의 팔레트 엔트리가 팔레트 엔트리 후보 리스트에 추가될 수 있는 반면, 블록의 크기가 임계값보다 큰 경우에는, 최대 m개의 팔레트 엔트리가 팔레트 엔트리 후보 리스트에 추가될 수 있다. 여기서, n은 m보다 작은 자연수일 수 있다. Alternatively, based on the size of the block or the size of the next block, the number of palette entries that can be added to the palette entry candidate list may be determined. For example, if the size of the block is less than or equal to the threshold, a maximum of n palette entries may be added to the palette entry candidate list, whereas if the size of the block is greater than the threshold, a maximum of m palette entries are palette entry candidates can be added to the list. Here, n may be a natural number smaller than m.
부호화기 및 복호화기에서 기 정의된 팔레트 테이블을 이용할 수도 있다. A palette table predefined in the encoder and the decoder may be used.
도 12는 부호화기 및 복호화기에서 기 정의된 팔레트 테이블이 이용되는 예를 나타낸다. 12 shows an example in which a palette table predefined in an encoder and a decoder is used.
부호화기 및 복호화기에서 기 정의된 팔레트 테이블을 이용하는 경우, 블록마다 팔레트 테이블을 부호화할 필요가 없다.When the encoder and decoder use a predefined palette table, it is not necessary to encode the palette table for each block.
기 정의된 팔레트 테이블은, 팔레트 테이블의 크기 및/또는 팔레트 엔트리들에 할당되는 화소 값이 부호화기 및 복호화기에서 기 정의된 상태인 것을 의미한다.The predefined palette table means that the size of the palette table and/or pixel values allocated to palette entries are predefined in the encoder and the decoder.
복수개의 기 정의된 팔레트 테이블을 저장한 뒤, 복수개의 팔레트 테이블들 중 하나를 특정하는 인덱스를 부호화하여 복호화기로 전송할 수도 있다.After storing a plurality of predefined palette tables, an index specifying one of the plurality of palette tables may be encoded and transmitted to the decoder.
또는, 각 팔레트 엔트리에 할당되는 화소값들만을 기 정의한 뒤, 팔레트 엔트리들 간의 인덱스 할당 순서를 나타내는 정보만을 부호화할 수도 있다. Alternatively, after defining only pixel values allocated to each palette entry, only information indicating an index allocation order between palette entries may be encoded.
일 예로, 블록 내 잔차값의 최소값이 -3인 경우, 화소값이 -3인 팔레트 엔트리에 인덱스 0을 할당하고, 화소값이 +4인 팔레트 엔트리에 인덱스 1을 할당하고, 화소값이 -4인 팔레트 엔트리에 인덱스 2를 할당할 수 있다. For example, when the minimum value of the residual value in the block is -3, index 0 is assigned to a palette entry having a pixel value of -3, index 1 is assigned to a palette entry having a pixel value of +4, and a pixel value of -4 Index 2 can be assigned to the in-palette entry.
또는, 블록 내 최소값 m을 부호화하여 복호화 장치로 전송하고, 최소값 m에 기초하여, 팔레트 엔트리들 각각의 인덱스를 결정할 수 있다. 일 예로, 최소값 m과 동일한 팔레트 엔트리에 인덱스 0을 할당하고, 최소값 m과 유사한 순서대로 인덱스를 할당할 수 있다. 일 예로, 최소값 m과의 차이가 작은 팔레트 엔트리에 할당되는 인덱스가 최소값 m과의 차이가 큰 팔레트 엔트리에 할당되는 인덱스보다 작은 값을 가질 수 있다.Alternatively, the minimum value m in the block may be encoded and transmitted to the decoding apparatus, and an index of each of the palette entries may be determined based on the minimum value m. As an example, index 0 may be allocated to the palette entry equal to the minimum value m, and indexes may be allocated in an order similar to the minimum value m. For example, an index assigned to a palette entry having a small difference from the minimum value m may have a smaller value than an index assigned to a palette entry having a large difference from the minimum value m.
기 정의된 팔레트 테이블을 이용할 것인지 여부는, 무손실 부호화가 적용되었는지 여부에 기초하여 결정될 수 있다. 일 예로, 무손실 부호화가 적용되는 경우, 기 정의된 팔레트 테이블을 이용하고, 무손실 부호화가 적용되지 않은 경우, 복호화기에서 부호화기와 동일한 방법으로 팔레트 테이블을 구성하여 사용할 수 있다. Whether to use the predefined palette table may be determined based on whether lossless encoding is applied. For example, when lossless encoding is applied, a predefined palette table is used, and when lossless encoding is not applied, the decoder may configure and use the palette table in the same way as the encoder.
팔레트 테이블을 이용하여 잔차값을 부호화하는 경우에도, 무손실 부호화 적용 여부에 따라, 팔레트 테이블의 구성 방법을 상이하게 설정할 수 있다. Even when the residual value is encoded using the palette table, the method of configuring the palette table may be set differently depending on whether lossless encoding is applied.
전술한, 팔레트 테이블은, 샘플의 예측값, 복원값 또는 잔차값을 유도하는데 이요될 수 있다. The above-described palette table may be used to derive a predicted value, a reconstructed value, or a residual value of a sample.
팔레트 예측 플래그의 경우 런 렝스(run length) 부호화 방식이 사용될 수 있다. 동일한 데이터가 연속되어 있는 것을 런이라 하며, 그 연속된 길이를 런 렝스라고 표현한다. 예를 들어 aaaaaabbccccccc라는 문자열이 있는 경우 a가 6개, B는 2개, c는 7개이므로 6a2b7c로 표현할 수 있다. 이러한 부호화 방식으로 런 렝스 부호화 방식이라고 한다. 팔레트 예측 플래그들을 런 렝스 부호화를 이용하여 부호화할 때, 0의 개수, 1의 개수, 등으로 표현할 수 있다. 혹은 0에 대해서만 런 렝스 부호화를 수행할 수도 있으며 반대로 1에 대해서만 런 렝스 부호화를 수행하는 것 또한 가능하다.In the case of the palette prediction flag, a run length encoding method may be used. A continuous sequence of identical data is called a run, and the continuous length is expressed as a run length. For example, if there is a string aaaaaabbccccccc, 6 a, 2 B, and 7 c, so it can be expressed as 6a2b7c. Such an encoding method is called a run-length encoding method. When encoding the palette prediction flags using run-length encoding, the number of 0's, the number of 1's, etc. can be expressed. Alternatively, run-length encoding may be performed only on 0, and conversely, run-length encoding may be performed on only 1 as well.
도 13은 본 개시가 적용되는 일실시예로서, 런 렝스 부호화 기반의 바이너리 벡터의 형태로 팔레트 예측 플래그를 시그날링하는 방법을 도시한 것이다.13 illustrates a method of signaling a palette prediction flag in the form of a binary vector based on run length encoding as an embodiment to which the present disclosure is applied.
본 실시예에서는, 이전 블록의 팔레트 테이블은 0 내지 7의 팔레트 인덱스를 가진 8개의 팔레트 엔트리를 사용한 것으로 가정한다. In this embodiment, it is assumed that the palette table of the previous block uses 8 palette entries with palette indexes of 0 to 7.
영상 부호화 장치는, 이전 블록의 0 내지 7번의 팔레트 엔트리 각각에 대해서 해당 팔레트 엔트리가 현재 블록의 팔레트 엔트리로 재사용되는지를 결정하고, 만일 해당 팔레트 엔트리가 현재 블록의 팔레트 엔트리로 재사용되는 경우에는 해당 팔레트 엔트리에 대한 팔레트 예측 플래그의 값을 1로, 그렇지 않은 경우에는 0으로 각각 설정할 수 있다. 예를 들어, 도 13에 도시된 바와 같이, 이전 블록의 팔레트 엔트리 중에서 0번, 1번, 3번, 7번의 팔레트 엔트리가 현재 블록의 팔레트 엔트리로 재사용되고, 나머지 팔레트 엔트리는 재사용되지 않는 경우, 11010001로 표현되는 바이너리 벡터(binary vector)를 생성할 수 있다. The image encoding apparatus determines whether the corresponding palette entry is reused as the palette entry of the current block for each of the palette entries 0 to 7 of the previous block, and if the palette entry is reused as the palette entry of the current block, the corresponding palette The value of the palette prediction flag for the entry can be set to 1, otherwise 0, respectively. For example, as shown in FIG. 13, among the palette entries of the previous block, the palette entries 0, 1, 3, and 7 are reused as the palette entries of the current block, and the remaining palette entries are not reused, A binary vector represented by 11010001 may be generated.
그런 다음, 상기 바이너리 벡터에서 1의 개수(즉, 이전 블록의 팔레트 엔트리 중 현재 블록의 팔레트 엔트리로 재사용되는 팔레트 엔트리의 개수) 또는 상기 바이너리 벡터에서 1보다 앞선 0의 개수 중 적어도 하나를 부호화하여 영상 복호화 장치로 시그날링할 수 있다. 예를 들어, 상기 바이너리 벡터에서 1의 개수가 4개이므로, 현재 블록의 팔레트 엔트리로 재사용되는 이전 블록의 팔레트 엔트리의 개수로 4를 부호화할 수 있다. 또한, 상기 바이너리 벡터에서 1보다 앞선 0의 개수 즉, 0, 0, 1, 3을 순차적으로 부호화할 수도 있다.Then, encoding at least one of the number of 1s in the binary vector (that is, the number of palette entries reused as the palette entry of the current block among the palette entries of the previous block) or the number of 0s preceding 1 in the binary vector Signaling may be performed by a decoding device. For example, since the number of 1s in the binary vector is 4, 4 can be encoded as the number of palette entries of the previous block that is reused as the palette entry of the current block. In addition, the number of 0s preceding 1 in the binary vector, that is, 0, 0, 1, 3 may be sequentially encoded.
복호화 장치는, 부호화 장치로부터 현재 블록의 팔레트 엔트리로 재사용되는 이전 블록의 팔레트 엔트리의 개수에 관한 정보 또는 상기 바이너리 벡터에서 1보다 앞선 0의 개수에 관한 정보(palette_entry_run) 중 적어도 하나를 수신하고, 이를 이용하여 현재 블록의 팔레트 테이블을 구성할 수 있다.The decoding apparatus receives at least one of information (palette_entry_run) about the number of 0's preceding 1 in the binary vector or information about the number of palette entries of the previous block reused as the palette entry of the current block from the encoding device, and It can be used to compose the palette table of the current block.
예를 들어, 복호화 장치는, 바이너리 벡터에서 1보다 앞선 0의 개수에 관한 정보(palette_entry_run) 즉, 0, 0, 1, 3을 비트스트림으로부터 순차적으로 추출하고, 이를 이용하여 이전 블록의 팔레트 엔트리의 재사용 여부를 나타내는 바이너리 벡터 즉, 11010001을 복원할 수 있다. 바이너리 벡터를 복원하는 과정에서 1 값이 발생하면, 1 값에 대응하는 이전 블록의 팔레트 엔트리를 현재 블록의 팔레트 테이블에 삽입할 수 있다. 이러한 과정을 통해 이전 블록의 팔레트 테이블로부터 일부 팔레트 엔트리를 선택적으로 재사용하여 현재 블록의 팔레트 테이블을 구성할 수 있다.For example, the decoding apparatus sequentially extracts information (palette_entry_run), that is, 0, 0, 1, 3 about the number of 0s before 1 in the binary vector, from the bitstream, and using this, the palette entry of the previous block A binary vector indicating whether to reuse or not, that is, 11010001 may be restored. If a value of 1 occurs in the process of restoring a binary vector, the palette entry of the previous block corresponding to the value of 1 may be inserted into the palette table of the current block. Through this process, the palette table of the current block can be configured by selectively reusing some palette entries from the palette table of the previous block.
도 14는 본 개시에 따른 스캔 순서에 따라 팔레트 인덱스를 부호화/복호화하는 방법을 도시한 것이다.14 illustrates a method of encoding/decoding a palette index according to a scan order according to the present disclosure.
팔레트 테이블의 부호화한 후, 현재 블록의 각 화소마다 할당된 팔레트 인덱스 또한 부호화해야만 한다. 도 14는 현재 블록 내에서 수행되는 스캔 순서에 대한 예시이다.After encoding the palette table, the palette index assigned to each pixel of the current block must also be encoded. 14 is an example of a scan order performed in a current block.
도 14에 도시된 스캔 순서의 주 목적은, 방향성을 감안하여 스캔을 한다는 것이다. 도 14(a)와 같이 현재 블록 내에 존재하는 화소의 특성들이 가로 방향 혹은 세로 방향으로 유사한 값을 가진다면 도 14(a)와 같이 스캔을 한다면 같은 인덱스들끼리 군집될 가능성이 높아진다. 혹은 도 14(b)와 같이 블록 내에 존재하는 화소의 특성들이 z 방향 또는 대각 방향으로 유사한 값을 가진다면 도 14(b)와 같이 스캔을 한다면 같은 인덱스들끼리 군집될 가능성이 높아진다. The main purpose of the scan sequence shown in FIG. 14 is to perform scanning in consideration of directionality. As shown in FIG. 14(a) , if characteristics of pixels existing in the current block have similar values in the horizontal or vertical direction, as shown in FIG. 14(a), if the scan is performed, the possibility of clustering among the same indices increases. Alternatively, if characteristics of pixels existing in a block have similar values in the z-direction or diagonal direction as shown in FIG. 14(b) , the probability of clustering among the same indices increases when scanning is performed as shown in FIG. 14(b).
부호화 장치에서는 어떤 스캔 방식이 사용되었는지 인덱스로 표시한 후 부호화하여 복호화 장치로 전송할 수 있다. 또는, 현재 블록의 크기, 형태에 따라 스캔 순서를 결정할 수 있다.The encoding apparatus may indicate which scan method is used as an index, encode it, and transmit it to the decoding apparatus. Alternatively, the scan order may be determined according to the size and shape of the current block.
복수 스캔 방식 중 값이 동일한 인덱스들이 군집화될 가능성이 높은 스캔 방식을 선택한 뒤, 각 화소에 대한 인덱스를 부호화할 수 있다. 이때, 런 머지 부호화를 이용하여, 현재 화소의 인덱스를 유도할 수 있다. 런 머지 부호화 방법은, 인접 화소의 인덱스로부터 현재 화소의 인덱스를 유도하는 방법을 나타낸다. After selecting a scan method in which indices having the same value are highly likely to be clustered among a plurality of scan methods, the index for each pixel may be encoded. In this case, the index of the current pixel may be derived using run merge encoding. The run merge encoding method represents a method of deriving an index of a current pixel from an index of an adjacent pixel.
런 머지 부호화가 적용되는 경우, 현재 화소와 인접 화소의 인덱스가 동일한지 여부에 따라, 현재 화소의 인덱스를 그대로 부호화할 것인지 여부가 결정될 수 있다. 여기서, 인접 화소는, 현재 화소의 좌측, 우측 인접 화소, 상단 인접 화소, 하단 인접 화소 또는 대각 방향으로 인접하는 화소 중 적어도 하나를 포함할 수 있고, 인접 화소의 위치는, 현재 블록에 적용되는 스캔 방향에 따라 적응적으로 결정될 수 있다.When run merge encoding is applied, it may be determined whether to encode the index of the current pixel as it is, depending on whether the index of the current pixel and the adjacent pixel are the same. Here, the adjacent pixel may include at least one of left and right adjacent pixels, an upper adjacent pixel, a lower adjacent pixel, or diagonally adjacent pixels of the current pixel, and the location of the adjacent pixel is determined by the scan applied to the current block. It may be adaptively determined according to the direction.
도 15는 현재 화소의 인접 화소를 설명하기 위한 예시도이다.15 is an exemplary diagram for describing a pixel adjacent to a current pixel.
설명의 편의를 위해, 현재 블록에 가로 방향 스캔이 적용되는 것으로 가정한다.For convenience of description, it is assumed that a horizontal scan is applied to the current block.
도 15에서, A는 부호화 대상인 현재 화소를 나타내고, B는 스캔 순서상 현재 화소의 바로 이전 화소를 나타낸다. C는 인접 라인(행/열)에 포함된 화소들 중 현재 화소와 인접하는 이웃 화소를 나타낸다. 인접 라인은, 스캔 방향에 따라, 상단 행, 하단 행, 좌측 열 또는 우측 열 중 하나일 수 있다. In FIG. 15 , A indicates a current pixel to be encoded, and B indicates a pixel immediately preceding the current pixel in a scan order. C indicates a neighboring pixel adjacent to the current pixel among pixels included in an adjacent line (row/column). The adjacent line may be one of a top row, a bottom row, a left column, or a right column, depending on the scan direction.
현재 화소 A의 런 타입 또는 인덱스가 이전 화소 B의 런 타입 또는 인덱스와 동일한지 여부에 기초하여, 런 타입 플래그를 설정할 수 있다. 여기서, 런 타입은, 현재 화소 A의 인덱스가 인접 라인에 포함된 이웃 화소(즉, 이웃 화소 C)의 인덱스와 동일함을 나타내는 'ABOVE' 또는 현재 화소 A의 인덱스가 그대로 부호화됨을 나타내는 'INDEX' 중 하나를 가리킬 수 있다.Based on whether the run type or index of the current pixel A is the same as the run type or index of the previous pixel B, the run type flag may be set. Here, the run type is 'ABOVE' indicating that the index of the current pixel A is the same as the index of the neighboring pixel (ie, the neighboring pixel C) included in the adjacent line, or 'INDEX' indicating that the index of the current pixel A is encoded as it is. can point to one of them.
이전 화소 B의 런 타입 및 현재 화소 A의 인덱스가 인접 화소 B 또는 C와 동일한지 여부에 기초하여, 런 머지 플래그의 값을 설정할 수 있다.The value of the run merge flag may be set based on the run type of the previous pixel B and whether the index of the current pixel A is the same as that of the adjacent pixel B or C.
일 예로, 이전 화소 B의 런 타입이 'ABOVE'인 경우, 현재 화소 A 및 이웃 화소 C의 인덱스가 동일한 경우, 런 머지 플래그의 값을 1(참)으로 설정할 수 있다. 반면, 이전 화소 B의 런 타입이 'INDEX'인 경우, 현재 화소 A 및 이전 화소 B의 인덱스가 동일한 경우, 런 머지 플래그의 값을 참으로 설정할 수 있다.For example, when the run type of the previous pixel B is 'ABOVE', when the indexes of the current pixel A and the neighboring pixel C are the same, the value of the run merge flag may be set to 1 (true). On the other hand, when the run type of the previous pixel B is 'INDEX' and the indexes of the current pixel A and the previous pixel B are the same, the value of the run merge flag may be set to true.
런 머지 플래그의 값이 참인 경우, 복호화기는, 이전 화소 B의 런 타입을 참고하여, 현재 화소의 인덱스를 유도할 수 있다. 일 예로, 이전 화소 B의 런 타입이 'ABOVE'인 경우, 현재 화소 A에도 런 타입 'ABOVE'를 적용하여, 이웃 화소 C의 인덱스를 현재 화소 A의 인덱스로 유도할 수 있다. 반면, 이전 화소 B의 런 타입이 'INDEX'인 경우, 이전 화소 B의 인덱스를 현재 화소 A의 인덱스로 유도할 수 있다.When the value of the run merge flag is true, the decoder may derive the index of the current pixel with reference to the run type of the previous pixel B. For example, when the run type of the previous pixel B is 'ABOVE', the run type 'ABOVE' may be applied to the current pixel A to derive the index of the neighboring pixel C as the index of the current pixel A. On the other hand, when the run type of the previous pixel B is 'INDEX', the index of the previous pixel B may be derived as the index of the current pixel A.
현재 화소 A 및 이전 화소 B의 런 타입이 상이하거나, 현재 화소 A 및 이전 화소 B의 인덱스가 상이한 경우, 런 머지 플래그의 값을 0(거짓)으로 설정할 수 있다.When the run types of the current pixel A and the previous pixel B are different or the indexes of the current pixel A and the previous pixel B are different, the value of the run merge flag may be set to 0 (false).
런 머지 플래그의 값이 거짓인 경우, 현재 화소 A의 런 타입을 나타내는 런 타입 정보가 부호화/복호화될 수 있다. 런 타입은, 현재 화소 A의 인덱스가 이웃 화소 C의 인덱스와 동일함을 나타내는 'ABOVE' 또는 현재 화소 A의 인덱스가 그대로 부호화되는 'INDEX' 중 하나를 가리킬 수 있다. When the value of the run merge flag is false, run type information indicating the run type of the current pixel A may be encoded/decoded. The run type may indicate either 'ABOVE' indicating that the index of the current pixel A is the same as the index of the neighboring pixel C or 'INDEX' in which the index of the current pixel A is encoded as it is.
런 타입 정보는 1비트의 플래그 또는 복수의 런 타입들 중 하나를 특정하는 인덱스일 수 있다. 일 예로, 런 타입을 나타내는 신택스 run_type이 'ABOVE'를 가리키는 것은, 현재 화소 A의 인덱스가 이웃 화소 C의 인덱스와 동일함을 나타낸다. 이 경우, 이웃 화소 C의 인덱스가 현재 화소 A의 인덱스로 유도될 수 있다.The run type information may be a 1-bit flag or an index specifying one of a plurality of run types. For example, when the syntax run_type indicating the run type indicates 'ABOVE', it indicates that the index of the current pixel A is the same as the index of the neighboring pixel C. In this case, the index of the neighboring pixel C may be derived as the index of the current pixel A.
반면, 런 타입을 나타내는 신택스 run_type이 'INDEX'를 가리키는 것은, 현재 화소 A의 인덱스를 나타내는 인덱스 정보가 부호화/복호화됨을 나타낸다. 예컨대, 런 타입이 'INDEX'를 가리키는 경우, 팔레트 테이블에 포함된 복수개의 팔레트 엔트리들 중 하나를 특정하는 palette_idx가 부호화/복호화될 수 있다.On the other hand, when the syntax run_type indicating the run type indicates 'INDEX', it indicates that index information indicating the index of the current pixel A is encoded/decoded. For example, when the run type indicates 'INDEX', palette_idx specifying one of a plurality of palette entries included in the palette table may be encoded/decoded.
이때, 인덱스가 이스케이프를 나타내는 경우, 이스케이프 값을 유도하기 위한 정보가 추가 부호화될 수 있다. In this case, when the index indicates an escape, information for deriving an escape value may be additionally encoded.
현재 블록 내 최상단 행에 위치하는 화소에는 상단에 인접하는 화소가 존재하지 않는다. 이에 따라, 최상단 행에 위치하는 화소에 대해서는, 런 타입 정보의 부호화를 생략하고, 런 타입이 'INDEX'인 것으로 추정할 수 있다.A pixel located at the top row in the current block does not have a pixel adjacent to the top. Accordingly, with respect to the pixel located in the uppermost row, encoding of run type information may be omitted and it may be estimated that the run type is 'INDEX'.
런 머지 플래그의 값이 거짓인 경우, 복호화기는, 런 타입 정보를 이용하여, 현재 화소 A의 인덱스를 유도할 수 있다. 일 예로, 런 타입 정보가 'ABOVE'를 가리키는 경우, 이웃 화소 C의 인덱스를 현재 화소 A의 인덱스로 유도할 수 있다. 반면, 런 타입 정보가 'INDEX'를 가리키는 경우, 인덱스 정보를 추가 파싱하고, 파싱된 인덱스 정보에 기초하여, 현재 화소 A의 인덱스로 유도할 수 있다.When the value of the run merge flag is false, the decoder may derive the index of the current pixel A using the run type information. For example, when the run type information indicates 'ABOVE', the index of the neighboring pixel C may be derived as the index of the current pixel A. On the other hand, when the run type information indicates 'INDEX', index information may be additionally parsed, and the index information of the current pixel A may be derived based on the parsed index information.
현재 블록 내 첫번째 화소에 대해서는, 런 머지 플래그의 부호화/복호화가 생략될 수 있다. 이는, 첫번째 화소에 대해서는 인덱스가 부호화된 이전 화소가 존재하지 않기 때문이다. 런 머지 플래그의 부호화가 생략된 경우, 그 값이 0(거짓)인 것으로 추정할 수 있다.For the first pixel in the current block, encoding/decoding of the run merge flag may be omitted. This is because, for the first pixel, there is no previous pixel whose index is coded. When the encoding of the run merge flag is omitted, it can be estimated that the value is 0 (false).
상술한 예에서와 같이, 런 머지 후보화 방법이 적용되는 경우, 신택스 run_merge_flag, run_type 또는 palette_idx 중 적어도 하나에 기초하여, 현재 화소의 인덱스가 유도될 수 있다. 이때, 위 신택스들은 문맥 정보를 이용하지 않고 부호화될 수 있다. 문맥 정보를 이용하지 않는 부호화 방법을 바이패스 부호화(Bypass coding)라 정의할 수 있다.As in the above example, when the run merge candidate method is applied, the index of the current pixel may be derived based on at least one of the syntax run_merge_flag, run_type, and palette_idx. In this case, the above syntaxes may be encoded without using context information. A coding method that does not use context information may be defined as bypass coding.
또는, 위 신택스들 중 적어도 하나가 문맥 정보를 이용하여 부호화되도록 설정할 수 있다. 일 예로, 신택스 run_merge_flag 부호화시, 문맥 정보를 참조할 수 있다. 문맥 정보를 이용하는 경우, 런 머지 플래그의 값이 1일 확률 또는 0일 확률이 이전 런 머지 플래그의 값에 기초하여 결정될 수 있다.Alternatively, at least one of the above syntaxes may be set to be encoded using context information. For example, when the syntax run_merge_flag is encoded, context information may be referred to. When context information is used, the probability that the value of the run merge flag is 1 or the probability that the value of the run merge flag is 0 may be determined based on the value of the previous run merge flag.
도 16은 문맥 정보를 이용하여 런 머지 플래그를 부호화하는 예를 나타낸 것이다. 16 shows an example of encoding a run merge flag using context information.
런 머지 플래그를 부호화함에 있어서, 런 머지 플래그의 값이 0으로 설정된 화소들 중 스캔 순번이 가장 높은 화소의 스캔 순번을 나타내는 변수 PREV_POS를 이용할 수 있다. 구체적으로, 현재 화소의 스캔 순번에서, 변수 PREV_POS 및 1을 차분하여 문맥 정보 인덱스 값을 유도하고, 유도된 문맥 정보 인덱스 값을 이용하여, 런 머지 플래그를 부호화할 수 있다. In encoding the run merge flag, a variable PREV_POS indicating the scan order of a pixel having the highest scan order among pixels in which the value of the run merge flag is set to 0 may be used. Specifically, in the scan order of the current pixel, a context information index value may be derived by differentiating variables PREV_POS and 1, and a run merge flag may be encoded using the derived context information index value.
이때, 첫번째 런 머지 플래그를 부호화 하는 경우, 기 부호화된 런 머지 플래그가 존재하지 않으므로, 변수 PREV_POS의 값은 초기값(예컨대, 0)으로 설정될 수 있다. 이에 따라, 첫번쨰 팔레트 예측 플래그에 대해서는, 문맥 정보 인덱스 값이 -1로 설정될 수 있다. In this case, when the first run merge flag is encoded, since the previously encoded run merge flag does not exist, the value of the variable PREV_POS may be set to an initial value (eg, 0). Accordingly, for the first palette prediction flag, the context information index value may be set to -1.
값이 0인 런 머지 플래그가 부호화될 때마다, 변수 PREV_POS가 업데이트될 수 있다. 반면, 값이 1인 런 머지 플래그가 부호화되는 경우, 변수 PREV_POS는 그대로 유지될 수 있다.Whenever a run merge flag with a value of 0 is encoded, the variable PREV_POS may be updated. On the other hand, when the run merge flag having a value of 1 is encoded, the variable PREV_POS may be maintained as it is.
도 16에 도시된 예에서, 스캔 순번이 6인 화소에 대해, 변수 PREV_POS는 3의 값을 가진 것으로 예시되었다. 이에 따라, 스캔 순번이 6인 화소에 대한 문맥 정보 인덱스는 2로 설정될 수 있다. 스캔 순번이 6인 화소의 런 머지 플래그를 부호화할 때, 문맥 정보 인덱스의 값에 따라, 런 머지 플래그의 확률을 결정하고, 결정된 확률에 기초하여 팔레트 예측 플래그를 부호화할 수 있다.In the example shown in FIG. 16 , for a pixel whose scan order number is 6, the variable PREV_POS is exemplified as having a value of 3. Accordingly, a context information index for a pixel having a scan order of 6 may be set to 2. When encoding the run merge flag of the pixel having the scan order number 6, the probability of the run merge flag may be determined according to the value of the context information index, and the palette prediction flag may be encoded based on the determined probability.
도 16에서는, 변수 PREV_POS가 값이 0인 런 머지 플래그를 같는 화소의 위치를 나타내는 것으로 설명하였으나, 변수 PREV_POS를 값이 1인 런 머지 플래그를 갖는 화소의 위치를 나타내도록 설정할 수도 있다. In FIG. 16 , the variable PREV_POS has been described as indicating the position of a pixel having the run merge flag having a value of 0, but the variable PREV_POS may be set to indicate the position of a pixel having the run merge flag having a value of 1.
도 17은 문맥 정보 인덱스의 범위를 나타낸 예시이다. 17 is an example showing a range of a context information index.
문맥 정보 인덱스의 최대값이 기 정의된 문턱값을 초과하지 않도록 설정될 수 있다. 현재 화소의 위치에서, 변수 PREV_POS 및 1을 차분하여 유도된 값이, 문턱값을 초과하는 경우, 문맥 정보 인덱스의 값을 최대값으로 설정할 수 있다. 도 17에서는, 최대값이 4인 것으로 예시되었다.The maximum value of the context information index may be set not to exceed a predefined threshold. When a value derived by differentiating the variables PREV_POS and 1 at the position of the current pixel exceeds a threshold value, the value of the context information index may be set to the maximum value. In FIG. 17 , it is illustrated that the maximum value is 4.
문맥 정보 인덱스의 최소값이 기 정의된 문턱값 미만이 되지 않도록 설정할 수도 있다. 현재 화소의 위치에서, 변수 PREV_POS 및 1을 차분하여 유도된 값이, 문턱값 미만인 경우, 문맥 정보 인덱스의 값을 최소값으로 설정할 수 있다. 도 17에서는, 최소값이 0인 것으로 예시되었다. 이에 따라, 첫번째 화소에 대한 문맥 정보 인덱스는 -1에서 0으로 변경될 수 있다.It may be set so that the minimum value of the context information index does not become less than a predefined threshold. When a value derived by differentiating the variables PREV_POS and 1 at the position of the current pixel is less than the threshold, the value of the context information index may be set to the minimum value. In FIG. 17 , the minimum value is exemplified as zero. Accordingly, the context information index for the first pixel may be changed from -1 to 0.
문맥 정보 인덱스의 최대값 및/또는 최소값은 부호화기 및 복호화기에서 정의될 수 있다. 또는, 문맥 정보 인덱스의 최대값 및/또는 최소값을 나타내는 정보가 비트스트림을 통해 시그날링될 수 있다. 일 예로, 슬라이스, 픽처 또는 시퀀스 등 상위 레벨에서 상기 정보가 부호화되어 시그날링될 수 있다. The maximum and/or minimum values of the context information index may be defined in the encoder and the decoder. Alternatively, information indicating the maximum and/or minimum values of the context information index may be signaled through the bitstream. For example, the information may be encoded and signaled at a higher level such as a slice, a picture, or a sequence.
블록을 복수의 영역들로 분할한 뒤, 영역별로 인덱스 관련 정보를 부호화할 수도 있다. After the block is divided into a plurality of regions, index-related information may be encoded for each region.
도 18은 기 설정된 크기의 영역 단위로 인덱스 관련 정보가 부호화되는 예를 나타낸 것이다. 18 illustrates an example in which index-related information is encoded in units of a region having a preset size.
도 18의 (a)의 예시는, 블록 크기가 16x4인 경우를 나타내고, 도 18의 (b)의 예시는, 블록 크기가 8x8인 경우를 나타낸다. 설명의 편의를 위해, 블록에는 가로 방향 스캔이 적용되는 것으로 가정한다.The example of FIG. 18A shows a case where the block size is 16x4, and the example of FIG. 18B shows a case where the block size is 8x8. For convenience of description, it is assumed that a horizontal scan is applied to a block.
블록을 기 정의된 크기의 영역들로 분할할 수 있다. 일 예로, 기 정의된 크기가 16인 경우, 16개의 화소 단위로 블록을 복수개의 영역들로 분할할 수 있다. 일 예로, 도 18의 (a)의 예시에서는, 블록이 16x1 크기의 영역들로 분할되고, 도 18의 (b)의 예시에서는, 블록이 8x2 크기의 영역들로 분할되는 것으로 예시되었다.A block may be divided into regions of a predefined size. For example, when the predefined size is 16, the block may be divided into a plurality of regions in units of 16 pixels. For example, in the example of FIG. 18A , the block is divided into 16x1 sized regions, and in the example of FIG. 18B , the block is divided into 8x2 sized regions.
영역별로 인덱스 관련 정보를 부호화할 수 있다. 일 예로, N번째 영역 내 인덱스 관련 정보(예컨대, run_merge_flag, run_type 또는 palette_idx 중 적어도 하나)의 부호화를 완료한 뒤, N+1번째 영역 내 인덱스 관련 정보를 부호화할 수 있다. 또는, 인덱스 관련 정보의 부호화가 영역간 병렬 처리될 수 있다. Index-related information may be encoded for each region. For example, after encoding of the index-related information in the N-th region (eg, at least one of run_merge_flag, run_type, or palette_idx) is completed, the index-related information in the N+1 th region may be encoded. Alternatively, the encoding of index-related information may be parallel-processed between regions.
인덱스 관련 정보는 영역간 독립적으로 부호화될 수 있다. 일 예로, 소정 영역 내 인덱스 관련 정보 부호화시, 타 영역을 참조하지 않을 수 있다. 예컨대, 영역 2의 첫번째 화소 부호화시, 영역 1의 마지막 화소의 정보를 참조하지 않을 수 있다. 이에 따라, 각 영역 내 첫번째 화소에 대해서는 런 머지 플래그의 부호화가 생략될 수 있다. 영역간 독립적으로 인덱스 관련 정보가 부호화되는 바, 스캔 순번도 영역간 독립적으로 부여될 수 있다. 예컨대, 각 영역마다 0부터 15까지의 스캔 순번을 할당하여, 화소들을 구분할 수 있다.Index-related information may be coded independently between regions. For example, when encoding index-related information within a predetermined region, other regions may not be referred. For example, when the first pixel of the region 2 is encoded, information on the last pixel of the region 1 may not be referenced. Accordingly, encoding of the run merge flag may be omitted for the first pixel in each region. Since index-related information is coded independently between regions, a scan order may be independently assigned between regions. For example, by allocating scan order numbers from 0 to 15 for each area, pixels may be distinguished.
또한, 각 영역 내 최상단 행에 위치하는 화소들에 대해서는 런 타입 정보의 부호화가 생략될 수 있다. Also, encoding of run type information may be omitted for pixels located in the uppermost row in each region.
다른 예로, 영역간 종속성을 부여하여, 인덱스 관련 정보를 부호화할 수 있다. 일 예로, 영역 2의 최상단 행에 위치하는 화소들의 인덱스 관련 정보는 영역 1의 최하단 행에 위치하는 화소들의 인덱스 관련 정보를 참조하여 부호화될 수 있다. 영역간 종속성이 부여된 경우, 영역간 연속되는 스캔 순번을 할당하여, 화소들을 구분할 수 있다. 일 예로, 영역 1에 속한 화소들에는 스캔 순번 0 내지 15가 할당되는 반면, 영역 2에 속한 화소들에는 스캔 순선 16 내지 31이 할당될 수 있다. As another example, index-related information may be encoded by providing inter-region dependency. For example, index-related information of pixels positioned in the uppermost row of region 2 may be encoded with reference to index-related information of pixels positioned in the lowermost row of region 1. When the inter-region dependency is given, the pixels may be distinguished by assigning a continuous scan order between the regions. For example, scan orders 0 to 15 may be allocated to pixels belonging to region 1, while scan orders 16 to 31 may be allocated to pixels belonging to region 2 .
또한, 첫번째 영역을 제외한 잔여 영역 내 첫번째 화소에 대해서도 런 머지 플래그의 값을 부호화할 수 있다. 일 예로, 영역 2의 첫번째 화소의 런 머지 플래그는, 영역 1의 마지막 화소(예컨대, 스캔 순번 15번인 화소)를 참조하여 부호화될 수 있다. Also, the value of the run merge flag may be coded for the first pixel in the remaining area except for the first area. For example, the run merge flag of the first pixel of the region 2 may be encoded with reference to the last pixel of the region 1 (eg, a pixel having a scan order of 15).
영역간 인덱스 관련 정보가 독립적으로 부호화되는지 또는 종속적으로 부호화되는지 여부를 나타내는 정보가 부호화되어 시그날링될 수 있다. 또는, 현재 블록의 크기 또는 형태 중 적어도 하나에 기초하여, 영역간 인덱스 관련 정보가 독립적으로 부호화되는지 또는 종속적으로 부호화되는지 여부가 결정될 수 있다. Information indicating whether inter-region index-related information is independently encoded or dependently encoded may be encoded and signaled. Alternatively, based on at least one of the size or shape of the current block, it may be determined whether the inter-region index-related information is independently coded or dependently coded.
상술한 예에서는, 하나의 블록을 복수개의 영역으로 분할한 뒤, 영역간 종속성을 부여하여, 인덱스 관련 정보가 부호화될 수 있는 것으로 예시되었다. 이를 확장하여, 블록간 종속성을 부여하여, 인덱스 관련 정보를 부호화할 수도 있다.In the above-described example, it has been exemplified that index-related information can be encoded by dividing one block into a plurality of regions and then providing dependencies between regions. By extending this, inter-block dependency may be given to encode index-related information.
도 19는 블록간 종속성을 이용하여 인덱스 관련 정보가 부호화되는 예를 나타낸 것이다.19 shows an example in which index-related information is encoded using inter-block dependency.
현재 블록 상단 또는 좌측에 부호화/복호화가 완료된 이웃 블록이 존재하는 경우, 이웃 블록을 참조하여, 인덱스 관련 정보를 부호화할 수 있다. 일 예로, 현재 블록 내 첫번째 화소에 대한 런 머지 플래그를, 이웃 블록을 참조하여 부호화할 수 있다. 구체적으로, 상단 이웃 블록 또는 좌측 이웃 블록 내 스캔 순번이 마지막인 화소 또는 상단 이웃 블록 또는 좌측 이웃 블록 내 현재 블록의 첫번째 화소와 인접하는 화소를 참조하여, 현재 블록의 첫번째 화소에 대한 런 머지 플래그를 부호화할 수 있다.When a neighboring block that has been encoded/decoded exists on the top or left side of the current block, index-related information may be coded with reference to the neighboring block. As an example, the run merge flag for the first pixel in the current block may be encoded with reference to the neighboring block. Specifically, the run merge flag for the first pixel of the current block is set by referring to the pixel having the last scan order in the upper neighboring block or the left neighboring block, or the pixel adjacent to the first pixel of the current block in the upper neighboring block or the left neighboring block. can be encoded.
일 예로, 도 19에 도시된 예에서, 현재 블록 내 첫번째 화소 C에 대한 런 머지 플래그는, 상단에 이웃화는 화소 A 또는 좌측에 이웃하는 화소 B를 참조하여 부호화될 수 있다. For example, in the example shown in FIG. 19 , the run merge flag for the first pixel C in the current block may be encoded with reference to the pixel A neighboring to the top or the pixel B neighboring to the left.
또한, 현재 블록 내 최상단 행에 위치하는 화소들에 대해서도, 이웃 블록을 참조하여 런 타입 정보를 부호화할 수 있다.In addition, run type information may be coded with reference to a neighboring block even for pixels located in the uppermost row in the current block.
현재 블록의 상단 이웃 블록 또는 좌측 이웃 블록 중 어느 하나를 우선적으로 참조하도록 설정할 수 있다. 일 예로, 좌측 이웃 블록 및 상단 이웃 블록 중 좌측 이웃 블록을 먼저 참조하도록 설정할 수 있다. 상단 이웃 블록은 좌측 이웃 블록이 이용 불가능한 경우 참조될 수 있다. 즉, 현재 블록 내 첫번째 화소 C에 대한 런 타입 플래그 부호화시, 화소 B를 우선 적으로 참조하되, 화소 B가 이용 불가능한 경우, 화소 A를 참조할 수 있다. It can be set to preferentially refer to either the upper neighboring block or the left neighboring block of the current block. As an example, it may be set to first refer to the left neighboring block among the left neighboring block and the upper neighboring block. The upper neighboring block may be referred to when the left neighboring block is unavailable. That is, when the run-type flag encoding for the first pixel C in the current block is performed, the pixel B is preferentially referenced, but when the pixel B is unavailable, the pixel A may be referenced.
현재 화소의 인덱스가 이스케이프를 가리키는 경우, 이스케이프 값을 추가적으로 부호화해야 한다. 이스케이프 값을 양자화하고, 양자화된 이스케이프 값을 부호화할 수 있다. 이때, 양자화는, 슬라에스 레벨에서 정의된 초기 양자화 파라미터(QP, Quantization Parameter)를 이용하여 수행될 수 있다. 슬라에스 헤더를 통해, 초기 양자화 파라미터가 시그날링될 수 있다. If the index of the current pixel indicates an escape, the escape value must be additionally encoded. An escape value may be quantized, and the quantized escape value may be encoded. In this case, quantization may be performed using an initial quantization parameter (QP) defined at the SLAS level. Through the SLAS header, an initial quantization parameter may be signaled.
또는, 슬라이스 레벨에서 정의된 양자화 파라미터와 현재 블록에 적용되는 양자화 파라미터 사이의 차분을 나타내는 오프셋 값이 부호화될 수도 있다. 오프셋은 블록 단위로 부호화될 수 있다.Alternatively, an offset value indicating a difference between a quantization parameter defined at the slice level and a quantization parameter applied to the current block may be encoded. The offset may be coded in units of blocks.
일 예로, 슬라이스 레벨에서 정의된 초기 양자화 파라미터의 값이 23이고, 현재 블록에 대한 양자화 파라미터의 값이 27인 경우, 값이 4인 오프셋을 부호화하여 시그날링할 수 있다. For example, when the value of the initial quantization parameter defined at the slice level is 23 and the value of the quantization parameter for the current block is 27, an offset having a value of 4 may be encoded and signaled.
현재 팔레트 테이블에 이스케이프가 존재하는지 여부에 따라, 팔레트 테이블의 크기(즉, 팔레트 엔트리의 최대 개수) 및/또는 인덱스의 이진화 방법이 상이할 수 있다. 이에 따라, 현재 팔레트 테이블에 이스케이프가 존재하는지 여부를 나타내는 정보를 부호화하여 시그날링할 수 있다. 상기 정보는 1비트의 플래그일 수 있다. Depending on whether an escape exists in the current palette table, the size of the palette table (ie, the maximum number of palette entries) and/or the binarization method of the index may be different. Accordingly, information indicating whether an escape exists in the current palette table may be encoded and signaled. The information may be a 1-bit flag.
상기 플래그가 이스케이프가 존재함을 나타내는 경우, 현재 팔레트 테이블의 크기를 1 증가시킬 수 있다. 반면, 상기 플래그가 이스케이프가 존재하지 않음을 나타내는 경우, 현재 팔레트 테이블의 크기를 유지할 수 있다. When the flag indicates that an escape exists, the size of the current palette table may be increased by one. On the other hand, when the flag indicates that there is no escape, it is possible to maintain the size of the current palette table.
이스케이프 값을 그대로 부호화하는 대신, 이스케이프 값과, 인트라 예측을 통해 유도된 예측값과의 차분을 부호화할 수 있다.Instead of encoding the escape value as it is, a difference between the escape value and a prediction value derived through intra prediction may be encoded.
도 20은 이스케이프 값의 부호화 양상을 설명하기 위한 예시도이다.20 is an exemplary diagram for explaining an aspect of encoding an escape value.
도 20의 (a)는 현재 블록 및 현재 블록에 인접하는 참조 화소들을 나타내고, 도 20의 (b)는 현재 블록에 대한 팔레트 엔트리를 나타낸다. Fig. 20 (a) shows a current block and reference pixels adjacent to the current block, and Fig. 20 (b) shows a palette entry for the current block.
도 20의 (a)에서 인덱스 4가 할당된 화소는 이스케이프 값으로 부호화된다. 이때, 상기 화소의 값 A를 그대로 부호화하는 대신, 상기 화소의 값 A에서, 인트라 예측을 통해 획득되는 예측값을 차분하여 유도되는 차분값을 부호화할 수 있다.In (a) of FIG. 20 , the pixel to which the index 4 is assigned is encoded as an escape value. In this case, instead of encoding the value A of the pixel as it is, a difference value derived by differentiating a prediction value obtained through intra prediction from the value A of the pixel may be encoded.
일 예로, 수직 방향의 인트라 예측 모드가 적용되는 경우, 화소의 값 A에서, 상단 참조 화소 R2를 차분하여 유도되는 차분값(즉, A-R2)를 부호화할 수 있다. 또는, 상기 유도된 차분값을 양자화한 뒤, 양자화된 차분값을 부호화할 수도 있다.For example, when the intra prediction mode in the vertical direction is applied, a difference value (ie, A-R2) derived by differentiating the upper reference pixel R2 from the pixel value A may be encoded. Alternatively, after quantizing the derived difference value, the quantized difference value may be encoded.
차분값을 유도하는데 이용되는 인트라 예측 모드는, 플래너, DC, 수직 방향, 수평 방향, 우상단 대각 방향, 좌상단 대각 방향 또는 좌하단 대각 방향 중 적어도 하나일 수 있다.The intra prediction mode used to derive the difference value may be at least one of planar, DC, vertical direction, horizontal direction, upper right diagonal direction, upper left diagonal direction, or lower left diagonal direction.
부호화기 및 복호화기에서 고정된 화면 내 예측 모드를 이용하여 이스케이프 값을 유도할 수 있다.An escape value may be derived by using a fixed intra prediction mode in the encoder and decoder.
또는, 복수개의 인트라 예측 모드들 중 이스케이프 값을 유도하기 위한 인트라 예측 모드를 특정하는 정보를 부호화하여 시그날링할 수 있다. 이때, 이용 가능한 인트라 예측 모드가 2개인 경우, 상기 정보는 1비트의 플래그일 수 있다. 일 예로, 수직 방향 또는 수평 방향의 인트라 예측 모드만이 이용 가능한 경우, 상기 플래그에 기초하여, 이스케이프 값을 유도하는데 이용되는 인트라 예측 모드를 결정할 수 있다. Alternatively, information specifying an intra prediction mode for deriving an escape value among a plurality of intra prediction modes may be encoded and signaled. In this case, when there are two available intra prediction modes, the information may be a 1-bit flag. For example, when only the intra prediction mode in the vertical direction or the horizontal direction is available, the intra prediction mode used to derive the escape value may be determined based on the flag.
또는, 현재 블록의 크기, 형태 또는 이웃 블록의 인트라 예측 모드 중 적어도 하나에 기초하여, 이스케이프 값을 유도하는데 이용되는 인트라 예측 모드를 결정할 수도 있다. Alternatively, the intra prediction mode used to derive the escape value may be determined based on at least one of the size and shape of the current block and the intra prediction mode of the neighboring block.
현재 블록 바깥의 참조 화소를 이용하여 차분값을 유도하는 대신, 현재 블록 내 인접하는 화소를 이용하여 차분값을 유도할 수도 있다. 여기서, 인접하는 화소는, 스캔 순서 상 현재 화소보다 이전에 인덱스가 결정된 화소를 나타낸다. Instead of deriving a difference value using a reference pixel outside the current block, a difference value may be derived using an adjacent pixel in the current block. Here, the adjacent pixel indicates a pixel whose index is determined before the current pixel in the scan order.
도 21은 인트라 예측 모드에 기초하여, 이스케이프 값에 대한 차분값을 유도하는 예를 나타낸다. 21 shows an example of deriving a difference value with respect to an escape value based on an intra prediction mode.
도 21의 (a)는 참조 화소를 이용하여, 이스케이프 값에 대한 차분값을 유도하는 예이고, 도 21의 (b)는 인접 화소를 이용하여, 이스케이프 값에 대한 차분값을 유도하는 예이다. 설명의 편의를 위해, 스캔 순서를 가로 방향인 것으로 가정한다. 21A is an example of deriving a difference value with respect to an escape value using a reference pixel, and FIG. 21B is an example of deriving a difference value with respect to an escape value using an adjacent pixel. For convenience of description, it is assumed that the scan order is in the horizontal direction.
현재 블록 바깥의 참조 화소를 이용하는 경우, 현재 화소의 값 및 현재 화소의 수직 방향 또는 수평 방향에 위치하는 참조 화소와의 차분값을 유도할 수 있다. 일 예로, 도 21의 (a)에 도시된 예에서, 인덱스가 4인 화소의 값 A에서, 참조 화소 R2 또는 참조 화소 R6를 차분하여, 차분값을 유도할 수 있다. 이때, 수직 방향 인트라 예측 모드가 적용되는 경우, 수직 방향의 참조 화소를 이용하여 차분값을 유도하고, 수평 방향 인트라 예측 모드가 적용되는 경우, 수평 방향의 참조 화소를 이용하여 차분값을 유도할 수 있다. When a reference pixel outside the current block is used, a difference value between a value of the current pixel and a reference pixel positioned in a vertical or horizontal direction of the current pixel may be derived. As an example, in the example illustrated in FIG. 21A , a difference value may be derived by differentiating the reference pixel R2 or the reference pixel R6 from the value A of the pixel having the index 4 . In this case, when the vertical intra prediction mode is applied, a difference value is derived using the reference pixel in the vertical direction, and when the horizontal intra prediction mode is applied, the difference value can be derived using the reference pixel in the horizontal direction. have.
현재 블록 내 화소를 이용하는 경우, 현재 화소의 값 및 현재 화소에 인접하는 이웃 화소와의 차분값을 유도할 수 있다. 일 예로, 도 21의 (b)에 도시된 예에서, 인덱스가 4인 화소의 값 A에서, 우측 이웃 화소의 값을 차분하거나, 상단 이웃 화소의 값을 차분하여 차분값을 유도할 수 있다. 이때, 수직 방향 인트라 예측 모드가 적용되는 경우, 수직 방향의 이웃 화소를 이용하여 차분값을 유도하고, 수평 방향 인트라 예측 모드가 적용되는 경우, 수평 방향의 이웃 화소를 이용하여 차분값을 유도할 수 있다.When a pixel in the current block is used, a difference value between the value of the current pixel and a neighboring pixel adjacent to the current pixel may be derived. As an example, in the example shown in FIG. 21B , a difference value may be derived by differentiating the value of the right neighboring pixel or the value of the upper neighboring pixel from the value A of the pixel having the index 4 . In this case, when the vertical intra prediction mode is applied, a difference value is derived using the neighboring pixels in the vertical direction, and when the horizontal intra prediction mode is applied, the difference value can be derived using the neighboring pixels in the horizontal direction. have.
무손실 부호화가 적용되었는지 여부에 기초하여, 차분값의 유도 방법을 결정할 수 있다. 일 예로, 무손실 부호화가 적용되지 않은 경우에는, 도 21의 (a)에 도시된 예에서와 같이, 현재 블록 바깥의 참조 화소를 이용하여, 차분값을 유도할 수 있다. 반면, 무손실 부호화가 적용된 경우에는, 도 21의 (b)에 도시된 예에서와 같이, 현재 블록 내 이웃 화소를 이용하여, 차분값을 유도할 수 있다. Based on whether or not lossless encoding is applied, a method of deriving a difference value may be determined. For example, when lossless encoding is not applied, as in the example shown in FIG. 21A , a difference value may be derived using a reference pixel outside the current block. On the other hand, when lossless encoding is applied, as in the example shown in FIG. 21B , a difference value can be derived using neighboring pixels in the current block.
복호화기는 차분값 및 예측값을 합하여, 현재 픽셀에 대한 이스케이프 값을 유도할 수 있다. 일 예로, 현재 블록 바깥의 참조 화소를 이용하여 차분값이 유도된 경우에는, 비트스트림으로부터 복호화된 차분값과 상단 참조 화소 또는 좌측 참조 화소를 더하여 이스케이프 값을 유도할 수 있다. 반면, 현재 블록 내 참조 화소를 이용하여 차분값이 부호화된 경우에는, 비트스트림으로부터 복호화된 차분값과 복원된 이웃 화소(예컨대, 상단 이웃 화소 또는 우측 이웃 화소)의 값을 더하여, 이스케이프 값을 유도할 수 있다. The decoder may derive an escape value for the current pixel by summing the difference value and the prediction value. For example, when a difference value is derived using a reference pixel outside the current block, an escape value may be derived by adding the difference value decoded from the bitstream and the upper reference pixel or the left reference pixel. On the other hand, when the difference value is encoded using the reference pixel in the current block, the escape value is derived by adding the difference value decoded from the bitstream and the value of the reconstructed neighboring pixel (eg, the upper neighboring pixel or the right neighboring pixel). can do.
다른 예로, 블록 벡터를 이용하여, 이스케이프 값에 대한 예측 값을 생성할 수도 있다. As another example, a prediction value for an escape value may be generated using a block vector.
도 22는 블록 벡터를 이용하여, 이스케이프 값에 대한 차분값을 유도하는 예를 나타낸다.22 shows an example of deriving a difference value with respect to an escape value using a block vector.
현재 블록의 블록 벡터를 유도한 뒤, 블록 벡터를 통해 특정된 참조 블록을 특정할 수 있다. 그리고, 참조 블록 내, 이스케이프 값이 할당되는 현재 화소와 동일한 위치의 화소의 값을 예측값으로 설정할 수 있다. After deriving the block vector of the current block, the reference block specified through the block vector may be specified. In addition, a value of a pixel at the same position as a current pixel to which an escape value is assigned in the reference block may be set as the predicted value.
일 예로, 도 22에 도시된 예에서, 이스케이프 값이 할당되는 화소의 값 A에서, 참조 블록 내 상기 화소와 동일한 위치의 화소인 A5를 차분하여, 차분값을 유도할 수 있다. For example, in the example shown in FIG. 22 , a difference value may be derived by differentiating A5, which is a pixel at the same position as the pixel in the reference block, from the value A of the pixel to which the escape value is assigned.
차분값이 유도되면, 차분값을 부호화하거나, 또는 차분값을 양자화하여, 양자화된 차분값을 부호화할 수 있다.When the difference value is derived, the quantized difference value may be encoded by encoding the difference value or quantizing the difference value.
블록 벡터를 이용하여 이스케이프 값에 대한 예측값을 생성할 것인지 여부는, 무손실 부호화가 적용되었는지 여부에 기초하여 결정될 수 있다. 일 예로, 현재 영상에 무손실 부호화가 적용되는 경우에 한하여, 블록 벡터를 이용하여 이스케이프 값에 대한 예측값을 생성할 수 있다. Whether to generate a prediction value for an escape value by using the block vector may be determined based on whether lossless coding is applied. For example, only when lossless encoding is applied to the current image, a prediction value for an escape value may be generated using a block vector.
또는, 이스케이프 값에 대한 예측값 생성 방법을 특정하는 정보가 비트스트림을 통해 시그날링될 수 있다. 일 예로, 상기 정보는, 인트라 예측 모드 이용 모드 또는 블록 벡터 이용 모드 중 적어도 하나를 특정하는 것일 수 있다.Alternatively, information specifying a method of generating a prediction value for an escape value may be signaled through a bitstream. As an example, the information may specify at least one of an intra prediction mode use mode and a block vector use mode.
현재 블록의 인트라 예측 모드 또는 블록 벡터는 현재 블록에 인접하는 이웃 블록을 참조하여 유도될 수 있다. 여기서, 이웃 블록은 현재 블록의 상단 이웃 블록, 좌측 이웃 블록, 좌상단 이웃 블록, 우상단 이웃 블록 또는 좌하단 이웃 블록 중 적어도 하나를 포함할 수 있다.The intra prediction mode or block vector of the current block may be derived with reference to a neighboring block adjacent to the current block. Here, the neighboring block may include at least one of an upper neighboring block, a left neighboring block, an upper left neighboring block, an upper right neighboring block, or a lower left neighboring block of the current block.
도 23은 현재 블록의 이웃 블록을 설명하기 위한 예시이다. 23 is an example for describing a neighboring block of the current block.
도 23에서, RT는 블록 내의 가장 오른쪽 위에 위치한 화소를 나타내고, LB는 블록 내의 가장 왼쪽 아래에 존재하는 화소를 나타낸다. In FIG. 23 , RT indicates a pixel located at the upper right of the block, and LB indicates a pixel located at the bottom left of the block.
현재 블록 주변의 5개 이웃 블록을 참조하여 블록 벡터가 유도된다고 가정할 때, 기 정의된 우선 순위에 따라 이웃 블록들을 탐색하여 블록 벡터 후보 리스트를 구성할 수 있다. 일 예로, A 위치의 화소를 포함하는 상단 이웃 블록, L 위치의 화소를 포함하는 좌측 이웃 블록, e 위치의 화소를 포함하는 우상단 이웃 블록, i 위치의 화소를 포함하는 좌하단 이웃 블록 및 a 위치의 화소를 포함하는 좌상단 이웃 블록순으로 이웃 블록들을 탐색할 수 있다.Assuming that a block vector is derived with reference to five neighboring blocks around the current block, a block vector candidate list may be constructed by searching for neighboring blocks according to a predefined priority. For example, an upper neighboring block including a pixel at position A, a left neighboring block including a pixel at position L, an upper right neighboring block including a pixel at position e, a lower left neighboring block including a pixel at position i, and position a The neighboring blocks may be searched in the order of the upper left neighboring blocks including the pixel of .
블록 벡터를 이용하여 부호화된 블록이 탐색된 경우, 탐색된 블록의 블록 벡터를 기초로, 블록 벡터 후보 리스트를 구성할 수 있다. 블록 벡터 후보 리스트에 복수의 블록 벡터 후보가 포함되어 있는 경우, 복수의 블록 벡터 후보 중 하나를 특정하는 인덱스 정보를 부호화하여 시그날링할 수 있다. When a block encoded using a block vector is searched for, a block vector candidate list may be constructed based on the block vector of the searched block. When a plurality of block vector candidates are included in the block vector candidate list, index information specifying one of the plurality of block vector candidates may be encoded and signaled.
또는, 상기 탐색 순서에 따라 이웃 블록들을 탐색하였을 때, 첫번째로 발견된 블록(즉, 블록 벡터로 부호화된 첫번째 블록)의 블록 벡터를, 현재 블록의 블록 벡터로 설정할 수 있다. Alternatively, when neighboring blocks are searched according to the search order, a block vector of a first found block (ie, a first block encoded as a block vector) may be set as a block vector of the current block.
무손실 부호화가 적용된 경우, 모든 화소들에 이스케이프 모드가 적용된 것으로 간주할 수도 있다. 즉, 무손실 부호화가 적용된 경우, 팔레트의 테이블의 크기와 무관하게, 픽셀들 각각에 대해 팔레트 이스케이프 값을 부호화하여 시그날링할 수 있다.When lossless encoding is applied, it may be considered that the escape mode is applied to all pixels. That is, when lossless encoding is applied, the palette escape value may be encoded and signaled for each pixel regardless of the size of the palette table.
다른 예로, 무손실 부호화가 적용된 경우, 팔레트 인덱스를 이용하여 화소들을 예측/복원하는 팔레트 부호화 방법을 적용할 것인지 또는 모든 화소들에 이스케이프 모드가 적용되는 것으로 간주하는 팔레트 부호화 방법을 적용할 것인지 여부를 선택할 수 있다. As another example, when lossless coding is applied, it is possible to select whether to apply a palette coding method that predicts/restores pixels using a palette index or applies a palette coding method that assumes that the escape mode is applied to all pixels. can
팔레트 인덱스를 이용한 팔레트 부호화 방법이 적용되는 경우, 화소별로 팔레트 인덱스가 부호화/복호화될 수 있다. When the palette encoding method using the palette index is applied, the palette index may be encoded/decoded for each pixel.
반면, 모든 화소에 이스케이프 모드가 적용되는 팔레트 부호화 방법이 적용되는 경우, 화소별 팔레트 인덱스의 부호화/복호화가 생략되고, 화소별 팔레트 이스케이프 값이 부호화/복호화될 수 있다. On the other hand, when the palette encoding method in which the escape mode is applied to all pixels is applied, encoding/decoding of the palette index for each pixel may be omitted, and the palette escape value for each pixel may be encoded/decoded.
위 두개의 팔레트 부호화 방법들 중 어느 것이 적용되었는지를 나타내는 정보가 부호화되어 시그날링될 수 있다. 일 예로, 무손실 부호화가 적용된 경우, 위 두개의 팔레트 부호화 방법들 중 하나를 특정하는 플래그가 추가로 부호화되어 시그날링될 수 있다. Information indicating which of the above two palette encoding methods is applied may be encoded and signaled. For example, when lossless encoding is applied, a flag specifying one of the above two palette encoding methods may be further encoded and signaled.
다른 예로, 컬러 포맷, 컬러 성분, 현재 블록의 크기 또는 현재 블록의 형태 중 적어도 하나에 기초하여, 팔레트 부호화 방법들 중 하나가 적응적으로 선택될 수 있다.As another example, one of the palette encoding methods may be adaptively selected based on at least one of a color format, a color component, a size of a current block, or a shape of the current block.
모든 화소들에 이스케이프 모드가 적용되는 팔레트 부호화 방법이 적용될 경우, 이스케이프 값의 부호화 모드를 나타내는 정보가 추가 부호화될 수 있다. 일 예로, 상기 정보는, 이스케이프 값을 그대로 부호화하는 모드, 인트라 예측을 이용하여 이스케이프값을 부호화하는 모드 또는 블록 벡터를 이용하여 이스케이프값을 부호화하는 모드 중 적어도 하나를 나타낼 수 있다. When the palette encoding method in which the escape mode is applied to all pixels is applied, information indicating the encoding mode of the escape value may be additionally encoded. For example, the information may indicate at least one of a mode for encoding escape values as they are, a mode for encoding escape values using intra prediction, and a mode for encoding escape values using block vectors.
상술한 예에서는, 무손실 부호화가 적용된 경우에 한하여, 모든 화소들에 이스케이프 모드가 적용되는 팔레트 부호화 방법을 적용할 수 있는 것으로 설명하였다. 설명한 예와 달리, 무손실 부호화가 적용되지 않은 경우에도, 모든 화소들에 이스케이프 모드가 적용되는 팔레트 부호화 방법을 적용할 수도 있다. 이 경우에도, 비트스트림을 통해 시그날링되는 정보에 의해, 팔레트 부호화 방법이 결정되거나, 컬러 성분, 컬러 포맷, 현재 블록의 크기 또는 현재 블록의 형태 중 적어도 하나에 기초하여, 팔레트 부호화 방법이 결정될 수 있다. 다른 예로, 무손실 부호화가 적용되는 경우와, 손실 부호화가 적용되는 경우에 있어서, 팔레트 테이블의 크기를 상이하게 설정할 수 있다. 일 예로, 손실 부호화가 적용되는 경우에는, 팔레트 테이블의 크기가 M으로 설정되고, 무손실 부호화가 적용되는 경우에는, 팔레트 테이블의 크기가 N으로 설정될 수 있다. 여기서, M과 N은 상이한 값을 가질 수 있다. 일 예로, N은 M보다 큰 자연수일 수 있다. M 및 N의 값이 부호화기 및 복호화기에서 고정되어 있을 수 있다. 또는, 상위 헤더를 통해, M 및 N의 값을 결정하기 위한 정보가 부호화되어 시그날링될 수 있다. 일 예로, 손실 부호화가 적용되는 경우 팔레트 테이블의 크기 M을 나타내는 정보 및 무손실 부호화가 적용되는 경우 팔레트 테이블의 크기 N을 나타내는 정보가 각각 부호화되어 시그날링될 수 있다.In the above-described example, it has been described that the palette encoding method in which the escape mode is applied to all pixels can be applied only when lossless encoding is applied. Unlike the described example, even when lossless encoding is not applied, a palette encoding method in which an escape mode is applied to all pixels may be applied. Even in this case, the palette encoding method may be determined by the information signaled through the bitstream, or the palette encoding method may be determined based on at least one of a color component, a color format, the size of the current block, or the shape of the current block. have. As another example, in a case in which lossless coding is applied and a case in which lossy coding is applied, the size of the palette table may be set differently. For example, when lossy coding is applied, the size of the palette table may be set to M, and when lossless coding is applied, the size of the palette table may be set to N. Here, M and N may have different values. For example, N may be a natural number greater than M. The values of M and N may be fixed in the encoder and the decoder. Alternatively, information for determining the values of M and N may be encoded and signaled through the upper header. For example, information indicating the size M of the palette table when lossy encoding is applied and information indicating the size N of the palette table when lossless encoding is applied may be each encoded and signaled.
손실 부호화가 적용되는 경우 팔레트 테이블의 크기 M과 무손실 부호화가 적용되는 경우 팔레트 테이블의 크기 N 사이의 관계가 부호화기 및 복호화기에 기 정의되어 있을 수 있다. 일 예로, M 및 N 사이의 관계가, N <= M, N==M 또는 N >= M 으로 정의되어 있을 수 있다. M과 N의 크기가 상이한 경우, 두 변수간 차분값을 나타내는 정보가 부호화될 수도 있다. 일 예로, 무손실 부호화가 적용되는 경우의 팔레트 테이블의 크기 N와 손실 부호화가 적용되는 경우의 팔레트 테이블의 크기 M 사이의 차분을 나타내는 정보가 부호화되어 시그날링될 수 있다.A relationship between the size M of the palette table when lossy coding is applied and the size N of the palette table when lossless coding is applied may be predefined in the encoder and decoder. As an example, the relationship between M and N may be defined as N <= M, N== M, or N >= M. When the magnitudes of M and N are different, information indicating a difference value between two variables may be encoded. For example, information indicating a difference between the size N of the palette table when lossless coding is applied and the size M of the palette table when lossy coding is applied may be encoded and signaled.
또는, 상위 레벨 헤더를 통해, 팔레트 테이블의 최소 크기를 부호화하여 시그날링할 수 있다. 여기서, 상위 레벨 헤더는, 복수 하위 레벨들이 공통적으로 참조하는 파라미터 세트를 나타낸다. 일 예로, 상위 레벨은, 코딩 트리 유닛, 슬라이스, 타일, 서브 픽처, 픽처 또는 시퀀스 중 어느 하나이고, 하위 레벨은, 상위 레벨보다 작은 크기의 처리 단위(예컨대, 블록, 코딩 트리 유닛, 슬라이스, 타일, 서브 픽처 또는 픽처)를 나타낸다. Alternatively, through a higher level header, the minimum size of the palette table may be encoded and signaled. Here, the higher level header indicates a parameter set commonly referenced by a plurality of lower levels. For example, the upper level is any one of a coding tree unit, a slice, a tile, a subpicture, a picture, or a sequence, and a lower level is a processing unit (eg, a block, a coding tree unit, a slice, a tile) having a size smaller than that of the upper level. , subpicture or picture).
이후, 처리 단위별로, 팔레트 테이블의 크기와, 상위 레벨에서 결정된 팔레트 테이블의 최소 크기 사이의 차분을 나타내는 정보가 부호화/복호화될 수 있다. 일 예로, 현재 블록에 대한 팔레트 테이블의 크기는, 상위 레벨에서 결정된 최소 크기 및 현재 블록에 대해 복호화된 크기 차분을 더한 값으로 결정될 수 있다. 즉, 차분값이 블록 레벨에서 부호화/복호화되는 경우, 블록 마다 상이한 크기의 팔레트 테이블이 이용될 수 있다. Thereafter, for each processing unit, information indicating a difference between the size of the palette table and the minimum size of the palette table determined at a higher level may be encoded/decoded. As an example, the size of the palette table for the current block may be determined as a value obtained by adding a difference between a minimum size determined at a higher level and a size decoded with respect to the current block. That is, when the difference value is encoded/decoded at the block level, a palette table having a different size for each block may be used.
상술한 예에서는, 손실 부호화가 적용되었는지 또는 무손실 부호화가 적용되었는지 여부에 기초하여, 팔레트 테이블의 구성이 결정되는 것으로 예시되었다. 여기서, 팔레트 테이블간 구성이 상이하다는 것은, 팔레트 테이블들 각각의 크기 또는 팔레트 테이블들 각각의 이스케이프 값을 부호화하는 방법 중 적어도 하나가 상이함을 나타낸다.In the above-described example, it is exemplified that the configuration of the palette table is determined based on whether lossy coding or lossless coding is applied. Here, that the configuration between the palette tables is different indicates that at least one of the size of each of the palette tables or the method of encoding the escape values of each of the palette tables is different.
다른 예로, 컬러 성분 또는 컬러 포맷에 따라 팔레트 테이블의 구성을 적응적으로 선택할 수도 있다. 일 예로, 휘도 성분 블록에 대해서는 M개의 팔레트 엔트리로 구성된 팔레트 테이블을 이용하는 한편, 색차 성분 블록에 대해서는 N개의 팔레트 엔트리로 구성된 팔레트 테이블을 이용할 수 있다.As another example, the configuration of the palette table may be adaptively selected according to a color component or a color format. For example, a palette table composed of M palette entries may be used for a luminance component block, and a palette table composed of N palette entries may be used for a chrominance component block.
컬러 포맷에 따라, 팔레트 테이블을 컬러 성분 마다 개별적으로 구성할 것인지 여부가 결정될 수 있다. 일 예로, 컬러 포맷이 4:2:0인 경우에는, 휘도 성분 및 색차 성분간 트리 구조에 따라 통합된 팔레트 테이블을 구성할 것인지 여부가 결정될 수 있다. Depending on the color format, it may be determined whether or not to configure the palette table individually for each color component. For example, when the color format is 4:2:0, it may be determined whether to configure the integrated palette table according to the tree structure between the luminance component and the chrominance component.
일 예로, 트리 구조가 싱글 트리인 경우에는, 휘도 성분 및 색차 성분 모두에 적용되는 통합된 팔레트 테이블이 이용될 수 있다. 여기서, 통합된 팔레트 테이블은, 휘도 성분의 팔레트 테이블과 색차 성분의 팔레트 테이블이 상호 동일함을 나타낸다.For example, when the tree structure is a single tree, an integrated palette table applied to both the luminance component and the chrominance component may be used. Here, the integrated palette table indicates that the palette table of the luminance component and the palette table of the chrominance component are identical to each other.
반면, 트리 구조가 듀얼 트리인 경우에는, 휘도 성분 및 색차 성분간 독립적으로 팔레트 테이블을 구성할 수 있다. 휘도 성분의 팔레트 테이블 및 색차 성분의 팔레트 테이블 사이에, 팔레트 테이블의 크기 또는 이스케이프 값의 부호화 모드 중 적어도 하나가 상이할 수 있다. On the other hand, when the tree structure is a dual tree, the palette table can be configured independently between the luminance component and the chrominance component. At least one of a size of the palette table and an encoding mode of an escape value may be different between the palette table of the luminance component and the palette table of the chrominance component.
상술한 실시예들에서 사용된 신택스들의 명칭은, 설명의 편의를 위해 명명된 것에 불과하다.The names of syntaxes used in the above-described embodiments are merely named for convenience of description.
복호화 과정 또는 부호화 과정을 중심으로 설명된 실시예들을, 부호화 과정 또는 복호화 과정에 적용하는 것은, 본 개시의 범주에 포함되는 것이다. 소정의 순서로 설명된 실시예들을, 설명된 것과 상이한 순서로 변경하는 것 역시, 본 개시의 범주에 포함되는 것이다.Applying the decoding process or the embodiments described based on the encoding process to the encoding process or the decoding process is included in the scope of the present disclosure. It is also within the scope of the present disclosure to change the embodiments described in a certain order in an order different from that described.
상술한 실시예는 일련의 단계 또는 순서도를 기초로 설명되고 있으나, 이는 발명의 시계열적 순서를 한정한 것은 아니며, 필요에 따라 동시에 수행되거나 다른 순서로 수행될 수 있다. 또한, 상술한 실시예에서 블록도를 구성하는 구성요소(예를 들어, 유닛, 모듈 등) 각각은 하드웨어 장치 또는 소프트웨어로 구현될 수도 있고, 복수의 구성요소가 결합하여 하나의 하드웨어 장치 또는 소프트웨어로 구현될 수도 있다. 상술한 실시예는 다양한 컴퓨터 구성요소를 통하여 수행될 수 있는 프로그램 명령어의 형태로 구현되어 컴퓨터 판독 가능한 기록 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능한 기록 매체는 프로그램 명령어, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 컴퓨터 판독 가능한 기록 매체의 예에는, 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM, DVD와 같은 광기록 매체, 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 ROM, RAM, 플래시 메모리 등과 같은 프로그램 명령어를 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 상기 하드웨어 장치는 본 개시에 따른 처리를 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.Although the above-described embodiment has been described based on a series of steps or a flowchart, this does not limit the time-series order of the invention, and may be performed simultaneously or in a different order, if necessary. In addition, each of the components (eg, unit, module, etc.) constituting the block diagram in the above-described embodiment may be implemented as a hardware device or software, or a plurality of components may be combined to form one hardware device or software. may be implemented. The above-described embodiment may be implemented in the form of program instructions that can be executed through various computer components and recorded in a computer-readable recording medium. The computer-readable recording medium may include program instructions, data files, data structures, etc. alone or in combination. Examples of the computer-readable recording medium include a hard disk, a magnetic medium such as a floppy disk and a magnetic tape, an optical recording medium such as a CD-ROM, a DVD, and a magneto-optical medium such as a floppy disk. media), and hardware devices specially configured to store and execute program instructions, such as ROM, RAM, flash memory, and the like. The hardware device may be configured to operate as one or more software modules to perform processing according to the present disclosure, and vice versa.
본 개시는 비디오 신호를 부호화/복호화하기 위해 이용될 수 있다.The present disclosure may be used to encode/decode a video signal.

Claims (15)

  1. 무손실 부호화가 적용되는지 여부를 결정하는 단계;determining whether lossless coding is applied;
    상기 무손실 부호화가 적용되는 경우, 현재 블록에 팔레트 예측이 적용되는지 여부를 결정하는 단계;determining whether palette prediction is applied to a current block when the lossless coding is applied;
    상기 현재 블록에 대한 팔레트 테이블을 구성하는 단계; 및constructing a palette table for the current block; and
    상기 팔레트 테이블에 기초하여, 상기 현재 블록 내 화소를 복원하는 단계를 포함하는, 영상 복호화 방법.Based on the palette table, the image decoding method comprising the step of reconstructing the pixels in the current block.
  2. 제1항에 있어서,According to claim 1,
    상기 현재 블록에 상기 무손실 부호화가 적용되는 경우와 상기 현재 블록에 손실 부호화가 적용되는 경우에 있어서, 상기 팔레트 테이블의 크기가 상이한 것을 특징으로 하는, 영상 복호화 방법.In the case where the lossless coding is applied to the current block and when the lossy coding is applied to the current block, the size of the palette table is different, characterized in that the image decoding method.
  3. 제2항에 있어서,3. The method of claim 2,
    상기 손실 부호화가 적용되는 경우의 상기 팔레트 테이블의 크기와 상기 무손실 부호화가 적용되는 경우의 상기 팔레트 테이블의 크기 사이의 차분을 나타내는 차분 정보가 비트스트림으로부터 복호화되는 것을 특징으로 하는, 영상 복호화 방법.Difference information indicating a difference between the size of the palette table when the lossy coding is applied and the size of the palette table when the lossless coding is applied is decoded from the bitstream, the video decoding method.
  4. 제1항에 있어서,According to claim 1,
    상기 현재 블록 내 모든 화소들이 이스케이프 모드가 적용되는 것으로 결정되는 것을 특징으로 하는, 영상 복호화 방법.The image decoding method, characterized in that it is determined that the escape mode is applied to all pixels in the current block.
  5. 제4항에 있어서,5. The method of claim 4,
    비트스트림으로부터, 상기 현재 블록 내 화소에 대한 이스케이프 값 정보가 복호화되는 것을 특징으로 하는, 영상 복호화 방법.The image decoding method, characterized in that the escape value information for the pixel in the current block is decoded from the bitstream.
  6. 제5항에 있어서,6. The method of claim 5,
    상기 이스케이프 값 정보는, 이스케이프 값과 이스케이프 예측값 사이의 차분을 나타내는 것을 특징으로 하는, 영상 복호화 방법.The escape value information is an image decoding method, characterized in that it represents a difference between the escape value and the escape predicted value.
  7. 제6항에 있어서,7. The method of claim 6,
    상기 이스케이프 예측값은, 상기 현재 블록의 인트라 예측 모드 또는 블록 벡터를 기초로 유도되는 것을 특징으로 하는, 영상 복호화 방법. The escape prediction value is an image decoding method, characterized in that it is derived based on an intra prediction mode or a block vector of the current block.
  8. 무손실 부호화가 적용되는지 여부를 결정하는 단계;determining whether lossless coding is applied;
    상기 무손실 부호화가 적용되는 경우, 현재 블록에 팔레트 예측이 적용되는지 여부를 결정하는 단계;determining whether palette prediction is applied to a current block when the lossless coding is applied;
    상기 현재 블록에 대한 팔레트 테이블을 구성하는 단계; 및constructing a palette table for the current block; and
    상기 팔레트 테이블에 기초하여, 상기 현재 블록 내 화소를 부호화하는 단계를 포함하는, 영상 부호화 방법.Based on the palette table, comprising the step of encoding a pixel in the current block, the image encoding method.
  9. 제8항에 있어서,9. The method of claim 8,
    상기 현재 블록에 상기 무손실 부호화가 적용되는 경우와 상기 현재 블록에 손실 부호화가 적용되는 경우에 있어서, 상기 팔레트 테이블의 크기가 상이한 것을 특징으로 하는, 영상 부호화 방법.In the case where the lossless coding is applied to the current block and the case where the lossy coding is applied to the current block, the size of the palette table is different, characterized in that, the video encoding method.
  10. 제9항에 있어서,10. The method of claim 9,
    상기 손실 부호화가 적용되는 경우의 상기 팔레트 테이블의 크기와 상기 무손실 부호화가 적용되는 경우의 상기 팔레트 테이블의 크기 사이의 차분을 나타내는 차분 정보가 비트스트림에 부호화되는 것을 특징으로 하는, 영상 부호화 방법.Difference information indicating a difference between the size of the palette table when the lossy coding is applied and the size of the palette table when the lossless coding is applied is encoded in a bitstream, the video encoding method.
  11. 제8항에 있어서,9. The method of claim 8,
    상기 현재 블록 내 모든 화소들이 이스케이프 모드가 적용되는 것으로 결정되는 것을 특징으로 하는, 영상 부호화 방법.An image encoding method, characterized in that it is determined that the escape mode is applied to all pixels in the current block.
  12. 제11항에 있어서,12. The method of claim 11,
    비트스트림에, 상기 현재 블록 내 화소에 대한 이스케이프 값 정보가 부호화되는 것을 특징으로 하는, 영상 부호화 방법.An image encoding method, wherein escape value information for a pixel in the current block is encoded in a bitstream.
  13. 제12항에 있어서,13. The method of claim 12,
    상기 이스케이프 값 정보는, 이스케이프 값과 이스케이프 예측값 사이의 차분을 나타내는 것을 특징으로 하는, 영상 부호화 방법.The escape value information is an image encoding method, characterized in that it represents a difference between the escape value and the escape predicted value.
  14. 제13항에 있어서,14. The method of claim 13,
    상기 이스케이프 예측값은, 상기 현재 블록의 인트라 예측 모드 또는 블록 벡터를 기초로 유도되는 것을 특징으로 하는, 영상 부호화 방법. The escape prediction value is an image encoding method, characterized in that it is derived based on an intra prediction mode or a block vector of the current block.
  15. 무손실 부호화가 적용되는지 여부를 결정하는 단계;determining whether lossless encoding is applied;
    상기 무손실 부호화가 적용되는 경우, 현재 블록에 팔레트 예측이 적용되는지 여부를 결정하는 단계;determining whether palette prediction is applied to a current block when the lossless coding is applied;
    상기 현재 블록에 대한 팔레트 테이블을 구성하는 단계; 및constructing a palette table for the current block; and
    상기 팔레트 테이블에 기초하여, 상기 현재 블록 내 화소를 부호화하는 단계를 포함하는, 영상 부호화 방법에 의해 부호화된 비트스트림을 저장하는, 컴퓨터로 판독가능한 기록 매체.Based on the palette table, comprising the step of encoding a pixel in the current block, for storing a bitstream encoded by the image encoding method, a computer-readable recording medium.
PCT/KR2021/003725 2020-03-25 2021-03-25 Method and device for processing video signal WO2021194283A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR20200036399 2020-03-25
KR10-2020-0036399 2020-03-25

Publications (1)

Publication Number Publication Date
WO2021194283A1 true WO2021194283A1 (en) 2021-09-30

Family

ID=77892052

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2021/003725 WO2021194283A1 (en) 2020-03-25 2021-03-25 Method and device for processing video signal

Country Status (2)

Country Link
KR (1) KR102589351B1 (en)
WO (1) WO2021194283A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160138102A (en) * 2014-03-26 2016-12-02 퀄컴 인코포레이티드 Determining palette size, palette entries and filtering of palette coded blocks in video coding
US20170230667A1 (en) * 2016-02-08 2017-08-10 Canon Kabushiki Kaisha Encoder optimizations for palette lossless encoding of content with subsampled colour component
US20180288415A1 (en) * 2015-06-09 2018-10-04 Microsoft Technology Licensing, Llc Robust encoding/decoding of escape-coded pixels in palette mode
KR20190041549A (en) * 2014-10-06 2019-04-22 캐논 가부시끼가이샤 Improved encoding process using a palette mode

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11259020B2 (en) * 2013-04-05 2022-02-22 Qualcomm Incorporated Determining palettes in palette-based video coding
US9924175B2 (en) * 2014-06-11 2018-03-20 Qualcomm Incorporated Determining application of deblocking filtering to palette coded blocks in video coding

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160138102A (en) * 2014-03-26 2016-12-02 퀄컴 인코포레이티드 Determining palette size, palette entries and filtering of palette coded blocks in video coding
KR20190041549A (en) * 2014-10-06 2019-04-22 캐논 가부시끼가이샤 Improved encoding process using a palette mode
US20180288415A1 (en) * 2015-06-09 2018-10-04 Microsoft Technology Licensing, Llc Robust encoding/decoding of escape-coded pixels in palette mode
US20170230667A1 (en) * 2016-02-08 2017-08-10 Canon Kabushiki Kaisha Encoder optimizations for palette lossless encoding of content with subsampled colour component

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
X. XIU (KWAI), H.-J. JHU (KWAI), Y.-W. CHEN (KWAI), T.-C. MA (KWAI), X. WANG (KWAI): "Non-CE2: On signaling of maximum palette size and maximum palette predictor size", 17. JVET MEETING; 20200107 - 20200117; BRUSSELS; (THE JOINT VIDEO EXPLORATION TEAM OF ISO/IEC JTC1/SC29/WG11 AND ITU-T SG.16 ), 1 January 2020 (2020-01-01), XP030223813 *

Also Published As

Publication number Publication date
KR102589351B1 (en) 2023-10-16
KR20210119916A (en) 2021-10-06

Similar Documents

Publication Publication Date Title
WO2017222326A1 (en) Video signal processing method and device
WO2018026219A1 (en) Video signal processing method and device
WO2018030599A1 (en) Intra-prediction mode-based image processing method and device therefor
WO2017176030A1 (en) Method and apparatus for processing video signal
WO2018056703A1 (en) Method and apparatus for processing video signal
WO2018097626A1 (en) Video signal processing method and apparatus
WO2019225993A1 (en) Method and apparatus for processing video signal
WO2018070742A1 (en) Image encoding/decoding method and device, and recording medium in which bitstream is stored
WO2012043989A2 (en) Method for partitioning block and decoding device
WO2018212579A1 (en) Method and device for video signal processing
WO2020050685A1 (en) Method and device for coding/decoding image using intra prediction
WO2019190201A1 (en) Video signal processing method and device
WO2020096428A1 (en) Method for encoding/decoding image signal and device therefor
WO2019182295A1 (en) Method and apparatus for processing video signal
WO2018066958A1 (en) Method and apparatus for processing video signal
WO2018056701A1 (en) Method and apparatus for processing video signal
WO2016190627A1 (en) Method and device for processing video signal
WO2018124333A1 (en) Intra prediction mode-based image processing method, and apparatus therefor
WO2017069505A1 (en) Method for encoding/decoding image and device therefor
WO2019221465A1 (en) Image decoding method/device, image encoding method/device, and recording medium in which bitstream is stored
WO2020096427A1 (en) Image signal encoding/decoding method and apparatus therefor
WO2018062950A1 (en) Picture processing method and apparatus for same
WO2018174457A1 (en) Image processing method and device therefor
WO2020180166A1 (en) Image encoding/decoding method and apparatus
WO2018155983A1 (en) Video signal processing method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21776704

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21776704

Country of ref document: EP

Kind code of ref document: A1