Video signal decoding / encoding method and bitstream transmission method
By using weighted filters for intra-frame prediction during video signal encoding/decoding, the problem of high transmission and storage costs in high-resolution image processing is solved, encoding/decoding efficiency is improved, and errors are reduced.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- IND ACAD COOP GRP OF SEJONG UNIV
- Filing Date
- 2017-03-27
- Publication Date
- 2026-06-23
AI Technical Summary
Existing video signal encoding/decoding technologies have high transmission and storage costs when processing high-resolution and high-quality images, and low efficiency in intra-frame prediction coding, resulting in large errors.
Intra-frame prediction is performed during video signal encoding/decoding using a weighted filter. By determining the intra-frame prediction mode of the current block, reference samples are obtained and weighted filtering is performed to generate a second prediction sample. Finally, filtering is performed to obtain reconstructed samples.
It improves the efficiency of video signal encoding/decoding, reduces the error between the original sample and the predicted sample, and realizes high-speed intra-frame predictive coding.
Smart Images

Figure CN116456115B_ABST
Abstract
Description
[0001] This application is a divisional application of the invention patent application "Method and Apparatus for Video Signal Processing Based on Intra-Frame Prediction", filed on March 27, 2017, with application number 201780036642.9. Technical Field
[0002] This invention relates to a video signal processing method and apparatus. Background Technology
[0003] In recent years, various application fields have seen an increasing demand for high-resolution, high-quality images such as HD (High Definition) and UHD (Ultra High Definition) images. The higher the resolution and quality of image data, the larger its data volume becomes compared to existing image data. Therefore, transmitting image data using existing wired or wireless broadband lines or storing it using existing storage media will significantly increase transmission and storage costs. To address these issues arising from the increasing resolution and quality of image data, efficient image compression techniques can be employed.
[0004] Image compression technology includes various techniques such as inter-frame prediction technology that predicts the pixel values of the current image from images before or after the current image, intra-frame prediction technology that predicts the pixel values of the current image using pixel information in the current image, and entropy symbolization technology that assigns shorter codes to values that occur more frequently and longer codes to values that occur less frequently. These image compression techniques can be used to effectively compress image data for transmission or storage.
[0005] On the other hand, the increasing demand for high-resolution images has led to a growing preference for stereoscopic image content as a new image service. Video compression technologies that can efficiently deliver high-resolution and ultra-high-resolution stereoscopic image content are also receiving increasing attention. Summary of the Invention
[0006] Technical issues
[0007] The purpose of this invention is to provide a method and apparatus for high-speed intra-frame predictive coding during video signal encoding / decoding.
[0008] Another objective of this invention is to provide a filter-based intra-frame prediction method and apparatus for video signal encoding / decoding.
[0009] Another objective of this invention is to provide a method for reducing the error between the original sample and the predicted sample during video signal encoding / decoding, thereby improving encoding / decoding efficiency.
[0010] The technical problems to be solved by the present invention are not limited to the aforementioned technical problems. Those skilled in the art to which this invention pertains will clearly understand other problems not mentioned above in the following description.
[0011] Technical solution
[0012] The video signal decoding method according to the present invention includes the following steps: determining an intra-prediction mode of a current block; obtaining reference samples based on neighboring samples of the current block; obtaining a first prediction sample of the current block based on the reference samples and the intra-prediction mode; obtaining a second prediction sample of the current block by applying weighted filtering to the reference samples and the first prediction sample; obtaining a reconstructed sample of the current block based on the second prediction sample; and filtering the reconstructed sample of the current block.
[0013] The video signal coding method according to the present invention includes the following steps: determining an intra-prediction mode for a current block; obtaining reference samples based on neighboring samples of the current block; obtaining a first prediction sample for the current block based on the reference samples and the intra-prediction mode; obtaining a second prediction sample for the current block by performing weighted filtering based on the reference samples and the first prediction sample; obtaining a reconstructed sample for the current block based on the second prediction sample; and filtering the reconstructed sample for the current block.
[0014] According to the present invention, a method for transmitting a bitstream generated by a video signal coding method includes the following steps: determining an intra-prediction mode of a current block; obtaining reference samples based on neighboring samples of the current block; obtaining a first prediction sample of the current block based on the reference samples and the intra-prediction mode; obtaining a second prediction sample of the current block by performing weighted filtering based on the reference samples and the first prediction sample; obtaining a reconstructed sample of the current block based on the second prediction sample; and filtering the reconstructed sample of the current block.
[0015] The video signal decoding method according to the present invention includes the following steps: determining an intra-prediction mode for a current block; applying a filter to a first reference sample adjacent to the current block; obtaining a first prediction sample for the current block based on a second reference sample obtained by applying the filter and the intra-prediction mode; and obtaining a second prediction sample for the current block using the first prediction sample and the first reference sample.
[0016] In the video signal decoding method according to the present invention, the step of obtaining the second predicted sample may include the following steps: determining a weighting value based on the distance between the first predicted sample and the first reference sample; and obtaining the second predicted sample by performing bilinear interpolation of the first predicted sample and the first reference sample based on the weighting value.
[0017] In the video signal decoding method according to the present invention, the weighting value can be obtained using at least one of at least one upper reference sample located at the top of the current block and at least one left reference sample located at the left of the current block.
[0018] In the video signal decoding method according to the present invention, the first reference sample may include at least one of an upper reference sample having the same x-coordinate as the first predicted sample and a left reference sample having the same y-coordinate as the first predicted sample.
[0019] In the video signal decoding method according to the present invention, the second reference sample can be obtained by applying a smoothing filter to the first reference sample or by the smoothing filter and the bilinear interpolation filter.
[0020] In the video signal decoding method according to the present invention, the length of the smoothing filter can be determined based on at least one of the intra-prediction mode of the current block and the size of the current block.
[0021] In the video signal decoding method according to the present invention, the bilinear interpolation filter can be based on bilinear interpolation between the value of the first reference sample before applying the smoothing filter and the value of the first reference sample after applying the smoothing filter.
[0022] In the video signal decoding method according to the present invention, the weighted values applicable to the values before the smoothing filter is applied to the first reference sample and the values after the smoothing filter is applied to the first reference sample can be determined based on at least one of the intra-frame prediction mode of the current block and the size of the current block.
[0023] The video signal decoding apparatus according to the present invention may include: an intra-frame prediction unit, which determines an intra-frame prediction mode for a current block, applies a filter to a first reference sample adjacent to the current block, obtains a first prediction sample of the current block based on a second reference sample obtained by applying the filter and the intra-frame prediction mode, and obtains a second prediction sample of the current block using the first prediction sample and the first reference sample.
[0024] The features briefly described above are merely illustrative examples of the detailed description of the invention to be described later, and should not be construed as limiting the scope of the invention.
[0025] Beneficial effects
[0026] According to the present invention, high-speed intra-frame predictive coding / decoding can be performed based on the variation coefficients.
[0027] According to the present invention, intra-frame prediction can be performed efficiently using filters.
[0028] According to the present invention, the error between the original sample and the predicted sample can be reduced, thereby improving the encoding / decoding efficiency.
[0029] The effects achievable by this invention are not limited to those described above. Those skilled in the art will clearly understand other effects not mentioned above in the following description. Attached Figure Description
[0030] Figure 1 This is a block diagram illustrating an image symbolization device according to an embodiment of the present invention.
[0031] Figure 2 This is a block diagram illustrating an image duplication device according to an embodiment of the present invention.
[0032] Figure 3 This is an embodiment of the present invention, illustrating an image duplication method based on intra-frame prediction.
[0033] Figure 4 This is a schematic diagram illustrating the reference pixels used in intra-frame prediction.
[0034] Figure 5 This is an embodiment of the present invention, illustrating a method for applying a filter to a reference sample.
[0035] Figure 6 This is a schematic diagram illustrating whether a filter is applicable based on the current block size and the intra-frame prediction mode.
[0036] Figure 7 This is a diagram used to illustrate an example of applying a filter to a reference sample.
[0037] Figure 8 This is an embodiment of the present invention, illustrating a method for applying a filter to a reference sample.
[0038] Figure 9 This is a diagram used to illustrate an example of applying the first filter to a reference sample.
[0039] Figure 10 This is an embodiment of the present invention, illustrating a method for obtaining prediction samples.
[0040] Figure 11This is a diagram used to illustrate an example of deriving predicted samples based on filtered reference samples.
[0041] Figure 12 This is a diagram illustrating an example of deriving the weighting values used when applying a filter to a predicted sample. Detailed Implementation
[0042] This invention can be modified in various ways and has various embodiments. This specification will illustrate specific embodiments with accompanying drawings and provide detailed descriptions. However, this should not limit the invention to specific embodiments; it should be understood to include all changes, equivalents, and substitutions contained within the technical concept of this invention. Similar graphic symbols are used for similar constituent elements in the description of the drawings.
[0043] Terms such as "first" and "second" may be used to describe various constituent elements, but the constituent elements shall not be limited to the terms used. The purpose of using these terms is solely to distinguish a constituent element from other constituent elements. For example, within the scope of the claims of this invention, a first constituent element may be named a second constituent element, and similarly, a second constituent element may be named a first constituent element. The term "and / or" includes a combination of multiple related descriptions or a single item among multiple related descriptions.
[0044] When a constituent element is described as "connected" or "accessed" to other constituent elements, it can be understood as either a direct connection to or access to those other constituent elements, or it can be understood as the presence of other constituent elements in between. Conversely, when a constituent element is described as "directly connected" or "directly accessed" to other constituent elements, it should be understood as the absence of other constituent elements in between.
[0045] The terminology used in this application is for illustrative purposes only and should not be construed as limiting the invention. Unless clearly distinguishable in the context of the sentence, singular expressions also include plural expressions. Terms such as "comprising" or "having" in this application merely designate the presence of features, numbers, steps, movements, constituent elements, parts, or combinations thereof as described in the specification, and should not be construed as precluding the existence or additional possibilities of one or more other features, numbers, steps, movements, constituent elements, parts, or combinations thereof.
[0046] Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings. The same graphic symbols will be used for the same constituent elements in the drawings, and the same constituent elements will not be described repeatedly.
[0047] Figure 1 This is a block diagram illustrating an image symbolization device according to an embodiment of the present invention.
[0048] Please see Figure 1 The image symbolization device 100 includes an image segmentation unit 110, a prediction unit 120 and 125, a transformation unit 130, a quantization unit 135, a reordering unit 160, an entropy symbolization unit 165, an inverse quantization unit 140, an inverse transformation unit 145, a filtering unit 150, and a memory 155.
[0049] Figure 1 The components shown are illustrated independently to indicate different functional characteristics in the image symbolization device, and do not represent that each component is composed of separate hardware or a single software unit. That is, for ease of explanation, the components are included in a list of individual components, and at least two of the components can be combined to form a single component or a single component can be divided into multiple components to perform functions. These integrated and separate embodiments of the components are also included within the scope of the invention without departing from the essence of the invention.
[0050] Furthermore, some of the constituent elements are not essential for the essential function of this invention but are merely selective elements that improve performance. This invention can be implemented by excluding components essential for achieving the essence of the invention, and structures that include only the essential constituent elements after excluding selective components for performance improvement are also included within the scope of this invention.
[0051] The image segmentation unit 110 can segment the input image into at least one processing unit. This processing unit can be a prediction unit (PU), a transformation unit (TU), or a coding unit (CU). The image segmentation unit 110 segments an image using a combination of multiple coding units, prediction units, and transformation units, and then selects a combination of coding units, prediction units, and transformation units based on a preset criterion (e.g., a cost function) before coding the image.
[0052] For example, an image can be segmented into multiple symbolic units. A recursive tree structure, such as a quadtree structure, can be used to segment symbolic units in an image. A block of symbolic units, rooted at an image or the largest coding unit, can be segmented with a number of child nodes equal to the number of symbolic units segmented. Symbolic units that cannot be further segmented due to certain limitations become leaf nodes. That is, assuming that a coding block can only be segmented into squares, a symbolic unit can be segmented into a maximum of four different symbolic units.
[0053] In the following embodiments of the invention, the symbolization unit can be used as a unit for performing symbolization or as a unit for performing compounding.
[0054] Prediction units can be formed by dividing a symbolic unit into at least one square or rectangle of the same size, or they can be formed by dividing one prediction unit and another prediction unit within a symbolic unit into different shapes and / or sizes.
[0055] If the prediction unit for intra-frame prediction is not the smallest symbolic unit when it is generated based on the symbolic unit, intra-frame prediction can be performed without dividing it into multiple prediction units N×N.
[0056] Prediction units 120 and 125 may include an inter-frame prediction unit 120 that performs inter-frame prediction and an intra-frame prediction unit 125 that performs intra-frame prediction. It can be determined whether to use inter-frame prediction or perform intra-frame prediction for the prediction unit and to determine specific information for each prediction method (e.g., intra-frame prediction mode, motion vector, reference image, etc.). In this case, the processing unit that performs the prediction and the processing unit that determines the prediction method and its specific content may be different. For example, the prediction method and prediction mode are determined by the prediction unit, while the prediction execution can be performed by the transformation unit. The residual value (residual block) between the generated prediction block and the original block can be input to the transformation unit 130. Furthermore, the prediction mode information, motion vector information, etc., used for prediction can be symbolized together with the residual value in the entropy symbolization unit 165 and then transmitted to the desymbolizer. When using a specific symbolization mode, the original block can be directly symbolized and transmitted to the desymbolizer without generating a prediction block through the prediction units 120 and 125.
[0057] The inter-frame prediction unit 120 can predict prediction units based on information from at least one of the previous or subsequent images of the current image, or, depending on the situation, based on information from a partially symbolized region within the current image. The inter-frame prediction unit 120 may include a reference image interpolation unit, a motion prediction unit, and a motion compensation unit.
[0058] The reference image interpolation unit can receive reference image information from memory 155 and generate pixel information in the reference image down to an integer pixel size. For luminance pixels, an 8th-order DCT-based interpolation filter with different filter coefficients is used to generate pixel information in 1 / 4 pixel units down to an integer pixel size. For chromatic difference signals, a 4th-order DCT-based interpolation filter with different filter coefficients can be used to generate pixel information in 1 / 8 pixel units down to an integer pixel size.
[0059] The motion prediction unit performs motion prediction based on the reference image interpolated by the reference image interpolation unit. Various methods can be used to calculate motion vectors, such as FBMA (Full search-based Block Matching Algorithm), TSS (Three Step Search), and NTS (New Three-Step Search Algorithm). Motion vectors can have motion vector values of 1 / 2 or 1 / 4 pixel units based on the interpolated pixels. The motion prediction unit can predict the current prediction unit using different motion prediction methods. These methods can include skipping, merging, AMVP (Advanced Motion Vector Prediction), and intra-block copying.
[0060] The intra-prediction unit 125 can generate prediction units based on reference pixel information surrounding the current block, which serves as pixel information within the current image. Since the blocks surrounding the current prediction unit are blocks that have performed inter-prediction, if the reference pixel is a pixel that has performed inter-prediction, the reference pixel contained in the block that has performed inter-prediction can be replaced with the reference pixel information of the surrounding blocks that have performed intra-prediction. That is, when a reference pixel is unavailable, the unavailable reference pixel information can be replaced with at least one of the available reference pixels.
[0061] In intra-frame prediction, prediction modes can include directional prediction modes that use reference pixel information based on the prediction direction and non-directional modes that do not use directional information when performing prediction. The number of these directional prediction modes can be the same as or greater than the 33 defined in the HEVC standard; for example, it can be extended to a number in the range of 60 to 70. The modes used to predict luminance information and the modes used to predict chromatic aberration information may be different. To predict chromatic aberration information, the intra-frame prediction mode information used for predicting luminance information or the predicted luminance signal information can be utilized.
[0062] When performing intra-prediction, if the size of the prediction unit is the same as the size of the transform unit, intra-prediction can be performed based on the pixels to the left of the prediction unit, the pixels at the top left, and the pixels at the top. However, if the size of the prediction unit is different from the size of the transform unit, intra-prediction can be performed using reference pixels based on the transform unit. Furthermore, intra-prediction using N×N segmentation only for the smallest symbolization unit can be used.
[0063] Intra-prediction methods can generate prediction blocks by applying an AIS (Adaptive IntraSmoothing) filter to a reference pixel based on the prediction mode. The type of AIS filter applied to the reference pixel can be different. To perform intra-prediction, the intra-prediction mode of the current prediction unit can be predicted based on the intra-prediction modes of surrounding prediction units. When predicting the prediction mode of the current prediction unit using mode information from surrounding units, if the intra-prediction modes of the current and surrounding units are the same, a preset flag can be used to transmit information indicating that the prediction modes of the current and surrounding units are the same. If the prediction modes of the current and surrounding units are different, entropy symbolization can be performed to symbolize the prediction mode information of the current block.
[0064] Furthermore, residual blocks containing residual information can be generated. These residual values are the differences between the prediction units that performed predictions based on the prediction units generated by prediction units 120 and 125 and the original blocks of the prediction units. The generated residual blocks can be input into the transformation unit 130.
[0065] The transform unit 130 can transform the residual block, which contains the original block and the residual information of the prediction units generated by the prediction units 120 and 125, using transformation methods such as DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), and KLT. Whether DCT, DST, or KLT is applied when transforming the residual block can be determined based on the intra-frame prediction mode information of the prediction units used to generate the residual block.
[0066] The quantization unit 135 quantizes the values that have been transformed into the frequency domain by the transformation unit 130. The quantization coefficients can vary depending on the block or the importance of the image. The values calculated by the quantization unit 135 can be supplied to the inverse quantization unit 140 and the reordering unit 160.
[0067] The reordering unit 160 can perform reordering of coefficient values for quantized residual values.
[0068] The reordering unit 160 can convert two-dimensional block shape coefficients into one-dimensional vector shapes using a coefficient scanning method. For example, the reordering unit 160 can use a zig-zag scan method to scan from the DC coefficients to the high-frequency domain coefficients and convert them into one-dimensional vector shapes. Depending on the size of the transform unit and the intra-frame prediction mode, a vertical scan that scans the two-dimensional block shape coefficients in the column direction or a horizontal scan that scans the two-dimensional block shape coefficients in the row direction can be used instead of a zig-zag scan. That is, the choice between a zig-zag scan, a vertical scan, and a horizontal scan can be determined based on the size of the transform unit and the intra-frame prediction mode.
[0069] Entropy symbolization unit 165 can perform entropy symbolization based on the value calculated by reordering unit 160. Entropy symbolization can use various symbolization methods such as Exponential Golomb, CAVLC (Context-Adaptive Variable Length Coding), and CABAC (Context-Adaptive Binary Arithmetic Coding).
[0070] The entropy symbolization unit 165 can symbolize various information such as residual 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 symbolization units of the reordering unit 160 and the prediction units 120 and 125.
[0071] The entropy symbolization unit 165 can entropy symbolize the coefficient values of the symbolization unit input by the reordering unit 160.
[0072] The inverse quantization unit 140 and the inverse transform unit 145 inverse quantize the value quantized by the quantization unit 135 and inverse transform the value transformed by the transform unit 130. The residual value generated by the inverse quantization unit 140 and the inverse transform unit 145 is combined with the prediction unit predicted by the motion estimation unit, motion compensation unit and intra-frame prediction unit contained in the prediction units 120 and 125 to generate a reconstructed block.
[0073] The filtering unit 150 may include at least one of a deblocking filter, an offset correction unit, and an ALF (Adaptive Loop Filter).
[0074] Deblocking filters eliminate block distortion caused by the boundaries between blocks in the reconstructed image. The decision to apply a deblocking filter is based on the number of columns or rows of pixels contained in the current block. When applying a deblocking filter to a block, a strong filter or a weak filter can be used depending on the required deblocking intensity. Furthermore, applying a deblocking filter allows for parallel processing of horizontal and vertical filtering.
[0075] The offset correction unit can correct the offset between the deblocked image and the original image on a pixel-by-pixel basis. When performing offset correction on a specific image, the following methods can be used: dividing the pixels contained in the image into a certain number of regions, determining the regions where offset needs to be performed, and applying the offset to those regions; or applying the offset after considering the edge information of each pixel.
[0076] It can perform ALF (Adaptive Loop Filtering) based on the comparison between the filtered reconstructed image and the original image. After dividing the pixels in the image into preset groups, a filter suitable for each group is determined, and filtering is performed differently for each group. Information regarding the applicability of ALF can be transmitted according to each coding unit (CU). The shape and coefficients of the applicable ALF filter will differ for each block. Furthermore, an ALF filter of the same shape (fixed shape) can be applied regardless of the characteristics of the target block.
[0077] The memory 155 can store the reconstructed blocks or images calculated by the filtering unit 150, and the stored reconstructed blocks or images can be provided to the prediction units 120 and 125 when performing inter-frame prediction.
[0078] Figure 2 This is a block diagram illustrating an image duplication device according to an embodiment of the present invention.
[0079] Please see Figure 2 The image duplexer 200 includes an entropy duplexing unit 210, a reordering unit 215, an inverse quantization unit 220, an inverse transform unit 225, a prediction unit 230, 235, a filtering unit 240, and a memory unit 245.
[0080] When the image symbolizer receives an image bitstream, the input bitstream can be symbolized by steps that are reversed compared to those of the image symbolizer.
[0081] The entropy complexation unit 210 can perform entropy complexation in the reverse order of the entropy complexation steps performed by the entropy complexation unit of the image symbolizer. For example, various methods such as Exponential Golomb, CAVLC (Context-Adaptive Variable Length Coding), and CABAC (Context-Adaptive Binary Arithmetic Coding) can be applied corresponding to the methods performed by the image symbolizer.
[0082] The entropy complexification unit 210 can complexify information about intra-frame prediction and inter-frame prediction performed by the symbolizer.
[0083] For a bitstream entropy-complexed by the entropy complexation unit 210, the reordering unit 215 can perform reordering based on the reordering method of the symbolization unit. Coefficients represented in one-dimensional vector form can be reconstructed into two-dimensional block form coefficients and then reordered. After receiving information about the coefficient scan performed by the symbolization unit, the reordering unit 215 can perform reordering by performing a reverse scan based on the scan order performed by the symbolization unit.
[0084] The inverse quantization unit 220 can perform inverse quantization based on the quantization parameters provided by the symbolizer and the coefficient values of the reordered block.
[0085] For the quantization results performed by the image symbolizer, the inverse transform unit 225 can perform an inverse transform on the transform unit, that is, perform inverse DCT, inverse DST, and inverse KLT on DCT, DST, and KLT. The inverse transform can be performed based on the transmission unit determined by the image symbolizer. The inverse transform unit 225 of the image symbolizer can selectively perform transform methods (e.g., DCT, DST, KLT) based on multiple pieces of information such as the prediction method, the size of the current block, and the prediction direction.
[0086] Prediction units 230 and 235 can generate prediction blocks based on the information about the generation of prediction blocks provided by entropy complexation unit 210 and the previously complexed block or image information provided by memory 245.
[0087] As mentioned earlier, when performing intra-prediction in the same way as the image symbolizer, if the size of the prediction unit is the same as the size of the transform unit, intra-prediction is performed based on the pixels to the left of the prediction unit, the pixels at the top left, and the pixels at the top. However, if the size of the prediction unit is different from the size of the transform unit when performing intra-prediction, intra-prediction can be performed using reference pixels based on the transform unit. Furthermore, intra-prediction using N×N segmentation only for the smallest symbolized unit can also be used.
[0088] Prediction units 230 and 235 may include a prediction unit discrimination unit, an inter-frame prediction unit, and an intra-frame prediction unit. The prediction unit discrimination unit receives various information from the entropy complexation unit 210, such as prediction unit information, prediction mode information of the intra-frame prediction method, and motion prediction-related information of the inter-frame prediction method. It then distinguishes prediction units within the current symbolization unit and can determine whether the prediction unit performs inter-frame prediction or intra-frame prediction. The inter-frame prediction unit 230 performs inter-frame prediction on the current prediction unit based on information contained in at least one image, either a previous image or a subsequent image containing the current image of the current prediction unit, using the inter-frame prediction information provided by the image symbolizer. Alternatively, it may perform inter-frame prediction based on information from a reconstructed portion of the current image containing the current prediction unit.
[0089] In order to perform inter-frame prediction, the motion prediction method of the prediction unit contained in the corresponding symbolized unit is determined based on the symbolized unit, which method is Skip Mode, Merge Mode, AMVP Mode, or Intra-block Copy Mode.
[0090] The intra-prediction unit 235 can generate prediction blocks based on pixel information within the current image. If the prediction unit is one that performs intra-prediction, it can perform intra-prediction based on the intra-prediction mode information of the prediction unit provided by the image symbolizer. The intra-prediction unit 235 may include an AIS (Adaptive Intra Smoothing) filter, a reference pixel interpolation unit, and a DC filter. The AIS filter filters the reference pixels of the current block, and can be applied after determining whether to apply the filter based on the prediction mode of the current prediction unit. AIS filtering can be performed on the reference pixels of the current block using the prediction mode of the prediction unit provided by the image symbolizer and the AIS filter information. If the prediction mode of the current block is a mode that does not perform AIS filtering, the AIS filter may not be applied.
[0091] If the prediction unit's prediction mode is a prediction unit that performs intra-frame prediction based on the interpolated pixel values of a reference pixel, the reference pixel interpolation unit can interpolate the reference pixel to generate reference pixels for pixel units with integer values or lower. If the current prediction unit's prediction mode is a prediction mode that generates prediction blocks without interpolating reference pixels, the reference pixels may not be interpolated. The DC filter can generate prediction blocks by filtering when the prediction mode of the current block is DC mode.
[0092] The reconstructed blocks or image can be provided to the filtering unit 240. The filtering unit 240 may include a deblocking filter, an offset correction unit, and an ALF.
[0093] The following information can be obtained from the image symbolizer: whether a deblocking filter has been applied to the corresponding block or image, and if so, whether a strong or weak filter has been applied. After receiving the deblocking filter information provided by the image symbolizer, the image deblocking filter can perform deblocking filtering on the corresponding block within the image deblocking unit.
[0094] The offset correction unit can perform offset correction on the reconstructed image based on the type of offset correction applicable to the image during symbolization and offset value information.
[0095] ALF can be applied to symbolic units based on information such as ALF applicability and ALF coefficient information provided by the symbolizer. This ALF information can be provided in a specific set of parameters.
[0096] Memory 245 stores the reconstructed image or block for use as a reference image or block, and can also provide the reconstructed image to the output unit.
[0097] As mentioned above, for the sake of clarity, the following embodiments of the present invention use the term symbolization unit for coding units, but it can be a unit that performs not only symbolization but also compositing.
[0098] Figure 3 This is an embodiment of the present invention, illustrating an image duplication method based on intra-frame prediction.
[0099] For ease of explanation, the following embodiments are based on the 35 intra-prediction modes defined by HEVC. However, the embodiments described below can still be applied even when using more than 35 intra-prediction modes (i.e., extended intra-prediction modes). Meanwhile, in the embodiments described below, the smallest unit constituting an image is referred to as a pixel, a point, or a sample, etc.
[0100] Please see Figure 3 If the current block is a block symbolized in an intra-mode, the intra-prediction mode for the current block can be determined (S310).
[0101] The intra-prediction mode for the current block can be determined by referring to the intra-prediction modes of its adjacent blocks. For example, a candidate mode list can be generated by referring to the intra-prediction modes of adjacent blocks to determine the intra-prediction mode for the current block. Then, the intra-prediction mode for the current block is determined based on an index (e.g., the MPM (Most Probable Mode) index) indicating the intra-prediction modes included in the candidate mode list, or an intra-prediction mode not included in the candidate mode list is determined as the intra-prediction mode for the current block.
[0102] The current block can correspond to a square prediction block such as 4×4, 8×8, 16×16, or 32×32. Depending on the size of the current block, there may be multiple intra-prediction mode candidates. Any one of the intra-prediction mode candidates can be derived from the intra-prediction mode of the current block. In this case, the number of intra-prediction mode candidates can be a fixed constant or a variable that varies according to the size of the current block.
[0103] When the intra-prediction mode of the current block is determined, a filter can be applied to the reference pixels surrounding the current block (S320). Here, at least one pixel contained in the neighboring blocks adjacent to the current block can be used as a reference pixel for intra-prediction of the current block. That is, the reconstructed values of the neighboring blocks adjacent to the current block can be used for intra-prediction of the current block. The neighboring blocks may include at least one of the blocks adjacent to the lower left, left, upper left, upper, upper right, or lower edge of the current block.
[0104] As an example, Figure 4 This is a schematic diagram illustrating the reference pixels used in intra-frame prediction. Assuming the current block size is N×N, at least 2N reference samples located above the current block and at least 2N reference samples located to the left of the current block can be used for intra-frame prediction of the current block. Therefore, in the case where the current block is a 4×4 prediction block (or transform block), as... Figure 4 In the example shown, the upper reference samples A to H and G located at the top of the current block, and the left reference samples I to P and G located at the left of the current block, can be used for intra-frame prediction of the current block.
[0105] In the embodiments described later, the reference sample located at the top of the current block is called the top reference sample, and the reference sample located to the left of the current block is called the left reference sample. Furthermore, the reference sample that is both the top reference sample and the left reference sample (i.e., the reference sample with coordinates (-1, -1)) is called the left top reference sample.
[0106] Filtering of a reference sample can be performed based on at least one of the following: the size of the current block, the intra-prediction mode, or the position of the reference sample. The current block can represent a coded block, a prediction block, or a transform block. Specifically, at least one of the following can be determined: whether to perform filtering on the reference sample, the strength of the filter, the filter length, and the filter coefficients, considering at least one of the width / height of the current block or the prediction directionality of the intra-prediction mode. The strength of the filter can represent whether the filtering strength applied to the reference sample is strong or weak, or it can be represented as a flag. For the filter of this invention, any one of a plurality of filters with at least one different filter length and filter coefficients can be selectively used. At this time, it is also possible to consider whether the reference sample is located on the left, at the top, or at the corner of the current block, etc. (Refer to...) Figure 5 and Figure 8 An example of applying the filter to a reference sample will be described.
[0107] When reference pixels surrounding the current block are unavailable, the information of unavailable reference pixels can be replaced with information of available reference pixels. Here, the reference pixel information can include the pixel value of the reference pixel. The availability of a reference pixel can be determined based on factors such as whether the adjacent block containing the reference pixel was delimited before the current block, whether the adjacent block containing the reference pixel is a block symbolized in an inter-frame mode, and whether the reference pixel is contained within the same slice or tile as the current block.
[0108] Intra-frame prediction can be performed based on reference samples surrounding the current block (S330). The location of the reference sample can be determined according to the intra-frame prediction mode of the current block, and then the prediction sample of the current block can be derived based on the determined reference sample.
[0109] If the predicted samples of the current block are obtained through intra-frame prediction, a filter can be applied to the predicted samples (S340). Whether to apply a filter to the predicted samples can be determined based on the size of the current block and the intra-frame prediction mode, etc. (Refer to...) Figure 10 An example of applying the filter to the predicted samples will be described.
[0110] When a filter is applied to the predicted sample, the filter can derive the reconstruction sample of the current block based on the applied predicted sample and its corresponding residual sample (S350). The residual sample can be derived by selectively performing at least one of inverse quantization or inverse transform on the transform coefficients (or residual coefficients) of the current block obtained from the bitstream. In this case, the transform form used for the inverse transform can utilize DCT, DST, KLT, etc. At this time, one of the above transform forms can be selectively used after considering factors such as the prediction mode of the current block, the size of the current block (e.g., PU, TU), luminance / chromatic difference components, etc.
[0111] A loop filter (S360) can be applied to the reconstructed sample derived by adding the predicted sample and the residual sample. The loop filter may include at least one of a deblocking filter, a sample adaptive offset (SAO) filter, and an adaptive loop filter (ALF).
[0112] Figure 5 This is an embodiment of the present invention, illustrating a method for applying a filter to a reference sample.
[0113] Although in this embodiment, strong filters and weak filters are distinguished for ease of explanation, more granular filter strengths can also be defined. Furthermore, the filter strength can be determined through a predetermined calculation process in the image duplication device, and can be determined based on a marker or index that identifies the filter strength as a signal emitted from the image duplication device.
[0114] For ease of explanation, in this embodiment, the pixel value of the reference sample to which a strong or weak filter is applied is represented by "pF", and the pixel value of the reference sample before applying the filter is represented by "p". Therefore, it can be understood that p(x,y) refers to the pixel value of the reference sample at position (x,y), and pF(x,y) refers to the pixel value of the reference sample at position (x,y) after applying the strong or weak filter.
[0115] First, determine whether to apply a filter to the reference sample (S510). Whether to apply a filter to the reference sample can be determined by at least one of the current block size and the intra-prediction mode of the current block.
[0116] As an example, Figure 6This is a schematic diagram illustrating whether a filter is applicable based on the current block size and the intra-frame prediction mode. Figure 6 In the example shown, "O" indicates the case where a filter is applied, and "X" indicates the case where a filter is not applied. (See reference...) Figure 6 The example shown illustrates that, with a current block size of 4×4, the filter can be limited to cases where the intra-prediction mode of the current block is "18". With a current block size of 32×32, the filter can be applied to cases where the intra-prediction mode of the current block is a directional mode other than "10".
[0117] Figure 6 The illustration of whether a filter is applicable based on the current block size and intra-frame prediction mode is merely for demonstrating an example of the invention and is not intended to limit the invention. Figure 6 The example shown can be modified so that when the size of the current block is less than the reference value (e.g., 4×4), the filter may not be applied to the reference sample regardless of the intra-prediction mode of the current block; when the size of the current block is greater than the reference value (e.g., 32×32), the filter may be applied to the reference sample regardless of the intra-prediction mode of the current block.
[0118] Figure 6 This example illustrates whether a filter should be applied when the intra-prediction mode of the current block is directional. Even when the intra-prediction mode of the current block is non-directional (especially planar mode), the application of a filter can be determined based on the size of the current block. As an example, if the intra-prediction mode of the current block is PLANAR mode and the size of the current block is above a reference value, a filter can be applied to the reference sample.
[0119] As another example, when the intra-prediction mode of the current block is non-directional, the filter can be applied to the reference sample regardless of the size of the current block. Furthermore, when the intra-prediction mode of the current block is non-directional, the filter can also be applied to the reference sample regardless of the size of the current block.
[0120] Whether to apply a filter to a reference sample can also be determined based on information emitted from the image duplexing device (e.g., a 1-bit tag).
[0121] If it is determined that a filter is applicable to the reference sample, then it can be determined whether a strong filter or a weak filter is applicable to the reference sample (S520). Whether a strong filter or a weak filter is applicable to the reference sample can be determined by considering factors such as the size of the current block, the value obtained by adding or subtracting an offset from an integer multiple of the reference sample at the reference position, and the result of comparing this value with the sum of two or more reference samples. That is, whether a strong filter is applicable to the reference sample can be determined by comparing the amount of change between the reference samples with a predetermined constant value.
[0122] As an example, the following mathematical formulas 1 and 2 show the applicable conditions for a strong filter with a bit depth of 8 bits.
[0123] [Mathematical Expression 1]
[0124] |p(-1,-1)-2*p(N-1,-1)+p(2N-1,-1)|<2 3
[0125] [Mathematical Expression 2]
[0126] |p(-1,-1)-2*p(-1,N-1)+p(-1,2N-1)|<2 3
[0127] In mathematical expressions 1 and 2, N represents the size of the current block. For example, if the current block size is 32×32, the value of N can be 32. Mathematical expression 1 indicates whether, for the upper reference sample, the sum of the first upper reference sample p(-1, -1) and the 2N-1th upper reference sample p(2N-1, -1) is greater than ±2 times the pixel value p(N-1, -1) of the (N-1th)th upper reference sample. - 3 The offset value.
[0128] Formula 2 indicates whether, for a given left reference sample, the sum of the first left reference sample p(-1, -1) and the (2N-1)th left reference sample p(-1, 2N-1) is greater than ±2 times the pixel value p(-1, N-1) of the (N-1)th left reference sample. 3 The offset value.
[0129] A strong filter can be applied to the reference sample if both mathematical expressions 1 and 2 are satisfied, and a weak filter can be applied to the reference sample if at least one of mathematical expressions 1 and 2 is not satisfied.
[0130] Then, a strong filter or a weak filter can be applied to the reference sample (S530). As an example, the following mathematical expressions 3 and 4 illustrate the derivation of the reference sample pF after applying a strong filter and a weak filter to the reference sample p.
[0131] [Mathematical Expression 3]
[0132] pF[-1][-1] = p[-1][-1]
[0133] pF[-1][y]=((63-y)*p[-1][-1]+(y+1)*p[-1]
[63] +32)>>6,for y=0…62
[0134] pF[-1]
[63] =p[-1]
[63]
[0135] pF[x][-1]=((63-x)*p[-1][-1]+(x+1)*p
[63] [-1]+32)>>6,for x=0…62
[0136] p]
[63] [-1]=p
[63] [-1]
[0137] [Mathematical Expression 4]
[0138] pF[-1][-1]=(p[-1][0]+2*p[-1][-1]+p[0][-1]+2)>>2
[0139] [F[-1][y]=(p[-1][y+1]+2*p[-1][y]+p[-1][y-1]+2)>>2,for y=0...N*2-2
[0140] [F[-1][N*2-1]=p[-1][N*2-1]
[0141] pF[x][-1]=(p[x-1][-1]+2*p[x][-1]+p[x+1][-1]+2)>>2,for x=0…N*2-2
[0142] pF[N*2-1][-1]=p[N*2-1][-1]
[0143] Based on mathematical formulas 1 to 4, an example of applying a filter to a reference sample is given.
[0144] Figure 7 This is a diagram used to illustrate an example of applying a filter to a reference sample. It assumes the current block is a 32×32 size prediction block (or transform block).
[0145] exist Figure 7The diagram illustrates a scenario where the top left reference pixel p(-1,-1) has a pixel value of 10, the top reference pixel p(-31,-1) adjacent to the block boundary has a pixel value of 30, and the top right reference pixel p(63,-1) has a pixel value of 50. It also illustrates a scenario where the left reference pixel p(-1,31) adjacent to the block boundary has a pixel value of 60, and the bottom left reference pixel p(-1,63) has a pixel value of 115.
[0146] If we substitute the above information into mathematical expressions 1 and 2, as described below, we can confirm that mathematical expressions 1 and 2 are satisfied.
[0147] -For the upper reference sample: |10-2*30+50|=0<8
[0148] -For the reference sample on the left: |10-2*60+115|=5<8
[0149] Therefore, a strong filter can be applied to the reference sample. Assuming the pixel value of the upper reference sample at position (14,-1) is 15, the pF of the reference sample after filtering at this position can be derived as follows.
[0150] Derivation of the filtered reference sample pF(14,-1) from the upper reference sample p(14,-1):
[0151] pF(14,-1)=(63-14)*10+(14+1)**50+32>>6=19
[0152] As a result, the pixel value 15 of the upper reference sample p(14,-1) can be changed to 19 after filtering.
[0153] Next, we will describe another embodiment of applying the filter to the reference sample.
[0154] Figure 8 This is an embodiment of the present invention, illustrating a method for applying a filter to a reference sample.
[0155] For ease of explanation, in this embodiment, to distinguish it from the pixel value of the reference sample before applying the filter (represented by "r"), the pixel value of the reference sample before applying the filter is referred to as the primary pixel value (represented by "m") or the secondary pixel value (represented by "n"). Here, the primary pixel value refers to the pixel value of the reference sample before applying the first filter, and the secondary pixel value refers to the pixel value of the reference sample before applying the second filter. Therefore, it can be understood that r(x,y) refers to the pixel value of the reference sample at position (x,y), m(x,y) refers to the pixel value of the reference sample at position (x,y) before applying the first filter, and n(x,y) refers to the pixel value of the reference sample at position (x,y) before applying the second filter.
[0156] First, determine whether to apply a filter to the reference sample (S810). Whether to apply a filter to the reference sample can be determined based on at least one of the current block size and the intra-prediction mode of the current block.
[0157] As an example, as mentioned above Figure 6 The described embodiments can also be applied in the same way to determine whether to apply a first filter or a second filter to a reference sample.
[0158] If it is determined that a filter is to be applied to the reference sample, then the first filter can be applied to the reference sample first (S820).
[0159] At this point, the length of the first filter applied to the reference sample can have a fixed value independent of the size of the current block or the intra-prediction mode of the current block.
[0160] As another example, the length of the first filter can also be determined based on at least one of the current block size, the intra-prediction mode of the current block, and the position of the reference sample. Table 1 illustrates, for example, the length of the first filter based on the intra-prediction mode.
[0161] [Table 1]
[0162] Intra-prediction mode flat DC 2-11 12-13 14-22 23-24 25-34 filter 7-Tap none 7-Tap 5-tap 7-Tap 5-tap 7-Tap
[0163] In Table 1, an example is given where the intra-prediction mode of the current block is DC, and the first filter is applied. Furthermore, an example is given where the length of the first filter has 5 taps or 7 taps depending on the intra-prediction mode.
[0164] Depending on the size of the current block, the length of the filter or the filter coefficients can vary. For example, when the current block is a second size larger than the first size, the number of taps in the first filter can have a larger value compared to when the current block is the first size. For instance, if Table 1 shows examples of the length of the first filter according to the intra-frame prediction mode when the current block size is 8×8, then when the current block size is 16×16 or 32×32, the length of the first filter can have a larger value than the 7-tap or 5-tap values shown in Table 1. Therefore, the larger the prediction block size, the greater the smoothing of the reference sample's pixel value r; the smaller the prediction block size, the less smoothing of the reference sample's pixel value r.
[0165] The first filter can be performed based on the reference sample and the reference samples adjacent to it. When the length of the first filter is an odd number N, the reference sample, the (N-1) / 2 samples adjacent to the left (or bottom) of the reference sample, and the (N-1) / 2 samples adjacent to the right (or top) of the reference sample can be used for filtering (convolution) of the reference sample.
[0166] As an example, Figure 9 This is a diagram used to illustrate an example of applying the first filter to a reference sample. For ease of illustration, it is assumed that the current block is an 8×8 prediction block, and that the intra-prediction mode of the current block is 10 (horizontal direction).
[0167] Referring to Table 1 above, with the current block size being 8×8 and the intra-prediction mode of the current block being 10, the first filter can have a length of 7 taps. Therefore, the three reference samples located to the left (or bottom) of the reference samples and the three reference samples located to the right (or top) can be used to filter the reference samples.
[0168] exist Figure 9 The diagram illustrates an example of applying the first filter to a reference sample located at the top of the current block. As an example, the filtered reference sample m(1,-1) at position (1,-1) can be obtained by applying the first filter to the three reference samples located to the left of reference sample r(1,-1) and the three reference samples located to the right of (1,-1).
[0169] In this case, if there are not a sufficient number of reference samples to the left of the reference sample to which the first filter is to be applied, the reference sample adjacent to the left of the current block can also be used. For example, as shown... Figure 9 In the example shown, there are only two reference samples to the left of the reference sample r(1,-1). Therefore, the two reference samples to the left of the reference sample r(1,-1) (i.e., r(0,-1) and r(-1,-1)) and the reference sample adjacent to the left of the current block (i.e., r(-1,1)) can be used to filter the reference sample r(1,-1).
[0170] Although not illustrated, a reference sample located to the left of the reference sample r(0,-1) (i.e., r(-1,-1)) and two reference samples adjacent to the left of the current block (i.e., r(-1,1) and r(-1,2)) can be used to filter the reference sample r(0,-1).
[0171] As another example, if the x-coordinate of a reference sample to the left of the reference sample is less than -1, the filter coefficients applicable to that reference sample can be 0. Furthermore, if the x-coordinate of a reference sample to the right of the reference sample is greater than 2N-1 (where N is the size of the current block), the filter coefficients applicable to that reference sample can also be 0.
[0172] For the left reference sample located to the left of the current block, filtering can be performed using the reference sample located above and below the reference sample.
[0173] In this case, when there are not a sufficient number of reference samples above the reference sample, the reference sample adjacent to the top of the current block can be used for filtering the reference sample adjacent to the left of the current block. As an example, there are only two reference samples above the reference sample r(-1,1), so the two reference samples above the reference sample r(-1,1) (i.e., r(-1,0) and r(-1,-1)) and the reference sample adjacent to the top of the current block (i.e., r(1,-1)) can be used to derive the filtered reference sample m(-1,1).
[0174] As another example, if the y-coordinate of a reference sample located above the reference sample is less than -1, the filter coefficients applicable to that reference sample can be 0. Furthermore, if the y-coordinate of a reference sample located below the reference sample is greater than 2N-1 (where N is the height of the current block), the filter coefficients applicable to that reference sample can also be 0.
[0175] The coefficients of the first filter can have fixed values. Alternatively, the coefficients of the first filter can be variables that vary depending on at least one of the current block size, the intra-frame prediction mode, and the position of the reference sample.
[0176] As an example, when the intra-prediction mode of the current block is 10, the coefficients of the first filter can be {1 / 64, 6 / 64, 15 / 64, 20 / 64, 15 / 64, 6 / 64, 1 / 64}. Therefore, Figure 9 The first pixel value m(1,-1) of the reference sample r(1,-1) shown can be derived according to the following mathematical formula 5.
[0177] [Mathematical Expression 5]
[0178]
[0179] Referring to Equation 5, the closer the reference sample is to the reference sample to which the filter applies, the larger the filter coefficients can be. As an example, Equation 1 illustrates the following: a filter coefficient of 20 / 64 is applied to the reference sample r(1,-1); a filter coefficient of 15 / 64 is applied to the reference samples r(0,-1) and r(2,-1) which are 1 unit away from the reference sample r(1,-1); and a filter coefficient of 6 / 64 is applied to the reference samples r(-1,-1) and r(3,-1) which are 2 units away from the reference sample r(1,-1).
[0180] The filter coefficients used to filter the reference sample r(x,y) can also be up-scaled to reduce the computational complexity of the processor used to calculate the pixel value m(x,y) once and improve the computational accuracy. This is achieved when the sum of the filter coefficients is 2. n (Here, n = 2, 3, 4, ...) The scaled calculated value is reconstructed into the original bit depth by right shift operation, so that the pixel value m(x, y) can be obtained.
[0181] Next, a second filter can be applied to the reference sample for which the first filter has been applied (S830). At this time, whether to apply the second filter can also be determined based on the size of the current block and the intra-prediction mode of the current block.
[0182] The second filter can utilize bilinear interpolation, a transformation that uses the pixel values *r* of the reference sample before applying the filter and the pixel values *m* of the reference sample after applying the first filter. Specifically, considering the size of the current block and the prediction direction, weights are determined for the reference sample *r* before applying the filter and for the reference sample *m* after applying the first filter. The reference sample *n* after applying the second filter is then derived based on these determined weights. As an example, Equation 6 below represents an example for obtaining the reference sample *n* after applying the second filter.
[0183] [Mathematical Expression 6]
[0184] n(x,y)<ω*r(x,y)+(1-ω)*m(x,y),0≤ω≤1
[0185] In Equation 6, ω represents a weighting value, ranging from 0 to 1. The weighting value ω determines the weighting value applicable to the reference sample before the applied filter and the weighting value applicable to the reference sample after the first filter has been applied. As an example, Equation 6 illustrates the case where a weighting value of ω is applied to the reference sample before the applied filter, and a weighting value of 1-ω is applied to the reference sample after the first filter has been applied. Therefore, when the weighting value is 0, the secondary pixel value n(x, y) can be the same as the primary pixel value m(x, y); when the weighting value is 1, the secondary pixel value n(x, y) can be the same as the pixel value r(x, y) of the reference sample before the applied filter.
[0186] The weighting value ω can be a fixed constant or a variable that varies depending on the size of the current block and the intra-prediction mode of the current block.
[0187] As an example, the weighting value ω can increase as the size of the current block decreases. For example, the weighting value ω when the current block size is 8×8 can have a greater value than the weighting value ω when the current block size is 16×16 or 32×32.
[0188] The weighting value ω can also vary depending on the intra-prediction mode of the current block. For example, the weighting value ω when the intra-prediction mode of the current block is vertical or horizontal can be greater than the weighting value ω when the intra-prediction mode of the current block is a directional mode that is neither vertical nor horizontal.
[0189] As an example, with the current block size being 8×8 and the intra-prediction mode of the current block being "10" (i.e., horizontal direction), assuming the weighting value ω has a value of 47 / 64, the secondary pixel value n is derived as follows.
[0190]
[0191] As another example, with the current block size being 4×4 and the intra-prediction mode of the current block being "10", assuming the weighting value ω has a value of 56 / 64, the secondary pixel value n is derived as follows.
[0192]
[0193] To reduce the processor complexity of performing the bilinear transformation associated with the second filter (i.e., reduce the amount of floating decimal point operations) and improve the accuracy of the calculation, the weighting value ω can also be enlarged and made integer. In this case, the quadratic pixel value n(x,y) can be obtained by reconstructing the original bit depth from the bilinearly transformed value based on a right shift operation.
[0194] Next, an example of deriving predicted samples using reference samples with applied filters will be described.
[0195] Figure 10 This is an embodiment of the present invention, illustrating a method for obtaining prediction samples.
[0196] First, the prediction sample for the current block can be obtained using the prediction direction of the current block and the reference sample (S1010). Here, the reference sample can correspond to the prediction sample obtained by... Figure 5 The reference sample pF applicable to the strong or weak filter, the reference sample m applicable to the first filter, or the reference sample n applicable to both the first and second filters.
[0197] For ease of explanation, in this embodiment, it is assumed that the predicted sample is derived using a reference sample n to which the first and second filters are applied. Furthermore, the predicted sample derived from the reference sample to which the filters are applied is referred to as "q", and the pixel value obtained by applying the filters to the predicted sample is referred to as "p". Therefore, it can be understood that q(x,y) corresponds to the pixel value of the predicted sample at position (x,y), and p(x,y) corresponds to the pixel value of the predicted sample at position (x,y) after applying the filters.
[0198] The predicted sample q can be derived based on the intra-prediction mode of the current block and reference samples n of at least one applicable filter. As an example, Figure 11 This is a diagram used to illustrate an example of deriving predicted samples based on filtered reference samples.
[0199] Assume the current block is an 8×8 prediction block (or transform block). With the prediction mode of the current block set to "10" (i.e., horizontal), the predicted sample q can be derived based on the left-side reference sample adjacent to the left side of the current block. For example, the predicted sample q(x,y) at coordinates (x,y) can have the same value as the reference sample n(-1,y) of the applicable filter at coordinates (-1,y). In short, the predicted sample q(x,y0) for a specific y0 can be obtained as follows.
[0200] q(x,y0)=n(-1,y0),0≤x≤8
[0201] Although not illustrated, when the prediction mode of the current block is 26 (i.e., vertical), the predicted sample q(x0,y) for a specific x0 has the same value as the upper reference sample n(x0,y) after applying the filter.
[0202] Furthermore, when the prediction mode of the current block is a directional mode other than vertical or horizontal, the predicted sample q can be derived as the intermediate value of two or more reference samples to which the filter has been applied.
[0203] When using reference samples to predict the pixel values of the current block (i.e., the values of the predicted samples), in the case of intra-frame prediction mode, the correlation between the predicted samples and the reference samples has the property that it varies depending on the distance (or position) between the predicted samples and the reference samples.
[0204] As a concrete example, when the intra-prediction mode of the current block is DC mode, the value of the predicted sample is derived from the average value of the reference sample. And when the intra-prediction mode is directional mode, the value of the reference sample can be derived from the value of the predicted sample based on the directional properties. While the pixel values of predicted samples closer to the reference sample have a higher probability of being similar to the actual sample, the pixel values of predicted samples farther from the reference sample have a lower probability of being similar to the actual sample.
[0205] Therefore, the correlation between the reference sample and the predicted sample can be considered to determine whether to apply a filter to the predicted sample (S1020). Whether to apply a filter to the predicted sample can be determined by factors such as the size of the current block, the segmentation depth of the current block, the segmentation shape of the current block, and the intra-frame prediction mode of the current block.
[0206] As another example, whether to apply a filter to a predicted sample can also be determined based on information emitted from the image symbolization device (e.g., a 1-bit tag).
[0207] If it is determined that a filter is applicable to the predicted sample, the filter can be applied to the predicted sample based on the predicted sample and the reference sample before the filter is applied (S1030). At this time, a filter based on bilinear interpolation can be applied to the predicted sample, where bilinear interpolation utilizes the pixel value r of the reference sample before the filter is applied and the pixel value q of the predicted sample. Specifically, considering the size of the current block and the prediction direction, the weighting values applicable to the reference sample before the filter is applied and the weighting values applicable to the predicted sample can be determined, and the predicted sample p with the filter applied is derived based on the determined weighting values. As an example, the following mathematical expression 7 represents an example for obtaining the predicted sample p with the filter applied.
[0208] [Mathematical Expression 7]
[0209] p(x,y)=α*r(x0,y0)+(1-α)*q(x,y)
[0210] In the mathematical formula 7, r(x0,y0) may include at least one of a reference sample located at the top of the current block and a reference sample located to the left of the current block. As an example, r(x0,y0) may represent a reference sample r(-1,y) located on the same horizontal line as the predicted sample q(x,y) or a reference sample r(x,-1) located on the same vertical line as the predicted sample q(x,y).
[0211] Furthermore, in Equation 7, α represents a weighting value, ranging from 0 to 1. The weighting value α determines the weighting value applied to the reference sample r before applying the filter and the weighting value applied to the predicted sample q. As an example, Equation 7 illustrates the case where, before applying the filter, a weighting value of α is applied to the reference sample, and a weighting value of 1-α is applied to the predicted sample. Therefore, when the weighting value is 0, the pixel value p(x,y) of the predicted sample after applying the filter can be the same as the pixel value q(x,y) of the predicted sample; when the weighting value is 1, the pixel value p(x,y) of the predicted sample after applying the filter can be the same as the pixel value r(x,y) of the reference sample before applying the filter.
[0212] The weighting value α can be a fixed constant or a variable that varies based on the size of the current block, the intra-frame prediction mode of the current block, and the position of the predicted sample. For example, the closer the predicted sample is to the reference sample, the larger the weighting value α can be; conversely, the farther the predicted sample is from the reference sample, the smaller the weighting value α can be. The aim is to reflect the pixel values of the reference sample more strongly to correct predicted samples with high spatial correlation to the reference sample, and to reflect the pixel values of the reference sample less strongly to correct predicted samples with low spatial correlation to the reference sample.
[0213] The weighting value α can be obtained by using at least one of the following: the size of the current block and the prediction direction. It can be obtained by using at least one of the following: the upper reference sample located above the current block and the left reference sample located to the left of the current block.
[0214] As an example, the weighting value α for the predicted sample q(x, y) can be obtained according to the following mathematical formula 8.
[0215] [Mathematical Expression 8]
[0216] α=[β*r(-1,y)]+[γ*r(x,-1)]
[0217] In Equation 8, β and γ can be determined based on the distance between the predicted sample and the reference sample. The smaller the distance between the predicted sample and the reference sample, the larger the values of β and γ can be.
[0218] Equation 8 illustrates the case where the weighting value α is derived based on a reference sample r(x,-1) located at the top of the current block and a reference sample r(-1,y) located to the left of the current block. Unlike the example, the weighting value α can also be derived using only the reference sample located at the top of the current block, or only the reference sample located to the left of the current block, based on the intra-prediction mode of the current block.
[0219] Furthermore, based on the intra-prediction mode of the current block, two or more upper reference samples and two or more left reference samples can be used to derive the weighting value α. As an example, Equation 9 represents an example of deriving the weighting value α using two or more upper reference samples and two or more left reference samples.
[0220] [Mathematical Expression 9]
[0221] α=[β*r(-1,y)-β′*r(-1,y+y′)]+[γ*r(x,-1)-γ′*r(x+x′,-1)]
[0222] In Equation 9, β, β', γ, and γ' can be determined based on the distance between the predicted sample and the reference sample. The smaller the distance between the predicted sample and the reference sample, the larger the values of β, β', γ, and γ' can be. Furthermore, in Equation 9, x' and y' can be determined based on the intra-frame prediction direction of the current block.
[0223] In Equations 8 and 9, examples are given illustrating the use of reference samples with the same x-coordinate as the predicted sample (i.e., r(x,-1)) and reference samples with the same y-coordinate as the predicted sample (i.e., r(-1,y)). However, depending on the size of the current block, the intra-frame prediction mode, or the position of the predicted sample, it is also possible to derive the weighting value α using only reference samples located at positions other than those with the same x-coordinate as the predicted sample (i.e., r(x,-1)) and the same y-coordinate as the predicted sample (i.e., r(-1,y)) (i.e., r(x+x',-1) or r(-1,y+y')).
[0224] Figure 12 This is a diagram illustrating an example of deriving the weighting values used when applying a filter to a predicted sample. For ease of illustration, it is assumed that the current block is a 4×4 prediction block (or transform block). Furthermore, it is assumed that lowercase characters represent predicted samples q, and uppercase characters represent reference samples r before the filter is applied.
[0225] When the intra-prediction mode of the current block is "10" (i.e., horizontal direction), the weighted value α of the predicted sample "g" with respect to the (2,1) coordinate can also be derived based on the reference sample before the applicable filter adjacent to the current block.
[0226] As an example, such as Figure 12 In the example shown in (a), the weighting value α for the predicted sample “g” can be derived using reference sample J, which is located on the same horizontal line as the predicted sample, and reference sample C, which is located on the same vertical line as the predicted sample. As an example, the weighting value α can be derived as follows.
[0227]
[0228] As another example, the weighting value α for the predicted sample "g" can also be derived using two or more upper reference samples and two or more left reference samples. For example, the weighting value α can be derived as follows.
[0229]
[0230] If the weighting value α is derived, then the weighting value α is applied to the reference sample r before the filter is applied, and the weighting value 1-α is applied to the predicted sample q, so that a new predicted sample p can be obtained.
[0231] The weighting value α is a decimal between 0 and 1, and includes floating decimal point operations. To reduce the complexity of floating decimal point operations relative to the processor and improve the accuracy of the calculation, the weighting value α can also be increased. In this case, the bilinear transform value with the weighting value α is reconstructed to the original bit depth by using a right shift operation, thereby obtaining the predicted sample p(x,y) with the filter applied.
[0232] exist Figures 10 to 12 The example illustrates the situation where a filter based on the predicted sample and the reference sample before applying the filter is suitable for the predicted sample.
[0233] As another example, a filter based on the predicted sample and a reference sample after applying the filter can also be applied to the predicted sample. Here, the reference sample after applying the filter can also correspond to, for example... Figures 5 to 9 The reference sample is a strong filter or a weak filter, a reference sample is a first filter, or a reference sample is a first filter and a second filter.
[0234] The various components described in the foregoing embodiments of the present invention can be implemented by at least one of a DSP (Digital Signal Processor), a processor, a controller, an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), other electronic devices, and combinations thereof.
[0235] Alternatively, at least one function or process described in the foregoing embodiments of the present invention can be implemented by software and the software can be recorded to a recording medium. Recording media include magnetic media such as hard disks, floppy disks, and magnetic tapes; optical recording media such as CD-ROMs and DVDs; magneto-optical media such as floppy disks; and special hardware devices such as ROMs, RAMs, and flash memory that store and execute program commands. Program commands include machine language code generated by a compiler, and high-level language code executed by a computer using tools such as an interpreter. The aforementioned hardware devices can be configured by operating one or more software modules to perform the processing operations required by the present invention, and vice versa. The constituent elements, functions, and processes described in the embodiments of the present invention can also be implemented by a combination of hardware and software.
[0236] Although the present invention has been described above only by specific details such as specific constituent elements and limited embodiments and drawings, it is only provided to help to understand the present invention in its entirety. The present invention is not limited to the above embodiments, and those skilled in the art can make various modifications and variations from the above description.
[0237] Therefore, the spirit of this invention should not be limited to the embodiments described above. The scope of the spirit of this invention includes not only the claims, but also everything that is equivalent to or modifies the claims.
[0238] Industrial applications
[0239] This invention is applicable to electronic devices capable of symbolizing / complexing images.
Claims
1. A video signal decoding method, comprising the following steps: Determine the intra-prediction mode for the current block; A reference sample is obtained based on the neighboring samples of the current block; The first prediction sample of the current block is obtained based on the reference sample and the intra-frame prediction mode; A second prediction sample for the current block is obtained by applying a weighted filter to the reference sample and the first prediction sample. The reconstruction sample of the current block is obtained based on the second prediction sample; as well as The reconstructed samples of the current block are filtered.
2. A video signal encoding method, comprising the following steps: Determine the intra-prediction mode for the current block; A reference sample is obtained based on the neighboring samples of the current block; The first prediction sample of the current block is obtained based on the reference sample and the intra-frame prediction mode; A second prediction sample for the current block is obtained by applying a weighted filter to the reference sample and the first prediction sample. The reconstruction sample of the current block is obtained based on the second prediction sample; as well as The reconstructed samples of the current block are filtered.
3. A method for transmitting a bitstream generated by a video signal encoding method, wherein, The video signal encoding method includes the following steps: Determine the intra-prediction mode for the current block; A reference sample is obtained based on the neighboring samples of the current block; The first prediction sample of the current block is obtained based on the reference sample and the intra-frame prediction mode; A second prediction sample for the current block is obtained by applying a weighted filter to the reference sample and the first prediction sample. The reconstruction sample of the current block is obtained based on the second prediction sample; as well as The reconstructed samples of the current block are filtered.