CPC H04N 19/124 (2014.11) [H04N 19/154 (2014.11)] | 15 Claims |
1. A data processing method, comprising:
analyzing an encoding file of a video stream to obtain a target image frame set corresponding to the encoding file and target quantization parameters corresponding to the target image frame set, wherein target image frames in the target image frame set are obtained by screening image frames of the video stream based on a quality evaluation index and the encoding file, a target quantization parameter is a quantization parameter of a target image frame when the target image frame satisfies the quality evaluation index, and the encoding file is generated by a primary encoding on the video stream;
determining a new quantization parameter of each target image frame in the target image frame set and new number of bits of each target image frame corresponding to the new quantization parameter, based on comparison results of the target quantization parameters corresponding to the target image frame set, the encoding file, and initial quantization parameters of the image frames of the video stream; and
updating the initial quantization parameters and initial numbers of bits of the image frames of the video stream according to new quantization parameters and new numbers of bits of the target image frames in the target image frame set, wherein the updating is completed based on corresponding relationships between the target image frames in the target image frame set and the image frames of the video stream, and the initial quantization parameters and initial numbers of bits of the image frames of the video stream are pre-allocated based on the encoding file during a secondary encoding,
wherein the analyzing an encoding file of a video stream to obtain a target image frame set corresponding to the encoding file and target quantization parameters corresponding to the target image frame set comprises:
generating a first curve of the encoding file based on first quantization parameters of image frames and first quantization errors of image frames in the encoding file, wherein the first curve is used to represent a linear relationship between the first quantization parameters of the image frames and the first quantization errors of the corresponding image frames; and
analyzing the first curve to obtain the target image frame set corresponding to the first curve and the target quantization parameters corresponding to the target image frame set, wherein the target image frames of the target image frame set are obtained by screening the image frames of the video stream based on the quality evaluation index and the first curve.
|