1. 8107 add snapshot
As shown in the figure below, a MJPEG encoding is added in the ENC link, which is modified as follows:;
There was only one H264 encoding
Via Venc_ Getbitstreambuffer (& fullbufferlist, 0); when getting codectype, the code stream of MJPEG was not obtained. At the same time, debugging found that only one stream was created when enc link created the bitstream
Modify pobj - > inQueInfo.numCh =2; the following error occurs
2. 1080p60 cannot reach full frame
At present, we have SDI and HDMI dual input, and support the picture in picture function. In the picture in picture mode, the maximum is 1080p30
We need to be able to achieve 1080p60 in single channel, and support real-time SDI and HDMI handoff
Our current link process, please refer to: dm8107 single channel code can not debug full frame.docx
3. CVBS input problem of 8107
When we use debug CVBS input, the following phenomenon appears:
The upper part of the image is the image directly looped out, and the lower part is the image encoded by 8107.
The output image width of 8107 is only half, and the input of SDI and HDMI is normal
Debugging and analysis of dm8107 single channel code not full frame
At present, the live video encoder uses composite picture. Due to the limited memory resources, the input signal source is 1080p60, but only 1080p30 can be obtained after picture synthesis and coding. Now, when the synthetic picture is not used, the single channel input 1080p60 encoding is also 1080p60, so the following debugging and modification are made:
Configuration of single channel and multi-channel output:
Entry function:
VIS_ Videosystem() this function is the initialization and configuration of some acquisition and coding parameters. These are only initialization configurations, which are basically related to hardware;
The initialization function is as follows. Note the parameters of the passed in function:
Through configuration nParams.video.numCapCh To select single channel or multi-channel;
Enter different initialization processing functions according to different channels, as shown in the following figure:
Note: mutich_ createVcapVenc_ all_ New() is the multi-channel processing function we call
The selection of single path and multi-channel is mainly different from the creation of links (each link represents a thread in Ti. By creating the corresponding link, we can realize the corresponding functions in m3);
System_ Linkcreate() means to create a corresponding link and link it to the M3 processor. For example:
System_ linkCreate(gMultiCh_ VdecVdisObj.ipcInVpssId , &ipcInVpssPrm, sizeof(ipcInVpssPrm));
The first parameter: indicates the handle to create the link, through which the related link can be controlled;
The second parameter: indicates the configuration parameter when the link is created
The third parameter: indicates the size of the second parameter, generally sizeof();
System_ Linkcontrol() configures the function of the corresponding link through the corresponding parameters, as shown in the following figure:
First parameter: System_ LINK_ ID_ M3vpss: represents the handle of VPSs link of M3; this handle is the handle of creation;
The second parameter: system_ M3VPSS_ CMD_ RESET_ VIDEO_ Devices: to set and reset the video device. Its function is to reset it before operation.
The third parameter, null, indicates the parameter to be configured. Since this is reset, no configuration parameter is required, so it is null
The fourth parameter: indicates the size of the third parameter, which is equal to the size of the third parameter
The fifth parameter: ture indicates whether to wait for the response of the thread. If a response mechanism is required, select true;
The following is the flow chart of acquisition coding and output of picture synthesis:
For example:
Cap represents the collection thread. The handle of this thread is system_ LINK_ ID_ CAPTURE = VPSS_ LINK(SYSTEM_ VPSS_ LINK_ ID_ Capture). This is the collection thread handle specified by the system. Use this handle to create a collection thread. The specific processing is in m3, and the corresponding code location is in Z: project / dm8107 / dm8107 / SDK / DVR_ rdk\mcfw\src_ bios6
Caps WMS, OSD, invpss, DUP, Dei, ENC, etc. have related handle definitions. The specific handle definitions are in Z: project / dm8107 / dm8107 / SDK / DVR_ rdk\mcfw\interfaces\link_ There are definitions and comments in the relevant files in the API directory; (these are defined by Ti)
In order to achieve 60 frames after coding, the following tests are carried out:
1. When collecting, we turn off one channel input and only use single channel input
Z:\project\dm8107\dm8107\sdk\dvr_ rdk\mcfw\src_ linux\mcfw_ api\usecases\ti810x\multich_ vcap_ Line450 in Venc. C, as shown in the following figure:
SYSTEM_ CAPTURE_ INST_ VIP0_ Porta and system_ CAPTURE_ INST_ VIP1_ Porta represents SDI and HDMI ports respectively. We turn off one of them in the test, for example, turn off SDI and only use HDMI
Changes: capturePrm.numVipInst Represents the number of acquisition channels. It was 2 before and changed to 1;
gMainParams.video.numCapCh Yes, the number of global channels is also set to 1;
Pcaptureinstprm - > vipinstid indicates the port of the channel and is set to system_ CAPTURE_ INST_ VIP1_ PORTA
Other processes do not move, so we only collect single channel video, saving resources from acquisition to coding;
Note: all the above parameters must be modified. If one parameter is missing or the value is incorrect, the device will restart infinitely;
Results: the acquisition frame rate is 60 frames, but the encoding is less than 60 frames; we used this method to record a single channel of 60 frames of video a long time ago, but the later recorded video was only 52 frames, and in the case of picture synthesis, the maximum was about 48 frames, which was a little improved, but it could not reach the full frame;
2. Frame must be modified to skip merge
Because the picture can't reach 60 frames because it takes up resources by using merge, so merge can't reach 60 frames in theory;
In the case that the previous original operation remains unchanged, remove merge, and then use dei0 as the input source for encoding; the original display remains unchanged; in this case, the device black screen is caused, and then the device restarts occasionally. But the acquisition end is still 60 frames;
The specific flow chart is as follows:
The signal collected by cap is 60 frames
3. Modify the whole processing framework, refer to e700 single channel and single channel processing written before;
The treatment process is as follows:
As a result, the screen is also black, and a Dei handle error is reported;














