Video Encoding and Decoding
By optimizing the signaling of affine motion modes based on inter prediction and neighboring block analysis, the method addresses the inefficiencies in handling complex motions in video coding, improving efficiency and reducing complexity in video encoding and decoding.
Patent Information
- Application Number
- JP2024117962
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2018-09-21
- Filing Date
- 2024-07-23
- Publication Date
- 2025-05-21
- Estimated Expiration
- 2039-09-18
AI Technical Summary
The existing video coding standards, such as HEVC, face challenges in efficiently handling complex motion types like zooming, rotation, and perspective movements due to increased complexity and signal overhead when using affine motion modes.
The method involves signaling affine motion modes based on inter prediction modes, neighboring block analysis, and context coding to optimize their usage, reducing unnecessary encoding and decoding complexity while improving coding efficiency.
This approach enhances coding efficiency and reduces complexity by selectively enabling affine motion modes only when necessary, leading to more efficient video encoding and decoding processes.
Smart Images

Figure 0007681167000004 
Figure 0007681167000005 
Figure 0007681167000006
Abstract
Description
[Technical field]
[0001] The present invention relates to video encoding and decoding. [Background technology]
[0002] Recently, the Joint Video Experts Team (JVET), a joint team formed by MPEG and the VCEG of ITU-T Study Group 16, began work on a new video coding standard called Versatile Video Coding (VVC). The goal of VVC is to provide significant improvements in compression performance over the existing HEVC standard (i.e., typically twice as much as before) and to be completed in 2020. Primary target applications and services include, but are not limited to, 360-degree and high dynamic range (HDR) video. Overall, the JVET evaluated responses from 32 parties using formal subjective testing conducted by an independent testing laboratory. Some proposals demonstrated compression efficiency gains, typically 40% or more, compared to using HEVC. Particular effectiveness was shown on ultra-high definition (UHD) video test material. Thus, we can expect compression efficiency gains well beyond the targeted 50% of the final standard.
[0003] The JVET Search Model (JEM) uses all the HEVC tools. An additional tool that is not present in HEVC is the use of "affine motion mode" when applying motion compensation. Motion compensation in HEVC is limited to translation, but in reality there are many types of motion, such as zooming in / out, rotation, perspective motion, and other irregular movements. When utilizing affine motion mode, more complex transformations are applied to blocks to try to predict such forms of motion more accurately. However, the use of affine motion mode may increase the complexity of the encoding / decoding process and may also increase signal overhead. Therefore, a solution to at least one of the aforementioned problems is desirable. Summary of the Invention
[0004] In a first aspect of the present invention, a method is provided for signaling a motion prediction mode for a portion of a bitstream, the method comprising: determining an inter prediction mode used for the portion of the bitstream; and signaling an affine motion mode depending on the inter prediction mode used for the portion of the bitstream. Optionally, the inter prediction mode used is determined based on a state of a skip flag in the portion of the bitstream. Optionally, affine mode is not enabled if the skip flag is present. Optionally, the method further comprises enabling a merge mode if the affine mode is enabled. Optionally, affine mode is enabled if the inter prediction mode is Advanced Motion Vector Predictor (AMVP). Optionally, the determination is performed based on a high level syntax flag, the high level syntax flag indicating at least one of slice level, frame level, sequence level, and coding tree unit (CTU) level processing. Optionally, determining the inter prediction mode comprises determining a mode of one or more blocks neighboring a current block.
[0005] In a second aspect of the invention, there is provided a method of signaling a motion prediction mode in a bitstream, comprising determining a mode of one or more neighboring blocks to a current block, and signaling an affine motion mode of the current block depending on said mode. Optionally, said neighboring blocks consist of blocks A1 and B1 only. Alternatively, said neighboring blocks include blocks A2 and B3, preferably consisting of blocks A2 and B3 only. Optionally, the method comprises enabling an affine motion mode if one or both of said neighboring blocks use affine motion mode. Optionally, said neighboring blocks further comprise B0, A0, and B2. Optionally, the use of affine mode in said neighboring blocks is determined successively, and if one of said neighboring blocks uses affine mode, affine mode is enabled for the current block. Preferably, the series of neighboring blocks is A2, B3, B0, A0, B2.
[0006] In a third aspect of the present invention, there is provided a method of signaling a motion prediction mode of a portion of a bitstream, the method comprising: determining a list of merge candidates corresponding to blocks neighboring a current block; and enabling affine mode for the current block if one or more of the merge candidates use affine mode. Optionally, the list starts with blocks used to determine a context variable associated with the block. Optionally, the list starts with blocks A2 and B3 in that order. Optionally, the list is A2, B3, B0, or A0, or B2 in that order. Optionally, affine mode is enabled for the current block if the neighboring block does not use merge mode. Optionally, affine mode is enabled for the current block if the neighboring block does not use merge skip mode. Optionally, signaling the affine mode includes inserting a context coding flag into the data stream, the context variable of the flag being determined based on whether the neighboring block uses affine mode or not.
[0007] In a further aspect of the invention, there is provided a method for signaling a motion prediction mode of a coded block in a bitstream, comprising: determining whether a block adjacent to the coded block in the bitstream uses affine mode; and inserting a context coding flag into the bitstream, a context variable of the context coding flag depending on the determination whether a block adjacent to the coded block in the bitstream uses affine mode. Optionally, the neighboring blocks include blocks A1 and B1. Optionally, if the mode of the block for which the motion prediction mode is enabled is merge mode, the neighboring blocks include blocks A1 and B1. Optionally, the context of the affine flag is obtained according to the following formula Ctx = IsAffine(A1) + IsAffine(B1), where Ctx is the context variable of the affine flag and IsAffine is a function returning 0 if the block is not an affine block and 1 if the block is affine.
[0008] In a fourth aspect of the invention, there is provided a method for signaling a motion prediction mode of a coded block in a bitstream depending on whether a neighboring block uses a merge mode and / or a merge skip mode. In a fifth aspect of the invention, there is provided a method for signaling a motion prediction mode in a bitstream, comprising: compiling a list of motion predictor candidates; and inserting an affine merge mode as a merge candidate. Optionally, the affine merge mode candidate is after a neighboring block motion vector in the list of merge candidates. Optionally, the affine merge mode candidate is before an Alternative Temporal Motion Vector Predictor (ATMVP) candidate in the list of merge candidates. Optionally, the position (merge index) of the affine merge mode candidate in the list of candidates is fixed. Optionally, the position of the affine merge mode candidate in the candidate list is variable. Optionally, the location of the affine merge mode candidate is determined based on one or more of: a) the state of the skip flag, b) motion information of neighboring blocks, c) alternative temporal motion vector predictor (ATMVP) candidates, and d) whether the neighboring blocks use affine mode.
[0009] Optionally, if one or more of the following conditions are met: a) a skip flag is present, b) the motion information of the neighboring blocks is equal, c) the ATMVP candidate contains only one motion information, and d) one or more neighboring blocks use affine mode, then the affine merge mode is placed lower in the list of candidates (assigned a higher merge index). Optionally, the neighboring blocks include blocks A1 and B1. Optionally, the affine merge mode is placed lower in the list of candidates (assigned a higher merge index) than the spatial motion vector candidates if one or more of the above conditions a)-d) are met. Optionally, the affine merge mode is placed lower (assigned a higher merge index) than the temporal motion vector candidates if one or more of the above conditions a)-d) are met. Optionally, the affine merge mode is assigned a merge index related to the number of neighboring blocks that use affine mode. Optionally, the affine merge mode is assigned a merge index equal to 5 minus the amount of adjacent blocks that use the affine mode among the five A1, B1, B0, A0, B2.
[0010] According to another aspect of the present invention, there is provided a method of signaling an affine motion mode in a video stream, comprising: determining whether an affine mode likelihood is used for a current block; compiling a motion candidate predictor list; and inserting an affine merge mode as a merge candidate depending on determining the likelihood of an affine mode for the current block. Optionally, the likelihood is determined based on at least one of a) a state of a skip flag, b) motion information of neighboring blocks, and c) ATMVP candidates. Optionally, if one or more of the following conditions are met, namely a) a state of a skip flag, b) motion information of neighboring blocks are equal, and c) ATMVP candidates include only one motion information, the affine merge mode is not inserted as a merge candidate. Optionally, the neighboring blocks include blocks A1 and B1. Optionally, the affine mode is signaled depending on characteristics of a device used to record the video corresponding to the bitstream being encoded.
[0011] Aspects of the invention provide improved coding efficiency and / or reduced coding complexity compared to existing coding standards or proposals. In this way, more efficient and faster video coding and / or decoding methods and systems are provided. Further aspects of the invention relate to coding and decoding methods using any of the methods of the above aspects. Yet another aspect of the invention relates to an apparatus for signaling the use of affine modes in a bitstream representing a coded video as defined by claim 14. Yet another aspect of the invention relates to an encoding unit and a decoding unit as defined by claims 17 and 18, respectively. Yet another aspect of the invention relates to a program as defined by claim 19. The program may be provided on its own or may be carried on, by or in a carrier medium. The carrier medium may be non-transitory, for example a storage medium, in particular a computer-readable storage medium. The carrier medium may also be transitory, for example a signal or other transmission medium. The transmission may be transmitted over any suitable network, including the Internet.
[0012] Yet further aspects of the invention relate to a peripheral device such as a camera or a mobile device as defined by claims 15 and 16. Optionally, the camera may further comprise zoom means and may be adapted to indicate that the zoom means is operating when said zoom means is operating and in a signal affine mode dependent on said indication. Optionally, the camera may further comprise pan means and may be adapted to indicate that the pan means is operating when said pan means is operating and in a signal affine mode dependent on said indication. Optionally, the mobile device may further comprise at least one position sensor adapted to sense a change in orientation of the mobile device and may be adapted to communicate an affine mode dependent on said sensing a change in orientation of the mobile device. Further features of the invention are characterized by other independent and dependent claims.
[0013] Any feature in one aspect of the invention may be applied to other aspects of the invention in any suitable combination. In particular, method aspects may be applied to apparatus aspects and vice versa. Furthermore, features implemented in hardware may be implemented in software and vice versa. Any references to software and hardware features in this specification should be interpreted accordingly. Any apparatus features as described herein may be provided as method features and vice versa. As used herein, means-plus-function features may alternatively be expressed in terms of their corresponding structure, such as a suitably programmed processor and associated memory. It is also to be understood that certain combinations of various features described and defined in any aspect of the invention may be implemented and / or provided and / or used independently. [Brief description of the drawings]
[0014] Reference will now be made, by way of example, to the accompanying drawings in which:
[0015] [Figure 1]FIG. 1 is a diagram for explaining the coding structure used in HEVC. [Diagram 2] FIG. 2 is a block diagram that illustrates a schematic diagram of a data communications system in which one or more embodiments of the present invention may be implemented. [Diagram 3] FIG. 3 is a block diagram illustrating components of a processing device in which one or more embodiments of the present invention may be implemented. [Figure 4] FIG. 4 is a flow chart illustrating steps of an encoding method according to an embodiment of the invention. [Diagram 5] FIG. 5 is a flow chart illustrating steps of a decoding method according to an embodiment of the invention. [Figure 6a] FIG. 6(a) shows the spatial and temporal blocks used to generate a motion vector predictor. [Figure 6b] FIG. 6(b) shows the spatial and temporal blocks used to generate the motion vector predictor. [Figure 7] FIG. 7 shows simplified steps in the process of AMVP predictor set derivation. [Figure 8] FIG. 8 is a schematic diagram of the motion vector derivation process in the merge mode. [Figure 9] FIG. 9 shows the division and temporal motion vector prediction of the current block. [Figure 10] Figure 10(a) shows the encoding of the merge index for HEVC or when ATMVP is not enabled at the SPS level, and Figure 10(b) shows the encoding of the merge index when ATMVP is enabled at the SPS level. [Figure 11] Figure 11(a) shows a simple affine motion field, and Figure 11(b) shows a more complex affine motion field. [Figure 12] FIG. 12 is a flow chart of a decoding process for some of the syntax elements associated with the coding modes. [Figure 13] FIG. 13 is a flowchart showing merging candidate derivation. [Figure 14]FIG. 14 is a flowchart showing the first embodiment of the present invention. [Figure 15] FIG. 15 is a flow chart showing a second embodiment of the present invention. [Figure 16] FIG. 16 is a flow chart showing the third embodiment of the present invention. [Figure 17] FIG. 17 is a flow chart showing the fourth embodiment of the present invention. [Figure 18] FIG. 18 is a flow chart showing the fifth embodiment of the present invention. [Figure 19] FIG. 19 is a schematic block diagram of a computing device for implementing one or more embodiments of the present invention. [Figure 20] FIG. 20 is a schematic block diagram of a computing device. [Figure 21] FIG. 21 is a diagram showing a network camera system. [Figure 22] FIG. 22 is a diagram showing a smartphone. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0016] The present invention relates to an improved propagation of affine motion modes, in particular to determining when affine modes may result in improved coding efficiency, and to ensuring that affine modes are used and / or assigned a priority accordingly. Figure 1 relates to a coding structure used in the High Efficiency Video Coding (HEVC) video standard. A video sequence 1 is composed of a sequence of digital images i. Each such digital image is represented by one or more matrices. The matrix coefficients represent pixels. The images 2 of the sequence may be divided into slices 3. A slice may, in some examples, constitute the entire image. These slices are divided into non-overlapping coding tree units (CTUs). A coding tree unit (CTU) is the basic processing unit of the High Efficiency Video Coding (HEVC) video standard and corresponds conceptually to the macroblock unit used in some previous video standards. A CTU is sometimes also referred to as a maximum coding unit (LCU). A CTU has luma and chroma component parts, each of which is called a coding tree block (CTB). These different color components are not shown in Figure 1.
[0017] A CTU is typically of size 64 pixels x 64 pixels for HEVC, and furthermore for VVC the size may be 128 pixels x 128 pixels. Each CTU may be iteratively divided into smaller variable size coding units (CUs) 5 sequentially using quadtree decomposition. A coding unit is a basic coding element and is composed of two types of subunits called prediction units (PUs) and transform units (TUs). The maximum size of a PU or TU is equal to the CU size. A prediction unit corresponds to a partition of a CU for prediction of pixel values. Various different partitions of a CU into PUs are possible, including a partition into four square PUs and two different partitions into two rectangular PUs, as shown by 606. A transform unit is a basic unit that is subject to spatial transformation using DCT. A CU may be divided into TUs based on a quadtree representation 607.
[0018] Each slice is embedded in one Network Abstraction Layer (NAL) unit. Furthermore, the coding parameters of a video sequence are stored in a dedicated NAL unit called a parameter set. In HEVC and H.264 / AVC, two types of parameter set NAL units are used: first, the sequence parameter set (SPS) NAL unit, which collects all parameters that do not change during the entire video sequence. Typically, it handles coding profiles, video frame sizes, and other parameters. Second, the picture parameter set (PPS) NAL unit contains parameters that can change from one picture (or frame) of the sequence to another. HEVC also includes the video parameter set (VPS) NAL unit, which contains parameters that describe the overall structure of the bitstream. VPS is a new type of parameter set defined in HEVC and applies to all layers of the bitstream. A layer may contain multiple temporal sublayers, and all version 1 bitstreams are limited to a single layer. HEVC has certain hierarchical extensions for scalability and multiview, which allow multiple layers with a backward-compatible version 1 base layer.
[0019] 2 illustrates a data communication system in which one or more embodiments of the present invention are implemented. The data communication system includes a transmitting device, in this case a server 201, operable to transmit data packets of a data stream to a receiving device, in this case a client terminal 202, via a data communication network 200. The data communication network 200 may be a wide area network (WAN) or a local area network (LAN). Such a network may be, for example, a wireless network (Wifi / 802.11a or b or g), an Ethernet network, an Internet network, or a mixed network made up of several different networks. In certain embodiments of the present invention, the data communication system may be a digital television broadcasting system in which the server 201 transmits the same data content to several clients. The data stream 204 provided by the server 201 may consist of multimedia data representing video and audio data. The audio and video data streams may be captured by the server 201 using a microphone and a camera, respectively, in some embodiments of the present invention. In some embodiments, the data stream may be stored on the server 201, or may be received by the server 201 from another data provider, or may be generated at the server 201. The server 201 notably comprises an encoding unit for encoding the video and audio streams to provide a compressed bitstream for transmission, which is a more compact representation of the data presented as input to the encoding unit.
[0020] In order to obtain a better ratio of the quality of the transmitted data to the amount of the transmitted data, the compression of the video data may for example be according to the HEVC format or the H.264 / AVC format. The client 202 receives the transmitted bitstream and decodes the reconstructed bitstream in order to reproduce the video images on a display device and the audio data by a speaker. In the example of Fig. 2, a streaming scenario is considered, but it will be understood that in some embodiments of the invention the data communication between the encoding unit and the decoding unit may be performed using a media storage device, for example an optical disk. In one or more embodiments of the invention, the video image is transmitted together with data representing a compensation offset for application to the reconstructed pixels of the image to provide filtered pixels in the final image.
[0021] 3 shows diagrammatically a processing device 300 arranged to implement at least one embodiment of the invention. The processing device 300 may be a device such as a microcomputer, a workstation or a light portable device. The device 300 comprises a communication bus 313 connected to: a central processing unit 311 such as a microprocessor, denoted CPU, a read-only memory 306, denoted ROM, for storing computer programs for implementing the invention, a random access memory 312, denoted RAM, for storing executable codes of the methods of the embodiments of the invention and for storing registers adapted to record variables and parameters necessary for implementing the method of encoding a sequence of digital images and / or the method of decoding a bitstream according to the embodiments of the invention, a communication interface 302 connected to a communication network 303 over which the digital data to be processed are transmitted or received.
[0022] Optionally, the apparatus 300 may also include the following components: a data storage means 304, such as a hard disk, for storing computer programs for implementing the methods of one or more embodiments of the invention and data used or generated during the performance of one or more embodiments of the invention, a disk drive 305 for a disk 306, the disk drive adapted to read data from the disk 306 or to write data to said disk, a screen 309 for displaying data and / or serving as a graphical interface with a user, by means of a keyboard 310 or any other indicating means.
[0023] The device 300 may be connected to various peripherals, such as, for example, a digital camera 320 or a microphone 308, each connected to an input / output card (not shown) for providing multimedia data to the device 300. A communication bus provides communication and interconnectivity between the various elements included in or connected to the device 300. The representation of the bus is not limiting, and in particular the central processing unit is operable to communicate instructions to any element of the device 300, either directly or by means of another element of the device 300.
[0024] The disk 306 may be replaced by any information carrier, such as for example a compact disk (CD-ROM), a ZIP disk or a memory card, rewritable or not, and in general by information storage means, readable by a microcomputer or microprocessor, integrated in the device or not, possibly removable, and arranged to store one or more programs whose execution enables the method of encoding a sequence of digital images and / or the method of decoding a bitstream according to the invention to be implemented. The executable code may be stored either in the read-only memory 306, in the hard disk 304 or in a removable digital medium, such as for example the disk 306 as mentioned above. According to a variant, the executable code of the program may be received by means of the communication network 303, via the interface 302, in order to be stored in one of the storage means of the device 300 before being executed, such as the hard disk 304.
[0025] The central processing unit 311 is adapted to control and direct the execution of instructions or parts of the software code of the program or programs according to the invention, instructions stored in one of the aforementioned storage means. At power-on, the program or programs stored in a non-volatile memory, for example on the hard disk 304 or on the read-only memory 306, are transferred to the random access memory 312, which then contains the executable code of the program or programs, as well as registers for storing variables and parameters necessary to implement the invention. In this embodiment, the device is a programmable device that uses software to implement the invention. However, alternatively, the invention may be implemented in hardware (for example in the form of an application specific integrated circuit or ASIC).
[0026] Fig. 4 shows a block diagram of an encoding unit according to at least one embodiment of the invention. The encoding unit is represented by connected modules, each module adapted to implement at least one corresponding step of a method for implementing at least one embodiment of encoding images of an image sequence according to one or more embodiments of the invention, for example in the form of program instructions to be executed by the CPU 311 of the device 300. An original sequence of digital images i0 to in401 is received as input by the encoding unit 400. Each digital image is represented by a set of samples known as pixels. A bitstream 410 is the output by the encoding unit 400 after the implementation of the encoding process. The bitstream 410 comprises a number of encoding units or slices, each slice comprising the slice comprising the encoded video data and a slice header for transmitting the encoded values of the encoding parameters used to encode the slice body.
[0027] The input digital image i0 to in401 is divided by module 402 into blocks of pixels. The blocks correspond to image portions and may be of variable size (for example 4x4, 8x8, 16x16, 32x32, 64x64, 128x128 pixels, as well as several rectangular block sizes may be considered). A coding mode is selected for each input block. Two families of coding modes are provided, namely coding modes based on spatial predictive coding (intra prediction) and coding modes based on temporal prediction (inter coding, merge skip). Possible coding modes are tested. Module 403 performs an intra prediction process in which a given block to be coded is predicted by a predictor calculated from pixels in the neighborhood of said block to be coded. An indication of the selected intra predictor and the difference between a given block and its predictor are coded to provide a residual if intra coding is selected.
[0028] The temporal prediction is performed by the motion estimation module 404 and the motion compensation module 405. First, a reference image is selected from the set of reference images 416, and a portion of the reference image, also called reference region or image portion, which is the region closest to the given block to be coded, is selected by the motion estimation module 404. The motion compensation module 405 then predicts the block to be coded using the selected region. The difference between the selected reference region and the given block, also called residual block, is calculated by the motion compensation module 405. The selected reference region is indicated by a motion vector. Thus, in both cases (spatial and temporal prediction), the residual is calculated by subtracting the prediction from the original block. In the intra prediction performed by the module 403, the prediction direction is coded. In the temporal prediction, at least one motion vector is coded. If inter prediction is selected, the motion vector and information for the residual block are coded. To further reduce the bit rate, assuming that the motion is homogenous, the motion vector is coded by a difference to a motion vector predictor. The motion vector predictors of the motion information predictor set are obtained from the motion vector field 418 by the motion vector prediction and encoding module 417 .
[0029] The coding unit 400 further comprises a selection module 406 for coding mode selection by applying a coding cost criterion such as a rate-distortion criterion. To further reduce redundancy, a transform (such as DCT) is applied to the residual block by a transform module 407, and the resulting transformed data is quantized by a quantization module 408 and entropy coded by an entropy coding module 409. Finally, the coded residual block of the current block being coded is inserted into a bitstream 410. The coding unit 400 also performs a decoding of the coded image to generate a reference image for the motion estimation of subsequent images. This allows the coding unit and the decoding unit receiving the bitstream to have the same reference frame. The inverse quantization module 411 performs an inverse quantization of the quantized data, followed by an inverse transformation by an inverse transformation module 412. The backward intra prediction module 413 uses the prediction information to determine which predictor to use for a given block, and the backward motion compensation module 414 actually adds the residual obtained by the module 412 to a reference area obtained from a set of reference images 416.
[0030] Then, post-filtering is applied by module 415 to filter the frame of reconstructed pixels. In an embodiment of the invention, an SAO loop filter is used, in which a compensation offset is added to the pixel values of the reconstructed pixels of the reconstructed image. Figure 5 shows a block diagram of a decoding unit 60 that can be used to receive data from an encoding unit according to an embodiment of the invention. The decoding unit is represented by connected modules, each module adapted to perform a corresponding step of a method performed by the decoding unit 60, for example in the form of program instructions executed by the CPU 311 of the device 300. The decoding unit 60 receives a bitstream 61 containing coding units, each consisting of a header containing information about the coding parameters and a body containing the coded video data. As explained with respect to figure 4, the coded video data is entropy coded, and the index of the motion vector predictor is coded with a predefined number of bits for a given block. The received coded video data is entropy decoded by module 62. The residual data is then inverse quantized by module 63, and then an inverse transform is applied by module 64 to obtain pixel values.
[0031] The mode data indicating the coding mode is also entropy decoded and, based on the mode, intra-type decoding or inter-type decoding is performed on the coded block of image data. In the case of intra mode, an intra predictor is determined by the intra inverse prediction module 65 based on the intra prediction mode specified in the bitstream. If the mode is inter, motion prediction information is extracted from the bitstream to find the reference region to be used by the encoder. The motion prediction information consists of a reference frame index and a motion vector residual. The motion vector predictor is added to the motion vector residual to obtain a motion vector by the motion vector decoding module 70.
[0032] The motion vector decoding module 70 applies motion vector decoding for each current block coded by motion prediction. For the current block, the index of the motion vector predictor is used by the module 66 to apply backward motion compensation once the actual value of the motion vector related to the current block that can be decoded is obtained. The reference image portion indicated by the decoded motion vector is extracted from the reference image 68 to apply the backward motion compensation 66. The motion vector field data 71 is updated with the decoded motion vector for use in the inverse prediction of the subsequent decoded motion vector. Finally, the decoded block is obtained. Post filtering is applied by the post filtering module 67. The decoded video signal 69 is finally provided by the decoding unit 60.
[0033] (CABAC) HEVC uses several kinds of entropy coding, such as Context-Adaptive Binary Arithmetic Coding (CABAC), Golomb-Rice coding, or a simple binary representation called fixed-length coding. In most cases, a binary coding process is performed to represent the different syntax elements. This binary coding process is also very specific and depends on the different syntax elements. Arithmetic coding represents syntax elements according to their current probability. CABAC is an extension of arithmetic coding that separates the probability of syntax elements depending on a "context" defined by a context variable. This corresponds to a conditional probability. The context variable can be derived from the current syntax values of the already coded top-left block (A2 in Fig. 6b, as explained in more detail below) and the top-left block (B3 in Fig. 6b).
[0034] (Inter-coding) HEVC uses three different inter modes: inter mode, merge mode, and merge skip mode. The main difference between these modes is the data signaling in the bitstream. For motion vector coding, the current HEVC standard includes a contention-based scheme for motion vector prediction, which did not exist in previous versions of the standard. This means that several candidates are competing with the distortion rate criterion at the encoder side to find the best motion vector predictor or best motion information for each inter or merge mode. An index corresponding to the best candidate for the best predictor or motion information is inserted in the bitstream. The decoder can derive the same set of predictors or candidates and uses the best one according to the composited index. In the screen content extension of HEVC, a new coding tool called intra block copy is signaled as any of those three inter modes, and the difference between IBC and the equivalent inter mode is done by checking if the reference frame is the current one. This can be implemented, for example, by checking the reference index of list L0 and inferring that if this is the last frame in that list, this is an intra block copy. Another way to implement is to compare the current picture order count with the reference frame: if they are equal, then this is an intra block copy.
[0035] The design of predictor and candidate derivation is important to achieve the best coding efficiency without disproportionately affecting the complexity. In HEVC, two motion vector derivations are used, namely, one for inter mode (Advanced Motion Vector Prediction (AMVP)) and one for merge mode (merge derivation process). These processes are described below. Figure 6a and Figure 6b show spatial and temporal blocks that can be used to generate motion vector predictors in Advanced Motion Vector Prediction (AMVP) and merge modes of HEVC encoding and decoding systems, and Figure 7 shows simplified steps of the process of AMVP predictor set derivation. Two predictors, i.e., two spatial motion vectors in AMVP mode, are selected from the top block (indicated by letter "B") and the left block (indicated by letter "A"), including the top corner block (block B2) and the left corner block (block A0), and one predictor is selected from the bottom right block (H) and the center block (center) of the blocks arranged as shown in Figure 6a. Table 1 below outlines the nomenclature used when referring to blocks in current terms as shown in Figures 6a and 6b. This nomenclature is used as a shorthand notation, but it will be understood that other labeling systems may be used, especially in future versions of the standard.
[0036] [Table 1]
[0037] It should be noted that the "current block" may be variable in size, e.g., 4x4, 16x16, 32x32, 64x64, 128x128, or any size in between. The dimension of the block is preferably a factor of two (i.e., 2^n x 2^m, where n and m are positive integers), as this results in a more efficient use of bits when using binary encoding. The current block does not have to be square, but this is often the preferred embodiment for encoding complexity. Referring to Figure 7, the first step aims to select a first spatial predictor (candidate 1, 706) from among the bottom left blocks A0 and A1, whose spatial location is shown in Figure 6. To that end, these blocks are selected one after the other in a predefined order (700, 702), and for each selected block, the following conditions are evaluated in a predefined order (704), and the first block for which the conditions are satisfied is set as the predictor, i.e., motion vector from the same reference list and same reference picture, motion vector from the same reference picture with the other reference list, scaled motion vector from the same reference list and a different reference picture, or scaled motion vector from the other reference list and a different reference picture.
[0038] If no value is found, the left predictor is considered unavailable. In this case, it indicates that the relevant blocks are intra-coded or that they do not exist. The next step aims to select a second spatial predictor (candidate 2, 716) among the top right block B0, the top block B1, and the top left block B2, whose spatial positions are shown in FIG. 6. For that purpose, these blocks are selected one after the other in a predefined order (708, 710, 712), and for each selected block, the above conditions are evaluated in a predefined order (714), and the first block for which the above conditions are satisfied is set as the predictor. Again, if no value is found, the top predictor is considered unavailable. In this case, it indicates that the relevant blocks are intra-coded or that they do not exist. In the next step (718), the two predictors are compared with each other if both are available, in order to eliminate one of them if they are equal (i.e., same motion vector value, same reference list, same reference index, and same direction type). If only one spatial predictor is available, the algorithm looks for a temporal predictor in the next step.
[0039] The temporal motion predictor (Candidate 3, 726) is derived as follows: the bottom right (H, 720) position of the aligned block in the previous frame is first considered in the availability check module 722. If it does not exist or if the motion vector predictor is not available, the center (Center, 724) of the aligned block is selected to be checked. These temporal positions (Center and H) are shown in FIG. 6. In either case, scaling 723 is applied to those candidates so that the temporal distance between the current frame and the first frame matches that of the reference list. The motion predictor value is then added to the set of predictors. The number of predictors (Nb_Cand) is then compared (728) to the maximum number of predictors (Max_Cand). As mentioned above, the maximum number of predictors (Max_Cand) that the AMVP derivation process needs to generate for the motion vector predictor is 2 in the current version of the HEVC standard. If this maximum number is reached, a final list or set of AMVP predictors (732) is constructed. Otherwise, a zero predictor is added to the list 730. A zero predictor is a motion vector equal to (0,0).
[0040] As shown in FIG. 7, a final list or set of AMVP predictors (732) is constructed from a subset of spatial motion predictors (700-712) and a subset of temporal motion predictors (720, 724). As mentioned above, the motion predictor candidates for merge or merge skip mode represent all the necessary motion information: direction, list, reference frame index and motion vector. An indexed list of candidates is generated by the merge derivation process. In the current HEVC design, the maximum number of candidates for both merge modes is equal to 5 (4 spatial candidates and 1 temporal candidate). FIG. 8 is a schematic diagram of the motion vector derivation process for merge mode. In the first step of the derivation process, five block positions are considered (800-808). These positions are the spatial positions shown in FIG. 3 with the references A1, B1, B0, A0 and B2. In the next step, the availability of spatial motion vectors is checked and at most five motion vectors are selected (810). A predictor is considered available if it is present and if the block is not intra-coded.
[0041] Thus, the selection of the motion vectors corresponding to the five blocks as candidates is performed according to the following conditions: if the "left" A1 motion vector (800) is available (810), i.e. if it exists and this block is not intra-coded, the motion vector of the "left" block is selected and used as the first candidate in the candidate list (814); if the "top" B1 motion vector (802) is available (810), the candidate "top" block motion vector is compared with the "left" A1 motion vector, if it exists (812). If the B1 motion vector is equal to the A1 motion vector, B1 is not added to the list of spatial candidates (814). Conversely, if the B1 motion vector is not equal to the A1 motion vector, B1 is added to the list of spatial candidates (814); if the "top right" B0 motion vector (804) is available (810), the "top right" motion vector is compared with the B1 motion vector (812). If the B0 motion vector is equal to the B1 motion vector, then the B0 motion vector is not added to the list of spatial candidates (814). Conversely, if the B0 motion vector is not equal to the B1 motion vector, then the B0 motion vector is added to the list of spatial candidates (814).
[0042] If the "bottom left" A0 motion vector (806) is available (810), the "bottom left" motion vector is compared with the A1 motion vector (812). If the A0 motion vector is equal to the A1 motion vector, the A0 motion vector is not added to the list of spatial candidates (814). Conversely, if the A0 motion vector is not equal to the A1 motion vector, the A0 motion vector is added to the list of spatial candidates (814), and if the list of spatial candidates does not contain four candidates, the availability of the "top left" B2 motion vector (808) is checked (810). If available, it is compared with the A1 and B1 motion vectors. If the B2 motion vector is equal to the A1 or B1 motion vector, the B2 motion vector is not added to the list of spatial candidates (814). Conversely, if the B2 motion vector is not equal to the A1 or B1 motion vector, the B2 motion vector is added to the list of spatial candidates (814).
[0043] At the end of this stage, the list of spatial candidates contains up to four candidates. For temporal candidates, two positions can be used: the bottom right position of the located block (816, indicated by H in FIG. 6) and the center of the located block (818). These positions are shown in FIG. 6. For the AMVP motion vector derivation process, the first step aims to check the availability of a block in the H position (820). Then, if it is not available, the availability of a block in the center position is checked (820). If at least one motion vector of these positions is available, the temporal motion vector can be scaled (822) to the reference frame with index 0, if necessary, for both lists L0 and L1, to create a temporal candidate (824) that is added to the list of merge motion vector predictor candidates. It is placed after the spatial candidate in the list. Lists L0 and L1 are two reference frame lists that contain 0, 1 or more reference frames.
[0044] If the number of candidates (Nb_Cand) is strictly less than the maximum number of candidates (826) (the value Max_Cand is signaled in the bitstream slice header and is equal to 5 in the current HEVC design) and if the current frame is of type B, a combined candidate is generated (828). The combined candidate is generated based on the available candidates of the list of merge motion vector predictor candidates. It mainly consists of combining the motion vector of one candidate of list L0 with the motion vector of one candidate of list L1. If the number of candidates (Nb_Cand) remains strictly less than the maximum number of candidates (Max_Cand) (830), zero motion candidates are generated (832) until the number of candidates of the merge motion vector predictor candidate list reaches the maximum number of candidates. At the end of this process, a list or set of merge motion vector predictor candidates is constructed (834). As shown in FIG. 8, a list or set of merge motion vector predictor candidates is constructed (834) from a subset of spatial candidates (800-808) and a subset of temporal candidates (816, 818).
[0045] (Alternative Temporal Motion Vector Prediction (ATMVP)) Alternative Temporal Motion Vector Prediction (ATMVP) is a specific motion compensation. Instead of considering only one motion information for the current block from the temporal reference frame, each motion information of the respectively located blocks is considered. This temporal motion vector prediction thus gives the partition of the current block together with the associated motion information of each sub-block as shown in Figure 9. In the current VTM reference software, ATMVP is conveyed as a merge candidate inserted in the list of merge candidates. When ATMVP is enabled at the SPS level, the maximum number of merge candidates is increased by one. Thus, 6 candidates are considered instead of 5 when this mode is disabled.
[0046] Furthermore, when this prediction is enabled at the SPS level, all bins of the merge index become context coded by CABAC. While in HEVC or when ATMVP is not enabled at the SPS level, only the first bin is a coded context and the remaining bins are bypass coded contexts. Figure 10(a) shows the coding of the merge index for HEVC or when ATMVP is not enabled at the SPS level. This corresponds to unary maximal coding. Furthermore, the first bit is CABAC coded and the other bits are bypass CABAC coded. Figure 10(b) shows the coding of the merge index when ATMVP is enabled at the SPS level. Furthermore, all bits are CABAC coded (from the first to the fifth bit). Note that each index has its own context, in other words, their probabilities are separated.
[0047] (Affine mode) In HEVC, only the translational motion model is applied for motion compensated prediction (MCP). Meanwhile, in the real world, there are many types of motion, e.g. zoom in / zoom out, rotation, perspective motion, and other irregular motions. In JEM, a simplified affine transformation motion compensated prediction is applied, and the general principle of the affine mode is described below based on an extract from document JVET-G1001 presented at the JVET Conference in Turin on July 13-21, 2017. This entire document is incorporated herein by reference, as it describes other algorithms used in JEM. As shown in Figure 11(a), the affine motion field of a block is described by two control point motion vectors. The motion vector field (MVF) of a block is described by the following Equation 1:
[0048]
number
[0049] Here, (v 0x , v 0y ) is the motion vector of the control point in the upper left corner, and (v 1x , v 1y ) is the motion vector of the control point in the upper right corner. To further simplify the motion compensation prediction, sub-block-based affine transformation prediction is applied. The sub-block size is derived as in Equation 2, where MvPre is the motion vector fractional precision (1 / 16 in JEM), and (v2x, v2y) is the motion vector of the bottom-left control point calculated according to Equation 1.
[0050]
number
[0051] After being derived by Equation 2, M and N may be adjusted downwards, if necessary, to be divisors of w and h, respectively. To derive a motion vector for each M×N subblock, the motion vector of the center sample of each subblock is calculated according to Equation 1 and rounded up to 1 / 16 fractional precision, as shown in FIG. 6a. A motion compensated interpolation filter is then applied to generate a prediction for each subblock with the derived motion vector.
[0052] Affine mode is a motion compensation mode as inter modes (AMVP, merge, merge skip). Its principle is to generate one motion information per pixel according to two or three neighboring motion information. In the current VTM reference software, affine mode derives one motion information per 4x4 block, as shown in Fig. 11(a). This mode is available for AMVP and both merge modes are enabled by a flag. This flag is CABAC coded. In one embodiment, the context depends on the sum of the affine flags of the left block (position A2 in Fig. 6b) and the top-left block (position B3 in Fig. 6b).
[0053] Thus, in JEM, there can be three context variables (0, 1 or 2) for the affine flag given by the following formula: Ctx = IsAffine(A2) + IsAffine(B3) Here, IsAffine(block) is a function that returns 0 if the block is not an affine block and 1 if the block is affine.
[0054] (Affine merge candidate derivation) In JEM, the affine merge mode (merge or merge skip) is derived from the first neighboring block that is affine between blocks at positions A1, B1, B0, A0, B2. These positions are shown in Figures 6a and 6b. However, how the affine parameters are derived is not fully defined, and the present invention aims to improve at least in this respect.
[0055] (Affine Merge Transfer) FIG. 12 is a flow chart of a partial decoding process of some syntax elements related to coding modes. In this figure, the skip flag (1201), prediction mode (1211), merge flag (1203), merge index (1208), and affine flag (1207) may be decoded. For all CUs in an inter slice, the skip flag is decoded (1201). If the CU is not skip (1202), the pred mode (prediction mode) is decoded (1211). This syntax element indicates whether the current CU is in inter or intra mode. Note that if the CU is skip (1202), its current mode is inter mode. For a CU (1212), the CU is coded in AMVP or in merge mode. If the CU is inter (1212), the merge flag is decoded (1203). If the CU is a merge (1204) or a skip (1202), it is verified whether the affine flag (1206) needs to be decoded (1205). If the current CU is a 2Nx2N CU, which means that the height and width of the CU must be equal in the current VVC, then this flag is decoded.
[0056] Furthermore, at least one neighboring CU A1 or B1 or B0 or A0 or B2 must be coded in affine mode (merge or AMVP). Finally, the current CU must not be a 4x4 CU, and by default CU 4x4 is disabled in the VTM reference software. If this condition (1205) is false, it is ensured that the current CU is coded in classical merge or merge skip mode, and the merge index is decoded (1208). If the affine flag (1206) is set equal to 1 (1207), the CU is a merge affine or merge skip affine CU, and the merge index (1208) does not need to be decoded. Otherwise, the current CU is a classical (basic) merge or merge skip CU, and the merge index candidate (1208) is decoded. Otherwise, the current CU is a classical (basic) merge or merge skip CU, and the merge index candidate (1208) is decoded. In this specification, "signaling" can mean the insertion into or extraction from the bitstream of one or more syntax elements that represent the enabling or disabling of mode or other information.
[0057] (Merge candidate derivation) Figure 13 is a flow chart showing the merge candidate derivation. This derivation builds on the HEVC merge list derivation shown in Figure 8. The main changes compared to HEVC are the addition of ATMVP candidates (1319, 1321, 1323), the full overlap check of candidates (1320, 1325), and the new order of the candidates. The ATMVP prediction is set as a special candidate since it represents some motion information of the current CU. The value of the first subblock (top left) is compared with the temporal candidate, and the temporal candidate is not added to the merge list if they are equal (1320). The ATMVP candidate is not compared with other spatial candidates. Contrary to the temporal candidate, which is compared with each spatial candidate already in the list (1325), it is not added to the merge candidate list if it is an overlap candidate.
[0058] When a spatial candidate is added to the list, it is compared with other spatial candidates in the list which is not the case in the final version of HEVC (1310). In the current VTM version, the list of merge candidates is set as the following order, as it is determined to provide the best results across the coding test conditions: A1 B1 B0 A0 ·ATMVP B2 ·Temporal ·combination ·Zero_MV
[0059] It is important to note that spatial candidate B2 is set after ATMVP candidates. Moreover, if ATMVP is enabled at slice level, the maximum number of candidate lists is 6 instead of 5. An object of the present invention is to signal an affine mode to a part of a bitstream in an efficient manner, taking into account coding efficiency and complexity. Also, an object of the present invention is to signal an affine mode in a manner that requires a minimum amount of structural changes to existing video coding frameworks. Exemplary embodiments of the present invention are now described with reference to Figs. 13-21. It should be noted that the embodiments may be combined unless otherwise stated, e.g., a particular combination of embodiments may improve coding efficiency at the expense of increased complexity, but this may be acceptable in certain use cases. In general, it is possible to improve coding efficiency at an acceptable increase in coding complexity by modifying the syntax signaling the motion predictor mode to use affine modes when they are more likely to provide improved motion compensation.
[0060] (First embodiment) In the first embodiment, an affine motion prediction mode may be signaled (e.g., enabled or disabled) for a portion of the bitstream for at least one inter mode. An inter prediction mode used for the portion of the bitstream is determined, and an affine motion mode is signaled (enabled or disabled) depending on the inter prediction mode used for the portion of the bitstream. The advantage of this embodiment is that it results in better coding efficiency by removing unused syntax. Furthermore, it reduces the complexity of the encoder by avoiding some inter coding possibilities that do not need to be evaluated. Finally, on the encoder side, some affine flags that are CABAC coded do not need to be extracted from the bitstream which improves the efficiency of the coding process. In the example of the first embodiment, the skip mode is not enabled for the affine mode. It means that if a CU is a skipped CU (based on the state or presence of the skip flag in the data stream), the affine flag does not need to be extracted from the bitstream. Figure 14 (sharing the same structure as Figure 12, the corresponding description applies here) shows this example. 14, if the CU is a skip (1402), the affine flag (1406) is not decoded and the condition of 1405 is not evaluated. If the CU is a skip, the merge index is decoded (1406).
[0061] The advantage of this example is an improvement in coding efficiency for sequences with a small amount of motion, not a reduction in coding efficiency for sequences with more motion. This is because skip mode is typically used when there is little or no motion, and as such, it is unlikely that affine mode is appropriate. As mentioned above, the complexity of the encoding and decoding process is also reduced. In a further example, affine merge skip mode may be enabled or disabled at a high level, for example, at the slice, frame, sequence, or CTU level. This may be determined based on a high-level syntax flag. In such a case, affine merge skip may be disabled for sequences or frames with little motion, and may be enabled when the amount of motion increases. The advantage of this further example is flexibility regarding the use of affine merge skip.
[0062] In one embodiment, the affine merge skip mode is not evaluated at the encoder side, so that the bitstream does not include the affine merge skip mode. The advantage is that a coding efficiency is observed, but smaller than in the first embodiment. For affine, the merge and skip modes may not be enabled (or affine is enabled only in AMVP). In a further example, the merge and merge skip modes are not enabled for affine modes. This means that if a CU is skipped or merged, the affine flag does not need to be extracted from the bitstream. Compared to FIG. 14, in this embodiment, modules 1405, 1406, and 1407 are removed. The advantage of this example is similar to the example immediately above. The advantage is an improvement in coding efficiency for sequences with little motion, and the same coding efficiency for sequences with more motion. As mentioned above, the complexity of the coding and decoding process is reduced.
[0063] A high level syntax element signals that affine merging may be enabled. In yet another example, affine merge mode and merge skip mode may be enabled or disabled at a high level, such as slice, frame, sequence, or CTU level with one flag. In this case, affine merging may be disabled for sequences or frames with little motion, and enabled when the amount of motion increases. The advantage of this additional embodiment is flexibility regarding the use of affine skip. In another example, one flag is signaled for merge skip mode and one flag for merge mode. In another example, affine merge skip mode and merge mode are not evaluated at the encoder side. As a result, the bitstream does not include affine merge skip mode. The advantage is that coding efficiency can be observed.
[0064] Second embodiment In a second embodiment, signaling the affine mode of the current block depends on the mode of one or more neighboring blocks. There may be a correlation to how the neighboring blocks are coded, which can be utilized to improve coding efficiency. In particular, if one or more particular neighboring blocks use an affine mode, it is more likely that the affine mode is appropriate for the current mode. In one embodiment, the number of candidates for affine merge or affine merge skip mode is reduced to only two candidates. The advantage of this embodiment is reduced complexity on the decoder side, since fewer affine flags are decoded for the merge mode, and fewer comparisons and memory buffer accesses are required for the affine merge check condition (1205). Fewer affine merge modes on the encoder side need to be evaluated.
[0065] In one example of the second embodiment, one adjacent block and one adjacent block to the left above the current block (e.g., candidates A1 and B1, as shown in FIG. 6) are evaluated to know if the affine flag needs to be decoded and for the derivation of affine merge candidates. The advantage of utilizing only these two positions for affine merging is the coding efficiency similar to maintaining five candidates as the current VTM implementation with reduced complexity. FIG. 15 illustrates this embodiment. In this figure compared to FIG. 12, module 1505 is modified by checking only positions A1 and B1. In a further example of the second embodiment, only candidates A2 and B3 as shown in FIG. 6b are evaluated to determine if the affine flag needs to be decoded and for the derivation of affine merge candidates. The advantage of this example is the same as the previous example, but it also reduces the "worst case" memory accesses compared to the previous example. In fact, at positions A2 and B3, the positions are the same as those used for affine flag context derivation. Indeed, for the affine flag, the context derivation depends on the neighboring blocks at positions A2 and B3 in Fig. 6b. As a result, when the affine flag needs to be decoded, the affine flag values of A2 and B3 are already in memory for the context derivation of the current affine flag, and therefore no further memory access is required.
[0066] Third embodiment In the third embodiment, conveying the affine mode of the current block relies on a list of merge candidates corresponding to blocks adjacent to the current block. In one example of the third embodiment, the list starts from the block that is being used to determine the context variables related to said block, since the affine flag values of such blocks are already in memory for the context derivation of the current affine flag, and such further memory access is not necessary. For example, the possible affine merge candidates are in the order A2 or B3 or BO or AO or B2 (instead of A1 or B1 or BO or AO or B2), as shown in FIG. 6(b). This gives an improvement in coding efficiency compared to the current VTM. And it also limits the amount of affine flags that need to be accessed for the decoding of the affine flags for the worst scenario. In the current version, 5 for module 1205 and 2 for affine flag context derivation, and in the current embodiment, only 5 as the affine flag values of A2 and B3 are already in memory for the context derivation of the current affine flag, and such further memory access is not necessary.
[0067] A variation of the third embodiment relates to context alignment. Propagating the affine mode may include inserting a context encoding flag into the data stream, and a context variable for said flag is determined based on whether the neighboring block uses the affine mode. In an alternative example of the third embodiment, the positions considered for the context derivation of the affine flag are positions A1 and B1 instead of positions A2 and B3, as shown in FIG. 6b. In that case, the same advantages of the previous example are obtained. This is another alignment between the context and the affine merge derivation. In that case, the context variable of the affine flag is obtained according to the following formula: Ctx=IsAffine(A1)+IsAffine(B1), where Ctx is the context of the affine flag and IsAffine is a function that returns 0 if the block is not an affine block and 1 if the block is affine. In this example, the affine flag values of A1 and B1 are stored in memory for the context derivation of the current affine flag, and as such, no further memory access is required.
[0068] In a further alternative, the positions considered for the context derivation of the affine flag are positions A1 and B1 instead of positions A2 and B3 when the current block is in merge mode (both merge modes). An additional advantage compared to the previous example is better coding efficiency. Indeed, for AMVP, there is no need for the context derivation to be aligned to the derivation of the motion vector, since for AMVP, affine blocks are not considered for this derivation.
[0069] (Fourth embodiment) In the fourth embodiment, the propagation of the affine mode is performed depending on whether the neighboring block is in merge mode or not. In one example of the fourth embodiment, the candidates for affine merging (merge and skip) may be only affine AMVP candidates. Figure 17 illustrates this embodiment. The advantage of this embodiment is reduced coding complexity, since only a few affine flags need to be decoded without affecting coding efficiency. In a further example of the fourth embodiment, the candidates for affine merging (merge and skip) may be only affine AMVP candidates or merge affine candidates, but not affine merge skip. As with the previous example, the advantage of this example is reduced coding complexity, since only a few affine flags need to be decoded without affecting coding efficiency.
[0070] Fifth embodiment In the fifth embodiment, signaling the affine mode includes inserting the affine mode as a candidate motion predictor. In an example of the fifth embodiment, the affine merge (and merge skip) is signaled as a merge candidate. In this case, modules 1205, 1206 and 1207 of FIG. 12 are removed. In addition, the maximum possible number of merge candidates is incremented so as not to affect the coding efficiency of the merge mode. For example, in the current VTM version, this value is set equal to 6, so that when this embodiment is applied to the current version of the VTM, the value becomes 7. This advantage is a simplified design of the syntax elements of the merge mode, since fewer syntax elements need to be decoded. In some circumstances, coding efficiency may be observed.
[0071] Now, two possibilities for implementing this example are described below. The position of the candidate motion predictor indicates its likelihood of being selected and, as such, the higher it is placed in the list (lower index value), the higher its likelihood of the motion vector predictor being selected. In the first example, the affine merge index always has the same position in the list of merge candidates. This means having a fixed merge idx value. For example, this value may be set equal to 5, since the affine merge mode should represent complex motion that is not the most likely content. An additional advantage of this embodiment is that the current block can be set as an affine block if the syntax elements are parsed / decoded / read, not just by decoding the data itself. As a result, the value can be used to determine the CABAC context of the affine flag used for AMVP. Thus, the conditional probability should be improved for this affine flag and the coding efficiency will be better.
[0072] In the second example, affine merge candidates are derived together with other merge candidates. In this example, a new affine merge candidate is added to the list of merge candidates. Figure 18 shows this example. Compared to Figure 13, the affine candidates are the first affine neighboring blocks A1, B1, BO, AO, B2 (1917). If the same condition as 1205 in Figure 12 is valid (1927), a motion vector field generated with affine parameters is generated to obtain affine candidates (1929). The list of initial candidates can have 4, 5, 6, or 7 candidates according to the use of ATMVP, temporal and affine candidates. The order among all these candidates is important because the more likely candidates should be processed first to ensure that they are more likely to make the cut of the motion vector candidates, and the preferred order is as follows: A1 B1 B0 A0 Affine Merge ATMVP B2 temporal combination Zero_MV
[0073] It is important to note that the affine merge is before the ATMVP mode, but after the four main neighboring blocks. The advantage of placing the affine merge before the ATMVP candidate, compared to placing it after the ATMVP and the temporal predictor, is a coding efficiency gain. This coding efficiency gain depends on the GOP (Group of Pictures) structure and the quantization parameter (QP) settings of each picture in the GOP. However, for the most used GOPs and QP settings, this order gives a coding efficiency gain. A further advantage of this solution is the clean design of the merge and merge skip, both for syntax and derivation. Furthermore, the affine candidate merge index can be changed according to the availability or value (duplicate check) of the previous candidate in the list. Efficient propagation is obtained as a result. In a further example, the affine merge index is variable according to one or several conditions.
[0074] For example, the merge index or position in the list associated with an affine candidate is varied according to a criterion. The principle is to set a low value for the merge index corresponding to an affine merge if it has a high probability of being selected (and a higher value if there is a low probability of it being selected). The advantage of this example is improved coding efficiency thanks to optimal adaptation of the merge index to when it is most likely to be used.
[0075] The criteria for selecting the position of the affine mode in the list of merge candidates include: a) When skip mode is enabled (skip flag status) In one example of applying this criterion, if the affine merge index has a value set equal to a high value (e.g., 5) or if the current merge is a merge skip mode, it is set after the spatial and temporal MVs. As described for the first embodiment, the affine mode is unlikely to be selected for skip mode since it is unlikely to be any large (or complex) motion. b) Motion information of adjacent blocks In one example of applying this criterion, if the affine merge index has a value set equal to a high value or if the motion information of one block to the left and one block above (e.g., blocks A1 and B1) is similar or equal, it is set after the spatial and temporal MV. If A1 has the same motion information as B1, there is a high probability that the motion information is constant for the current block. Therefore, the affine merge has a low probability of being selected.
[0076] c) ATMVP candidates In one example of applying this criterion, if the affine merge index has a value set equal to a high value or if the ATMVP candidate contains only one motion information, it is set after the spatial and temporal MV. In that case, there is no subdivision in the previous frame of the located block. Therefore, it is preferable not to set the affine at a high position in the merge list because there is a slight possibility that the current block content is in a non-constant motion interior. d) When the adjacent block uses affine mode In one example of applying this criterion, the affine merge index has a value set equal to a low value, or if two or more neighboring blocks are affine, it is set before the temporal prediction and far from the spatial predictor. In an additional example of applying this criterion, the affine merge index or affine position (idx) is set equal to idx=PN, where P is the lowest possible position for the affine merge index and N is the number of affine neighboring blocks. In one example, P is 5, N is 5, and the neighboring blocks are A1, B1, B0, A0, B2. Note that in this notation, the highest position has an index value of 0.
[0077] In this example, the affine merge index of a merge candidate position is set according to the probability associated with its neighboring blocks, thus the first position if all neighboring positions are affine, and the fourth position if only one neighboring block is affine. It should be understood that the exemplary value "5" could be set to 6 or 7 to obtain similar coding efficiency. It should also be understood that combinations of these criteria are possible.
[0078] In another example of the fifth embodiment, the affine mode is signaled depending on the determination of the likelihood of the affine mode of the current block. In a particular example, the affine merge candidate is not added in the list of candidates or there is no index corresponding to the affine merge according to the criteria. The principle of this example is to disable affine modes that are unlikely to be useful. The advantage of this example is improved coding efficiency thanks to optimal use of the merge index bits.
[0079] The criteria for determining the likelihood of an affine mode being useful include: a) Skip flag status In one example of applying this criterion, if the current merge is in skip merge mode, no affine merge candidates are added, since there is a low probability that affine mode will be selected in skip mode, as described in the first embodiment. b) Motion information of adjacent blocks In one embodiment of applying this criterion, an affine merge candidate is not added if the motion information of one block to the left and one block above (e.g., blocks A1 and B1) is similar or equal. If one block to the left and one block above (e.g., blocks A1 and B1) have the same motion information, there is a high probability that the motion information is constant with respect to the current block. Therefore, the affine merge will be invalidated. c) ATMVP candidates In one embodiment of applying this criterion, if the ATMVP candidate contains only one motion information, then no affine merge candidates are added. In such an instance, it is preferable to disable affines higher in the merge list, since there is a small chance that the current block content is within a non-constant motion. It should be understood that combinations of these criteria are possible.
[0080] (Implementation of an embodiment of the present invention) Fig. 20 is a schematic block diagram of a computing device 1300 for implementing one or more embodiments of the present invention. The computing device 1300 may be a device such as a microcomputer, a workstation, or a light portable device. The computing device 1300 comprises a central processing unit (CPU) 1301, such as a microprocessor, with a communication bus connected to: a random access memory (RAM) 1302 for storing executable code of the method of the present invention, and registers adapted for recording variables and parameters required for implementing the method for encoding or decoding at least a part of an image according to the present invention, the memory capacity of which may be expanded, for example, by an optional RAM connected to an expansion port; a read only memory (ROM) 1303 for storing a computer program for implementing the embodiment of the present invention; and a network interface (NET) 1304, typically connected to a communication network over which the digital data to be processed are transmitted or received. The network interface (NET) 1304 may be a single network interface or may consist of a set of different network interfaces (e.g. wired and wireless interfaces, or different types of wired or wireless interfaces).
[0081] Data packets are written to the network interface for transmission or read from the network interface for reception under the control of a software application executing on the CPU 1301, a user interface (UI) 1305 may be used to receive input from a user or to display information to a user, a hard disk (HD) 1306 may be provided as a mass storage device, an input / output module (IO) 1307 may be used to receive / transmit data from / to an external device such as a video source or a display. The executable code may be stored either in the ROM 1303, in the HD 1306 or on a removable digital medium such as a disk. According to a variant, the executable code of the program may be received by means of a communication network, via the NET 1304, to be stored in one of the storage means of the communication device 1300, such as the HD 1306, before being executed. The CPU 1301 is adapted to control and direct the execution of instructions or parts of a program or software code of a program according to an embodiment of the invention, the instructions being stored in one of the aforementioned storage means. After power-on, CPU 1301 can execute instructions for software applications, for example from main RAM memory 1302 after these instructions are loaded from program ROM 1303 or HD 1306. Such software applications, when executed by CPU 1301, cause the steps of the method according to the invention to be performed.
[0082] It is also understood that according to other embodiments of the invention, a decoding unit according to the aforementioned embodiment is provided in a user terminal such as a computer, a mobile phone (cell phone), a tablet or any other kind of device (e.g. a display device) capable of providing / displaying content to a user. According to yet another embodiment, an encoding unit according to the aforementioned embodiment is provided in an image capture device that also comprises a camera, a video camera or a network camera (e.g. a closed circuit television or a video surveillance camera) that captures and provides content for the encoding unit to encode. Two such examples are provided below with reference to figures 21 and 22.
[0083] FIG. 21 is a diagram showing a network camera system 2100 including a network camera 2102 and a client device 2104. The network camera 2102 includes an imaging unit 2106, an encoding unit 2108, a communication unit 2110, and a control unit 2112. The network camera 2102 and the client device 2104 are interconnected so as to be able to communicate with each other via a network 200. The imaging unit 2106 includes a lens and an imaging element (e.g., a charge-coupled device (CCD) or a complementary metal-oxide semiconductor (CMOS)), captures an image of a subject, and generates image data based on the image. The image may be a still image or a video image. The imaging unit may also include zoom means and / or pan means adapted to zoom or pan (either optically or digitally), respectively. The encoding unit 2108 encodes the image data using the encoding method described in the first to fifth embodiments. The encoding unit 2108 uses at least one of the encoding methods described in the first to fifth embodiments. For another example, the encoding unit 2108 can use a combination of the encoding methods described in the first to fifth embodiments.
[0084] The communication unit 2110 of the network camera 2102 transmits the encoded image data encoded by the encoding unit 2108 to the client device 2104. Furthermore, the communication unit 2110 receives a command from the client device 2104. The command includes a command for setting a parameter for encoding by the encoding unit 2108. The control unit 2112 controls other units in the network camera 2102 according to the command received by the communication unit 2110. The client device 2104 has a communication unit 2114, a decoding unit 2116, and a control unit 2118. The communication unit 2118 of the client device 2104 transmits a command to the network camera 2102. Furthermore, the communication unit 2118 of the client device 2104 receives the encoded image data from the network camera 2102. The decoding unit 2116 decodes the encoded image data by using the decoding method described in any one of the first to fifth embodiments. As another example, the decoding unit 2116 can use a combination of the decoding methods described in the first to fifth embodiments.
[0085] The control unit 2118 of the client device 2104 controls other units in the client device 2104 according to a user operation or command received by the communication unit 2114. The control unit 2118 of the client device 2104 controls the display device 2120 to display an image decoded by the decoding unit 2116. The control unit 2118 of the client device 2104 also controls the display device 2120 to display a GUI (Graphical User Interface) for specifying values of parameters of the network camera 2102 including parameters for encoding by the encoding unit 2108. The control unit 2118 of the client device 2104 also controls other units in the client device 2104 according to a user operation input to the GUI displayed by the display device 2120. The control unit 2118 of the client device 2104 controls the communication unit 2114 of the client device 2104 to transmit a command for specifying values of parameters of the network camera 2102 to the network camera 2102 according to a user operation input to the GUI displayed by the display device 2120. The network camera system 2100 can determine whether the camera 2102 utilizes a zoom or pan while recording video, and such information may be used when encoding the video stream as a zoom or pan, while the shot can benefit from the use of an affine mode, which is well suited for encoding complex movements such as zooming, rotation, and / or stretching (which can be side effects of panning, especially if the lens is a "fisheye" lens).
[0086] FIG. 22 is a diagram showing a smartphone 2200. The smartphone 2200 includes a communication unit 2202, a decoding / encoding unit 2204, a control unit 2206, and a display unit 2208. The communication unit 2202 receives encoded image data via a network. The decoding unit 2204 decodes the encoded image data received by the communication unit 2202. The decoding unit 2204 decodes the encoded image data by using the decoding method described in the first to fifth embodiments. The decoding unit 2204 can use at least one of the decoding methods described in the first to fifth embodiments. For example, the encoding unit 2202 can use a combination of the decoding methods described in the first to fifth embodiments. The control unit 2206 controls other units in the smartphone 2200 in response to a user operation or command received by the communication unit 2202.
[0087] For example, the control unit 2206 controls the display unit 2208 to display images decoded by the decoding unit 2204. The smartphone may further comprise an image recording device 2210 (e.g., a digital camera associated with the circuit) for recording images or videos. Such recorded images or videos may be encoded by the decoding / encoding unit 2204 under the direction of the control unit 2206. The smartphone may further comprise a sensor 2212 adapted to sense the orientation of the mobile device. Such sensors may include an accelerometer, a gyroscope, a compass, a global positioning (GPS) unit or similar position sensor. Such a sensor 2212 may determine whether the smartphone changes orientation, and such information may be used when encoding the video stream as a change in orientation, while a video capture may benefit from the use of an affine mode well suited to encoding complex movements such as rotations.
[0088] (Alternatives and Modifications) It will be appreciated that the aim of the present invention is to ensure that affine modes are utilized in the most efficient way, and the particular examples given above relate to conveying the use of affine modes depending on the likelihood that they will be perceived as useful. A further example of this may be applied to the encoder when it is known that complex motion is being coded, for which affine transformations are particularly efficient. Examples of such cases include: a) Camera zoom in / out b) Portable cameras (e.g., cell phones) that change orientation during capture (i.e., rotational movement) c) Panning a "fisheye" lens camera (e.g. stretching / distorting parts of the image)
[0089] As such, indications of complex motion during the recording process may be raised such that affine mode is given a high probability of being used for slices, frame sequences, or the entire actual video stream. In a further example, affine mode may be given a high probability of being used depending on the features or functionality of the device used to record the video. For example, mobile devices are more likely to change orientation than (say) fixed surveillance cameras, so affine mode may be more appropriate for encoding video from the former. Examples of features or functionality include the presence / use of zooming means, the presence / use of position sensors, the presence / use of panning means, whether the device is handheld, or user selection on the device.
[0090] Although the present invention has been described with reference to the embodiments, it is to be understood that the present invention is not limited to the disclosed embodiments. It will be understood by those skilled in the art that various changes and modifications can be made without departing from the scope of the present invention, as defined in the appended claims. All features disclosed herein (including the appended claims, abstract and drawings), and / or all steps of any method or process so disclosed, may be combined in any combination, except combinations in which at least some of such features and / or steps are mutually exclusive. Each feature disclosed herein (including the appended claims, abstract and drawings), unless otherwise stated, may be replaced by an alternative feature serving the same, equivalent or similar purpose. Thus, unless otherwise stated, each feature disclosed is merely one example of a generic series of equivalent or similar features.
[0091] It is also to be understood that any result of the above-mentioned comparison, determination, evaluation, selection, execution, implementation, or consideration, e.g., a selection made during an encoding or filtering process, may be indicated or determinable / inferable from data in the bitstream, e.g., in a flag or data indicating the result, such that the indicated or determined / inferred result may be used in the process instead of actually performing the comparison, determination, evaluation, selection, execution, implementation, or consideration, e.g., during a decoding process. In the claims, the word "having" does not exclude other elements or steps, and the indefinite article "a" or "an" does not exclude a plurality. The mere fact that different features are recited in mutually different dependent claims does not indicate that a combination of these features cannot be used to advantage. Reference signs appearing in the claims are only illustrative and shall have no limiting effect on the scope of the claims.
Claims
1. 1. A method for decoding an image from a bitstream that has been encoded using motion prediction, comprising the steps of: determining whether to use an intra mode or an inter mode; generating a list of motion predictor candidates, which may include sub-block collocated temporal prediction candidates and sub-block affine prediction candidates, when it is determined that the inter mode is to be used; The sub-block collocated temporal prediction can use motion information of each of a plurality of sub-blocks included in a block at the same position as the target block in the reference image for a target block in the image; an order of the sub-block affine prediction candidates in the list is variable based on whether a sub-block collocated temporal prediction candidate is included in the list. A method comprising:
2. 1. A method for encoding an image into a bitstream using motion prediction, comprising the steps of: determining whether to use an intra mode or an inter mode; generating a list of motion predictor candidates, which may include sub-block collocated temporal prediction candidates and sub-block affine prediction candidates, when it is determined that the inter mode is to be used; The sub-block collocated temporal prediction can use motion information of each of a plurality of sub-blocks included in a block at the same position as the target block in the reference image for a target block in the image; an order of the sub-block affine prediction candidates in the list is variable based on whether a sub-block collocated temporal prediction candidate is included in the list. A method comprising:
3. 3. The method according to claim 1, wherein the maximum number of candidates in the list depends on whether the sub-block affine prediction is enabled.
4. 4. The method according to claim 1, wherein the sub-block affine prediction derives motion information for each of a plurality of sub-blocks in a block according to two or three pieces of motion information.
5. A method for decoding an image from a bitstream, comprising the steps of: determining a prediction mode to be used for decoding a current block of the image from a plurality of prediction modes including an intra mode and an inter mode; generating a list of a plurality of motion predictor candidates including candidates of sub-block affine prediction when the inter mode is determined as the prediction mode for the current block; the sub-block affine prediction candidates are arranged in the list as merging candidates below temporal motion vector candidates; The method of claim 1, wherein the sub-block affine prediction uses two or three motion vectors to derive at least one motion vector for each sub-block of the current block.
6. The method of claim 5, further comprising: selecting a sub-block merging mode using sub-block affine prediction for the current block; selecting the sub-block merging mode using the sub-block affine prediction includes decoding a flag from the bitstream using CABAC decoding; The method of claim 5 , wherein the context variable for the flag is determined based on whether a first block adjacent to the current block uses sub-block affine prediction and whether a second block adjacent to the current block uses sub-block affine prediction.
7. The method of claim 6, wherein the first block is located to the left of the current block and the second block is located above the current block.
8. The method described in claim 5, characterized in that when the current block has a size of 16x16, the number of sub-blocks in the current block is 16, and in the sub-block affine prediction, one motion vector is derived for each sub-block of the current block using the two or three motion vectors.
9. The method of claim 5, wherein the temporal motion vector candidates use motion vectors in blocks of an image different from the image containing the current block.
10. A method for encoding an image into a bitstream, comprising the steps of: determining a prediction mode to be used for encoding a current block of the image from a plurality of prediction modes, including an intra mode and an inter mode; generating a list of a plurality of motion predictor candidates including candidates of sub-block affine prediction when the inter mode is determined as the prediction mode for the current block; the sub-block affine prediction candidates are arranged in the list as merging candidates below temporal motion vector candidates; The method of claim 1, wherein the sub-block affine prediction uses two or three motion vectors to derive at least one motion vector for each sub-block of the current block.
11. The method of claim 10, further comprising: selecting a sub-block merging mode that uses sub-block affine prediction for the current block; selecting the sub-block merging mode using the sub-block affine prediction includes encoding a flag from the bitstream using CABAC coding; The method of claim 10, wherein the context variable for the flag is determined based on whether a first block adjacent to the current block uses sub-block affine prediction and whether a second block adjacent to the current block uses sub-block affine prediction.
12. The method of claim 11, wherein the first block is located to the left of the current block and the second block is located above the current block.
13. The method described in claim 10, characterized in that when the current block has a size of 16x16, the number of sub-blocks in the current block is 16, and in the sub-block affine prediction, one motion vector is derived for each sub-block of the current block using the two or three motion vectors.
14. The method of claim 10, wherein the temporal motion vector candidates use motion vectors in blocks of an image different from the image containing the current block.
15. 1. An encoding device for encoding an image into a bitstream using motion prediction, comprising: means for determining whether to use an intra mode or an inter mode; means for generating a list of motion predictor candidates, which may include candidates for sub-block collocated temporal prediction and candidates for sub-block affine prediction, when it is determined that the inter mode is to be used; The sub-block collocated temporal prediction can use motion information of each of a plurality of sub-blocks included in a block at the same position as the target block in the reference image for a target block in the image; an order of the sub-block affine prediction candidates in the list is variable based on whether a sub-block collocated temporal prediction candidate is included in the list.
13. An encoding device comprising:
16. 1. A decoding device for decoding an image from a bitstream using motion prediction, comprising: means for determining whether to use an intra mode or an inter mode; means for generating a list of motion predictor candidates, which may include candidates for sub-block collocated temporal prediction and candidates for sub-block affine prediction, when it is determined that the inter mode is to be used; The sub-block collocated temporal prediction can use motion information of each of a plurality of sub-blocks included in a block at the same position as the target block in the reference image for a target block in the image; an order of the sub-block affine prediction candidates in the list is variable based on whether a sub-block collocated temporal prediction candidate is included in the list. A decoding device comprising:
17. A decoding device for decoding an image from a bitstream, comprising: means for determining a prediction mode to be used for decoding a current block of the image from a plurality of prediction modes, including an intra mode and an inter mode; means for generating a list of a plurality of motion predictor candidates including candidates of sub-block affine prediction when the inter mode is determined as the prediction mode for the current block; the sub-block affine prediction candidates are arranged in the list as merging candidates below temporal motion vector candidates; A decoding device, characterized in that the sub-block affine prediction derives at least one motion vector for each sub-block of the current block using two or three motion vectors.
18. An encoding device for encoding an image into a bitstream, comprising: means for determining a prediction mode to be used for encoding a current block of said image from a plurality of prediction modes, including an intra mode and an inter mode; means for generating a list of a plurality of motion predictor candidates including candidates of sub-block affine prediction when the inter mode is determined as the prediction mode for the current block; the sub-block affine prediction candidates are arranged in the list as merging candidates below temporal motion vector candidates; The encoding device, wherein the sub-block affine prediction derives at least one motion vector for each sub-block of the current block using two or three motion vectors.
19. A computer program product for causing a computer to carry out the method according to claim 1 or 5.
20. A computer program for causing a computer to carry out the method according to claim 2 or 10.
Citation Information
Patent Citations
Affine motion prediction for video coding
WO2017200771A1
Image processing device and image processing method
WO2018131523A1