A kind of session television terminal subtitling generating and stacking method
Technical field
The invention belongs to field of multimedia communication, be specifically related to the captions formation technology in the terminal in the TV conference system.
Background technology
In TV conference system, usually need on terminal image, show explanatory note as roll titles, banner, terminal name and so on, we are called " captions ".The caption superposition method of present TV conference system is the caption information that sends the desire stack by master control to the captions generation module, as caption content, the captions color, display position, show size, the type matrix position, roll mode, transparency etc., the captions generation module is according to the caption content in the caption information, the type matrix position, font size is taken out the dot matrix of corresponding word from character library, generate original subtitle bitmap according to captions and background color again, the subtitle superposition module is then according to display position, roll mode, transparency is superimposed upon on the local terminal or distal view picture of camera picked-up after the original subtitle bitmap that takes out is handled, and shows by display terminal such as television set.Accompanying drawing 1 is the subtitle superposition mode structure chart in the present video conferencing.
There are the following problems for subtitle superposition mode in the video conferencing at present:
1, master control and subtitle superposition module are used same character library, visit by pci bus mutually, and that pci bus can offer the space of character library is limited, so the character library of depositing at last all need be through deleting that the font of the relevant captions of support and the size of captions are all comparatively single.
2, when need change font big or small, need carry out the convergent-divergent of font, increased the complexity of related software, display effect does not have actual font good yet.
3, roll titles, banner, originator terminal title can only show wherein a kind ofly simultaneously, and practicality and autgmentability are not strong.
Summary of the invention
At the defective of prior art, the invention provides a kind of caption superposition method, the subtitle superposition function is expanded satisfies the demand that the user becomes increasingly conspicuous.
This session television terminal subtitling stacking method may further comprise the steps:
Step 1, receive when master control (APP) and caption content that will show and caption information to be passed to the captions generation module when needing the overlapping text order;
Step 2, captions generation module are extracted corresponding type matrix and are generated original subtitle bitmap (YUV422 image) according to caption content and caption information and leave in the buffering area from character library, and original subtitle bitmap storage address, caption information and binary bitmap buffer regional address are passed to binary bitmap-converted module;
Step 3, binary translation module then become two meta bit maps with original captions bitmap-converted, leave binary bitmap buffer district in, and return two meta bit map storage addresses and big or small to master control;
Step 4, master control are passed to the subtitle superposition module to two meta bit map storage addresses and caption information thereof;
Step 5, subtitle superposition module are reduced two meta bit maps according to caption information and are carried out being superimposed upon on the target image after the relevant treatment, finally give television terminal and show.
Above-mentioned caption information comprises captions rolling mode, captions rolling speed, font size, captions color, title back color, the transparent intensity of title back, captions displaying location.
Described being superimposed upon on the target image refers to be superimposed upon on the image before the coding or is superimposed upon on the image of output.
Adopt the present invention, compared with prior art, font file need not to share mutually, also need not to be placed in the communal space of pci bus, and font file also no longer needs to delete, stack becomes possibility in the time of multiple captions, has greatly expanded the function of system.
Description of drawings
Fig. 1 is the subtitle superposition mode structure chart in the video conferencing in the prior art;
Fig. 2 is a subtitle superposition mode system construction drawing of the present invention;
Fig. 3 is the captions product process figure among the present invention;
Fig. 4 is the subtitle superposition flow chart among the present invention.
Embodiment
On the basis of existing technology, development and maturation along with DSP and other relational graph technology, can become two meta bit maps to the captions image transitions that will show---the size of two meta bit maps has only 1/8th of real image, wherein agreement " 0 " is a background pixels, " 1 " is the captions pixel, send the caption information of desire stack again, give the subtitle superposition module as captions color, display position, demonstration size, two meta bit map addresses, roll mode etc., the subtitle superposition module is reduced and is handled two meta bit maps according to above-mentioned information, on the target image that finally superposes.The present invention is promptly based on this consideration.
Fig. 2 is a subtitle superposition mode system construction drawing of the present invention.Compare with the prior art constructions that Fig. 1 represents, its difference is, between captions generation module and subtitle superposition module, increased binary bitmap-converted module, the original captions bitmap-converted that is used for the captions generation module is generated is two meta bit maps, and storage address and size passed to the subtitle superposition module, after the subtitle superposition module is taken out two meta bit maps, two meta bit maps are reduced to subtitle bitmap, handle being superimposed upon on the target image later according to caption information.
Method of the present invention also is to have increased a step that original captions bitmap-converted is become two meta bit maps on the basis of existing technology.Specifically see Fig. 3:
Step 101: on overlapping text interface (UI), select captions type, font size, captions color, whether transparent etc. and fill in and need the caption content that shows, and these information are sent to master control (APP);
Step 102: master control then will be calculated the buffer size that needs, and the captions generation module is passed in attribute, caption content and buffer size and the address of captions;
Step 103: the captions generation module generates original bitmap (YUV422 image) according to above-mentioned information and leaves in the buffering area, and bitmap size, bitmap storage address and binary bitmap buffer regional address are passed to binary bitmap-converted module;
Step 104: after binary bitmap-converted module was received information, the conversion original bitmap became two meta bit maps;
Step 105: the binary bitmap size and the storage address that return generation after converting are given the captions generation module.
Step 106: after receiving two meta bit map return informations, the captions generation module then notifies the generation of master control captions to finish, and returns the wide height of image.
The flow chart of subtitle superposition as shown in Figure 4.
Step 201: after captions generated and to finish, the master control order (comprising captions attribute and two meta bit map storage addresses) that will superpose sent to the subtitle superposition module;
Step 202: after the subtitle superposition module receives orders, read two meta bit maps, carry out respective handling according to the captions attribute again;
Step 203: be superimposed upon on the image before the coding (captions of making a start) as required or be superimposed upon on the image of output (receiving end captions);
Step 204: after stack finished, notice master control subtitle superposition finished.