Method and apparatus for processing video signals using affine prediction

By adaptively selecting affine prediction modes (AF4 and AF6) based on block size and neighboring block conditions, the problem of efficient encoding and decoding of high-resolution video signals is solved, reducing complexity and improving performance.

CN118214884BActive Publication Date: 2026-02-03GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410534881.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2017-08-03
Filing Date
2018-08-03
Publication Date
2026-02-03
Estimated Expiration
2038-08-03

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively handle the high spatial resolution, high frame rate, and high scene performance of next-generation video content, leading to a significant increase in memory storage, memory access speed, and processing power.

Method used

The optimal compilation mode is adaptively selected using affine prediction modes (AF4 mode and AF6 mode), and the video signal is encoded and decoded using an affine motion model based on the block size and the compilation status of neighboring blocks.

Benefits of technology

By reducing the complexity of affine prediction, the efficiency of encoding and decoding is improved, thus enhancing the performance of affine prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118214884B_ABST
    Figure CN118214884B_ABST
Patent Text Reader

Abstract

The disclosure provides a method for decoding a video signal including a current block based on an affine motion prediction mode (affine mode, AF mode), the method including checking whether the AF mode is applied to the current block, the AF mode indicating a motion prediction mode using an affine motion model; when the AF mode is applied to the current block, checking whether the AF4 mode is used, the AF4 mode indicating a mode in which four parameters constituting the affine motion model are used to predict a motion vector; when the AF4 mode is used, generating a motion vector predictor using the four parameters, and when the AF4 mode is not used, generating a motion vector predictor using six parameters constituting the affine motion model; and obtaining a motion vector of the current block based on the motion vector predictor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to a method and apparatus for encoding / decoding video signals, and more specifically, to a method and apparatus for adaptively performing affine prediction. Background Technology

[0002] Compression coding refers to a series of signal processing techniques used to transmit digitized information over communication lines or to store digitized information in a form suitable for storage media. Media such as video, images, and audio can be targets of compression coding; in particular, techniques that use video as a target for compression coding are called video compression.

[0003] Next-generation video content will feature high spatial resolution, high frame rates, and high scene rendering, creating a high-dimensional experience. To process this content, memory storage, memory access speeds, and processing power technologies will need to be significantly increased.

[0004] Therefore, it is necessary to design compilation tools for more effectively processing next-generation video content. Summary of the Invention

[0005] Technical issues

[0006] This disclosure proposes a method for more efficiently encoding and decoding video signals.

[0007] Furthermore, this disclosure proposes a method for performing encoding or decoding by considering both AF4 mode as an affine prediction mode using four parameters and AF6 mode as an affine prediction mode using six parameters.

[0008] Furthermore, this disclosure proposes a method for adaptively determining (or selecting) the optimal compilation mode based on block size according to at least one of AF4 and AF6 modes.

[0009] Furthermore, this disclosure proposes a method for adaptively determining (or selecting) the optimal compilation mode based on at least one of AF4 and AF6 modes, depending on whether neighboring blocks have already been compiled according to affine prediction.

[0010] Technical solutions

[0011] To solve the aforementioned technical problems,

[0012] This disclosure provides a method for adaptively performing affine prediction based on block size.

[0013] Furthermore, this disclosure provides a method for adaptively performing affine prediction based on whether neighboring blocks have been compiled according to affine prediction.

[0014] Furthermore, this disclosure provides a method for adaptively determining (or selecting) the optimal compilation mode based on at least one of AF4 and AF6 modes.

[0015] Furthermore, this disclosure provides a method for adaptively performing affine prediction based on whether at least one predetermined condition is met. In this case, the predetermined condition may include at least one of block size, number of pixels in the block, block width, block height, and whether neighboring blocks have been compiled according to affine prediction.

[0016] Beneficial effects

[0017] This disclosure can improve the performance of affine prediction by providing a method for adaptively performing affine prediction, and can perform more efficient compilation by reducing the complexity of affine prediction. Attached Figure Description

[0018] Figure 1 This is a block diagram illustrating the configuration of an encoder for encoding video signals according to an embodiment of the present disclosure.

[0019] Figure 2 This is a block diagram illustrating the configuration of a decoder for decoding video signals according to an embodiment of the present disclosure.

[0020] Figure 3 This is a diagram used to explain the QT (quadtree, hereinafter referred to as "QT") block partitioning structure as an embodiment applicable to this disclosure.

[0021] Figure 4 This is a diagram used to explain the BT (binary tree, hereinafter referred to as "BT") block partitioning structure as an embodiment applicable to this disclosure.

[0022] Figure 5 This is a diagram used to explain the TT (tritree, hereinafter referred to as "TT") block partitioning structure as an embodiment applicable to this disclosure.

[0023] Figure 6 This is a diagram used to explain the AT (Asymmetric Tree, hereinafter referred to as "AT") block partitioning structure as an embodiment applicable to this disclosure.

[0024] Figure 7 This is a diagram used to explain the inter-frame prediction mode as an embodiment of applying this disclosure.

[0025] Figure 8 This is a diagram used to explain an affine motion model as an embodiment of the application of this disclosure.

[0026] Figure 9 This is a diagram used to explain an affine motion prediction method using control point motion vectors as an embodiment of applying this disclosure.

[0027] Figure 10 This is a flowchart illustrating a process of processing a video signal including the current block using an affine prediction mode as an embodiment of applying this disclosure.

[0028] Figure 11 This is a flowchart illustrating a process of adaptively determining the optimal compilation mode based on at least one of AF4 and AF6 modes as an embodiment (1-1) of applying this disclosure.

[0029] Figure 12 This is a flowchart illustrating the process of adaptively performing decoding based on AF4 mode or AF6 mode as an embodiment (1-2) of applying this disclosure.

[0030] Figure 13 The diagram illustrates the syntax structure for performing decoding based on AF4 or AF6 mode as an example of applying the present disclosure in embodiments (1-3).

[0031] Figure 14 This is a flowchart illustrating the process of adaptively determining the optimal compilation mode from motion vector prediction modes, including AF4 mode or AF6 mode, based on condition A as an embodiment (2-1) of applying this disclosure.

[0032] Figure 15 This is a flowchart illustrating the process of adaptively performing decoding based on condition A according to AF4 mode or AF6 mode as an embodiment (2-2) of applying this disclosure.

[0033] Figure 16 The diagram illustrates the syntax structure for performing decoding based on AF4 or AF6 mode according to an embodiment (2-3) of applying this disclosure.

[0034] Figure 17 This is a flowchart illustrating the process of adaptively determining the optimal compilation mode from motion vector prediction modes, including AF4 mode or AF6 mode, based on at least one of conditions B and C as an embodiment (3-1) of applying this disclosure.

[0035] Figure 18 This is a flowchart illustrating the process of adaptively performing decoding based on at least one of conditions B and C according to AF4 mode or AF6 mode as an embodiment (3-2) of applying this disclosure.

[0036] Figure 19 The diagram illustrates a syntax structure for performing decoding based on at least one of conditions B and C according to AF4 or AF6 mode, as an embodiment (3-3) of applying this disclosure.

[0037] Figure 20This is a flowchart illustrating the process of adaptively determining the optimal compilation mode from motion vector prediction modes, including AF4 mode or AF6 mode, using a neighbor-block-based compilation mode as an example of applying the present disclosure (4-1).

[0038] Figure 21 This is a flowchart illustrating the process of adaptively performing decoding according to AF4 mode or AF6 mode in a neighbor-block-based compilation mode as an embodiment (4-2) of applying this disclosure.

[0039] Figure 22 The diagram illustrates the syntax structure for performing decoding according to AF4 or AF6 modes in an embodiment (4-3) of applying this disclosure, based on a neighbor-block-based compilation mode.

[0040] Figure 23 This is a flowchart illustrating the process of adaptively determining the optimal compilation mode from motion vector prediction modes, including AF4 mode or AF6 mode, based on at least one of conditions A, B and C, as an embodiment (5-1) of applying this disclosure.

[0041] Figure 24 This is a flowchart illustrating the process of adaptively performing decoding based on at least one of conditions A, B, and C according to AF4 mode or AF6 mode as an embodiment (5-2) of applying this disclosure.

[0042] Figure 25 The diagram illustrates a syntax structure for performing decoding based on at least one of conditions A, B, and C according to AF4 or AF6 mode, as an embodiment (5-3) of applying this disclosure.

[0043] Figure 26 This is a flowchart illustrating the process of adaptively determining the optimal compilation mode from motion vector prediction modes, including AF4 mode or AF6 mode, from at least one of the compilation modes based on condition A and neighboring blocks as an embodiment (6-1) of applying this disclosure.

[0044] Figure 27 This is a flowchart illustrating the process of adaptively performing decoding according to either AF4 or AF6 modes in at least one of the compilation modes based on condition A and neighboring blocks, as an embodiment (6-2) of this disclosure.

[0045] Figure 28 The diagram illustrates a syntax structure for performing decoding according to either AF4 or AF6 modes, based on at least one of the compilation modes of condition A and neighboring blocks, as an example of applying the present disclosure (6-3).

[0046] Figure 29This is a flowchart illustrating a process for generating a motion vector predictor based on at least one of AF4 and AF6 modes as an embodiment of the present disclosure.

[0047] Figure 30 This is a flowchart illustrating the process of generating a motion vector predictor based on AF4_flag and AF6_flag as an embodiment of the present disclosure.

[0048] Figure 31 This is a flowchart illustrating a process of adaptively performing decoding based on AF4 or AF6 mode, as an embodiment of applying this disclosure, depending on whether the neighboring block is compiled in AF mode.

[0049] Figure 32 The illustration illustrates an embodiment of applying this disclosure, in which the decoding syntax is adaptively performed based on the AF4_flag and AF6_flag.

[0050] Figure 33 The illustration shows an embodiment of the present disclosure in which the decoding syntax is adaptively executed according to AF4 mode or AF6 mode based on whether the neighboring block is compiled in AF mode.

[0051] Figure 34 The illustration shows the video compilation system disclosed herein.

[0052] Figure 35 The diagram illustrates the application of the content streaming system disclosed herein.

[0053] Preferred Implementation

[0054] This disclosure provides a method for decoding a video signal including a current block based on an affine motion prediction mode (affine mode, AF mode). The method includes: checking whether an AF mode is applied to the current block, the AF mode representing a motion prediction mode using an affine motion model; when the AF mode is applied to the current block, checking whether an AF4 mode is used, the AF4 mode representing a mode in which four parameters constituting an affine motion model are used to predict motion vectors; when the AF4 mode is used, using these four parameters to generate a motion vector predictor, and when the AF4 mode is not used, using six parameters constituting an affine motion model to generate a motion vector predictor; and obtaining the motion vector of the current block based on the motion vector predictor.

[0055] In this disclosure, the method may further include: obtaining an affine flag from a video signal, wherein the affine flag indicates whether an AF mode is applied to the current block, and checking whether an AF mode is applied to the current block based on the affine flag.

[0056] In this disclosure, the method may further include: when an AF mode is applied to the current block according to an affine flag, obtaining an affine parameter flag from the video signal, wherein the affine parameter flag indicates whether the motion vector predictor is generated using four parameters or six parameters.

[0057] In this disclosure, affine flags and affine parameter flags can be defined at at least one level of slice, maximum compilation unit, compilation unit, and prediction unit.

[0058] In this disclosure, the method may further include: checking whether the size of the current block meets a predetermined condition, wherein the predetermined condition indicates whether at least one of the number of pixels in the current block and the width and / or height of the current block is greater than a predetermined threshold, and when the size of the current block meets the predetermined condition, performing a check on whether the AF mode is applied to the current block.

[0059] In this disclosure, when the size of the current block does not meet the predetermined conditions, the current block can be decoded based on a compilation mode other than AF mode.

[0060] In this disclosure, the method may further include: when the AF mode is applied to the current block, checking whether the AF mode has been applied to neighboring blocks, wherein when the AF mode has been applied to neighboring blocks, four parameters are used to generate a motion vector predictor, and when the AF mode has not been applied to neighboring blocks, a check is performed to see if the AF4 mode is used.

[0061] This disclosure provides an apparatus for decoding a video signal including a current block based on an affine motion prediction mode (AF mode). The apparatus includes an inter-frame prediction unit configured to: check whether an AF mode is applied to the current block; when an AF mode is applied to the current block, check whether an AF4 mode is used; when an AF4 mode is used, generate a motion vector predictor using four parameters, and when an AF4 mode is not used, generate a motion vector predictor using six parameters that constitute an affine motion model; and obtain the motion vector of the current block based on the motion vector predictor, wherein the AF mode represents a motion prediction mode using an affine motion model, and the AF4 mode represents a mode in which motion vectors are predicted using four parameters that constitute an affine motion model.

[0062] In this disclosure, the apparatus may further include: a parser configured to parse affine flags from a video signal, wherein the affine flags indicate whether an AF mode is applied to the current block, and to check whether an AF mode is applied to the current block based on the affine flags.

[0063] In this disclosure, the apparatus may include a resolver configured to obtain an affine parameter flag from a video signal when an AF mode is applied to the current block according to an affine flag, wherein the affine parameter flag indicates whether a motion vector predictor is generated using four parameters or six parameters.

[0064] In this disclosure, the apparatus may include an inter-frame prediction unit configured to check whether the size of the current block meets a predetermined condition, wherein the predetermined condition indicates whether at least one of the number of pixels in the current block and the width and / or height of the current block is greater than a predetermined threshold, and when the size of the current block meets the predetermined condition, to perform an AF mode check on the current block.

[0065] In this disclosure, the apparatus may include an inter-frame prediction unit configured to: when an AF mode is applied to the current block, check whether the AF mode has been applied to a neighboring block, wherein when the AF mode has been applied to a neighboring block, a motion vector predictor is generated using four parameters, and when the AF mode has not been applied to a neighboring block, perform a check on whether the AF4 mode is used. Detailed Implementation

[0066] In the following, the configuration and operation of embodiments of the present disclosure will be described in detail with reference to the accompanying drawings. The configuration and operation of the present disclosure described with reference to the accompanying drawings are described as embodiments, and the scope, core configuration and operation of the present disclosure are not limited thereto.

[0067] Furthermore, the terms used in this disclosure are selected from currently widely used general terms, but in specific cases, terms randomly selected by the applicant are used. In such cases, since their meanings are clearly described in the detailed description of the corresponding section, the term should not be simply interpreted by the name of the term used in the description of this disclosure, but rather its meaning should be understood and interpreted.

[0068] Furthermore, when there are generic terms used to describe this disclosure or other terms with similar meanings, the terms used in this disclosure may be replaced for a more appropriate interpretation. For example, in each compilation process, signals, data, samples, images, frames, and blocks may be appropriately replaced and interpreted. Additionally, in each compilation process, segments, decompositions, separations, and partitions may be appropriately replaced and interpreted.

[0069] Figure 1 A schematic block diagram of an encoder for encoding video signals according to an embodiment of the present disclosure is shown.

[0070] refer to Figure 1The encoder 100 may include an image segmentation unit 110, a transform unit 120, a quantization unit 130, an inverse quantization unit 140, an inverse transform unit 150, a filtering unit 160, a DPB (decoded image buffer) 170, an inter-frame prediction unit 180, an intra-frame prediction unit 185, and an entropy coding unit 190.

[0071] The image segmentation unit 110 can divide the input image (or picture, frame) input to the encoder 100 into one or more processing units. For example, the processing unit can be a compilation tree unit (CTU), a compilation unit (CU), a prediction unit (PU), or a transform unit (TU). Here, segmentation can be performed by at least one of QT (quadtree), BT (binary tree), TT (ternary tree), and AT (asymmetric tree).

[0072] However, these terms are used only for the convenience of explanation, and the disclosure is not limited to the definitions of these terms. In this specification, for ease of explanation, the term "compilation unit" is used as a unit used in the processing of encoding or decoding video signals; however, the disclosure is not limited thereto, and another processing unit may be appropriately selected based on the content of this disclosure.

[0073] The encoder 100 can generate a residual signal by subtracting the prediction signal output from the inter-frame prediction unit 180 or the intra-frame prediction unit 185 from the input image signal. The generated residual signal can be sent to the transform unit 120.

[0074] The transformation unit 120 can apply transformation techniques to the residual signal to generate transformation coefficients. The transformation process can be applied to pixel blocks that are squares of the same size, or to blocks of variable size other than squares.

[0075] The quantization unit 130 can quantize the transform coefficients and send the quantized coefficients to the entropy coding unit 190. The entropy coding unit 190 can entropy code the quantized signal and then output the entropy-coded signal as a bit stream.

[0076] The quantized signal output from quantization unit 130 can be used to generate a prediction signal. For example, the quantized signal can be dequantized and inversely transformed via dequantization unit 140 and inverse transform unit 150 in the loop, respectively, to reconstruct the residual signal. The reconstructed residual signal can be added to the prediction signal output from inter-frame prediction unit 180 or intra-frame prediction unit 185 to generate the reconstructed signal.

[0077] Meanwhile, during compression, neighboring blocks can be quantized using different quantization parameters, potentially leading to block boundary degradation. This phenomenon is known as blocking artifacts, and it's a crucial factor in evaluating image quality. Filtering can be performed to reduce this degradation. By using filtering, blocking artifacts can be eliminated, and errors in the current image can be reduced, thereby improving image quality.

[0078] The filtering unit 160 can apply filtering to the reconstructed signal and then output the filtered reconstructed signal to the playback device or the decoded image buffer 170. The filtered signal sent to the decoded image buffer 170 can be used as a reference image in the inter-frame prediction unit 180. In this way, using the filtered image as a reference image in the image inter-frame prediction mode can not only improve image quality but also improve compilation efficiency.

[0079] The decoded image buffer 170 can store filtered images for use as reference images in the inter-frame prediction unit 180.

[0080] Inter-frame prediction unit 180 can refer to the reconstructed image to perform temporal and / or spatial prediction to remove temporal and / or spatial redundancy. In this case, the reference image used for prediction can be a transformed signal obtained in blocks during previous encoding / decoding via quantization and dequantization. Therefore, this may lead to block artifacts or ringing artifacts.

[0081] Therefore, to address performance degradation caused by signal discontinuities or quantization, the inter-frame prediction unit 180 can use a low-pass filter to interpolate the signal between pixels on a sub-pixel basis. In this case, a sub-pixel can refer to a virtual pixel generated by applying an interpolation filter. Integer pixels refer to the actual pixels present in the reconstructed image. Interpolation methods can include linear interpolation, bilinear interpolation, and Wiener filters, among others.

[0082] Interpolation filters are applied to reconstruct the image, thereby improving prediction accuracy. For example, the inter-frame prediction unit 180 can generate interpolated pixels by applying interpolation filters to integer pixels, and can use interpolation blocks configured with interpolated pixels as prediction blocks to perform prediction.

[0083] The intra-prediction unit 185 can predict the current block by referring to samples surrounding the block to be encoded. The intra-prediction unit 185 can perform the following processes to facilitate intra-prediction: First, the prediction unit can prepare reference samples necessary for generating the prediction signal. Furthermore, the prediction unit can use the prepared reference samples to generate the prediction signal. Afterward, the prediction unit encodes the prediction mode. In this case, reference samples can be prepared through reference sample padding and / or reference sample filtering. The reference samples may include quantization errors because prediction and reconstruction processing has already been performed on the reference samples. Therefore, to reduce such errors, reference sample filtering processing can be performed on each prediction mode used for intra-prediction.

[0084] The prediction signal generated by the inter-frame prediction unit 180 or the intra-frame prediction unit 185 can be used to generate the reconstructed signal or the residual signal.

[0085] Figure 2 This is an embodiment of the present disclosure, and a schematic block diagram of a decoder that performs decoding of video signals is shown.

[0086] refer to Figure 2 The decoder 200 can be configured to include a parsing unit (not shown), an entropy decoding unit 210, an inverse quantization unit 220, an inverse transform unit 230, a filtering unit 240, a decoded picture buffer (DPB) unit 250, an inter-frame prediction unit 260, an intra-frame prediction unit 265, and a reconstruction unit (not shown).

[0087] Decoder 200 can receive from Figure 1 The signal output by encoder 100 can be parsed or used to obtain syntax elements through parsing unit (not shown). The parsed or obtained signal can be entropy decoded by entropy decoding unit 210.

[0088] The dequantization unit 220 uses the quantization step size information to obtain the transform coefficients from the entropy-decoded signal.

[0089] The inverse transform unit 230 obtains the residual signal by performing an inverse transform on the transform coefficients.

[0090] The reconstruction unit (not shown) generates a reconstruction signal by adding the obtained residual signal to the prediction signal output by the inter-frame prediction unit 260 or the intra-frame prediction unit 265.

[0091] The filtering unit 240 applies filtering to the reconstructed signal and sends the filtered signal to the playback device or to the decoding image buffer unit 250. The filtered signal sent to the decoding image buffer unit 250 can be used as a reference image in the inter-frame prediction unit 260.

[0092] The embodiments described in this specification in the filter unit 160, inter-frame prediction unit 180 and intra-frame prediction unit 185 of encoder 100 can be applied in the same way to the filter unit 240, inter-frame prediction unit 260 and intra-frame prediction unit 265 of decoder.

[0093] The reconstructed video signal output by decoder 200 can be played back using a playback device.

[0094] Figure 3 This is a diagram used to explain the QT (quadtree, hereinafter referred to as "QT") block partitioning structure as an embodiment applicable to this disclosure.

[0095] In video compilation, individual blocks can be segmented based on a QT (quadtree). Furthermore, individual sub-blocks segmented according to QT can be recursively segmented using QT. Leaf blocks no longer segmented according to QT can be segmented according to at least one of BT (binary tree), TT (ternary tree), and AT (asymmetric tree). BT can have two types of segmentation: horizontal BT(2NxN, 2NxN); and vertical BT(Nx2N, Nx2N). TT can have two types of segmentation: horizontal TT(2Nx1 / 2N, 2NxN, 2Nx1 / 2N); and vertical TT(1 / 2Nx2N, Nx2N, 1 / 2Nx2N). AT can be divided into four types: horizontal-upward AT(2Nx1 / 2N, 2Nx3 / 2N); horizontal-downward AT(2Nx3 / 2N, 2Nx1 / 2N); vertical-leftward AT(1 / 2Nx2N, 3 / 2Nx2N); and vertical-rightward AT(3 / 2Nx2N, 1 / 2Nx2N). BT, TT, and AT can be further recursively divided using BT, TT, and AT.

[0096] Figure 3 This shows an example of QT partitioning. Block A can be partitioned into four sub-blocks A0, A1, A2, and A3 using QT. Sub-block A1 can be further partitioned into four sub-blocks B0, B1, B2, and B3 using QT.

[0097] Figure 4 This is a diagram used to explain the BT (binary tree, hereinafter referred to as "BT") block partitioning structure as an embodiment applicable to this disclosure.

[0098] Figure 4 An example of BT partitioning is shown. Block B3, which is no longer partitioned by QT, can be partitioned into vertical BT C0 and C1 or horizontal BT D0 and D1. Each sub-block, such as block C0, can be further recursively partitioned into horizontal BT E0 and E1 or vertical BT F0 and F1.

[0099] Figure 5This is a diagram used to explain the TT (tritree, hereinafter referred to as "TT") block partitioning structure as an embodiment applicable to this disclosure.

[0100] Figure 5 An example of TT partitioning is shown. Block B3, which is no longer partitioned by QT, can be partitioned into vertical TT C0, C1, and C2 or horizontal TT D0, D1, and D2. Each sub-block, such as block C1, can be further recursively partitioned into horizontal TT E0, E1, and E2 or vertical TT F0, F1, and F2.

[0101] Figure 6 This is a diagram used to explain the AT (Asymmetric Tree, hereinafter referred to as "AT") block partitioning structure as an embodiment applicable to this disclosure.

[0102] Figure 6 An example of AT segmentation is shown. Block B3, which is no longer segmented by QT, can be segmented into vertical AT C0 and C1 or horizontal AT D0 and D1. Each sub-block, such as block C1, can be further recursively segmented into horizontal AT E0 and E1 or vertical AT F0 and F1.

[0103] Simultaneously, BT, TT, and AT segmentation can be used together. For example, sub-blocks segmented by BT can be further segmented by TT or AT. Conversely, sub-blocks segmented by TT can be further segmented by BT or AT. Sub-blocks segmented by AT can be further segmented by BT or TT. For example, after horizontal BT segmentation, each sub-block can be segmented into vertical BT segments, and after vertical BT segmentation, each sub-block can be segmented into horizontal BT segments. These two segmentation methods have different segmentation orders, but the final segmented shape is the same.

[0104] Furthermore, when splitting blocks, the block search order can be defined in various ways. Typically, the search is performed from left to right and from top to bottom, and the block search may refer to the order in which the additional block splits of each split sub-block are determined, the encoding order of each sub-block when the block is no longer split, or the search order when sub-blocks reference information about other neighboring blocks.

[0105] Figure 7 This is a diagram used to explain the inter-frame prediction mode as an embodiment of applying this disclosure.

[0106] Inter-frame prediction mode

[0107] In applying the inter-frame prediction modes of this disclosure, a merge mode, an AMVP (Advanced Motion Vector Prediction) mode, or an affine prediction mode (hereinafter referred to as "AF mode") can be used to reduce the amount of motion information.

[0108] 1) Merge Mode

[0109] Merging mode refers to a method of deriving motion parameters (or information) from spatially or temporally adjacent blocks.

[0110] The set of candidates available in the merge mode includes spatially neighboring candidates, temporal candidates, and generated candidates.

[0111] refer to Figure 7 In step (a), each spatial candidate block is determined to be available in the order of {A1, B1, B0, A0, B2}. Here, a candidate block cannot be used if it is encoded in intra-frame prediction mode and therefore has no motion information, or if the candidate block is located outside the current image (or slice).

[0112] After determining the validity of spatial candidates, spatial merging candidates can be configured by excluding unnecessary candidate blocks from the candidate blocks of the current processing block. For example, when a candidate block of the current prediction block is the first prediction block in the same compilation block, that candidate block can be excluded, as can candidate blocks with the same motion information.

[0113] When the spatial merging candidate configuration is completed, the time merging candidate configuration process is executed in the order of {T0, T1}.

[0114] In the time candidate configuration, if the lower right block T0 of the juxtaposed block of the reference image is available, the corresponding block is configured as a time merge candidate. A juxtaposed block refers to a block existing at a position in the selected reference image, corresponding to the currently processed block. If not, the block T1 located at the center of the juxtaposed block is configured as a time merge candidate.

[0115] The maximum number of merge candidates can be specified in the slice header. If the number of merge candidates is greater than the maximum, a smaller number of spatial and temporal candidates are retained. Otherwise, the candidates added so far are combined to generate additional merge candidates (i.e., combined bidirectional predictive merge candidates) until the maximum number of merge candidates is reached.

[0116] The encoder configures the merge candidate list using the method described above and performs motion estimation to send information related to the candidate blocks selected from the merge candidate list as merge indices (e.g., merge_idx[x0][y0]′) to the decoder. Figure 7 The diagram in (b) illustrates the case where block B1 is selected from the merge candidate list. In this case, "index 1" can be sent to the decoder as the merge index signal.

[0117] The decoder is configured with a merge candidate list as in the encoder, and derives motion information about the current block from the motion information of candidate blocks in the merge candidate list corresponding to the merge index received from the encoder. Furthermore, the decoder generates a prediction block about the current processing block based on the derived motion information.

[0118] 2) AMVP (Advanced Motion Vector Prediction) mode

[0119] AMVP mode refers to a method for deriving motion vector prediction values ​​from neighboring blocks. Therefore, the horizontal and vertical motion vector difference (MVD), reference index, and inter-frame prediction mode are signaled to the decoder. The derived motion vector prediction values ​​and the motion vector difference (MVD) provided by the encoder are used to calculate the horizontal and vertical motion vector values.

[0120] That is, the encoder configures a candidate list of motion vector prediction values ​​and performs motion estimation to send a motion reference flag (i.e., candidate block information) selected from the candidate list (e.g., mvp_1X_flag[x0][y0]′) to the decoder via a signal. The decoder configures the candidate list of motion vector prediction values ​​as in the encoder and uses the motion information of the candidate blocks indicated by the motion reference flags received from the encoder in the candidate list to derive the motion vector prediction value of the current processing block. Additionally, the decoder uses the derived motion vector prediction value and the difference between the motion vectors sent from the encoder to obtain the motion vector value of the current processing block. Then, the decoder generates a prediction block (i.e., motion compensation) for the current processing block based on the derived motion information.

[0121] In the AMVP mode, from Figure 7 Two spatial motion candidates are selected from the five available candidates. A first spatial motion candidate is selected from the left set {A0, A1}, and a second spatial motion candidate is selected from the top set {B0, B1, B2}. Here, the motion vector is scaled when the reference index of a neighboring candidate block differs from the reference index of the currently predicted block.

[0122] If two candidates are selected as spatial motion candidate search results, the candidate configuration ends. If the number is less than two, temporal motion candidates are added.

[0123] The decoder (e.g., inter-frame prediction unit) decodes motion parameters about the processing block (e.g., prediction unit).

[0124] For example, when the processing block uses merge mode, the decoder can decode the merge index sent by the encoder via a signal. The decoder can then derive the motion parameters of the current processing block from the motion parameters of the candidate blocks indicated by the merge index.

[0125] Furthermore, when the AMVP mode is applied to a processing block, the decoder can decode the horizontal and vertical motion vector differences (MVD), reference index, and inter-frame prediction modes sent from the encoder. Additionally, the decoder can derive motion vector prediction values ​​from the motion parameters of candidate blocks indicated by the motion reference flag, and use the motion vector prediction values ​​and the received motion vector differences to derive the motion vector values ​​for the current processing block.

[0126] The decoder uses the decoded motion parameters (or information) to perform motion compensation on the prediction unit.

[0127] In other words, the encoder / decoder performs motion compensation to predict the image of the current cell from the previously decoded image using the decoded motion parameters.

[0128] 3) AF mode (affine mode)

[0129] AF mode refers to a motion prediction mode that uses an affine motion model, and may include at least one of affine merging mode and affine inter-frame mode. Affine inter-frame mode may include at least one of AF4 mode and AF6 mode. Here, AF4 mode represents a four-parameter affine prediction mode using four parameters, while AF6 mode represents a six-parameter affine prediction mode using six parameters.

[0130] Although for convenience they are referred to as AF4 mode or AF6 mode in this disclosure, AF4 mode and AF6 mode need not be defined as separate prediction modes and can be distinguished from each other depending on whether four parameters or six parameters are used.

[0131] Reference Figures 8 to 10 Describe the AF mode in detail.

[0132] Figure 8 This is a diagram used to explain the affine motion model applied in this disclosure.

[0133] Typical image compilation techniques use translational motion models to represent the motion of compiled blocks. Here, a translational motion model represents a block prediction method based on translation. That is, it uses a single motion vector to represent the motion information of a compiled block. However, pixels may have different optimal motion vectors in actual compiled blocks. Compilation efficiency can be improved if a small amount of information can be used to determine the optimal motion vector for each pixel or sub-block.

[0134] Therefore, this disclosure proposes an image processing method based on inter-frame prediction that reflects various motions of an image, as well as a prediction method based on translation blocks, in order to improve the performance of inter-frame prediction.

[0135] Furthermore, this disclosure proposes an affine motion prediction method for performing encoding / decoding using an affine motion model. An affine motion model represents a prediction method that derives motion vectors in units of pixels or sub-blocks using control point motion vectors. In the description, the affine motion prediction mode using the affine motion model is referred to as the AF mode (affine mode).

[0136] Furthermore, this disclosure provides a method for adaptively performing affine prediction based on block size.

[0137] Furthermore, this disclosure provides a method for adaptively performing affine prediction based on whether neighboring blocks have been compiled according to affine prediction.

[0138] Furthermore, this disclosure provides a method for adaptively determining (or selecting) the optimal compilation mode based on at least one of AF4 and AF6 modes. Here, AF4 mode represents a four-parameter affine prediction mode using four parameters, while AF6 mode represents a six-parameter affine prediction mode using six parameters.

[0139] refer to Figure 8 Various methods can be used to represent image distortion as motion information, and in particular, affine motion models can represent... Figure 8 The four types of motion are illustrated in the figure.

[0140] For example, affine motion models can model any image distortion, including image translation, image scaling, image rotation, and image shearing.

[0141] Although affine motion models can be represented in various ways, this disclosure proposes a method for displaying (or identifying) distortions at specific reference points (or reference pixels / samples) of a block using motion information and using this information to perform inter-frame prediction. Here, the reference point may be referred to as a control point (CP) (or control pixel or control sample), and the motion vector at the reference point may be referred to as the control point motion vector (CPMV). The degree of distortion that can be represented may depend on the number of control points.

[0142] The affine motion model can be represented using six parameters a, b, c, d, e, and f, as shown in Equation 1 below.

[0143] [Equation 1]

[0144]

[0145] Here, (x, y) represents the position of the top-left pixel of the compiled block. Additionally, v x and v y This represents the motion vector at (x, y).

[0146] Figure 9 This is a diagram used to explain an affine motion prediction method using control point motion vectors as an embodiment of applying this disclosure.

[0147] refer to Figure 9 In (a), the upper left control point CP0902 (hereinafter referred to as the first control point), the upper right control point CP1903 (hereinafter referred to as the second control point), and the lower left control point CP2904 (hereinafter referred to as the third control point) of the current block 901 can have multiple independent motion information. These can be represented as CP0, CP1, and CP2. However, this corresponds to an embodiment of this disclosure, and this disclosure is not limited thereto. For example, control points can be defined in various ways as the lower right control point, the center control point, and other control points for the position of sub-blocks.

[0148] In embodiments of this disclosure, at least one of the first to third control points may be a pixel included in the current block. Alternatively, at least one of the first to third control points may be a pixel not included in the current block but adjacent to the current block.

[0149] Motion information for each pixel or sub-block of the current block 901 can be derived using motion information from one or more of the aforementioned control points.

[0150] For example, an affine motion model can be defined using the motion vectors of the upper left control point 902, upper right control point 903, and lower left control point 904 of the current block 901, as shown in Equation 2 below.

[0151] [Equation 2]

[0152]

[0153] Here, when This represents the motion vector of the upper left control point 902. This represents the motion vector of the upper right control point 903, and When representing the motion vectors of the lower left control point 904, these motion vectors can be defined as follows: as well as Furthermore, in Equation 2, w represents the width of the current block 901, and h represents the height of the current block 901. Additionally, This represents the motion vector at {x, y}.

[0154] This disclosure defines an affine motion model that represents translation, scaling, and rotation among motions that can be represented by an affine motion model. In this specification, it is referred to as a simplified affine motion model or a similar affine motion model.

[0155] A simplified affine motion model can be represented by four parameters a, b, c, and d, as shown in Equation 3 below.

[0156] [Equation 3]

[0157]

[0158] Here, {v x v y Let {x, y} represent the motion vector at {x, y}. An affine motion model using four parameters can be referred to as AF4. This disclosure is not limited thereto; the case using six parameters is referred to as AF6, and the above embodiments can be applied equivalently to it.

[0159] refer to Figure 9 In (b), when This represents the motion vector of the top-left control point 1001 of the current block, and When representing the motion vectors of the upper right control point 1002, these motion vectors can be defined as follows: and Here, the affine motion model of AF4 can be defined as shown in Equation 4 below.

[0160] [Equation 4]

[0161]

[0162] In Equation 4, w represents the width of the current block, and h represents the height of the current block. Additionally, This represents the motion vector at {x, y}.

[0163] The encoder or decoder can determine (or derive) the motion vector for each pixel location using the control point motion vectors (e.g., the motion vectors of the top left control point 1001 and the top right control point 1002).

[0164] In this disclosure, the set of motion vectors determined by affine motion prediction can be defined as an affine motion vector field. The affine motion vector field can be determined using at least one of Equations 1 to 4.

[0165] During encoding / decoding, motion vectors predicted by affine motion can be determined on a pixel-by-pixel or predefined (or preset) block (or sub-block) basis. For example, when determining motion vectors on a pixel-by-pixel basis, motion vectors can be derived based on each pixel in the block, and when determining motion vectors on a sub-block basis, motion vectors can be derived based on each sub-block in the current block. Alternatively, when determining motion vectors on a sub-block basis, the motion vectors of the corresponding sub-block can be derived based on the top-left pixel or the center pixel.

[0166] In the following description, although for ease of description the present disclosure will primarily describe the case in which motion vectors predicted by affine motion are determined in units of 4×4 blocks, the present disclosure is not limited thereto and may be applied in units of pixels or in units of blocks of different sizes.

[0167] At the same time, refer to Figure 9 In (b) of the example, assuming the current block size is 16×16, the encoder or decoder can use the motion vectors of the upper left control point 1001 and upper right control point 1002 of the current block to determine the motion vector in 4×4 sub-block units. Alternatively, the motion vector of a sub-block can be determined based on the center pixel value of the sub-block.

[0168] exist Figure 9 In (b) of the diagram, the arrows pointing at the center of each sub-block represent motion vectors obtained through an affine motion model.

[0169] Affine motion prediction can be used in affine merging mode (hereinafter referred to as "AF merging mode") and affine inter-frame mode (hereinafter referred to as "AF inter-frame mode"). AF merging mode is a method similar to skip mode or merge mode that derives two control point motion vectors without decoding the motion vector difference and then encodes or decodes them. AF inter-frame mode is a method that determines the motion vector predictor and the control point motion vectors, and then encodes or decodes the control point motion vector difference (CPMVD) corresponding to the difference between the motion vector predictor and the control point motion vectors. In this case, two control point motion vector differences are sent in AF4 mode, and three control point motion vector differences are sent in AF6 mode.

[0170] Here, the advantage of AF4 mode is that it can use fewer bits to represent the control point motion vector (CPMV) because AF4 mode sends fewer motion vector differences than AF6 mode. However, the advantage of AF6 mode is that because AF6 mode sends three CPMVDs and can therefore generate a superior predictor, it can reduce the number of bits used for residual compilation.

[0171] Therefore, this disclosure proposes a method that considers both AF4 mode and AF6 mode in AF inter-frame mode.

[0172] Figure 10 This is a flowchart illustrating a process of processing a video signal including the current block using an affine prediction mode (hereinafter referred to as "AF mode") as an embodiment of applying this disclosure.

[0173] This disclosure provides a method for processing a video signal including the current block using AF mode.

[0174] First, the video signal processing device can generate a candidate list of motion vector pairs using pixels or motion vectors of blocks that are adjacent to at least two control points of the current block (S1010). Here, a control point may refer to a corner pixel of the current block, and a motion vector pair may include the motion vectors of the top-left and top-right pixels of the current block.

[0175] In one embodiment, the control point may include at least two of the top-left pixel, top-right pixel, bottom-left pixel, and bottom-right pixel, and the candidate list may include pixels or blocks adjacent to the top-left pixel, top-right pixel, and bottom-left pixel.

[0176] In one embodiment, a candidate list can be generated based on the motion vectors of the diagonal neighbor A, the upper neighbor B, and the left neighbor C of the top-left pixel, the upper neighbor D and the diagonal neighbor E of the top-right pixel, and the left neighbor F and the diagonal neighbor G of the bottom-left pixel.

[0177] In an embodiment, the aforementioned method may further include the following steps: when the number of motion vector pairs included in the candidate list is less than 2, add the AMVP candidate list to the candidate list.

[0178] In an embodiment, when the size of the current block is N4, the control point motion vector of the current block can be determined as a motion vector derived from the center of the left and right sub-blocks in the current block, and when the size of the current block is 4xN, the control point motion vector of the current block can be determined as a motion vector derived from the center of the upper and lower sub-blocks in the current block.

[0179] In an embodiment, when the size of the current block is Nx4, the control point motion vector of the left sub-block in the current block is determined by the average of the first control point motion vector and the third control point motion vector, and the control point motion vector of the right sub-block is determined by the average of the second control point motion vector and the fourth control point motion vector. However, when the size of the current block is 4xN, the control point motion vector of the upper sub-block in the current block is determined by the average of the first control point motion vector and the second control point motion vector, and the control point motion vector of the lower sub-block is determined by the average of the third control point motion vector and the fourth control point motion vector.

[0180] In another embodiment, the aforementioned method may use a signal to send a prediction pattern or flag information indicating whether the AF pattern is executed.

[0181] In this scenario, the video signal processing device can receive prediction mode or flag information, execute the AF mode based on the prediction mode or flag information, and derive motion vectors based on the AF mode. Here, AF mode refers to a mode that derives motion vectors in units of pixels or sub-blocks using the control point motion vectors of the current block.

[0182] Simultaneously, the video signal processing apparatus can determine a final candidate list of a predetermined number of motion vector pairs based on the divergence values ​​of the motion vector pairs (S1020). Here, the final candidate list is determined in ascending order of divergence values, and the divergence value refers to a value indicating the similarity of the directions of the motion vectors.

[0183] The video signal processing device can determine the control point motion vector of the current block based on the rate-distortion cost from the final candidate list (S1030).

[0184] The video signal processing device can generate a motion vector predictor for the current block based on the motion vector of the control point (S1040).

[0185] Figure 11 This is a flowchart illustrating a process of adaptively determining the optimal compilation mode based on at least one of AF4 and AF6 modes as an embodiment (1-1) of applying this disclosure.

[0186] The video signal processing apparatus may perform prediction based on at least one of skip mode, merge mode, and inter-frame mode (S1110). Here, the merge mode may include the aforementioned AF merge mode and normal merge mode, and the inter-frame mode may include the aforementioned AF inter-frame mode and normal inter-frame mode.

[0187] The video signal processing apparatus may perform motion vector prediction based on at least one of AF4 mode and AF6 mode (S1120). Here, steps S1110 and S1120 are not limited to their order.

[0188] The video signal processing device can determine the optimal compilation mode from the above modes by comparing the results of step S1 120 (S1130). Here, the results of step S1120 can be compared based on rate-distortion cost.

[0189] Then, the video signal processing device can generate a motion vector predictor for the current block based on the optimal compilation mode, and obtain the motion vector difference by subtracting the motion vector predictor from the motion vector of the current block.

[0190] After that, it can be applied equally. Figure 1 and Figure 2 The encoding / decoding process described in [the document / document].

[0191] Figure 12 This is a flowchart illustrating the process of adaptively performing decoding based on AF4 mode or AF6 mode as an embodiment (1-2) of applying this disclosure.

[0192] The decoder can receive a bitstream (S1210). The bitstream may include information about the compilation mode of the current block in the video signal.

[0193] The decoder can check whether the compilation mode of the current block is AF mode (S1220). Here, AF mode refers to the affine motion prediction mode using an affine motion model, and may include, for example, at least one of affine merging mode and affine inter-frame mode, and the affine inter-frame mode may include at least one of AF4 mode and AF6 mode.

[0194] Here, step S1220 can be checked using an affine flag that indicates whether the AF mode is executed. For example, the affine flag can be represented by affine_flag. When affine_flag = 1, this indicates that the AF mode is executed for the current block. When affine_flag = 0, this indicates that the AF mode is not executed for the current block.

[0195] When the AF mode is not executed for the current block, the decoder can perform decoding (i.e., motion vector prediction) according to a compilation mode other than the AF mode (S1230). For example, skip mode, merge mode, or inter-frame mode can be used.

[0196] When the AF mode is executed for the current block, the decoder can check whether the AF4 mode is applied to the current block (S1240).

[0197] Here, step S1240 can be checked by an affine parameter flag indicating whether AF4 mode is executed (or whether affine motion prediction is executed using four parameters). For example, the affine parameter flag can be represented by affine_param_flag. When affine_param_flag = 0, this indicates that motion vector prediction is performed according to AF4 mode (S1250). When affine_param_flag = 1, this indicates that motion vector prediction is performed according to AF6 mode (S1260). However, this disclosure is not limited thereto.

[0198] For example, affine parameter flags may include at least one of AF4_flag and AF6_flag.

[0199] AF4_flag indicates whether the AF4 mode is executed for the current block. When AF4_flag = 1, the AF4 mode is executed for the current block; when AF4_flag = 0, the AF4 mode is not executed for the current block. Here, executing the AF4 mode means performing motion vector prediction using an affine motion model represented by four parameters.

[0200] AF6_flag indicates whether the AF6 mode is executed for the current block. When AF6_flag = 1, the AF6 mode for the current block is executed, and when AF6_flag = 0, the AF6 mode for the current block is not executed. Here, executing the AF6 mode means performing motion vector prediction using an affine motion model represented by four parameters.

[0201] Affine flags and affine parameter flags can be defined at at least one level of slice, maximum compilation unit, compilation unit, and prediction unit.

[0202] For example, at least one of AF_flag, AF4_flag, and AF6_flag can be defined at the slice level, and additionally at the block level or prediction unit level.

[0203] Figure 13 The syntax structures shown are embodiments (1-3) of applying this disclosure, wherein decoding is performed based on AF4 mode or AF6 mode.

[0204] The decoder can obtain the merge_flag and check whether the merge mode is applied to the current block (S1310).

[0205] When the merge mode is not applied to the current block, the decoder can obtain affine_flag (S1320). Here, affine_flag indicates whether AF mode is executed.

[0206] When affine_flag = 1, that is, when the AF mode is executed for the current block, the decoder can obtain affine_param_flag (S1330). Here, affine_param_flag indicates whether the AF4 mode is executed (or whether affine motion prediction is executed with four parameters).

[0207] When affine_param_flag = 0, that is, when performing motion vector prediction according to AF4 mode, the decoder can obtain two motion vector differences, mvd_CP0 and mvd_CP1 (S1340). Here, mvd_CP0 indicates the motion vector difference relative to control point 0, while mvd_CP1 indicates the motion vector difference relative to control point 1.

[0208] When affine_param_flag = 1, that is, when performing motion vector prediction according to AF6 mode, the decoder can obtain three motion vector differences (S1350): mvd_CP0, mvd_CP1, and mvd_CP2.

[0209] Figure 14This is a flowchart illustrating the process of adaptively determining the optimal compilation mode from motion vector prediction modes, including AF4 mode or AF6 mode, based on condition A as an embodiment (2-1) of applying this disclosure.

[0210] The encoder can perform prediction based on at least one of skip mode, merge mode and inter-frame mode (S1410).

[0211] The encoder can check whether condition A is met for the current block in order to determine the best compilation mode for motion vector prediction (S1420).

[0212] Here, condition A can refer to a condition concerning the block size. For example, the embodiments in Table 1 below can be applied.

[0213] [Table 1]

[0214] Condition A TH1 value Example 1 pixNum (=width * height) > TH1 TH1=64,128,256,512,1024,... Example 2 Width > TH1 && Height > TH1 TH1 = 4, 8, 16, 32, ... Example 3 Width > TH1 || Height > TH1 TH1 = 4, 8, 16, 32, ...

[0215] In Example 1 of Table 1, condition A indicates whether the number of pixels (pixNum) in the current block is greater than the threshold TH1. Here, the threshold can be 64, 128, 256, 512, 1024, etc. For example, TH1 = 64 indicates a block size of 4x16, 8x8, or 16x4, while TH1 = 128 indicates a block size of 32x4, 16x8, 8x16, or 4x32.

[0216] Example 2 indicates whether the width and height of the current block are both greater than the threshold TH1.

[0217] Example 3 indicates whether the width of the current block is greater than the threshold TH1 or whether the height of the current block is greater than the threshold TH1.

[0218] When condition A is met, the encoder can perform motion vector prediction based on at least one of AF4 mode and AF6 mode (S1430).

[0219] The encoder can determine the optimal compilation mode from motion vector prediction modes, including AF4 mode or AF6 mode, by comparing the results of steps S1410 and S1430 (S1440).

[0220] On the other hand, when condition A is not met, the encoder can determine the best compilation mode from modes other than AF mode (S1440).

[0221] The encoder can then generate a motion vector predictor for the current block based on the optimal compilation mode, and obtain the motion vector difference by subtracting the motion vector predictor from the motion vector of the current block.

[0222] After that, it can be applied equally. Figure 1 and Figure 2The encoding / decoding process described in [the document / document].

[0223] Figure 15 This is a flowchart illustrating the process of adaptively performing decoding based on condition A according to AF4 mode or AF6 mode as an embodiment (2-2) of applying this disclosure.

[0224] The decoder can receive a bitstream (S1510). The bitstream may include information about the compilation mode of the current block in the video signal.

[0225] The decoder can check whether condition A is satisfied for the current block in order to determine the optimal compilation mode for motion vector prediction (S1520). Here, condition A can refer to a condition regarding the block size. For example, the embodiment in Table 1 above can be applied.

[0226] When condition A is met, the decoder can check whether the compilation mode of the current block is AF mode (S1530). Here, AF mode refers to the affine motion prediction mode that uses an affine motion model, and the embodiments described in the specification can be applied.

[0227] Here, step S1530 can be checked using an affine flag indicating whether the AF mode is executed. For example, the affine flag can be represented by affine_flag. When affine_flag = 1, this indicates that the AF mode for the current block is executed. When affine_flag = 0, this indicates that the AF mode for the current block is not executed.

[0228] When condition A is not met or the AF mode for the current block is not executed, the decoder can perform decoding (i.e., motion vector prediction) according to a compilation mode other than the AF mode (S1540). For example, skip mode, merge mode, or inter-frame mode can be used.

[0229] When the AF mode is executed for the current block, the decoder can check whether the AF4 mode is applied to the current block (S1550).

[0230] Here, step S1550 can be checked by an affine parameter flag indicating whether AF4 mode is executed (or whether affine motion prediction is executed using four parameters). For example, the affine parameter flag can be represented by affine_param_flag. When affine_param_flag = 0, this indicates that motion vector prediction is performed according to AF4 mode (S1560). When affine_param_flag = 1, this indicates that motion vector prediction is performed according to AF6 mode (S1570). However, this disclosure is not limited thereto.

[0231] Figure 16The diagram illustrates the syntax structure of an embodiment (2-3) of this disclosure, wherein decoding is performed based on condition A according to AF4 mode or AF6 mode.

[0232] The decoder can obtain the merge_flag and check whether the merge mode is applied to the current block (S1610).

[0233] When the merge mode is not applied to the current block, the decoder can check whether condition A (S1620) is met. Here, condition A can refer to a condition regarding the block size. For example, the embodiment in Table 1 can be applied.

[0234] When condition A is met, the decoder can obtain affine_flag (S1620). Here, affine_flag indicates whether AF mode is executed.

[0235] When affine_flag = 1, that is, when the AF mode for the current block is executed, the decoder can obtain affine_param_flag (S1630). Here, affine_param_flag indicates whether the AF4 mode is executed (or whether four parameters are used to perform affine motion prediction).

[0236] When affine_param_flag = 0, that is, when performing motion vector prediction according to AF4 mode, the decoder can obtain two motion vector differences, mvd_CP0 and mvd_CP1 (S1640). Here, mvd_CP0 indicates the motion vector difference relative to control point 0, while mvd_CP1 indicates the motion vector difference relative to control point 1.

[0237] Additionally, when affine_param_flag = 1, that is, when performing motion vector prediction according to AF6 mode, the decoder can obtain three motion vector differences (S1650): mvd_CP0, mvd_CP1, and mvd_CP2.

[0238] Figure 17 This is a flowchart illustrating, as an embodiment (3-1) of applying this disclosure, the process of adaptively determining the optimal compilation mode from motion vector prediction modes including AF4 mode or AF6 mode.

[0239] This disclosure provides a method for adaptively selecting AF4 and AF6 modes based on the size of the current block.

[0240] For example, compared to AF4 mode, AF6 mode additionally sends one more motion vector difference, and therefore AF6 mode is effective for larger blocks. Therefore, when the current block size is less than (or equal to or less than) a predetermined size, encoding can be performed using only AF4 mode; when the current block size is equal to or greater than (or greater than) a predetermined size, encoding can be performed using only AF6 mode.

[0241] Meanwhile, in the absence of a clearly advantageous domain between AF4 and AF6 modes, both AF4 and AF6 modes are considered, and only the optimal mode between the two can be signaled.

[0242] refer to Figure 17 The encoder can perform prediction based on at least one of skip mode, merge mode and inter-frame mode (S1710).

[0243] The encoder can check whether condition B (S1720) is satisfied for the current block. Here, condition B can refer to a condition regarding the block size. For example, the embodiment in Table 2 below can be applied.

[0244] [Table 2]

[0245] Condition B TH2 value Example 1 pixNum(=width * height)<TH2 TH2=64, 128, 256, 512, 1024,... Example 2 Width < TH2 && Height < TH2 TH2 = 4, 8, 16, 32, ... Example 3 Width < TH2 || Height < TH2 TH2 = 4, 8, 16, 32, ...

[0246] In Example 1 of Table 2, condition B indicates whether the number of pixels (pixNum) in the current block is less than the threshold TH2. Here, the threshold can be 64, 128, 256, 512, 1024, etc. For example, TH2 = 64 can represent a block size of 4x16, 8x8, or 16x4, while TH2 = 128 can represent a block size of 32x4, 16x8, 8x16, or 4x32.

[0247] Example 2 indicates whether the width and height of the current block are both less than the threshold TH2.

[0248] Example 3 indicates whether the width of the current block is less than the threshold TH2 or whether the height of the current block is less than the threshold TH2.

[0249] When condition B is met, the encoder can perform motion vector prediction based on AF4 mode (S1730).

[0250] When condition B is not met, the encoder can check whether condition C is met for the current block (S1740). Here, condition C can refer to a condition regarding the block size. For example, the embodiments in Table 3 below can be applied.

[0251] [Table 3]

[0252] Condition C TH3 value Example 1 pixNum(=width * height)≥TH3 TH3=64,128,256,512,1024,... Example 2 Width ≥ TH3 && Height ≥ TH3 TH3 = 4, 8, 16, 32, ... Example 3 Width ≥ TH3 || Height ≥ TH3 TH3 = 4, 8, 16, 32, ...

[0253] In Example 1 of Table 3, condition A indicates whether the number of pixels (pixNum) in the current block is equal to or greater than the threshold TH3. Here, the threshold can be 64, 128, 256, 512, 1024, etc. For example, TH3 = 64 can indicate that the block size is 4x16, 8x8, or 16x4, while TH3 = 128 can indicate that the block size is 32x4, 16x8, 8x16, or 4x32.

[0254] Example 2 indicates whether the width and height of the current block are both equal to or greater than the threshold TH3.

[0255] Example 3 indicates whether the width of the current block is equal to or greater than the threshold TH1, or whether the height of the current block is equal to or greater than the threshold TH1.

[0256] When condition C is met, the encoder can perform motion vector prediction based on AF6 mode (S1760).

[0257] When condition C is not met, the encoder can perform motion vector prediction based on AF4 mode and AF6 mode (S1750).

[0258] Meanwhile, in conditions B and C, thresholds TH2 and TH3 can be determined to satisfy the following equation 5.

[0259] [Equation 5]

[0260] TH_2≤TH_3

[0261] The encoder can determine the optimal compilation mode from motion vector prediction modes, including AF4 mode or AF6 mode, by comparing the results of steps S1710, S1730, S1750 and S1760 (S1770).

[0262] The encoder can then generate a motion vector predictor for the current block based on the optimal compilation mode, and obtain the motion vector difference by subtracting the motion vector predictor from the motion vector of the current block.

[0263] After that, it can be applied equally. Figure 1 and Figure 2 The encoding / decoding process described in [the document / document].

[0264] Figure 18 This is a flowchart illustrating the process of adaptively performing decoding based on at least one of conditions B and C according to AF4 mode or AF6 mode as an embodiment (3-2) of applying this disclosure.

[0265] The decoder can check whether the compilation mode of the current block is AF mode (S1810). Here, AF mode refers to the affine motion prediction mode using an affine motion model, which can apply the embodiments described in the specification, and redundant descriptions are omitted.

[0266] When the AF mode is executed for the current block, the decoder can check whether condition B (S1820) is satisfied for the current block. Here, condition B can refer to a condition regarding the block size. For example, the embodiment in Table 2 can be applied, and redundant descriptions are omitted.

[0267] When condition B is met, the decoder can perform motion vector prediction based on AF4 mode (S1830).

[0268] When condition B is not met, the decoder can check whether condition C is met for the current block (S1840). Here, condition C can refer to a condition regarding the block size. For example, the embodiment in Table 3 can be applied, and redundant descriptions are omitted.

[0269] Meanwhile, in conditions B and C, thresholds TH2 and TH3 can be determined such that they satisfy equation 5.

[0270] When condition C is met, the decoder can perform motion vector prediction based on AF6 mode (S1860).

[0271] When condition C is not met, the decoder can check whether the AF4 mode is applied to the current block (S1850).

[0272] Here, step S1850 can be checked by the affine parameter flag, which indicates whether the AF4 mode is executed (or whether affine motion prediction is executed using four parameters).

[0273] For example, the affine parameter flag can be represented by affine_param_flag. When affine_param_flag = 0, this can indicate that motion vector prediction is performed according to the AF4 mode (S1830). When affine_param_flag = 1, this can indicate that motion vector prediction is performed according to the AF6 mode (S1860). However, this disclosure is not limited thereto.

[0274] Meanwhile, when the AF mode for the current block is not executed, the decoder can perform decoding (i.e., motion vector prediction) according to a compilation mode other than the AF mode (S1870). For example, skip mode, merge mode, or inter-frame mode can be used.

[0275] Figure 19The diagram illustrates a syntax structure for applying an embodiment (3-3) of this disclosure, in which decoding is performed based on at least one of condition B and condition C, according to either AF4 or AF6 mode.

[0276] The decoder can obtain the merge_flag and check whether the merge mode is applied to the current block (S1910).

[0277] When the merge mode is not applied to the current block, the decoder can obtain affine_flag (S1920). Here, affine_flag indicates whether AF mode is executed.

[0278] When affine_flag = 1, that is, when the AF mode for the current block is executed, the decoder can check whether condition B (S1920) is satisfied. Here, condition B can refer to a condition regarding the block size. For example, the embodiment in Table 2 can be applied.

[0279] When condition B is met, the decoder can set affine_param_flag to 0 (S1930). Here, affine_param_flag indicates whether AF4 mode is executed (or whether affine motion prediction is executed using four parameters). affine_param_flag = 0 indicates that motion vector prediction is performed according to AF4 mode.

[0280] When condition B is not met but condition C is met, the decoder can set affine_param_flag to 1 (S1940). Here, affine_param_flag = 1 indicates that motion vector prediction is performed according to AF6 mode.

[0281] When neither condition B nor condition C is met, the decoder can obtain affine_param_flag (S1950).

[0282] When affine_param_flag = 0, the decoder can obtain the difference between two motion vectors, mvd_CP0 and mvd_CP1 (S1960).

[0283] When affine_param_flag = 1, the decoder can obtain three motion vector differences: mvd_CP0, mvd_CP1, and mvd_CP2 (S1970).

[0284] Figure 20 This is a flowchart illustrating the process of adaptively determining the optimal compilation mode from motion vector prediction modes, including AF4 mode or AF6 mode, using a neighbor-block-based compilation mode as an example of applying the present disclosure (4-1).

[0285] The encoder can perform prediction based on at least one of skip mode, merge mode and inter-frame mode (S2010).

[0286] The encoder can check whether neighboring blocks have been compiled in AF mode (S2020). Here, `isNeighborAffine()` can be used to indicate whether a neighboring block has been compiled in AF mode. For example, when `isNeighborAffine() = 0`, this indicates that the neighboring block has not been compiled in AF mode. When `isNeighborAffine() = 1`, this indicates that the neighboring block has been compiled in AF mode.

[0287] When neighboring blocks are not compiled in AF mode, the encoder can perform motion vector prediction based on AF4 mode (S2030).

[0288] When neighboring blocks have been compiled in AF mode, the encoder can perform motion vector prediction based on AF4 mode, and can also perform motion vector prediction based on AF6 mode (S2040).

[0289] The encoder can determine the optimal compilation mode from motion vector prediction modes, including AF4 mode or AF6 mode, by comparing the results of steps S2030 and S2040 (S2050).

[0290] The encoder can then generate a motion vector predictor for the current block based on the optimal compilation mode, and obtain the motion vector difference by subtracting the motion vector predictor from the motion vector of the current block.

[0291] Subsequently, it can be applied equally to Figure 1 and Figure 2 The encoding / decoding process described in [the document / document].

[0292] Figure 21 This is a flowchart illustrating the process of adaptively performing decoding according to AF4 mode or AF6 mode in a neighbor-block-based compilation mode as an embodiment (4-2) of applying this disclosure.

[0293] The decoder can receive a bitstream (S2110). The bitstream may include information about the compilation mode of the current block in the video signal.

[0294] The decoder can check whether the compilation mode of the current block is AF mode (S2120).

[0295] When the AF mode for the current block is not executed, the decoder can perform decoding (i.e., motion vector prediction) according to a compilation mode other than the AF mode (S2170). For example, skip mode, merge mode, or inter-frame mode can be used.

[0296] When the current block is executed in AF mode, the decoder can check whether neighboring blocks have already been compiled in AF mode (S2130). Here, isNeighborAffine() can be used to indicate whether a neighboring block has been compiled in AF mode. For example, when isNeighborAffine() = 0, this indicates that the neighboring block has not been compiled. When isNeighborAffine() = 1, this indicates that the neighboring block has been compiled in AF mode.

[0297] When neighboring blocks have been compiled in AF mode, the decoder can perform motion vector prediction based on AF4 mode (S2140).

[0298] When a neighboring block is not compiled in AF mode, the decoder can check whether AF4 mode is applied to the current block (S2150).

[0299] Here, step S2150 can be checked by the affine parameter flag, which indicates whether the AF4 mode is executed (or whether affine motion prediction is executed using four parameters). For example, the affine parameter flag can be represented by affine_param_flag. When affine_param_flag = 0, motion vector prediction is executed according to the AF4 mode (S2140). When affine_param_flag = 1, motion vector prediction is executed according to the AF6 mode (S2160).

[0300] Figure 22 The diagram illustrates the syntax structure of an embodiment (4-3) of the present disclosure, wherein the neighbor-based compilation mode performs decoding according to AF4 mode or AF6 mode.

[0301] The decoder can obtain the merge_flag and check whether the merge mode is applied to the current block (S2210).

[0302] When the merge mode is not applied to the current block, the decoder can obtain affine_flag (S2220). Here, affine_flag indicates whether AF mode is executed.

[0303] When affine_flag = 1, that is, when the current block is executed in AF mode, the decoder can check whether the neighboring blocks have been compiled in AF mode (S2230).

[0304] When a neighboring block has been compiled in AF mode, the decoder can obtain affine_param_flag (S2230). Here, affine_param_flag indicates whether AF4 mode has been executed (or whether affine motion prediction has been executed with four parameters).

[0305] When a neighboring block is not compiled in AF mode, the decoder can set affine_param_flag to 0 (S2240).

[0306] When affine_param_flag = 0, that is, when performing motion vector prediction according to AF4 mode, the decoder can obtain two motion vector differences (S2250) mvd_CP0 and mvd_CP1.

[0307] When affine_param_flag = 1, that is, when performing motion vector prediction according to AF6 mode, the decoder can obtain three motion vector differences (S2260): mvd_CP0, mvd_CP1, and mvd_CP2.

[0308] Figure 23 This is a flowchart illustrating a process for adaptively determining the optimal compilation mode from motion vector prediction modes, including AF4 mode or AF6 mode, based on at least one of conditions A, B, and C, as an embodiment (5-1) of applying this disclosure.

[0309] This disclosure provides embodiments combining the second and third embodiments. Figure 23 The diagram illustrates an example where all conditions A, B, and C can be considered and the conditions can be applied in different orders.

[0310] refer to Figure 23 The encoder can perform prediction based on at least one of skip mode, merge mode and inter-frame mode (S2310).

[0311] The encoder can check whether condition A (S2320) is satisfied for the current block. Here, condition A can be a condition about the block size, and the embodiment in Table 1 above can be applied here.

[0312] When condition A is met, the encoder can determine the optimal compilation mode from modes other than AF mode (S2330).

[0313] On the other hand, when condition A is not met, the encoder can check whether condition B is met for the current block (S2330). Here, condition B can refer to a condition regarding the block size, and the embodiment in Table 2 above can be applied here.

[0314] When condition B is met, the encoder can perform motion vector prediction based on AF4 mode (S2340).

[0315] When condition B is not met, the encoder can check whether condition C is met for the current block (S2350). Here, condition C can refer to a condition regarding the block size, and the embodiments in Table 3 can be applied here.

[0316] When condition C is met, the encoder can perform motion vector prediction based on AF6 mode (S2370).

[0317] When condition C is not met, the encoder can perform motion vector prediction based on AF4 mode and can also perform motion vector prediction based on AF6 mode (S2360).

[0318] Meanwhile, in conditions B and C, thresholds TH2 and TH3 can be determined such that they satisfy equation 5.

[0319] The encoder can determine the optimal compilation mode (2380) by comparing the results of steps S2310, S2340, S2360 and S2370.

[0320] The encoder can then generate a motion vector predictor for the current block based on the optimal compilation mode, and obtain the motion vector difference by subtracting the motion vector predictor from the motion vector of the current block.

[0321] Subsequently, it can be applied equally to Figures 1 to 2 The encoding / decoding process described in [the document / document].

[0322] Figure 24 This is a flowchart illustrating the process of adaptively performing decoding based on at least one of conditions A, B, and C according to AF4 mode or AF6 mode as an embodiment (5-2) of applying this disclosure.

[0323] The decoder can check whether condition A (S2410) is satisfied for the current block. Here, condition A can refer to a condition regarding the block size. For example, the embodiments in Table 1 above can be applied thereto.

[0324] When condition A is met, the decoder can check whether the compilation mode of the current block is AF mode (S2420). Here, AF mode refers to the affine motion prediction mode using an affine motion model, and the embodiments described in the specification can be applied, with redundant descriptions omitted.

[0325] When condition A is not met or the AF mode for the current block is not executed, the decoder can perform decoding (i.e., motion vector prediction) according to a compilation mode other than the AF mode (S2480). For example, skip mode, merge mode, or inter-frame mode can be used.

[0326] When the AF mode is executed for the current block, the decoder checks whether condition B (S2430) is satisfied for the current block. Here, condition B may refer to a condition regarding the block size. For example, the embodiments in Table 2 can be applied thereto, and redundant descriptions are omitted.

[0327] When condition B is met, the decoder can perform motion vector prediction based on AF4 mode (S2440).

[0328] When condition B is not met, the decoder can check whether condition C is met for the current block (S2450). Here, condition C can refer to a condition regarding the block size. For example, the embodiments in Table 3 can be applied thereto, and redundant descriptions are omitted.

[0329] Meanwhile, in conditions B and C, thresholds TH2 and TH3 can be determined such that they satisfy equation 5.

[0330] When condition C is met, the decoder can perform motion vector prediction based on AF6 mode (S2470).

[0331] When condition C is not met, the decoder can check whether the AF4 mode is applied to the current block (S2460).

[0332] Here, step S2460 can be checked by the affine parameter flag, which indicates whether the AF4 mode is executed (or whether affine motion prediction is executed using four parameters).

[0333] For example, the affine parameter flag can be represented by affine_param_flag. When affine_param_flag = 0, this can indicate that motion vector prediction is performed according to the AF4 mode (S2440). When affine_param_flag = 1, this can indicate that motion vector prediction is performed according to the AF6 mode (S2470). However, this disclosure is not limited thereto.

[0334] Figure 25 The diagram illustrates the syntax structure of an embodiment (5-3) of the present disclosure, wherein decoding is performed based on at least one of condition A, condition B, and condition C, according to AF4 mode or AF6 mode.

[0335] The decoder can obtain the merge_flag and check whether the merge mode is applied to the current block (S2510).

[0336] When the merge mode is not applied to the current block, the decoder can check whether condition A (S2520) is met. Here, condition A can refer to a condition regarding the block size. For example, the embodiments in Table 1 above can be applied thereto.

[0337] When condition A is met, the decoder can obtain affine_flag (S2520). Here, affine_flag indicates whether AF mode is executed.

[0338] When affine_flag = 1, that is, when the AF mode for the current block is executed, the decoder can check whether condition B (S2530) is satisfied. Here, condition B can refer to a condition regarding the block size. For example, the embodiment in Table 2 can be applied thereto.

[0339] When condition B is met, the decoder can set affine_param_flag to 0 (S2540). Here, affine_param_flag indicates whether AF4 mode is executed (or whether affine motion prediction is executed using four parameters). affine_param_flag = 0 indicates that motion vector prediction is performed according to AF4 mode.

[0340] When condition B is not met but condition C is met, the decoder can set affine_param_flag to 1 (S2550). Here, affine_param_flag = 1 indicates that motion vector prediction is performed according to AF6 mode.

[0341] When neither condition B nor condition C is met, the decoder can obtain affine_param_flag (S2560).

[0342] When affine_param_flag = 0, the decoder can obtain the difference between two motion vectors, mvd_CP0 and mvd_CP1 (S2570).

[0343] When affine_param_flag = 1, the decoder can obtain three motion vector differences (S2580): mvd_CP0, mvd_CP1, and mvd_CP2.

[0344] Figure 26 This is a flowchart illustrating the process of adaptively determining the optimal compilation mode from motion vector prediction modes, including AF4 mode or AF6 mode, from at least one of the compilation modes based on condition A and neighboring blocks as an embodiment (6-1) of applying this disclosure.

[0345] The encoder can perform prediction based on at least one of skip mode, merge mode and inter-frame mode (S2610).

[0346] The encoder can check whether condition A (S2620) is satisfied for the current block. Here, condition A can refer to a condition regarding the block size, and the embodiments in Table 1 above can be applied to it.

[0347] When condition A is met, the encoder can determine the optimal compilation mode from modes other than AF mode (S2660).

[0348] On the other hand, when condition A is not met, the encoder can check whether the neighboring block has already been compiled in AF mode (S2630). Here, isNeighborAffine() can be used to indicate whether the neighboring block has been compiled in AF mode. For example, when isNeighborAffine() = 0, this indicates that the neighboring block has not been compiled in AF mode. When isNeighborAffine() = 1, this indicates that the neighboring block has been compiled in AF mode.

[0349] When neighboring blocks are not compiled in AF mode, the encoder can perform motion vector prediction based on AF4 mode (S2640).

[0350] When neighboring blocks have already been compiled in AF mode, the encoder can perform motion vector prediction based on AF4 mode, and can also perform motion vector prediction based on AF6 mode (S2650).

[0351] The encoder can determine the optimal compilation mode (S2660) by comparing the results of steps S2610, S2640 and S2650.

[0352] The encoder can then generate a motion vector predictor for the current block based on the optimal compilation mode, and obtain the motion vector difference by subtracting the motion vector predictor from the motion vector of the current block.

[0353] Subsequently, it can be applied equally to Figure 1 and Figure 2 The encoding / decoding process described in [the document / document].

[0354] Figure 27 This is a flowchart illustrating a process in which at least one of the compilation modes based on condition A and neighboring blocks, as an embodiment (6-2) of the present disclosure, adaptively performs decoding according to either AF4 mode or AF6 mode.

[0355] The decoder can receive a bitstream (S2710). The bitstream can include information about the compilation mode of the current block in the video signal.

[0356] The decoder can check whether condition A is satisfied for the current block in order to determine the optimal compilation mode for motion vector prediction (S2720). Here, condition A can refer to a condition regarding the block size. For example, the embodiments in Table 1 above can be applied thereto.

[0357] When condition A is met, the decoder can check whether the compilation mode of the current block is AF mode (S2730).

[0358] exist Figure 21 The details described in S2120 to S2170 can be applied to the following steps S2730 to S2780, and redundant descriptions are omitted.

[0359] Figure 28 The diagram illustrates a syntax structure for applying an embodiment (6-3) of this disclosure, wherein decoding is performed according to either AF4 or AF6 modes based on at least one of the compilation modes based on condition A and neighboring blocks.

[0360] The decoder can obtain the merge_flag and check whether the merge mode is applied to the current block (S2810).

[0361] When the merge mode is not applied to the current block, the decoder can check whether condition A (S2820) is met. Here, condition A can refer to a condition regarding the block size. For example, the embodiments in Table 1 above can be applied thereto.

[0362] When condition A is met, the decoder can obtain affine_flag (S2820). Here, affine_flag indicates whether AF mode is executed.

[0363] exist Figure 22 The details described in S2230 to S2260 can be applied to the following steps S2830 to S2860, and redundant descriptions are omitted.

[0364] Figure 29 This is a flowchart illustrating a process for generating a motion vector predictor based on at least one of AF4 and AF6 modes as an embodiment of the present disclosure.

[0365] The decoder can check whether the AF mode is applied to the current block (S2910). Here, the AF mode represents the motion prediction mode using an affine motion model.

[0366] For example, the decoder can obtain the affine flag from the video signal and check whether the AF mode is applied to the current block based on the affine flag.

[0367] When the AF mode is applied to the current block, the decoder can check whether the AF4 mode is used (S2920). Here, the AF4 mode refers to the mode in which the four parameters that make up the affine motion model are used to predict the motion vector.

[0368] For example, when the affine flag indicates that the AF mode is applied to the current block, the decoder can obtain the affine parameter flag from the video signal, and the affine parameter flag indicates whether the motion vector predictor is generated using four parameters or six parameters.

[0369] Here, affine flags and affine parameter flags can be defined at at least one level among slice, maximum compilation unit, compilation unit, and prediction unit.

[0370] When using AF4 mode, the decoder can use four parameters to generate a motion vector predictor, while when not using AF4 mode, the decoder can use six parameters that make up the affine motion model to generate a motion vector predictor (S2930).

[0371] The decoder can obtain the motion vector of the current block based on the motion vector predictor (S2940).

[0372] In one embodiment, the decoder can check whether the size of the current block meets a predetermined condition. Here, the predetermined condition indicates whether at least one of the number of pixels in the current block, the width of the current block, and / or the height of the current block is greater than a predetermined threshold.

[0373] For example, when the size of the current block meets a predetermined condition, the decoder can check whether the AF mode is applied to the current block.

[0374] On the other hand, when the size of the current block does not meet the predetermined conditions, the current block can be decoded based on a compilation mode other than AF mode.

[0375] In one embodiment, when the AF mode is applied to the current block, the decoder can check whether the AF mode has been applied to neighboring blocks.

[0376] When the AF mode has been applied to a neighboring block, four parameters are used to generate the motion vector predictor, and when the AF mode has not been applied to a neighboring block, the decoder can perform a step to check whether the AF4 mode has been used.

[0377] Figure 30 This is a flowchart illustrating the process of generating a motion vector predictor based on AF4_f1ag and AF6_flag as an embodiment of applying this disclosure.

[0378] The decoder can obtain at least one of the AF4 flag and the AF6 flag from the video signal (S3010). Here, AF4_flag indicates whether AF4 mode is executed for the current block, and AF6_flag indicates whether AF6 mode is executed for the current block.

[0379] Here, at least one of AF4_flag and AF6_flag can be defined at the slice level, and additionally at the block level or the prediction unit level. However, this disclosure is not limited thereto, and at least one of AF4_flag and AF6_flag can be defined at at least one of the slice, maximum compilation unit, compilation unit, and prediction unit levels.

[0380] The decoder can check the values ​​of AF4_flag and AF6_flag (S3020).

[0381] When AF4_flag = 1, the AF4 mode is executed for the current block; when AF4_flag = 0, the AF4 mode is not executed for the current block. Here, executing the AF4 mode means using an affine motion model represented by four parameters to perform motion vector prediction.

[0382] When AF6_flag = 1, the AF6 mode for the current block is executed; when AF6_flag = 0, the AF6 mode for the current block is not executed. Here, executing the AF6 mode means performing motion vector prediction using an affine motion model represented by four parameters.

[0383] When AF4_flag=0 and AF6_flag=0, the decoder can perform motion vector prediction based on modes other than AF4 and AF6 (S3030).

[0384] When AF4_flag=1 and AF6_flag=0, the decoder can perform motion vector prediction according to the AF4 mode (S3040).

[0385] When AF4_flag=0 and AF6_flag=0, the decoder can perform motion vector prediction according to the AF6 mode (S3050).

[0386] When AF4_flag=1 and AF6_flag=1, the decoder can perform motion vector prediction based on either AF4 mode or AF6 mode (S3060).

[0387] Figure 31 This is a flowchart illustrating a process of adaptively performing decoding based on AF4 or AF6 mode, as an embodiment of applying this disclosure, based on whether the neighboring block has been compiled in AF mode.

[0388] The decoder can check whether the AF mode is applied to the current block (S3110).

[0389] When AF mode is applied to the current block, the decoder can check whether neighboring blocks have been compiled in AF mode (S3120).

[0390] When a neighboring block is compiled in AF mode, the decoder can obtain at least one of AF4_flag and AF6_flag (S3130).

[0391] The decoder can generate a motion vector predictor using four or six parameters based on at least one of AF4_flag and AF6_flag (S3140). For example, when AF4_flag = 1, the decoder can perform motion vector prediction according to the AF4 mode, and when AF6_flag = 1, it can perform motion vector prediction according to the AF6 mode.

[0392] The decoder can obtain the motion vector of the current block based on the motion vector predictor (S3150).

[0393] Figure 32 The diagram illustrates the syntax of an embodiment applying this disclosure, wherein decoding is performed adaptively based on AF4_flag and AF6_flag.

[0394] The decoder can obtain AF4_flag and AF6_flag at the slice level (S3010). Here, AF4_flag indicates whether AF4 mode is executed for the current block, and AF6_flag indicates whether AF6 mode is executed for the current block. AF4_flag can be represented by affine_4_flag, and AF6_flag can be represented by affine_6_flag.

[0395] The decoder can adaptively perform decoding based on AF4_flag and AF6_flag at the block level or prediction unit level.

[0396] The decoder can obtain the affine flag (S3220) when either affine_4_flag or affine_6_flag is not 0 (that is, in cases other than affine_4_flag = 0 && affine_6_flag = 0). The affine flag can indicate whether AF mode is executed.

[0397] When AF mode is executed, the decoder can adaptively perform decoding based on the values ​​of AF4_flag and AF6_flag.

[0398] When affine_4_flag = 1 and affine_6_flag = 0, the decoder can set affine_param_flag to 0. That is, affine_param_flag = 0 indicates that AF4 mode is executed.

[0399] When affine_4_flag = 0 and affine_6_flag = 1, the decoder can set affine_param_flag to 1. That is, affine_param_flag = 1 indicates that AF6 mode is executed.

[0400] When affine_4_flag = 1 and affine_6_flag = 1, the decoder can parse or obtain affine_param_flag. Here, the decoder can perform decoding at the block level or prediction unit level in either AF4 or AF6 mode based on the value of affine_param_flag.

[0401] The above embodiments can be applied to other syntactic structures, and redundant descriptions are omitted.

[0402] Figure 33 The diagram illustrates the syntax of an embodiment of the present disclosure, wherein decoding is adaptively performed according to AF4 mode or AF6 mode based on whether neighboring blocks have been compiled in AF mode.

[0403] In this embodiment, the above description can be applied to Figures 32 to 33 The redundant parts are described, and only the different parts are described.

[0404] When affine_4_flag = 1 && affine_6_flag = 1, the decoder can check whether neighboring blocks have been compiled in AF mode.

[0405] When a neighboring block has already been compiled in AF mode, the decoder can parse or obtain affine_param_flag (S3310). Here, the decoder can perform decoding in AF4 or AF6 mode based on the value of affine_param_flag at the block level or prediction unit level.

[0406] On the other hand, when neighboring blocks are not compiled in AF mode, the decoder can set affine_param_flag to 0. That is, affine_param_flag = 0 indicates that AF4 mode is executed.

[0407] Figure 34 The illustration shows the video compilation system disclosed herein.

[0408] A video compilation system may include a source device and a receiving device. The source device can transmit encoded video / image information or data in file or stream format to the receiving device via digital storage media or a network.

[0409] The source device may include a video source, an encoding device, and a transmitter. The receiving device may include a receiver, a decoding device, and a renderer. The encoding device may be referred to as a video / image encoding device, and the decoding device may be referred to as a video / image decoding device. The transmitter may be included in the encoding device. The receiver may be included in the decoding device. The renderer may include a display, and the display may be configured as a separate device or an external component.

[0410] Video sources can be obtained through video / image capture, combination, generation, etc. Video sources may include video / image capture devices and / or video / image generation devices. For example, a video / image capture device may include one or more cameras, a video / image archive containing previously captured video / images, etc. A video / image generation device may include, for example, a computer, tablet, smartphone, etc., and generates video / images (electronically). For example, virtual video / images can be generated by a computer, etc., and in this case, the process of generating the relevant data can be replaced by the video / image capture process.

[0411] Encoding devices can encode video / images. They can perform a series of processes, such as prediction, transformation, and quantization for compression and compilation efficiency. The encoded data (encoded video / image information) can be output as a bitstream.

[0412] A transmitter can send encoded video / image information or data, output as a bitstream, to a receiver in a receiving device via a digital storage medium or network, either in file or stream format. The digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, and SSD. The transmitter can include elements for generating media files in a predetermined file format and elements for transmission over a broadcast / communication network. The receiver can extract the bitstream and send it to a decoding device.

[0413] Decoding devices can decode video / images by performing a series of processes such as inverse quantization, inverse transform, and prediction, which correspond to the operations of encoding devices.

[0414] The renderer can render decoded video / images. The rendered video / images can be displayed on a monitor.

[0415] Figure 35 The diagram illustrates the application of the content streaming system disclosed herein.

[0416] refer to Figure 35 The content streaming system that uses this disclosure may include an encoding server, a streaming server, a web server, a media storage device, a user device, and a multimedia input device.

[0417] An encoding server is used to compress content input from multimedia input devices such as smartphones, cameras, and camcorders into digital content to generate a bitstream, which is then sent to a streaming server. As another example, when multimedia input devices such as smartphones, cameras, and camcorders generate bitstreams directly, the encoding server can be omitted.

[0418] Bitstreams can be generated by applying the encoding method or bitstream generation method disclosed herein, and the stream server can temporarily store bitstreams during the sending or receiving of bitstreams.

[0419] A streaming server acts as a medium for sending multimedia data to a user's device based on a user request, via a web server, and also serves as a medium for notifying the user of available services. When a user requests a desired service from a web server, the web server sends the request to the streaming server, and the streaming server sends the multimedia data to the user. Here, the content streaming system may include an additional control server. In this case, the control server acts as a command / response controller between devices within the content streaming system.

[0420] A streaming server can receive content from media storage and / or encoding servers. For example, when content is received from an encoding server, the streaming server can receive the content in real time. In this case, the streaming server can store the bitstream for a predetermined period of time to provide a smooth streaming service.

[0421] Examples of user equipment may include cellular phones, smartphones, laptops, digital broadcast terminals, PDAs (personal digital assistants), PMPs (portable multimedia players), navigation systems, board PCs, tablet PCs, ultrabooks, wearable devices (e.g., smartwatches, smart glasses, and HMDs (head-mounted displays)), digital TVs, desktop computers, digital signage, etc.

[0422] In a content streaming system, the server can operate as a distributed server. In this case, the data received by the server can be processed in a distributed manner.

[0423] As described above, the embodiments described in this disclosure can be implemented and executed on a processor, microprocessor, controller, or chip. For example, Figure 1 , Figure 2 , Figure 34 as well as Figure 35 The functional units shown can be implemented and executed on a computer, processor, microprocessor, controller, or chip.

[0424] Furthermore, the decoders and encoders using this disclosure can be included in multimedia broadcasting transmission / reception devices, mobile communication terminals, home theater video devices, digital cinema video devices, surveillance cameras, video chat devices, real-time communication devices such as video communication, mobile streaming devices, storage media, portable cameras, VoD service providers, Internet streaming service providers, three-dimensional (3D) video devices, teleconferencing video devices, and medical video devices, and can be used to process video signals and data signals.

[0425] Furthermore, the decoding / encoding methods of this disclosure can be generated in the form of a program to be executed by a computer, and can be stored in a computer-readable recording medium. Multimedia data having a data structure according to this disclosure can also be stored in a computer-readable recording medium. Computer-readable recording media include all types of storage devices that store data readable by a computer system. For example, computer-readable recording media can include BD, USB, ROM, RAM, CD-ROM, magnetic tape, floppy disk, and optical data storage devices. Furthermore, computer-readable recording media include media implemented in the form of a carrier wave, for example, transmission via the Internet. Additionally, bitstreams generated by the encoding methods can be stored in computer-readable recording media or transmitted via wired / wireless communication networks.

[0426] [Industrial Applicability]

[0427] Exemplary embodiments of this disclosure have been disclosed for illustrative purposes, and those skilled in the art can improve, modify, replace or add various other embodiments within the technical spirit and scope of this disclosure as disclosed in the appended claims.

Claims

1. A method for decoding a video signal including a current block based on an affine motion prediction pattern, the method comprising: A merge flag is obtained from the video signal, wherein the merge flag indicates whether motion parameters are inferred from adjacent blocks; The width and height of the current block are checked to see if they are equal to or greater than predetermined values ​​based on the fact that motion parameters were not inferred from the adjacent blocks. Based on the fact that the width and height of the current block are equal to or greater than the predetermined value, an affine flag is obtained from the video signal, wherein the affine flag indicates whether an AF mode is applied to the current block, and the AF mode indicates a motion prediction mode using an affine motion model; Based on the AF mode applied to the current block, an affine parameter flag is obtained, indicating whether 4 or 6 parameters are used in the affine motion model. A motion vector predictor is obtained based on 4 or 6 parameters used in the affine motion model; and Based on the motion vector predictor, prediction samples are obtained for the current block. The affine parameter flag is obtained based on the fact that the width and height of the current block are equal to the predetermined value; The width and height of the current block are not equal.

2. The method according to claim 1, wherein, The affine flag and the affine parameter flag are defined at the CU level.

3. The method according to claim 1, wherein, The current block is decoded based on an encoding mode other than the AF mode, since the width and height of the current block are less than the predetermined values.

4. A method for encoding a video signal including a current block based on an affine motion prediction pattern, the method comprising: Generate a merging flag indicating whether motion parameters were inferred from adjacent blocks; The width and height of the current block are checked to see if they are equal to or greater than predetermined values ​​based on the fact that motion parameters were not inferred from the adjacent blocks. Based on the width and height of the current block being equal to or greater than the predetermined value, an affine flag is generated from the video signal, wherein the affine flag indicates whether an AF mode is applied to the current block, and the AF mode indicates a motion prediction mode using an affine motion model; Based on the AF mode applied to the current block, an affine parameter flag is generated, indicating whether 4 or 6 parameters are used in the affine motion model. A motion vector predictor is obtained based on 4 or 6 parameters used in the affine motion model; and Based on the motion vector predictor, prediction samples are generated for the current block. The affine parameter flag is generated based on the fact that the width and height of the current block are equal to the predetermined value; The width and height of the current block are not equal.

5. The method according to claim 1, wherein, The affine flag and the affine parameter flag are defined at the CU level.

6. The method according to claim 1, wherein, The current block is encoded based on an encoding mode other than the AF mode, since the width and height of the current block are less than the predetermined values.

7. An apparatus for decoding a video signal including a current block based on an affine motion prediction pattern, the apparatus comprising an inter-frame prediction unit configured to: A merge flag is obtained from the video signal, wherein the merge flag indicates whether motion parameters are inferred from adjacent blocks; The width and height of the current block are checked to see if they are equal to or greater than predetermined values ​​based on the fact that motion parameters were not inferred from the adjacent blocks. Based on the fact that the width and height of the current block are equal to or greater than the predetermined value, an affine symbol is obtained from the video signal, wherein, The affine flag indicates whether the AF mode is applied to the current block, and the AF mode indicates a motion prediction mode using an affine motion model; Based on the AF mode applied to the current block, an affine parameter flag is obtained, indicating whether 4 or 6 parameters are used in the affine motion model. A motion vector predictor is obtained based on 4 or 6 parameters used in the affine motion model; and Based on the motion vector predictor, prediction samples are obtained for the current block. The affine parameter flag is obtained based on the fact that the width and height of the current block are equal to the predetermined value; The width and height of the current block are not equal.

8. The apparatus according to claim 7, wherein, The affine flag and the affine parameter flag are defined at the CU level.

9. The apparatus according to claim 7, wherein, The current block is decoded based on an encoding mode other than the AF mode, since the width and height of the current block are less than the predetermined values.

10. An apparatus for encoding a video signal including a current block based on an affine motion prediction pattern, the apparatus comprising an inter-frame prediction unit configured to: Generate a merging flag indicating whether motion parameters were inferred from adjacent blocks; The width and height of the current block are checked to see if they are equal to or greater than predetermined values ​​based on the fact that motion parameters were not inferred from the adjacent blocks. Based on the fact that the width and height of the current block are equal to or greater than the predetermined value, an affine symbol is generated from the video signal, wherein, The affine flag indicates whether the AF mode is applied to the current block, and the AF mode indicates a motion prediction mode using an affine motion model; Based on the AF mode applied to the current block, an affine parameter flag is generated, indicating whether 4 or 6 parameters are used in the affine motion model. A motion vector predictor is obtained based on 4 or 6 parameters used in the affine motion model; and Based on the motion vector predictor, prediction samples are generated for the current block. The affine parameter flag is generated based on the fact that the width and height of the current block are equal to the predetermined value; The width and height of the current block are not equal.

11. The apparatus according to claim 10, wherein, The affine flag and the affine parameter flag are defined at the CU level.

12. The apparatus according to claim 10, wherein, The current block is encoded based on an encoding mode other than the AF mode, since the width and height of the current block are less than the predetermined values.

13. A computer-readable storage medium having a computer program and a bit stream stored thereon, wherein, When the computer program is executed by a processor, it implements the encoding method of any one of claims 4-6 to generate the bit stream.

Citation Information

Patent Citations

  • Novel multi-view video fractal coding, compressing and decompressing method

    CN102905150A

  • Efficient multi-view coding using depth-map estimate update

    CN104247432A