# Time Delay Optimization of Compressing Shipborne Vision Sensor Video Based on Deep Learning
## 3 Compression Experiment of Shipborne Vision Sensor Video
### Coding Complexity Analysis  
The complexity of coding computation is one of the main reasons for consuming the computational resources of ships and affecting the compression delay. Too much compression delay will lead to the reduction of real-time storage or transmission of ship vision sensor videos and cause the hidden danger of intelligent ship navigation. In order to analyze the percentage of computational resources consumed by each link when compressing ship vision sensor video, this section selects two coding modes: All Intra (AI) and Low Delay P (LDP), and conducts coding complexity analysis experiments on the captured ship vision sensor video to test the time consumption of different links under the two configurations and takes the average of the measured results as the final result. The AI mode is responsible for testing the computational complexity of each link in the intra-frame PC mode, and the LDP mode is testing the inter-frame PC mode, within Group of Pictures (GOP), the first frame is I and the rest is P.  
The experimental platform uses 64-bit Ubuntu 20.04.2 LTS operating system, and the test environment is built using the official HEVC test platform _HM_16.17, compiled using C++ language, and the performance analysis tool that comes with Visual Studio is selected to diagnose and analyze the coding time consumption of each link. The hardware configuration of the experimental platform is Intel Core i7-8700 [EMAIL_ADDRESS] Hz with 16 G RAM, and the main configuration parameters of the encoder is given in Table 2. The percentage of time consumed by the CPU in executing each major encoding session code during the video compression of the onboard vision sensor is given in Table 3. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Video Type** & **Navigation Environment** & **Time** & **Frame Rate** & **Resolving Power** & **Number of Videos** \\ \hline \multirow{5}{*}{SVLC video} & Anchoring & & & 1920 \(\times\) 1080 & 6 \\  & Underway & & & 1280 \(\times\) 720 & 5 \\  & & & & 1920 \(\times\) 1080 & 8 \\  & & & & 1280 \(\times\) 720 & 9 \\  & Port & & & 1920 \(\times\) 1080 & 8 \\  & & & & 1280 \(\times\) 720 & 5 \\ \hline \multirow{3}{*}{SIRC video} & Anchoring & & & 704 \(\times\) 576 & 8 \\  & Underway & 30 s & 25 fps & 704 \(\times\) 576 & 8 \\ \cline{1-1}  & Port & & & 704 \(\times\) 576 & 6 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Shipborne perception videos parameters. In the process of compressing the SVSV, it can be seen that the TComTrQuant class, which implements the transform and quantization functions in HEVC, takes the most time in AI mode, with an average of 17.69%. It is mainly because this part needs to calculate the rate distortion cost metric needed for optimal quantization. Next is the TComDataCU section (stores CU data information), the TComPrediction and TEncSearch sections (perform intra-frame prediction and search), and the TComRdCost section (implements the calculation of the rate distortion cost), accounting for 14.44%, 11.95%, 11.6%, and 3.79%, respectively. The intra-frame PC mode requires iterative computation of the rate distortion cost for all possible division methods in order to determine the optimal CTU division, which consumes most of the computational resources. When compressing the SVSV in LDP mode, the motion estimation and compensation parts consume most of the computational resources, with the TComInterpolationFilter class, which is used to implement the interpolation filtering function, accounting for the highest percentage, occupying 19.91% of the total coding time on average. Next is the TComDataCU class and the TComRdCost part for calculating SAD and other rate distortion optimization metrics, which consume 15.61% and 12.25% on average. The above results can be analyzed that when compressing the SVSV in AI mode, and the highest computational complexity is the CTU division part. This is mainly because the