Method and apparatus for predicting residual signal
By updating the reference sample points and using the residual signals of neighboring blocks for prediction, the problem of low intra prediction encoding efficiency is solved, and the efficiency and robustness of image encoding are improved.
Patent Information
- Application Number
- CN202111287077.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2016-01-05
- Filing Date
- 2016-02-01
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2036-02-01
AI Technical Summary
Prior art In image encoding, the encoding efficiency of intra prediction is lower in areas without intra image attributes, especially when only intra prediction is required.
By updating the reference sample point for intra prediction, it is as close as possible to the current block as the encoding target, and predicting the residual signal of the current block using the residual signal of the adjacent block that has been encoded or decoded.
The encoding efficiency of intra prediction is improved, especially when only intra prediction is required, and the robustness and efficiency of image encoding are enhanced.
Smart Images

Figure CN113891092B_ABST
Abstract
Description
[0001] This application is a divisional application of an invention patent application with an application date of February 1, 2016, application number "201680074812.8", and title "Method and device for predicting residual signal". Technical Field
[0002] The following embodiments generally relate to an image decoding method, a decoding device, an encoding method and an encoding device, and more specifically, to a method and a device for predicting a residual signal. Background Art
[0003] As the information and communication industry continues to develop, broadcast services with high-definition (HD) resolution have become popular all over the world. Through this popularity, a large number of users have become accustomed to high-resolution and high-definition images.
[0004] In order to meet the user's demand for high definition, a large number of organizations have accelerated the development of next-generation imaging devices. In addition to the increased interest in high-definition TV (HDTV) and full high-definition (FHD) TV, the user's interest in ultra-high-definition (UHD) TV has also increased, where the resolution of ultra-high-definition (UHD) TV is more than four times the resolution of full high-definition (FUD) TV. With this increase in interest, image encoding / decoding technology for images with higher resolution and higher definition is required.
[0005] The image encoding / decoding apparatus and method may use an inter-frame prediction technique, an intra-frame prediction technique, an entropy coding technique, etc., in order to perform encoding / decoding on high-resolution and high-definition images. The inter-frame prediction technique may refer to a technique for predicting the value of a pixel included in a current picture using a temporally previous picture and / or a temporally subsequent picture. The intra-frame prediction may refer to a technique for predicting the value of a pixel included in a current picture using information about other pixels in the current picture. The entropy coding technique may refer to a technique for assigning short codes to symbols that appear more frequently and assigning long codes to symbols that appear less frequently.
[0006] In encoding and decoding of images, prediction may mean generating a prediction signal similar to the original signal. Prediction may be mainly classified into prediction for images reconstructed in reference space, prediction for images reconstructed in reference time, and prediction related to other symbols.
[0007] Intra prediction may refer to a prediction technique that allows only spatial reference. The current block may be a block that is a target to be encoded currently. Intra prediction may be a method for predicting the current block by referring to previously reconstructed reference samples adjacent to the current block.
[0008] In intra prediction, each neighboring reference sample may have a predicted and reconstructed luminance value instead of the luminance value of the original image, and may have a value before post-processing filtering is applied. Since the reference samples have been previously encoded and reconstructed, the reference samples can be used to predict the current block in the encoder and decoder.
[0009] However, conceptually, intra prediction may be effective only in flat areas with continuity with neighboring reference signals and areas with uniform directionality. In areas without intra-image properties, the coding efficiency of intra prediction is greatly degraded compared to the coding efficiency of inter prediction. Specifically, in image coding, it may be necessary to encode the first picture using only intra prediction, and it may be necessary to encode a certain picture using only intra prediction to improve random access and error robustness. Therefore, a method is needed to improve the coding efficiency of intra prediction. Summary of the invention
[0010] Technical issues
[0011] An embodiment is to provide a method and apparatus for updating reference samples used for intra prediction to be as close as possible to a current block as a target to be encoded to improve encoding efficiency of intra prediction.
[0012] Another embodiment is to provide a method and apparatus for predicting a residual signal of a current block using a residual signal of a neighboring block for which encoding or decoding has been completed.
[0013] Solution
[0014] According to one aspect, an image encoding method is provided, including: generating a first residual signal of a current block based on a residual signal of a first neighboring block of the current block; and performing encoding of the current block using the first residual signal of the current block.
[0015] The image encoding method may further include generating a second residual signal of the current block.
[0016] The second residual signal may be a difference between the current block and a predicted block of the current block.
[0017] The first residual signal may be generated based on both the second residual signal and the residual signal of the first neighboring block.
[0018] The first residual signal may be generated based on a difference between the second residual signal and a residual signal of the first neighboring block.
[0019] The first residual signal may be a difference between the second residual signal and a residual signal of the first neighboring block.
[0020] The image encoding method may further include determining whether to perform residual signal prediction.
[0021] The step of generating the first residual signal of the current block may be performed when it is determined to perform residual signal prediction.
[0022] The image encoding method may further include encoding information indicating whether to perform residual signal prediction.
[0023] The image encoding method may further include encoding an identifier of the first neighboring block.
[0024] According to another aspect, there is an image decoding method, including generating a prediction block of a current block.
[0025] A reconstructed block of the current block is generated based on the prediction block, the residual signal of the current block, and the residual signal of a first neighboring block of the current block.
[0026] The reconstructed block may be generated based on the sum of a residual signal of the current block and a residual signal of the first neighboring block.
[0027] The reconstructed block may be the sum of the prediction block of the current block, the residual signal of the current block, and the residual signal of the first neighboring block.
[0028] The image decoding method may further include generating a residual signal of the current block.
[0029] The image decoding method may further include identifying a first neighboring block.
[0030] The first neighboring block may be identified by an identifier of the first neighboring block.
[0031] When the identifier of the first neighboring block does not exist, a block selected according to a predefined scheme may be identified as the first neighboring block.
[0032] The image decoding method may further include updating a value of a reference sample used to generate the prediction block.
[0033] According to another aspect, an image decoding method is provided, including: determining a value of a reference sample based on a neighboring block of a current block; and using the reference sample to generate a prediction block of the current block.
[0034] The value of the reference sample may be determined based on a gradient pattern of the neighboring block.
[0035] When the gradient pattern is symmetrical, the value of the reference sample point may be determined based on gradient values of two symmetrical rows in the gradient pattern.
[0036] The value of the reference sample may be determined based on a gradient between two adjacent reference samples among a plurality of reference samples belonging to a single row in the neighboring block.
[0037] The step of determining the value of the reference sample may be configured such that the value of the reference sample changes from a value before being updated to a value after being updated.
[0038] The value before being updated may be a value generated when a block including the reference sample is predicted and reconstructed.
[0039] When the intra prediction mode of the current block is a horizontal prediction mode, the reference sample may be a left neighboring sample of the current block, and the neighboring block is a block obtained by adding an upper neighboring block of the current block to an upper left neighboring block of the current block.
[0040] According to another aspect, an image encoding method is provided, comprising: determining a value of a reference sample based on a neighboring block of a current block; and generating a prediction block of the current block using the reference sample.
[0041] Beneficial Effects
[0042] Provided are a method and apparatus for updating reference samples used for intra prediction to be as close as possible to a current block as a target to be encoded to improve encoding efficiency of the intra prediction.
[0043] In addition, a method and apparatus for predicting a residual signal of a current block using a residual signal of a neighboring block for which encoding or decoding has been completed are provided. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 is a block diagram showing a configuration of an embodiment of an encoding device to which the present invention is applied;
[0045] Figure 2 is a block diagram showing a configuration of an embodiment of a decoding device to which the present invention is applied;
[0046] Figure 3 is a diagram schematically showing a partition structure of an image when the image is encoded and decoded;
[0047] Figures 4 to 11 is a diagram illustrating the shape of a prediction unit (PU) that can be included in a coding unit (CU);
[0048] Fig.12 is a diagram showing the shape of a transform unit (TU) that can be included in a CU;
[0049] Fig.13 is a diagram illustrating an embodiment of an intra prediction process;
[0050] Fig.14 is a diagram illustrating an embodiment of an inter-frame prediction process;
[0051] Fig.15 is a configuration diagram of an encoding device according to an embodiment;
[0052] Fig.16 and Fig.17 is a flowchart illustrating an encoding method according to an embodiment;
[0053] Fig.18 is a flowchart illustrating an encoding method according to an embodiment;
[0054] Fig.19 is a flow chart showing a reference sample updating method according to an embodiment;
[0055] Fig. 20 is a flowchart illustrating a reference signal prediction method according to an embodiment;
[0056] Fig.21 is a flowchart illustrating a current block encoding method according to an embodiment;
[0057] Fig. 22 showing a current block and reference samples according to an example;
[0058] Fig.23 A method for updating reference samples taking into account horizontal gradients of neighboring blocks according to an example is shown;
[0059] Fig.24 A method for obtaining a gradient pattern according to an example is shown;
[0060] Fig.25 A method for updating reference samples taking into account vertical gradients of neighboring blocks according to an example is shown;
[0061] Fig.26 shows intra prediction with 33 angular modes according to an example;
[0062] Fig. 27 shows intra prediction with 65 angular modes according to an example;
[0063] Fig.28 showing an image region according to an example;
[0064] Fig.29 A method for calculating a residual signal of a neighboring block according to an example is shown;
[0065] Fig.30 A method for calculating a residual signal of a current block according to an example is shown;
[0066] Fig.31 A residual signal prediction method according to an example is shown;
[0067] Fig.32 shows a default residual signal according to an example;
[0068] Fig.33 shows the result of performing a discrete cosine transform on a default residual signal according to an example;
[0069] Fig.34 shows a proposed residual signal according to an example;
[0070] Fig.35 showing the result of performing discrete cosine transform on the proposed residual signal according to an example;
[0071] Fig.36 showing the locations of neighboring blocks according to an example;
[0072] Fig.37 is a configuration diagram of a decoding device according to an embodiment;
[0073] Fig.38 and Fig.39 is a flowchart illustrating a decoding method according to an embodiment;
[0074] Fig.40 is a flow chart showing a residual signal generating method according to an embodiment;
[0075] Fig.41 is a flowchart illustrating a current block decoding method using a residual signal according to an embodiment;
[0076] Fig.42 is a flowchart illustrating a prediction block generation method according to an embodiment;
[0077] Fig.43 is a flow chart showing a method for generating a reconstructed block according to an embodiment;
[0078] Fig.44 is a configuration diagram of an electronic device in which the encoding device according to the embodiment is implemented;
[0079] Fig.45 is a configuration diagram of an electronic device in which a decoding apparatus according to an embodiment is implemented.
[0080] Best Mode for Carrying Out the Invention
[0081] The following exemplary embodiments will be described in detail with reference to the accompanying drawings showing specific embodiments. These embodiments are described so that those of ordinary skill in the art to which the present disclosure belongs can easily practice these embodiments. It should be noted that the various embodiments are different from each other, but do not need to be mutually exclusive. For example, with respect to an embodiment, the specific shapes, structures and characteristics described herein can be implemented as other embodiments without departing from the spirit and scope of the embodiments. In addition, it should be understood that the position or arrangement of the various components in each disclosed embodiment can be changed without departing from the spirit and scope of the embodiments. Therefore, the attached detailed description is not intended to limit the scope of the present disclosure, and the scope of the exemplary embodiments is limited only by the attached claims and their equivalents (as long as they are appropriately described).
[0082] In the drawings, like reference numerals are used to designate the same or similar functions in various aspects. The shapes, sizes, etc. of components in the drawings may be exaggerated to make the description clear.
[0083] It will be understood that when an element is referred to as being "connected" or "coupled" to another element, the element may be directly connected or coupled to the other element, or there may be an intermediate element. The terms used herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used herein, the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention. It should be noted that in exemplary embodiments, the expression used to describe a component "including" a specific component means that additional components may be included in the practical scope or technical spirit of the exemplary embodiment, but does not exclude the presence of components other than the specific component.
[0084] Terms such as "first" and "second" may be used to describe various elements, but the elements are not limited by the terms. The terms are only used to distinguish one element from another element. For example, a first element may be referred to as a second element without departing from the scope of the present invention. Similarly, a second element may be referred to as a first element.
[0085] In addition, the component modules described in the embodiments of the present invention are independently shown to represent different characteristic functions, but this does not mean that each component module is formed by a separate hardware or software. That is to say, for the convenience of description, the component modules are arranged and included, and at least two component units can form a component unit, or an element can be divided into a plurality of component units, and the plurality of component units can perform functions. As long as it does not depart from the essence of the present invention, the embodiment in which the components are integrated or the embodiment in which some components are separated is included in the scope of the present invention.
[0086] In addition, in the present invention, some elements are not necessary elements for performing necessary functions, but may be optional elements for only improving performance. The present invention may be implemented using only necessary elements for realizing the essence of the present invention, excluding elements only for improving performance, and a structure including only necessary elements and excluding optional elements only for improving performance is included within the scope of the present invention.
[0087] The embodiments of the present invention are described with reference to the accompanying drawings to describe the present invention in detail so that those skilled in the art can easily practice the present invention. In the following description of the present invention, detailed descriptions of well-known functions or configurations that are considered to obscure the gist of the present invention will be omitted.
[0088] Hereinafter, "image" may refer to a single picture constituting a part of a video, or may refer to the video itself. For example, "encoding and / or decoding an image" may refer to "encoding and / or decoding a video", and may also refer to "encoding and / or decoding any one of a plurality of images constituting a video".
[0089] First, terms used in the embodiments will be described below.
[0090] Unit: It can be a region generated by partitioning one image when encoding and decoding the image. A single image can be partitioned into a plurality of units. When encoding and decoding the image, a predefined process can be performed on each unit. According to the function, units such as blocks, macroblocks, coding units (CUs), prediction units (PUs), and transform units (TUs) are used. A single unit can also be further partitioned into lower-level units having a size smaller than that of the unit.
[0091] - Block partition information may include information about the depth of a unit. The depth information may indicate the number and / or extent to which a unit is partitioned.
[0092] – A single unit may be hierarchically partitioned into multiple lower-level units, and the multiple lower-level units have depth information based on a tree structure. In other words, a unit and a lower-level unit generated by partitioning the unit may correspond to a node and a child node of the node, respectively. Each partitioned lower-level unit may have depth information. The depth information of a unit indicates the number and / or degree of partitioning of the unit, and therefore, the partition information of the lower-level unit may include information about the size of the lower-level unit.
[0093] - In the tree structure, the top node may correspond to the initial node before partitioning. The top node may be referred to as a "root node". In addition, the root node may have the smallest depth value. Here, the depth of the top node may be level "0".
[0094] - A node at a depth level of "1" may represent a cell generated when the initial cell is partitioned once. A node at a depth level of "2" may represent a cell generated when the initial cell is partitioned twice.
[0095] - A leaf node with a depth level of "3" may represent a cell generated when the initial cell is partitioned three times. A leaf node may be a bottom node and may have a maximum depth value.
[0096] – Block: A block may be an M×N sample matrix, where M and N may be positive integers respectively. A block may generally represent an array of two-dimensional (2D) samples, and each sample may be a pixel or a pixel value.
[0097] – Transform Unit (TU): A TU may be a basic unit for residual signal encoding and / or residual signal decoding (such as transformation, inverse transformation, quantization, inverse quantization, transform coefficient encoding, and transform coefficient decoding). A single TU may be partitioned into multiple TUs, each of which has a smaller size.
[0098] - Parameter set: The parameter set may correspond to information about the header of the structure of the bitstream. For example, the parameter set may include a sequence parameter set, a picture parameter set, an adaptation parameter set, etc.
[0099] - Rate-distortion optimization: The encoding device may use rate-distortion optimization in order to provide higher encoding efficiency by utilizing a combination of the following items: the size of the CU, the prediction mode, the size of the prediction unit, the motion information, and the size of the TU.
[0100] The rate-distortion optimization scheme can calculate the rate-distortion cost of each combination to select the optimal combination from these combinations. The rate-distortion cost can be calculated using the following equation 1. Generally, the combination that minimizes the rate-distortion cost can be selected as the optimal combination under the rate-distortion optimization method.
[0101] [Equation 1]
[0102] D+λ*R
[0103] Here, D may represent distortion. D may be an average value (mean square error) of squares of differences between original transform coefficients and reconstructed transform coefficients in a transform block.
[0104] R represents the code rate, which can use relevant context information to represent the bit rate.
[0105] λ represents a Lagrange multiplier. R may include not only encoding parameter information such as prediction mode, motion information, and coding block flag, but also bits generated by encoding transform coefficients.
[0106] The encoding device performs processes such as inter-frame prediction and / or intra-frame prediction, transformation, quantization, entropy encoding, dequantization, and inverse transformation in order to calculate accurate D and R, but these processes greatly increase the complexity of the encoding device.
[0107] Figure 1 is a block diagram showing the configuration of an embodiment of an encoding device to which the present invention is applied.
[0108] The encoding apparatus 100 may be a video encoding apparatus or an image encoding apparatus. A video may include one or more images (pictures). The encoding apparatus 100 may encode one or more images of a video sequentially over time.
[0109] Reference Figure 1 The encoding device 100 includes a motion prediction unit 111, a motion compensation unit 112, an intra-frame prediction unit 120, a switch 115, a subtractor 125, a transform unit 130, a quantization unit 140, an entropy encoding unit 150, a dequantization unit 160, an inverse transform unit 170, an adder 175, a filtering unit 180 and a reference picture buffer 190.
[0110] The encoding device 100 may perform encoding on the input image in the intra mode and / or the inter mode. In addition, the encoding device 100 may generate a bit stream by encoding the input image, and may output the generated bit stream. When the intra mode is used, the switch 115 may switch to the intra mode, whereas when the inter mode is used, the switch 115 may switch to the inter mode.
[0111] The encoding device 100 may generate a prediction block for an input block in an input image. In addition, after generating the prediction block, the encoding device 100 may encode the residual between the input block and the prediction block. The input image may be referred to as a "current image" as a target to be encoded currently. The input block may be referred to as a "current block" as a target to be encoded currently.
[0112] When the prediction mode is intra mode, the intra prediction unit 120 may use pixel values of previously encoded neighboring blocks around the current block as reference pixels. The intra prediction unit 120 may perform spatial prediction using the reference pixels and generate prediction samples for the input block via spatial prediction.
[0113] When the prediction mode is the inter mode, the motion prediction unit 111 may search for an area in the reference image that best matches the input block during the motion prediction process, and may use the found area to derive a motion vector. The reference image may be stored in the reference picture buffer 190. More specifically, when encoding and / or decoding of the reference image is processed, the reference image may be stored in the reference picture buffer 190.
[0114] The motion compensation unit 112 may generate a prediction block by performing motion compensation using a motion vector. Here, the motion vector may be a two-dimensional (2D) vector used for inter-frame prediction. In addition, the motion vector may represent an offset between a current image and a reference image.
[0115] The subtractor 125 may generate a residual block using the residual between the input block and the prediction block. The residual block is also referred to as a "residual signal".
[0116] The transform unit 130 may generate a transform coefficient by transforming the residual block, and may output the transform coefficient. Here, the transform coefficient may be a coefficient value generated by transforming the residual block. When the transform skip mode is used, the transform unit 130 may omit the operation of transforming the residual block.
[0117] By performing quantization on the transform coefficients, quantized transform coefficient levels may be generated. Here, in an embodiment, the quantized transform coefficient levels may also be referred to as "transform coefficients".
[0118] The quantization unit 140 may generate quantized transform coefficient levels by quantizing the transform coefficients according to the quantization parameters, and may output the quantized transform coefficient levels. In this case, the quantization unit 140 may quantize the transform coefficients using a quantization matrix.
[0119] The entropy encoding unit 150 may generate a bitstream by performing entropy encoding based on probability distribution on a value calculated by the quantization unit 140 or on an encoding parameter value calculated in an encoding process, and may output the bitstream.
[0120] In addition to the pixel information of the image, the entropy encoding unit 150 may also perform entropy encoding on information required for decoding the image. For example, the information required for decoding the image may include syntax elements and the like.
[0121] Coding parameters may be information required for encoding and / or decoding. Coding parameters may include information encoded by an encoding device and transmitted to a decoding device, and may also include information derived during the encoding or decoding process. For example, the information transmitted to a decoding device may include syntax elements.
[0122] For example, the encoding device may include values or statistical information such as prediction mode, motion vector, reference picture index, coding block pattern, presence or absence of residual signal, transform coefficient, quantized transform coefficient, quantization parameter, block size, and block partition information. The prediction mode may be an intra-frame prediction mode or an inter-frame prediction mode.
[0123] The residual signal may represent the difference between the original signal and the predicted signal. Alternatively, the residual signal may be a signal generated by transforming the difference between the original signal and the predicted signal. Alternatively, the residual signal may be a signal generated by transforming and quantizing the difference between the original signal and the predicted signal. The residual block may be a block-based residual signal.
[0124] When entropy coding is applied, fewer bits can be allocated to symbols that appear more frequently, and more bits can be allocated to symbols that appear less frequently. Since the symbols are represented by this allocation, the size of the bit string for the target symbol to be encoded can be reduced. Therefore, the compression performance of video coding can be improved by entropy coding.
[0125] In addition, in order to perform entropy coding, a coding method such as exponential Golomb, context adaptive variable length coding (CAVLC) or context adaptive binary arithmetic coding (CABAC) can be used. For example, the entropy coding unit 150 can use a variable length coding / code (VLC) table to perform entropy coding. For example, the entropy coding unit 150 can derive a binarization method for the target symbol. In addition, the entropy coding unit 150 can derive a probability model for the target symbol / bin. The entropy coding unit 150 can use the derived binarization method or probability model to perform entropy coding.
[0126] When the encoding device 100 performs encoding via inter-frame prediction, the encoded current image may be used as a reference image for another image to be subsequently processed. Therefore, the encoding device 100 may decode the encoded current image and store the decoded image as a reference image. For decoding, inverse quantization and inverse transformation of the encoded current image may be performed.
[0127] The quantized coefficients may be dequantized by the dequantization unit 160, and may be inversely transformed by the inverse transform unit 170. The dequantized and inversely transformed coefficients may be added to the prediction block by the adder 175. The dequantized and inversely transformed coefficients and the prediction block are added, and then a reconstructed block may be generated.
[0128] The reconstructed block is filtered via the filtering unit 180. The filtering unit 180 may apply one or more filters of a deblocking filter, a sample adaptive offset (SAO) filter, and an adaptive loop filter (ALF) to the reconstructed block or the reconstructed picture. The filtering unit 180 may also be referred to as an "adaptive in-loop filter".
[0129] The deblocking filter can eliminate block distortion occurring at the boundary of the block. The SAO filter can add an appropriate offset value to the pixel value to compensate for the coding error. The ALF can perform filtering based on the comparison result between the reconstructed block and the original block. The reconstructed block that has been filtered by the filtering unit 180 can be stored in the reference picture buffer 190.
[0130] Figure 2 is a block diagram showing the configuration of an embodiment of a decoding device to which the present invention is applied.
[0131] The decoding device 200 may be a video decoding device or an image decoding device.
[0132] Reference Figure 2 , the decoding device 200 may include an entropy decoding unit 210, a dequantization unit 220, an inverse transform unit 230, an intra-frame prediction unit 240, a motion compensation unit 250, an adder 255, a filtering unit 260 and a reference picture buffer 270.
[0133] The decoding apparatus 200 may receive a bitstream output from the encoding apparatus 100. The decoding apparatus 200 may perform decoding on the bitstream in an intra mode or an inter mode. In addition, the decoding apparatus 200 may generate a reconstructed image through decoding, and may output the reconstructed image.
[0134] When the prediction mode for decoding is the intra mode, the switch may be operated to switch to the intra mode. When the prediction mode for decoding is the inter mode, the switch may be operated to switch to the inter mode.
[0135] The decoding apparatus 200 may acquire a reconstructed residual block from an input bitstream and may generate a prediction block. When the reconstructed residual block and the prediction block are acquired, the decoding apparatus 200 may generate a reconstructed block by adding the reconstructed residual block to the prediction block.
[0136] The entropy decoding unit 210 may generate symbols by performing entropy decoding based on probability distribution on the bit stream. The generated symbols may include quantized coefficient format symbols. Here, the entropy decoding method may be similar to the entropy encoding method described above. That is, the entropy decoding method may be the inverse process of the entropy encoding method described above.
[0137] The quantized coefficients may be dequantized by the dequantization unit 220 and may be inversely transformed by the inverse transform unit 230. As a result of dequantizing and inversely transforming the quantized coefficients, a reconstructed residual block may be generated. Here, the dequantization unit 220 may apply a quantization matrix to the quantized coefficients.
[0138] When the intra mode is used, the intra prediction unit 240 can generate a prediction block by performing spatial prediction using pixel values of previously encoded neighboring blocks around the current block. When the inter mode is used, the motion compensation unit 250 can generate a prediction block by performing motion compensation using a motion vector and a reference image stored in the reference picture buffer 270.
[0139] The reconstructed residual block and the prediction block may be added to each other by the adder 255. The block generated when the reconstructed residual block and the prediction block are added to each other may be filtered by the filtering unit 160. The filtering unit 260 may apply one or more of a deblocking filter, an SAO filter, and an ALF to the reconstructed block or the reconstructed picture. The filtering unit 260 may output the reconstructed picture (block). The reconstructed picture may be stored in the reference picture buffer 270 and may then be used for inter-frame prediction.
[0140] Figure 3 is a diagram schematically showing a partition structure of an image when the image is encoded and decoded.
[0141] In order to efficiently partition an image, a coding unit (CU) may be used in encoding and decoding. The term "unit" may be a general term for a block including 1) a syntax element and 2) an image sample. For example, "partition of a unit" may mean "partition of a block corresponding to a unit".
[0142] Reference Figure 3 , the image 300 is sequentially partitioned in units of a largest coding unit (LCU), and a partition structure of the image 300 is determined based on the LCU. Here, 'LCU' may be used to have the same meaning as a coding tree unit (CTU).
[0143] The partition structure may indicate the distribution of CUs in the LCU 310. A CU may be a unit required for efficiently encoding an image. Such distribution may be determined based on whether a single CU is partitioned into four CUs. The width and length of a CU generated by partitioning may be half the length and width of the CU before partitioning, respectively. Each partitioned CU may be recursively partitioned into four CUs, and in the same manner, the width and length of the four CUs are half the length and width of the corresponding CU.
[0144] At this time, the partitioning of the CU may be recursively performed until a predetermined depth. The depth information may be information indicating the size of the CU. In addition, the depth information is stored for each CU. For example, the depth of the LCU may be 0, and the depth of the smallest coding unit (SCU) may be a predefined maximum depth. Here, as described above, the LCU may be a coding unit having a maximum coding unit size, and the SCU may be a coding unit having a minimum coding unit size.
[0145] Partitioning starts at the LCU 310, and whenever the width and length of the CU are halved, the depth of the CU is increased by "1" by partitioning. At each depth, a non-partitioned CU may have a size of 2N×2N. In the case where the CU is partitioned, a CU of size 2N×2N may be partitioned into four CUs of size N×N. Whenever the depth increases by 1, the size N is halved.
[0146] Reference Figure 3 , the size of an LCU with a depth of 0 may be 64×64 pixels. “0” may be the minimum depth. The size of an SCU with a depth of 3 may be 8×8 pixels, where 3 may be the maximum depth. Here, a CU of 64×64 pixels corresponding to an LCU may be represented by a depth of 0. A CU of 32×32 pixels may be represented by a depth of 1. A CU of 16×16 pixels may be represented by a depth of 2. A CU of 8×8 pixels corresponding to an SCU may be represented by a depth of 3.
[0147] In addition, information about whether the CU is partitioned can be represented by the partition information of the CU. The partition information can be one-bit information. All CUs except the SCU may have partition information. For example, when the value of the partition information is 0, the CU may not be partitioned, and conversely, when the value of the partition information is 1, the CU may be partitioned.
[0148] Figures 4 to 11 is a diagram illustrating the shape of a prediction unit (PU) that can be included in a coding unit (CU).
[0149] In the CU partitioned from the LCU, each CU that is no longer partitioned may be divided into one or more PUs. This process may also be referred to as "partitioning".
[0150] PU can be a basic unit of prediction. PU can be encoded and decoded in any one of skip mode, inter mode and intra mode. PU can be divided into various shapes according to the mode.
[0151] like Figure 4 As shown in , in skip mode, partitioning may not be performed in a CU. In skip mode, a 2N×2N mode 410 having the same size as a CU may be supported.
[0152] In inter mode, eight different shapes that a CU can be divided into can be supported. For example, in inter mode, 2N×2N mode 410, 2N×N mode 415, N×2N mode 420, N×N mode 425, 2N×nU mode 430, 2N×nD mode 440, nL×2N mode 445, and nR×2N mode 450 can be supported.
[0153] In intra mode, 2N×2N mode 410 and N×N mode 425 may be supported.
[0154] Fig.12 is a diagram illustrating the shape of a transform unit (TU) that can be included in a CU.
[0155] A TU may be a basic unit for transformation, quantization, inverse transformation, and inverse quantization processes in a CU. A TU may have a square or rectangular shape.
[0156] In the CU partitioned from the LCU, each CU that is no longer partitioned into a CU may be divided into one or more TUs. At this time, the partition structure of the TU may be a quadtree structure. For example, Fig.12 As shown in , a single CU 510 may be partitioned one or more times according to a quadtree structure. Through such partitioning, a single CU 510 may be composed of TUs of various sizes.
[0157] Fig.13 is a diagram illustrating an embodiment of an intra prediction process.
[0158] The number of intra prediction modes may be fixed to 35 regardless of the size of the prediction unit.
[0159] like Fig.13 As shown in , the prediction modes may include two non-directional modes and 33 directional modes. The two non-directional modes may include a DC mode and a planar mode.
[0160] The number of prediction modes may differ according to the type of color component. For example, the number of prediction modes may differ according to whether the color component is a luma signal or a chroma signal.
[0161] The PU may have a square shape with a size of N×N or 2N×2N. The N×N size may include sizes of 4×4, 8×8, 16×16, 32×32, and 64×64. The PU unit may have a size of at least one of a CU, a PU, and a TU.
[0162] Intra-frame encoding and / or decoding may be performed using sample values or encoding parameters included in adjacent reconstruction units.
[0163] Fig.14 is a diagram illustrating an embodiment of an inter-frame prediction process.
[0164] Fig.14 The rectangle shown in can represent an image (or picture). Fig.14 The arrow in may represent a prediction direction. That is, the image may be encoded and / or decoded according to the prediction direction.
[0165] According to the encoding type, each image (or picture) may be classified into an intra picture (I picture), a unidirectional prediction picture (P picture), and a bidirectional prediction picture (B picture). Each picture may be encoded according to the encoding type of the picture.
[0166] When the image to be encoded is an I picture, the image itself may be encoded without performing inter-frame prediction. When the image to be encoded is a P picture, the image may be encoded via inter-frame prediction using only a reference image in the forward direction. When the image to be encoded is a B picture, the image may be encoded using inter-frame prediction using reference images in both the forward and reverse directions, and may be encoded via inter-frame prediction using reference images in either the forward and reverse directions.
[0167] Images of P pictures and B pictures that are encoded and / or decoded using a reference image may be considered as images using inter-frame prediction.
[0168] In the following description, inter prediction according to an embodiment will be described in detail.
[0169] Inter prediction may be performed using reference pictures and motion information. In addition, inter prediction may be performed using the skip mode described above.
[0170] The reference picture may be at least one of a picture before the current picture and a picture after the current picture. Here, the inter prediction may be a prediction performed on a block of the current picture based on the reference picture. Here, the reference picture may be an image used to predict the block.
[0171] Here, the region in the reference picture may be specified by using a reference picture index (refIdx) indicating the reference picture and a motion vector, which will be described later.
[0172] Inter prediction may be performed by selecting a reference picture and a reference block corresponding to a current block within the reference picture, and generating a prediction block for the current block using the selected reference block. The current block may be a block that is a target to be currently encoded or decoded among a plurality of blocks in the current picture.
[0173] The motion information may be derived during inter prediction by each of the encoding apparatus 100 and the decoding apparatus 200. Also, the derived motion information may be used to perform inter prediction.
[0174] In this case, each of the encoding device 100 and the decoding device 200 can improve the encoding and / or decoding efficiency by utilizing the motion information of the reconstructed neighboring blocks and / or the motion information of the co-located blocks (col blocks). The col block may be a block corresponding to the current block in the reconstructed co-located picture (col picture). The reconstructed neighboring block may be a block that exists in the current picture and has been reconstructed via encoding and / or decoding. In addition, the reconstructed neighboring block may be a neighboring block adjacent to the current block and / or a block located at an outer corner of the current block. Here, the block located at the outer corner of the current block may be a block vertically adjacent to the neighboring block horizontally adjacent to the current block, or a block horizontally adjacent to the neighboring block vertically adjacent to the current block.
[0175] Each of the encoding device 100 and the decoding device 200 may determine a block existing at a position spatially corresponding to the current block in the col picture, and may determine a predefined relative position based on the determined block. The predefined relative position may be an external and / or internal position in the block existing at a position spatially corresponding to the current block. In addition, each of the encoding device 100 and the decoding device 200 may derive the col block based on the predefined relative position. Here, the col picture may be one of one or more reference pictures included in the reference picture list.
[0176] The method for deriving motion information may vary according to the prediction mode of the current block. For example, as a prediction mode applied to inter prediction, there may be an advanced motion vector predictor (AMVP), a merge mode, etc.
[0177] For example, when AMVP is used as the prediction mode, each of the encoding device 100 and the decoding device 200 may generate a prediction motion vector candidate list using a motion vector of a reconstructed neighboring block and / or a motion vector of a col block. The motion vector of the reconstructed neighboring block and / or the motion vector of the col block may be used as a prediction motion vector candidate.
[0178] The bitstream generated by the encoding device 100 may include a predicted motion vector index. The predicted motion vector index may represent an optimal predicted motion vector selected from predicted motion vector candidates included in the predicted motion vector candidate list. The predicted motion vector index may be transmitted from the encoding device 100 to the decoding device 200 through the bitstream.
[0179] The decoding apparatus 200 may select a predicted motion vector for the current block from among predicted motion vector candidates included in the predicted motion vector candidate list using the predicted motion vector index.
[0180] The encoding device 100 may calculate a motion vector difference (MVD) between a motion vector of a current block and a predicted motion vector, and may encode the MVD. The bitstream may include the encoded MVD. The MVD may be transmitted from the encoding device 100 to the decoding device 200 through the bitstream. Here, the decoding device 200 may decode the received MVD. The decoding device 200 may derive the motion vector of the current block using the sum of the decoded MVD and the predicted motion vector.
[0181] The bitstream may include a reference picture index indicating a reference picture, etc. The reference picture index may be transmitted from the encoding device 100 to the decoding device 200 through the bitstream. The decoding device 200 may predict a motion vector of a current block using a plurality of pieces of motion information of neighboring blocks, and may derive a motion vector of the current block using a difference between the predicted motion vector and the motion vector. The decoding device 200 may generate a prediction block for the current block based on information about the derived motion vector and the reference picture index.
[0182] As another example of a method for deriving motion information, a merge method is used. The term "merge" may refer to the merging of motions of multiple blocks. "Merge" may mean that the motion information of one block is also applied to other blocks. When merging is applied, each of the encoding device 100 and the decoding device 200 may use multiple pieces of motion information of each reconstructed neighboring block and / or motion information of the col block to generate a merge candidate list. The motion information may include at least one of the following items: 1) a motion vector, 2) an index of a reference image, and 3) a prediction direction. The prediction direction may be unidirectional information or bidirectional information.
[0183] At this time, merging may be applied on a CU basis or a PU basis. When merging is performed on a CU basis or a PU basis, the encoding device 100 may send predefined information to the decoding device 200 through a bitstream. The bitstream may include the predefined information. The predefined information may include: 1) information indicating whether merging is performed for each block partition, and 2) information indicating which block of the neighboring blocks adjacent to the current block will be merged together. For example, the neighboring blocks around the current block may include a left block adjacent to the current block, an upper block adjacent to the current block, a block adjacent to the current block in time, and the like.
[0184] The merge candidate list may represent a list storing multiple pieces of motion information. In addition, the merge candidate list may be generated before performing the merge. The motion information stored in the merge candidate list may be 1) motion information of a neighboring block adjacent to the current block or 2) motion information of a block (co-located block) corresponding to the current block in a reference image. In addition, the motion information stored in the merge candidate list may be new motion information generated by combining multiple pieces of motion information previously present in the merge candidate list.
[0185] The skip mode may be a mode in which information of a neighboring block is applied to the current block without change. The skip mode may be one of a plurality of modes for inter-frame prediction. When the skip mode is used, the encoding device 100 may send only information indicating a motion block to be used as motion information of the current block through a bitstream to the decoding device 200. The encoding device 100 may not send additional information to the decoding device 200. For example, the additional information may be syntax information. The syntax information may include information about a motion vector difference.
[0186] In the following embodiments, residual signal prediction is described. Generally, in existing image encoding and / or decoding technologies (such as high efficiency video coding (HEVC) or advanced video coding (AVC)), a residual signal of a current block is generated in order to encode and / or decode the current block. When a residual signal of a current block is generated, a residual signal predicted again by residual signal prediction may be generated, wherein the residual signal prediction is performed using a residual signal of a block adjacent to the current block.
[0187] The residual signal prediction may aim to predict the residual signal of the current block using the residual signal of the neighboring block. Alternatively, the residual signal prediction may aim to use the difference between the residual signal of the current block and the residual signal of the neighboring block as the residual signal of the current block.
[0188] Compared with the residual signal obtained using the existing intra prediction method, the residual signal obtained through residual signal prediction can have advantages from the perspective of coding efficiency. For example, the number of bits occurring for the residual signal can be reduced by using the residual signal obtained through residual signal prediction.
[0189] In the following embodiments, the residual signal obtained through residual signal prediction may be referred to as a “first residual signal”, and the residual signal obtained using an existing intra-frame prediction method may be referred to as a “second residual signal”.
[0190] In addition, in the following embodiments, the updating of reference samples will be described. The reference samples are used to generate a prediction block. Therefore, when the reference samples have characteristics similar to the properties of the predicted current block (as a target of encoding or decoding), the efficiency of encoding or decoding can be improved. In the following description, an embodiment for updating the reference samples according to a predetermined condition before generating a prediction block will be described below.
[0191] Fig.15 is a configuration diagram of an encoding device according to an embodiment.
[0192] The encoding device 800 may correspond to the encoding device 100 described above. The encoding device 800 may include a motion prediction unit 111, a motion compensation unit 112, an intra prediction unit 120, a switch 115, a subtractor 125, a transform unit 130, a quantization unit 140, an entropy encoding unit 150, an inverse quantization unit 160, an inverse transform unit 170, an adder 175, a filtering unit 180, and a reference picture buffer 190, and may also include an intra residual prediction unit 810.
[0193] The motion prediction unit 111, the motion compensation unit 112, the intra prediction unit 120, the switch 115, the subtractor 125, the transform unit 130, the quantization unit 140, the entropy encoding unit 150, the inverse quantization unit 160, the inverse transform unit 170, the adder 175, the filtering unit 180 and the reference picture buffer 190 may perform the same as the above reference picture buffer. Figure 1 The functions and / or operations described above are the same as those described above, and their repeated description will be omitted.
[0194] In addition, the motion prediction unit 111, the motion compensation unit 112, the intra prediction unit 120, the switch 115, the subtractor 125, the transform unit 130, the quantization unit 140, the entropy encoding unit 150, the inverse quantization unit 160, the inverse transform unit 170, the adder 175, the filtering unit 180, and the reference picture buffer 190 may perform functions and / or operations related to the intra residual prediction unit 810. The functions and / or operations of the motion compensation unit 112, the intra prediction unit 120, the switch 115, the subtractor 125, the transform unit 130, the quantization unit 140, the entropy encoding unit 150, the inverse quantization unit 160, the inverse transform unit 170, the adder 175, the filtering unit 180, the reference picture buffer 190, and the intra residual prediction unit 810 will be described in detail below.
[0195] The intra residual prediction unit 810 may not be separated from the intra prediction unit 120. The intra prediction unit 120 and the intra residual prediction unit 810 may be integrated into the intra prediction unit 120. In an embodiment, the functions and / or operations described as being performed by the intra residual prediction unit 810 may also be performed by the intra prediction unit 120.
[0196] In addition, reference will be made to Fig.37 The decoding device 2300 corresponding to the encoding device 800 according to an embodiment is described in detail.
[0197] Fig.16 and Fig.17 is a flowchart illustrating an encoding method according to an embodiment.
[0198] In the following description, a current block may be a block that is a target to be currently encoded or a block in a current image.
[0199] First, refer to Fig.16 , step 910 may be executed.
[0200] Before executing step 910, a reference sample point may be generated. Fig. 22 The generation of reference samples according to an example is described in detail.
[0201] When generating reference samples, a reference sample generation method based on existing image encoding and / or decoding technology (such as HEVC or AVC) may be used.
[0202] In step 910, the intra prediction unit 120 may determine whether to perform updating of reference samples. Here, updating of reference samples may be configured to improve sample values of reference samples used to generate a prediction block before generating a prediction block of a current block.
[0203] When it is determined to perform the updating of the reference sample point, step 915 may be performed. On the other hand, when it is determined not to perform the updating of the reference sample point, steps 920 and 970 may be performed.
[0204] In step 915 , the intra prediction unit 120 may update the value of the reference sample, and through the update, may determine the value of the reference sample used to generate the prediction block of the current block.
[0205] The intra prediction unit 120 may update the value of the reference sample according to the directional pattern of the neighboring samples.
[0206] Will then refer to Fig.23 , Fig.24 and Fig.25 The updating of the reference samples according to an example is described in detail.
[0207] After step 915 is executed, step 920 and step 970 may be executed.
[0208] In step 920, the intra prediction unit 120 may perform intra prediction. The intra prediction unit 120 may generate a prediction block of the current block. The intra prediction unit 120 may generate a prediction block of the current block using reference samples according to an intra prediction mode for the current block.
[0209] For example, when generating a prediction block, a prediction block generation method based on an existing image encoding and / or decoding technology (such as HEVC or AVC) may be used.
[0210] After step 920 is performed, step 930 may be performed.
[0211] In step 930 , the intra residual prediction unit 810 may determine whether to perform residual signal prediction.
[0212] When it is determined to perform residual signal prediction, step 935 , step 940 , and step 980 may be performed.
[0213] When it is determined not to perform residual signal prediction, step 960 and step 980 may be performed.
[0214] In step 935, the intra-frame residual prediction unit 810 may determine one of the one or more neighboring blocks of the current block as a first neighboring block. The first neighboring block may be a block used for residual signal prediction. Fig. 20 The determination of neighboring blocks according to examples is described in detail.
[0215] After step 935 is executed, step 950 and step 985 may be executed.
[0216] In step 940, the intra prediction unit 120 may generate a second residual signal of the current block using intra prediction. The intra prediction unit 120 may generate the second residual signal of the current block based on both the intra prediction mode and the reference samples for the current block.
[0217] The second residual signal may correspond to the residual signal of the current block in an existing image encoding and / or decoding technology (such as HEVC or AVC). For example, when generating the second residual signal, a residual signal generation method based on an existing image encoding and / or decoding technology (such as HEVC or AVC) may be used.
[0218] Will then refer to Fig.28 , Fig.29 and Fig.30 The generation of the second residual signal according to the embodiment is described in detail.
[0219] After step 940 is performed, step 950 may be performed.
[0220] When it is determined to perform residual signal prediction, step 950 may be performed as a result of step 935 and step 940 being performed.
[0221] In step 950 , the intra residual prediction unit 810 may generate a first residual signal of the current block based on the residual signal prediction.
[0222] The intra residual prediction unit 810 may perform residual signal prediction using the residual signal of the first neighboring block.
[0223] The intra residual prediction unit 810 may generate a first residual signal of the current block based on the second residual signal of the current block and the residual signal of the first neighboring block.
[0224] The first residual signal may be the difference between the second residual signal of the current block and the residual signal of the first neighboring block. Alternatively, the first residual signal may be the result of subtracting the residual signal of the first neighboring block from the second residual signal of the current block. The intra residual prediction unit 810 may generate the difference between the second residual signal of the current block and the residual signal of the first neighboring block as the first residual signal.
[0225] The first residual signal may be a residual signal of the current block generated via residual signal prediction. Alternatively, the first residual signal may be a residual signal of the current block generated based on a residual signal of a first neighboring block of the current block.
[0226] By applying the residual signal prediction to the second residual signal generated in step 940, more efficient encoding may be performed on the current block.
[0227] Will then refer to Fig.31 The generation of the first residual signal according to the embodiment is described in detail.
[0228] When it is determined not to perform residual signal prediction, the intra prediction unit 120 or the intra residual prediction unit 810 may generate a third residual signal of the current block in step 960 .
[0229] The third residual signal may be a residual signal of the current block in an existing image encoding and / or decoding technology (such as HEVC or AVC). For example, when generating the third residual signal, a residual signal generation method based on an existing image encoding and / or decoding technology (such as HEVC or AVC) may be used.
[0230] In addition, the third residual signal may be the same signal as the second residual signal in step 940. In other words, in step 940 and step 960, the residual signal of the current block may be generated using the same scheme.
[0231] In step 970 , the intra prediction unit 120 may encode information indicating whether to perform updating of the reference samples.
[0232] When performing an update of the reference sample, unlike the existing intra prediction, the intra prediction unit 120 may encode the information so that the reference sample is subsequently Fig.21 The described decoding device 2300 identifies whether the update of the reference sample has been used. For example, when the update of the reference sample has been used, the value of the information may be set to "1", and conversely, when the update of the reference sample has not been used, the value of the information may be set to "0".
[0233] For example, the intra prediction unit 120 may use a flag to indicate whether the update of the reference sample has been performed. By means of the flag, it may be indicated whether the update of the reference sample has been performed.
[0234] In step 980 , the intra residual prediction unit 810 may encode information indicating whether residual signal prediction has been performed.
[0235] When residual signal prediction is performed, the intra residual prediction unit 810 may encode this information so that the reference signal Fig.37 The described decoding device 2300 can identify whether residual signal prediction has been performed. For example, when residual signal prediction has been used, the value of this information can be set to "1", and conversely, when residual signal prediction is not used, the value of this information can be set to "0".
[0236] For example, the intra prediction unit 120 may use a flag “intra_residual_prediction_flag” to indicate whether residual signal prediction has been performed, wherein the flag “intra_residual_prediction_flag” may indicate whether residual signal prediction has been performed.
[0237] In step 985, the intra prediction unit 810 may encode an identifier of the first neighboring block.
[0238] The identifier of the first neighboring block may be information capable of identifying a neighboring block used to predict a residual signal of the current block.
[0239] For example, the identifier of the first neighboring block may indicate a neighboring block among multiple neighboring blocks that is used to predict the residual signal of the current block. Alternatively, the identifier of the first neighboring block may be position information indicating the position of a neighboring block among multiple neighboring blocks that is used to predict the residual signal of the current block. The position of the neighboring block may indicate the position of the selected neighboring block relative to the current block. The position of the neighboring block may indicate the direction in which the selected neighboring block is adjacent to the current block.
[0240] The identifier of the first neighboring block may be configured to indicate the same block in both the encoding device 800 and the decoding device 2300. For example, regarding the identifier of the first neighboring block, the size N of the block and the position of the neighboring block must be the same as each other in both the encoding device 800 and the decoding device 2300. In order to allow the encoding device 800 and the decoding device 2300 to share the same components of the identifier of the first neighboring block with each other, the identifier of the first neighboring block may be encoded using the "(neighboring residual index (idx) truncated unary)" scheme.
[0241] When residual signal prediction is performed, steps 950, 970, 980, and 985 may be performed, and thereafter step 990 may be performed. Also, when residual signal prediction is not performed, steps 960, 970, and 980 may be performed, and thereafter step 990 may be performed.
[0242] Next, we will refer to Fig.17 .
[0243] In step 990 , the encoding apparatus 800 may encode the current block using the residual signal of the current block. Step 990 may be performed by at least one of the transform unit 130 , the quantization unit 140 , and the entropy encoding unit 150 .
[0244] In step 990, the residual signal to be used to encode the current block may be one of the two residual signals.
[0245] When it is determined to perform residual signal prediction at step 930, the first residual signal of the current block generated at step 950 may be the residual signal used at step 990. In other words, the residual signal generated via residual signal prediction may be used to encode the current block, and the encoding apparatus 800 may encode the current block using the first residual signal of the current block.
[0246] When it is determined not to perform residual signal prediction in step 930 , the third residual signal of the current block generated in step 960 may be the residual signal used in step 990 .
[0247] Step 990 may include step 991 , step 992 , and step 993 .
[0248] In step 991 , the transform unit 130 may generate a transform coefficient by performing a transform on the residual signal.
[0249] At step 992, quantization unit 140 uses the transform coefficients to generate quantized transform coefficient levels.
[0250] At step 993 , the entropy encoding unit 150 may perform entropy encoding on the transform coefficient levels.
[0251] In the above-described steps related to the encoding of information, step 970, step 980, and step 985 may be performed by one subject in an order different from the order described above. For example, step 993 may include step 970, step 980, and step 985. In addition, the entropy encoding unit 150 may encode at least one of the following items: information indicating whether an update of a reference sample has been performed, information indicating whether a residual signal prediction has been performed, and an identifier of a first neighboring block.
[0252] Fig.18is a flowchart illustrating an encoding method according to an embodiment.
[0253] Fig.19 is a flowchart illustrating a reference sample updating method according to an embodiment.
[0254] Fig. 20 is a flowchart illustrating a reference signal prediction method according to an embodiment.
[0255] Fig.21 is a flowchart illustrating a current block encoding method according to an embodiment.
[0256] With reference to above Fig. 9 The described embodiments are compared with those in the reference Fig.18 , Fig.19 and Fig. 20 In the described embodiment, the updating of the reference samples and the prediction of the residual signal are performed separately.
[0257] Hereinafter, the current block may be a block that is a target to be currently encoded or a block in a current image.
[0258] First, refer to Fig.18 .
[0259] In step 1010, the intra prediction unit 120 may generate reference samples of the current block. The intra prediction unit 120 may generate neighboring reference samples of the current block for intra prediction. Fig. 22 The generation of reference samples according to an embodiment is described in detail.
[0260] When generating reference samples, a reference sample generation method based on existing image encoding and / or decoding technology (such as HEVC or AVC) may be used.
[0261] The encoding device 800 may selectively provide a reference sample update function. When the reference sample update function is used, step 1020 may be performed after step 1010. When the reference sample update function is not used, step 1030 may be performed after step 1010. In other words, the reference sample update function may be selectively combined in this embodiment.
[0262] In step 1020 , the intra prediction unit 120 may provide functions related to updating of reference samples.
[0263] Thereafter, reference will be made to Fig.19 .
[0264] Reference Fig.19 , step 1020 may include step 1021, step 1022 and step 1023.
[0265] In step 1021, the intra prediction unit 120 may determine whether to perform updating of the reference samples. Here, updating of the reference samples may be configured to improve sample values of the reference samples used to generate the prediction block before generating the prediction block of the current block.
[0266] When it is determined that the reference sample point is to be updated, step 1022 may be performed. When it is determined that the reference sample point is not to be updated, step 1023 may be performed.
[0267] In step 1022, the intra prediction unit 120 may update the value of the reference sample, and through the update, may determine the value of the reference sample used to generate the prediction block of the current block.
[0268] The intra prediction unit 120 may update the value of the reference sample according to the directional pattern of the neighboring samples.
[0269] Will then refer to Fig.23 , Fig.24 and Fig.25 The updating of the reference samples according to an example is described in detail.
[0270] After executing step 1022 , step 1023 may be executed.
[0271] In step 1023, the intra prediction unit 120 may encode information indicating whether updating of the reference samples has been performed.
[0272] Unlike the existing intra prediction, when the reference sample is updated, the intra prediction unit 120 can encode the information so that the reference sample is subsequently updated. Fig.37 The described decoding device 2300 can identify whether the update of the reference sample has been performed. For example, when the update of the reference sample has been used, the value of the information can be set to "1", and conversely, when the update of the reference sample has not been used, the value of the information can be set to "0".
[0273] For example, the intra prediction unit 120 may use a flag to indicate whether the updating of the reference sample has been performed, wherein the flag may indicate whether the updating of the reference sample has been performed.
[0274] When step 1010 or step 1020 is executed, step 1030 may be executed.
[0275] Will refer again Fig.18 .
[0276] In step 1030, the intra prediction unit 120 may perform intra prediction. The intra prediction unit 120 may generate a prediction block of the current block. The intra prediction unit 120 may generate a prediction block of the current block using reference samples according to an intra prediction mode for the current block.
[0277] For example, when generating a prediction block, a prediction block generation method based on an existing image encoding and / or decoding technology (such as HEVC or AVC) may be used.
[0278] The encoding device 800 may selectively provide a residual signal prediction function. When the residual signal prediction function is used, step 1040 may be performed after step 1030. When the residual signal prediction function is not used, step 1050 may be performed after step 1030. In other words, the residual signal prediction function may be selectively combined in this embodiment.
[0279] When the residual signal of the current block is obtained by intra prediction, the intra residual prediction unit 120 can use the residual signal of the neighboring block to predict the residual signal of the current block. After the residual signal is generated, the update of the residual signal is performed, so the "prediction" of the residual signal can be called "re-prediction" of the residual signal.
[0280] In step 1040 , the intra residual prediction unit 120 may provide functions related to prediction of the residual signal.
[0281] Reference Fig. 20 , step 1040 may include step 1041, step 1042, step 1046 and step 1047.
[0282] In step 1041 , the intra residual prediction unit 810 may determine whether to perform residual signal prediction.
[0283] When it is determined to perform residual signal prediction, step 1042 may be executed.
[0284] When it is determined not to perform residual signal prediction, step 1046 may be executed.
[0285] In step 1042 , the intra residual prediction unit 810 may perform prediction on the residual signal.
[0286] Step 1042 may include step 1043 , step 1044 , and step 1045 .
[0287] At step 1042, step 1043 and step 1044 may be performed. Step 1043 and step 1044 may be performed in a predefined order. For example, step 1043 may be performed before step 1044. Alternatively, step 1044 may be performed before step 1043.
[0288] In step 1043, the intra-frame residual prediction unit 810 may determine one of the one or more neighboring blocks of the current block as a first neighboring block. The first neighboring block may be a block used to predict the residual signal. Fig.36The determination of the neighboring blocks according to the embodiment is described in detail.
[0289] In step 1044, the intra prediction unit 120 may generate a second residual signal of the current block using intra prediction. The intra prediction unit 120 may generate the second residual signal of the current block based on the intra prediction mode for the current block and the reference sample.
[0290] The second residual signal may correspond to the residual signal of the current block in an existing image encoding and / or decoding technology (such as HEVC or AVC). For example, when generating the second residual signal, a residual signal generation method based on an existing image encoding and / or decoding technology (such as HEVC or AVC) may be used.
[0291] Will then refer to Fig.28 , Fig.29 and Fig.30 The generation of the second residual signal according to the embodiment is described in detail.
[0292] If it is determined to perform residual signal prediction, as a result of step 1043 and step 1044 being performed, step 1045 may be subsequently performed.
[0293] In step 1045 , the intra residual prediction unit 810 may generate a first residual signal of the current block through residual signal prediction.
[0294] The intra residual prediction unit 810 may perform residual signal prediction using the residual signal of the first neighboring block.
[0295] The intra residual prediction unit 810 may generate a first residual signal of the current block based on the second residual signal of the current block and the residual signal of the first neighboring block.
[0296] The first residual signal may be the difference between the second residual signal of the current block and the residual signal of the first neighboring block. Alternatively, the first residual signal may be the result of subtracting the residual signal of the first neighboring block from the second residual signal of the current block. The intra residual prediction unit 810 may generate the difference between the second residual signal of the current block and the residual signal of the first neighboring block as the first residual signal.
[0297] The first residual signal may be a residual signal of the current block generated via residual signal prediction. Alternatively, the first residual signal may be a residual signal of the current block generated based on a residual signal of a first neighboring block of the current block.
[0298] By applying residual signal prediction to the second residual signal generated in step 1044, more efficient encoding for the current block may be performed.
[0299] Will then refer to Fig.31The generation of the first residual signal according to an example is described in detail.
[0300] When it is determined not to perform residual signal prediction, in step 1046, the intra prediction unit 120 or the intra residual prediction unit 810 may generate a third residual signal of the current block.
[0301] The third residual signal may be a residual signal of the current block in an existing image encoding and / or decoding technology (such as HEVC or AVC). For example, when generating the third residual signal, a residual signal generation method based on an existing image encoding and / or decoding technology (such as HEVC or AVC) may be used.
[0302] In addition, the third residual signal may be the same signal as the second residual signal in step 1044. In other words, in step 1044 and step 1046, the same method may be used to generate the residual signal of the current block.
[0303] When step 1042 or step 1046 is executed, step 1047 may be executed.
[0304] In step 1047 , the intra residual prediction unit 810 may encode information related to residual signal prediction.
[0305] When residual signal prediction is performed, the intra residual prediction unit 810 may encode the information so that the information is subsequently referred to. Fig.21 The described decoding device 2300 can identify whether residual signal prediction has been performed. For example, when residual signal prediction has been used, the value of this information can be set to "1", and conversely, when residual signal prediction is not used, the value of this information can be set to "0".
[0306] For example, the intra prediction unit 120 may use a flag “intra_residual_predicition_flag” to indicate whether residual signal prediction has been performed, wherein the flag “intra_residual_prediction_flag” may indicate whether residual signal prediction has been performed.
[0307] Will refer to it again later Fig. 20 .
[0308] Step 1047 may include step 1048 and step 1049 .
[0309] In step 1048 , the intra residual prediction unit 810 may encode an identifier of the first neighboring block.
[0310] The identifier of the first neighboring block may be information capable of identifying a neighboring block used to predict a residual signal of the current block.
[0311] For example, the identifier of the first neighboring block may indicate a neighboring block among multiple neighboring blocks that is used to predict the residual signal of the current block. Alternatively, the identifier of the first neighboring block may be position information indicating the position of a neighboring block among multiple neighboring blocks that is used to predict the residual signal of the current block. The position of the neighboring block may indicate the position of the selected neighboring block relative to the current block. The position of the neighboring block may indicate the direction in which the selected neighboring block is adjacent to the current block.
[0312] The identifier of the first neighboring block may be configured to indicate the same block in both the encoding device 800 and the decoding device 2300. For example, regarding the identifier of the first neighboring block, the size N of the block and the position of the neighboring block must be the same as each other in the encoding device 800 and the decoding device 2300. In order for the encoding device 800 and the decoding device 2300 to share the same components of the identifier of the first neighboring block with each other, the identifier of the first neighboring block may be encoded using the "(neighboring residual index (idx) truncated unary)" scheme.
[0313] Step 1048 may be omitted. For example, when it is determined in step 1041 that residual signal prediction is not to be performed, step 1048 may be omitted.
[0314] In step 1049 , the intra residual prediction unit 810 may encode information indicating whether residual signal prediction has been performed.
[0315] At step 1047, step 1048 and step 1049 may be performed. Step 1048 and step 1049 may be performed in a predefined order. For example, step 1048 may be performed before step 1049. Alternatively, step 1049 may be performed before step 1048.
[0316] When step 1030 or step 1040 is performed, step 1050 may be subsequently performed.
[0317] In step 1050 , the encoding apparatus 800 may perform encoding of the current block using the residual signal of the current block. Step 1050 may be performed by at least one of the transform unit 130 , the quantization unit 140 , and the entropy encoding unit 150 .
[0318] In step 1050, the residual signal used to encode the current block may be one of the two residual signals.
[0319] When it is determined to perform residual signal prediction in step 1041, the first residual signal of the current block generated in step 1045 may be the residual signal used in step 1050. In other words, the residual signal generated via residual signal prediction may be used to encode the current block, and the encoding apparatus 800 may encode the current block using the first residual signal of the current block.
[0320] When it is determined not to perform residual signal prediction in step 1041 , the third residual signal of the current block generated in step 1046 may be the residual signal used in step 1050 .
[0321] Next, we will refer to Fig.21 .
[0322] Step 1050 may include step 1051 , step 1052 , and step 1053 .
[0323] In step 1051 , the transform unit 130 may generate a transform coefficient by performing a transform on the residual signal.
[0324] At step 1052 , quantization unit 140 may use the transform coefficients to generate quantized transform coefficient levels.
[0325] At step 1053 , the entropy encoding unit 150 may perform entropy encoding on the transform coefficient levels.
[0326] In the above-described steps related to the encoding of information, step 1023, step 1048, and step 1049 may be performed by one subject in an order different from the order described above. For example, step 1053 may include step 1023, step 1048, and step 1049. In addition, the entropy encoding unit 150 encodes at least one of the following items: information indicating whether an update of a reference sample has been performed, information indicating whether a residual signal prediction has been performed, and an identifier of a first neighboring block.
[0327] Proposed encoding method
[0328] In the above reference Fig.10 In the described embodiments, the encoding method can be classified into two methods. Each method is described below.
[0329] – First method: The first method may be a method for performing the following operations: using an existing method to generate reference samples for intra prediction, and improving the sample values of the reference samples generated using the existing method again according to the direction pattern of the neighboring samples. Here, the existing method may refer to the above reference Figure 1 A method for generating reference samples for intra prediction performed by the intra prediction unit 120 is described.
[0330] - Second method: The second method may be a method for reducing the energy of a residual signal by performing re-prediction of a residual signal using a residual signal of a neighboring block on a residual signal obtained through existing intra prediction. In other words, in the second method, re-prediction of the level of the residual signal may be performed. Here, the existing method may include a process for generating a prediction signal of a current block through spatial prediction of a reference sample and a process for obtaining a residual signal of the current block using the prediction signal, wherein these processes may be referred to above. Figure 1 The intra prediction unit 120 described above performs the above.
[0331] Classification of Embodiments
[0332] Reference above Fig.18 , Fig.19 , Fig. 20 and Fig.21 The described embodiments can be classified into three embodiments. Various embodiments will be described below.
[0333] -First embodiment: The first embodiment consists of Fig.18 Indicated by the thick black arrow in FIG. The first embodiment may include step 1010, step 1020, step 1030 and step 1050. The first embodiment updates the reference sample point, but may not predict the residual signal.
[0334] - Second embodiment: The second embodiment consists of Fig.18 The second embodiment may include step 1010, step 1020, step 1030, step 1040 and step 1050. The second embodiment may update the reference sample and predict the reference signal.
[0335] -Third embodiment: The third embodiment consists of Fig.18 The third embodiment may include step 1010, step 1030, step 1040 and step 1050. The third embodiment does not update the reference sample point, but may predict the residual signal.
[0336] The encoding device 800 may encode the current block using one of the first embodiment, the second embodiment, and the third embodiment. Optionally, the encoding device 800 may perform rate-distortion optimization on all three embodiments, and may select a method for deriving a minimum rate-distortion value from the three embodiments. For example, the encoding device 800 may selectively use each of step 1020 and step 1040 to derive a minimum rate-distortion value.
[0337] Updated unit for reference samples
[0338] In step 910, the intra prediction unit 120 may determine whether to perform an update of the reference sample for each predefined unit. The predefined unit may be at least one of: 1) an entire image sequence (ie, video), 2) a single image (ie, picture), 3) a slice, and 4) a coding unit.
[0339] For the predefined unit, the reference sample update information may be used to indicate whether the update of the reference sample has been performed. The reference sample update information may be information indicating whether the update of the reference sample has been performed for the predefined unit. For example, the value of the reference sample update information being a "first value" may indicate that the update of the reference sample has been performed when encoding the current block. The value of the reference sample update information being a "second value" may indicate that the update of the reference sample has not been performed when encoding the current block.
[0340] The encoding apparatus 800 may include the encoded residual signal prediction information in a bitstream. The decoding apparatus 2300 may use the residual signal prediction information to determine whether prediction of the residual signal for the current block has been performed.
[0341] In the following description, updating of reference samples for each predefined unit will be described below.
[0342] 1) Entire image sequence: Whether to perform an update on the reference samples may be determined for the entire image sequence. In this case, the sequence parameter set may include reference sample update information. When the reference sample update information of the sequence parameter set indicates that an update on the reference samples has been performed, the intra prediction unit 120 may perform intra prediction for the entire image sequence, wherein the intra prediction uses reference samples to which a directional gradient is applied.
[0343] 2) Single image: Whether to perform an update on the reference samples may be determined for each image. In this case, the picture parameter set may include reference sample update information. When the reference sample update information of the picture parameter set indicates that the reference samples have been updated, the intra prediction unit 120 may perform intra prediction for the entire image corresponding to the picture parameter set, wherein the intra prediction uses the reference samples to which the directional gradient is applied. Optionally, the intra prediction unit 120 may use a picture parameter set identifier (ID) specified in a slice header to identify whether an update on the reference samples has been performed.
[0344] 3) Slice: A single picture may be partitioned into a plurality of slice segments or a plurality of parallel blocks in a single slice segment. Whether to perform an update of the reference sample may be determined for each slice. In this case, the slice segment header may include reference sample update information. When the reference sample update information of the slice segment header indicates that the reference sample has been updated, the intra prediction unit 120 may perform intra prediction on the slice corresponding to the slice segment header, wherein the intra prediction uses the reference sample to which the directionality-based gradient is applied.
[0345] 4) Coding unit: Whether to perform an update on the reference sample may be determined for each coding unit. In this case, reference sample update information may exist for the coding unit. When the reference sample update information for the coding unit indicates that the reference sample has been updated, the intra prediction unit 120 may perform intra prediction on the coding unit corresponding to the reference sample update information, wherein the intra prediction uses the reference sample to which the directionality-based gradient is applied.
[0346] As described above, the reference sample update information may be encoded in a sequence parameter set, a picture parameter set or a slice header. Alternatively, the update information may be encoded for a coding unit.
[0347] Unit for residual signal prediction
[0348] Whether to perform residual signal prediction may be determined for a predefined unit (determined at step 930). The predefined unit may be at least one of: 1) an entire image sequence (ie, video), 2) a single image (ie, picture), 3) a slice, and 4) a coding unit.
[0349] The residual signal prediction information may be information indicating whether prediction of the residual signal has been performed for the predefined unit. For example, a value of the residual signal prediction information being a "first value" may indicate that residual signal prediction has been performed when encoding the current block. A value of the residual signal prediction information being a "second value" may indicate that residual signal prediction has not been performed when encoding the current block.
[0350] The encoding apparatus 800 may include the encoded residual signal prediction information in a bitstream. The decoding apparatus 2300 may use the residual signal prediction information to determine whether prediction of the residual signal for the current block has been performed.
[0351] In the following description, prediction of a residual signal for each predefined unit will be described.
[0352] 1) Entire image sequence: It may be determined whether to perform residual signal prediction for the entire image sequence. In this case, the sequence parameter set may include residual signal prediction information. When the residual signal prediction information of the sequence parameter set indicates that residual signal prediction has been performed, the intra residual prediction unit 810 may perform residual signal prediction for the entire image sequence.
[0353] 2) Single image: Whether to perform residual signal prediction may be determined for each image. In this case, the picture parameter set may include residual signal prediction information. When the residual signal prediction information of the picture parameter set indicates that residual signal prediction has been performed, the intra residual prediction unit 810 may perform residual signal prediction for the entire image corresponding to the picture parameter set.
[0354] 3) Slice: A single image may be partitioned into a plurality of slice segments or a plurality of parallel blocks in a single slice segment. Whether to perform residual signal prediction may be determined for each slice. In this case, the slice segment header may include residual signal prediction information. When the residual signal prediction information of the slice segment header indicates that residual signal prediction has been performed, the intra prediction unit 120 may perform residual signal prediction on the slice corresponding to the slice segment header.
[0355] 4) Coding unit: It may be determined for each coding unit whether to perform residual signal prediction. In this case, residual signal prediction information may exist for the coding unit. When the residual signal prediction information for the coding unit indicates that residual signal prediction has been performed, the intra residual prediction unit 810 may perform residual signal prediction on the coding unit corresponding to the residual signal prediction information.
[0356] As described above, the residual signal prediction information may be encoded in a sequence parameter set, a picture parameter set, or a slice segment header. In addition, the residual signal prediction information may be encoded for a coding unit.
[0357] Fig. 22 A current block and reference samples according to an example are shown.
[0358] The processing of the reference sample points which will be described later can be used to determine the value of the reference sample points before the reference sample points are updated, and can be used in the above-mentioned Fig.16 The described step 910 is previously performed by the intra prediction unit 120. In addition, the processing of the reference sample points described later may correspond to the above-mentioned reference Fig.18 Step 1010 is described.
[0359] exist Fig. 22 , a current block 1100 , an upper neighboring line 1110 , a left neighboring line 1120 , and an upper left sample point 1130 are drawn.
[0360] The reference samples of the current block 1100 may include an upper neighboring line 1110, a left neighboring line 1120, and an upper left sample 1130. Alternatively, the reference samples of the current block 1100 may be at least some of the upper neighboring line 1110, the left neighboring line 1120, and the upper left sample 1130. The intra prediction unit 120 may select at least some of the pixels of the upper neighboring line 1110, the left neighboring line 1120, and the upper left sample 1130 as reference samples according to an intra prediction mode for the current block.
[0361] The upper neighboring line 1110 may be a horizontal line adjacent to the top of the current block 1100. The left neighboring line 1120 may be a vertical line adjacent to the left end of the current block 1100. The upper left sample point 1130 may be a sample point adjacent to the upper left portion of the current block 1100.
[0362] The x coordinate of the leftmost sample point of the upper neighboring line 1100 may be the same as the x coordinate of the leftmost sample point of the current block 1100. When the size of the current block 1100 is N×N, the length of the upper neighboring line 1110 may be 2N. Here, N may be an integer 1 or greater. The upper neighboring line 1110 may include 2N×1 pixels.
[0363] The y coordinate of the uppermost sample point of the left neighboring line 1120 may be the same as the y coordinate of the uppermost pixel of the current block 1100. When the size of the current block 1100 is N×N, the length of the left neighboring line 1120 may be 2N. The left neighboring line 1120 may include 1×2N pixels.
[0364] The x coordinate of the upper left sample point 1130 may be a value obtained by subtracting 1 from the x coordinate of the leftmost pixel of the current block 1100. The y coordinate of the upper left sample point 1130 may be a value obtained by subtracting 1 from the y coordinate of the leftmost pixel of the current block 1100.
[0365] The samples described above may be used to perform intra prediction on the current block.
[0366] The reference samples used for intra prediction may have brightness values reconstructed via prediction and reconstruction, rather than brightness values of pixels of the original image. For example, before encoding the current block 1100, neighboring blocks of the current block 1100 may be encoded. Through prediction and reconstruction during the encoding process, brightness values of pixels in the neighboring blocks may be reconstructed. The reference samples may be some pixels in the neighboring blocks. In addition, the brightness values of the reference samples may be values before post-processing filtering is applied.
[0367] When there is no available reference sample near the current block 1100, the intra prediction unit 120 may perform reference sample filling, in which a sample closest to the current block 1100 among available neighboring samples (i.e., pixels) is used. By means of the reference sample filling, a luminance value of the reference sample may be generated.
[0368] The intra prediction unit 120 may perform reference sample filtering according to the size of the current block 1100 , the intra prediction mode, etc. to reduce a prediction error caused by a quantization error.
[0369] Fig.23 A method for updating reference samples considering horizontal gradients of neighboring blocks according to an example is shown.
[0370] exist Fig.23 In the diagram, circles may represent samples (or pixels), and solid rectangles may represent blocks.
[0371] exist Fig.23 , a current block 1210 , a reference sample block 1220 , a reference sample 1221 , and a neighboring block 1230 are depicted.
[0372] The current block is shown as a block having a size of 4×4. The size of a block may represent a width and a height of a corresponding block.
[0373] The reference sample block 1220 may be a block including the reference samples 1221 for the current block 1210. The reference sample block 1220 may be a block adjacent to the current block 1210 and having the same size as the current block 1210.
[0374] By updating the reference samples, the reference samples 1221 are shown to have values of I', J', K', and L', respectively. The illustrated reference samples may be samples constructed using a method for generating reference samples among neighboring samples according to an intra prediction mode in a current block.
[0375] exist Fig.23 , reference samples generated by the intra prediction unit 120 when the intra prediction mode for the current block 1210 is the horizontal prediction mode are depicted.
[0376] A dotted line in the neighboring block 1230 may indicate a horizontal line defined by the sample points in the neighboring block 1230. A thick solid line on the neighboring block 1230 may represent a gradient of the sample points included in the horizontal line. Represents the gradient value.
[0377] exist Fig.23 , an example is shown in which, in a horizontal line of sample points, the sample point values increase uniformly from left to right and then decrease uniformly.
[0378] The neighboring block 1230 may be a block that has been reconstructed before encoding and / or decoding of the current block 1210 .
[0379] The neighboring block used to update the reference sample may be different from the neighboring block used to perform intra-frame residual prediction on the current block. Fig.16 and Fig. 20 As described, the neighboring block used for intra residual prediction of the current block may be referred to as the first neighboring block. In addition, the neighboring block used for updating the reference sample may be referred to as the second neighboring block. The first neighboring block and the second neighboring block may be the same as or different from each other. In addition, the first neighboring block may include the second neighboring block, or the second neighboring block may include the first neighboring block.
[0380] For example, when the intra prediction mode is the horizontal prediction mode, the reference sample may be a sample adjacent to the left end of the current block 1210. Alternatively, the reference sample may be a sample in a vertical line adjacent to the left end of the current block 1210. The reference sample block 1220 may be a block adjacent to the left end of the current block 1210. In addition, the neighboring block 1230 may be a block for adding an upper neighboring block of the current block 1210 and an upper left neighboring block of the current block 1210 to each other. The upper neighboring block of the current block 1210 may be a block adjacent to the top of the current block 1210. The upper left neighboring block of the current block 1210 may be a block adjacent to the upper left portion of the current block 1210. The upper neighboring block and the upper left neighboring block may be adjacent to each other.
[0381] When the size of the current block 1210 is N×N, the size of each of the upper neighboring block and the upper left neighboring block may be N×N, and the size of the neighboring block 1230 may be 2N×N. Fig.23 In , the size of the neighboring block is shown to be 8×4.
[0382] Furthermore, when the size of the current block 1210 is N×N, the size of each of the upper and upper left neighboring blocks may be aN×bN, and the size of the neighboring block 1230 may be 2aN×bN. Here, “a” and “b” may be real numbers, respectively.
[0383] Furthermore, each of the above neighboring block, the above-left neighboring block, and the neighboring block 1230 may have a predefined size or a size determined according to a predefined scheme.
[0384] The intra prediction unit 120 of the encoding device 800 and the intra prediction unit 240 of the decoding device 2300, which will be described later, can use the upper neighboring block, the upper left neighboring block, and the neighboring block having the same size. The encoding device 800 can set the size of each of the upper neighboring block, the upper left neighboring block, and the neighboring block 1230. The size of the upper neighboring block, the size of the upper left neighboring block, and the size of the neighboring block 1230 must be used equally in the decoding device 2300. The set size can be transmitted from the encoding device 800 to the decoding device 2300 through a bitstream.
[0385] The updating of reference samples can be considered as the reconstruction of neighboring reference samples of the current block used for intra prediction.
[0386] When intra prediction is performed on the second neighboring block, the current block may also have a texture with a directionality similar to that of the texture of the second neighboring block according to the spatial correlation. To reflect this directionality, the intra prediction unit 120 may update the value of the reference sample required for intra prediction before performing intra prediction for the current block.
[0387] The intra prediction unit 120 may improve the reference samples by using a directional gradient pattern based on the directionality of the second neighboring block so that the reference samples become similar to samples in the current block.
[0388] In the above reference Fig.16 Step 915 described above and referenced above Fig.19 In step 1022 described above, the intra prediction unit 120 may detect the gradient pattern of the second neighboring block and calculate the gradient. Fig.24 A gradient pattern detection method according to an example is described in detail.
[0389] In the above reference Fig.16 Step 915 described above with reference to Fig.19 In the described step 1022, the intra prediction unit 120 may detect the gradient pattern of the row in the second neighboring block. The intra prediction unit 120 may check whether the multiple gradient patterns of the multiple rows in the second neighboring block are the same as each other. When the multiple gradient patterns of the multiple rows in the second neighboring block are the same as each other, the intra prediction unit 120 may calculate the gradient of the second neighboring block. Here, the gradient of the second neighboring block may be the gradient of a single selected row in the second neighboring block. For example, the gradient of the second neighboring block may be the gradient of a row adjacent to the current block 1210 among the multiple rows in the second neighboring block. The intra prediction unit 120 may determine the gradient of the row adjacent to the current block 1210 among the multiple rows in the second neighboring block as the final gradient of the second neighboring block.
[0390] In addition, in steps 915 and 1022, the intra prediction unit 120 may determine or update the value of the reference sample based on the neighboring block of the current block. The intra prediction unit 120 may determine or update the value of the reference sample based on the gradient pattern of the second neighboring block.
[0391] The value of the reference sample may be changed from a value before updating to a value after updating by the intra prediction unit 120, and the value of the reference sample before updating may be a value generated when the reference sample block 1220 including the reference sample is predicted and reconstructed. In other words, when the reference sample block 1220 is predicted and reconstructed, the value of the reference sample may be determined, and when the reference sample is updated, this value may be used as the value before updating. When predicting and reconstructing the reference sample, a prediction and reconstruction method based on an existing image encoding and / or decoding technology (such as HEVC or AVC) may be used.
[0392] Once the gradient is calculated, the intra prediction unit 120 can use a predefined method to determine or update the value of the reference sample.
[0393] For example, when the intra prediction mode is the horizontal prediction mode, the intra prediction unit 120 may determine or update the value of the reference sample using the following Equation 2:
[0394] [Equation 2]
[0395]
[0396]
[0397]
[0398]
[0399] Wherein, f represents a function. w represents a weight. I represents the value of the topmost sample point in the reference sample points 1221 before updating. I' represents the value of the topmost sample point after updating. J, K and L represent the values of the corresponding reference sample points before updating, and J', K' and L' represent the values of the corresponding reference sample points after updating.
[0400] As described in Equation 2, the intra prediction unit 120 may generate improved reference samples I', J', K', and L' by applying the gradient-based subtraction to the previous reference samples I, J, K, and L. In addition, when updating the values of the reference samples, the intra prediction unit 120 may consider the weight factor w. The intra prediction unit 120 may generate improved reference samples I', J', K', and L' by applying the gradient-based subtraction to the previous reference samples I, J, K, and L. In addition, when updating the values of the reference samples, the intra prediction unit 120 may consider the weight factor w. The value of the corresponding reference point is updated by multiplying the determined value by the predefined weight factor w. By this updating method, the value of the reference point can be reduced by
[0401] There may be a plurality of reference samples. The weight factors w may be the same between the plurality of reference samples. Alternatively, the weight factors w may be different between the plurality of reference samples. For example, the weight factors w may be different for each position in the plurality of reference samples. The position of each reference sample may be a position relative to the current block 1210.
[0402] The intra prediction unit 120 may combine the reference sample updating method described above with the existing method. Fig.18 When updating the reference sample described above, in step 1010, the intra prediction unit 120 may not use the reference sample to perform padding. Fig.18 When updating the reference samples as described above, at step 1020, the intra prediction unit 120 may not perform smoothing using a low pass filter.
[0403] Fig.24 A method for obtaining a gradient pattern according to an example is shown.
[0404] As mentioned above Fig.13 As described, the second neighboring block may be selected based on the position of the current block. For example, the intra prediction unit 120 may select a block located at a predefined position as the second neighboring block according to the intra prediction mode among the blocks reconstructed based on the position of the current block. In addition, the intra prediction unit 120 may analyze the gradient pattern of the selected second neighboring block.
[0405] As mentioned above Fig.23 As described, the size of the second neighboring block may be determined based on the size of the current block. For example, when the size of the current block is N×N, the size of the second neighboring block may be 2N×N. The encoding device 800 may set the size of the second neighboring block. This set size must also be used equally in the decoding device 2300. The set size may be sent from the encoding device 800 to the decoding device 2300 via a bitstream.
[0406] exist Fig.24 In , the second neighboring block is shown as a single line. The single line can be a row or a column in the neighboring block. Fig.23 In , the size of the second neighboring block is shown to be 8×4. Fig.24 , the single line of the second neighboring block is shown as 8×1.
[0407] The intra prediction unit 120 may calculate one or more sample gradients for each line. Each of the one or more sample gradients may be a gradient between two adjacent sample points in the line. Since a single line may include multiple sample points, the intra prediction unit 120 may obtain multiple sample gradients for the single line. As an example of one or more sample gradients, Fig.24 Draw in and For example, It may be the gradient between the first sample point and the second sample point on the single line.
[0408] The intra prediction unit 120 may calculate one or more sample gradients for each line in the second neighboring block.
[0409] The intra prediction unit 120 may calculate the line gradient based on one or more sample gradients. For example, the line gradient may be 1) a median of one or more sample gradients, 2) an average of one or more sample gradients, or 3) a predefined representative value of one or more sample gradients.
[0410] The predefined representative value may always have a positive value.
[0411] When the median of one or more sample point gradients is used as the line gradient, the following Equation 3 may be used.
[0412] [Equation 3]
[0413]
[0414] in, Can represent line gradients.
[0415] When calculating line gradients, the intra prediction unit 120 may apply a weight to one or more sample gradients for each sample gradient.
[0416] Through the above-described scheme, the intra prediction unit 120 may calculate one or more line gradients for one or more lines in the second neighboring block.
[0417] When calculating the line gradient, the intra prediction unit 120 may calculate the gradient of the second neighboring block based on the one or more line gradients. For example, the gradient of the second neighboring block may be 1) a median of the one or more line gradients, 2) an average of the one or more line gradients, or 3) a predefined representative value of the one or more line gradients. Alternatively, when calculating the gradient of the second neighboring block, the intra prediction unit 120 may apply a weight to the one or more line gradients for each line gradient.
[0418] The calculated gradient of the second neighboring block may be used as a final gradient for updating the reference sample.
[0419] For example, Fig.24 As shown in , when the sample gradient of the line increases and then decreases, it can be generated from the previous Fig.23 The reference samples I, J, K and L of the reference sample 1221 of the current block 1210 are subtracted from the respective line gradients to obtain updated sample values I′, J′, K′ and L′.
[0420] As described above regarding the sample gradient, line gradient, and gradient of the second neighboring block, the intra prediction unit 120 may determine the value of the reference sample based on a gradient value between two neighboring reference samples among a plurality of reference samples belonging to a row in the second neighboring block.
[0421] Alternatively, the intra prediction unit 120 may use the line gradient of a single line as the gradient of the reference sample corresponding to the line. For example, a line and a reference sample having the same relative position may correspond to each other. In another example, the intra prediction unit 120 may use the line gradient of the uppermost line among the one or more lines to update the uppermost reference sample among the one or more reference samples. Alternatively, the intra prediction unit 120 may use the line gradient of a line adjacent to the current block 1210 among the one or more lines to update the reference sample.
[0422] When calculating the gradient of the second neighboring block, the intra prediction unit 120 may select some lines of all the lines of the second neighboring block. The intra prediction unit 120 may calculate the gradient of the second neighboring block using the line gradient of the selected line. The intra prediction unit 120 may select a line located at a predefined position or a predefined number of lines from among all the lines of the second neighboring block. The intra prediction unit 120 may set a scheme for selecting only some lines from among all the lines of the second neighboring block. The set scheme may be sent from the encoding device 800 to the decoding device 2300 through a bitstream.
[0423] When calculating the line gradient of a line, the intra prediction unit 120 may select only some samples from among all the samples in the corresponding line. In other words, one or more sample gradients of each line do not necessarily need to be calculated for all the samples in the corresponding line. The intra prediction unit 120 may calculate the gradients around Fig.23 . For example, the intra prediction unit 120 may calculate one or more sample point gradients of the corresponding line for the sample points on the left side of each line, and may calculate the line gradient based on the calculated one or more sample point gradients. In addition, the intra prediction unit 120 may calculate one or more sample point gradients of the corresponding line for the sample points on the right side of each line, and may calculate the line gradient based on the calculated one or more sample point gradients.
[0424] The intra prediction unit 120 may calculate one or more sample gradients of the corresponding line for samples selected from among the samples in each line according to a predefined scheme, and may calculate the line gradient based on the calculated one or more sample gradients. When the line gradient is calculated, the size of the line (or the number of samples) may be greater than or less than the width 2N of the second neighboring block. The intra prediction unit 120 may calculate the line gradient of the line using sample gradients between some selected samples. The intra prediction unit 120 may select samples located at a predefined position or a predefined number of samples from among all the samples in the line. The intra prediction unit 120 may set a scheme for selecting only some samples from among all the samples in the corresponding line. The set scheme may be transmitted from the encoding device 800 to the decoding device 2300 through a bitstream.
[0425] The intra prediction unit 120 may select some reference samples to which the update is to be applied from among all reference samples of the current block. The intra prediction unit 120 may select the number of reference samples to which the update is to be applied from among all reference samples of the current block. For example, the intra prediction unit 120 may update only Fig.23 Some reference sample points in the reference sample points 1221.
[0426] The intra prediction unit 120 may select some reference samples to which the update is to be applied from among all reference samples of the current block according to the properties of the current block. In addition, the intra prediction unit 120 may select the number of reference samples to which the update is to be applied from among all reference samples of the current block according to the properties of the current block.
[0427] For example, the property of the current block may be the size of the current block. The intra prediction unit 120 may select some reference samples to which the update is to be applied from among all reference samples of the current block using different schemes according to the size of the current block.
[0428] For example, considering a case where the size of the current block is relatively large (e.g., 16×16 or 32×32), as the size of the current block increases, the number of reference samples of the current block may increase. When the number of reference samples becomes larger, the correlation with the directionality-based gradient pattern may be relatively reduced. In this case, the encoding apparatus 800 may determine the number of reference samples to be updated based on the gradient.
[0429] A scheme for selecting some reference samples to which the update is applied from among the reference samples and the number of some reference samples to which the update is applied from among the reference samples may be transmitted from the encoding apparatus 800 to the decoding apparatus 2300 through a bitstream.
[0430] Fig.25 A method for updating reference samples considering vertical gradients of neighboring blocks according to an example is shown.
[0431] exist Fig.25 In the diagram, circles may represent samples (or pixels), and solid rectangles may represent blocks.
[0432] exist Fig.25 , a current block 1410 , a reference sample block 1420 , a reference sample 1421 , and a neighboring block 1430 are depicted.
[0433] The current block is shown as a block having a size of 4 x 4. The size of a block may represent the width and height of the block.
[0434] The reference sample block 1420 may be a block including the reference samples 1421 for the current block 1410. The reference sample block 1420 may be a block adjacent to the current block 1410 and having the same size as the current block 1410.
[0435] By updating the reference samples, the reference samples 1421 are shown to have values A', B', C' and D', respectively. The illustrated reference samples may be samples constructed using a method for generating reference samples among neighboring samples near a current block according to an intra prediction mode.
[0436] exist Fig.25 , reference samples generated by the intra prediction unit 120 when the intra prediction mode for the current block 1310 is the vertical prediction mode are shown.
[0437] The dotted lines in the neighboring block 1430 may represent vertical lines of pixels in the neighboring block 1430. The thick solid lines in the neighboring block 1430 may represent gradients of samples included in the respective vertical lines. Can represent gradient values.
[0438] exist Fig.25 , an example is shown in which, in a vertical line of sample points, the sample point values uniformly increase from top to bottom and then uniformly decrease.
[0439] The neighboring block 1430 may be a block that has been reconstructed before encoding and / or decoding of the current block 1410 .
[0440] The neighboring block used to update the reference sample may be different from the neighboring block used to perform intra-frame residual prediction on the current block. Fig.16 As described, the neighboring block used for intra residual prediction of the current block may be referred to as the first neighboring block. In addition, the neighboring block used for updating the reference sample may be referred to as the second neighboring block. The first neighboring block and the second neighboring block may be the same as or different from each other. In addition, the first neighboring block may include the second neighboring block, or the second neighboring block may include the first neighboring block.
[0441] For example, when the intra prediction mode is a vertical prediction mode, the reference sample may be a sample adjacent to the top of the current block 1410. Alternatively, the reference sample may be a sample in a horizontal line adjacent to the top of the current block 1210. The reference sample block 1420 may be a block adjacent to the top of the current block 1410. In addition, the neighboring block 1430 may be a block for adding a left neighboring block of the current block 1410 and an upper left neighboring block of the current block 1410 to each other. The left neighboring block of the current block 1410 may be a block adjacent to the left end of the current block 1410. The upper left neighboring block of the current block 1410 may be a block adjacent to the upper left portion of the current block 1410. The left neighboring block and the upper left neighboring block may be adjacent to each other.
[0442] When the size of the current block 1410 is N×N, the size of each of the left neighboring block and the upper left neighboring block may be N×N, and the size of the neighboring block 1430 may be N×2N. Fig. 22 In , the size of the neighboring blocks is shown to be 8×4.
[0443] Furthermore, when the size of the current block 1410 is N×N, the size of each of the upper neighboring block and the upper left neighboring block may be aN×bN, and the size of the neighboring block 1430 may be aN×2bN. Here, “a” and “b” may be real numbers, respectively.
[0444] Furthermore, each of the above neighboring block, the above-left neighboring block, and the neighboring block 1430 may have a predefined size or a size determined according to a predefined scheme.
[0445] The intra prediction unit 140 of the encoding device 800 and the intra prediction unit 240 of the decoding device 2300, which will be described later, can use the upper neighboring block, the upper left neighboring block, and the neighboring block having the same size. The encoding device 800 can set the size of each of the upper neighboring block, the upper left neighboring block, and the neighboring block 1430. The size of the upper neighboring block, the size of the upper left neighboring block, and the size of the neighboring block 1430 must be used equally in the decoding device 2300. The set size can be transmitted from the encoding device 800 to the decoding device 2300 through a bitstream.
[0446] The updating of the reference samples can be considered as the reconstruction of the neighboring reference samples of the current block used for intra prediction.
[0447] When intra prediction is performed on the second neighboring block, the current block may also have a texture with a directionality similar to that of the texture of the second neighboring block according to the spatial correlation. To reflect this directionality, the intra prediction unit 120 may update the value of the reference sample required for intra prediction before performing intra prediction for the current block.
[0448] The intra prediction unit 120 may update the reference samples by using a directional gradient pattern based on the directionality of the second neighboring block so that the reference samples become similar to the samples in the current block.
[0449] In the above reference Fig.16 Step 915 described above and referenced above Fig.19 In described step 1022 , the intra prediction unit 120 may detect a gradient pattern of the second neighboring block and may calculate a gradient.
[0450] In the above reference Fig.16 Step 915 described above and referenced above Fig.19 In the described step 1022, the intra prediction unit 120 may detect multiple gradient patterns of multiple columns in the second neighboring block. The intra prediction unit 120 may check whether the multiple gradient patterns of multiple columns in the second neighboring block are the same as each other. When the multiple gradient patterns of multiple columns in the second neighboring block are the same as each other, the intra prediction unit 120 may calculate the gradient of the second neighboring block. Here, the gradient of the second neighboring block may be the gradient of a single selected column in the second neighboring block. For example, the gradient of the second neighboring block may be the gradient of a column adjacent to the current block 1410 among the multiple columns in the second neighboring block. The intra prediction unit 120 may determine the gradient of the column adjacent to the current block 1410 among the multiple columns in the second neighboring block as the final gradient of the second neighboring block.
[0451] In addition, in steps 915 and 1022, the intra prediction unit 120 may determine or update the value of the reference sample based on the neighboring block of the current block. The intra prediction unit 120 may determine or update the value of the reference sample based on the gradient pattern of the second neighboring block.
[0452] The value of the reference sample may be changed from a value before updating to a value after updating by the intra prediction unit 120, and the value of the reference sample before updating may be a value generated when the reference sample block 1420 including the reference sample is predicted and reconstructed. In other words, when the reference sample block 1420 is predicted and reconstructed, the value of the reference sample may be determined, and when the reference sample is updated, this value may be used as the value before updating. When predicting and reconstructing the reference sample, a prediction and reconstruction method based on an existing image encoding and / or decoding technology (such as HEVC or AVC) may be used.
[0453] Once the gradient The intra prediction unit 120 may use a predefined method to determine or update the value of the reference sample.
[0454] For example, when the intra prediction mode is the vertical prediction mode, the intra prediction unit 120 may determine or update the value of the reference sample using the following Equation 4:
[0455] [Equation 4]
[0456]
[0457]
[0458]
[0459]
[0460] Wherein, f represents a function. w represents a weight. A represents the value of the topmost sample point in the reference sample points 1421 before updating. A' represents the value of the topmost sample point after updating. B, C and D represent the values of the corresponding reference sample points before updating, and B', C' and D' represent the values of the corresponding reference sample points after updating.
[0461] As described in Equation 4, the intra prediction unit 120 may generate improved reference samples A', B', C', and D' by applying the gradient-based subtraction to the previous reference samples A, B, C, and D. In addition, when updating the values of the reference samples, the intra prediction unit 120 may consider the weight factor w. The intra prediction unit 120 may generate improved reference samples A', B', C', and D' by applying the gradient-based subtraction to the previous reference samples A, B, C, and D. In addition, when updating the values of the reference samples, the intra prediction unit 120 may consider the weight factor w. The value of the corresponding reference sample is updated by adding the product of the determined value and the predefined weight factor w to the value of the reference sample before the update.
[0462] There may be a plurality of reference samples. The weight factors w may be the same between the plurality of reference samples. Alternatively, the weight factors w may be different between the plurality of reference samples. For example, the weight factors w may be different for each position in the plurality of reference samples. The position of each reference sample may be a position relative to the current block 1410.
[0463] The intra prediction unit 120 may combine the above-described reference sample updating method with the existing method. Fig.18 When updating the reference sample described above, in step 1110, the intra prediction unit 120 may not use the reference sample to perform padding. Fig.18 When updating the reference samples as described above, at step 1020, the intra prediction unit 120 may not perform smoothing using a low pass filter.
[0464] Types of Gradient Patterns
[0465] Reference above Figure 23 to Figure 25The described directionality-based gradient patterns may be classified into predefined types. For example, the type of gradient pattern may include at least one of the following: 1) increase, 2) decrease, 3) increase and saturation, 4) decrease and saturation, 5) saturation and increase, 6) saturation and decrease, 7) symmetrical increase and decrease, and 8) symmetrical decrease and increase. In the following description, the above types will be described.
[0466] 1) "Increase" refers to a gradient pattern in which the value of a sample point increases according to a direction. The direction may be from left to right. Alternatively, the direction may be from top to bottom.
[0467] 2) “Decrease” may represent a gradient pattern in which the values of the sample points decrease according to a direction.
[0468] 3) “Increase and saturation” may mean a gradient pattern in which the value of a sample point increases in a front portion according to a direction and is maintained at a constant value in a rear portion.
[0469] 4) “Decrease and saturate” may mean a gradient pattern in which the value of a sample point decreases in a front portion according to a direction and is maintained at a constant value in a rear portion.
[0470] 5) “Saturation and increase” may mean a gradient pattern in which the value of a sample point is maintained at a constant value in a front portion and increases in a rear portion according to a direction.
[0471] 6) “Saturation and decrease” may mean a gradient pattern in which the value of a sample point is maintained at a constant value in a front portion and decreases in a rear portion according to a direction.
[0472] 7) “Increases and decreases symmetrically” may mean a left-right symmetrical gradient pattern in which the values of the sample points increase in the front part and decrease in the rear part according to the direction.
[0473] 8) “Decreases and increases symmetrically” may mean a left-right symmetrical gradient pattern in which the values of the sample points decrease in the front part and increase in the rear part according to the direction.
[0474] The "increase" described above may be a constant increase or a non-constant increase. In addition, the "decrease" described above may be a constant decrease or a non-constant decrease.
[0475] The intra prediction unit 120 may determine the value of the reference sample according to the type of the gradient pattern of the second neighboring block of the current block. For example, when the gradient pattern is one of an "increase" pattern, a "decrease" pattern, an "increase and saturation" pattern, a "decrease and saturation" pattern, a "saturation and increase" pattern, and a "saturation and decrease" pattern, the intra prediction unit 120 may determine the value of the reference sample based on the gradient value of the "increase" line or the "decrease" line.
[0476] When the type of the gradient pattern is a "symmetric" pattern, the intra prediction unit 120 may determine the value of the reference sample based on the gradient values of the two lines forming the symmetric gradient pattern. Fig. 22 As described, when the type of gradient pattern is "symmetric increase and decrease", the update given in Equation 2 may be applied. For example, the intra prediction unit 120 may calculate the value of the reference sample before the update by subtracting the value based on the gradient The value of each reference sample is updated by multiplying the determined value by the predefined weight w. By this update, the value of the reference sample can be reduced by For example, as mentioned above Fig.24 As described above, when the type of gradient pattern is "symmetrical decrease and increase", the update of Equation 3 may be applied. For example, the intra prediction unit 120 may calculate the gradient-based The value of the reference sample is updated by adding the product of the determined value and the predefined weight w to the value of the reference sample before the update.
[0477] Using encoding parameters to detect gradient patterns
[0478] In addition to the above-described embodiments, the intra prediction unit 120 may use coding parameters to detect gradient patterns. For example, the coding parameters may include 1) syntax predefined in relation to intra prediction, 2) coding variables, 3) current coding unit, 4) prediction unit, 5) size of transform unit, and 6) whether the coding unit is partitioned or not partitioned. For example, the intra prediction unit 120 may use coding parameters to determine values associated with neighboring blocks. The neighboring blocks may be the above referenced Fig.23 The neighboring block 1230 described above or with reference to Fig.25 The neighboring block 1430 described. The value associated with the neighboring block may include the size of the neighboring block. The intra-frame prediction unit 120 may use the encoding parameters to determine the gradient of the neighboring block. The intra-frame prediction unit 120 may use the encoding parameters to determine the range of the reference value to which the update will be applied. In addition, the intra-frame prediction unit 120 may use the encoding parameters to determine the weighting factor.
[0479] Extended use of gradients
[0480] The intra prediction unit 120 may apply the gradient of the neighboring block to the pixel value of the prediction block instead of the reference sample. The intra prediction unit 120 may fix the value of the reference sample and may update the pixel value of the prediction block using the gradient of the neighboring block. Since the pixel value of the prediction block is directly updated, the same effect as that obtained when the value of the reference sample is updated may be obtained.
[0481] In the above-described embodiments, the updating of reference samples performed according to the gradient of the neighboring blocks may also be applied to the prediction block in the same manner. For example, the updating performed on the reference samples in a row may also be applied to each of the multiple rows of the prediction block in the same manner. Alternatively, for example, the updating performed on the reference samples in a column may also be applied to each of the multiple columns of the prediction block in the same manner. The intra-prediction unit 120 may also use the coding parameters to update the prediction block in the same manner as that used to update the reference samples. In other words, the intra-prediction unit 120 may update the pixel values of the prediction block based on the coding parameters.
[0482] Fig.26 Intra prediction with 33 angular modes according to an example is shown.
[0483] Fig. 27 Intra prediction with 65 angular modes according to an example is shown.
[0484] In the above reference Fig.16 Step 920 described above and with reference to Fig.18 In step 1030, the intra prediction unit 120 may generate a prediction block of the current block by performing intra prediction on the current block. When performing intra prediction on the current block, the intra prediction unit 120 may use the updated (or improved) reference samples. The intra prediction unit 120 may use the updated (or improved) reference samples to generate a prediction block of the current block.
[0485] The intra prediction unit 120 may configure neighboring reference samples for the current block by updating the reference samples described above. The intra prediction unit 120 may generate one or more prediction blocks of the current block in one or more intra modes. The one or more intra predictions may have an angular mode.
[0486] The intra prediction unit 120 may determine a prediction block having a minimum rate-distortion value among one or more prediction blocks. The intra prediction unit 120 may select an intra mode corresponding to the prediction block as a final intra prediction mode. Alternatively, the intra prediction unit 120 may select an intra mode that generates a prediction block having a minimum rate-distortion value as a final intra prediction mode.
[0487] exist Fig.26 In FIG. 1 , an intra mode with 33 angle modes is shown. Fig. 27 , an intra-mode with 65 angular modes is shown. In addition, mode 0 may represent a planar mode. Mode 1 may represent a DC mode.
[0488] Fig.28 An image region according to an embodiment is shown.
[0489] exist Fig.28, a portion 1600 of an image is depicted. The portion 1600 of the image may include a current block 1610, a neighboring block 1620, a reconstructed area 1630, a neighboring block reference sample 1631, and a current block reference sample 1632.
[0490] The neighboring block reference sample 1631 may be a reference sample for performing intra prediction on the neighboring block. The current block reference sample 1632 may be a reference sample for performing intra prediction on the current block.
[0491] The sample value of the neighboring block reference sample 1631 may be an updated value when the updating of the reference sample is performed for the neighboring block 1620 in steps 915 and 1022 .
[0492] The sample value of the current block reference sample 1632 may be an updated value when updating of the reference sample is performed for the current block 1610 in steps 915 and 1022 .
[0493] Fig.28 The current block 1610, the neighboring block 1620, the neighboring block reference sample 1631, and the current block reference sample 1632 shown in FIG. 16 may represent relative positions when the intra prediction mode of the neighboring block 1620 and the intra prediction mode of the current block 1610 are both vertical prediction modes. For example, when the intra prediction mode is a vertical prediction mode, Fig.16 and Fig. 20 The first neighboring block described in the above may be a block adjacent to the left end of the current block. The current block reference sample may be a pixel in a horizontal line adjacent to the top of the current block. In addition, the neighboring block reference sample may be a pixel in a horizontal line adjacent to the top of the neighboring block.
[0494] Fig.29 A method for calculating residual signals of neighboring blocks according to an example is shown.
[0495] exist Fig.29 In FIG. 1 , a neighboring block 1710, a predicted block 1720 of the neighboring block, and a residual signal 1730 of the neighboring block are shown. Fig.29 In the form of a determinant, the “Intra 邻近块_残差信号 ”.
[0496] The neighboring block 1710 can be referred to above Fig.16 and Fig. 20 Optionally, the neighboring block 1710 may correspond to the first neighboring block described above. Fig.28 The described neighboring block 1620 corresponds.
[0497] The residual signal can be compared with the above Fig.16 and Fig. 20 The described “residual signal of the first neighboring block” corresponds.
[0498] like Fig.29 As shown in , the residual signal 1730 may be the difference between the neighboring block 1710 and the prediction block 1720. Alternatively, the residual signal 1730 may be the result of subtracting the prediction block 1720 from the neighboring block 1710.
[0499] The value of the prediction block 1720 may be determined based on the intra prediction mode of the neighboring block 1710 .
[0500] For example, Fig.29 As shown in , when the intra prediction mode of the neighboring block 1710 is a vertical prediction mode, the values of the respective rows in the prediction block 1720 may be the values of the reference pixels in the neighboring block 1710. In other words, when the intra prediction mode of the neighboring block 1710 is a vertical prediction mode, the values of the respective rows in the prediction block 1720 may be the values of the pixels in the horizontal line adjacent to the top of the neighboring block 1710.
[0501] Alternatively, when the intra prediction mode of the neighboring block 1710 is a horizontal prediction mode, the values of each column in the prediction block 1720 may be the values of the reference samples in the neighboring block 1710. In other words, when the intra prediction mode of the neighboring block 1710 is a horizontal prediction mode, the values of each column in the prediction block 1720 may be the values of the pixels in the vertical line adjacent to the left end of the neighboring block 1710.
[0502] In addition to the vertical prediction mode and the horizontal prediction mode, in other intra prediction modes, a prediction block generation method based on an existing image encoding and / or decoding technology (such as HEVC or AVC) may be used.
[0503] Fig.30 A method for calculating a residual signal of a current block according to an example is shown.
[0504] exist Fig.30 In FIG. 1 , a current block 1810, a prediction block 1820 of the current block, and a residual signal 1830 of the current block are depicted. Fig.30 Intra as the residual signal of the current block is described in the form of a determinant. 当前块_残差信号 .
[0505] The current block 1810 can be compared with the above reference Fig.16 and Fig.18 Optionally, the current block 1810 may correspond to the current block described above. Fig.28 The current block 1610 described corresponds.
[0506] The residual signal 1830 can be compared with the above reference Fig.16 and Fig. 20 The described “second residual signal of the current block” corresponds.
[0507] like Fig.30 As shown in , the residual signal 1830 may be the difference between the current block 1810 and the prediction block 1820. Alternatively, the residual signal 1830 may be the result of subtracting the prediction block 1820 from the current block 1810.
[0508] Reference Fig.30 , the sum of the values in the residual signal 1830 is 560. In other words, the sum of the levels of the residual signal 1830 is 560.
[0509] The value of the prediction block 1820 may be determined based on the intra prediction mode of the current block 1810 .
[0510] For example, Fig.30 As shown in , when the intra prediction mode of the current block 1810 is a vertical prediction mode, the values of each row in the prediction block 1820 may be the values of the reference pixels in the neighboring block. In other words, when the intra prediction mode of the current block 1810 is a vertical prediction mode, the values of each row in the prediction block 1820 may be the values of the pixels in the horizontal line adjacent to the top of the current block 1810.
[0511] Alternatively, when the intra prediction mode of the current block 1810 is a horizontal prediction mode, the values of each column in the prediction block 1820 may be the values of reference samples in a neighboring block. In other words, when the intra prediction mode of the current block 1810 is a horizontal prediction mode, the values of each column in the prediction block 1820 may be the values of pixels in a vertical line adjacent to the left end of the current block 1810.
[0512] Reference Fig.30 The method described for calculating the residual signal 1830 of the current block 1810 may correspond to the method described above with reference to Fig.16 Step 940 described above and in reference to Fig. 20 The described step 1045 is to generate a second residual signal of the current block.
[0513] In addition, refer to Fig.30 The described method for calculating the residual signal 1830 of the current block 1810 may correspond to the generation of the third residual signal of the current block at steps 940 and 1045 .
[0514] The following will refer to Fig.31 A residual signal generated after predicting the residual signal according to an embodiment is described in detail.
[0515] Fig.31 A residual signal prediction method according to an example is shown.
[0516] exist Fig.31In FIG. 1 , a residual signal 1910 of a current block, a residual signal 1920 of a neighboring block, and a prediction residual signal 1930 of a current block are shown. Fig.31 Intra, which is the prediction residual signal of the current block, is described in the form of a determinant. 预测残差信号 .
[0517] Fig.31 Can be shown in Fig.16 Step 950 and in Fig. 20 The prediction of the residual signal in step 1042.
[0518] The residual signal 1910 of the current block may correspond to the above reference Fig.30 The residual signal 1830 of the current block described above. Optionally, the residual signal 1910 of the current block may correspond to the residual signal 1830 of the current block described above. Fig.16 and Fig. 20 The “second residual signal of the current block” described.
[0519] The residual signal 1920 of the neighboring block may correspond to the above reference Fig.29 The residual signal 1730 of the neighboring block described above. Optionally, the residual signal 1920 of the neighboring block may correspond to Fig.16 and Fig. 20 The “residual signal of the first neighboring block” described.
[0520] The prediction residual signal 1930 of the current block may correspond to the above reference Fig.16 and Fig. 20 The “first residual signal of the current block” described.
[0521] The prediction residual signal 1930 may be a difference between the residual signal 1910 of the current block and the residual signal 1920 of the neighboring block. Alternatively, the prediction residual signal 1930 may be a result of subtracting the residual signal 1920 of the neighboring block from the residual signal 1910 of the current block.
[0522] The sum of the values of the prediction residual signal 1930 is 267. In other words, the sum of the levels of the prediction residual signal 1930 is 267. Through the prediction of the residual signal, the sum of the levels of the final residual signal of the current block is reduced from 560 to 269. The reduction in the sum of the levels of the final residual signal due to the residual signal prediction may mean that the energy of the residual signal itself used to encode the current block is reduced. The reduction in the energy of the residual signal itself used for encoding may mean that the number of bits required for encoding is reduced. Therefore, the encoding device 800 can reduce the capacity of the bitstream through residual signal prediction.
[0523] Fig.32 A default residual signal according to an example is shown.
[0524] Fig.32 The default residual can be the above reference Fig.16 and Fig. 20 In other words, the default residual may be the residual signal of the current block before residual signal prediction is performed. Optionally, Fig.32 The residual signal can be the above reference Fig.31 An example of a residual signal 1910 for a current block is described.
[0525] Fig.33 The result of performing a discrete cosine transform on a default residual signal according to an example is shown.
[0526] exist Fig.33 In the figure, it is shown that Fig.32 The default residual signal is the result of performing a discrete cosine transform.
[0527] Fig.34 The proposed residual signal according to an example is shown.
[0528] Fig.34 The proposed residual signal can be the above reference Fig.16 and Fig. 20 In other words, the proposed residual signal may be a residual signal of a current block predicted based on the residual signal. Optionally, Fig.34 The proposed residual signal in the above reference can be Fig.31 An example of a prediction residual signal 1930 for a current block is described.
[0529] Fig.35 The result of performing discrete cosine transform on the proposed residual signal according to an example is shown.
[0530] exist Fig.35 In the Fig.34 The default residual signal is the result of performing a discrete cosine transform.
[0531] Reference Figure 32 to Figure 35 It can be seen that the concentration of energy in the frequency domain is improved by the residual signal prediction. The intra prediction unit 810 can improve the energy concentration in the frequency domain of the residual signal of the current block by the residual signal prediction. As the amplitude of the coefficient value in the frequency domain is reduced by the residual signal prediction, the probability that the result value generated by quantization will be "0" and the probability that the result value generated by quantization will be close to "0" can be increased.
[0532] Fig.36 The positions of neighboring blocks according to an example are shown.
[0533] exist Fig.28, the neighboring block 1620 is shown as being adjacent to the left end of the current block 1610. Fig.28 In FIG. 1 , the case where the residual signal prediction is performed using the left neighboring block is shown. Fig.16 and Fig. 20 The position of the described first neighboring block may not be limited to the left side of the current block 1610 .
[0534] As above Fig.16 Step 935 and Fig. 20 As described in step 1043 of , the intra residual prediction unit 810 may determine one of the one or more neighboring blocks of the current block as the first neighboring block. The first neighboring block may be a block used for residual signal prediction. The intra residual prediction unit 810 may determine one of the one or more previously reconstructed neighboring blocks of the current block as the first neighboring block.
[0535] When the first neighboring block is determined among the plurality of neighboring blocks, the intra residual prediction unit 810 may increase the spatial correlation between the first neighboring block and the residual signal.
[0536] exist Fig.36 , a lower left neighboring block A is shown as one or more neighboring blocks of the current block. 0 2221, left adjacent block A 1 2222, upper right adjacent block B 0 2223, upper adjacent block B 1 2224 and the upper left adjacent block B 2 2225. As shown in the figure, the one or more neighboring blocks of the current block may include a lower left neighboring block, a left neighboring block, an upper right neighboring block, an upper neighboring block, and an upper left neighboring block. The one or more neighboring blocks of the current block are not limited to Fig.36 The blocks are at the positions shown in .
[0537] In order to improve the efficiency of residual signal prediction, it is necessary to improve the spatial correlation between the current block and the adjacent blocks. In order to obtain adjacent blocks with high spatial correlation, the intra-frame residual prediction unit 810 may perform residual signal prediction on each of the multiple adjacent blocks of the current block. When multiple residual signals for multiple adjacent blocks are generated via residual signal prediction, the intra-frame residual prediction unit 810 may select a minimum rate distortion residual signal with a minimum rate distortion value from the multiple residual signals. In addition, the intra-frame residual prediction unit 810 may select an adjacent block corresponding to the minimum rate distortion residual signal from multiple adjacent blocks. The intra-frame residual prediction unit 810 may use the selected adjacent blocks and the selected minimum rate distortion residual signal to encode the current block.
[0538] For example, the above reference may be performed on each of a plurality of neighboring blocks of the current block. Fig.16Steps 935, 940 and 950 described above and referenced above Fig. 20 The described steps 1043, 1044 and 1045. Here, the multiple neighboring blocks of the current block may be at least some of one or more previously reconstructed blocks adjacent to the current block. The number and position of the multiple neighboring blocks may be changed according to the setting of the encoding device 800.
[0539] By repeating step 935 or step 1043 , the intra residual prediction unit 810 may sequentially select a plurality of neighboring blocks of the current block as the first block.
[0540] The intra residual prediction unit 810 may generate a plurality of first residual signals of a plurality of neighboring blocks of the current block by repeating step 935 or step 1045. In addition, the intra residual prediction unit 810 may calculate a rate-distortion value for each of the plurality of first residual signals.
[0541] The intra residual prediction unit 810 may determine a minimum rate distortion residual signal having a minimum rate distortion value among a plurality of first residual signals, and determine a neighboring block corresponding to the minimum rate distortion residual signal as a first neighboring block used to predict a residual signal of a current block.
[0542] Step 940 may be repeated with a repetition of step 950, or may be performed only once. Step 1044 may be repeated with a repetition of step 1055, or may be performed only once.
[0543] In steps 935 and 1043, a first neighboring block of the current block may be determined for each coding unit. In addition, in steps 985 and 1048, an identifier of the first neighboring block may be encoded for each coding unit.
[0544] Fig.37 is a configuration diagram of a decoding device according to an embodiment.
[0545] The decoding device 2300 may correspond to the above-described decoding device 200. The decoding device 2300 may include an entropy decoding unit 210, an inverse quantization unit 220, an inverse transform unit 230, an intra prediction unit 240, a motion compensation unit 250, an adder 255, a filtering unit 260, and a reference picture buffer 270, and may also include an intra residual prediction unit 2310.
[0546] The entropy decoding unit 210, the inverse quantization unit 220, the inverse transform unit 230, the intra prediction unit 240, the motion compensation unit 250, the adder 255, the filtering unit 260, and the reference picture buffer 270 may perform the same operations as those described above. Figure 2 The functions and / or operations described above are the same as the functions and / or operations described above. Therefore, their detailed description will be omitted.
[0547] In the above reference Figures 16 to 36 In the described embodiment, the functions and / or operations described as being performed by the intra prediction unit 120 of the encoding device 800 may be performed by the intra prediction unit 240 of the decoding device 2300. In addition, the functions and / or operations described as being performed by the intra residual prediction unit 810 of the encoding device 800 may be performed by the intra residual prediction unit 2310 of the decoding device 2300.
[0548] In addition, the entropy decoding unit 210, the inverse quantization unit 220, the inverse transform unit 230, the intra prediction unit 240, the motion compensation unit 250, the adder 255, the filtering unit 260, and the reference picture buffer 270 may perform functions and / or operations related to the intra residual prediction unit 2310. The functions and / or operations of the entropy decoding unit 210, the inverse quantization unit 220, the inverse transform unit 230, the intra prediction unit 240, the motion compensation unit 250, the adder 255, the filtering unit 260, the reference picture buffer 270, and the intra residual prediction unit 2310 will be described in detail below.
[0549] The intra residual prediction unit 2310 may not be separated from the intra prediction unit 240. The intra prediction unit 240 and the intra residual prediction unit 2310 may be integrated into the intra prediction unit 240, and in some embodiments, the functions and / or operations described as being performed by the intra residual prediction unit 2310 may be performed by the intra prediction unit 240.
[0550] Fig.38 and Fig.39 is a flowchart illustrating a decoding method according to an embodiment.
[0551] Hereinafter, the current block may be a block that is a target to be currently decoded or a block in a current image.
[0552] First, refer to Fig.38 , step 2410 can be executed.
[0553] In step 2410, the decoding device 2310 may generate a residual signal of the current block. Fig.16 and Fig. 20 As described, the generated residual signal may correspond to the first residual signal of the current block.
[0554] Step 2410 may be performed by at least one of the entropy decoding unit 210 , the inverse quantization unit 220 , and the inverse transform unit 230 .
[0555] Step 2410 may include step 2411 , step 2412 , and step 2413 .
[0556] In step 2411, the entropy decoding unit 210 may generate quantized coefficients of the current block.
[0557] In step 2412, the inverse quantization unit 220 may generate inverse quantized coefficients by performing inverse quantization on the quantized coefficients.
[0558] In step 2413, the inverse transform unit 230 may generate a residual signal by performing an inverse transform on the inverse quantized coefficients.
[0559] After step 2410 is executed, step 2420 and step 2440 may be executed.
[0560] Next, we will refer to Fig.39 .
[0561] Before step 2420 is performed, reference samples may be generated. Fig. 22 The description related to the generation of reference samples can also be applied to the present embodiment. Therefore, its repeated description will be omitted.
[0562] In step 2420, the intra prediction unit 240 may determine whether to perform an update on the reference samples.
[0563] Here, the updating of the reference samples may be configured to improve the sample values of the reference samples used to generate the prediction block before generating the prediction block of the current block.
[0564] The intra prediction unit 240 may use the above reference Fig.16 and Fig.19 The information indicating whether to perform the update of the reference sample is described to determine whether to perform the update of the reference sample. The bitstream transmitted from the encoding device 800 to the decoding device 2300 may include information indicating whether to perform the update of the reference sample. The information indicating whether to perform the update of the reference sample may be encoded in the bitstream.
[0565] The intra prediction unit 240 may decode the encoded information indicating whether to perform the update of the reference sample. The intra prediction unit 240 may use the decoded information indicating whether to perform the update of the reference sample to determine whether to perform the update of the reference sample. When the information indicates that the update of the reference sample will be performed, the intra prediction unit 240 may update the reference sample. When the information indicates that the update of the reference sample will not be performed, the intra prediction unit 240 may not update the reference sample.
[0566] If it is determined to perform the updating of the reference sample point, step 2425 may be performed. If it is determined not to perform the updating of the reference sample point, step 2430 may be performed.
[0567] In step 2425, the intra prediction unit 240 may update the value of the reference sample, and through the updating, may determine the value of the reference sample used to generate the prediction block of the current block.
[0568] Reference above Fig.23 , Fig.24 and Fig.25 The description related to the updating of the reference sample point can also be applied to this embodiment. Fig.23 , Fig.24 and Fig.25 In the described embodiment, the functions and / or operations described as being performed by the intra-frame prediction unit 120 of the encoding device 800 may be performed by the intra-frame prediction unit of the decoding device 2300. Fig.16 Step 915 described above and in reference to Fig.19 The functions and / or operations performed in step 1022 described above may also be performed in step 2425. A repeated description thereof will be omitted.
[0569] After executing step 2425, step 2430 may be executed.
[0570] In step 2430, the intra prediction unit 240 may generate a prediction block of the current block. The intra prediction unit 240 may generate a prediction block of the current block using reference samples according to an intra prediction mode for the current block.
[0571] For example, when generating a prediction unit, a prediction block generation method based on an existing image encoding and / or decoding technology (such as HEVC or AVC) may be used.
[0572] After executing step 2430, steps 2460 and 2490 may be executed.
[0573] In step 2440 , the intra residual prediction unit 2310 may determine whether to perform residual signal prediction.
[0574] The intra-frame residual prediction unit 2310 can be performed by using the above reference Fig.16 and Fig. 20 The information indicating whether to perform residual signal prediction is described to determine whether to perform residual signal prediction. The bitstream transmitted from the encoding device 800 to the decoding device 2300 may include information indicating whether to perform residual signal prediction. The information indicating whether to perform residual signal prediction may be encoded in the bitstream.
[0575] The intra prediction unit 240 may decode the encoded information indicating whether to perform residual signal prediction. The intra prediction unit 240 may determine whether to perform residual signal prediction by using the decoded information indicating whether to perform residual signal prediction. When the information indicates that residual signal prediction will be performed, the intra prediction unit 240 may perform residual signal prediction. When the information indicates that residual signal prediction will not be performed, the intra prediction unit 240 may not perform residual signal prediction.
[0576] When it is determined to perform residual signal prediction, step 2450 may be executed.
[0577] When it is determined not to perform residual signal prediction, step 2490 may be executed.
[0578] In step 2450, the intra residual prediction unit 2310 may identify a first neighboring block. The first neighboring block may be a block used for residual signal prediction and may be a block located near the current block. Fig.36 The description made in relation to the determination of the first neighboring block can also be applied to the present embodiment.
[0579] The intra-frame residual prediction unit 2310 can use the above-mentioned reference Fig.16 and Fig. 20 The first neighboring block may be identified by an identifier of the first neighboring block described. The bitstream transmitted from the encoding apparatus 800 to the decoding apparatus 2300 may include the identifier of the first neighboring block. The identifier of the first neighboring block may be encoded in the bitstream.
[0580] The intra residual prediction unit 2310 may decode the encoded identifier of the first neighboring block. The intra prediction unit 2310 may identify the first neighboring block using the decoded identifier of the first neighboring block.
[0581] The identifier of the first neighboring block may be information capable of identifying a neighboring block used to predict a residual signal of the current block.
[0582] For example, the identifier of the first neighboring block may indicate a neighboring block used to predict the residual signal of the current block among multiple neighboring blocks. Alternatively, the identifier of the first neighboring block may be position information indicating the position of the neighboring block used to predict the residual signal of the current block among multiple neighboring blocks. The position of the neighboring block may indicate the relative position of the selected neighboring block relative to the current block. The position of the neighboring block may indicate the direction in which the selected neighboring block is adjacent to the current block.
[0583] The location and number of neighboring blocks may be defined based on encoding parameters.
[0584] The identifier of the first neighboring block may be configured to indicate the same block in both the encoding device 800 and the decoding device 2300. For example, regarding the identifier of the first neighboring block, the size N of the block and the position of the neighboring block must be the same as each other in both the encoding device 800 and the decoding device 2300. In order to allow the encoding device 800 and the decoding device 2300 to share the same components of the identifier of the first neighboring block with each other, the identifier of the first neighboring block may be encoded using the "(neighboring residual index (idx) truncated unary)" scheme.
[0585] When step 2450 and step 2430 are performed, step 2460 may be subsequently performed.
[0586] In step 2460 , the intra residual prediction unit 2310 may generate a reconstructed block of the current block.
[0587] The intra residual prediction unit 2310 may generate a reconstructed block of the current block based on the prediction block, the residual signal of the current block, and the residual signal of the first neighboring block.
[0588] The residual signal of the current block used in step 2460 may be a residual signal generated by the encoding apparatus 800 through residual signal prediction. In other words, the residual signal of the current block used in step 2460 may correspond to the above reference signal. Fig.16 and Fig. 20 A first residual signal is described.
[0589] The first neighboring block may be a block that has been reconstructed before the current block is decoded. Therefore, the residual signal of the first neighboring block may have been acquired by the intra residual prediction unit 2310 before the current block is decoded.
[0590] The reconstructed block of the current block may be the sum of the prediction block of the current block, the residual signal of the current block, and the residual signal of the neighboring block. In addition, the reconstructed block of the current block may be generated based on the sum of the residual signal of the current block and the residual signal of the first neighboring block.
[0591] The reconstructed block may be the sum of 1) a prediction block, 2) a residual signal of the current block, and 3) a residual signal of the first neighboring block. The prediction block may be obtained according to an intra prediction mode. The residual signal of the current block may be sent from the encoding device 800 to the decoding device 2300. The residual signal of the first neighboring block may be obtained via residual signal prediction. For example, when residual signal prediction is not performed, the residual signal of the first neighboring block may be a signal having a value of 0.
[0592] Depending on the situation, when the intra-frame residual prediction unit 2310 generates a residual signal of the first neighboring block through residual signal prediction, the intra-frame prediction unit 240 can generate a reconstructed block of the current block by summing the prediction block of the current block, the residual signal of the current block and the residual signal of the neighboring block.
[0593] When step 2430 is performed and it is determined in step 2440 that residual signal prediction is not performed, step 2490 may be performed.
[0594] In step 2490, the intra prediction unit 240 or the intra residual prediction unit 2310 may generate a reconstructed block of the current block based on both the prediction block and the residual signal of the current block.
[0595] The residual signal of the current block used in step 2490 may be a residual signal generated by the encoding apparatus 800 without performing residual signal prediction. In other words, the residual signal of the current block used in step 2490 may correspond to the above reference signal. Fig.16 and Fig. 20 A third residual signal is described.
[0596] The third residual signal may be a residual signal of the current block in an existing image encoding and / or decoding technology (such as HEVC or AVC). For example, when generating the third residual signal, a residual signal generation method based on an existing image encoding and / or decoding technology (such as HEVC or AVC) may be used.
[0597] Fig.40 is a flowchart illustrating a residual signal generating method according to an embodiment.
[0598] Hereinafter, the current block may be a block that is a target to be currently decoded or a block in a current image.
[0599] First, refer to Fig.40 , step 2510 can be executed.
[0600] In step 2510, the decoding device 2310 may generate a residual signal of the current block. Here, the generated residual signal may correspond to the above reference Fig.16 and Fig. 20 Described is the first residual signal of the current block.
[0601] Step 2510 may be performed by at least one of the entropy decoding unit 210 , the inverse quantization unit 220 , and the inverse transform unit 230 .
[0602] Step 2510 may include step 2511 , step 2512 , and step 2513 .
[0603] In step 2511, the entropy decoding unit 210 may generate quantized coefficients of the current block.
[0604] In step 2512, the inverse quantization unit 220 may generate an inverse quantized coefficient for the quantized coefficient by performing inverse quantization on the quantized coefficient.
[0605] In step 2513, the inverse transform unit 230 may generate a residual signal by performing an inverse transform on the inverse quantized coefficients.
[0606] After executing step 2510, the following steps may be performed: Fig.41 Step 2520 described.
[0607] Fig.41 is a flowchart illustrating a method for decoding a residual signal according to an embodiment.
[0608] In step 2520, the intra prediction unit 240 may decode the encoded information indicating whether to perform updating of the reference samples.
[0609] The bitstream transmitted from the encoding apparatus 800 to the decoding apparatus 2300 may include information indicating whether the reference sample is updated. The information indicating whether the update of the reference sample is performed may be encoded in the bitstream.
[0610] In step 2530 , the intra prediction unit 240 may decode the encoded information indicating whether to perform residual signal prediction.
[0611] The bitstream transmitted from the encoding apparatus 800 to the decoding apparatus 2300 may include information indicating whether residual signal prediction is performed. The information indicating whether residual signal prediction is performed may be encoded in the bitstream.
[0612] In step 2540 , the intra residual prediction unit 2310 may decode the encoded identifier of the first neighboring block.
[0613] The bitstream transmitted from the encoding apparatus 800 to the decoding apparatus 2300 may include an identifier of the first neighboring block. The identifier of the first neighboring block may be encoded in the bitstream.
[0614] The intra prediction unit 240 and the intra residual prediction unit 2310 may decode the residual signal at step 2550. The intra prediction unit 240 and the intra residual prediction unit 2310 may generate a reconstructed block by decoding the residual signal.
[0615] Step 2550 may include subsequently referring to Fig.42 Step 2561, step 2562, step 2563 and step 2564 described.
[0616] Additionally, step 2550 may include subsequently referring to Fig.43 Step 2571, step 2572, step 2573 and step 2574 described.
[0617] Fig.42 is a flowchart illustrating a prediction block generating method according to an embodiment.
[0618] Reference samples may be generated at step 2561. Fig. 22 The description made regarding the generation of reference samples can also be applied to the present embodiment. The repeated description thereof will be omitted.
[0619] In step 2562, the intra prediction unit 240 may determine whether to perform an update on the reference samples.
[0620] Here, the updating of the reference samples may be configured to improve the sample values of the reference samples used to generate the prediction block before generating the prediction block of the current block.
[0621] The intra prediction unit 240 may use the above reference Fig.16 and Fig.19 Whether to update the reference sample is determined by the information indicating whether to perform updating of the reference sample.
[0622] The intra prediction unit 240 may determine whether to perform an update of the reference sample using the decoded information indicating whether to perform an update of the reference sample. When the information indicates that an update of the reference sample will be performed, the intra prediction unit 240 may update the reference sample. When the information indicates that an update of the reference sample will not be performed, the intra prediction unit 240 may not update the reference sample.
[0623] When it is determined to update the reference sample point, step 2563 may be executed. When it is determined not to update the reference sample point, step 2564 may be executed.
[0624] In step 2563, the intra prediction unit 240 may update the value of the reference sample, and through the updating, may determine the value of the reference sample used to generate the prediction block of the current block.
[0625] Reference above Fig.23 , Fig.24 and Fig.25 The description related to the updating of the reference sample point can also be applied to this embodiment. Fig.23 , Fig.24 and Fig.25 In the described embodiment, the functions and / or operations described as being performed by the intra-frame prediction unit 120 of the encoding device 800 may be performed by the intra-frame prediction unit 240 of the decoding device 2300. Fig.16 Step 915 described above and in reference to Fig.19 The functions and / or operations performed in step 1022 described above may also be performed in step 2563. A repeated description thereof will be omitted.
[0626] After executing step 2563, step 2564 can be executed.
[0627] In step 2564, the intra prediction unit 240 may generate a prediction block for the current block. The intra prediction unit 240 may generate a prediction block for the current block using reference samples according to an intra prediction mode of the current block.
[0628] For example, when generating a prediction block, a prediction block generation method based on an existing image encoding and / or decoding technology (such as HEVC or AVC) may be used.
[0629] For example, after executing step 2564, the following may be executed to refer to Fig.43 Step 2571 described.
[0630] Fig.43 is a flowchart illustrating a reconstructed block generating method according to an embodiment.
[0631] In step 2571, the intra residual prediction unit 2310 may determine whether to perform residual signal prediction.
[0632] The intra-frame residual prediction unit 2310 can use the above reference Fig.16 and Fig. 20 The described information indicating whether to perform residual signal prediction determines whether to perform residual signal prediction.
[0633] The intra prediction unit 240 may determine whether to perform residual signal prediction using the decoded information indicating whether to perform residual signal prediction. When the information indicates that residual signal prediction will be performed, the intra prediction unit 240 may perform residual signal prediction. When the information indicates that residual signal prediction will not be performed, the intra prediction unit 240 may not perform residual signal prediction.
[0634] When it is determined to perform residual signal prediction, step 2572 may be executed.
[0635] When it is determined not to perform residual signal prediction, step 2574 may be executed.
[0636] In step 2572, the intra residual prediction unit 2310 may identify a first neighboring block. The first neighboring block may be a block used for residual signal prediction and may be a block located near the current block. Fig.36 The description made in relation to the determination of the first neighboring block can also be applied to the present embodiment.
[0637] The intra-frame residual prediction unit 2310 can use the above reference Fig.16 and Fig. 20 The first neighboring block is identified by an identifier of the described first neighboring block.
[0638] The intra residual prediction unit 2310 may identify the first neighboring block using the decoded identifier of the first neighboring block.
[0639] The identifier of the first neighboring block may be information capable of identifying a neighboring block used to predict a residual signal of the current block.
[0640] For example, the identifier of the first neighboring block may indicate a neighboring block among multiple neighboring blocks that is used to predict the residual signal of the current block. Alternatively, the identifier of the first neighboring block may be position information indicating the position of a neighboring block among multiple neighboring blocks that is used to predict the residual signal of the current block. The position of the neighboring block may indicate the position of the selected neighboring block relative to the current block. The position of the neighboring block may indicate the direction in which the selected neighboring block is adjacent to the current block.
[0641] The location and number of neighboring blocks may be defined based on encoding parameters.
[0642] The identifier of the first neighboring block may be configured to indicate the same block in both the encoding device 800 and the decoding device 2300. For example, regarding the identifier of the first neighboring block, the size N of the block and the position of the neighboring block must be the same as each other in both the encoding device 800 and the decoding device 2300. In order to allow the encoding device 800 and the decoding device 2300 to share the same components of the identifier of the first neighboring block with each other, the identifier of the first neighboring block may be encoded using the "(neighboring residual index (idx) truncated unary)" scheme.
[0643] When step 2572 is executed, step 2573 may be subsequently executed.
[0644] In step 2573 , the intra residual prediction unit 2310 may generate a reconstructed block of the current block.
[0645] The intra residual prediction unit 2310 may generate a reconstructed block of the current block based on the prediction block, the residual signal of the current block, and the residual signal of the first neighboring block.
[0646] The residual signal of the current block used in step 2573 may be a residual signal generated by the encoding apparatus 800 through residual signal prediction. In other words, the residual signal of the current block used in step 2573 may correspond to the above reference signal. Fig.16 and Fig. 20 A first residual signal is described.
[0647] The first neighboring block may be a block that has been reconstructed before the current block is decoded. Therefore, the residual signal of the first neighboring block may have been acquired by the intra residual prediction unit 2310 before the current block is decoded.
[0648] The reconstructed block of the current block may be the sum of the prediction block of the current block, the residual signal of the current block and the residual signal of the neighboring block. In addition, the reconstructed block of the current block may be generated based on the sum of the residual signal of the current block and the residual signal of the first neighboring block.
[0649] The reconstructed block may be the sum of 1) a prediction block, 2) a residual signal of the current block, and 3) a residual signal of the first neighboring block. The prediction block may be obtained according to an intra prediction mode. The residual signal of the current block may be sent from the encoding device 800 to the decoding device 2300. The residual signal of the first neighboring block may be obtained via residual signal prediction. For example, when residual signal prediction is not performed, the residual signal of the first neighboring block may be a signal having a value of 0.
[0650] Depending on the situation, when the intra-frame residual prediction unit 2310 generates a residual signal of the first neighboring block through residual signal prediction, the intra-frame prediction unit 240 can generate a reconstructed block of the current block by summing the prediction block of the current block, the residual signal of the current block and the residual signal of the neighboring block.
[0651] In step 2571, when it is determined not to perform residual signal prediction, step 2574 may be executed.
[0652] In step 2574, the intra prediction unit 240 or the intra residual prediction unit 2310 may generate a reconstructed block of the current block based on the prediction block of the current block and the residual signal.
[0653] The residual signal of the current block used in step 2574 may be a residual signal generated by the encoding apparatus 800 without performing residual signal prediction. In other words, the residual signal of the current block used in step 2574 may correspond to the above reference signal. Fig.16 and Fig. 20 A third residual signal is described.
[0654] The third residual signal may be a residual signal of the current block under an existing image coding and / or decoding technology (such as HEVC or AVC). For example, when generating the residual signal, a residual signal generation method based on an existing image coding and / or decoding technology (such as HEVC or AVC) may be used.
[0655] Implicit transmission of information related to residual signal prediction
[0656] As described above, the bitstream may include 1) information indicating whether to perform residual signal prediction and 2) an identifier of the first neighboring block used to predict the residual signal of the current block. In other words, the information and the identifier may be explicitly transmitted from the encoding device 800 to the decoding device 2300.
[0657] On the contrary, when the predefined condition for reducing the number of bits required for the information is satisfied, 1) information indicating whether residual signal prediction is performed may be omitted. Even if the information is omitted, the decoding device 2300 may derive the information when the predefined condition is satisfied. In other words, the information may be transmitted implicitly.
[0658] In addition, when the predefined condition for reducing the number of bits required for the identifier is met, 2) the identifier of the first neighboring block used to predict the residual signal of the current block can be omitted. Even if this information is omitted, the decoding device 2300 can derive the identifier when the predefined condition is met. In other words, the identifier can be transmitted implicitly.
[0659] In the above reference Fig.16 Step 930 described above with reference to Fig. 20 In step 1041, when the predefined condition is satisfied, the intra residual prediction unit 810 may determine to perform residual signal prediction on the current block. Alternatively, when the predefined condition is satisfied, the intra residual prediction unit 810 may determine not to perform residual signal prediction on the current block.
[0660] Furthermore, at step 935 and step 1043, when the predefined condition is satisfied, the intra residual prediction unit 810 may determine that the predefined block is the first neighboring block. Furthermore, at step 980, step 985, step 1048, and step 1049 may be selectively performed.
[0661] In step 980 and step 1049, the intra residual prediction unit 810 may selectively encode information indicating whether to perform residual signal prediction. Alternatively, when a predefined condition is satisfied, the intra residual prediction unit 810 may omit encoding of information indicating whether to perform residual signal prediction.
[0662] In step 985 and step 1048, the intra residual prediction unit 810 may selectively encode the identifier of the first neighboring block. Alternatively, when a predefined condition is satisfied, the intra residual prediction unit 810 may omit encoding the identifier of the first neighboring block.
[0663] In the above reference Fig.39 In step 2440, when the predefined condition is satisfied, the intra residual prediction unit 2310 may determine to perform residual signal prediction. Alternatively, when the predefined condition is satisfied, the intra residual prediction unit 2310 may determine not to perform residual signal prediction. For example, when there is no information indicating whether to perform residual signal prediction, the intra residual prediction unit 2310 may determine to perform residual signal prediction.
[0664] Optionally, in step 2440, when a predefined condition is satisfied, the intra residual prediction unit 2310 may identify a block selected according to a predefined scheme as a first neighboring block. For example, when there is no identifier of the first neighboring block, the intra residual prediction unit 2310 may identify a block selected according to a predefined scheme as a first neighboring block.
[0665] For example, when the directivity of the current block and the directivity of the first neighboring block are the same as each other, high efficiency can be expected when the residual signal is predicted. Therefore, when there is any block having the same intra prediction mode as the current block near the current block, the prediction of the residual signal of the current block can be performed on the block having the same intra prediction mode.
[0666] In the above reference Fig.16 Step 930 described above and in reference to Fig. 20 In the described step 1041, when there is any block having the same intra prediction mode as the current block near the current block, the intra residual prediction unit 810 may determine to perform residual signal prediction on the current block. For example, when the value of the most probable mode (MPM) flag is "true" (or 1), the intra residual prediction unit 2310 may detect that there is a block having the same intra prediction mode as the current block near the current block, and may determine to perform residual signal prediction on the current block. Therefore, the intra residual prediction unit 2310 may identify whether the residual signal prediction is used based on the value of the MPM flag.
[0667] In addition, in steps 935 and 1043, when there is any block having the same intra prediction mode as the current block near the current block, the intra residual prediction unit 810 may determine the block having the same intra prediction mode as the first neighboring block. When there are multiple blocks having the same intra prediction mode as the current block near the current block, the intra residual prediction unit 810 may determine a block selected from the multiple blocks according to a preset priority as the first neighboring block.
[0668] In step 980 and step 1049 , when there is any block having the same intra prediction mode as the current block near the current block, the intra residual prediction unit 810 may omit encoding of information indicating whether to perform residual signal prediction.
[0669] In step 985 and step 1048 , when there is any block having the same intra prediction mode as the current block near the current block, the intra residual prediction unit 810 may omit encoding of the identifier of the first neighboring block.
[0670] In the above reference Fig.39In the described step 2440, when there is a block having the same intra prediction mode as the current block near the current block, the intra residual prediction unit 2310 may determine to perform residual signal prediction. Alternatively, when there is no information indicating whether to perform residual signal prediction, if there is any block having the same intra prediction mode as the current block near the current block, the intra residual prediction unit 2310 may determine to perform residual signal prediction. Alternatively, when there is no information indicating whether to perform residual signal prediction, if there is no block having the same intra prediction mode as the current block near the current block, the intra residual prediction unit 2310 may determine not to perform residual signal prediction.
[0671] In addition, in step 2440, when there is any block having the same intra prediction mode as the current block near the current block, the intra residual prediction unit 2310 may identify the block having the same intra prediction mode as the first neighboring block. In addition, when there is no identifier of the first block, if there is any block having the same intra prediction mode near the current block, the intra residual prediction unit 2310 may identify the block having the same intra prediction mode as the current block as the first neighboring block. Alternatively, when there is no identifier of the first block, and there are multiple blocks having the same intra prediction mode as the current block near the current block, the intra residual prediction unit 810 may determine a block selected from the multiple blocks according to a preset priority as the first neighboring block.
[0672] When intra prediction is performed, the intra prediction mode may be sent from the encoding device 800 to the decoding device 2300 through the MPM flag and the MPM index. In other words, the intra prediction mode may be entropy encoded through the MPM representation and the MPM index. The MPM may indicate a total of three intra prediction modes. The intra prediction mode indicated by the MPM may be designated as an MPM candidate mode. The intra prediction unit 240 may identify the MPM candidate mode through a prediction block near the current block in the picture.
[0673] If the intra prediction mode of the current block is the same as one of the three intra prediction modes identified by the MPM, the value of the MPM identification may be "true" (or "1"). In addition, when the value of the MPM identification is "true" (or "1"), the encoding device 800 may send the MPM index to the decoding device 2300. The MPM index may indicate which mode of the MPM candidate modes is the intra prediction mode of the current block.
[0674] The intra-frame residual prediction unit 2310 may perform intra-frame prediction according to the syntax definition. When the final intra-frame prediction mode obtained after performing intra-frame prediction is the same as one of the MPM candidate modes, the intra-frame residual prediction unit 2310 may obtain the residual signal of the current block, and may use the residual signal of the first neighboring block to predict the residual signal of the current block. When the intra-frame prediction mode of the current block is the same as the intra-frame prediction mode of the first neighboring block, the intra-frame residual prediction unit 2310 may identify the position of the first neighboring block used to predict the residual signal of the current block through the MPM index.
[0675] Updated unit for reference samples
[0676] In step 2420, the intra prediction unit 240 may determine whether to perform updating of the reference sample for each predefined unit. The predefined unit may be at least one of: 1) an entire image sequence (ie, video), 2) a single image (ie, picture), 3) a slice, and 4) a coding unit.
[0677] For a predefined unit, the reference sample update information may be used to indicate whether an update of the reference sample has been performed. The reference sample update information may be information indicating whether an update of the reference sample has been performed for the predefined unit. For example, a value of the reference sample update information being a "first value" may indicate that an update of the reference sample will be performed when the current block is decoded. A value of the reference sample update information being a "second value" may indicate that an update of the reference sample will not be performed when the current block is decoded.
[0678] The encoding apparatus 800 may include the encoded residual signal prediction information in a bitstream. The decoding apparatus 2300 may use the residual signal prediction information to determine whether to perform prediction of a residual signal for a current block.
[0679] In the following description, updating of reference samples for each predefined unit will be described below.
[0680] 1) Entire image sequence: Whether to perform an update on the reference samples may be determined for the entire image sequence. In this case, the sequence parameter set may include reference sample update information. When the reference sample update information of the sequence parameter set indicates that an update on the reference samples will be performed, the intra prediction unit 240 may perform intra prediction for the entire image sequence, wherein the intra prediction uses reference samples to which a directional gradient is applied.
[0681] 2) Single image: Whether to perform an update on the reference sample may be determined for each image. In this case, the picture parameter set may include reference sample update information. When the reference sample update information of the picture parameter set indicates that the reference sample is to be updated, the intra prediction unit 240 may perform intra prediction for the entire image corresponding to the picture parameter set, wherein the intra prediction uses the reference sample to which the directionality-based gradient is applied.
[0682] 3) Slice: A single image may be partitioned into a plurality of slice segments or a plurality of parallel blocks in a single slice segment. Whether to perform an update of the reference sample may be determined for each slice. In this case, the slice segment header may include reference sample update information. When the reference sample update information of the slice segment header indicates that the reference sample is to be updated, the intra prediction unit 240 may perform intra prediction on the slice corresponding to the slice segment header, wherein the intra prediction uses the reference sample to which the directionality-based gradient is applied.
[0683] 4) Coding unit: Whether to perform an update on the reference sample may be determined for each coding unit. In this case, reference sample update information may exist for the coding unit. When the reference sample update information for the coding unit indicates that the reference sample is to be updated, the intra prediction unit 240 may perform intra prediction on the coding unit corresponding to the reference sample update information, wherein the intra prediction uses the reference sample to which the directionality-based gradient is applied.
[0684] As described above, the reference sample update information may be encoded in a sequence parameter set, a picture parameter set or a slice header. Alternatively, the update information may be encoded for a coding unit.
[0685] Unit for prediction of residual signal
[0686] In step 2440, the intra residual prediction unit 2310 may determine whether to perform residual signal prediction for each predefined unit. The predefined unit may be at least one of: 1) an entire image sequence (ie, video), 2) a single image (ie, picture), 3) a slice, and 4) a coding unit.
[0687] The residual signal prediction information may be information indicating whether prediction of the residual signal has been performed for the predefined unit. For example, a value of the residual signal prediction information being a "first value" may indicate that residual signal prediction will be performed when decoding the current block. A value of the residual signal prediction information being a "second value" may indicate that residual signal prediction will not be performed when decoding the current block.
[0688] The encoding apparatus 800 may include the encoded residual signal prediction information in a bitstream. The decoding apparatus 2300 may use the residual signal prediction information to determine whether to perform prediction of a residual signal for a current block.
[0689] In the following description, prediction of a residual signal for each predefined unit will be described.
[0690] 1) Entire image sequence: Whether to perform residual signal prediction may be determined for the entire image sequence. In this case, the sequence parameter set may include residual signal prediction information. When the residual signal prediction information of the sequence parameter set indicates that residual signal prediction is to be performed, the intra residual prediction unit 2310 may perform residual signal prediction for the entire image sequence. Depending on whether residual signal prediction is performed, all blocks encoded using intra prediction in the image sequence may be decoded using residual signal prediction, or all blocks encoded using intra prediction in the image sequence may be decoded without using residual signal prediction.
[0691] 2) Single image: Whether to perform residual signal prediction may be determined for each image. In this case, the picture parameter set may include residual signal prediction information. When the residual signal prediction information of the picture parameter set indicates that residual signal prediction will be performed, the intra residual prediction unit 2310 may perform residual signal prediction for the entire image corresponding to the picture parameter set. Depending on whether residual signal prediction is performed, all blocks encoded using intra prediction in a single picture may be decoded using residual signal prediction, or all blocks encoded using intra prediction in a single picture may be decoded without using residual signal prediction.
[0692] 3) Slice: A single image may be partitioned into a plurality of slice segments or a plurality of parallel blocks in a single slice segment. Whether to perform residual signal prediction may be determined for each slice. In this case, the slice segment header may include residual signal prediction information. When the residual signal prediction information of the slice segment header indicates that residual signal prediction will be performed, the intra prediction unit 2310 may perform residual signal prediction on the slice corresponding to the slice segment header. When the slice segment header includes residual signal prediction information, all blocks encoded using intra prediction at the slice level may be decoded using residual signal prediction, or all blocks encoded using intra prediction at the slice level may be decoded without using residual signal prediction, depending on whether residual signal prediction is performed.
[0693] 4) Coding unit: It may be determined whether to perform residual signal prediction for each coding unit. In this case, residual signal prediction information may exist for the coding unit. When the residual signal prediction information for the coding unit indicates that residual signal prediction will be performed, the intra residual prediction unit 2310 may perform residual signal prediction on the coding unit corresponding to the residual signal prediction information.
[0694] As described above, the residual signal prediction information may be encoded in a sequence parameter set, a picture parameter set, or a slice segment header. In addition, the residual signal prediction information may be encoded for a coding unit.
[0695] Fig.44 is a configuration diagram of an electronic device in which the encoding apparatus according to the embodiment is implemented.
[0696] According to an embodiment, at least some of the motion prediction unit 111, the motion compensation unit 112, the intra prediction unit 120, the switch 115, the subtractor 125, the transform unit 130, the quantization unit 140, the entropy encoding unit 150, the inverse quantization unit 160, the inverse transform unit 170, the adder 175, the filtering unit 180, the reference picture buffer 190, and the intra residual prediction unit 180 of the encoding device 800 may be program modules and may communicate with an external device or an external system. The program modules may be included in the encoding device 800 in the form of an operating system, an application program module, and other program modules.
[0697] The program modules may be physically stored in any of various well-known storage devices. At least some of the program modules may also be stored in a remote storage device that can communicate with the encoding device 800.
[0698] The program modules may include, but are not limited to, routines, subroutines, programs, objects, components, and data structures for performing functions or operations according to the embodiments or for executing abstract data types according to the embodiments.
[0699] The program module may be implemented as instructions or codes executed by at least one processor of the encoding device 800 .
[0700] The encoding device 800 may be implemented as Fig.44 The electronic device 2600 shown in FIG. 2600 may be a general-purpose computer system that functions as the encoding apparatus 800 .
[0701] like Fig.44 As shown in , the electronic device 2600 may include at least one processor 2621, a memory 2623, a user interface (UI) input device 2626, a UI output device 2627, and a storage 2628 that communicate with each other through a bus 2622. The electronic device 2600 may also include a network interface 2629 connected to a network 2630. The processor 2621 may be a semiconductor device for running processing instructions stored in a central processing unit (CUP), a memory 2623, or a storage 2628. The memory 2623 and the storage 2628 may be any of various types of volatile or non-volatile storage media. For example, the memory may include at least one of a read-only memory (ROM) 2624 and a random access memory (RAM) 2625.
[0702] The encoding device 800 may be implemented in a computer system including a computer-readable storage medium.
[0703] The storage medium may store at least one module required for the electronic device 2600 to function as the encoding apparatus 800. The memory 2623 may be configured to store at least one module and be executed by the at least one processor 2621.
[0704] Functions related to the communication of data or information of the encoding device 800 may be performed via the network interface 2629 .
[0705] Fig.45 is a configuration diagram of an electronic device in which a decoding apparatus according to an embodiment is implemented.
[0706] According to an embodiment, the entropy decoding unit 210, the inverse quantization unit 220, the inverse transform unit 230, the intra prediction unit 240, the motion compensation unit 250, the adder 255, the filtering unit 260, the reference picture buffer 270, and the intra residual prediction unit 2310 of the decoding device 2300 may be program modules and may communicate with an external device or an external system. The program modules may be included in the decoding device 2300 in the form of an operating system, an application program module, and other program modules.
[0707] The program modules may be physically stored in any of various well-known storage devices. At least some of the program modules may also be stored in a remote storage device that can communicate with the decoding device 2300.
[0708] The program modules may include, but are not limited to, routines, subroutines, programs, objects, components, and data structures for performing functions or operations according to the embodiments or for executing abstract data types according to the embodiments.
[0709] The program module may be implemented as instructions or codes executed by at least one processor of the decoding device 2300 .
[0710] The decoding device 2300 may be implemented as Fig.45 The electronic device 2700 shown in FIG. The electronic device 2700 may be a general-purpose computer system that functions as the decoding apparatus 2300 .
[0711] like Fig.45As shown in , the electronic device 2700 may include at least one processor 2721, a memory 2723, a UI input device 2726, a UI output device 2727, and a storage 2728 that communicate with each other through a bus 2722. The electronic device 2700 may also include a network interface 2729 connected to a network 2730. The processor 2721 may be a semiconductor device for running processing instructions stored in a CPU, a memory 2723, or a storage 2728. The memory 2723 and the storage 2728 may be any of various types of volatile or non-volatile storage media. For example, the memory may include at least one of a ROM 2724 and a RAM 2725.
[0712] The decoding device 2300 may be implemented in a computer system including a computer-readable storage medium.
[0713] The storage medium may store at least one module required for the electronic device 2700 to function as the decoding apparatus 2300. The memory 2723 may be configured to store at least one module and be executed by the at least one processor 2721.
[0714] Functions related to communication of data or information of the decoding device 2300 may be performed via the network interface 2729 .
[0715] In the embodiments described above, although the method has been described based on a flow chart as a series of steps or units, the present invention is not limited to the order of the steps, and some steps may be performed in an order different from the order of the steps described or performed simultaneously with other steps. In addition, it will be understood by those skilled in the art that the steps shown in the flow chart are not exclusive and may also include other steps, or one or more steps in the flow chart may be deleted without departing from the scope of the present invention.
[0716] The embodiments according to the present invention described above can be implemented as programs that can be run by various computer devices, and can be recorded on computer-readable storage media. Computer-readable storage media can include program instructions, data files and data structures individually or in combination. The program instructions recorded on the storage medium can be specially designed or configured for the present invention, or can be known or available to those of ordinary skill in the field of computer software. The example of computer storage storage medium can include all types of hardware devices that are specially configured to record and run program instructions, such as magnetic media (such as hard disks, floppy disks and tapes), optical media (such as compact disks (CD)-ROMs and digital versatile disks (DVDs)), magneto-optical media (such as floppy disks, ROMs, RAMs and flash memories). The example of program instructions includes machine code (such as code created by a compiler) and high-level language codes that can be executed by a computer using an interpreter. The hardware device can be configured to operate as one or more software modules to perform the operation of the present invention, and vice versa.
[0717] As described above, although the present invention has been described based on specific details (such as detailed components and a limited number of embodiments and drawings), the specific details are only provided for easy understanding of the present invention, and the present invention is not limited to these embodiments. Those skilled in the art will practice various changes and modifications based on the above description.
[0718] Therefore, the spirit of the present invention should not be limitatively defined in the above embodiments, and it should be understood that the appended claims and their equivalents or modifications belong to the scope and spirit of the present invention.
Claims
1. An image decoding method, include: Determining a value of a reference sample for predicting the current block based on neighboring blocks of the current block; Using the reference samples to generate a prediction block for a current block; as well as Using the prediction block and a reconstructed residual block for the current block to generate a reconstructed block, The determination of the value of the reference sample point is an update of the value of the reference sample point. The updating is performed based on the size of the current block and whether the current block is partitioned.
2. The image decoding method according to claim 1, in, The value of the reference sample is determined based on a plurality of pixels in a horizontal line that is not adjacent to the current block or a plurality of pixels in a vertical line that is not adjacent to the current block.
3. The image decoding method according to claim 1, in, The value of the reference sample is determined based on at least one pixel of each of a plurality of horizontal lines, and the plurality of horizontal lines are located above an upper side edge of the current block.
4. The image decoding method according to claim 3, in, The prediction is intra prediction, and an intra prediction mode of the intra prediction is a diagonal mode.
5. The image decoding method according to claim 1, in, The updating is performed based on the values of neighboring pixels on a horizontal line.
6. A method for encoding an image, include: Determining a value of a reference sample for predicting the current block based on neighboring blocks of the current block; Using the reference samples to generate a prediction block for the current block; as well as Using the prediction block and a reconstructed residual block for the current block to generate a reconstructed block, The determination of the value of the reference sample point is an update of the value of the reference sample point. The updating is performed based on the size of the current block and whether the current block is partitioned.
7. The image encoding method according to claim 6, in, The value of the reference sample is determined based on a plurality of pixels in a horizontal line that is not adjacent to the current block or a plurality of pixels in a vertical line that is not adjacent to the current block.
8. The image encoding method according to claim 6, in, The value of the reference sample is determined based on at least one pixel of each of a plurality of horizontal lines, and the plurality of horizontal lines are located above an upper side edge of the current block.
9. The image encoding method according to claim 8, in, The prediction is intra prediction, and an intra prediction mode of the intra prediction is a diagonal mode.
10. The image encoding method according to claim 6, in, The updating is performed based on the values of neighboring pixels on a horizontal line.
11. A method for transmitting a bit stream, the method include: Sending a bit stream to a video decoding device so that the video decoding device performs decoding on the current block, Wherein, the bitstream includes coding information for the current block; The encoding information represents information used to perform decoding on the current block. The decoding step includes: determining the value of the reference sample used for predicting the current block based on the neighboring blocks of the current block, The decoding step includes: using the reference sample point to generate a prediction block for the current block, The decoding step includes: generating a reconstructed block using the prediction block and a reconstructed residual block for the current block, The determination of the value of the reference sample in the decoding step is an update of the value of the reference sample, and The updating in the decoding step is performed based on the size of the current block and whether the current block is partitioned.
12. The method according to claim 11, in, In the decoding step, the value of the reference sample is determined based on a plurality of pixels in a horizontal line that is not adjacent to the current block or a plurality of pixels in a vertical line that is not adjacent to the current block.
13. The method according to claim 11, in, In the decoding step, the value of the reference sample is determined based on at least one pixel of each of a plurality of horizontal lines, and the plurality of horizontal lines are located above an upper side edge of the current block.
14. The method according to claim 11, in, In the step of decoding, the updating is performed based on values of adjacent pixels on a horizontal line.
15. A method for storing a bit stream to generate a computer-readable recording medium storing the bit stream, the method include: When a prediction mode is determined for a current block, determining a value of a reference sample for predicting the current block is performed based on neighboring blocks of the current block; Using the reference samples to generate a prediction block for the current block; Generate a reconstructed block using the prediction block and a reconstructed residual block for the current block; as well as storing a bit stream including information indicating the prediction mode in a computer-readable recording medium, The determination of the value of the reference sample point is an update of the value of the reference sample point. The updating is performed based on the size of the current block and whether the current block is partitioned.
16. The method of claim 15, in, The value of the reference sample is determined based on a plurality of pixels in a horizontal line that is not adjacent to the current block or a plurality of pixels in a vertical line that is not adjacent to the current block.
17. The method of claim 15, in, The value of the reference sample is determined based on at least one pixel of each of a plurality of horizontal lines, and the plurality of horizontal lines are located above an upper side edge of the current block.
18. The method of claim 15, in, The updating is performed based on the values of neighboring pixels on a horizontal line.
Citation Information
Patent Citations
Method and apparatus for intra prediction using adaptive filtering
KR1020140007097A