Video decoding, encoding method, decoder, encoder and storage medium

By segmenting the picture into blocks in video encoding and decoding and updating the historical motion vector buffer, the historical buffer reset problem is solved, and the encoding and decoding efficiency and accuracy are improved.

CN116320445BActive Publication Date: 2024-12-24TENCENT AMERICA LLC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310276294.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2018-11-28
Filing Date
2019-07-05
Publication Date
2024-12-24
Estimated Expiration
2039-07-05

AI Technical Summary

Technical Problem

In existing video encoding and decoding technologies, the history buffer cannot be reset correctly during block encoding or decoding, resulting in inappropriate parallel processing and affecting the encoding or decoding efficiency.

Method used

By splitting the current picture into multiple blocks and updating the motion vector using the Historical Motion Vector Prediction Buffer (HMVP), determine the block position to reset the buffer, ensuring that the buffer resets and copies content at the start position of the block row. .

Benefits of technology

Improve the efficiency of the video encoding and decoding process, properly handle parallel blocks, avoid buffer misoperation, and enhance the accuracy of encoding and decoding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116320445B_ABST
    Figure CN116320445B_ABST
Patent Text Reader

Abstract

A method for video decoding for a decoder, comprising: obtaining a current picture from an encoded video code stream, the current picture being divided into a plurality of blocks, and the current picture being divided into a plurality of tiles, each tile comprising at least one block, and at least one block in each tile being arranged as a grid; decoding a current block in a first tile of the plurality of tiles; updating a historical motion vector prediction HMVP buffer using a motion vector of the decoded current block; determining a position of the current block in a first tile of the plurality of tiles; and resetting the HMVP buffer in response to determining that the current block is located in a first column in the grid of the first tile.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of an actively modified version of a patent application with a filing date of July 5, 2019, Chinese patent application number 201980021459.0, and invention name “Video decoding method, device, medium and decoder for decoder”. Technical Field

[0002] The embodiments described in this disclosure generally relate to video coding techniques. Background Art

[0003] Video encoding and decoding using inter-frame prediction with motion compensation has been known for decades. An uncompressed digital video may include a series of pictures, each having spatial dimensions of, for example, 1920x1080 luma samples and associated chroma samples. The series of pictures may have a fixed or variable picture rate (also informally referred to as a frame rate), for example, 60 pictures per second or 60 Hz. Uncompressed video has very high bitrate requirements. For example, 1080p60 4:2:0 video (1920x1080 luma sample resolution at 60 Hz frame rate) with 8 bits per sample requires a bandwidth of nearly 1.5 Gbit / s. One hour of such video would require more than 600 GB of storage space.

[0004] One purpose of video encoding and decoding can be to reduce redundancy in the input video signal through compression. Compression can help reduce the bandwidth or storage space requirements mentioned above, in some cases by two orders of magnitude or more. Lossless and lossy compression and combinations thereof can be used. Lossless compression refers to techniques that can reconstruct an exact copy of the original signal from the compressed original signal. When lossy compression is used, the reconstructed signal may not be the same as the original signal, but the distortion between the original and the reconstructed signal is small enough that the reconstructed signal can be used for the intended application. Therefore, lossy compression is widely used in video compression. The amount of distortion that can be tolerated depends on the specific application; for example, users of certain consumer streaming applications may be more tolerant of distortion than users of TV contribution applications. The achievable compression rate can reflect that higher allowed / tolerable distortion can produce higher compression rates.

[0005] Motion compensation may be a lossy compression technique and may involve the following technique: a block of sample data from a previously reconstructed picture or part thereof (reference picture) is used to predict a newly reconstructed picture or part of a picture after spatially shifting it in the direction indicated by a motion vector (hereinafter MV). In some cases, the reference picture may be the same as the picture currently being reconstructed. The MV may have two dimensions, X and Y, or three dimensions, the third dimension being an indication of the reference picture in use (the latter may indirectly be a temporal dimension).

[0006] In some video compression techniques, the MV applicable to a certain area of ​​sample data can be predicted based on other MVs, such as an MV related to another area of ​​sample data that is spatially adjacent to the area being reconstructed and whose decoding order precedes the MV. Doing so can greatly reduce the amount of data required to encode the MV, thereby eliminating redundancy and increasing the compression rate. MV prediction can work effectively, for example, because when encoding the input video signal obtained from the camera (called natural video), there is a statistical possibility that a larger area than the area applicable to a single MV moves in a similar direction, so in some cases, similar motion vectors derived from the MVs of adjacent areas can be used to represent the larger area. This makes the MV found for a given area similar or identical to the MV predicted from the surrounding MVs, and then after entropy coding, the MV found for the given area can be represented by fewer bits than the number of bits used when directly encoding the MV. In some cases, MV prediction can be an example of lossless compression of a signal (i.e., MV) derived from the original signal (i.e., sample stream). In other cases, MV prediction itself can be lossy, for example due to rounding errors when calculating predicted values ​​based on multiple surrounding MVs.

[0007] Various MV prediction mechanisms are described in H.265 / HEVC (ITU-T H.265 Recommendation, "High Efficiency Video Coding", December 2016). Among the various MV prediction mechanisms provided by H.265, this application describes a technique referred to below as "spatial merging".

[0008] The history buffer of the motion vector predictor can be used to perform encoding or decoding. Typically, the retention of the history buffer is performed after each block (in encoding order or decoding order) is completed. If the block is encoded in inter-frame mode with a set of MV information, the MV of the block is placed in the HMVP buffer for updating the buffer. When the current block is encoded or decoded, the MV predictor of the current block can come from the previously encoded space / adjacent blocks. Some of these blocks may still be in the HMVP buffer. When the newly decoded / encoded MV is placed in the HMVP buffer, some comparison operations can be performed to ensure that the new MV is different from all previous MVs in the HMVP buffer. If there is already an MV with the same value in the buffer, the old MV is removed from the buffer and the new MV is placed in the buffer as the last entry. When it is necessary to remove information that may be irrelevant to the current block being encoded or decoded from the history buffer, these conventional retention procedures of the history buffer cannot correctly reset the history buffer. In addition, when the block is encoded or decoded using the history buffer, parallel processing of the block is not properly considered. Summary of the invention

[0009] An exemplary embodiment disclosed in the present application includes a method for video decoding of a decoder. The method includes: obtaining a current picture from an encoded video code stream, the current picture being divided into a plurality of blocks, and the current picture being divided into a plurality of tiles, each tile including at least one block; decoding a current block in a first tile of the plurality of tiles; updating a historical motion vector prediction HMVP buffer using a motion vector of the decoded current block; determining a position of the current block in a first tile of the plurality of tiles; and resetting the HMVP buffer in response to determining that the current block is located in a first column in a grid of the first tile.

[0010] An exemplary embodiment disclosed in the present application includes a video decoder for video decoding. The video decoder includes a processing circuit, the processing circuit being configured to: obtain a current picture from an encoded video code stream, the current picture being divided into a plurality of blocks, and the current picture being divided into a plurality of tiles, each tile including at least one block; decode a current block in a first tile of a plurality of tiles; update a historical motion vector prediction HMVP buffer using a motion vector of the decoded current block; determine a position of the current block in a first tile of a plurality of tiles; and reset the HMVP buffer in response to determining that the current block is located in a first column in a grid of the first tile.

[0011] An exemplary embodiment disclosed in the present application includes a method for video encoding for an encoder, the method comprising: obtaining a current picture from a decoded video code stream, the current picture being divided into multiple blocks, and the current picture being divided into multiple tiles, each tile including at least one block; encoding a current block in a first tile of multiple tiles; updating an HMVP buffer using a motion vector of the encoded current block; determining a position of the current block in the first tile of multiple tiles; and resetting the HMVP buffer in response to determining that the current block is located in a first column in a grid of the first tile.

[0012] An exemplary embodiment disclosed in the present application includes a video encoder for video encoding, comprising: a processing circuit, wherein the processing circuit is configured to: obtain a current picture from a decoded video code stream, wherein the current picture is divided into multiple blocks, and the current picture is divided into multiple tiles, each tile including at least one block; encode a current block in a first tile of multiple tiles; update an HMVP buffer using a motion vector of the encoded current block; determine a position of the current block in the first tile of multiple tiles; and reset the HMVP buffer in response to determining that the current block is located in a first column in a grid of the first tile.

[0013] Exemplary embodiments disclosed in the present application include a non-transitory computer-readable medium storing instructions, which, when executed by a processor, enable the processor to perform a video decoding method for a decoder and a video encoding method for an encoder. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Further features, properties and various advantages of the disclosed subject matter will become more apparent from the following detailed description and accompanying drawings, in which:

[0015] Figure 1 is a schematic diagram of a simplified block diagram of a communication system according to an embodiment disclosed in the present application;

[0016] Figure 2 is a schematic diagram of a simplified block diagram of a communication system according to an embodiment disclosed in the present application;

[0017] Figure 3 is a schematic diagram of a simplified block diagram of a video decoder according to an embodiment disclosed in the present application;

[0018] Figure 4 is a schematic diagram of a simplified block diagram of a video encoder according to an embodiment disclosed in the present application;

[0019] Figure 5 is a block diagram of a video encoder according to another embodiment disclosed in the present application;

[0020] Figure 6 is a block diagram of a video decoder according to another embodiment disclosed in the present application;

[0021] Figure 7 It is a schematic diagram of the current block and the surrounding spatial merging candidates;

[0022] Figure 8 is a schematic diagram of the construction of the merge candidate list;

[0023] Fig. 9 is a schematic diagram of the extended merging mode;

[0024] Fig. 10A and Fig. 10B An embodiment based on a historical motion vector prediction buffer is shown;

[0025] Fig.11 shows an example picture partitioned into coding tree units;

[0026] Fig.12 shows an example of a picture divided into tiles;

[0027] Fig.13 An embodiment of a process performed by an encoder or a decoder is shown;

[0028] Fig.14 is a schematic diagram of a computer system according to an embodiment disclosed in the present application. DETAILED DESCRIPTION

[0029] Figure 1 1 is a simplified block diagram of a communication system according to an embodiment disclosed in the present application. The communication system (100) includes a plurality of terminal devices that can communicate with each other via, for example, a network (150). For example, the communication system (100) includes a first pair of terminal devices (110) and (120) interconnected via the network (150). Figure 1 In an embodiment, a first pair of terminal devices (110) and (120) perform unidirectional data transmission. For example, the terminal device (110) may encode video data (e.g., a video picture stream collected by the terminal device (110)) for transmission to another terminal device (120) via the network (150). The encoded video data is transmitted in the form of one or more encoded video code streams. The terminal device (120) may receive the encoded video data from the network (150), decode the encoded video data to restore the video data, and display the video picture based on the restored video data. Unidirectional data transmission is more common in applications such as media services.

[0030] In another embodiment, the communication system (100) includes a second pair of terminal devices (130) and (140) that perform bidirectional transmission of encoded video data, which bidirectional transmission may occur, for example, during a video conference. For bidirectional data transmission, for example, each of the terminal devices (130) and (140) may encode video data (e.g., a video picture stream collected by the terminal device) for transmission to the other terminal device (130) and (140) via the network (150). Each of the terminal devices (130) and (140) may also receive the encoded video data transmitted by the other terminal device (130) and (140), and may decode the encoded video data to restore the video data, and may display the video picture on an accessible display device based on the restored video data.

[0031] exist Figure 1In the embodiment of the present invention, the terminal devices (110), (120), (130) and (140) may be servers, personal computers and smart phones, but the principles disclosed in the present application may not be limited to this. The embodiments disclosed in the present application are applicable to laptop computers, tablet computers, media players and / or dedicated video conferencing equipment. The network (150) represents any number of networks that transmit encoded video data between the terminal devices (110), (120), (130) and (140), including, for example, wired (wired) and / or wireless communication networks. The communication network (150) can exchange data in circuit switching and / or packet switching channels. The network may include a telecommunications network, a local area network, a wide area network and / or the Internet. For the purposes of the present application, unless explained below, the architecture and topology of the network (150) may be irrelevant to the operations disclosed in the present application.

[0032] As an example, Figure 2 The video encoder and video decoder are shown in a streaming environment. The subject matter disclosed in this application is equally applicable to other video-enabled applications, including, for example, video conferencing, digital TV, storing compressed video on digital media including CDs, DVDs, memory sticks, etc.

[0033] The streaming system may include an acquisition subsystem (213), which may include a video source (201) such as a digital camera, which creates an uncompressed video picture stream (202). In an embodiment, the video picture stream (202) includes samples taken by a digital camera. Compared to the encoded video data (204) (or the encoded video bitstream), the video picture stream (202) is depicted as a thick line to emphasize the high data volume of the video picture stream, and the video picture stream (202) can be processed by an electronic device (220), which includes a video encoder (203) coupled to the video source (201). The video encoder (203) may include hardware, software, or a combination of hardware and software to implement or implement various aspects of the disclosed subject matter as described in more detail below. Compared to the video picture stream (202), the encoded video data (2304) (or the encoded video bitstream (304)) is depicted as a thin line to emphasize the lower amount of data of the encoded video data (204) (or the encoded video bitstream (204)), which can be stored on the streaming server (205) for future use. One or more streaming client subsystems, such as Figure 3The client subsystem (206) and the client subsystem (208) in the streaming server (205) can access the streaming server (205) to retrieve the copy (207) and the copy (209) of the encoded video data (204). The client subsystem (306) may include, for example, a video decoder (210) in the electronic device (230). The video decoder (210) decodes the incoming copy (207) of the encoded video data and generates an output video picture stream (211) that can be presented on a display (212) (e.g., a display screen) or another presentation device (not depicted). In some streaming systems, the encoded video data (204), the video data (207), and the video data (209) (e.g., a video bitstream) can be encoded according to certain video encoding / compression standards. Examples of these standards include ITU-T H.265. In an embodiment, the video coding standard under development is informally referred to as Versatile Video Coding (VVC), and the present application can be used in the context of the VVC standard.

[0034] It should be noted that the electronic device (220) and the electronic device (230) may include other components (not shown). For example, the electronic device (220) may include a video decoder (not shown), and the electronic device (230) may also include a video encoder (not shown).

[0035] Figure 3 1 is a block diagram of a video decoder (310) according to an embodiment disclosed in the present application. The video decoder (310) may be provided in an electronic device (330). The electronic device (330) may include a receiver (331) (e.g., a receiving circuit). The video decoder (310) may be used to replace Figure 2 A video decoder (210) of an embodiment.

[0036] The receiver (331) may receive one or more encoded video sequences to be decoded by the video decoder (310); in the same or another embodiment, one encoded video sequence is received at a time, wherein the decoding of each encoded video sequence is independent of the other encoded video sequences. The encoded video sequence may be received from a channel (301), which may be a hardware / software link to a storage device storing the encoded video data. The receiver (331) may receive the encoded video data as well as other data, such as encoded audio data and / or auxiliary data streams that may be forwarded to their respective consuming entities (not shown). The receiver (331) may separate the encoded video sequence from the other data. To prevent network jitter, a buffer memory (315) may be coupled between the receiver (331) and the entropy decoder / parser (320) (hereinafter referred to as "parser (320)"). In some applications, the buffer memory (315) is part of the video decoder (310). In other cases, the buffer memory (315) may be provided external to the video decoder (310) (not shown). In other cases, a buffer memory (not shown) is provided outside the video decoder (310) to prevent network jitter, for example, and another buffer memory (315) may be configured inside the video decoder (310) to handle broadcast timing, for example. When the receiver (331) receives data from a storage / forward device with sufficient bandwidth and controllability or from an isochronous network, it may not be necessary to configure the buffer memory (315), or the buffer memory may be made smaller. Of course, in order to use on a service packet network such as the Internet, a buffer memory (315) may also be required, and the buffer memory may be relatively large and have an adaptive size, and may be at least partially implemented in an operating system or a similar element (not shown) outside the video decoder (310).

[0037] The video decoder (310) may include a parser (320) to reconstruct symbols (321) from a coded video sequence. The categories of these symbols include information for managing the operation of the video decoder (310) and potential information for controlling a display device such as a display device (312) (e.g., a display screen), which is not a component of the electronic device (330) but can be coupled to the electronic device (330), as shown in 3. The control information for the display device can be a parameter set fragment (not shown) of Supplemental Enhancement Information (SEI message) or Video Usability Information (VUI). The parser (320) can parse / entropy decode the received coded video sequence. The encoding of the coded video sequence can be performed according to a video coding technique or standard, and can follow various principles, including variable length coding, Huffman coding, arithmetic coding with or without context sensitivity, etc. The parser (320) may extract a subgroup parameter set for at least one of the subgroups of pixels in the video decoder from the encoded video sequence based on at least one parameter corresponding to the group. The subgroup may include a group of pictures (Group of Pictures, GOP), a picture, a tile, a slice, a macroblock, a coding unit (Coding Unit, CU), a block, a transform unit (Transform Unit, TU), a prediction unit (Prediction Unit, PU), etc. The parser (320) may also extract information such as transform coefficients, quantizer parameter values, motion vectors, etc. from the encoded video sequence.

[0038] The parser (320) may perform entropy decoding / parsing operations on the video sequence received from the buffer memory (315) to create symbols (321).

[0039] Depending on the type of coded video picture or portion of coded video picture (e.g., inter- and intra-pictures, inter- and intra-blocks) and other factors, the reconstruction of the symbol (321) may involve multiple different units. Which units are involved and how they are involved may be controlled by subgroup control information parsed by the parser (320) from the coded video sequence. For the sake of brevity, such subgroup control information flow between the parser (320) and the multiple units below is not described.

[0040] In addition to the functional blocks already mentioned, the video decoder (310) can be conceptually subdivided into several functional units as described below. In a practical embodiment operating under commercial constraints, many of these units interact closely with each other and can be integrated with each other. However, for the purpose of describing the disclosed subject matter, the conceptual subdivision into the following functional units is appropriate.

[0041] The first unit is a sealer / inverse transform unit (351). The sealer / inverse transform unit (351) receives quantized transform coefficients as symbols (321) from the parser (320) and control information, including which transform method to use, block size, quantization factor, quantization scaling matrix, etc. The sealer / inverse transform unit (351) can output a block including sample values, which can be input into an aggregator (355).

[0042] In some cases, the output samples of the scaler / inverse transform unit (351) may belong to an intra-coded block; that is, a block that does not use predictive information from a previously reconstructed picture, but may use predictive information from a previously reconstructed portion of the current picture. Such predictive information may be provided by an intra-picture prediction unit (352). In some cases, the intra-picture prediction unit (352) generates surrounding blocks of the same size and shape as the block being reconstructed using reconstructed information extracted from a current picture buffer (358). For example, the current picture buffer (358) buffers a partially reconstructed current picture and / or a fully reconstructed current picture. In some cases, the aggregator (355) adds the prediction information generated by the intra-prediction unit (352) to the output sample information provided by the scaler / inverse transform unit (351) on a per-sample basis.

[0043] In other cases, the output samples of the scaler / inverse transform unit (351) may belong to an inter-frame coded and potentially motion compensated block. In this case, the motion compensated prediction unit (353) may access the reference picture memory (357) to extract samples for prediction. After the extracted samples are motion compensated according to the symbol (321), these samples may be added to the output of the scaler / inverse transform unit (351) (in this case referred to as residual samples or residual signals) by the aggregator (355) to generate output sample information. The motion compensated prediction unit (353) obtains the predicted samples from the address in the reference picture memory (357) may be controlled by a motion vector, and the motion vector is provided to the motion compensated prediction unit (353) in the form of the symbol (321), which includes, for example, X, Y and reference picture components. Motion compensation may also include interpolation of sample values ​​extracted from the reference picture memory (357) when using sub-sample accurate motion vectors, motion vector prediction mechanisms, and the like.

[0044] The output samples of the aggregator (355) may be used by various loop filtering techniques in a loop filter unit (356). The video compression techniques may include in-loop filter techniques that are controlled by parameters included in the encoded video sequence (also referred to as the encoded video bitstream) and that are available to the loop filter unit (356) as symbols (321) from the parser (320). However, in other embodiments, the video compression techniques may also be responsive to meta-information obtained during decoding of a previous (in decoding order) portion of an encoded picture or encoded video sequence, as well as to previously reconstructed and loop filtered sample values.

[0045] The output of the loop filter unit (356) may be a sample stream that may be output to a display device (312) and stored in a reference picture memory (357) for subsequent inter-picture prediction.

[0046] Once fully reconstructed, certain coded pictures may be used as reference pictures for future prediction. For example, once the coded picture corresponding to the current picture is fully reconstructed, and the coded picture is identified as a reference picture (e.g., by the parser (320)), the current picture buffer (358) may become part of the reference picture memory (357), and a new current picture buffer may be reallocated before starting to reconstruct a subsequent coded picture.

[0047] The video decoder (310) may perform decoding operations according to a predetermined video compression technique, such as in the ITU-T H.265 standard. The encoded video sequence may conform to the syntax specified by the video compression technique or standard used in the sense that the encoded video sequence follows the syntax of the video compression technique or standard and the profile recorded in the video compression technique or standard. Specifically, the profile may select certain tools from all the tools available in the video compression technique or standard as the only tools available for use under the profile. For compliance, the complexity of the encoded video sequence is also required to be within the range defined by the hierarchy of the video compression technique or standard. In some cases, the hierarchy limits the maximum picture size, the maximum frame rate, the maximum reconstruction sampling rate (measured in, for example, mega samples per second), the maximum reference picture size, etc. In some cases, the limits set by the hierarchy may be further limited by the Hypothetical Reference Decoder (HRD) specification and metadata of the HRD buffer management signaled in the encoded video sequence.

[0048] In an embodiment, the receiver (331) may receive additional (redundant) data along with the encoded video. The additional data may be part of the encoded video sequence. The additional data may be used by the video decoder (310) to properly decode the data and / or more accurately reconstruct the original video data. The additional data may be in the form of, for example, temporal, spatial or signal-noise ratio (SNR) enhancement layers, redundant slices, redundant pictures, forward error correction codes, etc.

[0049] Figure 4 4 is a block diagram of a video encoder (403) according to an embodiment disclosed in the present application. The video encoder (403) is provided in an electronic device (420). The electronic device (420) includes a transmitter (440) (e.g., a transmission circuit). The video encoder (403) can be used to replace Figure 2 A video encoder (203) in an embodiment.

[0050] The video encoder (403) can be used to obtain the video source (401) (not Figure 4 In another embodiment, the video source (401) is a part of the electronic device (420) to receive video samples, and the video source can collect video images to be encoded by the video encoder (403). In another embodiment, the video source (401) is a part of the electronic device (420).

[0051] The video source (401) may provide a source video sequence in the form of a digital video sample stream to be encoded by the video encoder (403), which may have any suitable bit depth (e.g., 8-bit, 10-bit, 12-bit, ...), any color space (e.g., BT.601 Y CrCB, RGB, ...), and any suitable sampling structure (e.g., Y CrCb 4:2:0, Y CrCb 4:4:4). In a media service system, the video source (401) may be a storage device storing previously prepared videos. In a video conferencing system, the video source (401) may be a camera that captures local image information as a video sequence. The video data may be provided as a plurality of separate pictures that are given motion when viewed sequentially. The pictures themselves may be constructed as a spatial pixel array, where each pixel may include one or more samples depending on the sampling structure, color space, etc. used. The relationship between pixels and samples may be easily understood by those skilled in the art. The following description focuses on samples.

[0052] According to an embodiment, the video encoder (403) may encode and compress pictures of a source video sequence into an encoded video sequence (443) in real time or under any other time constraints required by the application. Implementing an appropriate encoding speed is a function of the controller (450). In some embodiments, the controller (450) controls other functional units as described below and is functionally coupled to these units. For the sake of brevity, couplings are not shown in the figure. The parameters set by the controller (450) may include rate control related parameters (picture skipping, quantizer, lambda value of rate distortion optimization technology, etc.), picture size, group of pictures (GOP) layout, maximum motion vector search range, etc. The controller (450) can be used to have other suitable functions that are related to the video encoder (403) optimized for a certain system design.

[0053] In some embodiments, the video encoder (403) operates in an encoding loop. As a simple description, in embodiments, the encoding loop may include a source encoder (430) (e.g., responsible for creating symbols, such as a symbol stream, based on an input picture to be encoded and a reference picture) and a (local) decoder (433) embedded in the video encoder (403). The decoder (433) reconstructs the symbols to create sample data in a manner similar to how the (remote) decoder creates sample data (because in the video compression technology considered in this application, any compression between the symbols and the encoded video code stream is lossless). The reconstructed sample stream (sample data) is input to a reference picture memory (434). Since the decoding of the symbol stream produces bit-accurate results that are independent of the decoder location (local or remote), the contents of the reference picture memory (434) are also bit-accurate between the local encoder and the remote encoder. In other words, the reference picture samples "seen" by the prediction part of the encoder are exactly the same as the sample values ​​that the decoder will "see" when using the prediction during decoding. This basic principle of reference picture synchronization (and the drift that occurs when synchronization cannot be maintained, eg due to channel errors) is also used in some related techniques.

[0054] The operation of the "local" decoder (433) may be combined with, for example, Figure 3 The "remote" decoder described in detail for the video decoder (310) is identical. However, additional brief reference is made to Figure 3 , when symbols are available and the entropy encoder (445) and parser (320) are capable of losslessly encoding / decoding the symbols into an encoded video sequence, the entropy decoding portion of the video decoder (310), including the buffer memory (315) and the parser (320), may not be fully implemented in the local decoder (433).

[0055] At this point, it can be observed that any decoder technology other than the parsing / entropy decoding present in the decoder must also be present in the corresponding encoder in substantially the same functional form. For this reason, the present application focuses on decoder operation. The description of encoder technology can be simplified because encoder technology is mutually inverse to the decoder technology described comprehensively. A more detailed description is only needed in certain areas and is provided below.

[0056] During operation, in some embodiments, the source encoder (430) may perform motion compensated predictive coding. The motion compensated predictive coding predictively encodes an input picture with reference to one or more previously encoded pictures from a video sequence designated as "reference pictures." In this manner, the encoding engine (432) encodes the differences between pixel blocks of the input picture and pixel blocks of a reference picture that may be selected as a prediction reference for the input picture.

[0057] The local video decoder (433) may decode the encoded video data of the picture that may be designated as the reference picture based on the symbol created by the source encoder (430). The operation of the encoding engine (432) may be a lossy process. When the encoded video data is available at the video decoder ( Figure 4 When the video sequence is decoded at a remote location (not shown), the reconstructed video sequence may typically be a copy of the source video sequence with some errors. The local video decoder (433) replicates the decoding process that may be performed by the video decoder on the reference picture and may cause the reconstructed reference picture to be stored in the reference picture cache (434). In this way, the video encoder (403) may locally store a copy of the reconstructed reference picture that has common content (absent transmission errors) with the reconstructed reference picture that will be obtained by the remote video decoder.

[0058] The predictor (435) may perform a prediction search for the encoding engine (432). That is, for a new picture to be encoded, the predictor (435) may search the reference picture memory (434) for sample data (as candidate reference pixel blocks) or certain metadata, such as reference picture motion vectors, block shapes, etc., that may serve as appropriate prediction references for the new picture. The predictor (435) may operate pixel-by-pixel based on sample blocks to find a suitable prediction reference. In some cases, based on the search results obtained by the predictor (435), it may be determined that the input picture may have prediction references taken from a plurality of reference pictures stored in the reference picture memory (434).

[0059] The controller (450) may manage encoding operations of the source encoder (430), including, for example, setting parameters and subgroup parameters for encoding video data.

[0060] The outputs of all the above functional units may be entropy encoded in an entropy encoder (445). The entropy encoder (445) performs lossless compression on the symbols generated by the various functional units according to techniques such as Huffman coding, variable length coding, arithmetic coding, etc., thereby converting the symbols into a coded video sequence.

[0061] The transmitter (440) may buffer the encoded video sequence created by the entropy encoder (445) in preparation for transmission over a communication channel (460), which may be a hardware / software link to a storage device where the encoded video data will be stored. The transmitter (440) may combine the encoded video data from the video encoder (403) with other data to be transmitted, such as encoded audio data and / or ancillary data streams (source not shown).

[0062] The controller (450) may manage the operation of the video encoder (403). During encoding, the controller (450) may assign a certain coded picture type to each coded picture, but this may affect the coding techniques that can be applied to the corresponding picture. For example, a picture may generally be assigned to any of the following picture types:

[0063] An intra picture (I picture) may be a picture that can be encoded and decoded without using any other picture in the sequence as a prediction source. Some video codecs allow different types of intra pictures, including, for example, Independent Decoder Refresh ("IDR") pictures. Those skilled in the art are aware of the variations of I pictures and their corresponding applications and features.

[0064] A predictive picture (P picture) may be a picture that can be encoded and decoded using intra prediction or inter prediction, which uses at most one motion vector and a reference index to predict sample values ​​for each block.

[0065] Bidirectional predictive pictures (B pictures), which can be pictures that can be encoded and decoded using intra prediction or inter prediction, which uses up to two motion vectors and reference indices to predict the sample values ​​of each block. Similarly, multiple predictive pictures can use more than two reference pictures and associated metadata for reconstructing a single block.

[0066] The source picture may typically be spatially subdivided into blocks of samples (e.g., blocks of 4×4, 8×8, 4×8, or 16×16 samples), and coded block by block. These blocks may be predictively coded with reference to other (already coded) blocks, which are determined according to the coding allocation applied to the block's corresponding picture. For example, a block of an I picture may be non-predictively coded, or the block may be predictively coded (spatial prediction or intra prediction) with reference to an already coded block of the same picture. A block of a P picture may be predictively coded by spatial prediction with reference to one previously coded reference picture or by temporal prediction. A block of a B picture may be predictively coded by spatial prediction with reference to one or two previously coded reference pictures or by temporal prediction.

[0067] The video encoder (403) may perform encoding operations according to a predetermined video encoding technique or standard, such as ITU-T H.265 Recommendation. In operation, the video encoder (403) may perform various compression operations, including predictive encoding operations that exploit temporal and spatial redundancy in an input video sequence. Thus, the encoded video data may conform to the syntax specified by the video encoding technique or standard used.

[0068] In an embodiment, the transmitter (440) may transmit additional data when transmitting the encoded video. The source encoder (430) may include such data as part of the encoded video sequence. The additional data may include other forms of redundant data such as temporal / spatial / SNR enhancement layers, redundant pictures and slices, SEI messages, VUI parameter set fragments, etc.

[0069] The captured video may be taken as a plurality of source pictures (video pictures) in a temporal sequence. Intra-picture prediction (often simplified to intra-prediction) exploits spatial correlations in a given picture, while inter-picture prediction exploits (temporal or other) correlations between pictures. In an embodiment, a particular picture being encoded / decoded is divided into blocks, and the particular picture being encoded / decoded is referred to as the current picture. When a block in the current picture is similar to a reference block in a reference picture that was previously encoded in the video and is still buffered, the block in the current picture may be encoded by a vector called a motion vector. The motion vector points to a reference block in a reference picture, and in the case where multiple reference pictures are used, the motion vector may have a third dimension that identifies the reference picture.

[0070] In some embodiments, bidirectional prediction techniques may be used in inter-picture prediction. According to the bidirectional prediction technique, two reference pictures are used, for example, a first reference picture and a second reference picture that are both before the current picture in the video in decoding order (but may be in the past and future in display order, respectively). A block in the current picture may be encoded by a first motion vector pointing to a first reference block in the first reference picture and a second motion vector pointing to a second reference block in the second reference picture. Specifically, the block may be predicted by a combination of the first reference block and the second reference block.

[0071] In addition, merge mode technology can be used in inter-picture prediction to improve coding efficiency.

[0072] According to some embodiments disclosed in the present application, predictions such as inter-picture prediction and intra-picture prediction are performed in units of blocks. For example, according to the HEVC standard, pictures in a video picture sequence are divided into coding tree units (CTUs) for compression, and the CTUs in the pictures have the same size, such as 64×64 pixels, 32×32 pixels, or 16×16 pixels. In general, a CTU includes three coding tree blocks (CTBs), which are a luminance CTB and two chrominance CTBs. Furthermore, each CTU can be split into one or more coding units (CUs) using a quadtree. For example, a 64×64 pixel CTU can be split into a 64×64 pixel CU, or 4 32×32 pixel CUs, or 16 16×16 pixel CUs. In an embodiment, each CU is analyzed to determine the prediction type for the CU, such as an inter-prediction type or an intra-prediction type. In addition, depending on temporal and / or spatial predictability, the CU is split into one or more prediction units (PUs). Typically, each PU includes a luminance prediction block (PB) and two chrominance PBs. In an embodiment, the prediction operation in encoding (encoding / decoding) is performed in units of prediction blocks. Taking the luminance prediction block as an example of a prediction block, the prediction block includes a matrix of pixel values ​​(e.g., luminance values), such as 8×8 pixels, 16×16 pixels, 8×16 pixels, 16×8 pixels, and the like.

[0073] Figure 5 1 is a diagram of a video encoder (503) according to another embodiment of the present disclosure. The video encoder (503) is configured to receive a processed block (e.g., a prediction block) of sample values ​​within a current video picture in a video picture sequence, and to encode the processed block into an encoded picture that is part of an encoded video sequence. In this embodiment, the video encoder (503) is configured to replace Figure 2A video encoder (203) in an embodiment.

[0074] In an HEVC embodiment, a video encoder (503) receives a matrix of sample values ​​for a processing block, such as a prediction block of 8×8 samples. The video encoder (503) uses, for example, rate-distortion (RD) optimization to determine whether to use intra mode, inter mode, or bidirectional prediction mode to encode the processing block. When encoding the processing block in intra mode, the video encoder (503) may use intra prediction techniques to encode the processing block into an encoded picture; and when encoding the processing block in inter mode or bidirectional prediction mode, the video encoder (503) may use inter prediction or bidirectional prediction techniques to encode the processing block into an encoded picture, respectively. In some video encoding techniques, the merge mode may be an inter-picture prediction submode, in which a motion vector is derived from one or more motion vector predictors without the aid of an encoded motion vector component external to the predictor. In some other video encoding techniques, there may be a motion vector component applicable to the subject block. In an embodiment, the video encoder (503) includes other components, such as a mode decision module (not shown) for determining the processing block mode.

[0075] exist Figure 5 In an embodiment of the present invention, the video encoder (503) includes: Figure 5 Shown are an inter-frame encoder (530), an intra-frame encoder (522), a residual calculator (523), a switch (526), ​​a residual encoder (524), a general controller (521), and an entropy encoder (525) coupled together.

[0076] The inter-frame encoder (530) is used to receive samples of a current block (e.g., a processing block), compare the block with one or more reference blocks in a reference picture (e.g., blocks in a previous picture and a subsequent picture), generate inter-frame prediction information (e.g., redundant information description, motion vector, merge mode information according to the inter-frame coding technology), and calculate an inter-frame prediction result (e.g., a predicted block) based on the inter-frame prediction information using any suitable technology.

[0077] The intra encoder (522) is used to receive samples of a current block (e.g., a processing block), compare the block with encoded blocks in the same picture in some cases, generate quantization coefficients after transformation, and in some cases also generate intra prediction information (e.g., intra prediction direction information based on one or more intra coding techniques).

[0078] The general controller (521) is used to determine the general control data and control other components of the video encoder (503) based on the general control data. In an embodiment, the general controller (521) determines the mode of the block and provides a control signal to the switch (526) based on the mode. For example, when the mode is the intra-frame mode, the general controller (521) controls the switch (526) to select the intra-frame mode result for use by the residual calculator (523), and controls the entropy encoder (525) to select the intra-frame prediction information and add the intra-frame prediction information to the bitstream; and when the mode is the inter-frame mode, the general controller (521) controls the switch (526) to select the inter-frame prediction result for use by the residual calculator (523), and controls the entropy encoder (525) to select the inter-frame prediction information and add the inter-frame prediction information to the bitstream.

[0079] The residual calculator (523) is used to calculate the difference (residual data) between the received block and the prediction result selected from the intra-frame encoder (522) or the inter-frame encoder (530). The residual encoder (524) is used to operate based on the residual data to encode the residual data to generate transform coefficients. In an embodiment, the residual encoder (524) is used to convert the residual data from the time domain to the frequency domain and generate transform coefficients. The transform coefficients are then quantized to obtain quantized transform coefficients.

[0080] The entropy encoder (525) is used to format the code stream to produce an encoded block. The entropy encoder (525) generates various information according to a suitable standard such as the HEVC standard. In an embodiment, the entropy encoder (525) is used to obtain general control data, selected prediction information (such as intra-frame prediction information or inter-frame prediction information), residual information, and other suitable information in the code stream. It should be noted that according to the disclosed subject matter, when the block is encoded in the inter-frame mode or the merge sub-mode of the bidirectional prediction mode, there is no residual information.

[0081] Figure 6 FIG. 6 is a diagram of a video decoder (610) according to another embodiment disclosed in the present application. The video decoder (610) is used to receive an encoded image as part of an encoded video sequence and decode the encoded image to generate a reconstructed picture. In an embodiment, the video decoder (610) is used to replace Figure 2 A video decoder (210) of an embodiment.

[0082] exist Figure 6 In one embodiment, the video decoder (610) includes: Figure 6 An entropy decoder (671), an inter-frame decoder (680), a residual decoder (673), a reconstruction module (674) and an intra-frame decoder (672) coupled together are shown in FIG.

[0083] The entropy decoder (671) may be used to reconstruct certain symbols from the encoded picture, which represent syntax elements constituting the encoded picture. Such symbols may include, for example, a mode for encoding the block (e.g., intra mode, inter mode, bidirectional prediction mode, a merged sub-mode of the latter two, or another sub-mode), prediction information (e.g., intra prediction information or inter prediction information) that may identify certain samples or metadata for prediction by the intra decoder (672) or the inter decoder (680), respectively, residual information in the form of, for example, quantized transform coefficients, and the like. In an embodiment, when the prediction mode is inter or bidirectional prediction mode, the inter prediction information is provided to the inter decoder (680); and when the prediction type is an intra prediction type, the intra prediction information is provided to the intra decoder (672). The residual information may be inverse quantized and provided to the residual decoder (673).

[0084] The inter-frame decoder (680) is used for receiving the inter-frame prediction information and generating an inter-frame prediction result based on the inter-frame prediction information.

[0085] The intra-frame decoder (672) is used to receive intra-frame prediction information and generate a prediction result based on the intra-frame prediction information.

[0086] The residual decoder (673) is used to perform inverse quantization to extract dequantized transform coefficients, and process the dequantized transform coefficients to convert the residual from the frequency domain to the spatial domain. The residual decoder (673) may also require some control information (to obtain the quantizer parameter QP), and this information can be provided by the entropy decoder (671) (the data path is not indicated because this is only low-volume control information).

[0087] The reconstruction module (674) is used to combine the residual output by the residual decoder (673) with the prediction result (which can be output by the inter-frame prediction module or the intra-frame prediction module) in the spatial domain to form a reconstructed block, which can be part of a reconstructed picture, which in turn can be part of a reconstructed video. It should be noted that other suitable operations such as deblocking operations can be performed to improve visual quality.

[0088] It should be noted that the video encoder (203), video encoder (403) and video encoder (503) and video decoder (210), video decoder (310) and video decoder (610) may be implemented using any suitable technology. In an embodiment, the video encoder (203), video encoder (403) and video encoder (503) and video decoder (210), video decoder (310) and video decoder (610) may be implemented using one or more integrated circuits. In another embodiment, the video encoder (203), video encoder (403) and video encoder (503) and video decoder (210), video decoder (310) and video decoder (610) may be implemented using one or more processors that execute software instructions.

[0089] Merge candidates can be formed by examining motion information from spatially or temporally neighboring blocks of the current block. Figure 7 , the current block (701) includes samples that have been discovered by the encoder / decoder during the motion search process, which can be predicted based on a previous block of the same size that has generated a spatial offset. In some embodiments, motion vectors can be derived from metadata associated with one or more reference pictures instead of encoding the motion vectors directly, for example, using a motion vector associated with any of the five surrounding samples represented as D, A, C, B and E (corresponding to 702 to 706, respectively), and deriving the motion vector from the metadata of the nearest reference picture (in decoding order). Blocks A, B, C, D and E can be referred to as spatial merge candidates. These candidates can be selected into a merge candidate list in sequence. A pruning operation can also be performed to ensure that duplicate candidates are removed from the list.

[0090] In some embodiments, after the spatial candidates are placed in the merge list, the temporal candidates may also be selected into the list. For example, a co-located block of the current block is found in a specified reference picture. The motion information at the C0 position (707) in the reference picture is used as a temporal merge candidate. The C0 position may be a block in a reference picture, where the upper left corner of the block is located at the lower right corner of the co-located block in the reference picture of the current block 701. The co-located block in the reference picture may include the same position coordinates (e.g., x coordinate and y coordinate) as the current block 701. If the block at the C0 position (707) is not encoded in inter-frame mode or is unavailable, the block at the C1 position may be used. The block at the C1 position may have an upper left corner at the center position (e.g., w / 2, h / 2) of the block within the co-located block in the reference picture. In particular, the block at the C1 position may be a sub-block of the co-located block in the reference picture. In the above example, w and h are the width and height of the block, respectively. According to some embodiments, additional merge candidates include combined bidirectional prediction candidates and zero motion vector candidates.

[0091] The skip mode can be used to indicate that motion data is inferred for a block instead of explicitly signaling the motion data, and to indicate that the prediction residual is zero for the block (i.e., no transform coefficients are transmitted). At the beginning of each CU in an inter-picture predicted slice, a skip flag (e.g., skip_flag) can be signaled, which implies one or more of the following situations: (i) the CU contains only one PU (e.g., 2Nx2N); (ii) motion data is derived using merge mode; or (iii) there is no residual data in the bitstream.

[0092] According to some embodiments, a sub-CU mode is enabled as an additional merge candidate. In some embodiments, no additional syntax elements are used to signal the sub-CU mode. In some embodiments, two additional merge candidates are added to the merge candidate list of each CU to represent the alternative temporal motion vector prediction (ATMVP) mode and the spatial-temporal motion vector prediction (STMVP) mode.

[0093] The sequence parameter set may indicate the number of candidates in the merge list. For example, if the sequence parameter set indicates that ATMVP and STMVP are enabled, a maximum of seven merge candidates may be used in the merge list. The encoding logic of the additional merge candidates may be the same as that of the other merge candidates in the merge candidate list, which results in more than two rate-distortion (RD) checks being performed on two additional merge candidates for each CU in a P slice or a B slice. The order of the merge candidates may be: A, B, C, D, ATMVP, STMVP, E (when the merge candidates in the list are less than 6), temporal candidates, combined bidirectional prediction candidates, and zero motion vector candidates. The merge candidate list may be referenced by a merge index. In some embodiments, all bins of the merge index are context-encoded by context-adaptive binary arithmetic coding (CABAC). In other embodiments, only the first bin is context-encoded, and the remaining bins are context-bypass encoded.

[0094] According to some embodiments, candidate motion vectors are searched from previously encoded blocks (whose stride is 8x8 blocks). Figure 8The current block 800 is shown surrounded by 8x8 blocks. The nearest spatial neighbors are candidates of category 1, and the candidates including the immediate top row (i.e., the row including blocks mv0 and mv1), the left column (i.e., the column including mv2), and the upper right corner (i.e., mv2) will be considered as category 1. Candidates of category 2 may include blocks of external areas that are far from the current block boundary and are collocated in previously encoded frames. Candidates of category 2 may include up to three candidates. Figure 8 In , candidates for category 2 can be selected from the outer top row (i.e., the row containing blocks mv4 and mv5) and the outer left column (i.e., the column containing blocks mv5 and mv6). Neighboring blocks predicted by different reference frames or intra-coded can be pruned from the list. The remaining reference blocks can be assigned weights respectively. The weights may be related to the distance to the current block. As an example, reference Figure 8 , the candidate list may include the following candidates of category 1: mv1, mv0, mv2, and mv3. The candidate list may also include the following candidates of category 2: mv5, mv6, and mv4.

[0095] According to some embodiments, the extended merge mode includes additional merge candidates, and the additional merge candidates include blocks that are not adjacent to the current block. These candidates may be located in the left, top, bottom left, top right and top left directions. The maximum number of merge candidates can be 10. Fig. 9 The current block 900 is shown surrounded by reference blocks (i.e., blocks having a diagonal pattern) in the left, upper left, upper, and upper right directions. The reference blocks may include adjacent blocks A, B, C, D, and E, which correspond to Figure 7 Blocks A, B, C, D and E in . Fig. 9 , the upper left corner of the reference block may have an offset of (-96, -96) relative to the current block 900. Each candidate B(i, j) or C(i, j) may have an offset of 16 in the vertical direction, respectively, compared to its previous candidate B or C. Each candidate A(i, j) or D(i, j) may have an offset of 16 in the horizontal direction, respectively, compared to its previous candidate A or D. Compared to its previous candidate E, each E(i, j) block may have an offset of 16 in both the horizontal and vertical directions. The candidates may be checked in a direction from the reference block closest to the current block 900 to the reference block farthest from the current block 900. The order of the checked candidates may be: A(i, j), B(i, j), C(i, j), D(i, j), and E(i, j).

[0096] exist Fig. 9In the example, the extended neighboring positions may be determined relative to the current block 900 or relative to the current picture including the current block 900. According to some embodiments, instead of obtaining values ​​from these extended neighboring positions, the motion information of N previously encoded blocks is stored in a history motion vector prediction (History based Motion Vector Prediction, HMVP) buffer, hereinafter referred to as the HMVP buffer, to provide more motion vector prediction candidates. The HMVP buffer may include multiple HMVP candidates and may be retained during the encoding / decoding process. In some embodiments, the HMVP buffer may operate on the principle of first-in-first-out (FIFO), so that when the HMVP buffer is used in a motion vector prediction process such as a merge mode or an AMVP mode, the most recently encoded motion information may be considered first.

[0097] The embodiments disclosed in the present application disclose several methods for obtaining motion vector predictors for picture inter-frame prediction coding. These methods include using MV predictors from history-based MV buffers, and performing buffer management. These methods can be applied to merge mode or motion vector prediction (AMVP mode) with differential coding. The embodiments disclosed in the present application can be extended to any video coding method using merge and general MV prediction concepts. Since the skip mode uses merge mode to derive motion information, the embodiments disclosed in the present application can also be applied to skip mode.

[0098] Fig. 10A and 10B The HMVP buffer before and after inserting the candidate is shown respectively. Fig. 10A and 10B As shown, the HMVP buffer includes 5 entries indexed from [0] to [4]. Fig. 10B , entry CL_0 is inserted at index [4], which causes the other entries to shift left by 1, causing entry HMPV_0 to be removed from the buffer. Entry CL_0 may include motion vector predictor information for a previously encoded or decoded block.

[0099] According to some embodiments, if the block is encoded in inter-frame coding mode, each entry in the HMVP buffer is motion information from a previously encoded block. The block can also be encoded in a bidirectional prediction mode with two motion vectors or in a unidirectional mode with one motion vector. For each entry in the HMVP buffer, if encoded in bidirectional mode, the entry includes a pair of MVs, such as MV_L0 (with its reference index) and MV_L1 (with its reference index). According to some embodiments, the two unidirectional motion vectors corresponding to the bidirectional mode include: (i) MV_L0 for L0 prediction, using the reference index of L0 as the original predictor; and (ii) MV_L1 for L1 prediction, using the reference index of L1 as the original predictor.

[0100] In some embodiments, for each original bidirectional MV predictor in the HMVP buffer, when the original bidirectional MV predictor is placed in the merge candidate list, the two unidirectional MV predictors derived from the original MV predictor are also considered as new candidates in the merge list. In one embodiment, each time the corresponding original bidirectional MV is placed in the list, MV_L0 and MV_L1 are placed after the original bidirectional MV predictor corresponding to it in the list. In another embodiment, MV_L0 and MV_L1 are placed after the N original MV predictors from the HMVP buffer, where N is an integer value. N can be the number of MV candidates allowed to be placed in the merge list from the HMVP buffer, or N can be a fixed value smaller than the maximum allowed number copied from the HMVP buffer to the merge list. According to some embodiments, when the entries in the HMVP buffer are used to create MV predictors in the AMVP mode, for each original bidirectional predictor in the HMVP buffer, a similar method as described above can be used to generate unidirectional predictors MV_L0 and MV_L1. If the AMVP MV prediction candidate list is not full, these two predictors can be used as additional predictors in the list.

[0101] According to some embodiments, the HMVP buffer is cleared or reset to a zero state when a condition is met. The condition may be: (i) the current CU is the beginning of a CTU, (ii) the current CU is the beginning of a tile, (iii) the current CU is the starting position of a CTU row, or (iv) the current CU is the beginning of a slice.

[0102] According to some embodiments, after the first CTU of each CTU row is completed, an HMVP_row buffer of the same size as the HMVP buffer is used to store entries of the HMVP buffer. Thus, at the start of a new CTU row, the HMVP buffer may be filled with information in the HMVP_row buffer. By resetting the HMVP buffer at the end of the CTU row and copying the contents of the HMVP_row buffer into the HMVP buffer, blocks of the first CTU being decoded may be decoded using information from the CTU directly above the first CTU.

[0103] In some embodiments, for each tile in a picture, the HMVP_row buffer is used to store HMVP information after the first CTU of each tile row is completed. Therefore, for the first CTU of a new tile row, the HMVP buffer can be filled with information from the HMVP_row buffer. In some embodiments, the HMVP_row buffer is initialized to a zero state at the beginning of the first CTU row of a tile or slice.

[0104] Fig.11 An example picture 1100 is shown, which is divided into multiple CTUs denoted as CTU_00 to CTU_23. The CTUs CTU_00 to CTU_03 are in the first CTU row, i.e., in CTU_row_[0] (CTU_Row_[0]). The CTUs CTU_10 to CTU_13 are in the second CTU row, i.e., in CTU_row_[1] (CTU_Row_[1]). The CTUs CTU_20 to CTU_23 are in the third CTU_row. Each CTU in the picture 1100 can also be further divided into multiple blocks. These blocks can be CUs or coding blocks (Coding Blocks, CBs).

[0105] In some embodiments, before decoding the first block in the first CTU (e.g., CTU_00) of the picture 1100, initial values ​​are loaded into the HMVP buffer. These initial values ​​can be stored in the memory of the encoder or decoder. In another example, the HMVP buffer can be initialized to a zero state (e.g., there is no valid entry in the buffer). In addition, before encoding or decoding the first block in the first CTU (e.g., CTU_00) of the picture 1100, the HMVP_row buffer can also be initialized to a zero state. When the last block of CTU_00 (e.g., the first CTU in CTU_Row_[0]) is encoded or decoded, the contents of the HMVP buffer are copied to the buffer HMVP_row. When the last block of CTU_03 (e.g., the last CTU in CTU_Row_[0]) is encoded or decoded, and before encoding or decoding the first block of CTU_10 (e.g., the first CTU in CTU_Row_[1]), the HMVP buffer will be cleared and the contents of the buffer HMVP_row will be copied to the HMVP buffer. Therefore, by resetting the HMVP buffer and copying the contents of the HMVP_row buffer into buffers HMVP_1 and HMVP_2, encoding or decoding of blocks in CTU_10 may be performed using information from CTU_00 (e.g., blocks above CTU_10), which may be more relevant for encoding or decoding of CTU_10 than information from CTU_03.

[0106] After encoding or decoding the last block of CTU_10 and CTU_20, a similar process of copying the contents of the HMVP buffer to HMVP_row can be performed. In addition, after encoding or decoding the last block of CTU_13, a similar process of clearing the contents of the HMVP buffer and copying the contents of the HMVP_row buffer to the HVMP buffer can be performed.

[0107] Fig.12An example of a picture 1100 is shown, which is divided into two tiles: Tile_1 (Tile_1) and Tile_2 (Tile_2). In some embodiments, before encoding and decoding the first block in the first CTU (e.g., CTU_00) of tile Tile_1, initial values ​​are loaded to the HMVP buffer. These initial values ​​can be stored in a memory of the encoder or decoder. The HMVP buffer can also be initialized to a zero state. In addition, before encoding or decoding the first block in the first CTU (e.g., CTU_00) of picture 1100, the HMVP_row buffer can be initialized to a zero state. When the last block of CTU_00 (e.g., the first CTU in CTU_Row_[0] of Tile_1) is encoded or decoded, the contents of the HMVP buffer are copied to the buffer HMVP_row. When encoding or decoding the last block of CTU_01 (e.g., the last CTU in CTU_Row_[0] of Tile_1), and before encoding or decoding the first block of CTU_10 (e.g., the first CTU in CTU_Row_[1] of Tile_1), the HMVP buffer will be cleared and the contents of the buffer HMVP_row will be copied to the HMVP buffer. Therefore, by resetting the HMVP buffer and copying the contents of the HMVP_row buffer to the HMVP buffer, encoding or decoding of blocks in CTU_10 can be performed using information from CTU_00, which may be more relevant for encoding or decoding of CTU_10 than information from CTU_01.

[0108] Tile_2 can be encoded or decoded in parallel with Tile_1 and has a separate HMVP buffer and buffer HMVP_row, which is initialized in the same manner as described above for Tile_1. When the last block of CTU_02 (e.g., the first CTU in CTU_Row_[0] of Tile_2) is encoded or decoded, the contents of the HMVP buffer are copied to the row buffer HMVP_row. When the last block of CTU_03 (e.g., the last CTU in CTU_Row_[0] of Tile_2) is encoded or decoded, and before the first block of CTU_12 (e.g., the first CTU in CTU_Row_[1] of Tile_2), the HMVP buffer is reset and the contents of the buffer HMVP_row are copied to the HMVP buffer. Therefore, by resetting the contents of the HMVP buffer and copying the contents of the HMVP_row buffer into the HMVP buffer, encoding or decoding of blocks in CTU_12 may be performed using information from CTU_02, which may be more relevant for encoding or decoding of CTU_12 than information from CTU_03.

[0109] Fig.13 An embodiment of a process performed by an encoder such as encoder 503 or a decoder such as decoder 610 is shown. The process may start at step S1300, in which a current picture is obtained from a video code stream. For example, picture 1100 ( Fig.11 ) may be an acquired picture. The process proceeds to step S1302, in which one or more entries from the HMVP buffer are used to encode / decode the current block. For example, referring to picture 1100, if the first block in CTU_00 is being encoded / decoded, the HMVP_1 buffer may be initialized to an initial state, and after initializing the HMVP buffer, one or more entries from the HMVP_1 buffer may be used to encode / decode the first block. The process proceeds to step S1304, in which the HMVP buffer is updated using the motion vector information of the encoded / decoded current block.

[0110] The process proceeds to step S1306 to determine whether the current encoding / decoding block is at the end of the CTU row. For example, referring to picture 1100, if the current block being encoded / decoded is the last block of CTU_03, the next block to be encoded / decoded is the first block of CTU_10 (i.e., the next row). If the current encoding / decoding block is at the end of the CTU row, the process proceeds to step S1308, in which the HMVP buffer is reset (e.g., cleared) and the contents of the HMVP_row buffer are copied to the HMVP buffer before encoding / decoding the next block. The process then proceeds from step S1308 to step S1314, which will be described in further detail below.

[0111] If the current encoding / decoding block is not the end of the CTU row, the process proceeds to step S1310 to determine whether the current encoding / decoding block is the last block of the first CTU in the CTU row. If the current encoding / decoding block is the last block of the first CTU in the CTU row, the process proceeds to step S1312, in which the contents of the HMVP buffer are copied to the HVMP_row buffer. For example, referring to picture 1100, if the current encoding / decoding block is the last block of CTU_00, the contents of the buffer HVMP_1 buffer are copied to the contents of the HMVP_row buffer before encoding / decoding the first block of CTU_01. The process proceeds from step S1312 to step S1314, the latter step will be further described in detail below.

[0112] If the current encoding / decoding block is not the last block of the first CTU in the CTU row, the process proceeds to step S1314 to determine whether the current encoding / decoding block is the last block in the acquired picture. If the current encoding / decoding block is the last block in the acquired picture, then Fig.13 The process shown ends. For example, if the current encoding / decoding block is the last block of CTU_23, then Fig.13 If the current encoding / decoding block is not the last block in the acquired picture, the processing returns from step S1314 to step S1302.

[0113] The above techniques can be implemented as computer software using computer-readable instructions and physically stored in one or more computer-readable media. Fig.14 A computer system (1400) suitable for implementing certain embodiments of the disclosed subject matter is shown.

[0114] Computer software may be encoded using any suitable machine code or computer language that may be assembled, compiled, linked or similar mechanisms to create code comprising instructions that are directly executable, or instructions that are executed by interpretation, microcode execution, etc., through one or more computer central processing units (CPUs), graphics processing units (GPUs), etc.

[0115] These instructions may be executed on various types of computers or components thereof, including, for example, personal computers, tablet computers, servers, smart phones, gaming devices, IoT devices, and the like.

[0116] Fig.14 The components for the computer system (1400) shown in the example are exemplary in nature and are not intended to impose any limitation on the scope of use or functionality of the computer software implementing the embodiments disclosed herein. The configuration of the components should not be interpreted as having any dependency or requirement on any of the components shown in the exemplary embodiment of the computer system (1400).

[0117] The computer system (1400) may include certain human-machine interface input devices. Such human-machine interface input devices may respond to input from one or more human users through, for example, tactile input (e.g., keystrokes, swipes, data glove movements), audio input (e.g., voice, clapping), visual input (e.g., gestures), olfactory input (not shown). The human-machine interface device may also be used to capture certain media that are not necessarily directly related to human conscious input, such as audio (e.g., voice, music, ambient sounds), images (e.g., scanned images, photographic images obtained from a still image camera), and video (e.g., two-dimensional video, including stereoscopic video).

[0118] The human-machine interface input device may include one or more of the following: keyboard (1401), mouse (1402), touchpad (1403), touch screen (1410), data gloves (not shown), joystick (1405), microphone (1406), scanner (1407), camera (1408).

[0119] The computer system (1400) may also include certain human-computer interface output devices. Such human-computer interface output devices may stimulate one or more human user senses through, for example, tactile output, sound, light, and smell / taste. Such human-computer interface output devices may include: tactile output devices (e.g., tactile feedback through a touch screen (1410), a data glove (not shown), or a joystick (1405), but there may also be tactile feedback that is not an input device), audio output devices (e.g., speakers (1409), headphones (not shown)), visual output devices (e.g., screens including cathode ray tube (CRT) screens, liquid crystal display (LCD) screens, plasma screens, organic light emitting diode (OLED) screens, each screen having or not having touch screen input capabilities, each screen having or not having tactile feedback capabilities, some of which may be capable of outputting two-dimensional visual output or stereoscopic output beyond three-dimensional output through, for example, virtual reality glasses (not shown), holographic displays, and ashtrays (not shown)) and printers (not shown).

[0120] The computer system (1400) may also include human-accessible storage devices and their associated media, such as: CD / DVD ROM / RW (1420), CD / DVD or similar media (1421), thumb drive (1422), removable hard drive or solid state drive (1423), traditional magnetic media such as tapes and floppy disks (not shown)), ROM / ASIC / PLD-based dedicated devices such as security dongles (not shown), etc.

[0121] Those skilled in the art should also understand that the term "computer-readable media" used in connection with the presently disclosed subject matter does not encompass transmission media, carrier waves, or other transient signals.

[0122] The computer system (1400) may also include an interface connected to one or more communication networks. For example, the network may be, for example, a wireless network, a wired network, an optical network. The network may also be a local network, a wide area network, a metropolitan area network, a vehicle and industrial network, a real-time network, a delay-tolerant network, etc. Examples of networks include: a local area network (e.g., Ethernet), a wireless LAN (Local Area Network), a cellular network (including GSM, 3G, 4G, 5G, LTE, etc.), a television wired or wireless wide area digital network (including cable television, satellite television, and terrestrial broadcast television), a vehicle and industrial network (including CANBus), etc. Some networks typically require an external network interface adapter connected to some universal data port or peripheral bus (1449) (e.g., a USB port of the computer system (1400)); other networks are typically integrated into the core of the computer system (1400) by being connected to a system bus as described below (e.g., connected to a computer network interface). Using any of these networks, the computer system (1400) can communicate with other entities. This communication can be one-way, receive-only (e.g., broadcast television), one-way send-only (e.g., from a CANbus to certain CANbus devices), or two-way, such as communicating with other computer systems using a local or wide-area digital network. Certain protocols and protocol stacks are also available for each of the networks and network interfaces described above.

[0123] The above-mentioned human-machine interface devices, human-accessible storage devices and network interfaces may all be connected to the core (1440) of the computer system (1400).

[0124] The core (1440) may include one or more central processing units (CPUs) (1441), graphics processing units (GPUs) (1442), dedicated programmable processing units in the form of field-programmable gate arrays (FPGAs) (1443), hardware accelerators for certain tasks (1444), etc. These devices, as well as read-only memory (ROM) (1445), random access memory (1446), internal large-capacity storage (e.g., internal non-user accessible hard disk drives, solid-state drives (SSDs), etc.) (1447) may be connected via a system bus (1448). In some computer systems, the system bus (1448) may be accessed in the form of one or more physical plugs to enable expansion by adding CPUs, GPUs, etc. Peripheral devices may be connected directly to the core's system bus (1448) or via a peripheral bus (1449). The architecture of the peripheral bus includes: Peripheral Component Interconnect (PCI), Universal Serial Bus (USB), etc.

[0125] The CPU (1441), GPU (1442), FPGA (1443) and accelerator (1444) can execute certain instructions, which can be combined to form the computer code described above. The computer code can be stored in ROM (1445) or random access memory (RAM) (1446). Transition data can also be stored in RAM (1446), while permanent data can be stored in, for example, internal mass storage (1447). Fast storage and retrieval of any memory device can be achieved by using high-speed memory closely associated with one or more CPUs (1441), GPUs (1442), mass storage (1447), ROM (1445), RAM (1446), etc.

[0126] The computer readable medium may have thereon computer codes for performing various computer-implemented operations. The medium and computer codes may be specially designed and constructed for the purposes disclosed in this application, or they may be of a type well known and available to those skilled in the art of computer software.

[0127] As an example and not limitation, a computer system having an architecture (1400), in particular a core (1440), can provide functionality due to a processor (including a CPU, GPU, FPGA, accelerator, etc.) executing software contained in one or more tangible computer-readable media. These computer-readable media can be media associated with a user-accessible mass storage as described above, as well as certain memories of the core (1440) that are non-transitory, such as a core internal mass storage (1447) or ROM (1445). Software that implements the various embodiments disclosed in the present application can be stored in these devices and executed by the core (1440). Depending on specific needs, the computer-readable medium may include one or more storage devices or chips. The software enables the core (1440), in particular the processor (including a CPU, GPU, FPGA, etc.) therein to perform a specific process or a specific part of a specific process described herein, including defining a data structure stored in RAM (1446), and modifying these data structures according to a software-defined process. Additionally or alternatively, the computer system may provide functionality due to logic hardwired or otherwise embodied in circuitry (e.g., accelerator (1444)), which may replace software or operate in conjunction with software to perform a particular process or a particular portion of a particular process described herein. Where appropriate, references to software may include logic and vice versa. References to computer-readable media may include circuits (e.g., integrated circuits (ICs)) storing software for execution, circuits containing logic for execution, or both (e.g., where appropriate). The present application discloses any suitable combination of hardware and software.

[0128] Appendix A: Acronyms

[0129] MV: Motion Vector

[0130] HEVC: High Efficiency Video Coding

[0131] SEI: Supplementary Enhancement Information, supplementary enhancement information

[0132] VUI: Video Usability Information, video availability information

[0133] GOP: Groups of Pictures, picture group

[0134] TU: Transform Units, conversion unit

[0135] PU: Prediction Units, prediction unit

[0136] CTU: Coding Tree Units, coding tree unit

[0137] CTB: Coding Tree Blocks, coding tree block

[0138] PB: Prediction Blocks

[0139] HRD: Hypothetical Reference Decoder, Hypothetical Reference Decoder

[0140] SNR: Signal Noise Ratio, signal-to-noise ratio

[0141] CPU: Central Processing Units, central processing unit

[0142] GPU: Graphics Processing Units, Graphics Processing Unit

[0143] CRT: Cathode Ray Tube

[0144] LCD: Liquid-Crystal Display

[0145] OLED: Organic Light-Emitting Diode

[0146] CD: Compact Disc

[0147] DVD: Digital Video Disc

[0148] ROM:Read-Only Memory

[0149] RAM: Random Access Memory

[0150] ASIC: Application-Specific Integrated Circuit

[0151] PLD:Programmable Logic Device, programmable logic device

[0152] LAN: Local Area Network

[0153] GSM: Global System for Mobile communications

[0154] LTE: Long-Term Evolution

[0155] CANBus: Controller Area Network Bus, controller area network bus

[0156] USB: Universal Serial Bus

[0157] PCI: Peripheral Component Interconnect, peripheral component interconnect

[0158] FPGA: Field Programmable Gate Areas, field programmable gate array

[0159] SSD: Solid-State Drive

[0160] IC:Integrated Circuit

[0161] CU: Coding Unit

[0162] Although the present application discloses several exemplary embodiments, there are changes, substitutions and various alternative equivalents that fall within the scope of the present application. Therefore, it should be understood that those skilled in the art will be able to design many systems and methods, which, although not explicitly shown or described herein, embody the principles disclosed in the present application and are therefore also within the spirit and scope of the present application.

[0163] (1) A method for video decoding of a decoder, the method comprising: obtaining a current picture from an encoded video code stream, the current picture being divided into a plurality of units, each unit being divided into a plurality of blocks, and the plurality of blocks in each unit being arranged in a grid; for one of the units, decoding a current block from the plurality of blocks using an entry from a historical motion vector (HMVP) buffer; updating the HMVP buffer using a motion vector of the decoded current block; determining whether the current block is located at a starting position of a row included in the grid of one of the units; and resetting the HMVP buffer in response to determining that the current block is the starting position of the row.

[0164] (2) The method according to feature (1) also includes: determining whether the current block is the last block of the first unit of the row; and, in response to determining that the current block is the last block of the first unit of the row, copying the contents of the HMVP buffer to a row buffer.

[0165] (3) The method according to feature (2) further includes: in response to determining that the current block is the starting position of the line, and after each of the entries in the HMVP buffer is reset, copying the contents of the line buffer to the HMVP buffer.

[0166] (4) A method according to any one of features (1) to (3), wherein the HMVP buffer is a first-in-first-out (FIFO) buffer; and wherein using the motion vector to update the HMVP buffer includes: storing the motion vector at the last entry in the HMVP buffer and deleting the first entry in the HMVP buffer.

[0167] (5) A method according to any one of features (1) to (4), wherein the unit is a coding tree unit (CTU).

[0168] (6) A method according to any one of features (2) to (5), wherein the unit is a tile, one of the decoded units is a first tile, and the first tile and the second tile from the multiple units are decoded in parallel.

[0169] (7) A video decoder for video decoding, comprising a processing circuit, wherein the processing circuit is configured to: obtain a current picture from an encoded video code stream, wherein the current picture is divided into a plurality of units, each unit is divided into a plurality of blocks, and the plurality of blocks in each unit are arranged in a grid; for one of the units, use an entry from a historical motion vector (HMVP) buffer to decode a current block from the plurality of blocks; update the HMVP buffer using a motion vector of the decoded current block; determine whether the current block is located at a starting position of a row included in the grid of one of the units; and reset the HMVP buffer in response to determining that the current block is the starting position of the row.

[0170] (8) A video decoder according to feature (7), wherein the processing circuit is further configured to: determine whether the current block is the last block of the first unit of the row; and, in response to determining that the current block is the last block of the first unit of the row, copy the contents of the HMVP buffer to a row buffer.

[0171] (9) A video decoder according to feature (8), wherein the processing circuit is further configured to: in response to determining that the current block is the starting position of the line, and after each of the entries in the HMVP buffer is reset, copy the contents of the line buffer to the HMVP buffer.

[0172] (10) A video decoder according to any one of features (7) to (9), wherein the HMVP buffer is a first-in-first-out (FIFO) buffer; and wherein using the motion vector to update the HMVP buffer includes: storing the motion vector at the last entry in the HMVP buffer and deleting the first entry in the HMVP buffer.

[0173] (11) A video decoder according to any one of features (7) to (10), wherein the unit is a coding tree unit (CTU).

[0174] (12) A video decoder according to any one of features (8) to (11), wherein the unit is a tile, one of the decoded units is a first tile, and the first tile and the second tile from the multiple units are decoded in parallel.

[0175] (13) A non-transitory computer-readable medium storing instructions that, when executed by a processor, enable the processor to perform a method comprising: obtaining a current picture from an encoded video code stream, wherein the current picture is divided into a plurality of units, each unit is divided into a plurality of blocks, and the plurality of blocks in each unit are arranged in a grid; for one of the units, using an entry from a historical motion vector (HMVP) buffer to decode a current block from the plurality of blocks; updating the HMVP buffer using the decoded motion vector of the current block; determining whether the current block is located at the start position of a row included in the grid of one of the units; and resetting the HMVP buffer in response to determining that the current block is the start position of the row.

[0176] (14) According to the non-transitory computer-readable medium described in feature (13), the method also includes: determining whether the current block is the last block of the first unit of the row; and, in response to determining that the current block is the last block of the first unit of the row, copying the contents of the HMVP buffer to a row buffer.

[0177] (15) According to the non-transitory computer-readable medium described in feature (14), the method also includes: in response to determining that the current block is the starting position of the row, and after each of the entries in the HMVP buffer is reset, copying the contents of the row buffer to the HMVP buffer.

[0178] (16) A non-transitory computer-readable medium according to any one of features (13)-(15), wherein the HMVP buffer is a first-in-first-out (FIFO) buffer; and wherein using the motion vector to update the HMVP buffer includes: storing the motion vector at the last entry in the HMVP buffer and deleting the first entry in the HMVP buffer.

[0179] (17) The non-transitory computer-readable medium of any one of features (13)-(16), wherein the unit is a coding tree unit (CTU).

[0180] (18) A non-transitory computer-readable medium according to any one of features (14)-(17), wherein the unit is a tile, one of the decoded units is a first tile, and the first tile and the second tile from the multiple units are decoded in parallel.

Claims

1. A method for video decoding of a decoder, the method comprising: Acquire a current picture from an encoded video bitstream, wherein the current picture is divided into a plurality of tiles, each tile is divided into a plurality of blocks, and the plurality of blocks in each tile are arranged as a grid; decoding a first block of a first block of the plurality of the blocks; Update the historical motion vector prediction HMVP buffer using the decoded motion vector of the first block; determining a position of a second block in a first block among the plurality of blocks; In response to determining that the second block is located in a first column and in a first row in a grid of the first tiles, the HMVP buffer is reset.

2. The method according to claim 1, further comprising: In response to determining that the second block is located in the last column of the first tile, the contents of the HMVP buffer are copied to a row buffer.

3. The method according to claim 2, further comprising: In response to determining that the second block is located in the first column of the first tile, contents of the row buffer are copied into the HMVP buffer.

4. The method according to claim 1, wherein: The HMVP buffer is a first-in-first-out FIFO buffer; The updating of the historical motion vector prediction HMVP buffer using the decoded motion vector of the first block includes: storing the motion vector at the last entry in the HMVP buffer, and deleting the first entry in the HMVP buffer.

5. The method according to claim 2, wherein: The first tile and the second tile from the plurality of units are decoded in parallel.

6. A video decoder for video decoding, comprising a processing circuit, characterized in that: The processing circuit is configured to perform the video decoding method for a decoder according to any one of claims 1 to 5.

7. A method for video encoding for an encoder, the method comprising: Obtain a current picture, wherein the current picture is divided into a plurality of tiles, each tile is divided into a plurality of blocks, and the plurality of blocks in each tile are arranged as a grid; encoding a first block of a first block of the plurality of blocks; updating the HMVP buffer using the motion vector of the first block; determining a position of the second block in a first block of the plurality of blocks; In response to determining that the second block is located in a first column and in a first row in a grid of the first tiles, the HMVP buffer is reset.

8. The method according to claim 7, further comprising: In response to determining that the second block is located in the last column of the first tile, the contents of the HMVP buffer are copied to a row buffer.

9. The method according to claim 8, further comprising: In response to determining that the second block is located in the first column of the first tile, contents of the row buffer are copied into the HMVP buffer.

10. The method according to claim 7, wherein: The HMVP buffer is a first-in-first-out FIFO buffer; The updating of the historical motion vector prediction HMVP buffer using the motion vector of the first block includes: storing the motion vector at the last entry in the HMVP buffer, and deleting the first entry in the HMVP buffer.

11. The method according to claim 8, wherein: The first tile and the second tile from the plurality of units are encoded in parallel.

12. A video encoder for video encoding, comprising a processing circuit, characterized in that The processing circuit is configured to perform the video encoding method for an encoder according to any one of claims 7 to 11.

13. A non-transitory computer-readable medium storing instructions, which, when executed by a processor, enable the processor to execute the video decoding method for a decoder according to any one of claims 1 to 5, and to execute the video encoding method for an encoder according to any one of claims 7 to 11.

14. A method for processing a video code stream, characterized in that: The video code stream is generated according to the encoding method according to any one of claims 7 to 11, or is decoded based on the decoding method according to any one of claims 1 to 5.