CPC H05B 47/105 (2020.01) [H04L 67/12 (2013.01)] | 10 Claims |
1. An instruction transmission method for an ambient lamp, comprising:
sequentially obtaining a playback frame from a playback frame sequence as a current playback frame;
determining a target encoding scheme of the current playback frame based on a frame type of the current playback frame;
determining effective data and a data type of the effective data of the current playback frame according to the target encoding scheme, and encoding the effective data into playback encoded data; and
encapsulating the playback encoded data of the current playback frame and the data type of the effective data into a lighting-effect playback instruction, and transmitting the lighting-effect playback instruction to a control chip of a lighting component of the ambient lamp for execution,
wherein the determining a target encoding scheme of the current playback frame based on a frame type of the current playback frame further includes:
identifying and determining the frame type of the current playback frame, the frame type being one of a key frame, a prediction frame, and a special frame; the key frame indicating that the current playback frame includes independent and complete data; the prediction frame indicating that the current playback frame includes data that can be transformed by adapting motion vector data relative to a previous adjacent playback frame; and the special frame indicating that the current playback frame includes other types of data that are not the key frame or the prediction frame;
when the frame type of the current playback frame is the key frame, determining that the target encoding scheme of the current playback frame is an original-image encoding scheme, the original-image encoding scheme being configured to use original data of the current playback frame as effective data for encoding to obtain the playback encoded data;
when the frame type of the current playback frame is the prediction frame, determining that the target encoding scheme of the current playback frame is a vector encoding scheme, and the vector encoding scheme being configured to encode the motion vector data of the current playback frame relative to the previous adjacent playback frame as effective data to obtain the playback encoded data; and
when the frame type of the current playback frame is the special frame, determining that the target encoding scheme of the current playback frame is a trial calculation encoding scheme, and the trial calculation encoding scheme being configured to select one of two playback encoded data obtained by trial calculation with a smaller data amount as the playback encoded data of the current playback frame, and the two playback encoded data being respectively encoded with the original data of the current playback frame and frame difference data between the current playback frame and the previous adjacent playback frame as effective data of trial calculation.
|