METHOD AND DEVICE FOR DECODING IMAGE IN ACCORDANCE WITH INTERPREDICTION IN THE IMAGE CODING SYSTEM

MX434854BActive Publication Date: 2026-06-12BEIJING XIAOMI MOBILE SOFTWARE CO LTD

Patent Information

Authority / Receiving Office
MX · MX
Patent Type
Patents
Current Assignee / Owner
BEIJING XIAOMI MOBILE SOFTWARE CO LTD
Filing Date
2020-07-13
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

The increased demand for high-quality, high-resolution images has led to higher transmission and storage costs due to the increased amount of information, necessitating a more efficient image compression technique.

Method used

The method and device enhance image coding efficiency by applying bi-directional optical flow (BIO) prediction on a sub-block basis to derive refined motion vectors, reducing computational complexity and improving overall coding efficiency.

Benefits of technology

This approach reduces computational complexity and enhances coding efficiency by deriving refined motion vectors, thereby improving the overall efficiency of image transmission and storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure MX434854B0
    Figure MX434854B0
Patent Text Reader

Abstract

The present invention relates to an image decoding method performed by an encoding device according to the present description comprising: a step for deriving reference photograph list 0 (L0) and reference photograph list 1 (L1); a step for deriving two motion vectors (MV) for a current block, the two MVs including MVL0 for L0 and MVL1 for L1; a step for determining whether the bi-directional optical flow prediction (BIO) applies to derive sub-block refined motion vectors to the current block; a step for deriving a refined motion vector for a sub-block of the current block based on MVL0 and MVL1, if the BIO prediction applies to the current block; and a step for deriving a prediction sample based on the refined motion vector.
Need to check novelty before this filing date? Find Prior Art

Description

The present disclosure relates to an image coding technology, and more particularly, to an image decoding method according to interprediction in an image coding system and a device thereof. BACKGROUND OF THE INVENTION The demand for high-quality, high-resolution images, such as High Definition (HD) images and Ultra High Definition (UHD) images, has increased in various fields. Because image data has high resolution and high quality, the amount of information or bits to be transmitted increases relative to legacy image data. Therefore, when image data is transmitted using a medium such as a conventional wired / wireless broadband line or image data is stored using an existing storage medium, the transmission costs and Qpnpnn / bznz / e / YiAi storage is therefore increased. Therefore, there is a need for a highly efficient image compression technique to effectively transmit, store and reproduce high-quality, high-resolution image information. SUMMARY OF THE INVENTION A technical problem to be addressed by the present disclosure is to provide a method and device which increases image coding efficiency. A technical problem to be addressed by the present disclosure depends on providing a method and device which increases the efficiency of interprediction. Another technical problem that will be addressed by the present disclosure depends on providing a method and a device which derive a refined motion vector of a sub-block unit by applying BIO prediction. Yet another technical problem that will be addressed by the present disclosure depends on providing a method and device which increases the computational complexity of the calculation to derive a refined motion vector. Qenrnn / frznz / e / YiAi determined if BIO prediction applies. In accordance with an embodiment of the present disclosure, there is provided an image decoding method which is performed by a decoding device. The method includes deriving a reference picture list 0 (LO) and a reference picture list 1 (L1), deriving two motion vectors (MVs) for a current block, the two MVs including an MVLO for the LO and an MVL1 for the L1, determining whether bi-directional optical flow (BIO) prediction that results in a refined motion vector on a sub-block basis is applicable to the current block, deriving the refined motion vector for a sub-block of the current block based on the MVLO and the MVL1 when the BIO prediction is applied to the current block, and deriving a prediction sample based on the refined motion vector. In accordance with another embodiment of the present disclosure, there is provided a decoding device that performs image decoding. The decoding device includes an entropy decoder configured to obtain inter-prediction information of a current block via a bit stream, and a predictor configured to derive a picture list. Qenrnn / frznz / e / YiAi reference O (LO) and a reference picture list 1 (Ll), deriving two motion vectors (MVs) for the current block, wherein the two MVs include an MVLO for the LO, and an MVL1 for the Ll, determining whether bi-directional optical flow (BIO) prediction that derives a refined motion vector on a sub-block basis is applied to the current block, deriving the refined motion vector for a sub-block of the current block based on the MVLO and the MVL1 when the BIO prediction is applied to the current block, and deriving a prediction sample based on the refined motion vector. In accordance with yet another example of the present disclosure, a video encoding method is provided which is performed by an encoding device. The method includes deriving a reference picture list 0 (LO) and a reference picture list 1 (Ll), deriving two motion vectors (MVs) for a current block, wherein the two MVs include an MVLO for the LO, and an MVL1 for the Ll, determining whether bi-directional optical flow (BIO) prediction that derives a refined motion vector on a sub-block basis is applicable to the current block, deriving the refined motion vector for a sub-block of the current block based on the MVLO and the MVL1. Qrnrnn / bznz / B / YiAi when BIO prediction is applied to the current block, derive a prediction sample based on the refined motion vector, and inter-prediction entropy coding information of the current block. In accordance with yet another embodiment of the present disclosure, a video coding device is provided. The coding device includes a predictor configured to derive a reference picture list 0 (LO) and a reference picture list 1 (L1), derive two motion vectors (MVs) for the current block, the two MVs including an MVLO for the LO and an MVL1 for the L1, determine whether bi-directional optical flow (BIO) prediction that results in a refined motion vector on a sub-block basis is applicable to the current block, derive the refined motion vector for a sub-block of the current block based on the MVLO and the MVL1 when the BIO prediction is applied to the current block, and derive a prediction sample based on the refined motion vector, and an entropy encoder configured to encode inter-prediction entropy information of the current block. According to the present description, it is possible to reduce the computational complexity of inter-prediction. Qenrnn / frznz / e / YiAi which uses the refined motion vector derived on a sub-block basis to determine whether BIO prediction is applied to the current block, thereby improving the overall coding efficiency. According to the present disclosure, it is possible to reduce the computational complexity of the inter-prediction which uses the refined motion vector derived on a sub-block basis by determining based on the FRUC mode whether the BIO prediction is applied, through which it is possible to improve the overall coding efficiency. BRIEF DESCRIPTION OF THE FIGURES Figure 1 is a schematic diagram illustrating a configuration of a video encoding device to which the present disclosure is applicable. Figure 2 is a schematic diagram illustrating a configuration of a video decoding device to which the present disclosure is applicable. Figure 3 illustratively represents bi-prediction motion vectors under the assumption of BCC and that an object moves at a constant speed for a short period of time. Figure 4 represents an example where a sample based on BIO prediction and a block based on Qrnrnn / bznz / B / YiAi prediction of ΒΙΟ. Figure 5 represents an example where a determination is made based on the current block size as to whether BIO prediction applies. Figure 6 illustratively represents an example for deriving motion information through the BM method. Figure 7 illustratively represents an example for deriving motion information through the 10 TM method. Figures 8A and 8B represent an example of an encoding process and a decoding process performed based on the FRUC. Figures 9A and 9B represent an example of encoding / decoding a current block to which FRUC and / or BIO are applied. Figure 10 schematically represents a method of image coding by an coding device according to the present disclosure. Figure 11 schematically represents an encoding device performing an image encoding method in accordance with the present disclosure. Figure 12 schematically represents a method of Qrnrnn / bznz / B / YiAi image decoding by an encoding device according to the present disclosure. Figure 13 schematically represents a decoding device performing an image decoding method in accordance with the present disclosure. DETAILED DESCRIPTION OF THE INVENTION DESCRIPTION OF EXEMPLARY MODALITIES The present disclosure may be modified in various ways, and specific embodiments thereof will be described and illustrated in the drawings. However, the embodiments are not intended to limit the disclosure. The terms used in the following disclosure are used only to describe specific embodiments, but are not intended to limit the disclosure. An expression of a singular number includes an expression of a plural number, to the extent that it is clearly read differently. Terms such as includes and have are intended to indicate that there are features, numbers, steps, operations, elements, components, or combinations thereof used in the present disclosure and should be understood as such, that the possibility of the existence or addition of one or more different features, numbers, steps, operations, elements, components, or combinations thereof Qenrnn / frznz / e / YiAi themselves, they are not exclusive. Meanwhile, the elements in the drawings described in the description are drawn independently for the purpose of convenience in explaining different specific functions, and do not imply that these elements are integrated by independent hardware or software. For example, two or more elements of the elements may be combined to form a single element, or an element may be divided into multiple elements. The modalities in which the elements are combined and / or divided are included in the description without departing from the concept of the description. Hereinafter, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings. Furthermore, like reference numerals are used to indicate like elements throughout the drawings, and like descriptions of like elements will be omitted. Meanwhile, the present disclosure relates to video / image coding. For example, the method(s) / modality(ies) described in the present disclosure may be applied to a method described in a video / image coding standard. Qenrnn / frznz / e / YiAi Versatile Video Coding (WC) or a next-generation video / image coding standard. In this specification, a photograph generally refers to a unit that represents an image at a specific time, and a segment is a unit that constitutes a portion of the photograph. A photograph may be composed of multiple segments, and the terms "photograph" and "segment" may be combined as needed. A pixel or a pei can mean the smallest unit that constitutes a photograph (or image). A sample can also be used as a term corresponding to a pixel. A sample can, in general, represent a pixel or a pixel value, it can represent only one pixel (one pixel value) of a brightness component, and it can represent only one pixel (one pixel value) of a chroma component. A unit indicates a basic unit of image processing. The unit may include at least one of a specific area 20 and information related to the area. Optionally, the unit may be combined with terms such as a block, an area, or the like. In one case A typical Qrnrnn / bznz / B / YiAi MxN block can represent a set of samples or transformation coefficients arranged in M ​​columns and N rows. Figure 1 is a schematic diagram illustrating a configuration of a video encoding device to which the present disclosure is applicable. Referring to Figure 1, a video encoding device (100) may include a picture divider (105), a predictor (110), a residual processor (120), an entropy encoder (130), an adder (140), a filter (150), and a memory (160). The residual processor (120) may include a subtractor (121), a transformer (122), a quantizer (123), a re-orderer (124), a de-quantizer (125), an inverse transformer (126). The photo splitter (105) may split an input photo into at least one processing unit. In one example, the processing unit may be referred to as a coding unit (CU). In this case, the coding unit may be recursively partitioned from the larger coding unit (LCU) according to a quad-tree binary tree (QTBT) structure. For example, a coding unit Qenrnn / frznz / e / YiAi may be divided into a plurality of coding units of a deeper depth based on a quad tree structure and / or a binary tree structure. In this case, for example, the quad tree structure may be applied first and the binary tree structure may be applied later. Alternatively, the binary tree structure may be applied first. The coding method according to the present disclosure may be performed based on a final coding unit into which no further division is made.In this case, the largest coding unit may be used as the final coding unit based on coding efficiency, or the like. Depending on the characteristics of the image, the coding unit may be recursively divided into coding units of a lower depth as needed, and a coding unit having an optimal size may be used as the final coding unit. Here, the coding method may include a method such as prediction, transformation, and reconstruction, which will be described later. In another example, the processing unit may include a coding unit (CU), prediction unit Qenrnn / frznz / e / YiAi (PU), or a transformation unit (TU). The coding unit may be divided from the largest coding unit (LCU) into coding units of a deeper depth in accordance with the quad tree structure. In this case, the largest coding unit may be directly used as the final coding unit based on coding efficiency, or the like, depending on the image characteristics, or the coding unit may be recursively divided 10 into coding units of a deeper depth as needed and a coding unit having an optimal size may be used as a final coding unit. When the smallest coding unit (SCU) is set, the coding unit 15 may not be divided into coding units smaller than the smallest coding unit.Here, the final coding unit refers to a coding unit that is partitioned or divided into a prediction unit or a transformation unit. The prediction unit is a unit that is partitioned from a coding unit, and may be a sample prediction unit. Here, the prediction unit may be divided into sub-blocks. The transformation unit may be. Qrnrnn / bznz / B / YiAi divided from the coding unit according to the quad tree structure and may be a unit for deriving a transformation coefficient and / or a unit for deriving a residual signal from the transformation coefficient. Hereinafter, the coding unit may be referred to as a coding block (CB), the prediction unit may be referred to as a prediction block (PB), and the transformation unit may be referred to as a transformation block (TB). The prediction block or prediction unit may refer to a specific area in the form of a block in a photograph and includes an array of the prediction samples.Also, the transformation block or transformation unit may refer to a specific area in the form of a block in a photograph and includes the transformation coefficient or an array of residual samples. The predictor (110) may perform prediction on a processing target block (hereinafter, a current block), and may generate a predicted block that includes prediction samples for the current block. A prediction unit performed in the predictor (110) may be a coding block, or may be a decoding block. Qenrnn / frznz / e / YiAi transformation, or it can be a prediction block. The predictor (110) may determine whether intra-prediction or inter-prediction is applied to the current block. For example, the predictor (110) may determine whether intra-prediction or inter-prediction is applied in the CU unit. In the case of intra-prediction, the predictor (110) may derive a prediction sample for the current block based on a reference sample outside the current block in a snapshot to which the current block belongs (hereinafter, a current snapshot). In this case, the predictor (110) may derive the prediction sample based on an average or interpolation of nearby reference samples of the current block (case (i)), or may derive the prediction sample based on a reference sample existing in a specific direction (prediction) as to a prediction sample among the nearby reference samples of the current block (case (ii)). Case (i) may be called a non-directional mode or a non-angular mode, and case (ii) may be called a directional mode or an angular mode. In intra-prediction, the prediction modes may include, as an example, directional modes and at least two non-directional modes.Non-directional modes may include DC mode and planar mode. The predictor (110) may determine the. Qrnrnn / bznz / B / YiAi prediction mode that will be applied to the current block using the prediction mode applied to the nearby block. In the case of inter-prediction, the predictor (110) may derive the prediction sample for the current block 5 based on a sample specified by a motion vector in a reference photograph. The predictor (110) may derive the prediction sample for the current block by applying any of a skip mode, a blending mode, and a motion vector prediction (MVP) mode. In the case of the skip mode and the blending mode, the predictor (110) may use motion information of the neighboring block as motion information of the current block. In the case of the skip mode, other than the blending mode, a difference (residual) between the prediction sample and an original sample is not transmitted.In the case of MVP mode, a motion vector of the nearby block is used as a predictor of the motion vector and thus is used as a predictor of the motion vector of the current block to derive a motion vector of the current block. In the case of inter-prediction, the near block may include a spatial near block existing in the current photograph and a temporal near block existing in Qrnrnn / bznz / B / YiAi the reference photograph. The reference photograph that includes the temporal near block may also be called a collocated photograph (colPic). The motion information may include the motion vector and a reference photograph index. Information such as prediction mode information and motion information may be entropy-encoded and then output as a bit stream. When motion information from a temporally close block is used in jump mode and merge mode, a higher-ranking photograph in a reference photograph list can be used as a reference photograph. Reference photographs included in the reference photograph list can be aligned based on a picture order count (POC) difference between a current photograph and a corresponding reference photograph. A POC corresponds to a display order and can be discriminated from an encoding order. The subtractor (121) generates a residual sample which is a difference between an original sample and a prediction sample. If the jump mode is applied, the residual sample cannot be generated as described. Qrnrnn / bznz / B / YiAi previously . The transformer (122) transforms residual samples into units of a transformation block to generate a transformation coefficient. The transformer (122) may perform transformation based on a size of a corresponding transformation block and a prediction mode applied to a coding block or prediction block spatially overlapping with the transformation block. For example, the residual samples may be transformed using a discrete sine transform (DST) transformation kernel if intra-prediction is applied to the coding block or prediction block that overlaps with the transformation block and the transformation block is a 4x4 residual array, and transformed using a discrete cosine transform (DCT) transformation kernel in other cases. The quantifier (123) may quantize the transformation coefficients to generate 20 quantized transformation coefficients. The re-orderer (124) reorders quantized transformation coefficients. The re-orderer (124) can Qenrnn / frznz / e / YiAi reorders the quantized transformation coefficients in the form of a block into a one-dimensional vector through a coefficient scanning method. Although the reorderer (124) is described as a separate component, the re-orderer (124) may be a part of the quantizer 5 (123). The entropy encoder (130) may perform entropy coding on the quantized transform coefficients. The entropy coding may include an coding method, for example, an exponential Golomb code, a context adaptive variable length code (CAVLC), a context adaptive binary arithmetic code (CABAC), or the like. The entropy encoder (130) may perform encoding together or separately on information (for example, a syntax element value or the like) required for video reconstruction in addition to the quantized transform coefficients. The entropy-encoded information may be transmitted or stored in the unit of a network abstraction layer (NAL) in a bit stream form. The dequantizer (125) dequantizes values ​​(transformation coefficients) quantized by the Qrnrnn / bznz / B / YiAi quantizer (123) and the inverse transformer (126) inversely transforms values ​​dequantized by the dequantizer (125) to generate a residual sample. The adder (140) adds a residual sample to a prediction sample to reconstruct a snapshot. The residual sample may be added to the prediction sample in units of a block to generate a reconstructed block. Although the adder (140) is described as a separate component, the adder (140) may be a part of the predictor (110). Meanwhile, the adder (140) may be referred to as a reconstructor or reconstructed block generator. The filter (150) may apply deblocking filtering and / or adaptive sample compensation to the reconstructed photograph 15. Artifacts at a block boundary in the reconstructed photograph or distortion in quantization may be corrected through deblocking filtering and / or adaptive sample compensation. The adaptive sample compensation may be applied in units of one sample after the deblocking filtering is complete. The filter (150) may apply an adaptive loop filter (ALE) to the reconstructed photograph. The ALE may be applied to the reconstructed photograph. Qrnrnn / bznz / B / YiAi to which deblocking filtering and / or adaptive sample compensation has been applied. The memory (160) may store a reconstructed photograph (decoded photograph) or information 5 needed for encoding / decoding. Here, the reconstructed photograph may be the reconstructed photograph filtered by the filter (150). The stored reconstructed photograph may be used as a reference photograph for (inter)prediction of other photographs. For example, the memory (160) may store (reference) photographs used for inter-prediction. Here, the photographs used for inter-prediction may be designated in accordance with a set reference photograph or a reference photograph list. Figure 2 is a schematic diagram illustrating a configuration of a video decoding device to which the present disclosure is applicable. Referring to Figure 2, a video decoding device (200) may include an entropy decoder (210), a residual processor (220), a predictor (230), an adder (240), a filter (250), and a memory (260). The residual processor (220) may include a reorderer (221), a dequantizer (222), a transformer (223), and a processor (224). Reverse Qenrnn / frznz / e / YiAi (223) . Qenrnn / frznz / e / YiAi When a bit stream including video information is input, the video decoding device (200) may reconstruct a video relative to a process by which the video information is processed in the video encoding device. For example, the video decoding device (200) may perform video decoding using a processing unit implemented in the video encoding device. Thus, the video decoding processing unit block may be, for example, a coding unit and, in another example, a coding unit, a prediction unit, or a transformation unit. The coding unit may be divided from the larger coding unit in accordance with the quad tree structure and / or the binary tree structure. A prediction unit and a transformation unit may also be used in some cases, and in this case, the prediction block is a block derived or partitioned from the coding unit and may be a sample prediction unit. Here, the prediction unit may be divided into sub-blocks. The transformation unit may be divided from the coding unit in accordance with the quad-tree structure and may be a unit that derives a transformation coefficient or a unit that derives a residual signal from the transformation coefficient. The entropy decoder (210) may analyze the bit stream to generate information required for video reconstruction or photo reconstruction. For example, the entropy decoder (210) may decode information in the bit stream based on an encoding method such as exponential Golomb coding, CAVLC, CABAC, or the like, and may generate a value of a syntax element required for video reconstruction and a quantized value of a transformation coefficient with respect to a residual. More specifically, a CABAC entropy decoding method may receive a bin corresponding to each syntax element in a bit stream, determine a context model using decoding information of the target syntax element, and decode information of the decoding target and nearby blocks or symbol / bin information decoded in a previous step, predict the probability of generating the conformal bin. Qenrnn / frznz / e / YiAi with the determined context model and perform arithmetic bin decoding to generate a symbol corresponding to each syntax element value. Here, CABAC's entropy decoding method can update the context model using information from a symbol / bin decoded by a context model of the next symbol / bin after the context model determination. The information in the prediction between the information decoded in the entropy decoder (210) can be provided to the predictor (230) and residual values, i.e. the quantized transformation coefficients, on which the entropy decoding has been performed by the entropy decoder (210) can be input to the computer (221). The re-orderer (221) may reorder the quantized transformation coefficients into a two-dimensional block form. The re-orderer (221) may perform reordering that corresponds to the coefficient scanning performed by the encoding device. Although the re-orderer (221) is described as a separate component, the re-orderer (221) may be a part of the dequantizer (222). Qrnrnn / bznz / B / YiAi The dequantizer (222) may de-quantize the quantized transformation coefficients based on a (de)quantization parameter to generate a transformation coefficient. In this case, information for deriving a quantization parameter may be signaled from the encoding device. The inverse transformer (223) can transform the inverse of the transformation coefficients to derive residual samples. The predictor (230) may perform prediction on a current block, and may generate a predicted block that includes prediction samples for the current block. A prediction unit performed in the predictor (230) may be an coding block, or may be a transformation block, or may be a prediction block. The predictor (230) may determine whether to apply intra-prediction or inter-prediction based on information in a prediction. In this case, a unit for determining which will be used between intra-prediction and inter-prediction 20 may be different from a unit for generating a prediction sample. In addition, a unit for generating the prediction sample may also be different in inter-prediction and intra-prediction. For example, which will be applied Qenrnn / frznz / e / YiAi between inter-prediction and intra-prediction can be determined in the CU unit. In addition, for example, in inter-prediction, the prediction sample can be generated by determining the prediction mode in the PU unit, and in intra-prediction, the prediction sample can be generated in the TU unit by determining the prediction mode in the PU unit. In the case of intra-prediction, the predictor (230) may derive a prediction sample for a current block 10 based on a nearby reference sample in a current snapshot. The predictor (230) may derive the prediction sample for the current block by applying a directional mode or a non-directional mode based on the nearby reference sample of the current block. In this case, a prediction mode to be applied to the current block may be determined using an intra-prediction mode of a nearby block. In the case of inter-prediction, the predictor (230) may derive a prediction sample for a current block 20 based on a sample specified in a reference photograph according to a motion vector. The predictor (230) may derive the prediction sample for the current block using one of the skip mode, the jump mode, the motion vector mode, and the motion vector mode. Qenrnn / frznz / e / YiAi fusion and MVP mode. Here, the motion information required for inter-prediction of the current block provided by the video coding device, for example, a motion vector and information in a reference photo index, can be obtained or derived based on the information in the prediction. In jump mode and merge mode, motion information from a neighboring block can be used as motion information for the current block. Here, the neighboring block may include a spatial neighboring block and a temporal neighboring block. The predictor (230) may construct a merge candidate list using motion information of available nearby blocks and use information indicated by a merge index of the merge candidate list as a motion vector of the current block. The merge index may be signaled by the encoding device. The motion information may include a motion vector and a reference picture. When motion information of a temporary nearby block is used in the skip mode and the merge mode, a picture higher in a reference picture list may be used as the reference picture. Qrnrnn / bznz / B / YiAi In the case of the jump mode, no difference (residual) is transmitted between a prediction sample and an original sample, distinguished from the fusion mode. In the case of MVP mode, the motion vector of the current block can be derived using a motion vector from a neighboring block as a motion vector predictor. Here, the neighboring block can include a spatial neighboring block and a temporal neighboring block. When the fusion mode is applied, for example, a fusion candidate list may be generated using a motion vector of a reconstructed spatial neighboring block and / or a motion vector corresponding to a Col block which is a temporal neighboring block. A motion vector of a candidate block selected from the fusion candidate list is used as the motion vector of the current block in the fusion mode. The aforementioned information in the prediction may include a fusion index indicating a candidate block having the best motion vector selected from the candidate blocks included in the fusion candidate list. Here, the predictor (230) may derive the motion vector of the current block using the fusion index. Qrnrnn / bznz / B / YiAi When the MVP (Multiple Vector Prediction) mode is set, Motion) is applied as another example, a motion vector predictor candidate list may be generated using a motion vector of a reconstructed spatial near block and / or a motion vector corresponding to a Col block which is a temporal near block. That is, the motion vector of the reconstructed spatial near block and / or the motion vector corresponding to the Col block which is the temporal near block may be used as motion vector candidates. The aforementioned information in the prediction may include a prediction motion vector index indicating that the best motion vector selected from the motion vector candidates is included in the list.Here, the predictor (230) may select a prediction motion vector of the current block from the motion vector candidates included in the motion vector candidate list using the motion vector index. The predictor of the coding device may obtain a motion vector difference (MVD) between the motion vector of the current block and a motion vector predictor, encode the MVD, and output the encoded MVD in the form of a bit stream. That is, the MVD may be subtracted. Qrnrnn / bznz / B / YiAi by subtracting the motion vector predictor from the motion vector of the current block. Here, the predictor (230) may obtain a motion vector included in the prediction information and derive the motion vector 5 of the current block by adding the difference of the motion vector to the motion vector predictor. Furthermore, the predictor may obtain or derive a reference photograph index indicating a reference photograph from the aforementioned prediction information 10. The adder (240) may add a residual sample to a prediction sample to reconstruct a current block or a current snapshot. The adder (240) may reconstruct the current snapshot by adding the residual sample to the prediction sample in units of a block. When the skip mode is applied, a residual is not transmitted and thus the prediction sample may become a reconstructed sample. Although the adder (240) is described as a separate component, the adder (240) may be a part of the predictor (230). Meanwhile, the adder (240) may be referred to as a reconstructor or reconstructed block generator. Qenrnn / frznz / e / YiAi The filter (250) may apply deblocking filtering, adaptive sample compensation, and / or ALF to the reconstructed photograph. Here, the adaptive sample compensation may be applied in units of one sample after the deblocking filtering. The ALF may be applied after 5 minutes of the deblocking filtering and / or application of adaptive sample compensation. The memory 260 may store a reconstructed photograph (decoded photograph) or information necessary for decoding. Here, the reconstructed photograph may be the reconstructed photograph filtered by the filter 250. For example, the memory 260 may store photographs used for inter-prediction. Here, the photographs used for inter-prediction may be designated in accordance with a set reference photograph 15 or a reference photograph list. A reconstructed photograph may be used as a reference photograph for other photographs. The memory 260 may generate reconstructed photographs in an output order. As described above, one or two reference photo lists can be used for the interprediction of the current block. That is, for the interprediction of the current block, either reference photo list 0 or reference photo list 1 can be used. Qenrnn / frznz / e / YiAi can be used, or both reference photo list 0 and reference photo list 1 can be constructed. For example, if the segment type of the segment including the current block is B (segment B), at least one of the two reference photo lists mentioned above can be used, while if the segment type of the segment including the current block is P (segment P), only the reference photo list can be used. Reference photo list 0 can be called an LO (List 0), and reference photo list 1 can be called an L1 (List 1). By performing prediction on the current block, the motion information in the inter-prediction can be bi-prediction motion information or uni-prediction motion information. The motion information in the current block can be derived based on the neighboring blocks of the current block.Here, the bi-prediction motion information may include a reference photograph index LO and a motion vector LO (motion information LO), and a reference photograph index vector L1 and a motion vector L1 (motion information L1), and the uni-prediction motion information may include a photograph index of. Qrnrnn / bznz / B / YiAi reference LO and an LO motion vector (LO motion information), or may include an L1 reference photo index vector and an L1 motion vector (L1 motion information). The LO represents an LO reference photo list (List 0), and the L1 represents an L1 reference photo list (List 1). The interprediction performed based on the LO motion information may be called LO prediction, the inter-prediction performed based on the L1 motion information may be called L1 prediction, and the inter-prediction performed based on the LO motion information and the L1 motion information, that is, the bi-prediction motion information, may be called bi-prediction. Meanwhile, a separate motion vector may be used for each of the LO prediction and the L1 prediction.That is, for example, the LO motion vector (MVLO) for the LO prediction of the current block and the Ll motion vector (MVL1) for the Ll prediction may be derived separately. In this case, for example, if the MVLO indicates a first reference region in the LO reference photograph within the LO, and the MVL1 indicates a second reference region in the Ll reference photograph within the Ll, the prediction sample of the current block may be derived. Qrnrnn / bznz / B / YiAi by a weighted sum of a first predictor obtained from the reconstructed sample of the first reference region and a second predictor obtained from the reconstructed sample of the second reference region. Here, the weighted sum may be performed based on a first temporal distance between the current photograph and the first reference photograph and a second temporal distance between the current photograph and the second reference photograph. Here, the temporal distance may represent a photograph order count (POC) difference. That is, a difference between the POC value of the current photograph and the POC value of the reference photograph LO may be the first temporal distance, and a difference between the POC value of the current photograph and the POC value of the reference photograph L1 may be the second temporal distance. Meanwhile, according to the present disclosure, if the above-described bi-prediction is applied, the sample unit motion vector or block unit motion vector 20 may be obtained based on the MVLO, the MVL1, the first predictor, and the second predictor of the current block, through which the prediction sample of the further improved prediction performance is obtained. Qenrnn / frznz / e / YiAi can be derived. It can be called bi-directional optical flow (BIO) prediction, and such a prediction sample can be called a refined prediction sample or a BIO prediction sample, being distinguished from the existing prediction sample 5. Furthermore, the sample unit motion vector or the block unit motion vector can be called a refined motion vector or a BIO motion vector. If the block unit motion vector is derived, a target block from which the block unit motion vector is derived can have a preset size of BwxBh. For example, the target block size can be preset as 4x4. In this case, the refined motion vectors for the target blocks of size 4x4 included in the current block 15 can be derived.Meanwhile, the target block of the current block can be represented as a sub-block of the current block. The refined motion vector and the refined prediction sample can be derived, for example, through the following method. A motion of an object along an optical flow (OF) can be expressed by the following equation if the brightness constancy is Qenrnn / frznz / e / YiAi is constrained (BCC), that is, it is assumed that there is no variation in a sample value (pixel) of the object in consecutive frames. Equation 1 / (%, y, t) = l(x + Δχ,γ + Δγ, t + Δί) r where I(x,y,t) represents a sample value at a sample position (x, y) and time t, and Δ represents an amount of variation. If the motion is assumed to be small, the right-hand term in Equation 1 above can be expressed as a first-order Taylor series equation as follows. Equation 2 Qrnrnn / bznz / B / YiAi the the the x, y,t) = l(x, y, í) + — Δχ + —Δγ + —Δί7dx dy dt Here, Equation 2 can be divided by At and summarized as follows. Equation 3 di di di di0 =Έ=1χν'+3γν,+'βί where V?;=Δχ / Δί and Vy=Ay / At. The above equation includes two unknowns (spatial derivatives of motion and sign). Therefore, the spatial derivative is necessary for motion analysis . In accordance with the present disclosure, using optical flow (OF) features, the reference sample value and the refined motion vector on a sample (pixel) basis or a specific block basis can be obtained without transmitting an additional motion vector. For example, in addition to the BCC, if the object moves at a constant speed for a short period of time, the MVL1 and the MVL1 can be expressed as symmetrical values ​​of the same magnitude. In other words, the x components of the MVLO and the MVL1 may have the same magnitude and different signs from each other, or the y components of the MVLO and the MVL1 may have the same magnitude and different signs from each other. For example, if the x component and y component of the MVLO are V.. and V.,, respectively, the x component and y component of the MVL1 may be -V?Ly -Vy, respectively. Figure 3 illustratively represents bi-prediction motion vectors under the assumption of BCC and that an object moves at a constant speed for a short period of time. Referring to Figure 3, in the bi-prediction of the current block in a current photograph 300 under the assumption Qrnrnn / bznz / B / YiAi of the BCC and the object moves at a constant speed for a short period of time, the MVLO represents a motion vector indicating a first reference block in a first reference photograph (Reference 0) 310 corresponding to the current block, and the MVL1 represents a motion vector indicating a second reference block in a second reference photograph (Reference 1) 320 corresponding to the current block. The first reference photograph may be one of the reference photographs included in the LO, and the second reference photograph may be one of the reference photographs included in the L1. In this case, the representative location of the respective blocks may be an upper left sample position of each of the blocks. In this case, the MVLO and the MVL1 may be expressed by mutually symmetrical values. In Figure 3, a first reference sample value of a position 311 in accordance with the MVLO and a second reference sample value of a location 321 in accordance with the MVL1 may be derived based on a target sample 301 in the current block. In this, the first reference sample value may be called a first predictor or an LO predictor, the second reference sample value may be called a second or an LO predictor. Qenrnn / frznz / e / YiAi predictor L1. A difference between the first value of the reference sample and the second value of the reference sample can be summarized as follows: Equation 4 Δ[ί, j] = I°[i + vx,j + vy] - / x[i - vx,j - vy] f Tθ Γí _|_ -τι i' _|_ 1 whereL X,J yJ represents a sample value at sample position 311 of the first reference photograph (Reference 0) 310 (i.e., the first reference sample value), and1 Vx'iVy^ represents a sample value at sample position 321 of the second reference photograph (Reference 1) 320 (i.e., the second reference sample value). The values ​​of the Qenrnn / frznz / e / YiAi sample can be represented by the equations below. Equation 5 / °|¿ + Vx,j + vy\ = + b|í - vx,j — vy\ = r [i,j]--p dy And replacing the previous Equation 5 with the Equation 4, can be summarized and expressed as in Equation 6 below. Equation 6 Δ[ί, j] = - Iw[i,j] + vx[i,j](40)[i,j] + lx}[i,j]) + vy[i,j]^0)[i,j] + where 110> [i,j] represents the value of the reference sample LO, I(1)[i,j] represents the value of the reference sample Ll, and I? / k![i, j] and Iv;u[i, j] represent the amounts of variation of the x-axis and the y-axis, respectively, i.e., a gradient. Specifically, ó0)r> >Ί r(°)r, ílxmjj and Lhjjare partial differential values ​​of the x-axis and y-axis, respectively, at a position [i, j] of the first reference photograph (reference 0) 310 in the LO, and x LiWr,· íl and yLare partial differential values ​​of the x-axis and y-axis, respectively, at a position [i, j] of the second reference photograph (reference 1) 320 in the Ll. The partial differential value may be called a gradient. Meanwhile, in order to improve prediction accuracy and efficiency, gradients can be expressed as in Equation 7 below based on an interpolation filter. Meanwhile, a position and / or unit to which the filter coefficient of the interpolation filter is assigned can be referred to as a filter label. The filter coefficient of the interpolation filter can be assigned on a 1 / 4 sample fraction basis. Qrnrnn / bznz / B / YiAi Equation 7 Qrnrnn / bznz / B / YiAi Μ l£k)[í, / ] = d / ), + n,j] ,k = O or 1 n=-M+l M Iykí[L7] — dFn(ay^)R^k\i,j + n] ,k — O or 1 n=—M+l where 2M represents the number of filter taps „(t) ( / c) of the interpolation filter,xyyrepresents the fraction parts of an x-component and a y-component of the motion vector dF (a^) dFn(ayk}, respectively,,1V x' and Λrepresent (X''7filter coefficients of n filter taps of1y R(k)[¿ + n,j] and , respectively, and presents a reconstruction sample value at a position [i+n, j] after bi-prediction, that is, a reference sample value at a position [i + n,j] of the reference photograph. A value of the fractional part of the x-component and / or the y-component of the motion vector may be one of 0, 1 / 4, 2 / 4, and 3 / 4. „(o) a(0) Specifically, x and y represent fractional parts of an x-component and a y-component of the MVLO, dF (cr®) dF (c / 0 1) respectively, Ά / and «v and / represent n-tap filter coefficients „(o) a(0) in yy, 7?(oi[i + n,j] respectively, and presents the reference sample value at a position [i+n, j] of the first a(1)reference photograph (Reference 0) 310. Furthermore, x and y represent fractional parts of an x-component and a c 4— ,Ί-i 4— 4- dFn(ax^) dFn(a^) component of the MVL1, respectively, v 1y and > represent n-tap filter coefficients of jz -i j_ ff?'1' j_ x. yn / ] filter at y , respectively, and L JJ presents the reference sample value at a position [i+n, j] of the second reference photograph (Reference 1) 320. As an example, if the number of taps of the filter is six (i.e. if the 2M is 6), the filter tap coefficient of the interpolation filter for the functional parts of the x-component and y-component of the motion vector can be defined as in the table below. Table 1 Qrnrnn / bznz / B / YiAi Fractional pei position Gradient interpolation filter 0 { 8, -39, -3, 46, -17, 5}, 1 / 4 { 4, -17, -36, 60, -15, 4}, 2 / 4 { -1,4, -57, 57, -4, 1}, 3 / 4 { -4, 15, -60, 36, 17, -4} The unit motion vector of samples vx[i,j] and vy[ i, j ] which makes Δ2[ι.ί] have the minimum value, can be calculated based on Equation 6 above. For example, one can assume that the samples within a specific region centered at [i, j], i.e., a window Ω, have a locally stable motion. In this, the window Ω may include (2M+1)χ(2M+1) samples. In this case, a sample position within the window Ω can be represented as [*J], pnthis time, in ΠΉ, iM are satisfied <i'<i+M, y j-M<j'<j+M. El vector de movimiento el cual 2 minimiza puede ser calculado con base en este. En este caso, cuando la suposición de que las muestras dentro de la ventana Ω tienen el movimiento localmente estable, se toman en consideración, elA2[1,i]puede ser expresado como en la siguiente ecuación. Equation 8 ΣΔ2(ϊ,Ό = Ω )2 Qenrnn / frznz / e / YiAi Gx= (7®[i'j] + , Gy = (40)[ij j'] + j']) δΡ - (P(0)[¡, j ] - P(1)[¡, j ]). gnesta, P'0![i', j ' ] and P!1)[i' , j ' ] represent the LO predictor and the Ll predictor, respectively. The P!0' [i',j'] and the P<1![i',j'] correspond to 10[i' , j ' ] and 11[i' , j ' ], respectively. In the above-mentioned Equation 7, it is partially differentiated by v?; and Vy, respectively, it can be summarized as follows. Equation 9 Vx£fiG2x + Vy£nGxGy+EfiGxóP = 0 Vx£QGxGy + Vy2QG2y+ZnGv6P = 0 where1 52=s4 53= -Vx6P,55=ΣΛ and s6 = -Σ„ Gy5P ,Ί11 O ΊO Ί / 1 4— +- AlΩ, and if si, s2, s3, and s4 are substituted into the above Equation 9, they can be summarized and expressed as in Equations 10 and 11 below. Equation 10 0= Y 2G (y G +1 / G + δΡΪ λ λ λ yy 0= y 2vGx+ 2i / GG + 2G δΡ [ / 'ΰ^Ω 0=2^ yGx2+ 2 / \GxGY+2 ΎΰχδΡ aayaya [ / ΰ / ΤΩ[ / ΰφΩ [Λν>Ω = 2vxs}+2vys2-2s3=- i / ys2+ s3 Qrnrnn / bznz / B / YiAi Equation 11 0= Y 2Gy(yxGx+ vyGy+ δΡ} [ / 'jfn 0= y Q.vGxG+2vGy+ 2GδΡ) λ λ yyyy [λ7[=ω = 2^ \GxGy+2vyYGy2+2YG / P [ / ', _ / |==Ω [ / ', [ / ',_ / |εΩ o = 2 / zs4+2 / ys5-2s6 - + S6 If Vx and Vy are summarized based on Equations 10 and above, they will be respectively as follows. Equation 12 ~ + *655 s3s5s2sfj If 5^5 s2^4 S1>6^3^4 S5S2S4 That is, the v?: and the Vy can be summarized as follows. Equation 13XTs3s5 —s2s6x. sisó—s3s4 Vx = -------, Vy = ------sls5-s2s4Jsls5-s2s4 Therefore, the refined predictor for a target sample, i.e., the refined prediction sample, can be calculated as follows using the v?: and Vy. Equation 14 p = + pW)+ Vx(jW _7W)+ y> 1 The refined prediction sample and the refined motion vector of a sample unit can be obtained based on the same method as described above. In this method, P represents the refined prediction sample of the target sample, and vx and Vy represent an x-component and a y-component of the refined motion vector of the target sample, respectively. Meanwhile, the method described above is a method in which the steady motion of two symmetric motion vectors (i.e., the MVLO and the MVL1) of the same magnitude are assumed. In other words, the method described above for deriving a refined prediction sample may be a method in which the first temporal distance between the current photograph and the first reference photograph associated with the MVLO, and the second temporal distance between the current photograph and the second reference photograph associated with the MVL1 are assumed to be the same. The difference between the POC value of the current photograph and the POC value of the first reference photograph Qenrnn / frznz / e / YiAi reference may become the first temporal distance, and the difference between the POC value of the second reference photograph and the POC value of the second reference photograph may become the second temporal distance. A method in which the refined prediction sample is derived by taking into consideration the two motion vectors that have a constant motion when the first time distance is not the same as the second time distance, can be described as follows. For example, if the above-mentioned Equation 14 is recalculated in view of the value of the first time distance being not the same as that of the second time distance, it can be expressed as follows. Equation 1515P = ((PW+ F(1)) + κ(το / ^ - r^) + Vy(r0I™ - V™)) » 1 where P represents the refined predictor for the target sample, P(0) and P(l) represent a first predictor and a second predictor for the current sample, respectively, I-J0! and Iyí0)represent an x-axis gradient 20 and a y-axis gradient at the first predictor, respectively, Ixíl! and Iy!1) represent an x-axis gradient and a y-axis gradient at the second predictor, Qrnrnn / bznz / B / YiAi respectively, Vx and Vy represent an x-component and a y-component of the refined motion vector for the target sample, respectively, το represents the first temporal distance, and Ti represents the second temporal distance. The first temporal distance and the second temporal distance may represent a distance between the current photograph (or current frame) and the reference photograph (or reference frame). The first temporal distance and the second temporal distance 10 can be derived based on the following equation. Equation 16 τ0= POC(current)-POC(RefO) q = POC(Refl)- POC(current) f where POC(actual) represents a photo order count (POC) value of the current photo, POC(RefO) represents a POC value of the first reference photo, and POC(Refl) represents a POC value of the second reference photo. Meanwhile, in order to reduce the computational complexity in the method for deriving a refined prediction sample, the aforementioned Equation 13 can be approximated and used. The approximate equation of the aforementioned Equation 13 can be derived as Qrnrnn / bznz / B / YiAi continues. The following equation can be derived by dividing the numerator and denominator of Vx in the above-mentioned Equation 13 by s5. Equation 17 s3 — s2s 6 / s 5 Vx = ---------si — s2s 4 / s 5 If the value of s5 in the aforementioned Equation 17 is sufficiently large, the denominator of Equation 17 mentioned above, s2*s6 / s5, and its numerator, s2*s4 / s5, can be approximated to zero. Therefore, Equation 17 can be expressed as the following equation. Equation 18 s3 Vx = — if If the Vx derived through the above-mentioned Equation 18 is substituted to the Vy of the above-mentioned Equation 11, the Vy can be derived based on the following equation. Equation 19 s6 — Vx * s4(= s2) Vy = Qenrnn / frznz / e / YiAi s5 The Vy can be summarized as follows based on the aforementioned Equation 19. Equation 20 s6 — Vx * s2Vy=---s5--It is possible to reduce the computational complexity of deriving the vzy and the Vy based on the aforementioned Equations 18 and 20, through which the overall computational complexity of the method for deriving a refined prediction sample can be reduced. Meanwhile, while BIO prediction that results in a refined motion vector of a sample unit can be applied as described above, BIO prediction that results in a refined motion vector of a block unit can be proposed. BIO prediction that performs refinement on a block basis can reduce computational complexity compared to BIO prediction that performs refinement on a sample basis. For example, if both the amplitude Bw and the height Bh of a target block on which refinement is performed are preset to 4, the predictor may be refined to Qenrnn / frznz / e / YiAi a block basis of size 4x4. In BIO prediction in which the refinement is performed on a sample basis, a gradient map for each of the samples can be generated as described above, an offset for each of the samples can be derived, and the refined prediction sample can be derived by adding the offset to the predictor for each of the samples based on Equation 14 mentioned above. However, in BIO prediction in which the refinement is performed on a block basis (may be referred to as block-based BIO prediction), an offset on a target block of size 4x4 can be derived, and the same compensation can be added to the predictors of the target samples included in the target block. That is, the same refined motion vector can be applied to the target block. Figure 4 shows an example where a sample-based BIO prediction and a block-based BIO prediction are performed. Referring to Figure 4, if the size of a target block on which the refinement is performed is preset as Bw x Bh (e.g., 4x4), an x-axis, a y-axis, a time-axis gradient map of a reference sample value of the target block of a size wxh can be derived based on the MVLO and the MVL1 derived from Qenrnn / frznz / e / YiAi through an encoding / decoding process. After this, the offset for the target sample included in the target block can be derived based on the gradient map for the target block. The unit offset of the target block can be derived based on a BwxBh kernel, and the prediction sample refined by the target sample can be derived by adding the offset to the predictor for the target sample. Specifically, the refined motion vector of the block unit may be derived based on the gradients of the target samples (i.e., a gradient map of the target block) included in the target block of the current block. The refined motion vector of the block unit may be derived on a target block basis of the current block, and the refined motion vector of the block unit may be represented as the refined motion vector for the target block of the current block. For example, the sum of sn of the target samples included in the target block of the current block may be derived as sn of the target block. The sn for the target block may be represented as sn,bk. For example, Si,bk s2,bb s3,bk , s4,bk S5,bo and s6,bk for the target block may be derived as the following equation. Qrnrnn / bznz / B / YiAi Equation 21 Sl.bk - Σ^Σω(^)2$2,bk = S4,bk Sibk = ~ZbkZíiGxSP Ssrbk = ZbkZn(Cy)2 S6,bk =-%bkZíiGy5pcondeGx= (To4O)[i'j·'] + , Gy = (^[¿'d'] + V¿OU'j'])yδΡ = (pW[i',J'] -Ρ^[ί', / ]) Thereafter, the refined motion vector for the target block may be derived based on an equation obtained by inserting (sn,M;>>n) in place of sn in the aforementioned Equation 13 or Equations 18 and 20 above. For example, if the target block size from which the unit block motion vector is derived is 4x4, the refined motion vector for the target block may be derived based on an equation obtained by inserting (sn,bk>>16) in place of sn in the aforementioned Equation 13. If the target block size is 4x4, the refined unit block motion vector may be derived based on the following equation. Qenrnn / frznz / e / Y Equation 22 . , (53,bfc»16)(S5,b »16)-(S2 / , »16)(S6.¡, »16) Vxbk = -----------------------------------(sl,ftk>>16)(s5,&k»16)-(52,t>k»16)(54,t>k»16) . , (5l,&fc»16)(56,6fc»16)-(53,i>k»16)(54,i>fe»16) Vv.bk — ------------------------------------------(S1.6k»16)(S5,6fe»16)-(S2,bk»16)(S4>bfe»16) Alternatively, the refined motion vector of the unit block can be derived based on an approximate equation. That is, the refined motion vector 5 for the target block can be derived based on an equation obtained by inserting (sr,,bk>>n) in place of sn in Equations 18 and 20 above. If the size of the target block is 4x4, the refined motion vector of the unit block can be derived based on the following equation. Equation 23 Vx.bk (s3,hk»16) (Sl,bk>>16) Qenrnn / frznz / e / Y Vy,bk — (s6,hfe»16)-7x,&k(S2,i>fe»16) After this, the prediction sample refined by the target sample can be derived by replacing V?;,bk by Vxy Vv,bk by Vyen the Equation 14 mentioned above. Meanwhile, the present disclosure proposes a method for adaptively applying BIO prediction based on a specific condition for the current block. However, coding efficiency can be improved by optimizing the inter-prediction in which BIO prediction is applied, particularly block-based 5-BIO prediction. As an example, a determination may be made based on the current block size as to whether the BIO prediction described above applies. For example, if the current block size is WxH, a determination may be made based on the current block size and the preset critical value as to whether the prediction applies. For example, if the width of the current block is the same as the critical value for width, and the height of the current block is the same as the critical value for height, it can be determined that the BIO prediction is not applied to the current block. Alternatively, if the current block size WxH is less than the preset minimum size NxM, it can be determined that the BIO prediction is not applied to the current block. Alternatively, if the number of samples in the current block is less than the preset critical value, it can be determined that the BIO prediction is not applied to the current block. Qenrnn / frznz / e / YiAi Specifically, for example, if the current block size is 4x4, BIO prediction cannot be applied to the current block. Figure 5 represents an example where the 5 determination is made based on the current block size as to whether BIO prediction applies. The encoding device / decoding device may derive a motion vector for the current block (S500). The motion vector may include the MVLO and the MVL1. The encoding device / decoding device may determine whether the current block size is 4x4 (S510). If the current block size is 4x4, the BIO prediction for the current block cannot be performed. In this case, the inter-prediction for the current block may be performed based on the derived motion vector. If the current block size is not 4x4, the encoding device / decoding device 20 may perform block-based BIO prediction on the current block (S520). In this case, the target block from which the block unit motion vector is derived may have a size of 4x4. That is, Qrnrnn / bznz / B / YiAi encoding device / decoding device may derive the motion vector refined by the target block having a size of 4x4 and included in the current block, and may derive the prediction sample refined by the target sample included in the target block of the current block based on the refined motion vector. Meanwhile, in the process of deriving motion information of the current block, frame rate upconversion (FRUC) may be applied, and BIO prediction may be performed based on the motion information derived via FRUC. FRUC may be called pattern-matching motion vector derivation (PMMVD). FRUC may be called pattern-matching motion vector derivation (PMMVD). FRUC may represent a method for deriving motion information via a template matching (TM) method or a bilateral matching (BM) method under the assumption that an object moves at a constant speed in an image, and there is no variation in the pixel value (sample value). Its details can be described as follows: Figure 6 illustratively represents an example for Qrnrnn / bznz / B / YiAi derive a motion information through the method of BM. If FRUC is applied to the current block, the MVLO and MVL1 for the current block can be sequentially selected one by one, and then motion vectors corresponding to motion vectors of a direction of the LO and Ll directions, which are different from a direction associated with the motion vectors, can be derived by performing interpolation around the picture to which the current block belongs. Specifically, the encoding device / decoding device may derive the motion information candidate list of the current block based on the neighboring blocks of the current block. The motion vector candidate of the neighboring block may be a bi-predicted motion vector candidate or a uni-predicted motion vector candidate. The encoding device / decoding device may classify the motion vectors included in the motion vector candidate, dividing them into the LO direction and the L1 direction. That is, the encoding device / decoding device may classify the motion vectors in the motion vector candidate into the MVLO and the MVL1. After this, the classified motion vectors Qenrnn / frznz / e / YiAi are sequentially selected one by one, and then motion vectors corresponding to motion vectors of a direction of the LO and Ll directions, which are different from a direction associated with the 5 motion vectors, can be derived by performing interpolation around the photograph to which the current block belongs. For example, if the motion vector candidate of the current block is MVLO, the MVL1 corresponding to the MVLO may be derived by scaling based on the temporal distance between the reference photograph LO by the MVLO and the current photograph that includes the current block, and the temporal distance between the reference photograph Ll and the current photograph. In other words, the MVL1 may be derived by scaling the MVLO based on the first temporal distance between the reference photograph LO by the MVLO and the current photograph, and the second temporal distance between the reference photograph Ll and the current photograph. Here, the first temporal distance may be a difference value between the POC of the reference photograph LO and the POC of the current photograph, and the second temporal distance may be a difference value between the POC of the reference photograph Ll and the POC of the Qrnrnn / bznz / B / YiAi current photograph. In addition, the reference photograph L1 can be derived from among the reference photographs of L1 included in L1. For example, the reference photograph L1 may be derived as a reference photograph including a reference region, among the reference photographs of L1 included in L1, which has the smallest difference value between a reference region in which the MVLO indicates a reference region in which the derived MVL1 indicates, that is, the smallest residual. The difference value between the reference region in which the MVLO indicates, and the reference region in which the derived MVL1 indicates, may be represented as a cost for the motion vector candidate. Furthermore, for example, if the motion vector candidate of the current block is MVL1, the MVLO corresponding to the MVL1 may be derived by scaling based on the temporal distance between the reference photograph L1 for the MVL1 and the current photograph that includes the current block, and the temporal distance between the reference photograph LO and the current photograph. In other words, the MVL1 may be derived by scaling the MVL1 based on the first temporal distance between the reference photograph L1 for the MVL1 and the current photograph, and the second temporal distance Qrnrnn / bznz / B / YiAi temporal distance between the reference photograph LO and the current photograph. In this, the first temporal distance may be a difference value between the POC of the reference photograph Ll and the POC of the current photograph, and the second temporal distance may be a difference value between the POC of the LO reference photograph and the POC of the current photograph. The TDO shown in Figure 6 represents the first temporal distance, and TD1 represents the second temporal distance. In addition, the LO reference photograph may be derived from among the LO reference photographs included in the LO. For example, the LO reference photograph may be derived as a reference photograph that includes a reference region, among the LO reference photographs included in the LO, which has the smallest difference value between a reference region in which the MVL1 is indicated and a reference region in which the derived MVLO is indicated, that is, the smallest residual. The difference value between the reference region in which the MVL1 is indicated and the reference region in which the derived MVLO is indicated may be represented as a cost. The encoding device / decoding device may derive the costs for the candidate from the motion vector, and may derive, as the information of Qrnrnn / bznz / B / YiAi motion of the current block, the motion vector candidate which has the smallest cost (bi-prediction motion information including MVLO and MVL1). Meanwhile, if FRUC is applied to the current block, 5 the movement information of the current block can be derived through the TM method. Figure 7 illustratively represents an example for deriving motion information via the TM method. With reference to Figure 7, a reference block 10 for a template highly similar to the template of the current block among the LO reference blocks included in the LO reference photograph can be derived as the LO reference block for the current block, and the motion vector which indicates the LO reference block can be derived as the MVLO for the current block. In other words, a reference block for a template, among the reference blocks included in the LO reference photograph, which has the smallest cost with the template of the current block, can be derived as the LO reference block for the current block, and the motion vector which indicates the LO reference block can be derived as the MVLO for the current block. The current block template may include a region Qenrnn / frznz / e / YiAi near left and / or a near upper region of the block Qrnrnn / bznz / B / YiAi current, the LO reference block template may be a region corresponding to the current block template, and the reference block template may include a near left region and / or a near top region of the reference block. The cost for the reference block may be derived as the sum of absolute differences (SAD) between the current block template and the reference block template. The cost can be derived based on the following equation: Equation 24 CostOdistortion I Plantref(i,J) - Plantact(i,j) I (i,j)G TemplateSize where i and j represent a position (i, j) of a sample within a template of a block, Costcmtorsion represents the cost, Plantref represents a sample value of a template of the reference block, and Plantact represents a sample value of a template of the current block. The differences between corresponding samples between the template of the reference block and the template of the current block can be accumulated, and the accumulated differences can be used as the cost for the reference block. The LO reference block, among the LO reference blocks included in the LO reference photograph, which has the smallest cost, can be derived as the LO reference block for the current block, and the motion vector which indicates the LO reference block can be derived as the MVLO for the current block.The cost can be derived based on the current block template and the LO reference block template as described above. Furthermore, with reference to Figure 7, a reference block for a template very similar to the template of the current block among the reference blocks L1 included in the reference photograph L1 can be derived as the reference block L1 for the current block, and the motion vector which indicates the reference block L1 can be derived as the MVL1 for the current block. In other words, a reference block for a template, among the reference blocks included in the reference photograph L1, which has the smallest cost with the template of the current block, can be derived as the reference block L1 for the current block, and the motion vector which indicates the reference block L1 can be derived as the MVL1 for the current block. Qrnrnn / bznz / B / YiAiThe template of the current block may include a left near region and / or an upper near region of the current block, the template of the reference block L1 may be a region corresponding to the template of the current block, and the template of the reference block may include a left near region and / or an upper near region of the reference block. The cost for the reference block may be derived as the sum of absolute differences (SAD) between the template of the current block and the template of the reference block. The reference block L1, among the reference blocks L1 included in the reference photograph L1, which has the smallest cost, may be derived as the reference block L1 for the current block, and the motion vector which indicates the reference block L1 may be derived as the MVL1 for the current block.The cost can be derived based on the current block template and the reference block template Ll as described above. Meanwhile, the decoding device may obtain information in the matching method to derive the optimal motion vector from the encoding device, and in this case, the optimal motion vector may be derived in accordance with the Qenrnn / frznz / e / YiAi pairing method. For example, the decoding device may obtain an indication regarding the selection of the BM method or the TM method through the bit stream. The flag may be referred to as a BM / TM selection flag. The decoding device may select the pairing method based on the flag value. For example, if the flag value is 1, the decoding device may derive motion information of the current block by performing the BM method, or if the flag value is 0, the decoding device may derive motion information of the current block by performing the TM method.Alternatively, if the value of the flag is 0, the decoding device may derive the motion information of the current block by performing the BM method, or if the value of the flag is 1, the decoding device may derive the motion information of the current block by performing the TM method. Figures 8A and 8B represent an example of an encoding process and a decoding process performed based on the FRUC. Figure 8A represents an example of an encoding process performed based on the FRUC. Referring to Figure 8A, the encoding device derives motion information for the current block by applying the BM mode (S800). Meanwhile, the method for deriving motion information based on the BM method described above can be represented as a BM mode. For example, the encoding device may derive the motion information candidate list of the current block based on the blocks surrounding the current block. The candidate included in the motion information candidate list may include either LO motion information or LI motion information. After this, the encoding device may derive costs for the candidates included in the candidate list from the motion information through the BM method, and may derive the motion information in the current block based on the candidate having the smallest cost. The cost for the candidate included in the candidate list of the motion information may be derived as follows. The encoding device may derive the motion vector corresponding to the motion vector of a direction between the directions LO and L1, which Qrnrnn / bznz / B / YiAi are different from a direction associated with the motion vector, by interpolating the candidate's motion vector around the current photograph, and can derive, as the candidate cost, the SAD between the reference block in which indicates the candidate's motion vector, and the reference block in which indicates the derived motion vector. For example, if the motion candidate includes LO motion information, the encoding device may derive MVL1 by scaling the MVLO for the motion candidate based on the first time distance and the second time distance. The encoding device may derive, as the cost of the motion candidate, the SAD between the LO reference block in which MVLO is indicated and the L1 reference block in which MVL1 is indicated. Here, the first time distance may be a difference value between the POC of the LO reference photograph for the motion candidate and the POC of the current photograph, and the second time distance may be a difference value between the POC of the L1 reference photograph for MVL1 and the POC of the current photograph. Furthermore, for example, if the motion candidate includes Ll motion information, the encoding device may derive the MVLO by scaling the Qrnrnn / bznz / B / YiAi MVL1 for the motion candidate based on the first temporal distance and the second temporal distance. The encoding device may derive, as the cost of the motion candidate, the SAD between the reference block Ll in which the MVL1 is indicated, and the reference block LO in which the MVLO is indicated. In this, the first temporal distance may be a difference value between the POC of the reference photograph Ll for the motion candidate and the POC of the current photograph, and the second temporal distance 10 may be a difference value between the POC of the reference photograph LO by the MVLO and the POC of the current photograph. The encoding device may compare the costs of the candidates, and may derive, such as the motion information of the current block, the motion information of the candidate having the smallest cost (LO motion information or Ll motion information), and derived motion information based on the candidate (Ll motion information or LO motion information). The derived motion information may represent the derived motion information based on the BM mode. Qrnrnn / bznz / B / YiAi The encoding device derives motion information for the current block by applying the TM mode (S810). Meanwhile, the method for deriving motion information based on the TM method described above can be represented as a TM mode. The coding device may derive, as the MVLO for the current block, the motion vector indicating the LO reference block for a template, among the LO reference blocks included in the LO reference picture, which has the smallest cost with the template of the current block. In this, the template of the current block may include a left near region and / or an upper near region of the current block, the LO reference block template may be a region corresponding to the template of the current block, and the LO reference block template may include a left near region and / or an upper near region of the LO reference block. The cost for the LO reference block may be derived as the sum of absolute differences (SAD) between the template of the current block and the LO reference block template. In addition, the encoding device may derive, as the MVL1 for the current block, the motion vector indicating the reference block L1 for a template, Qenrnn / frznz / e / YiAi among the reference blocks Ll included in the reference photograph Ll, which has the smallest cost with the current block template. In this, the current block template may include a left near region and / or an upper near region of the current block, the reference block template Ll may be a region corresponding to the current block template, and the reference block template Ll may include a left near region and / or an upper near region of the reference block Ll. The cost for the reference block Ll can be derived as the sum of the absolute differences (SAD) between the current block template and the reference block template Ll . The coding device may derive, as the motion information of the current block, motion information including LO motion information and L1 motion information. The LO motion information may include a reference picture index indicating the LO reference picture and the MVLO, and the L1 motion information may include a reference picture index indicating the L1 reference picture and the MVL1. Qrnrnn / bznz / B / YiAi The encoding device may perform a rate distortion (RD) check on the derived motion information based on the TM mode and the derived motion information based on the BM mode, and may select the optimal mode for the current block from among the BM mode and the TM mode (S820). The encoding device may select a mode applied to the current block from among the BM mode and the TM mode based on the RD cost for the derived motion information based on the TM mode and the derived motion information based on the BM mode. Meanwhile, the encoding device may generate information indicating the selected mode. For example, the encoding device may generate the flag indicating one of the BM mode or the TM mode, and may signal the flag through a bit stream. Figure 8B represents an example of a decoding process performed based on the FRUC. Referring to Figure 8B, the decoding device may determine whether the BM mode applies to the current block (S830). The decoding device may determine whether the BM mode or the TM mode applies to the current block. For example, the decoding device may obtain the indicator indicating one of the BM mode and the TM mode through a bit stream. The decoding device Qenrnn / frznz / e / YiAi can derive, as a mode applied to the current block, the mode between BM mode and TM mode, in which it indicates the indicator. If the BM mode is applied to the current block, the decoding device 5 derives the motion information in the current block based on the BM mode (S840). For example, the decoding device may derive the motion information candidate list of the current block based on the 10 neighboring blocks of the current block. The candidate included in the motion information candidate list may include either LO motion information or Ll motion information. After this, the decoding device may derive the costs for the candidates included in the motion information candidate list 15 through the BM method, and may derive the motion information in the current block based on the candidate having the smallest cost. The cost for the candidate included in the list of the 20th candidate from the motion information may be derived as follows. The decoding device may derive the motion vector corresponding to the motion vector of a direction between the LO and L1 directions, which Qrnrnn / bznz / B / YiAi are different from a direction associated with the motion vector, by interpolating the candidate's motion vector around the current photograph, and can derive, as the candidate's cost, the SAD between the reference 5 block in which indicates the candidate's motion vector, and the reference block in which indicates the derived motion vector. For example, if the motion candidate includes LO motion information, the decoding device may derive MVL1 by scaling the MVLO for the motion candidate based on the first time distance and the second time distance. The decoding device may derive, as the cost of the motion candidate, the SAD between the LO reference block in which the MVLO is indicated, and the L1 reference block in which the MVL1 is indicated. Here, the first time distance may be a difference value between the POC of the LO reference photograph for the motion candidate and the POC of the current photograph, and the second time distance may be a difference value between the POC of the L1 reference photograph for the MVL1 and the POC of the current photograph. Furthermore, for example, if the movement candidate Qrnrnn / bznz / B / YiAi includes the motion information Ll, the decoding device may derive the MVLO by scaling the MVL1 for the motion candidate based on the first time distance and the second time distance. The decoding device may derive, as the cost of the motion candidate, the SAD between the reference block Ll in which the MVL1 is indicated, and the reference block LO in which the MVLO is indicated. In this, the first time distance may be a difference value between the POC of the reference photograph Ll for the motion candidate and the POC of the current photograph, and the second time distance may be a difference value between the POC of the reference photograph LO by the MVLO and the POC of the current photograph. The decoding device may compare the costs of the candidates, and may derive, such as the motion information of the current block, the motion information of the candidate having the smallest cost (LO motion information or Ll motion information), and the motion information derived based on the candidate (Ll motion information or LO motion information). Qrnrnn / bznz / B / YiAi Meanwhile, if the TM mode is applied to the current block, the decoding device derives the motion information in the current block based on the TM mode (S850). The decoding device may derive, as the MVLO for the current block, the motion vector indicating the LO reference block for a template, among the LO reference blocks included in the LO reference picture, which has the smallest cost with the template of the current block. In this, the template of the current block may include a left near region and / or an upper near region of the current block, the template of the LO reference block may be a region corresponding to the template of the current block, and the template of the LO reference block may include a left near region and / or an upper near region of the LO reference block. The cost for the LO reference block can be derived as the sum of the absolute differences (SAD) between the current block template and the LO reference block template. In addition, the decoding device may derive, as the MVL1 for the current block, the motion vector indicating the reference block L1 for a template, among the reference blocks L1 included in the photograph. Qrnrnn / bznz / B / YiAi of reference Ll, which has the smallest cost with the template of the current block. In this, the template of the current block may include a left near region and / or an upper near region of the current block, the template of the reference block Ll may be a region corresponding to the template of the current block, and the template of the reference block Ll may include a left near region and / or an upper near region of the reference block Ll. The cost for the reference block Ll may be derived as the sum of the absolute differences (SAD) between the template of the current block and the template of the reference block Ll. The decoding device may derive, as the motion information of the current block, motion information including LO motion information and L1 motion information. The LO motion information may include a reference picture index indicating the LO reference picture and the MVLO, and the L1 motion information may include a reference picture index indicating the L1 reference picture and the MVL1. Meanwhile, if the movement information of the The current block Qenrnn / frznz / e / YiAi is derived via FRUC as described above, which can further improve coding efficiency by adaptively applying BIO based on the mode (BM mode or TM mode) applied to the current block. Specifically, FRUC's BM mode and BIO are 5-way prediction methods that take into account Assumptions 1 and 2, which will be described later. - Assumption 1. A target object moves at a uniform speed for a short period of time. - Assumption 2. The sample value for target object 10 is not varied in consecutive frames. If the BM mode is applied, the motion vector of each (sub)block can be derived under the consideration of the aforementioned assumptions, and also if the BIO is applied, the offset of each (sub)block (the value derived based on the motion vector of each (sub)block) can be derived under the consideration of the aforementioned assumptions. Therefore, it can further improve the coding efficiency by not redundantly applying the methods that are performed under the same assumptions. There, in a case where the FRUC is applied to the current block, if the motion information is derived based on the TM mode, then the BIO is applied, and if the motion information is derived based on the BM mode, Qenrnn / frznz / e / YiAi then, a method can be proposed in which BIO is not applied. Figures 9A and 9B represent an example of encoding / decoding a current block to which FRUC and / or BIO are applied. Figure 9A represents an example for encoding a current block to which FRUC and / or BIO are applied. Referring to Figure 9A, the encoding device may derive motion information of the current block by applying FRUC to the current block (S900). The encoding device may derive the motion information in the current block based on the BM mode and the TM mode for the current block. A specific method for deriving the motion information in the current block based on the BM mode is as described above. Furthermore, a specific method for deriving the motion information in the current block based on the TM mode is as described above. The coding device may determine whether the TM mode is applicable to the current block (S910). The coding device may compare the derived motion information based on the BM mode with the derived motion information based on the TM mode, and may select the mode applicable to the current block. If the TM mode is applied to the current block, the encoding device may perform BIO prediction based on the motion information in the current block (S920). The encoding device may perform BIO prediction based on the motion information derived based on the TM mode. For example, the motion information may include the MVLO and the MVL1 for the current block, and the encoding device may obtain the refined motion vector of the block unit for the current block based on the first predictor and the second predictor, and the MVLO and the MVL1 for the current block. For example, the refined motion vectors for the 4x4 size blocks included in the current block may be derived.The coding device may derive the refined motion vector for the target block of the current block based on the first predictor and the second predictor, and the MVLO and the MVL1 for the current block, and may derive the refined prediction samples based on the refined motion vector. Specifically, the encoding device may derive the first predictor from a position in accordance with the MVLO and the second predictor from a position in accordance with the MVLO. Qrnrnn / bznz / B / YiAi in accordance with MVL1 based on each of the samples of the target block and can derive the target sample gradients based on the first predictor and the second predictor. Thereafter, the encoding device 5 can derive the refined motion vector of the target block based on the gradients for the samples. For example, the refined motion vector for the target block can be derived based on the aforementioned Equation 16. The encoding device 10 can derive the refined prediction samples for the target block based on the refined motion vector. Meanwhile, if the BM mode is applied to the current block, the encoding device may not perform BIO prediction on the current block, but perform 15 prediction based on the derived motion information. Figure 9B represents an example of decoding a current block to which FRUC and / or BIO are applied. Referring to Figure 9B, the decoding device may determine whether the TM mode applies to the current block (S930). The decoding device may determine whether the BM mode or the TM mode applies to the current block. For example, the decoding device may obtain the indicator indicating one of the BM mode and the TM mode. Qrnrnn / bznz / B / YiAi through a bit stream. The decoding device can derive, as a mode applied to the current block, the mode between the BM mode and the TM mode, in which it indicates the flag. Meanwhile, if the TM mode is applied to the current block, the decoding device derives the motion information in the current block based on the TM mode (S940). The decoding device may derive, as the MVLO for the current block, the motion vector indicating the LO reference block for a template, among the LO reference blocks included in the LO reference picture, which has the smallest cost with the template of the current block. In this, the template of the current block may include a left near region and / or an upper near region of the current block, the template of the LO reference block may be a region corresponding to the template of the current block, and the template of the LO reference block may include a left near region and / or an upper near region of the LO reference block. The cost for the reference block LO can be derived as the sum of the absolute differences (SAD) between the Qenrnn / frznz / e / YiAi current block template and LO reference block template. Furthermore, the decoding device may derive, as the MVL1 for the current block, the motion vector indicating the reference block L1 for a template, 5 among the reference blocks L1 included in the reference picture L1, which has the smallest cost with the template of the current block. In this, the template of the current block may include a left near region and / or an upper near region of the current block, the template of the reference block L1 may be a region corresponding to the template of the current block, and the template of the reference block L1 may include a left near region and / or an upper near region of the reference block L1. The cost for the reference block L1 may be derived 15 as the sum of absolute differences (SAD) between the template of the current block and the template of the reference block L1. The decoding device may derive, as the motion information of the current block, motion information 20 including LO motion information and L1 motion information. The LO motion information may include a reference picture index indicating the LO reference picture and the MVLO, and the Qrnrnn / bznz / B / YiAi motion information Ll may include a reference photograph index indicating the reference photograph Ll and the MVL1 . If the TM mode is applied to the current block, the decoding device may perform BIO prediction based on the motion information in the current block (S950). The decoding device may perform BIO prediction based on the motion information derived based on the TM mode. For example, the motion information may include the MVLO and MVL1 for the current block, and the decoding device may obtain the refined motion vector of the block unit for the current block based on the first predictor and the second predictor, and the MVLO and MVL1 for the current block. For example, the refined motion vectors for the 4x4 blocks included in the current block may be derived.The decoding device may derive the refined motion vector for the target block of the current block based on the first predictor and the second predictor, and the MVLO and the MVL1 for the current block, and may derive the refined prediction samples based on the motion vector. Qrnrnn / bznz / B / YiAi refined. Specifically, the decoding device may derive the first predictor of an MVLO-compliant position and the second predictor of an MVL1-compliant position based on each of the 5 samples of the target block, and may derive gradients over the target samples based on the first predictor and the second predictor. Thereafter, the decoding device may derive the refined motion vector of the target block based on the gradients for the samples. For example, the refined motion vector for the target block may be derived based on the aforementioned Equation 16. The decoding device may derive the refined prediction samples for the target block based on the refined motion vector. Meanwhile, if the BM mode is applied to the current block, the decoding device derives the motion information in the current block based on the BM mode (S960). For example, the decoding device may derive the motion information candidate list of the current block based on the neighboring blocks of the current block. The candidate included in the motion information candidate list may include the Qrnrnn / bznz / B / YiAi LO motion information or L1 motion information. After this, the decoding device can derive the costs for the candidates included in the motion information candidate list through the BM method, and can derive the motion information in the current block based on the candidate that has the smallest cost. The cost for the candidate included in the motion information candidate list may be derived as follows. The decoding device may derive the motion vector corresponding to the motion vector of a direction between directions LO and L1 which are different from a direction associated with the motion vector by interpolating the motion vector of the candidate around the current picture, and may derive, as the candidate cost, the SAD between the reference block in which the candidate motion vector is indicated, and the reference block in which the derived motion vector is indicated. For example, if the motion candidate includes LO motion information, the decoding device may derive MVL1 by scaling the MVLO for the motion candidate based on the first LO information. Qrnrnn / bznz / B / YiAi temporal distance and the second temporal distance. The decoding device may derive, as the cost of the motion candidate, the SAD between the LO reference block in which the MVLO is indicated, and the L1 reference block in which the MVL1 is indicated. In this, the first temporal distance may be a difference value between the POC of the LO reference photograph for the motion candidate and the POC of the current photograph, and the second temporal distance may be a difference value between the 10 POC of the L1 reference photograph for the MVL1 and the POC of the current photograph. Furthermore, for example, if the motion candidate includes motion information L1, the decoding device may derive the MVLO by scaling the MVL1 for the motion candidate based on the first temporal distance and the second temporal distance. The decoding device may derive, as the cost of the motion candidate, the SAD between the reference block L1 in which the MVL1 is indicated, and the reference block LO in which the MVLO is indicated. In this, the first temporal distance may be a difference value between the POC of the reference photograph L1 for the motion candidate and the POC of the current photograph, and the second temporal distance may be a difference value between the POC of the reference photograph L1 for the motion candidate and the POC of the current photograph. Qrnrnn / bznz / B / YiAi temporal distance can be a difference value between the POC of the reference photograph LO by the MVLO and the POC of the current photograph. The decoding device may compare the costs of the candidates and derive, for example, the motion information of the current block, the motion information of the candidate with the smallest cost (LO motion information or L1 motion information), and the motion information derived based on the candidate (L1 motion information or LO motion information). The decoding device may perform prediction on the current block based on the motion information. Figure 10 schematically represents a method of image coding by an coding device according to the present disclosure. The method described in Figure 10 may be performed by the coding device described in Figure 1. Specifically, for example, S1000 to S1040 in Figure 10 may be performed by the predictor of the coding device, and S1050 may be performed by the entropy encoder of the coding device. Qenrnn / frznz / e / YiAi The coding device derives the reference photo list 0 (LO) and the reference photo list 1 (Ll) (S1000). The coding device may derive the reference photo list 0 LO and the reference photo list 1 Ll, the reference photo list 0 may be called LO (List 0), and the reference photo list 1 may be called Ll (List 1). The coding device derives two motion vectors (MVs) for the current block, and the two MVs 10 include the MVLO with respect to the LO, and the MVL1 with respect to the Ll (S1010). If the current block is included in segment B, and bi-prediction is applied to the current block, the coding device may derive the two MVs. The two MVs may be the MVLO for the LO and the MVL1 for the Ll. The coding device can derive the two MVs for the current block based on the current block's neighboring block. For example, the encoding device may generate the motion information candidate list based on the motion information of the nearby block, and may select the specific candidate from among the candidates included in the candidate list. Qrnrnn / bznz / B / YiAi of the movement information based on the RD cost. The encoding device may generate an index indicating the specific candidate. The index may be included in the information in the aforementioned inter-prediction. The encoding device may derive the MVLO and MVL1 of the specific candidate as the two MVs of the current block. Alternatively, the encoding device can derive the two MVs by applying FRUC to the current block. Specifically, for example, the encoding device may determine whether template matching (TM) mode or bilateral matching (BM) mode applies to the current block. Furthermore, the encoding device may generate the indicator indicating either the TM mode or the BM mode. The information in the inter-prediction may include the indicator. If the BM mode is applied to the current block, the encoding device may derive the motion information candidate list of the current block based on the neighboring block of the current block, and may select the specific candidate from among the candidates included in the motion information candidate list. The encoding device may derive the second motion vector associated with another list that a Qenrnn / frznz / e / YiAi lists the LO and the LL associated with the motion vector by scaling the first motion vector of the specific candidate based on the first time distance and the second time distance, and may derive the first motion vector and the second motion vector as MVs of the current block. In this, the first time distance may be a difference value between the photo order count (POC) of the reference photo for the first motion vector and the POC of the current photo that includes the current block, and the second time distance may be a difference value between the POC of the reference photo for the second motion vector and the POC of the current photo.Meanwhile, since the candidate with the lowest cost can be selected as the specific candidate from among the candidates included in the motion information candidate list, the cost for the specific candidate can be derived as the SAD between the reference block in which the first motion vector is indicated and the reference block in which the second motion vector is indicated. That is, the encoding device can derive the costs for the candidates for the motion information candidate list. Qenrnn / frznz / e / YiAi by deriving the second motion vectors of the candidates, and can select the specific candidate by comparing the costs with each other. Furthermore, if the TM mode is applied to the current block, the coding device may derive the LO reference picture and the L1 reference picture of the current block, derive as the VMLO, the motion vector indicating the LO reference block having the smallest cost among the LO reference blocks of the LO reference picture, and derive as the MVL1 the motion vector indicating the L1 reference block having the smallest cost among the L1 reference blocks of the L1 reference picture. In this, the cost of the LO reference block may be derived as the sum of absolute differences (SAD) between the template of the current block and the template of the LO reference block, and the cost of the L1 reference block may be derived as the SAD between the template of the current block and the template of the L1 reference block.Furthermore, the template of the current block may represent a specific region including the nearby samples of the current block, the template of the reference block LO may represent a specific region including the nearby samples of the block of. Qrnrnn / bznz / B / YiAi LO reference corresponding to the nearby samples of the current block, and the L1 reference block template may represent a specific region including the nearby samples of the L1 reference block corresponding to the nearby samples of the current block. Meanwhile, the cost of the LO reference block or the L1 reference block may be derived based on the aforementioned Equation 24. Furthermore, the LO reference photograph may be derived as one of the LO reference photographs included in the LO, and the L1 reference photograph may be derived as one of the L1 reference photographs included in the L1. Furthermore, the LO reference photograph and the L1 reference photograph may be derived based on the motion information of the nearby block of the current block. Meanwhile, the encoding device may generate an FRUC indication indicating whether the FRUC applies to the current block. The information in the inter-prediction may include the FRUC indication for the current block. The encoding device determines whether the bi-directional optical flow (BIO) prediction that derives the refined motion vector on a sub-block basis is applied to the current block (S1020). For example, the device Qenrnn / frznz / e / YiAi coding can determine whether the BIO prediction is applied to the current block based on the current block size. For example, if the current block size is less than or equal to 4x4, the BIO prediction may not be applied to the current block, and if the current block size is greater than 4x4, the BIO prediction may be applied to the current block. Furthermore, as another example, the encoding device may determine whether BIO prediction applies to the current block based on whether TM mode applies. In one example, if BM mode is applied to the current block, BIO prediction may not be applied to the current block, and if TM mode is applied to the current block, BIO prediction may be applied to the current block. If the BIO prediction is applied to the current block, the encoding device derives the refined motion vector for the current block's sub-block based on the MVLO and MVL1 (S1030). In this regard, the sub-block size may be pre-set. For example, the sub-block size may be 4x4. The refined motion vector may be derived on a sub-block basis for the current block. Qrnrnn / bznz / B / YiAi The x-axis and y-axis and time-axis gradient maps of the reference sample value of the sub-block may be derived based on the MVLO and MVL1, and the refined motion vector for the sub-block may be derived based on the gradient map for the sub-block. The refined motion vector for the sub-block may be derived based on the aforementioned Equation 21 or 23. The coding device derives the prediction sample based on the refined motion vector (S1040). The coding device may derive the prediction sample based on the refined motion vector. The prediction sample for the sub-block of the current block may be derived based on an equation obtained by substituting Vx,bk for Vx, and Vy,bk for Vy in Equation 14 described above. Furthermore, if the first time distance and the second time distance are different from each other in magnitude, the prediction sample for the sub-block of the current block may be derived based on an equation obtained by substituting Vx,bk for Vx, and Vy,bk for Vy in Equation 15 described above. Meanwhile, although not shown in Figure 10, if it is determined that the BIO prediction is not applicable, the coding device can derive the prediction sample by the target sample based on the MVLO and the Qrnrnn / bznz / B / YiAi MVL1. Qenrnn / frznz / e / YiAi The entropy encoding device encodes the information in the inter-prediction of the current block (S1050). The encoding device may encode the entropy information in the inter-prediction, and generate the entropy-encoded information in the form of a bit stream. The bit stream may be transmitted to the decoding device via a network or a storage medium. The inter-prediction information may include information about the prediction mode of the current block. The prediction mode information may represent the inter-prediction mode applicable to the current block. Furthermore, the inter-prediction information may include an indicator indicating either the TM mode or the BM mode. Additionally, the information in the inter-prediction may include the FRUC indication for the current block. Meanwhile, the coding device can generate the residual sample based on the generated prediction sample and the original sample from the original photograph. The coding device can generate the information in the residual based on the residual sample. The information in the residual may include transformation coefficients that relate to the residual sample. The encoding device may derive the reconstruction sample based on the prediction sample and the residual sample. That is, the encoding device 5 may derive the reconstruction sample by adding the prediction sample to the residual sample. Furthermore, the encoding device may encode the information in the residual and generate the encoded information in the form of a bit stream. The bit stream may be transmitted to the decoding device 10 via a network or a storage medium. Figure 11 schematically represents an encoding device performing an image coding method according to the present disclosure. The method 15 described in Figure 10 may be performed by the coding device described in Figure 11. Specifically, for example, the predictor of the coding device of Figure 11 may perform S1000 to S1040 in Figure 10, and the entropy encoder of the coding device 20 may perform S1050 in Figure 10. Figure 12 schematically represents a method of image decoding by an encoding device according to the present disclosure. The method Qrnrnn / bznz / B / YiAi described in Figure 12 may be realized by the decoding device described in Figure 2. Specifically, for example, 31200 to 31240 of Figure 12 may be realized by the predictor of the decoding device 5. The decoding device derives the reference photo list 0 (LO) and the reference photo list 1 (L1) (S1200). The decoding device may derive the reference photo list 0 LO and the reference photo list 1 L1, the reference photo list 0 may be called LO (List 0), and the reference photo list 1 may be called L1 (List 1). The decoding device derives two motion vectors (MVs) for the current block, the two MVs including MVL0 with respect to LO and MVL1 with respect to Ll (S1210). The decoding device may obtain inter-prediction information via the bit stream, and may derive an inter-prediction mode applicable to the current block based on the inter-prediction information. If the current block is included in segment B, and the bi-prediction is applied to the current block, the device Qenrnn / frznz / e / YiAi decoding can derive the two MVs. The two MVs can be the MVLO for the LO and the MVL1 for the L1. The decoding device can derive the two MVs for the current block based on the nearby block of the current block. For example, the decoding device may generate the motion information candidate list based on the motion information of the neighboring block, and may select a specific candidate 10 from among the candidates included in the motion information candidate list based on the index indicating the specific candidate. The index may be included in the information in the aforementioned inter-prediction. The decoding device may derive 15 the MVLO and MVL1 of the specific candidate as the two MVs of the current block. Alternatively, the decoding device can derive the two MVs by applying the FRUC to the current block. Specifically, for example, the decoding device may determine whether the template matching (TM) mode or the bi-lateral matching (BM) mode applies to the current block. As an example, the decoding device may obtain the indicator indicating either Qrnrnn / bznz / B / YiAi 100 TM mode or BM mode, and can determine that the mode indicated by the indicator applies to the current block. The information in the inter-prediction may include the indicator. If the BM mode is applied to the current block, the decoding device may derive the motion information candidate list of the current block based on the neighboring block of the current block, and may select the specific candidate from among the 10 candidates included in the motion information candidate list. The decoding device may derive the second motion vector associated with another list than a list between the LO and the L1, which is associated with the motion vector, by scaling the first motion vector of the specific candidate based on the first time distance and the second time distance, and may derive the first motion vector and the second motion vector as the MVs of the current block.In this, the first temporal distance may be a difference value between the photo order count (POC) of the reference photo for the first motion vector and the POC of the current photo that includes the current block, and the second temporal distance may be a difference value. Qrnrnn / bznz / B / YiAi 101 between the POC of the reference photograph for the second motion vector and the POC of the current photograph. Meanwhile, since the candidate with the smallest cost can be selected as the specific candidate 5 from among the candidates included in the motion information candidate list, the cost for the specific candidate can be derived as the SAD between the reference block in which the first motion vector is indicated, and the reference block in which the second motion vector is indicated. That is, the decoding device can derive the costs for the candidates for the motion information candidate list by deriving the second motion vectors of the candidates, and can select the specific candidate by comparing the costs with each other. Furthermore, if the TM mode is applied to the current block, the decoding device may derive the LO reference picture and the L1 reference picture of the current block, which derives as the VMLO the motion vector 20 indicating the LO reference block having the smallest cost among the LO reference blocks and the LO reference picture, and derive as the MVL1 the motion vector indicating the L1 reference block having the smallest cost. Qenrnn / frznz / e / YiAi 102 small between the Ll reference blocks of the Ll reference photograph. Herein, the LO reference block cost may be derived as the sum of absolute differences (SAD) between the current block template and the LO reference block template, and the Ll reference block cost may be derived as the SAD between the current block template and the Ll reference block template. Furthermore, the current block template may represent a specific region including the nearby samples of the current block, the LO reference block template may represent a specific region including the nearby samples of the LO reference block that correspond to the nearby samples of the current block, and the Ll reference block template may represent a specific region including the nearby samples of the Ll reference block that correspond to the nearby samples of the current block.Meanwhile, the cost of the LO reference block or the Ll reference block can be derived based on the aforementioned Equation 24. In addition, the LO reference photograph can be derived as one of the LO reference photographs included in the LO, and the Ll reference photograph can be derived as one of the Ll reference photographs. Qrnrnn / bznz / B / YiAi 103 included in the Ll. In addition, the reference photograph LO and the reference photograph Ll can be derived based on the motion information of the nearby block of the current block. Meanwhile, the information in the inter-prediction may include the FRUC indication for the current block, and the FRUC indication may represent whether the FRUC applies to the current block. The decoding device determines whether the bidirectional optical flow (BIO) prediction that derives the refined motion vector on a sub-block basis is applied to the current block (S1220). For example, the decoding device may determine whether the BIO prediction is applied to the current block based on the current block size. For example, if the current block size is less than or equal to 4x4, the BIO prediction may not be applied to the current block, and if the current block size is greater than 4x4, the BIO prediction may be applied to the current block. Furthermore, as another example, the decoding device may determine whether BIO prediction applies to the current block based on whether TM mode applies. In an example, if BM mode is applied to the current block, the Qrnrnn / bznz / B / YiAi 104 BIO prediction may not be applied to the current block, and if TM mode is applied to the current block, BIO prediction may be applied to the current block. If the BIO prediction is applied to the current block, the decoding device 5 derives the refined motion vector for the sub-block of the current block based on the MVLO and MVL1 (S1230). In this regard, the size of the sub-block may be preset. For example, the sub-block size may be 4x4. The refined motion vector 10 may be derived on a sub-block basis of the current block. The x-axis, y-axis, and time-axis gradient maps of the reference sample value of the sub-block may be derived based on the MVLO and the MVL1, and the refined motion vector for the sub-block may be derived based on the gradient map for the sub-block. The refined motion vector for the sub-block may be derived based on the aforementioned Equation 21 or 23. The decoding device derives the prediction sample based on the refined motion vector (S1240). The decoding device may derive the prediction sample based on the refined motion vector. The prediction sample for the sub-block of the Qenrnn / frznz / e / YiAi 105 current block may be derived based on an equation obtained by substituting Vz,bk for Vz, and Vy,bi- for Vy in Equation 14 described above. Furthermore, if the first time distance and the second time distance are 5 different from each other in magnitude, the prediction sample for the sub-block of the current block may be derived based on an equation obtained by substituting Vz,bk for Vz, and Vy,bk for Vv in Equation 15 described above. The decoding device may use the prediction sample 10 directly as a reconstruction sample according to the prediction mode, or may generate a reconstruction sample by adding a residual sample to the prediction sample. If a residual sample exists for the current block, the decoding device may obtain information in the residual for the current block from the bit stream. The information in the residual may include a transform coefficient with respect to the residual sample. The decoding device may derive the residual sample (or array of residual samples) for the current block based on the residual information. The decoding device may generate the reconstruction sample based on the prediction sample and the residual sample, and Qenrnn / frznz / e / YiAi 106 may derive a reconstructed block or reconstructed photograph based on the reconstruction sample. Thereafter, as described above, the decoding device may apply a loop filtering method 5 such as an SAO method and / or deblocking filtering to the reconstructed photograph in order to improve the objective / subjective video quality as needed. Meanwhile, although not shown in Figure 12, 10 if it is determined that the BIO prediction is not applicable, the decoding device may derive the prediction sample by the target sample based on the MVLO and the MVL1. The decoding device may use the prediction sample directly as a reconstruction sample 15 in accordance with the prediction mode, or may generate a reconstruction sample by adding a residual sample to the prediction sample. Figure 13 schematically represents a decoding device performing an image decoding method according to the present disclosure. The method described in Figure 12 may be performed by the decoding device described in Figure 13. Specifically, for example, the predictor of the decoding device Qrnrnn / bznz / B / YiAi 107 decoding of Figure 13 may perform S1200 to S1240 of Figure 12. Meanwhile, information in the interprediction and / or information in the residual may be obtained by an entropy decoder of the decoding device described in Figure 13. In accordance with the present disclosure described above, it is possible to reduce the computational complexity of the inter-prediction which uses the refined motion vector derived on a sub-block basis 10 by determining whether the BIO prediction is applied to the current block, through which it is possible to improve the overall coding efficiency. Furthermore, according to the present disclosure, it is possible to reduce the computational complexity of the inferred prediction which uses the refined motion vector derived on a sub-block basis by determining based on the FRUC mode whether to apply the BIO prediction, through which it is possible to improve the overall coding efficiency. In the embodiments described above, the methods are explained based on flowcharts by means of a series of steps or blocks, but the present description is not limited to the order of steps, and a certain step may Qenrnn / frznz / e / YiAi 108 may occur in an order or in different steps from those described above, or concurrently with another step. Furthermore, it can be understood by one of ordinary skill in the art that the steps shown in a flowchart are not exclusive, and that another step may be incorporated or one or more steps from the flowchart may be removed without affecting the scope of the present disclosure. The methods described above in accordance with this disclosure may be implemented as a form of software, and an encoding device and / or decoding device in accordance with the disclosure may be included in a device for image processing, such as a TV, a computer, a smartphone, a set-top box, a display device, or the like. When the embodiments in the description are included by software, the methods described above may be included as modules (processes, functions, or the like) for performing the functions described above. The modules may be stored in a memory and may be executed by a processor. The memory may be inside or outside the processor and may be Qenrnn / frznz / e / YiAi 109 connected to the processor by various well-known means. The processor may include an application-specific integrated circuit (ASIC), another chip array, logic circuit, and / or a data processing device. The memory may include read-only memory (ROM), random access memory (RAM), flash memory, a memory card, a storage medium, and / or another storage device. That is, embodiments described herein may be included and implemented in a processor, a microprocessor, a controller, or a chip. For example, the functional units shown in each drawing may be included and implemented in a computer, a processor, a microprocessor, a controller, or a chip. Furthermore, the decoding device and the encoding device to which the present disclosure applies may be included in a multimedia broadcasting transceiver, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video chat device, a real-time communication device such as video communication, a mobile streaming device, a Qrnrnn / bznz / B / YiAi 110 storage medium, a camcorder, a device that provides video on demand (VoD) service, an over-the-top (OTT) device, a device that provides internet streaming service, a three-dimensional (3D) video device, a video telephony video device, and a medical video device, and may be used to process a video signal or a data signal. For example, the over-the-top (OTT) video device may include a game console, a Blu-ray player, an internet access TV, a home theater system, a smartphone, a tablet PC, a digital video recorder (DVR), and the like. Furthermore, the processing method to which the present disclosure is applied may be produced in the form of a program executed by a computer, and may be stored on a computer-readable recording medium. Multimedia data having a structure according to the present disclosure may also be stored on a computer-readable recording medium. The computer-readable recording medium includes all types of storage devices and distributed storage devices in which the computer-readable data are stored. The computer-readable recording medium may be stored on a computer-readable recording medium. Qrnrnn / bznz / B / YiAi 111 computer may include, for example, a Blu-ray Disc (BD), a universal serial bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device. In addition, the computer-readable recording medium includes media included in the form of a carrier wave (e.g., transmission over the Internet). In addition, a bit stream generated by the encoding method may be stored on a computer-readable recording medium 10 or transmitted via a wired or wireless communication network. Additionally, embodiments of the present disclosure may be included as a computer program product by program codes, and the program codes may be executed on a computer by embodiments of the present disclosure. Program codes can be stored on a computer-readable medium. Furthermore, the content streaming system to which the present disclosure applies 20 may broadly include an encoding server, a streaming server, a network server, a storage medium, a user equipment, and a multimedia input device. Qrnrnn / bznz / B / YiAi 112 The encoding server functions to compress the digital data into content input from multimedia input devices, such as a smartphone, a camera, a camcorder, and the like, 5 to generate a bit stream, and transmit it to the streaming server. As another example, in a case where the multimedia input device, such as a smartphone, a camera, a camcorder, or the like, directly generates a bit stream, the encoding server 10 may be omitted. The bit stream may be generated by an encoding method or a bit stream generation method to which the present disclosure is applicable, and the streaming server may temporarily store the bit stream during a process for transmitting or receiving the bit stream. The streaming server transmits multimedia data to the user equipment based on a user request via the network server, which functions as a tool to inform the user about the service available. 20 When the user requests a service he or she desires, the network server transfers it to the streaming server, and the streaming server transmits multimedia data to the user. In this sense, Qenrnn / frznz / e / YiAi 113 The content streaming system may include a separate control server, and in this case, the control server functions to control commands / responses between the respective equipment in the content streaming system. The streaming server can receive content from the storage medium and / or the encoding server. For example, in a case where content is received from the encoding server, the content may be received in real time. In this case, the streaming server can store the bit stream for a predetermined period of time to provide the streaming service seamlessly. For example, the user equipment may include a mobile phone, a smartphone, a laptop computer, a digital broadcasting terminal, a personal digital assistant (PDA), a portable multimedia player (PMP), a navigation, a slate tablet PC, a tablet PC, an ultrabook, a portable device (e.g., a watch-type terminal (smart watch), a glass-type terminal (smart glass), a helmet-mounted display (HMD)), a digital TV, a personal computer, a computer, a mobile phone, a tablet PC, a mobile phone, a tablet computer, a mobile phone, a mobile device, a mobile phone, a tablet PC, a mobile phone, a mobile device, a mobile phone ... Qrnrnn / bznz / B / YiAi 114 desktop, digital signage, or similar. Each server in the content streaming system can be operated as a distributed server, and in this case, the data received by each server can be processed in a distributed manner.

Claims

1. A decoding apparatus for image decoding, the decoding apparatus comprising: a memory; and at least one processor connected to the memory, the at least one processor configured to: obtain image information including residual information from a bit stream; derive a current block based on partitioning a current image, wherein the current block is a non-square block; derive a reference picture list 0 (LO) and a reference picture list 1 (Ll); derive two motion vectors (MVs) for the current block, wherein the two MVs include an MVLO for LO and an MVL1 for Ll; determine whether bidirectional optical flow (BIO) prediction is applied to the current block; generate prediction samples of the current block based on MVLO, MVL1, and a result of determining that BIO prediction is applied to the current block; generate residual samples based on the residual information;and Qenrnn / frznz / e / YiAi generating reconstructed samples based on the prediction samples 116 and the residual samples, wherein at least one processor is further configured to: determine whether the BIO prediction applies to the current block by comparing a first threshold value with a width of the current block and comparing a second threshold value with a height of the current block, wherein based on the width of the current block being greater than or equal to the first threshold value and the height of the current block being greater than or equal to the second threshold value, it is determined that the BIO prediction applies to the current block, wherein based on the width of the current block being less than the first threshold value or the height of the current block being less than the second threshold value, it is determined that the BIO prediction does not apply to the current block, and wherein the first threshold value is 8; 2. An coding apparatus for image coding, the coding apparatus comprising: a memory; and at least one processor connected to the memory, the at least one processor configured to: derive a current block based on partitioning a current image, wherein the current block is a non-square block; derive a reference picture list 0 (LO) and a reference picture list 1 (Ll); derive two motion vectors (MVs) for the current block, wherein the two MVs include an MVLO for LO and an MVL1 for Ll; determine whether bidirectional optical flow (BIO) prediction is applied to the current block; generate prediction samples of the current block based on MVLO, MVL1, and a result of determining that BIO prediction is applied to the current block; generate residual samples of the current block based on the prediction samples; generate residual information based on the residual samples;and encoding image information including inter-prediction information of the current block and the residual information, wherein at least one processor is further configured to: determine whether the BIO prediction is applicable to the current block by comparing a first threshold value with a width of the current block and comparing a second threshold value with a height of the current block, wherein based on the width of the current block being greater than or equal to the first threshold value and the height of the current block being greater than or equal to the second threshold value, it is determined that the BIO prediction is applicable to the current block, wherein based on the width of the current block being less than the first threshold value or the height of the current block being less than the second threshold value, it is determined that the BIO prediction is not applicable to the current block, and wherein the first threshold value is 8; 3. An apparatus for transmitting data for an image, the apparatus comprising: at least one processor configured to obtain a bit stream for the image, wherein the bit stream is generated based on deriving a current block based on partitioning a current image, wherein the current block is a non-square block, deriving a reference picture list 0 (LO) and a reference picture list 1 (Ll), deriving two motion vectors (MVs) for the current block, wherein the two MVs include an MVLO for LO and an MVL1 for Ll, determining whether bi-directional optical flow (BIO) prediction is applied to the current block, generating prediction samples of the current block based on MVLO, MVL1 and a result of determining that BIO prediction is applied to the current block, Qrnrnn / bznz / B / YiAi 119 generating residual samples of the current block based on the prediction samples,generating residual information based on the residual samples and encoding image information including inter-prediction information of the current block and the residual information; and a transmitter configured to transmit the data comprising the bit stream, wherein determining whether the BIO prediction applies to the current block, comprises: determining whether the BIO prediction applies to the current block by comparing a first threshold value with a width of the current block and comparing a second threshold value with a height of the current block, wherein based on the width of the current block being greater than or equal to the first threshold value and the height of the current block being greater than or equal to the second threshold value, it is determined that the BIO prediction applies to the current block, where based on the width of the current block being less than the first threshold value or the height of the current block being less than the second threshold value,It is determined that the BIO prediction does not apply to the current block, and where the first threshold value is 8.,