Image encoding / decoding method and device
The method optimizes video encoding and decoding by employing adaptive conversion kernel signaling and parity hiding to enhance the efficiency of high-resolution and stereoscopic video compression.
Patent Information
- Application Number
- PCT/KR2025/021016
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-12-13
- Filing Date
- 2025-12-08
- Publication Date
- 2026-06-18
AI Technical Summary
Existing video compression technologies face challenges in efficiently encoding and decoding high-resolution and stereoscopic video content, particularly in determining optimal conversion methods and signaling for transform skips.
A method and apparatus for encoding and decoding residual signals based on conversion skips, utilizing adaptive signaling of conversion kernels and parity hiding techniques to improve encoding efficiency.
Enhances the efficiency of video encoding and decoding processes by optimizing transform skip decisions and reducing redundant data transmission, thereby improving the overall compression performance.
Smart Images

Figure KR2025021016_18062026_PF_FP_ABST
Abstract
Description
Video encoding / decoding method and device
[0001] The present invention relates to an image encoding / decoding method and apparatus.
[0002] Market demand for high-resolution video is increasing, and consequently, there is a need for technology that can efficiently compress high-resolution video. In response to these market demands, the Moving Picture Expert Group (MPEG) of ISO / IEC and the Video Coding Expert Group (VCEG) of ITU-T jointly formed the Joint Collaborative Team on Video Coding (JCT-VC), completed the development of the High Efficiency Video Coding (HEVC) video compression standard in January 2013, and have been actively conducting research and development on next-generation compression standards.
[0003] Video compression is broadly composed of intra-frame prediction (or intra prediction), inter-frame prediction (or inter prediction), transformation, quantization, entropy coding, and in-loop filters. Meanwhile, along with the increasing demand for high-resolution video, the demand for stereoscopic video content as a new video service is also increasing. Discussions are underway regarding video compression technologies to effectively provide high-resolution and ultra-high-resolution stereoscopic video content.
[0004] The present disclosure provides a method for encoding / decoding a residual signal depending on whether a conversion skip is applied.
[0005] The present disclosure provides a method and apparatus for determining whether to apply a conversion skip.
[0006] The present disclosure provides a method and apparatus for signaling a conversion kernel.
[0007] An image decoding method and apparatus according to the present disclosure can derive transform coefficients of a current block, derive residual samples of the current block based on the transform coefficients, and restore the current block based on the residual samples. Here, the transform coefficients may be derived based on at least one of a start position or a last position within the current block. The start position may be the position of the first non-zero transform coefficient in the scan order, and the last position may be the position of the last non-zero transform coefficient in the scan order.
[0008] In the image decoding method and apparatus according to the present disclosure, at least one of the start position or the end position may be determined based on whether the current block is a conversion skip block.
[0009] In the image decoding method and apparatus according to the present disclosure, the scan order may be determined based on a transformation kernel for the inverse transformation of the current block.
[0010] In the image decoding method and apparatus according to the present disclosure, the current block may be divided into a first region corresponding to a low-frequency region and a second region corresponding to the remaining region excluding the low-frequency region. The first region may be determined based on the transformation kernel of the current block.
[0011] In the image decoding method and apparatus according to the present disclosure, the transform coefficient of the current block may be derived based on the absolute value of the transform coefficient and the sign of the transform coefficient. The absolute value may be decoded based on at least one of a base level value or a residual level value.
[0012] In the image decoding method and apparatus according to the present disclosure, the base level value can be decoded based on parity hiding.
[0013] In the image decoding method and apparatus according to the present disclosure, the parity hiding may be applied based on at least one of a parity hiding allow flag indicating whether parity hiding is allowed or whether the current block is a lossless compressed block.
[0014] In the image decoding method and apparatus according to the present disclosure, when a predetermined condition is satisfied, the parity hiding allow flag may be not signaled through the bitstream and may be induced to a value of 0.
[0015] In the image decoding method and apparatus according to the present disclosure, the parity hiding may be applied when the last position within the current block is greater than a specific threshold.
[0016] In the image decoding method and apparatus according to the present disclosure, whether the parity hiding is applied can be determined based on the transformation kernel of the current block.
[0017] In the image decoding method and apparatus according to the present disclosure, if the number of non-zero base level values up to the starting position within the current block is greater than or equal to a threshold value, a parity value for the base level value of the starting position can be implicitly derived.
[0018] In the image decoding method and apparatus according to the present disclosure, when the number of non-zero base level values decoded from the last position in the current block becomes equal to a threshold value, a parity value can be derived based on the sum of the absolute values of the decoded non-zero base level values.
[0019] An image encoding method and apparatus according to the present disclosure may derive residual samples of a current block, derive transform coefficients of the current block from the residual samples, and generate a bitstream by encoding the transform coefficients. The transform coefficients may be encoded based on at least one of a start position or a last position within the current block. The start position may be the position of the first non-zero transform coefficient in the scan order, and the last position may be the position of the last non-zero transform coefficient in the scan order.
[0020] The present disclosure may provide a non-transient computer-readable storage medium for storing a bitstream generated by an image encoding method.
[0021] The present disclosure may provide a transmission method and an apparatus for transmitting a bitstream generated by an image encoding method.
[0022] According to the present disclosure, residual signals can be efficiently encoded / decoded by considering whether to apply a transform skip.
[0023] Through the signaling method of syntax elements related to transformation skips proposed in the present disclosure, it is possible to determine whether to apply a transformation skip more efficiently.
[0024] According to the present disclosure, encoding efficiency can be improved through adaptive signaling of the conversion kernel.
[0025] FIG. 1 is a block diagram showing an image encoding device according to the present disclosure.
[0026] FIG. 2 is a block diagram showing an image decoding device according to the present disclosure.
[0027] FIG. 3 illustrates an image decoding method performed in an image decoding device according to the present disclosure.
[0028] FIGS. 4 and FIGS. 5 illustrate an example of a scan sequence according to the present disclosure.
[0029] FIG. 6 illustrates a method for decoding and encoding the absolute value of a conversion coefficient as an embodiment according to the present disclosure.
[0030] FIG. 7 illustrates a low-frequency range according to a conversion type as an embodiment according to the present disclosure.
[0031] FIGS. 8 to 12 illustrate a method for applying parity hiding according to the present disclosure.
[0032] FIG. 13 illustrates a DC region according to a conversion type as an embodiment according to the present disclosure.
[0033] FIG. 14 illustrates an image encoding method performed in an image encoding device according to the present disclosure.
[0034] Embodiments of the present invention are described in detail with reference to the drawings attached to this specification so that those skilled in the art can easily implement the invention. However, the present invention may be embodied in various different forms and is not limited to the embodiments described herein. Furthermore, in order to clearly explain the invention in the drawings, parts unrelated to the explanation have been omitted, and similar parts throughout the specification are denoted by similar reference numerals.
[0035] Throughout this specification, when a part is described as being 'connected' to another part, this includes not only cases where they are directly connected, but also cases where they are electrically connected with other elements in between.
[0036] Furthermore, throughout this specification, when a part is described as 'comprising' a certain component, this means that, unless specifically stated otherwise, it does not exclude other components but may include additional components.
[0037] Additionally, terms such as "first," "second," etc., may be used to describe various components, but said components should not be limited by said terms. These terms are used solely for the purpose of distinguishing one component from another.
[0038] Additionally, in the embodiments relating to the device and method described herein, some components of the device or some steps of the method may be omitted. Also, the order of some components of the device or some steps of the method may be changed. Additionally, other components or other steps may be inserted into some components of the device or some steps of the method.
[0039] In addition, some components or steps of the first embodiment of the present invention may be added to or replace some components or steps of the second embodiment of the present invention.
[0040] Furthermore, the components shown in the embodiments of the present invention are depicted independently to represent different characteristic functions and do not imply that each component consists of separate hardware or a single software unit. That is, for convenience of explanation, each component is described by listing it as a separate component, and at least two of the components may be combined to form a single component, or a single component may be divided into multiple components to perform a function. Such integrated and separated embodiments of each component are also included within the scope of the present invention as long as they do not deviate from the essence of the invention.
[0041] First, the terms used in this application are briefly explained as follows.
[0042] The video decoding apparatus described below may be a device included in a civilian security camera, civilian security system, military security camera, military security system, personal computer (PC), notebook computer, portable multimedia player (PMP), wireless communication terminal, smartphone, and server terminal such as a TV application server and service server; it may also refer to various devices equipped with a user terminal such as various devices, a communication device such as a communication modem for performing communication with a wired or wireless communication network, a memory for storing various programs and data for decoding video or predicting between or within a screen for decoding, and a microprocessor for executing programs to perform calculations and control.
[0043] In addition, the video encoded into a bitstream by the encoder can be transmitted to a video decoding device in real-time or non-real-time via wired or wireless communication networks such as the Internet, local area wireless communication networks, wireless LAN networks, WiBro networks, and mobile communication networks, or through various communication interfaces such as cables and Universal Serial Bus (USB), to be decoded, restored as a video, and played back. Alternatively, the bitstream generated by the encoder may be stored in memory. The memory may include both volatile and non-volatile memory. In this specification, memory may be described as a recording medium that stores the bitstream.
[0044] Typically, a video can be composed of a series of pictures, and each picture can be divided into coding units, such as blocks. Furthermore, those skilled in the art to which this embodiment belongs will understand that the term "picture" described below may be replaced with other terms having equivalent meanings, such as "image" or "frame." Additionally, those skilled in the art to which this embodiment belongs will understand that the term "coding unit" may be replaced with other terms having equivalent meanings, such as "unit block" or "block."
[0045] Hereinafter, embodiments of the present invention will be described in more detail with reference to the attached drawings. In describing the present invention, redundant descriptions of identical components are omitted.
[0046] FIG. 1 is a block diagram showing an image encoding device according to the present invention.
[0047] Referring to FIG. 1, the image encoding device (100) may include a picture splitting unit (110), a prediction unit (120, 125), a conversion unit (130), a quantization unit (135), a reordering unit (160), an entropy encoding unit (165), an inverse quantization unit (140), an inverse conversion unit (145), a filter unit (150), and a memory (155).
[0048] The picture splitting unit (110) can split the input picture into at least one processing unit. At this time, the processing unit may be a Prediction Unit (PU), a Transform Unit (TU), or a Coding Unit (CU). In the following embodiments of the present invention, the term "coding unit" may be used to mean a unit that performs coding, or a unit that performs decoding.
[0049] A prediction unit may be divided into at least one square or rectangle of the same size within a single coding unit, or it may be divided such that one of the prediction units within a single coding unit has a different shape and / or size from another prediction unit. When generating a prediction unit that performs intra prediction based on a coding unit, if it is not the minimum coding unit, intra prediction can be performed without dividing into multiple prediction units NxN.
[0050] The prediction unit (120, 125) may include an inter prediction unit (120) that performs inter prediction or inter-frame prediction, and an intra prediction unit (125) that performs intra prediction or intra-frame prediction. It may determine whether to use inter prediction or perform intra prediction for a prediction unit, and determine specific information according to each prediction method (e.g., intra prediction mode, motion vector, reference picture, etc.). The residual value (residual block) between the generated prediction block and the original block may be input to the conversion unit (130). In addition, the prediction mode information, motion vector information, etc. used for prediction may be encoded together with the residual value in the entropy encoding unit (165) and transmitted to the decoder.
[0051] When applying the block merge technology of the present invention described above, a method of using a merge estimation region (MER) considering parallel processing when merging and using movement information of spatially or temporally adjacent blocks of the current block can be applied to the prediction unit (120, 125). That is, the present invention can utilize a parallel estimation region (PER) to configure spatially or temporally adjacent blocks of the current block by considering parallel processing in prediction technologies such as inter-frame prediction, intra-frame prediction, and inter-component prediction among video coding technologies.
[0052] The inter prediction unit (120) may predict a prediction unit based on information of at least one picture among the previous picture or the subsequent picture of the current picture, and in some cases, may predict a prediction unit based on information of a partially encoded area within the current picture. The inter prediction unit (120) may include a reference picture interpolation unit, a motion prediction unit, and a motion compensation unit.
[0053] In the reference picture interpolation unit, reference picture information is received from memory (155), and pixel information of integer pixels or less can be generated from the reference picture. In the case of luminance pixels, a DCT-based 8-tap interpolation filter with different filter coefficients can be used to generate pixel information of integer pixels or less in 1 / 4 pixel units. In the case of chrominance signals, a DCT-based 4-tap interpolation filter with different filter coefficients can be used to generate pixel information of integer pixels or less in 1 / 8 pixel units.
[0054] The motion prediction unit can perform motion prediction based on a reference picture interpolated by the reference picture interpolation unit. Various methods such as FBMA (Full search-based Block Matching Algorithm), TSS (Three Step Search), and NTS (New Three-Step Search Algorithm) can be used to calculate motion vectors. Based on the interpolated pixels, the motion vector can have motion vector values in units of 1 / 2 or 1 / 4 pixels. The motion prediction unit can predict the current prediction unit by using different motion prediction methods. Various motion prediction methods such as the Skip method, Merge method, AMVP (Advanced Motion Vector Prediction) method, and Intra Block Copy method can be used.
[0055] The intra prediction unit (125) can generate a prediction unit based on reference pixel information around the current block, which is pixel information within the current picture. If the surrounding block of the current prediction unit is a block that has performed inter prediction, and the reference pixel is a pixel that has performed inter prediction, the reference pixel included in the block that has performed inter prediction can be replaced with the reference pixel information of the surrounding intra prediction block. That is, if the reference pixel is not available, the unavailable reference pixel information can be replaced with at least one of the available reference pixels.
[0056] Additionally, a residual block can be generated that includes residual value information, which is the difference between the prediction unit that performed the prediction based on the prediction unit generated in the prediction unit (120, 125) and the original block of the prediction unit. The generated residual block can be input to the conversion unit (130).
[0057] In the transformation unit (130), the residual block containing residual value information of the prediction unit generated through the original block and the prediction unit (120, 125) can be transformed using a transformation method such as DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), or KLT. Whether to apply DCT, DST, or KLT to transform the residual block can be determined based on the intra-prediction mode information of the prediction unit used to generate the residual block.
[0058] The quantization unit (135) can quantize the values converted into the frequency domain in the conversion unit (130). The quantization coefficient may vary depending on the block or the importance of the image. The values produced by the quantization unit (135) may be provided to the inverse quantization unit (140) and the reordering unit (160).
[0059] The reordering unit (160) can perform reordering of coefficient values for quantized residual values.
[0060] The reordering unit (160) can convert two-dimensional block-shaped coefficients into one-dimensional vector forms through a coefficient scanning method. For example, the reordering unit (160) can convert the coefficients from DC to high-frequency range coefficients into one-dimensional vector forms by scanning using a Zig-Zag Scan method. Depending on the size of the conversion unit and the intra-prediction mode, a vertical scan that scans two-dimensional block-shaped coefficients in the column direction or a horizontal scan that scans two-dimensional block-shaped coefficients in the row direction may be used instead of the Zig-Zag Scan. That is, depending on the size of the conversion unit and the intra-prediction mode, it can be determined whether to use a Zig-Zag Scan, a vertical scan, or a horizontal scan.
[0061] The entropy encoding unit (165) can perform entropy encoding based on the values calculated by the reordering unit (160). Entropy encoding can use various encoding methods, such as, for example, Exponential Golomb, CAVLC (Context-Adaptive Variable Length Coding), and CABAC (Context-Adaptive Binary Arithmetic Coding). In this regard, the entropy encoding unit (165) can encode residual value coefficient information of the encoding unit from the reordering unit (160) and the prediction unit (120, 125). Additionally, according to the present invention, it is possible to signal and transmit information indicating that motion information is derived and used in the decoder side, and information regarding the technique used for deriving motion information.
[0062] In the inverse quantization unit (140) and inverse transformation unit (145), the values quantized in the quantization unit (135) are inverse quantized, and the values transformed in the transformation unit (130) are inverse transformed. The residual value generated in the inverse quantization unit (140) and inverse transformation unit (145) can be combined with the prediction unit predicted through the motion estimation unit, motion compensation unit, and intra prediction unit included in the prediction unit (120, 125) to generate a reconstructed block.
[0063] The filter unit (150) may include at least one of a deblocking filter, an offset correction unit, and an Adaptive Loop Filter (ALF). The deblocking filter can remove block distortion caused by boundaries between blocks in the restored picture. The offset correction unit can correct the offset from the original image on a pixel-by-pixel basis for the image that has undergone deblocking. To perform offset correction for a specific picture, a method may be used in which pixels included in the image are divided into a certain number of regions, the region to be offset is determined, and the offset is applied to that region, or a method may be used in which the offset is applied by considering the edge information of each pixel. Adaptive Loop Filtering (ALF) may be performed based on a value obtained by comparing the filtered restored image with the original image. After dividing the pixels included in the image into a predetermined group, a filter to be applied to that group is determined, and filtering may be performed differentially for each group.
[0064] The memory (155) can store a restored block or picture produced through the filter unit (150), and the stored restored block or picture can be provided to the prediction unit (120, 125) when performing inter-prediction.
[0065] FIG. 2 is a block diagram showing an image decoding device according to the present invention.
[0066] Referring to FIG. 2, the image decoder (200) may include an entropy decoder (210), a reordering unit (215), an inverse quantization unit (220), an inverse transformation unit (225), a prediction unit (230, 235), a filter unit (240), and a memory (245).
[0067] When a video bitstream is input to a video encoder, the input bitstream can be decoded using the reverse procedure of the video encoder.
[0068] The entropy decoding unit (210) can perform entropy decoding in the opposite procedure to that which the entropy encoding unit of the image encoder performed. For example, various methods such as Exponential Golomb, CAVLC (Context-Adaptive Variable Length Coding), and CABAC (Context-Adaptive Binary Arithmetic Coding) can be applied in correspondence with the method performed in the image encoder.
[0069] The entropy decoding unit (210) can decode information related to intra-prediction and inter-prediction performed in the encoder.
[0070] The reordering unit (215) can perform reordering based on the method of reordering the entropy-decoded bitstream in the encoding unit in the entropy decoding unit (210). The coefficients expressed in the form of a one-dimensional vector can be reordered by restoring them to the form of two-dimensional block coefficients.
[0071] The inverse quantization unit (220) can perform inverse quantization based on the coefficient values of the rearranged block and the quantization parameters provided by the encoder.
[0072] The inverse transform unit (225) can perform inverse transforms, i.e., inverse DCT, inverse DST, and inverse KLT, on the transforms, i.e., DCT, DST, and KLT, performed by the transform unit on the quantization result performed by the image encoder. The inverse transform can be performed based on the transmission unit determined by the image encoder. In the inverse transform unit (225) of the image decoder, a transformation technique (e.g., DCT, DST, KLT) can be selectively performed according to multiple pieces of information such as a prediction method, the size of the current block, and the prediction direction.
[0073] The prediction unit (230, 235) can generate a prediction block based on the prediction block generation information provided by the entropy decoding unit (210) and the previously decoded block or picture information provided by the memory (245).
[0074] As described above, when performing intra prediction or intra-frame prediction identical to the operation in the video encoder, if the size of the prediction unit and the size of the transform unit are the same, intra prediction for the prediction unit is performed based on the pixels to the left of the prediction unit, the pixels to the top left, and the pixels to the top; however, if the size of the prediction unit and the size of the transform unit are different when performing intra prediction, intra prediction can be performed using reference pixels based on the transform unit. Additionally, intra prediction using NxN partitioning only for the minimum encoding unit may also be used.
[0075] The prediction unit (230, 235) may include a prediction unit determination unit, an inter prediction unit, and an intra prediction unit. The prediction unit determination unit receives various information, such as prediction unit information input from the entropy decoding unit (210), prediction mode information of the intra prediction method, and motion prediction related information of the inter prediction method, distinguishes the prediction unit in the current encoding unit, and determines whether the prediction unit performs inter prediction or intra prediction.
[0076] In addition, when applying the block merge technology of the present invention described above, a method of using a merge estimation region (MER) considering parallel processing when merging and using movement information of spatially or temporally adjacent blocks of the current block can be applied to the prediction unit (230, 235). That is, the present invention can utilize a parallel estimation region (PER) to configure spatially or temporally adjacent blocks of the current block by considering parallel processing in prediction technologies such as inter-frame prediction, intra-frame prediction, and inter-component prediction among video coding technologies.
[0077] The inter prediction unit (230) can perform inter prediction for the current prediction unit based on information included in at least one picture, either a previous picture or a subsequent picture, of the current picture containing the current prediction unit, using information required for inter prediction of the current prediction unit provided by the video encoder. To perform inter prediction, it can determine whether the motion prediction method of the prediction unit included in the corresponding encoding unit is a Skip Mode, Merge Mode, AMVP Mode, or Intra Block Copy Mode based on the encoding unit.
[0078] The intra prediction unit (235) can generate a prediction block based on pixel information within the current picture. If the prediction unit is a prediction unit that has performed intra prediction, it can perform intra prediction based on the intra prediction mode information of the prediction unit provided by the image encoder. The intra prediction unit (235) may include an Adaptive Intra Smoothing (AIS) filter, a reference pixel interpolation unit, and a DC filter. The AIS filter is a part that performs filtering on the reference pixel of the current block, and can determine whether to apply the filter based on the prediction mode of the current prediction unit. AIS filtering can be performed on the reference pixel of the current block using the prediction mode of the prediction unit and the AIS filter information provided by the image encoder. If the prediction mode of the current block is a mode that does not perform AIS filtering, the AIS filter may not be applied.
[0079] The reference pixel interpolation unit can generate a reference pixel of an integer value or less by interpolating the reference pixel when the prediction mode of the prediction unit is a prediction unit that performs intra-prediction based on the pixel value interpolated from the reference pixel. If 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 can generate a prediction block through filtering when the prediction mode of the current block is DC mode.
[0080] The restored block or picture may be provided to a filter unit (240). The filter unit (240) may include a deblocking filter, an offset correction unit, and an ALF.
[0081] Information regarding whether a deblocking filter has been applied to the corresponding block or picture can be received from the video encoder, and if a deblocking filter has been applied, information regarding whether a strong filter or a weak filter has been applied. The deblocking filter of the video decoder receives information related to the deblocking filter provided by the video encoder and can perform deblocking filtering on the corresponding block.
[0082] The offset correction unit can perform offset correction on the restored image based on the type of offset correction and offset value information applied to the image during encoding. ALF can be applied to the encoding unit based on information on whether ALF is applied and ALF coefficient information provided by the encoder. This ALF information can be provided included in a specific parameter set.
[0083] The memory (245) can store the restored picture or block so that it can be used as a reference picture or reference block, and can also provide the restored picture to the output unit.
[0084] FIG. 3 illustrates an image decoding method performed in an image decoding device according to the present disclosure.
[0085] Referring to FIG. 3, the transformation coefficients of the current block can be derived (S300).
[0086] The transformation coefficients of the current block can be derived by decoding the residual information signaled through the bitstream. The transformation coefficients may also be referred to as transformation coefficient level values.
[0087] The conversion coefficients of the current block can be derived from a 1-bit flag signaled through the bitstream. Here, the flag can indicate whether there is at least one non-zero conversion coefficient in the current block. For example, if the value of the flag is 1, it may indicate that there is at least one non-zero conversion coefficient in the current block. Therefore, based on the flag value being 1, conversion coefficients for the current block can be derived. On the other hand, if the value of the flag is 0, it may indicate that there is no non-zero conversion coefficient in the current block. Therefore, based on the flag value being 0, the derivation process of conversion coefficients and conversion kernels for the current block may be omitted.
[0088] The transformation coefficients of the current block can be derived based on at least one of the position of the first non-zero transformation coefficient in the scan order (hereinafter referred to as the start position (SP)) or the position of the last non-zero transformation coefficient in the scan order (hereinafter referred to as the last position (EP)).
[0089] The starting position can be derived based on SP information indicating the starting position within the current block. SP information can be signaled via a bitstream. The ending position can be derived based on EP information indicating the ending position within the current block. EP information can be signaled via a bitstream.
[0090] At least one of the start position or the end position may be determined based on whether the current block is a transform skip block. For example, if the current block is a transform skip block (i.e., if the transform is skipped for the vertical and horizontal directions of the current block), the start position may be determined based on SP information signaled through the bitstream, and the end position may be determined to the last position in the scan order within the current block. If the current block is not a transform skip block, the start position may be determined to the top-left position of the current block (i.e., the (0, 0) position), and the end position may be determined based on EP information signaled through the bitstream.
[0091] The scan order may be pre-defined in the video encoding / decoding device. The scan order may be determined based on a transform kernel for the inverse transformation of the current block. Here, the transform kernel may be a transform kernel for the first inverse transformation or a transform kernel for the second inverse transformation.
[0092] For example, if the transformation kernel of the current block corresponds to a transformation skip in the horizontal and vertical directions, the first scan sequence of FIG. 4 may be used. If the transformation kernel of the current block corresponds to a transformation in the horizontal and vertical directions, the first scan sequence of FIG. 4 may be used. If the transformation kernel of the current block corresponds to a transformation skip in the horizontal direction and a transformation in the vertical direction, the second scan sequence of FIG. 4 may be used. If the transformation kernel of the current block corresponds to a transformation skip in the vertical direction and a transformation in the horizontal direction, the third scan sequence of FIG. 4 may be used. The first to third scan sequences of FIG. 4 may be a scan sequence from the top left to the bottom right.
[0093] Alternatively, if the transformation kernel of the current block corresponds to a transformation kernel in which transformation is skipped for the horizontal and vertical directions, the first scan sequence of FIG. 5 may be used. If the transformation kernel of the current block corresponds to a transformation kernel in which transformation is not skipped for the horizontal and vertical directions, the first scan sequence of FIG. 5 may be used. If the transformation kernel of the current block corresponds to a transformation kernel in which transformation is skipped for the horizontal direction but not for the vertical direction, the second scan sequence of FIG. 5 may be used. If the transformation kernel of the current block corresponds to a transformation kernel in which transformation is skipped for the vertical direction but not for the horizontal direction, the third scan sequence of FIG. 5 may be used. The first to third scan sequences of FIG. 5 may be a scan sequence from the bottom right to the top left.
[0094] If transformations are not skipped for the vertical and horizontal directions of the current block, the transformation coefficients of the current block can be derived. In this case, the transformation coefficients from the starting position to the last position of the current block can be decoded. The transformation coefficients can be decoded by separating them into a sign and an absolute value, and the absolute value can be decoded based on multiple syntax elements.
[0095] For example, as shown in FIG. 6, the absolute value can be decoded based on at least one of a base level value or a residual level (HR) value. Here, the base level value can be decoded based on M-ary arithmetic coding, and the residual level value can be decoded based on a truncated-rice-based variable-length code (VLC).
[0096] The transformation coefficients of the current block can be derived based on a predetermined order.
[0097] Specifically, base level values from the last position to the starting position within the current block can be signaled to the video sub / decoding device in a pre-defined order.
[0098] The base level value can be decoded based on L syntax elements as shown in the following mathematical formula 1. In this case, B i represents an integer greater than 0 and can satisfy mathematical equation 2.
[0099]
[0100]
[0101] The decoding process for the base level value at a specific location can be as follows.
[0102] After c0 is signaled, the base level value of the current position can be initialized to c0.
[0103] If the base level value is less than B0, decoding for that base level value can be terminated. If the base level value is B0, c1 can be additionally signaled. The signaled c1 can be added to the base level value. If the base level value is less than (B0+B1), decoding for that base level value can be terminated. If the base level value is (B0+B1), c2 can be additionally signaled.
[0104] Through the aforementioned process, up to L c i Decoding of the base-level value can be performed based on . Finally, the signaled c L-1 This B L-1 In the same case as (i.e., c L-1 (If the base level value decoded through decoding is K), the remaining level value can be additionally signaled through bypass coding.
[0105] When the position of the last non-zero transform factor (i.e., the last position) in the scan order from the top left to the bottom right is signaled, the base level value of the last position can always be greater than or equal to 1. Accordingly, the video encoding device can signal a value obtained by subtracting 1 from the base level value of the last position. The video decoder can use a value obtained by adding 1 to the signaled value as the base level value of the last position.
[0106] When a base level value is signaled based on multiple syntax elements, the video encoding device can signal a value obtained by subtracting 1 from the first encoded base level value as a syntax element (c0). The video decoder can use a value obtained by adding 1 to the signaled syntax element (c0) as the base level value.
[0107] Syntax element (c) based on the position of the signaled transformation coefficient i The range of values that ) can have can be determined. For example, depending on the position of the conversion coefficient, the current block can be divided into a low-frequency region (first region) and a remaining region (second region). The range decoded through the base level value in the first region may be larger than the range decoded through the base level value in the second region.
[0108] The first region can be determined based on the transformation type of the current block.
[0109] For example, if the transformation type of the current block is the first transformation type, the first region may be defined as a region where the sum of the x-coordinates and y-coordinates of the transformation coefficients is smaller than the threshold value (T1). Here, the first transformation type may mean a type of transformation kernel in which the transformation is skipped for the vertical and horizontal directions. Alternatively, the first transformation type may mean a type of transformation kernel in which the transformation is not skipped for the vertical and horizontal directions.
[0110] If the transformation type of the current block is the second transformation type, the first region can be defined as a region where the y-coordinate of the transformation coefficient is smaller than the threshold value (T2). Here, the second transformation type may mean a type of transformation kernel in which the transformation is skipped in the horizontal direction but not in the vertical direction.
[0111] If the transformation type of the current block is a third transformation type, the first region can be defined as a region where the x-coordinate of the transformation coefficient is smaller than the threshold value (T3). Here, the third transformation type may refer to a type of transformation kernel in which the transformation is skipped in the vertical direction but not in the horizontal direction.
[0112] FIG. 7 illustrates an embodiment in which T1 is 4, and T2 and T3 are 2. When dividing the current block into multiple regions, a different threshold value may be applied to the chrominance component block than to the luminance component block. For example, a threshold value smaller than that of the luminance component block may be applied to the chrominance component block. Additionally, the current block may be divided into three or more regions, and a range to be decoded into a base level value may be determined for each region.
[0113] Parity hiding may be applied when decoding base-level values. Parity hiding may be a technique in which the video decoder implicitly derives the parity value of a base-level value at a specific position without transmitting it by adjusting the sum of the absolute values of N base-level values according to the encoding order of the transform coefficients in the video encoding device.
[0114] Parity hiding may be applied based on at least one of whether parity hiding is used / allowed or whether the current block is a lossless compressed block.
[0115] For example, parity hiding can be applied when a flag at a higher level indicates that parity hiding is used / allowed and the current block is not a lossless compressed block.
[0116] At the frame level (or picture level), the Allow Parity Hiding flag may be signaled. The Allow Parity Hiding flag may indicate whether parity hiding is allowed for the current frame (or current picture). For example, if the value of the Allow Parity Hiding flag is 1, it may indicate that parity hiding is allowed for the current frame. Conversely, if the value of the Allow Parity Hiding flag is 0, it may indicate that parity hiding is not allowed for the current frame.
[0117] The parity hiding allow flag is not signaled through the bitstream and can be induced to a value of 0 if a predetermined condition is satisfied. Here, the predetermined condition may include at least one of the following conditions 1 to 3.
[0118] (Condition 1) The current frame corresponds to a lossless compressed frame.
[0119] (Condition 2) The parity hiding allow flag signaled at a higher level (e.g., sequence) is 0. This may be the case where the parity hiding allow flag signaled at a level higher than the frame indicates that parity hiding is not allowed.
[0120] (Condition 3) TCQ (trellis-coded quantization) is performed in the current frame.
[0121] The Allow Parity Hiding flag of Condition 2 may be signaled only when 1) no TCQ is applied to the current sequence or 2) TCQ is applied only to keyframes or ALTREF frames. In other cases, the value of the Allow Parity Hiding flag may be implicitly derived to 0, which determines that parity hiding is not allowed. That is, parity hiding techniques may be restricted from being used when TCQ is applied to all frames in the sequence.
[0122] Parity hiding can be applied only when the position of the last non-zero transformation factor in the scan order within the current block (i.e., the last position) is greater than a specific threshold.
[0123] Whether to apply parity hiding can be determined based on the transformation kernel of the current block.
[0124] One parity hiding may be performed per transformation block. In this case, decoding for base-level values may be performed starting from the last position according to the decoding order of the transformation coefficients. The number of non-zero base-level values up to the starting position within the current block may be counted. If the count is greater than or equal to a threshold, the parity value for the base-level value at the starting position (i.e., position (0, 0)) may be implicitly derived.
[0125] The parity value of the starting position can be derived based on the sum of the absolute values of non-zero base level values through the operation of the following mathematical formula 3.
[0126]
[0127] When parity hiding is applied, the transform factor at the start position can be derived by multiplying the signaled transform factor by 2 and adding an implicitly derived parity value. To this end, the video encoding device can signal a value obtained by dividing the transform factor at the start position by 2.
[0128] Multiple parity hiding may be performed per transformation block.
[0129] Parity hiding for multiple transformation coefficients can be performed for a single transformation block.
[0130] For the second or third transformation type among the aforementioned transformation types, multiple parity hiding may be performed.
[0131] Candidate locations where parity hiding can be performed can be determined based on the transformation type. For example, as shown in FIG. 8, if the transformation type of the current block corresponds to a second transformation type, the candidate locations where parity hiding can be performed may be located in the topmost sample line within the current block. Alternatively, if the transformation type of the current block corresponds to a third transformation type, the candidate locations where parity hiding can be performed may be located in the leftmost sample line within the current block.
[0132] Depending on the decoding order of the base level values, non-zero base level values may be decoded starting from the position of the last non-zero transform factor (i.e., the last position) in the scan order within the current block. The number of decoded non-zero base level values can be counted, and the sum of the absolute values of the corresponding base level values can be calculated. At this time, if the number of non-zero base level values becomes equal to a pre-defined threshold in the image sub / decoding device, a parity value can be derived based on the sum of the absolute values. The order of the positions in which the parity value is derived can be from top to bottom or from bottom to top.
[0133] FIG. 9 shows an embodiment in which multiple parity hidings are performed.
[0134] In the corresponding embodiment, the threshold value is 4, and the order of the positions where the parity value is derived is from top to bottom.
[0135] Referring to FIG. 9, the number of non-zero base level values can be counted. When the counted number becomes equal to a threshold value, a parity value can be implicitly derived based on the sum of the absolute values of the non-zero base level values of that number (i.e., 4). The derived parity value may be for the non-zero base level value of the last counted position.
[0136] There may be cases where the number of remaining level coding positions is smaller than the threshold based on the position where the counted number becomes equal to the threshold. In this case, the sum of the absolute values of the number of non-zero base level values corresponding to the threshold and the non-zero base level values of the remaining level coding positions can be calculated, and a parity value can be implicitly derived based on the sum of the absolute values. Here, the derived parity value may be for the base level value that is last decoded among the non-zero base level values of the remaining level coding positions.
[0137] Alternatively, even if the number of remaining level-coding positions is smaller than the threshold based on the position where the counted number becomes equal to the threshold, a parity value may be implicitly derived based on the sum of the absolute values of the non-zero base-level values corresponding to the threshold. In this case, the derived parity value may be for the non-zero base-level value of the last counted position, or it may be for the base-level value that is last decoded among the non-zero base-level values of the remaining level-coding positions.
[0138] The embodiment of FIG. 9 may be applied to the second conversion type described above. However, this is merely an example and may be applied to other conversion types.
[0139] FIG. 10 shows an embodiment in which multiple parity hidings are performed.
[0140] In the corresponding embodiment, the threshold value is 4, and the order of the positions where the parity value is derived is from left to right.
[0141] Referring to FIG. 10, the number of non-zero base level values can be counted. When the counted number becomes equal to a threshold value, a parity value can be implicitly derived based on the sum of the absolute values of the non-zero base level values of that number (i.e., 4). The derived parity value may be for the non-zero base level value of the last counted position.
[0142] There may be cases where the number of remaining level coding positions is smaller than the threshold based on the position where the counted number becomes equal to the threshold. In this case, the sum of the absolute values of the number of non-zero base level values corresponding to the threshold and the non-zero base level values of the remaining level coding positions can be calculated, and a parity value can be implicitly derived based on the sum of the absolute values. Here, the derived parity value may be for the base level value that is last decoded among the non-zero base level values of the remaining level coding positions.
[0143] Alternatively, even if the number of remaining level-coding positions is smaller than the threshold based on the position where the counted number becomes equal to the threshold, a parity value may be implicitly derived based on the sum of the absolute values of the non-zero base-level values corresponding to the threshold. In this case, the derived parity value may be for the non-zero base-level value of the last counted position, or it may be for the base-level value that is last decoded among the non-zero base-level values of the remaining level-coding positions.
[0144] The embodiment of FIG. 10 may be applied to the aforementioned third conversion type. However, this is merely an example and may be applied to other conversion types.
[0145] Whether multiple parity hiding is applied can be determined based on at least one of the conversion kernel, the size of the current block, the upper-level flag, or the last position (EP) within the current block.
[0146] Parity hiding may also be applied to the first transformation type. Non-zero base level values may be decoded starting from the position of the last non-zero transformation factor (i.e., the last position) in the scan order within the current block. At this time, the number of non-zero base level values being decoded can be counted, and the sum of the absolute values of the base level values can be calculated. When the number of non-zero base level values becomes equal to a pre-defined threshold in the image sub / decoding device, a single parity value can be implicitly derived based on the sum of the absolute values.
[0147] The location where the parity value is derived can be determined as a pre-defined location in the image sub / decoding device. The location where the parity value is derived can be determined based on parameters regarding the current block. The parameters may include at least one of a prediction mode, an intra-prediction mode, or a block size.
[0148] For example, as shown in FIG. 11, a parity hiding candidate location may be the top-left area of the current block (i.e., the area close to the DC component).
[0149] Alternatively, when a number of non-zero base level values corresponding to a threshold is decoded, a parity value may be implicitly derived for the position of the next non-zero base level value. This may be referred to as sequential parity hiding, which will be examined with reference to FIG. 12.
[0150] FIG. 12 illustrates an example of sequential parity hiding having a threshold of 4.
[0151] When sequential parity hiding is used, decoding can be performed based on the same syntax and context for the base-level values at locations where parity hiding is applied and at locations where parity hiding is not applied.
[0152] The base level value at the location where sequential parity hiding is applied can be derived by multiplying the value decoded based on the existing syntax and context by 2, and adding a parity value derived based on the sum of the absolute values of the base level values decoded up to that point.
[0153] However, this is merely an example, and the threshold value may be set to a value other than 4, or determined based on the size of the current block.
[0154] After a non-zero base level value for the current block is decrypted, the code information for the base level value can be signaled. Additionally, if the decrypted base level value is equal to the maximum base level value, the residual level (HR) value can be decrypted.
[0155] Code information can be decoded based on bypass coding. Code information can be decoded based on context. For example, the context of a code for a DC region within the current block can be determined based on the code of a previously decoded surrounding base-level value. Based on this context, a code for a DC region within the current block can be derived. Here, the DC region can be defined according to a transformation type as shown in FIG. 13.
[0156] Decoding of residual level values can be performed based on truncated-rice coding. Parameters for truncated-rice coding can be determined based on the average or moving average of previously decoded residual level values.
[0157] Decoding of the residual level value can be performed through the following process.
[0158] The remaining level value is 2 m It can be encoded / decoded by dividing into a quotient (q) and a remainder (r). The value of q can be encoded / decoded through variable-length coding, such as unary coding. In this case, q is q max In the case equivalent to , k-order Exponential Golomb coding can be performed on the remainder (r). q max can mean the maximum value of q. q is q max If it is smaller, the remainder (r) can be encoded / decoded using m-bit fixed-length coding.
[0159] Parameters used in truncated-rice coding (q max , k, m) can be determined as shown in Table 1 below.
[0160] if (a < th0) m = k0else if (a < th1) m = k1...else if (a < th N-2 ) m = k N-2 else m = k N-1
[0161] In Table 1, th0 to th N-1 is a threshold value for deriving parameter m, and may be pre-defined in a threshold table. In Table 1, th i wa k i can be a positive integer and can be determined by an agreement between the video sub / decoding device.
[0162] parameter q max The value of can be derived based on the parameter m. For example, q max The value of can be derived as in mathematical equation 4.
[0163]
[0164] The value of the parameter k can be derived based on the parameter m. For example, the value of k can be derived as in Equation 5.
[0165]
[0166] In mathematical formulas 4 and 5, l0, l1, and l2 can be integers greater than or equal to 0 and can be determined by an agreement between the image sub / decoding device.
[0167] In Table 1, a may represent the (moving) average value of the residual level value decoded immediately prior. That is, parameters for truncated-rice coding can be determined based on the previously decoded residual level value.
[0168] Depending on whether the current block is a transform skip block where transformations are skipped for vertical and horizontal directions, l0, l1, l2, th i , or k i At least one of them may differ. That is, based on the transformation kernel of the current block, the threshold table and the parameter for determining the interval of the m value may differ.
[0169] For the base level value (or transform factor) at the location where parity hiding is applied, the final residual level value can be derived by multiplying the signaled residual level value by 2. To this end, the video encoding device can signal a value obtained by dividing the encoded residual level value by 2. At this time, a parameter can be determined based on a value obtained by dividing the value of a (i.e., the average value or moving average value) by 2.
[0170] Parity hiding can be applied to transform skip blocks where transformations are skipped for vertical and horizontal directions.
[0171] In the process of decoding base-level values according to the decoding order of transform coefficients for a transform skip block, when a number of non-zero base-level values corresponding to a threshold are decoded, sequential parity hiding may be applied to implicitly induce parity at the location where the next non-zero base-level value is decoded. Through this, multiple parity hiding may be applied to a single transform skip block.
[0172] A transformation factor can be derived based on the decoded base level value and the residual level value. For example, the transformation factor can be derived by adding an implicitly derived parity to the base level value and the residual level value multiplied by 2. Here, the parity can be derived based on the sum of the absolute values of the previously decoded base level values.
[0173] If the current block is a transformation skip block, parity hiding may be applied to the transformation coefficient at the start position (SP) within the current block. In this case, the transformation coefficient at the start position may be derived based on at least one of a first value based on a signaled base level value, a second value based on a residual level value, or an implicitly derived parity value.
[0174] For example, the transformation coefficient of the starting position can be derived by adding a first value, a second value, and a parity value. Here, the first value may be a value derived by adding 1 to the signaled base level value and multiplying it by 2. The second value may be a value derived by multiplying the residual level value by 2. To this end, the video encoding device may signal the base level value and the residual level value by dividing the value obtained by subtracting 1 from the transformation coefficient of the starting position by 2.
[0175] For the conversion skip block, parity hiding may be applied to the location where the last non-zero base level value is decoded.
[0176] If the current block is a transform skip block, whether parity hiding is applied to the current block may be determined based on at least one of the prediction mode or size of the current block. A threshold for the current block may be determined based on at least one of the prediction mode or size of the current block.
[0177] Referring to FIG. 3, residual samples of the current block can be derived based on the transformation coefficients of the current block (S310).
[0178] If the current block is not a transform skip block, residual samples of the current block can be derived based on the inverse quantization and inverse transform of the transform coefficients of the current block.
[0179] The transformation kernel for the above inverse transformation can be determined based on the coding parameters of the current block. The coding parameters may include at least one of size, prediction mode, color space type (luminance or chrominance, etc.), or segment type.
[0180] A transformation kernel may consist of a vertical transformation kernel (i.e., a vertical transformation kernel) and a horizontal transformation kernel (i.e., a horizontal transformation kernel). In this case, the vertical and horizontal transformation kernels can be determined based on a single index signaled through the bitstream. The index may specify any one of a plurality of transformation kernels.
[0181] Alternatively, an index for specifying a transformation kernel may be signaled for the vertical and horizontal directions of the current block, respectively. That is, a first index for specifying a vertical transformation kernel and a second index for specifying a horizontal transformation kernel may be signaled, respectively. Based on the first and second indices, the vertical and horizontal transformation kernels of the current block can be determined, respectively.
[0182] A transformation kernel in which transformations are skipped for vertical and horizontal directions (i.e., a transformation skip kernel) may be included in the aforementioned plurality of transformation kernels.
[0183] Whether the current block is a transformation skip block can be determined based on the transformation kernel of the current block. If the transformation kernel of the current block corresponds to a transformation skip kernel, an inverse transformation may not be performed on the current block. If the transformation kernel of the current block does not correspond to a transformation skip kernel, an inverse transformation may be performed on at least one of the vertical or horizontal directions of the current block.
[0184] Alternatively, whether the current block is a transform skip block can be determined based on a 1-bit transform skip flag. The transform skip flag can indicate whether the current block is a transform skip block. The transform skip flag can be signaled through the bitstream. The transform skip flag can be signaled before the index for specifying the transform kernel is signaled.
[0185] The inverse transformation according to the present disclosure may include at least one of a first transformation or a second transformation. If the transformation kernel for the first transformation (hereinafter referred to as the first transformation kernel) is not a transformation skip kernel, it may be determined whether the transformation kernel for the second transformation (hereinafter referred to as the second transformation kernel) is signaled.
[0186] Whether a second conversion kernel is signaled can be determined based on at least one of the color space type of the current block (luminance or chrominance), the prediction mode of the current block (intra mode or inter mode), a second conversion allow / apply flag signaled at the upper level, the start position (SP) within the current block, the end position (EP) within the current block, whether the current block is a conversion skip block, or the segment type to which the current block belongs (e.g., whether the segment is skipped).
[0187] For example, if the current block is a block encoded in intra mode, a secondary transformation kernel may be signaled only when the last position (EP) within the current block is greater than a first threshold. For example, the first threshold may be 1.
[0188] If the current block is a block encoded in inter mode, the second transformation kernel can be signaled only when the last position (EP) in the current block is greater than the second threshold. For example, the second threshold can be 3.
[0189] A second-order conversion kernel can be signaled only when the color space type of the current block is the luminance component.
[0190] If the segment to which the current block belongs is a segment encoded in skip mode, the signaling of the second conversion kernel may be omitted.
[0191] If the current block is a transform skip block, inversely quantized transform coefficients can be derived based on the inverse quantization of the transform coefficients of the current block. Residual samples of the current block can be derived based on the inversely quantized transform coefficients.
[0192] Referring to FIG. 3, the current block can be restored based on the residual samples of the current block (S320).
[0193] The current block can be reconstructed based on the predicted samples and residual samples of the current block. Here, the predicted samples can be derived based on intra-mode or inter-mode.
[0194] The image encoding method performed in the image encoding device can be understood as the inverse process of the aforementioned image decoding method. That is, residual samples can be derived based on the predicted samples of the current block, and transform coefficients of the current block can be derived based on at least one of transform or quantization of the residual samples. Residual information can be determined by encoding the derived transform coefficients, and a bitstream containing the residual information can be generated. In particular, the process of deriving the transform coefficients and the process of encoding the transform coefficients can be understood as the inverse process of the decoding process examined with reference to FIG. 3, so a detailed explanation is omitted here.
[0195] FIG. 14 illustrates an image encoding method performed in an image encoding device according to the present disclosure.
[0196] Referring to FIG. 14, residual samples of the current block can be derived (S1400).
[0197] Predicted samples of the current block can be derived based on a predetermined prediction mode, and residual samples of the current block can be derived based on the derived predicted samples.
[0198] Referring to FIG. 14, the transformation coefficients of the current block can be derived based on at least one of transformation or quantization of residual samples (S1410).
[0199] The derivation process of the transformation coefficients can be understood as the inverse process of the decoding process examined with reference to Figure 3, so a detailed explanation is omitted here.
[0200] Referring to FIG. 14, a bitstream can be generated by encoding the conversion coefficients of the current block (S1420).
[0201] The derived transformation coefficients can be encoded to determine residual information and generate a bitstream containing residual information. The encoding process of the transformation coefficients can be understood as the inverse process of the decoding process examined with reference to Fig. 3, so a detailed explanation is omitted here.
[0202] The various embodiments of the present disclosure are not intended to list all possible combinations but to describe representative aspects of the present disclosure, and the matters described in the various embodiments may be applied independently or in combination of two or more.
[0203] In addition, various embodiments of the present disclosure may be implemented by hardware, firmware, software, or a combination thereof. In the case of implementation by hardware, it may be implemented by one or more ASICs (Application Specific Integrated Circuits), DSPs (Digital Signal Processors), DSPDs (Digital Signal Processing Devices), PLDs (Programmable Logic Devices), FPGAs (Field Programmable Gate Arrays), general processors, controllers, microcontrollers, microprocessors, etc.
[0204] The scope of the present disclosure includes software or machine-executable instructions (e.g., operating system, application, firmware, program, etc.) that enable an operation according to a method of various embodiments to be executed on a device or computer, and a non-transitory computer-readable medium on which such software or instructions, etc. are stored and executable on a device or computer.
Claims
Step of deriving the transformation coefficients of the current block; A step of deriving residual samples of the current block based on the above transformation coefficients; and The method includes the step of restoring the current block based on the above residual samples, The above transformation coefficients are derived based on at least one of the starting position or the last position within the current block, and An image decoding method in which the above-mentioned starting position is the position of the first non-zero transformation coefficient in the scan order, and the above-mentioned last position is the position of the last non-zero transformation coefficient in the scan order. In paragraph 1, An image decoding method in which at least one of the above-mentioned starting position or the above-mentioned last position is determined based on whether the current block is a conversion skip block. In paragraph 1, An image decoding method in which the above scan order is determined based on a transformation kernel for the inverse transformation of the above current block. In paragraph 1, The above current block is divided into a first region corresponding to a low-frequency region and a second region corresponding to the remaining region excluding the low-frequency region, and An image decoding method in which the first region is determined based on the conversion kernel of the current block. In paragraph 1, The transformation coefficient of the current block above is derived based on the absolute value of the transformation coefficient and the sign of the transformation coefficient, and An image decoding method in which the above absolute value is decoded based on at least one of a base level value or a residual level value. In paragraph 5, An image decoding method in which the above base level value is decoded based on parity hiding. In paragraph 6, A video decoding method in which the above parity hiding is applied based on at least one of a parity hiding allow flag indicating whether parity hiding is allowed or whether the current block is a lossless compressed block. In Paragraph 7, A video decoding method in which, if certain conditions are satisfied, the parity hiding allow flag is not signaled through the bitstream and is derived to a value of 0. In paragraph 6, The above parity hiding is applied when the last position within the current block is greater than a specific threshold, in an image decoding method. In paragraph 6, An image decoding method in which whether the above parity hiding is applied is determined based on the transformation kernel of the current block. In Paragraph 10, A video decoding method in which, if the number of non-zero base level values up to the starting position within the current block is greater than or equal to a threshold value, a parity value for the base level value of the starting position is implicitly derived. In Paragraph 10, An image decoding method in which a parity value is derived based on the sum of the absolute values of the decoded non-zero base level values when the number of non-zero base level values decoded from the last position in the current block becomes equal to a threshold value. Step of deriving residual samples of the current block; A step of deriving transformation coefficients of the current block from the above residual samples; and The method includes the step of encoding the above conversion coefficients to generate a bitstream, The above transformation coefficients are encoded based on at least one of the start position or the end position within the current block, and An image encoding method in which the above-mentioned starting position is the position of the first non-zero conversion factor in the scan order, and the above-mentioned last position is the position of the last non-zero conversion factor in the scan order. A non-transient computer-readable storage medium for storing a bitstream generated by the image encoding method of claim 13. A transmission method for transmitting a bitstream generated by the image encoding method of claim 13.