Image encoding / decoding method and device, and recording medium storing bit stream
By filling motion-compensated and repetitive filling regions at image boundaries, the problem of increased data volume in high-resolution images is solved, improving encoding/decoding efficiency and prediction accuracy.
Patent Information
- Application Number
- CN202380038331.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-06-07
- Filing Date
- 2023-06-07
- Publication Date
- 2025-01-07
AI Technical Summary
As image data resolution and quality improve, the amount of data generated by existing image encoding/decoding technologies increases, leading to higher transmission and storage costs. Existing inter-frame prediction methods also lack accuracy in predicting outside the boundaries.
By filling the boundaries of the current image with motion-compensated fill regions and repeat fill regions, the reference image is expanded using motion vectors and pixel values, thereby improving prediction accuracy.
It improves the efficiency of image encoding/decoding and prediction accuracy, while reducing storage and transmission requirements.
Smart Images

Figure CN119278624A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an image encoding / decoding method and apparatus and a recording medium storing a bit stream. More specifically, the present invention relates to an image encoding / decoding method and apparatus using an inter-frame prediction method and a recording medium storing a bit stream. Background Art
[0002] Recently, in various application fields, the demand for high-resolution, high-quality images such as ultra-high definition (UHD) images is increasing. As image data becomes higher in resolution and quality, the amount of data increases relatively compared to existing image data. Therefore, when image data is transmitted using a medium such as existing wired and wireless broadband lines or stored using existing storage media, transmission and storage costs increase. In order to solve these problems that arise as image data becomes higher in resolution and quality, efficient image encoding / decoding technology for images with higher resolution and quality is required.
[0003] In inter-frame prediction of pictures, a current picture is predicted by referring to a reference picture. At this time, in the case where the current picture refers to the outside of the boundary of the reference picture, various methods are discussed to improve the prediction accuracy of the current picture. For example, a method of extending the reference picture by filling the outer area of the reference picture boundary is discussed. In addition, various methods for improving the prediction accuracy in the case where the current block refers to the filled area of the extended reference picture in bilateral inter-frame prediction are discussed. Summary of the invention
[0004] Technical issues
[0005] An object of the present invention is to provide an image encoding / decoding method and apparatus with improved encoding / decoding efficiency.
[0006] Another object of the present invention is to provide a recording medium for storing a bit stream generated by the image decoding method or apparatus provided by the present invention.
[0007] Technical Solution
[0008] An image decoding method according to an embodiment of the present invention may include: filling a motion compensation filling area within a first filling distance from a boundary of a current picture according to a motion vector of a boundary block adjacent to a boundary of a current picture; filling a repeated filling area within a second filling distance from a boundary of the motion compensation filling area according to a pixel value adjacent to the boundary of the motion compensation filling area; and storing an extended picture consisting of the current picture, the motion compensation filling area and the repeated filling area in a memory.
[0009] According to an embodiment, filling the motion compensation filling area may include: extracting a motion vector from a boundary block, determining a reference block from a motion compensation filling reference picture referenced for motion compensation filling based on the motion vector, determining an adjacent motion compensation filling reference block in a filling direction from the reference block, and filling the motion compensation filling area based on the motion compensation filling reference block.
[0010] According to an embodiment, in the step of determining the motion compensation padding reference block, the motion compensation padding reference block may be determined to include neighboring pixels within a first padding distance in a padding direction from a boundary of the reference block.
[0011] According to an embodiment, in the step of determining a motion compensation padding reference block, when a motion compensation padding reference distance between a boundary of the reference block and a boundary of a motion compensation padding reference picture is less than a first padding distance, the motion compensation padding reference block may be determined as including neighboring pixels within the motion compensation padding reference distance in a padding direction from the boundary of the reference block.
[0012] According to the embodiment, in the step of filling the motion compensation filling area based on the motion compensation filling reference block, when the motion compensation filling reference distance between the boundary of the reference block and the boundary of the motion compensation filling reference picture is less than the first filling distance, the motion compensation filling reference block can be used to fill the motion compensation filling area within the motion compensation filling reference distance from the boundary of the current picture of the motion compensation filling area, and the area of the motion compensation filling area that is not the motion compensation filling area can be filled based on the pixel value of the motion compensation filling area.
[0013] According to an embodiment, when a motion vector cannot be extracted from a boundary block, a motion compensation padding area may be filled according to pixel values adjacent to a boundary of a current picture.
[0014] According to an embodiment, extracting a motion vector from a boundary block may include determining a temporal neighboring block corresponding to the position of the boundary block from a temporally corresponding reference picture of the current picture when the motion vector cannot be extracted from the boundary block, and extracting the motion vector from the temporal neighboring block.
[0015] According to an embodiment, the first padding distance may be determined based on at least one of a maximum size of a coding unit, a size of a current picture, or a size of a boundary block.
[0016] According to an embodiment, the first filling distance may be determined to be one of 2, 4, 8, 16, 32, 64, 128, or 256.
[0017] According to an embodiment, the second padding distance may be determined based on at least one of a maximum size of a coding unit, a size of a current picture, or a size of a boundary block.
[0018] According to an embodiment, the size of the extended picture may be determined based on the size of the current picture regardless of the value of the first padding distance.
[0019] An image decoding method according to another embodiment of the present invention may include: determining a first reference picture and a second reference picture referenced by a current picture to predict a current block of the current picture; determining a first reference block and a second reference block from the first reference picture and the second reference picture respectively according to a first motion vector and a second motion vector of the current block, and predicting the current block using at least one of the first reference block or the second reference block according to whether all pixels of the first reference block are included in the first reference picture and whether all pixels of the second reference block are included in the second reference picture.
[0020] According to an embodiment, in the step of predicting the current block, when some or all pixels of the first reference block are not included in the first reference picture and all pixels of the second reference block are included in the second reference picture, the current block is predicted based on the second reference block.
[0021] According to an embodiment, when some pixels of the first reference block are not included in the first reference picture and all pixels of the second reference block are included in the second reference picture, a first area of the current block corresponding to the position of the pixels included in the first reference picture in the first reference block can be determined by weighted averaging of the pixels of the first reference block and the second reference block, and a second area of the current block corresponding to the position of the pixels not included in the first reference picture in the first reference block can be predicted based only on the second reference block.
[0022] According to an embodiment, when determining whether all pixels of a first reference block are included in a first reference picture and whether all pixels of a second reference block are included in a second reference picture, a first motion compensation filling area of the first reference picture may be considered as the first reference picture, and a second motion compensation filling area of the second reference picture may be considered as the second reference picture.
[0023] An image encoding method according to an embodiment of the present invention may include: filling a motion compensation filling area within a first filling distance from a boundary of a current picture according to a motion vector of a boundary block adjacent to a boundary of a current picture; filling a repeated filling area within a second filling distance from a boundary of the motion compensation filling area according to a pixel value adjacent to the boundary of the motion compensation filling area; and storing an extended picture consisting of the current picture, the motion compensation filling area and the repeated filling area in a memory.
[0024] An image encoding method according to another embodiment of the present invention may include: determining a first reference picture and a second reference picture referenced by a current picture to predict a current block of the current picture; determining a first reference block and a second reference block from the first reference picture and the second reference picture, respectively, based on a first motion vector and a second motion vector of the current block; and predicting the current block using at least one of the first reference block or the second reference block, based on whether all pixels of the first reference block are included in the first reference picture and whether all pixels of the second reference block are included in the second reference picture.
[0025] A non-transitory computer-readable recording medium according to an embodiment of the present invention may store a bit stream generated by an image encoding method.
[0026] A transmission method according to an embodiment of the present invention transmits a bit stream generated by an image encoding method.
[0027] The features briefly summarized above with respect to the present invention are merely exemplary aspects of the following detailed description of the invention and do not limit the scope of the invention.
[0028] Beneficial Effects
[0029] The present invention proposes various embodiments of a method for generating an extended picture including a motion compensated padding area to improve the prediction accuracy of inter-frame prediction.
[0030] In addition, the present invention proposes various implementations of an efficient bilateral inter prediction method when all or part of a reference block is located in a repetitive filling area or a motion compensation filling area in order to improve the prediction accuracy of the inter prediction.
[0031] In the present invention, as the accuracy of inter-frame prediction is improved, the overall encoding efficiency can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 is a block diagram showing the configuration of an encoding device according to an embodiment of the present invention.
[0033] Figure 2 is a block diagram showing the configuration of a decoding device according to an embodiment of the present invention.
[0034] Figure 3 FIG. 1 is a schematic diagram schematically showing a video coding system to which the present invention can be applied.
[0035] Figure 4 An embodiment of an extended picture generated according to the repetitive filling method is shown.
[0036] Figure 5 An embodiment of an extended picture generated according to repetition padding and motion compensated padding is shown.
[0037] Figure 6 An embodiment of a method of determining a motion compensated fill region is shown.
[0038] Figure 7 An embodiment of an extended picture is shown, wherein the extended picture area is determined regardless of the size of the motion compensated padding area.
[0039] Figure 8 An embodiment of a method of performing motion compensated filling based on temporal neighboring blocks is shown.
[0040] Fig. 9 An embodiment of a block prediction method by bilateral motion prediction is shown.
[0041] Fig.10 and Fig.11 An implementation of a block prediction method by bilateral motion prediction when a portion of a reference block is located outside a reference picture is shown.
[0042] Fig.12 An implementation of a block prediction method by bilateral motion prediction when an extended picture has a motion compensated padding area is shown.
[0043] Fig.13 An embodiment of the image decoding method according to the present invention is shown.
[0044] Fig.14 An embodiment of the image encoding method according to the present invention is shown.
[0045] Fig.15 A content streaming system to which an embodiment according to the present invention can be applied is exemplarily shown. DETAILED DESCRIPTION
[0046] Best Mode for Carrying Out the Invention
[0047] An image decoding method according to an embodiment of the present invention may include: filling a motion compensation filling area within a first filling distance from a boundary of a current picture according to a motion vector of a boundary block adjacent to a boundary of a current picture; filling a repeated filling area within a second filling distance from a boundary of the motion compensation filling area according to a pixel value adjacent to the boundary of the motion compensation filling area; and storing an extended picture consisting of the current picture, the motion compensation filling area and the repeated filling area in a memory.
[0048] Modes for Carrying Out the Invention
[0049] The present invention may have various modifications and embodiments, and specific embodiments are shown in the drawings and described in detail in the detailed specification. However, this is not intended to limit the present invention to specific embodiments, but should be understood to include all modifications, equivalents or alternatives contained in the spirit and technical scope of the present invention. The same figure marks in the drawings indicate the same or similar functions in various aspects. For a clearer description, the shapes and sizes of the elements in the drawings can be provided by way of example. The detailed description of the exemplary embodiments described below refers to the drawings, which show specific embodiments by way of example. These embodiments are described in full detail to enable those skilled in the art to practice the embodiments. It should be understood that various embodiments are different from each other, but not necessarily mutually exclusive. For example, without departing from the spirit and scope of the present invention with reference to an embodiment, the specific shapes, structures and features described herein can be implemented in other embodiments. It should also be understood that without departing from the spirit and scope of the embodiment, the position or arrangement of each component in each disclosed embodiment can be changed. Accordingly, the detailed description set forth below is not intended to be restrictive, and the scope of the exemplary embodiments is limited only by the full range of equivalent forms assigned by the attached claims and these claims (if appropriately described).
[0050] In the present invention, the terms first, second, etc. may be used to describe various components, but the components should not be limited by the terms. The terms are only used for the purpose of distinguishing one component from another component. For example, without departing from the scope of the present invention, a first component may be referred to as a second component, and similarly, a second component may also be referred to as a first component. The terms and / or include a combination of multiple related descriptive items or any item in multiple related descriptive items.
[0051] The components shown in the embodiments of the present invention are depicted independently to indicate different characteristic functions, and do not represent that each component is formed as a separate hardware or software configuration unit. That is, for ease of explanation, each component is listed and included as a separate component, and at least two of the components can be combined to form a single component, or one component can be divided into multiple components to perform functions, as long as it does not depart from the essence of the present invention, the embodiment in which the components are integrated and the embodiment in which each component is divided are also included in the scope of the present invention.
[0052] The terms used in the present invention are only used to describe specific embodiments and are not intended to limit the present invention. Singular expressions include plural expressions unless the context clearly indicates otherwise. In addition, some components of the present invention are not necessary components for performing necessary functions in the present invention, and can be optional components that are only used to improve performance. The present invention can be realized by only including necessary components for realizing the gist of the present invention and not including components that are only used to improve performance, and the structure that only includes necessary components and does not include optional components that are only used to improve performance is also included in the scope of the present invention.
[0053] In an embodiment, the term "at least one" may refer to one of a number greater than or equal to 1, such as 1, 2, 3, and 4. In an embodiment, the term "plurality" may refer to one of a number greater than or equal to 2, such as 2, 3, and 4.
[0054] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. When describing the embodiments of the present specification, if it is determined that the detailed description of the related known configuration or function will obscure the subject of the present specification, the detailed description will be omitted, the same figure numerals will be used for the same components in the drawings, and the repeated description of the same components will be omitted.
[0055] Description of terms
[0056] Hereinafter, "image" may refer to a picture constituting a video, and may also refer to the video itself. For example, "encoding and / or decoding of an image" may refer to "encoding and / or decoding of a video", and may also refer to "encoding and / or decoding of one of the images constituting the video".
[0057] Hereinafter, "motion picture" and "video" may be used with the same meaning and may be used interchangeably. In addition, the target image may be an encoding target image as a target of encoding and / or a decoding target image as a target of decoding. In addition, the target image may be an input image input to an encoding device, and may be an input image input to a decoding device. Here, the target image may have the same meaning as the current image.
[0058] Hereinafter, “image”, “picture”, “frame” and “screen” may be used with the same meaning and may be used interchangeably.
[0059] Hereinafter, a "target block" may be an encoding target block as a target of encoding and / or a decoding target block as a target of decoding. In addition, a target block may be a current block as a target of current encoding and / or decoding. For example, "target block" and "current block" may be used with the same meaning and may be used interchangeably.
[0060] In the following, "block" and "unit" may be used with the same meaning and may be used interchangeably. In addition, a "unit" may be represented as including a luma component block and a chroma component block corresponding thereto, so as to distinguish it from a block. For example, a coding tree unit (CTU) may consist of a luma component (Y) coding tree block (CTB) and two chroma component (Cb, Cr) coding tree blocks associated therewith.
[0061] Hereinafter, "sample", "picture element", and "pixel" may be used with the same meaning and may be used interchangeably. Herein, a sample may represent a basic unit constituting a block.
[0062] Hereinafter, “inter-frame” and “inter-screen” may be used with the same meaning and may be used interchangeably.
[0063] Hereinafter, “intra-frame” and “intra-screen” may be used with the same meaning and may be used interchangeably.
[0064] Figure 1 is a block diagram showing the configuration of an encoding device according to an embodiment of the present invention.
[0065] The encoding device 100 may be an encoder, a video encoding device, or an image encoding device. A video may include one or more images. The encoding device 100 may sequentially encode one or more images.
[0066] refer to Figure 1 The encoding device 100 may include: an image partitioning unit 110, an intra-frame prediction unit 120, a motion prediction unit 121, a motion compensation unit 122, a switch 115, a subtractor 113, a transform unit 130, a quantization unit 140, an entropy encoding unit 150, an inverse quantization unit 160, an inverse transform unit 170, an adder 117, a filtering unit 180 and a reference picture buffer 190.
[0067] In addition, the encoding device 100 may generate a bitstream including information encoded by encoding the input image, and output the generated bitstream. The generated bitstream may be stored in a computer-readable recording medium, or may be streamed through a wired / wireless transmission medium.
[0068] The image partitioning unit 110 can partition the input image into various forms to improve the efficiency of video encoding / decoding. That is, the input video consists of multiple pictures, and for compression efficiency, parallel processing, etc., a picture can be hierarchically partitioned and processed. For example, a picture can be partitioned into one or more tiles or slices, and then partitioned into multiple codec tree units (CTUs) again. Alternatively, a picture can first be partitioned into multiple sub-pictures defined as rectangular slice groups, and each sub-picture can be partitioned into tiles / slices. Here, sub-pictures can be used to support the function of partially independently encoding / decoding and transmitting pictures. Since multiple sub-pictures can be reconstructed separately, this has the advantage of easy editing in applications where multi-channel inputs are configured as one picture. In addition, tiles can be divided horizontally to generate bricks. Here, bricks can be used as basic units for parallel processing within a picture. In addition, a CTU can be recursively partitioned into a quad tree (quad tree, QT), and the terminal node of the partition can be defined as a coding unit (Coding Unit, CU). The CU can be partitioned into a PU (Prediction Unit) as a prediction unit and a TU (Transform Unit) as a transform unit to perform prediction and partitioning. On the other hand, the CU can be used as a prediction unit and / or a transform unit itself. Here, for flexible partitioning, each CTU can be recursively partitioned into multi-type trees (MTT) and quadtrees (QT). Partitioning the CTU into multi-type trees can start from the terminal node of the QT, and the MTT can be composed of a binary tree (BT) and a triple tree (TT). For example, the MTT structure can be classified into a vertical binary split mode (SPLIT_BT_VER), a horizontal binary split mode (SPLIT_BT_HOR), a vertical ternary split mode (SPLIT_TT_VER), and a horizontal ternary split mode (SPLIT_TT_HOR). In addition, during partitioning, the minimum block size (MinQTSize) of the quadtree of the luminance block can be set to 16×16, the maximum block size (MaxBtSize) of the binary tree can be set to 128×128, and the maximum block size (MaxTtSize) of the ternary tree can be set to 64×64. In addition, the minimum block size (MinBtSize) of the binary tree and the minimum block size (MinTtSize) of the ternary tree can be specified as 4×4, and the maximum depth (MaxMttDepth) of the multi-type tree can be specified as 4. In addition, in order to improve the coding efficiency of the I slice, a dual tree of the CTU partition structure that uses luminance components and chrominance components differently can be applied. The above-mentioned quadtree structure may include a rectangular quadtree structure and a triangular quadtree structure that apply geometric partitioning.And the above-mentioned ternary tree structure may include a rectangular ternary tree structure and an asymmetric ternary tree structure applying geometric partitioning. The above-mentioned binary tree structure may include a rectangular binary tree structure and a geometric binary tree structure applying geometric partitioning. On the other hand, in P slices and B slices, the brightness and chrominance coding tree blocks (Coding Tree Block, CTB) within the CTU can be partitioned into a single tree sharing the coding tree structure.
[0069] The encoding device 100 may perform encoding on the input image in intra mode and / or inter mode. Alternatively, the encoding device 100 may perform encoding on the input image in a third mode other than intra mode and inter mode (e.g., IBC mode, palette mode, etc.). However, if the third mode has functional characteristics similar to those of the intra mode or inter mode, it may be classified as the intra mode or inter mode for ease of explanation. In the present invention, the third mode is classified and described separately only when a specific description of the third mode is required.
[0070] When the intra mode is used as the prediction mode, the switch 115 can switch to the intra mode, and when the inter mode is used as the prediction mode, the switch 115 can switch to the inter mode. Here, the intra mode can represent the intra prediction mode, and the inter mode can represent the inter prediction mode. The encoding device 100 can generate a prediction block for an input block of an input image. In addition, the encoding device 100 can encode a residual block using the residual of the input block and the prediction block after generating the prediction block. The input image can be referred to as the current image as the current encoding target. The input block can be referred to as the current block or the encoding target block as the current encoding target.
[0071] When the prediction mode is intra mode, the intra prediction unit 120 may use samples of the already encoded / decoded blocks around the current block as reference samples. The intra prediction unit 120 may perform spatial prediction of the current block by utilizing the reference samples, or generate prediction samples of the input block by spatial prediction. In this article, intra prediction may refer to intra-picture prediction.
[0072] As the intra prediction method, non-directional prediction modes such as DC mode and planar mode and directional prediction modes (for example, 65 directions) may be applied. Here, the intra prediction method may be expressed as an intra prediction mode or an intra-screen prediction mode.
[0073] When the prediction mode is the inter mode, the motion prediction unit 121 can retrieve the area that best matches the input block from the reference image in the motion prediction process, and derive the motion vector by using the retrieved area. In this case, the search area can be used as the area. The reference image can be stored in the reference picture buffer 190. Here, when encoding / decoding of the reference image is performed, it can be stored in the reference picture buffer 190.
[0074] The motion compensation unit 122 may generate a prediction block of the current block by performing motion compensation using a motion vector. Herein, inter prediction may mean inter-picture prediction or motion compensation.
[0075] When the value of the motion vector is not an integer, the motion prediction unit 121 and the motion compensation unit 122 may generate a prediction block by applying an interpolation filter to a partial area of the reference picture. In order to perform inter-frame prediction or motion compensation, it may be determined based on the codec unit whether the motion prediction and motion compensation mode of the prediction unit included in the codec unit is one of the skip mode, merge mode, advanced motion vector prediction (AMVP) mode, and intra block copy (IBC) mode, and inter-frame prediction or motion compensation may be performed according to each mode.
[0076] In addition, based on the above-mentioned inter-frame prediction method, the affine (AFFINE) mode based on sub-PU prediction, the sub-block-based temporal motion vector prediction (SbTMVP) mode, the PU-based prediction and MVD merge (Merge with MVD, MMVD) mode and the geometric partitioning mode (Geometric Partitioning Mode, GPM) mode can be applied. In addition, in order to improve the performance of each mode, history based MVP (HMVP), pairwise average MVP (PAMVP), combined intra / inter prediction (CIIP), adaptive motion vector resolution (AMVR), bi-directional optical flow (BDOF), bi-predictive with CU Weights (BCW), local illumination compensation (LIC), template matching (TM), overlapped block motion compensation (OBMC), etc. can be applied.
[0077] The subtractor 113 may generate a residual block by utilizing the difference between the input block and the prediction block. The residual block may be referred to as a residual signal. The residual signal may represent the difference between the original signal and the prediction signal. Alternatively, the residual signal may be a signal generated by transforming or quantizing, or transforming and quantizing the difference between the original signal and the prediction signal. The residual block may be a residual signal of a block unit.
[0078] The transform unit 130 may generate a transform coefficient by performing a transform on the residual block, and output the generated transform coefficient. Herein, the transform coefficient may be a coefficient value generated by performing a transform on the residual block. When the transform skip mode is applied, the transform unit 130 may skip the transform of the residual block.
[0079] The quantization level may be generated by applying quantization to a transform coefficient or a residual signal. Hereinafter, the quantization level may also be referred to as a transform coefficient in an embodiment.
[0080] For example, a 4×4 luminance residual block generated by intra prediction is transformed using a base vector based on a discrete sine transform (DST), and the remaining residual block can be transformed using a base vector based on a discrete cosine transform (DCT). In addition, the transform block is partitioned into a quadtree shape of a block using a residual quad tree (RQT) technique, and after transforming and quantizing each transform block partitioned by the RQT, a coded block flag (cbf) can be transmitted when all coefficients become 0 to improve coding efficiency.
[0081] As another alternative, a Multiple Transform Selection (MTS) technique that selectively uses multiple transform bases to perform transforms can be applied. That is, instead of partitioning the CU into TUs through RQT, a function similar to TU partitioning can be performed through a sub-block transform (SBT) technique. Specifically, SBT is only applied to inter-prediction blocks, and unlike RQT, the current block can be partitioned into a size of 1 / 2 or 1 / 4 in the vertical or horizontal direction, and then the transform can be performed only on one of the blocks. For example, if the current block is partitioned vertically, the transform can be performed on the leftmost or rightmost block, and if the current block is partitioned horizontally, the transform can be performed on the topmost or bottommost block.
[0082] In addition, a low frequency non-separable transform (LFNST) can be applied, which is a secondary transform technique that additionally transforms the transformed residual signal into the frequency domain by DCT or DST. LFNST additionally performs a transform on a 4×4 or 8×8 low frequency region on the upper left side so that the residual coefficients can be concentrated on the upper left side.
[0083] The quantization unit 140 may generate a quantization level by quantizing the transform coefficient or the residual signal according to a quantization parameter (QP), and output the generated quantization level. Herein, the quantization unit 140 may quantize the transform coefficient by using a quantization matrix.
[0084] For example, a quantizer using a QP value of 0 to 51 may be used. Alternatively, if the image size is large and high coding efficiency is required, a QP of 0 to 63 may be used. In addition, a dependent quantization (DQ) method using two quantizers instead of one quantizer may be applied. DQ performs quantization using two quantizers (e.g., Q0 and Q1), but even if there is no signaling information about the use of a specific quantizer, the quantizer used for the next transform coefficient may be selected based on the current state through a state transition model.
[0085] The entropy encoding unit 150 may generate a bit stream by performing entropy encoding on the value calculated by the quantization unit 140 or the encoding parameter value calculated when encoding is performed according to the probability distribution, and output the bit stream. The entropy encoding unit 150 may perform entropy encoding on information about samples of an image and information for decoding an image. For example, the information for decoding an image may include a syntax element.
[0086] When entropy coding is applied, the symbol is represented so that a smaller number of bits are assigned to symbols with a high probability of occurrence and a larger number of bits are assigned to symbols with a low probability of occurrence, so the size of the bit stream for the symbol to be encoded can be reduced. The entropy coding unit 150 can use coding methods such as exponential Golomb, context-adaptive variable length coding (context-adaptive variable length coding, CAVLC), context-adaptive binary arithmetic coding (context-adaptive binary arithmetic coding, CABAC) for entropy coding. For example, the entropy coding unit 150 can perform entropy coding by using a variable length coding / code (variable length coding / code, VLC) table. In addition, the entropy coding unit 150 can derive a binarization method of the target symbol and a probability model of the target symbol / binary, and perform arithmetic coding and decoding by using the derived binarization method and context model.
[0087] In this regard, when CABAC is applied, in order to reduce the size of the probability table stored in the decoding device, the table probability update method can be changed to a table update method using a simple equation and applied. In addition, two different probability models can be used to obtain more accurate symbol probability values.
[0088] In order to encode the transformation coefficient level (quantization level), the entropy encoding unit 150 may change the coefficients in a two-dimensional block form into a one-dimensional vector form through a transformation coefficient scanning method.
[0089] The coding and decoding parameters may include information (flags, indexes, etc.) encoded in the encoding device 100 and signaled to the decoding device 200, such as syntax elements, and information derived during the encoding or decoding process, and may represent information required when encoding or decoding an image.
[0090] Herein, signaling a flag or an index may mean that in an encoder, the corresponding flag or index is entropy encoded and included in a bitstream, and may mean that in a decoder, the corresponding flag or index is entropy decoded from the bitstream.
[0091] The encoded current image can be used as a reference image for another image to be processed later. Therefore, the encoding device 100 can reconstruct or decode the encoded current image again and store the reconstructed or decoded image in the reference picture buffer 190 as a reference image.
[0092] The quantization level may be dequantized in the dequantization unit 160 or may be inversely transformed in the inverse transform unit 170. The dequantized and / or inversely transformed coefficients may be added to the prediction block by the adder 117. Herein, the dequantized and / or inversely transformed coefficients may represent coefficients on which at least one of dequantization and inverse transformation is performed, and may represent a reconstructed residual block. The dequantization unit 160 and the inverse transform unit 170 may be performed as inverse processes of the quantization unit 140 and the transform unit 130.
[0093] The reconstructed block may pass through the filtering unit 180. The filtering unit 180 may apply a deblocking filter, a sample adaptive offset (SAO), an adaptive loop filter (ALF), a bilateral filter (BIF), a luminance mapping with chroma scaling (LMCS), etc. to the reconstructed sample, the reconstructed block, or the reconstructed image using all or some filtering techniques. The filtering unit 180 may be referred to as an in-loop filter. In this case, the in-loop filter may also be used as a name excluding LMCS.
[0094] The deblocking filter can remove block distortion generated in the boundary between blocks. In order to determine whether to apply the deblocking filter, it can be determined whether to apply the deblocking filter to the current block based on samples included in several rows or columns included in the block. When the deblocking filter is applied to the block, different filters can be applied according to the required deblocking filter strength.
[0095] In order to compensate for the coding error using sample adaptive offset, an appropriate offset value may be added to the sample value. Sample adaptive offset can correct the offset from the original image in sample units for the deblocked image. A method of partitioning the samples included in the image into a predetermined number of regions, determining the region to which the offset is applied, and applying the offset to the determined region, or a method of applying the offset in consideration of edge information about each sample may be used.
[0096] The bilateral filter (BIF) can also correct the deviation from the original image on a sample-by-sample basis for the image on which deblocking has been performed.
[0097] The adaptive loop filter may perform filtering based on the comparison result of the reconstructed image with the original image. The samples included in the image may be partitioned into predetermined groups, the filter to be applied to each group may be determined, and differential filtering may be performed on each group. Information on whether the ALF is applied may be signaled by a codec unit (CU), and the form and coefficients of the adaptive loop filter to be applied to each block may vary.
[0098] In luma mapping with chroma scaling (LMCS), luma mapping (LM) means remapping luma values by a piecewise linear model, and chroma scaling (CS) means a technique for scaling the residual values of chroma components according to the average luma value of a prediction signal. In particular, LMCS can be used as an HDR correction technique that reflects the characteristics of a High Dynamic Range (HDR) image.
[0099] The reconstructed block or the reconstructed image that has passed through the filtering unit 180 may be stored in the reference picture buffer 190. The reconstructed block that has passed through the filtering unit 180 may be part of the reference image. That is, the reference image is a reconstructed image composed of the reconstructed block that has passed through the filtering unit 180. The stored reference image may be used for inter-frame prediction or motion compensation later.
[0100] Figure 2 is a block diagram showing the configuration of a decoding device according to an embodiment of the present invention.
[0101] The decoding device 200 may be a decoder, a video decoding device, or an image decoding device.
[0102] refer to Figure 2The 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, a motion compensation unit 250, an adder 201, a switch 203, a filtering unit 260 and a reference picture buffer 270.
[0103] The decoding device 200 may receive a bit stream output from the encoding device 100. The decoding device 200 may receive a bit stream stored in a computer-readable recording medium, or may receive a bit stream streamed through a wired / wireless transmission medium. The decoding device 200 may decode the bit stream in an intra-frame mode or an inter-frame mode. In addition, the decoding device 200 may generate a reconstructed image or a decoded image generated by decoding, and output the reconstructed image or the decoded image.
[0104] When the prediction mode for decoding is the intra mode, the switch 203 may switch to the intra mode. Alternatively, when the prediction mode for decoding is the inter mode, the switch 203 may switch to the inter mode.
[0105] The decoding device 200 can obtain a reconstructed residual block by decoding the input bit stream and generate a prediction block. When the reconstructed residual block and the prediction block are obtained, the decoding device 200 can generate a reconstructed block that becomes a decoding target by adding the reconstructed residual block and the prediction block. The decoding target block can be called a current block.
[0106] The entropy decoding unit 210 may generate symbols by entropy decoding the bit stream according to the probability distribution. The generated symbols may include symbols in the form of quantization levels. In this article, the entropy decoding method may be an inverse process of the above entropy encoding method.
[0107] The entropy decoding unit 210 may change the coefficients of the one-dimensional vector shape into coefficients of the two-dimensional block shape through a transform coefficient scanning method to decode the transform coefficient level (quantization level).
[0108] The quantization level may be inversely quantized in the inverse quantization unit 220 or inversely transformed in the inverse transform unit 230. The quantization level may be a result of inverse quantization and / or inverse transformation and may be generated as a reconstructed residual block. Herein, the inverse quantization unit 220 may apply a quantization matrix to the quantization level. The inverse quantization unit 220 and the inverse transform unit 230 applied to the decoding device may apply the same technology as the inverse quantization unit 160 and the inverse transform unit 170 applied to the aforementioned encoding device.
[0109] When the intra mode is used, the intra prediction unit 240 can generate a prediction block by performing spatial prediction on the current block, which uses sample values of blocks that have been decoded around the decoding target block. The intra prediction unit 240 applied to the decoding device can apply the same technology as the intra prediction unit 120 applied to the aforementioned encoding device.
[0110] When the inter-frame mode is used, the motion compensation unit 250 can generate a prediction block by performing motion compensation using a motion vector and a reference image stored in the reference picture buffer 270 on the current block. When the value of the motion vector is not an integer value, the motion compensation unit 250 can generate a prediction block by applying an interpolation filter to a partial area within the reference image. In order to perform motion compensation, it can be determined based on the codec unit whether the motion compensation mode of the prediction unit included in the corresponding codec unit is a skip mode, a merge mode, an AMVP mode, or a current picture reference mode, and motion compensation can be performed according to each mode. The motion compensation unit 250 applied to the decoding device can apply the same technology as the motion compensation unit 122 applied to the above-mentioned encoding device.
[0111] The adder 201 may generate a reconstructed block by adding the reconstructed residual block and the prediction block. The filtering unit 260 may apply at least one of an inverse LMCS, a deblocking filter, a sample adaptive offset, and an adaptive loop filter to the reconstructed block or the reconstructed image. The filtering unit 260 applied to the decoding device may apply the same filtering technique as the filtering unit 180 applied to the aforementioned encoding device.
[0112] The filtering unit 260 may output a reconstructed image. The reconstructed block or the reconstructed image may be stored in the reference picture buffer 270 and used for inter-frame prediction. The reconstructed block that has passed through the filtering unit 260 may be part of the reference image. That is, the reference image may be a reconstructed image composed of the reconstructed blocks that have passed through the filtering unit 260. The stored reference image may be used for inter-frame prediction or motion compensation later.
[0113] Figure 3 FIG. 1 is a schematic diagram schematically showing a video coding system to which the present invention can be applied.
[0114] The video coding system according to the embodiment may include an encoding device 10 and a decoding device 20. The encoding device 10 may transmit the encoded video and / or image information or data to the decoding device 20 in the form of a file or streaming through a digital storage medium or a network.
[0115] The encoding device 10 according to the embodiment may include a video source generating unit 11, an encoding unit 12, and a transmitting unit 13. The decoding device 20 according to the embodiment may include a receiving unit 21, a decoding unit 22, and a rendering unit 23. The encoding unit 12 may be referred to as a video / image encoding unit, and the decoding unit 22 may be referred to as a video / image decoding unit. The transmitting unit 13 may be included in the encoding unit 12. The receiving unit 21 may be included in the decoding unit 22. The rendering unit 23 may include a display unit, and the display unit may be configured as a separate device or an external component.
[0116] The video source generation unit 11 can obtain the video / image by capturing, synthesizing or generating the video / image process. The video source generation unit 11 may include a video / image capture device and / or a video / image generation device. The video / image capture device may include, for example, one or more cameras, a video / image archive including previously captured videos / images, etc. The video / image generation device may include, for example, a computer, a tablet computer, a smart phone, etc., and may (electronically) generate the video / image. For example, a virtual video / image may be generated by a computer, etc., in which case the video / image capture process may be replaced by a process for generating relevant data.
[0117] The encoding unit 12 may encode the input video / image. For compression and encoding efficiency, the encoding unit 12 may perform a series of processes such as prediction, transformation, and quantization. The encoding unit 12 may output the encoded data (encoded video / image information) in the form of a bit stream. The detailed configuration of the encoding unit 12 may also be the same as described above. Figure 1 The encoding device 100 is configured in the same manner.
[0118] The sending unit 13 may send the encoded video / image information or data output in the form of a bit stream to the receiving unit 21 of the decoding device 20 through a digital storage medium or a network in the form of a file or streaming. The digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The sending unit 13 may include an element for generating a media file in a predetermined file format, and may include an element for transmission through a broadcast / communication network. The receiving unit 21 may extract / receive a bit stream from a storage medium or a network and send it to the decoding unit 22.
[0119] The decoding unit 22 can decode the video / image by performing a series of processes such as inverse quantization, inverse transformation, and prediction corresponding to the operations of the encoding unit 12. The detailed configuration of the decoding unit 22 can also be similar to Figure 2 The above-mentioned decoding device 200 is configured in the same manner.
[0120] The rendering unit 23 may render the decoded video / image. The rendered video / image may be displayed by the display unit.
[0121] In the present invention, a boundary area filling technique is proposed, which extends the reference picture using a filling method in the boundary area during motion compensation by motion prediction, and then generates an inter-frame prediction block based on the extended reference picture. Due to high complexity and large memory usage, the boundary area filling method may be cumbersome for the decoder. Therefore, a method is proposed that can fill the boundary area with low decoder complexity and small memory usage. In addition, when the filled boundary area is referenced in bilateral motion compensation, various embodiments of the motion compensation method are proposed.
[0122] In the following, Figure 4 A method for determining an extended picture according to a repetitive filling method is described. In addition, Figures 5 to 8 A method of determining an extended picture according to a motion compensation filling method and a repetition filling method is described.
[0123] Figure 4 An embodiment of generating an extended picture according to a repeat filling method is shown.
[0124] Figure 4 An extended picture 400 consisting of a reference picture 402 and an extended picture area 404 is shown. Here, the extended picture area 404 represents an area extended by a predetermined padding distance from the boundary of the reference picture 402. The predetermined padding distance may be determined according to the maximum width of the codec unit and / or the maximum height of the codec unit. Alternatively, the predetermined padding distance may be determined as a value greater than the maximum width of the codec unit or the maximum height of the codec unit by a predetermined value. For example, Figure 4 As shown, when the maximum width of the coding unit is maxCUwidth, the predetermined padding size may be (maxCUwidth+16).
[0125] Figure 4 The extended picture area 404 consists only of repeated filling areas. The repeated filling areas are generated by repeatedly filling pixels located at the border of the reference picture. Figure 4 All pixels generated by filling the extended picture area 404 with a pixel at the boundary of the reference picture 402 have the same value. For example, the values of the pixels 408 of the extended picture area 404 generated from the pixels 406 of the reference picture 402 can all be determined to be the same as the values of the pixels 406 of the reference picture 402.
[0126] Figure 5 An embodiment of an extended picture generated according to repetition padding and motion compensated padding is shown.
[0127] Figure 5 The extended picture 500 is composed of a reference picture 502 and an extended picture area. In addition, the extended picture area is composed of a repetitive padding area 504 and a motion compensation (MC) padding area 506.
[0128] The pixels of the motion compensated fill area 506 are determined by motion compensation using the motion vectors of the boundary blocks of the reference picture 502. Figure 6 Detailed description is given in . The area of the motion compensation padding area 506 may be determined by a first padding distance applied to the motion compensation padding area 506. For example, the area of the motion compensation padding area 506 may be determined by the product of the width (picture_width) of the reference picture 502 and the first padding distance and the product of the height (picture_height) of the reference picture 502 and the first padding distance.
[0129] The first filling distance may be determined by the height or width of the reference image 502. Alternatively, the first filling distance may be a fixed value. Figure 5 As shown, the predetermined value may be 64. Accordingly, the size of the motion compensation padding area adjacent to the upper and lower boundaries of the reference picture may be (picture_width×64), and the size of the motion compensation padding area adjacent to the left and right boundaries of the reference picture may be (64×picture_height). According to an embodiment, the first padding distance applied to the motion compensation padding area 506 adjacent to the left and right sides of the reference picture 502 and the first padding distance applied to the motion compensation padding area 506 adjacent to the upper and lower sides of the reference picture 502 may be different from each other.
[0130] The repeated filling area 504 is generated by repeatedly filling pixels located at the boundary of the reference picture 502 or the motion compensation filling area with a second filling distance. The second filling distance can be determined according to the maximum width of the codec unit and / or the maximum height of the codec unit. Alternatively, the second filling distance can be determined as a value greater than the maximum width of the codec unit or the maximum height of the codec unit by a predetermined value. For example, Figure 5 As shown, when the maximum width of the coding unit is maxCUwidth, the predetermined second padding distance may be (maxCUwidth+16).
[0131] When a specific condition is met, a motion compensation padding area may be generated. For example, the motion compensation padding area 506 may be determined according to the slice type of the current picture 502. If the slice type of the current picture 502 is an I slice, the motion compensation padding area 506 is not generated, and if the slice type of the current picture 502 is a P slice or a B slice, the motion compensation padding area 506 may be generated.
[0132] Figure 6 An embodiment of a method of determining a motion compensated fill region is shown.
[0133] A motion compensation padding area 604 of the current picture 600 is determined using a motion vector derived from a boundary block 602 having a predetermined size located at a boundary of the current picture 600. Using the motion vector, a reference block 612 corresponding to the boundary block 602 is determined from a reference picture 610 referenced for reconstruction of the current picture. When the reference block 612 is determined, a motion compensation padding block 608 is derived from a motion compensation padding reference block 614 on the left side of the reference block 612.
[0134] exist Figure 6 In order to determine the left portion of the motion compensation padding area 604 of the current picture 600, the motion compensation padding reference block 614 on the left side of the reference block 612 is referenced. However, if it is necessary to determine the upper, lower or right motion compensation padding area, the block on the upper side, lower side or right side of the reference block of the reference picture 610 can be referenced.
[0135] The size of the boundary block 602 may be set differently depending on the implementation. Figure 6 , the size of the boundary block 602 is set to 4×4. Also, according to an embodiment, the size of the boundary block 602 may be set to a minimum size of a block determined by an encoder or a decoder.
[0136] The size of the motion compensation padding block 608 is the same as the size of the motion compensation padding reference block 614 to the left of the reference block 612. Figure 6 In FIG. 6 , since only pixels within a distance of M pixels to the left of the reference block 612 are available, the size of the motion compensation padding reference block 614 is set to M×4. Accordingly, the size of the motion compensation padding reference block 614 can be determined depending on how far the available pixels are from the left side of the reference block 612.
[0137] However, the width of the motion compensation padding block 608 cannot be greater than the width of the left portion of the motion compensation padding area 604. For example, if the motion compensation padding area is determined to be an area within a distance of 64 pixels from the reference picture, such as Figure 5 , the width of the motion compensation padding block 608 is determined to be equal to or less than 64.
[0138] As with the left side, the motion compensation padding reference block of the motion compensation padding area on the right side may be set to M×4. In addition, the motion compensation padding reference blocks of the motion compensation padding areas on the upper and lower sides may be set to 4×M.
[0139] If the boundary block 602 is reconstructed by bidirectional prediction, two motion vectors can be derived from the boundary block 602. Therefore, two reference blocks for motion compensation padding can be derived from the two motion vectors. In addition, based on the two reference blocks, a motion compensation padding block 608 can be determined.
[0140] According to one embodiment, the larger motion compensation filling reference block of the two motion compensation filling reference blocks derived from the two motion vectors may be determined as the motion compensation filling block 608. Alternatively, the motion compensation filling reference block of the reference block existing in the picture closer to the current picture 600 may be determined as the motion compensation filling block 608.
[0141] Alternatively, a block determined by averaging two motion compensation padding reference blocks may be determined as the motion compensation padding block 608. Alternatively, a block determined by weighted averaging of two motion compensation padding reference blocks may be determined as the motion compensation padding block 608. In this case, the weight used in the weighted averaging may be determined according to a Picture Order Count (POC) distance between reference pictures.
[0142] according to Figure 5 , the sizes of the upper and lower motion compensation padding areas are respectively determined as (picture_width×64), and the sizes of the left and right motion compensation padding areas are respectively determined as (64×picture_height). Figure 6 , the sizes of the upper and lower motion compensation padding blocks are determined to be 4×M, and the sizes of the left and right motion compensation padding blocks are determined to be M×4. Due to the first padding distance defined for the motion compensation padding block, the maximum value of M is determined as the first padding distance.
[0143] According to an embodiment, the first filling distance is Figure 5 64. However, the first filling distance may have a value other than 64, such as 8, 16, 32, 128, or 256. As the distance from the reference picture increases, the prediction accuracy of the motion vector extracted from the boundary block decreases. Therefore, the first filling distance may be determined within a range that can improve the prediction accuracy of the inter-frame prediction.
[0144] According to an embodiment, the first filling distance may be determined according to the maximum width or maximum height of the codec unit. For example, the first filling distance may be determined as a value equal to the maximum width or maximum height of the codec unit. Alternatively, the first filling distance may be determined by multiplying or dividing the maximum width or maximum height of the codec unit by a predetermined value.
[0145] According to an embodiment, the first filling distance may be determined based on the size of the reference picture. For example, as the size of the reference picture increases, the first filling distance may increase. Conversely, as the size of the reference picture decreases, the first filling distance may decrease.
[0146] According to an embodiment, the first filling distance may be determined according to the size of the boundary block used as a reference for motion compensation filling. Figure 6 , the size of the boundary block 602 is defined as 4×4, and the filling distance of the motion compensation filling area 604 is defined as 64. However, if the size of the boundary block increases, the filling distance of the motion compensation filling area may also increase.
[0147] According to an embodiment, the first padding distance may be determined from a slice header or a picture header. The slice header or the picture header may include information indicating the first padding distance, or may refer to a parameter set including the information. The parameter set may include a video parameter set, a sequence parameter set, or a picture parameter set.
[0148] If the value of M is less than the first filling distance, the motion compensation filling area from (M+1) to the first filling distance can be determined by repeatedly filling the pixel values at the outermost edge in the corresponding direction in the current picture. For example, the motion compensation filling area 616 can be determined by the current picture 600.
[0149] Alternatively, the motion compensation padding area may be determined by repeatedly filling pixel values located at the outermost edge in the motion compensation padding block in the corresponding direction. For example, the motion compensation padding area 616 may be determined by the motion compensation padding block 608 determined by the motion compensation padding.
[0150] If the boundary block 602 is encoded / decoded in the intra prediction mode, or the motion vector information of the boundary block 602 cannot be used, the value of M is set to 0, and the filling of the motion compensation filling area 616 can be performed using the method applied to the repeated filling area.
[0151] according to Figure 5, the size of the motion compensation filling area is (picture_width×64) and (64×picture_height). According to an embodiment, in order to reduce memory usage, the size of the motion compensation filling area can be determined according to an arbitrary integer N less than 64 (N≤64). Therefore, the size of the motion compensation filling area can be set to (picture_width×N) and (N×picture_height). At this time, the magnitude of N can be set to any integer less than or equal to 64 (for example, 2, 4, 8, 16, 32, 64, etc.). The magnitude of M in the M×4 or 4×M motion compensation filling block can be determined based on the determined magnitude of N. For example, if the magnitude of N in the motion compensation filling area is determined to be 16, the magnitude of M of the motion compensation filling block can be determined to be equal to or less than 16. That is, M≤N can be set.
[0152] Figure 7 An embodiment of an extended picture is shown, wherein the extended picture area is determined regardless of the size of the motion compensated padding area.
[0153] according to Figure 4 , the extended picture area includes only the repeated padding area. In addition, the extended picture area is generated by extending the reference picture from the boundary of the reference picture by a second padding distance (maxCUwidth+16) of pixels in each direction. On the other hand, according to Figure 5 , the extended picture area includes a repeated padding area and a motion compensated padding area. In addition, the extended picture area is generated by extending the reference picture from the boundary of the reference picture by a distance (maxCUwidth+16+N) of pixels corresponding to the sum of the first padding distance N and the second padding distance (maxCUwidth+16) in each direction.
[0154] Therefore, when based on Figure 5 When determining the extended image area, Figure 4 When determining the extended picture area, the implementation scheme of the invention further extends N pixels from the reference picture in each direction starting from the boundary of the reference picture, so that the memory usage increases. Therefore, in order to reduce the memory usage, even when the motion compensation padding area is applied, the size of the extended picture area can be limited, such as Figure 4 shown.
[0155] according to Figure 7 The size of the extended image 700 can be determined as Figure 4 The size of the extended image 400 is the same as that of the image 400. Figure 4 The memory required for the extended image 400 and the storage Figure 7The size of the memory required for the extended picture 700 is determined to be the same.
[0156] exist Figure 5 In the example, the motion compensation filling area 506 is determined by a predetermined first filling distance, and the repeated filling area 504 outside the motion compensation filling area 506 is determined by a predetermined second filling distance. Figure 5 In the case of , the size of the expanded picture 500 is determined by the sum of the first filling distance and the second filling distance. Figure 7 In this case, the size of the extended picture 700 can be determined by the second filling distance, regardless of the first filling distance.
[0157] Specifically, according to the first filling distance, Figure 7 However, since the extended picture 700 is determined as a region extended by the second filling distance from the reference picture 702, the repeated filling region 704 is determined by a distance obtained by subtracting the first filling distance from the second filling distance.
[0158] according to Figure 7 , the first filling distance is defined as N, and the second filling distance is defined as (maxCUwidth+16). The first filling distance is set to be smaller than the second filling distance, so that N is set to be smaller than (maxCUwidth+16). Here, maxCUwidth represents the maximum width of the codec unit. The second filling distance can be determined as the maximum width of the codec unit or the maximum height of the codec unit, or can be determined as a larger value.
[0159] In summary, the size of the extended picture 700 can be determined according to the second filling distance, regardless of the first filling distance applied to the motion compensation filling area 706. Therefore, regardless of whether the motion compensation filling area 706 is applied and the first filling distance, the size of the extended picture 700 and the size of the memory required for the extended picture 700 are fixed, so that the memory resources required for video encoding and decoding can be effectively managed.
[0160] According to another embodiment, the second padding distance is not defined, and the extended picture 700 may be extended only by the first padding distance N from the reference picture 702. In this case, only the motion compensation padding region 706 may be determined on the upper side, lower side, left side, and right side of the extended picture 700. In addition, only the upper left side, upper right side, lower left side, and lower right side regions near the vertex of the extended picture 700 may be set as the repeated padding region 704. Therefore, the extended picture 700 may be determined as a region extended by the first padding distance from the reference picture 702.
[0161] In summary, by omitting the generation of the repeated filling area 704 according to the second filling distance, the size of the extended picture 700 can be determined according to the first filling distance. Therefore, when generating the extended picture 700, the second filling distance is not applied, and only the first filling distance is applied, so that the size of the extended picture 700 and the size of the memory required for the extended picture 700 can be fixed. As a result, the memory resources required for video encoding and decoding can be efficiently managed.
[0162] Figure 8 An embodiment of a method of performing motion compensated filling based on temporal neighboring blocks is shown.
[0163] exist Figures 5 to 7 In the motion compensation filling method, when a boundary block adjacent to the boundary of the current picture is encoded / decoded in an intra prediction mode, or when the motion vector information of the boundary block cannot be used, filling using motion compensation is impossible. Accordingly, according to the embodiment, in the above case, since a reference block to be referred to when determining a motion compensation filling block cannot be determined, a motion compensation filling area can be filled according to a repeated filling method.
[0164] In this case, since the motion compensation padding area is basically determined by the repetitive padding method, as the accuracy of the extended picture area decreases, the encoding efficiency may decrease. Therefore, according to an embodiment, when the boundary block is encoded / decoded in the intra prediction mode or the motion vector information of the boundary block is unavailable, the motion compensation padding block can be derived based on the temporal neighboring blocks of the boundary block.
[0165] according to Figure 8 , when encoding / decoding a boundary block 802 adjacent to the boundary of the current picture 800 in the intra prediction mode, or when the motion vector information of the boundary block 802 is not available, a temporal neighboring block 822 at the same spatial position as the boundary block 802 is determined in the temporally corresponding reference picture 820. Then, based on the motion vector of the temporal neighboring block 822, a corresponding reference block 842 is determined in the reference picture 840. Then, a motion compensation padding reference block 844 is derived on the left side of the reference block 842, and a motion compensation padding block 806 is determined based on the motion compensation padding reference block 844.
[0166] When the temporal neighboring block 822 is also encoded / decoded in the intra prediction mode, or when the motion vector information of the temporal neighboring block 822 is also unavailable, the reference block to be referred to when determining the motion compensation filling block 806 cannot be determined, and thus the motion compensation filling area can be filled according to the repeated filling method. However, according to an embodiment, when the motion vector cannot be derived from the temporal neighboring block 822, a new temporal neighboring block can be derived from another temporally corresponding reference picture, and the motion compensation filling reference block 844 can be derived from the new temporal neighboring block.
[0167] exist Figure 8 In the above, the filling distance applied to the motion compensation filling area 804 is an arbitrary integer N, and the filling distance of the motion compensation filling block 806 is an arbitrary integer M. Here, M may be equal to or less than N. If the filling distance M of the motion compensation filling block 806 determined by the motion compensation filling reference block 844 is less than N, the remaining block 808 that is not filled by the motion compensation filling method may be filled by a repeated filling method with reference to the pixels of the compensation filling block 806.
[0168] In the following, Figures 9 to 11 An embodiment of a method of performing bilateral motion prediction based on an extended picture determined based on a repetition filling method is shown.
[0169] Fig. 9 An embodiment of a block prediction method by bilateral motion prediction is shown.
[0170] According to bilateral motion prediction, a prediction signal of the current block 902 is generated using two reference blocks 924 and 944 derived from different reference pictures 922 and 942 referenced by the current picture 900. Specifically, the prediction signal of the current block may be generated using a list 0 reference block 924 derived from a list 0 reference picture 922 and a list 1 reference block 944 derived from a list 1 reference picture 942.
[0171] according to Fig. 9 , list 0 reference block 924 is partially outside list 0 reference picture 922 (outside the boundary, OOB), while list 1 reference block 944 is completely inside list 1 reference picture 942 (non-outside the boundary, non-OOB).
[0172] When the extended picture areas 920 and 940 are determined using only the repetitive filling method, the prediction accuracy of the bilateral motion prediction method may be reduced when the reference block is partially or completely located outside the reference picture, such as Fig. 9 Therefore, various implementation schemes are proposed for improving the prediction accuracy of the bilateral motion prediction method in the above-mentioned situation.
[0173] Fig.10 An implementation of a block prediction method by bilateral motion prediction when a portion of a reference block is located outside a reference picture is shown.
[0174] according to Fig.10, when bilateral motion prediction is performed, list 1 reference block 1044 is completely inside list 1 reference picture 1042, and list 0 reference block 1024 is partially outside list 0 reference picture 1022. At this time, only list 1 reference block 1044 completely inside the reference picture can be used to generate a prediction block for current block 1002 in current picture 1000. On the contrary, if list 0 reference block 1024 is completely inside list 0 reference picture 1022, and list 1 reference block 1044 is partially outside list 1 reference picture 1042, only list 0 reference block 1024 can be used to generate a prediction block for current block 1002.
[0175] As in Fig.10 In the method, by using only reference blocks completely included in the reference picture, reference blocks including pixels in the repetitive padding area are excluded from motion prediction. Accordingly, since the repetitive padding area is excluded from the prediction process, the prediction accuracy of the current block can be improved.
[0176] Fig.11 An implementation of a block prediction method by bilateral motion prediction when a portion of a reference block is located outside a reference picture is shown.
[0177] according to Fig.11 , when bilateral motion prediction is performed, list 1 reference block 1144 is completely inside list 1 reference picture 1142, and list 0 reference block 1124 is partially outside list 0 reference picture 1122. At this time, all pixels of list 1 reference block 1144 that are completely inside list 1 reference picture 1142 may be referenced for generating a prediction block of current block 1102. However, since a portion of list 0 reference block 1124 is outside list 0 reference picture 1122, only pixels of region 1126 included in list 0 reference picture 1122 of list 0 reference block 1124 may be referenced for generating a prediction block of current block 1102. In addition, pixels in region 1128 that are not included in list 0 reference picture 1122 of list 0 reference block 1124 are not referenced for generating a prediction block of current block 1102.
[0178] Specifically, the first region 1104 of the current block 1102 has corresponding regions 1126 and 1146 in the list 0 reference block 1124 and the list 1 reference block 1144. Therefore, the first region 1104 can be determined based on the corresponding region 1126 of the list 0 reference block 1124 and the corresponding region 1146 of the list 1 reference block 1144. At this time, the first region 1104 can be determined by the average or weighted average of the two corresponding regions 1126 and 1146. The weight applied to the weighted average can be determined based on the adaptive weight value (bi-prediction with CU-level weight, BCW) of the codec unit (CU). Alternatively, the weight applied to the weighted average can be determined based on the temporal distance between the current picture 1100 and the list 0 reference picture 1122 and the temporal distance between the current picture 1100 and the list 1 reference picture 1142.
[0179] In addition, a corresponding area 1148 of a list 1 reference block 1144 within the list 1 reference picture 1142 exists only in the second area 1106 of the current block 1102. In addition, a corresponding area 1128 of a list 0 reference block 1124 does not exist in the list 0 reference picture 1122. Therefore, the second area 1106 of the current block 1102 may be determined based only on the corresponding area 1148 of the list 1 reference block 1144. In addition, the corresponding area 1128 of the list 0 reference block 1124 is not referenced for determining the second area 1106 of the current block 1102.
[0180] like Fig.11 As shown, only for the area where two pictures in two directions can be referenced in the reference block, the two pictures are referenced, and for the area where only one picture of the two pictures can be referenced, only the referenceable picture is referenced, so that the pixels in the repeated filling area are excluded from motion prediction. Fig.10 As shown, since the repeated filling area is excluded from the prediction process, the prediction accuracy of the current block can be improved.
[0181] Fig.12 An implementation of a block prediction method by bilateral motion prediction when an extended picture has a motion compensated padding area is shown.
[0182] exist Figures 9 to 11 In the case of a double-sided motion prediction method, since the reference picture is extended according to the repeated filling method, a double-sided motion prediction method is proposed to avoid the reference of the repeated filling area to improve the prediction accuracy. However, if the reference picture is extended by the motion compensation filling method, even if part or all of the reference block is outside the reference picture, it can be referenced for prediction of the current block.
[0183] according to Fig.12, motion compensation padding areas 1226 and 1246 are generated according to the motion compensation method, and the current block 1202 can be predicted based on the motion compensation padding areas 1226 and 1246. According to an embodiment, the motion compensation padding areas 1226 and 1246 can be considered as areas within each reference picture 1222 or 1242.
[0184] Therefore, despite Fig.12 A portion of list 0 reference block 1224 is outside list 0 reference picture 1222 , and since list 0 motion compensation filling area 1226 is considered to be an area within list 0 reference picture 1222 , the entire list 0 reference block 1224 can be used for prediction of current block 1202 .
[0185] List 1 reference block 1244 is completely outside list 1 reference picture 1242. However, since list 1 motion compensation fill region 1246 is considered to be an area within list 1 reference picture 1242, according to an embodiment, a portion of list 1 reference block 1244 can be used for prediction of current block 1202.
[0186] exist Fig.12 In , the motion compensated filling area is considered to be the area within the reference picture. Therefore, Figures 9 to 11 The implementation scheme of can be applied based on that the motion compensated filling area is considered as a reference picture. Accordingly, when the motion compensated filling method is applied, the efficiency of bilateral prediction can be increased as the area referenced by the prediction is extended.
[0187] Fig.13 An embodiment of a method for generating and storing an extended picture according to the present invention is shown.
[0188] In step 1302, a motion compensation filling area within a first filling distance from the boundary of the current picture is filled according to a motion vector of a boundary block adjacent to the boundary of the current picture.
[0189] Step 1302 may include the steps of extracting a motion vector from the boundary block, determining a reference block from a motion compensation filling reference picture referenced for motion compensation filling based on the motion vector, determining a neighboring motion compensation filling reference block in a filling direction from the reference block, and filling a motion compensation filling area based on the motion compensation filling reference block. The motion compensation filling reference picture indicates a reference picture referenced for reconstruction of the boundary block.
[0190] According to an embodiment, in the step of determining the motion compensation padding reference block, the motion compensation padding reference block may be determined to include neighboring pixels within a first padding distance from a boundary of the reference block in a padding direction.
[0191] According to an embodiment, in the step of determining a motion compensation padding reference block, when a motion compensation padding reference distance between a boundary of the reference block and a boundary of a motion compensation padding reference picture is less than a first padding distance, the motion compensation padding reference block may be determined as including neighboring pixels within the motion compensation padding reference distance from the boundary of the reference block in the padding direction.
[0192] According to the embodiment, in the step of filling the motion compensation filling area based on the motion compensation filling reference block, when the motion compensation filling reference distance between the boundary of the reference block and the boundary of the motion compensation filling reference picture is less than the first filling distance, the motion compensation filling area of the motion compensation filling area can be filled by the motion compensation filling reference block. The motion compensation filling area can be determined as an area within the motion compensation filling area within the motion compensation filling distance from the boundary of the current picture. In addition, an area of the motion compensation filling area that is not a motion compensation filling area can be filled based on the pixel value of the motion compensation filling area.
[0193] According to an embodiment, if a motion vector cannot be extracted from a boundary block, a motion compensation filling area is filled according to pixel values adjacent to the boundary of the current picture. For example, if the boundary block is intra-predicted, a motion vector is not extracted from the boundary block.
[0194] According to an embodiment, the step of extracting a motion vector from a boundary block may include: when a motion vector cannot be extracted from the boundary block, a step of determining a temporal neighboring block corresponding to the position of the boundary block from a temporally corresponding reference picture of the current picture, and a step of extracting a motion vector from the temporal neighboring block.
[0195] According to an embodiment, the first filling distance may be determined based on at least one of the maximum size of the coding unit, the size of the current picture, or the size of the boundary block. Alternatively, the first filling distance may be determined as one of 2, 4, 8, 16, 32, 64, 128, or 256.
[0196] In step 1304, the repeated filling area within a second filling distance from the boundary of the motion compensation filling area is filled according to the pixel values adjacent to the boundary of the motion compensation filling area.
[0197] According to an embodiment, the second padding distance may be determined based on at least one of a maximum size of a coding unit, a size of a current picture, or a size of a boundary block.
[0198] In step 1306, an extended picture consisting of the current picture, the motion compensation padding region and the repetition padding region is generated. In addition, the extended picture is stored in a memory.
[0199] According to an embodiment, the size of the extended picture may be determined based on the size of the current picture regardless of the value of the first padding distance.
[0200] The method of generating and storing an extended picture may be applied to an image decoding method and an image encoding method.
[0201] Fig.14 An implementation of the bilateral inter-frame prediction method according to the present invention is shown.
[0202] In step 1402, in order to predict a current block of a current picture, a first reference picture and a second reference picture referenced by the current picture are determined.
[0203] At step 1404 , a first reference block and a second reference block are determined from a first reference picture and a second reference picture, respectively, according to the first motion vector and the second motion vector of the current block.
[0204] In step 1406, the current block is predicted using at least one of the first reference block or the second reference block according to whether all pixels of the first reference block are completely included in the first reference picture and whether all pixels of the second reference block are completely included in the second reference picture.
[0205] According to an embodiment, if some or all pixels of the first reference block are not included in the first reference picture and all pixels of the second reference block are included in the second reference picture, the current block may be predicted based on the second reference block.
[0206] According to an embodiment, if some pixels of the first reference block are not included in the first reference picture and all pixels of the second reference block are included in the second reference picture, the first area of the current block corresponding to the position of the pixel included in the first reference picture in the first reference block can be determined by weighted averaging the pixels of the first reference block and the second reference block. In addition, the second area of the current block corresponding to the position of the pixel not included in the first reference picture in the first reference block can be predicted based only on the second reference block.
[0207] According to an embodiment, when determining whether all pixels of a first reference block are included in a first reference picture and whether all pixels of a second reference block are included in a second reference picture, a first motion compensation filling area of the first reference picture may be considered as the first reference picture, and a second motion compensation filling area of the second reference picture may be considered as the second reference picture.
[0208] The bilateral inter-frame prediction method can be applied to an image decoding method and an image encoding method.
[0209] Fig.15 A content streaming system to which an embodiment according to the present invention can be applied is exemplarily shown.
[0210] like Fig.15 As shown, the content streaming system to which the embodiment of the present invention is applied may mainly include an encoding server, a streaming server, a network server, a media storage device, a user device and a multimedia input device.
[0211] The encoding server compresses the content received from the multimedia input device such as a smartphone, a camera, a CCTV, etc. into digital data to generate a bit stream and transmits it to the streaming server. As another example, if the multimedia input device such as a smartphone, a camera, a CCTV, etc. directly generates a bit stream, the encoding server can be omitted.
[0212] A bitstream may be generated by the image encoding method and / or the image encoding device to which the embodiments of the present invention are applied, and a streaming server may temporarily store the bitstream in the process of transmitting or receiving the bitstream.
[0213] The streaming server sends multimedia data to the user device based on a user request via the network server, and the network server can act as an intermediary to notify the user of any available services. When the user requests a desired service from the network server, the network server sends it to the streaming server, and the streaming server can send the multimedia data to the user. At this time, the content streaming system may include a separate control server, and in this case, the control server can control the command / response between the devices within the content streaming system.
[0214] The streaming server can receive content from a media storage device and / or an encoding server. For example, when receiving content from an encoding server, the content can be received in real time. In this case, in order to provide a stable streaming service, the streaming server can store the bitstream for a period of time.
[0215] Examples of user devices may include mobile phones, smart phones, laptop computers, digital broadcast terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation devices, tablet PCs, tablet PCs, ultrabooks, wearable devices (e.g., smart watches, smart glasses, HMDs), digital televisions, desktop computers, digital signage, etc.
[0216] Each server in the above-described content streaming system may operate as a distributed server, in which case data received from each server may be distributed and processed.
[0217] The above-mentioned embodiments may be performed in the same or corresponding manner in the encoding device and the decoding device. In addition, an image may be encoded / decoded using at least one or a combination of at least one of the above-mentioned embodiments.
[0218] The order of applying the above-described embodiments may be different in the encoding device and the decoding device. Alternatively, the order of applying the above-described embodiments may be the same in the encoding device and the decoding device.
[0219] The above-described embodiments may be performed on each of the luminance signal and the chrominance signal. Alternatively, the above-described embodiments of the luminance signal and the chrominance signal may be performed identically.
[0220] In the above-mentioned embodiment, the method is described based on a flow chart with a series of steps or units, but the present invention is not limited to the order of the steps, on the contrary, some steps can be performed simultaneously with other steps or in different orders. In addition, it should be understood by those of ordinary skill in the art that the steps in the flow chart are not mutually exclusive, and other steps can be added to the flow chart or some steps can be deleted from the flow chart without affecting the scope of the present invention.
[0221] The embodiments can be implemented in the form of program instructions, which can be executed by various computer components and recorded in a computer-readable recording medium. The computer-readable recording medium may include independent program instructions, data files, data structures, etc., or a combination thereof. The program instructions recorded in the computer-readable recording medium may be specially designed and constructed for the present invention, or are well known to those of ordinary skill in the field of computer software technology.
[0222] The bit stream generated by the encoding method according to the above-mentioned embodiment can be stored in a non-volatile computer-readable recording medium. In addition, the bit stream stored in the non-volatile computer-readable recording medium can be decoded by the decoding method according to the above-mentioned embodiment.
[0223] Examples of computer-readable recording media include: magnetic recording media such as hard disks, floppy disks, and magnetic tapes; optical data storage media such as CD-ROMs or DVD-ROMs; magneto-optical media such as floppy disks; and hardware devices such as read-only memory (ROM), random access memory (RAM), flash memory, etc., which are specially configured to store and execute program instructions. Examples of program instructions include not only machine language codes formatted by a compiler, but also high-level language codes that can be implemented by a computer using an interpreter. The hardware device can be configured to be operated by one or more software modules or vice versa to perform the process according to the present invention.
[0224] Although the present invention has been described in terms of specific items such as detailed elements and limited embodiments and drawings, they are provided only to help a more comprehensive understanding of the present invention, and the present invention is not limited to the above embodiments. It will be appreciated by those skilled in the art that various modifications and changes can be made based on the above description.
[0225] Therefore, the spirit of the present invention should not be limited to the above-described embodiments, and the full scope of the appended claims and their equivalents will fall within the scope and spirit of the present invention.
[0226] Industrial Applicability
[0227] The present invention can be used in an apparatus for encoding / decoding an image and a recording medium for storing a bit stream.
Claims
1. An image decoding method, comprising: Filling a motion compensation filling area within a first filling distance from the boundary of the current picture according to a motion vector of a boundary block adjacent to the boundary of the current picture; Filling the repeated filling area within a second filling distance from the boundary of the motion compensation filling area according to pixel values adjacent to the boundary of the motion compensation filling area; An extended picture consisting of the current picture, the motion compensated padding region and the repeated padding region is stored in a memory.
2. The image decoding method according to claim 1, wherein: Filling the motion compensated fill area includes: Extracting motion vectors from boundary blocks; determining, based on the motion vector, a reference block from a motion compensated filling reference picture referenced for motion compensated filling; Determining a neighboring motion compensation padding reference block in a padding direction from the reference block; and The motion compensated fill region is filled based on the motion compensated fill reference block.
3. The image decoding method according to claim 2, wherein: In the step of determining the motion compensation padding reference block, the motion compensation padding reference block is determined to include neighboring pixels within a first padding distance in a padding direction from a boundary of the reference block.
4. The image decoding method according to claim 3, wherein: In the step of determining a motion compensation filling reference block, when the distance that can be referenced for motion compensation filling between a boundary of the reference block and a boundary of a motion compensation filling reference picture is less than a first filling distance, the motion compensation filling reference block is determined to include neighboring pixels within the distance that can be referenced for motion compensation filling in a filling direction from the boundary of the reference block.
5. The image decoding method according to claim 4, wherein: In the step of filling the motion compensation filling area based on the motion compensation filling reference block, When the distance between the boundary of the reference block and the boundary of the motion compensation filling reference picture that can be referenced by motion compensation filling is less than the first filling distance, the motion compensation filling area within the distance that can be referenced by motion compensation filling, which is within the boundary of the current picture from the motion compensation filling area, is filled by the motion compensation filling reference block. An area of the motion compensation capable fill area that is not the motion compensation fill area is filled based on the pixel value of the motion compensation capable fill area.
6. The image decoding method according to claim 2, wherein: When a motion vector cannot be extracted from a boundary block, the motion compensation padding area is filled according to pixel values adjacent to the boundary of the current picture.
7. The image decoding method according to claim 2, wherein: Extracting motion vectors from boundary blocks involves: When the motion vector cannot be extracted from the boundary block, determining a temporal neighboring block corresponding to the position of the boundary block from a temporally corresponding reference picture of the current picture; Motion vectors are extracted from temporal neighboring blocks.
8. The image decoding method according to claim 1, wherein: The first padding distance is determined based on at least one of a maximum size of the coding unit, a size of the current picture, or a size of a boundary block.
9. The image decoding method according to claim 1, wherein: The first filling distance is determined to be one of 2, 4, 8, 16, 32, 64, 128 or 256.
10. The image decoding method according to claim 1, wherein: The second padding distance is determined based on at least one of a maximum size of the coding unit, a size of the current picture, or a size of a boundary block.
11. The image decoding method according to claim 1, wherein: The size of the extended picture is determined based on the size of the current picture regardless of the value of the first padding distance.
12. An image encoding method, comprising: Filling a motion compensation filling area within a first filling distance from the boundary of the current picture according to a motion vector of a boundary block adjacent to the boundary of the current picture; Filling the repeated filling area within a second filling distance from the boundary of the motion compensation filling area according to pixel values adjacent to the boundary of the motion compensation filling area; An extended picture consisting of the current picture, the motion compensated padding region and the repeated padding region is stored in a memory.
13. A computer-readable recording medium storing a bit stream generated by an image encoding method, the image encoding method comprising: Filling a motion compensation filling area within a first filling distance from the boundary of the current picture according to a motion vector of a boundary block adjacent to the boundary of the current picture; Filling the repeated filling area within a second filling distance from the boundary of the motion compensation filling area according to pixel values adjacent to the boundary of the motion compensation filling area; An extended picture consisting of the current picture, the motion compensated padding region and the repeated padding region is stored in a memory.
14. A method for transmitting a bit stream generated by an image encoding method, the method comprising: encoding the image based on the image coding method; Transmits a bitstream consisting of an encoded image, Wherein, the image encoding method comprises: Filling a motion compensation filling area within a first filling distance from the boundary of the current picture according to a motion vector of a boundary block adjacent to the boundary of the current picture; Filling the repeated filling area within a second filling distance from the boundary of the motion compensation filling area according to pixel values adjacent to the boundary of the motion compensation filling area; An extended picture consisting of the current picture, the motion compensated padding region and the repeated padding region is stored in a memory.
15. An image decoding method, comprising: determining a first reference picture and a second reference picture referred to by a current picture to predict a current block of the current picture; determining a first reference block and a second reference block from a first reference picture and a second reference picture, respectively, according to a first motion vector and a second motion vector of the current block; as well as The current block is predicted using at least one of the first reference block or the second reference block according to whether all pixels of the first reference block are included in the first reference picture and whether all pixels of the second reference block are included in the second reference picture.
16. The image decoding method according to claim 15, wherein: In predicting the current block step, When some or all pixels of the first reference block are not included in the first reference picture and all pixels of the second reference block are included in the second reference picture, the current block is predicted based on the second reference block.
17. The image decoding method according to claim 15, wherein: When some pixels of the first reference block are not included in the first reference picture and all pixels of the second reference block are included in the second reference picture, a first area of the current block corresponding to the position of the pixels included in the first reference picture in the first reference block is determined by weighted averaging of the pixels of the first reference block and the second reference block, and a second area of the current block corresponding to the position of the pixels not included in the first reference picture in the first reference block is predicted based only on the second reference block.
18. The image decoding method according to claim 15, wherein: When determining whether all pixels of a first reference block are in a first reference picture and whether all pixels of a second reference block are included in a second reference picture, a first motion compensation filling area of the first reference picture is considered to be the first reference picture, and a second motion compensation filling area of the second reference picture is considered to be the second reference picture.
19. An image encoding method, comprising: determining a first reference picture and a second reference picture referred to by a current picture to predict a current block of the current picture; determining a first reference block and a second reference block from a first reference picture and a second reference picture, respectively, according to a first motion vector and a second motion vector of the current block; The current block is predicted using at least one of the first reference block or the second reference block according to whether all pixels of the first reference block are included in the first reference picture and whether all pixels of the second reference block are included in the second reference picture.
20. A computer-readable recording medium storing a bit stream generated by an image encoding method, the image encoding method comprising: determining a first reference picture and a second reference picture referred to by a current picture to predict a current block of the current picture; determining a first reference block and a second reference block from a first reference picture and a second reference picture, respectively, according to a first motion vector and a second motion vector of the current block; The current block is predicted using at least one of the first reference block or the second reference block according to whether all pixels of the first reference block are included in the first reference picture and whether all pixels of the second reference block are included in the second reference picture.
21. A method for transmitting a bit stream generated by an image encoding method, the method comprising: encoding the image based on the image coding method; Transmits a bitstream consisting of an encoded image, Wherein, the image encoding method comprises: determining a first reference picture and a second reference picture referred to by a current picture to predict a current block of the current picture; determining a first reference block and a second reference block from a first reference picture and a second reference picture, respectively, according to a first motion vector and a second motion vector of a current block; and The current block is predicted using at least one of the first reference block or the second reference block according to whether all pixels of the first reference block are included in the first reference picture and whether all pixels of the second reference block are included in the second reference picture.