Method, apparatus, storage medium, computer program product and method for storing bitstream for video decoding

By dividing the video data into brightness sub-blocks and chromaticity sub-blocks, and deriving the affine motion vector of the chromaticity sub-blocks using the motion vectors of the brightness sub-blocks, the problems of high-resolution video encoding/decoding efficiency and image quality in the prior art are solved, and more efficient video encoding and decoding is achieved.

CN118694944BActive Publication Date: 2025-05-13BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410916053.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2018-12-21
Filing Date
2019-12-12
Publication Date
2025-05-13
Estimated Expiration
2039-12-12

AI Technical Summary

Technical Problem

When existing video encoding and decoding technologies process high-resolution video data, it is difficult to maintain the image quality of the decoded video data, while improving encoding/decoding efficiency.

Method used

By placing the video data in a plurality of brightness subblocks and a plurality of chrominance subblocks, each chrominance subblock corresponds to one or more luminance subblocks, the affine motion vector for the chrominance subblocks in the plurality of chrominance subblocks is derived using the motion vectors of the corresponding luminance subblocks.

Benefits of technology

The efficiency of video encoding and decoding is improved, the image quality of high-resolution video data is maintained, and the contradiction between encoding/decoding efficiency and image quality in the prior art is solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118694944B_ABST
    Figure CN118694944B_ABST
Patent Text Reader

Abstract

A method, apparatus, storage medium, computer program product, and method for storing a bitstream for video decoding are provided. The method may include: arranging video data in a plurality of luminance subblocks and a plurality of chrominance subblocks, wherein each chrominance subblock corresponds to one or more luminance subblocks; and deriving an affine motion vector for a chrominance subblock in the plurality of chrominance subblocks using a motion vector of the corresponding luminance subblock. The video data has a color subsampling format, and the corresponding luminance subblock is obtained according to the color subsampling format.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the invention application with application number 201980084122.4, application date December 12, 2019, and title “Video encoding and decoding method and device for deriving affine motion vectors for chrominance components”. Technical Field

[0002] The present application generally relates to video data encoding and decoding, and in particular, but not limited to, methods and apparatus for video encoding and decoding for deriving affine motion vectors for chroma components. Background Art

[0003] The following abbreviations and acronyms are defined herein, at least some of which are referred to within the following description:

[0004] International Telecommunication Union (ITU), ITU Telecommunication Standardization Sector (ITU-T), Moving Picture Experts Group (MPEG), Advanced Video Coding (AVC), High Efficiency Video Coding (HEVC), Versatile Video Coding (VVC), Joint Exploration Test Model (JEM), VVC Test Model (VTM), Joint Video Experts Group (JVET), Video Coding Experts Group (VCEG), Motion Vector (MV), Motion Vector Prediction (MVP), Motion Vector Difference (MVD), Motion Vector Field (MVF), Advanced Motion Vector Prediction (AMVP), Motion Vector Competition (MVC), Temporal Motion Vector Prediction (TMVP), Control Point Motion Vector (CPMV), Control Point Motion Vector Prediction ( CPMVP), motion compensated prediction (MCP), bidirectional prediction (B), block copy (BC), context-based adaptive binary arithmetic coding (CABAC), context-adaptive variable length coding (CAVLC), encoder / decoder (CODEC), coded picture buffer (CPB), coding tree unit (CTU), coding unit (CU), discrete cosine transform (DCT), decoded picture buffer (DPB), intra (I), intra block copy (IBC), prediction (P), probability interval partitioning entropy (PIPE), picture unit (PU), sum of absolute difference (SAD), semantic-based context-adaptive binary arithmetic coding (SBAC), sum of square difference (SSD).

[0005] In this disclosure, the term "luminance", represented by the symbol or subscript Y or L, is used to specify that an array of samples or a single sample represents a monochromatic signal related to a primary color. The term luma is used instead of the term luminance to avoid implying the use of a linear light transfer characteristic usually associated with the term luminance. The symbol L is sometimes used instead of the symbol Y to avoid confusion with the symbol y used for vertical position. The term "chrominance", represented by the symbols Cb and Cr, is used to specify that an array of samples or a single sample represents one of two color difference signals related to a primary color. The term chroma is used instead of the term chrominance to avoid implying the use of a linear light transfer characteristic usually associated with the term chrominance.

[0006] Various electronic devices (such as digital televisions, laptop or desktop computers, tablet computers, digital cameras, digital recording devices, digital media players, video game consoles, smart phones, video teleconferencing devices, video streaming devices, etc.) support digital video. Electronic devices send, receive, encode, decode and / or store digital video data by implementing video compression / decompression. Digital video devices implement video codec technologies such as those described in standards defined by Versatile Video Coding (VVC), Joint Exploration Test Model (JEM), MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264 / MPEG-4, Part 10, Advanced Video Coding (AVC), ITU-T H.265 / High Efficiency Video Coding (HEVC), and extensions of such standards.

[0007] Video codecs typically use prediction methods (e.g., inter-frame prediction, intra-frame prediction) that exploit redundancy present in video images or sequences. An important goal of video codec technology is to compress video data into a form that uses a lower bit rate while avoiding or minimizing degradation of video quality. As evolving video services become available, coding techniques with better codec efficiency are needed.

[0008] Video compression typically includes performing spatial (intra-frame) prediction and / or temporal (inter-frame) prediction to reduce or remove the redundancy inherent in video data. For block-based video codecs, a video frame is divided into one or more slices, each slice having multiple video blocks, which may also be referred to as coding tree units (CTUs). Each CTU may contain a coding unit (CU) or may be recursively split into smaller CUs until a predefined minimum CU size is reached. Each CU (also referred to as a leaf CU) contains one or more transform units (TUs) and each CU also contains one or more prediction units (PUs). Each CU may be encoded and decoded in intra-frame, inter-frame, or IBC mode. Video blocks in an intra-frame coded (I) slice of a video frame are encoded using spatial predictions of reference samples in neighboring blocks within the same video frame. Video blocks in an inter-frame coded (P or B) slice of a video frame may use spatial predictions of reference samples in neighboring blocks within the same video frame, or temporal predictions of reference samples in other previous and / or future reference video frames.

[0009] A prediction block for the current video block to be coded is derived based on spatial prediction or temporal prediction of previously coded reference blocks (e.g., neighboring blocks). The process of finding the reference block can be accomplished by a block matching algorithm. The residual data representing the pixel differences between the current block to be coded and the prediction block is called a residual block or prediction error. Inter-coded blocks are coded according to a motion vector and a residual block, which points to a reference block in a reference frame that forms the prediction block. The process of determining a motion vector is generally referred to as motion estimation. Intra-coded blocks are coded according to an intra-prediction mode and a residual block. For further compression, the residual block is transformed from the pixel domain to a transform domain (e.g., frequency domain) to derive residual transform coefficients, which can then be quantized. The quantized transform coefficients, initially arranged in a two-dimensional array, can be scanned to produce a one-dimensional vector of transform coefficients and then entropy encoded into a video bitstream to achieve even greater compression.

[0010] The encoded video bitstream is then stored in a computer-readable storage medium (e.g., a flash memory) for access by another electronic device with digital video capabilities or sent directly to the electronic device by wire or wirelessly. The electronic device then performs video decompression (which is the reverse process of the video compression described above), for example, by parsing the encoded video bitstream to obtain semantic elements from the bitstream, and reconstructing digital video data from the encoded video bitstream to its original format based at least in part on the semantic elements obtained from the bitstream, and the electronic device presents the reconstructed digital video data on a display of the electronic device.

[0011] As digital video quality changes from HD to 4K×2K or even 8K×4K, the amount of video data to be encoded / decoded increases exponentially. How to encode / decode video data more efficiently while maintaining the image quality of the decoded video data is a long-standing challenge.

[0012] In the Joint Video Experts Group (JVET) meeting, JVET defined the first draft of Versatile Video Coding (VVC) and the VVC Test Model 1 (VTM1) coding method. It was decided to include quadtrees with nested multi-type trees using binary split and ternary split codec block structures as the initial new codec features of VVC. Since then, the reference software VTM and the draft VVC decoding process for implementing the coding method have been developed during the JVET meetings. Summary of the invention

[0013] In general, this disclosure describes examples of techniques related to video coding for deriving affine motion vectors for chroma components.

[0014] According to a first aspect of the present disclosure, a method for video encoding and decoding is provided, the method comprising: arranging video data in a plurality of luminance sub-blocks and a plurality of chrominance sub-blocks, wherein each chrominance sub-block corresponds to one or more luminance sub-blocks; and deriving an affine motion vector for a chrominance sub-block in the plurality of chrominance sub-blocks using a motion vector of the corresponding luminance sub-block; wherein the video data has a color sub-sampling format, and the corresponding luminance sub-block is obtained according to the color sub-sampling format.

[0015] According to a second aspect of the present disclosure, a device for video encoding and decoding is provided, the device comprising: a processor; and a memory, the memory being configured to store instructions executable by the processor; wherein the processor is configured, when executing the instructions, to: arrange video data in a plurality of luminance sub-blocks and a plurality of chrominance sub-blocks, wherein each chrominance sub-block corresponds to one or more luminance sub-blocks; and derive an affine motion vector for a chrominance sub-block in the plurality of chrominance sub-blocks using a motion vector of the corresponding luminance sub-block; wherein the video data has a color sub-sampling format, and the corresponding luminance sub-block is obtained according to the color sub-sampling format.

[0016] According to a third aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, the non-transitory computer-readable storage medium including instructions stored therein, wherein when the instructions are executed by a processor, the instructions cause the processor to: arrange video data in a plurality of luminance sub-blocks and a plurality of chrominance sub-blocks, wherein each chrominance sub-block corresponds to one or more luminance sub-blocks; and derive an affine motion vector for a chrominance sub-block in the plurality of chrominance sub-blocks using a motion vector of the corresponding luminance sub-block; wherein the video data has a color sub-sampling format, and the corresponding luminance sub-block is obtained according to the color sub-sampling format. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] A more detailed description of examples of the present disclosure will be presented by reference to specific examples shown in the accompanying drawings. Given that these drawings depict only some examples and are therefore not to be considered limiting of scope, the examples will be described and explained with additional specificity and detail through the use of the accompanying drawings.

[0018] Figure 1 is a block diagram illustrating an exemplary video encoding and decoding system according to some embodiments of the present disclosure.

[0019] Figure 2 is a block diagram illustrating an exemplary video encoder according to some embodiments of the present disclosure.

[0020] Figure 3 is a block diagram illustrating an exemplary video decoder according to some embodiments of the present disclosure.

[0021] Figure 4 is a schematic diagram illustrating an affine motion model based on control points according to some embodiments of the present disclosure.

[0022] Figure 5 is a schematic diagram showing an affine motion vector field (MVF) for each sub-block of a block according to some embodiments of the present disclosure.

[0023] Figure 6 is a schematic diagram showing the location of inherited affine motion predictors according to some embodiments of the present disclosure.

[0024] Figure 7 is a schematic diagram illustrating inheritance of control point motion vectors according to some embodiments of the present disclosure.

[0025] Figure 8 is a schematic diagram showing the locations of candidates for constructing an affine merge pattern according to some embodiments of the present disclosure.

[0026] Fig. 9 is a schematic diagram illustrating the use of motion vectors for the proposed combination method according to some embodiments of the present disclosure.

[0027] Fig.10 is a schematic diagram illustrating various YUV sampling formats according to some embodiments of the present disclosure.

[0028] Fig.11 is a schematic diagram showing the correspondence between luma sub-blocks (L1, L2, L3, and L4) and chroma sub-blocks C in a YUV format 4:2:0 according to some embodiments of the present disclosure.

[0029] Fig.12is a block diagram illustrating an exemplary apparatus for video encoding and decoding according to some embodiments of the present disclosure.

[0030] Fig.13 is a flow chart illustrating an exemplary process of video encoding and decoding for deriving affine motion vectors for chroma components according to some embodiments of the present disclosure. DETAILED DESCRIPTION

[0031] Reference will now be made in detail to specific embodiments, examples of which are illustrated in the accompanying drawings. In the following detailed description, numerous non-limiting specific details are set forth to aid in understanding the subject matter presented herein. However, it will be apparent to one of ordinary skill in the art that various alternatives may be used. For example, it will be apparent to one of ordinary skill in the art that the subject matter presented herein may be implemented on many types of electronic devices having digital video capabilities.

[0032] The description of an element in each figure may refer to elements in other figures. Like numbers may refer to like elements in the figures, including alternative embodiments of like elements.

[0033] References throughout this specification to "one embodiment," "an embodiment," "an example," "some embodiments," "some examples," or similar language indicate that the particular feature, structure, or characteristic being described is included in at least one embodiment or example. Thus, instances of the phrases "in one embodiment," "in an example," "in some embodiments," and similar language throughout this specification may, but do not necessarily, all refer to the same embodiment(s). It may or may not include all of the disclosed embodiments. Unless explicitly stated otherwise, features, structures, elements, or characteristics described in conjunction with one or some embodiments also apply to other embodiments.

[0034] The schematic flow charts and / or schematic block diagrams in the accompanying drawings illustrate the architecture, functions and operations of possible implementations of different devices, systems, methods and program products according to various embodiments. In this regard, each box in the schematic flow charts and / or schematic block diagrams may represent a part of a module, segment or code, which includes one or more executable instructions of the code for implementing (multiple) specified logical functions. However, those skilled in the relevant art will recognize that the flow chart does not necessarily need to be practiced in the order shown, and can be practiced without one or more specific steps or with other steps not shown.

[0035] It should also be noted that in some alternative implementations, the functions indicated in the identified blocks may not occur in the order indicated in the drawings. For example, two blocks shown in succession may actually be executed substantially simultaneously, or the blocks may sometimes be executed in reverse order, depending on the functions involved. Other steps and methods may be conceived to be equivalent in function, logic or effect to one or more blocks or portions thereof of the drawings shown.

[0036] The terms used in the present disclosure are only for the purpose of describing specific examples and are not intended to limit the present disclosure. Unless expressly stated otherwise, the terms "include", "comprising", "having" and variations thereof mean "including but not limited to".

[0037] It should also be understood that these terms specify the presence of stated features, integers, steps, operations, elements and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0038] Unless expressly stated otherwise, an enumerated listing of items does not imply that any or all of the items are mutually exclusive.

[0039] As used in this disclosure and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well and should be interpreted as equivalent to "one or more" or "at least one," unless the context clearly indicates otherwise.

[0040] It should be understood that the term "and / or" as used herein refers to and includes any and all possible combinations of one or more associated listed items. For example, "A and / or B" may refer to any of the following three combinations: only A exists, only B exists, and both A and B exist.

[0041] The character " / " generally indicates an "or" relationship of associated items, but may also include an "and" relationship of associated items. For example, "A / B" may also include the coexistence of both A and B unless the context indicates otherwise.

[0042] Throughout this disclosure, unless otherwise explicitly stated, the terms "first", "second", "third", etc. are used as names used only to refer to related elements (e.g., devices, components, compositions, steps, etc.) without implying any spatial or temporal order. For example, "first device" and "second device" may refer to two separately formed devices, or two parts, components or operating states of the same device, and may be named arbitrarily.

[0043] The first element and the second element may exist independently. For example, some embodiments may include only the second element without any first element. Therefore, the second element may be described before the first element is described or without describing the first element. For example, the "first step" of a method or process may be performed or executed after the "second step" or simultaneously with the "second step".

[0044] As used herein, the terms "if" or "when..." may be understood to mean "at..." or "in response to...", depending on the context. These terms, if they appear in a claim, may not indicate that the associated limitation or feature is conditional or optional. For example, a method may include the following steps: i) when condition X exists or if condition X exists, perform function or action X', and ii) when condition Y exists or if condition Y exists, perform function or action Y'. It may be necessary to implement the method with the ability to perform function or action X' and the ability to perform function or action Y', and both functions X' and Y' may be performed at different times when the method is performed multiple times. The method may also be implemented with the ability to detect or evaluate that condition X is satisfied and the ability to detect or evaluate that condition Y is satisfied.

[0045] The terms "module", "sub-module", "circuit", "sub-circuit", "circuitry", "sub-circuitry", "unit", or "sub-unit" may include memory (shared, dedicated, or group) that stores code or instructions that can be executed by one or more processors. A module may include one or more circuits with or without stored code or instructions. A module or circuit may include one or more components that are directly or indirectly connected. These components may or may not be physically attached to each other or located adjacent to each other.

[0046] A unit or module may be implemented purely by software, purely by hardware, or by a combination of hardware and software. In a pure software implementation, for example, a unit or module may include functionally related code blocks or software components that are directly or indirectly linked together to perform a specific function.

[0047] The picture partitioning structure divides the input video into blocks called coding tree units (CTUs). CTUs are split into coding units (CUs) using a quadtree with a nested multi-type tree structure, and a leaf coding unit (CU) defines a region that shares the same prediction mode (e.g., intra or inter).

[0048] In this disclosure, the term "unit" defines an area of ​​an image that contains all components; and the term "block" is used to define an area that contains a specific component (e.g., luma), and may differ in spatial location when considering chroma sampling formats (such as 4:2:0). Fig.10As shown in , when the yuv 4:2:0 format is used, the 2N×2N block 1002 may include 2N×2N luma pixels (samples) and two N×N chroma pixels 1004; when the yuv 4:2:2 format is used, the 2N×2N block 1002 may include 2N×2N luma pixels (samples) and two N×2N chroma pixels 1006; when the yuv 4:4:4 format is used, the 2N×2N block 1002 may include 2N×2N luma pixels (samples) and two 2N×2N chroma pixels 1008. In the present disclosure, references to luma blocks and their corresponding chroma blocks (or vice versa) are references to the 2N×2N blocks. Fig.10 The corresponding relationships shown in the reference.

[0049] like Fig.11 As shown in , in some aspects, a block may be partitioned into sub-blocks and the partitioning may not be applied equally to luma blocks and chroma blocks. Fig.11 As shown in , in the YUV 4:2:0 format, the 16×16 luma block 1102 can be divided into sixteen 4×4 sub-blocks 1104; and each chroma block in its corresponding 8×8 chroma block 1122 is divided into four 4×4 chroma sub-blocks 1124. Therefore, each 4×4 chroma sub-block (e.g., chroma sub-block C) corresponds to four 4×4 luma sub-blocks (e.g., luma sub-blocks L1, L2, L3, and L4).

[0050] Thus, the video data is arranged in a plurality of luma sub-blocks and a plurality of chroma sub-blocks, wherein each chroma sub-block corresponds to one or more luma sub-blocks.

[0051] Figure 1 is a block diagram illustrating an exemplary system 10 for encoding and decoding video blocks according to some embodiments of the present disclosure. Figure 1 As shown in , system 10 includes a source device 12 that generates and encodes video data to be later decoded by a target device 14. Source device 12 and target device 14 may be any of a wide variety of electronic devices, including desktop or laptop computers, tablet computers, smart phones, set-top boxes, digital televisions, cameras, display devices, digital media players, video game consoles, video streaming devices, etc. In some implementations, source device 12 and target device 14 are equipped with wireless communication capabilities.

[0052] In some embodiments, the target device 14 may receive the encoded video data to be decoded via the link 16. The link 16 may be any type of communication medium or device capable of moving the encoded video data from the source device 12 to the target device 14. In one example, the link 16 may be a communication medium that enables the source device 12 to send the encoded video data directly to the target device 14 in real time. The encoded video data may be modulated according to a communication standard (such as a wireless communication protocol) and sent to the target device 14. The communication medium may be any wireless or wired communication medium, such as a radio frequency (RF) spectrum or one or more physical transmission lines. The communication medium may form a portion of a packet-based network (e.g., a local area network, a wide area network, or a global network such as the Internet). The communication medium may include a router, a switch, a base station, or any other device that may be useful in facilitating communication from the source device 12 to the target device 14.

[0053] In some other embodiments, the encoded video data may be sent from the output interface 22 to the storage device 32. Subsequently, the encoded video data in the storage device 32 may be accessed by the target device 14 via the input interface 28. The storage device 32 may include any of a variety of distributed or locally accessed data storage media, such as a hard drive, a Blu-ray disc, a DVD, a CD-ROM, a flash memory, a volatile or non-volatile memory, or any other suitable digital storage medium for storing encoded video data. In another example, the storage device 32 may correspond to a file server or another intermediate storage device that can hold the encoded video data generated by the source device 12. The target device 14 may access the stored video data from the storage device 32 via streaming or downloading. The file server may be any type of computer capable of storing encoded video data and sending the encoded video data to the target device 14. Exemplary file servers include a web server (e.g., for a website), an FTP server, a network attached storage (NAS) device, or a local disk drive. The target device 14 can access the encoded video data through any standard data connection suitable for accessing the encoded video data stored on the file server, including a wireless channel (e.g., a Wi-Fi connection), a wired connection (e.g., DSL, cable modem, etc.), or a combination of both wireless channels and wired connections. The transmission of the encoded video data from the storage device 32 can be a streaming transmission, a download transmission, or a combination of both.

[0054] like Figure 1As shown in , source device 12 includes video source 18, video encoder 20 and output interface 22. Video source 18 may include sources such as or a combination of such sources: a video capture device (e.g., a camera), a video archive containing previously captured video, a video feed interface for receiving video from a video content provider, and / or a computer graphics system for generating computer graphics data as source video. As an example, if video source 18 is a camera of a security monitoring system, source device 12 and target device 14 may be camera phones or video phones. However, the embodiments described in the present disclosure may be generally applicable to video encoding and decoding, and may be applied to wireless and / or wired applications.

[0055] Captured, pre-captured or computer-generated video may be encoded by video encoder 20. Encoded video data may be sent directly to target device 14 via output interface 22 of source device 12. Encoded video data may also (or alternatively) be stored on storage device 32 for later access by target device 14 or other devices for decoding and / or playback. Output interface 22 may further include a modem and / or a transmitter.

[0056] Target device 14 includes input interface 28, video decoder 30, and display device 34. Input interface 28 may include a receiver and / or a modem and receives encoded video data via link 16. The encoded video data communicated via link 16 or provided on storage device 32 may include various semantic elements generated by video encoder 20 for use by video decoder 30 in decoding the video data. Such semantic elements may be included in the encoded video data sent over a communication medium, stored on a storage medium, or stored on a file server.

[0057] In some implementations, the target device 14 may include a display device 34, which may be an integrated display device or an external display device configured to communicate with the target device 14. The display device 34 displays the decoded video data to a user and may be any of a variety of display devices, such as a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or another type of display device.

[0058] The video encoder 20 and the video decoder 30 may operate according to a proprietary standard or an industry standard (such as, VVC, HEVC, MPEG-4, Part 10, Advanced Video Coding (AVC)) or an extension of such a standard. It should be understood that the present disclosure is not limited to a specific video encoding / decoding standard and may be applicable to other video encoding / decoding standards. It is generally believed that the video encoder 20 of the source device 12 may be configured to encode video data according to any of these current standards or future standards. Similarly, it is also generally believed that the video decoder 30 of the target device 14 may be configured to decode video data according to any of these current standards or future standards.

[0059] The video encoder 20 and the video decoder 30 may be implemented as any of a variety of suitable encoder circuit systems, such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), discrete logic, software, hardware, firmware, or any combination thereof. When partially implemented in software, the electronic device may store instructions for the software in a suitable non-transitory computer-readable medium and use one or more processors to execute the instructions in the hardware to perform the video encoding / decoding operations disclosed in the present disclosure. Each of the video encoder 20 and the video decoder 30 may be included in one or more encoders or decoders, and either of the encoders or decoders may be integrated as part of a combined encoder / decoder (CODEC) in the corresponding device.

[0060] Figure 2 is a block diagram illustrating an exemplary video encoder 20 according to some embodiments described in the present disclosure. The video encoder 20 may perform intra-frame prediction encoding and inter-frame prediction encoding of video blocks within a video frame. Intra-frame prediction encoding relies on spatial prediction to reduce or remove spatial redundancy in video data within a given video frame or picture. Inter-frame prediction encoding relies on temporal prediction to reduce or remove temporal redundancy in video data within adjacent video frames or pictures of a video sequence.

[0061] like Figure 2As shown in FIG. 1 , the video encoder 20 includes a video data memory 40, a prediction processing unit 41, a decoded picture buffer (DPB) 64, an adder 50, a transform processing unit 52, a quantization unit 54, and an entropy coding unit 56. The prediction processing unit 41 further includes a motion estimation unit 42, a motion compensation unit 44, a segmentation unit 45, an intra-frame prediction processing unit 46, and an intra-frame block copy (BC) unit 48. In some embodiments, the video encoder 20 also includes an inverse quantization unit 58, an inverse transform processing unit 60, and an adder 62 for video block reconstruction. A deblocking filter (not shown) may be located between the adder 62 and the DPB 64 to filter the block boundaries to remove block effects from the reconstructed video. In addition to the deblocking filter, a loop filter (not shown) may also be used to filter the output of the adder 62. The video encoder 20 may take the form of a fixed or programmable hardware unit, or may be dispersed in one or more of the fixed or programmable hardware units.

[0062] Video data memory 40 may store video data to be encoded by components of video encoder 20. The video data in video data memory 40 may be obtained, for example, from video source 18. DPB 64 is a buffer that stores reference video data for use by video encoder 20 (e.g., in intra-frame or inter-frame prediction coding mode) when encoding video data. Video data memory 40 and DPB 64 may be any of a variety of memory devices. In various examples, video data memory 40 may be on-chip with other components of video encoder 20, or off-chip relative to those components.

[0063] like Figure 2 As shown in , after receiving the video data, the segmentation unit 45 within the prediction processing unit 41 segments the video data into video blocks. This segmentation may also include segmenting the video frame into slices, tiles, or other larger coding units (CUs) according to a predefined splitting structure associated with the video data (such as a quadtree structure). The video frame may be divided into a plurality of video blocks (or a set of video blocks referred to as tiles). The prediction processing unit 41 may select one of a plurality of possible prediction codec modes for the current video block based on error results (e.g., coding rate and distortion level), such as one of one or more inter-frame prediction codec modes in a plurality of intra-frame prediction codec modes. The prediction processing unit 41 may provide the resulting intra-frame prediction codec block or inter-frame prediction codec block to the adder 50 to generate a residual block, and to the adder 62 to reconstruct the coding block for subsequent use as part of a reference frame. The prediction processing unit 41 also provides semantic elements (such as motion vectors, intra-frame mode indicators, segmentation information, and other such semantic information) to the entropy coding unit 56.

[0064] To select an appropriate intra-prediction coding mode for the current video block, intra-prediction processing unit 46 within prediction processing unit 41 may perform intra-prediction coding of the current video block relative to one or more neighboring blocks in the same frame as the current block to be coded to provide spatial prediction. Motion estimation unit 42 and motion compensation unit 44 within prediction processing unit 41 may perform inter-prediction coding of the current video block relative to one or more prediction blocks in one or more reference frames to provide temporal prediction. Video encoder 20 may perform multiple coding passes, for example, to select an appropriate coding mode for each block of video data.

[0065] In some embodiments, motion estimation unit 42 determines the inter-prediction mode for the current video frame by generating a motion vector according to a predetermined pattern within a sequence of video frames, the motion vector indicating the displacement of a prediction unit (PU) of a video block within the current video frame relative to a prediction block within a reference video frame. Motion estimation performed by motion estimation unit 42 is the process of generating motion vectors that estimate the motion of video blocks. For example, a motion vector may indicate the displacement of a PU of a video block within a current video frame or picture relative to a prediction block (or other codec unit) within a reference frame, the prediction block being relative to a current block (or other codec unit) being encoded within the current frame. The predetermined pattern may designate video frames in the sequence as P frames or B frames. Intra BC unit 48 may determine vectors (e.g., block vectors) for intra BC encoding in a manner similar to the determination of motion vectors by motion estimation unit 42 for inter prediction, or may utilize motion estimation unit 42 to determine block vectors.

[0066] A prediction block is a block of a reference frame that is considered to closely match the PU of the video block to be coded in terms of pixel differences, which may be determined by the sum of absolute differences (SAD), the sum of squared differences (SSD), or other difference metrics. In some embodiments, the video encoder 20 may calculate values ​​for sub-integer pixel positions of the reference frame stored in the DPB 64. For example, the video encoder 20 may interpolate values ​​for quarter-pixel positions, eighth-pixel positions, or other fractional pixel positions of the reference frame. Thus, the motion estimation unit 42 may perform a motion search relative to the full pixel positions and the fractional pixel positions, and output a motion vector with fractional pixel precision.

[0067] Motion estimation unit 42 calculates a motion vector for a PU of a video block in an inter-prediction codec frame by comparing the position of the PU with the position of a prediction block of a reference frame selected from a first reference frame list (e.g., list 0) or a second reference frame list (e.g., list 1), each of which identifies one or more reference frames stored in DPB 64. Motion estimation unit 42 sends the calculated motion vector to motion compensation unit 44 and then to entropy encoding unit 56.

[0068] The motion compensation performed by the motion compensation unit 44 may involve extracting or generating a prediction block based on the motion vector determined by the motion estimation unit 42. Upon receiving the motion vector for the PU of the current video block, the motion compensation unit 44 may locate the prediction block pointed to by the motion vector in one of the reference frame lists, retrieve the prediction block from the DPB 64, and forward the prediction block to the adder 50. The adder 50 then forms a residual video block of pixel difference values ​​by subtracting the pixel values ​​of the prediction block provided by the motion compensation unit 44 from the pixel values ​​of the current video block being encoded and decoded. The pixel difference values ​​forming the residual video block may include a luma difference component or a chroma difference component or both. The motion compensation unit 44 may also generate semantic elements associated with the video block of the video frame for use by the video decoder 30 when decoding the video block of the video frame. The semantic elements may include, for example, semantic elements defining a motion vector for identifying a prediction block, any flag indicating a prediction mode, or any other semantic information described herein. Note that the motion estimation unit 42 and the motion compensation unit 44 may be highly integrated, but they are described separately for conceptual purposes.

[0069] In some embodiments, the intra BC unit 48 may generate vectors and extract prediction blocks in a manner similar to that described above in conjunction with the motion estimation unit 42 and the motion compensation unit 44, but these prediction blocks are in the same frame as the current block being encoded and decoded, and these vectors are referred to as block vectors rather than motion vectors. Specifically, the intra BC unit 48 may determine the intra prediction mode to be used to encode the current block. In some examples, the intra BC unit 48 may encode the current block using various intra prediction modes, for example, during separate encoding passes, and test their performance through rate-distortion analysis. Next, the intra BC unit 48 may select a suitable intra prediction mode to use among the various tested intra prediction modes and generate an intra mode indicator accordingly. For example, the intra BC unit 48 may calculate rate-distortion values ​​for the various tested intra prediction modes using rate-distortion analysis, and select the intra prediction mode with the best rate-distortion characteristics among the tested modes as the suitable intra prediction mode to use. The rate-distortion analysis generally determines the amount of distortion (or error) between a coded block and the original uncoded block that was encoded to produce the coded block, as well as the bit rate (i.e., the number of bits) used to produce the coded block. Intra BC unit 48 may calculate ratios from the distortions and rates for the various coded blocks to determine which intra-prediction mode exhibits the best rate-distortion value for the block.

[0070] In other examples, intra BC unit 48 may use, in whole or in part, motion estimation unit 42 and motion compensation unit 44 to perform such functions for intra BC prediction in accordance with embodiments described herein. In either case, for intra block copying, the prediction block may be a block that is considered to closely match the block to be encoded in terms of pixel differences, which may be determined by sum of absolute differences (SAD), sum of squared differences (SSD), or other difference metrics, and identification of the prediction block may include calculating values ​​for sub-integer pixel positions.

[0071] Regardless of whether the prediction block is from the same frame according to intra-frame prediction or from a different frame according to inter-frame prediction, video encoder 20 can form pixel difference values ​​by subtracting the pixel values ​​of the prediction block from the pixel values ​​of the current video block being decoded, thereby forming a residual video block. The pixel difference values ​​forming the residual video block may include both luma component differences and chroma component differences.

[0072] As an alternative to the inter-frame prediction performed by the motion estimation unit 42 and the motion compensation unit 44 or the intra-frame block copy prediction performed by the intra BC unit 48 as described above, the intra-frame prediction processing unit 46 may perform intra-frame prediction on the current video block. Specifically, the intra-frame prediction processing unit 46 may determine an intra-frame prediction mode for encoding the current block. To do so, the intra-frame prediction processing unit 46 may use various intra-frame prediction modes to encode the current block, for example, during separate encoding passes, and the intra-frame prediction processing unit 46 (or in some examples, the mode selection unit) may select a suitable intra-frame prediction mode from the tested intra-frame prediction modes to use. The intra-frame prediction processing unit 46 may provide information indicating the intra-frame prediction mode selected for the block to the entropy encoding unit 56. The entropy encoding unit 56 may encode the information indicating the selected intra-frame prediction mode into the bitstream.

[0073] After prediction processing unit 41 determines a prediction block for the current video block via inter-prediction or intra-prediction, adder 50 forms a residual video block by subtracting the prediction block from the current video block. The residual video data in the residual block may be included in one or more transform units (TUs) and provided to transform processing unit 52. Transform processing unit 52 transforms the residual video data into residual transform coefficients using a transform, such as a discrete cosine transform (DCT) or a conceptually similar transform.

[0074] Transform processing unit 52 may send the resulting transform coefficients to quantization unit 54. Quantization unit 54 quantizes the transform coefficients to further reduce the bit rate. The quantization process may also reduce the bit depth associated with some or all of the coefficients. The degree of quantization may be modified by adjusting a quantization parameter. In some examples, quantization unit 54 may then perform a scan of the matrix including the quantized transform coefficients. Alternatively, entropy encoding unit 56 may perform the scan.

[0075] After quantization, entropy encoding unit 56 entropy encodes the quantized transform coefficients into a video bitstream using, for example, context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), semantic-based context adaptive binary arithmetic coding (SBAC), probability interval partitioning entropy (PIPE) coding, or another entropy coding method or technique. The encoded bitstream may then be sent to video decoder 30, or archived in storage device 32 for later sending to or retrieval by video decoder 30. Entropy encoding unit 56 may also entropy encode motion vectors and other semantic elements for the current video frame being encoded or decoded.

[0076] Inverse quantization unit 58 and inverse transform processing unit 60 apply inverse quantization and inverse transform, respectively, to reconstruct the residual video block in the pixel domain for use in generating reference blocks for predicting other video blocks. As noted above, motion compensation unit 44 may generate a motion compensated prediction block from one or more reference blocks of a frame stored in DPB 64. Motion compensation unit 44 may also apply one or more interpolation filters to the prediction block to calculate sub-integer pixel values ​​for use in motion estimation.

[0077] Adder 62 adds the reconstructed residual block to the motion compensated prediction block produced by motion compensation unit 44 to produce a reference block for storage in DPB 64. The reference block may then be used as a prediction block by intra BC unit 48, motion estimation unit 42, and motion compensation unit 44 to inter-predict another video block in a subsequent video frame.

[0078] Figure 3 is a block diagram illustrating an exemplary video decoder 30 according to some embodiments of the present disclosure. The video decoder 30 includes a video data memory 79, an entropy decoding unit 80, a prediction processing unit 81, an inverse quantization unit 86, an inverse transform processing unit 88, an adder 90, and a DPB 92. The prediction processing unit 81 further includes a motion compensation unit 82, an intra-frame prediction unit 84, and an intra-frame BC unit 85. The video decoder 30 may perform the above-mentioned operations in combination with the above-mentioned operations. Figure 2 The encoding process described with respect to video encoder 20 is generally the reciprocal decoding process. For example, motion compensation unit 82 may generate prediction data based on motion vectors received from entropy decoding unit 80, while intra-prediction unit 84 may generate prediction data based on intra-prediction mode indicators received from entropy decoding unit 80.

[0079] In some examples, units of the video decoder 30 may be tasked to perform embodiments of the present disclosure. Furthermore, in some examples, embodiments of the present disclosure may be dispersed in one or more of the multiple units of the video decoder 30. For example, the intra BC unit 85 may perform embodiments of the present disclosure alone or in combination with other units of the video decoder 30, such as the motion compensation unit 82, the intra prediction unit 84, and the entropy decoding unit 80. In some examples, the video decoder 30 may not include the intra BC unit 85, and the functions of the intra BC unit 85 may be performed by other components of the prediction processing unit 81, such as the motion compensation unit 82.

[0080] The video data memory 79 may store video data, such as an encoded video bitstream, to be decoded by other components of the video decoder 30. The video data stored in the video data memory 79 may be obtained, for example, from the storage device 32, from a local video source (such as a camera), via a wired or wireless network communication of video data, or by accessing a physical data storage medium (e.g., a flash drive or hard disk). The video data memory 79 may include a coded picture buffer (CPB) that stores encoded video data from an encoded video bitstream. A decoded picture buffer (DPB) 92 of the video decoder 30 stores reference video data for use by the video decoder 30 when decoding the video data (e.g., in an intra-frame or inter-frame prediction codec mode). The video data memory 79 and the DPB 92 may be formed by any of a variety of memory devices, such as dynamic random access memory (DRAM) (including synchronous DRAM (SDRAM)), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. For illustrative purposes, the video data memory 79 and the DPB 92 are stored in a plurality of memory devices. Figure 3 9 as two different components of video decoder 30. However, it will be apparent to those skilled in the art that video data memory 79 and DPB 92 may be provided by the same memory device or separate memory devices. In some examples, video data memory 79 may be on-chip with other components of video decoder 30, or off-chip relative to those components.

[0081] During the decoding process, the video decoder 30 receives an encoded video bitstream, which represents video blocks and associated semantic elements of an encoded video frame. The video decoder 30 may receive the semantic elements at the video frame level and / or the video block level. The entropy decoding unit 80 of the video decoder 30 entropy decodes the bitstream to generate quantization coefficients, motion vectors or intra-frame prediction mode indicators, and other semantic elements. The entropy decoding unit 80 then forwards the motion vectors and other semantic elements to the prediction processing unit 81.

[0082] When a video frame is encoded and decoded as an intra-frame prediction codec (I) frame or an intra-frame prediction block in another type of frame, the intra-frame prediction unit 84 of the prediction processing unit 81 can generate prediction data for the video block of the current video frame based on the intra-frame prediction mode transmitted by the signal and the reference data from the previously decoded block of the current frame.

[0083] When the video frame is encoded and decoded as an inter-frame prediction codec (i.e., B or P) frame, the motion compensation unit 82 of the prediction processing unit 81 generates one or more prediction blocks for the video block of the current video frame based on the motion vector and other semantic elements received from the entropy decoding unit 80. Each of the prediction blocks can be generated from a reference frame in one of the reference frame lists. The video decoder 30 can construct a reference frame list, such as List 0 and List 1, based on the reference frames stored in the DPB 92 using a default construction technique.

[0084] In some examples, when a video block is encoded and decoded according to the intra BC mode described herein, intra BC unit 85 of prediction processing unit 81 generates a prediction block for the current video block based on the block vector and other semantic elements received from entropy decoding unit 80. The prediction block may be within a reconstructed region of the same picture as the current video block as defined by video encoder 20.

[0085] The motion compensation unit 82 and / or the intra BC unit 85 determine prediction information for a video block of the current video frame by parsing the motion vector and other semantic elements, and then use the prediction information to generate a prediction block for the current video block being decoded. For example, the motion compensation unit 82 uses some of the received semantic elements to determine a prediction mode (e.g., intra prediction or inter prediction) for encoding and decoding a video block of a video frame, an inter prediction frame type (e.g., B or P), construction information for one or more of the reference frame lists for the frame, motion vectors for each inter prediction coded video block of the frame, inter prediction states for each inter prediction coded video block of the frame, and other information for decoding a video block in the current video frame.

[0086] Similarly, the intra BC unit 85 may use some of the received semantic elements, such as flags, to determine whether the current video block is predicted using intra BC mode, construction information of which video blocks of the frame are within the reconstruction region and should be stored in the DPB 92, block vectors for each intra BC predicted video block of the frame, intra BC prediction status for each intra BC predicted video block of the frame, and other information for decoding the video blocks in the current video frame.

[0087] Motion compensation unit 82 may also perform interpolation using interpolation filters as used by video encoder 20 during encoding of the video block to calculate interpolated values ​​for sub-integer pixels of a reference block. In this case, motion compensation unit 82 may determine the interpolation filters used by video encoder 20 from the received syntax elements and use these interpolation filters to produce the prediction block.

[0088] Inverse quantization unit 86 inverse quantizes the quantized transform coefficients provided in the bitstream and entropy decoded by entropy decoding unit 80 using the same parameters calculated by video encoder 20 for each video block in the video frame to determine the degree of quantization. Inverse transform processing unit 88 applies an inverse transform (e.g., an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process) to the transform coefficients to reconstruct the residual block in the pixel domain.

[0089] After the motion compensation unit 82 or the intra BC unit 85 generates a prediction block for the current video block based on the vector and other semantic elements, the adder 90 reconstructs the decoded video block for the current video block by adding the residual block from the inverse transform processing unit 88 to the corresponding prediction block generated by the motion compensation unit 82 and the intra BC unit 85. A loop filter (not shown) may be located between the adder 90 and the DPB 92 to further process the decoded video block. The decoded video blocks in a given frame are then stored in the DPB 92, which stores reference frames for subsequent motion compensation of the next video block. The DPB 92 or a memory device separate from the DPB 92 may also store the decoded video for later presentation on a display device (such as, Figure 1 on a display device 34).

[0090] In a typical video encoding and decoding process, a video sequence usually includes an ordered set of frames or pictures. Each frame may include three sample arrays, denoted as SL, SCb, and SCr. SL is a two-dimensional array of luma samples. SCb is a two-dimensional array of Cb chroma samples. SCr is a two-dimensional array of Cr chroma samples. In other cases, a frame may be monochrome and therefore include only a two-dimensional array of luma samples.

[0091] Figure 4 is a schematic diagram showing an affine motion model based on control points according to some embodiments of the present disclosure. In HEVC, only the translation motion model is applied to motion compensated prediction (MCP). However, in the real world, there are many kinds of motions, such as zooming in / out, rotation, perspective motion, and other irregular motions. In VTM3, block-based affine transformation motion compensated prediction is applied. Figure 4 As shown in , the affine motion field of a block is described by motion information of two control point motion vectors (4 parameters) or three control point motion vectors (6 parameters).

[0092] For the 4-parameter affine motion model 410, the motion vector at the sample location (x, y) in the block is derived as:

[0093]

[0094] For the 6-parameter affine motion model 420, the motion vector at the sample location (x, y) in the block is derived as:

[0095]

[0096] Where (mv 0x ,mv 0y ) is the motion vector of the upper left control point, (mv 1x ,mv 1y ) is the motion vector of the upper right control point, and (mv 2x ,mv 2y ) is the motion vector of the lower left control point.

[0097] Figure 5 is a schematic diagram showing an affine motion vector field (MVF) for each sub-block 504 of block 502 according to some embodiments of the present disclosure. In order to simplify motion compensation prediction, block-based affine transformation prediction is applied. In order to derive the motion vector of each 4×4 luminance sub-block, as Figure 5 As shown in , the motion vector of the center sample of each subblock is calculated according to the above equation and rounded to 1 / 16 fractional precision. Then, a motion compensated interpolation filter is applied to generate a prediction for each subblock using the derived motion vector. The subblock size of the chrominance component is also set to 4×4. The motion vector (MV) of the 4×4 chrominance subblock is calculated as the average of the MVs of the four corresponding 4×4 luminance subblocks.

[0098] In some implementations, affine motion may be derived using the following process:

[0099] In stage 1: As shown in equations (3) and (4) below, the MV of the upper left control point (i.e., mv in equations (1) and (2)) is 0x and mv 0y ) is shifted left by 7 bits so as to be represented with higher precision for affine MV derivation. Here, cpMvLX[cpIdx][c] represents a list X (x can be 0 or 1) of control points cpIdx (cpIdx=0 represents the upper left control point, cpIdx=1 represents the upper right control point, and cpIdx=2 represents the lower left control point) and a component c (c=0 represents the horizontal component and c=1 represents the vertical component) of the MV.

[0100] mvScaleHor=cpMvLX[0][0]<<7 (3)

[0101] mvScaleVer=cpMvLX[0][1]<<7 (4)

[0102] At stage 2: the difference between the affine parameters mv 1x -mv0x 、mv 1y -mv 0y 、mv 2x -mv 0x and mv 2y -mv 0y is also shifted left by 7 bits and then divided by the block width or height, which can be achieved by a shift operation as shown below:

[0103] dHorX=(cpMvLX[1][0]-cpMvLX[0][0])<<(7-log2CbW) (5)

[0104] dVerX=(cpMvLX[1][1]-cpMvLX[0][1])<<(7-log2CbW) (6)

[0105] dHorY=(cpMvLX[2][0]-cpMvLX[0][0])<<(7-log2CbH) (7)

[0106] dVerY=(cpMvLX[2][1]-cpMvLX[0][1])<<(7-log2CbH) (8)

[0107] Here, the lowercase x of the affine parameter (e.g., mv 1x -mv 0x ) represents the x component (or horizontal component), and y represents the y component (or vertical component). The capital letter X in equations (3) to (8) is a variable used to indicate list 0MV or list 1MV (X can be 0 or 1).

[0108] The luma motion vector mvLX[xSbIdx][ySbIdx] for each luma subblock is derived using a control point based affine motion model as follows: xSbIdx and ySbIdx are the horizontal and vertical indices of the subblock, respectively; and xPosCb and yPosCb are the horizontal and vertical coordinates of the center sample of the associated subblock.

[0109] xPosCb = 2 + ( xSbIdx << 2 ) (9)

[0110] yPosCb = 2 + ( ySbIdx << 2 ) (10)

[0111] mvLX[ xSbIdx ][ ySbIdx ][ 0 ] = ( mvScaleHor + dHorX * xPosCb +dHorY * yPosCb ) (11)

[0112] mvLX[ xSbIdx ][ ySbIdx ][ 1 ] = ( mvScaleVer + dVerX * xPosCb +dVerY * yPosCb ) (12)

[0113] After the affine MVs are derived, they are right-shifted 7 bits to be represented at the original precision.

[0114] As done for translational motion inter prediction, there are also two affine motion inter prediction modes: affine merge mode and affine AMVP mode.

[0115] Affine merge mode can be applied to CUs whose width and height are both greater than or equal to 8. In this mode, the CPMV of the current CU is generated based on the motion information of spatially neighboring CUs. There may be up to five CPMVP candidates, and the index is signaled to indicate the CPMVP candidate to be used for the current CU. The following three types of CPMV candidates are used to form the affine merge candidate list:

[0116] 1) Inherited affine merge candidates inferred from the CPMV of neighboring CUs;

[0117] 2) constructing an affine merged candidate CPMVP derived using the translation MV of the neighboring CU; and

[0118] 3) Zero MV.

[0119] Figure 6 is a schematic diagram showing the location of the inherited affine motion predictor according to some embodiments of the present disclosure. In VTM3, there are at most two inherited affine candidates derived from the affine motion model of the neighboring blocks, one from the left neighboring CU and one from the upper neighboring CU. The candidate blocks of the current CU 610 are Figure 6 For the left predictor, the scan order is A0->A1, and for the upper predictor, the scan order is B0->B1->B2. Only the first successor candidate from each side is selected. No pruning check is performed between two successor candidates.

[0120] Figure 7 is a schematic diagram illustrating control point motion vector inheritance according to some embodiments of the present disclosure. When a neighboring affine CU 720 is identified, its control point motion vector is used to derive the CPMVP candidate in the affine merge list of the current CU 710. Figure 7As shown in , if the neighboring lower left block A is encoded and decoded in affine mode, motion vectors v2, v3, and v4 of the upper left corner, upper right corner, and lower left corner of CU720 containing block A are obtained. When block A is encoded and decoded using a 4-parameter affine model, two CPMVs of the current CU 710 are calculated based on v2 and v3. In the case where block A is encoded and decoded using a 6-parameter affine model, three CPMVs of the current CU 710 are calculated based on v2, v3, and v4.

[0121] Figure 8 is a schematic diagram showing the locations of the candidates for the constructed affine merge mode according to some embodiments of the present disclosure. The constructed affine candidate means that the candidate is constructed by combining the neighboring translation motion information of each control point. Figure 8 The specified spatial neighbors and temporal neighbors shown in derive the motion information for the control point. CPMV k (k=1,2,3,4) represents the kth control point of the current block 810. For CPMV1, check B2->B3->A2 blocks and use the MV of the first available block. For CPMV2, check B1->B0 blocks; and for CPMV3, check A1->A0 blocks. For TMVP, if available, use it as CPMV4.

[0122] After obtaining the MVs of the four control points, an affine merge candidate is constructed based on the motion information. The following combinations of control point MVs are used to construct in order:

[0123] {CPMV1,CPMV2,CPMV3},

[0124] {CPMV1,CPMV2,CPMV4},

[0125] {CPMV1,CPMV3,CPMV4},

[0126] {CPMV2,CPMV3,CPMV4},

[0127] {CPMV1, CPMV2}, and

[0128] {CPMV1,CPMV3}.

[0129] The combination of 3 CPMVs constructs a 6-parameter affine merge candidate, and the combination of 2 CPMVs constructs a 4-parameter affine merge candidate. To avoid the motion scaling process, the relevant combination of control point MVs is discarded if the reference indexes of the control points are different.

[0130] Affine AMVP mode can be applied to CUs with both width and height greater than or equal to 16. An affine flag in the CU level is signaled in the bitstream to indicate whether the affine AMVP mode is used, and then another flag is signaled to indicate whether it is 4-parameter affine or 6-parameter affine. In this mode, the difference between the CPMV of the current CU and the predictor CPMVP of the CPMV is signaled in the bitstream. The affine AVMP candidate list size is 2, and it is generated by using the following four types of CPVM candidates in order:

[0131] 1) Inherited affine AMVP candidates inferred from the CPMV of neighboring CUs;

[0132] 2) The constructed affine AMVP candidate CPMVP derived using the translation MV of the neighboring CU;

[0133] 3) translation MV from neighboring CU; and

[0134] 4) Zero MV.

[0135] The order of checking the inherited affine AMVP candidates is the same as that of checking the inherited affine merge candidates. The only difference is that for AVMP candidates, only affine CUs with the same reference picture as in the current block are considered. When the inherited affine motion predictor is inserted into the candidate list, the pruning process is not applied.

[0136] The AMVP candidates are constructed only from Figure 8 The specified spatial neighbors shown in derive. Use the same check order as done in affine merge candidate construction. In addition, the reference picture index of the neighboring blocks is also checked. Use the first block in the check order that is inter-coded and has the same reference picture as in the current CU.

[0137] If all three CPMVs are appended, they will be inserted into the affine AMVP list as is. If only mv0 and mv1 are available, mv2 is derived as follows:

[0138]

[0139] Where the current CU size is w × h. If only mv0 and mv2 are available, mv1 is derived as follows:

[0140]

[0141] After the inherited affine AMVP and the constructed affine AVMP are derived and inserted into the affine AMVP list, if the size of the affine AMVP list is still less than 2, the affine AMVP list will be filled with translation MVs (mv0, mv1, or mv2), which means that all control point MVs are predicted by any one of mv0, mv1, or mv2. Therefore, if the number of affine AMVP list candidates is less than 2, mv0, mv1, and mv2 will be added in order. The translation MV is used to predict all control point MVs of the current CU when available.

[0142] In VTM3, the CPMV of an affine CU is stored in a separate buffer. The stored CPMV is only used to generate inherited CPMVP for the most recently decoded CU in affine merge mode and affine AMVP mode. The sub-block MV derived from the CPMV is used for motion compensation, merging of translation MVs / MV derivation of AMVP lists, and deblocking.

[0143] Fig. 9 is a schematic diagram showing the use of motion vectors for the proposed combination method according to some embodiments of the present disclosure. In order to avoid picture row buffers for additional CPMV, the affine motion data inheritance from the CU in the upper CTU is handled differently from the inheritance from the normal neighboring CU. If the candidate CU for affine motion data inheritance is in the upper CTU row, the lower left sub-block MV and the lower right sub-block MV in the row buffer are used for affine MVP derivation instead of the CPMV. In this way, the CPMV is stored only in the local buffer. If the candidate CU is decoded by 6-parameter affine codec, the affine model is reduced to a 4-parameter model. Fig. 9 As shown in , along the top CTU boundary, the bottom left sub-block motion vector and the bottom right sub-block motion vector of the CU are used for affine inheritance of the CU in the bottom CTU.

[0144] The following describes an example of affine prediction using 4×4 sub-blocks for chroma components, where the YUV 4:2:0 format is used, that is, each 4×4 chroma sub-block corresponds to four 4×4 luminance sub-blocks. In one example, the minimum sub-block size of the chroma component is always set to 4×4. The MV of the 4×4 chroma sub-block is calculated as the average of the MVs of the four corresponding 4×4 luminance sub-blocks. As shown below, the MV for each chroma 4×4 block is derived using the average MV of the four MVs from the four corresponding luminance blocks. The four luminance MVs are in original precision, not in high precision (e.g., shifted left 7 bits). The decoding process of averaging the rounded luminance MVs is shown below.

[0145] Once the luma motion vector mvLX[xSbIdx][ySbIdx] is derived based on equations (9) to (12), a rounding process is called for the motion vector, which has as input mvX set equal to mvLX[xSbIdx][ySbIdx], rightShift set equal to 7, and leftShift set equal to 0, and has as output the rounded mvLX[xSbIdx][ySbIdx].

[0146] An example of a rounding process for a motion vector mvX is provided using the following equations (15) to (17). Here, the input to the process is: motion vector mvX; right shift parameter rightShift for rounding; and left shift parameter leftShift for increasing resolution. The output of the process is the rounded motion vector mvX. For rounding of mvX, the following equations apply:

[0147] offset = (rightShift = = 0)? 0 : ( 1 << ( rightShift - 1 ) )(15)

[0148] mvX[0]=((mvX[0]+offset-(mvX[0]>=0))>>rightShift)< <leftShift (16)

[0150] mvX[1]=((mvX[1]+offset-(mvX[1]>=0))>>rightShift)< <leftShift (17)

[0152] The average luma motion vector mvAvgLX is derived using equation (18) as follows. In some examples, an affine motion model based on control points may be used to derive an affine motion vector for a luma subblock in a plurality of luma subblocks. In some other examples, an affine motion model based on control points may be used to derive an affine motion vector for each luma subblock in a plurality of luma subblocks.

[0153]

[0154] The derivation process for the chroma motion vector is called with mvAvgLX as input and the chroma motion vector mvCLX[xSbIdx][ySbIdx] as output.

[0155] The following equations (19) and (20) are used to provide an example of the derivation process for the chroma motion vector based on the luma motion vector mvLX. Here, the input of the process is: the luma motion vector mvLX with 1 / 16 fractional sample accuracy; and the reference index refIdxLX. The output of the process is the chroma motion vector mvCLX with 1 / 32 fractional sample accuracy. The chroma motion vector is derived from the corresponding luma motion vector. The chroma motion vector mvCLX is derived as follows:

[0156] mvCLX[ 0 ] = mvLX[ 0 ] * 2 / SubWidthC (19)

[0157] mvCLX[ 1 ] = mvLX[ 1 ] * 2 / SubHeightC (20)

[0158] The variables SubWidthC and SubHeightC may be specified depending on the chroma format sampling structure, which is specified by chroma_format_idc and separate_colour_plane_flag. An example is provided in the following table:

[0159]

[0160] Other values ​​for chroma_format_idc, SubWidthC, and SubHeightC may be specified in the future.

[0161] The average of the four corresponding 4×4 luma sub-blocks can produce different MVs derived using the affine motion model for the chroma 4×4 block. When the user wants to derive an affine MV for a 4×4 chroma block, the MV of the corresponding luma block must be generated using the affine motion model and then rounded to the MV precision (e.g., 1 / 16 pixel) used to perform motion compensation. The rounded MVs are then averaged to obtain the MV for the 4×4 chroma block.

[0162] That is, when deriving the affine motion for each luma subblock, the derivation process is done with higher precision (i.e., the MV of the control point is first shifted left by 7 bits, as shown in equations (3) and (4), which means that the MV is multiplied by 128). The high-precision control point MV is then used to derive the affine MV for each luma subblock. After the MV is derived for each luma subblock, it is right-shifted by 7 bits to its original precision, for example, using the rounding process of equations (15) to (17).

[0163] In this disclosure, "high precision" and "higher precision" may be used interchangeably to indicate that a motion vector is represented in a left-shifted form and therefore has a higher precision than its original form.

[0164] In some examples of the proposed scheme, the chrominance MV is generated by averaging the four corresponding luma MVs with high precision during the derivation of the affine motion.

[0165] For example, once the required luminance motion vector mvLX[xSbIdx][ySbIdx] is derived based on equations (9) to (12), each of these luminance motion vectors is directly used to derive the average luminance motion vector mvAvgLX using equation (18) without invoking the rounding process for the individual luminance motion vectors. Therefore, a high-precision average luminance motion vector mvAvgLX can be obtained.

[0166] In some examples, the result of the averaged equation (18) is then used to call the rounding process of equations (15) to (17) for the motion vector, i.e., with mvX set equal to mvAvgLX, rightShift set equal to 7, and leftShift set equal to 0 as inputs, and with the rounded mvAvgLX as output. The derivation process of equations (19) and (20) for the chroma motion vector is then called with the rounded mvAvgLX as input and with the chroma motion vector mvCLX[xSbIdx][ySbIdx] as output.

[0167] In some other examples, the derivation process of equations (19) and (20) for the chrominance motion vector may be called before the rounding process of equations (15) to (17). That is, in the process of deriving the chrominance motion vector, the high-precision luminance MV is used instead of the original precision luminance MV. For example, once the high-precision average luminance motion vector mvAvgLX is obtained, the derivation process of equations (19) and (20) may be called, wherein the high-precision average luminance motion vector mvAvgLX (without the rounding process) is used as input, and the high-precision chrominance motion vector mvCLX[xSbIdx][ySbIdx] is used as output. Then, for example, using the rounding process, the high-precision chrominance motion vector may be right-shifted by 7 bits so as to be represented with the original precision.

[0168] According to different yuv subsampling formats (e.g., yuv 4:4:4, 4:2:0 or 4:2:2), the sampling positions between luma samples and chroma samples are different and the 4×4 chroma blocks may correspond to different luma blocks. Therefore, under different yuv subsampling formats, the averaging process may use MVs from different luma blocks. For example, when using the yuv 4:2:0 format, the following process applies:

[0169] mvAvgLX=(mvLX[(xSbIdx>>1<<1)][(ySbIdx>>1<<1)]+

[0170] mvLX[(xSbIdx>>1<<1)+1][(ySbIdx>>1<<1)]+(18a)

[0171] mvLX[(xSbIdx>>1<<1)][(ySbIdx>>1<<1)+1]+

[0172] mvLX[(xSbIdx>>1<<1)+1][(ySbIdx>>1<<1)+1]+2)>>2

[0173] When using the YUV 4:2:2 format, the following process applies:

[0174] mvAvgLX=(mvLX[(xSbIdx>>1<<1)][ySbIdx]+

[0175] mvLX[(xSbIdx>>1<<1)+1][ySbIdx]+1)>>1(18b) When using YUV 4:4:4 format, the following process applies:

[0176] mvAvgLX=mvLX[xSbIdx][ySbIdx](18c)

[0177] That is, as shown in equations (18a) to (18c), based on the yuv subsampling format of the video data, equation (18) for the averaging operation may have different forms. That is, each chroma subblock may correspond to one or more luma subblocks.

[0178] Therefore, it uses the motion vector of the corresponding luma subblock to derive an affine motion vector for a chroma subblock among the plurality of chroma subblocks.The video data has a color subsampling format, and the corresponding luma subblock is derived according to the color subsampling format.

[0179] In some examples of the proposed scheme, the chroma MV can be directly calculated using the affine motion model. The affine motion model is used to directly derive the motion vector of the center sample of the 4×4 chroma block. For example, once the required luma motion vector mvLX[xSbIdx][ySbIdx] is derived based on equations (9) to (12), the chroma motion vector mvCLX[xSbIdx][ySbIdx] is derived as follows:

[0180] If (SubWidthC is equal to 2)

[0181] xPosCb=4+((xSbIdx>>1<<1)<<3)

[0182] else

[0183] xPosCb=2+(xSbIdx<<2)

[0184] If (SubHeightC is equal to 2)

[0185] yPosCb=4+((ySbIdx>>1<<1)<<3)

[0186] else

[0187] yPosCb=2+(ySbIdx)<<2)

[0188] mvCLX[xSbIdx][ySbIdx][0]=(mvScaleHor+dHorX*xPosCb+dHorY*yPosCb) mvCLX[xSbIdx][ySbIdx][1]=(mvScaleVer+dVerX*xPosCb+dVerY*yPosCb)

[0189] In this case, the chrominance motion vector is directly derived using the affine motion model. It does not call equation (18) or equations (18a) to (18c) to average the corresponding luminance motion vector used to derive the chrominance motion vector. The derivation process of equations (19) and (20) may also not be required.

[0190] In some other examples, the control variable deriveChromaFlag can be set for the derivation process for the motion vector array from the affine control point motion vector. The derivation process for the luma motion vector and the chroma motion vector can be combined in the same process block. For example, the motion vector can be derived as follows: if (SubWidthC is equal to 2 and deriveChromaFlag is equal to 1)

[0191] xPosCb=4+((xSbIdx>>1<<1)<<3)

[0192] else

[0193] xPosCb=2+(xSbIdx<<2)

[0194] if (SubHeightC is equal to 2 and deriveChromaFlag is equal to 1)

[0195] yPosCb=4+((ySbIdx>>1<<1)<<3)

[0196] else

[0197] yPosCb=2+(ySbIdx<<2)

[0198] mvX[xSbIdx][ySbIdx][0]=(mvScaleHor+dHorX*xPosCb+dHorY*yPosCb)

[0199] mvX[xSbIdx][ySbIdx][1]=(mvScaleVer+dVerX*xPosCb+dVerY*yPosCb)

[0200] In this case, the chroma motion vectors are also derived directly using the affine motion model, depending on the value set for the variable deriveChromaFlag. Based on the values ​​of SubWidthC, SubHeightC, and deriveChromaFlag, the resulting mvX[xSbIdx][ySbIdx] can be either a luma motion vector or a chroma motion vector. There is no need to call equation (18) or equations (18a) to (18c) to average the corresponding luma motion vectors, nor is there a need to call the derivation process of equations (19) and (20).

[0201] Fig.12 12 is a block diagram showing an apparatus for video encoding and decoding according to some embodiments of the present disclosure. The apparatus 1200 may be a terminal such as a mobile phone, a tablet computer, a digital broadcast terminal, a tablet device, or a personal digital assistant.

[0202] like Fig.12 As shown, device 1200 may include one or more of the following components: a processing component 1202 , a memory 1204 , a power component 1206 , a multimedia component 1208 , an audio component 1210 , an input / output (I / O) interface 1212 , a sensor component 1214 , and a communication component 1216 .

[0203] The processing component 1202 generally controls the overall operation of the device 1200, such as operations related to display, phone calls, data communications, camera operations, and recording operations. The processing component 1202 may include one or more processors 1220 for executing instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 1202 may include one or more modules for facilitating the interaction between the processing component 1202 and other components. For example, the processing component 1202 may include a multimedia module for facilitating the interaction between the multimedia component 1208 and the processing component 1202.

[0204] The memory 1204 is configured to store different types of data to support the operation of the device 1200. Examples of such data include instructions for any application or method operating on the device 1200, contact data, phone book data, messages, pictures, videos, etc. The memory 1204 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, and the memory 1204 can be a static random access memory (SRAM), an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic memory, a flash memory, a magnetic disk, or an optical disk.

[0205] The power supply component 1206 provides power to the various components of the device 1200. The power supply component 1206 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 1200.

[0206] The multimedia component 1208 includes a screen that provides an output interface between the device 1200 and the user. In some examples, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen that receives input signals from the user. The touch panel may include one or more touch sensors for sensing touch, sliding, and gestures on the touch panel. The touch sensor can not only sense the boundaries of the touch or sliding action, but also detect the duration and pressure associated with the touch or sliding operation. In some examples, the multimedia component 1208 may include a front camera and / or a rear camera. When the device 1200 is in an operating mode such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data.

[0207] The audio component 1210 is configured to output and / or input audio signals. For example, the audio component 1210 includes a microphone (MIC). When the device 1200 is in an operating mode (such as a call mode, a recording mode, and a speech recognition mode), the microphone is configured to receive an external audio signal. The received audio signal may be further stored in the memory 1204 or sent via the communication component 1216. In some examples, the audio component 1210 also includes a speaker for outputting an audio signal.

[0208] The I / O interface 1212 provides an interface between the processing component 1202 and a peripheral interface module. The peripheral interface module may be a keyboard, a click wheel, buttons, etc. These buttons may include but are not limited to a home button, a volume button, a start button, and a lock button.

[0209] The sensor assembly 1214 includes one or more sensors for providing status assessment in different aspects of the device 1200. For example, the sensor assembly 1214 can detect the on / off state of the device 1200 and the relative position of the components. For example, the components are the display and keyboard of the device 1200. The sensor assembly 1214 can also detect changes in the position of the device 1200 or a component of the device 1200, the presence or absence of a user's contact on the device 1200, the orientation or acceleration / deceleration of the device 1200, and the temperature change of the device 1200. The sensor assembly 1214 may include a proximity sensor, which is configured to detect the presence of a nearby object without any physical contact. The sensor assembly 1214 may also include an optical sensor, such as a CMOS or CCD image sensor used in imaging applications. In some examples, the sensor assembly 1214 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0210] The communication component 1216 is configured to facilitate wired or wireless communication between the device 1200 and other devices. The device 1200 can access the wireless network based on communication standards such as WiFi, 4G or a combination thereof. In one example, the communication component 1216 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In one example, the communication component 1216 may also include a near field communication (NFC) module for facilitating short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0211] In one example, device 1200 may be implemented by one or more of an application specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a controller, a microcontroller, a microprocessor, or other electronic components to perform the above method.

[0212] The non-transitory computer-readable storage medium may be, for example, a hard disk drive (HDD), a solid-state drive (SSD), a flash memory, a hybrid drive or a solid-state hybrid drive (SSHD), a read-only memory (ROM), a compact disk-read-only memory (CD-ROM), a tape, a floppy disk, etc.

[0213] Fig.13 is a flow chart illustrating an exemplary process of video encoding and decoding for deriving affine motion vectors for chroma components according to some embodiments of the present invention.

[0214] At step 1302, the processor 1220 arranges the video data into a plurality of luma sub-blocks and a plurality of chroma sub-blocks, wherein each chroma sub-block corresponds to one or more luma sub-blocks.

[0215] At step 1304, the processor 1220 uses the motion vector of the corresponding luma subblock to derive an affine motion vector for a chroma subblock among the plurality of chroma subblocks; wherein the video data has a color subsampling format and the corresponding luma subblock is obtained according to the color subsampling format.

[0216] In some examples, a device for video encoding and decoding is provided. The device includes a processor 1220; and a memory 1204, which is configured to store instructions executable by the processor; wherein the processor is configured to perform the following when executing the instructions: Fig.13 The method shown.

[0217] In some other examples, a non-transitory computer-readable storage medium 1204 is provided having instructions stored therein. When the instructions are executed by the processor 1220, the instructions cause the processor to perform the following steps: Fig.13 The method shown.

[0218] The description of the present disclosure has been presented for purposes of illustration and description and is not intended to be exhaustive or limited to the present disclosure. Many modifications, variations, and alternative embodiments will be apparent to those of ordinary skill in the art having the benefit of the teachings presented in the foregoing description and the associated drawings.

[0219] The examples are chosen and described in order to explain the principles of the present disclosure and to enable others skilled in the art to understand the disclosure for various embodiments and to best utilize the basic principles and various embodiments with various modifications suitable for the particular use contemplated. Therefore, it will be understood that the scope of the present disclosure is not limited to the specific examples of the disclosed embodiments and that modifications and other embodiments are intended to be included within the scope of the present disclosure.

Claims

1. A method for video decoding, comprising: receiving video data arranged in a plurality of luma subblocks and a plurality of chroma subblocks, wherein each chroma subblock corresponds to one or more luma subblocks, the video data having a color sampling format, and the corresponding luma subblocks being obtained according to the color sampling format; Determining a color sampling format of the video data; deriving an affine motion vector for a chroma subblock of the plurality of chroma subblocks using an average luma motion vector obtained by averaging motion vectors of corresponding luma subblocks; Predicting the chrominance sub-block based on the derived affine motion vector, The averaging process uses motion vectors from different luminance sub-blocks under different color sampling formats. When the color sampling format is 4:4:4, the average luminance motion vector is a motion vector of a corresponding luminance subblock, wherein the corresponding luminance subblock has the same index as the chrominance subblock, and the index includes a horizontal index and a vertical index; when the color sampling format is 4:2:2, the average luminance motion vector is obtained by averaging the motion vectors of two corresponding luminance subblocks, wherein the two corresponding luminance subblocks have the same vertical index as the chrominance subblock.

2. The method of claim 1, wherein: Determining the color sampling format of the video data includes: The color sampling format of the video data is determined according to identification information corresponding to the color sampling format of the video data.

3. The method of claim 1, wherein: The method further includes calling a rounding process with the motion vector of the corresponding luminance sub-block as input to perform a rounding operation on the motion vector of the corresponding luminance sub-block, wherein the rounded motion vector is used to derive the average luminance motion vector.

4. The method of claim 1, wherein: Also includes: The motion vector of the control point of the corresponding luminance sub-block is shifted left to obtain a luminance motion vector after left shift, wherein the luminance motion vector after left shift is used to derive the average luminance motion vector.

5. The method of claim 1, further comprising: An affine motion vector for a luma subblock of the plurality of luma subblocks is derived using an affine motion model based on control points.

6. A device for video decoding, comprising: a memory configured to store a bitstream; as well as A processor is coupled to the memory and is configured to perform the method for video decoding according to any one of claims 1 to 5 using the bit stream.

7. A non-transitory computer-readable storage medium, comprising instructions and a bit stream stored therein, wherein when the instructions are executed by a processor, the processor uses the bit stream to perform the method for video decoding according to any one of claims 1 to 5.

8. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the method for video decoding according to any one of claims 1 to 5 is implemented.

9. A method for storing a bit stream, wherein: The bit stream is to be decoded by a method for video decoding, the method for video decoding comprising: receiving video data arranged in a plurality of luma subblocks and a plurality of chroma subblocks, wherein each chroma subblock corresponds to one or more luma subblocks, the video data having a color sampling format, and the corresponding luma subblocks being obtained according to the color sampling format; Determining a color sampling format of the video data; deriving an affine motion vector for a chroma subblock of the plurality of chroma subblocks using an average luma motion vector obtained by averaging motion vectors of corresponding luma subblocks; Predicting the chrominance sub-block based on the derived affine motion vector, The averaging process uses motion vectors from different luminance sub-blocks under different color sampling formats. When the color sampling format is 4:4:4, the average luminance motion vector is a motion vector of a corresponding luminance sub-block, wherein the one corresponding luminance sub-block has the same index as the chrominance sub-block, and the index includes a horizontal index and a vertical index. When the color sampling format is 4:2:2, the average luminance motion vector is obtained by averaging the motion vectors of two corresponding luminance sub-blocks, wherein the two corresponding luminance sub-blocks have the same vertical index as the chrominance sub-block.

Citation Information

Patent Citations

  • Determining prediction parameters for non-square blocks in video coding

    US20170272759A1

  • Method and device for encrypting / decrypting image by using geometrically changed image

    WO2017086748A1