Video frame decoding method and apparatus
AssigneeHuawei Technologies Co., Ltd.
InventorsChangquan Ai, Shaobo Zhang, Haitao Yang
Life of this patent
Estimating the term…
Abstract
A video frame decoding method and apparatus in order to implement efficient and fast video decoding. The method includes acquiring a target time point of a video, obtaining a frame number of a corresponding random access frame according to the target time point, obtaining a frame number of a frame that can be independently decoded, where the dependency set includes at least one dependency, and the dependency represents a correspondence between a frame number of a random access frame and a frame number of a frame that can be independently decoded, and obtaining, according to the frame number of the frame that can be independently decoded, video data of the frame that can be independently decoded, and decoding the random access frame.
Claims20
A video frame decoding method, comprising:
- acquiring a target time point of a video;
- obtaining a frame number of a first frame corresponding to the target time point, wherein the first frame is a random access frame other than an I frame, and wherein the video comprises video index information comprising:
- a first correspondence between a time point of the video and a plurality of first frame numbers of each frame of the video;
- a plurality of second frame numbers of all random access frames in the video;
- and
- a second correspondence between a frame number of a common frame of the video and the frame number of the first frame, and wherein obtaining the frame number of the first frame comprises:
- obtaining any frame number that corresponds to the target time point based on the first correspondence;
- determining that the frame number of the first frame corresponds to the target time point when the any frame number that corresponds to the target time point is found in the second frame numbers;
- determining that the any frame number that corresponds to the target time point is the frame number of the common frame when the any frame number that corresponds to the target time point is not found in the second frame numbers;
- and
- obtaining the frame number of the first frame that corresponds to the target time point based on the second correspondence when the frame number of the first frame that corresponds to the target time point is not found in the second frame numbers;
- obtaining a frame number of a second frame based on a prestored dependency set and the frame number of the first frame, wherein decoding of the first frame depends on the second frame, wherein the second frame is configured to be decoded without depending on another frame, wherein the prestored dependency set comprises a quantity of dependencies in the video, and wherein at least one of the dependencies represents a third correspondence between the frame number of the first frame and the frame number of the second frame
- obtaining video data of the second frame based on the frame number of the second frame;
- and
- decoding the first frame based on the video data of the second frame.
A video frame decoding apparatus, comprising:
- a processor;
- and
- a non-transitory computer-readable storage medium coupled to the processor and storing programming instructions, wherein the programming instructions instruct the processor to:
- acquire a target time point of a video;
- obtain a frame number of a first frame corresponding to the target time point, wherein the first frame is a random access frame other than an I frame, and wherein the video comprises video index information comprising:
- a first correspondence between a time point of the video and a plurality of first frame numbers of each frame of the video;
- a plurality of second frame numbers of all random access frames in the video;
- and
- a second correspondence between a frame number of a common frame of the video and the frame number of the first frame, and wherein obtaining the frame number of the first frame comprises:
- obtaining any frame number that corresponds to the target time point based on the first correspondence;
- determining that the frame number of the first frame corresponds to the target time point when the any frame number that corresponds to the target time point is found in the second frame numbers;
- determining that the any frame number is the frame number that corresponds to the target time point is the frame number of the common frame when the any frame number that corresponds to the target time point is not found in the second frame numbers;
- and
- obtaining the frame number of the first frame that corresponds to the target time point based on the second correspondence when the frame number of the first frame that corresponds to the target time point is not found in the second frame numbers of all the random access frames;
- obtain a frame number of a second frame based on a prestored dependency set and the frame number of the first frame, wherein decoding of the first frame depends on the second frame, wherein the second frame is configured to be decoded without depending on another frame, wherein the prestored dependency set comprises a quantity of dependencies in the video, wherein at least one of the dependencies represents a third correspondence between the frame number of the first frame and the frame number of the second frame, and wherein the third correspondence represents that decoding of the first frame depends on the second frame;
- obtain video data of the second frame based on the frame number of the second frame;
- and
- decode the first frame based on the video data of the second frame.
A video frame decoding apparatus, comprising:
- a processor;
- and
- a non-transitory computer-readable storage medium coupled to the processor and storing programming instructions by the processor, wherein the programming instructions instruct the processor to:
- acquire a target time point of a video;
- query a first box based on the target time point to acquire a first frame number corresponding to the target time point, wherein the first box is a time-to-sample (stts) box, and wherein the video comprises video index information comprising:
- a first correspondence between a time point of the video and a plurality of first frame numbers of each frame of the video;
- a plurality of second frame numbers of all random access frames in the video, and
- a second correspondence between a frame number of a common frame of the video and the first frame number, wherein querying the first box to acquire the first frame number comprises:
- obtaining any frame number that corresponds to the target time point based on the first correspondence;
- determining that the first frame number is the frame number that corresponds to the target time point when the any frame number that corresponds to the target time point is found in the second frame numbers;
- determining that the any frame number that corresponds to the target time point is the frame number of the common frame when the any frame number that corresponds to the target time point is not found in the second frame numbers;
- and
- obtaining the first frame number that corresponds to the target time point based on the second correspondence when the first frame number that corresponds to the target time point is not found in the frame numbers of all the random access frames;
- search a second box for a second frame number of a first frame of the video corresponding to the first frame number, wherein decoding of the first frame depends on a second frame configured to be decoded without depending on another frame, wherein the first frame is a random access frame other than an I-frame, and wherein the second box is a sync sample (stss) box;
- obtain, by searching a third box distinct from the first and second boxes based on the second frame number of the first frame, a third frame number of the second frame, wherein the third box stores a prestored dependency set that comprises:
- a quantity of dependencies in the video;
- a first quantity of random access frames in each of the dependencies;
- and
- a second quantity of frames in each of the dependencies;
- obtain, based on the third frame number of the second frame, video data of the second frame;
- and
- decode the first frame based on the video data of the second frame.
Dependencies are inferred from the claim text.