Fast automatic setting method based on UHD decoder
Technical Field
The invention relates to a rapid automatic setting method based on a UHD decoder.
Background
With the development of the digital information age, people develop the requirements of image data to high speed and high resolution, ultra-high definition video becomes a great trend, and higher requirements are put forward for encoding and decoding of ultra-high definition video transmission.
In addition, some parameters are transmitted at a system layer of the code stream (such as PID, code stream type and the like), some parameters are transmitted at an encoding layer (such as scanning mode, frame rate and the like), and some parameters are not transmitted directly (i.e. non-explicit parameters) (such as delay mode). This causes difficulties in the correct setting of the decoder parameters and inconvenience in practical use.
Disclosure of Invention
In view of this, the present invention provides a fast automatic setting method based on a UHD decoder, which implements different analysis and extraction methods according to different results, and ensures that the decoder can normally process and decode code streams output by different encoders.
In order to achieve the purpose, the invention adopts the following technical scheme:
a fast automatic setup method based on UHD decoder, comprising the steps of:
step S1: at the encoder end, packing input data according to MPEG-2 system standard to form fixed length transmission packets, then multiplexing the data packets to form transmission code stream;
step S2, modifying and adjusting PMT of the transmission code stream by using expansibility, and adding a private descriptor enc _ params in a video loop;
step S3, the encoder outputs the transmission code stream to the transmission module, and enters the transmission module of the decoder end through the wireless channel;
step S4, the decoder receives the transmission code stream output by the encoder and starts decoding;
step S5, the decoder filters and decodes the program PMT table at the system layer, analyzes whether the enc _ params descriptor exists, if so, analyzes the enc _ params descriptor, and completes the setting of the decoder parameters;
if the enc _ params descriptor does not exist, extracting parameters from the system layer and the coding layer respectively, calculating a non-dominant parameter according to the time sequence characteristics of the data, setting a decoder, and finishing the setting of the decoder.
Further, the input data includes compressed UHD video, audio, text, and pictures.
Further, the descriptor enc _ params contains parameter setting information, including a sampling mode, sampling precision, resolution, frame rate, scanning mode, delay mode, and code rate control mode.
Further, the step S2 includes: a private descriptor enc _ params is added in a video loop, the descriptor definition conforms to the ISO/IEC 13818-1 standard, and the PMT segment length, the total length of the secondary descriptor and the cyclic redundancy check field are updated.
Compared with the prior art, the invention has the following beneficial effects:
the invention adopts different analysis and extraction methods according to different results, and ensures that the decoder can normally process and decode code streams output by different encoders.
Drawings
FIG. 1 is a flow diagram of the present invention;
FIG. 2 is a block diagram of the system mechanism in one embodiment of the invention.
Detailed Description
The invention is further explained below with reference to the drawings and the embodiments.
Referring to fig. 1, the present invention provides a fast automatic setup method based on UHD decoder, comprising the following steps:
step S1: at the encoder end, packing input data according to MPEG-2 system standard to form fixed length transmission packets, then multiplexing the data packets to form transmission code stream;
step S2, modifying and adjusting PMT of the transmission code stream by using expansibility, and adding a private descriptor enc _ params in a video loop; the descriptor definition follows the ISO/IEC 13818-1 standard, and simultaneously updates the PMT segment length, the total length of the secondary descriptor and the cyclic redundancy check field;
step S3, the encoder outputs the transmission code stream to the transmission module, and enters the transmission module of the decoder end through the wireless channel;
step S4, the decoder receives the transmission code stream output by the encoder and starts decoding;
step S5, the decoder filters and decodes the program PMT table at the system layer, analyzes whether the enc _ params descriptor exists, if so, analyzes the enc _ params descriptor, and completes the setting of the decoder parameters;
in this embodiment, if there is no enc _ params descriptor, parameters are extracted from the system layer and the coding layer, respectively, and the non-dominant parameter is calculated according to the time sequence characteristics of the data, specifically: the sampling mode, the sampling precision and the resolution ratio all extract corresponding parameters from the coding layer, for frame rate parameters, the encoder does not insert VUI parameters into the coding layer in a low-delay working mode, the decoder records all PTS data in the PES layer within a period of time, generally from 0.5 second to 1 second, then the minimum difference value in the PTS data is counted, and then the specific frame rate is obtained according to the interval where the minimum difference value is located.
In this embodiment, the input data includes video, audio, text, and pictures.
In this embodiment, the descriptor enc _ params includes parameter setting information, which includes a sampling mode, a sampling precision, a resolution, a frame rate, a scanning mode, a delay mode, and a code rate control mode.
The above description is only a preferred embodiment of the present invention, and all equivalent changes and modifications made in accordance with the claims of the present invention should be covered by the present invention.