Appro's ipnc only implements the English OSD superposition, even a small ASCII code table is not completely covered, and the swosd architecture is often messy.
In fact, it is nothing more than two functions. One is to overlay text, but to overlay images. Considering video streams compatible with different resolutions, the processing branch is relatively proofread.
The overlapping of images is not implemented for the time being, and the most used is the superposition of Chinese characters. The method for overlapping Chinese OSD is also very simple, as shown below:
1. Understand the distribution of the Chinese font, and calculate the position of the Chinese character in the font based on the internal code of the Chinese character.
2. Learn about the distribution of ASCII character libraries. Use the ASCII value of a letter to calculate the position of the corresponding character in the font (this is relatively simple and it is not difficult to understand Chinese characters)
3. On the PC, convert the desired Chinese and English fonts to the dot matrix font data (or directly convert the data to the YUV format. I use the dot matrix data)
4. Understand the storage mode in YUV format (this is not difficult)
5. At last, the dot matrix data converted from a Chinese string is superimposed at the specified position of YUV to implement Chinese superposition. If the time is superimposed, the system time is obtained in real time, convert the time to a string, and then dynamically overlay the time to YUV.
Is the effect after superposition, is it OK.
Appro's ipnc only implements the English OSD superposition, even a small ASCII code table is not completely covered, and the swosd architecture is often messy.
In fact, it is nothing more than two functions. One is to overlay text, but to overlay images. Considering video streams compatible with different resolutions, the processing branch is relatively proofread.
The overlapping of images is not implemented for the time being, and the most used is the superposition of Chinese characters. The method for overlapping Chinese OSD is also very simple, as shown below:
1. Understand the distribution of the Chinese font, and calculate the position of the Chinese character in the font based on the internal code of the Chinese character.
2. Learn about the distribution of ASCII character libraries. Use the ASCII value of a letter to calculate the position of the corresponding character in the font (this is relatively simple and it is not difficult to understand Chinese characters)
3. On the PC, convert the desired Chinese and English fonts to the dot matrix font data (or directly convert the data to the YUV format. I use the dot matrix data)
4. Understand the storage mode in YUV format (this is not difficult)
5. At last, the dot matrix data converted from a Chinese string is superimposed at the specified position of YUV to implement Chinese superposition. If the time is superimposed, the system time is obtained in real time, convert the time to a string, and then dynamically overlay the time to YUV.
Is the effect after superposition, is it OK.