A kind of viewing window switching control method of video image and systemTechnical field
The present invention relates to the communication technology, relate in particular to the viewing window switching control method and the system of video image in the video communication.
Background technology
As shown in Figure 1, in video communication, video data is to transmit by the mode of video data frame, and each frame is with regard to a suitable width of cloth video pictures, obtain video data after, each frame video data is decoded, then the mode of data with image shown.
In the existing video communication applications, video communication is one and uses very widely, for the user, what directly face is exactly to show the view quality in the video communication, so on the one hand at this, each big video communication software is all making great efforts to improve its technology, shows more clearly and better user experience in the hope of reaching.And aspect the technology realization, usually need do a large amount of processing to obtain the picture of high-quality to video image, these handle the burden that can increase the weight of CPU undoubtedly, because in the video communication process, the video data that needs to handle will be a magnanimity, so the picture of high-quality will be accompanied by the consumption of high CPU.In order to make processing reach the highest efficient, aspect the picture demonstration, mostly use Windows GDI or DirectX technology usually to video data.
In order on Windows operating system, to draw a picture, Microsoft has created GDI, abbreviate GDI (Graphics Device Interface) as, it is the set of class, function, variable and constant, in other words conj.or perhaps the needed most objects of drawing in application program.The Windows GDI is the graphic core module in the Windows system, offers the developer with the GDI.EXE form and uses.Figure among the Windows is to be handled by the function among the GDI.EXE basically, and its main feature is to support and device-independent figure on output equipment.
DirectX is the another set of outstanding application programming interface (APIs) that Microsoft provides, and is used for contacts application and hardware self, and it has played crucial effect to multimedia application and the computer game under the development windows platform.The DirectX assembly comprises: DirectDraw, DirectSound, DirectPlay, Direct3D, DirectInput, DirectSetup, AutoPlay etc.
The DirectX assembly is to allow the directly software of control computer hardware equipment, can be used for different language and kinds of platform, supports from drawing pixel to senior 3-D view, from playing simple sound to digital music.
Each video communication software is selected different technology according to oneself needs and technical strength, and in existing main flow video communication product or the video communication software, mostly adopt Windows GDI technology, thereby satisfy it merely to the Presentation Function of image and the more images processing capacity is not provided.
Because existing main flow video communication product or video communication software do not provide the full screen display function, thus can't propose relatively with regard to certain concrete product or technology, but can be with regard to Display Technique should be used as some relevant comparisons.For example the view of Windows GDI amplifies and the full frame function of DirectX technology in recreation is compared as follows:
1. as previously mentioned,, therefore use Windows GDI to carry out the view amplification and will cause the utilization rate of CPU to become very high because Windows GDI can expend a lot of cpu resources aspect the processing such as convergent-divergent of image;
2.DirectX technology will enter exclusive occupying mode when realizing full frame function, in case this represents acquisition equipment at this point, just do not allow other program to obtain equipment, and monopolize keyboard and mouse incident etc.The user just can't be to other procedure operation under full frame pattern like this, very inconvenience.And in the handoff procedure of full frame and non-screen mode toggle, need expend several seconds time, and also need usually to change the exploration on display resolution ratio setting, for the user, can experience the very not smooth and appearance flicker of image.
Summary of the invention
The present invention discloses a kind of viewing window switching control method and system of video communication video image, with solve in the existing video communication can't full frameization demonstration problem.
Video communication method of video image processing of the present invention comprises the steps:
A, obtain the screen size parameter and create full frame form when full frame form shows when the user switches to;
B, determine video image multiplication factor and inputted video image processing module according to screen size parameter and video image dimensional parameters;
C, obtain video data frame and decode video data frame frame by frame, the video data that decodes is sent into the video image processing module, the video image processing module is according to described video data reduction raw video image;
D, video image processing module are amplified to raw video image on the described full frame form according to multiplication factor and show.
Also comprise the steps: after the described step D
E,, the user creates original form when original form shows when switching to;
F, video image multiplication factor are set to 1 and the inputted video image processing module;
G, video image processing module revert to raw video image on the described original form according to described multiplication factor and show.
Between described step B and the step C, also comprise the steps: respectively between step F and the G
Obtain video data frame frame by frame; The decode video data frame is also sent the video data that decodes into the video image processing module; The video image processing module is reduced described raw video image according to described video data.
Also comprise among described step D or the step G:
Destroy the form that uses before switching.
Described dimensional parameters comprises length and/or width and/or catercorner length, and described multiplication factor comprises video image length multiplication factor and/or width multiplication factor and/or catercorner length multiplication factor.
A kind of form handover control system of video image comprises video communication administration module and the video image processing module that is connected described video communication administration module, and described video communication administration module comprises:
User's handover operation instruction recognin module, the handover operation instruction that is used to discern the user is full frame form shows or original form shows and output is corresponding control signal;
The video image processing module is called submodule, is connected between described user instruction recognin module and the video image processing module, is used for calling the video image processing module according to control signal;
Video data frame obtains submodule, is used to extract video data frame and inputting video data frame decoding submodule;
Video data frame decoding submodule is used for the decode video data frame and with the video data inputted video image processing module that decodes;
Form management submodule is used for creating full frame form or original form according to described control signal, determines corresponding video image multiplication factor and with described multiplication factor inputted video image processing module, and destroys the form that uses before switching;
The video image processing module is amplified to raw video image on the full frame form according to multiplication factor and shows, perhaps reverts on the original form and demonstration.
Described video communication administration module also comprises:
User's handover operation trapping module is used to catch the instruction of user's handover operation and imports described user's handover operation instruction recognin module;
Show memory module, connect described form management submodule, be used to preserve described full frame form or original form;
Display module connects described demonstration memory module, is used to show described full frame form or original form.
Described form management submodule also comprises:
The video window creating unit is used to create described full frame form or original form;
Image multiplication factor computing unit is used to calculate the multiplication factor of carrying out full screen video form video image when showing; And
Video window is destroyed the unit, is used to destroy the form that uses before switching.
Described video image processing system also comprises the system parameters memory module, connects described image multiplication factor computing unit, is used to preserve the dimensional parameters of display screen.
Described video image processing module is a DirectX video image processing module.
Beneficial effect of the present invention is as follows:
Video communication method of video image processing provided by the invention and system, utilize the DirectX technology, in the video communication chat, the full screen display of video image and the quick switching between full frame and the form have been realized, and reduced the utilization rate of CPU in the full screen display process, allow the user enjoy better visual experience.
Description of drawings
Fig. 1 video data frame handling process schematic diagram;
Fig. 2 is a video communication method of video image processing principle schematic of the present invention;
Fig. 3 is a video communication video image processing system structural representation of the present invention.
Embodiment
The invention provides image processing method and system in a kind of video communication, utilize the DirectX image processing techniques, the full screen display of video image and the quick switching between the full frame and original form in video communication, have been realized, and reduced the utilization rate of CPU in the full screen display process, the technology of the present invention design comprises as shown in Figure 2:
1, when the user starts the video communication administration module, the video communication administration module is created original form and is deposited display memory in, call the DirectX image processing module then, original form positional information and multiplication factor are sent into the DirectX image processing module, at this moment multiplication factor is changed to 1, the video communication administration module obtains frame by frame also and imports the DirectX image processing module behind the decoded data frame, comprise size of images information in the decoded result, be plotted on the original video form according to the reduction of data image and according to original image size one by one by the DirectX image processing module, and directly call the display demonstration.
2, when the user switches to full screen display, the concrete processing comprises: at first need to obtain the length of screen and wide by system function, set up a window according to this size then, the window of this moment will cover whole screen, this window is called full frameization window, and full frame form is deposited in display memory and positional information is imported the DirectX image processing module; After setting up good full frameization window, need original video views is amplified to full-sized.By screen length and original video length, can obtain the length multiplication factor, by screen width and original video width, can obtain the width multiplication factor, multiplication factor also is input to the DirectX image processing module, and then uses the processing and amplifying of DirectX that the original video demonstration is amplified on the full frame form; At last, the DirectX image processing module again full frameization window as the video window displayed, then can obtain the experience of a full screen view; Destroy original form then.
Except determine the size after image amplifies according to length multiplication factor and/or width multiplication factor, can also determine according to video image catercorner length multiplication factor.
3, when the user is switched back original form once more, then return step 1 and create original form demonstration again and destroy full frame form.
Because the establishment and the destruction of window are very fast things, for the user, so full frame and non-full frame switching is the smooth experience of non-permanent current.And owing to be that window realizes full frame, the user can other programs of parallel calling in the process of full frameization video communication, handle other affairs, and both are independent of each other.Self-built window can obtain all message on the window simultaneously, can also increase the demonstration of various tool bar according to message, the expansion more function.
As shown in Figure 3, the video image processing system of realization the method for the invention comprises:
User's operational order trapping module is used for catching user's mouse action according to system message;
The video communication administration module is used to provide video communication interface management video communication process;
Show memory module and be connected the display that shows memory module, and be connected the DirectX processing module between memory module and the video communication administration module;
Wherein, the video communication administration module specifically comprises:
Video data frame obtains submodule, is used to obtain video data frame;
The video data decoding submodule is used for the decode video data frame;
User's operational order identification module connects user's operational order trapping module, is used to discern user's operational order and exports control signal corresponding;
Form management submodule, connect described user instruction recognin module, be used for creating the target video form and depositing the demonstration memory module in according to user's form handover operation instruction, calculate the multiplication factor of video image simultaneously, and with the stored position information of this multiplication factor and target video form input DirectX processing module, and destroy the video window of creating the use before the video window;
DirectX calls submodule, connects between user instruction recognin module and the DirectX processing module, and the operational order that is used for starting according to the user video communication administration module calls the DirectX processing module;
The course of work is: frame of video is obtained submodule and is obtained video data frame and inputting video data decoding submodule frame by frame according to the operational order that the user starts the video communication administration module, the video data decoding submodule is with decoded video data input DirectX processing module, and the DirectX processing module shows by display after going back original video image one by one and be plotted on the video window according to multiplication factor video image according to video data.
And form management submodule can comprise following functional unit:
The video window creating unit is used to create video window;
Image multiplication factor computing unit is used for the computed image multiplication factor; And
Video window is destroyed the unit, is used to the video window of using before destroying the current video form.
Described treatment system also comprises the system parameters memory module, connects described image multiplication factor computing unit, is used to preserve the dimensional parameters of display screen.
In the said system, user's operational order trapping module is caught user's mouse action and is imported user instruction recognin module, user instruction recognin module identification user's different operating instruction starts function corresponding submodule or unit and carries out the video image processing, specifically comprises:
When the user starts the video management module, default user is that original form shows, then indicate DirectX to call submodule and set up interface interchange DirectX processing module, the submodule of instruction video form management is simultaneously created the original video form, is calculated multiplication factor and import the DirectX processing module, and instruction video obtains submodule and obtains video data and insert and be input to the DirectX processing module and carry out image processing and show;
When the user switched to full screen display, the step of creating full frame form and demonstration was basic identical, and difference is to obtain screen size parameter and the step of destroying original form from the system parameters memory module;
When the user is switched back original form once more, create original form again and show and destroy full frame form.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.