Reference picture reordering based on bilateral matching
By generating a joint list and performing bilateral matching and reordering, inter-frame prediction is optimized, which solves the problem of low inter-frame prediction efficiency in the existing technology and improves video encoding and decoding performance.
Patent Information
- Application Number
- CN202380016670.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-01-18
- Filing Date
- 2023-01-10
- Publication Date
- 2024-08-23
AI Technical Summary
Existing video encoding and decoding technology has low efficiency in inter-frame prediction, especially when processing motion vector data, resulting in a large amount of video bitstream data and affecting compression efficiency.
By generating a joint list including multiple reference picture pairs, and performing bilateral matching and reordering based on motion vectors, the inter-frame prediction process is optimized, unnecessary motion vector encoding is reduced, and encoding and decoding efficiency is improved.
It significantly reduces the amount of motion information data in the video bit stream, improves the compression efficiency of inter-frame prediction, and improves the overall performance of video encoding and decoding.
Smart Images

Figure CN118541979A
Abstract
Description
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application is based on and claims the benefit of priority of provisional application No. 63 / 300,312 filed on January 18, 2022, the entire contents of which are incorporated herein by reference in their entirety. Technical Field
[0003] The present application relates to video coding and compression, and more particularly to a video processing device and method for inter-frame prediction. Background Art
[0004] Digital video is supported by various electronic devices, such as digital televisions, laptop or desktop computers, tablet computers, digital cameras, digital recording devices, digital media players, video game consoles, smart phones, video teleconferencing devices, video streaming devices, etc. Electronic devices send and receive or otherwise communicate digital video data across a communication network, and / or store digital video data on a storage device. Due to the limited bandwidth capacity of the communication network and the limited storage resources of the storage device, video codecs can be used to compress video data according to one or more video codec standards before communicating or storing video data. For example, video codec standards include Versatile Video Coding (VVC), Joint Exploration test Model (JEM), High-Efficiency Video Coding (HEVC / H.265), Advanced Video Coding (AVC / H.264), Moving Picture Expert Group (MPEG) codecs, etc. Video codecs typically use prediction methods that exploit the redundancy inherent in video data (eg, inter-frame prediction, intra-frame prediction, etc.) Video codecs aim to compress video data into a form that uses a lower bit rate while avoiding or minimizing degradation of video quality. Summary of the invention
[0005] Embodiments of the present disclosure provide a video processing method for inter-frame prediction performed by a video encoder. The video processing method may include generating, by a processor of the video encoder, a joint list including multiple reference picture pairs based on a first reference list and a second reference list for a video block in a video frame of the video. The video processing method may include reordering, by the processor of the video encoder, multiple reference picture pairs in the joint list based on bilateral matching using one or more motion vectors of the video block to generate a reordered joint list. The video processing method may include performing, by the processor of the video encoder, inter-frame prediction on the video block based on the reordered joint list.
[0006] Embodiments of the present disclosure also provide a video encoder device for inter-frame prediction. The video encoder device may include a memory configured to store a bitstream and a processor coupled to the memory. The processor may be configured to generate a joint list including multiple reference picture pairs based on a first reference list and a second reference list for a video block in a video frame of the video. The processor may be configured to reorder multiple reference picture pairs in the joint list based on bilateral matching using one or more motion vectors of the video block to generate a reordered joint list. The processor may be configured to perform inter-frame prediction on the video block based on the reordered joint list to determine a reference index for the video block. The processor may be configured to generate a bitstream to include a reference index.
[0007] Embodiments of the present disclosure also provide a non-transitory computer-readable storage medium storing a bitstream and instructions, wherein the instructions, when executed by a processor of a video encoder, cause the processor to perform a video processing method for inter-frame prediction on the video encoder. The video processing method may include generating a joint list including multiple reference picture pairs based on a first reference list and a second reference list for a video block in a video frame of the video. The video processing method may include reordering multiple reference picture pairs in the joint list based on bilateral matching using one or more motion vectors of the video block to generate a reordered joint list. The video processing method may include performing inter-frame prediction on the video block based on the reordered joint list to determine a reference index for the video block. The video processing method may include generating a bitstream to include a reference index.
[0008] An embodiment of the present disclosure provides a video processing method for inter-frame prediction performed by a video decoder. The video processing method may include determining, by a processor of the video decoder, a reference index for a video block in a video frame of a video from a bitstream. The video processing method may include generating, by the processor of the video decoder, a joint list including a plurality of reference picture pairs based on a first reference list and a second reference list for the video block. The video processing method may include reordering, by the processor of the video decoder, a plurality of reference picture pairs in the joint list based on bilateral matching using one or more motion vectors of the video block to generate a reordered joint list. The video processing method may include performing, by the processor of the video decoder, inter-frame prediction on the video block based on the reordered joint list and the reference index.
[0009] An embodiment of the present disclosure also provides a video decoder device for inter-frame prediction. The video decoder device may include a memory configured to store a bitstream and a processor coupled to the memory. The processor may be configured to determine a reference index for a video block in a video frame of the video from the bitstream. The processor may be configured to generate a joint list including multiple reference picture pairs based on a first reference list and a second reference list for the video block. The processor may be configured to reorder multiple reference picture pairs in the joint list based on bilateral matching using one or more motion vectors of the video block to generate a reordered joint list. The processor may be configured to perform inter-frame prediction on the video block based on the reordered joint list and the reference index.
[0010] Embodiments of the present disclosure also provide a non-transitory computer-readable storage medium storing a bitstream and instructions, wherein the instructions, when executed by a processor of a video decoder, cause the processor to perform a video processing method for inter-frame prediction. The video processing method may include determining a reference index for a video block in a video frame of a video from a bitstream. The video processing method may include generating a joint list including a plurality of reference picture pairs based on a first reference list and a second reference list for the video block. The video processing method may include reordering a plurality of reference picture pairs in the joint list based on bilateral matching using one or more motion vectors of the video block to generate a reordered joint list. The video processing method may include performing inter-frame prediction on the video block based on the reordered joint list and the reference index.
[0011] It is to be understood that both the foregoing general description and the following detailed description are exemplary only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate examples consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0013] Figure 1is a block diagram illustrating an exemplary system for encoding and decoding video blocks according to some embodiments of the present disclosure.
[0014] Figure 2 is a block diagram illustrating an exemplary video encoder according to some embodiments of the present disclosure.
[0015] Figure 3 is a block diagram illustrating an exemplary video decoder according to some embodiments of the present disclosure.
[0016] FIG. 4A to FIG. 4E is a block diagram illustrating how a frame may be recursively divided into multiple video blocks of different sizes and shapes according to some embodiments of the present disclosure.
[0017] Figure 5 is a diagram illustrating template matching according to some embodiments of the present disclosure.
[0018] Fig. 6A is a block diagram illustrating an exemplary encoder-side inter-frame prediction process according to some embodiments of the present disclosure.
[0019] Figure 6B is a block diagram illustrating an exemplary decoder-side inter-frame prediction process according to some embodiments of the present disclosure.
[0020] Figure 7 is a diagram of an exemplary reference structure for a random access configuration according to some embodiments of the present disclosure.
[0021] Figure 8 is a diagram of an exemplary bilateral matching process according to some embodiments of the present disclosure.
[0022] Fig. 9 is a diagram of exemplary motion vector scaling for random access configurations according to some embodiments of the present disclosure.
[0023] Fig.10 is a diagram of an exemplary reference structure for a low latency configuration according to some embodiments of the present disclosure.
[0024] Fig.11 is a diagram of exemplary motion vector scaling for a low latency configuration according to some embodiments of the present disclosure.
[0025] Fig.12 is a flowchart of an exemplary method for inter-frame prediction at the encoder side according to some embodiments of the present disclosure.
[0026] Fig.13 is a flowchart of an exemplary method for inter-frame prediction at the decoder side according to some embodiments of the present disclosure.
[0027] Fig.14 is a diagram illustrating a computing environment coupled to a user interface according to some implementations of the present disclosure. DETAILED DESCRIPTION
[0028] Reference will now be made in detail to specific embodiments, examples of which are shown in the accompanying drawings. In the following detailed description, numerous non-limiting specific details are set forth to aid in understanding the subject matter presented herein. However, it will be apparent to one of ordinary skill in the art that various alternatives may be used without departing from the scope of the claims, and that the subject matter may be practiced without these specific details. For example, it will be apparent to one of ordinary skill in the art that the subject matter presented herein may be implemented on many types of electronic devices having digital video capabilities.
[0029] It should be noted that the terms "first", "second", etc. used in the specification, claims, and drawings of the present disclosure are used to distinguish objects rather than to describe any particular order or sequence. It should be understood that the terms used in this manner can be interchanged under appropriate conditions, so that the embodiments of the present disclosure described herein can be implemented in an order other than those shown in the drawings or described in the present disclosure.
[0030] Figure 1 is a block diagram illustrating an exemplary system 10 for encoding and decoding video blocks in parallel according to some embodiments of the present disclosure. Figure 1 As shown in , system 10 includes a source device 12 that generates and encodes video data to be later decoded by a destination device 14. Source device 12 and destination device 14 may include any of a wide variety of electronic devices, including desktop or laptop computers, tablet computers, smart phones, set-top boxes, digital televisions, cameras, display devices, digital media players, video game consoles, video streaming devices, etc. In some implementations, source device 12 and destination device 14 are equipped with wireless communication capabilities.
[0031] In some embodiments, the target device 14 may receive the encoded video data to be decoded via the link 16. The link 16 may include any type of communication medium or device capable of moving the encoded video data from the source device 12 to the target device 14. In one example, the link 16 may include a communication medium that enables the source device 12 to send the encoded video data directly to the target device 14 in real time. The encoded video data may be modulated according to a communication standard (such as a wireless communication protocol) and sent to the target device 14. The communication medium may include any wireless or wired communication medium, such as a radio frequency (RF) spectrum or one or more physical transmission lines. The communication medium may form a portion of a packet-based network (e.g., a local area network, a wide area network, or a global network such as the Internet). The communication medium may include a router, a switch, a base station, or any other device that may be conducive to facilitating communication from the source device 12 to the target device 14.
[0032] In some other embodiments, the encoded video data may be sent from the output interface 22 to the storage device 32. Subsequently, the encoded video data in the storage device 32 may be accessed by the target device 14 via the input interface 28. The storage device 32 may include any of a variety of distributed or locally accessed data storage media, such as a hard drive, a Blu-ray disc, a digital versatile disk (DVD), a compact disc read-only memory (CD-ROM), a flash memory, a volatile or non-volatile memory, or any other suitable digital storage medium for storing encoded video data. In another example, the storage device 32 may correspond to a file server or another intermediate storage device that can store the encoded video data generated by the source device 12. The target device 14 can access the stored video data from the storage device 2 via streaming or downloading. The file server can be any type of computer capable of storing encoded video data and sending the encoded video data to the target device 14. Exemplary file servers include a web server (e.g., for a website), a File Transfer Protocol (FTP) server, a Network Attached Storage (NAS) device, or a local disk drive. The target device 14 may access the encoded video data through any standard data connection suitable for accessing the encoded video data stored on the file server, including a wireless channel (e.g., a Wireless Fidelity (Wi-Fi) connection), a wired connection (e.g., a Digital Subscriber Line (DSL), a cable modem, etc.), or a combination of both. The transmission of the encoded video data from the storage device 32 may be a streaming transmission, a download transmission, or a combination of both a streaming transmission and a download transmission.
[0033] like Figure 1 As shown in , source device 12 includes video source 18, video encoder 20 and output interface 22. Video source 18 may include sources such as or a combination of such sources: a video capture device (e.g., a camera), a video archive containing previously captured video, a video feed interface for receiving video from a video content provider, and / or a computer graphics system for generating computer graphics data as source video. As an example, if video source 18 is a camera of a security monitoring system, source device 12 and target device 14 may form a camera phone or a video phone. However, the embodiments described in this application are generally applicable to video encoding and decoding, and may be applied to wireless and / or wired applications.
[0034] The captured, pre-captured, or computer-generated video may be encoded by the video encoder 20. The encoded video data may be sent directly to the target device 14 via the output interface 22 of the source device 12. The encoded video data may also (or alternatively) be stored on a storage device 32 for later access by the target device 14 or other devices for decoding and / or playback. The output interface 22 may also include a modem and / or a transmitter.
[0035] Target device 14 includes input interface 28, video decoder 30, and display device 34. Input interface 28 may include a receiver and / or a modem and receives encoded video data via link 16. The encoded video data communicated via link 16 or provided on storage device 32 may include various syntax elements generated by video encoder 20 for use by video decoder 30 in decoding the video data. Such syntax elements may be included in the encoded video data sent over a communication medium, stored on a storage medium, or stored on a file server.
[0036] In some embodiments, the target device 14 may include a display device 34, which may be an integrated display device and an external display device configured to communicate with the target device 14. The display device 34 displays the decoded video data to the user and may include any of a variety of display devices, such as a Liquid Crystal Display (LCD), a plasma display, an Organic Light Emitting Diode (OLED) display, or another type of display device.
[0037] The video encoder 20 and the video decoder 30 may operate according to a proprietary standard or an industry standard (e.g., VVC, HEVC, MPEG-4, Part 10, AVC) or an extension of such a standard. It should be understood that the present application is not limited to a specific video encoding / decoding standard and may be applicable to other video encoding / decoding standards. It is generally believed that the video encoder 20 of the source device 12 may be configured to encode video data according to any of these current standards or future standards. Similarly, it is also generally believed that the video decoder 30 of the target device 14 may be configured to decode video data according to any of these current standards or future standards.
[0038] The video encoder 20 and the video decoder 30 may be implemented as any of a variety of suitable encoder and / or decoder circuits, respectively, such as one or more microprocessors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA), discrete logic, software, hardware, firmware, or any combination thereof. When partially implemented in software, the electronic device may store instructions for the software in a suitable non-volatile computer-readable medium, and use one or more processors to execute the instructions in the hardware to perform the video encoding / decoding operations disclosed in the present disclosure. Each of the video encoder 20 and the video decoder 30 may be included in one or more encoders or decoders, and either of the encoders or decoders may be integrated as part of a combined encoder / decoder (CODEC) in the corresponding device.
[0039] Figure 2 is a block diagram illustrating an exemplary video encoder 20 according to some embodiments described in the present application. The video encoder 20 may perform intra-frame prediction encoding and inter-frame prediction encoding of video blocks within a video frame. Intra-frame prediction encoding relies on spatial prediction to reduce or remove spatial redundancy in video data within a given video frame or picture. Inter-frame prediction encoding relies on temporal prediction to reduce or remove temporal redundancy in video data within adjacent video frames or pictures of a video sequence. It should be noted that the term "frame" may be used as a synonym for the term "image" or "picture" in the field of video coding and decoding.
[0040] like Figure 2As shown in FIG. 1 , the video encoder 20 includes a video data memory 40, a prediction processing unit 41, a decoded picture buffer (DPB) 64, an adder 50, a transform processing unit 52, a quantization unit 54, and an entropy coding unit 56. The prediction processing unit 41 also includes a motion estimation unit 42, a motion compensation unit 44, a partition unit 45, an intra-frame prediction processing unit 46, and an intra-frame block copy (BC) unit 48. In some embodiments, the video encoder 20 also includes an inverse quantization unit 58, an inverse transform processing unit 60, and an adder 62 for video block reconstruction. A loop filter 63 (such as a deblocking filter) may be located between the adder 62 and the DPB 64 to filter the block boundaries to remove blocking artifacts from the reconstructed video. In addition to using a deblocking filter, another loop filter, such as a Sample Adaptive Offset (SAO) filter, a Cross Component Sample Adaptive Offset (CCSAO) filter, and / or an Adaptive in-Loop Filter (ALF), may be used to filter the output of the adder 62. It should be noted that for the CCSAO technique, the present application is not limited to the embodiments described herein, but the present application may be applied to a case where an offset of any component among the luminance component, the Cb chrominance component, and the Cr chrominance component is selected according to any other component among the luminance component, the Cb chrominance component, and the Cr chrominance component, and the any component is modified based on the selected offset. In addition, it should be noted that the first component mentioned herein may be any component among the luminance component, the Cb chrominance component, and the Cr chrominance component, the second component mentioned herein may be any other component among the luminance component, the Cb chrominance component, and the Cr chrominance component, and the third component mentioned herein may be the remaining component among the luminance component, the Cb chrominance component, and the Cr chrominance component. In some examples, the loop filter may be omitted and the decoded video blocks may be provided directly by adder 62 to DPB 64. Video encoder 20 may take the form of a fixed or programmable hardware unit, or may be distributed among one or more of the illustrated fixed or programmable hardware units.
[0041] Video data memory 40 may store video data to be encoded by components of video encoder 20. The video data in video data memory 40 may be obtained, for example, from Figure 1The video data memory 40 and the DPB 64 are obtained from the video source 18 shown. The DPB 64 is a buffer that stores reference video data (reference frames or pictures) for use by the video encoder 20 (e.g., in intra-frame or inter-frame prediction coding mode) when encoding video data. The video data memory 40 and the DPB 64 may be formed by any of a variety of memory devices. In various examples, the video data memory 40 may be on-chip with other components of the video encoder 20, or off-chip relative to those components.
[0042] like Figure 2 As shown in , after receiving the video data, the partitioning unit 45 within the prediction processing unit 41 partitions the video data into video blocks. This partitioning operation may also include partitioning the video frame into strips, tiles (e.g., a set of video blocks) or other larger coding units (Coding Unit, CU) according to a predefined splitting structure associated with the video data (e.g., a quadtree (Quad-Tree, QT) structure). A video frame is or can be considered to be a two-dimensional array or matrix of samples with sample values. The samples in the array may also be referred to as pixels or pels. The number of samples in the horizontal and vertical directions (or axes) of the array or picture defines the size and / or resolution of the video frame. The video frame may be divided into multiple video blocks by (for example) using QT partitioning. A video block is also or can be considered to be a two-dimensional array or matrix of samples with sample values, but the size of the video block is smaller than the video frame. The number of samples in the horizontal and vertical directions (or axes) of the video block defines the size of the video block. The video block may be further divided into one or more block partitions or sub-blocks (which may again form blocks) by, for example, iteratively using QT partitioning, binary-tree (BT) partitioning or ternary-tree (TT) partitioning or any combination thereof. It should be noted that the term "block" or "video block" as used herein may be a portion of a frame or picture, in particular a rectangular (square or non-square) portion. With reference to, for example, HEVC and VVC, a block or video block may be or correspond to a coding tree unit (CTU), a CU, a prediction unit (PU) or a transform unit (TU) and / or may be or correspond to a corresponding block, such as a coding tree block (CTB), a coding block (CB), a prediction block (PB) or a transform block (TB) and / or correspond to a sub-block.
[0043] The prediction processing unit 41 may select one of a plurality of feasible prediction coding modes for the current video block based on the error results (e.g., code rate and distortion level), such as one of one or more inter-frame prediction coding modes in a plurality of intra-frame prediction coding modes. The prediction processing unit 41 may provide the resulting intra-frame prediction coding block (e.g., prediction block) or inter-frame prediction coding block to the adder 50 to generate a residual block, and to the adder 62 to reconstruct the coding block for subsequent use as part of a reference frame. The prediction processing unit 41 also provides syntax elements (such as motion vectors, intra-frame mode indicators, partition information, and other such syntax information) to the entropy coding unit 56.
[0044] To select an appropriate intra-prediction coding mode for the current video block, intra-prediction processing unit 46 within prediction processing unit 41 may perform intra-prediction coding of the current video block relative to one or more neighboring blocks in the same frame as the current block to be encoded to provide spatial prediction. Motion estimation unit 42 and motion compensation unit 44 within prediction processing unit 41 may perform inter-prediction coding of the current video block relative to one or more prediction blocks in one or more reference frames to provide temporal prediction. Video encoder 20 may perform multiple encoding passes, for example, to select an appropriate coding mode for each block of video data.
[0045] In some embodiments, motion estimation unit 42 determines the inter-prediction mode for a current video frame by generating a motion vector according to a predetermined pattern within a sequence of video frames, the motion vector indicating the displacement of a video block within the current video frame relative to a prediction block within a reference video frame. Motion estimation performed by motion estimation unit 42 is the process of generating a motion vector that estimates the motion for a video block. For example, a motion vector may indicate the displacement of a video block within a current video frame or picture relative to a prediction block within a reference frame, the prediction block in the reference frame relative to the current block being encoded in the current frame. The predetermined pattern may designate video frames in a sequence as P frames or B frames. Intra BC unit 48 may determine a vector (e.g., a block vector) for intra BC coding in a manner similar to the motion vectors determined by motion estimation unit 42 for inter prediction, or may utilize motion estimation unit 42 to determine the block vector.
[0046] In terms of pixel differences, the prediction block of the video block may be or may correspond to a block or reference block of a reference frame that closely matches the video block to be encoded, and the pixel difference may be determined by the sum of absolute differences (SAD), the sum of square differences (SSD), or other difference metrics. In some embodiments, the video encoder 20 may calculate values for sub-integer pixel positions of the reference frame stored in the DPB 64. For example, the video encoder 20 may interpolate values for quarter-pixel positions, eighth-pixel positions, or other fractional pixel positions of the reference frame. Thus, the motion estimation unit 42 may perform a motion search relative to the full pixel positions and the fractional pixel positions and output a motion vector with fractional pixel precision.
[0047] Motion estimation unit 42 calculates a motion vector for a video block in an inter-prediction coded frame by comparing the position of the video block to the position of a prediction block of a reference frame selected from a first reference frame list (List 0) or a second reference frame list (List 1), each of which identifies one or more reference frames stored in DPB 64. Motion estimation unit 42 sends the calculated motion vector to motion compensation unit 44 and then to entropy encoding unit 56.
[0048] The motion compensation performed by the motion compensation unit 44 may involve extracting or generating a prediction block based on the motion vector determined by the motion estimation unit 42. After receiving the motion vector for the current video block, the motion compensation unit 44 may locate the prediction block pointed to by the motion vector in one of the reference frame lists, retrieve the prediction block from the DPB 64, and forward the prediction block to the adder 50. The adder 50 then forms a residual video block of pixel difference values by subtracting the pixel values of the prediction block provided by the motion compensation unit 44 from the pixel values of the current video block being encoded. The pixel difference values forming the residual video block may include luma component difference values or chroma component difference values or both. The motion compensation unit 44 may also generate syntax elements associated with the video block of the video frame for use by the video decoder 30 when decoding the video block of the video frame. The syntax elements may include, for example, syntax elements defining a motion vector for identifying the prediction block, any flag indicating a prediction mode, or any other syntax information described herein. Note that the motion estimation unit 42 and the motion compensation unit 44 may be highly integrated, but are shown separately for conceptual purposes.
[0049] In some embodiments, the intra BC unit 48 may generate vectors and extract prediction blocks in a manner similar to that described above in conjunction with the motion estimation unit 42 and the motion compensation unit 44, but these prediction blocks are in the same frame as the current block being encoded, and these vectors are referred to as block vectors rather than motion vectors. Specifically, the intra BC unit 48 may determine the intra prediction mode to be used to encode the current block. In some examples, the intra BC unit 48 may encode the current block using various intra prediction modes, for example, during different encoding passes, and test their performance through rate-distortion analysis. Next, the intra BC unit 48 may select a suitable intra prediction mode to use among the various tested intra prediction modes and generate an intra mode indicator accordingly. For example, the intra BC unit 48 may calculate rate-distortion values for the various tested intra prediction modes using rate-distortion analysis, and select the intra prediction mode with the best rate-distortion characteristics among the tested modes as the suitable intra prediction mode to use. The rate-distortion analysis generally determines the amount of distortion (or error) between a coded block and the original uncoded block that was encoded to generate the coded block, as well as the bit rate (i.e., the number of bits) used to generate the coded block. Intra BC unit 48 may calculate ratios from the distortions and rates for the various coded blocks to determine which intra-prediction mode exhibits the best rate-distortion value for the block.
[0050] In other examples, intra BC unit 48 may use, in whole or in part, motion estimation unit 42 and motion compensation unit 44 to perform such functions for intra BC prediction in accordance with embodiments described herein. In either case, for intra block copying, the prediction block may be a block that is considered to closely match the block to be encoded in terms of pixel differences, which may be determined by SAD, SSD, or other difference metrics, and identification of the prediction block may include calculating values for sub-integer pixel positions.
[0051] Regardless of whether the prediction block is from the same frame according to intra-frame prediction or from a different frame according to inter-frame prediction, video encoder 20 can form pixel difference values by subtracting the pixel values of the prediction block from the pixel values of the current video block being encoded, thereby forming a residual video block. The pixel difference values forming the residual video block may include both luma component differences and chroma component differences.
[0052] As an alternative to the inter-frame prediction performed by the motion estimation unit 42 and the motion compensation unit 44 or the intra-frame block copy prediction performed by the intra BC unit 48 as described above, the intra-frame prediction processing unit 46 may perform intra-frame prediction on the current video block. Specifically, the intra-frame prediction processing unit 46 may determine an intra-frame prediction mode for encoding the current block. To this end, the intra-frame prediction processing unit 46 may use various intra-frame prediction modes to encode the current block, for example, during different encoding passes, and the intra-frame prediction processing unit 46 (or in some examples, the mode selection unit) may select a suitable intra-frame prediction mode from the tested intra-frame prediction modes to use. The intra-frame prediction processing unit 46 may provide information indicating the intra-frame prediction mode selected for the block to the entropy encoding unit 56. The entropy encoding unit 56 may encode the information indicating the selected intra-frame prediction mode into the bitstream.
[0053] After prediction processing unit 41 determines a prediction block for the current video block via inter-prediction or intra-prediction, adder 50 forms a residual video block by subtracting the prediction block from the current video block. The residual video data in the residual block may be included in one or more TUs and provided to transform processing unit 52. Transform processing unit 52 transforms the residual video data into residual transform coefficients using a transform such as a discrete cosine transform (DCT) or a conceptually similar transform.
[0054] Transform processing unit 52 may send the resulting transform coefficients to quantization unit 54. Quantization unit 54 quantizes the transform coefficients to further reduce the bit rate. The quantization process may also reduce the bit depth associated with some or all of the coefficients. The degree of quantization may be modified by adjusting a quantization parameter. In some examples, quantization unit 54 may then perform a scan on the matrix including the quantized transform coefficients. Optionally, entropy encoding unit 56 may perform the scan.
[0055] After quantization, entropy coding unit 56 entropy encodes the quantized transform coefficients into a video bitstream using, for example, context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), syntax-based context adaptive binary arithmetic coding (SBAC), probability interval partitioning entropy (PIPE) coding, or another entropy coding method or technique. The encoded bitstream may then be sent to a video bitstream such as Figure 1 The video decoder 30 shown, or archived as Figure 1 Storage device 32 is shown for later transmission to or retrieval by video decoder 30. Entropy encoding unit 56 may also entropy encode motion vectors and other syntax elements for the current video frame being encoded.
[0056] Inverse quantization unit 58 and inverse transform processing unit 60 apply inverse quantization and inverse transform, respectively, to reconstruct the residual video block in the pixel domain for use in generating reference blocks for predicting other video blocks. As noted above, motion compensation unit 44 may generate a motion compensated prediction block from one or more reference blocks of a frame stored in DPB 64. Motion compensation unit 44 may also apply one or more interpolation filters to the prediction block to calculate sub-integer pixel values for use in motion estimation.
[0057] Adder 62 adds the reconstructed residual block to the motion compensated prediction block generated by motion compensation unit 44 to generate a reference block for storage in DPB 64. The reference block may then be used as a prediction block by intra BC unit 48, motion estimation unit 42, and motion compensation unit 44 to inter-predict another video block in a subsequent video frame.
[0058] Figure 3 30 is a block diagram showing an exemplary video decoder 30 according to some embodiments of the present application. The video decoder 30 includes a video data memory 79, an entropy decoding unit 80, a prediction processing unit 81, an inverse quantization unit 86, an inverse transform processing unit 88, an adder 90, and a DPB 92. The prediction processing unit 81 further includes a motion compensation unit 82, an intra-frame prediction unit 84, and an intra-frame BC unit 85. The video decoder 30 may perform the above combined Figure 2The encoding process is substantially the inverse of the decoding process described with respect to video encoder 20. For example, motion compensation unit 82 may generate prediction data based on motion vectors received from entropy decoding unit 80, and intra-prediction unit 84 may generate prediction data based on intra-prediction mode indicators received from entropy decoding unit 80.
[0059] In some examples, units of the video decoder 30 may be tasked to perform embodiments of the present application. In addition, in some examples, embodiments of the present disclosure may be dispersed in one or more of the multiple units of the video decoder 30. For example, the intra BC unit 85 may perform embodiments of the present application alone or in combination with other units of the video decoder 30 (such as the motion compensation unit 82, the intra prediction unit 84, and the entropy decoding unit 80). In some examples, the video decoder 30 may not include the intra BC unit 85, and the functions of the intra BC unit 85 may be performed by other components of the prediction processing unit 81 (such as the motion compensation unit 82).
[0060] The video data memory 79 may store video data, such as an encoded video bitstream, to be decoded by other components of the video decoder 30. The video data stored in the video data memory 79 may be obtained, for example, from the storage device 32, from a local video source (such as a camera), via a wired or wireless network communication of video data, or by accessing a physical data storage medium (e.g., a flash drive or hard disk). The video data memory 79 may include a coded picture buffer (CPB) that stores encoded video data from an encoded video bitstream. The DPB 92 of the video decoder 30 stores reference video data for use by the video decoder 30 when decoding the video data (e.g., in an intra-frame or inter-frame prediction decoding mode). The video data memory 79 and the DPB 92 may be formed by any of a variety of memory devices, such as dynamic random access memory (DRAM) (including synchronous DRAM (SDRAM)), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. For illustrative purposes, the video data memory 79 and the DPB 92 are shown in FIG. Figure 3 9 as two different components of video decoder 30. However, it will be apparent to those skilled in the art that video data memory 79 and DPB 92 may be provided by the same memory device or separate memory devices. In some examples, video data memory 79 may be on-chip with other components of video decoder 30, or off-chip relative to those components.
[0061] During the decoding process, the video decoder 30 receives an encoded video bitstream representing video blocks of an encoded video frame and associated syntax elements. The video decoder 30 may receive syntax elements at the video frame level and / or the video block level. The entropy decoding unit 80 of the video decoder 30 entropy decodes the bitstream to generate quantization coefficients, motion vectors or intra-frame prediction mode indicators, and other syntax elements. The entropy decoding unit 80 then forwards the motion vectors or intra-frame prediction mode indicators and other syntax elements to the prediction processing unit 81.
[0062] When a video frame is encoded as an intra-prediction coded (I) frame or for intra-coded prediction blocks in other types of frames, intra-prediction unit 84 of prediction processing unit 81 may generate prediction data for a video block of a current video frame based on a signaled intra-prediction mode and reference data from a previously decoded block of the current frame.
[0063] When the video frame is encoded as an inter-frame prediction coded (i.e., B or P) frame, the motion compensation unit 82 of the prediction processing unit 81 generates one or more prediction blocks for the video block of the current video frame based on the motion vectors and other syntax elements received from the entropy decoding unit 80. Each of the prediction blocks may be generated from a reference frame within one of the reference frame lists. The video decoder 30 may construct the reference frame lists, List 0 and List 1, using a default construction technique based on the reference frames stored in the DPB 92.
[0064] In some examples, when a video block is decoded according to the intra BC mode described herein, intra BC unit 85 of prediction processing unit 81 generates a prediction block for the current video block based on the block vector and other syntax elements received from entropy decoding unit 80. The prediction block may be within a reconstructed region of the same picture as the current video block as defined by video encoder 20.
[0065] The motion compensation unit 82 and / or the intra BC unit 85 determine prediction information for the video block of the current video frame by parsing the motion vector and other syntax elements, and then use the prediction information to generate a prediction block for the current video block being decoded. For example, the motion compensation unit 82 uses some of the received syntax elements to determine the prediction mode (e.g., intra prediction or inter prediction) for decoding the video block of the video frame, the inter prediction frame type (e.g., B or P), the construction information for one or more of the reference frame lists for the frame, the motion vector for each inter prediction encoded video block of the frame, the inter prediction state for each inter prediction encoded video block of the frame, and other information for decoding the video block in the current video frame.
[0066] Similarly, the intra BC unit 85 may use some of the received syntax elements, such as a flag to determine whether the current video block is predicted using intra BC mode, construction information of which video blocks of the frame are within the reconstruction region and should be stored in the DPB 92, a block vector for each intra BC predicted video block of the frame, an intra BC prediction state for each intra BC predicted video block of the frame, and other information for decoding the video blocks in the current video frame.
[0067] Motion compensation unit 82 may also perform interpolation using interpolation filters as used during encoding of the video blocks by video encoder 20 to calculate interpolated values for sub-integer pixels of reference blocks. In this case, motion compensation unit 82 may determine the interpolation filters used by video encoder 20 from the received syntax elements and use these interpolation filters to generate the prediction blocks.
[0068] Inverse quantization unit 86 inverse quantizes the quantized transform coefficients provided in the bitstream and entropy decoded by entropy decoding unit 80, using the same quantization parameters calculated by video encoder 20 for each video block in the video frame to determine the degree of quantization. Inverse transform processing unit 88 applies an inverse transform (e.g., an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process) to the transform coefficients to reconstruct the residual block in the pixel domain.
[0069] After the motion compensation unit 82 or the intra BC unit 85 generates a prediction block for the current video block based on the vector and other syntax elements, the adder 90 reconstructs the decoded video block for the current video block by adding the residual block from the inverse transform processing unit 88 to the corresponding prediction block generated by the motion compensation unit 82 and the intra BC unit 85. A loop filter 91 (such as a deblocking filter, an SAO filter, a CCSAO filter, and / or an ALF) may be located between the adder 90 and the DPB 92 to further process the decoded video block. In some examples, the loop filter 91 may be omitted, and the decoded video block may be provided directly to the DPB 92 by the adder 90. The decoded video blocks in a given frame are then stored in the DPB 92, which stores reference frames for subsequent motion compensation of the next video block. The DPB 92 or a memory device separate from the DPB 92 may also store the decoded video for later presentation on a display device (e.g., Figure 1 on a display device 34).
[0070] In a typical video encoding and decoding process, a video sequence usually includes an ordered set of frames or pictures. Each frame may include three sample arrays, denoted as SL, SCb, and SCr. SL is a two-dimensional array of luma samples. SCb is a two-dimensional array of Cb chroma samples. SCr is a two-dimensional array of Cr chroma samples. In other cases, a frame may be monochrome and therefore include only a two-dimensional array of luma samples.
[0071] like Figure 4A As shown in , the video encoder 20 (or more specifically, the partitioning unit 45) generates an encoded representation of a frame by first partitioning the frame into a set of CTUs. A video frame may include an integer number of CTUs sequentially ordered from left to right and from top to bottom in a raster scan order. Each CTU is the largest logical coding unit, and the width and height of the CTU are signaled by the video encoder 20 in a sequence parameter set so that all CTUs in a video sequence have the same size, one of 128×128, 64×64, 32×32, and 16×16. It should be noted, however, that the present application is not necessarily limited to a particular size. As Figure 4B As shown in , each CTU may include one CTB for luma samples, two corresponding coding tree blocks for chroma samples, and syntax elements for encoding and decoding samples of the coding tree blocks. The syntax elements describe the properties of different types of units of coding pixel blocks and how the video sequence can be reconstructed at the video decoder 30, including inter-frame prediction or intra-frame prediction, intra-frame prediction mode, motion vectors, and other parameters. In a monochrome picture or a picture with three separate color planes, a CTU may include a single coding tree block and syntax elements for encoding and decoding samples of the coding tree block. The coding tree block may be an N×N sample block.
[0072] To achieve better performance, video encoder 20 may recursively perform tree partitioning, such as binary tree partitioning, ternary tree partitioning, quadtree partitioning, or a combination thereof, on the coding tree block of the CTU and divide the CTU into smaller CUs. Figure 4C As depicted in , a 64×64 CTU 400 is first partitioned into four smaller CUs, each CU having a block size of 32×32. Among the four smaller CUs, CU 410 and CU 420 are partitioned into four CUs of a block size of 16×16, respectively. Two 16×16 CUs 430 and CU 440 are further partitioned into four CUs of a block size of 8×8, respectively. Figure 4D Depicted is a diagram showing Figure 4C The quadtree data structure of the final result of the partitioning process of CTU 400 depicted in FIG. 4 is a quadtree data structure, each leaf node of the quadtree corresponds to a CU of each size ranging from 32×32 to 8×8. Figure 4BEach CU may include a CB of luma samples and two corresponding coding blocks of chroma samples of the same size frame, and syntax elements for encoding and decoding the samples of the coding blocks. In a monochrome picture or a picture with three separate color planes, a CU may include a single coding block and syntax structures for encoding and decoding the samples of the coding block. It should be noted that Figure 4C and Figure 4D The quadtree partitioning depicted in FIG is for illustrative purposes only, and one CTU may be split into CUs based on quadtree / ternary tree / binary tree partitioning to adapt to varying local characteristics. In a multi-type tree structure, one CTU is divided by a quadtree structure, and each quadtree leaf CU may be further divided by a binary tree structure and a ternary tree structure. Figure 4E As shown, there are five possible partition types for a coding block with a width of W and a height of H, namely, four-way partitioning, horizontal binary partitioning, vertical binary partitioning, horizontal ternary partitioning, and vertical ternary partitioning.
[0073] In some embodiments, the video encoder 20 may further divide the coding block of the CU into one or more M×NPBs. A PB is a rectangular (square or non-square) sample block to which the same prediction (inter or intra) is applied. The PU of a CU may include a PB of luma samples, two corresponding PBs of chroma samples, and syntax elements for predicting the PBs. In a monochrome picture or a picture with three separate color planes, a PU may include a single PB and a syntax structure for predicting the PB. The video encoder 20 may generate a predicted luma block, a predicted Cb block, and a predicted Cr block for the luma PB, Cb PB, and Cr PB of each PU of the CU.
[0074] Video encoder 20 may use intra prediction or inter prediction to generate a prediction block for a PU. If video encoder 20 uses intra prediction to generate a prediction block for a PU, video encoder 20 may generate the prediction block for the PU based on decoded samples of a frame associated with the PU. If video encoder 20 uses inter prediction to generate a prediction block for a PU, video encoder 20 may generate the prediction block for the PU based on decoded samples of one or more frames other than the frame associated with the PU.
[0075] After the video encoder 20 generates the predicted luma block, the predicted Cb block, and the predicted Cr block for one or more PUs of a CU, the video encoder 20 may generate a luma residual block for the CU by subtracting the predicted luma block of the CU from the original luma coding block of the CU, so that each sample in the luma residual block of the CU indicates the difference between a luma sample in one of the predicted luma blocks of the CU and a corresponding sample in the original luma coding block of the CU. Similarly, the video encoder 20 may generate a Cb residual block and a Cr residual block for the CU, respectively, so that each sample in the Cb residual block of the CU indicates the difference between a Cb sample in one of the predicted Cb blocks of the CU and a corresponding sample in the original Cb coding block of the CU, and each sample in the Cr residual block of the CU may indicate the difference between a Cr sample in one of the predicted Cr blocks of the CU and a corresponding sample in the original Cr coding block of the CU.
[0076] In addition, if Figure 4C As shown in , the video encoder 20 may use quadtree partitioning to decompose the luma residual block, Cb residual block and Cr residual block of the CU into one or more luma transform blocks, Cb transform blocks and Cr transform blocks, respectively. A transform block is a rectangular (square or non-square) sample block to which the same transform is applied. A TU of a CU may include a transform block of luma samples, two corresponding transform blocks of chroma samples, and syntax elements for transforming the transform block samples. Therefore, each TU of a CU may be associated with a luma transform block, a Cb transform block and a Cr transform block. In some examples, the luma transform block associated with a TU may be a sub-block of the luma residual block of the CU. The Cb transform block may be a sub-block of the Cb residual block of the CU. The Cr transform block may be a sub-block of the Cr residual block of the CU. In a monochrome picture or a picture with three separate color planes, a TU may include a single transform block and a syntax structure for transforming the samples of the transform block.
[0077] The video encoder 20 may apply one or more transforms to the luma transform block of the TU to generate a luma coefficient block for the TU. The coefficient block may be a two-dimensional array of transform coefficients. The transform coefficient may be a scalar. The video encoder 20 may apply one or more transforms to the Cb transform block of the TU to generate a Cb coefficient block for the TU. The video encoder 20 may apply one or more transforms to the Cr transform block of the TU to generate a Cr coefficient block for the TU.
[0078] After generating a coefficient block (e.g., a luma coefficient block, a Cb coefficient block, or a Cr coefficient block), video encoder 20 may quantize the coefficient block. Quantization generally refers to a process in which transform coefficients are quantized to potentially reduce the amount of data used to represent the transform coefficients, thereby providing further compression. After video encoder 20 quantizes the coefficient block, video encoder 20 may entropy encode syntax elements indicating the quantized transform coefficients. For example, video encoder 20 may perform CABAC on the syntax elements indicating the quantized transform coefficients. Finally, video encoder 20 may output a bitstream including a sequence of bits that form a representation of an encoded frame and associated data, and the bitstream is stored in storage device 32 or sent to target device 14.
[0079] After receiving the bitstream generated by the video encoder 20, the video decoder 30 may parse the bitstream to obtain syntax elements from the bitstream. The video decoder 30 may reconstruct a frame of video data based at least in part on the syntax elements obtained from the bitstream. The process of reconstructing the video data is generally the inverse of the encoding process performed by the video encoder 20. For example, the video decoder 30 may perform an inverse transform on a coefficient block associated with a TU of the current CU to reconstruct a residual block associated with the TU of the current CU. The video decoder 30 also reconstructs the coding block of the current CU by adding samples of the prediction block for the PU of the current CU to corresponding samples of the transform block of the TU of the current CU. After reconstructing the coding block for each CU of the frame, the video decoder 30 may reconstruct the frame.
[0080] As mentioned above, video codecs mainly use two modes, namely, intra-frame prediction (or intra-frame prediction) and inter-frame prediction (or inter-frame prediction) to achieve video compression. It should be noted that IBC can be regarded as intra-frame prediction or a third mode. Between the two modes, inter-frame prediction contributes more to codec efficiency than intra-frame prediction because motion vectors are used to predict the current video block from the reference video block.
[0081] However, with the ever-improving video data capture technology and more refined video block sizes for retaining details in the video data, the amount of data required to represent the motion vector of the current frame has also increased significantly. One way to overcome this challenge is to benefit from the fact that not only a group of neighboring CUs in both the spatial domain and the temporal domain have similar video data for prediction purposes, but the motion vectors between these neighboring CUs are also similar. Therefore, the motion information of spatially neighboring CUs and / or temporally co-located CUs can be used as an approximation of the motion information (e.g., motion vector) of the current CU by exploring the spatial and temporal correlation of the spatially neighboring CUs and / or the temporally co-located CUs, which is also referred to as the "motion vector predictor (MVP)" of the current CU.
[0082] Instead of combining as above Figure 2 The actual motion vector of the current CU determined by the motion estimation unit 42 is encoded into the video bitstream, and the motion vector predictor of the current CU is subtracted from the actual motion vector of the current CU to generate the motion vector difference (MVD) of the current CU. By doing so, the motion vector determined by the motion estimation unit 42 for each CU of the frame does not need to be encoded into the video bitstream, and the amount of data used to represent motion information in the video bitstream can be significantly reduced.
[0083] As in the process of selecting a prediction block in a reference frame during inter-frame prediction of a coding block, both the video encoder 20 and the video decoder 30 need to adopt a set of rules for constructing a motion vector candidate list (also called a "merge list") of the current CU using those potential candidate motion vectors associated with the spatial neighboring CUs and / or the temporal co-located CUs of the current CU, and then selecting a member from the motion vector candidate list as the motion vector predictor of the current CU. By doing so, the motion vector candidate list itself does not need to be sent from the video encoder 20 to the video decoder 30, and the index of the selected motion vector predictor in the motion vector candidate list is sufficient for the video encoder 20 and the video decoder 30 to use the same motion vector predictor in the motion vector candidate list to encode and decode the current CU.
[0084] In inter-frame prediction, the selection of reference pictures and the construction of reference lists (e.g., List 0, List 1 described above) can help improve compression efficiency. In existing methods, the construction of each reference list can be fixed. For example, the order of reference pictures in each reference list for a specific video block can be fixed (e.g., each reference list can have a fixed reference picture order). However, the correlation between the video block and the reference pictures in the list can vary for different contents. Therefore, it may be difficult to improve prediction efficiency by using a fixed reference picture order in the reference list.
[0085] In accordance with some embodiments of the present disclosure, template matching may be used to reorder reference pictures in a reference list. A reference picture reordering method based on template matching may be used to improve the coding efficiency of inter-frame prediction under a random access configuration. A template matching cost may be calculated for each reference picture. Specifically, reference Figure 5 , the template for the video block from the video frame can be determined to include at least one of (a) the reconstructed samples in the top area 522A above the video block or (b) the reconstructed samples in the left area 522B of the video block. The motion vector (MV) for the video block can be obtained by combining the above Figure 2The motion estimation unit 42 described above determines. Then, given the motion vector MV and the template for the video block, a reference area corresponding to the reference picture can be determined. For example, the reference area can be determined from the reference picture based on the template and the motion vector MV of the video block, so that the reference area can have the same size as the template and can include one or more reference blocks 520A and 520B from the reference picture, wherein the one or more reference blocks 520A and 520B are determined based on the motion vector MV of the video block. Subsequently, a template matching cost can be calculated between the reference area and the template. For example, the template matching cost can use a difference metric between the reference area and the template, such as MSE, SAD, SSD, etc.
[0086] In a first example of a reference picture reordering method based on template matching (e.g., in a uni-predictive advanced motion vector prediction (AMVP) mode), reference pictures in list 0 and list 1 may be used to generate a joint list. For each hypothesis of a reference picture in the joint list, motion information may be derived accordingly, and template matching may be performed to calculate a template matching cost for the hypothesis of the reference picture. The hypotheses of the reference pictures in the joint list may then be reordered based on an ascending order of their respective template matching costs to generate a reordered joint list. A reference picture in the reordered joint list may be selected for a video block, and an index of the selected reference picture in the reordered joint list may be signaled from a video encoder to a video decoder in a bitstream.
[0087] In a second example of a reference picture reordering method based on template matching (e.g., in a bi-predictive AMVP mode), a series of reference picture pairs may be generated from list 0 and list 1, and reordered based on their respective template matching costs to generate a reordered list. A reference picture pair in the reordered list may be selected for a video block, and an index of the selected reference picture pair in the reordered list may be signaled from a video encoder to a video decoder in a bitstream.
[0088] Although the reference picture reordering method based on template matching can improve prediction accuracy, the implementation of template matching may be disadvantageous for hardware implementation due to pipeline delay. Consistent with some embodiments of the present disclosure, the encoding and decoding efficiency of inter-frame prediction can be improved by adaptive reference picture reordering based on bilateral matching. When compared with the application of template matching, the application of bilateral matching can reduce the pipeline delay of hardware implementation. The reference picture reordering technology based on bilateral matching disclosed herein can be performed at the block level (for example, for each video block), so that the corresponding reference picture order can be derived for each video block with its motion vector to generate a reordered joint list. The reordered joint list can be applied to inter-frame prediction of video blocks. Refer to the following Figure 6A-Figure 13The reference picture reordering technique based on bilateral matching is described in more detail.
[0089] Fig. 6A 6 is a block diagram illustrating an exemplary encoder-side inter-frame prediction process 600 according to some embodiments of the present disclosure. In some embodiments, the encoder-side inter-frame prediction process 600 may be performed by the prediction processing unit 41 of the video encoder 20. In some embodiments, the encoder-side inter-frame prediction process 600 may be performed by a processor on the encoder side (e.g., Fig.14 For illustrative purposes only, the following Fig. 6A The encoder-side inter-frame prediction process 600 is described as being implemented using a processor on the encoder side. Figure 7-Figure 11 To describe Fig. 6A The encoder-side inter-frame prediction process 600 may be performed at a block level, for example, for each video block of a video frame from a video. In some embodiments, the encoder-side inter-frame prediction process 600 may include joint list generation 602, reference picture reordering 604, and inter-frame prediction processing 606.
[0090] Starting from joint list generation 602 for a video block from a video frame of a video, a processor at the encoder side may generate a joint list including a plurality of reference picture pairs based on a first reference list and a second reference list. For example, the first reference list and the second reference list may be list 0 and list 1 for the video block, respectively. Each of the first reference list and the second reference list may have a plurality of reference pictures, respectively.
[0091] In some embodiments, a random access configuration may be applied in the first reference list and the second reference list. Specifically, the picture order count (POC) of the reference picture in the first reference list may be smaller than the POC of the video frame, and the POC of the reference picture in the second reference list may be larger than the POC of the video frame. In this case, the display order of the reference pictures in the first reference list may be before the video frame, and the display order of the reference pictures in the second reference list may be after the video frame. For example, the reference pictures in the first reference list may be displayed before the video frame. Figure 7 , a video frame may be displayed at sampling time i, where i may be any positive integer greater than 2. A first reference list (e.g., list 0) may include reference pictures ref00 and ref01 displayed at sampling times i-1 and i-2, respectively (e.g., list 0 = {ref00, ref01}). A second reference list (e.g., list 1) may include reference pictures ref10 and ref11 displayed at sampling times i+1 and i+2, respectively (e.g., list 1 = {ref10, ref11}). The reference pictures ref00 and ref01 in list 0 are displayed before the video frame, while the reference pictures ref10 and ref11 in list 1 are displayed after the video frame.
[0092] Optionally, a low-delay configuration may be applied in the first reference list and the second reference list by making the POC of the reference pictures in the first reference list and the second reference list smaller than the POC of the video frame. In this case, the display order of the reference pictures in the first reference list and the second reference list may be before the video frame. Fig.10 , a first reference list (e.g., list 0) and a second reference list (e.g., list 1) may include the same reference pictures but have different picture orders. List 0 may include reference pictures ref0, ref1, ref2, and ref3 having a picture order from sampling time i-1 to sampling time i-4, respectively (e.g., list 0 = {ref0, ref1, ref2, ref3}). List 1 may include reference pictures ref3, ref2, ref1, and ref0 having a picture order from sampling time i-4 to sampling time i-1, respectively (e.g., list 1 = {ref3, ref2, ref1, ref0}). The reference pictures in list 0 and list 1 are displayed before the video frame.
[0093] In some embodiments, a bidirectional prediction scheme is applied in the encoding and decoding of the video block. Therefore, the motion estimation unit 42 described above can determine the motion vector pairs for the first reference list and the second reference list (e.g., the first motion vector MV1 and the second motion vector MV2) for the video block respectively. The processor on the encoder side can generate a plurality of reference picture pairs in the joint list, wherein each reference picture pair includes a first reference picture from the first reference list and a second reference picture from the second reference list. For example, for Figure 7 For example, with list 0 = {ref00, ref01} and list 1 = {ref10, ref11} under the random access configuration shown in , the joint list may include 4 reference picture pairs from list 0 and list 1 (e.g., joint list = {(ref00, ref10), (ref00, ref11), (ref01, ref10), (ref01, ref11)}).
[0094] In another example, for Fig.10In the low-latency configuration shown in , where list 0 = {ref0, ref1, ref2, ref3} and list 1 = {ref3, ref2, ref1, ref0}, the joint list may include 16 reference picture pairs from list 0 and list 1 (e.g., joint list = {(ref0, ref0), (ref0, ref1), (ref0, ref2), (ref0, ref3), (ref1, ref0), (ref1, ref1), (ref1, ref2), (ref1, ref3), (ref2, ref0), (ref2, ref1), (ref2, ref2), (ref2, ref3), (ref3, ref0), (ref3, ref1), (ref3, ref2), (ref3, ref3)}). If for The first motion vector MV1 of list 0 is equal to the second motion vector MV2 for list 1, and the reference picture pairs with the same reference picture (e.g., (ref0, ref0), (ref1, ref1), (ref2, ref2), (ref3, ref3)) can be removed from the joint list. Then, the joint list can be modified to include 12 reference picture pairs from list 0 and list 1 (e.g., joint list = {(ref0, ref1), (ref0, ref2), (ref0, ref3), (ref1, ref0), (ref1, ref2), (ref1, ref3), (ref2, ref0), (ref2, ref1), (ref2, ref3), (ref3, ref0), (ref3, ref1), (ref3, ref2)}).
[0095] In some embodiments, a unidirectional prediction scheme is applied in the encoding and decoding of the video block. The first motion vector MV may be determined for the video block by the motion estimation unit 42 described above. In a first example scenario, when a random access configuration is applied in the first reference list and the second reference list under the unidirectional prediction scheme, the processor on the encoder side may determine the inter-prediction direction for the unidirectional prediction scheme. Optionally, the inter-prediction direction may be determined by the motion estimation unit 42 described above. Next, the processor may determine the direction consistent list as one of the first reference list and the second reference list based on the inter-prediction direction, and determine the reverse direction list as the other of the first reference list and the second reference list. The direction consistent list may be a reference list having the same direction as the inter-prediction direction, and the reverse direction list may be another reference list having a direction opposite to the inter-prediction direction. The direction consistent list may be represented as a list X, and the reverse direction list may be represented as a list (1-X), where X=0 or 1. The processor may generate a plurality of reference picture pairs in a joint list, wherein each reference picture pair includes a first reference picture from the direction consistent list and a second reference picture from the reverse direction list.
[0096] For example, for Figure 7 In the random access configuration shown in , list 0 = {ref00, ref01} and list 1 = {ref10, ref11}), the joint list may include 4 reference picture pairs, where the joint list = {(refX0, ref(1-X)0), (refX0, ref(1-X)1), (refX1, ref(1-X)0), (refX1, ref(1-X)1)}. If the inter prediction direction is the same as list 0, the direction consistent list may be list 0, and the reverse direction list may be list 1. Therefore, the joint list may be joint list = {(ref00, ref10), (ref00, ref11), (ref01, ref10), (ref01, ref11)}. Alternatively, if the inter prediction direction is the same as list 1, the direction consistent list may be list 1, and the reverse direction list may be list 0. Therefore, the joint list can be Joint List = {(ref10, ref00), (ref10, ref01), (ref11, ref00), (ref11, ref01)}.
[0097] In a second example scenario, when a low latency configuration is applied in a first reference list and a second reference list under a unidirectional prediction scheme, the processor may not need to determine an inter-frame prediction direction because the first reference list or the second reference list already includes all reference pictures. That is, the inter-frame prediction direction does not need to be signaled from the video encoder to the video decoder. The processor may generate a plurality of reference picture pairs in a joint list, wherein each reference picture pair includes a first reference picture from the first reference list and a second reference picture from the second reference list.
[0098] For example, for Fig.10 , ref3), (ref1, ref0), (ref1, ref2), (ref1, ref3), (ref2, ref0), (ref3, ref1), (ref2, ref0)}. Corresponding reference picture pairs with the same reference picture (e.g., (ref0, ref0), (ref1, ref1), (ref2, ref2), (ref3, ref3)) are not included in the joint list. The first motion vector MV of the video block may point to the first reference picture in each reference picture pair in the joint list.
[0099] Then, the encoder-side inter-frame prediction process 600 may proceed to reference picture reordering 604, where multiple reference picture pairs in the joint list may be reordered based on bilateral matching using one or more motion vectors of the video block to generate a reordered joint list. Specifically, the processor may respectively determine multiple bilateral matching costs for the multiple reference picture pairs in the joint list, and reorder the multiple reference picture pairs according to their respective bilateral matching costs to generate a reordered joint list.
[0100] In some embodiments, when a bidirectional prediction scheme is applied in inter-frame prediction of a video block, the processor may determine a bilateral matching cost for each reference picture pair in a joint list by performing one or more operations described below, so that multiple bilateral matching costs may be determined for multiple reference picture pairs. Specifically, each reference picture pair in the joint list may include a first reference picture from a first reference list and a second reference picture from a second reference list. The processor may determine a first reference block for the video block from the first reference picture based on a first motion vector MV1 of the video block, and determine a second reference block for the video block from the second reference picture based on a second motion vector MV2 of the video block. The processor may calculate the bilateral matching cost for the reference picture pair based on the first reference block and the second reference block. For example, see Figure 8 , the processor may (a) determine a first reference block 802 from a first reference picture based on a first motion vector MV1, and (b) determine a second reference block 804 from a second reference picture based on a second motion vector MV2. The processor may calculate a bilateral matching cost as a difference metric between the first reference block 802 and the second reference block 804, such as MSE, SAD, SSD, etc.
[0101] In some embodiments, when a unidirectional prediction scheme is applied to inter-frame prediction of a video block, the processor may determine a bilateral matching cost for each reference picture pair in the joint list by performing one or more operations described below, so that multiple bilateral matching costs may be determined for multiple reference picture pairs. Specifically, the processor may determine a first reference block for the video block from a first reference picture based on a first motion vector MV of the video block. The processor may scale the first motion vector MV of the video block to generate a second motion vector MV', and determine a second reference block for the video block from a second reference picture based on the second motion vector MV'. The processor may calculate the bilateral matching cost for the reference picture pair based on the first reference block and the second reference block.
[0102] For example, in a first example scenario, when a random access configuration is applied under a unidirectional prediction scheme, each reference picture pair in the joint list may include a first reference picture from a direction-consistent list (list X) and a second reference picture from a reverse direction list (list (1-X)). Fig. 9 An exemplary motion vector scaling process is shown in FIG. Fig. 9 , the second motion vector MV' for the second reference picture in list (1-X) may be calculated as follows:
[0103]
[0104] In the above equation (1), abs() represents an absolute function. cur Indicates the POC value for the video frame.X and POC (1-X) Denote the POC values for the first reference picture and the second reference picture in the pair, respectively. MV and MV' denote the motion vectors for the first reference picture and the second reference picture in the pair, respectively.
[0105] In a second example scenario, when a low delay configuration is applied under a unidirectional prediction scheme, each reference picture pair in the joint list may include a first reference picture from the first reference list and a second reference picture from the second reference list. Fig.11 An exemplary motion vector scaling process is shown in FIG. The second motion vector MV′ for the second reference picture may be calculated as follows:
[0106]
[0107] In the above equation (2), abs() represents an absolute function. cur Indicates the POC value for the video frame. X and POC (1-X) Denote the POC values for the first reference picture and the second reference picture in the pair, respectively. MV and MV' denote the motion vectors for the first reference picture and the second reference picture in the pair, respectively.
[0108] In the first example scenario or the second example scenario, the processor may determine a first reference block for the video block from the first reference picture based on the first motion vector MV, and determine a second reference block for the video block from the second reference picture based on the second motion vector MV'. The processor may calculate a bilateral matching cost for the reference picture pair as a difference metric between the first reference block and the second reference block, such as MSE, SAD, SSD, etc.
[0109] In some embodiments, the processor may reorder the plurality of reference picture pairs in the joint list according to an ascending order of their respective bilateral match costs, so that a reordered joint list may be generated for the video block. It is contemplated that the plurality of reference picture pairs in the joint list may be reordered according to any other order (e.g., descending order) of their respective bilateral match costs, which is not limited herein.
[0110] In some embodiments, when a unidirectional prediction scheme is applied, a reordered reference list may be generated for a video block from the reordered joint list. For example, in a first exemplary scenario, when a random access configuration is applied under a unidirectional prediction scheme, if one of the bilateral matching costs for the reference picture pair (refX0, ref(1-X)0) and (refX0, ref(1-X)1) is less than the bilateral matching cost for the reference picture pair (refX1, ref(1-X)0) and (refX1, ref(1-X)1), then in the reordered reference list, the reference picture refX0 precedes the reference picture refX1. That is, the reordered reference list = {refX0, refX1}. Otherwise, in the reordered reference list, the reference picture refX1 precedes the reference picture refX0. That is, the reordered reference list = {refX1, refX0}. In another example, in a second example scenario, when a low delay configuration is applied under a unidirectional prediction scheme, a first reference picture in each reference picture pair in the reordered joint list may be used as a corresponding reference picture in the reordered reference list.
[0111] Subsequently, the encoder-side inter-frame prediction process 600 may proceed to inter-frame prediction processing 606, so that inter-frame prediction may be performed on the video block based on the reordered joint list. In some embodiments, when a bidirectional prediction scheme is applied in the video block, the processor may perform one or more of the following operations to implement inter-frame prediction for the video block: (a) selecting a reference picture pair for the bidirectional prediction scheme from the reordered joint list; (b) generating a prediction block for the video block based on the selected reference picture pair and a motion vector pair of the video block; and (c) signaling the motion vector pair and the reference index to a video decoder via a bitstream. For example, when compared to other candidate prediction blocks generated based on other reference picture pairs in the reordered joint list, the prediction block generated based on the selected reference picture pair may have the smallest difference (e.g., smallest MSE, smallest SAD, smallest SSD, etc.) with the video block.
[0112] In some embodiments, when a unidirectional prediction scheme is applied in a video block, the processor may perform one or more of the following operations to implement inter-frame prediction for the video block: (a) selecting a reference picture pair from the reordered joint list; and (b) generating a prediction block for the video block based on a first reference picture in the selected reference picture pair and a motion vector of the video block. Alternatively, the processor may generate a reordered reference list as described above, select a reference picture from the reordered reference list, and generate a prediction block for the video block based on the selected reference picture and a motion vector of the video block. For example, when compared with other candidate prediction blocks generated based on other reference picture pairs in the reordered joint list (or other reference pictures from the reordered reference list), the prediction block generated based on the first reference picture in the selected reference picture pair (or the selected reference picture in the reordered reference list) may have the smallest difference with the video block. In addition, the processor may generate a reference index for identifying the selected reference picture pair (or a reference index for identifying the selected reference picture from the reordered reference list). If the random access configuration is applied, the processor may signal the inter prediction direction of the video block, the first motion vector MV of the video block, and the reference index to the video decoder via the bitstream. Alternatively, if the low latency configuration is applied, the processor may signal the motion vector and the reference index to the video decoder via the bitstream. When the low latency configuration is applied, the inter prediction direction does not need to be signaled to the video decoder.
[0113] Various examples of the encoder-side inter-frame prediction process 600 are provided herein. For the bidirectional prediction scheme, the reference pictures are no longer divided into two reference lists (list 0 and list 1) as in the existing method, but are interleaved to generate a joint list. Therefore, for the bidirectional prediction scheme, only one reference index needs to be signaled. The first example of the encoder-side inter-frame prediction process 600 is related to the random access configuration when the bidirectional prediction scheme is applied. Figure 7 A first example is described, where the first reference list is list 0 = {ref00, ref01} and the second reference list is list 1 = {ref10, ref11}. The first example of the encoder-side inter-frame prediction process 600 may include one or more of the following operations:
[0114] (1) Determine a motion vector pair (MV1, MV2) for a video block;
[0115] (2) Interleave the reference pictures from list 0 and list 1 to generate a joint list, i.e., joint list = {(ref00, ref10), (ref00, ref11), (ref01, ref10), (ref01, ref11)};
[0116] (3) determining multiple bilateral matching costs for multiple reference picture pairs in the joint list based on the motion vector pair (MV1, MV2);
[0117] (4) reordering the joint list based on the multiple bilateral matching costs respectively (e.g., multiple reference picture pairs in the joint list are reordered in ascending order based on their respective bilateral matching costs to generate a reordered joint list);
[0118] (5) Selecting a reference picture pair for inter prediction from the reordered joint list;
[0119] (6) generating a reference index for identifying the selected reference picture pair; and
[0120] (7) The motion vector pair (MV1, MV2) and the reference index are signaled to the video decoder.
[0121] The second example of the encoder-side inter-frame prediction process 600 is related to the random access configuration when a unidirectional prediction scheme is applied. Figure 7 A second example is described, in which the first reference list is list 0 = {ref00, ref01} and the second reference list is list 1 = {ref10, ref11}. In a unidirectional prediction scheme, the reference picture comes from list 0 or list 1. In existing methods, it is necessary to signal the inter-frame prediction direction to indicate whether list 0 or list 1 is used for unidirectional prediction, and then signal the reference index to indicate which reference picture in list 0 or list 1 is used for unidirectional prediction. In the second example of the encoder-side inter-frame prediction process 600 disclosed herein, the inter-frame prediction direction is also signaled to the video decoder. The consistent direction list and the reverse direction list may be list X and list (1-X), respectively, where X = 0 or 1. The second example of the encoder-side inter-frame prediction process 600 may include one or more of the following operations:
[0122] (1) Determine the inter-frame prediction direction and the first motion vector MV for list X;
[0123] (2) interleave the reference pictures from list X and list (1-X) to generate a joint list, i.e., joint list = {(refX0, ref(1-X)0), (refX0, ref(1-X)1), (refX1, ref(1-X)0), (refX1, ref(1-X)1)};
[0124] (3) Scaling the first motion vector MV to generate a second motion vector MV' for the list (1-X);
[0125] (4) determining multiple bilateral matching costs for multiple reference picture pairs in the joint list based on the motion vectors MV and MV′;
[0126] (5) reordering the multiple reference picture pairs in the joint list based on the ascending order of the bilateral matching costs of the multiple reference picture pairs in the joint list to generate a reordered joint list;
[0127] (6) generating a reordered reference list based on the reordered joint list (e.g., if one of the bilateral matching costs for the reference picture pair (refX0, ref(1-X)0) and (refX0, ref(1-X)1) is less than the bilateral matching cost for the reference picture pair (refX1, ref(1-X)0) and (refX1, ref(1-X)1), then in the reordered reference list, reference picture refX0 precedes reference picture refX1 (e.g., reordered reference list = {refX0, refX1}), otherwise in the reordered reference list, reference picture refX1 precedes reference picture refX0 (e.g., reordered reference list = {refX1, refX0});
[0128] (7) Selecting a reference picture for inter prediction from the reordered reference list;
[0129] (8) generating a reference index for identifying a selected reference picture in the reordered reference list; and
[0130] (9) The first motion vector MV, the inter prediction direction and the reference index are signaled to the video decoder.
[0131] The third example of the encoder-side inter-frame prediction process 600 is related to a low-delay configuration when a bidirectional prediction scheme is applied. Fig.10 A third example is described, where the first reference list is list 0 = {ref0, ref1, ref2, ref3} and the second reference list is list 1 = {ref3, ref2, ref1, ref0}. The third example of the encoder-side inter-frame prediction process 600 may include one or more of the following operations:
[0132] (1) Determine a motion vector pair (MV1, MV2) for a video block;
[0133] (2) interleave the reference pictures from list 0 and list 1 to generate a joint list, i.e., joint list = {(ref0,ref0),(ref0,ref1),(ref0,ref2),(ref0,ref3),(ref1,ref0),(ref1,ref1),(ref1,ref2),(ref1,ref3),(ref2,ref0),(ref2,ref1),(ref2,ref2),(ref2,ref3),(ref3,ref0),(ref3,ref1),(ref3,ref2),(ref3,ref3)};
[0134] (3) if the first motion vector MV1 for list 0 is equal to the second motion vector MV2 for list 1, removing reference picture pairs having the same reference picture (e.g., (ref0, ref0), (ref1, ref1), (ref2, ref2), (ref3, ref3)) from the joint list so that the joint list is modified to joint list = {(ref0, ref1), (ref0, ref2), (ref0, ref3), (ref1, ref0), (ref1, ref2), (ref1, ref3), (ref2, ref0), (ref2, ref1), (ref2, ref3), (ref3, ref0), (ref3, ref1), (ref3, ref2)};
[0135] (4) determining multiple bilateral matching costs for multiple reference picture pairs in the joint list based on the motion vector pair (MV1, MV2);
[0136] (5) reordering the multiple reference picture pairs in the joint list based on the ascending order of the bilateral matching costs of the multiple reference picture pairs in the joint list to generate a reordered joint list;
[0137] (6) Selecting a reference picture pair for inter prediction from the reordered joint list;
[0138] (7) generating a reference index for identifying the selected reference picture pair; and
[0139] (8) The motion vector pair (MV1, MV2) and the reference index are signaled to the video decoder.
[0140] The fourth example of the encoder-side inter-frame prediction process 600 is related to a low-delay configuration when a unidirectional prediction scheme is applied. Fig.10A fourth example is described, in which the first reference list is list 0 = {ref0, ref1, ref2, ref3} and the second reference list is list 1 = {ref3, ref2, ref1, ref0}. As described above, in the existing method, it is necessary to signal the inter-frame prediction direction to indicate whether list 0 or list 1 is used for unidirectional prediction, and then signal the reference index to indicate which reference picture in list 0 or list 1 is used for unidirectional prediction. In the fourth example of the encoder-side inter-frame prediction process 600 disclosed herein, the inter-frame prediction direction is not signaled to the video decoder. The fourth example of the encoder-side inter-frame prediction process 600 may include one or more of the following operations:
[0141] (1) determining a first motion vector MV for a video block;
[0142] (2) interleaving the reference pictures from list 0 and list 1 to generate a joint list, i.e., joint list = {(ref0, ref1), (ref0, ref2), (ref0, ref3), (ref1, ref0), (ref1, ref2), (ref1, ref3), (ref2, ref0), (ref2, ref1), (ref2, ref3), (ref3, ref0), (ref3, ref1), (ref3, ref2)}, where the first motion vector MV points to the first reference picture in each reference picture pair in the joint list;
[0143] (3) scaling the first motion vector MV to generate a second motion vector MV′, where the second motion vector MV′ is used to point to the second reference picture in each reference picture pair in the joint list;
[0144] (4) determining multiple bilateral matching costs for multiple reference picture pairs in the joint list based on the motion vectors MV and MV′;
[0145] (5) reordering the multiple reference picture pairs in the joint list based on the ascending order of the bilateral matching costs of the multiple reference picture pairs in the joint list to generate a reordered joint list;
[0146] (6) generating a reordered reference list based on the reordered joint list (for example, the first reference picture in each reference picture pair in the reordered joint list is correspondingly included in the reordered reference list);
[0147] (7) Selecting a reference picture for inter prediction from the reordered reference list;
[0148] (8) generating a reference index for identifying a selected reference picture in the reordered reference list; and
[0149] (9) The first motion vector MV and the reference index are sent to the video decoder using a signal.
[0150] Figure 6B is a block diagram illustrating an exemplary decoder-side inter-frame prediction process 610 according to some embodiments of the present disclosure. In some embodiments, the decoder-side inter-frame prediction process 610 may be performed by the prediction processing unit 81 of the video encoder 20. In some embodiments, the decoder-side inter-frame prediction process 610 may be performed by a processor on the decoder side (e.g., Fig.14 For illustrative purposes only, this document uses the decoder-side processor to describe Figure 6B The decoder-side inter-frame prediction process 610 may be performed at a block level, for example, for each video block of a video frame from a video. In some embodiments, the decoder-side inter-frame prediction process 610 may include bitstream decoding 612, joint list generation 614, reference picture reordering 616, and inter-frame prediction processing 618.
[0151] Starting from bitstream decoding 612 for a video block from a video frame of a video, a processor on the decoder side may decode the bitstream received from the video encoder to at least determine a reference index for the video block. For example, if a bidirectional prediction scheme is applied, the processor may decode a motion vector pair (MV1, MV2) and a reference index from the bitstream. In another example, if a unidirectional prediction scheme is applied with a random access configuration, the processor may decode a first motion vector MV, an inter-frame prediction direction, and a reference index from the bitstream. In yet another example, if a unidirectional prediction scheme is applied with a low-latency configuration, the processor may decode a first motion vector MV and a reference index from the bitstream.
[0152] Figure 6B The operations of joint list generation 614 and reference picture reordering 616 in Fig. 6A The operations of joint list generation 602 and reference picture reordering 604 in FIG. 6 are used to generate a reordered joint list for a video block. Similar descriptions will not be repeated here.
[0153] For the inter-frame prediction process 618, the processor on the decoder side may perform inter-frame prediction on the video block based on the reordered joint list and the reference index. For example, when a bidirectional prediction scheme is applied, the processor may select a reference picture pair from the reordered joint list based on the reference index, wherein the reference index may identify the selected reference picture pair in the reordered joint list. The processor may generate a prediction block for the video block based on the selected reference picture pair and the motion vector pair (MV1, MV2) of the video block. In another example, when a unidirectional prediction scheme is applied, the processor may select a reference picture pair from the reordered joint list based on the reference index, and generate a prediction block for the video block based on the first reference picture in the selected reference picture pair and the first motion vector MV of the video block. In yet another example, when a unidirectional prediction scheme is applied, the processor may generate a reordered reference list based on the reordered joint list, select a reference picture from the reordered reference list, and generate a prediction block for the video block based on the selected reference picture and the first motion vector MV of the video block.
[0154] Various examples of the decoder-side inter-frame prediction process 610 are provided herein. The first example of the decoder-side inter-frame prediction process 610 is related to a random access configuration when a bidirectional prediction scheme is applied. Figure 7 A first example is described, where the first reference list is list 0 = {ref00, ref01} and the second reference list is list 1 = {ref10, ref11}. The first example of the decoder-side inter-frame prediction process 610 may include one or more of the following operations:
[0155] (1) decoding a motion vector pair (MV1, MV2) and a reference index for a video block from a bitstream received from a video encoder;
[0156] (2) Interleave the reference pictures from list 0 and list 1 to generate a joint list, i.e., joint list = {(ref00, ref10), (ref00, ref11), (ref01, ref10), (ref01, ref11)};
[0157] (3) determining multiple bilateral matching costs for multiple reference picture pairs in the joint list based on the motion vector pair (MV1, MV2);
[0158] (4) reordering the multiple reference image pairs in the joint list based on the ascending order of the bilateral matching cost to generate a reordered joint list;
[0159] (5) selecting a reference picture pair for inter prediction from the reordered joint list using the reference index (eg, the reference index is used to identify the selected reference picture pair in the reordered joint list); and
[0160] (6) Generate a prediction block for the video block using the selected reference picture pair and motion vector pair (MV1, MV2).
[0161] When a random access configuration and a unidirectional prediction scheme are applied, a second example of the decoder-side inter-frame prediction process 610 can be implemented. Figure 7 A second example is described, where the first reference list is list 0 = {ref00, ref01} and the second reference list is list 1 = {ref10, ref11}. In the second example of the decoder-side inter-frame prediction process 610 disclosed herein, an inter-frame prediction direction is received from a video encoder. A direction consistent list and an inverse direction list (e.g., list X and list (1-X), where X = 0 or 1) may be determined based on the inter-frame prediction direction, respectively. The second example of the decoder-side inter-frame prediction process 610 may include one or more of the following operations:
[0162] (1) decoding an inter-frame prediction direction, a first motion vector MV for list X, and a reference index for a video block from a bitstream received from a video encoder;
[0163] (2) interleave the reference pictures from list X and list (1-X) to generate a joint list, i.e., joint list = {(refX0, ref(1-X)0), (refX0, ref(1-X)1), (refX1, ref(1-X)0), (refX1, ref(1-X)1)};
[0164] (3) Scaling the first motion vector MV to generate a second motion vector MV' for the list (1-X);
[0165] (4) determining multiple bilateral matching costs for multiple reference picture pairs in the joint list based on the motion vectors MV and MV′;
[0166] (5) reordering the multiple reference picture pairs in the joint list based on the ascending order of the bilateral matching costs of the multiple reference picture pairs in the joint list to generate a reordered joint list;
[0167] (6) By executing similar Fig. 6A Those operations described, generating a reordered reference list based on the reordered union list;
[0168] (7) selecting a reference picture for inter prediction from the reordered reference list using the reference index; and
[0169] (8) Generate a prediction block for the video block using the selected reference picture and the first motion vector MV.
[0170] When a low-delay configuration and a bidirectional prediction scheme are applied, a third example of the decoder-side inter-frame prediction process 610 may be implemented. Fig.10 A third example is described, where the first reference list is list 0 = {ref0, ref1, ref2, ref3} and the second reference list is list 1 = {ref3, ref2, ref1, ref0}. The third example of the decoder-side inter-frame prediction process 610 may include one or more of the following operations:
[0171] (1) decoding a motion vector pair (MV1, MV2) and a reference index for a video block from a bitstream received from a video encoder;
[0172] (2) interleave the reference pictures from list 0 and list 1 to generate a joint list, i.e., joint list = {(ref0,ref0),(ref0,ref1),(ref0,ref2),(ref0,ref3),(ref1,ref0),(ref1,ref1),(ref1,ref2),(ref1,ref3),(ref2,ref0),(ref2,ref1),(ref2,ref2),(ref2,ref3),(ref3,ref0),(ref3,ref1),(ref3,ref2),(ref3,ref3)};
[0173] (3) if the first motion vector MV1 for list 0 is equal to the second motion vector MV2 for list 1, removing the corresponding reference picture pairs (e.g., (ref0, ref0), (ref1, ref1), (ref2, ref2), (ref3, ref3)) having the same reference picture from the joint list, so that the joint list is modified to joint list = {(ref0, ref1), (ref0, ref2), (ref0, ref3), (ref1, ref0), (ref1, ref2), (ref1, ref3), (ref2, ref0), (ref2, ref1), (ref2, ref3), (ref3, ref0), (ref3, ref1), (ref3, ref2)};
[0174] (4) determining multiple bilateral matching costs for multiple reference picture pairs in the joint list based on the motion vector pair (MV1, MV2);
[0175] (5) reordering the multiple reference picture pairs in the joint list based on the ascending order of the bilateral matching costs of the multiple reference picture pairs respectively to generate a reordered joint list;
[0176] (6) selecting a reference picture pair for inter prediction from the reordered joint list using the reference index; and
[0177] (7) Generate a prediction block for the video block using the selected reference picture pair and motion vector pair (MV1, MV2).
[0178] The fourth example of the decoder-side inter-frame prediction process 610 is related to a low-delay configuration when a unidirectional prediction scheme is applied. Fig.10 A fourth example is described, where the first reference list is list 0 = {ref0, ref1, ref2, ref3} and the second reference list is list 1 = {ref3, ref2, ref1, ref0}. In the fourth example of the decoder-side inter-frame prediction process 610 disclosed herein, no inter-frame prediction direction is required in the video decoder. The fourth example of the decoder-side inter-frame prediction process 610 may include one or more of the following operations:
[0179] (1) decoding an inter-frame prediction direction, a first motion vector MV, and a reference index for a video block from a bit stream received from a video encoder;
[0180] (2) interleaving the reference pictures from list 0 and list 1 to generate a joint list, i.e., joint list = {(ref0, ref1), (ref0, ref2), (ref0, ref3), (ref1, ref0), (ref1, ref2), (ref1, ref3), (ref2, ref0), (ref2, ref1), (ref2, ref3), (ref3, ref0), (ref3, ref1), (ref3, ref2)}, where the first motion vector MV points to the first reference picture in each reference picture pair in the joint list;
[0181] (3) scaling the first motion vector MV to generate a second motion vector MV′, where the second motion vector MV′ is used to point to the second reference picture in each reference picture pair in the joint list;
[0182] (4) determining multiple bilateral matching costs for multiple reference picture pairs in the joint list based on the motion vectors MV and MV′;
[0183] (5) reordering the multiple reference picture pairs in the joint list based on the ascending order of the bilateral matching costs of the multiple reference picture pairs respectively, so as to generate a reordered joint list;
[0184] (6) generating a reordered reference list based on the reordered joint list (for example, the first reference picture in each reference picture pair in the reordered joint list is correspondingly included in the reordered reference list);
[0185] (7) selecting a reference picture for inter prediction from the reordered reference list using the reference index; and
[0186] (8) Generate a prediction block for the video block using the selected reference picture and the first motion vector MV.
[0187] Fig.12 1 is a flow chart of an exemplary method 1200 for inter-frame prediction at the encoder side according to some embodiments of the present disclosure. The method 1200 may be implemented by a processor associated with the video encoder 20 and may include steps 1202 to 1206 as described below. Some steps are optional steps for performing the disclosure provided herein. In addition, some steps may be performed simultaneously or in conjunction with Fig.12 The order shown in the figure is different from the order in which it is executed.
[0188] In step 1202 , the processor may generate a joint list including a plurality of reference picture pairs based on a first reference list and a second reference list for a video block in a video frame of a video.
[0189] In step 1204, the processor may reorder the plurality of reference picture pairs in the joint list based on bilateral matching using one or more motion vectors of the video block to generate a reordered joint list.
[0190] In step 1206, the processor may perform inter prediction on the video block based on the reordered joint list.
[0191] Fig.13 1 is a flow chart of an exemplary method 1300 for inter-frame prediction at the decoder side according to some embodiments of the present disclosure. The method 1300 may be implemented by a processor associated with the video decoder 30 and may include steps 1302 to 1308 as described below. Some steps are optional steps for performing the disclosure provided herein. In addition, some steps may be performed simultaneously or in conjunction with Fig.13 The order shown in the figure is different from the order in which it is executed.
[0192] In step 1302 , the processor may determine, from a bitstream, a reference index for a video block in a video frame of a video.
[0193] In step 1304 , the processor may generate a joint list including a plurality of reference picture pairs based on the first reference list and the second reference list for the video block.
[0194] In step 1306, the processor may reorder the plurality of reference picture pairs in the joint list based on bilateral matching using one or more motion vectors of the video block to generate a reordered joint list.
[0195] In step 1308, the processor may perform inter prediction on the video block based on the reordered joint list and the reference index.
[0196] Fig.14 A computing environment 1410 is shown coupled to a user interface 1450. The computing environment 1410 may be part of a data processing server. The computing environment 1410 includes a processor 1420, a memory 1430, and an input / output (I / O) interface 1440.
[0197] The processor 1420 generally controls the overall operation of the computing environment 1410, such as operations associated with display, data acquisition, data communication, and image processing. The processor 1420 may include one or more processors to execute instructions to perform all or some steps in the above method. In addition, the processor 1420 may include one or more modules that facilitate interaction between the processor 1420 and other components. The processor may be a central processing unit (CPU), a microprocessor, a single-chip microcomputer, a graphics processing unit (GPU), etc.
[0198] The memory 1430 is configured to store various types of data to support the operation of the computing environment 1410. The memory 1430 may include predetermined software 1432. Examples of such data include instructions for any application or method operating on the computing environment 1410, video data sets, image data, etc. The memory 1430 may be implemented by using any type of volatile or non-volatile memory device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.
[0199] I / O interface 1440 provides an interface between processor 1420 and peripheral interface modules such as a keyboard, click wheel, buttons, etc. Buttons may include, but are not limited to, a home button, a start scan button, and a stop scan button. I / O interface 1440 may be coupled to an encoder and a decoder.
[0200] In an embodiment, a non-transitory computer-readable storage medium is also provided, which includes multiple programs, for example, included in the memory 1430, which can be executed by the processor 1420 in the computing environment 1410 to perform the above method. In one example, the multiple programs can be executed by the processor 1420 in the computing environment 1410 to receive (for example, from Figure 2 The video encoder 20 in the computing environment 1410 receives a bitstream or data stream including encoded video information (e.g., video blocks representing encoded video frames and / or one or more associated syntax elements, etc.), and can also be executed by the processor 1420 in the computing environment 1410 to perform the above-mentioned decoding method according to the received bitstream or data stream. In another example, multiple programs can be executed by the processor 1420 in the computing environment 1410 to perform the above-mentioned encoding method, encode the video information (e.g., video blocks representing video frames and / or one or more associated syntax elements, etc.) into a bitstream or data stream, and can also be executed by the processor 1420 in the computing environment 1410 to send a bitstream or data stream (e.g., to a Figure 3 Optionally, a non-transitory computer-readable storage medium may store therein a bit stream or a data stream, the bit stream or the data stream comprising a video decoder 30 in the encoder (e.g., Figure 2 The video encoder 20 in FIG. 1 generates a video signal for a decoder (eg, Figure 3 The video decoder 30 in the video decoder 30) in decoding the video data (e.g., video blocks representing encoded video frames and / or associated one or more syntax elements, etc.). The non-transitory computer-readable storage medium can be, for example, a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0201] In an embodiment, a computing device is also provided, which includes: one or more processors (e.g., processor 1420); and a non-transitory computer-readable storage medium or memory 1430 storing multiple programs executable by the one or more processors, wherein the one or more processors are configured to perform the above-mentioned method when executing the multiple programs.
[0202] In an embodiment, a computer program product is also provided, which includes multiple programs in memory 1430, for example, and the multiple programs can be executed by processor 1420 in computing environment 1410 to perform the above method. For example, the computer program product may include a non-transitory computer-readable storage medium.
[0203] In an embodiment, the computing environment 1410 may be implemented using one or more ASICs, DSPs, digital signal processing devices (DSPDs), programmable logic devices (PLDs), FPGAs, GPUs, controllers, microcontrollers, microprocessors, or other electronic components for executing the above methods.
[0204] The description of the present disclosure has been presented for purposes of illustration and is not intended to be exhaustive or limited to the present disclosure. Many modifications, variations, and alternative embodiments will be apparent to one of ordinary skill in the art having the benefit of the teachings presented in the foregoing description and the associated drawings.
[0205] Unless otherwise specifically stated, the order of the steps of the method according to the present disclosure is intended to be illustrative only, and the steps of the method according to the present disclosure are not limited to the order specifically described above, but may be changed according to actual conditions. In addition, at least one step of the method according to the present disclosure may be adjusted, combined or deleted according to actual requirements.
[0206] The examples are chosen and described in order to explain the principles of the present disclosure and to enable other persons skilled in the art to understand the various embodiments of the present disclosure and to best utilize the basic principles and various embodiments with various modifications suitable for the specific use contemplated. Therefore, it should be understood that the scope of the present disclosure is not limited to the specific examples of the disclosed embodiments, and modifications and other embodiments are intended to be included within the scope of the present disclosure.
Claims
1. A video processing method for inter-frame prediction performed by a video encoder, comprising: generating, by a processor of the video encoder, a joint list comprising a plurality of reference picture pairs based on a first reference list and a second reference list for a video block in a video frame of the video; reordering, by the processor of the video encoder based on bilateral matching using one or more motion vectors of the video block, the plurality of reference picture pairs in the joint list to generate a reordered joint list; as well as The inter prediction is performed, by the processor of the video encoder, on the video block based on the reordered joint list.
2. The video processing method according to claim 1, wherein: A picture order count (POC) of a reference picture in the first reference list is smaller than a POC of the video frame, and a POC of a reference picture in the second reference list is larger than a POC of the video frame; or The POCs of the reference pictures in the first reference list and the second reference list are smaller than the POC of the video frame.
3. The video processing method of claim 1 , wherein reordering the plurality of reference picture pairs in the joint list based on bilateral matching using one or more motion vectors of the video block to generate a reordered joint list comprises: determining a plurality of bilateral matching costs for the plurality of reference picture pairs in the joint list, respectively; as well as The plurality of reference picture pairs are reordered according to their respective bilateral matching costs to generate the reordered joint list. 4 . The video processing method according to claim 3 , wherein the plurality of reference picture pairs are reordered according to an ascending order of their respective bilateral matching costs. 5 . The video processing method according to claim 3 , wherein a bi-prediction scheme is applied in the inter-frame prediction of the video block.
6. The video processing method of claim 5, wherein determining a bilateral matching cost for a reference picture pair in the joint list including a first reference picture from the first reference list and a second reference picture from the second reference list comprises: determining a first reference block for the video block from the first reference picture based on a first motion vector for the video block; determining a second reference block for the video block from the second reference picture based on a second motion vector for the video block; as well as A bilateral matching cost for the reference picture pair is calculated based on the first reference block and the second reference block.
7. The video processing method of claim 5, wherein performing the inter-frame prediction on the video block based on the reordered joint list comprises: selecting a reference picture pair for the bidirectional prediction scheme from the reordered joint list; generating a prediction block for the video block based on a selected reference picture pair and a motion vector pair for the video block; generating a reference index for identifying a selected reference pair; as well as The motion vector pair and the reference index are signaled to a video decoder via a bitstream.
8. The video processing method according to claim 3, wherein a unidirectional prediction scheme is applied in the inter-frame prediction of the video block.
9. The video processing method according to claim 8, wherein in a case where a low delay configuration is applied in the first reference list and the second reference list, generating the joint list including the plurality of reference picture pairs based on the first reference list and the second reference list comprises: determining an inter-frame prediction direction for the unidirectional prediction scheme; Determine a direction consistent list as one of the first reference list and the second reference list based on the inter-frame prediction direction; determining a reverse direction list as the other of the first reference list and the second reference list; as well as The plurality of reference picture pairs are generated, wherein each reference picture pair includes a first reference picture from the consistent direction list and a second reference picture from the reverse direction list.
10. The video processing method according to claim 8, wherein in a case where a low delay configuration is applied in the first reference list and the second reference list, generating the joint list including the plurality of reference picture pairs based on the first reference list and the second reference list comprises: The plurality of reference picture pairs are generated, wherein each reference picture pair includes a first reference picture from the first reference list and a second reference picture from the second reference list.
11. The video processing method of claim 8, wherein determining a bilateral matching cost for a reference picture pair including a first reference picture and a second reference picture in the joint list comprises: determining a first reference block for the video block from the first reference picture based on a first motion vector for the video block; scaling the first motion vector of the video block to generate a second motion vector of the video block; determining a second reference block for the video block from the second reference picture based on the second motion vector for the video block; as well as A bilateral matching cost for the reference picture pair is calculated based on the first reference block and the second reference block.
12. The video processing method of claim 8, wherein performing the inter-frame prediction on the video block based on the reordered joint list comprises: selecting a reference picture pair from the reordered joint list; generating a prediction block for the video block based on a first reference picture in the selected reference picture pair and a motion vector of the video block; as well as A reference index is generated for identifying a selected reference pair.
13. The video processing method according to claim 12, wherein performing the inter-frame prediction on the video block based on the reordered joint list further comprises: signaling an inter prediction direction, the motion vector, and the reference index to a video decoder through a bitstream in case a random access configuration is applied in the first reference list and the second reference list; or In case a low delay configuration is applied in the first reference list and the second reference list, the motion vector and the reference index are signaled to the video decoder through the bitstream.
14. A video encoder apparatus for inter-frame prediction, comprising: a memory configured to store a bitstream; as well as A processor is coupled to the memory and configured to: generating a joint list including a plurality of reference picture pairs based on a first reference list and a second reference list for a video block in a video frame of the video; reordering the plurality of reference picture pairs in the joint list based on bilateral matching using one or more motion vectors of the video block to generate a reordered joint list; performing the inter prediction on the video block based on the reordered joint list to determine a reference index for the video block; as well as The bitstream is generated to include the reference index.
15. A non-transitory computer-readable storage medium having stored therein a bitstream and instructions, which when executed by a processor of a video encoder cause the processor to perform a video processing method for inter-frame prediction on the video encoder, the video processing method comprising: generating a joint list including a plurality of reference picture pairs based on a first reference list and a second reference list for a video block in a video frame of the video; reordering the plurality of reference picture pairs in the joint list based on bilateral matching using one or more motion vectors of the video block to generate a reordered joint list; performing the inter prediction on the video block based on the reordered joint list to determine a reference index for the video block; as well as The bitstream is generated to include the reference index.
16. A non-transitory computer-readable storage medium storing a bit stream generated by the method according to any one of claims 1 to 14.
17. A video processing method for inter-frame prediction performed by a video decoder, comprising: determining, by a processor of the video decoder, from a bitstream, a reference index for a video block in a video frame of a video; generating, by the processor of the video decoder, a joint list including a plurality of reference picture pairs based on a first reference list and a second reference list for the video block; reordering, by the processor of the video decoder based on bilateral matching using one or more motion vectors of the video block, the plurality of reference picture pairs in the joint list to generate a reordered joint list; as well as The inter prediction is performed, by the processor of the video decoder, on the video block based on the reordered joint list and the reference index.
18. The video processing method according to claim 17, wherein: A picture order count (POC) of a reference picture in the first reference list is smaller than a POC of the video frame, and a POC of a reference picture in the second reference list is larger than a POC of the video frame; or The POCs of the reference pictures in the first reference list and the second reference list are smaller than the POC of the video frame.
19. The video processing method of claim 17, wherein reordering the plurality of reference picture pairs in the joint list based on bilateral matching using one or more motion vectors of the video block to generate a reordered joint list comprises: determining a plurality of bilateral matching costs for the plurality of reference picture pairs respectively; as well as The plurality of reference picture pairs are reordered according to their respective bilateral matching costs to generate the reordered joint list.
20. The video processing method of claim 19, wherein the plurality of reference picture pairs are sorted according to an ascending order of their respective bilateral matching costs.
21. The video processing method of claim 19, wherein a bi-prediction scheme is applied in the inter-frame prediction of the video block.
22. The video processing method of claim 21, wherein determining a bilateral matching cost for a reference picture pair in the joint list including a first reference picture from the first reference list and a second reference picture from the second reference list comprises: determining a first reference block for the video block from the first reference picture based on a first motion vector for the video block; determining a second reference block for the video block from the second reference picture based on a second motion vector for the video block; as well as A bilateral matching cost for the reference picture pair is calculated based on the first reference block and the second reference block.
23. The video processing method of claim 21, wherein performing the inter-frame prediction on the video block based on the reordered joint list and the reference index comprises: selecting a reference picture pair from the reordered joint list based on the reference index; as well as A prediction block for the video block is generated based on the selected reference picture pair and the motion vector pair for the video block.
24. The video processing method of claim 19, wherein a uni-directional prediction scheme is applied in the inter-frame prediction of the video block.
25. The video processing method according to claim 24, wherein in a case where a random access configuration is applied in the first reference list and the second reference list, generating the joint list including the plurality of reference picture pairs based on the first reference list and the second reference list comprises: determining an inter-prediction direction for the unidirectional prediction scheme from the bitstream; Determine a direction consistent list as one of the first reference list and the second reference list based on the inter-frame prediction direction; determining a reverse direction list as the other of the first reference list and the second reference list; as well as The plurality of reference picture pairs are generated, wherein each reference picture pair includes a first reference picture from the consistent direction list and a second reference picture from the reverse direction list.
26. The video processing method according to claim 24, wherein in a case where a low delay configuration is applied in the first reference list and the second reference list, generating the joint list including the plurality of reference picture pairs based on the first reference list and the second reference list comprises: The plurality of reference picture pairs are generated, wherein each reference picture pair includes a first reference picture from the first reference list and a second reference picture from the second reference list.
27. The video processing method of claim 24, wherein determining a bilateral matching cost for a reference picture pair including a first reference picture and a second reference picture in the joint list comprises: determining a first reference block for the video block from the first reference picture based on a first motion vector for the video block; scaling the first motion vector of the video block to generate a second motion vector of the video block; determining a second reference block for the video block from the second reference picture based on the second motion vector for the video block; as well as A bilateral matching cost for the reference picture pair is calculated based on the first reference block and the second reference block.
28. The video processing method of claim 24, wherein performing the inter-frame prediction on the video block based on the reordered joint list and the reference index comprises: selecting a reference picture pair from the reordered joint list based on the reference index; as well as A prediction block for the video block is generated based on a first reference picture in the selected reference picture pair and a motion vector for the video block.
29. A video decoder apparatus for inter-frame prediction, comprising: a memory configured to store a bitstream; as well as a processor coupled to the memory and configured to: determining, from the bitstream, reference indexes for video blocks in video frames of a video; generating a joint list including a plurality of reference picture pairs based on a first reference list and a second reference list for the video block; reordering the plurality of reference picture pairs in the joint list based on bilateral matching using one or more motion vectors of the video block to generate a reordered joint list; as well as The inter prediction is performed on the video block based on the reordered joint list and the reference index.
30. A non-transitory computer-readable storage medium having stored therein a bitstream and instructions, which when executed by a processor of a video decoder causes the processor to perform a video processing method for inter-frame prediction, the video processing method comprising: determining, from the bitstream, reference indexes for video blocks in video frames of a video; generating a joint list including a plurality of reference picture pairs based on a first reference list and a second reference list for the video block; reordering the plurality of reference picture pairs in the joint list based on bilateral matching using one or more motion vectors of the video block to generate a reordered joint list; as well as The inter prediction is performed on the video block based on the reordered joint list and the reference index.
