Video decoding method and computer readable redording meduim for performing intra prediction using adaptive filter
The adaptive filter application in intra-prediction for video coding improves encoding performance by dynamically determining filter usage based on prediction modes and block sizes, addressing suboptimal filtering in existing standards.
Patent Information
- Authority / Receiving Office
- KR · KR
- Patent Type
- Patents
- Current Assignee / Owner
- ELECTRONICS & TELECOMM RES INST
- Filing Date
- 2024-12-19
- Publication Date
- 2026-07-29
AI Technical Summary
Existing video coding methods in standards like H.264/AVC do not effectively determine when to apply filters during intra-prediction, leading to suboptimal encoding performance.
An adaptive filter approach is applied to both the surrounding pixel values of a block to be predicted and the predicted pixel values of a current block, with decisions based on intra prediction mode and block size, using methods like Rate-Distortion Optimization (RDO) and filter coefficients tailored to specific pixel locations.
Improves encoding performance by effectively predicting luminance or chrominance signal blocks, enhancing the efficiency of image coding.
Smart Images

Figure 112024141292560-PAT00006_ABST
Abstract
Description
Technology Field
[0001] The present invention relates to video coding, and more specifically, to a method and apparatus for performing intra-prediction by applying an adaptive filter to the surrounding pixel values of a block to be predicted or to the predicted pixel values of a current block. Background Technology
[0002] With the recent advent of digital TV and other technologies, technology in the fields of broadcast television and home entertainment is advancing rapidly. Technologies in these areas are being commercialized through the standardization of video compression technology. The ITU-T (International Telecommunications Union - Telecommunication) H.263 standard is widely used for video compression, and MPEG-4, the next standard from the MPEG (Motion Picture Experts Group), is being used for internet-based video applications.
[0003] Since the completion of the H.263 standard, the ITU-T VCEG (Video Coding Experts Group) has pursued a short-term goal of adding additional features to the H.263 standard and a long-term goal of developing a new standard for low-bitrate visual communication. In 2001, the Joint Video Team (JVT), composed of experts from MPEG and VCEG, was formed, and the standardization work for ITU-T H.264 / MPEG-4 part 10, a new standard for video coding, has been carried out by the JVT. The H.264 standard may also be referred to as AVC (Advanced Video Coding). The technical goals of H.264 / AVC include a significant improvement in coding efficiency, coding technology robust to loss and error, network-friendliness, low latency capability, and accurate match decoding.
[0004] Neighboring pixels within an image generally have similar values, and this holds true even for the minimum block sizes of the H.264 / AVC standard, such as 4×4 or 16×16 blocks. By utilizing this similarity of values between blocks, predictions can be made to the image, and the differences from the original image can be encoded. This is called intra-prediction, and intra-prediction can improve the efficiency of image coding.
[0005] Additionally, filters may be applied prior to intra prediction. Typically, in the H.264 / AVC standard, filters are applied to reference pixel values during intra prediction, and the filtered values are then used for the prediction. However, in some cases, image coding performance may be higher when performing intra prediction without applying filters compared to performing it after applying them.
[0006] Accordingly, a method for determining whether to apply a filter when performing intra-prediction can be proposed. The problem to be solved
[0007] The technical problem of the present invention is to provide a method and apparatus for performing intra-prediction by applying an adaptive filter to the surrounding pixel values of a block to be predicted or to the predicted pixel values of a current block in image encoding. More specifically, an adaptive filter (pre-filter) is applied to the real pixel values of the current block to perform intra-prediction, and then prediction is performed. Additionally, an adaptive filter (post-filter) is applied to the predicted pixel values of the current block to calculate a residual signal. means of solving the problem
[0008] In one embodiment, an image decoding method is provided. The image decoding method includes the steps of determining whether to apply a first filter to a reference pixel value of a current block and deriving a predicted value for the current block using the reference pixel value derived according to whether to apply the first filter.
[0009] Whether to apply the first filter above can be determined based on at least one of the intra prediction mode of the current block and the size of the current block.
[0010] In the step of deriving a predicted value for the current block, a second filter can be applied based on at least one of the intra-prediction mode of the current block and the size of the current block to derive a predicted value for the current block.
[0011] If the intra prediction mode of the current block is a preset non-directional mode, the second filter can be applied to the prediction pixel of the current block adjacent to the boundary of the reference pixel value to derive a prediction value for the current block.
[0012] If the intra prediction mode of the current block is a preset non-directional mode, the second filter can be applied to the top pixels of the current block and the leftmost pixels of the current block among the prediction pixels of the current block adjacent to the boundary of the reference pixel value.
[0013] When applying the second filter, a 3-tap filter may be applied to the top leftmost pixel of the current block among the predicted pixels of the current block adjacent to the boundary of the reference pixel value, and a 2-tap filter may be applied to the remaining pixels among the predicted pixels of the current block adjacent to the boundary of the reference pixel value, excluding the top leftmost pixel of the current block.
[0014] In another embodiment, a computer-readable recording medium is provided on which a program for executing an image decoding method is recorded. The program includes the steps of determining whether to apply a first filter to a reference pixel value of a current block and deriving a predicted value for the current block using the reference pixel value derived according to whether to apply the first filter.
[0015] Whether to apply the first filter above can be determined based on at least one of the intra prediction mode of the current block and the size of the current block.
[0016] In the step of deriving a predicted value for the current block, a second filter can be applied based on at least one of the intra-prediction mode of the current block and the size of the current block to derive a predicted value for the current block.
[0017] If the intra prediction mode of the current block is a preset non-directional mode, the second filter can be applied to the prediction pixel of the current block adjacent to the boundary of the reference pixel value to derive a prediction value for the current block.
[0018] If the intra prediction mode of the current block is a preset non-directional mode, the second filter can be applied to the top pixels of the current block and the leftmost pixels of the current block among the prediction pixels of the current block adjacent to the boundary of the reference pixel value.
[0019] When applying the second filter, a 3-tap filter may be applied to the top leftmost pixel of the current block among the predicted pixels of the current block adjacent to the boundary of the reference pixel value, and a 2-tap filter may be applied to the remaining pixels among the predicted pixels of the current block adjacent to the boundary of the reference pixel value, excluding the top leftmost pixel of the current block. Effects of the invention
[0020] Improves encoding performance by effectively predicting the luminance or chrominance signal blocks to be encoded. Brief explanation of the drawing
[0021] Figure 1 is a block diagram of an encoder for the H.264 / AVC (Advanced Video Coding) standard. Figure 2 is a block diagram of a decoder for the H.264 / AVC standard. Figure 3 shows an example of labeling a prediction sample in 4×4 luma prediction mode. Figure 4 shows nine prediction modes within a 4×4 luma prediction mode. Figure 5 shows an example of a method for applying a filter before performing intra-prediction. Figure 6 shows an example of an intra-prediction method using the proposed adaptive filter. Figure 7 shows the case where a filter is applied to the predicted value according to the intra-prediction method using the proposed adaptive filter. FIG. 8 is a block diagram of an encoder and a decoder in which an embodiment of the present invention is implemented. Specific details for implementing the invention
[0022] Embodiments of the present invention are described below with reference to the attached drawings so that those skilled in the art can easily implement them. However, the present invention may be embodied in various different forms and is not limited to the embodiments described herein. Furthermore, in order to clearly explain the present invention in the drawings, parts unrelated to the explanation have been omitted, and similar parts throughout the specification have been given similar reference numerals. Additionally, explanations of parts that can be easily understood by those skilled in the art even without detailed description have been omitted.
[0023] Throughout the specification and claims, when a part is described as “comprising” a certain component, this means that, unless specifically stated otherwise, it does not exclude other components but may include additional components.
[0024] Figure 1 is a block diagram of an encoder for the H.264 / AVC (Advanced Video Coding) standard.
[0025] Referring to Fig. 1, the encoder includes two paths of data flow. One is a forward path, and the other is a reconstruction path.
[0026] First, the forward path is explained. Input frame F n Encoding is performed on the macroblock unit. A macroblock has a size of 16×16 pixels in the original image. For each input frame, intra-prediction or inter-prediction is performed. Intra-prediction performs prediction using the similarity of values between blocks within a frame and encodes the difference from the original image, while inter-prediction performs prediction using the similarity of values between blocks across frames and encodes the difference from the original image. During intra-prediction or inter-prediction, a prediction macroblock P is formed based on the reconstructed frame. During intra-prediction, P is the previously encoded current frame, the decoded current frame, or the reconstructed current frame (uF n It can be formed from samples within '). When P is formed from the reconstructed current frame, unfiltered samples may be used. During inter-prediction, P may be formed by performing motion compensation or motion prediction from one or more reference frames. In FIG. 1, the reference frame is F, which is a previously encoded frame. n-1 It is assumed that it is. However, it is not limited to this, and each prediction macroblock may be formed from a previous 1 frame or 2 frames or a subsequent 1 frame or 2 frames that have already been encoded or reconstructed.
[0027] P is the residual or difference macroblock D n It is subtracted from the current macroblock to create. D nIt is transformed (T) and quantized (Q) using a block transform to generate X. X is a set of encoded coefficients. The encoded coefficients are reordered and entropy-coded, and the entropy-coded coefficients form a compressed bitstream along with the information necessary to decode the macroblock. The compressed bitstream is sent to the Network Abstraction Layer (NAL) for transmission or storage.
[0028] Now, the reconstruction path is explained. The quantized macroblock coefficient X is decoded to generate a reconstruction frame used for encoding other macroblocks. X is inversely quantized (Q -1 ) and inverse transform (T -1 , Inverse Transformed) becomes difference macroblock D n Generates '. Difference macroblock D generated in the reconstruction path. n ' is D, a difference macroblock generated in the forward path n It is not identical to. Loss occurs due to quantization, and accordingly, D n ' is D n It may be a distorted form of. Predicted macroblock P is D n Added to, reconstructed macroblock uF n This is generated. Reconstruction macroblock uF n It could also be a distorted form of the original macroblock Fn. uF n A filter may be applied to reduce blocking distortion, and the reconstruction frame may be formed from multiple reconstruction macroblocks to which the filter is applied.
[0029] Figure 2 is a block diagram of a decoder for the H.264 / AVC standard.
[0030] Referring to FIG. 2, the decoder receives a compressed bit sequence from the NAL. The received data is entropy decoded and rearranged to generate X, a set of quantized coefficients. Inverse quantization and inverse transform are performed on X to obtain D n This is generated, and the decoder uses the header information decoded from the bit sequence to generate a prediction macroblock P identical to the prediction macroblock generated by the encoder. D in P n This is added to uF n This is generated, and the macroblock F decoded by 'uFn' passing through a filter n This can be generated.
[0031] Below, intra-prediction is explained.
[0032] When intra prediction is performed on a block (or macroblock), the prediction block (or macroblock) P can be formed based on encoded blocks (or macroblocks) or reconstructed blocks (or macroblocks). P is subtracted from the original image, and the difference value obtained by subtracting P is encoded and transmitted. Intra prediction can be performed by a lumina prediction mode or a chroma prediction mode. In the lumina prediction mode, intra prediction can be performed in units of 4×4 sub-blocks or 16×16 macroblocks; in the 4×4 lumina prediction mode, there are a total of 9 additional prediction modes, and in the 16×16 lumina prediction mode, there are a total of 4 additional prediction modes. The unit in which intra prediction is performed is not limited to sub-blocks or macroblocks, and can be performed using units of various sizes. The unit of pixels where intra-prediction is performed can be called a Coding Unit (CU) or Prediction Unit (PU), and the size of the CU or PU may be the same as the size of a subblock or macroblock as previously explained.
[0033] FIG. 3 shows an example of labeling prediction samples in a 4×4 luma prediction mode. Referring to FIG. 3, prediction block P is calculated based on samples labeled A to H or I to L.
[0034] Figure 4 shows nine prediction modes within a 4×4 luma prediction mode.
[0035] The encoder can select any one of nine prediction modes for each block to minimize the difference between the predicted block P and the block to be encoded. The nine prediction modes are as follows.
[0036] 1) Mode 0 (vertical): The upper samples of the prediction block, A through D, are vertically extrapolated.
[0037] 2) Mode 1 (horizontal): The left samples of the prediction block, I through L, are horizontally extrapolated.
[0038] 3) Mode 2 (DC); all samples within P are predicted by the average of A to D and I to L.
[0039] 4) Mode 3 (Diagonal Down-Left): Samples within P are interpolated at a 45-degree angle between down-left and up-right.
[0040] 5) Mode 4 (Diagonal Down-Right): Samples within P are extrapolated at a 45-degree downward angle.
[0041] 6) Mode 5 (Vertical-Right): Samples within P are extrapolated or interpolated at an angle of approximately 26.6 degrees to the right of the vertical axis.
[0042] 7) Mode 6 (Horizontal-Down): Samples within P are extrapolated downward from the horizontal axis at an angle of approximately 26.6 degrees.
[0043] 8) Mode 7 (Vertical-Left): Samples within P are extrapolated to the left of the vertical axis at an angle of approximately 26.6 degrees.
[0044] 9) Mode 8 (Horizontal-Up): Samples within P are interpolated at an angle of approximately 26.6 degrees upward from the horizontal axis.
[0045] In FIG. 4, the arrow indicates the direction in which prediction is performed within each mode. Meanwhile, for modes 3 through 8, samples within the prediction block are formed from the weighted average of prediction samples A through H or I through L. For example, in mode 4, the sample d located at the top right of the prediction block can be predicted as d=round(B / 4+C / 2+D / 4). The encoder calculates the Sum of Absolute Errors (SAE) for each prediction block generated by each prediction mode and performs intra-prediction by the prediction mode with the smallest SAE.
[0046] Figure 5 shows an example of a method for applying a filter before performing intra-prediction.
[0047] In general, intra prediction is performed after applying a filter to samples used in the H.264 / AVC standard. The samples may also be referred to as reference pixel values. In the example of Figure 5, it is assumed that the filter is a low-pass filter and that the filter is applied only to an 8×8 block.
[0048] Mathematical formula 1 is an example of a mathematical formula representing a 3-tap filter applied to a reference pixel value.
[0049] <Mathematical Formula 1>
[0050] h[Z] = (A + 2×Z + Q) / 4
[0051] h[A] = (Z + 2×A + B) / 4
[0052] …
[0053] h[P] = (O + 3×P) / 4
[0054] h[Q] = (Z + 2×Q + R) / 4
[0055] …
[0056] h[X] = (W + 3×X) / 4
[0057] h[Z] represents the value calculated by applying a filter to Z. Referring to Equation 1, filter coefficients (1, 2, 1) are applied to filter the reference pixel value, and intra prediction is performed by 9 prediction modes based on the filtered reference pixel value (h[A]~h[Z]). Filters can also be applied during the decoding process, just as they are applied during the encoding process.
[0058] When performing filtering prior to intra-prediction, there may be cases where encoding performance improves when filtering is not performed. Accordingly, a method for performing intra-prediction by adaptively applying filters can be proposed.
[0059] Figure 6 shows an example of an intra-prediction method using the proposed adaptive filter.
[0061] *
[0062] *
[0063] * Referring to FIG. 6, in step S201, the encoder determines whether to apply a filter to a reference pixel value. When determining whether to apply a filter, the encoder may determine whether to apply a filter by using information from surrounding blocks or by the Rate-Distortion Optimization (RDO) method.
[0064] When determining whether to apply a filter to a reference pixel value using information from surrounding blocks, the prediction mode of the current block is determined based on the Most Probable Mode (MPM) information of the surrounding blocks, and the decision to apply a filter to the reference pixel value can be made according to the determined prediction mode of the current block. For example, assuming the current block is 'C', the parent block is 'A', and the left block is 'B', if the prediction mode of the current block is the same as the prediction mode of 'A', the prediction mode of 'A' is determined as the prediction mode of the current block; and if the prediction mode of the current block is the same as the prediction mode of 'B', the prediction mode of 'B' can be determined as the prediction mode of the current block. Alternatively, if the prediction mode of the current block is a prediction mode other than the prediction mode of 'A' or the prediction mode of 'B', that prediction mode is encoded and transmitted. The decision to apply a filter to the reference pixel value can be made according to the prediction mode of the current block determined in this manner. Even if the size of the current block differs from that of the parent block or the left block, the prediction mode of the current block can be determined according to the prediction mode of the surrounding blocks.
[0065] Alternatively, when determining whether to apply a filter to a reference pixel value using information from surrounding blocks, the decision can be made based on the amount of change in surrounding reference pixel values. For example, if the reference pixel value to which a filter is to be applied is p[n], the difference between the surrounding reference pixel values p[n-1] and p[n+1] can be calculated and compared with a specific threshold value to determine whether to apply the filter.
[0066] Alternatively, in addition to the prediction mode of the current block, the decision to apply a filter to the reference pixel value can be made based on the size of the current block. In this case, the prediction mode of the current block and the decision to apply a filter based on the size of the current block are specified in advance, and the decision to apply the filter is made adaptively based on the prediction mode or the size.
[0067] Table 1 is a table specifying whether to apply a filter based on the prediction mode of the current block and the size of the current block.
[0068] Prediction mode of the current block Current block size 4×4 8×8 16×16 32×32 0 0 0 0 0 1 0 0 0 0 2 0 0 0 0 3 1 1 1 1 4 0 1 1 1 … … … … …
[0069] Referring to Table 1, '0' means that no filter is applied, and '1' means that a filter is applied. For example, when the current block size is 4×4, if the prediction mode of the current block is 1, no filter is applied, and if the prediction mode of the current block is 3, a filter may be applied. Additionally, whether a filter is applied to the reference pixel value may be determined based on whether the surrounding blocks are intra-frame encoded or inter-frame encoded. For example, in the case of constrained intra-prediction, when the surrounding blocks are inter-frame encoded, the inter-frame encoded values are filled using the values of the surrounding blocks encoded intra-frame, and in this case, filtering may not be applied. If it is decided to apply a filter to the reference pixel value, the encoder applies the filter to the reference pixel value in step S202. The applied filter may be a commonly used filter. For example, the 3-tap of Equation 1 may be used, or a 2-tap filter may be used. When a 2-tap filter is used, various filter coefficients such as (1 / 8, 7 / 8), (2 / 8, 6 / 8), (3 / 8, 5 / 8) may be used. The filtered reference pixel value may be used when applying the filter to other reference pixel values. Additionally, when applying the filter to reference pixel values, the filter may be applied to all reference pixel values or only to some reference pixel values. In step S203, the encoder performs intra prediction based on the reference pixel values to which the filter is applied or not to which the filter is not applied. In step S204, the encoder determines whether to apply the filter to the predicted values for each prediction mode predicted by the intra prediction performance for the encoding of the current block. Here, each prediction mode may be one of the nine prediction modes of the 4×4 luminance prediction mode.When determining whether to apply a filter to the predicted value for each prediction mode, the decision can also be made by using information from surrounding blocks or by the RDO method.
[0070] When determining whether to apply a filter to a predicted value using information from neighboring blocks, the prediction mode of the current block is determined based on the prediction mode information (MPM) of the neighboring blocks, and the decision to apply a filter to the predicted value can be made according to the determined prediction mode of the current block. For example, assuming the current block is 'C', the parent block is 'A', and the left block is 'B', if the prediction mode of the current block is the same as the prediction mode of 'A', the prediction mode of 'A' is determined as the prediction mode of the current block; and if the prediction mode of the current block is the same as the prediction mode of 'B', the prediction mode of 'B' can be determined as the prediction mode of the current block. Alternatively, if the prediction mode of the current block is a prediction mode other than the prediction mode of 'A' or the prediction mode of 'B', that prediction mode is encoded and transmitted. In this case, if the prediction mode of the current block is a specific prediction mode (DC or planar), the difference between the reference pixel value and the predicted value may be relatively larger compared to other prediction modes. For example, the difference between the reference pixel value and the predicted value in the planar prediction mode may be relatively larger compared to other prediction modes. In planar prediction mode, the predicted value can be calculated as the average of a first predicted value obtained by horizontally linearly interpolating each row and a second predicted value obtained by vertically linearly interpolating each column. When linearly interpolating horizontally, the right value is the same as the value located in the upper right direction among the reference pixel values (i.e., D in Fig. 3), and when linearly interpolating vertically, the bottom value is the same as the value located in the lower left direction among the reference pixel values (i.e., L in Fig. 3). Since the predicted value is not obtained directly from the reference pixel value, the difference between the reference pixel value and the predicted value may be relatively large. In such cases, the efficiency of intra-prediction can be improved by applying a filter to the predicted value. Depending on the prediction mode of the current block determined in this way, it can be decided whether to apply a filter to the predicted value.Even if the size of the current block is different from that of the parent block or the left block, the prediction mode of the current block can be determined based on the prediction mode of the surrounding blocks.
[0071] Alternatively, in addition to the prediction mode of the current block, the decision to apply a filter to the prediction value can be determined based on the size of the current block. In this case, the prediction mode of the current block and the decision to apply a filter based on the size of the current block are specified in advance, and the decision to apply the filter is made adaptively according to the prediction mode or size. Alternatively, the decision to apply a filter to the prediction value may be determined based on whether the surrounding blocks are encoded within the frame or between frames.
[0072] If it is decided to apply a filter to the predicted value, the encoder applies the filter to the predicted value in step S205. Accordingly, the prediction of the current block is completed, and the encoder calculates the residual signal and performs entropy encoding.
[0073] Figure 7 shows the case where a filter is applied to the predicted value according to the intra-prediction method using the proposed adaptive filter.
[0074] Referring to FIG. 7, when the prediction mode of the current block is a non-directional mode, the difference between the reference pixel value and the predicted value may be relatively larger compared to other prediction modes; therefore, a filter may be applied only to the predicted values of pixels adjacent to the boundary with the surrounding restored reference pixel values. For example, filtering may be performed on the predicted values corresponding to a1~a8 and b1, c1, d1, e1, f1, g1, and h1, which are a single row of pixels located at the boundary in FIG. 7. Alternatively, a filter may be applied to the predicted values corresponding to a1~a8, b1~b8 and c1~c2, d1~d2, e1~e2, f1~f2, g1~g2, and h1~h2, which are two rows of pixels located at the boundary. The filter applied in this case may be a commonly used filter. For example, the 3-tap of Equation 1 may be used, or a 2-tap filter may be used. When a 2-tap filter is used, various filter coefficients such as (1 / 8, 7 / 8), (2 / 8, 6 / 8), (3 / 8, 5 / 8) may be used. Alternatively, depending on the pixel location, either a 2-tap filter or a 3-tap filter may be selected and used.
[0075] In the same way, if the prediction mode of the current block is a prediction mode that uses reference pixel values corresponding to A~P, such as mode 0, mode 3, or mode 7, a filter can be applied to the prediction values corresponding to a1~a8, where the difference between the reference pixel value and the prediction value is relatively large. Additionally, if the prediction mode of the current block is a prediction mode that uses reference pixel values corresponding to Q~X, such as mode 1 or mode 8, a filter can be applied to the prediction values corresponding to a1, b1, c1, d1, e1, f1, g1, and h1, where the difference between the reference pixel value and the prediction value is relatively large.
[0076] Mathematical formula 2 is an example of a mathematical formula representing a filter applied to a predicted value when a 2-tap filter or a 3-tap filter is selected and used depending on the pixel location.
[0077] <Mathematical Formula 2>
[0078] f[a1] = (2×A + 4×a1 + 2×Q) / 8
[0079] f[b1] = (2×B + 6×b1) / 8
[0080] f[c1] = (2×C + 6×c1) / 8
[0081] …
[0082] f[a2] = (2×R + 6×a2) / 8
[0083] f[a3] = (2×S + 6×a3) / 8
[0084] …
[0085] In Equation 2, f[a1] is the value obtained by applying a filter to the predicted value a1, and A and Q represent the reference pixel values. Referring to Equation 2, it can be seen that a 3-tap filter is applied to the predicted value of the pixel located at a1, and a 2-tap filter is applied to the predicted values of the remaining pixels.
[0086] Equation 3 is another example of an equation representing a filter applied to a predicted value when a filter is applied to a predicted value according to the proposed method of performing intra-prediction using an adaptive filter.
[0087] <Mathematical Formula 3>
[0088] 1. Vertical low-pass filter
[0089] v[a1] = (A + 2×a1 + a2) / 4
[0090] v[a2] = (v[a1] + 2×a2 + a3) / 4
[0091] …
[0092] v[a8] = (v[a7] + 3×a8) / 4
[0093] v[b1] = (B + 2×b1 + b2) / 4
[0094] …
[0095] 2. Horizontal low-pass filter
[0096] h[a1] = (Q + 2×v[a1] + v[b1]) / 4
[0097] h[b1] = (h[a1] + 2×v[b1] + v[c1]) / 4
[0098] …
[0099] h[h1] = (h[g1] + 3×v[h1]) / 4
[0100] h[a2] = (R + 2×v[a2] + v[b2]) / 4
[0101] …
[0102] The filter in Equation 3 can be used when applying an adaptive filter based on the method of utilizing information from surrounding blocks for each prediction mode or the RDO method. Referring to Equation 3, a low-pass filter with filter coefficients (1, 2, 1) is applied sequentially in two directions: vertical and horizontal. First, the filter is applied in the vertical direction, and then the filter is applied again in the horizontal direction based on the value to which the filter was applied. The predicted value to which the filter was applied can be used when applying a filter to another predicted value.
[0103] Meanwhile, when the RDO method is applied, the intra-prediction method described in Fig. 6 can be repeated.
[0104] FIG. 8 is a block diagram of an encoder and a decoder in which an embodiment of the present invention is implemented.
[0105] The encoder (800) includes a processor (810) and a memory (820). The processor (810) implements the proposed function, process and / or method. The processor (810) determines whether to apply a first filter to a reference pixel value based on information of surrounding blocks of the current block, and if it is determined to apply the first filter, applies the first filter to the reference pixel value, performs intra prediction for the current block based on the reference pixel value, determines whether to apply a second filter to the predicted value for each prediction mode of the current block predicted by the intra prediction based on information of surrounding blocks, and if it is determined to apply the second filter, applies the second filter to the predicted value for each prediction mode of the current block. The memory (820) is connected to the processor (810) and stores various information for driving the processor (810).
[0106] The decoder (900) includes a processor (910) and a memory (920). The processor (910) implements the proposed function, process and / or method. The processor (910) determines whether to apply a first filter to a reference pixel value based on information of surrounding blocks of the current block, and if it is determined to apply the first filter, applies the first filter to the reference pixel value, performs intra prediction for the current block based on the reference pixel value, determines whether to apply a second filter to the predicted value for each prediction mode of the current block predicted by the intra prediction based on information of surrounding blocks, and if it is determined to apply the second filter, applies the second filter to the predicted value for each prediction mode of the current block. The memory (920) is connected to the processor (910) and stores various information for driving the processor (910).
[0107] The processor (810, 910) may include an application-specific integrated circuit (ASIC), other chipsets, logic circuits, and / or data processing devices. The memory (820, 920) may include read-only memory (ROM), random access memory (RAM), flash memory, memory cards, storage media, and / or other storage devices. When the embodiment is implemented in software, the above-described technique may be implemented as a module (process, function, etc.) that performs the above-described function. The module may be stored in the memory (820, 920) and executed by the processor (810, 910). The memory (820, 920) may be inside or outside the processor (810, 910) and may be connected to the processor (810, 910) by various well-known means.
[0108] In the exemplary system described above, methods are described based on a flowchart as a series of steps or blocks; however, the present invention is not limited to the order of the steps, and some steps may occur in a different order or simultaneously with other steps as described above. Furthermore, those skilled in the art will understand that the steps shown in the flowchart are not exclusive, and other steps may be included, or one or more steps of the flowchart may be omitted without affecting the scope of the present invention.
[0109] The embodiments described above include examples of various aspects. While it is not possible to describe all possible combinations for representing various aspects, those skilled in the art will recognize that other combinations are possible. Accordingly, the present invention shall be deemed to include all other substitutions, modifications, and changes falling within the scope of the following claims.
Claims
Claim 1 A step of determining whether to apply a first filter to a reference pixel value of a current block based on at least one of the intra prediction mode of the current block and the size of the current block; a step of deriving a prediction value for the current block using the reference pixel value; A method for image decoding, comprising the step of determining whether to apply a second filter for a predicted value of the current block based on at least one of the intra prediction mode of the current block and the size of the current block, and generating a filtered predicted value, wherein the intra prediction mode of the current block is determined based on MPM (Most Probable Mode) information, and when the intra prediction mode of the current block is DC mode, a 3-tap filter is applied to the upper-leftmost pixel of the current block among the predicted pixels of the current block, and a 2-tap filter is applied to the remaining uppermost pixels and leftmost pixels among the predicted pixels of the current block excluding the upper-leftmost pixel to generate the filtered predicted value, wherein the 3-tap filter includes first and second filter coefficients corresponding to the reference pixel value and a third filter coefficient corresponding to the predicted value, and the third filter coefficient is twice the first filter coefficient. Claim 2 A method for image encoding, wherein the information is encoded in relation to whether a first filter is applied to a reference pixel value of a current block and whether a second filter is applied to a predicted value of the current block, wherein the information is related to at least one of an intra prediction mode of the current block and the size of the current block, wherein the intra prediction mode of the current block is determined based on MPM (Most Probable Mode) information, and when the intra prediction mode of the current block is a DC mode, a 3-tap filter is applied to the upper-leftmost pixel of the current block among the predicted pixels of the current block, and a 2-tap filter is applied to the remaining uppermost pixels and leftmost pixels among the predicted pixels of the current block excluding the upper-leftmost pixel to generate a filtered predicted value, wherein the 3-tap filter includes first and second filter coefficients corresponding to the reference pixel value and a third filter coefficient corresponding to the predicted value, and the third filter coefficient is twice the first filter coefficient. Claim 3 In a non-transient computer-readable recording medium storing a bitstream, the bitstream includes information regarding whether a first filter is applied to a reference pixel value of a current block and whether a second filter is applied to a predicted value of the current block, wherein the information relates to at least one of the intra-prediction mode of the current block and the size of the current block, the intra-prediction mode of the current block is determined based on MPM (Most Probable Mode) information, and when the intra-prediction mode of the current block is DC mode, a 3-tap filter is applied to the upper-leftmost pixel of the current block among the predicted pixels of the current block, and a 2-tap filter is applied to the remaining uppermost pixels and leftmost pixels among the predicted pixels of the current block excluding the upper-leftmost pixel to generate a filtered predicted value, wherein the 3-tap filter includes first and second filter coefficients corresponding to the reference pixel value and a third filter coefficient corresponding to the predicted value, and the third filter coefficient is the first filter A computer-readable recording medium that is twice the count.