Method and apparatus for encoding and decoding a video by using prediction
By combining intra-prediction and second-prediction in intra-prediction, prediction errors are selectively handled, solving the problem of large intra-prediction errors in high-resolution images and improving encoding/decoding efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ELECTRONICS & TELECOMM RES INST
- Filing Date
- 2017-01-26
- Publication Date
- 2026-05-22
AI Technical Summary
Existing technologies suffer from significant prediction errors during intra-frame prediction in high-resolution and high-definition image encoding/decoding, resulting in insufficient reduction of spatial repetition.
By employing a combination of intra-frame prediction and second prediction, the prediction error is reduced and spatial repetition is decreased by selectively performing the second prediction on a portion of the prediction error.
It effectively reduces prediction errors, improves the efficiency of image encoding/decoding, and reduces spatial repetition.
Smart Images

Figure CN116016912B_ABST
Abstract
Description
[0001] This application is a divisional application of patent application No. 201780009090.2, filed on January 26, 2017, entitled "Method and apparatus for encoding and decoding video by using prediction". Technical Field
[0002] The following embodiments generally relate to a video decoding method and apparatus, as well as a video encoding method and apparatus, and more specifically, to a method and apparatus for performing encoding and decoding on video based on the prediction of target blocks. Background Technology
[0003] With the continuous development of the information and communication industry, high-definition (HD) broadcasting services have become widespread throughout the world. Through this widespread adoption, a large number of users have become accustomed to high-resolution and high-definition images and / or videos.
[0004] To meet user demand for high definition, numerous organizations have accelerated the development of next-generation imaging devices. In addition to increased user interest in High Definition TV (HDTV) and Full High Definition (FHD) TV, there is also growing interest in Ultra High Definition (UHD) TV, which boasts more than four times the resolution of Full High Definition (FHD) TV. This increased interest necessitates image encoding / decoding technologies for images with higher resolution and greater definition.
[0005] Image encoding / decoding devices and methods can utilize inter-frame prediction techniques, intra-frame prediction techniques, entropy coding techniques, etc., to perform encoding / decoding on high-resolution and high-definition images. Inter-frame prediction techniques can be used to predict the values of pixels included in the current frame using temporally earlier and / or temporally later frames. Intra-frame prediction techniques can be used to predict the values of pixels included in the current frame using information about the pixels in the current frame. Entropy coding techniques can be used to assign shorter codes to more frequently occurring symbols and longer codes to less frequently occurring symbols.
[0006] In image encoding and decoding, prediction can be interpreted as generating a predicted signal similar to the original signal. Prediction can be primarily categorized as: prediction of an image reconstructed in reference space, prediction of an image reconstructed in reference time, and prediction of an image reconstructed in reference to other symbols. In other words, temporal reference means that the image reconstructed in time is referenced, and spatial reference means that the image reconstructed in space is referenced.
[0007] The current block can be the block that is currently being encoded or decoded. The current block can be referred to as a "target block" or "target unit." During encoding, the current block can be referred to as an "encoded target block" or "encoded target unit." During decoding, the current block can be referred to as a "decoded target block" or "decoded target unit."
[0008] Inter-frame prediction can be a technique used to predict the current block using both temporal and spatial references. Intra-frame prediction can be a technique used to predict the current block using only a spatial reference.
[0009] When performing intra-frame prediction to reduce spatial repetition, image coding / decoding techniques use any one of several prediction modes to encode the current block. For example, in High Efficiency Video Coding (HEVC), 35 intra-frame prediction modes are used.
[0010] The encoding device uses all available prediction modes from a variety of prediction modes to generate a prediction block for the current block, and selects the prediction mode that performs best from all available prediction modes as the prediction mode for encoding the current block. However, even when using the prediction mode that performs best, an error still exists between the original block and the prediction block. This error is represented as a residual block.
[0011] For some pixels, there is a large error between the original block and the predicted block. Due to this large error, spatial repetition may not be sufficiently reduced even after applying transform and / or quantization to the residual block. Summary of the Invention
[0012] Technical issues
[0013] The embodiments aim to provide a method and apparatus for reducing prediction errors based on prediction units due to prediction.
[0014] The embodiments are intended to provide a method and apparatus for reducing prediction errors caused by the prediction direction of a prediction pattern.
[0015] The embodiments aim to provide a method and apparatus for performing a selective second prediction on a prediction error corresponding to a first prediction made along a first prediction mode.
[0016] The embodiments are intended to provide a method and apparatus for performing a selective second prediction on a portion of the prediction error corresponding to a first prediction.
[0017] The embodiments aim to provide a method and apparatus for performing selective second prediction on a portion of the prediction error that has severe distortion in relation to a first prediction.
[0018] The embodiments are intended to provide a method and apparatus for preventing additional prediction errors when performing a second prediction on all prediction errors corresponding to a first prediction by performing a selective second prediction only on a portion of the prediction errors corresponding to a first prediction.
[0019] The embodiments aim to provide a method and apparatus for sufficiently reducing spatial repetition by reducing large prediction errors occurring in the prediction direction through transformation and quantization processes.
[0020] Solution
[0021] According to one aspect, an encoding method is provided, comprising: generating a residual signal of the current block based on a current block, a first prediction, and a second prediction; generating information about the encoded residual signal by encoding the residual signal, wherein the second prediction is a prediction of the prediction error in the first prediction.
[0022] According to another aspect, a decoding apparatus is provided, comprising: a reconstruction residual signal generation unit generating a reconstruction residual signal for a current block; and a reconstruction block generation unit generating a reconstruction block for the current block based on the reconstruction residual signal, a second prediction, and a first prediction.
[0023] According to another aspect, a decoding method is provided, comprising: generating a reconstructed residual signal for a current block; and generating a reconstructed block for the current block based on the reconstructed residual signal, a second prediction, and a first prediction.
[0024] The reconstructed block can correspond to the sum of the reconstructed residual signal, the first prediction signal generated by the first prediction, and the second prediction signal generated by the second prediction.
[0025] Both the first and second predictions can be intra-frame predictions.
[0026] The second prediction and the first prediction can have the same prediction direction.
[0027] The plurality of first reference blocks used for the first prediction and at least a portion of the plurality of second reference blocks used for the second prediction may be different from each other.
[0028] The type of the first reference block used for the first prediction can be different from the type of the second reference block used for the second prediction.
[0029] The first reference block used for the first prediction can be a neighboring reconstructed block adjacent to the current block.
[0030] The second reference block used for the second prediction can be a neighboring reconstruction residual block adjacent to the current block.
[0031] The neighboring reconstruction residual block can be the difference between the neighboring reconstruction block and the first prediction block for the neighboring reconstruction block.
[0032] The region of reference samples used for the second prediction can be a portion of the region of reference samples used for the first prediction.
[0033] The area to which the second prediction will be applied can be specified based on the range of reference samples that will be used for the second prediction.
[0034] The region to which the second prediction will be applied can be specified based on the prediction direction of the second prediction.
[0035] The range of reference samples can be specified based on information indicating the first reference sample to be used in the second prediction and information indicating the number of reference samples to be used in the second prediction.
[0036] The area to which the second prediction will be applied can be the area generated when a reference sample falling within the range moves in the prediction direction of the second prediction.
[0037] The values of reference samples falling outside the range can be considered empty or 0.
[0038] When the second prediction is not used, it may be omitted if the second prediction usage information indicates that the second prediction will not be used when encoding the current block.
[0039] When the prediction mode of the first prediction is a non-directional mode, the second prediction may not be used.
[0040] The second prediction may not be used when the current block is adjacent to both the top and left boundaries.
[0041] Boundaries can be the boundaries of a frame, the boundaries of a strip, or the boundaries of parallel blocks.
[0042] Whether a second prediction will be used can be determined based on the number of reconstructed blocks adjacent to the current block.
[0043] When the second prediction is not used, a reconstruction block can be generated based on the reconstructed residual signal and the first prediction signal generated via the first prediction.
[0044] Beneficial effects
[0045] A method and apparatus for reducing prediction errors based on prediction units due to prediction are provided.
[0046] A method and apparatus are provided to reduce prediction errors caused by the prediction direction of a prediction pattern.
[0047] A method and apparatus are provided for performing a selective second prediction on a prediction error corresponding to a first prediction made along a first prediction mode.
[0048] A method and apparatus are provided for performing a selective second prediction on a portion of the prediction error corresponding to a first prediction.
[0049] A method and apparatus are provided for performing a selective second prediction on a portion of the prediction error corresponding to a first prediction that has severe distortion.
[0050] A method and apparatus are provided to prevent additional prediction errors when performing a second prediction on all prediction errors corresponding to a first prediction by performing a selective second prediction only on a portion of the prediction errors corresponding to a first prediction.
[0051] The embodiments aim to provide a method and apparatus for sufficiently reducing spatial repetition by reducing large prediction errors occurring in the prediction direction through transformation and quantization processes. Attached Figure Description
[0052] Figure 1 This is a block diagram illustrating the configuration of an embodiment of an encoding device to which the present invention is applied;
[0053] Figure 2 This is a block diagram illustrating the configuration of an embodiment of the decoding device to which the present invention is applied;
[0054] Figure 3 It is a schematic diagram illustrating the partitioning structure of an image as it is encoded and decoded;
[0055] Figure 4 This is a diagram showing the shape of the prediction unit (PU) that the coding unit (CU) can include;
[0056] Figure 5 This is a diagram showing the shape of a transformation unit (TU) that can be included in a CU;
[0057] Figure 6 This is a diagram illustrating an embodiment used to explain the intra-frame prediction process;
[0058] Figure 7 It is a diagram used to explain the location of reference samples used in the intra-frame prediction process;
[0059] Figure 8 This is a diagram illustrating an embodiment used to explain the inter-frame prediction process;
[0060] Figure 9 This is a diagram illustrating the prediction error when the original image is predicted along the vertical direction according to an embodiment;
[0061] Figure 10 This is a configuration diagram of the encoding device according to an embodiment;
[0062] Figure 11This is a flowchart of the encoding method according to an embodiment;
[0063] Figure 12 This is a diagram illustrating the use of intra-frame prediction for first and second predictions according to an embodiment;
[0064] Figure 13 This is a flowchart of a residual block generation method according to an embodiment;
[0065] Figure 14 This is a flowchart of a reconstruction block generation method according to an embodiment;
[0066] Figure 15 This is a diagram illustrating the encoding process according to an embodiment;
[0067] Figure 16 This is a configuration diagram of the decoding device according to an embodiment;
[0068] Figure 17 This is a flowchart of the decoding method according to an embodiment;
[0069] Figure 18 This is a flowchart of a reconstruction block generation method according to an embodiment;
[0070] Figure 19 This is a diagram illustrating the decoding process according to an embodiment.
[0071] Best practice
[0072] The following exemplary embodiments will be described in detail with reference to the accompanying drawings, which illustrate specific embodiments. These embodiments are described to enable those skilled in the art to readily practice them. It should be noted that the various embodiments differ from one another but are not necessarily mutually exclusive. For example, the particular shapes, structures, and characteristics described herein may be implemented in other embodiments without departing from the spirit and scope of the various embodiments associated with one embodiment. Furthermore, 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 appended detailed description is not intended to limit the scope of this disclosure, and the scope of the exemplary embodiments is defined only by the appended claims and their equivalents (provided they are properly described).
[0073] In the accompanying drawings, similar reference numerals are used to designate the same or similar functions in various respects. The shape, size, etc., of the components in the drawings may be exaggerated for clarity of description.
[0074] It will be understood that when a component is referred to as being "connected" or "coupled" to another component, the component may be directly connected or coupled to the other component, or there may be an intermediate component. Furthermore, it should be noted that in exemplary embodiments, the expression describing a component as "comprising" a particular component means that other components may be included within the scope or spirit of the practice of the exemplary embodiments, but does not exclude the presence of components other than the particular component.
[0075] Terms such as "first" and "second" may be used to describe various components, but components are not limited by these terms. These terms are used only to distinguish one component from another. For example, without departing from the scope of this specification, a first component may be referred to as a second component. Similarly, a second component may be referred to as a first component.
[0076] Furthermore, the components described in the embodiments are shown independently to represent different functional features, but this does not mean that each component is formed by a single piece of hardware or software. That is, for ease of description, multiple components are arranged and included separately. For example, at least two of the multiple components may be integrated into a single component. Conversely, a component may be divided into multiple components. Embodiments in which multiple components are integrated or some components are separated are included within the scope of this specification, provided they do not depart from its spirit.
[0077] Furthermore, some components are not essential for performing necessary functions, but may be optional components used only to improve performance. Embodiments may be implemented using only the essential components necessary to achieve the essence of the embodiment. For example, a structure that includes only essential components and excludes optional components used only to improve performance is also included within the scope of the embodiments.
[0078] The embodiments will now be described in detail with reference to the accompanying drawings, enabling those skilled in the art to readily practice the embodiments. In the following description of the embodiments, detailed descriptions of well-known functions or configurations that are considered to obscure key points of this specification will be omitted.
[0079] In the following text, "image" may refer to a single frame that constitutes part of a video, or it may refer to the video itself. For example, "encoding and / or decoding of an image" may mean "encoding and / or decoding of a video," and may also mean "encoding and / or decoding of any one of the multiple images that constitute a video."
[0080] In the following text, the terms “video” and “moving footage” may be used to have the same meaning and may be used interchangeably.
[0081] In the following text, the terms “image,” “picture,” “frame,” and “screen” may be used to have the same meaning and may be used interchangeably.
[0082] In the following embodiments, specific information, data, flags, elements, and attributes may have their own values. The value 0 corresponding to each of the information, data, flags, elements, and attributes may indicate logical false or a first predefined value. In other words, the value "0" (logical false) and the first predefined value are interchangeable. The value "1" corresponding to each of the information, data, flags, elements, and attributes may indicate logical true or a second predefined value. In other words, the value "1" (logical true) and the second predefined value are interchangeable.
[0083] When variables such as i or j are used to indicate rows, columns, or indices, the value i can be an integer 0 or greater than 0, or an integer 1 or greater than 1. In other words, in the embodiments, each of the rows, columns, and indices can be counted starting from 0, or can be counted starting from 1.
[0084] The terminology used in the embodiments will be described below.
[0085] Unit: "Unit" can refer to a unit of image encoding and decoding. The terms "unit" and "block" can have the same meaning. Furthermore, the terms "unit" and "block" are interchangeable.
[0086] – A cell (or block) can be an M×N sample matrix. M and N can both be positive integers. The term "cell" typically refers to an array of two-dimensional (2D) samples. The term "sample" can be a pixel or a pixel value.
[0087] – The terms “pixel” and “sample” can be used to have the same meaning and are interchangeable.
[0088] In the process of image encoding and decoding, a "unit" can be a region created by partitioning an image. A single image can be partitioned into multiple units. During image encoding and decoding, predefined processing can be performed for each unit, depending on its type. Based on function, units can be classified as macrounits, coding units (CUs), prediction units (PUs), and transform units (TUs). A single unit can also be further partitioned into lower-level units with sizes smaller than the unit itself.
[0089] Cell partitioning information may include information about the depth of the cell. Depth information may indicate the number and / or extent to which the cell is partitioned.
[0090] A single unit can be hierarchically partitioned into multiple lower-level units, each possessing depth information based on a tree structure. In other words, the unit and the lower-level units created by partitioning that unit can correspond to a node and its child nodes, respectively. Each partitioned lower-level unit can possess depth information. The depth information of a unit indicates the number and / or degree to which the unit has been partitioned; therefore, the partitioning information of a lower-level unit can include information about the size of that lower-level unit.
[0091] In a tree structure, the top node corresponds to the initial node before partitioning. The top node can be called the "root node." Furthermore, the root node can have a minimum depth value. Here, the depth of the top node can be level "0".
[0092] – A node with a depth of level "1" can represent a cell created when the initial cell is partitioned once. A node with a depth of level "2" can represent a cell created when the initial cell is partitioned twice.
[0093] – Leaf nodes of depth “n” can represent the cells generated when the initial cells are partitioned n times.
[0094] – A leaf node can be a bottom node, and it cannot be further partitioned. The depth of a leaf node can be the maximum level. For example, a predefined value for the maximum level could be 3.
[0095] – Transform Unit (TU): A TU can be the basic unit for residual signal encoding and / or residual signal decoding (such as transform, inverse transform, quantization, dequantization, transform coefficient encoding, and transform coefficient decoding). A single TU can be partitioned into multiple TUs, wherein each of the multiple TUs has a smaller size.
[0096] – Prediction Unit (PU): A PU can be the basic unit in the execution of prediction or compensation. A PU can be partitioned into multiple partitions. These multiple partitions can also be the basic units in the execution of prediction or compensation. The partitions created by partitioning the PU can also be prediction units.
[0097] – Reconstructed neighboring units: Reconstructed neighboring units can be units that have been previously encoded or decoded and reconstructed near the target unit being encoded or decoded. Reconstructed neighboring units can be units that are spatially or temporally adjacent to the target unit.
[0098] – Prediction cell partitioning: Prediction cell partitioning can represent the shape of the PU being partitioned.
[0099] – Parameter set: The parameter set can correspond to header information about the structure of the bitstream. For example, the parameter set may include sequence parameter set, frame parameter set, adaptation parameter set, etc.
[0100] – Rate-distortion optimization: Encoding devices can use rate-distortion optimization to provide higher coding efficiency by utilizing a combination of the following: CU size, prediction mode, prediction cell size, motion information, and TU size.
[0101] – Rate-distortion optimization scheme: This scheme calculates the rate-distortion cost of each combination to select the optimal combination from these combinations. The rate-distortion cost can be calculated using Equation 1 below. Generally, the combination that minimizes the rate-distortion cost is selected as the optimal combination under the rate-distortion optimization method.
[0102] [Equation 1]
[0103]
[0104] Here, D can represent distortion. D can be the average of the squared differences (mean squared error) between the original transform coefficients and the reconstructed transform coefficients in the transform block.
[0105] R represents the bit rate, which can be represented using relevant context information.
[0106] R represents the Lagrange multiplier. It can include not only coding parameter information (such as prediction mode, motion information, and coding block flags), but also bits generated from encoding the transform coefficients.
[0107] Encoding devices perform processes such as inter-frame prediction and / or intra-frame prediction, transform, quantization, entropy coding, dequantization, and inverse transform in order to compute accurate D and R, but these processes greatly increase the complexity of the encoding device.
[0108] – Reference frame: A reference frame can be an image used for inter-frame prediction or motion compensation. A reference frame can be a frame that includes reference units referenced by the target unit to perform inter-frame prediction or motion compensation. The terms "frame" and "image" can have the same meaning. Therefore, the terms "frame" and "image" are interchangeable.
[0109] – Reference Frame List: The reference frame list can be a list that includes reference frames used for inter-frame prediction or motion compensation. The type of reference frame list can be a merged list (LC), list 0 (L0), list 1 (L1), etc.
[0110] – Motion Vector (MV): MV can be a 2D vector used for inter-frame prediction. For example, it can be expressed as (mv... x ,mv yMV is represented in the form of ) x It can indicate the horizontal component, mv y It can indicate the vertical component.
[0111] – MV can represent the offset between the target frame and the reference frame.
[0112] – Search Range: The search range can be a 2D region where a search for the MV is performed during inter-frame prediction. For example, the size of the search range can be M×N. M and N can both be positive integers.
[0113] Figure 1 This is a block diagram illustrating the configuration of an embodiment of an encoding device to which the present invention is applied.
[0114] Encoding device 100 can be a video encoding device or an image encoding device. Video may include one or more images (frames). Encoding device 100 can encode one or more images of the video sequentially over time.
[0115] Reference Figure 1 The encoding device 100 includes an inter-frame prediction unit 110, an intra-frame prediction unit 120, a switcher 115, a subtractor 125, a transform unit 130, a quantization unit 140, an entropy coding unit 150, an inverse quantization unit 160, an inverse transform unit 170, an adder 175, a filtering unit 180, and a reference frame buffer 190.
[0116] The encoding device 100 can perform encoding on the input image in intra-frame mode and / or inter-frame mode. The input image may be referred to as the "current image" as the target to be encoded.
[0117] Furthermore, the encoding device 100 can generate a bit stream including information about the encoding by encoding the input image, and can output the generated bit stream.
[0118] When intra-frame mode is used, switcher 115 can switch to intra-frame mode. When inter-frame mode is used, switcher 115 can switch to inter-frame mode.
[0119] The encoding device 100 can generate prediction blocks for input blocks in the input image. Furthermore, after generating the prediction blocks, the encoding device 100 can encode the residual between the input blocks and the prediction blocks. The input block can be referred to as the "current block" as the target to be encoded.
[0120] When the prediction mode is intra-frame mode, the intra-frame prediction unit 120 can use the pixel values of previously encoded neighboring blocks around the current block as reference pixels. The intra-frame prediction unit 120 can use the reference pixels to perform spatial prediction on the current block and generate prediction samples for the current block via spatial prediction.
[0121] The inter-frame prediction unit 110 may include a motion prediction unit and a motion compensation unit.
[0122] When the prediction mode is inter-frame mode, the motion prediction unit can search for the region in the reference image that best matches the current block during motion prediction, and can derive motion vectors for the current block and the found region. The reference image can be stored in the reference frame buffer 190. More specifically, the reference image can be stored in the reference frame buffer 190 when the encoding and / or decoding of the reference image is processed.
[0123] The motion compensation unit generates prediction blocks by performing motion compensation using motion vectors. Here, the motion vectors can be two-dimensional (2D) vectors used for inter-frame prediction. Furthermore, the motion vectors can represent the offset between the current image and the reference image.
[0124] Subtractor 125 generates a residual block, which is the residual between the input block and the prediction block. The residual block is also referred to as the "residual signal".
[0125] Transform unit 130 can generate transform coefficients by transforming the residual block and can output the generated transform coefficients. Here, the transform coefficients can be coefficient values generated by transforming the residual block. When using transform skip mode, transform unit 130 can omit the operation of transforming the residual block.
[0126] By quantizing the transform coefficients, a quantized transform coefficient level can be generated. Here, in the embodiment, the quantized transform coefficient level can also be referred to as the "transform coefficient".
[0127] The quantization unit 140 can generate quantized transform coefficient levels by quantizing the transform coefficients according to quantization parameters. The quantization unit 140 can output the quantized transform coefficient levels. In this case, the quantization unit 140 can use a quantization matrix to quantize the transform coefficients.
[0128] The entropy coding unit 150 can generate a bitstream by performing probability-based entropy coding based on values calculated by the quantization unit 140 and / or coding parameter values calculated during the encoding process. The entropy coding unit 150 can output the generated bitstream.
[0129] In addition to the pixel information of the image, the entropy coding unit 150 can also perform entropy coding on the information required to decode the image. For example, the information required to decode the image may include syntax elements, etc.
[0130] Encoding parameters can be information required for encoding and / or decoding. Encoding parameters may include information encoded by the encoding device and transmitted to the decoding device, and may also include information derived during the encoding or decoding process. For example, information transmitted to the decoding device may include syntax elements.
[0131] For example, the encoding device may include values or statistics such as prediction mode, motion vectors, reference frame index, coded block pattern, presence or absence of residual signals, transform coefficients, quantized transform coefficients, quantization parameters, block size, and block partitioning information. The prediction mode can be an intra-frame prediction mode or an inter-frame prediction mode.
[0132] The residual signal can represent the difference between the original signal and the predicted signal. Optionally, the residual signal can be a signal generated by transforming the difference between the original signal and the predicted signal. Optionally, the residual signal can be a signal generated by transforming and quantizing the difference between the original signal and the predicted signal. The residual block can be a block-based residual signal.
[0133] When applying entropy coding, fewer bits can be allocated to more frequently occurring symbols, and more bits can be allocated to less frequently occurring symbols. Because symbols are represented through this allocation, the size of the bit string used to encode the target symbol can be reduced. Therefore, entropy coding can improve the compression performance of video coding.
[0134] Furthermore, for entropy coding, coding methods such as Exponential Golomb, Context Adaptive Variable Length Coding (CAVLC), or Context Adaptive Binary Arithmetic Coding (CABAC) can be used. For example, entropy coding unit 150 can use a variable length code / code (VLC) table to perform entropy coding. For example, entropy coding unit 150 can derive a binarization method for the target symbol. Furthermore, entropy coding unit 150 can derive a probabilistic model for the target symbol / bit. Entropy coding unit 150 can use the derived binarization method or probabilistic model to perform entropy coding.
[0135] Since the encoding device 100 performs encoding via inter-frame prediction, the encoded current image can be used as a reference image for another image to be processed subsequently. Therefore, the encoding device 100 can decode the encoded current image and store the decoded image as a reference image. For decoding, inverse quantization and inverse transform of the encoded current image can be performed.
[0136] The quantized coefficients can be dequantized by the dequantization unit 160 and inverse transformed by the inverse transform unit 170. The dequantized and inverse transformed coefficients can be added to the prediction block by the adder 175. The dequantized and inverse transformed coefficients are then added to the prediction block to generate the reconstructed block.
[0137] The reconstructed blocks can be filtered by the filtering unit 180. The filtering unit 180 can apply one or more filters, including a deblocking filter, a sample adaptive offset (SAO) filter, and an adaptive loop filter (ALF), to the reconstructed blocks or reconstructed images. The filtering unit 180 may also be referred to as an "adaptive in-loop filter".
[0138] Deblocking filters eliminate block distortion at block boundaries. SAO filters add appropriate offset values to pixel values to compensate for coding errors. ALF filters perform filtering based on comparisons between reconstructed and original blocks. Reconstructed blocks filtered by filtering unit 180 can be stored in reference frame buffer 190.
[0139] Figure 2 This is a block diagram illustrating the configuration of an embodiment of the decoding device to which the present invention is applied.
[0140] Decoding device 200 can be a video decoding device or an image decoding device.
[0141] Reference Figure 2 The decoding device 200 may include an entropy decoding unit 210, an inverse quantization unit 220, an inverse transform unit 230, an intra-frame prediction unit 240, an inter-frame prediction unit 250, an adder 255, a filtering unit 260, and a reference frame buffer 270.
[0142] Decoding device 200 can receive a bitstream output from encoding device 100. Decoding device 200 can perform decoding on the bitstream in intra-frame mode and / or inter-frame mode. Furthermore, decoding device 200 can generate a reconstructed image via decoding and can output the reconstructed image.
[0143] For example, a switcher can be used to switch between intra-frame mode and inter-frame mode based on the prediction mode used for decoding. When the prediction mode used for decoding is intra-frame mode, the switcher can be operated to switch to intra-frame mode. When the prediction mode used for decoding is inter-frame mode, the switcher can be operated to switch to inter-frame mode.
[0144] The decoding device 200 can obtain reconstructed residual blocks from the input bitstream and can generate prediction blocks. When the reconstructed residual blocks and prediction blocks are obtained, the decoding device 200 can generate reconstructed blocks by adding the reconstructed residual blocks to the prediction blocks.
[0145] The entropy decoding unit 210 can generate symbols by performing entropy decoding on the bitstream based on a probability distribution. The generated symbols may include quantized coefficient format symbols. Here, the entropy decoding method can be similar to the entropy encoding method described above. That is, the entropy decoding method can be the inverse process of the entropy encoding method described above.
[0146] The quantized coefficients can be dequantized by the dequantization unit 220. Furthermore, the dequantized coefficients can be inversely transformed by the inverse transform unit 230. As a result of the dequantization and inverse transform of the quantized coefficients, a reconstructed residual block can be generated. Here, the dequantization unit 220 can apply the quantization matrix to the quantized coefficients.
[0147] When using intra-frame mode, intra-frame prediction unit 240 can generate a prediction block by performing spatial prediction using the pixel values of previously encoded neighboring blocks around the current block.
[0148] The inter-frame prediction unit 250 may include a motion compensation unit. When using inter-frame mode, the motion compensation unit 250 can generate prediction blocks by performing motion compensation using motion vectors and a reference image. The reference image may be stored in a reference frame buffer 270.
[0149] The reconstructed residual block and the predicted block can be added to each other by adder 255. Adder 255 produces a reconstructed block by adding the reconstructed residual block and the predicted block.
[0150] The reconstructed blocks can be filtered by the filtering unit 260. The filtering unit 260 can apply one or more of a deblocking filter, a SAO filter, and an ALF filter to the reconstructed blocks or reconstructed frames. The filtering unit 260 can output a reconstructed image (frame). The reconstructed image can be stored in the reference frame buffer 270 and can then be used for inter-frame prediction.
[0151] Figure 3 This is a schematic diagram illustrating the image partitioning structure when an image is encoded and decoded.
[0152] To effectively partition an image, coding units (CUs) can be used in encoding and decoding. The term "unit" can be used to specify both 1) a block that comprises image samples and 2) a syntax element. For example, "partition of a unit" can mean "partition of a block corresponding to a unit".
[0153] Reference Figure 3 Image 300 is sequentially partitioned into units corresponding to maximum coding units (LCUs), and the partitioning structure of image 300 can be determined based on the LCUs. Here, LCU can be used to have the same meaning as coding tree unit (CTU).
[0154] The partitioning structure represents the distribution of coding units (CUs) in the LCU 310 used for effective encoding of an image. This distribution can be determined based on whether a single CU will be partitioned into four CUs. The horizontal and vertical dimensions of each CU resulting from partitioning can be half the horizontal and vertical dimensions of the CU before partitioning. Each partitioned CU can be recursively partitioned into four CUs, and in the same manner, the horizontal and vertical dimensions of the four CUs are halved.
[0155] Here, the partitioning of the CU can be performed recursively until a predefined depth is reached. Depth information can be information indicating the size of the CU. Depth information can be stored for each CU. For example, the depth of the LCU can be 0, and the depth of the smallest coding unit (SCU) can be a predefined maximum depth. Here, as mentioned above, the LCU can be a CU with the maximum coding unit size, and the SCU can be a CU with the minimum coding unit size.
[0156] Partitioning begins at LCU 310. The depth of a CU can be increased by "1" whenever its horizontal and vertical dimensions are halved through partitioning. For each depth, an unpartitioned CU can have a size of 2N×2N. Furthermore, when a CU is partitioned, a 2N×2N CU can be partitioned into four CUs, each with a size of N×N. The size N is halved each time the depth increases by 1.
[0157] Reference Figure 3 An LCU with a depth of 0 can have 64×64 pixels. 0 can be the minimum depth. An SCU with a depth of 3 can have 8×8 pixels. 3 can be the maximum depth. Here, a CU with 64×64 pixels as an LCU can be represented by depth 0. A CU with 32×32 pixels can be represented by depth 1. A CU with 16×16 pixels can be represented by depth 2. A CU with 8×8 pixels as an SCU can be represented by depth 3.
[0158] Furthermore, information about whether a corresponding CU is partitioned can be represented using the CU's partition information. Partition information can be 1 bit. All CUs except the SCU can include partition information. For example, when a CU is not partitioned, the value of its partition information can be 0. When a CU is partitioned, the value of its partition information can be 1.
[0159] Figure 4 This is a diagram showing the shape of the prediction unit (PU) that the coding unit (CU) can include.
[0160] Within the control units (CUs) partitioned from the control unit (LCU), CUs that are no longer partitioned can be divided into one or more prediction units (PUs). This partitioning can also be referred to as "partitioning".
[0161] A PU (Program Unit) can be the basic unit used for prediction. A PU can be encoded and decoded in any of the following modes: skip mode, inter-frame mode, and intra-frame mode. A PU can be partitioned into various shapes according to each mode.
[0162] In skip mode, partitioning may not be required in the CU. Skip mode also supports a 2N×2N mode 410 without partitioning, where the PU and CU have the same size.
[0163] In inter-frame mode, eight types of partition shapes can exist in the CU. For example, in inter-frame mode, 2N×2N mode 410, 2N×N mode 415, N×2N mode 420, N×N mode 425, 2N×nU mode 430, 2N×nD mode 435, nL×2N mode 440 and nR×2N mode 445 are supported.
[0164] In intra-frame mode, 2N×2N mode 410 and N×N mode 425 are supported.
[0165] In 2N×2N mode 410, a PU with a size of 2N×2N can be encoded. A PU with a size of 2N×2N can represent a PU with the same size as the CU. For example, a PU with a size of 2N×2N can have a size of 64×64, 32×32, 16×16, or 8×8.
[0166] In N×N mode 425, PUs with an N×N size can be encoded.
[0167] For example, in intra-frame prediction, when the PU size is 8×8, the PUs from four partitions can be encoded. The size of the PU from each partition can be 4×4.
[0168] When encoding a PU in intra-frame mode, the PU can be encoded using any of several intra-frame prediction modes. For example, HEVC technology provides 35 intra-frame prediction modes, and the PU can be encoded in any of these 35 intra-frame prediction modes.
[0169] The rate-distortion cost can be used to determine which of the 2N×2N modes 410 and N×N modes 425 will be used to encode the PU.
[0170] Encoding device 100 can perform encoding operations on a PU of size 2N×2N. Here, the encoding operation can be an operation of encoding the PU in each of a plurality of intra-prediction modes that can be used by encoding device 100. Through the encoding operation, the optimal intra-prediction mode for the PU of size 2N×2N can be obtained. The optimal intra-prediction mode can be the intra-prediction mode that incurs the minimum rate-distortion cost when encoding the PU of size 2N×2N among the plurality of intra-prediction modes that can be used by encoding device 100.
[0171] Furthermore, the encoding device 100 can sequentially perform encoding operations on each PU obtained by performing N×N partitioning. Here, the encoding operation can be an operation of encoding the PU in each of a plurality of intra-prediction modes that can be used by the encoding device 100. Through the encoding operation, the optimal intra-prediction mode for the N×N PU can be obtained. The optimal intra-prediction mode can be the intra-prediction mode that produces the minimum rate-distortion cost when encoding the N×N PU among the plurality of intra-prediction modes that can be used by the encoding device 100.
[0172] The encoding device 100 can determine which of the PUs, one of size 2N×2N and one of size N×N, will be encoded based on a comparison between the rate-distortion cost of a PU of size 2N×2N and the rate-distortion cost of a PU of size N×N.
[0173] Figure 5 This is a diagram showing the shape of a transformation unit (TU) that can be included in a CU.
[0174] A transform unit (TU) is a basic unit in a CU used for processes such as transform, quantization, inverse transform, dequantization, entropy coding, and entropy decoding. A TU can have a square or rectangular shape.
[0175] Within a CU partitioned from an LCU, CUs that are no longer designated as CUs can be partitioned into one or more TUs. Here, the partitioning structure of a TU can be a quadtree structure. For example, ... Figure 5 As shown, a single CU 510 can be partitioned once or more according to a quadtree structure. Through this partitioning, a single CU 510 can be composed of TUs of various sizes.
[0176] Figure 6 This is a diagram illustrating an embodiment used to explain the intra-frame prediction process.
[0177] from Figure 6 The radially extending arrow from the center of the diagram indicates the prediction direction of the intra-prediction mode. Furthermore, the numbers shown near the arrows represent examples of mode values assigned to the intra-prediction mode or the prediction direction assigned to the intra-prediction mode.
[0178] Intra-frame coding and / or decoding can be performed using reference samples from cells adjacent to the target cell. A neighboring cell can be a neighboring reconstructed cell. For example, intra-frame coding and / or decoding can be performed using the values of reference samples included in each neighboring reconstructed cell or the coding parameters of the neighboring reconstructed cells.
[0179] Encoding device 100 and / or decoding device 200 can generate prediction blocks by performing intra-frame prediction on target units based on information about samples in the current frame. When intra-frame prediction is performed, encoding device 100 and / or decoding device 200 can generate prediction blocks for target units by performing intra-frame prediction based on information about samples in the current frame. When intra-frame prediction is performed, encoding device 100 and / or decoding device 200 can perform directional prediction and / or non-directional prediction based on at least one reconstructed reference sample.
[0180] A prediction block can represent a block generated as a result of performing intra-frame prediction. A prediction block can correspond to at least one of CU, PU, and TU.
[0181] The cells of the prediction block may have a size corresponding to at least one of CU, PU, and TU. The prediction block may have a square shape with a size of 2N×2N or N×N. The size N×N may include sizes such as 4×4, 8×8, 16×16, 32×32, 64×64, etc.
[0182] Optionally, the prediction block can be a square block with a size of 2×2, 4×4, 16×16, 32×32, 64×64, etc., or a rectangular block with a size of 2×8, 4×8, 2×16, 4×16, 8×16, etc.
[0183] Intra-prediction can be performed based on the intra-prediction mode used for the target cell. The number of intra-prediction modes that a target cell can have can be a predefined fixed value, or it can be a value determined differently based on the attributes of the prediction block. For example, the attributes of the prediction block may include the size of the prediction block, the type of the prediction block, etc.
[0184] For example, the number of intra-prediction modes can be fixed at 35, regardless of the size of the prediction cell. Alternatively, the number of intra-prediction modes can be, for example, 3, 5, 9, 17, 34, 35, or 36.
[0185] like Figure 6 As shown, the intra-frame prediction modes can include two non-directional modes and 33 directional modes. The two non-directional modes can include DC mode and planar mode.
[0186] For example, in the vertical mode with a mode value of 26, prediction can be performed along the vertical direction based on the pixel values of the reference sample. Similarly, in the horizontal mode with a mode value of 10, prediction can be performed along the horizontal direction based on the pixel values of the reference sample. And again, in the vertical mode with a mode value of 26, prediction can be performed along the vertical direction based on the pixel values of the reference sample.
[0187] Even in orientation modes other than those described above, the encoding device 100 and the decoding device 200 can still perform intra-frame prediction on the target cell using reference samples based on the angle corresponding to the orientation mode.
[0188] Intra-prediction modes located to the right of the vertical mode can be called "vertical-right mode". Intra-prediction modes located below the horizontal mode can be called "horizontal-bottom mode". For example, in Figure 6 In the frame, an intra-prediction mode with a mode value of 27, 28, 29, 30, 31, 32, 33, and 34 can be a vertical-right mode 613. An intra-prediction mode with a mode value of 2, 3, 4, 5, 6, 7, 8, and 9 can be a horizontal-down mode 616.
[0189] Non-directional modes can include DC mode and planar mode. For example, the mode value for DC mode can be 1. The mode value for planar mode can be 0.
[0190] Orientation modes can include corner modes. Among various intra-frame prediction modes, modes other than DC mode and planar mode can be orientation modes.
[0191] In DC mode, a prediction block can be generated based on the average pixel values of multiple reference samples. For example, the pixel values of the prediction block can be determined based on the average pixel values of multiple reference samples.
[0192] The number of intra-prediction modes and the mode values of each intra-prediction mode described above are merely exemplary. The number of intra-prediction modes and the mode values of each intra-prediction mode described above may be defined differently depending on the embodiment, implementation, and / or requirements.
[0193] The number of intra-frame prediction modes can vary depending on the type of color component. For example, the number of prediction modes can vary depending on whether the color component is a luma signal or a chroma signal.
[0194] Figure 7 It is a diagram used to explain the location of reference samples used in intra-frame prediction.
[0195] Figure 7 The locations of reference samples used for intra-frame prediction of the target cell are shown. (Refer to...) Figure 7The reconstruction reference samples used for intra-frame prediction of the current block may include, for example, the lower left reference sample 731, the left reference sample 733, the upper left reference sample 735, the upper reference sample 737, and the upper right reference sample 739.
[0196] For example, left reference sample 733 may represent a reconstructed reference sample adjacent to the left side of the target cell. Top reference sample 737 may represent a reconstructed reference sample adjacent to the top of the target cell. Top-left reference sample 735 may represent a reconstructed reference sample located at the top-left corner of the target cell. Bottom-left reference sample 731 may represent a reference sample located below the left sample line formed by left reference sample 733, among the samples on that line. Top-right reference sample 739 may represent a reference sample located to the right of the top sample line, among the samples on the same line as the top sample line formed by top reference sample 737.
[0197] When the size of the target cell is N×N, the number of reference samples 731 at the lower left, 733 at the left, 737 at the top, and 739 at the upper right can all be N.
[0198] A prediction block can be generated by performing intra-frame prediction on the target cell. The process of generating a prediction block may include determining the values of the pixels in the prediction block. The target cell and the prediction block can have the same size.
[0199] The reference sample used for intra-prediction of the target cell can be changed according to the intra-prediction mode of the target cell. The direction of the intra-prediction mode can represent the dependency between the reference sample and the pixels of the prediction block. For example, the value of a specified reference sample can be used as the value of one or more specified pixels in the prediction block. In this case, the specified reference sample and the one or more specified pixels in the prediction block can be samples and pixels located on a straight line along the direction of the intra-prediction mode. In other words, the value of the specified reference sample can be copied as the value of a pixel located in the direction opposite to the direction of the intra-prediction mode. Optionally, the value of a pixel in the prediction block can be the value of a reference sample located in the direction of the intra-prediction mode relative to the position of that pixel.
[0200] In one example, when the intra-prediction mode of the target cell is the vertical mode with a mode value of 26, the upper reference sample 737 can be used for intra-prediction. When the intra-prediction mode is vertical, the value of a pixel in the prediction block can be the value of a reference pixel vertically above that pixel. Therefore, the upper reference sample 737 adjacent to the top of the target cell can be used for intra-prediction. Furthermore, the value of a pixel in a row of the prediction block can be the same as the value of the pixel at the upper reference sample 737.
[0201] In one example, when the intra-prediction mode of the current block is the horizontal mode with a mode value of 10, the left reference sample 733 can be used for intra-prediction. When the intra-prediction mode is horizontal, the value of a pixel in the prediction block can be the value of a reference pixel horizontally to the left of that pixel. Therefore, the left reference sample 733 adjacent to the left of the target cell can be used for intra-prediction. Furthermore, the value of a pixel in a column of the prediction block can be the same as the value of the pixel in the left reference sample 733.
[0202] In one example, when the mode value of the intra-prediction mode for the current block is 18, at least some of the left reference samples 733, the top-left reference sample 735, and the top reference sample 737 can be used for intra-prediction. When the mode value of the intra-prediction mode is 18, the value of a pixel in the prediction block can be the value of a reference pixel located diagonally to the top-left corner of that pixel.
[0203] Furthermore, when an intra-prediction mode with mode values corresponding to 27, 28, 29, 30, 31, 32, 33 or 34 is used, at least some of the upper right reference samples 739 can be used for intra-prediction.
[0204] Furthermore, when an intra-prediction mode with mode values corresponding to 2, 3, 4, 5, 6, 7, 8, or 9 is used, at least some of the lower left reference samples 731 can be used for intra-prediction.
[0205] Furthermore, when an intra-prediction mode with a corresponding mode value of any one of 11 to 25 is used, the upper left reference sample 735 can be used for intra-prediction.
[0206] The number of reference samples used to determine the pixel value of a pixel in the prediction block can be 1, 2, or more.
[0207] As described above, the pixel value of a pixel in a prediction block can be determined based on the pixel's position and the position of a reference sample indicated by the direction of the intra-prediction mode. When both the pixel's position and the position of the reference sample indicated by the direction of the intra-prediction mode are integer positions, the value of a reference sample indicated by the integer position can be used to determine the pixel value of the pixel in the prediction block.
[0208] When the pixel position and the position of the reference sample indicated by the direction of the intra-prediction mode are not integer positions, an interpolated reference sample can be generated based on the two reference samples closest to that reference sample position. The value of the interpolated reference sample can be used to determine the pixel value of the pixel in the prediction block. In other words, when the pixel position in the prediction block and the position of the reference sample indicated by the direction of the intra-prediction mode indicate the position between two reference samples, an interpolated value based on the values of those two samples can be generated.
[0209] The predicted block generated by prediction may differ from the original target cell. In other words, there may be prediction errors, which are the differences between the target cell and the predicted cell, and there may also be prediction errors between the pixels of the target cell and the pixels of the predicted block. For example, in the case of directional intra-frame prediction, the greater the distance between the pixels of the predicted block and the reference sample, the greater the possible prediction error. Such prediction errors can lead to discontinuities between the generated predicted block and its neighboring blocks.
[0210] To reduce prediction error, filtering operations can be used for prediction blocks. These filtering operations can be configured to adaptively apply filters to regions within the prediction block that are considered to have large prediction errors. For example, regions considered to have large prediction errors could be the boundaries of the prediction block. Furthermore, the regions within the prediction block considered to have large prediction errors can vary depending on the intra-prediction mode, and the characteristics of the filters can also vary depending on the intra-prediction mode.
[0211] Figure 8 This is a diagram illustrating an embodiment used to explain the intra-frame prediction process.
[0212] Figure 8 The rectangles shown can represent images (or screens). Furthermore, in... Figure 8 In the image, the arrow indicates the prediction direction. That is, each image can be encoded and / or decoded based on the prediction direction.
[0213] Images (or frames) can be classified according to their encoding type into intra-frame frames (I-frames), one-way predictive frames or predictive-coded frames (P-frames), and two-way predictive frames or two-way predictive-coded frames (B-frames). Each frame can be encoded according to its encoding type.
[0214] When the image to be encoded is an I-frame, the image itself can be encoded without inter-frame prediction. When the image to be encoded is a P-frame, it can be encoded via inter-frame prediction using only reference frames in the forward direction. When the image to be encoded is a B-frame, it can be encoded via inter-frame prediction using reference frames in both the forward and backward directions, or via inter-frame prediction using reference frames in either the forward or backward direction.
[0215] P-frames and B-frames that are encoded and / or decoded using reference frames can be considered as images using inter-frame prediction.
[0216] The following will describe in detail the inter-frame prediction in inter-frame mode according to the embodiments.
[0217] In inter-frame mode, encoding device 100 and decoding device 200 can perform prediction and / or motion compensation on encoded target units and decoded target units. For example, encoding device 100 or decoding device 200 can perform prediction and / or motion compensation by using motion information of neighboring reconstructed blocks as motion information of encoded target units or decoded target units. Here, the encoded target unit or the decoded target unit may represent a prediction unit and / or a prediction unit partition.
[0218] Inter-frame prediction can be performed using reference frames and motion information. Furthermore, inter-frame prediction can utilize the skip modes described above.
[0219] The reference frame can be at least one frame preceding or following the current frame. Here, inter-frame prediction can be performed on blocks in the current frame based on the reference frame. Here, the reference frame can represent the image used to predict the blocks.
[0220] Here, a region in the reference frame can be specified by using the reference frame index refIdx, which indicates the reference frame, and the motion vector, which will be described later.
[0221] Inter-frame prediction can select a reference frame and a reference block within that reference frame corresponding to the current block, and can use the selected reference block to generate a prediction block for the current block. The current block can be a block within the current frame that is the target to be encoded or decoded.
[0222] Motion information can be derived by each of the encoding device 100 and the decoding device 200 during inter-frame prediction. Furthermore, the derived motion information can be used to perform inter-frame prediction.
[0223] Here, the encoding device 100 and the decoding device 200 can improve encoding efficiency and / or decoding efficiency by using motion information of neighboring reconstructed blocks and / or motion information of col blocks (col blocks). A col block can be a block corresponding to the current block in a previously reconstructed col frame (col frame).
[0224] A neighboring reconstructed block can be a block existing in the current frame, and can be a block that has previously been reconstructed via encoding and / or decoding. A reconstructed block can be a neighboring block adjacent to the current block and / or a block located at the outer corner of the current block. Here, "a block located at the outer corner of the current block" can mean a block that is vertically adjacent to a neighboring block that is horizontally adjacent to the current block, or a block that is horizontally adjacent to a neighboring block that is vertically adjacent to the current block.
[0225] For example, a neighboring reconstruction unit (block) can be a unit located to the left of the target unit, a unit located above the target unit, a unit located at the lower left corner of the target unit, a unit located at the upper right corner of the target unit, or a unit located at the upper left corner of the target unit.
[0226] Each of the encoding device 100 and the decoding device 200 can determine a block in the col frame that exists at a spatial position corresponding to the current block, and can determine a predefined relative position based on the determined block. The predefined relative position can be an internal and / or external position of the block existing at the spatial position corresponding to the current block. Furthermore, each of the encoding device 100 and the decoding device 200 can deduce the col block based on the determined predefined relative position. Here, the col frame can be any one of one or more reference frames included in the reference frame list.
[0227] A block in the reference frame can exist at a spatially corresponding position in the reconstructed reference frame. In other words, the position of the current block in the current frame and the position of the block in the reference frame can correspond to each other. Hereinafter, the motion information of the blocks included in the reference frame may be referred to as "temporal motion information".
[0228] The method used to derive motion information can vary depending on the prediction mode of the current block. For example, as prediction modes applied to inter-frame prediction, there may be Advanced Motion Vector Prediction Factor (AMVP) mode, merging mode, etc.
[0229] For example, when the AMVP mode is used as the prediction mode, each of the encoding device 100 and the decoding device 200 can use the motion vectors of neighboring reconstructed blocks and / or the motion vectors of col blocks to generate a candidate list of prediction motion vectors. The motion vectors of neighboring reconstructed blocks and / or the motion vectors of col blocks can be used as candidates for prediction motion vectors.
[0230] The bitstream generated by encoding device 100 may include a predicted motion vector index. The predicted motion vector index may represent the best predicted motion vector selected from the predicted motion vector candidates included in the predicted motion vector candidate list. The predicted motion vector index can be transmitted from encoding device 100 to decoding device 200 via the bitstream.
[0231] The decoding device 200 can use the predicted motion vector index to select the predicted motion vector of the current block from the predicted motion vector candidates included in the predicted motion vector candidate list.
[0232] Encoding device 100 can calculate the motion vector difference (MVD) between the motion vector of the current block and the predicted motion vector, and can encode the MVD. The bitstream can include the encoded MVD. The MVD can be sent from encoding device 100 to decoding device 200 via the bitstream. Here, decoding device 200 can decode the received MVD. Decoding device 200 can use the sum of the decoded MVD and the predicted motion vector to deduce the motion vector of the current block.
[0233] The bitstream may include a reference frame index, etc., for indicating a reference frame. The reference frame index can be sent from the encoding device 100 to the decoding device 200 via the bitstream. The decoding device 200 can use motion information of neighboring blocks to predict the motion vector of the current block, and can use the difference between the predicted motion vector and the motion vector (MVD) to deduce the motion vector of the current block. The decoding device 200 can generate a predicted block for the current block based on the deduced motion vector and the reference frame index information.
[0234] Since motion information from neighboring reconstructed blocks can be used to encode and decode the target unit, the encoding device 100 may not encode the motion information of the target unit separately in a specific inter-frame prediction mode. If the motion information of the target unit is not encoded, the number of bits sent to the decoding device 200 can be reduced, and encoding efficiency can be improved. For example, skip modes and / or merge modes may exist as inter-frame prediction modes that do not encode the motion information of the target unit. Here, each of the encoding device 100 and the decoding device 200 may use an identifier and / or index indicating one of a plurality of neighboring reconstructed blocks, wherein the motion information of said neighboring reconstructed block will be used as the motion information of the target unit.
[0235] There exists a merging method as another example of a method for deriving motion information. The term "merging" can refer to merging the motion of multiple blocks. The term "merging" can also 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 can use the motion information of neighboring reconstructed blocks and / or the motion information of the col block to generate a list of merging candidates. The motion information may include at least one of the following: 1) motion vector, 2) index of the reference image, and 3) prediction direction. The prediction direction can be unidirectional or bidirectional.
[0236] Here, merging can be applied on either the CU or PU basis. When merging is performed on either the CU or PU basis, the encoding device 100 can send predefined information to the decoding device 200 via a bitstream. The bitstream can include the predefined information. The predefined information can include: 1) information about whether merging is performed on each block partition, and 2) information about the neighboring blocks among the multiple adjacent blocks of the current block that will be used to perform the merging. For example, the neighboring blocks of the current block can include the left neighboring block of the current block, the upper neighboring block of the current block, the time-adjacent block of the current block, etc.
[0237] The merge candidate list can represent a list storing multiple pieces of motion information. Furthermore, the merge candidate list can be generated before performing the merge. The motion information stored in the merge candidate list can be 1) motion information of neighboring blocks adjacent to the current block and 2) motion information of corresponding blocks in the reference image. Additionally, the motion information stored in the merge candidate list can be new motion information generated by combining multiple pieces of motion information previously existing in the merge candidate list.
[0238] A skip mode can be a mode that applies information about neighboring blocks to the current block without alteration. The skip mode can be one of several modes used for inter-frame prediction. When a skip mode is used, the encoding device 100 can send only information about blocks to the decoding device 200 via the bitstream, wherein the motion information of those blocks will be used as the motion information for the current block. The encoding device 100 may not send other information to the decoding device 200. For example, the other information may be syntax information. Syntax information may include motion vector difference (MVD) information.
[0239] Figure 9 The prediction error when predicting the original image in the vertical direction according to an embodiment is shown.
[0240] As described above, when encoding the original image via intra-frame prediction, a single PU and a single prediction mode can be selected after operations on all possible PUs and prediction modes have been performed. When prediction of the original image is performed based on the selected PU and the selected prediction mode, it is found that the distortion of the prediction error tends to remain in the direction of the prediction mode.
[0241] Therefore, a first intra-frame prediction (i.e., primary prediction) can be performed on the PU using a prediction mode selected from multiple prediction modes, and a second intra-frame prediction (i.e., secondary prediction) can also be performed. Here, the second intra-frame prediction can be an intra-frame prediction within a pixel region specified in the direction of the prediction mode of the first intra-frame prediction. In other words, the prediction mode of the second intra-frame prediction can be the same as the prediction mode of the first intra-frame prediction. Optionally, the first intra-frame prediction can be applied to the entire PU, but the second intra-frame prediction can be applied to only a portion of the PU.
[0242] The encoding device can determine the portion of the PU to which the second intra-frame prediction will be applied. For example, when the second intra-frame prediction is applied to multiple candidate regions, the encoding device can calculate individual rate-distortion costs for the multiple candidate regions. The encoding device can determine the candidate region with the minimum rate-distortion cost as the portion of the PU to which the second intra-frame prediction will be applied.
[0243] A PU may include multiple pixels. The multiple candidate regions may be a portion of the multiple pixels in the PU, which can be determined according to a specific scheme. For example, the multiple candidate regions may be determined by the prediction direction predicted within the first frame.
[0244] Compared to applying only the first intra-frame prediction, applying both the first and second intra-frame predictions can further reduce prediction errors in the PU.
[0245] The following embodiments provide a method and apparatus for improving the performance of intra-frame prediction and reducing prediction errors by effectively utilizing the aforementioned trends.
[0246] Figure 10 This is a configuration diagram of an encoding device according to an embodiment.
[0247] The encoding device 1000 can be a general-purpose computer system that performs encoding.
[0248] like Figure 10 As shown, the encoding device 100 may include at least one processor 1010, a memory 1030, a user interface (UI) input device 1050, a UI output device 1060, and a storage device 1040 that communicate with each other via a bus 1090. The electronic device 1000 may also include a communication unit 1020 connected to a network 1099. The processor 1010 may be a central processing unit (CPU) or a semiconductor device for executing processing instructions stored in the memory 1030 or the storage device 1040. Each of the memory 1010 and the storage device 1040 may be any of a variety of volatile or non-volatile storage media. For example, the memory may include at least one of a read-only memory (ROM) 1031 and a random access memory (RAM) 1032.
[0249] The processor 1010 may include an inter-frame prediction unit 110, an intra-frame prediction unit 120, a switcher 115, a subtractor 125, a transform unit 130, a quantization unit 140, an entropy coding unit 150, an inverse quantization unit 160, an inverse transform unit 170, an adder 175, a filtering unit 180, and a reference frame buffer 190 of the encoding device 100.
[0250] The storage medium may store at least one module for the operation of the encoding device 1000. The memory 1030 may be configured to store at least one module and allow the module to be executed by at least one processor 1010.
[0251] According to an embodiment, at least some of the inter-frame prediction unit 110, intra-frame prediction unit 120, switcher 115, subtractor 125, transform unit 130, quantization unit 140, entropy coding unit 150, inverse quantization unit 160, inverse transform unit 170, adder 175, filtering unit 180, and reference frame buffer 190 of the encoding device 1000 may be program modules and are capable of communicating with external devices or systems. These program modules may be included in the encoding device 1000 in the form of an operating system, application module, and other program modules.
[0252] The program modules can be physically stored in various types of known storage devices. Furthermore, at least some of the program modules can also be stored in a remote storage device capable of communicating with the encoding device 1000.
[0253] Program modules may include, but are not limited to, routines, subroutines, programs, objects, components, and data structures for performing functions or operations according to an embodiment or for implementing abstract data types according to an embodiment.
[0254] The program module can be implemented using instructions or code executed by processor 1010.
[0255] The communication unit 1020 can perform functions related to communication of data or information with the encoding device 1000.
[0256] Figure 11 This is a flowchart of the encoding method according to an embodiment.
[0257] The encoding method according to the embodiment can be executed by encoding device 100 or encoding device 1000.
[0258] In step 1110, the prediction unit may generate the residual signal of the current block based on the current block, the first prediction, and the second prediction.
[0259] The prediction unit may include an inter-frame prediction unit 110, an intra-frame prediction unit 120, and a subtractor 125.
[0260] In one example, the residual signal can represent a residual block.
[0261] In one example, the residual block can be the difference between the current block and the predicted block. Alternatively, the residual block can be generated based on the difference between the current block and the predicted block.
[0262] In one example, the prediction block can be the sum of the first and second prediction blocks. The residual block can be obtained by subtracting the sum of the first and second prediction blocks from the current block.
[0263] In one example, the second prediction could be a prediction of the prediction error in the first prediction.
[0264] The first prediction block can be a block generated via a first prediction. The second prediction block can be a block generated via a second prediction. When the second prediction is not used, the second prediction block can be an empty block. An empty block can be a block where all pixels have a value of 0.
[0265] The prediction unit can generate residual blocks for the current block by performing inter-frame prediction or intra-frame prediction.
[0266] In an embodiment, the prediction unit may generate a second prediction block based on the current block and / or the first prediction block.
[0267] In an embodiment, the prediction unit can generate a residual signal for the current block by performing a first prediction on the current block and a second prediction on a first prediction error that is a result of the first prediction. The first prediction error can be the difference between the current block and the first prediction signal. The residual signal can be the difference between the first prediction error and the second prediction signal.
[0268] In this embodiment, the first prediction and the second prediction can be different types of predictions.
[0269] In this embodiment, the first prediction and the second prediction can be the same type of prediction. For example, both the first prediction and the second prediction can be intra-frame predictions. When the first prediction is an intra-frame prediction, the second prediction can also be set to an intra-frame prediction.
[0270] In this embodiment, the prediction directions of the first prediction and the second prediction can be the same as each other. The prediction direction of the second prediction can be set to be the same as the prediction direction of the first prediction.
[0271] For example, in an embodiment, both the first prediction and the second prediction can be inter-frame predictions.
[0272] In an embodiment, the block that is the target of the first prediction and the block that is the target of the second prediction may be different from each other. Here, the content represented by the expression "block that is the target of prediction" may be different. Here, the expression "block that is the target of prediction" may refer to the block that will generate the prediction block via "prediction".
[0273] For example, the type of block targeted in the first prediction and the type of block targeted in the second prediction can be different from each other. The block type can include original block, luma block, chroma block, depth block, residual block, etc.
[0274] For example, the block that is the target of the first prediction can be the current block or the original block.
[0275] For example, the first prediction error generated by the first prediction can represent a first prediction error block. The first prediction error can be a first residual signal. Furthermore, the first residual signal can represent a first residual block. The block targeted by the second prediction can be either the first prediction error block or the first residual block. In this case, a first residual signal can be generated via the first prediction, and a second prediction error can be generated via the second prediction. The second prediction error can be a second residual signal. The second residual signal can represent a second residual block.
[0276] Reference blocks can be used for prediction. In an embodiment, a first reference block used for a first prediction and a second reference block used for a second prediction may be different from each other. The reference blocks may differ in type and / or location.
[0277] In this embodiment, the positions of the first reference block used for the first prediction and the second reference block used for the second prediction may be different from each other. Here, the position of the first reference block may be relative to the position of the block that serves as the target of the first prediction. The position of the second reference block may be relative to the position of the block that serves as the target of the second prediction.
[0278] In an embodiment, a first reference block for a first prediction may include multiple reference blocks. A second reference block for a second prediction may also include multiple reference blocks. At least some of the multiple first reference blocks for the first prediction and the multiple second reference blocks for the second prediction may be different from each other.
[0279] The positions of at least some of the plurality of first reference blocks used for the first prediction and the plurality of second reference blocks used for the second prediction may be included only in the positions of the plurality of first reference blocks and the positions of the plurality of second reference blocks.
[0280] In an embodiment, the type of the first reference block used for the first prediction and the type of the second reference block used for the second prediction may be different from each other. The block type may include a reconstruction block, a reconstruction luma block, a reconstruction chroma block, a reconstruction depth block, a reconstruction first residual block, and a reconstruction second residual block.
[0281] For example, the first reference block used for the first prediction can be a reconstructed block. The second reference block used for the second prediction can be a reconstructed first residual block. The first reference sample used for the first prediction can be a pixel in the reconstructed block. The second reference sample used for the second prediction can be a pixel in the reconstructed first residual block.
[0282] For example, the first reference block used for the first prediction can be a neighboring reconstructed block adjacent to the current block. The second reference block used for the second prediction can be a reconstructed first residual block adjacent to the current block.
[0283] The neighboring reconstruction residual block adjacent to the current block can be obtained by adding the second predicted block of the neighboring reconstruction block to the reconstruction residual block used for the neighboring reconstruction block. Optionally, the neighboring reconstruction residual block adjacent to the current block can be the difference between the neighboring reconstruction block and the first predicted block of the neighboring reconstruction block.
[0284] For example, when the target of the first prediction is the current block, the neighboring reconstructed blocks of the current block can be used as reference blocks to perform the prediction on the current block. When the target of the second prediction is the first residual block, the neighboring reconstructed residual blocks of the current block or the first residual block can be used as the second reference block to perform the prediction on the first residual block.
[0285] In an embodiment, the first predicted region and the second predicted region may be different from each other. Here, "predicted region" may refer to the region in the block that serves as the target of the prediction where the predicted value is generated. Alternatively, "predicted region" may refer to the region in the prediction block corresponding to the block that serves as the target of the prediction where the predicted value is assigned via the prediction.
[0286] For example, the first prediction can be a prediction made for a region of the current block. The second prediction can be a prediction made for a portion of said region. At least a portion of the region of the current block may not be subject to the second prediction. The block targeted by the first prediction can be a block within a rectangular region. The second prediction can be performed on a portion of the rectangular region. At least a portion of the rectangular region may not be the target of the second prediction.
[0287] Considering the case where the region of the block targeted by the first prediction is the same as the region of the block targeted by the second prediction, the region of the first prediction can be the entire block targeted by the first prediction. The region of the second prediction can be a portion of the block targeted by the second prediction. Optionally, at least a portion of the block targeted by the second prediction may not be subject to the second prediction. In other words, the first prediction can be performed on the entire block targeted by the first prediction. The second prediction can be performed on a portion of the block targeted by the second prediction.
[0288] In the example, the predicted value determined by the first prediction can be assigned only to pixels within the region of the first prediction in the block that is the target of the first prediction. Alternatively, the predicted value determined by the first prediction may not be assigned to pixels within the region of the first prediction in the block that is the target of the first prediction. Optionally, a predefined value may be assigned to pixels within the region of the first prediction in the block that is the target of the first prediction. This predefined value may be 0.
[0289] In one example, the predicted value determined by the second prediction may be assigned only to pixels within the region of the second prediction in the block that is the target of the second prediction. Alternatively, the predicted value determined by the second prediction may not be assigned to pixels within the region of the second prediction in the block that is the target of the second prediction. Optionally, a predefined value may be assigned to pixels within the region of the second prediction in the block that is the target of the second prediction. This predefined value may be, for example, 0.
[0290] In one example, when the size of the block targeted by the first prediction is N×N, the predicted values determined by the first prediction can be assigned to N×N pixels. In other words, the predicted values determined by the first prediction can be assigned to all pixels in the block targeted by the first prediction.
[0291] In one example, when the size of the block targeted by the second prediction is N×N, the predicted value determined by the first prediction may not be assigned to one or more of the N×N pixels. Alternatively, when the size of the block targeted by the second prediction is N×N, a predefined value may be assigned to one or more of the N×N pixels. This predefined value may be, for example, 0.
[0292] In an embodiment, the region of the first prediction can be determined based on the type of the first prediction. For example, the region of the first prediction can be determined based on whether the first prediction is an inter-frame prediction. Optionally, the region of the first prediction can be determined based on whether the first prediction is an intra-frame prediction. Optionally, the region of the first prediction can be determined based on the prediction direction of the first prediction.
[0293] In an embodiment, the region of the second prediction can be determined based on the type of the second prediction. For example, the region of the second prediction can be determined based on whether the second prediction is an inter-frame prediction. Optionally, the region of the second prediction can be determined based on whether the second prediction is an intra-frame prediction. Optionally, the region of the second prediction can be determined based on the prediction direction of the second prediction.
[0294] In an embodiment, a second reference sample point falling within an optional range may be used to perform the second prediction.
[0295] In an embodiment, the regions of the first reference samples used for the first prediction and the regions of the second reference samples used for the second prediction may be different from each other.
[0296] As described above, the first predicted region and the second predicted region can be different from each other. The region of the first reference sample point can be the region of reference sample points needed to generate a predicted value for the region of the first prediction via the first prediction. The region of the second reference sample point can be the region of reference sample points needed to generate a predicted value for the region of the second prediction via the second prediction.
[0297] As described above, the first predicted region can be the entire block that serves as the target of the first prediction. The second predicted region can be a portion of the block that serves as the target of the second prediction. In this case, the region of the second reference sample can be a portion of the region of the first reference sample.
[0298] In step 1120, the encoding unit may perform encoding on the residual signal. The encoding unit may generate information about the encoded residual signal by performing encoding on the residual signal.
[0299] The encoding unit may include a transformation unit 130, a quantization unit 140, and an entropy encoding unit 150.
[0300] Step 1120 may include steps 1121, 1122 and 1123.
[0301] In step 1121, the transformation unit 130 can generate transformation coefficients for the residual signal.
[0302] In step 1122, quantization unit 1140 can generate quantized transformation coefficients by performing quantization on the transformation coefficients.
[0303] In step 1123, the entropy coding unit 150 can generate information about the coded residual signal by performing entropy coding on the quantized transform coefficients.
[0304] In step 1130, the entropy coding unit 150 can generate a bit stream of information about the encoded residual signal.
[0305] The bitstream may include information about the encoded residual signal, and may also include prediction-related information.
[0306] Entropy coding unit 150 can include prediction-related information in the bitstream. This prediction-related information can be entropy-coded.
[0307] In the example, prediction-related information may include prediction scheme information that indicates the scheme used to encode the current block.
[0308] In the example, the prediction scheme information can indicate which of intra-frame prediction and inter-frame prediction was used to encode the current block. Optionally, the prediction scheme information can indicate whether the current block has already been encoded via intra-frame prediction. Optionally, the prediction scheme information can indicate whether the current block has already been encoded via inter-frame prediction.
[0309] In the example, prediction-related information may include intra-prediction mode information that indicates the prediction mode of intra-prediction.
[0310] In the example, the prediction-related information may include second prediction usage information, which indicates whether the second prediction will be used to encode the current block.
[0311] In the example, prediction-related information may include current block type information indicating the type of the current block, first prediction block type information indicating the type of the first predicted block, second prediction block type information indicating the type of the second predicted block, first reference block type information indicating the type of the first reference block, second reference block type information indicating the type of the second reference block, first reference sample type information indicating the type of the first reference sample, and second reference sample type information indicating the type of the second reference sample.
[0312] In the example, the prediction-related information may include first prediction region information indicating the region of the first prediction and / or second prediction region information indicating the region of the second prediction.
[0313] The prediction-related information may include information used for the predictions described in the embodiments. The entropy coding unit 150 may include multiple pieces of prediction-related information in the bitstream according to the order described in the embodiments or the order generated in the embodiments.
[0314] In step 1140, the communication unit 1020 may send a bit stream to the decoding device 200 or the decoding device 1700.
[0315] In step 1150, the reconstruction residual signal generation unit can generate a reconstruction residual signal based on information about the residual signal.
[0316] The reconstructed residual signal generation unit may include an inverse quantization unit 160 and an inverse transform unit 170.
[0317] Step 1150 may include steps 1151 and 1152.
[0318] In step 1151, the dequantization unit 160 can generate reconstructed transform coefficients by performing dequantization on the quantized transform coefficients.
[0319] In step 1152, the transformation unit 130 can generate the reconstruction residual signal by performing an inverse transformation on the reconstruction transformation coefficients.
[0320] In step 1160, the reconstruction block generation unit can generate reconstruction blocks based on the reconstruction residual signal, the first prediction, and the second prediction.
[0321] The rebuild block generation unit may include adder 175.
[0322] In the example, the sum of the reconstructed residual signal and the predicted signal can represent the reconstructed block. Alternatively, the reconstructed block can be generated based on the sum of the reconstructed residual signal and the predicted signal.
[0323] In the example, the reconstructed block can be the sum of the reconstructed residual block and the predicted block. The predicted block can be the sum of the first predicted block and the second predicted block.
[0324] Alternatively, the reconstruction block can be generated based on the sum of the reconstruction residual block and the prediction block.
[0325] In the example, the reconstructed block can be generated based on the reconstructed residual block, the second prediction block, and the first prediction block. The reconstructed block generation unit can generate the reconstructed first residual signal by adding the reconstructed residual signal to the second prediction signal. The reconstructed block generation unit can generate the reconstructed block by adding the reconstructed first residual signal to the first prediction signal.
[0326] Optionally, the reconstruction block generation unit can generate a reconstructed first residual block by adding the reconstructed residual block to the second prediction block. The reconstruction block generation unit can generate a reconstructed block by adding the reconstructed first residual block to the first prediction block.
[0327] The reconstructed block and the first residual signal of the reconstruction can be used as a reference block for encoding other blocks.
[0328] Figure 12 A first prediction and a second prediction using intra-frame prediction are shown according to an embodiment.
[0329] Based on the above references Figure 11 In step 1110, as described, both the first and second predictions can be intra-frame predictions. Figure 12 The image shows an example of encoding the current block when both the first and second predictions are intra-frame predictions.
[0330] The current block can be a PU. Figure 12 The diagram depicts a PU with dimensions of 2N×2N, which is the current block.
[0331] First, in order to encode the current block, the prediction unit can determine which of a variety of prediction modes will be used to perform the first prediction.
[0332] The forecasting unit can use each of a variety of forecasting modes to perform the first forecast. For example, the forecasting directions of the multiple forecasting modes can be different from each other.
[0333] In the first prediction, the reconstructed block adjacent to the current block can be used as a reference block. Furthermore, pixels adjacent to the current block within the reconstructed block can be used as reference samples.
[0334] The prediction unit can generate multiple first prediction blocks for various prediction models via the first prediction.
[0335] Furthermore, the prediction unit can generate multiple first prediction errors for various prediction modes via the first prediction. For a single prediction mode, a first prediction block and a first prediction error can be calculated.
[0336] The first prediction error can be represented as the difference (residual) between the current block and the first predicted block. The first prediction error can be represented as the first residual block.
[0337] When a first prediction error occurs, the prediction unit can select the region from the first residual block to which the second prediction will be applied by referring to the first prediction error. The selected region can be a part of the first residual block.
[0338] Next, in order to encode the current block, the prediction unit can determine a portion of the first residual block that will be subject to the second prediction.
[0339] The second prediction can be applied to a portion of the first residual block, i.e., a selected region. Various methods can be used to select the region to which the second prediction will be applied.
[0340] The prediction area for the second prediction can be specified by the range of reference samples used for the second prediction.
[0341] In the second prediction, the reconstructed residual block adjacent to the current block can be used as a reference block. Furthermore, pixels in the reconstructed residual block adjacent to the current block can be used as reference samples.
[0342] The prediction directions of the first prediction and the second prediction can be the same. In other words, the intra-frame prediction modes of the first prediction and the second prediction can be the same.
[0343] exist Figure 12 The example shown is an intra-prediction mode with a mode value of 30.
[0344] Generally, if the prediction direction of the first prediction is the same as that of the second prediction, then the range of the reference sample points of the first prediction and the range of the reference sample points of the second prediction can be the same as each other.
[0345] The second prediction can be applied to a portion of the first residual block. The range of reference samples for the second prediction can be a portion of the range of reference samples for the first prediction.
[0346] exist Figure 12 In the diagram, the range of the reference sample points for the second prediction is shown as the range from α to α+β.
[0347] α can represent the first reference sample point used in the second prediction among the reference samples in the prediction direction of the second prediction. In addition, α can represent the starting point of the second prediction.
[0348] α+β can represent the last reference sample point among the reference samples in the prediction direction of the second prediction that will be used for the second prediction. Optionally, α+β can represent the last point of the second prediction.
[0349] β can represent the number of reference samples to be used for the second prediction. Alternatively, β can represent the range or length of the second prediction.
[0350] Once the extent of the reference points is determined, the area for the second prediction can be specified based on the determined extent of the reference points and the prediction direction. Figure 12 The diagram shows the region designated by dashed lines within the residual block. The second predicted region can be the region generated when a reference sample falling within the range from α to α+β moves in the prediction direction.
[0351] The prediction unit can select a range of reference samples to be used for the second prediction from among the reference samples for the prediction direction. The prediction unit can perform the second prediction using reference samples that fall within the selected range from all reference samples in the prediction direction. In this case, all reference samples can correspond to the reference samples used for the first prediction.
[0352] In the second prediction, the values of reference samples falling outside the selected range can be considered empty or 0. For example, the values of reference samples before α can be considered 0, and the values of reference samples after α+β can be considered 0.
[0353] The prediction unit can generate multiple second prediction blocks for multiple candidate regions via the second prediction.
[0354] The candidate regions may be different from each other. The candidate regions may be different parts of the first residual block.
[0355] For example, a region of the first residual block can be designated as a reference sample point used for the second prediction. In this case, a portion of the first residual block or a region of the second prediction within the first residual block can be represented as an ordered pair (α, β). Multiple ordered pairs (α, β) corresponding to multiple candidate regions can be distinct from each other. In other words, the ordered pair (α, β) can represent the range of reference samples that will be used for the second prediction.
[0356] Multiple candidate regions can all be different regions that can be selected using a specific scheme for the first residual block. For example, the specific scheme could be a scheme using the prediction direction.
[0357] For example, a region of the first residual block can be designated as a reference sample point used for the second prediction. When the number of reference samples that can be used for the entire first residual block in the prediction mode of the second prediction is n, α can be equal to or greater than 0 and less than or equal to n-1. β can be equal to or greater than 0 and less than or equal to n-1-α. Furthermore, when the number of reference samples that can be used for the entire first residual block in the prediction mode of the second prediction is n, the number of ordered pairs (α, β) can be (n+1)n / 2. In other words, when the number of reference samples that can be used for the entire first residual block in the prediction mode of the second prediction is n, the number of multiple candidate regions can be (n+1)n / 2.
[0358] For example, multiple candidate regions can each correspond to the range of reference sample points that will be used for the second prediction.
[0359] α and β can be indices to a list of reference samples in each specified prediction direction.
[0360] In order to use α and β to indicate the position of the reference sample points in the list, the order of the reference sample points must be defined.
[0361] In this embodiment, it can be initially assumed that the smaller the X-coordinate of a reference sample point, the earlier its sequential position. Next, among reference samples with the same X-coordinate value, the larger the Y-coordinate value, the earlier its sequential position. For example, the sequential positions of the reference samples can be specified in the order of lower left reference sample point 731, left reference sample point 733, upper left reference sample point 735, upper reference sample point 737, and upper right reference sample point 739. In the lower left reference sample point 731, the lower reference sample point may have an earlier sequential position than the upper reference sample point. In the left reference sample point 733, the lower reference sample point may have an earlier sequential position than the upper reference sample point. In the upper reference sample point 737, the left reference sample point may have an earlier sequential position than the right reference sample point. In the upper right reference sample point 739, the left reference sample point may have an earlier sequential position than the right reference sample point.
[0362] The order of the reference samples described above is merely an example; other orders based on different schemes can also be used. For instance, the order of the reference samples can be specified in the reverse order described above.
[0363] Furthermore, the order of the reference samples can be assigned to reference samples determined according to the prediction direction. In other words, among the lower left reference sample 731, left side reference sample 733, upper left corner reference sample 735, upper top reference sample 737, and upper right reference sample 739 described above, only some reference samples determined according to the prediction direction of the second prediction can be used for the prediction of the entire first residual block. The order can be assigned to some determined reference samples.
[0364] When the prediction direction of the second prediction is, for example, vertical, the reference sample that can be used for the entire first residual block can be the upper reference sample 737. When the size of the current block is 2N×2N, the leftmost reference sample in the upper reference sample 737 can be in the order of 0, and the rightmost reference sample in the upper reference sample 737 can be in the order of 2N-1.
[0365] Optionally, when the prediction direction of the second prediction is, for example, horizontal, the reference sample that can be used for the entire first residual block can be the left reference sample 733. When the size of the current block is 2N×2N, the sequential position of the bottommost reference sample among the left reference samples 737 can be 0, and the sequential position of the topmost reference sample among the left reference samples 737 can be 2N-1.
[0366] The prediction unit can generate multiple second prediction errors for multiple candidate regions via a second prediction. For a region, a second prediction block and a second prediction error can be calculated.
[0367] The second prediction error can be represented as the difference (residual) between the first residual block and the second prediction block. The second prediction error can be represented as the second residual block.
[0368] As described above, the prediction unit can generate multiple first prediction errors for multiple prediction modes. Furthermore, for each of the multiple first prediction errors, the prediction unit can generate multiple second prediction errors for multiple candidate regions in the first residual block represented by the first prediction error via a second prediction.
[0369] Through the above process, the prediction unit can generate multiple second prediction errors for all candidate regions of various prediction modes.
[0370] The prediction unit can select a second prediction error with the minimum rate-distortion cost from a plurality of generated second prediction errors. The candidate region selected from multiple candidate regions corresponding to the second prediction error with the minimum rate-distortion cost can be a portion of the current block to which the second prediction will be applied. Furthermore, the prediction mode selected from multiple prediction modes corresponding to the second prediction error with the minimum rate-distortion cost can be the prediction mode to be used in the first prediction. In other words, based on the prediction mode and the region of the prediction mode with the minimum rate-distortion cost of the second prediction error, the prediction unit can determine the prediction mode and the region of the second prediction to be used for the first prediction of encoding the current block.
[0371] Optionally, the prediction unit may select the prediction mode with the lowest rate-distortion cost from a plurality of prediction modes. In this case, a second prediction may be performed on the first prediction error or the first residual block generated under the selected prediction mode. Next, the prediction unit may select the second prediction error with the lowest rate-distortion cost from a plurality of second prediction errors. In other words, the prediction unit may determine the prediction mode to be used for the first prediction of encoding the current block based on which of the plurality of first prediction errors has the lowest rate-distortion cost, and may determine the region to be used for the second prediction of encoding the current block based on which of the plurality of second prediction errors has the lowest rate-distortion cost.
[0372] The above has been referred to Figure 11 The prediction-related information described may include information about selective secondary intra-frame predictions.
[0373] For example, prediction-related information may include SSIP_flag, which is a flag indicating whether Selective Secondary Intra-Frame Prediction (SSIP) is used.
[0374] For example, the prediction-related information may include information indicating α and information indicating β. In other words, the prediction-related information may include information indicating the first reference sample to be used in the second prediction and information indicating the number of reference samples to be used in the second prediction. Optionally, the prediction-related information may include information indicating the first reference sample to be used in the second prediction and information indicating the last reference sample to be used in the second prediction.
[0375] Optionally, the prediction-related information may include information about the starting point of the second prediction and the point where the second prediction will be made. The prediction-related information may also include information indicating the starting point and ending point of the second prediction.
[0376] For example, the information indicating α or the starting point of the second prediction could be SSIP_start_point, and the information indicating β or the point where the second prediction will be made could be SSIP_length.
[0377] Compared to existing schemes that only perform the first prediction, the above-described determination process can further reduce the prediction error in the current block. (This is in contrast to the above-mentioned methods.) Figure 9 The distortion of the prediction error described tends to remain in the direction of the prediction pattern, and the second prediction can effectively reduce the prediction error. In other words, by effectively utilizing the tendency of the distortion of the prediction error to remain in the direction of the prediction pattern via the second prediction, prediction performance can be improved and prediction error can be reduced.
[0378] Figure 13 This is a flowchart of a residual block generation method according to an embodiment.
[0379] Reference above Figure 11 The described step 1110 may include steps 1310, 1320, 1330, 1340, 1350, 1360, 1370 and 1380.
[0380] In this embodiment, the block targeted by the first prediction can be the current block. The first prediction can be an intra-frame prediction.
[0381] In step 1310, the prediction unit can generate a first prediction signal by performing a first prediction on the current block.
[0382] The first prediction signal can represent the first prediction block.
[0383] As referenced above Figure 12 As described, the prediction unit can perform a first prediction in each of a plurality of prediction modes in order to find the best prediction mode for the first prediction to encode the current block. That is, steps 1310, 1320 and 1325 can be performed in each of the plurality of prediction modes.
[0384] Multiple prediction models can correspond to different prediction directions.
[0385] In step 1320, the prediction unit may generate a first prediction error based on the current block and the first prediction signal.
[0386] The first prediction error can be represented as the first prediction error block or the first residual block.
[0387] The first residual block can represent the difference (residual) between the current block and the first prediction block. That is, the prediction unit can generate the first prediction error by subtracting the first prediction block represented by the first prediction signal from the current block.
[0388] In step 1325, the prediction unit can use the first prediction error to calculate the rate distortion cost for the first prediction.
[0389] The prediction unit may store the calculated first prediction error and / or the calculated rate distortion cost for the first prediction in memory 1030, storage 1040 or buffer.
[0390] As referenced above Figure 12 As described, the prediction unit can perform a first prediction in each of multiple prediction modes to find the optimal prediction mode for encoding the current block. The prediction unit can use the first prediction errors under multiple prediction modes to calculate multiple rate-distortion costs for the multiple prediction modes. The prediction unit can store the minimum rate-distortion cost among the calculated multiple rate-distortion costs as the minimum first rate-distortion cost RDcost_1. For example, RDcost_1 could be the rate-distortion cost of the mode with the minimum rate-distortion cost in the main intra-frame prediction.
[0391] The prediction unit can store RDcost_1 and the first prediction error corresponding to RDcost_1.
[0392] A second prediction can be selectively executed based on predetermined conditions.
[0393] In step 1330, the prediction unit may determine whether to perform a second prediction.
[0394] In an embodiment, the determination in step 1330 may not be a final decision regarding whether to use the second prediction to encode the current block. In step 1130, the prediction unit may determine whether the second prediction can be performed on the current block or the first residual block.
[0395] For example, if it is determined that the second prediction should not be performed, the current block can be encoded without using the second prediction. If it is determined that the second prediction should be performed, a second prediction signal and a second prediction error can be generated via the second prediction, but whether to use the second prediction to encode the current block can be determined in step 1360 by comparing the rate distortion cost.
[0396] As referenced above Figure 12 As described, the prediction unit may determine whether to perform a second prediction after performing a first prediction in each of a plurality of prediction modes in order to find the optimal prediction mode for encoding the current block. In other words, step 1330 may be performed in each of the plurality of prediction modes.
[0397] If it is determined that the second prediction will not be performed, the residual block for the current block can be a block represented by the first prediction error. In other words, the first prediction error can be provided as a residual block.
[0398] If it is determined that a second prediction will be performed, the residual block for the current block can be a block represented by the second prediction error signal, as will be described later. In other words, the second prediction error signal can be provided as a residual block.
[0399] The forecasting unit can determine whether to perform a second forecast based on predefined conditions.
[0400] In an embodiment, the prediction unit may determine whether to perform a second prediction based on the prediction pattern of the first prediction.
[0401] For example, when the forecasting mode of the first forecast is a non-directional mode, the forecasting unit may not execute the second forecast. Alternatively, when the forecasting mode of the first forecast is a directional mode, the forecasting unit may execute the second forecast.
[0402] When the first forecast pattern is a non-directional pattern among multiple forecast patterns, the forecast may not be executed within the selectable region or range because the direction of the forecast pattern is not available. Therefore, the second forecast can only be executed if the first forecast pattern is a directional pattern.
[0403] In an embodiment, the prediction unit may determine whether to perform a second prediction based on the position of the current block.
[0404] For example, the prediction unit may not perform a second prediction when the current block is adjacent to a boundary. Similarly, the prediction unit may not perform a second prediction when the current block is adjacent to both the top and left boundaries. The boundary can be the boundary of a frame, the boundary of a strip, or the boundary of a parallel block.
[0405] When the current block is adjacent to both the upper and left boundaries, the first residual block used for the second prediction may be insufficient. When the first residual block is insufficient, it may not be possible to generate all the second reference samples required to perform the second prediction.
[0406] In one embodiment, the prediction unit may determine whether to perform a second prediction based on the number of reconstructed blocks adjacent to the current block.
[0407] For example, if the number of reconstructed blocks adjacent to the current block is less than or equal to 2, the prediction unit may not perform a second prediction.
[0408] If it is determined that the second prediction will be performed, then step 1340 can be executed.
[0409] If it is determined that the second prediction is not performed, then step 1370 or step 1120 can be performed. When step 1120 is performed, the residual signal in step 1120 can be the first prediction error. In other words, when only the first prediction is performed and the second prediction is not performed, the first prediction error generated by the first prediction can be used as the residual signal of the current block.
[0410] In step 1340, the prediction unit can generate a second prediction signal by performing a second prediction on the first prediction error.
[0411] The second prediction signal can represent the second prediction block.
[0412] The second prediction can be an intra-frame prediction, and the prediction direction of the second prediction can be the same as the prediction direction of the first prediction.
[0413] The prediction unit can perform a second prediction on a portion of a region of the first residual block. This portion of the region can be specified by the residual samples used for the second prediction.
[0414] The region of reference samples used for the second prediction can be a portion of the region of reference samples used for the first prediction.
[0415] As referenced above Figure 12 As described, the prediction unit can perform a second prediction for each of the multiple candidate regions in order to find the best region for the second prediction to encode the current block.
[0416] In addition, as mentioned above Figure 12 As described, the prediction unit can perform a second prediction for each candidate region under each prediction mode in order to find the best prediction mode of the first prediction and the best region of the second prediction to encode the current block. That is, step 1340 can be performed for each candidate region under each prediction mode.
[0417] Here, the optimal prediction mode for the first prediction and the optimal region for the second prediction can be the prediction mode and region corresponding to the candidate region with the minimum rate-distortion cost among multiple candidate regions under multiple prediction modes. In other words, the prediction unit can determine the prediction mode for the first prediction and the region for the second prediction for encoding the current block based on the specific prediction mode and the specific region that have the minimum rate-distortion cost when performing the first prediction and the second prediction among multiple candidate regions under multiple prediction modes.
[0418] Multiple candidate regions can each correspond to the range of reference sample points that will be used for the second prediction.
[0419] The prediction unit can select a range of reference samples to be used for the second prediction from among the reference samples in the prediction direction. The prediction unit performs the second prediction using reference samples that fall within the selected range from all reference samples in the prediction direction. In the second prediction, the values of reference samples that fall outside the selected range can be considered as 0.
[0420] In step 1350, the prediction unit may generate a second prediction error based on the first prediction error and the second prediction signal.
[0421] The second prediction error can be represented as a second prediction error block or a second residual block.
[0422] The second residual block can represent the difference (residual) between the first residual block and the second prediction block. That is, the prediction unit can generate the second prediction error signal by subtracting the second prediction block represented by the second prediction signal from the first residual block represented by the first prediction error.
[0423] In step 1355, the prediction unit can use the second prediction error to calculate the rate distortion cost for the second prediction.
[0424] The prediction unit may store the calculated second prediction error and / or the calculated rate distortion cost for the second prediction in memory 1030, memory 1040 or buffer.
[0425] As referenced above Figure 12 As described, the prediction unit can perform a second prediction for each of multiple regions to find the optimal region for encoding the current block. The prediction unit can use multiple second prediction errors from the multiple regions to calculate multiple rate-distortion costs for the multiple regions. The prediction unit can store the minimum rate-distortion cost among the calculated multiple rate-distortion costs as the minimum second rate-distortion cost RDcost_2. For example, RDcost_2 could be the rate-distortion cost of the region with the minimum rate-distortion cost in selective minor intra-frame prediction.
[0426] The prediction unit can store RDcost_2 and the second prediction error corresponding to RDcost_2.
[0427] The second prediction can be selectively used based on predefined conditions.
[0428] In step 1360, the prediction unit may determine whether to use the second prediction to encode the current block.
[0429] The prediction unit can determine whether to use a second prediction to encode the current block based on predefined conditions.
[0430] For example, if the rate distortion cost is further reduced by using the second prediction, the prediction unit may determine to use the second prediction. If the rate distortion cost is not further reduced even if the second prediction is used, the prediction unit may determine not to use the second prediction.
[0431] For example, if the minimum rate distortion cost calculated when using the second prediction is less than the minimum rate distortion cost calculated when not using the second prediction, the prediction unit may determine to use the second prediction.
[0432] In an embodiment, the prediction unit may determine whether to use the second prediction to encode the current block based on the comparison result between RDcost_1 and RDcost_2.
[0433] A lower RDcost_2 than RDcost_1 means that when the second prediction is used together, the rate-distortion cost of encoding the current block can be further reduced compared to using only the first prediction.
[0434] For example, when RDcost_1 is less than or equal to RDcost_2, the prediction unit can determine not to use the second prediction to encode the current block. When RDcost_1 is greater than RDcost_2, the prediction unit can determine to use the second prediction to encode the current block.
[0435] If it is determined that the second prediction will not be used to encode the current block, step 1370 can be executed.
[0436] If it is determined that the second prediction will be used to encode the current block, then step 1380 can be executed.
[0437] In step 1370, the prediction unit may execute a setting that indicates the second prediction will not be used.
[0438] The prediction unit can set the value of the second prediction usage information so that the second prediction usage information indicates that the second prediction will not be used. For example, when the value of the second prediction usage information is 0, the second prediction usage information can indicate that the second prediction will not be used.
[0439] When step 1370 is executed, the residual signal from step 1120 can be the first prediction error. In other words, when a second prediction is not performed on the current block, the first prediction error generated based on the first prediction can be used as the residual signal.
[0440] In step 1380, the prediction unit may execute settings indicating that a second prediction will be used.
[0441] The prediction unit can set the value of the second prediction usage information so that the second prediction usage information indicates that the second prediction will be used. For example, when the value of the second prediction usage information is 1, the second prediction usage information can indicate that the second prediction will be used.
[0442] When step 1380 is executed, the residual signal from step 1120 can be the second prediction error. In other words, when a second prediction is performed on the current block, the second prediction error generated based on the first and second predictions can be used as the residual signal.
[0443] Figure 14 This is a flowchart of a reconstruction block generation method according to an embodiment.
[0444] Reference above Figure 11 The described step 1160 may include the following steps 1410, 1420 and 1430.
[0445] In step 1410, the reconstructed block generation unit can determine whether the second prediction has been used to encode the current block.
[0446] If it is determined that the second prediction has been used to encode the current block, step 1420 can be executed.
[0447] If it is determined that the second prediction was not used to encode the current block, step 1430 can be executed. When the second prediction is not used, the first prediction error of the reconstruction of the current block can be the reconstruction residual signal.
[0448] In step 1420, the reconstruction block generation unit may generate a first prediction error for reconstruction based on the reconstruction residual signal and the second prediction signal.
[0449] The reconstruction block generation unit can generate a first prediction error for the reconstruction of the current block based on the residual signal of the current block and the second prediction signal of the unit for the region of the current block.
[0450] The first prediction error of the reconstruction can be the sum of the reconstructed residual signal and the second prediction signal. Alternatively, the first prediction error of the reconstruction can be generated based on the reconstructed residual signal and the second prediction signal.
[0451] In step 1430, the reconstruction block generation unit may generate reconstruction blocks based on the first prediction error of the reconstruction and the first prediction signal.
[0452] The reconstruction block generation unit can generate a signal representing the reconstruction block based on the first prediction error of the reconstruction of the current block and the first prediction signal of the current block.
[0453] In other words, when using the second prediction, the signal representing the reconstructed block can be the sum of the reconstructed residual signal, the second prediction signal, and the first prediction signal. Alternatively, when using the second prediction, the signal representing the reconstructed block can be generated based on the reconstructed residual signal, the second prediction signal, and the first prediction signal.
[0454] In other words, when the second prediction is not used, the signal representing the reconstructed block can be the sum of the reconstructed residual signal and the first prediction signal. Alternatively, when the second prediction is not used, the signal representing the reconstructed block can be generated based on the reconstructed residual signal and the first prediction signal.
[0455] The signal representing the reconstructed block can be the sum of the first prediction error and the first prediction signal. Furthermore, the first prediction error can be generated based on the reconstructed residual signal and the second prediction signal.
[0456] Figure 15 The encoding process according to an embodiment is shown.
[0457] exist Figure 15In this context, the symbol "∑" with "+" and "-" indicates the error signal generated between two signals. This error signal can be generated by subtracting the input signal received with the "-" symbol from the input signal received with the "+" symbol.
[0458] The symbol “∑” with “+” indicates the generation of a signal corresponding to the sum of two signals. A signal that is the sum of two signals can be generated by adding the input signals received separately with the symbol “+”.
[0459] Reference above Figure 11 The described prediction unit may include a first predictor and a second predictor.
[0460] The process within the dashed line indicates SSIP.
[0461] A diamond shape can indicate conditional branches.
[0462] In an equation such as “A=B”, “A” can represent the target to which a value will be assigned, and “B” can represent the value to which the target will be assigned.
[0463] "TQ" can represent transformation and quantization. (TQ) -1 It can represent inverse transform and inverse quantization.
[0464] This can represent the signal corresponding to the first prediction error. This can represent the signal corresponding to the first prediction error in the reconstruction.
[0465] This can represent the signal corresponding to the second prediction error. This can represent the signal corresponding to the second prediction error in the reconstruction. Although in Figure 15 Not shown in the middle However, when using the second prediction, Can be with Same. When the second prediction is not used, Can be with same.
[0466] It can represent residual signals. It can represent the reconstructed residual signal.
[0467] This can represent the first prediction signal. This can represent the second prediction signal.
[0468] Figure 16 This is a configuration diagram of a decoding device according to an embodiment.
[0469] The decoding device 1600 can be a general-purpose computer system that performs the decoding.
[0470] like Figure 16 As shown, the decoding device 1600 may include at least one processor 1610, a memory 1630, a user interface (UI) input device 1650, a UI output device 1660, and a storage device 1640, all communicating with each other via a bus 1690. The decoding device 1600 may also include a communication unit 1620 connected to a network 1699. The processor 1610 may be a CPU or a semiconductor device for executing processing instructions stored in the memory 1630 or the storage device 1640. Each of the memory 1630 and the storage device 1640 may be any of a variety of volatile or non-volatile storage media. For example, the memory may include at least one of ROM 1631 and RAM 1632.
[0471] The processor 1610 may include an entropy decoding unit 210, an inverse quantization unit 220, an inverse transform unit 230, an intra-frame prediction unit 240, an inter-frame prediction unit 250, an adder 255, a filtering unit 260, and a reference frame buffer 270 of the decoding device 200.
[0472] The storage medium may store at least one module used for operation of the decoding device 1600. The memory 1630 may be configured to store at least one module and allow the module to be executed by at least one processor 1610.
[0473] According to an embodiment, at least some of the entropy decoding unit 210, inverse quantization unit 220, inverse transform unit 230, intra-frame prediction unit 240, inter-frame prediction unit 250, adder 255, filtering unit 260, and reference frame buffer 270 of the decoding device 1600 may be program modules and are capable of communicating with external devices or systems. Program modules may be included in the decoding device 1600 in the form of operating systems, application modules, and other program modules.
[0474] The program modules can be physically stored in various types of known storage devices. Furthermore, at least some of the program modules can also be stored in a remote storage device capable of communicating with the decoding device 1600.
[0475] Program modules may include, but are not limited to, routines, subroutines, programs, objects, components, and data structures for performing functions or operations according to an embodiment or for implementing abstract data types according to an embodiment.
[0476] Program modules can be implemented using instructions or code executed by processor 1610.
[0477] The communication unit 1620 can perform functions related to communication of data or information with the decoding device 1600.
[0478] Figure 17 This is a flowchart of a decoding method according to an embodiment.
[0479] The decoding method according to the embodiment can be executed by decoding device 200 or decoding device 1600.
[0480] In step 1710, the communication unit 1620 may receive a bit stream from the encoding device 100 or the encoding device 1100.
[0481] The bitstream may include information about the encoded residual signal and may also include prediction-related information.
[0482] Information about the encoded residual signal may include the quantized transform coefficients that have been entropy encoded.
[0483] Information relevant to prediction can be decoded by entropy.
[0484] In step 1720, the entropy decoding unit 210 can generate quantized transform coefficients by performing entropy decoding on the bitstream. Furthermore, the entropy decoding unit 210 can generate prediction-related information by performing entropy decoding on the bitstream.
[0485] For example, prediction-related information may include prediction scheme information that indicates the scheme used to encode the current block.
[0486] For example, prediction scheme information can indicate which of intra-frame prediction and inter-frame prediction was used to encode the current block. Optionally, prediction scheme information can indicate whether the current block has already been encoded via intra-frame prediction. Optionally, prediction scheme information can indicate whether the current block has already been encoded via inter-frame prediction.
[0487] For example, prediction-related information may include intra-prediction mode information that indicates the prediction mode of intra-prediction.
[0488] For example, the prediction-related information may include second prediction usage information, which indicates whether the second prediction will be used to encode the current block.
[0489] For example, prediction-related information may include current block type information indicating the type of the current block, first prediction block type information indicating the type of the first predicted block, second prediction block type information indicating the type of the second predicted block, first reference block type information indicating the type of the first reference block, second reference block type information indicating the type of the second reference block, first reference sample type information indicating the type of the first reference sample, and second reference sample type information indicating the type of the second reference sample.
[0490] For example, prediction-related information may include first prediction region information indicating the region of the first prediction and / or second prediction region information indicating the region of the second prediction.
[0491] Furthermore, prediction-related information may include information used for the predictions described in the embodiments. Multiple pieces of prediction-related information may be included in the bitstream in the order described in the embodiments or in the order generated in the embodiments.
[0492] In step 1730, the reconstruction residual signal generation unit can generate a reconstruction residual signal for the current block based on the quantized transform coefficients.
[0493] The reconstructed residual signal generation unit may include an inverse quantization unit 220 and an inverse transform unit 230.
[0494] Step 1730 may include steps 1731 and 1732.
[0495] In step 1731, the dequantization unit 220 can generate dequantized transformation coefficients by performing dequantization on the quantized transformation coefficients.
[0496] In step 1732, the inverse transform unit 230 can generate the reconstructed residual signal by performing an inverse transform on the dequantized transform coefficients.
[0497] In steps 1710, 1720 and 1730, a reconstruction residual signal for the current block can be generated.
[0498] In step 1740, the reconstruction block generation unit can generate reconstruction blocks based on the reconstruction residual signal, the second prediction, and the first prediction.
[0499] The reconstruction block generation unit may include an adder 225, an intra-frame prediction unit 240, an inter-frame prediction unit 250, a filter unit 260, and a reference frame buffer 270.
[0500] The reconstructed residual signal can be a reconstructed residual block.
[0501] For example, a reconstruction block can be the sum of a reconstruction residual block and a prediction block. Alternatively, a reconstruction block can be generated based on the sum of the reconstruction residual signal and the prediction block.
[0502] For example, the prediction block can be the sum of the first prediction block and the second prediction block. Alternatively, the prediction signal can be the sum of the first prediction signal and the second prediction signal.
[0503] For example, a reconstructed block can be the sum of the reconstructed block residual, the first prediction block, and the second prediction block. A reconstructed signal can be the sum of the reconstructed residual signal, the first prediction signal, and the second prediction signal. Optionally, a reconstructed block can correspond to the sum of the reconstructed residual block, the first prediction block, and the second prediction block.
[0504] The first prediction block can be a block generated via a first prediction or a block represented by a prediction signal generated via the first prediction. The second prediction block can be a block generated via a second prediction or a block represented by a prediction signal generated via the second prediction.
[0505] When the second prediction is not used, the second prediction signal can be an empty signal, and the second prediction block can be an empty block. An empty block can be a block in which all pixels have a value of 0.
[0506] For example, when the second prediction is used to encode the current block, the reconstructed residual signal can be the reconstructed second prediction error, as mentioned above. Figure 14 This has been described. Optionally, when the second prediction is used to encode the current block, the reconstructed residual signal can be obtained by using dequantization and inverse transform on the above-mentioned... Figure 11 The signal is obtained by reconstructing the second prediction error as described.
[0507] For example, when the second prediction is not used to encode the current block, the reconstructed residual signal can be the first prediction error of the reconstruction, as mentioned above. Figure 14 This has been described. Optionally, when the second prediction is not used to encode the current block, the reconstructed residual signal can be obtained by using dequantization and inverse transform on the above-mentioned... Figure 11 The signal obtained by reconstructing the first prediction error is described.
[0508] The reconstruction block generation unit can generate reconstruction blocks by performing inter-frame prediction or intra-frame prediction.
[0509] In this embodiment, the first prediction and the second prediction can be different types of predictions.
[0510] In this embodiment, the first prediction and the second prediction can be the same type of prediction. For example, both the first prediction and the second prediction can be intra-frame predictions. When the first prediction is an intra-frame prediction, the second prediction can also be set to an intra-frame prediction.
[0511] In this embodiment, the prediction directions of the first prediction and the second prediction can be the same as each other. The prediction direction of the second prediction can be set to the same prediction direction as the first prediction.
[0512] For example, in an embodiment, both the first prediction and the second prediction can be inter-frame predictions.
[0513] In an embodiment, the block that is the target of the first prediction and the block that is the target of the second prediction may be different from each other. Here, the content represented by the expression "block that is the target of prediction" may be different. Here, the expression "block that is the target of prediction" may refer to the block that will generate the prediction block via "prediction".
[0514] For example, the type of block targeted in the first prediction and the type of block targeted in the second prediction can be different from each other. The block type can include original block, luma block, chroma block, depth block, residual block, etc.
[0515] For example, the block that serves as the target of the first prediction could be a reconstruction block. The block that serves as the target of the second prediction could be a prediction error block.
[0516] Reference blocks can be used for prediction. In an embodiment, a first reference block used for a first prediction and a second reference block used for a second prediction may be different from each other. The reference blocks may differ in type and / or location.
[0517] In this embodiment, the positions of the first reference block used for the first prediction and the second reference block used for the second prediction may be different from each other. Here, the position of the first reference block may be relative to the position of the block that serves as the target of the first prediction. The position of the second reference block may be relative to the position of the block that serves as the target of the second prediction.
[0518] In an embodiment, a first reference block for a first prediction may include multiple reference blocks. A second reference block for a second prediction may also include multiple reference blocks. At least some of the multiple first reference blocks for the first prediction and the multiple second reference blocks for the second prediction may be different from each other.
[0519] The position of at least one of the plurality of first reference blocks used for the first prediction and the plurality of second reference blocks used for the second prediction may be included only in the position of the plurality of first reference blocks and the position of the plurality of second reference blocks.
[0520] In an embodiment, the type of the first reference block used for the first prediction and the type of the second reference block used for the second prediction may be different from each other. The block type may include a reconstruction block, a reconstruction luma block, a reconstruction chroma block, a reconstruction depth block, a reconstruction first residual block, and a reconstruction second residual block.
[0521] For example, the first reference block used for the first prediction can be a reconstructed block. The second reference block used for the second prediction can be a reconstructed first residual block. The first reference sample used for the first prediction can be a pixel in the reconstructed block. The second reference sample used for the second prediction can be a pixel in the reconstructed first residual block.
[0522] For example, the first reference block used for the first prediction can be a neighboring reconstructed block adjacent to the current block. The second reference block used for the second prediction can be a reconstructed first residual block adjacent to the current block.
[0523] The neighboring reconstruction residual block adjacent to the current block can be obtained by adding the second predicted block of the neighboring reconstruction block to the reconstruction residual block used for the neighboring reconstruction block. Optionally, the neighboring reconstruction residual block adjacent to the current block can be the difference between the neighboring reconstruction block and the first predicted block of the neighboring reconstruction block.
[0524] For example, when the target of the first prediction is the current block, the neighboring reconstructed blocks of the current block can be used as reference blocks to perform the prediction of the current block. When the target of the second prediction is the first residual block, the neighboring reconstructed residual blocks of the current block or the first residual block can be used as the second reference block to perform the prediction of the first residual block.
[0525] In an embodiment, the first predicted region and the second predicted region may be different from each other. Here, "predicted region" may refer to the region in the block that serves as the target of the prediction where the predicted value is generated. Alternatively, "predicted region" may refer to the region in the prediction block corresponding to the block that serves as the target of the prediction where the predicted value is assigned via the prediction.
[0526] For example, the first prediction can be a prediction made for a region of the current block. The second prediction can be a prediction made for a portion of said region. At least a portion of the region of the current block may not be subject to the second prediction. The block targeted by the first prediction can be a block within a rectangular region. The second prediction can be performed on a portion of the rectangular region. At least a portion of the rectangular region may not be the target of the second prediction.
[0527] Considering the case where the region of the block targeted by the first prediction is the same as the region of the block targeted by the second prediction, the region of the first prediction can be the entire block targeted by the first prediction. The region of the second prediction can be a portion of the block targeted by the second prediction. Optionally, at least a portion of the block targeted by the second prediction may not be subject to the second prediction. In other words, the first prediction can be performed on the entire block targeted by the first prediction. The second prediction can be performed on a portion of the block targeted by the second prediction.
[0528] For example, the predicted value determined by the first prediction may be assigned only to pixels within the region of the first prediction in the block that is the target of the first prediction. The predicted value determined by the first prediction may not be assigned to pixels within the region of the first prediction in the block that is the target of the first prediction. Optionally, a predefined value may be assigned to pixels within the region of the first prediction in the block that is the target of the first prediction. For example, the predefined value may be 0.
[0529] For example, the predicted value determined by the second prediction may be assigned only to pixels within the region of the second prediction in the block that is the target of the second prediction. The predicted value determined by the second prediction may not be assigned to pixels within the region of the second prediction in the block that is the target of the second prediction. Optionally, a predefined value may be assigned to pixels within the region of the second prediction in the block that is the target of the second prediction. This predefined value may be, for example, 0.
[0530] For example, when the size of the block targeted by the first prediction is N×N, the predicted values determined by the first prediction can be assigned to N×N pixels. In other words, the predicted values determined by the first prediction can be assigned to all pixels in the block targeted by the first prediction.
[0531] For example, when the size of the block targeted by the second prediction is N×N, the predicted value determined by the first prediction may not be assigned to one or more of the N×N pixels. Alternatively, when the size of the block targeted by the second prediction is N×N, a predefined value may be assigned to one or more of the N×N pixels. For example, the predefined value may be 0.
[0532] In an embodiment, the region of the first prediction can be determined based on the type of the first prediction. For example, the region of the first prediction can be determined based on whether the first prediction is an inter-frame prediction. Optionally, the region of the first prediction can be determined based on whether the first prediction is an intra-frame prediction. Optionally, the region of the first prediction can be determined based on the prediction direction of the first prediction.
[0533] In an embodiment, the region of the second prediction can be determined based on the type of the second prediction. For example, the region of the second prediction can be determined based on whether the second prediction is an inter-frame prediction. Optionally, the region of the second prediction can be determined based on whether the second prediction is an intra-frame prediction. Optionally, the region of the second prediction can be determined based on the prediction direction of the second prediction.
[0534] In an embodiment, a second reference sample point falling within an optional range may be used to perform the second prediction.
[0535] In an embodiment, the regions of the first reference samples used for the first prediction and the regions of the second reference samples used for the second prediction may be different from each other.
[0536] As described above, the first predicted region and the second predicted region can be different from each other. The region of the first reference sample points can be the region of reference sample points needed to generate predicted values for the region of the first prediction via the first prediction. The region of the second reference sample points can be the region of reference sample points needed to generate predicted values for the region of the second prediction via the second prediction.
[0537] As described above, the first predicted region can be the entire block that serves as the target of the first prediction. The second predicted region can be a portion of the block that serves as the target of the second prediction. In this case, the region of the second reference sample can be a portion of the region of the first reference sample.
[0538] Figure 18 This is a flowchart of a reconstruction block generation method according to an embodiment.
[0539] Reference above Figure 17 The described step 1740 may include the following steps 1810, 1820, 1830, 1840 and 1850.
[0540] A second prediction can be selectively performed based on predefined conditions.
[0541] In step 1810, the reconstruction block generation unit may determine whether to use the second prediction to generate reconstruction blocks.
[0542] The reconstruction block generation unit can determine whether to use a second prediction to generate reconstruction blocks based on predetermined conditions.
[0543] In an embodiment, the reconstruction block generation unit may determine whether to use a second prediction based on the prediction pattern of the first prediction.
[0544] For example, the reconstructed block generation unit can obtain intra-prediction mode information indicating the prediction mode of intra-prediction from the bitstream. When the prediction mode of the first prediction is a non-directional mode, the reconstructed block generation unit may not use the second prediction.
[0545] In an embodiment, the reconstruction block generation unit may determine whether to use a second prediction based on the position of the current block.
[0546] For example, when the current block is adjacent to a boundary, the reconstruction block generation unit may not use the second prediction. For example, when the current block is adjacent to both the top and left boundaries, the prediction unit may not use the second prediction. The boundary can be the boundary of the image, the boundary of a strip, or the boundary of a parallel block.
[0547] In an embodiment, the reconstruction block generation unit may determine whether to use a second prediction based on the number of reconstruction blocks adjacent to the current block. The reconstruction block may be a PU (Programming Unit).
[0548] For example, when the number of reconstructed blocks adjacent to the current block is less than or equal to 2, the reconstructed block generation unit may not use the second prediction.
[0549] In an embodiment, after determining whether to use the second prediction using the prediction mode, the position of the current block, and / or the number of neighboring reconstructed blocks, the reconstructed block generation unit may determine whether to use the second prediction based on whether the second prediction has been used to encode the current block.
[0550] For example, the reconstructed block generation unit can obtain second prediction usage information from the bitstream. When the second prediction usage information indicates that the second prediction will be used, the reconstructed block generation unit can use the second prediction. When the second prediction usage information indicates that the second prediction will not be used, the reconstructed block generation unit can choose not to use the second prediction.
[0551] When the second prediction has been used to encode the current block, step 1820 can be executed.
[0552] When the second prediction is not used to encode the current block, step 1840 can be executed. When the second prediction is not used, the first prediction error of the reconstruction of the current block can be the reconstruction residual signal.
[0553] In step 1820, the reconstruction block generation unit can generate a second prediction signal by performing a second prediction.
[0554] The second prediction can correspond to the above reference. Figure 11 and Figure 13 The second prediction has already been described during the encoding of the current block. For example, the second prediction signal may correspond to the above reference. Figure 11 and Figure 13 The second prediction described in the process of encoding the current block.
[0555] The second prediction signal can represent the second prediction block.
[0556] The second prediction can be an intra-frame prediction, and the prediction direction of the second prediction can be the same as the prediction direction of the first prediction.
[0557] The reference block in the second prediction can be a reconstruction residual block. For example, the reconstruction block generation unit can generate a second prediction signal by performing a second prediction that uses the reconstruction residual block used for the block adjacent to the current block as a reference block.
[0558] In this embodiment, as described above, the second predicted region may be a portion of the region of the current block. The reconstructed block generation unit may obtain second predicted region information indicating the predicted region of the second prediction from the bitstream. The reconstructed block generation unit may perform a second prediction on the second predicted region.
[0559] In an embodiment, the region to which the second prediction will be applied may be specified based on the extent of reference samples to be used for the second prediction. The region to which the second prediction will be applied may also be specified based on the prediction direction of the second prediction. For example, the region to which the second prediction will be applied may be specified based on both the extent of the reference samples to be used for the second prediction and the prediction direction of the second prediction.
[0560] In an embodiment, the reconstruction block generation unit may perform a second prediction using reference samples that fall within a selected range of all reference pixels in the prediction direction. In the second prediction, the values of reference samples falling outside the selected range may be considered as 0.
[0561] In an embodiment, the reconstruction block generation unit may obtain information α, indicating the first reference sample to be used in the second prediction, and information β, indicating the number of reference samples to be used in the second prediction, from the bitstream. The range of reference samples to be used in the second prediction can be specified by α and β.
[0562] In an embodiment, the range of reference samples can be specified by information α indicating the first reference sample to be used in the second prediction and information β indicating the number of reference samples to be used in the second prediction. The region of the second prediction can be the region generated when reference samples falling within the range from α to α+β move in the prediction direction.
[0563] In the second prediction, the values of reference samples falling outside the selected range can be considered empty or 0. For example, the values of reference samples before α can be considered 0, and the values of reference samples after α+β can be considered 0.
[0564] In step 1830, the reconstruction block generation unit can generate a first prediction error for reconstruction based on the reconstruction residual signal and the second prediction signal. The reconstruction block generation unit can generate the first prediction error for reconstruction by adding the second prediction signal to the reconstruction residual signal.
[0565] The reconstruction block generation unit can generate a first prediction error for the reconstruction of the current block based on the reconstruction residual signal and a second prediction signal for a portion of the region.
[0566] The first prediction error of the reconstruction can be the sum of the reconstructed residual signal and the second prediction signal. Optionally, the first prediction error of the reconstruction can be generated based on the reconstructed residual signal and the second prediction signal.
[0567] In step 1840, the reconstruction block generation unit can generate a first prediction signal by performing a first prediction on the current block.
[0568] The first prediction signal can represent the first prediction block.
[0569] In the first prediction, the reconstructed block adjacent to the current block can be used as a reference block. Furthermore, pixels in the reconstructed block adjacent to the current block can be used as reference samples.
[0570] In step 1850, the reconstruction block generation unit may generate a signal representing a reconstruction block based on the first prediction error of the reconstruction and the first prediction signal. The reconstruction block generation unit may generate a signal representing a reconstruction block by adding the first prediction signal to the first prediction error of the reconstruction.
[0571] According to steps 1810, 1820, 1830, 1840, and 1850 described above, when using the second prediction, the reconstructed block can be the sum of the reconstructed residual signal, the second prediction signal, and the first prediction signal. Optionally, when using the second prediction, a signal representing the reconstructed block can be generated based on the reconstructed residual signal, the second prediction signal, and the first prediction signal.
[0572] According to steps 1810, 1820, 1830, 1840, and 1850 described above, when the second prediction is not used, the signal representing the reconstructed block can be the sum of the reconstructed residual signal and the first prediction signal. Optionally, when the second prediction is not used, the signal representing the reconstructed block can be generated based on the sum of the reconstructed residual signal and the first prediction signal.
[0573] The reconstructed block and the first residual signal of the reconstruction can be used as a reference block for decoding other blocks.
[0574] Figure 19 The decoding process according to an embodiment is shown.
[0575] exist Figure 19 In this context, the symbol "∑" with "+" indicates the generation of a signal corresponding to the sum of two signals. A signal that is the sum of two signals can be generated by adding the input signals received separately with the "+" symbol.
[0576] Reference above Figure 19 The described reconstruction block generation unit may include a first predictor and a second predictor.
[0577] The process within the dashed line indicates SSIP.
[0578] A diamond shape can indicate conditional branches.
[0579] (TQ) -1 It can represent inverse transform and inverse quantization.
[0580] This can represent the prediction error. Optionally, It can represent the reconstructed residual signal.
[0581] This can represent the signal corresponding to the first prediction error in the reconstruction.
[0582] This can represent the signal corresponding to the second prediction error in the reconstruction. When using the second prediction... Can be with Same. Optionally, when using a second prediction, It can be When the second prediction is not used, Can be with Same. Optionally, when the second prediction is not used, It can be .
[0583] This can represent the first prediction signal. This can represent the second prediction signal.
[0584] According to the embodiments described above, when the second prediction is used, the selected portion of the first prediction applied to it and the remaining portion of the second prediction applied to it can be separated.
[0585] In an embodiment, when the second prediction is used, the first prediction can be applied to the entire current block. In this case, a reconstructed block for a selected portion to which the second prediction is applied can be generated based on the reconstruction reference signal, the second prediction signal generated via the second prediction, and the sum of the first prediction signal generated via the first prediction. Furthermore, a reconstructed block for the remaining portion to which the second prediction is not applied can be generated based on the reconstructed residual block and the sum of the first prediction signal generated via the first prediction.
[0586] In this scenario, the second prediction can be a prediction of the residual. The second prediction can be a prediction of the first residual signal, where the first residual signal is the difference between the current block and the first predicted signal. The reference block used for the second prediction can be a reconstructed residual block, and the reference pixel used for the second prediction can be a pixel within the reconstructed residual block. In other words, a second residual signal, which is the difference between the first residual signal and the second predicted signal, can be generated via a second prediction of the first residual signal, and the second residual signal can be used to generate the encoding information for the current block.
[0587] Optionally, in this case, the reconstruction block for the selected portion to which the second prediction is applied can be a weighted sum of the reconstruction residual block, the second prediction signal, and the first prediction signal. Prediction-related information may include a first weight for the reconstruction residual signal, a second weight for the second prediction signal, and a third weight for the first prediction signal. It can be assumed that not using the second prediction means the second weight for the second prediction signal is set to 0. Optionally, it can be assumed that for the remaining portion to which the second prediction is not applied, the second weight for the second prediction is set to 0.
[0588] The description of the encoding of the current block described above can also be applied to the decoding of the current block. (Repeated description omitted.) Furthermore, the description of the decoding of the current block described above can also be applied to the encoding of the current block. (Repeated description omitted.)
[0589] In the embodiments described above, although the method has been described based on a flowchart 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 a different order than those described or simultaneously with other steps. Furthermore, those skilled in the art will understand that the steps shown in the flowchart are not exclusive and may include other steps, or one or more steps in the flowchart may be omitted without departing from the scope of the invention.
[0590] The embodiments of the invention described above can be implemented as programs executable by various computer devices and recorded on a computer-readable storage medium. The computer-readable storage medium may individually or in combination include program instructions, data files, and data structures. The program instructions recorded on the storage medium may be specifically designed or configured for the present invention, or may be known or available to those skilled in the art of computer software. Examples of computer storage media may include all types of hardware devices specifically configured to record and execute program instructions, such as magnetic media (e.g., hard disks, floppy disks, and magnetic tapes), optical media (e.g., CD-ROMs and DVDs), and magneto-optical media (e.g., floppy disks, ROMs, RAMs, and flash memory). Examples of program instructions include machine code (e.g., code created by a compiler) and high-level language code executable by a computer using an interpreter. The hardware device may be configured to operate as one or more software modules to perform the operations of the present invention, and vice versa.
[0591] As described above, although the invention has been described based on specific details (such as detailed components and a limited number of embodiments and drawings), these specific details are provided only for ease of understanding of the invention. The invention is not limited to these embodiments, and those skilled in the art will practice various changes and modifications based on the above description.
[0592] Therefore, it should be understood that the spirit of this embodiment is not limited to the above embodiments, and the appended claims and their equivalents and modifications thereof fall within the scope of this invention.
Claims
1. A video decoding method, comprising: Perform a prediction on the current block to generate a prediction block; A reconstruction block is generated based on the prediction block and the reconstruction residual block. The predictions include a first prediction and a second prediction. The second prediction is an intra-frame prediction performed based on the first prediction block generated by the first prediction. Whether to perform a second prediction is determined based on the number of reconstructed blocks adjacent to the current block.
2. The video decoding method as described in claim 1, wherein, The regions to which the predicted values generated by the first prediction are assigned are different from the regions to which the predicted values generated by the second prediction are assigned. The region of the first reference sample used for the first prediction is different from the region of the second reference sample used for the second prediction. The second prediction is applied to a portion of the current block.
3. The video decoding method as described in claim 2, wherein, The size of the second block generated by the second prediction is 2×8.
4. The video decoding method as described in claim 1, wherein, The first prediction is used for predicting brightness blocks. The second prediction is used for chroma block prediction. The type of the first reference block used for the first prediction is different from the type of the second reference block used for the second prediction. The first reference block is the reconstructed brightness block. The second reference block is the reconstructed chroma block. The first prediction block is generated through the first prediction. A second prediction block is generated through the second prediction. The type of the first predicted block is different from the type of the second predicted block, and The second prediction block is generated based on the first prediction block. When the second prediction is applied to the first pixel of the second prediction block, the predicted value determined by the second prediction is assigned to the first pixel of the second prediction block. When the second prediction is not applied to the second pixel of the second prediction block, a predetermined value is assigned to the second pixel of the second prediction block.
5. The video decoding method as described in claim 1, wherein, This generates multiple prediction errors for multiple different candidate regions in the second prediction. Select the minimum prediction error from the plurality of prediction errors. The region for the second prediction is determined based on the candidate region with the smallest prediction error among the plurality of different candidate regions.
6. A video encoding method, comprising: Perform a prediction on the current block to generate a prediction block; as well as Reconstruction blocks are generated based on the predicted blocks and the reconstruction residual blocks. The predictions include a first prediction and a second prediction. The second prediction is an intra-frame prediction performed based on the first prediction block generated by the first prediction. Whether to perform a second prediction is determined based on the number of reconstructed blocks adjacent to the current block.
7. The video encoding method as described in claim 6, wherein, The regions to which the predicted values generated by the first prediction are assigned are different from the regions to which the predicted values generated by the second prediction are assigned. The region of the first reference sample used for the first prediction is different from the region of the second reference sample used for the second prediction. The second prediction is applied to a portion of the current block.
8. The video encoding method as described in claim 7, wherein, The size of the second block generated by the second prediction is 2×8.
9. The video encoding method as described in claim 6, wherein, The first prediction is used for predicting brightness blocks. The second prediction is used for chroma block prediction. The type of the first reference block used for the first prediction is different from the type of the second reference block used for the second prediction. The first reference block is the reconstructed brightness block. The second reference block is the reconstructed chroma block. The first prediction block is generated through the first prediction. A second prediction block is generated through the second prediction. The type of the first predicted block is different from the type of the second predicted block, and The second prediction block is generated based on the first prediction block. When the second prediction is applied to the first pixel of the second prediction block, the predicted value determined by the second prediction is assigned to the first pixel of the second prediction block. When the second prediction is not applied to the second pixel of the second prediction block, a predetermined value is assigned to the second pixel of the second prediction block.
10. The video encoding method as described in claim 6, wherein, This generates multiple prediction errors for multiple different candidate regions in the second prediction. Select the minimum prediction error from the plurality of prediction errors. The region for the second prediction is determined based on the candidate region with the smallest prediction error among the plurality of different candidate regions.
11. A computer-readable recording medium configured to store and transmit bit streams generated by a computer program, wherein, When executed by a processor, the computer program causes the video encoding device to perform the following steps to generate a bitstream: A prediction block is generated by performing a prediction on the current block based on the prediction pattern; Reconstruction blocks are generated based on the predicted blocks and the reconstructed residual blocks; and The bitstream, which includes prediction pattern information, is stored in a computer-readable recording medium. The computer-readable recording medium has a structure for storing bit streams and being read by a video decoding device. The second prediction is an intra-frame prediction performed based on the first prediction block generated by the first prediction. The prediction pattern information is information indicating the prediction pattern. The predictions include a first prediction and a second prediction. Whether to perform a second prediction is determined based on the number of reconstructed blocks adjacent to the current block.
12. A computer-readable recording medium storing program instructions for transmitting a bit stream, wherein, The program instructions include: Instructions used by the processor to execute operations that produce bitstreams; and Instructions used to send bit streams, The operation of generating a bitstream includes: generating a bitstream that includes prediction mode information generated by performing a video coding method. Among them, video encoding methods include: Determine the prediction mode to be used for the current block; Based on the prediction mode, a prediction is performed on the current block to generate a prediction block; and A reconstruction block is generated based on the prediction block and the reconstruction residual block. The prediction mode information indicates the prediction mode. The predictions include a first prediction and a second prediction. The second prediction is an intra-frame prediction performed based on the first prediction block generated by the first prediction. Whether to perform a second prediction is determined based on the number of reconstructed blocks adjacent to the current block.
13. The computer-readable recording medium of claim 12, wherein, The regions to which the predicted values generated by the first prediction are assigned are different from the regions to which the predicted values generated by the second prediction are assigned. The region of the first reference sample used for the first prediction is different from the region of the second reference sample used for the second prediction. The second prediction is applied to a portion of the current block.
14. The computer-readable recording medium of claim 13, wherein, The size of the second block generated by the second prediction is 2×8.
15. The computer-readable recording medium of claim 12, wherein, The first prediction is used for predicting brightness blocks. The second prediction is used for chroma block prediction. The type of the first reference block used for the first prediction is different from the type of the second reference block used for the second prediction. The first reference block is the reconstructed brightness block. The second reference block is the reconstructed chroma block. The first prediction block is generated through the first prediction. A second prediction block is generated through the second prediction. The type of the first predicted block is different from the type of the second predicted block, and The second prediction block is generated based on the first prediction block. When the second prediction is applied to the first pixel of the second prediction block, the predicted value determined by the second prediction is assigned to the first pixel of the second prediction block. When the second prediction is not applied to the second pixel of the second prediction block, a predetermined value is assigned to the second pixel of the second prediction block.
16. The computer-readable recording medium of claim 12, wherein, This generates multiple prediction errors for multiple different candidate regions in the second prediction. Select the minimum prediction error from the plurality of prediction errors. The region for the second prediction is determined based on the candidate region with the smallest prediction error among the plurality of different candidate regions.
17. A method for transmitting a bit stream, the method comprising: Send a bit stream that includes prediction pattern information. Wherein, the prediction mode information is information used to determine the prediction mode for the current block, and the bitstream is generated by performing a video coding method, wherein the video coding method includes: Perform the prediction on the current block to generate a prediction block. A reconstruction block is generated based on the predicted block. The predictions include a first prediction and a second prediction. The second prediction is an intra-frame prediction performed based on the first prediction block generated by the first prediction. The decision to perform a second prediction is based on the number of reconstructed blocks adjacent to the current block.