Method for video coding and an apparatus
Abstract
A method and apparatus are provided for encoding and decoding image information. The encoding comprises receiving a block of pixels; creating a set of motion vector prediction candidates for the block of pixels; and examining the set to determine if a motion vector prediction candidate is a temporal motion vector prediction, or a spatial motion vector prediction. If the motion vector prediction candidate is a temporal motion vector prediction, the motion vector prediction candidate is kept in the set. If the motion vector prediction candidate is a spatial motion vector prediction, it is examined whether the set comprises a motion vector prediction candidate corresponding with the spatial motion vector prediction; and if so, the motion vector prediction candidate is removed from the set. Once the set is created, one of the candidates from the set is selected to represent a motion vector prediction for the block of pixels.
Claims
exact text as granted — not AI-modified1 . A method for encoding an image, the method comprising:
creating a set of motion vector prediction candidates for a block of pixels, said creating the set comprising:
if a motion vector prediction candidate is based on a spatial motion vector prediction, comparing the motion vector prediction candidate to at least one spatial motion vector already included in the set, and adding the motion vector prediction candidate to the set when the motion vector prediction candidate is not equal to the at least one spatial motion vector already included in the set; and
if the motion vector prediction candidate is a temporal motion vector prediction, adding the motion vector prediction candidate to the set without comparing the motion vector prediction candidate with other motion vector prediction candidates already included in the set; and
selecting one motion vector prediction candidate from the set to represent a motion vector prediction for the block of pixels.
2 . The method according to claim 1 , wherein said comparing comprises at least one of the following:
comparing a reference index of the motion vector prediction candidate with a reference index of the at least one spatial motion vector already included in the set; and examining whether the motion vector prediction candidate is generated by processing one or more than one motion vector prediction candidates or not.
3 . The method according to claim 1 , further comprising:
creating an additional motion vector prediction candidate based on one or more previously added motion vector predictors in the set.
4 . The method according to claim 1 , wherein each motion vector prediction candidate is associated with an index in the set, and if a motion vector prediction candidate is determined to be removed due to motion vector information corresponding with another motion vector prediction candidate, the method further comprising:
examining the index of the motion vector prediction candidate and the index of the another motion vector prediction candidate, and removing the motion vector prediction candidate which has greater index.
5 . The method according to claim 1 , wherein the temporal motion vector prediction is based on motion vectors of co-located blocks of a current frame and a previously encoded frame.
6 . A method for decoding an encoded image, the method comprising:
creating a set of motion vector prediction candidates for a block of pixels, said creating the set comprising:
if a motion vector prediction candidate is based on a spatial motion vector prediction, comparing the motion vector prediction candidate to at least one spatial motion vector already included in the set, and adding the motion vector prediction candidate to the set when the motion vector prediction candidate is not equal to the at least one spatial motion vector already included in the set; and
if the motion vector prediction candidate is a temporal motion vector prediction, adding the motion vector prediction candidate to the set without comparing the motion vector prediction candidate with other motion vector prediction candidates already included in the set; and
selecting one motion vector prediction candidate from the set to represent a motion vector prediction for the block of pixels.
7 . The method according to claim 6 , wherein said comparing comprises at least one of the following:
comparing a reference index of the motion vector prediction candidate with a reference index of the at least one spatial motion vector already included in the set; and examining whether the motion vector prediction candidate is generated by processing one or more than one motion vector prediction candidates or not.
8 . The method according to claim 6 , further comprising:
creating an additional motion vector prediction candidate based on one or more previously added motion vector predictors in the set.
9 . The method according to claim 6 , wherein each motion vector prediction candidate is associated with an index in the set, and if a motion vector prediction candidate is determined to be removed due to motion vector information corresponding with another motion vector prediction candidate, the method further comprising:
examining the index of the motion vector prediction candidate and the index of the another motion vector prediction candidate, and removing the motion vector prediction candidate which has greater index.
10 . The method according to claim 6 , wherein the temporal motion vector prediction is based on motion vectors of co-located blocks of a current frame and a previously encoded frame.
11 . An apparatus embodied by a codec for encoding an image, the apparatus comprising:
a processor and a memory including computer program code, the memory and the computer program code configured to, with the processor, cause the apparatus to: create a set of motion vector prediction candidates for a block of pixels, wherein the memory and the computer program code configured to, with the processor, create the set cause the apparatus to:
if a motion vector prediction candidate is based on a spatial motion vector prediction, compare the motion vector prediction candidate to at least one spatial motion vector already included in the set, and add the motion vector prediction candidate to the set when the motion vector prediction candidate is not equal to the at least one spatial motion vector already included in the set; and
if the motion vector prediction candidate is a temporal motion vector prediction, add the motion vector prediction candidate to the set without comparing the motion vector prediction candidate with other motion vector prediction candidates already included in the set; and
select one motion vector prediction candidate from the set to represent a motion vector prediction for the block of pixels.
12 . The apparatus according to claim 11 , wherein the temporal motion vector prediction is at least partly based on one or more encoded blocks in a frame different from the frame of the block of pixels and the spatial motion vector prediction is only based on one or more encoded blocks in the same frame as the frame of the block of pixels.
13 . The apparatus according to claim 11 , wherein the computer program code to compare the motion vector prediction candidate to at least one spatial motion vector already included in the set cause apparatus to perform at least one of the following:
compare a reference index of the motion vector prediction candidate with a reference index of the at least one spatial motion vector already included in the set; and examine whether the motion vector prediction candidate is generated by processing one or more than one motion vector prediction candidates or not.
14 . The apparatus according to claim 11 , comprising further computer program code configured to, with the processor, cause the apparatus to create an additional motion vector prediction candidate based on one or more previously added motion vector predictors in the set.
15 . The apparatus according to claim 11 , wherein each motion vector prediction candidate is associated with an index in the set, and if a motion vector prediction candidate is determined to be removed due to motion vector information corresponding with another motion vector prediction candidate, the apparatus further comprises computer program code configured to, with the processor, cause the apparatus to
examine the index of the motion vector prediction candidate and the index of the another motion vector prediction candidate, and remove the motion vector prediction candidate which has greater index.
16 . The apparatus according to claim 11 , wherein the temporal motion vector prediction is based on motion vectors of co-located blocks of a current frame and a previously encoded frame.
17 . An apparatus embodied by a codec for decoding an encoded image, the apparatus comprising:
a processor and a memory including computer program code, the memory and the computer program code configured to, with the processor, cause the apparatus to:
create a set of motion vector prediction candidates for an encoded block of pixels, wherein the memory and the computer program code configured to, with the processor, create the set cause the apparatus to:
if a motion vector prediction candidate is based on a spatial motion vector prediction, compare the motion vector prediction candidate to at least one spatial motion vector already included in the set, and add the motion vector prediction candidate to the set when the motion vector prediction candidate is not equal to the at least one spatial motion vector already included in the set; and
if the motion vector prediction candidate is a temporal motion vector prediction, add the motion vector prediction candidate to the set without comparing the motion vector prediction candidate with other motion vector prediction candidates already included in the set; and
select one motion vector prediction candidate from the set to represent a motion vector prediction for the block of pixels.
18 . The apparatus according to claim 17 , wherein the temporal motion vector prediction is at least partly based on one or more encoded blocks in a frame different from the frame of the block of pixels and the spatial motion vector prediction is only based on one or more encoded blocks in the same frame as the frame of the block of pixels.
19 . The apparatus according to claim 17 , wherein the computer program code to compare the motion vector prediction candidate to at least one spatial motion vector already included in the set cause apparatus to perform at least one of the following:
compare a reference index of the motion vector prediction candidate with a reference index of the at least one spatial motion vector already included in the set; and examine whether the motion vector prediction candidate is generated by processing one or more than one motion vector prediction candidates or not.
20 . The apparatus according to claim 17 , comprising further computer program code configured to, with the processor, cause the apparatus to create an additional motion vector prediction candidate based on one or more previously added motion vector predictors in the set.
21 . The apparatus according to claim 17 , wherein each motion vector prediction candidate is associated with an index in the set, and if a motion vector prediction candidate is determined to be removed due to motion vector information corresponding with another motion vector prediction candidate, the apparatus further comprises computer program code configured to, with the processor, cause the apparatus to
examine the index of the motion vector prediction candidate and the index of the another motion vector prediction candidate, and remove the motion vector prediction candidate which has greater index.
22 . The apparatus according to claim 17 , wherein the temporal motion vector prediction is based on motion vectors of co-located blocks of a current frame and a previously encoded frame.
23 . A non-transitory machine-readable medium having instructions stored therein, which when executed by a processor of a codec, cause the processor to perform a method for decoding an encoded image, the method comprising:
creating a set of motion vector prediction candidates for a block of pixels, said creating the set comprising:
if a motion vector prediction candidate is based on a spatial motion vector prediction, comparing the motion vector prediction candidate to at least one spatial motion vector already included in the set, and adding the motion vector prediction candidate to the set when the motion vector prediction candidate is not equal to the at least one spatial motion vector already included in the set; and
if the motion vector prediction candidate is a temporal motion vector prediction, adding the motion vector prediction candidate to the set without comparing the motion vector prediction candidate with other motion vector prediction candidates already included in the set; and
selecting one motion vector prediction candidate from the set to represent a motion vector prediction for the block of pixels.
24 . The non-transitory machine-readable medium according to claim 23 , wherein said comparing comprises at least one of the following:
comparing a reference index of the motion vector prediction candidate with a reference index of the at least one spatial motion vector already included in the set; and examining whether the motion vector prediction candidate is generated by processing one or more than one motion vector prediction candidates or not.
25 . The non-transitory machine-readable medium according to claim 23 , wherein the temporal motion vector prediction is based on motion vectors of co-located blocks of a current frame and a previously encoded frame.Join the waitlist — get patent alerts
Track US2021409756A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.