IP Library Granted Patent US 12701242
Granted Patent B2
US 12701242 · App. 18/586,260 · Granted Aug 4, 2026

Method, apparatus, and medium for video processing

Inventors: Na Zhang (Beijing, CN); Kai Zhang (Los Angeles, CA); Li Zhang (Los Angeles, CA); Jizheng Xu (Los Angeles, CA)
Assignees: BEIJING BYTEDANCE NETWORK TECHNOLOGY CO., LTD.; BYTEDANCE INC.
H04N19/176H04N19/139H04N19/159H04N19/186
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12701242
App. No.
18/586,260
Granted
Aug 4, 2026
Kind
B2
Abstract

Embodiments of the present disclosure provide a solution for video processing. A method for video processing is proposed. The method comprises: determining, during a conversion between a target video block of a video and a bitstream of the video, whether a block vector (BV) candidate of the target video block is valid; and in accordance with a determination that the BV candidate is valid, performing the conversion based on the BV candidate.

Claims (110)

1 . A method for video processing, comprising:

obtaining, during a conversion between a target video block of a video and a bitstream of the video, at least one block vector (BV) candidate of the target video block based on a non-adjacent block of the target video block;

determining whether the at least one BV candidate is valid;

in accordance with a determination that the at least one BV candidate is valid, performing the conversion based on the at least one BV candidate; and

in accordance with a determination that a first BV candidate of the at least one BV candidate is invalid,

generating a virtual BV candidate by one of: adding an offset to the first BV candidate, or clipping the first BV candidate;

updating the at least one BV candidate by removing the first BV candidate and adding the virtual BV candidate; and

performing the conversion based on the at least one updated BV candidate.

2 . The method of claim 1 , further comprising:

if the at least one BV candidate is valid, adding the at least one BV candidate into an intra block copy (IBC) candidate list,

wherein the IBC candidate list comprises at least one of the following:

an IBC merge candidate list,

an IBC advanced motion vector prediction (AMVP) candidate list,

an IBC template matching candidate list, or

an intra template matching candidate list.

3 . The method of claim 1 , wherein the at least one BV candidate is obtained further based on at least one of:

a spatial neighboring block,

a temporal neighboring block,

a history-based motion vector prediction (HMVP),

a pairwise candidate,

a spatial temporal motion vector prediction (STMVP), or

a subblock-based temporal block vector prediction (SbTBVP).

4 . The method of claim 1 , further comprising:

determining the non-adjacent block based on a distance between the non-adjacent block and the target video block,

wherein determining the distance comprises at least one of:

determining the distance based on a width and height of the target video block and a multiplication factor; or

determining the distance based on a constant value and a multiplication factor.

5 . The method of claim 4 , wherein the multiplication factor is dependent on a search round index, and the constant value is dependent or independent on at least one of the width or height of the target video block.

6 . The method of claim 1 , further comprising one of:

adding a non-adjacent spatial BV candidate in a BV candidate list of the target video block after a temporal motion vector prediction (TMVP) candidate; or

adding the non-adjacent spatial BV candidate in the BV candidate list after an adjacent spatial candidate and before the TMVP candidate.

7 . The method of claim 1 , comprising:

adjusting a BV candidate list of the target video block, the BV candidate list comprising at least one valid BV candidate; and

performing the conversion based on the adjusted BV candidate list,

wherein adjusting the BV candidate list comprises:

reordering or refining the BV candidate list.

8 . The method of claim 7 , wherein adjusting the BV candidate list comprises:

reordering the BV candidate list based on at least one of the following criteria:

template matching costs of BV candidates in the BV candidate list, or

categories of the BV candidates in the BV candidate list.

9 . The method of claim 8 , further comprising:

determining the template matching costs based on a cost metric between a current template and a reference template,

wherein the cost metric comprises one of the following:

a sum of absolute differences (SAD),

a sum of absolute transformed differences (SATD),

a sum of squared differences (SSD),

a sum of squared errors (SSE),

a mean-removed SAD (MR-SAD),

a mean-removed SATD (MR-SATD),

a mean-removed SSD (MR-SSD),

a mean-removed SSE (MR-SSE),

a weighted SAD,

a weighted MR-SAD,

a weighted SATD,

a weighted MR-SATD,

a weighted SSD,

a weighted MR-SSD,

a weighted SSE,

a weighted MR-SSE, or

gradient information.

10 . The method of claim 9 , wherein:

if luma mapping with chroma scaling (LMCS) is enabled for the target video block, the current template and the reference template comprise samples in a mapped domain, or

wherein the current template and the reference template comprise samples in an original domain.

11 . The method of claim 9 , wherein adjusting the BV candidate list comprises:

if the reference template is outside the current picture, adjusting the reference template by padding the reference template from its nearest samples inside the current picture; and

reordering the BV candidate list based on the adjusted reference template.

12 . The method of claim 9 , wherein the reference template is inside the current picture, or

wherein if the reference template is not reconstructed or outside the current picture, the corresponding BV candidate is not reordered.

13 . The method of claim 8 , wherein reordering the BV candidate list based on template matching costs of BV candidates in the BV candidate list comprises:

reordering BV candidates in a subgroup of the BV candidate list ascendingly according to respective template matching costs of the BV candidates in the subgroup.

14 . The method of claim 8 , wherein determining the template matching costs comprises:

if an above template is available for the target video block, determining the template matching costs based on the above template;

if a left template is available for the target video block, determining the template matching costs based on the left template; or

if the above and left templates are available for the target video block, determining the template matching costs based on at least one of: the above or left template.

15 . The method of claim 7 , further comprising:

determining a decision regarding at least one of the following based on categories of the BV candidates:

whether to adjust the BV candidate list, or

how to adjust the BV candidate list.

16 . The method of claim 7 , further comprising:

determining a first cost for a first BV candidate; and

determining a decision regarding adding the first BV candidate in the BV candidate list based on the first cost; and

based on the determination to add the first BV candidate in the BV candidate list, adding the first BV candidate in the BV candidate list,

wherein determining the decision regarding adding the first BV candidate comprises:

determining the decision based on a comparison between the first cost and a second cost for a second BV candidate.

17 . The method of any of claim 1 , wherein the conversion includes encoding the target video block into the bitstream, or

wherein the conversion includes decoding the target video block from the bitstream.

18 . An apparatus for processing video data comprising a processor and a non-transitory memory with instructions thereon, wherein the instructions upon execution by the processor, cause the processor to:

obtain, during a conversion between a target video block of a video and a bitstream of the video, at least one block vector (BV) candidate of the target video block based on a non-adjacent block of the target video block;

determine whether the at least one BV candidate is valid;

in accordance with a determination that the at least one BV candidate is valid, perform the conversion based on the at least one BV candidate; and

in accordance with a determination that a first BV candidate of the at least one BV candidate is invalid,

generate a virtual BV candidate by one of: adding an offset to the first BV candidate, or clipping the first BV candidate;

update the at least one BV candidate by removing the first BV candidate and adding the virtual BV candidate; and

perform the conversion based on the at least one updated BV candidate.

19 . A non-transitory computer-readable storage medium storing instructions that cause a processor to perform a method performed by a video processing apparatus, wherein the method comprises:

obtaining, during a conversion between a target video block of a video and a bitstream of the video, at least one block vector (BV) candidate of the target video block based on a non-adjacent block of the target video block;

determining whether the at least one BV candidate is valid;

in accordance with a determination that the at least one BV candidate is valid, performing the conversion based on the at least one BV candidate; and

in accordance with a determination that a first BV candidate of the at least one BV candidate is invalid,

generating a virtual BV candidate by one of: adding an offset to the first BV candidate, or clipping the first BV candidate;

updating the at least one BV candidate by removing the first BV candidate and adding the virtual BV candidate; and

performing the conversion based on the at least one updated BV candidate.

20 . A non-transitory computer-readable recording medium storing a bitstream of a video which is generated by a method performed by a video processing apparatus, wherein the method comprises:

obtaining at least one block vector (BV) candidate of a target video block of the video;

determining whether the at least one BV candidate is valid;

in accordance with a determination that the at least one BV candidate is valid, generating the bitstream based on the at least one BV candidate; and

in accordance with a determination that a first BV candidate of the at least one BV candidate is invalid,

generating a virtual BV candidate by one of: adding an offset to the first BV candidate, or clipping the first BV candidate;

updating the at least one BV candidate by removing the first BV candidate and adding the virtual BV candidate; and

generating the bitstream based on the at least one updated BV candidate.