Overlapped prediction in video coding

Adaptive overlapped block prediction in video coding combines predictive blocks from neighboring frames to enhance prediction accuracy and reduce redundancy, addressing inefficiencies in existing video compression methods.

JP2025540376APending Publication Date: 2025-12-11GOOGLE LLC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2025534476
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-01-17
Filing Date
2023-12-11
Publication Date
2025-12-11

AI Technical Summary

Technical Problem

Existing video compression techniques face challenges in efficiently reducing data redundancy and improving prediction accuracy in variable block size video coding, particularly in adapting to different block sizes and reference frames.

Method used

The method employs adaptive overlapped block prediction, where a current block's prediction is determined by combining a first predictive block based on motion information and a second predictive block from neighboring blocks, using threshold-based criteria and motion vector differentials to optimize the prediction process.

Benefits of technology

This approach enhances prediction accuracy and reduces data redundancy by refining pixel predictions using motion information from neighboring blocks, leading to improved video compression efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025540376000001_ABST
    Figure 2025540376000001_ABST
Patent Text Reader

Abstract

A method for encoding and decoding a current block of a current frame is disclosed. A first predictive block of the current block is obtained based on motion information associated with the first predictive block. A second predictive block for at least a portion of the current block is obtained based on motion information associated with a neighboring block. A prediction difference measure is obtained between the first predictive block and the second predictive block. The prediction difference measure is used to determine whether to combine the first predictive block with the second predictive block for a portion of the current block. The prediction difference measure can be a sum of absolute differences (SAD) between the first predictive block and the second predictive block. The prediction difference measure can be an absolute maximum value of pairwise differences between the first predictive block and the second predictive block.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS This application claims the benefit of and priority to U.S. Provisional Patent Application No. 63 / 434,991, filed December 23, 2022, and U.S. Provisional Patent Application No. 63 / 480,262, filed January 17, 2023, the entire disclosures of which are incorporated herein by reference. [Background technology]

[0002] Digital video can be used, for example, for remote business meetings via video conferencing, high-definition video entertainment, video advertising, or sharing user-generated videos. Because video data contains a large amount of data, high-performance compression is required for transmission and storage. Various approaches, such as compression and other encoding and decoding techniques, have been proposed to reduce the amount of data in video streams. Summary of the Invention

[0003] FIELD OF THE INVENTION This application relates to encoding and decoding video stream data for transmission or storage. Aspects of a system, method, and apparatus are disclosed herein for adaptive overlapped block prediction in variable block size video codes.

[0004] One or more computer systems may be configured to perform particular operations or actions by having software, firmware, hardware, or a combination thereof installed on the system that, when operated, causes the system to perform the actions. One or more computer programs may be configured to perform particular operations or actions by including instructions that, when executed by a data processing device, cause the device to perform the actions.

[0005] In one general aspect, a method for coding a current block of a current frame includes obtaining a first predictive block of the current block based on motion information associated with the first predictive block, obtaining a second predictive block for at least a portion of the current block based on motion information associated with neighboring blocks, obtaining a prediction difference measure between the first predictive block and the second predictive block, and determining whether to combine the first predictive block and the second predictive block for the portion of the current block based on the prediction difference measure. Implementations may further include one or more of the following features.

[0006] In the method, determining whether to combine the first predicted block and the second predicted block of the portion of the current block based on the prediction difference measure may include determining not to combine the first predicted block and the second predicted block in response to the prediction difference measure exceeding a threshold. In the method, the threshold may be a power of two. In the method, the prediction difference measure may be a sum of absolute differences (SAD) between the first predicted block and the second predicted block. In the method, the prediction difference measure may be a sum of squared error (SSE) between the first predicted block and the second predicted block. In the method, the prediction difference measure may be an absolute maximum of pair-wise differences between the first predicted block and the second predicted block.

[0007] In the method, the prediction difference measure can be calculated based on at least one of a maximum absolute difference or a mean absolute difference. In the method, the maximum absolute difference can be the absolute maximum value of pairwise differences between the first predicted block and the second predicted block. In the method, the mean absolute difference is the average value of the pairwise differences. In the method, the prediction difference measure can be calculated as the absolute difference between the maximum absolute difference and the mean absolute difference. In the method, the prediction difference measure can be calculated based on a ratio of the maximum absolute difference to the mean absolute difference.

[0008] The method may include determining to obtain a second predictive block in response to determining that a motion vector difference between a first motion vector of the current block and a second motion vector of the neighboring block is less than a motion vector threshold. The method may include determining to obtain the second predictive block in response to determining that a first reference frame(s) used to predict the current block are at least partially the same as a second reference frame(s) used to predict the same neighboring block. The method may include determining to obtain the second predictive block in response to determining that the current block is a block of a P frame or a P slice, that the current block and the neighboring block use the same reference frame, and that respective absolute motion vector differences between the motion vector of the current block and the motion vector of the neighboring block are less than a motion vector threshold.

[0009] In another general aspect, a method for coding a current block of a current frame includes obtaining a first predictive block of the current block based on a first reference frame and a first motion vector, and determining, based at least in part on information about neighboring blocks of the current block, to obtain a second predictive block of at least a portion of the current block using an overlapped prediction mode that uses a second reference frame and a second motion vector of the neighboring block, where the second motion vector of the neighboring block is obtained by rounding a motion vector used to predict the neighboring block to an integer pixel position, and the method further includes obtaining the second predictive block using the overlapped prediction mode and combining the first predictive block and the second predictive block. Implementations may further include one or more of the following features.

[0010] In the method, determining to obtain a second prediction block of a portion of the current block using overlapped prediction mode based at least in part on information about neighboring blocks of the current block may include determining that a motion vector differential between the first motion vector and the second motion vector is less than a motion vector threshold. The method may include decoding a one-frame distance motion vector threshold from the compressed bitstream and calculating a motion vector threshold based on the one-frame distance motion vector threshold and a frame differential between the first reference frame and the second reference frame. In the method, the motion vector threshold may be proportional to a temporal distance between the first reference frame and the second reference frame.

[0011] The method may include, in response to determining that the first reference frame is different from the second reference frame, calculating a difference between the first motion vector and the second motion vector by the following steps: First, in response to determining that the current block is predicted using first motion vector(s), including the first motion vector, obtaining scaled first motion vector(s) by scaling the first motion vector(s) to point to the target reference frame based on a temporal distance, and averaging the scaled first motion vector(s) to obtain the first normalized motion vector. Second, in response to determining that the neighboring blocks are predicted using second motion vector(s), including the second motion vector, obtaining scaled second motion vector(s) by scaling the second motion vector(s) to point to the target reference frame, and averaging the scaled second motion vector(s) to obtain the second normalized motion vector. Third, calculating a motion vector differential based on 1) the first normalized motion vector or one of the first motion vectors, and 2) the second normalized motion vector or one of the second motion vectors.

[0012] In the method, determining to obtain a second predicted block of a portion of the current block using an overlapped prediction mode based at least in part on information about neighboring blocks of the current block may include determining that a first reference frame(s) used to predict the current block are at least in part the same as a second reference frame(s) used to predict the neighboring blocks that are the same, wherein the first reference frame(s) include the first reference frame and the second reference frame(s) include the second reference frame, and the first reference frame is the same as the second reference frame.

[0013] In the method, determining to obtain a second predictive block of a portion of the current block using an overlapped prediction mode based at least in part on information about neighboring blocks of the current block may include determining that reference samples used to obtain the second predictive block using a subpixel interpolation filter are available.

[0014] In the method, determining to obtain a second prediction block of a portion of the current block using an overlap prediction mode based at least in part on information about neighboring blocks of the current block may include determining that the current block is a block of a P frame or a P slice, that the current block and the neighboring blocks use the same reference frame, and that respective absolute motion vector difference between the motion vector of the current block and the motion vector of the neighboring block is below a motion vector threshold.

[0015] In the method, a motion vector can be used to predict neighboring blocks and is rounded using at least one of rounding towards positive infinity, rounding towards negative infinity, or rounding towards zero, and in the method, a component of the motion vector can be rounded towards positive infinity if the component is positive, or towards negative infinity if the component is negative.

[0016] If the current block may be the length of a first boundary of the parent block, the method may include determining whether to perform overlap prediction mode on a second boundary of the parent block in parallel with determining whether to obtain a second prediction block for at least a portion of the current block using overlap prediction mode, wherein the second boundary is different from the first boundary.

[0017] Variations of these and other aspects are described in more detail below. It will be understood that aspects may be implemented in any convenient form. For example, aspects may be implemented by a suitable computer program, which may be carried on a suitable carrier medium, which may be a tangible carrier medium (e.g., a disk) or an intangible carrier medium (e.g., a communications signal). Aspects may also be implemented using a suitable apparatus, which may take the form of a programmable computer executing a computer program configured to implement the methods and / or techniques disclosed herein. Aspects may be combined such that functionality described in the context of one aspect can be implemented in other aspects.

[0018] This description makes reference to the accompanying drawings, in which like reference numerals refer to like parts throughout the several views. [Brief explanation of the drawings]

[0019] [Figure 1] FIG. 1 is a diagram of a computing device according to an embodiment of the present disclosure. [Figure 2] 1 is a diagram of a computing and communication system according to an embodiment of the present disclosure. [Figure 3] FIG. 2 is a diagram of a video stream for use in encoding and decoding, according to an embodiment of the present disclosure. [Figure 4] FIG. 2 is a block diagram of an encoder according to an embodiment of the present disclosure. [Figure 5] FIG. 2 is a block diagram of a decoder according to an embodiment of the present disclosure. [Figure 6] FIG. 1 is a flowchart diagram of an exemplary process for adaptive overlapping block prediction, according to an embodiment of the present disclosure. [Figure 7] FIG. 2 is a block diagram of an example block-based prediction with variable block sizes, according to an embodiment of the present disclosure. [Figure 8]10A-10C are block diagrams of exemplary size variations of overlap regions according to embodiments of the present disclosure. [Figure 9] FIG. 2 is a block diagram of an example weighting function for overlapped prediction, according to an embodiment of the present disclosure. [Figure 10] FIG. 10 is a block diagram illustrating sub-block overlap prediction. [Figure 11] 1 is a flowchart of a technique for coding a current block of a video frame using overlapped prediction. [Figure 12] FIG. 10 is a flowchart diagram of another technique for coding a current block of a video frame using overlapped prediction. DETAILED DESCRIPTION OF THE INVENTION

[0020] Video compression schemes may include dividing each image, or frame, into smaller portions, such as blocks, and generating an output bitstream using techniques that limit the information included per block in the output. The encoded bitstream can be decoded to recreate the source image from the limited information. In some implementations, the information included per block in the output may be limited by reducing spatial redundancy, reducing temporal redundancy, or a combination thereof. For example, temporal or spatial redundancy may be reduced by predicting frames based on information available to both the encoder and decoder and including information in the encoded video stream that represents the difference or residual between the predicted frame and the original frame.

[0021] In some implementations, a frame may be divided into blocks of variable size, pixel values ​​for each block may be predicted using previously coded information, and prediction parameters and residual data for each block may be encoded as output. A decoder may receive the prediction parameters and residual data in the compressed bitstream and may reconstruct the frame, which may include predicting blocks based on previously decoded image data.

[0022] Overlapped prediction is a type of weighted prediction that can improve the prediction of a block by using prediction information from neighboring blocks. A prediction from the current block and a prediction based on motion information from neighboring blocks can be weighted to form a final prediction. When overlapped prediction is applied, at least some pixels of the current block (e.g., pixels above and / or to the left that close the boundary) can be refined using motion information from one or more neighboring blocks.

[0023] In some implementations, the predicted block sizes of the neighboring blocks may vary between neighboring blocks and may be different from the predicted block size of the current block. Each overlap region within the current block may be identified corresponding to each neighboring block, and overlap prediction may be determined for each overlap region based on prediction parameters from the corresponding neighboring block. In some implementations, the overlap prediction may be optimized by adapting the size of each overlap region within the current block, such as according to a comparison of the prediction parameters of the neighboring blocks with the prediction parameters of the current block.

[0024] 1 is a diagram of a computing device 100 according to an embodiment of the present disclosure. Computing device 100 may include a communication interface 110, a communication unit 120, a user interface (UI) 130, a processor 140, a memory 150, instructions 160, a power supply 170, or any combination thereof. As used herein, the term "computing device" includes any unit or combination of units capable of performing any of the techniques disclosed herein, or any portion(s) thereof.

[0025] Computing device 100 may be a fixed computing device, such as a personal computer (PC), a server, a workstation, a minicomputer, a mainframe computer, or a mobile computing device, such as a mobile phone, a personal digital assistant (PDA), a laptop, a tablet PC, etc. Although shown as a single unit, any one or more elements of computing device 100 may be integrated into any number of separate physical units. For example, UI 130 and processor 140 may be integrated into a first physical unit, and memory 150 may be integrated into a second physical unit.

[0026] The communication interface 110 can be a wireless antenna as shown, a wired communication port such as an Ethernet port, an infrared port, a serial port, or any other wired or wireless unit capable of interfacing with a wired or wireless electronic communication medium 180.

[0027] The communications unit 120 can be configured to transmit or receive signals via a wired or wireless electronic communications medium 180. For example, as shown, the communications unit 120 is operably connected to an antenna configured to communicate via wireless signals. Although not explicitly shown in FIG. 1 , the communications unit 120 can be configured to transmit, receive, or both via any wired or wireless communications medium, such as radio frequency (RF), ultraviolet light (UV), visible light, optical fiber, wire, or a combination thereof. Although FIG. 1 shows a single communications unit 120 and a single communications interface 110, any number of electronic communications units and any number of communications interfaces can be used.

[0028] The UI 130 may include any unit capable of interfacing with a user, such as a virtual or physical keypad, a touchpad, a display, a touch display, a speaker, a microphone, a video camera, a sensor, or any combination thereof. The UI 130 may be operatively coupled to the processor as shown, or to any other element of the computing device 100, such as the power supply 170. Although shown as a single unit, the UI 130 may include one or more physical units. For example, the UI 130 may include an audio interface for voice communication with the user and a touch display for visual-based and touch-based communication with the user. Although shown as separate units, the communication interface 110, the communication unit 120, and the UI 130, or portions thereof, may be configured as a combined unit. For example, the communication interface 110, the communication unit 120, and the UI 130 may be implemented as a communication port capable of interfacing with an external touchscreen device.

[0029] Processor 140 may include any device or system capable of manipulating or processing signals or other information, such as an optical processor, a quantum processor, a molecular processor, or a combination thereof, now existing or later developed. For example, processor 140 may include a special-purpose processor, a digital signal processor (DSP), multiple microprocessors, one or more microprocessors associated with a DSP core, a controller, a microcontroller, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a programmable logic array, a programmable logic controller, microcode, firmware, any type of integrated circuit (IC), a state machine, and / or any combination thereof. As used herein, the term "processor" includes a single processor or multiple processors. The processor may be operatively coupled to communication interface 110, communication unit 120, UI 130, memory 150, instructions 160, power supply 170, or any combination thereof.

[0030] Memory 150 may include any non-transitory computer-usable or computer-readable medium, such as, for example, any tangible device that can contain, store, communicate, or transfer instructions 160, or any information associated therewith, for use by or in connection with processor 140. Non-transitory computer-usable or computer-readable media include solid-state drives, memory cards, removable media, read-only memory (ROM), random-access memory (RAM), any type of disk, such as a hard disk, floppy disk, optical disk, magnetic card, or optical card, an application-specific integrated circuit (ASIC), or any type of non-transitory medium suitable for storing electronic information, or a combination thereof. Memory 150 may be connected to processor 140, for example, via a memory bus (not explicitly shown).

[0031] Instructions 160 may include instructions for executing any technique disclosed herein, or any portion(s) thereof. Instructions 160 may be embodied in hardware, software, or any combination thereof. For example, instructions 160 may be implemented as information stored in memory 150, such as a computer program, and executed by processor 140 to perform any of the respective techniques, algorithms, aspects, or combinations thereof, as described herein. Instructions 160, or portions thereof, may be implemented as a special-purpose processor or circuitry, which may include hardware dedicated to executing any of the techniques, algorithms, aspects, or combinations thereof described herein. Portions of instructions 160 may be distributed across multiple processors on the same or different machines, or across a network, such as a local area network, a wide area network, the Internet, or a combination thereof.

[0032] Power supply 170 can be any device suitable for providing power to communication interface 110. For example, power supply 170 can include a wired power source, one or more dry batteries such as nickel-cadmium (NiCd) batteries, nickel-zinc (NiZn) batteries, nickel-metal hydride (NiMH) batteries, lithium-ion (Li-ion) batteries, solar cells, fuel cells, or any other device capable of providing power to communication interface 110. Communication interface 110, communication unit 120, UI 130, processor 140, instructions 160, memory 150, or any combination thereof can be operatively coupled to power supply 170.

[0033] Although shown as separate elements, the communication interface 110, the communication unit 120, the UI 130, the processor 140, the instructions 160, the power supply 170, the memory 150, or any combination thereof, may be integrated into one or more electronic units, circuits, or chips.

[0034] 2 is a diagram of a computing and communication system 200 according to an embodiment of the present disclosure. The computing and communication system 200 may include one or more computing and communication devices 100A, 100B, 100C, one or more access points 210A, 210B, one or more networks 220, or a combination thereof. For example, the computing and communication system 200 may be a multiple-access system that provides communications, such as voice, data, video, messaging, broadcast, or a combination thereof, to one or more wired or wireless communication devices, such as the computing and communication devices 100A, 100B, 100C. For simplicity, FIG. 2 shows three computing and communication devices 100A, 100B, 100C, two access points 210A / 210B, and one network 220, although any number of computing and communication devices, access points, and networks may be used.

[0035] Computing and communication devices 100A, 100B, and 100C can be any computing device, such as computing device 100 shown in FIG. 1. For example, as shown, computing and communication devices 100A and 100B can be user devices, such as mobile computing devices, laptops, thin clients, or smartphones, and computing and communication device 100C can be a server, such as a mainframe or cluster. While computing and communication devices 100A and 100B are described as user devices and computing and communication device 100C is described as a server, any computing and communication device may perform some or all of the server functions, some or all of the user device functions, or some or all of the server functions and the user device functions.

[0036] Each computing and communication device 100A, 100B, 100C can be configured to perform wired or wireless communication. For example, computing and communication devices 100A, 100B, 100C can be configured to transmit or receive wired or wireless communication signals and can include user equipment (UE), a mobile station, a fixed or mobile subscriber unit, a mobile phone, a personal computer, a tablet computer, a server, a consumer electronics appliance, or any similar device. Although each computing and communication device 100A, 100B, 100C is shown as a single unit, the computing and communication device can include any number of interconnected elements.

[0037] Each access point 210A, 210B can be any type of device configured to communicate with computing and communication devices 100A, 100B, 100C, network 220, or both via wired or wireless communication links 180A, 180B, 180C. For example, access points 210A, 210B may include a base station, a base transceiver station (BTS), a NodeB, an enhanced NodeB (eNodeB), a home NodeB (HNodeB), a wireless router, a wired router, a hub, a repeater, a switch, or any similar wired or wireless device. Although each access point 210A, 210B is shown as a single unit, an access point may include any number of interconnected elements.

[0038] Network 220 can be any type of network configured to provide services such as voice, data, applications, Voice over Internet Protocol (VoIP), or any other communication protocol or combination of communication protocols over wired or wireless communication links. For example, network 220 can be a local area network (LAN), a wide area network (WAN), a virtual private network (VPN), a mobile or cellular network, the Internet, or any other electronic communication means. The network can use communication protocols such as Transmission Control Protocol (TCP), User Datagram Protocol (UDP), Internet Protocol (IP), Real-Time Transport Protocol (RTP), Hypertext Transfer Protocol (HTTP), or any combination thereof.

[0039] Computing and communication devices 100A, 100B, and 100C can communicate with each other over network 220 using one or more wired or wireless communication links, or a combination of wired and wireless communication links. For example, as shown, computing and communication devices 100A and 100B can communicate via wireless communication links 180A and 180B, and computing and communication device 100C can communicate via wired communication link 180C. Any of computing and communication devices 100A, 100B, and 100C may communicate using any wired or wireless communication link. For example, a first computing and communication device 100A can communicate via a first access point 210A using a first type of communication link, a second computing and communication device 100B can communicate via a second access point 210B using a second type of communication link, and a third computing and communication device 100C can communicate via a third access point (not shown) using a third type of communication link. Similarly, the access points 210A, 210B can communicate with the network 220 via one or more types of wired or wireless communication links 230A, 230B. Although Figure 2 shows the computing and communication devices 100A / 100B / 100C communicating via the network 220, the computing and communication devices 100A, 100B, 100C can communicate with each other via any number of communication links, such as direct wired or wireless communication links.

[0040] Other implementations of the computing and communication system 200 are possible. For example, the network 220 can be an ad-hoc network, and one or more of the access points 210A, 210B can be omitted. The computing and communication system 200 may include devices, units, or elements not shown in FIG. 2. For example, the computing and communication system 200 may include more communication devices, networks, and access points.

[0041] FIG. 3 is a diagram of a video stream 300 for use in encoding and decoding, according to embodiments of the present disclosure. The video stream 300, such as a video stream captured by a video camera or a video stream generated by a computing device, may include a video sequence 310. The video sequence 310 may include a sequence of adjacent frames 320. Although three adjacent frames 320 are shown, the video sequence 310 may include any number of adjacent frames 320. Each frame 330 from the adjacent frames 320 may represent a single image from the video stream. The frames 330 may include blocks 340. Although not shown in FIG. 3, a block may include pixels. For example, a block may include a 16x16 group of pixels, an 8x8 group of pixels, an 8x16 group of pixels, or any other group of pixels. Unless otherwise indicated herein, the term "block" may include a superblock, a macroblock, a segment, a slice, or any other portion of a frame. A frame, block, pixel, or combination thereof may contain display information such as luminance information, chrominance information, or any other information that can be used to store, modify, communicate, or display a video stream or portion thereof.

[0042] 4 is a block diagram of an encoder 400 according to an embodiment of the present disclosure. The encoder 400 can be implemented as a computer software program stored in a device such as the computing device 100 shown in FIG. 1 or the computing and communication devices 100A / 100B / 100C shown in FIG. 2, for example, in a data storage unit such as the memory 150 shown in FIG. 1. The computer software program can include machine instructions that can be executed by a processor such as the processor 140 shown in FIG. 1 to cause the device to encode video data as described herein. The encoder 400 can be implemented as dedicated hardware, for example, included in the computing device 100.

[0043] The encoder 400 can encode an input video stream (i.e., video stream 402), which may be the video stream 300 shown in FIG. 3, to generate an encoded (compressed) bitstream 404. In some implementations, the encoder 400 can include a forward path to generate the compressed bitstream 404. The forward path can include an intra / inter prediction unit 410, a transform unit 420, a quantization unit 430, an entropy encoding unit 440, or any combination thereof. In some implementations, the encoder 400 can include a reconstruction path (indicated by a dotted connecting line) to reconstruct a frame for encoding of further blocks. The reconstruction path can include an inverse quantization unit 450, an inverse transform unit 460, a reconstruction unit 470, a loop filter unit 480, or any combination thereof. Other structural variations of the encoder 400 can be used to encode the video stream 402.

[0044] To encode the video stream 402, each frame in the video stream 402 may be processed block by block. Thus, a current block may be identified from the blocks in the frame, and the current block may be encoded.

[0045] In the intra / inter prediction unit 410, the current block can be encoded using either intra prediction, which may be within a single frame, or inter prediction, which may be between frames. Intra prediction may include generating a predictive block from previously encoded and reconstructed samples in the current frame. Inter prediction may include generating a predictive block from samples in one or more previously constructed reference frames. Generating a predictive block for the current block in the current frame may include performing motion estimation to generate a motion vector that points to an appropriate reference block in the reference frame.

[0046] The intra / inter prediction unit 410 may subtract the prediction block from the current block (raw block) to generate a residual block. The transform unit 420 may perform a block-based transform, which may include transforming the residual block into transform coefficients in the frequency domain, etc. Examples of block-based transforms include the Karhunen-Loeve Transform (KLT), the Discrete Cosine Transform (DCT), and the Singular Value Decomposition Transform (SVD). In an example, the DCT may include transforming the block into the frequency domain. The DCT may include using transform coefficient values ​​based on spatial frequency, with the lowest frequency (DC) coefficient in the upper left corner of the matrix and the highest frequency coefficient in the lower right corner of the matrix.

[0047] The quantization unit 430 may convert the transform coefficients into discrete quantum values, which may be referred to as quantized transform coefficients or quantization levels. The quantized transform coefficients may be entropy encoded by the entropy encoding unit 440 to generate entropy-encoded coefficients. The entropy encoding may include using a probability distribution metric. The entropy-encoded coefficients and information used to decode the block may include the type of prediction used, motion vectors, and quantizer values, and may be output in the compressed bitstream 404. The compressed bitstream 404 may be formatted using various techniques, such as run-length encoding (RLE) and zero-run coding.

[0048] The reconstruction path may be used to maintain reference frame synchronization between the encoder 400 and a corresponding decoder, such as the decoder 500 shown in FIG. 5. The reconstruction path may be similar to the decoding process described below and may include inverse quantizing the quantized transform coefficients in the inverse quantization unit 450 and inverse transforming the inverse quantized transform coefficients in the inverse transform unit 460 to generate a differential residual block. The reconstruction unit 470 may add the prediction block generated by the intra / inter prediction unit 410 to the differential residual block to create a reconstructed block. A loop filter unit 480 may be applied to the reconstructed block to reduce distortion, such as blocking artifacts.

[0049] Other variations of the encoder 400 may be used to encode the compressed bitstream 404. For example, a non-transform-based encoder 400 may quantize the residual blocks directly without using the transform unit 420. In some implementations, the quantization unit 430 and the inverse quantization unit 450 may be combined into a single unit.

[0050] 5 is a block diagram of a decoder 500 according to an embodiment of the present disclosure. The decoder 500 can be implemented in a device such as the computing device 100 shown in FIG. 1 or the computing and communication devices 100A / 100B / 100C shown in FIG. 2, for example, as a computer software program stored in a data storage unit such as the memory 150 shown in FIG. 1. The computer software program can include machine instructions that can be executed by a processor such as the processor 140 shown in FIG. 1 to cause the device to decode video data as described herein. The decoder 500 can be implemented as dedicated hardware, for example, included in the computing device 100.

[0051] 4 and may decode the compressed bitstream 502 to generate an output video stream 504. The decoder 500 may include an entropy decoding unit 510, an inverse quantization unit 520, an inverse transform unit 530, an intra / inter prediction unit 540, a reconstruction unit 550, a loop filter unit 560, a deblocking filter unit 570, or any combination thereof. Other structural variations of the decoder 500 may be used to decode the compressed bitstream 502.

[0052] The entropy decoding unit 510 may decode data elements in the compressed bitstream 502, for example, using context-adaptive binary arithmetic decoding, to generate a set of quantized transform coefficients. The inverse quantization unit 520 may inverse quantize the quantized transform coefficients, and the inverse transform unit 530 may inverse transform the inverse quantized transform coefficients to generate differential residual blocks, which may correspond to the differential residual blocks generated by the inverse transform unit 460 shown in FIG. 4. Using header information decoded from the compressed bitstream 502, the intra / inter prediction unit 540 may generate prediction blocks corresponding to the prediction blocks created by the encoder 400. In the reconstruction unit 550, the prediction blocks may be added to the differential residual blocks to create reconstructed blocks. The loop filter unit 560 may be applied to the reconstructed blocks to reduce blocking artifacts. The deblocking filter unit 570 may be applied to the reconstructed blocks to reduce blocking distortion, and the results may be output as the output video stream 504.

[0053] Other variations of the decoder 500 may be used to decode the compressed bitstream 502. For example, the decoder 500 may generate the output video stream 504 without a deblocking filter unit 570.

[0054] In some implementations, reducing temporal redundancy may include using inter-frame similarities to encode frames using a relatively small amount of data based on one or more reference frames, which may be previously encoded, decoded, and reconstructed frames of the video stream. For example, blocks or pixels of a current frame may be similar to spatially corresponding blocks or pixels of the reference frames. In some implementations, blocks or pixels of a current frame may be similar to blocks or pixels of the reference frames in different portions, and reducing temporal redundancy may include generating motion information indicative of a spatial difference or transformation between the positions of the blocks or pixels in the current frame and the corresponding positions of the blocks or pixels in the reference frames.

[0055] In some implementations, reducing temporal redundancy may include identifying a block or pixel in a reference frame, or a portion of a reference frame, that corresponds to a current block or pixel of the current frame. For example, a reference frame, or a portion of a reference frame, which may be stored in memory, may be searched for the best block or pixel to use to encode the current block or pixel of the current frame. For example, the search may identify a block of the reference frame in which the difference in pixel values ​​between the reference block and the current block is minimized, and may be referred to as a motion search. In some implementations, the portion of the reference frame searched may be limited. For example, the portion of the reference frame searched, which may be referred to as a search area, may include a limited number of rows of the reference frame. In an example, identifying the reference block may include calculating a cost function, such as the sum of absolute differences (SAD), between pixels of blocks in the search area and pixels of the current block. In some implementations, more than one reference frame may be provided. For example, three reference frames may be selected from eight candidate reference frames.

[0056] In some implementations, the spatial difference between the location of the reference block in the reference frame and the current block in the current frame may be represented as a motion vector. The difference in pixel values ​​between the reference block and the current block may be referred to as difference data, residual data, or a residual block. In some implementations, generating a motion vector may be referred to as motion estimation, and the pixels of the current block may be estimated based on their location using Cartesian coordinates. x,y Similarly, the pixels in the search area of ​​the reference frame are assigned to the coordinate system r based on their location using Cartesian coordinates. x,y The motion vector (MV) of the current block may be determined based on, for example, the SAD between pixels of the current frame and corresponding pixels of the reference frame.

[0057] In some implementations, in the case of inter prediction, the encoder 400 may communicate encoding information for the prediction block to the block endpoint, including, but not limited to, the prediction mode, the prediction reference frame(s), optionally the motion vector(s), and the sub-pixel interpolation filter type.

[0058] 6 is a flowchart diagram of an example technique 600 for adaptive overlapping block prediction according to an embodiment of the present disclosure. Adaptive overlapping block prediction may be implemented in an encoder, such as prediction performed by the intra / inter prediction unit 410 of the encoder 400 as shown in FIG. 4, or in a decoder, such as prediction based on the compressed bitstream 502 performed by the intra / inter prediction unit 540 in the decoder 500 as shown in FIG. 5. In some implementations, adaptive overlapping block prediction may include determining a base prediction for a current block based on prediction parameters of the current block at 610, identifying neighboring prediction parameters of neighboring blocks at 620, determining overlap regions neighboring the neighboring blocks in the current block at 630, determining an overlap prediction for the overlap region as a weighted function of the base prediction and a prediction based on the neighboring prediction parameters at 640, generating an overlap prediction block based on combining the overlap predictions at 650, or a combination thereof.

[0059] At 610, a base prediction of the current block may be performed using current prediction parameters of the current block. For example, prediction parameters for inter prediction may include a reference frame and a motion vector of the current block. A base prediction block may be determined using the base prediction of the current block.

[0060] Neighboring prediction parameters may be identified at 620. In some implementations, identifying neighboring prediction parameters may include identifying previously encoded or decoded neighboring blocks and, for each previously encoded or decoded neighboring block, identifying prediction parameters used to encode or decode the neighboring block.

[0061] At 630, overlap regions may be determined. In some implementations, overlap regions within the current block may be determined with respect to one or more of the encoded or decoded neighboring blocks identified at 620. The overlap regions may include regions, such as groupings of pixels, within the current block that are adjacent to the corresponding neighboring blocks. The determination of the overlap regions may be conditional on whether there is at least one previously encoded or decoded neighboring block that is smaller in size than the current block.

[0062] At 640, overlap prediction may be determined. In some implementations, overlap prediction for the overlap region identified at 630 may be determined based on the weighted function of the base prediction determined at 610 and a prediction generated using neighboring prediction parameters from the corresponding neighboring block to predict pixel values ​​in the current block within the overlap region. For example, for an overlap region, a prediction block of a size equivalent to the size of the overlap region may be determined using prediction parameters of the corresponding neighboring block. Overlap prediction may be performed for the overlap region based on a weighted combination of base prediction block pixel values ​​and prediction block pixel values ​​generated for the overlap region based on prediction parameters of the corresponding neighboring block. For example, pixel values ​​of pixels within the overlap region may be a weighted average of pixel values ​​from the base prediction block and corresponding pixel values ​​from a prediction block generated for the overlap region based on prediction parameters of the corresponding neighboring block. In some implementations, generating a prediction block for each overlap region may be omitted, and an overlap prediction block may be generated for each pixel.

[0063] At 650, an overlap prediction block may be generated using overlap prediction from one or more neighboring blocks. For example, the overlap prediction at 640 may be repeated for one or more overlap regions within the current block to form the overlap prediction block.

[0064] In some implementations, portions of the current block that do not spatially correspond to the overlap region of the current block may be predicted based on a base prediction.

[0065] In some implementations, the overlapping predicted block of the current block may be compared to the base predicted block, and the base predicted or overlapping predicted block may be used as the predicted block for the current block. For example, this comparison may be based on a residual-based error metric, and the encoder 400 may select the predicted block that produces the lower error value.

[0066] In some implementations, information indicating that overlap prediction was performed on the current block may be included in the encoded bitstream. For example, an indication of the type of weighting function used for overlap prediction may be indicated in the encoded bitstream. In some implementations, the indication of the weighting function may be omitted from the encoded bitstream, and decoding the encoded bitstream may include determining the weighting function using context information of previously decoded neighboring frames. For example, decoding may include identifying the weighting function based on which neighboring block prediction parameters produce the smallest residual-based error.

[0067] Figure 7 is a block diagram of an exemplary block-based prediction with variable block sizes, according to embodiments of the present disclosure. In some implementations, at least one side of a current block may be adjacent to two or more previously encoded or decoded blocks. As shown, a current block for prediction 720 is surrounded by top-most previously encoded or decoded neighboring blocks 721, 722, and 723, and a left-side neighboring block 724. While the previously encoded or decoded neighboring blocks are shown above and to the left of the current block 720 in Figure 7, in some implementations, the previously encoded or decoded neighboring blocks may be below or to the right of the current block, or some combination of above, left, below, or right.

[0068] As shown in Figure 7, current block 720 is a 16x16 block, neighboring block 721 is an 8x8 block, neighboring blocks 722 and 723 are 4x4 blocks, and neighboring block 724 is a 16x16 block. Although 16x16, 8x8, and 4x4 blocks are shown in Figure 7, any other block sizes may be used in accordance with this disclosure.

[0069] In some implementations, overlap regions may be determined for overlap prediction of the current block 720 with respect to one or more previously encoded or decoded neighboring blocks. For example, pixels within the current block 720 may be grouped within defined overlap regions, and overlap regions may be determined for one or more upper neighboring blocks, such as overlap regions 731, 732, and 733, corresponding to neighboring blocks 721, 722, and 723, respectively, and overlap region 734, shown as being in the left half of the current block 720, corresponding to left neighboring block 724. As shown in FIG. 7 , overlap regions, e.g., overlap regions 731 and 734, may overlap, with overlap region 731 comprising the intersection of the overlap regions corresponding to upper neighboring block 721 and left neighboring block 724. As shown, overlap regions 731-734 are within the current block 720 and are adjacent to their corresponding neighboring blocks 721-724.

[0070] In some implementations, the overlap prediction weighting function may determine the size of the overlap region. The size of the overlap region may correspond to the size of the corresponding neighboring block, such as the corresponding column dimension v, row dimension w, or both. In some implementations, the size of the v×w overlap region may correspond to the x×y neighboring block size, where v=x and w=y. For example, as shown in FIG. 7, an overlap region, such as an 8×8 overlap region 731 in a current block 720, may be determined for an 8×8 neighboring block 721.

[0071] The size of the overlap region may correspond to the size of the current block, such as the corresponding column dimension v, row dimension w, or both. In some implementations, the size of the v×w overlap region may correspond to the x′×y′ size of the current block, where v=x′ and w=y′. As an example, the current block may be smaller than the neighboring block, and one dimension of the size of the overlap region may be limited to the size of the current block at the boundary of the neighboring block. As another example, 4×8 overlap regions 732 and 733 as shown in FIG. 7 may be determined with respect to the neighboring blocks 722 and 733, respectively, which are 4×4, and the number of rows corresponding to half the current block size dimension of 16×16, where w=½y′=8. In some implementations, the size of the v×w overlap region may correspond to the x′×y′ size of the current block, where v=x′ / 2 and w=y′. For example, an 8x16 overlap region 734 may be determined with respect to a 16x16 left neighboring block 724. In some implementations, the size of the overlap region may correspond to both the neighboring block size and the current block size. Other variants of the overlap region size may be used.

[0072] In some implementations, a weighting function index indicating which of the various discrete overlap region sizes will be used as a common size for all overlap regions may be included in the encoded bitstream, and decoding the block may include decoding the index to determine which of the discrete overlap region sizes to use in the overlap prediction weighting function. As an example, a first index may indicate that all overlap regions have a size including a first dimension equal to the length of an adjacent block edge and a second dimension extending ½ the length of the current block, such as overlap region 732 shown in FIG. 7. A second index may indicate that all overlap regions have a first dimension equal to the adjacent block edge and a second dimension extending ¼ the length of the current block, such as overlap region 904 shown in FIG. 8. In some implementations, encoding may include determining a weighting function that maps different relative sizes for each of the overlap regions depending on prediction parameters of the adjacent blocks. For example, encoding may include generating multiple prediction block candidates according to various weighting functions, determining a rate-distortion cost estimate for each candidate, and selecting the weighting function that provides the best rate-distortion optimization.

[0073] FIG. 8 is a block diagram of exemplary size variations of overlap regions according to embodiments of the present disclosure. In some implementations, the dimensions of the overlap region may exceed the corresponding dimensions of the corresponding adjacent block. For example, as shown in FIG. 8, the overlap region 902 corresponding to the adjacent block 722 may be determined to have a horizontal size that is greater than the number of horizontal pixels in the corresponding adjacent block 722 and equal to the vertical size. As another example, the overlap region 904 corresponding to the adjacent block 722 may be determined according to the horizontal size of the adjacent block and 1 / 4 the vertical size of the current block. In some implementations, both the horizontal and vertical dimensions of the overlap region may exceed the corresponding dimensions of the corresponding adjacent block. In some implementations, both the horizontal and vertical dimensions of the overlap region may be exceeded by the corresponding dimensions of the corresponding adjacent block.

[0074] The sizes of the various overlap regions may be determined by using a set of discrete size functions, from which the size of the overlap region may be adaptively selected as a function of the difference between the prediction parameters of the current block and the neighboring prediction parameters of the corresponding neighboring block. In some implementations, a comparison between the motion vector of the current block and the motion vector of the corresponding neighboring block of the overlap region may indicate a motion vector difference above a threshold, and one or more dimensions of the default overlap region size may be adjusted. In some implementations, determining the difference in prediction parameters between the neighboring block and the current block may be based on a comparison of the temporal distance between the respective reference frames of the neighboring block and the current block. For example, the reference frame of the neighboring block may be a previously encoded frame, and the reference frame of the current block may be a frame encoded before the previously encoded frame, and the difference may be measured by the number of frames or the temporal distance between the reference frames.

[0075] In some implementations, both the neighboring block and the current block may be predicted according to inter prediction, in which case the size of the overlap region of the weighting function may follow the description above. In some implementations, one of the neighboring block or the current block may be predicted according to intra prediction, and the other may be predicted according to inter prediction, so a usable comparison of the prediction parameters may not be available. If a comparison of the prediction parameters is not available, the weighting function may determine the size of the overlap region according to a predetermined function of the current block size. For example, the size of the overlap region may be defined as a small overlap region, such as based on 1 / 4 of the length of the current block. As another example, the size of the overlap region may be set to zero, or there may be no overlap region, and overlap prediction may be omitted because the neighboring prediction may be deemed too different from the current block prediction.

[0076] In some implementations, the size of the defined overlap region may range between (0,0), which may indicate no overlap region, and x' x y', which may indicate the size of the current block. The overlap prediction weighting function may adjust the size of the defined overlap region based on the difference between the prediction parameters. For example, for an overlap region such as overlap region 732 shown in FIG. 7, the motion vector value of neighboring block 722 may be very similar to the motion vector value of a current block such as current block 720 shown in FIG. 7, and size adjustment for the defined overlap size may be omitted. As another example, the motion vector value of a neighboring block such as neighboring block 722 shown in FIG. 7 may differ from the motion vector value of a current block such as current block 720 shown in FIG. 7, and the difference may exceed an established threshold, and the size of the overlap region may be adjusted. For example, the overlap region may be enlarged as shown for overlap region 902, or may be reduced as shown for overlap region 904, as shown in FIG. 8. In some implementations, adapting the size of the overlap region based on the difference between the prediction parameters may include adapting a weighting function for overlap prediction such that the contribution of the current block prediction parameters or the neighboring block prediction parameters can be weighted to prioritize, depending on which prediction parameters optimize overlap prediction for the current block. For example, the weighting function may weight the contribution from the neighboring block prediction parameters to zero for some pixels in the current block by setting at least one dimension of the overlap region smaller than the corresponding dimension of the current block.

[0077] In some implementations, the overlap region may be omitted on the condition that the difference between the prediction parameters of the current block and the prediction parameters of the neighboring block is above a threshold (i.e., the size of the overlap region is 0x0). In some implementations, the overlap region may be omitted on the condition that there is little or no difference between the prediction parameters of the current block and the prediction parameters of the neighboring block. For example, the current block prediction may be substantially similar to the neighboring block prediction, the difference between the prediction parameters may be less than a minimum threshold, and the size of the overlap region may be 0x0.

[0078] In some implementations, prediction parameters of the current block 720 may be used to determine a base prediction for the current block 720. In that case, the base prediction may be a base prediction for each of the overlap regions 731-734. For example, once an overlap prediction is determined for each pixel in the overlap region of the current block 720, a base prediction block for the entire current block may be determined such that pixel values ​​of the base prediction may be stored for later use.

[0079] In some implementations, a prediction for each of the overlap regions, such as overlap regions 731-734 shown in Figure 7, may be determined based on prediction parameters of a neighboring block associated with the overlap region. For example, prediction parameters including the corresponding reference frame and motion vector of a neighboring block, such as neighboring block 722 shown in Figure 7, may be used to determine a prediction for a pixel in an overlap region, such as overlap region 732 shown in Figure 7.

[0080] In some implementations, overlap predictions for one or more overlap regions, such as overlap regions 731-734 shown in FIG. 7, may be determined as a weighted function of one or more base predictions based on respective neighboring prediction parameters. For example, the overlap prediction for each pixel in an overlap region, such as overlap region 732 shown in FIG. 7, may be an average of a base prediction value and a predicted pixel value generated based on respective neighboring prediction parameters. In some implementations, there may be more than one overlap region for a pixel in a current block. For example, two or more neighboring overlap regions, such as overlap regions 731, 732, and 733 shown in FIG. 7, may overlap, and the overlap prediction may be determined as an average of a base prediction based on the prediction parameters of the current block and n predictions based on respective prediction parameters for each of the n neighboring blocks associated with the overlap region. For example, referring to FIG. 7, pixels within both overlap regions 731 and 734 correspond to two predictions based on respective neighboring prediction parameters (i.e., n=2), which may be averaged with the base prediction to determine the overlap prediction. In some implementations, each pixel in the overlap region 731 may be determined as the average of a base prediction using the prediction parameters of the current block 720, a prediction based on the prediction parameters of the neighboring block 721, and a prediction based on the prediction parameters of the neighboring block 724.

[0081] In some implementations, the weighting function for the overlap prediction may be a function of the distance between the center of the current block and the center of the neighboring block associated with the overlap region. For example, the weighting function may determine the overlap prediction to prioritize smaller-sized neighboring blocks, which may contain pixels that are located, on average, closer to the current block than larger neighboring blocks, and may be more reliable and provide a better prediction of the current block. For example, because the center of neighboring block 722 is closer to the center of current block 720 than the center of neighboring block 724, the weighting function may weight overlap region 732 to contribute more to the overlap prediction of current block 720 than the larger overlap region 734.

[0082] 9 is a block diagram of an example weighting function for overlapped prediction according to an embodiment of the present disclosure. The overlapped prediction may be optimized by a weighted average of a first prediction and n neighboring block-based predictions. For example, P may indicate a prediction using the current block prediction parameters, ω may indicate the weight of the prediction P, and P n may denote prediction using neighboring block prediction parameters, and ω n is the predicted P n , and the weighting of the overlap prediction OP for pixel 952 may be expressed as:

number

[0083] In some implementations, one or more predicted pixel values ​​for each pixel in the overlap region may be weighted according to a weighting function based on the pixel's relative position with respect to the neighboring block associated with the overlap region. For example, the overlap prediction may be weighted such that the closer a pixel is located relative to a neighboring block, the greater the contribution from the prediction based on the neighboring block prediction parameters. For example, pixel 952 in overlap region 734 shown in FIG. 9 has a relative distance 954 to the center of the corresponding neighboring block 724 and a relative distance 955 to the center of the current block 720. In some implementations, the overlap prediction weights ω, ω n may be a function of the relative distances 954, 955. For example, d may indicate the relative distance from the pixel to the center of the current block, and d n may indicate the relative distance from the pixel to the center of the neighboring block n, and the weighting function may be the ratio of the relative distance values, which may be expressed as:

number

[0084] In some implementations, the overlap prediction weights ω, ω n may be a function of the directional relative distance between the pixel and the boundary between the neighboring block and the current block, such as the horizontal relative distance 964 of the left neighboring block 724. For example, the weighting function may be based on a raised cosine window function, where the weights ω, ω n is equal to the pixel located on the adjacent edge of the overlap region n, and the weight is ω0=1, ω n = 0. As another example, the overlap prediction weights ω0, ω n may be a function of the relative vertical distance between the pixel and the nearest edge of the neighboring block, for example, the relative vertical distance 963 of pixel 953 to the neighboring block 723 above.

[0085] In some implementations, the type of weighting function used for overlap prediction is encoded by an index, such as by encoder 400 shown in Figure 4, and included in the compressed video bitstream, such as compressed bitstream 404 shown in Figure 4, as an indication of decoding, such as by decoder 500 shown in Figure 5, of the weighting function used for overlap prediction. For example, different raised cosine weightings may be mapped to a first set of indexes, and different weighting functions based on relative distance to block center points may be mapped to a second set of indexes.

[0086] The weighting function for overlap prediction may be a combination of any or all of the weighting functions described in this disclosure. For example, a weighting function may be implemented to weight the overlap prediction by adaptively adjusting the size of the overlap region, by weighting each of the base prediction and the overlap prediction of the current block, or by a combination thereof.

[0087] The above is an implementation of overlap prediction that uses only motion information of neighboring (surrounding and nearby) blocks of the current block, where the neighboring blocks are above or to the left of the current block. However, other implementations are possible. In some situations, overlap prediction may be applied to a sub-block of a block, which may be the largest coding unit (which may be referred to as a macroblock or superblock), or a block smaller than the largest coding unit. In an example, the coding mode may indicate that a block needs to be predicted at a particular sub-block level. Thus, for example, a block of size N×N (e.g., 16×16) may be predicted at b 2 (e.g., b=4) may be partitioned into M×M (e.g., 4×4) blocks, where N=b * It is M. b 2 For ease of reference, overlap prediction at the sub-block level may also be referred to herein as sub-block overlap prediction.

[0088] 10 is a block diagram 1000 illustrating sub-block overlap prediction. Sub-block overlap prediction can be used to reduce blockiness artifacts of sub-blocks by smoothing (e.g., correcting) the boundaries of sub-blocks of a block. Similar to the overlap prediction described above, in sub-block overlap prediction, a prediction obtained using motion information (e.g., motion vectors and reference frames) of a current sub-block is combined (e.g., weighted by the prediction) with a prediction obtained using motion information of each of one or more neighboring blocks. However, in sub-block overlap prediction, the neighboring blocks can be surrounding neighboring blocks, sub-blocks of the same block as the current sub-block, blocks following the current sub-block in raster scan order, or a combination thereof.

[0089] Block diagram 1000 includes a block 1002 that is partitioned into sub-blocks. The sub-blocks of block 1002 are numbered 0 through 15. Although FIG. 10 shows block 1002 being partitioned into 16 sub-blocks, the disclosure is not so limited. Block 1002 may be partitioned into more or fewer sub-blocks. The number of sub-blocks may depend on the size of block 1002.

[0090] Sub-block overlap prediction may use motion information for at least some of the blocks available to the left, top, right, and bottom of the current sub-block. Illustratively, to obtain a prediction for sub-block 1004, a current prediction P0 for sub-block 1004 (the block numbered 9) is obtained using the motion information (e.g., motion vector(s) and reference frame(s)) determined for sub-block 1004, P L The predicted block is obtained using the motion information of the left sub-block 1006, and P TThe predicted block is obtained using the motion information of the sub-block 1008 above, and P R The predicted block is obtained using the motion information of the right sub-block 1010, and P B The prediction block is obtained using the motion information of the bottom sub-block 1012 .

[0091] The final predicted block is P0, P L , P T , P R , and P B In an example, the predictions may be combined in a particular order. In an example, the order may be circular starting from the left neighboring block. For example, P1 is obtained using a weighted sum of (P0 + P L ) / 2, then P2 can be obtained as (P1+P T ) / 2, then P3 can be obtained as (P2+P R ) / 2, and then the final prediction can be obtained as (P3+P B ) / 2. In this way, only a bit shift operation needs to be performed. As another example, the prediction of sub-block 1014 can be obtained using the motion information of block 1016, block 1018, sub-block 1020, and sub-block 1022.

[0092] It will be understood that statements in this specification such as "overlap prediction is applied (or performed) on neighboring blocks of the current block" or "overlap prediction is obtained based on neighboring blocks" mean that a prediction of the current block must be obtained using motion information of the neighboring blocks and that what is obtained must be included in the calculation of the final predicted block for the current block.

[0093] In some situations, overlap prediction may not be applied to or used for a current block (e.g., a sub-block) if one or more conditions apply. Examples of such conditions are provided below.

[0094] In an example, overlap prediction may be disabled for all frames of a video sequence. For example, a syntax element in a sequence parameter set (SPS) may indicate that overlap prediction need not be applied to any block of any frame of the video sequence. As is well known, an SPS may include parameters that are common to an entire video sequence (i.e., each of the frames of the video sequence). In an example, overlap prediction may be disabled for a group of frames. For example, a syntax element in a picture parameter set (PPS) may indicate that overlap prediction need not be applied to a group of frames corresponding to the PPS. As is well known, a PPS may include parameters that are common to all frames of the group of frames. In an example, overlap prediction may not be performed on a current block that is intra predicted.

[0095] In an example, if the size of the block is equal to or smaller than a threshold size, overlap prediction may not be applied to (e.g., not performed on) the block. For example, overlap prediction may not be performed on blocks of 32x32 pixels or smaller. In an example, the block header of the current block may include one or more syntax elements indicating whether overlap prediction needs to be performed on the block. For example, the syntax element may be a prediction mode indicating whether overlap prediction needs to be performed on the block. In an example, the one or more syntax elements may be flags indicating whether overlap prediction needs to be performed. Thus, if the one or more syntax elements indicate that overlap prediction does not need to be performed on the current block, overlap prediction is not performed on the current block.

[0096] In some examples, if the current block is not coded using the SKIP model or the MERGE mode, a flag indicating whether overlap prediction needs to be performed may be included in the header of the current block. That is, if the current block is encoded using one of the SKIP mode or the MERGE mode, overlap prediction needs to be performed on the current block. Here, a brief description of the SKIP mode and the MERGE mode will be provided. When a block is encoded using the SKIP mode, residual information for the current block is not transmitted from the encoder to the decoder. The decoder may estimate the motion of the current block encoded using the SKIP mode from a list of candidate motion vectors and may use (e.g., select) the motion vector to calculate a motion-compensated prediction of the current block. In the MERGE mode, a motion vector from the list of candidate motion vectors is inherited for coding the current block. The list of candidate motion vectors may also be referred to as a merge list, and the merge list may refer to blocks whose motion vectors (or more generally, motion information) are used to select the motion vector (or more generally, motion information) of the current block.

[0097] In some situations, it may not be desirable to use overlapped prediction.

[0098] For example, if the current block contains screen content, overlap prediction may not be efficient, even if the current block is coded using one of the MERGE mode or the SKIP mode. In these cases, overlap prediction may result in blurring of sharp edges in the screen content during decoding. As described above, flags for non-MERGE and non-SKIP predicted blocks may be signaled. However, it may be useful to further indicate whether overlap prediction should or should not be performed for such blocks.

[0099] As another example, overlapped prediction may not be efficient when multiple reference frames are available for a current frame. When multiple reference frames are available, overlapped prediction may require fetching different samples (pixel values) from different reference pictures, which can significantly increase memory bandwidth requirements. As illustrated, sub-block 1014 may be predicted using reference frames R1 and R3 (e.g., bi-predicted), block 1016 may be bi-predicted using reference frames R1 and R2, sub-block 1020 may be bi-predicted using reference frames R1 and R3, sub-block 1020 may be bi-predicted using reference frames R3 and R4, and sub-block 1022 may be uni-predicted using reference frame R3. Therefore, performing overlapped prediction for sub-block 1014 requires fetching samples from four different reference frames, i.e., reference frames R1, R2, R3, and R4. This process may need to be performed for each of the blocks.

[0100] Furthermore, performing overlapped prediction on blocks of P slices or frames significantly increases the complexity of coding the P slices or frames, which coding of blocks of P slices or frames is desirable to do with the least amount of complexity possible, especially for real-time use cases of video coding.

[0101] The following techniques can be used to solve (or at least mitigate) the aforementioned problems with overlapped prediction.

[0102] 11 is a flowchart diagram of a technique 1100 for coding a current block of a video frame using overlap prediction. Technique 1100 may be implemented as a software program that may be executed by a computing device, such as one or more of computing and communication devices 100A / 100B / 100C of FIG. 2. The software program may be stored in a memory, such as memory 150 of FIG. 1, and may include machine-readable instructions that, when executed by a processor, such as processor 140 of FIG. 1, cause the computing device to perform technique 1100. Technique 1100 may be performed in whole or in part by intra / inter prediction unit 540 of decoder 500 of FIG. 5. Technique 1100 may be performed in whole or in part by intra / inter prediction unit 410 of encoder 400 of FIG. 4. Technique 1100 may be performed using dedicated hardware or firmware. Multiple processors, memories, or both may be used.

[0103] Technique 1100 can conditionally apply overlap prediction (e.g., sub-block overlap prediction) to a current block (e.g., a current sub-block) based on information available at the decoder, such as motion information, or predicted sample values ​​of blocks that neighbor the current block and may be available for performing overlap prediction, as described with respect to FIG. 10.

[0104] In an example, technique 1100 can be applied to all blocks of a current frame that are predicted using inter prediction. In an example, whether to apply overlap prediction can be inferred at the decoder based on information available to the decoder, and no block-level syntax element is required to indicate whether overlap prediction needs to be performed on a block. In another example, the condition can be applied only when block-level overlap prediction is signaled or derived to be performed.

[0105] In an example, technique 1100 may not be performed for a P slice (i.e., for all blocks of a P slice). Alternatively, to reduce complexity, overlap prediction for a P slice can be performed for a current block of a P slice using motion information of a neighboring block when the current block and the neighboring block share the same reference frame(s), and the absolute motion vector difference between the motion vector of the current block and the motion vector of the neighboring block is below a predetermined or signaled motion vector threshold, which can be as described elsewhere herein.

[0106] In an example, overlap prediction is applied to a current block only when the current block is coded using a specific prediction mode, which may include a mode referred to as affine mode and subblock-based temporal motion vector prediction (SbTMVP) mode in MPEG Versatile Video Coding (VVC), i.e., the ITU-T H.266 video standard.

[0107] Briefly, affine mode uses more degrees of freedom (parameters) than classical translation using motion vectors (which uses two parameters). For example, affine mode may use four parameters (for translation, rotation, and scaling) or six parameters (for translation, rotation, scaling, shear, and aspect ratio change). Briefly, SbTMVP mode uses motion fields in the co-located frame of the current frame to improve the motion vector prediction (MVP) and merge mode of coding units in the current frame. In SbTMVP mode, motion prediction may be performed at the sub-block level or sub-coding unit (sub-CU) level. Furthermore, SbTMVP applies a motion shift from the co-located frame and then derives temporal motion information. The motion shift may involve obtaining a motion vector from one of the spatial neighboring blocks of the current block and shifting it by that motion vector.

[0108] As already mentioned, applying overlap prediction from neighboring blocks of a current block may be defined as or may include obtaining a prediction based on motion information (e.g., one or more motion vectors) of the neighboring blocks and including that prediction in a weighted prediction that includes a prediction obtained for the current block using the motion information associated with the current block.

[0109] At 1110, a first prediction block of the current block is obtained based on motion information associated with the first current block. The motion information may be or include a first reference frame and a first motion vector. More generally, the motion information may include more than one motion vector (and associated more than one reference frame). In an example, when technique 1100 is implemented by a decoder, the motion information may be decoded from a compressed bitstream, such as compressed bitstream 502 of FIG. 5.

[0110] At 1120, technique 1100 determines to obtain a second prediction block for at least a portion of the current block using an overlap prediction mode that uses a second reference frame and a second motion vector of the neighboring block. The second reference frame and the second motion vector are associated with the neighboring block of the current block. The motion information of the neighboring block may include more motion vectors than the second motion vector (and, associated therewith, more reference frames than the second reference frame). This determination is based at least in part on information about the neighboring blocks of the current block.

[0111] As used herein, a second motion vector can be the actual motion vector of a neighboring block (i.e., the motion vector used to obtain a prediction of the neighboring block) or a motion vector obtained therefrom. Thus, for ease of reference, in one example, "second motion vector" refers to the actual motion vector of the neighboring block, and in another example, "second motion vector" refers to the motion vector obtained from the actual motion vector.

[0112] For example, the second prediction block may be obtained using a second motion vector obtained by rounding the actual motion vector to an integer position. By rounding the actual motion vector to an integer position, the interpolation process that would otherwise be performed to obtain sub-pixel values ​​can be bypassed (e.g., avoided). The horizontal and vertical components (MV) of the actual motion vector may be x , MV y ) can both be rounded towards positive infinity, towards negative infinity, or towards zero. In other examples, the horizontal and vertical components can be rounded independently depending on their respective values. That is, if a component of the actual motion vector is positive, the corresponding component of the second motion vector can be obtained by rounding towards positive infinity, and if a component of the actual motion vector is negative, the corresponding component of the second motion vector can be obtained by rounding towards negative infinity.

[0113] In the example, the decision to obtain the second predicted block is made in response to determining that the current block and the neighboring block have (i.e., are predicted using) at least some of the same reference frame(s). Therefore, if the current block and the neighboring block are not predicted using at least some of the same reference frames, overlap prediction from the neighboring block is not performed (not applied). As illustrated, if the current block is bi-predicted using reference frames R1 and R2, and the neighboring block is also bi-predicted using reference frames R2 and R3, in 1130, the second predicted block is obtained using only reference frame R2 (and the motion vector used therewith to predict the neighboring block). In the example, the decision to obtain the second predicted block is made in response to determining that the current block and the neighboring block have (i.e., are predicted using) the same reference frame(s). Therefore, in this case, overlap prediction is performed from the neighboring block using a common reference frame between the current block and the neighboring block.

[0114] When overlap prediction is not performed (applied) from neighboring blocks, it means that the predicted block of the current block is not obtained based on the motion information of the neighboring blocks and is not used (included) when obtaining the final predicted block of the current block.

[0115] In an example, the determination to obtain the second prediction block is made in response to determining that the motion vector difference between the first motion vector and the second motion vector is less than a motion vector threshold. In an example, the motion vector threshold may depend on the distance between the first reference frame and the second reference frame. For example, the motion vector threshold may be proportional to the frame distance. That is, the motion vector threshold may be proportional to the temporal distance between the first reference frame and the second reference frame.

[0116] In an example, the motion vector threshold can be less than or equal to n pixels per frame distance (i.e., a "one-frame distance motion vector threshold"). In an example, n is equal to 16 pixels per frame distance. For example, assuming a first reference frame has frame number R and a second reference frame has frame number S, the motion vector threshold is calculated as n × |RS|. In an example, (MV x,1 ,MV y,1 ) and a first motion vector given by (MV x,2 ,MV y,2 ) is the motion vector difference between the first and second motion vectors given by

number

[0117] In an example, the one-frame distance motion vector threshold may be decoded from the compressed bitstream at a decoder. Thus, the motion vector threshold can be obtained by decoding the one-frame distance motion vector threshold from the compressed bitstream and calculating the motion vector threshold based on the one-frame distance motion vector threshold and the frame difference between the first reference frame and the second reference frame (as their multiplication). The one-frame distance motion vector threshold may be signaled (e.g., encoded) in the SPS, PPS, slice header, block header, or some other header. In another example, the one-frame distance motion vector threshold may be predefined (e.g., preset). When implemented in an encoder, the one-frame distance motion vector threshold may be calculated by the encoder and encoded into the compressed bitstream 404 of FIG. 4.

[0118] In an example, if the first reference frame is different from the second reference frame, the first motion vector and the second motion vector may be scaled to the target reference frame. Then, the scaled first motion vector and the scaled second motion vector are used to calculate a motion vector differential. As already mentioned, one or both of the current block and the neighboring block may be predicted using more than one motion vector.

[0119] Scaling the motion vectors can be generalized as follows: In response to determining that a current block is predicted using first motion vector(s) (e.g., more than one motion vector) including the first motion vector, scaled first motion vector(s) are obtained by scaling the first motion vector(s) to point to a target reference frame based on temporal distance. The scaled first motion vector(s) are then averaged to obtain a first normalized motion vector. Furthermore, in response to determining that a neighboring block is predicted using second motion vector(s) (e.g., more than one motion vector) including the second motion vector, scaled second motion vector(s) are obtained by scaling the second motion vector(s) to point to the target reference frame based on temporal distance. The scaled second motion vector(s) are then averaged to obtain a first normalized motion vector. A motion vector differential is then obtained based on 1) one of the first normalized motion vector (if calculated) or the first motion vector (if the first normalized motion vector is not calculated), and 2) one of the second normalized motion vector (if calculated) or the second motion vector (if the second normalized motion vector is not calculated).

[0120] Therefore, the motion vector threshold can be directly based on (e.g., compared to) the normalized motion vector. Illustratively, the normalized motion vectors of the bottom neighboring block and the current block are MV n_Band MV n_C It may be. |MV n_B -MV n_B If |> threshold (ie, motion vector threshold), overlap prediction from the bottom neighboring block is not applied.

[0121] Next, we will explain scaling the motion vector. Let the current block be a block in the current frame with time index C0, and let the motion vector (MV x ,MV y Let C0 and R1 denote a reference frame with time index R1, and let the motion vector be scaled to a target reference frame with time index R2. Furthermore, let the distance between C0 and R1 be b (i.e., b = |C0 - R1|) and the distance between C0 and R2 be d (i.e., d = |C0 - R2|). Therefore, the scaled motion (MV x,スケーリングされた ,MV y,スケーリングされた ) is a music video x,スケーリングされた =b / dMV x , and M.V. y,スケーリングされた =b / dMV y can be obtained using

[0122] In another example, the decision to use the overlap prediction mode using the second reference frame and the second motion vector of the neighboring block to obtain the second prediction block for at least a portion of the current block is based on the decision that the reference samples required for interpolation are available. Therefore, if the reference samples required for interpolation are not available, the overlap prediction mode is not performed on the current block.

[0123] As illustrated, if the second motion vector includes a fractional part (i.e., it refers to a sub-pixel position), the sub-pixel value is obtained by interpolation using an interpolation filter. Assuming that the interpolation filter has T taps and the current block is of size M×N, a reference block larger than M×N is required to generate the second prediction block. The reference block size should have a size of (M+T−1)×(N+T−1). The block in the upper left corner of the reference block is located at position (MV x -(T / 2-1),MV y -(T / 2-1)) and (MVx,MV y ) is the second motion vector of the reference block. Thus, in other words, the decision to obtain the second prediction block is made in response to determining that reference samples of a reference sample block having a size of (M+T-1)×(N+T-1) are available.

[0124] In the example, the decision to obtain each second prediction block for a different boundary of the current block may be made in parallel. In other words, the decision regarding whether overlapped prediction needs to be applied to different boundaries may be generated in parallel. In this situation, the first prediction block obtained in 1110 may be the first prediction block of a parent block that includes the current block. The parent block is a block of which the current block is a subblock. More specifically, the first prediction block may be a portion of the prediction block of the parent block, and this portion corresponds to the current block (e.g., is coextensive with the current block). The prediction block of the parent block is referred to herein as the "original prediction block."

[0125] 7, for convenience, the original prediction of parent block 735 (or equivalently, the original reference sample used to obtain the original prediction) may be referred to as P735. In the case of a boundary between parent block 735 and neighboring block 724 (i.e., for a sub-block along the boundary), the prediction sample (or its reference sample) can be checked together with the motion vectors of neighboring block 724 and P735 as described herein, and in the case of a boundary between neighboring block 721 and parent block 735, the prediction sample (or reference sample) is checked together with the motion vectors of neighboring block 721 and P735 as described herein. Because P735 is used for each of the boundaries, overlap prediction decisions for different boundaries (i.e., positions where overlap prediction is performed for sub-blocks along different boundaries) may be made in parallel. If parent block 735 is bi-predicted, either the result of bi-prediction or the average of the two reference sample blocks used for bi-prediction may be used.

[0126] Thus, technique 1100 can determine whether to perform overlap prediction mode for a second boundary of the parent block in parallel with determining whether to obtain a second predicted block for at least a portion of the current block using overlap prediction mode, where the second boundary is different from the first boundary. In an example, the decision to perform overlap prediction can be performed in parallel for each boundary of the parent block as a whole.

[0127] At 1130, a second predicted block is obtained using overlapped prediction mode. At 1140, the first predicted block and the second predicted block are combined. Combining the first predicted block and the second predicted block may mean including the first predicted block and the second prediction in one or more calculations that result in obtaining a final predicted block for the current block.

[0128] 12 is a flowchart diagram of another technique 1200 for coding a current block of a video frame using overlap prediction. Technique 1100 may be implemented as a software program that may be executed by a computing device, such as one or more of computing and communication devices 100A / 100B / 100C of FIG. 2. The software program may be stored in a memory, such as memory 150 of FIG. 1, and may include machine-readable instructions that, when executed by a processor, such as processor 140 of FIG. 1, cause the computing device to perform technique 1200. Technique 1200 may be performed in whole or in part by intra / inter prediction unit 540 of decoder 500 of FIG. 5. Technique 1100 may be performed in whole or in part by intra / inter prediction unit 410 of encoder 400 of FIG. 4. Technique 1200 may be performed using dedicated hardware or firmware. Multiple processors, memories, or both may be used.

[0129] Technique 1200 determines whether to apply overlap prediction from a particular neighboring block based on a prediction difference between a predicted sample of a current block based on motion information (e.g., motion vector(s)) of the particular neighboring block and a prediction of the current block. In an example, the prediction difference may be a sum of absolute differences (SAD). In another example, the prediction difference may be a sum of squared error (SSE). However, as described further herein, other measures of the prediction difference are possible.

[0130] At 1210, a first prediction block of the current block is obtained based on motion information associated with the current block. The motion information associated with the first block may include one or more motion vectors and one or more respective reference frames. At 1220, a second prediction block for at least a portion of the current block is obtained based on motion information associated with neighboring blocks. The motion information associated with the neighboring blocks may include one or more motion vectors and one or more respective reference frames.

[0131] At 1230, a prediction difference measure between the first predicted block and the second predicted block is determined. The prediction difference measure is calculated as a function of pairwise differences between values ​​of the first predicted block and values ​​of the second predicted block. As previously mentioned, the prediction difference measure can be SAD, SSE, or some other measure.

[0132] In one example, the prediction difference measure can be the absolute maximum of the pairwise differences between the first and second predicted blocks. In another example, the prediction difference measure can be obtained as the absolute difference between the maximum absolute difference and the mean absolute difference. The maximum absolute difference is the absolute maximum of the pairwise differences between the first and second predicted blocks, and the mean absolute difference is the average value of the pairwise differences between the first and second predicted blocks. In another example, the prediction difference measure is calculated based on the ratio of the maximum absolute difference to the mean absolute difference.

[0133] At 1240, a determination is made whether to combine the first predicted block with a second predicted block of a portion of the current block based on the prediction difference measure. In an example, if the prediction difference measure is above a threshold, the second predicted block is not included in the overlap prediction of the current block. In an example, this may be signaled (e.g., encoded) in an SPS, PPS, slice header, block header, or some other header. In an example, to simplify hardware implementation of technique 1200, the threshold may be a power of two (e.g., 2 7 = 128). In an example, the threshold may be adjusted or scaled based on the encoding / decoding bit depth. As an example, assuming a base threshold T (e.g., T = 128) and a bit depth of d bits per pixel (e.g., d = 10 bits), the threshold may be set to 2 (d-8) T. In an example, the base threshold can be signaled.

[0134] As described with respect to technique 1100, in some examples, technique 1200 is determined to be performed with respect to a neighboring block when a particular condition applies (i.e., is satisfied). In an example, the second predicted block is obtained in response to determining that a motion vector difference between a first motion vector of a current block and a second motion vector of a neighboring block is less than a motion vector threshold. In an example, the second predicted block is obtained in response to determining that a first reference frame(s) used to predict the current block are at least partially the same as a second reference frame(s) used to predict the same neighboring block. In an example, the second predicted block is obtained in response to determining that the current block is a block of a P frame or a P slice, that the current block and the neighboring block use the same reference frame, and that the respective absolute motion vector difference between the motion vector of the current block and the motion vector of the neighboring block is less than a motion vector threshold. In another example, a conforming bitstream constraint can be applied to disallow overlapped prediction in a P slice.

[0135] For ease of explanation, techniques 600, 1100, and 1200 in Figures 6, 11, and 12, respectively, are shown and described as a series of steps. However, steps in accordance with the present disclosure may be performed in various orders, in parallel, and / or iteratively. Furthermore, steps in accordance with the present disclosure may be performed with other steps not presented or described herein. Furthermore, not all illustrated steps are required to implement the techniques in accordance with the presently disclosed subject matter.

[0136] The word "example" or "exemplary" is used herein to mean serving as an example, instance, or illustration. Any aspect or design described herein as "example" or "exemplary" should not necessarily be construed as preferred or advantageous over other aspects or designs. Rather, use of the word "example" or "exemplary" is intended to present concepts in a concrete manner. As used in this application, the term "or" is intended to mean an inclusive "or" rather than an exclusive "or." That is, unless otherwise specified or clear from the context, "X includes A or B" is intended to mean any of the natural inclusive permutations. That is, if X includes A, if X includes B, or if X includes both A and B, then "X includes A or B" is satisfied in each of the foregoing cases. Furthermore, the articles "a" and "an," as used in this application and the appended claims, should generally be construed to mean "one or more" unless otherwise specified or clear from the context to refer to the singular form. Additionally, use of the terms "an embodiment" or "one embodiment" or "an implementation" or "one implementation" throughout does not refer to the same embodiment or implementation unless so described. As used herein, the terms "determine" and "identify," or any variations thereof, include selecting, ascertaining, calculating, retrieving, receiving, determining, establishing, obtaining, or otherwise identifying or determining in any manner using one or more devices shown in FIG.

[0137] One or more implementations of a computing and communication device, e.g., computing and communication device 100A / 100B / 100C (and the algorithms, techniques, methods, instructions, etc. stored therein and / or executed by it) can be implemented in hardware, software, or any combination thereof. Hardware can include, for example, a computer, intellectual property (IP) core, application-specific integrated circuit (ASIC), programmable logic array, optical processor, programmable logic controller, microcode, microcontroller, server, microprocessor, digital signal processor, or any other suitable circuitry. In the claims, the term "processor" should be understood to include any of the foregoing hardware, alone or in combination. The terms "signal" and "data" are used interchangeably. Furthermore, parts of computing and communication device 100A / 100B / 100C need not necessarily be implemented in the same way.

[0138] Furthermore, in one embodiment, for example, computing and communication devices may be implemented using computer programs that, when executed, execute any of the respective methods, algorithms, and / or instructions described herein. Additionally or alternatively, special purpose computers / processors may be utilized that may include, for example, specialized hardware for executing any of the methods, algorithms, or instructions described herein.

[0139] The computing and communication devices can be implemented, for example, on a computer in a real-time video system, or one computing and communication device (e.g., computing and communication device 100A) can be implemented on a server, and another computing and communication device (e.g., computing and communication device 100B) can be implemented on a device separate from the server, such as a handheld communication device.

[0140] Furthermore, all or a portion of the embodiments may take the form of a computer program product accessible from, for example, a tangible computer-usable or computer-readable medium. A computer-usable or computer-readable medium is, for example, any device that can tangibly store, store, communicate, or transfer a program for use by or in connection with any processor. Media include, for example, electronic, magnetic, optical, electromagnetic, or semiconductor devices. Other suitable media may also be used.

[0141] The above embodiments are set forth to facilitate understanding of the present application and are not intended to be limiting. Rather, the present application covers various modifications and equivalent arrangements included within the scope of the appended claims, which scope is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures as permitted by law.

Claims

1. 1. A method for coding a current block of a current frame, comprising: obtaining a first prediction block of the current block based on motion information associated with the first prediction block; obtaining a second prediction block for at least a portion of the current block based on motion information associated with neighboring blocks; obtaining a prediction difference measure between the first predicted block and the second predicted block; determining whether to combine the first predicted block with the second predicted block of the portion of the current block based on the prediction difference measure; A method comprising:

2. 2. The method of claim 1, wherein determining whether to combine the first predictive block and the second predictive block of the portion of the current block based on the prediction difference measure comprises determining not to combine the first predictive block and the second predictive block in response to the prediction difference measure exceeding a threshold.

3. The method of claim 2 , wherein the threshold is a power of two.

4. The method of any one of claims 1 to 3, wherein the prediction difference measure is the sum of absolute differences (SAD) between the first predicted block and the second predicted block.

5. The method of any one of claims 1 to 3, wherein the prediction difference measure is the sum of squared errors (SSE) between the first predicted block and the second predicted block.

6. The method of any one of claims 1 to 3, wherein the prediction difference measure is the absolute maximum of pairwise differences between the first predicted block and the second predicted block.

7. the predicted difference measure is calculated based on at least one of a maximum absolute difference or a mean absolute difference; the maximum absolute difference is the absolute maximum of pairwise differences between the first predicted block and the second predicted block; The method of any one of claims 1 to 6, wherein the mean absolute difference is the average value of the pairwise differences.

8. The method of claim 7 , wherein the predicted difference measure is calculated as the absolute difference between the maximum absolute difference and the mean absolute difference.

9. The method of claim 7 , wherein the predicted difference measure is calculated based on a ratio of the maximum absolute difference to the mean absolute difference.

10. 10. The method of claim 1, further comprising: determining to obtain the second prediction block in response to determining that a motion vector difference between a first motion vector of the current block and a second motion vector of the neighboring block is less than a motion vector threshold.

11. 10. The method of claim 1, further comprising: determining to obtain the second predicted block in response to determining that a first reference frame(s) used to predict the current block are at least partially the same as a second reference frame(s) used to predict the neighboring block(s) being the same.

12. 10. The method of claim 1, further comprising: determining to obtain the second prediction block in response to determining that the current block is a block of a P frame or a P slice, that the current block and the neighboring block use the same reference frame, and that each absolute motion vector difference between the motion vector of the current block and the motion vector of the neighboring block is below a motion vector threshold.

13. 1. A method for coding a current block of a current frame, the method comprising: Obtaining a first prediction block of the current block based on a first reference frame and a first motion vector; and determining, based at least in part on information about a neighboring block of the current block, to obtain a second prediction block for at least a portion of the current block using an overlapped prediction mode that uses a second reference frame and a second motion vector of the neighboring block, wherein the second motion vector of the neighboring block is obtained by rounding a motion vector used to predict the neighboring block to an integer pixel position, the method further comprising: obtaining the second prediction block using the overlapped prediction mode; and combining the first predicted block and the second predicted block; A method comprising:

14. Determining, based at least in part on the information about the neighboring blocks of the current block, to obtain the second prediction block of the portion of the current block using the overlapped prediction mode includes: The method of claim 13 , comprising determining that a motion vector difference between the first motion vector and the second motion vector is less than a motion vector threshold.

15. decoding a one-frame distance motion vector threshold from the compressed bitstream; calculating the motion vector threshold based on the one-frame distance motion vector threshold and a frame difference between the first reference frame and the second reference frame; 15. The method of claim 14, further comprising:

16. The method of claim 14 , wherein the motion vector threshold is proportional to the temporal distance between the first reference frame and the second reference frame.

17. In response to determining that the first reference frame is different from the second reference frame, a difference between the first motion vector and the second motion vector is calculated as: In response to determining that the current block is predicted using first motion vector(s), including the first motion vector, obtaining scaled first motion vector(s) by scaling the first motion vector(s) to point to a target reference frame based on a temporal distance; averaging the scaled first motion vector(s) to obtain a first normalized motion vector; In response to determining that the neighboring block is predicted using second motion vector(s), including the second motion vector, obtaining scaled second motion vector(s) by scaling the second motion vector(s) to point to the target reference frame; averaging the scaled second motion vector(s) to obtain a second normalized motion vector; Calculating the motion vector differential based on 1) the first normalized motion vector or one of the first motion vectors, and 2) the second normalized motion vector or one of the second motion vectors; The method of claim 14 further comprising calculating by:

18. Determining, based at least in part on the information about the neighboring blocks of the current block, to obtain the second prediction block of the portion of the current block using the overlapped prediction mode includes:

18. The method of any one of claims 13 to 17, comprising determining that first reference frame(s) used to predict the current block are at least partially the same as second reference frame(s) used to predict the neighboring blocks to be the same, wherein the first reference frame(s) comprise the first reference frame and the second reference frame(s) comprise the second reference frame, and the first reference frame is the same as the second reference frame.

19. Determining, based at least in part on the information about the neighboring blocks of the current block, to obtain the second prediction block of the portion of the current block using the overlapped prediction mode includes:

18. The method of any one of claims 13 to 17, comprising determining that reference samples used to obtain the second prediction block are available using a sub-pixel interpolation filter.

20. Determining, based at least in part on the information about the neighboring blocks of the current block, to obtain the second prediction block of the portion of the current block using the overlapped prediction mode includes:

18. The method of claim 13, comprising determining that the current block is a block of a P frame or a P slice, that the current block and the neighboring blocks use the same reference frame, and that each absolute motion vector difference between the motion vector of the current block and the motion vector of the neighboring block is below a motion vector threshold.

21. 21. The method of claim 13, wherein the motion vectors used to predict the neighboring blocks are rounded using at least one of round towards positive infinity, round towards negative infinity, or round towards zero.

22. 22. The method of claim 21, wherein a component of the motion vector is rounded towards positive infinity if the component is positive and towards negative infinity if the component is negative.

23. The current block is along a first boundary of a parent block, and the method further comprises:

23. The method of claim 13, further comprising: determining whether to perform the overlapped prediction mode on a second boundary of the parent block in parallel with determining whether to obtain the second predicted block for the at least part of the current block using the overlapped prediction mode, the second boundary being different from the first boundary.

24. A device comprising a processor configured to perform the method of any one of claims 1 to 12.

25. Memory and a processor; 13. A device comprising: a processor configured to execute instructions stored in the memory to perform a method according to any one of claims 1 to 12.

26. A non-transitory computer-readable storage medium comprising executable instructions that, when executed by a processor, facilitate the performance of operations, including operations for performing the method of any one of claims 1 to 12.

27. 13. A non-transitory computer readable storage medium storing an encoded bitstream, the encoded bitstream being configured to be decoded by a method according to any one of claims 1 to 12.

28. 13. A non-transitory computer-readable storage medium storing an encoded bitstream, the encoded bitstream being generated by an encoder that performs the method of any one of claims 1 to 12.

29. A device comprising a processor configured to perform the method of any one of claims 13 to 23.

30. Memory and A device comprising: a processor, said processor configured to execute instructions stored in said memory to perform a method according to any one of claims 13 to 23.

31. A non-transitory computer-readable storage medium comprising executable instructions that, when executed by a processor, facilitate the performance of operations, including operations for performing the method of any one of claims 13 to 23.

32. 24. A non-transitory computer readable storage medium storing an encoded bitstream, the encoded bitstream being configured to be decoded by a method according to any one of claims 13 to 23.

33. 24. A non-transitory computer-readable storage medium storing an encoded bitstream, the encoded bitstream being generated by an encoder that performs the method of any one of claims 13-14 or 16-23.