Video encoding and decoding device and method

The method and device for video encoding and decoding improve the quality of high-resolution video by employing adaptive filtering algorithms based on filtering parameter ranges, addressing the limitations of fixed block size encoding methods in existing codecs.

WO2025143615A1PCT designated stage expired Publication Date: 2025-07-03SAMSUNG ELECTRONICS CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/KR2024/019697
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-26
Filing Date
2024-12-04
Publication Date
2025-07-03

AI Technical Summary

Technical Problem

Existing video codecs struggle with effectively encoding and decoding high-resolution or high-definition video content due to limitations in encoding methods based on fixed block sizes, leading to errors during the encoding and decoding processes.

Method used

Implementing a method and device for image encoding and decoding that utilize filtering algorithms by determining filtering parameter values and indices based on specific ranges, allowing for improved filtering of current blocks through a bitstream, including the use of deblocking, CDEF, and loop restoration filters.

Benefits of technology

This approach reduces errors in the encoding and decoding processes, enhancing the quality of high-resolution video content by effectively filtering and restoring images using adaptive filtering techniques.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure KR2024019697_03072025_PF_FP_ABST
    Figure KR2024019697_03072025_PF_FP_ABST
Patent Text Reader

Abstract

This image decoding method comprises the steps of: acquiring, from a bitstream, information about a first filtering index and a second filtering index used for filtering the current block in the current image; determining a first filtering parameter value on the basis of a range to which the first filtering parameter value indicated by the first filtering index belongs; determining a second filtering parameter value on the basis of a range to which the second filtering parameter value indicated by the second filtering index belongs; and acquiring a filtered block for the current block by filtering the current block by using the determined first filtering parameter value and the determined second filtering parameter value.
Need to check novelty before this filing date? Find Prior Art

Description

Video encoding and decoding device and method

[0001] The present disclosure relates to encoding and decoding of images, and more particularly, to a device and method for encoding and decoding an image by filtering a current block included in the current image.

[0002] With the development and widespread adoption of hardware capable of playing and storing high-resolution or high-definition video content, the need for video codecs capable of effectively encoding or decoding such content is increasing. Conventional video codecs encode video using a limited encoding method based on blocks of a predetermined size.

[0003] During the decoding process, the quantized transform coefficients of the residual block are dequantized and inversely transformed to generate residual samples of the residual block, and the prediction block generated through intra-prediction or inter-prediction is combined with the residual block to reconstruct the current block. The reconstructed current block can be processed using one or more filtering algorithms and then output. Using one or more filtering algorithms, errors occurring during the encoding and decoding of the image can be eliminated or reduced.

[0004] In one embodiment, a method for decoding an image may be provided. The method for decoding an image may include a step of obtaining, from a bitstream, information regarding a first filtering index and a second filtering index used to filter a current block in a current image. The method for decoding an image may include a step of determining a first filtering parameter value based on a range to which a first filtering parameter value indicated by the first filtering index belongs. The method for decoding an image may include a step of determining a second filtering parameter value based on a range to which a second filtering parameter value indicated by the second filtering index belongs. The method for decoding an image may include a step of filtering the current block using the determined first filtering parameter value and the determined second filtering parameter value, thereby obtaining a filtered block for the current block. The range to which the first filtering parameter value belongs may include one of a plurality of sections obtained by dividing the entire range to which the first filtering parameter value can belong. The range to which the second filtering parameter value belongs may include one of a plurality of sections obtained by dividing the entire range to which the second filtering parameter value can belong.

[0005] In one embodiment, an image decoding device may be provided, including at least one memory storing at least one instruction; and at least one processor operating according to the at least one instruction. The at least one processor may obtain, from a bitstream, information regarding a first filtering index and a second filtering index used to filter a current block in a current image. The at least one processor may determine a first filtering parameter value based on a range to which a first filtering parameter value indicated by the first filtering index belongs. The at least one processor may determine a second filtering parameter value based on a range to which a second filtering parameter value indicated by the second filtering index belongs. The at least one processor may obtain a filtered block for the current block by filtering the current block using the determined first filtering parameter value and the determined second filtering parameter value. The range to which the first filtering parameter value belongs may include one of a plurality of sections obtained by dividing the entire range to which the first filtering parameter value may belong. The range to which the second filtering parameter value belongs may include one of a plurality of intervals obtained by dividing the entire range to which the second filtering parameter value can belong.

[0006] In one embodiment, a video encoding method may be provided. The video encoding method may include a step of determining a first filtering parameter value and a second filtering parameter value used to filter a current block in a current video. The video encoding method may include a step of obtaining a first filtering index indicating a range to which the first filtering parameter value belongs, based on the first filtering parameter value. The video encoding method may include a step of obtaining a second filtering index indicating a range to which the second filtering parameter value belongs, based on the second filtering parameter value. The video encoding method may include a step of generating a bitstream including information about the first filtering index and the second filtering index. The range to which the first filtering parameter value belongs may include one of a plurality of sections obtained by dividing the entire range to which the first filtering parameter value can belong. The range to which the second filtering parameter value belongs may include one of a plurality of sections obtained by dividing the entire range to which the second filtering parameter value can belong.

[0007] In one embodiment, an image encoding device may be provided, including at least one memory storing at least one instruction; and at least one processor operating according to the at least one instruction. The at least one processor may determine a first filtering parameter value and a second filtering parameter value used to filter a current block in a current image. The at least one processor may obtain a first filtering index indicating a range to which the first filtering parameter value belongs based on the first filtering parameter value. The at least one processor may obtain a second filtering index indicating a range to which the second filtering parameter value belongs based on the second filtering parameter value. The at least one processor may generate a bitstream including information about the first filtering index and the second filtering index. The range to which the first filtering parameter value belongs may include one of a plurality of sections obtained by dividing the entire range to which the first filtering parameter value may belong, and the range to which the second filtering parameter value belongs may include one of a plurality of sections obtained by dividing the entire range to which the second filtering parameter value may belong.

[0008] In one embodiment, a computer-readable recording medium having a bitstream recorded thereon may be provided. The bitstream may include information regarding a first filtering index and a second filtering index. The first filtering index indicates a range to which a first filtering parameter value belongs, and the first filtering parameter value may be determined based on the range to which the first filtering parameter value belongs. The second filtering index indicates a range to which a second filtering parameter value belongs, and the second filtering parameter value may be determined based on the range to which the second filtering parameter value belongs. The range to which the first filtering parameter value belongs may include one of a plurality of sections obtained by dividing the entire range to which the first filtering parameter value may belong. The range to which the second filtering parameter value belongs may include one of a plurality of sections obtained by dividing the entire range to which the second filtering parameter value may belong.

[0009] FIG. 1a is a block diagram showing an image decoding device according to one embodiment of the present disclosure.

[0010] FIG. 1b is a block diagram showing an image decoding device according to one embodiment of the present disclosure.

[0011] FIG. 2A is a block diagram showing an image encoding device according to one embodiment of the present disclosure.

[0012] FIG. 2b is a block diagram showing an image encoding device according to one embodiment of the present disclosure.

[0013] FIG. 3 is a block diagram of an image encoding and decoding system that performs loop filtering according to one embodiment of the present disclosure.

[0014] FIG. 4 is a block diagram showing a loop filtering unit according to one embodiment of the present disclosure.

[0015] FIG. 5 is a flowchart illustrating a method for decoding an image according to one embodiment of the present disclosure.

[0016] FIG. 6 is a diagram illustrating graphs associated with a first mapping function and a second mapping function based on learning data according to one embodiment of the present disclosure.

[0017] FIG. 7 is a diagram illustrating graphs associated with a first mapping function and a second mapping function based on learning data according to one embodiment of the present disclosure.

[0018] FIG. 8 is a diagram illustrating graphs associated with a first lookup table and a second lookup table based on learning data according to one embodiment of the present disclosure.

[0019] FIG. 9 is a diagram associated with a first lookup table and a second lookup table based on learning data according to one embodiment of the present disclosure.

[0020] FIG. 10 is a diagram showing a graph of a first filtering parameter and a second filtering parameter according to one embodiment of the present disclosure.

[0021] FIG. 11 is a diagram associated with a first filtering index and a second filtering index according to one embodiment of the present disclosure.

[0022] FIG. 12 is a diagram illustrating an operation of filtering using a third filtering parameter or a fourth filtering parameter according to one embodiment of the present disclosure.

[0023] FIG. 13 is a flowchart illustrating a method for encoding an image according to one embodiment of the present disclosure.

[0024] The present disclosure may be subject to various modifications and embodiments. Specific embodiments are illustrated in the drawings and described in detail herein. However, this is not intended to limit the embodiments of the present disclosure, and it should be understood that the present disclosure encompasses all modifications, equivalents, and alternatives falling within the spirit and technical scope of the various embodiments.

[0025] The terms used in this specification have been selected from widely used, current terms, taking into account the functions of the present disclosure. However, these terms may vary depending on the intentions of engineers working in the relevant fields, precedents, the emergence of new technologies, etc. Furthermore, in certain cases, terms may be arbitrarily selected by the applicant, and in such cases, their meanings will be described in detail in the relevant description of the invention. Therefore, the terms used in this disclosure should not be defined simply as names, but rather based on the meanings of the terms and the overall content of the present disclosure.

[0026] In this specification, singular expressions include plural expressions unless the context clearly dictates otherwise. In describing the embodiments, detailed descriptions of related known technologies are omitted if they are deemed to unnecessarily obscure the gist of the present disclosure. Furthermore, numbers (e.g., "first," "second," etc.) used throughout the description of the specification are merely identifiers used to distinguish one component from another.

[0027] Additionally, in this specification, when a component is referred to as being “connected” or “connected” to another component, it should be understood that the component may be directly connected or connected to the other component, but may also be connected or connected via another component in between, unless there is a specific description to the contrary.

[0028] When a part of a specification is said to "include" a component, this does not mean that it excludes other components, but rather that it may include other components, unless otherwise stated.

[0029] In addition, components expressed as 'unit', 'module', etc. in this specification may be two or more components combined into one component, or one component may be divided into two or more components with more detailed functions. In addition, each component described below may additionally perform some or all of the functions performed by other components in addition to its own main function, and of course, some of the main functions performed by each component may be performed exclusively by other components.

[0030] Also, the term "part" used in the specification means a software or hardware component, and the "part" performs certain functions. However, the "part" is not limited to software or hardware. The "part" may be configured to reside on an addressable storage medium and may be configured to execute one or more processors. Thus, by way of example, the "part" includes components such as software components, object-oriented software components, class components, and task components, as well as processes, functions, attributes, procedures, subroutines, segments of program code, drivers, firmware, microcode, circuits, data, databases, data structures, tables, arrays, and variables. The functionality provided within the components and "parts" may be combined into a smaller number of components and "parts" or further separated into additional components and "parts."

[0031] In one embodiment of the present disclosure, a "unit" may be implemented as a processor and a memory. The term "processor" should be broadly interpreted to include a general-purpose processor, a central processing unit (CPU), a microprocessor, a digital signal processor (DSP), a controller, a microcontroller, a state machine, and the like. In some circumstances, a "processor" may also refer to an application-specific integrated circuit (ASIC), a programmable logic device (PLD), a field-programmable gate array (FPGA), and the like. The term "processor" may also refer to a combination of processing devices, such as, for example, a combination of a DSP and a microprocessor, a combination of multiple microprocessors, a combination of one or more microprocessors in conjunction with a DSP core, or any other such combination of configurations. The term "memory" should be broadly interpreted to include any electronic component capable of storing electronic information. The term memory may refer to various types of processor-readable media, such as random access memory (RAM), read-only memory (ROM), non-volatile random access memory (NVRAM), programmable read-only memory (PROM), erasable-programmable read-only memory (EPROM), electrically erasable PROM (EEPROM), flash memory, magnetic or optical data storage, registers, etc. Memory is said to be in electronic communication with the processor if the processor can read information from, and / or write information to, the memory. Memory integrated in a processor is in electronic communication with the processor.

[0032] In the present disclosure, 'image' may refer to a picture, a still image, a frame, a moving image composed of a plurality of consecutive still images, or a video.

[0033] In this disclosure, "sample" may refer to data assigned to a sampling location in an image and thus to be processed. For example, a pixel within a frame in a spatial domain may correspond to a sample. A unit containing multiple samples may be defined as a block.

[0034] In the present disclosure, a 'current block' may mean a unit including a plurality of samples in a current image processed by an image encoding device or an image decoding device, and may mean one of a maximum encoding unit, a transform block, a prediction block, and a loop restoration block.

[0035] FIG. 1a is a block diagram showing an image decoding device according to one embodiment of the present disclosure.

[0036] In one embodiment, the video decoding device (100) may include a bitstream acquisition unit (110) and a decoding unit (120). The bitstream acquisition unit (110) and the decoding unit (120) may include at least one processor. In addition, the bitstream acquisition unit (110) and the decoding unit (120) may include a memory (130) that stores commands to be executed by at least one processor (140).

[0037] In one embodiment, the bitstream acquisition unit (110) can receive a bitstream. The bitstream includes information that the image encoding device has encoded the image. In addition, the bitstream can be transmitted from the image encoding device. The image encoding device and the image decoding device can be connected by wire or wirelessly, and the bitstream acquisition unit (110) can receive the bitstream through wire or wirelessly. The bitstream acquisition unit (110) can receive the bitstream from a storage medium such as an optical medium, a hard disk, etc. The decoding unit (120) can restore the image based on information obtained from the received bitstream. The decoding unit (120) can obtain syntax elements for restoring the image from the bitstream. The decoding unit (120) can restore the image based on the syntax elements.

[0038] In one embodiment, the operation of the image decoding device will be described in detail. The bitstream acquisition unit (110) may receive a bitstream. The image decoding device may perform an operation of acquiring a binstring corresponding to a splitting shape mode of an encoding unit from the bitstream. Further, the image decoding device may perform an operation of determining a splitting rule of the encoding unit. In addition, the image decoding device may perform an operation of splitting the encoding unit into a plurality of encoding units based on at least one of the binstring corresponding to the splitting shape mode of the encoding unit and the splitting rule. In order to determine the splitting rule, the image decoding device may determine a first allowable range of the size of the encoding unit according to a ratio of the width and height of the encoding unit. In order to determine the splitting rule, the image decoding device may determine a second allowable range of the size of the encoding unit according to the splitting shape mode of the encoding unit.

[0039] Below, the division of encoding units according to one embodiment of the present disclosure is described in detail.

[0040] In one embodiment, a picture may be divided into one or more tiles. A tile may be a sequence of one or more maximum coding units.

[0041] In one embodiment, there is a maximum coding block as a concept contrasting with a maximum coding unit. A maximum coding block means an NxN block containing NxN samples (N is an integer). Each color component can be divided into one or more maximum coding blocks.

[0042] In one embodiment, when a picture has three sample arrays (sample arrays for Y, Cr, and Cb components), the maximum coding unit is a unit that includes a maximum coding block of luma samples and two maximum coding blocks of corresponding chroma samples, and syntax structures used to encode the luma samples and chroma samples. When the picture is a monochrome picture, the maximum coding unit is a unit that includes a maximum coding block of monochrome samples and syntax structures used to encode the monochrome samples. When the picture is a picture that is encoded with a color plane that is separated by color components, the maximum coding unit is a unit that includes syntax structures used to encode the picture and samples of the picture.

[0043] In one embodiment, a single maximum coding block may be partitioned into MxN coding blocks containing MxN samples (M, N are integers).

[0044] In one embodiment, when a picture has a sample array for each of Y, Cr, and Cb components, a coding unit is a unit including an coding block of a luma sample and two coding blocks of corresponding chroma samples, and syntax structures used to encode the luma sample and the chroma samples. When the picture is a monochrome picture, a coding unit is a unit including an coding block of a monochrome sample and syntax structures used to encode the monochrome samples. When the picture is a picture encoded with a color plane separated by color components, a coding unit is a unit including syntax structures used to encode the picture and samples of the picture.

[0045] As explained above, the maximum coding block and the maximum coding unit are distinct concepts, and the coding block and the coding unit are distinct concepts. That is, the (maximum) coding unit refers to a data structure including a (maximum) coding block including the corresponding sample and a syntax structure corresponding to it. However, since a person skilled in the art can understand that the (maximum) coding unit or the (maximum) coding block refers to a block of a predetermined size including a predetermined number of samples, the following specification will refer to the maximum coding block and the maximum coding unit, or the coding block and the coding unit, without distinction, unless there are special circumstances.

[0046] Meanwhile, the maximum coding block may be referred to as a superblock. A single tile may include one or more superblocks, and within a tile, superblocks may be coded in raster scan order. Furthermore, the coding of a superblock may depend on the neighboring superblock above or to the left.

[0047] In one embodiment, a frame may be divided into one or more super blocks. The size of a super block may be determined based on information obtained from the bitstream. The shape of a super block may be a square of equal size, but is not limited thereto.

[0048] In one embodiment, the video decoding device can obtain information about a maximum size of a luma coding block or a maximum size of a chroma coding block from a bitstream. The video decoding device can obtain information about a size of a super block from the bitstream, and can obtain information about a maximum size of a luma coding block or a chroma coding block based on the information about the size of the super block. For example, the size of the super block may be one of 128x128 and 64x64. When the Y:Cb:Cr ratio is 4:2:0 according to the color format and the size of the super block is 128x128, the maximum size of the luma coding block may be 128x128, and the maximum size of the chroma coding block may be 64x64.

[0049] In one embodiment, the maximum coding unit may be hierarchically split into coding units based on split shape mode information obtained from the bitstream. As the split shape mode information, at least one of information indicating whether quad splitting is performed, information indicating whether multi-splitting is performed, split direction information, and split type information may be obtained from the bitstream.

[0050] In one embodiment, a super block may be partitioned into one of multiple partition types based on partition type information. The partition types include no partition (PARTITION_NONE), rectangular partitions of size Nx2N or 2NxN (PARTITION_VERT, PARTITION_HORZ), quad partitions of size NxN (PARTITION_SPLIT), T-shaped partitions (PARTITION_HORZ_A, PARTITION_HORZ_B, PARTITION_VERT_A, and PARTITION_VERT_B), and 2Nx Size or It can contain at least one of the four partitions (PARTITION_HORZ_4, PARTITION_VERT_4) of size x2N. For example, if the size of the super block is 128x128, it can be partitioned into one of eight partition types excluding the four partitions (PARTITION_HORZ_4, PARTITION_VERT_4). If the super block is partitioned according to the quad partition (PARTITION_SPLIT) that creates four sub-blocks of size 64x64, the sub-blocks of size 64x64 can be partitioned into one of ten partition types. The sub-blocks can be recursively partitioned into one of multiple partition types.

[0051] Meanwhile, the types of split types are not limited to the disclosed examples.

[0052] Meanwhile, if the size of the super block is 128x128, it may not be divided into 4 blocks horizontally or 4 blocks vertically. For example, if the size of the super block is 128x128, it may not be divided into blocks of sizes 128x32 or 32x128.

[0053] Meanwhile, if the block size is 8x8, it can be split according to one of the following split types: no split (PARTITION_NONE), rectangular split of Nx2N size or 2NxN size (PARTITION_VERT, PARTITION_HORZ), or quad split of NxN size (PARTITION_SPLIT).

[0054] In one embodiment, the image decoding device (100) can obtain segmentation shape mode information from a bitstream from a single binstring. The format of the bitstream received by the image decoding device (100) can include a fixed length binary code, a unary code, a truncated unary code, a predetermined binary code, etc. The binstring represents information as a list of binary numbers. The binstring can be composed of at least one bit. The image decoding device (100) can obtain segmentation shape mode information corresponding to the binstring based on a segmentation rule. The image decoding device (100) can determine quad segmentation, multi-segmentation, segmentation direction information, and segmentation type information for an encoding unit based on a single binstring.

[0055] In one embodiment, the maximum coding unit is also a coding unit having a maximum size, and is therefore one of the coding units. If the split shape mode information for the maximum coding unit indicates that it is not split, the coding unit determined from the maximum coding unit has the same size as the maximum coding unit. If the split shape mode information for the maximum coding unit indicates that it is split, the maximum coding unit may be split into coding units. In addition, if the split shape mode information for the coding unit indicates splitting, the coding units may be split into coding units of smaller sizes. However, the splitting of the image is not limited thereto, and the maximum coding unit and the coding units may not be distinguished.

[0056] In one embodiment, one or more prediction blocks for prediction may be determined from a coding unit. The prediction blocks may be equal to or smaller than the coding unit. Additionally, one or more transform blocks for transformation may be determined from the coding unit. The transform blocks may be equal to or smaller than the coding unit.

[0057] In one embodiment, the shape and size of the transform block and the prediction block may be unrelated to each other.

[0058] In one embodiment, prediction may be performed using the encoding unit as a prediction block. Transformation may also be performed using the encoding unit as a transform block.

[0059] The current block and neighboring blocks of the present disclosure may represent one of a maximum coding unit, a coding unit, a prediction block, and a transform block. Furthermore, the current block or the current coding unit may be a block currently being decoded or encoded, or a block currently being split. The neighboring blocks may be blocks reconstructed prior to the current block. The neighboring blocks may be spatially or temporally adjacent to the current block. The neighboring blocks may be located on one of the following sides: the lower left, left, upper left, upper right, upper right, right, and lower right of the current block.

[0060] FIG. 1b is a block diagram showing an image decoding device according to one embodiment of the present disclosure.

[0061] Referring to FIG. 1B, an image decoding device (100) according to one embodiment may include a memory (130) and at least one processor (140) connected to the memory (130). Operations of the image decoding device (100) according to one embodiment may operate as individual processors or may be operated under the control of a central processor. The memory (130) of the image decoding device (100) may store data received from an external source and data generated by the processor (140).

[0062] The memory (130) of the image decoding device (100) according to one embodiment may include at least one instruction configured to be executable by at least one processor (140). The at least one processor (140) may obtain information about a first filtering index and a second filtering index used to filter a current block in a current image from a bitstream by executing at least one instruction stored in the memory (130). The at least one processor (140) may determine a first filtering parameter value based on a range to which a first filtering parameter value indicated by the first filtering index belongs by executing at least one instruction stored in the memory (130). The at least one processor (140) may determine a second filtering parameter value based on a range to which a second filtering parameter value indicated by the second filtering index belongs by executing at least one instruction stored in the memory (130). At least one processor (140) can obtain a filtered block for the current block by filtering the current block using the determined first filtering parameter value and the determined second filtering parameter value by executing at least one instruction stored in the memory (130). The range to which the first filtering parameter value belongs can include one of a plurality of sections obtained by dividing the entire range to which the first filtering parameter value can belong. The range to which the second filtering parameter value belongs can include one of a plurality of sections obtained by dividing the entire range to which the second filtering parameter value can belong.

[0063] FIG. 2A is a block diagram showing an image encoding device according to one embodiment of the present disclosure.

[0064] In one embodiment, the video encoding device (100) may include an encoding unit (210) and a bitstream generation unit (220). The encoding unit (210) and the bitstream generation unit (220) may include at least one processor (240). In addition, the encoding unit (210) and the bitstream generation unit (220) may include memories (230) that store commands to be executed by at least one processor (240).

[0065] In one embodiment, the encoding unit (210) may receive an input image and encode the input image. The encoding unit (210) may encode the input image to obtain at least one syntax element. The encoding unit (210) may determine a context model based on block shape information including at least one of the shape, direction, width, and height ratio or size of a block, which is an encoding unit.

[0066] In one embodiment, the bitstream generation unit (220) may generate a bitstream based on an encoded input image. For example, the bitstream generation unit (220) may generate a bitstream by entropy encoding syntax elements based on a determined context model. In addition, the video encoding device may transmit the bitstream to the video decoding device. The entropy encoding may be performed using at least one of variable length coding, arithmetic coding, and Lempel-Ziv coding. In particular, the arithmetic coding may be performed using a Context-based Adaptive Binary Arithmetic Coding (CABAC) or a non-binary arithmetic coding method (e.g., Daala Video Codec, M-ary symbol arithmetic coding). Meanwhile, the method of entropy encoding is not limited to the disclosed example.

[0067] In one embodiment, the encoding unit (210) of the image encoding device can determine the shape of the encoding unit. For example, the encoding unit may be square or have a non-square shape, and information indicating such shape may be included in the block shape information.

[0068] According to one embodiment, the encoding unit (210) can determine the shape into which the encoding unit is to be split. The encoding unit (210) can determine the shape of at least one encoding unit included in the encoding unit, and the bitstream generation unit (220) can generate a bitstream including split shape mode information including information about the shape of such encoding unit.

[0069] According to one embodiment, the encoder (210) may determine whether the encoding unit is split or not. If the encoder (210) determines that the encoding unit includes only one encoding unit or that the encoding unit is not split, the bitstream generation unit (220) may generate a bitstream including split shape mode information indicating that the encoding unit is not split. In addition, the encoder (210) may split the encoding unit into a plurality of encoding units, and the bitstream generation unit (220) may generate a bitstream including split shape mode information indicating that the encoding unit is split into a plurality of encoding units.

[0070] According to one embodiment, information indicating the number of encoding units to be split into or the direction in which the encoding unit is to be split may be included in the splitting mode information. For example, the splitting mode information may indicate splitting in at least one of the vertical and horizontal directions, or may indicate no splitting.

[0071] In one embodiment, the video encoding device (200) determines information about the split shape mode based on the split shape mode of the encoding unit. The video encoding device (200) determines a context model based on at least one of the shape, direction, width, and height ratio or size of the encoding unit. Then, the video encoding device (200) generates information about the split shape mode for splitting the encoding unit based on the context model as a bitstream.

[0072] In one embodiment, the video encoding device (200) may obtain an array for matching at least one of a shape, an orientation, a ratio of width and height, or a size of an encoding unit with an index for the context model in order to determine a context model. The video encoding device (200) may obtain an index for the context model based on at least one of a shape, an orientation, a ratio of width and height, or a size of an encoding unit in the array. The video encoding device (200) may determine the context model based on the index for the context model.

[0073] In one embodiment, the video encoding device (200) may further determine the context model based on block shape information including at least one of a shape, direction, width, and height ratio or size of a neighboring encoding unit adjacent to the encoding unit, in order to determine the context model. In addition, the neighboring encoding unit may include at least one of encoding units located on the lower left, left, upper left, upper right, right, or lower right of the encoding unit.

[0074] In one embodiment, the video encoding device (200) may compare the length of the width of the upper peripheral encoding unit with the length of the width of the encoding unit to determine a context model. In addition, the video encoding device (200) may compare the length of the height of the left and right peripheral encoding units with the length of the height of the encoding unit. In addition, the video encoding device (200) may determine the context model based on the comparison results.

[0075] In one embodiment, the operation of the image encoding device (200) includes similar contents to the operation of the image decoding device (100), so a detailed description is omitted.

[0076] FIG. 2b is a block diagram showing an image encoding device according to one embodiment of the present disclosure.

[0077] Referring to FIG. 2B, an image encoding device (200) according to one embodiment may include a memory (230) and at least one processor (240) connected to the memory (230). The operations of the image encoding device (200) according to one embodiment may operate as individual processors or may be operated under the control of a central processor. The memory (230) of the image encoding device (200) may store data received from an external source and data generated by the processor (240).

[0078] The memory (230) of the image encoding device (200) according to one embodiment may include at least one instruction configured to be executable by at least one processor (240). The at least one processor (240) may determine a first filtering parameter value and a second filtering parameter value used to filter a current block in a current image by executing at least one instruction stored in the memory (230). The at least one processor (240) may obtain a first filtering index indicating a range to which the first filtering parameter value belongs based on the first filtering parameter value by executing at least one instruction stored in the memory (230). The at least one processor (240) may obtain a second filtering index indicating a range to which the second filtering parameter value belongs based on the second filtering parameter value by executing at least one instruction stored in the memory (230). At least one processor (240) can generate a bitstream including information about a first filtering index and a second filtering index by executing at least one instruction stored in a memory (230).

[0079] FIG. 3 is a block diagram of an image encoding and decoding system that performs loop filtering according to one embodiment of the present disclosure.

[0080] In one embodiment, the encoding unit (310) of the image encoding and decoding system (300) transmits an encoded bitstream of an image, and the decoding unit (350) receives and decodes the bitstream to output a restored image. The encoding unit (310) may have a configuration similar to that of the image encoding device (200), and the decoding unit (350) may have a configuration similar to that of the image decoding device (100).

[0081] In one embodiment, in the encoding unit (310), the prediction encoding unit (315) outputs prediction data through inter prediction and intra prediction, and the transform and quantization unit (320) outputs quantized transform coefficients of residual data between the prediction data and the current input image. The entropy encoding unit (325) encodes and transforms the quantized transform coefficients and outputs them as a bitstream. The quantized transform coefficients are restored as data in the spatial domain through the inverse quantization and inverse transformation unit (330), and the restored data in the spatial domain are output as a restored image through the loop filtering unit (335). The restored image can be used as a reference image for the next input image through the prediction encoding unit (315).

[0082] In one embodiment, encoded image data among the bitstreams received by the decoding unit (350) is restored to residual data in the spatial domain through the entropy decoding unit (355) and the inverse quantization and inverse transformation unit (360). The prediction data and residual data output from the prediction decoding unit (370) are combined to form image data in the spatial domain, and the loop filtering unit (365) can perform filtering on the image data in the spatial domain to output a restored image for the current original image. The restored image can be used as a reference image for the next original image by the prediction decoding unit (370).

[0083] In one embodiment, the loop filtering unit (335) of the encoding unit (310) performs loop filtering using filter information input according to user input or system settings. The filter information used by the loop filtering unit (335) is output to the entropy encoding unit (325) and transmitted to the decoding unit (350) together with the encoded image data. The loop filtering unit (365) of the decoding unit (350) can perform loop filtering based on the filter information input from the decoding unit (350). Although not shown in the drawing, the decoding unit (350) may include a film grain synthesis unit that performs a film grain synthesis operation. The film grain synthesis unit may perform a film grain synthesis operation on the restored image obtained from the loop filtering unit (365) before displaying the restored image.

[0084] FIG. 4 is a block diagram showing a loop filtering unit according to one embodiment of the present disclosure.

[0085] In one embodiment, the loop filtering unit (335) of the encoding unit (310) of FIG. 3 or the loop filtering unit (365) of the decoding unit (350) (hereinafter, the loop filtering unit (400)) may include at least one filter. For example, the loop filtering unit (400) may include at least one of a deblocking filter (410), a constrained directional enhancement filter (CDEF) (420), and a loop restoration filter (430). Meanwhile, the filters included in the loop filtering unit are not limited to the disclosed examples. Hereinafter, the filtering in the present disclosure may be filtering by at least one filter included in the loop filtering unit, and each filter disclosed in the loop filtering unit is distinguished according to its role and is not limited to the names of the disclosed filters.

[0086] In one embodiment, the deblocking filter (410) included in the loop filtering unit (400) may be a filter applied to the boundary of a transform block to remove block artifacts caused by quantization errors.

[0087] In one embodiment, the filter length of the deblocking filter (410) may be determined based on the sizes of the minimum transform blocks on both sides. In addition, the filter coefficients associated with the deblocking filter (410) may be preset. For example, a 4-tap, 8-tap, or 14-tap filter may be applied to a transform block for a luma sample, and a 6-tap filter may be applied to a transform block for a chroma sample. Meanwhile, the size or length of the taps used in the deblocking filter (410) is not limited to the disclosed examples.

[0088] In one embodiment, the filter length of the deblocking filter (410) may be determined according to the smoothness or boundary conditions of the boundaries between transform blocks. For example, when performing filtering on image data, the image decoding device (100) may identify high-variance signals as edges and not perform deblocking filtering to prevent the edges of objects from being blurred. The image decoding device (100) may calculate the smoothness within the image data or identify whether a boundary condition is satisfied, and filter the boundary of the transform block only when the boundary of the transform block is identified as flat. The boundary conditions may differ depending on whether the boundary is a vertical boundary or a horizontal boundary and whether the transform block is for a luma sample or a chroma sample. The image decoding device (100) may obtain information related to the boundary conditions from the bitstream, and the boundary conditions may be preset.

[0089] In one embodiment, the CDEF (420) included in the loop filtering unit (400) may be a non-linear filter that follows a predetermined direction to reduce ringing artifacts. The non-linear filter may be a filter whose output does not follow a linear function for the input. The CDEF (420) may be a filter applied in units of 8x8 blocks. The image decoding device (100) may preset or store eight filter directions to perform filtering using the CDEF (420), and may determine the filter direction to be applied to a block through linear regression. For example, the CDEF (420) may include a main filter and an auxiliary filter. The main filter may be a filter that is applied according to a determined filter direction and performs strong filtering. The auxiliary filter may be a filter that is applied radially along a direction rotated 45° from the determined filter direction and performs weak filtering.

[0090] In one embodiment, a video decoding device can obtain filtering parameters for filtering from a bitstream or a frame header. The video decoding device can obtain filtering parameters including information on at least one of a main filter strength for a luma sample, an auxiliary filter strength for a luma sample, a main filter strength for a chroma sample, and an auxiliary filter strength for a chroma sample used to perform filtering from the bitstream.

[0091] In one embodiment, the loop restoration filter (430) included in the loop filtering unit (400) can perform filtering using a Weiner filter or a SGRPROJ filter (Self-Guided Restoration Filter with Subspace Projection).

[0092] In one embodiment, the loop restoration filter (430) may perform loop restoration filtering for each loop restoration block or frame representing a loop restoration unit (LRU) of size 64x64, 128x128, or 256x256. The loop restoration block may not be related to a transform block or a prediction block. The video decoding device may obtain information about the size of the loop restoration block from the bitstream.

[0093] In one embodiment, a video decoding device can obtain information about loop reconstruction filtering to be applied to a current frame from a bitstream. For example, the video decoding device can obtain information (RESTORE_WIENER) that all loop reconstruction blocks included in the frame are filtered using a Weiner filter. Alternatively, the video decoding device can obtain information (RESTORE_SGRPROJ) that all loop reconstruction blocks included in the current frame are filtered using an SGRPROJ filter from the bitstream. The video decoding device can obtain information (RESTORE_NONE) that filtering is not performed on all loop reconstruction filters included in the current frame from the bitstream. The video decoding device can obtain information (RESTORE_SWITCHABLE) that a Weiner filter or an SGRPROJ filter can be applied to loop reconstruction blocks included in the current frame from the bitstream.

[0094] In one embodiment, when the video decoding device obtains information (RESTORE_SWITCHABLE) that a Weiner filter or an SGRPROJ filter can be applied to the current frame, the video decoding device can obtain information on whether to apply a Weiner filter or an SGRPROJ filter to each loop restoration block.

[0095] In one embodiment, the Weiner filter may be a linear filter that uses a window of size WxW that satisfies W=2*r+1 (where r is an integer) to reduce noise and blurring of an image. An image encoding device or an image decoding device may perform filtering using the Weiner filter by applying a window of size WxW to each loop restoration block.

[0096] In one embodiment, the video encoding device can determine coefficients of a vertical filter and coefficients of a horizontal filter that satisfy symmetry and normalization constraints. For example, when the video encoding device performs filtering using a Weiner filter using a window of size 7x7, the video encoding device can determine three filter coefficients each for the vertical filter and the horizontal filter by the symmetry and normalization constraints. The symmetry and normalization constraints may be conditions such that each of the horizontal and vertical filters is symmetrical, and the sum of the coefficients of the horizontal filter and the sum of the coefficients of the vertical filter are each 1.

[0097] In one embodiment, an image encoding device can generate a bitstream including information about determined coefficients. An image decoding device can obtain information about filter coefficients from the bitstream. If the image decoding device obtains information about the number of filters, say three, from the bitstream, it can determine seven coefficients for the Weiner filter according to symmetry and normalization constraints.

[0098] In one embodiment, the SGRPROJ filter may be a filter that performs filtering using a denoised block obtained by performing denoising on the current block and at least one filtering parameter. The current block may be a loop-recovery block.

[0099] In one embodiment, a video encoding device may perform denoising filtering on a current block using a denoising filter. The denoising filter is a type of self-guided filter, and a plurality of filter pairs may be predefined according to filtering strength. The number of predefined filter pairs for the denoising filter may be 16. The video encoding device may determine a first denoising filter and a second denoising filter as an optimal filter pair to be applied to the current block. In addition, the video encoding device may generate a bitstream including parameters regarding the first denoising filter and the second denoising filter.

[0100] In one embodiment, the video encoding device can obtain a first denoised block and a second denoised block by performing filtering using a first denoising filter and a second denoising filter. The video encoding device can obtain a filtered block for the current block by filtering the current image using the first denoised block and the second denoised block, and the first filtering parameter and the second filtering parameter. For example, the video encoding device can obtain a filtered block for the current block. , the first denoised block , the second denoised block , by filtering the current image based on the first filtering parameter xq[0] and the second filtering parameter xq[1], a filtered block for the current block is generated. It can be obtained according to the following mathematical formula 1.

[0101] [Mathematical Formula 1]

[0102]

[0103] In one embodiment, the video encoding device can determine the optimal first filtering parameter and the second filtering parameter for filtering. The video encoding device can determine the first filtering parameter and the second filtering parameter using the least squares method, etc. For example, the video encoding device can determine the block of the original image corresponding to the current block according to the least squares method of the following mathematical expression 2. and filtered blocks The first filtering parameter and the second filtering parameter that minimize the difference can be determined.

[0104] [Equation 2]

[0105]

[0106] In one embodiment, the video encoding device can obtain information associated with the first filtering parameter and the second filtering parameter by converting the first filtering parameter and the second filtering parameter. In addition, the video encoding device can generate a bitstream including information regarding the first filtering parameter and the second filtering parameter.

[0107] In one embodiment, the video encoding device can determine or obtain the first transform filtering parameter and the second transform filtering parameter by converting the first filtering parameter and the second filtering parameter according to a preset transform formula. The video encoding device can determine or obtain the first transform filtering parameter xqd[0] and the second transform filtering parameter xqd[0] by clipping to satisfy a bit condition allocated or preset for the first filtering parameter and the second filtering parameter. The first transform filtering parameter and the second transform filtering parameter can be determined according to the following transform formula. Meanwhile, the preset bit condition can be 6 bits or 7 bits per variable, or less.

[0108] int xqd[0] = clamp(xq[0], -96, 31)

[0109] int xqd[1] = clamp(128 - xqd[0] - xq[1], -32, 95)

[0110] In one embodiment, the video encoding device can generate a bitstream including information regarding a first transform filtering parameter and a second transform filtering parameter.

[0111] Meanwhile, the video encoding device may convert the first filtering parameter and the second filtering parameter using another method that satisfies a preset bit condition, and is not limited to the disclosed example, and then generate a bitstream including the converted information. For example, the information associated with the first filtering parameter and the second filtering parameter obtained by converting the first filtering parameter and the second filtering parameter may be a first filtering index and a second filtering index. The first filtering index and the second filtering index will be described in detail with reference to FIGS. 5 to 13.

[0112] In one embodiment, the video encoding device or the video decoding device can obtain or determine the first filtering parameter and the second filtering parameter based on the first transform filtering parameter and the second transform filtering parameter or the first filtering index and the second filtering index.

[0113] Meanwhile, the first filtering parameter and the second filtering parameter determined according to the above mathematical expressions 1 and 2 and the first filtering parameter and the second filtering parameter obtained or determined based on the first conversion filtering parameter and the second conversion filtering parameter or the first filtering index and the second filtering index may be different.

[0114] For convenience of explanation, in order to distinguish the first filtering parameter and the second filtering parameter, the first filtering parameter and the second filtering parameter determined according to mathematical expressions 1 and 2 may be represented as xq[0] and xq[1], respectively, and the first filtering parameter and the second filtering parameter obtained or determined based on the first conversion filtering parameter and the second conversion filtering parameter or the first filtering index and the second filtering index may be represented as xq'[0] and xq'[1], respectively.

[0115] In one embodiment, the first filtering parameter xq'[0] and the second filtering parameter xq'[1] obtained or determined based on the first transformation filtering parameter and the second transformation filtering parameter can be obtained or determined according to the following transformation equation.

[0116] int xq'[0] = xqd[0]

[0117] int xq'[1] = 128 + xq'[0] + xqd[1]

[0118] In one embodiment, an image encoding device or an image decoding device can obtain a filtered block for a current block by filtering the current block based on a first filtering parameter and a second filtering parameter. For example, the image encoding device can obtain a filtered block according to the following mathematical expression 3 using the first filtering parameter and the second filtering parameter.

[0119] [Equation 3]

[0120]

[0121] Meanwhile, in order to distinguish between the filtered blocks according to Equation 1 and the filtered blocks according to Equation 3, the blocks filtered according to Equation 1 are , and the filtered block according to mathematical expression 3 is expressed as It is expressed as . The filtered block according to mathematical expression 1 and the filtered block according to mathematical expression 3 may be the same or different.

[0122] In one embodiment, the video encoding device can determine whether to filter a current block or a current image, and generate a bitstream including information indicating whether to filter the current block or the current image.

[0123] In one embodiment, the video encoding device may perform Rate-Distortion Optimization (RDO) on the current block or the current image to determine whether to perform filtering using the SGRPROJ filter. Furthermore, the video encoding device may generate a bitstream including information on whether to perform filtering using the SGRPROJ filter on the current block or the current image.

[0124] In one embodiment, an image decoding device may obtain information from a bitstream indicating whether to filter a current block within a current image. Based on the information indicating whether to filter the current block, the image decoding device may determine to filter the current block. Furthermore, if it is determined to filter the current block, the image decoding device may obtain information from the bitstream regarding which filter to use to perform filtering on the current block.

[0125] In one embodiment, the video decoding device can obtain information from the bitstream regarding whether to filter the current image or the current block using the SGRPROJ filter. Furthermore, the video decoding device can determine to filter the current block using the SGRPROJ filter based on the information regarding whether to filter the current image or the current block using the SGRPROJ filter.

[0126] In one embodiment, when the video decoding device determines to filter the current block using the SGRPROJ filter, the video decoding device may obtain a first transform filtering parameter or a second filtering parameter from the bitstream. The video decoding device may obtain or determine the first filtering parameter and the second filtering parameter from the first transform filtering parameter and the second transform filtering parameter.

[0127] In one embodiment, the video decoding device can obtain or determine the first filtering parameter and the second filtering parameter based on the first transform filtering parameter and the second transform filtering parameter in the same manner as the video encoding device obtains or determines the first filtering parameter and the second filtering parameter based on the first transform filtering parameter and the second transform filtering parameter.

[0128] Meanwhile, the first filtering parameter and the second filtering parameter determined according to the above mathematical expressions 1 and 2 in the image encoding device, and the first filtering parameter and the second filtering parameter obtained or determined based on the first transformation filtering parameter and the second transformation filtering parameter or the first filtering index and the second filtering index in the image decoding device may be different.

[0129] In one embodiment, an image decoding device may obtain a bitstream including parameters relating to a first denoising filter and a second denoising filter. The parameters relating to the first denoising filter and the second denoising filter may be at least one variable representing the first denoising filter or the second denoising filter. The image decoding device may obtain a first denoised block and a second denoised block using a current block, the first denoising filter and the second denoising filter.

[0130] In one embodiment, the video decoding device can obtain a filtered block for the current block by filtering the current block based on the current block, the first denoised block, the second denoised block, the first filtering parameter and the second filtering parameter. For example, the video decoding device can obtain the filtered block in a manner identical or similar to the method of obtaining the filtered block in the video encoding device according to mathematical expression 3.

[0131] Meanwhile, for convenience of explanation, the image decoding device may obtain information on at least one of whether to perform filtering on the current block from the bitstream, whether to perform filtering using a first transformation filtering parameter and a second transformation filtering parameter, whether to perform filtering using a first filtering index or a second filtering index, parameters regarding the first denoising filter and the second denoising filter, information regarding the first transformation filtering parameter and the second transformation filtering parameter, and information regarding the first filtering index and the second filtering index.

[0132] FIG. 5 is a flowchart illustrating a method for decoding an image according to one embodiment of the present disclosure.

[0133] In step S510, the image decoding device can obtain information about a first filtering index and a second filtering index used to filter a current block in a current image from a bitstream.

[0134] In one embodiment, a video decoding device may obtain information indicating whether to filter a current block using a first filtering index and a second filtering index from a bitstream. Based on the information indicating whether to filter the current block using the first filtering index and the second filtering index, the video decoding device may determine to filter the current block using the first filtering index and the second filtering index.

[0135] In one embodiment, the video decoding device can obtain information about the first filtering index and the second filtering index from the bitstream based on information indicating whether to filter the current block using the first filtering index and the second filtering index.

[0136] In one embodiment, the information about the first filtering index and the second filtering index may be at least one of the first filtering index and the second filtering index, the first difference index and the second difference index, and the first reference index and the second reference index.

[0137] In one embodiment, a video decoding device can obtain a first differential index and a second differential index from a bitstream. The video decoding device can obtain the first filtering index by adding or subtracting the first differential index to a first filtering index for a previous image or a neighboring block. The video decoding device can obtain the second filtering index for a current block by adding or subtracting the second differential index to a second filtering index for the previous image or a neighboring block.

[0138] In one embodiment, the video decoding device can obtain a first filtering index for the current block by adding or subtracting a first differential index to a first reference index. The video decoding device can obtain a second filtering index for the current block by adding or subtracting a second differential index to a second reference index. The first reference index may be an index that is preset as an initial value for the first filtering index. The second reference index may be an index that is preset as an initial value for the second filtering index.

[0139] In one embodiment, the first filtering index may be an index indicating a range to which the first filtering parameter value belongs. The second filtering index may be an index indicating a range to which the second filtering parameter value belongs. The range to which the first filtering parameter value belongs may include one of a plurality of sections obtained by dividing the entire range to which the first filtering parameter value can belong. The range to which the second filtering parameter value belongs may include one of a plurality of sections obtained by dividing the entire range to which the second filtering parameter value can belong.

[0140] Meanwhile, the entire range to which the first filtering parameter value can belong may represent a range in which the first filtering parameter values ​​obtained using the learning data can exist, and outlier values ​​in the learning data may be excluded. The entire range to which the second filtering parameter value can belong may represent a range in which the second filtering parameter values ​​obtained using the learning data can exist, and outlier values ​​in the learning data may be excluded.

[0141] For example, the entire range to which the first filtering parameter value can belong may be from -512 to 512. If the first filtering index is 0, the range to which the first filtering parameter value can belong may be represented as from -512 to -101. In addition, if the first filtering index is 1, the range to which the first filtering parameter value can belong may be represented as from -100 to -20. Descriptions of the second filtering index and the second filtering parameter are omitted because they correspond to the first filtering index and the first filtering parameter, respectively.

[0142] In one embodiment, a plurality of intervals obtained by dividing the entire range to which the value of the first filtering parameter can belong may be predetermined based on first distribution information associated with the first filtering parameter. The first distribution information may be information indicating a frequency corresponding to each value of the first filtering parameters obtained using learning data used to determine or obtain the first distribution function or the first lookup table in the image encoding device.

[0143] In one embodiment, a plurality of intervals obtained by dividing the entire range to which the second filtering parameter value can belong may be predetermined based on second distribution information associated with the second filtering parameter. The second distribution information may be information indicating a frequency corresponding to each value of the second filtering parameters obtained using learning data used to determine or obtain the second distribution function or the second lookup table in the image encoding device.

[0144] Meanwhile, with respect to the first distribution information or the second distribution information, a detailed description will be given in FIGS. 6 and 7. In addition, with respect to the first lookup table and the second lookup table, a detailed description will be given in FIGS. 8 and 9.

[0145] In one embodiment, the number of multiple sections obtained by dividing the entire range to which the first filtering parameter value can belong may be determined in consideration of a bit condition allocated for the first filtering parameter. The number of multiple sections obtained by dividing the entire range to which the second filtering parameter value can belong may be determined in consideration of a bit condition allocated for the second filtering parameter. For example, when the bit allocated for the first filtering parameter is 7 bits, the number of multiple sections obtained by dividing the entire range to which the first filtering parameter value can belong may be 128 or less. When the bit allocated for the second filtering parameter is 6 bits, the number of multiple sections obtained by dividing the entire range to which the first filtering parameter value can belong may be 64 or less.

[0146] In one embodiment, the first filtering index may be determined using a first reference index determined based on frequency information regarding the first filtering index. For example, the first filtering index may be obtained or determined by adding a first differential index to the first reference index. The first reference index may be a mode of the first filtering index included in the frequency information regarding the first filtering index. For example, if 21 is used as the most frequent value as the first filtering index, the video encoding device may determine the first reference index as 21.

[0147] Meanwhile, without being limited to the disclosed example, the first reference index may be determined as a single value included in the entire range to which the first filtering index according to the learning data may belong. For example, the first reference index may be determined as the middle value of the entire range to which the first filtering index may belong.

[0148] In one embodiment, the second filtering index may be determined using a second reference index determined based on frequency information regarding the second filtering index. For example, the second filtering index may be obtained or determined by adding a second differential index to the second reference index. The second reference index may be a mode of the second filtering index included in the frequency information regarding the second filtering index. For example, if 21 is used as the most frequent value as the second filtering index, the video encoding device may determine the second reference index as 21.

[0149] Meanwhile, without being limited to the disclosed example, the second reference index may be determined as a single value included in the entire range to which the second filtering index can belong according to the learning data. For example, the second reference index may be determined as a median value within the entire range to which the second filtering index can belong.

[0150] In one embodiment, the video encoding device can reduce the entropy of values ​​stored in the bitstream and the amount of bits by obtaining or determining a mode used as a first filtering index or a second filtering index as a first reference index or a second reference index, thereby increasing the likelihood that the difference between an initial first filtering index value to be stored in the bitstream and the first reference index value will be reduced or the likelihood that the difference between the second filtering index value and the second reference index value will be reduced.

[0151] In one embodiment, the first filtering index may be determined based on a first index table sorted based on frequency information regarding the first filtering index. The second filtering index may be determined based on a second index table sorted based on frequency information regarding the second filtering index. The first index table and the second index table are described in detail below with reference to FIG. 11.

[0152] In step S520, the image decoding device can determine the first filtering parameter value based on the range to which the first filtering parameter value indicated by the first filtering index belongs.

[0153] In one embodiment, the video decoding device may determine a first filtering parameter corresponding to a first filtering index. For example, the first filtering parameter value may be determined as a first representative value of a range to which the first filtering parameter indicated by the first filtering index belongs. The first representative value may be one of a median, an average, and a mode of first interval parameters regarding the range to which the first filtering parameter belongs.

[0154] For example, if the range to which the first filtering parameter belongs is from 20 to 50, and the values ​​of the first interval parameters included in the range to which the first filtering parameter belongs are 21, 30, 32, 40, and 50, the first representative value may be predetermined as 32, which is the median value of the first interval parameters.

[0155] In one embodiment, the first interval parameters may be parameters obtained based on first distribution information regarding the first filtering parameters used to divide the entire range to which the first filtering parameter values ​​obtained using the learning data may belong. The first interval parameters may be all or part of the parameters in the range to which the first filtering parameter belongs among the first distribution information.

[0156] In one embodiment, the image decoding device may determine the first filtering parameter based on a first filtering index and a first mapping function or a first lookup table. For example, the image encoding device may design or determine the first mapping function or the first lookup table based on first distribution information for the first filtering parameter value acquired using learning data.

[0157] In one embodiment, the image encoding device and the image decoding device can store the first mapping function or the first lookup table in memory in advance and use it, and can transmit or obtain it and share it when performing image processing.

[0158] Meanwhile, the video encoding device does not necessarily need to design or determine the first mapping function or the first lookup table using training data. For example, a computing device different from the video encoding device or the video decoding device can acquire or determine information regarding the first mapping function or the first lookup table using training data and transmit it to the video encoding device or the video decoding device.

[0159] In step S530, the image decoding device can determine the second filtering parameter value based on the range to which the second filtering parameter value indicated by the second filtering index belongs.

[0160] In one embodiment, the video decoding device may determine a second filtering parameter corresponding to a second filtering index. For example, the second filtering parameter value may be determined as a second representative value of a range to which the second filtering parameter indicated by the second filtering index belongs. The second representative value may be one of the median, mean, and mode of second interval parameters regarding the range to which the second filtering parameter belongs.

[0161] For example, if the range to which the second filtering parameter belongs is from 30 to 60, and the values ​​of the second interval parameters included in the range to which the second filtering parameter belongs are 30, 32, 40, 40, 50, and 52, the second representative value can be determined as 40, which is the most frequent value of the second interval parameters.

[0162] In one embodiment, the second interval parameters may be parameters obtained based on second distribution information regarding the second filtering parameters used to divide the entire range to which the second filtering parameter values ​​obtained using the learning data may belong. The second interval parameters may be all or part of the parameters in the range to which the second filtering parameter belongs among the second distribution information.

[0163] In one embodiment, the image decoding device may determine a second filtering parameter based on a second filtering index and a second mapping function or a second lookup table. For example, the image encoding device may design or determine a second mapping function or a second lookup table based on second distribution information for second filtering parameter values ​​acquired using learning data.

[0164] In step S540, the image decoding device can obtain a filtered block for the current block by filtering the current image using the determined first filtering parameter value and the determined second filtering parameter value.

[0165] In one embodiment, an image decoding device can obtain a first denoised block and a second denoised block using a current block, a first denoising filter, and a second denoising filter. The image decoding device can obtain a filtered block according to Equation 4.

[0166] [Equation 4]

[0167]

[0168] In one embodiment, the video decoding device may apply a first filtering parameter to a first difference block representing a difference between a first denoised block and a current block, and apply a second filtering parameter to a second difference block representing a difference between a second denoised block and a current block. The video decoding device may obtain a filtered block by applying the first filtering parameter to the first difference block and the second filtering parameter to the second difference block, and adding the current block to the results. The first denoising filter and the second denoising filter may be different.

[0169] In one embodiment, the video decoding device may further include a step of clipping the filtered block to satisfy a bit condition assigned to the current block. The video decoding device may compare a sample value of the filtered block with a bit condition assigned to the current block, and clip the sample value of the current block to satisfy the bit condition assigned to the current block. For example, if the bit condition assigned to the current block is 8-bit and the value of a luma sample included in the filtered block is 260, the value of the luma sample may be clipped to 255. Alternatively, if the value of a luma sample included in the filtered block is -10, the value of the luma sample may be clipped to 0. Meanwhile, the bit condition assigned to the current block is not limited to the disclosed example.

[0170] FIG. 6 is a diagram illustrating graphs associated with a first mapping function and a second mapping function based on learning data according to one embodiment of the present disclosure.

[0171] In one embodiment, the video encoding device can determine optimal first filtering parameters and second filtering parameters to be used for filtering each block using learning data. In addition, the video encoding device can obtain first distribution information representing the frequency of each first filtering parameter value as a graph for the first filtering parameters obtained using the learning data. The video encoding device can obtain second distribution information representing the frequency of each second filtering parameter value as a graph for the second filtering parameters using the learning data.

[0172] For example, the first distribution graph (610) may be a graph that diagrams the frequency of each first filtering parameter value. The second distribution graph (620) may be a graph that diagrams the second distribution graph that represents the frequency of each second filtering parameter value.

[0173] In one embodiment, the first distribution graph (610) and the second distribution graph (620) may treat filtering parameter values ​​outside the range of -512 to 512 as outliers. Accordingly, the first distribution graph (610) and the second distribution graph (620) may represent the frequencies for the first filtering parameter values ​​within the range of -512 to 512 and the second filtering parameter values ​​within the range of -512 to 512, respectively.

[0174] In one embodiment, the video encoding device may design or determine a first distribution function corresponding to a first filtering parameter based on a first distribution graph (610). In addition, the video encoding device may design or determine a second distribution function corresponding to a second filtering parameter based on a second distribution graph (620). The first distribution function may be a function that outputs a first filtering index as a function value when a predetermined first filtering parameter value is input. The second distribution function may be a function that outputs a second filtering index as a function value when a predetermined second filtering parameter value is input.

[0175] In one embodiment, the function value of the first distribution function may be the same as the range of values ​​used as the first transformation filtering parameter. For example, the function value of the first distribution function may be an integer greater than or equal to -96 and less than 32 used as the first transformation filtering parameter. Meanwhile, without being limited to the disclosed example, the range of the function value of the first distribution function may be determined according to the bit condition allocated for the first filtering parameter.

[0176] In one embodiment, the slope of the first distribution function may be less than or equal to 1 and greater than 0 in all sections. The higher the frequency corresponding to the first filtering parameter value appearing in the first distribution graph (610), the closer the slope of the first distribution function corresponding to the first filtering parameter value may be designed or determined to be to 1. The lower the frequency corresponding to the first filtering parameter value appearing in the first distribution graph (610), the closer the slope of the first distribution function corresponding to the first filtering parameter value may be designed or determined to be to 0. Meanwhile, the closer the slope of the first distribution function is to 1, the less the first filtering parameter value is damaged in the corresponding region. The closer the slope of the first distribution function is to 0, the more the first filtering parameter value is damaged in the corresponding region.

[0177] In one embodiment, the function value of the second distribution function may be the same as the range of values ​​used as the second transformation filtering parameter. For example, the function value of the second distribution function may be an integer greater than or equal to -32 and less than 96 used as the second transformation filtering parameter. Meanwhile, without being limited to the disclosed example, the range of the function value of the second distribution function may be determined according to the bit condition allocated for the second filtering parameter.

[0178] In one embodiment, the slope of the second distribution function may be less than or equal to 1 and greater than 0 in all sections. The higher the frequency corresponding to the second filtering parameter value appearing in the second distribution graph (620), the closer the slope of the second distribution function corresponding to the second filtering parameter value may be designed or determined to be to 1. The lower the frequency corresponding to the second filtering parameter value appearing in the second distribution graph (620), the closer the slope of the second distribution function corresponding to the second filtering parameter value may be designed or determined to be to 0. Meanwhile, the closer the slope of the second distribution function is to 1, the less the second filtering parameter value is damaged in the corresponding region. The closer the slope of the second distribution function is to 0, the more the second filtering parameter value is damaged in the corresponding region.

[0179] In one embodiment, the number of function values ​​that can be obtained based on the first distribution function can be determined in consideration of the bit condition allocated for the first filtering parameter. The first distribution function can be an integer function having integers as function values. In addition, the function values ​​of the first distribution function can be first filtering index values. A set of first filtering parameters that can obtain a given first filtering index value as a function value can be referred to as first interval parameters, and a range of the first filtering parameters that can obtain a given first filtering index value as a function value can be a range to which the first filtering parameter value belongs.

[0180] In one embodiment, the number of function values ​​that can be obtained based on the second distribution function can be determined in consideration of the bit condition allocated for the second filtering parameter. The second distribution function can be an integer function having integers as function values. In addition, the function values ​​of the second distribution function can be second filtering index values. A set of second filtering parameters that can obtain a given second filtering index value as a function value can be referred to as second interval parameters, and a range of the second filtering parameters that can obtain a given second filtering index value as a function value can be a range to which the second filtering parameter value belongs.

[0181] In one embodiment, the video encoding device can obtain or determine the first filtering index (xqd[0]) by inputting the first filtering parameter (xq[0]) into the first distribution function. The video encoding device can obtain or determine the second filtering index (xqd[1]) by inputting the second filtering parameter (xq[1]) into the second distribution function. In one embodiment, the video encoding device or the video decoding device can obtain or determine the first filtering parameter (xq'[0]) by inputting the first filtering index (xqd[0]) into the first mapping function. The video encoding device or the video decoding device can obtain or determine the second filtering parameter (xq'[1]) by inputting the second filtering index (xqd[1]) into the second mapping function.

[0182] In one embodiment, the first mapping function may be a pseudo-inverse function of the first distribution function. The second mapping function may be a pseudo-inverse function of the second distribution function. For example, the first mapping function may act as an inverse function of the first distribution function, but because integer operations do not allow for an inverse relationship to hold for all numbers, it may be expressed as a pseudo-inverse function. The second mapping function may act as an inverse function of the second distribution function, but because integer operations do not allow for an inverse relationship to hold for all numbers, it may be expressed as a pseudo-inverse function.

[0183] FIG. 7 is a diagram illustrating graphs associated with a first mapping function and a second mapping function based on learning data according to one embodiment of the present disclosure.

[0184] In one embodiment, the first encoding graph (710) may include a dashed line representing a function representing a transformation of the first filtering parameter by clipping it with the first transform filtering parameter. The first encoding graph (710) may include a solid line representing a function designed to correspond the first filtering parameter to the first filtering index. In one embodiment, the solid line included in the first encoding graph (710) may be a first distribution function.

[0185] In one embodiment, the first decoding graph (720) may include a thick solid line representing a function for obtaining an optimal first filtering parameter. The first decoding graph (720) may include a dotted line representing a function for obtaining the first filtering parameter from the first transform filtering parameter. The first decoding graph (720) may include a thin solid line representing a function for obtaining the first filtering parameter from the first filtering index. The thin solid line included in the first decoding graph (710) may be a first mapping function.

[0186] In one embodiment, it can be verified that the function for obtaining the first filtering parameter from the first filtering index is more similar to the function for obtaining the optimal first filtering parameter than the function for obtaining the first filtering parameter from the first transformation filtering parameter.

[0187] In one embodiment, the second encoding graph (730) may include a dashed line representing a function representing a transformation of the second filtering parameter by clipping it with the second transform filtering parameter. The second encoding graph (730) may include a solid line representing a function designed to correspond the second filtering parameter to the second filtering index. In one embodiment, the solid line included in the second encoding graph (730) may be a second distribution function.

[0188] In one embodiment, the second decoding graph (740) may include a thick solid line representing a function for obtaining an optimal second filtering parameter. The second decoding graph (740) may include a dotted line representing a function for obtaining a second filtering parameter from a second transform filtering parameter. The second decoding graph (740) may include a thin solid line representing a function for obtaining a second filtering parameter from a second filtering index. The thin solid line included in the second decoding graph (720) may be a second mapping function.

[0189] In one embodiment, it can be verified that the function for obtaining the second filtering parameter from the second filtering index is similar to the function for obtaining the optimal second filtering parameter than the function for obtaining the second filtering parameter from the second transformation filtering parameter.

[0190] FIG. 8 is a diagram illustrating graphs associated with a first lookup table and a second lookup table based on learning data according to one embodiment of the present disclosure.

[0191] In one embodiment, the video encoding device can determine optimal first filtering parameters and second filtering parameters to be used for filtering a block using learning data. In addition, the video encoding device can obtain first distribution information representing the frequency of each first filtering parameter value as a graph using the learning data for the first filtering parameter. The video encoding device can obtain second distribution information representing the frequency of each second filtering parameter value as a graph using the learning data for the second filtering parameter.

[0192] For example, the first distribution graph (810) may be a graph that graphically depicts the frequency of each first filtering parameter value obtained using learning data, but with outliers removed. For example, in the first distribution graph (610) of FIG. 6, the frequency when the first filtering parameter value is 0 may be an excessively higher value than the frequency when the first filtering parameter value is not 0. In the first distribution graph (610) of FIG. 6, the image encoding device may assign the highest frequency among the frequencies when the first filtering parameter value is not 0 to the frequency when the first filtering parameter value is 0. Therefore, the first distribution graph (810) of FIG. 8 may include smoother distribution information than the first distribution graph (610) of FIG. 6.

[0193] For example, the second distribution graph (820) may be a graph that graphically depicts the frequency of each second filtering parameter value obtained using learning data, but with outliers removed. For example, in the second distribution graph (620) of FIG. 6, the frequency when the second filtering parameter value is 0 may be an excessively higher value than the frequency when the second filtering parameter value is not 0. In the second distribution graph (620) of FIG. 6, the image encoding device may assign the highest frequency among the frequencies when the second filtering parameter value is not 0 to the frequency when the second filtering parameter value is 0. Therefore, the second distribution graph (820) of FIG. 8 may include smoother distribution information than the second distribution graph (620) of FIG. 6.

[0194] In one embodiment, the video encoding device may obtain a first cumulative distribution graph (830) corresponding to the first distribution graph (810) based on the first distribution graph (810). The first cumulative distribution graph (830) may be a graph obtained by accumulating frequencies corresponding to all first filtering parameters less than or equal to a predetermined value in the first distribution graph. For example, a function value corresponding to a first filtering parameter having a value of 5 in the first cumulative distribution graph (830) may be the sum of the frequencies corresponding to all first filtering parameter values ​​having a value less than or equal to 5 in the first distribution graph (810).

[0195] In one embodiment, the video encoding device may obtain a second cumulative distribution graph (840) corresponding to the second distribution graph (820) based on the second distribution graph (820). The second cumulative distribution graph (840) may be a graph obtained by accumulating frequencies corresponding to all first filtering parameters less than or equal to a predetermined value in the second distribution graph. For example, a function value corresponding to a first filtering parameter having a value of 10 in the second cumulative distribution graph (840) may be the sum of the frequencies corresponding to all second filtering parameter values ​​having a value less than or equal to 10 in the second distribution graph (820).

[0196] In one embodiment, the image encoding device may determine or obtain a first lookup table based on a first cumulative distribution graph (830). The image encoding device may determine or obtain a second lookup table based on a second cumulative distribution graph (840).

[0197] Hereinafter, the operation of determining or obtaining the first lookup table based on the first cumulative distribution graph (830) will be described in detail in FIG. 9. In addition, the operation of determining or obtaining the second lookup table based on the second cumulative distribution graph (840) corresponds to the operation of determining or obtaining the first lookup table, and therefore the same content is omitted.

[0198] FIG. 9 is a diagram associated with a first lookup table and a second lookup table based on learning data according to one embodiment of the present disclosure.

[0199] In one embodiment, the video encoding device can determine or obtain the first lookup table based on the first cumulative distribution graph (830) of FIG. 8.

[0200] In one embodiment, the video encoding device can divide the y-axis of the first cumulative distribution graph into equal intervals based on a bit condition allocated for the first filtering parameter. By dividing the y-axis of the first cumulative distribution graph into equal intervals, the video encoding device can obtain a plurality of sections that divide the entire range to which the first filtering parameter value can belong.

[0201] For example, when the bit condition allocated for the first filtering parameter is 7 bits, the video encoding device can divide the first cumulative distribution graph into 128 sections. By dividing the y-axis of the first cumulative distribution graph into 128 sections, the video encoding device can obtain a plurality of sections for 128 x-axes that correspond to each of the 128 sections for the divided y-axis and divide the entire range to which the first filtering parameter value can belong. In addition, the video encoding device can determine or obtain a first filtering index value that represents each of the plurality of sections for the 128 x-axes that divide the entire range to which the first filtering parameter value can belong. A given first filtering index value can include one of the plurality of sections obtained by dividing the entire range to which the first filtering parameter value can belong. One of the plurality of sections obtained by dividing the entire range to which the first filtering parameter value indicated by the given first filtering index value can belong can be referred to as a range to which the first filtering parameter value corresponding to the first filtering index belongs.

[0202] In one embodiment, the video encoding device may obtain information about a section including one of a plurality of sections obtained by dividing the entire range to which the first filtering index and the first filtering parameter value indicated by the first filtering index may belong. The video encoding device may determine or obtain a first lookup table including information about the range to which the first filtering parameter value indicated by the first filtering index belongs. The first lookup table may include information about a first representative value of the range to which the first filtering parameter value belongs. The first representative value may be determined as one of a median value, an average value, and a mode value of first section parameters regarding the range to which the first filtering parameter belongs. Meanwhile, the first section parameters may represent first filtering parameter values ​​included in a range to which a predetermined value among learning data belongs.

[0203] Hereinafter, for convenience of explanation, a detailed explanation will be given using an example in which the bit condition allocated for the first filtering parameter is 2 bits.

[0204] In one embodiment, the video encoding device may divide the first cumulative distribution graph (830) of FIG. 8 into four sections when the bit condition allocated for the first filtering parameter is 2 bits. When the first cumulative distribution graph (830) of FIG. 8 is divided into four sections, it may be represented as the first cumulative frequency distribution graph (910) of FIG. 9.

[0205] In one embodiment, when the y-axis of the first cumulative distribution graph is divided into four sections, the video encoding device can obtain four sections that correspond to each of the four divided sections of the y-axis and divide the entire range to which the first filtering parameter can belong. In addition, the video encoding device can obtain or determine a first filtering index value that corresponds to each of the four sections that divide the entire range to which the first filtering parameter value can belong.

[0206] In one embodiment, the image encoding device can divide the y-axis of the first cumulative distribution graph into equal intervals to obtain a first index section (911), a second index section (912), a third index section (913), and a fourth index section (914).

[0207] In one embodiment, the video encoding device may obtain or determine a first section (916) corresponding to a first index section (911) and including one of a plurality of sections obtained by dividing the entire range to which the first filtering parameter can belong. The video encoding device may obtain or determine a second section (917) corresponding to a second index section (912) and including one of a plurality of sections obtained by dividing the entire range to which the first filtering parameter can belong. The video encoding device may obtain or determine a third section (918) corresponding to a third index section (913) and including one of a plurality of sections obtained by dividing the entire range to which the first filtering parameter can belong. The video encoding device may obtain or determine a fourth section (919) corresponding to a fourth index section (914) and including one of a plurality of sections obtained by dividing the entire range to which the first filtering parameter can belong.

[0208] In one embodiment, the video encoding device may obtain or determine information (920) about a first filtering index corresponding to each of the first to fourth sections (916, 917, 918, 919). For example, the information about the first filtering index may include information that when the first filtering parameter value belongs to a first section of -100 or less, the first filtering index value is determined to be 0, when the first filtering parameter value belongs to a second section of more than -100 and less than -20, the first filtering index value is determined to be 1, when the first filtering parameter value belongs to a third section of more than -20 and less than 20, the first filtering index value is determined to be 2, and when the first filtering parameter value belongs to a fourth section of more than 20, the first filtering index value is determined to be 3.

[0209] In one embodiment, the video encoding device may obtain or determine a first lookup table (930) for determining a first filtering parameter according to a first filtering index. For example, the first lookup table (930) may include information such that when the range to which the first filtering parameter indicated by the first filtering index belongs is a first section, the first representative value is determined as -100, when the range to which the first filtering parameter indicated by the first filtering index belongs is a second section, the first representative value is determined as -20, when the range to which the first filtering parameter indicated by the first filtering index belongs is a third section, the first representative value is determined as -1, and when the range to which the first filtering parameter indicated by the first filtering index belongs is a fourth section, the first representative value is determined as 21.

[0210] In one embodiment, the image decoding device may obtain the first lookup table (930) determined or obtained from the image encoding device in advance and store it in the memory (130), or may obtain it from the image encoding device when performing image decoding.

[0211] Hereinafter, the operation of determining or obtaining the second lookup table based on the second cumulative distribution graph corresponds to the operation of determining or obtaining the first lookup table (930) based on the first cumulative distribution graph (910) of FIG. 9, and therefore the same content is omitted.

[0212] FIG. 10 is a diagram showing a graph of a first filtering parameter and a second filtering parameter according to one embodiment of the present disclosure.

[0213] In one embodiment, the video encoding device can determine optimal first and second filtering parameters to be used for filtering the current block. The video encoding device can obtain distribution information as a graph based on the first and second filtering parameters determined using learning data.

[0214] In one embodiment, the video encoding device can obtain the first transform filtering parameter and the second transform filtering parameter by clipping the first filtering parameter and the second filtering parameter to satisfy a preset bit condition. The video encoding device can obtain or determine the first filtering parameter and the second filtering parameter using the first transform filtering parameter and the second transform filtering parameter. The video encoding device can obtain distribution information of the first filtering parameter and the second filtering parameter for the learning data as a graph based on the first transform filtering parameter and the second transform filtering parameter for the learning data.

[0215] For example, the first mapping graph (1010) may include distribution information for the first filtering parameter and the second filtering parameter determined using learning data, and the information may be expressed as optimal xq. The first mapping graph (1010) may include distribution information for the first filtering parameter and the second filtering parameter determined based on the first transformation filtering parameter and the second transformation filtering parameter, and the information may be expressed as decoded xq' within the first mapping graph (1010).

[0216] In one embodiment, the video encoding device can obtain a first index indicating a range to which the first filtering parameter value belongs and a second index indicating a range to which the second filtering parameter value belongs. The video encoding device can obtain or determine the first filtering parameter and the second filtering parameter based on the first filtering index and the second filtering index. The video encoding device can obtain distribution information of the first filtering parameter and the second filtering parameter for the learning data as a graph based on the first filtering index and the second filtering index for the learning data.

[0217] For example, the second mapping graph (1020) may include distribution information of the first filtering parameter and the second filtering parameter obtained or determined using learning data, and the information may be the same as the distribution information of the first filtering parameter and the second filtering parameter determined using learning data of the first mapping graph (1010). The second mapping graph (1020) may include distribution information of the first filtering parameter and the second filtering parameter determined based on the first filtering index and the second filtering index, and the information may be expressed as decoded xq' within the second mapping graph (1020).

[0218] In one embodiment, it can be confirmed from the first mapping graph (1010) that the error between optimal xq, which is distribution information of the optimal first filtering parameter and the second filtering parameter determined in the image encoding device, and decoded xq', which is distribution information of the first filtering parameter and the second filtering parameter determined based on the first transformation filtering parameter and the second transformation filtering parameter to be used in the image decoding device, is relatively large.

[0219] In one embodiment, it can be confirmed from the second mapping graph (1020) that the error between optimal xq, which is distribution information of the optimal first filtering parameter and the second filtering parameter determined in the image encoding device, and decoded xq', which is distribution information of the first filtering parameter and the second filtering parameter determined based on the first filtering index and the second filtering index to be used in the image decoding device, is relatively small.

[0220] In one embodiment, when comparing the first mapping graph (1010) and the second mapping graph (1020), it can be confirmed that the range of optimal xq covered by decodec xq' in the second mapping graph (1020) is wider than the range of optimal xq covered by decoded xq' in the first mapping graph (1010).

[0221] Therefore, when the first filtering parameter and the second filtering parameter are obtained or determined using the first filtering index and the second filtering index in the image decoding device, it can be expected that values ​​identical to or similar to the optimal first filtering parameter and the optimal second filtering parameter determined for filtering in the image encoding device can be restored.

[0222] FIG. 11 is a diagram associated with a first filtering index and a second filtering index according to one embodiment of the present disclosure.

[0223] In one embodiment, the video encoding device may determine the first filtering index based on a first index table sorted based on frequency information about the first filtering index. The video encoding device may determine the second filtering index based on a second index table sorted based on frequency information about the second filtering index.

[0224] Hereinafter, the video encoding device will be described as an example in which the bit condition allocated for the first filtering parameter is 2 bits. In addition, the same description as in the case in which the bit condition allocated for the first filtering parameter of FIG. 9 is 2 bits will be omitted.

[0225] In one embodiment, the video encoding device may obtain or determine first filtering index values ​​corresponding to four sections each dividing the entire range to which the first filtering parameter value can belong, when the bit condition allocated for the first filtering parameter is 2 bits.

[0226] In one embodiment, the video encoding device may obtain frequency information (1110) about the first filtering index, which indicates information about the frequency corresponding to each first filtering index value of the learning data. For example, the frequency information (1110) about the first filtering index may include information that the first filtering index value corresponding to the first section is 0 and the frequency of appearance is 200 times, the first filtering index value corresponding to the second section is 1 and the frequency of appearance is 1000 times, the first filtering index value corresponding to the third section is 2 and the frequency of appearance is 200 times, and the first filtering index value corresponding to the fourth section is 3 and the frequency of appearance is 3000 times.

[0227] In one embodiment, the video encoding device may obtain a first index table (1120) in which frequency information (1110) regarding the first filtering index is sorted in descending order according to the frequency of appearance. For example, the video encoding device may newly determine the first filtering index value corresponding to the fourth section, in which the frequency of appearance was 3000 times, as 0 by sorting the frequency information (1110) regarding the first filtering index according to the frequency of appearance. In addition, the video encoding device may determine the first filtering index value corresponding to the second section, in which the frequency of appearance was 1000 times, as 1, the first filtering index value corresponding to the first section, in which the frequency of appearance was 200 times, as 2, and the first filtering index value corresponding to the third section, in which the frequency of appearance was 200 times, as 3. The first index table (1120) may include information determined by sorting the frequency information (1110) according to the frequency of appearance.

[0228] In one embodiment, the video encoding device may update the first lookup table (930) of FIG. 9 to the first lookup table (1130) of FIG. 11 based on the first index table (1120). The video encoding device or the video decoding device may determine the first filtering parameter based on the first lookup table (1130) and the first filtering index. For example, the video encoding device or the video decoding device may determine, based on the first lookup table (1130), when the first filtering index is 0, a range to which the first filtering parameter value belongs as the fourth section, and may determine 21, which is the first representative value indicated by the fourth section, as the first filtering parameter value.

[0229] Hereinafter, the operation of determining the second filtering index based on the second index table sorted based on frequency information about the second filtering index corresponds to the operation of determining the second filtering index based on the first index table (1120) sorted based on frequency information (1110) about the first filtering index, and therefore, the same description is omitted.

[0230] In one embodiment, the operation disclosed in FIG. 11 can reduce the entropy of values ​​stored in a bitstream and reduce the amount of bits.

[0231] FIG. 12 is a diagram illustrating an operation of filtering using a third filtering parameter or a fourth filtering parameter according to one embodiment of the present disclosure.

[0232] In one embodiment, the video encoding device can further obtain a third denoised block by performing filtering using a third denoising filter in addition to the first denoising filter and the second denoising filter. The video encoding device can obtain a filtered block for the current block by filtering the current block using the first denoised block, the second denoised block, and the third denoised block and the first filtering parameter, the second filtering parameter, and the third filtering parameter.

[0233] For example, the video encoding device currently blocks , the first denoised block , the second denoised block , the third denoised block , filtering the current block based on the first filtering parameter xq[0], the second filtering parameter xq[1], and the third filtering parameter xq[2], thereby obtaining a filtered block for the current block. It can be obtained according to the mathematical formula 5 below.

[0234] [Equation 5]

[0235]

[0236] In one embodiment, the video encoding device can determine an optimal first filtering parameter, a second filtering parameter, and a third filtering parameter for filtering.

[0237] For example, the image encoding device can determine the first filtering parameter, the second filtering parameter, and the third filtering parameter using the least squares method, etc. For example, the image encoding device can determine the block of the original image corresponding to the current block according to the least squares method of the following mathematical expression 6. and filtered blocks The first filtering parameter xq[0], the second filtering parameter xq[1], and the third filtering parameter xq[2] that minimize the difference can be determined.

[0238] [Equation 6]

[0239]

[0240] In one embodiment, the video encoding device can obtain or determine the first filtering index, the second filtering index, and the third filtering index by transforming the first filtering parameter, the second filtering parameter, and the third filtering parameter to satisfy preset bit conditions assigned to the first filtering parameter, the second filtering parameter, and the third filtering parameter. The video encoding device can generate a bitstream including information about the first filtering index, the second filtering index, and the third filtering index.

[0241] In one embodiment, a video decoding device can obtain information about a third filtering index used to filter a current block from a bitstream. For example, the video decoding device can obtain a third filtering index value from the bitstream. Alternatively, the video decoding device can obtain a third differential index value. The video decoding device can obtain the third filtering index for the current block by adding or subtracting the third differential index to the third filtering index for a previous image or a neighboring block. The video decoding device can obtain the third filtering index by adding or subtracting the third differential index to a third reference index.

[0242] In one embodiment, the video decoding device may determine a third filtering parameter value based on a range to which a third filtering parameter value indicated by a third filtering index belongs. The video decoding device may determine a first filtering parameter value corresponding to the acquired or determined third filtering index. For example, the third filtering parameter value may be determined as a third representative value of a range to which the first filtering parameter indicated by the third filtering index belongs. The third representative value may be determined in advance as one of a median value, an average value, and a mode value of third interval parameters for the range to which the third filtering parameter belongs.

[0243] In one embodiment, the video decoding device may determine a third filtering parameter based on a third filtering index and a third mapping function or a third lookup table. The video encoding device may design or determine a third mapping function based on third distribution information indicating a distribution of third filtering parameter values ​​according to learning data. The video encoding device may obtain a third cumulative distribution graph, which is a cumulative distribution graph of third filtering parameter values ​​according to learning data, and obtain or determine a third lookup table based on the third cumulative distribution graph.

[0244] In one embodiment, the image encoding device may share the third mapping function and the third lookup table with the image decoding device. The image decoding device may obtain the third mapping function or the third lookup table in advance and store it in memory (130), and may obtain it from the image encoding device to perform image decoding.

[0245] In one embodiment, the video decoding device filters the current block using the determined first filtering parameter value xq'[0], the determined second filtering parameter value xq'[1], and the determined third filtering parameter value xq'[2] according to Equation 5, thereby obtaining a filtered block for the current block. can be obtained.

[0246] In one embodiment, the video decoding device currently blocks , a first denoising block using a first denoising filter, a second denoising filter, and a third denoising filter. , the second denoised block and the third denoised block can be obtained. The video decoding device obtains a block filtered according to mathematical expression 7. can be obtained.

[0247] [Equation 7]

[0248]

[0249] In one embodiment, looking at the first diagram (1210), when filtering is performed using the first filtering parameter and the second filtering parameter in the manner disclosed in FIGS. 4 to 11, it can be expected that the error with the original block will be reduced compared to when filtering is performed using only the first filtering parameter.

[0250] In one embodiment, referring to the second diagram (1220), when filtering is performed using the first filtering parameter, the second filtering parameter, and the third filtering parameter, the error from the original block can be expected to be reduced more than when filtering is performed using only the first filtering parameter and the second filtering parameter. Furthermore, as the number of filtering parameters increases, the error from the original block can be expected to be further reduced.

[0251] Meanwhile, without being limited to the disclosed example, the image decoding device may obtain a filtered block by further utilizing at least one filtering parameter different from the third filtering parameter. For example, the at least one filtering parameter different from the third filtering parameter may include a fourth filtering parameter.

[0252] In one embodiment, the third filtering parameter and the fourth filtering parameter may correspond to the first filtering parameter and the second filtering parameter, respectively, and the third filtering index and the fourth filtering index may correspond to the first filtering index and the second filtering index. In addition, the third denoising filter and the fourth denoising filter may correspond to the first denoising filter and the second denoising filter. The same description is omitted.

[0253] In one embodiment, the video encoding device currently blocks , the first denoised block , the second denoised block , the third denoised block , the fourth denoised block , filtering the current block based on the first filtering parameter xq[0], the second filtering parameter xq[1], the third filtering parameter xq[2], and the fourth filtering parameter xq[3], thereby obtaining a filtered block for the current block. It can be obtained according to the mathematical formula 8 below.

[0254] [Equation 8]

[0255]

[0256] In one embodiment, the image encoding device can determine the optimal first filtering parameter, second filtering parameter, third filtering parameter, and fourth filtering parameter using the least squares method, etc. For example, the image encoding device can determine the block of the original image corresponding to the current block according to the least squares method of the following mathematical expression 9. and filtered blocks A first filtering parameter, a second filtering parameter, a third filtering parameter, and a fourth filtering parameter that minimize the difference can be determined.

[0257] [Equation 9]

[0258]

[0259] In one embodiment, the video encoding device can obtain or determine the first filtering index, the second filtering index, the third filtering index, and the fourth filtering index by transforming the bit conditions allocated for the first filtering parameter, the second filtering parameter, the third filtering parameter, and the fourth filtering parameter to satisfy the bit conditions. The video encoding device can generate a bitstream including information about the first filtering index, the second filtering index, the third filtering index, and the fourth filtering index.

[0260] In one embodiment, the video decoding device can obtain information about a fourth filtering index used to filter a current block from a bitstream.

[0261] In one embodiment, the image decoding device can determine the fourth filtering parameter value based on a range to which the fourth filtering parameter value indicated by the fourth filtering index belongs.

[0262] In one embodiment, the video decoding device filters the current block using the determined first filtering parameter value xq'[0], the determined second filtering parameter value xq'[1], the determined third filtering parameter value xq'[2], and the determined fourth filtering parameter value xq'[3], thereby obtaining a filtered block for the current block. can be obtained.

[0263] In one embodiment, the video decoding device currently blocks , a first denoising block using a first denoising filter, a second denoising filter, a third denoising filter, and a fourth denoising filter. , the second denoised block , the third denoised block , the fourth denoised block can be obtained. The video decoding device obtains a filtered block according to mathematical expression 10. can be obtained.

[0264] [Equation 10]

[0265]

[0266] In one embodiment, the video encoding device or the video decoding device may additionally perform filtering on the filtered block of FIG. 5 using a third filtering parameter and a fourth filtering parameter.

[0267] In one embodiment, the video encoding device can determine a first filtering parameter and a second filtering parameter according to mathematical expressions 1 and 2, and can obtain a filtered block as an intermediate filtered block based on the determined first filtering parameter and second filtering parameter.

[0268] In one embodiment, the video encoding device, according to Equation 11, intermediate filtered blocks , the first denoised block , the second denoised block , by performing filtering based on the third filtering parameter xq[2] and the fourth filtering parameter xq[3], the filtered block can be obtained.

[0269] [Equation 11]

[0270]

[0271] In one embodiment, the video encoding device can determine the optimal third filtering parameter and the fourth filtering parameter for filtering. For example, the video encoding device can determine the block of the original image corresponding to the current block according to the least square method of the following mathematical expression 12. and filtered blocks The third filtering parameter and the fourth filtering parameter that minimize the difference can be determined.

[0272] [Equation 12]

[0273]

[0274] In one embodiment, the video encoding device can obtain or determine the first filtering index, the second filtering index, the third filtering index, and the fourth filtering index by transforming the first filtering parameter, the second filtering parameter, the third filtering parameter, and the fourth filtering parameter to satisfy bit conditions assigned to each filtering parameter. The video encoding device can generate a bitstream including information about the first filtering index, the second filtering index, the third filtering index, and the fourth filtering index.

[0275] In one embodiment, the video decoding device can obtain information about a first filtering index to a fourth filtering index used to filter a current block from a bitstream.

[0276] In one embodiment, the image decoding device can determine the first filtering index to the fourth filtering parameter values ​​based on the first filtering index to the fourth filtering index.

[0277] In one embodiment, the image decoding device can obtain an intermediate filtered block by applying a first filtering parameter value to a first differential block and a second filtering parameter value to a second differential block. Furthermore, the image decoding device can obtain a filtered block by applying a third filtering parameter value to a third differential block representing a difference between the first denoised block and the intermediate filtered block and applying a fourth filtering parameter value to a fourth differential block representing a difference between the second denoised block and the intermediate filtered block.

[0278] For example, the video decoding device filters blocks according to mathematical expressions 13 and 14. can be obtained. The video decoding device obtains the current block according to mathematical expression 13. , using the determined first filtering parameter value xq'[0] and the determined second filtering parameter value xq'[1], the intermediate filtered block can be obtained. The video decoding device obtains an intermediate filtered block according to mathematical expression 14. , filtering the current block using the determined third filtering parameter value xq'[2] and the fourth filtering parameter value xq'[3] to obtain the filtered block. can be obtained.

[0279] [Equation 13]

[0280]

[0281] [Equation 14]

[0282]

[0283] In one embodiment, by performing filtering according to the above mathematical expressions 11 to 14, the image encoding device and the image decoding device can save the amount of calculation by reusing the first denoised image and the second denoised image, and can expect the effect of improving the image quality by using the third differential block and the fourth differential block having different directions from the first differential block and the second differential block.

[0284] FIG. 13 is a flowchart illustrating a method for encoding an image according to one embodiment of the present disclosure.

[0285] In step S1310, the image encoding device can determine a first filtering parameter value and a second filtering parameter value used to filter a current block in a current image.

[0286] In one embodiment, the video encoding device can determine the optimal first filtering parameter value and the optimal second filtering parameter value for filtering the current block in the current image according to mathematical expressions 1 and 2. Hereinafter, the operation of the video encoding device filtering the current block in the current image according to mathematical expressions 1 and 2 has been described in detail in FIGS. 4 and 5, and therefore, the same content is omitted.

[0287] In step S1320, the image encoding device can obtain a first filtering index indicating a range to which the first filtering parameter value belongs based on the first filtering parameter value.

[0288] In one embodiment, the video encoding device can obtain a plurality of sections by dividing the entire range to which the first filtering parameter value can belong based on learning data. The video encoding device can obtain a first filtering index corresponding to the range to which the determined first filtering parameter value belongs. The video encoding device can obtain the first filtering index by using information about the first filtering index corresponding to each of the plurality of sections obtained by dividing the entire range to which the first filtering parameter value can belong, based on the first filtering parameter and the first distribution function or the first filtering parameter. Hereinafter, the operation of the video encoding device obtaining the first filtering index indicating the range to which the first filtering parameter value belongs based on the first filtering parameter value has been described in detail with reference to FIGS. 5 to 11, and therefore the same content will be omitted.

[0289] In step S1330, the image encoding device can obtain a second filtering index indicating a range to which the second filtering parameter value belongs based on the second filtering parameter value.

[0290] In one embodiment, the video encoding device can obtain a plurality of sections by dividing the entire range to which the second filtering parameter value can belong based on learning data. The video encoding device can obtain a second filtering index corresponding to the range to which the determined second filtering parameter value belongs. The video encoding device can obtain the second filtering index by using information about the second filtering index corresponding to each of the plurality of sections obtained by dividing the entire range to which the second filtering parameter value can belong, based on the second filtering parameter and the second distribution function or the second filtering parameter. Hereinafter, the operation of the video encoding device obtaining the second filtering index indicating the range to which the second filtering parameter value belongs based on the second filtering parameter value has been described in detail with reference to FIGS. 5 to 11, and therefore the same content will be omitted.

[0291] In step S1340, the video encoding device can obtain a bitstream including a first filtering index and a second filtering index.

[0292] In one embodiment, the video encoding device can generate a bitstream including information regarding a first filtering index and a second filtering index.

[0293] For example, a bitstream including information about a first filtering index and a second filtering index may include at least one of a first filtering index value and a second filtering index value, a first differential index value and a second differential index value, and a first reference index and a second reference index value. Hereinafter, an operation of a video encoding device generating a bitstream including information about a first filtering index and a second filtering index has been described in detail with reference to FIGS. 5 to 11, and therefore, the same content is omitted.

[0294] In one embodiment, a method for decoding an image may be provided. The method for decoding an image may include a step of obtaining, from a bitstream, information about a first filtering index and a second filtering index used to filter a current block in a current image. The method for decoding an image may include a step of determining a first filtering parameter value based on a range to which a first filtering parameter value indicated by the first filtering index belongs. The method for decoding an image may include a step of determining a second filtering parameter value based on a range to which a second filtering parameter value indicated by the second filtering index belongs. The method for decoding an image may include a step of filtering a current block using the determined first filtering parameter value and the determined second filtering parameter value to obtain a filtered block. The range to which the first filtering parameter value belongs may include one of a plurality of sections obtained by dividing the entire range to which the first filtering parameter value can belong. The range to which the second filtering parameter value belongs may include one of a plurality of sections obtained by dividing the entire range to which the second filtering parameter value can belong.

[0295] In one embodiment, a plurality of intervals obtained by dividing the entire range to which the first filtering parameter value can belong may be predetermined based on first distribution information regarding the first filtering parameter. A plurality of intervals obtained by dividing the entire range to which the second filtering parameter value can belong may be predetermined based on second distribution information regarding the second filtering parameter.

[0296] In one embodiment, the first filtering parameter value may be determined as a first representative value of a range to which the first filtering parameter value indicated by the first filtering index belongs. In one embodiment, the second filtering parameter value may be determined as a second representative value of a range to which the second filtering parameter value indicated by the second filtering index belongs. The first representative value may be one of a median, an average, and a mode of the first interval parameters for the range to which the first filtering parameter belongs. The second representative value may be one of a median, an average, and a mode of the second interval parameters for the range to which the second filtering parameter belongs.

[0297] In one embodiment, a method for decoding an image may include the step of obtaining a first denoised block and a second denoised block using a current block, a first denoising filter, and a second denoising filter. The method for decoding an image may include the step of applying a first filtering parameter value to a first difference block representing a difference between the first denoised block and the current block, and applying a second filtering parameter value to a second difference block representing a difference between the second denoised block and the current block. The second denoising filter may be different from the first denoising filter.

[0298] In one embodiment, the number of multiple intervals obtained by dividing the entire range to which the first filtering parameter value can belong may be determined in consideration of the bit condition allocated for the first filtering parameter. The number of multiple intervals obtained by dividing the entire range to which the second filtering parameter value can belong may be determined in consideration of the bit condition allocated for the second filtering parameter.

[0299] In one embodiment, the method of decoding an image may further include a step of clipping the filtered current block so as to satisfy a bit condition assigned for the current block.

[0300] In one embodiment, the method for decoding an image may further include a step of obtaining, from a bitstream, information indicating whether to filter a current block. In one embodiment, the method for decoding an image may further include a step of obtaining, from a bitstream, information indicating whether to filter a current block using a first filtering index and a second filtering index.

[0301] In one embodiment, the first filtering index may be determined using a first reference index determined based on frequency information about the first filtering index. The second filtering index may be determined using a second reference index determined based on frequency information about the second filtering index.

[0302] In one embodiment, the first filtering index may be determined based on a first index table sorted based on frequency information about the first filtering index. The second filtering index may be determined based on a second index table sorted based on frequency information about the second filtering index.

[0303] In one embodiment, the method for decoding an image may further include a step of obtaining information about a third filtering index used to filter a current block from a bitstream. The method for decoding an image may further include a step of determining a third filtering parameter value based on a range to which a third filtering parameter value indicated by the third filtering index belongs.

[0304] In one embodiment, the method for decoding an image may further include a step of obtaining information about a fourth filtering index used to filter a current block from a bitstream. The method for decoding an image may further include a step of determining a fourth filtering parameter value based on a range to which a fourth filtering parameter value indicated by the fourth filtering index belongs. In one embodiment, the method for decoding an image may include a step of obtaining a first denoised block and a second denoised block using a current block, a first denoising filter, and a second denoising filter. The method for decoding an image may include a step of obtaining an intermediate filtered block by applying a first filtering parameter value to a first difference block representing a difference between the first denoised block and the current block, and applying a second filtering parameter value to a second difference block representing a difference between the second denoised block and the current block. The method for decoding an image may include applying a third filtering parameter value to a third difference block representing a difference between a first denoised block and an intermediate filtered block, and applying a fourth filtering parameter value to a fourth difference block representing a difference between a second denoised block and an intermediate filtered block.

[0305] In one embodiment, an image decoding device may be provided, including at least one memory storing at least one instruction; and at least one processor operating according to the at least one instruction. The at least one processor may obtain, from a bitstream, information regarding a first filtering index and a second filtering index used to filter a current block in a current image. The at least one processor may determine a first filtering parameter value based on a range to which a first filtering parameter value indicated by the first filtering index belongs. The at least one processor may determine a second filtering parameter value based on a range to which a second filtering parameter value indicated by the second filtering index belongs. The at least one processor may filter a current block using the determined first filtering parameter value and the determined second filtering parameter value to obtain a filtered block. The range to which the first filtering parameter value belongs may include one of a plurality of sections obtained by dividing the entire range to which the first filtering parameter value can belong. The range to which the second filtering parameter value belongs may include one of a plurality of sections obtained by dividing the entire range to which the second filtering parameter value can belong.

[0306] In one embodiment, a video encoding method may be provided. The video encoding method may include a step of determining a first filtering parameter value and a second filtering parameter value used to filter a current block in a current video. The video encoding method may include a step of obtaining a first filtering index indicating a range to which the first filtering parameter value belongs, based on the first filtering parameter value. The video encoding method may include a step of obtaining a second filtering index indicating a range to which the second filtering parameter value belongs, based on the second filtering parameter value. The video encoding method may include a step of generating a bitstream including information about the first filtering index and the second filtering index. The range to which the first filtering parameter value belongs may include one of a plurality of sections obtained by dividing the entire range to which the first filtering parameter value can belong. The range to which the second filtering parameter value belongs may include one of a plurality of sections obtained by dividing the entire range to which the second filtering parameter value can belong.

[0307] In one embodiment, an image encoding device may be provided, including at least one memory storing at least one instruction; and at least one processor operating according to the at least one instruction. The at least one processor may determine a first filtering parameter value and a second filtering parameter value used to filter a current block in a current image. The at least one processor may obtain a first filtering index indicating a range to which the first filtering parameter value belongs based on the first filtering parameter value. The at least one processor may obtain a second filtering index indicating a range to which the second filtering parameter value belongs based on the second filtering parameter value. The at least one processor may generate a bitstream including information about the first filtering index and the second filtering index. The range to which the first filtering parameter value belongs may include one of a plurality of sections obtained by dividing the entire range to which the first filtering parameter value may belong, and the range to which the second filtering parameter value belongs may include one of a plurality of sections obtained by dividing the entire range to which the second filtering parameter value may belong.

[0308] In one embodiment, a computer-readable recording medium having a bitstream recorded thereon may be provided. The bitstream may include information regarding a first filtering index and a second filtering index. The first filtering index indicates a range to which a first filtering parameter value belongs, and the first filtering parameter value may be determined based on the range to which the first filtering parameter value belongs. The second filtering index indicates a range to which a second filtering parameter value belongs, and the second filtering parameter value may be determined based on the range to which the second filtering parameter value belongs. The range to which the first filtering parameter value belongs may include one of a plurality of sections obtained by dividing the entire range to which the first filtering parameter value may belong. The range to which the second filtering parameter value belongs may include one of a plurality of sections obtained by dividing the entire range to which the second filtering parameter value may belong.

[0309] A device-readable storage medium may be provided in the form of a non-transitory storage medium. Here, the term "non-transitory storage medium" simply means a tangible device that does not contain signals (e.g., electromagnetic waves). This term does not distinguish between cases where data is permanently stored in the storage medium and cases where data is temporarily stored. For example, a "non-transitory storage medium" may include a buffer in which data is temporarily stored.

[0310] According to one embodiment, the method according to various embodiments disclosed in the present document may be provided as included in a computer program product. The computer program product may be traded as a product between a seller and a buyer. The computer program product may be distributed in the form of a machine-readable storage medium (e.g., compact disc read-only memory (CD-ROM)), or may be distributed online (e.g., downloaded or uploaded) through an application store or directly between two user devices (e.g., smartphones). In the case of online distribution, at least a portion of the computer program product (e.g., a downloadable app) may be temporarily stored or temporarily generated in a machine-readable storage medium, such as the memory of a manufacturer's server, an application store's server, or an intermediary server.

Claims

1. In the method of decrypting a video, A step (S510) of obtaining information about a first filtering index and a second filtering index used to filter a current block in a current image from a bitstream; A step (S520) of determining the first filtering parameter value based on the range to which the first filtering parameter value indicated by the first filtering index belongs; Step (S530) of determining the second filtering parameter value based on the range to which the second filtering parameter value indicated by the second filtering index belongs; and A step (S540) of obtaining a filtered block for the current block by filtering the current block using the determined first filtering parameter value and the determined second filtering parameter value, The range to which the first filtering parameter value belongs includes one of a plurality of intervals obtained by dividing the entire range to which the first filtering parameter value can belong, A method for decoding an image, wherein the range to which the second filtering parameter value belongs includes one of a plurality of sections obtained by dividing the entire range to which the second filtering parameter value can belong.

2. In paragraph 1, A plurality of intervals obtained by dividing the entire range to which the above first filtering parameter value can belong are, is determined in advance based on first distribution information regarding the first filtering parameter, A plurality of intervals obtained by dividing the entire range to which the above second filtering parameter value can belong are, An image decoding method, wherein the second distribution information regarding the second filtering parameter is determined in advance.

3. In any one of paragraphs 1 and 2, The above first filtering parameter value is, The first filtering parameter value indicated by the first filtering index is determined as the first representative value of the range to which it belongs, The above second filtering parameter value is, The second filtering parameter value indicated by the second filtering index is determined as the second representative value of the range to which it belongs, The above first representative value is, One of the median, mean, and mode of the first interval parameters with respect to the range to which the first filtering parameter belongs, The second representative value above is, A method for decoding an image, wherein the second filtering parameter is one of a median, an average, and a mode of second interval parameters in a range to which the second filtering parameter belongs.

4. In any one of paragraphs 1 to 3, The step of obtaining the above filtered block is: A step of obtaining a first denoised block and a second denoised block using the current block, the first denoising filter, and the second denoising filter; and A step of applying the first filtering parameter value to a first differential block representing the difference between the first denoised block and the current block, and applying the second filtering parameter value to a second differential block representing the difference between the second denoised block and the current block, A method for decoding an image, wherein the second denoising filter is different from the first denoising filter.

5. In any one of paragraphs 1 to 4, The number of multiple intervals obtained by dividing the entire range to which the above first filtering parameter value can belong is, is determined by considering the bit conditions allocated for the above first filtering parameter, The number of multiple intervals obtained by dividing the entire range to which the above second filtering parameter value can belong is, An image decoding method determined by considering the bit conditions allocated for the second filtering parameter.

6. In any one of paragraphs 1 to 5, A method for decoding an image, further comprising the step of clipping the filtered block so as to satisfy a bit condition allocated for the current block.

7. In any one of paragraphs 1 to 6, A method for decoding an image, further comprising the step of obtaining information indicating whether to filter the current block from the bitstream.

8. In any one of paragraphs 1 to 7, A video decoding method, further comprising the step of obtaining information indicating whether to filter the current block using the first filtering index and the second filtering index from the bitstream.

9. In any one of paragraphs 1 to 8, The above first filtering index is, It is determined using the first reference index determined based on the frequency information about the first filtering index, The above second filtering index is, An image decoding method, wherein the second reference index is determined based on frequency information about the second filtering index.

10. In any one of paragraphs 1 to 9, The above first filtering index is, It is determined based on a first index table sorted based on frequency information about the first filtering index, The above second filtering index is, An image decoding method, wherein the second index table is determined based on frequency information about the second filtering index.

11. In any one of paragraphs 1 to 10, A step of obtaining information about a third filtering index used to filter the current block from the bitstream; and A method for decoding an image, further comprising the step of determining a third filtering parameter value based on a range to which a third filtering parameter value indicated by the third filtering index belongs.

12. In paragraph 11, A step of obtaining information about a fourth filtering index used to filter the current block from the bitstream; and A method for decoding an image, further comprising the step of determining a fourth filtering parameter value based on a range to which a fourth filtering parameter value indicated by the fourth filtering index belongs.

13. In paragraph 12, The step of obtaining the above filtered block is: A step of obtaining a first denoised block and a second denoised block using the current block, the first denoising filter, and the second denoising filter; A step of obtaining an intermediate filtered block by applying the first filtering parameter value to a first differential block representing the difference between the first denoised block and the current block, and applying the second filtering parameter value to a second differential block representing the difference between the second denoised block and the current block; and A method for decoding an image, comprising the step of applying a third filtering parameter value to a third differential block representing a difference between the first denoised block and the intermediate filtered block, and applying a fourth filtering parameter value to a fourth differential block representing a difference between the second denoised block and the intermediate filtered block.

14. In the video encoding method, Step (S1310) of determining a first filtering parameter value and a second filtering parameter value used to filter a current block in a current image; A step (S1320) of obtaining a first filtering index indicating a range to which the first filtering parameter value belongs, based on the first filtering parameter value; Step (S1330) of obtaining a second filtering index indicating a range to which the second filtering parameter value belongs based on the second filtering parameter value; and A step (S1340) of generating a bitstream including information about the first filtering index and the second filtering index, The range to which the first filtering parameter value belongs includes one of a plurality of intervals obtained by dividing the entire range to which the first filtering parameter value can belong, A video encoding method, wherein the range to which the second filtering parameter value belongs includes one of a plurality of sections obtained by dividing the entire range to which the second filtering parameter value can belong.

15. In a computer-readable recording medium that records a bitstream, The above bitstream is, Contains information about the first filtering index and the second filtering index, The first filtering index indicates a range to which the first filtering parameter value belongs, and the first filtering parameter value is determined based on the range to which the first filtering parameter value belongs. The second filtering index indicates a range to which the second filtering parameter value belongs, and the second filtering parameter value is determined based on the range to which the second filtering parameter value belongs. The range to which the first filtering parameter value belongs includes one of a plurality of intervals obtained by dividing the entire range to which the first filtering parameter value can belong, A recording medium, wherein the range to which the second filtering parameter value belongs includes one of a plurality of sections obtained by dividing the entire range to which the second filtering parameter value can belong.

Citation Information

Patent Citations

  • Method for encoding / decoding image and device for same

    KR1020180009048A

  • Non-linear adaptive loop filtering in video processing

    KR102606010B1

  • Signaled adaptive loop filter with multiple classifiers in video coding

    US20230010869A1

  • Adaptive loop filter with samples before deblocking filter and samples before sample adaptive offsets

    US20230300328A1

  • KR20190008230A