Image decoding method, image encoding method, and method for generating a bitstream
By decoding the limiting range information in the image decoding method and performing SAO filtering, the problem of low compression efficiency in the image encoding/decoding process in the prior art is solved, and more efficient compression and bitstream storage are achieved.
Patent Information
- Application Number
- CN202210862636.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2017-01-20
- Filing Date
- 2018-01-16
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2038-01-16
AI Technical Summary
The prior art is difficult to effectively improve compression efficiency during image encoding/decoding, especially when using the pixel range of any image area.
Information related to the limiting range is decoded in the image decoding method, and sample adaptive offset (SAO) filtering is performed based on this information, including determining the limiting range of the current block and band-like area processing when performing the band-like offset mode.
The compression efficiency during the image encoding/decoding process is improved, and the pixel range of any image area can be effectively utilized, and the generated bit stream can be saved on a computer-readable recording medium.
Smart Images

Figure CN115174903B_ABST
Abstract
Description
[0001] This application is a divisional application of the patent application with the application date of January 16, 2018, application number 201880007610.0, and title "Image Coding Method / Device, Image Decoding Method / Device, and Recording Medium Storing Bitstream". Technical Field
[0002] The present invention relates to an image coding / decoding method and device. Specifically, it relates to an image coding / decoding method and device capable of improving compression efficiency by using the pixel range of an arbitrary image area. Background Art
[0003] In recent years, the demand for multimedia data such as videos on the Internet has been increasing rapidly. However, the current development speed of the channel bandwidth is difficult to fully meet the rapidly increasing amount of multimedia data. As part of this trend, the Video Coding Expert Group (VCEG) of the International Telecommunication Union Telecommunication Standardization Sector (ITU-T), an international standardization organization, and the Moving Picture Expert Group (MPEG) of the International Organization for Standardization / International Electrotechnical Commission (ISO / IEC) are working on developing a more efficient video compression standard through persistent collaborative research. Summary of the Invention
[0004] Technical Problem
[0005] An object of the present invention is to provide an image coding / decoding method and device capable of improving compression efficiency during the encoding / decoding process of an image.
[0006] In addition, an object of the present invention is to provide an image coding / decoding method and device capable of improving compression efficiency by using the pixel range of an arbitrary image area during the encoding / decoding process of an image.
[0007] In addition, an object of the present invention is to provide a computer-readable recording medium capable of storing the bitstream generated by applying the image coding method / device of the present invention.
[0008] Technical Solution
[0009] The video decoding method applicable to the present invention may include: a step of decoding information related to the clipping range of a current block; and a step of performing Sample Adaptive Offset (SAO) filtering based on the information related to the clipping range; wherein, the information related to the clipping range may include the maximum value and the minimum value information of the pixel values included in the current block.
[0010] In the video decoding method applicable to the present invention, the information related to the clipping range of the current block may be transmitted in the unit of the current block or any region including the current block.
[0011] In the video decoding method applicable to the present invention, the any region unit may include at least one of an image unit, a parallel block unit, and a strip unit.
[0012] In the video decoding method applicable to the present invention, the maximum value and the minimum value information may include one of the maximum value and the minimum value and the difference information between the maximum value and the minimum value.
[0013] In the video decoding method applicable to the present invention, when the Sample Adaptive Offset (SAO) mode of the current block is the Band Offset (BO) mode, it may further include: a step of decoding an initial band region position related to the initial position of the band region interval to which the band offset is applied; and a step of decoding M offset information of the band region interval to which the band offset is applied; wherein, the M may be determined based on at least one of the decoded initial band region position, the minimum value, and the maximum value.
[0014] In the video decoding method applicable to the present invention, when the Sample Adaptive Offset (SAO) mode of the current block is the band offset mode, it may further include: a step of further dividing the interval between the maximum value and the minimum value into 32 band regions; wherein, the initial band region position related to the initial position of the band region interval to which the band offset is applied may be the positions of the 32 further divided band regions.
[0015] The video encoding method applicable to the present invention may include: a step of determining the clipping range of a current block; a step of performing Sample Adaptive Offset (SAO) filtering based on the clipping range; and a step of encoding the information related to the clipping range; wherein, the information related to the clipping range may include the maximum value and the minimum value information of the pixel values included in the current block.
[0016] In the video encoding method to which the present invention is applied, the information related to the clipping range of the current block can be encoded in units of the current block or any region including the current block.
[0017] In the video encoding method to which the present invention is applied, the above-mentioned any region unit can include at least one of an image unit, a parallel block unit, and a stripe unit.
[0018] In the video encoding method to which the present invention is applied, the above-mentioned maximum value and minimum value information can include one of the maximum value and the minimum value and the difference information between the maximum value and the minimum value.
[0019] In the video encoding method to which the present invention is applied, when the sample adaptive offset (SAO) mode of the current block is the band offset (BO) mode, it can further include: a step of determining an initial band region position related to the initial position of the band region section to which the band offset is applied; a step of determining M offset information of the band region section to which the band offset is applied; and a step of encoding the initial band region position and the M offset information; where M can be determined based on at least one of the initial band region position, the minimum value, and the maximum value.
[0020] In the video encoding method to which the present invention is applied, when the sample adaptive offset (SAO) mode of the current block is the band offset mode, it can further include: a step of further dividing the interval between the maximum value and the minimum value into 32 band regions; where the initial band region position related to the initial position of the band region section to which the band offset is applied can be the positions of the 32 band regions obtained by the further division.
[0021] A video decoding apparatus to which the present invention is applied can include: a decoding unit that decodes information related to the clipping range of a current block; and a filtering unit that performs sample adaptive offset (SAO) filtering based on the information related to the clipping range; where the information related to the clipping range can include the maximum value and the minimum value information of the pixel values included in the current block.
[0022] A video encoding apparatus to which the present invention is applied can include: an encoding unit that determines the clipping range of a current block and encodes the clipping range information; and a filtering unit that performs sample adaptive offset (SAO) filtering based on the clipping range; where the information related to the clipping range can include the maximum value and the minimum value information of the pixel values included in the current block.
[0023] The video decoding method applicable to the present invention may include: a step of decoding the index information of the clipped band region of the current block; and a step of performing Sample Adaptive Offset (SAO) filtering based on the index information of the clipped band region; wherein, the index information of the clipped band region may be information indicating the clipped band region including the maximum value and the minimum value of the pixel values included in the current block.
[0024] In the video decoding method applicable to the present invention, the index information of the clipped band region of the current block may be transmitted in the unit of the current block or any region including the current block.
[0025] In the video decoding method applicable to the present invention, the any region unit may include at least one of an image unit, a parallel block unit, and a stripe unit.
[0026] In the video decoding method applicable to the present invention, the clipped band region may include N intervals obtained by dividing the range from the maximum pixel value to the minimum pixel value into N intervals, and the index information of the clipped band region may be information indicating a certain interval among the N intervals.
[0027] In the video decoding method applicable to the present invention, when the maximum value and the minimum value of the pixels included in the current block are included in the same band region, the index information of the clipped band region may be information indicating the same band region.
[0028] In the video decoding method applicable to the present invention, when the maximum value and the minimum value of the pixels included in the current block are not included in the same band region, the index information of the clipped band region may include information indicating the band region including the maximum value and information indicating the minimum value.
[0029] The video encoding method applicable to the present invention may include: a step of determining the clipping range of the current block; a step of determining the clipped band region of the current block based on the clipping range; a step of performing Sample Adaptive Offset (SAO) filtering based on the clipped band region; and a step of encoding the index information of the clipped band region; wherein, the index information of the clipped band region may be information indicating the clipped band region including the maximum value and the minimum value of the pixel values included in the current block.
[0030] In the video encoding method applicable to the present invention, the index information of the clipped band region of the current block may be encoded in the unit of the current block or any region including the current block.
[0031] In the image coding method to which the present invention is applied, any of the above-mentioned region units can include at least one of an image unit, a parallel block unit, and a strip unit.
[0032] In the image coding method to which the present invention is applied, the above-mentioned clipping band region can include N intervals obtained by dividing the range from the maximum pixel value to the minimum pixel value into N intervals, and the above-mentioned clipping band region index information can be information indicating a certain interval among the above-mentioned N intervals.
[0033] In the image coding method to which the present invention is applied, when the maximum value and the minimum value of the pixels included in the above-mentioned current block are included in the same band region, the above-mentioned clipping band region index information can be information indicating the above-mentioned same band region.
[0034] In the image coding method to which the present invention is applied, when the maximum value and the minimum value of the pixels included in the above-mentioned current block are not included in the same band region, the above-mentioned clipping band region index information can include information indicating the band region including the above-mentioned maximum value and information indicating the above-mentioned minimum value.
[0035] An image decoding apparatus to which the present invention is applied can include: a decoding unit that decodes the clipping band region index information of a current block; and a filtering unit that performs Sample Adaptive Offset (SAO) filtering based on the above-mentioned clipping band region index information; wherein the above-mentioned clipping band region index information can be information indicating a clipping band region including the maximum value and the minimum value of the pixel values included in the above-mentioned current block.
[0036] An image coding apparatus to which the present invention is applied can include: an encoding unit that determines a clipping range of a current block, determines the above-mentioned clipping band region of the current block based on the above-mentioned clipping range, and encodes the clipping band region index information; and a filtering unit that performs Sample Adaptive Offset (SAO) filtering based on the above-mentioned clipping band region; wherein the above-mentioned clipping band region index information can be information indicating a clipping band region including the maximum value and the minimum value of the pixel values included in the above-mentioned current block.
[0037] A computer-readable recording medium to which the present invention is applied can store a bitstream generated by applying the image coding method or the image coding apparatus of the present invention.
[0038] Advantageous Effects
[0039] Through the present invention, an image coding / decoding method and apparatus capable of improving compression efficiency can be provided.
[0040] In addition, through the present invention, an image encoding / decoding method and apparatus capable of improving compression efficiency by using the pixel range of an arbitrary image area can be provided.
[0041] In addition, through the present invention, a computer-readable recording medium capable of storing a bitstream generated by applying the image encoding method or image encoding apparatus of the present invention can be provided. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 It is a schematic diagram illustrating an image encoding apparatus to which one embodiment of the present invention is applied.
[0043] Figure 2 It is a schematic diagram illustrating an image decoding apparatus to which one embodiment of the present invention is applied.
[0044] Figure 3 It is a schematic diagram for explaining an Edge Offset (EO) mode.
[0045] Figure 4 It is a schematic diagram for explaining a Band Offset (BO) mode.
[0046] Figure 5 It is a schematic diagram for explaining a method of encoding Sample Adaptive Offset (SAO) information in the image encoding apparatus 100.
[0047] Figure 6 It is a schematic diagram for explaining a method of decoding Sample Adaptive Offset (SAO) information in the image decoding apparatus 200.
[0048] Figure 7 It is a schematic diagram for explaining a clipping range within an arbitrary area and an available band area of a Band Offset (BO) mode.
[0049] Figure 8 It is a schematic diagram illustrating a state in which an available band area section of a Band Offset (BO) mode is further subdivided into 32 band area sections.
[0050] Figure 9 It is a schematic diagram for explaining a method of correcting residual block coefficients by using a clipping range in arbitrary area units.
[0051] Figure 10 It is a schematic diagram for explaining a method of encoding clipping information in image units.
[0052] Figure 11It is a schematic diagram for explaining a method of decoding clipping information performed in image units.
[0053] Figure 12 It is a schematic diagram for explaining a method of encoding clipping information performed in arbitrary block units.
[0054] Figure 13 It is a schematic diagram for explaining a method of decoding clipping information performed in arbitrary block units.
[0055] Figure 14 It is a sequence diagram for explaining a method of encoding sample adaptive offset (SAO) information based on a clipping range applicable to an embodiment of the present invention.
[0056] Figure 15 It is a sequence diagram for explaining a method of decoding sample adaptive offset (SAO) information based on a clipping range applicable to an embodiment of the present invention.
[0057] Figure 16 It is a schematic diagram for explaining a method of determining a clipping band region applicable to the present invention.
[0058] Figure 17 It is a schematic diagram for explaining a method of encoding clipping information performed in image units.
[0059] Figure 18 It is a schematic diagram for explaining a method of decoding clipping information performed in image units.
[0060] Figure 19 It is a schematic diagram for explaining a method of encoding clipping information performed in arbitrary block units.
[0061] Figure 20 It is a schematic diagram for explaining a method of decoding clipping information performed in arbitrary block units.
[0062] Figure 21 It is a schematic diagram for explaining a clipping application position applicable to the present invention in the video encoding device 100 and the video decoding device 200.
[0063] Figure 22 It is a schematic diagram for explaining a method of determining different category offset values considering a clipping range in the edge offset (EO) mode.
[0064] Figure 23 It is a schematic diagram for explaining a method of determining an offset considering a clipping range when determining an offset value for each band region in the band offset (BO) mode.
[0065] Figure 24 It is a schematic diagram for explaining a method of encoding sample adaptive offset (SAO) information.
[0066] Figure 25 It is a schematic diagram for explaining a method of decoding sample adaptive offset (SAO) information.
[0067] Figure 26 It is a schematic diagram for explaining a process of performing decoder-side motion vector derivation (DMVD) based on a clipping range according to another embodiment of the present invention.
[0068] Figure 27 It is a sequence diagram for explaining a process of performing deblocking filtering based on a clipping range according to another embodiment of the present invention. Detailed implementation manners
[0069] The present invention can be variously modified and has multiple different embodiments. Next, specific embodiments will be illustrated and described in detail in the drawings. However, the following content is not intended to limit the present invention to a specific embodiment, but should be understood to include all modifications, equivalents, and alternatives within the spirit and technical scope of the present invention. In the process of explaining each drawing, similar reference signs are used for similar components.
[0070] In the process of explaining different components, terms such as first and second can be used, but the above components are not limited by the above terms. The above terms are only used to distinguish one component from other components. For example, without departing from the scope of the claims of the present invention, the first component can also be named the second component, and similarly, the second component can also be named the first component. The term "and / or" includes combinations of multiple related recited items or one of the multiple related recited items.
[0071] When it is described that a certain component is "connected" or "contacted" with other components, it should be understood that not only can it be directly connected or contacted with the above other components, but there can also be other components between the two. On the contrary, when it is described that a certain component is "directly connected" or "directly contacted" with other components, it should be understood that there are no other components between the two.
[0072] The terms used in this application are only for the purpose of describing specific embodiments and are not intended to limit the present invention. Unless there is a clear contrary meaning in the context, singular statements also include plural meanings. In this application, terms such as "including" or "having" are only used to indicate the existence of features, numbers, steps, actions, components, parts, or combinations thereof described in the specification, and should not be construed as precluding the existence or addition of one or more other features, numbers, steps, actions, components, parts, or combinations thereof.
[0073] Next, embodiments to which the present invention is applied will be described in detail with reference to the accompanying drawings. In the following description, the same reference numerals will be used for the same components in the drawings, and repeated descriptions of the same components will be omitted.
[0074] Figure 1 It is a schematic diagram illustrating an image coding device according to an embodiment to which the present invention is applied.
[0075] Refer to Figure 1 , the image coding device 100 can include an image segmentation unit 101, an intra prediction unit 102, an inter prediction unit 103, a subtraction operation unit 104, a transformation unit 105, a quantization unit 106, an entropy coding unit 107, an inverse quantization unit 108, an inverse transformation unit 109, an addition operation unit 110, a filtering unit 111, and a memory 112.
[0076] In Figure 1 , each component is separately illustrated to represent different special functions in the image coding device, but this does not mean that each component is composed of separate hardware or a software unit. That is, although each component is listed for the convenience of description, at least two of the components can be combined into one component, or one component can be divided into multiple components to perform corresponding functions. Embodiments in which the above-described components are integrated and embodiments in which they are separated are included in the scope of the claims of the present invention without departing from the essence of the present invention.
[0077] In addition, some components may not be essential components for performing the essential functions in the present invention, but are optional components only for improving performance. The present invention can include only the components necessary for implementing the essence of the present invention except for the components only for improving performance, and a structure including only the necessary components except for the optional components only for improving performance is also included in the scope of the claims of the present invention.
[0078] The image segmentation unit 100 can segment the input image into at least one block. At this time, the input image can be in various different forms and sizes such as an image, a strip, a parallel block, or a segment. The block can refer to a coding unit (CU), a prediction unit (PU), or a transform unit (TU). The above segmentation can be performed based on at least one of a quad tree or a binary tree. A quad tree is a method of dividing a superior block into four inferior blocks with a width and a height both being half of the superior block. A binary tree is a method of dividing a superior block into two inferior blocks with either the width or the height being half of the superior block. Through the segmentation based on the above binary tree, not only can the block be segmented into a square, but also into a non-square form.
[0079] Next, in the embodiments applying the present invention, the coding unit can be used not only in the sense of a coding execution unit but also in the sense of a decoding execution unit.
[0080] The prediction units 102 and 103 can include an inter-picture prediction unit 103 for performing inter-frame prediction and an intra-picture prediction unit 102 for performing intra-frame prediction. After determining whether to perform inter-frame prediction or intra-frame prediction on the prediction unit, specific information (such as an intra-frame prediction mode, a motion vector, a reference image, etc.) can be determined according to different prediction methods. At this time, the processing unit for performing prediction and the processing unit for determining the prediction method and the specific content can be different. For example, the prediction method and the prediction mode, etc. can be determined based on the prediction unit, while the prediction execution can be performed based on the transform unit.
[0081] The residual value (residual block) between the generated prediction block and the original block can be input to the transform unit 105. In addition, information such as a prediction mode information and a motion vector information used during prediction can be encoded by the entropy coding unit 107 together with the residual value and then transmitted to the decoder. In the case of using a specific coding mode, it is also possible to directly encode the original block and then transmit it to the decoding unit without generating a prediction block through the prediction units 102 and 103.
[0082] The intra-picture prediction unit 102 can generate a prediction block based on the pixel information within the current image, that is, the reference pixel information around the current block. When the prediction mode of the surrounding blocks of the current block that needs to perform intra-frame prediction is inter-frame prediction, the reference pixels included in the surrounding blocks that have applied inter-frame prediction can be replaced with the reference pixels within other surrounding blocks that have applied intra-frame prediction. That is, in the case where the reference pixels are unavailable, at least one of the unavailable reference pixel information can be replaced with an available reference pixel and then used.
[0083] In intra prediction, the prediction mode can include a directional prediction mode that uses reference pixel information according to a prediction direction and a non-directional mode that does not use direction information when performing prediction. The mode for predicting luminance information can be different from the mode for predicting chrominance information, and the intra prediction mode information used in the process of predicting luminance information or the predicted luminance signal information can be used when predicting chrominance information.
[0084] The intra-picture prediction unit 102 can include an Adaptive Intra Smoothing (AIS) filter, a reference pixel interpolation unit, and a Mean (DC) filter. The Adaptive Intra Smoothing (AIS) filter is a filter for filtering the reference pixels of the current block, and can adaptively determine whether to apply the filter according to the prediction mode of the current prediction unit. When the prediction mode of the current block is a mode that does not perform Adaptive Intra Smoothing (AIS) filtering, the Adaptive Intra Smoothing (AIS) filter can be not applied.
[0085] When the intra prediction mode of the prediction unit is a prediction unit that performs intra prediction based on the pixel values obtained by interpolating reference pixels, the reference pixel interpolation unit of the intra-picture prediction unit 102 can generate reference pixels at fractional unit positions by interpolating the reference pixels. When the prediction mode of the current prediction unit is a prediction mode that does not interpolate reference pixels to generate a prediction block, the reference pixels can be not interpolated. When the prediction mode of the current block is the Mean (DC) mode, the Mean (DC) filter can generate a prediction block by filtering.
[0086] Furthermore, a residual block including the difference value, i.e., residual information, between the prediction unit generated in the prediction units 102 and 103 and the original block of the prediction unit can be generated. The generated residual block can be input to the transform unit 130 for transformation.
[0087] The inter-picture prediction unit 103 can predict the prediction unit based on the information of at least one of the previous image or the next image of the current image, and in some cases, can also predict the prediction unit based on the information of a partially encoded region within the current image. The inter-picture prediction unit 103 can include a reference image interpolation unit, a motion prediction unit, and a motion compensation unit.
[0088] In the reference image interpolation unit, reference image information can be received from the memory 112 and pixel information below integer pixels can be generated in the reference image. For luminance pixels, in order to generate pixel information below integer pixels in 1 / 4 pixel units, an 8-tap interpolation filter based on discrete cosine transform (DCT) with different filter coefficients (DCT-based Interpolation Filter) can be used. For color difference signals, in order to generate pixel information below integer pixels in 1 / 8 pixel units, a 4-tap interpolation filter based on discrete cosine transform (DCT) with different filter coefficients (DCT-based Interpolation Filter) can be used.
[0089] The motion prediction unit can perform motion prediction based on the reference image interpolated by the reference image interpolation unit. As methods for calculating motion vectors, various different methods such as the full search block matching algorithm (FBMA, Full search-based Block Matching Algorithm), the three-step search algorithm (TSS, Three Step Search), and the new three-step search algorithm (NTS, New Three-Step Search Algorithm) can be used. The motion vector can use a motion vector value in 1 / 2 or 1 / 4 pixel units based on the interpolated pixels. In the motion prediction unit, the current prediction unit can be predicted by different motion prediction methods. As motion prediction methods, various methods such as the Skip method, the Merge method, and the Advanced Motion Vector Prediction (AMVP) method can be used. The subtraction operation unit 104 generates a residual block of the current block by performing subtraction between the current block to be encoded and the predicted block generated in the intra-picture prediction unit 102 or the inter-picture prediction unit 103.
[0090] In the transformation unit 105, a transformed block can be generated by transforming the difference between the original block and the predicted block, i.e., the residual block. The transformed block can be the smallest unit for performing the transformation and quantization processes. The transformation unit 105 can generate a transformed block containing transform coefficients by transforming the residual signal into the frequency domain. To transform the residual block containing residual data into the frequency domain, transformation methods such as the Discrete Cosine Transform (DCT), Discrete Sine Transform (DST), and Karhunen Loeve Transform (KLT) can be used. By using the above-mentioned transformation methods to transform the residual signal into the frequency domain, transform coefficients can be generated. To facilitate the execution of the transformation, matrix operations using basis vectors can be performed. According to the prediction mode when encoding the predicted block, multiple different transformation methods can be mixedly used during the matrix operation. For example, the transformation method can be determined based on the intra prediction mode of the prediction unit used when generating the residual block. For example, the Discrete Cosine Transform (DCT) can be used in the horizontal direction and the Discrete Sine Transform (DST) can be used in the vertical direction according to the intra prediction mode.
[0091] The quantization unit 106 can quantize the values transformed into the frequency domain in the transformation unit 105. That is, the quantization unit 106 can quantize the transform coefficients of the transformed block generated from the transformation unit 105 to generate a quantized transformed block (Quantized Transform Coefficient) with quantized transform coefficients. As the quantization method, methods such as Dead Zone Uniform Threshold Quantization (DZUTQ) or Quantization Weighted Matrix can be used. Or, various quantization methods such as improved quantization thereof can also be used. The quantization coefficient can vary according to the importance of the block or image. The value calculated in the quantization unit 106 can be provided to the inverse quantization unit 108 and the entropy encoding unit 107.
[0092] The above-mentioned transformation unit 105 and / or quantization unit 106 can be selectively included in the video coding device 100. That is, the video coding device 100 can perform at least one of the transformation or quantization on the residual data of the residual block, and can also skip both the transformation and quantization and encode the residual block. Even when the video coding device 100 does not perform one of the transformation or quantization or neither the transformation nor the quantization is performed, the block input to the entropy encoding unit 107 is generally referred to as a transformed block.
[0093] The entropy encoding unit 107 performs entropy encoding on the input data. The entropy encoding unit 107 can encode the quantized transform blocks and output a bitstream. That is, the entropy encoding unit 107 can encode the quantized transform coefficients of the quantized transform blocks output from the quantization unit 106 by various different encoding techniques such as entropy encoding. In addition, the entropy encoding unit 107 can also encode additional information (such as prediction mode information and quantization coefficients, etc.) required for decoding the corresponding blocks in the image decoding device described later. When performing entropy encoding, various different encoding methods such as exponential Golomb code, context-adaptive variable length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC) can be used.
[0094] The entropy encoding unit 107 can encode various different information such as residual value coefficient information, block type information, prediction mode information, segmentation unit information, prediction unit information, transmission unit information, motion vector information, reference frame information, block interpolation information, and filtering information from the prediction units 102 and 103. In the entropy encoding unit 107, the coefficients of the transform blocks can be encoded in units of partial blocks within the transform block based on various types of flags for indicating non-zero coefficients, coefficients with an absolute value greater than 1 or 2, and the signs of the coefficients. For coefficients that cannot be encoded only based on the above flags, encoding can be performed based on the absolute value of the difference between the coefficients encoded by the flags and the coefficients of the actual transform block. In the inverse quantization unit 108 and the inverse transform unit 109, the values quantized in the quantization unit 106 are inverse quantized and the values transformed in the transform unit 105 are inverse transformed. A reconstructed block can be generated by combining the residual values generated in the inverse quantization unit 108 and the inverse transform unit 109 with the prediction units predicted by the motion estimation unit, motion compensation unit, and intra-prediction unit 102 included in the prediction units 102 and 103. The addition operation unit 110 can generate a reconstructed block by performing an addition operation on the prediction block generated in the prediction units 102 and 103 and the residual block generated by the inverse transform unit 109.
[0095] The filtering unit 111 can include at least one of a deblocking filter, an offset correction unit, and an adaptive loop filter (ALF).
[0096] The deblocking filter can eliminate block distortion that appears at the boundaries between blocks in the reconstructed image. To determine whether deblocking needs to be performed, it is possible to judge whether to apply the deblocking filter to the current block based on the pixels included in several columns or rows within the block. When applying the deblocking filter to the block, a strong filter or a weak filter can be applied according to the required deblocking filtering strength. In addition, during the process of applying the deblocking filter, horizontal direction filtering and vertical direction filtering can be performed in parallel while performing vertical filtering and horizontal filtering.
[0097] The offset correction unit can perform offset correction between the deblocked image and the original image on a pixel-by-pixel basis. To perform offset correction on a specific image, a method of dividing the pixels included in the image into a certain number of regions, then determining the regions that need to perform offset and applying offset to the corresponding regions (band offset mode, BO mode) or a method of applying offset considering the edge information of each pixel (edge offset mode, EO mode) can be used.
[0098] Adaptive Loop Filtering (ALF) can be performed based on the value obtained by comparing the filtered reconstructed image with the original image. After dividing the pixels included in the image into specific groups, it is possible to determine a filter to be applied to the corresponding group, and then perform different filtering on different groups. Regarding the information related to the applicability of the Adaptive Loop Filter (ALF), the luminance signal can be transmitted according to each coding unit (CodingUnit, CU), and the shape and filtering coefficients of the applied Adaptive Loop Filter (ALF) can be different according to each block. In addition, an Adaptive Loop Filtering (ALF) filter with the same form (fixed form) can also be applied regardless of the characteristics of the applicable target block.
[0099] The memory 112 can store the reconstructed block or image calculated by the filtering unit 111, and the stored reconstructed block or image can be provided to the prediction units 102 and 103 during inter-frame prediction.
[0100] The intra-picture prediction unit 102 and the inter-picture prediction unit 103 described above can be collectively referred to as the prediction unit. The prediction unit can generate a prediction block using the surrounding pixels of the current block or a reference image that has been decoded previously. As the prediction block, one or more prediction blocks can be generated within the current block. When there is one prediction block within the current block, the prediction block and the current block can have the same form. After generating the prediction block, a residual block corresponding to the difference between the current block and the prediction block can be generated. By applying various different techniques such as rate-distortion optimization (RDO) to the generated residual block, the best prediction mode can be determined. For example, the following formula 1 can be used when performing rate-distortion optimization (RDO) calculation.
[0101] [Formula 1]
[0102]
[0103] In the above formula 1, D(), R(), and J() represent the distortion caused by quantization, the bit rate of the compressed data stream, and the rate-distortion (RD) cost, respectively. represents the coding mode. X represents the Lagrangian multiplier, which is used as a proportional correction coefficient for matching the units between the error amount and the bit amount. In order to be selected as the best coding mode during the coding process, the j() (i.e., the rate-distortion (RD) cost) when applying the phase mode should be less than the result when applying other modes. When calculating the rate-distortion (RD) cost, the bit rate and the error can be considered simultaneously.
[0104] Figure 2 FIG. is a schematic diagram illustrating an image decoding apparatus to which an embodiment of the present invention is applied.
[0105] Refer to Figure 2 , the image decoding apparatus 200 can include an entropy decoding unit 201, an inverse quantization unit 202, an inverse transform unit 203, an addition operation unit 204, a filtering unit 205, a memory 206, and prediction units 207 and 208.
[0106] When the image bitstream generated by the image encoding apparatus 100 is input to the image decoding apparatus 200, the input bitstream can be decoded in a process opposite to the process performed by the image encoding apparatus 100.
[0107] The entropy decoding unit 201 can perform entropy decoding in the reverse steps of the entropy encoding performed by the entropy encoding unit 107 of the video encoding device 100. For example, corresponding to the method executed in the video encoder, various different methods such as Exponential Golomb code, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC) can be applied. In the entropy decoding unit 201, the coefficients of the transform block can be decoded in units of partial blocks within the transform block based on various types of flags for indicating non-zero coefficients, coefficients with an absolute value greater than 1 or 2, and the signs of the coefficients. For coefficients that cannot be represented only based on the above flags, decoding can be performed based on the sum of the coefficients represented by the flags and the signaled coefficients.
[0108] In the entropy decoding unit 201, information related to intra prediction and inter prediction performed in the encoder can be decoded.
[0109] The inverse quantization unit 202 generates a transform block by performing inverse quantization on the quantized transform block. It works in a substantially the same manner as the inverse quantization unit 108 in Figure 1 .
[0110] The inverse transform unit 203 generates a residual block by performing an inverse transform on the transform block. At this time, the transform method can be determined based on information related to the prediction method (intra or inter prediction), the size and / or shape of the block, and the intra prediction mode, etc. It works in a substantially the same manner as the inverse transform unit 109 in Figure 1 .
[0111] The addition operation unit 204 generates a reconstructed block by adding the prediction block generated in the in-picture prediction unit 207 or the inter-picture prediction unit 208 and the residual block generated by the inverse transform unit 203. It works in a substantially the same manner as the addition operation unit 110 in Figure 1 .
[0112] The filtering unit 205 is used to reduce various types of noise that appear in the reconstructed block.
[0113] The filtering unit 205 can include a deblocking filter, an offset correction unit, and an Adaptive Loop Filter (ALF).
[0114] From the video encoding device 100, information related to whether to apply a deblocking filter to a corresponding block or image and information related to whether strong filtering or weak filtering is applied in the case of applying the deblocking filter can be received. The deblocking filter of the video decoding device 200 can perform deblocking filtering on a corresponding block in the video decoding device 200 after receiving the information related to the deblocking filter provided from the video encoding device 100.
[0115] The offset correction unit can perform offset correction on the reconstructed video based on the offset correction type and offset value information applicable to the video during encoding.
[0116] The adaptive loop filter (ALF) can be applied to an encoding unit based on the information on whether the adaptive loop filter (ALF) is applicable, the adaptive loop filter (ALF) coefficient information, etc., provided from the video encoding device 100. The above-mentioned adaptive loop filter (ALF) information can be included and provided in a specific parameter set. The filtering unit 205 operates in a substantially same manner as the Figure 1 filtering unit 111 therein.
[0117] The memory 206 stores the reconstructed block generated by the addition operation unit 204. It operates in a substantially same manner as the Figure 1 memory 112 therein.
[0118] The prediction units 207 and 208 can generate a prediction block based on the information related to the generation of the prediction block provided from the entropy decoding unit 201 and the information on the previously decoded block or image provided from the memory 206.
[0119] The prediction units 207 and 208 can include an intra-prediction unit 207 and an inter-prediction unit 208. Although not shown separately, the prediction units 207 and 208 can also include a prediction unit determination unit. The prediction unit determination unit can receive various different information such as the prediction unit information input from the entropy decoding unit 201, the prediction mode information of the intra-prediction method, the motion prediction related information of the inter-prediction method, etc., and distinguish the prediction unit from the current decoding unit, thereby determining whether the prediction unit performs inter-prediction or intra-prediction. The inter-prediction unit 208 can use the information required for the inter-prediction of the current prediction unit provided from the video encoding device 100 and perform inter-prediction on the current prediction unit based on the information included in at least one of the previous image or the next image of the current image including the current prediction unit. Alternatively, inter-prediction can also be performed based on the information of a reconstructed partial region within the current image including the current prediction unit.
[0120] In order to perform inter-picture prediction, it is possible to determine, based on a coding unit, which motion prediction method among the skip mode, merge mode, and advanced motion vector prediction mode (AMVP mode) is used for the prediction unit included in the corresponding coding unit.
[0121] The intra-picture prediction unit 207 generates a prediction block using the reconstructed pixels located around the block to be coded in the current period.
[0122] The intra-picture prediction unit 207 may include an adaptive intra smoothing (AIS) filter, a reference pixel interpolation unit, and a mean (DC) filter. The adaptive intra smoothing (AIS) filter is a filter for filtering the reference pixels of the current block, and can adaptively determine whether to apply the filter according to the prediction mode of the current prediction unit. The reference pixels of the current block can be subjected to adaptive intra smoothing (AIS) filtering using the prediction mode of the prediction unit provided by the video coding apparatus 100 and the adaptive intra smoothing (AIS) filter information. When the prediction mode of the current block is a mode that does not perform adaptive intra smoothing (AIS) filtering, the adaptive intra smoothing (AIS) filter may not be applied.
[0123] When the prediction mode of the prediction unit is a prediction unit that performs intra prediction based on the pixel values obtained by interpolating the reference pixels, the reference pixel interpolation unit of the intra-picture prediction unit 207 can generate reference pixels at fractional unit positions by interpolating the reference pixels. The generated reference pixels at fractional unit positions can be used as prediction pixels for the pixels within the current block. When the prediction mode of the current prediction unit is a prediction mode that generates a prediction block without interpolating the reference pixels, the reference pixels may not be interpolated. When the prediction mode of the current block is the mean (DC) mode, the mean (DC) filter can generate a prediction block by filtering.
[0124] The intra-picture prediction unit 207 operates in substantially the same manner as the intra-picture prediction unit 102 in Figure 1 this.
[0125] The inter-picture prediction unit 208 generates an inter-picture prediction block using the reference images and motion information stored in the memory 206. The inter-picture prediction unit 208 operates in substantially the same manner as the inter-picture prediction unit 103 in Figure 1 this.
[0126] Next, sample adaptive offset (SAO) compensation filtering will be described with reference to Figure 3 and Figure 4 this.
[0127] Figure 3 It is a schematic diagram for explaining the edge offset (EO) mode.
[0128] As Figure 3 shown in the upper frame 301 in, the boundary direction between adjacent pixels centered on the current pixel can be divided into one of four direction information such as 0, 45, 90, and 135. In addition, based on the difference in pixel values between the current pixel and adjacent pixels, as Figure 3 shown in the lower frame 302 in, it can be divided into one of four categories. Figure 3 The pixel index x-1 of each category in the lower frame 302 in refers to the surrounding pixel 1 in each direction of the upper frame 301. Similarly, the pixel index x refers to the current pixel, and the pixel index x+1 refers to the surrounding pixel 2. In different categories, the sign of the offset applicable to the current pixel has been determined. For example, the signs of the offsets for category 1 and category 2 are positive (+), and the signs of the offsets for category 3 and category 4 are negative (-).
[0129] For the optimal direction among the four direction information of different current pixels, filtering can be performed by finding the corresponding form from the four categories based on the difference from the pixel values of the surrounding pixels and then adding the offset value within the corresponding category. In addition, if the form corresponding to the difference in pixel values between the current pixel and the surrounding pixels does not belong to the category shown in Figure 3 , filtering may not be performed for the corresponding current pixel.
[0130] Figure 4 It is a schematic diagram for explaining the band offset (BO) mode.
[0131] The band offset (BO) mode can divide the pixel range based on the bit depth of the input image (for example, the pixel range of an 8-bit image is 0 to 255) into 32 band regions and determine 4 consecutive band regions as the band offset objects. If the current pixel value belongs to the 4 consecutive band regions, filtering can be performed by adding the offset value of the corresponding band region to the current pixel value.
[0132] In Figure 4 the example shown in, after dividing the pixel range based on the bit depth of the input image into 32 band regions, it is determined that the 10th to 13th band regions are the band offset objects. If the pixel value of the current pixel belongs to one of the 10th to 13th band regions, filtering can be performed by adding the offset value of the corresponding band region to the pixel value of the current pixel.
[0133] Figure 5This is a schematic diagram for explaining a method of encoding sample adaptive offset (SAO) information in an image coding apparatus 100.
[0134] In step S501, based on the coding block (current block) for which sample adaptive offset (SAO) is performed, information (sample adaptive offset (SAO) merge information) for indicating whether to directly use the sample adaptive offset (SAO) information of the left coding block and / or the upper coding block can be encoded. First, the sample adaptive offset merge (SAOMerge)_left information is encoded. When the corresponding information is true, the sample adaptive offset merge (SAO Merge)_upper information is not encoded and the process jumps to step S502. When the sample adaptive offset merge (SAO Merge)_left information is false, the sample adaptive offset merge (SAO Merge)_upper information is encoded and the process jumps to step S502.
[0135] In step S502, it is determined whether both the sample adaptive offset merge (SAO Merge)_left information and the sample adaptive offset merge (SAO Merge)_upper information are false. When both pieces of information are false, the process jumps to step S503. If any one of them is true, the step ends.
[0136] In step S503, the CIdx information is set to the initial value 0. When CIdx is 0, it represents the luminance (Luma) component. When CIdx is 1, it represents the chrominance (Chroma) Cb component. When CIdx is 2, it represents the chrominance Cr component. First, in step S503, it is determined whether CIdx is 0. When it is 0, the process jumps to step S504. When it is not 0, the process jumps to step S505.
[0137] In step S504, the sample adaptive offset (SAO) mode information for the luminance component is encoded. The sample adaptive offset (SAO) mode information can represent information for indicating which one of the edge offset (EO) mode, the band offset (BO) mode, and the sample adaptive offset (SAO) non-action mode is to be performed on the current block.
[0138] In step S505, it is determined whether CIdx is 1. When it is 1, the process jumps to step S506. When it is not 1, the step ends.
[0139] In step S506, the sample adaptive offset (SAO) mode information of the chrominance components is encoded. The sample adaptive offset (SAO) mode information can represent the information for indicating which one of the edge offset (EO) mode, band offset (BO) mode, and sample adaptive offset (SAO) non-action mode is to be performed on the current block. Among them, the Cb and Cr components of the chrominance components can share the same sample adaptive offset (SAO) mode information.
[0140] In step S507, when the sample adaptive offset (SAO) mode of the current block is the sample adaptive offset (SAO) non-action mode, it jumps to step S516, and when the sample adaptive offset (SAO) mode of the current block is the band offset (BO) mode or the edge offset (EO) mode, it jumps to step S508.
[0141] In step S508, four offset absolute value information is encoded. In the edge offset (EO) mode, the four offsets represent offsets in different categories. In the edge offset (EO) mode, the four offsets represent offsets in four consecutive different band regions.
[0142] In step S509, it is judged whether the sample adaptive offset (SAO) mode of the current block is the band offset (BO) mode. When it is the band offset (BO) mode, it jumps to step S510. When it is not the band offset (BO) mode, it jumps to step S512.
[0143] In step S510, the sign information of the four offsets in the band offset (BO) mode is encoded.
[0144] In step S511, the initial band position indicating from which band region interval the consecutive four band region intervals in the band offset (BO) mode start is encoded.
[0145] In step S512, it is judged whether CIdx is 0. When it is 0, it jumps to step S513. When it is not 0, it jumps to step S514.
[0146] In step S513, the direction information of the edge offset (EO) mode of the luminance component is encoded.
[0147] In step S514, it is judged whether CIdx is 1. When CIdx is not 1, the step ends. When it is 1, it jumps to step S515.
[0148] In step S515, the direction information of the edge offset (EO) mode of the chrominance components is encoded. Among them, the Cb and Cr components of the chrominance components share the same direction information.
[0149] In step S516, increment the value of the current CIdx by 1 and jump to step S503 to repeat the process as described above.
[0150] Figure 6 It is a schematic diagram for explaining a method of decoding sample adaptive offset (SAO) information executed in the video decoding apparatus 200.
[0151] In step S601, decode the sample adaptive offset merge (SAO Merge) information encoded in step S501 in Figure 5
[0152] In step S602, determine whether both the sample adaptive offset merge (SAO Merge)_upper information and the sample adaptive offset merge (SAO Merge)_left information are false. When both pieces of information are false, jump to step S603; if either is true, end the step.
[0153] In step S603, initialize the CIdx value to 0 and determine whether the corresponding CIdx value is 0. When the CIdx value is 0, jump to step S604; when it is not 0, jump to step S605.
[0154] In step S604, decode the sample adaptive offset (SAO) mode information of the luminance component encoded in step S504 in Figure 5
[0155] In step S605, determine whether CIdx is 1. When it is 1, jump to step S606; when it is not 1, end the step.
[0156] In step S606, decode the sample adaptive offset (SAO) mode information of the chrominance component encoded in step S506 in Figure 5 . Among them, the Cb and Cr components of the chrominance component can share the same sample adaptive offset (SAO) mode information.
[0157] In step S607, when the sample adaptive offset (SAO) mode of the current block is the sample adaptive offset (SAO) non-action mode, jump to step S616; when the sample adaptive offset (SAO) mode of the current block is the band offset (BO) mode or the edge offset (EO) mode, jump to step S608.
[0158] In step S608, decode the 4 offset absolute value information encoded in step S508 in Figure 5
[0159] In step S609, it is determined whether the sample adaptive offset (SAO) mode of the current block is the band offset (BO) mode. When the sample adaptive offset (SAO) mode of the current block is the band offset (BO) mode, it jumps to step S610. When it is not the band offset (BO) mode, it jumps to step S612.
[0160] In step S610, the sign information of the 4 offsets of the band offset (BO) mode encoded in step S510 in Figure 5 is decoded.
[0161] In step S611, the initial band position indicating from which band region interval the consecutive 4 band region intervals of the band offset (BO) mode encoded in step S511 in Figure 5 start is decoded.
[0162] In step S612, it is determined whether CIdx is 0. When CIdx is 0, it jumps to step S613. When it is not 0, it jumps to step S614.
[0163] In step S613, the direction information of the edge offset (EO) mode of the luminance component encoded in step S513 in Figure 5 is decoded.
[0164] In step S614, it is determined whether CIdx is 1. When CIdx is not 1, the step ends. When it is 1, it jumps to step S615.
[0165] In step S615, the direction information of the edge offset (EO) mode of the chrominance component encoded in step S515 in Figure 5 is decoded. Among them, the Cb and Cr components of the chrominance component can share the same direction information.
[0166] In step S616, the value of the current CIdx is incremented by 1 and it jumps to step S603 to repeat the process as described above.
[0167] In the following description, it is assumed that the bit depth of the input image is 8 bits.
[0168] Figure 7 is a schematic diagram for explaining the clipping range within an arbitrary region and the available band regions of the band offset (BO) mode.
[0169] By exploring the maximum and minimum values of the original pixels in any region unit such as an image, parallel block, stripe, or block unit, the clipping range can be determined. The clipping range can be applied to the band region intervals of the band offset (BO) mode of the sample adaptive offset (SAO).
[0170] In Figure 7 , the position of the minimum pixel value of the input image with 8-bit depth is 0, and the position of the maximum pixel value is 255. After scanning the original pixel values in the corresponding area in any area unit, the maximum and minimum values of the pixel values included in the corresponding area can be determined. As shown in (a) of Figure 7 , the maximum value of the pixel values in any area is the clipping maximum value, and the minimum value is the clipping minimum value.
[0171] The above clipping process can be executed in the image coding device 100 after passing through the prediction units 102 and 103, after passing through the addition operation unit 110, and / or after passing through the filtering unit 111. In the image coding device 200, the above clipping process is executed after passing through the prediction units 207 and 208, after passing through the addition operation unit 204, and / or after passing through the filtering unit 205.
[0172] In the sample adaptive offset (SAO) band offset (BO) mode as described above, the overall pixel range (0 to 255) is divided into 32 band regions, and the offset information of 4 band regions that need to apply filtering is used. At this time, if the clipping range is smaller than the overall pixel range, filtering can be performed while only considering the band regions within the clipping range.
[0173] Figure 7 (b) in
[0174] In Figure 7 (b), since there are no pixels in the current area belonging to the 1st to 8th band regions and the 27th to 32nd band regions, it is not necessary to consider the corresponding band regions as the band regions of the sample adaptive offset (SAO) band offset (BO) mode. In addition, when the maximum value and the minimum value within the clipping range are the same, all the processes described in Figure 1 and Figure 2 can be not executed, and the image can be reconstructed using the above same value. In addition, when the difference between the maximum value and the minimum value within the clipping range is less than N (N is an integer of 0 or more), all the processes described in Figure 1 and Figure 2 can be not executed, and the image can be reconstructed using any information such as the average value of the clipping maximum value and the minimum value. Among them, the corresponding N value can be transmitted through the upper header of the current area. When the available band region range of the sample adaptive offset (SAO) band offset (BO) mode is less than 4, the number of transmitted offset values can be less than 4.
[0175] Figure 8 It is a schematic diagram illustrating the state of further subdividing the available strip region interval of the band offset (BO) mode into 32 strip region intervals.
[0176] As Figure 8 illustrated in (a) of [], when the strip regions of the band offset (BO) mode corresponding to the amplitude clipping range within any region are strip regions 9 to strip region 26, as Figure 8 illustrated in (b) of [], the interval of the available strip regions (strip regions 9 to strip region 26) can be further divided into 32 strip region intervals.
[0177] As Figure 8 shown in (b) of [], when encoding / decoding by further dividing the available strip region interval into 32 strip region intervals, the sample adaptive offset (SAO) information encoding and decoding algorithms described with reference to Figure 5 and Figure 6 can be used in the same way. In the above-mentioned case, the range of one strip region can be further subdivided, so that more precise strip region offset filtering can be achieved.
[0178] Figure 9 It is a schematic diagram for explaining a method of correcting the residual block coefficients by performing amplitude clipping using any region unit. Refer to Figure 9 The coefficient correction of the residual block described with reference to [] can be performed or not performed in any region unit.
[0179] In Figure 9 , the numbers marked in the internal grids of the original block 901, the prediction block 902, the residual block 903, and the final residual block 904 represent the pixel values of the corresponding pixels. By subtracting the pixel value of the prediction block 902 from the pixel value of the original block 910, the residual block 903 can be generated. By correcting the residual block 903, the final residual block 904 can be generated.
[0180] Assuming that the minimum value of the pixel values in the original block 901 or any region containing the original block 901 is 50 and the maximum value is 100, the amplitude clipping range of the original block 901 is 50 to 100. The pixels that have been light and dark processed in the original block 901 represent the pixels with the maximum or minimum value of the current amplitude clipping range.
[0181] The residual coefficient correction of the residual block 903 can be performed on the pixels that have been light and dark processed in the residual block 903 corresponding to the positions of the pixels that have been light and dark processed in the original block 901. Specifically, the average value of the pixel values of the residual pixels that have not been light and dark processed in the residual block 903 (in Figure 9Perform calculations for (in the middle is -2). Next, replace the pixels that have undergone light and dark processing in the residual block 903 with the average value calculated above. Through the process described above, the final residual block 904 can be generated. In addition, other statistical values such as the maximum value, minimum value, median value, mode value, weighted average value, etc. can be used to replace the average value applicable to the residual coefficient correction.
[0182] Figure 10 It is a schematic diagram for explaining a method of encoding clipping information in image units.
[0183] In step S1001, explore the maximum and minimum values of the pixel values in the image in the current image unit. In step S1002, encode the corresponding maximum and minimum values. The maximum and minimum values can be directly encoded. Or, the difference value between the maximum and minimum values can be encoded after encoding the minimum value. Or, the difference value between the maximum and minimum values can be encoded after encoding the maximum value. At this time, the encoding information of the maximum and minimum values can be transmitted through an image layer or a slice layer, etc. The above image unit can be changed to any region unit. The above arbitrary region can be, for example, a slice, a parallel block, a coding tree unit (CTU), and a coding unit (CU), etc.
[0184] Figure 11 It is a schematic diagram for explaining a method of decoding clipping information in image units. In step S1101, the maximum and minimum value information of the current image can be decoded. The above maximum and minimum value information can be included in the transmission unit transmitted from the video coding device 100. The above transmission unit can be an image layer or a slice layer. The above maximum and minimum value information can be encoded and transmitted in the manner described in Figure 10 The above image unit can be changed to any region unit. The above arbitrary region can be, for example, a slice, a parallel block, a coding tree unit (CTU), and a coding unit (CU), etc.
[0185] Figure 12It is a schematic diagram for explaining a method of encoding clipping information in any block unit. In step S1201, the maximum value and the minimum pixel value within the block are explored in the current block unit. In step S1202, the corresponding maximum value and minimum value are encoded. The maximum value and the minimum value can be directly encoded. Alternatively, the difference value between the maximum value and the minimum value can be encoded after encoding the minimum value. Alternatively, the difference value between the maximum value and the minimum value can be encoded after encoding the maximum value. At this time, the encoded information of the maximum value and the minimum value can be transmitted in block units. The above block unit can be any encoding block unit or prediction block unit, etc.
[0186] Figure 13 It is a schematic diagram for explaining a method of decoding clipping information in any block unit. In step S1301, the maximum value and minimum value information of the current block can be decoded. The above maximum value and minimum value information can be included in the transmission unit transmitted from the video encoding device 100. The above transmission unit can be any encoding block unit or prediction block unit. The above maximum value and minimum value information can be encoded and transmitted in the manner described in Figure 12 as described.
[0187] Figure 14 It is a sequence diagram for explaining a method of encoding sample adaptive offset (SAO) information based on a clipping range applicable to an embodiment of the present invention.
[0188] The description of steps S1401 to S1406 is the same as the description of steps S501 to S506 in Figure 5 as described.
[0189] In step S1407, when the sample adaptive offset (SAO) mode of the current block is the sample adaptive offset (SAO) non-operation mode, it jumps to step S1417, and when it is one of the band offset (BO) mode or the edge offset (EO) mode of the current block, it jumps to step S1408.
[0190] In step 1408, it is determined whether the sample adaptive offset (SAO) mode of the current block is the band offset (BO) mode. When it is the band offset (BO) mode, it jumps to step S1409, and when it is not the band offset (BO) mode, it jumps to step S1412.
[0191] In step S1409, the initial band position indicating from which band region interval the continuous band region interval for indicating the band offset (BO) mode starts is encoded.
[0192] In step S1410, M offset absolute value information for the band offset (BO) mode is encoded. As described above, the available band region interval of the band offset (BO) mode may change according to the clipping range. Therefore, according to the initial band region position, the number of offsets to be transmitted may also change. In addition, according to the number of available band regions, the number of offsets to be transmitted may also change. The above-mentioned M represents the number of offsets to be transmitted, which may change according to the clipping range. For example, in the example illustrated in Figure 7 if the initial band region position is the 25th band region, since there are 2 available band regions including the 25th band region and the 26th band region, etc., only 2 offset values can be transmitted.
[0193] In step S1411, the offset symbol information corresponding to the number of offsets (M) transmitted in step S1410 can be encoded.
[0194] In step S1412, it is judged whether CIdx is 0. When it is 0, it jumps to step S1413. When it is not 0, it jumps to step S1415.
[0195] In step S1413, 4 offset absolute value information used in the edge offset (EO) mode is encoded.
[0196] In step S1414, the direction information of the edge offset (EO) mode of the luminance component is encoded.
[0197] In step S1415, it is judged whether CIdx is 1. When it is not 1, the step ends. When it is 1, it jumps to step S1416.
[0198] In step S1416, the direction information of the edge offset (EO) mode of the chrominance component is encoded. Among them, the Cb and Cr components of the chrominance component can share the same direction information.
[0199] In step S1417, the value of CIdx is incremented by 1 and it jumps to step S1403 to repeat the above-mentioned process.
[0200] Figure 15 It is a sequence diagram for explaining a method for decoding sample adaptive offset (SAO) information based on the clipping range applicable to the embodiments of the present invention.
[0201] The description of steps S1501 to S1506 is the same as the description of steps S601 to S606 in Figure 6
[0202] In step S1507, when the sample adaptive offset (SAO) mode of the current block is the SAO non-action mode, it jumps to step S1516, and when the sample adaptive offset (SAO) mode of the current block is the band offset (BO) mode or the edge offset (EO) mode, it jumps to step S1508.
[0203] In step 1508, it is determined whether the sample adaptive offset (SAO) mode of the current block is the band offset (BO) mode. When it is the band offset (BO) mode, it jumps to step S1509, and when it is not the band offset (BO) mode, it jumps to step S1512.
[0204] In step S1509, the initial band region position of the band offset (BO) mode encoded in step S1409 in Figure 14 is decoded.
[0205] In step S1510, the M offset absolute value information for the band offset (BO) mode encoded in step S1410 in Figure 14 is decoded.
[0206] In step S1511, the M offset sign information encoded in step S1411 in Figure 14 is decoded.
[0207] In step S1512, it is determined whether CIdx is 0. When it is 0, it jumps to step S1513, and when it is not 0, it jumps to step S1515.
[0208] In step S1513, the 4 offset absolute value information used in the edge offset (EO) mode encoded in step S1413 in Figure 14 is decoded.
[0209] In step S1514, the direction information of the edge offset (EO) mode of the luminance component encoded in step S1414 in Figure 14 is decoded.
[0210] In step S1515, it is determined whether CIdx is 1. When it is not 1, the step ends, and when it is 1, it jumps to step S1516.
[0211] In step S1516, the direction information of the edge offset (EO) mode of the chrominance component is decoded. Among them, the Cb and Cr components of the chrominance component can share the same direction information.
[0212] In step S1517, the value of CIdx is incremented by 1 and it jumps to step S1503 to repeat the above process.
[0213] Figure 16 This is a schematic diagram for explaining the method for determining a clipped strip region to which the present invention is applicable.
[0214] As Figure 16 shown in the illustrated example, in any region unit such as a current block, a strip, a parallel block, or a block, the best clipped strip region in the preset clipped strip region can be used to determine the strip region interval available in the band offset (BO) mode.
[0215] In Figure 16 the example shown in (a) thereof, the minimum pixel value position is 0, and the maximum pixel value position is 255. Herein, the preset clipped strip region refers to each interval obtained by dividing the range from the maximum pixel value to the minimum pixel value into N (N>1, N is an integer) intervals. The image encoding device 100 and the image decoding device 200 can share the pre-agreed information regarding the clipped strip region. Alternatively, the image encoding device 100 can transmit the information related to the clipped strip region to the image decoding device 200. Alternatively, the image encoding device 100 and the image decoding device 200 can manage various variations related to determining the clipped strip region using a look-up table, and the image encoding device 100 can transmit only the index information related to the look-up table to the image decoding device 200.
[0216] In Figure 16 the example shown in (a) thereof, there are a total of 8 clipped strip regions. The clipped strip region 8 represents the overall pixel interval (0 to 255), and the clipped strip regions 1 to 7 represent the pixel intervals (0 to 63), (32 - 95), (64 - 127), (96 - 159), (128 - 191), (160 - 223), and (192 - 255). In Figure 16 the example shown in (a) thereof, the clipped strip regions are set in a manner that overlaps with adjacent clipped strip regions. However, it is not limited thereto, and the clipped strip regions can also be set in a manner that does not overlap with adjacent clipped strip regions. Alternatively, it can also be set in a manner that some clipped strip regions overlap with other clipped strip regions while some clipped strip regions do not overlap with other clipped strip regions.
[0217] After scanning the pixel values in the corresponding region in units of the current image, strip, parallel block, or any block, it is possible to determine which clipped strip region in the preset clipped strip regions the range of the pixel values in the corresponding region belongs to. In the example shown in (a) of 16, it is determined that all the pixels in the current region are distributed within the clipped strip region 5. As Figure 16As illustrated in (b) thereof, the clipped strip region 5 corresponds to the 17th to 24th strip regions among the 32 strip regions in the strip offset (BO) mode. That is, the strip region interval available in the strip offset (BO) mode of the current region is Figure 16 the 17th to 24th strip region interval shaded in (b). Within the current region, there are no pixels belonging to the 1st to 16th strip regions and the 25th to 32nd strip regions in the strip offset (BO) mode. Therefore, filtering can be performed without considering the corresponding strip regions as strip regions in the strip offset (BO) mode.
[0218] Figure 17 It is a schematic diagram for explaining a method of encoding clipping information in image units. In step S1701, the maximum value and the minimum pixel value of the pixel values in the image are explored in the current image unit. In step S1702, the clipping strip region index information including the corresponding maximum value and minimum value is encoded. At this time, the clipping strip region index information can be transmitted through an image layer or a slice layer, etc. The clipping strip region index information can be information related to one clipping strip region. Or, the clipping strip region index information can be information related to two clipping strip regions. For example, when there is no clipping strip region that simultaneously includes the maximum value and the minimum value of the current image, the clipping strip region index information can include information related to the clipping strip region including the maximum value and information related to the clipping strip region including the minimum value.
[0219] Figure 18 It is a schematic diagram for explaining a method of decoding clipping information in image units.
[0220] In step S1801, the clipping strip region index information of the current image can be decoded. The clipping strip region index information can be included in the transmission unit transmitted from the video coding device 100. The above transmission unit can be an image layer or a slice layer. The above clipping strip region index information can be encoded and transmitted in the manner described with reference to Figure 17 the above.
[0221] Figure 19 It is a schematic diagram for explaining a method of encoding clipping information in arbitrary block units.
[0222] In step S1901, the maximum value and the minimum value within a block are explored in units of the current block. In step S1902, the index information of the clipping band region containing the corresponding maximum value and minimum value is encoded. At this time, the index information of the clipping band region can be transmitted in units of blocks. For example, the index information of the clipping band region can be transmitted in any coding block unit or prediction block unit, etc. The index information of the clipping band region can be information related to one clipping band region. Or, the index information of the clipping band region can be information related to two clipping band regions. For example, when there is no clipping band region that simultaneously contains the maximum value and the minimum value of the current block, the index information of the clipping band region can include information related to the clipping band region containing the maximum value and information related to the clipping band region containing the minimum value.
[0223] Figure 20 is a schematic diagram for explaining a method of decoding clipping information in any block unit. In step S2001, the index information of the clipping band region of the current block can be decoded. The index information of the clipping band region can be included in a transmission unit transmitted from the video coding device 100. The above-mentioned transmission unit can be, for example, any coding block unit or prediction block unit. The above-mentioned index information of the clipping band region can be encoded and transmitted in the manner described with reference to Figure 19 for explanation.
[0224] Figure 21 is a schematic diagram for explaining the clipping application positions to which the present invention is applied in the video coding device 100 and the video decoding device 200.
[0225] In Figure 21 , the position where clipping is applied in the video coding device 100 is illustrated in (a). As illustrated in (a) of Figure 21 , the clipping to which the present invention is applied can be applied to the prediction block generated by the prediction unit, can also be applied to the reconstructed pixels before passing through the loop filter unit, and can also be applied after passing through the loop filter unit. In addition, as illustrated in (a) of Figure 21 , it can also be applied after passing through the deblocking filter within the loop filter unit. Clipping can be applied to all of the above-mentioned clipping positions, or clipping can be not applied to some positions. However, at the clipping position of the arrow processed by diagonal lines in (a) of Figure 21 , that is, clipping must be applied after passing through the loop filter unit.
[0226] In Figure 21 , the position where clipping is applied in the video decoding device 200 is illustrated in (b). As illustrated in (a) of Figure 21As shown in (b) thereof, the clipping applicable to the present invention can be applied after passing through the prediction unit, can also be applied to the reconstructed pixels before passing through the loop filter unit, and can also be applied after passing through the loop filter unit. In addition, as Figure 21 shown in (c) thereof, it can also be applied after passing through the deblocking filter in the loop filter unit. Clipping can be applied to all the clipping positions as described above, or can be not applied to some positions. However, the video decoding device 200 must apply clipping at the same positions as those where the video encoding device 100 performs clipping. In addition, at the clipping positions of the arrows processed by diagonal lines in (b) of Figure 21 , that is, clipping must be applied after passing through the loop filter unit.
[0227] Figure 22 is a schematic diagram for explaining a method of determining different range offset values in consideration of the clipping range in the edge offset (EO) mode.
[0228] The sign (positive or negative) information of each offset in the edge offset (EO) mode is preset according to different ranges. In the video encoding device 100, various methods such as rate distortion optimization (RDO) can be used to determine the optimal offset value according to different ranges. However, if the determined offset value exceeds the clipping range when applied to the current pixel, the corresponding offset value can be not considered from the perspective of rate distortion optimization (RDO). That is, after determining the clipping range in any region unit, the offset range can be restricted based on this.
[0229] For example, assume that the clipping range of the current region is from 100 to 200 and the offset range is from -7 to 7. In addition, assume that the pixel values of the surrounding pixels of any pixel in the current region are all 199, and assume that the pixel value of the current pixel is 197. Under the above assumptions, since the offset target pixel belongs to category 1, the sign of the offset is positive (+). When the offset value applied to the current pixel is 5, the filtered result value of the current pixel is 202, which is a value exceeding the clipping range of the current region. In the above situation, the clipping range can be restricted to from -7 to 3. From the perspective of rate distortion optimization (RDO), the offset can be determined by judging the optimal offset value within the range of -7 to 3. Therefore, in the example as Figure 22 shown, the optimal offset value can be determined within the corresponding range only considering the offset values whose pixel ranges for adding operations to the offset exist within the clipping range.
[0230] Figure 23 is a schematic diagram for explaining a method of determining the offset in consideration of the clipping range when determining the offset values of each band region in the band offset (BO) mode.
[0231] In the band offset (BO) mode, the offset values of four consecutive band regions can be determined separately. When determining the offset values of the respective band regions, the offset values of the filtered pixels exceeding the clipping range can be disregarded from the perspective of rate-distortion cost (RDO). For the band region among the four consecutive band regions that has the minimum or maximum value exceeding the clipping range, the offset range can be changed while taking the clipping range into account. This means that by determining the clipping range in arbitrary region units, the offset range can be restricted for different band regions.
[0232] In Figure 23 In the illustrated example, when the target band region in the band offset (BO) mode is band region 9 to band region 12, band region 9 is the band region containing the clipping minimum value. Therefore, an offset where the current pixel value obtained by adding the offset value of band region 9 is less than the clipping minimum value can be disregarded as the optimal offset. Or, when the target band region in the band offset (BO) mode is band region 13 to band region 16, an offset where the current pixel value obtained by adding the offset value of band region 16 is greater than the clipping maximum value can be disregarded as the optimal offset.
[0233] Figure 24 It is a schematic diagram for explaining a method of encoding sample adaptive offset (SAO) information.
[0234] The description of steps S2401 to S2407 is the same as the description of Figure 5 steps S501 to S507 in
[0235] In step S2408, four offset absolute value information is encoded.
[0236] In step 2409, it is determined whether the sample adaptive offset (SAO) mode of the current block is the band offset (BO) mode. When it is the band offset (BO) mode, it jumps to step S2410, and when it is not the band offset (BO) mode, it jumps to step S2412.
[0237] In step S2410, N offset symbol information is encoded. N can be 3 or 4. In step S2408 above, four offset absolute value information is encoded, and in step S2410, N symbol information is encoded. When a part of the four consecutive band regions contains the clipping maximum or minimum value, for the offset value of the corresponding band region, the offset of the filtered current pixel value exceeding the clipping range can be disregarded. Therefore, for the band region containing the clipping maximum value, the positive (+) symbol information of a part of the offset can be not encoded, and for the band region containing the clipping minimum value, the negative (-) symbol information of a part of the offset can be not encoded.
[0238] For example, assume that the clipping range of the current region is from 100 to 200, the 4 consecutive band regions are band region 12 to band region 15, and the range of the current pixel that needs to be filtered in the band offset (BO) mode is from 96 to 135. In addition, when the range of the actual current pixel that needs to be filtered in band region 12 is from 101 to 103, values below -4 can be not considered as the offset range. Among them, when the offset of band region 12 encoded in step S2408 is 4 or more, in step S2410, the symbol information can be not encoded. At this time, the offset symbol of band region 12 can be determined as positive (+) information.
[0239] In step S2411, encode the initial band region position indicating from which band region interval the consecutive band region interval for the band offset (BO) mode starts.
[0240] In step S2412, determine whether CIdx is 0. When CIdx is 0, jump to step S2413; when it is not 0, jump to step S2414.
[0241] In step S2413, encode the direction information of the edge offset (EO) mode for the luminance component.
[0242] In step S2414, determine whether CIdx is 1. When CIdx is not 1, end the step; when it is 1, jump to step S2415.
[0243] In step S2415, encode the direction information of the edge offset (EO) mode for the chrominance components. Among them, the Cb and Cr components of the chrominance components can share the same direction information.
[0244] In step S2416, increment the value of CIdx by 1 and jump to step S2403 to repeat the above process.
[0245] Figure 25 It is a schematic diagram for explaining the method of decoding the sample adaptive offset (SAO) information.
[0246] The description of steps S2501 to S2507 is the same as the description of Figure 6 steps S601 to S607 therein.
[0247] In step S2508, decode the 4 offset absolute value information.
[0248] In step 2509, it is determined whether the sample adaptive offset (SAO) mode of the current block is the band offset (BO) mode. When it is the band offset (BO) mode, it jumps to step S2510. When it is not the band offset (BO) mode, it jumps to step S2512.
[0249] In step S2510, N offset symbol information is decoded. N can be 3 or 4.
[0250] In step S2511, the initial band position indicating from which band region interval the continuous band region interval for indicating the band offset (BO) mode starts is decoded.
[0251] In step S2512, it is determined whether CIdx is 0. When CIdx is 0, it jumps to step S2513. When it is not 0, it jumps to step S2514.
[0252] In step S2513, the direction information of the edge offset (EO) mode of the luminance component is decoded.
[0253] In step S2514, it is determined whether CIdx is 1. When CIdx is not 1, the step ends. When it is 1, it jumps to step S2515.
[0254] In step S2515, the direction information of the edge offset (EO) mode of the chrominance component is decoded. Among them, the Cb and Cr components of the chrominance component can share the same direction information.
[0255] In step S2516, the value of CIdx is incremented by 1 and it jumps to step S2503 to repeat the above process.
[0256] Figure 26 It is a schematic diagram for explaining the process of performing decoder-side motion vector derivation (DMVD) based on the clipping range for another embodiment of the present invention.
[0257] Generally, an image coding device encodes information related to a motion vector and includes it in a bitstream and transmits it to an image decoding device. The image coding device can reconstruct the motion vector by decoding the bitstream. In the case of decoder-side motion vector derivation (DMVD), information related to the motion vector can be derived on the image decoding device side using a specific algorithm, thereby replacing the method of explicitly encoding information related to the motion vector in the bitstream. For example, the above specific algorithm can be a template matching algorithm.
[0258] In the present invention, an image decoding device can perform decoder-side motion vector derivation (DMVD) based on clipping characteristics. For example, decoder-side motion vector derivation (DMVD) can be effectively performed by identifying a region within a reference image that has the same or similar clipping characteristics as the current block or the region to which the current block belongs. The above-mentioned clipping characteristics can refer to a clipping range, but are not limited thereto, and can include various pieces of information related to clipping derived from the clipping range.
[0259] Specifically, in order to perform decoder-side motion vector derivation (DMVD), an initial motion vector needs to be determined, and the clipping specificities can be considered when determining the initial motion vector. In Figure 26 the illustrated example, if the clipping characteristic of the current block is B, a region with a clipping characteristic of B can be identified from the regions within the reference image, and then the initial motion vector (the first or second initial motion vector) can be determined based on the above-mentioned region.
[0260] Since the clipping characteristics of similar blocks are also similar, when applying the present invention, the best initial motion vector can be determined with a very high probability. Therefore, when applying the present invention, the complexity of motion prediction of an image decoding device that performs decoder-side motion vector derivation (DMVD) can be significantly reduced.
[0261] In another embodiment of applying the present invention, the entropy coding efficiency of syntax elements can be improved by applying clipping characteristics to entropy coding and / or decoding. Specifically, the initial probability of a specific syntax element can be adaptively selected while taking into account the clipping characteristics of an arbitrary image region.
[0262] For example, when the clipping range of a coding block is wide, that is, when the difference between the maximum value and the minimum value is large, the prediction accuracy of the corresponding coding block is relatively low. Since the probability of including transform coefficients for which the residual block is not 0 is relatively high when the prediction accuracy is relatively low, the probability that the CBG_Flag of the corresponding coding block is "1" is relatively higher than the probability of being "0".
[0263] On the contrary, when the clipping range of a coding block is narrow, that is, when the difference between the maximum value and the minimum value is small, the prediction accuracy of the corresponding coding block is relatively high. Since the probability of including transform coefficients for which the residual block is not 0 is relatively low when the prediction accuracy is relatively high, the probability that the CBG_Flag of the corresponding coding block is "0" is relatively higher than the probability of being "1".
[0264] Considering the statistical characteristics described above, for coding blocks with a relatively wide clipping range, initial probability information with a relatively high probability of using a CBF_Flag of "1" can be used. On the contrary, for coding blocks with a relatively narrow clipping range, initial probability information with a relatively high probability of using a CBF_Flag of "0" can be used.
[0265] The above CBF_Flag can be a flag used to indicate whether the corresponding block contains non-zero transform coefficients. When the CBF_Flag is 1, it means that the corresponding block contains at least one non-zero transform coefficient. When the CBF_Flag is 0, it means that the corresponding block does not contain non-zero transform coefficients.
[0266] As another example, when the clipping range of a coding block is relatively wide, for the corresponding coding block, the inter-picture prediction has a relatively high prediction accuracy. Therefore, the probability that the PredModeFlag of the corresponding coding block is "1" is relatively higher than that of "0".
[0267] On the contrary, when the clipping range of a coding block is relatively narrow, for the corresponding coding block, the intra-picture prediction has a relatively high prediction accuracy. Therefore, the probability that the PredModeFlag of the corresponding coding block is "0" is relatively higher than that of "1".
[0268] Considering the statistical characteristics described above, for coding blocks with a relatively wide clipping range, initial probability information with a relatively high probability of using a PredModeFlag of "1" can be used. On the contrary, for coding blocks with a relatively narrow clipping range, initial probability information with a relatively high probability of using a PredModeFlag of "0" can be used.
[0269] The above PredModeFlag can be a flag used to indicate the prediction method applicable to the corresponding block. When the PredModeFlag is 1, it means that inter-picture prediction is applicable to the corresponding block. When the PredModeFlag is 0, it means that intra-picture prediction is applicable to the corresponding block.
[0270] As described above, the context of specific syntax elements can be optimized considering the characteristics related to the clipping range. The above specific syntax elements are not limited to CBF_Flag and PredModeFlag, and adaptive context probabilities based on the clipping range can also be applied to other syntax elements.
[0271] Figure 27 It is a sequence diagram for explaining the process of performing deblocking filtering based on the clipping range applicable to another embodiment of the present invention.
[0272] As Figure 27As shown, Block A and Block B are adjacent to each other. Assume that the clipping range of Block A is from 50 to 160, and the clipping range of Block B is from 90 to 200. In Figure 27 In the example shown, the clipping range of Block A and the clipping range of Block B overlap in the range from 90 to 160.
[0273] In the present invention, deblocking filtering is adaptively performed in consideration of the characteristics of the clipping range of Block A and the clipping range of Block B. Specifically, deblocking filtering is adaptively performed based on the overlapping information of the clipping range of Block A and the clipping range of Block B.
[0274] For example, when the clipping ranges of Block A and Block B do not overlap with each other, since the two blocks are blocks included in different regions, it is not suitable to filter the boundary between the two blocks. Therefore, in the above situation, filtering can be not performed for the boundary between Block A and Block B. Or, even when filtering is performed, the influence on the pixels in the adjacent block can be reduced by setting a higher (or extremely high) filtering coefficient for the pixels belonging to the same block as the pixel to be filtered.
[0275] When the clipping ranges of Block A and Block B partially overlap, a higher filtering coefficient can be set for the pixels belonging to the same block as the pixel to be filtered. Regarding how high the filtering coefficient is set, it can be adaptively determined according to the overlapping degree of the clipping ranges. For example, the lower the overlapping degree of the clipping ranges, the higher the filtering coefficient that can be set for the pixels belonging to the same block as the pixel to be filtered.
[0276] In another embodiment to which the present invention is applied, the prediction mode can be restrictively used in consideration of the clipping characteristics.
[0277] For example, when the clipping range of the coding block is wide, it can be determined that all predictions of intra-picture prediction and inter-picture prediction can be used for the corresponding coding block.
[0278] On the contrary, when the clipping range of the coding block is narrow, it can be determined that only the mean (DC) mode or the planar mode in intra-picture prediction and / or the merge mode in inter-picture prediction can be used for the corresponding coding block.
[0279] Regarding the application of the intra-picture prediction mode, when the clipping characteristics of the upper adjacent block are similar to those of the current block, intra-picture prediction referring to the pixels of the upper adjacent block can be performed. On the contrary, when the clipping characteristics of the left adjacent block are similar to those of the current block, intra-picture prediction referring to the pixels of the left adjacent block can be performed.
[0280] In the above-described embodiment, it is possible to perform a determination (a determination of wide or narrow) as to whether the clipping range is wide or narrow by comparing the clipping range with a specific threshold value. The specific threshold value can be signaled via a bitstream or a threshold value pre-agreed upon in the video encoding device and the video decoding device can be used. The above specific threshold value can include a first threshold value for determining whether the clipping range is wide and a second threshold value for determining whether the clipping range is narrow. When the clipping range is between the first threshold value and the second threshold value, the above-described embodiment of the present invention may not be applicable.
[0281] In the above-described embodiment, it is possible to perform a determination of the overlapping degree of the clipping range by comparing with a specific threshold value. The specific threshold value can be signaled via a bitstream or a threshold value pre-agreed upon in the video encoding device and the video decoding device can be used. The overlapping degree of the above clipping range can be adaptively determined based on the determination result as to whether the clipping range of each block is wide or narrow. For example, when the respective clipping ranges of block A and / or block B are narrow, it can be determined that there is more overlap even if the clipping ranges of the two blocks are relatively narrow. On the contrary, when the respective clipping ranges of block A and / or block B are wide, it can be determined that there is less overlap even if the clipping ranges of the two blocks are relatively wide.
[0282] In the above-described embodiment, the determination as to whether the clipping ranges are similar can be determined based on at least one of the width of the clipping range and the overlapping degree of the clipping range.
[0283] In the above-described embodiment, the clipping range can be derived by decoding information related to the clipping range transmitted in an arbitrary area unit. However, even if the information related to the clipping range is not transmitted, it is possible to achieve a practically similar effect by modifying various embodiments of the present disclosure that utilize the clipping range. For example, in the above-described embodiment, it is possible to determine the clipping range of a corresponding area by searching for the maximum value and / or minimum value of the pixels included in the area where the clipping range needs to be derived. Specifically, in the embodiment described with reference to Figure 27 it is possible to determine the clipping range of block A and / or block B by searching for the maximum value and / or minimum value of the reconstructed pixels of block A and / or block B. The clipping range determined in the above-described manner can be used in the same way as the clipping range derived by decoding the information related to the clipping range.
[0284] The exemplary methods in this disclosure are described in the form of an action sequence for the sake of clarity in illustration, but this is not intended to limit the execution order of the steps. When necessary, each step can also be executed simultaneously or in a different order. To implement the methods in this disclosure, it is also possible to append other steps on the basis of the example steps, or only include the remaining steps except for a part of the steps, or append and include other steps after excluding a part of the steps.
[0285] The various different embodiments of this disclosure are not the result of listing all possible combinations, but only for the purpose of illustrating the representative forms of this disclosure. The matters described in the various different embodiments can be applied independently or in combinations of two or more.
[0286] In addition, the various different embodiments in this disclosure can be implemented by hardware, firmware, software, or a combination of the above. When implemented by hardware, it can be implemented by one or more ACICs (Application Specific Integrated Circuits), DSPs (Digital Signal Processors), DSPDs (Digital Signal Processing Devices), PLDs (Programmable Logic Devices), FPGAs (Field Programmable Gate Arrays), general processors, controllers, microcontrollers, microprocessors, etc.
[0287] The scope of this disclosure includes software, device-executable instructions (such as operating systems, application programs, firmware, programs, etc.) that can cause the actions in the methods of various different embodiments to be executed on a device or a computer, and non-transitory computer-readable media (non-transitory computer-readable medium) that can be executed by a device or a computer and store the above software or instructions, etc.
[0288] Industrial Applicability
[0289] The present invention can be used for encoding / decoding images.
Claims
1. An image decoding method, comprising the following steps: Decode the index information of the band region of the current block; Perform a first filtering on the pixels in the current block based on the index information of the band region; and performing loop filtering in the current block after the first filtering, wherein the loop filtering includes a sample adaptive offset mode wherein generating N band regions by dividing the pixel range according to the bit depth wherein the band region index information includes: first band region index information indicating the band region including the maximum value of the pixels in the N band regions; second band region index information indicating the band region including the minimum value of the pixels in the N band regions wherein the sample adaptive offset mode includes an edge offset mode and a band offset mode wherein the video decoding method further includes the following step: decoding sample adaptive offset mode information indicating which one of the edge offset mode and the band offset mode is to be performed 2. The image decoding method according to claim 1, wherein, the sample adaptive offset mode information indicates whether a sample adaptive offset non-action mode is applied to the current block 3. The image decoding method according to claim 2, wherein, the sample adaptive offset mode information includes luminance sample adaptive offset mode information, wherein the luminance sample adaptive offset mode information is information on whether to perform any one of the edge offset mode, the band offset mode, and the sample adaptive offset non-action mode on the luminance component of the current block 4. The image decoding method according to claim 2, wherein, the sample adaptive offset mode information includes chrominance sample adaptive offset mode information, wherein the chrominance sample adaptive offset mode information is information on whether to perform any one of the edge offset mode, the band offset mode, and the sample adaptive offset non-action mode on the chrominance component of the current block 5. The image decoding method according to claim 1, further comprising the following steps: Decode the sample adaptive offset merge information indicating whether to use the sample adaptive offset information of the left coded block and the upper coded block, wherein, the left encoded block is an adjacent block adjacent to the current block on the left, and the upper encoded block is an adjacent block adjacent to the current block on the upper side 6. An image encoding method, comprising the following steps: Determine at least one band region of the current block; Perform a first filtering on the pixels in the current block based on the at least one band region; Perform loop filtering in the current block after the first filtering, wherein the loop filtering includes a sample adaptive offset mode; and Encode the index information of the band region related to the at least one band region, wherein, generating N band regions by dividing the pixel range according to the bit depth wherein the band region index information includes: first band region index information indicating the band region including the maximum value of the pixels in the N band regions; second band region index information indicating the band region including the minimum value of the pixels in the N band regions wherein the sample adaptive offset mode includes an edge offset mode and a band offset mode wherein the video encoding method further includes the following step: encoding sample adaptive offset mode information indicating which one of the edge offset mode and the band offset mode is to be performed 7. The image encoding method according to claim 6, wherein, the sample adaptive offset mode information indicates whether a sample adaptive offset non-action mode is applied to the current block 8. The image encoding method according to claim 7, wherein, the sample adaptive offset mode information includes luminance sample adaptive offset mode information, wherein the luminance sample adaptive offset mode information is information on whether to perform any one of the edge offset mode, the band offset mode, and the sample adaptive offset non-action mode on the luminance component of the current block 9. The video coding method according to claim 7, wherein, The sample adaptive offset mode information includes color difference sample adaptive offset mode information, where the color difference sample adaptive offset mode information is information regarding whether to perform any one of the edge offset mode, the band offset mode, and the sample adaptive offset non-action mode on the chrominance component of the current block.
10. The video coding method according to claim 6, further comprising the following steps: Encoding sample adaptive offset merge information indicating whether to use sample adaptive offset information of a left coding block and an upper coding block, wherein, The left coded block is an adjacent block adjacent to the current block on the left, and the upper coded block is an adjacent block adjacent to the current block on the upper side.
11. A method for generating a bitstream of an encoded video, comprising the following steps: Determining at least one band region of a current block; Performing a first filtering on pixels in the current block based on the at least one band region; And Performing loop filtering in the current block after the first filtering, where the loop filtering includes a sample adaptive offset mode. Wherein, Generating N band regions by dividing the pixel range according to the bit depth. Wherein the band region index information includes: first band region index information indicating the band region including the maximum value of the pixels in the N band regions; second band region index information indicating the band region including the minimum value of the pixels in the N band regions. Wherein the sample adaptive offset mode includes an edge offset mode and a band offset mode. Generating the bitstream by encoding the band region index information related to the at least one band region and encoding the sample adaptive offset mode information indicating which one of the edge offset mode and the band offset mode to perform.
Citation Information
Patent Citations
Image encoding method, image decoding method, image encoding device, image decoding device, and image encoding and decoding device
CN103636209A
Moving image encoding method, moving image encoding device, moving image decoding method, and moving image decoding device
CN103650498A