Enhanced skip frame encoding associated with a hierarchical prediction pattern
In some implementations, a device may encode a series of images of video data into an encoded video stream including key frames and delta frames. The delta frames may be arranged according to a hierarchical prediction pattern with multiple temporal layers and a predetermined structure. The device may obtain an instruction to encode a delta frame as a skip frame. The device may determine that the skip frame is to be encoded in a first temporal layer, of the multiple temporal layers, according to the predetermined structure. The device may evaluate whether an immediately preceding frame to the skip frame is encoded, or to be encoded, in a second temporal layer, of the multiple temporal layers, that is finer than the first temporal layer. The device may perform an action based on the evaluation.
1 . A video encoding method, comprising:
encoding a series of images of video data into an encoded video stream including key frames and delta frames,
wherein the delta frames are arranged according to a hierarchical prediction pattern with multiple temporal layers and a predetermined structure, and
wherein the hierarchical prediction pattern defines a display order for the key frames and delta frames;
obtaining an instruction to encode a delta frame as a skip frame to lower a bit rate of the encoded video stream and maintain a frames per second (FPS) value of the encoded video stream;
determining that the skip frame is to be encoded in a first temporal layer, of the multiple temporal layers, according to the predetermined structure;
evaluating, based on the display order, whether an immediately preceding frame to the skip frame is encoded, or to be encoded, in a second temporal layer, of the multiple temporal layers, that is finer than the first temporal layer;
based on the second temporal layer being finer than the first temporal layer,
modifying the predetermined structure by encoding the immediately preceding frame as a new delta frame in the first temporal layer, and
encoding the skip frame with reference to the new delta frame in the first temporal layer; and
based on the second temporal layer not being finer than the first temporal layer,
encoding the skip frame with reference to the immediately preceding frame.
2 . The video encoding method of claim 1 , wherein the instruction is associated with a decoding requirement of maintaining a fixed frame display interval.
3 . The video encoding method of claim 1 , wherein the predetermined structure is a group of pictures (GOP) structure that utilizes at least one of:
a dyadic prediction structure,
a non-dyadic prediction structure, or
a hierarchical prediction structure with a zero encoder/decoder delay.
4 . The video encoding method of claim 1 , wherein the delta frame encoded as the skip frame is at least one of:
a predictive frame (P-frame), or
a bi-predictive frame (B-frame).
5 . The video encoding method of claim 1 , wherein the immediately preceding frame is at least one of:
a predictive frame (P-frame), or
a bi-predictive frame (B-frame).
6 . The video encoding method of claim 1 , wherein the new delta frame references at least one of:
a preceding key frame, or
a preceding delta frame.
7 . The video encoding method of claim 1 , wherein the instruction is associated with at least one of:
an available bandwidth,
a network condition,
an available storage capacity,
a resource constraint, or
motion detection condition.
8 . A device, comprising:
one or more memories; and
one or more processors, communicably coupled to the one or more memories, configured to:
encode a series of images of video data into an encoded video stream including key frames and delta frames,
wherein the delta frames are arranged according to a hierarchical prediction pattern with multiple temporal layers and a predetermined structure, and
wherein the hierarchical prediction pattern defines a display order for the key frames and delta frames;
obtain an instruction to encode a delta frame as a skip frame to lower a bit rate of the encoded video stream and maintain a frames per second (FPS) value of the encoded video stream;
determine that the skip frame is to be encoded in a first temporal layer, of the multiple temporal layers, according to the predetermined structure;
evaluate, based on the display order, whether an immediately preceding frame to the skip frame is encoded, or to be encoded, in a second temporal layer, of the multiple temporal layers, that is finer than the first temporal layer;
based on the second temporal layer being finer than the first temporal layer,
modify the predetermined structure by encoding the immediately preceding frame as a new delta frame in the first temporal layer, and
encode the skip frame with reference to the new delta frame in the first temporal layer; and
based on the second temporal layer not being finer than the first temporal layer,
encode the skip frame with reference to the immediately preceding frame.
9 . The device of claim 8 , wherein the instruction is associated with a decoding requirement of maintaining a fixed frame display interval.
10 . The device of claim 8 , wherein the predetermined structure is a group of pictures (GOP) structure that utilizes at least one of:
a dyadic prediction structure,
a non-dyadic prediction structure, or
a hierarchical prediction structure with a zero encoder/decoder delay.
11 . The device of claim 8 , wherein the delta frame encoded as the skip frame is at least one of:
a predictive frame (P-frame), or
a bi-predictive frame (B-frame).
12 . The device of claim 8 , wherein the immediately preceding frame is at least one of:
a predictive frame (P-frame), or
a bi-predictive frame (B-frame).
13 . The device of claim 8 , wherein the new delta frame references at least one of:
a preceding key frame, or
a preceding delta frame.
14 . The device of claim 8 , wherein the instruction is associated with an operational requirement related to at least one of:
an available bandwidth,
a network condition,
an available storage capacity,
a resource constraint, or
a motion detection condition.
15 . A non-transitory computer-readable medium storing a set of instructions, the set of instructions comprising:
one or more instructions that, when executed by one or more processors of a device, cause the device to:
encode a series of images of video data into an encoded video stream including key frames and delta frames,
wherein the delta frames are arranged according to a hierarchical prediction pattern with multiple temporal layers and a predetermined structure, and
wherein the hierarchical prediction pattern defines a display order for the key frames and delta frames;
obtain an instruction to encode a delta frame as a skip frame to lower a bit rate of the encoded video stream and maintain a frames per second (FPS) value of the encoded video stream;
determine that the skip frame is to be encoded in a first temporal layer, of the multiple temporal layers, according to the predetermined structure;
evaluate, based on the display order, whether an immediately preceding frame to the skip frame is encoded, or to be encoded, in a second temporal layer, of the multiple temporal layers, that is finer than the first temporal layer;
based on the second temporal layer being finer than the first temporal layer,
modify the predetermined structure by encoding the immediately preceding frame as a new delta frame in the first temporal layer, and
encode the skip frame with reference to the new delta frame in the first temporal layer; and
based on the second temporal layer not being finer than the first temporal layer,
encode the skip frame with reference to the immediately preceding frame.
16 . The non-transitory computer-readable medium of claim 15 , wherein the instruction is associated with a decoding requirement of maintaining a fixed frame display interval.
17 . The non-transitory computer-readable medium of claim 15 , wherein the predetermined structure is a group of pictures (GOP) structure that utilizes at least one of:
a dyadic prediction structure,
a non-dyadic prediction structure, or
a hierarchical prediction structure with a zero encoder/decoder delay.
18 . The non-transitory computer-readable medium of claim 15 , wherein the delta frame encoded as the skip frame is at least one of:
a predictive frame (P-frame), or
a bi-predictive frame (B-frame).
19 . The non-transitory computer-readable medium of claim 15 , wherein the immediately preceding frame is at least one of:
a predictive frame (P-frame), or
a bi-predictive frame (B-frame).
20 . The non-transitory computer-readable medium of claim 15 , wherein the new delta frame references at least one of:
a preceding key frame, or
a preceding delta frame.