CN108337465B - Video processing method and device - Google Patents

Video processing method and device Download PDF

Info

Publication number
CN108337465B
CN108337465B CN201710071869.9A CN201710071869A CN108337465B CN 108337465 B CN108337465 B CN 108337465B CN 201710071869 A CN201710071869 A CN 201710071869A CN 108337465 B CN108337465 B CN 108337465B
Authority
CN
China
Prior art keywords
video
terminal
parameter
gpu
processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710071869.9A
Other languages
Chinese (zh)
Other versions
CN108337465A (en
Inventor
李凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201710071869.9A priority Critical patent/CN108337465B/en
Publication of CN108337465A publication Critical patent/CN108337465A/en
Application granted granted Critical
Publication of CN108337465B publication Critical patent/CN108337465B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/14Systems for two-way working
    • H04N7/141Systems for two-way working between two video terminals, e.g. videophone
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/2621Cameras specially adapted for the electronic generation of special effects during image pickup, e.g. digital cameras, camcorders, video cameras having integrated special effects capability

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a video processing method and a video processing device. Wherein, the method comprises the following steps: acquiring a first parameter for indicating GPU performance of a first terminal and a second parameter for indicating CPU performance of the first terminal; controlling a GPU or a CPU of the first terminal to perform filter processing on the first video according to the first parameter and/or the second parameter to obtain a second video, wherein the first video is a video recorded by the first terminal in real time; and controlling the first terminal to send the second video to the second terminal, wherein the second terminal is used for displaying the second video in real time. The invention solves the technical problem that the video cannot be correspondingly filtered according to the performance of the terminal in the real-time video call process in the prior art.

Description

Video processing method and device
Technical Field
The invention relates to the field of videos, in particular to a video processing method and device.
Background
In the video call process, the special effects of beautifying (such as skin grinding, whitening, face thinning and the like) and the like can be achieved by performing filter processing on the video, and the user experience is improved.
In the prior art, a filter effect is uniformly realized by using an algorithm, so that for a terminal with poor performance, the terminal is very blocked and the video is not smooth in the video call process; for a terminal with good performance, the optimal filter effect cannot be realized in the video call process, and resources cannot be fully utilized.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a video processing method and a video processing device, which at least solve the technical problem that the video cannot be subjected to corresponding filter processing according to the performance of a terminal in the real-time video call process in the prior art.
According to an aspect of an embodiment of the present invention, there is provided a video processing method, including: acquiring a first parameter for indicating GPU performance of a first terminal and a second parameter for indicating CPU performance of the first terminal; controlling a GPU or a CPU of the first terminal to perform filter processing on a first video according to the first parameter and/or the second parameter to obtain a second video, wherein the first video is a video recorded by the first terminal in real time; and controlling the first terminal to send the second video to a second terminal, wherein the second terminal is used for displaying the second video in real time.
According to another aspect of the embodiments of the present invention, there is also provided a video processing apparatus, including: the terminal comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a first parameter for indicating the GPU performance of a first terminal and a second parameter for indicating the CPU performance of the first terminal; the first control unit is used for controlling a GPU or a CPU of the first terminal to perform filter processing on a first video according to the first parameter and/or the second parameter to obtain a second video, wherein the first video is a video recorded by the first terminal in real time; and the second control unit is used for controlling the first terminal to send the second video to a second terminal, wherein the second terminal is used for displaying the second video in real time.
In an embodiment of the invention, the first parameter is indicative of GPU performance of the first terminal, the second parameter is indicative of CPU performance of the first terminal, controlling a GPU or a CPU of the first terminal to perform filter processing on the first video according to the first parameter and/or the second parameter to obtain a second video, controlling the first terminal to send the second video to the second terminal, displaying the second video in real time by the second terminal after the second terminal receives the second video, for first terminals with different performances, the algorithms adopted for filtering the first video are different, the resource consumption of the GPU or the CPU is different when the first video is processed by the filter, the technical effect of carrying out corresponding filter processing on the video according to the performance of the terminal in the real-time video call process is achieved, and then the technical problem that corresponding filter processing can not be carried out on the video according to the performance of the terminal in the real-time video call process in the prior art is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a schematic diagram of a hardware environment according to an embodiment of the present invention;
FIG. 2 is a flow diagram of a video processing method according to an embodiment of the invention;
FIG. 3 is a flow diagram of an end-to-end process for a remote video chat system in accordance with an embodiment of the present invention;
FIG. 4 is a flow chart of a cumulative effect process for a certain filter A according to an embodiment of the present invention;
FIG. 5 is a guide diagram for a first use video call in accordance with an embodiment of the present invention;
FIG. 6 is a flow diagram of a user interface implementation according to an embodiment of the invention;
FIG. 7 is a flow chart of an adapting low end machine framework according to an embodiment of the invention;
FIG. 8 is a schematic diagram of a beauty equalizer processing module (YUV processing on CPU) according to an embodiment of the invention;
FIG. 9-1 is an image of a frame in a first video according to an embodiment of the present invention;
FIG. 9-2 is an image of a frame in a second video according to an embodiment of the present invention;
FIG. 10-1 is yet another frame image in a first video according to an embodiment of the present invention;
FIG. 10-2 is yet another frame image in a second video according to an embodiment of the present invention;
FIG. 11 is a flow chart of adapting a high-end machine frame according to an embodiment of the invention;
fig. 12 is a schematic diagram of an adaptation scheme of a home-end high-end model and a far-end low-end model according to an embodiment of the present invention;
fig. 13 is a schematic diagram of a video processing apparatus according to an embodiment of the present invention.
Fig. 14 is a schematic diagram of a server according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Technical term interpretation:
a filter lens: mainly for realizing various special effects of the image. It has a very miraculous role in Photoshop. All the filters are placed in a menu according to categories in Photoshop, and only the command needs to be executed from the menu when the Photoshop is used. The operation of the filter is very simple but it is very difficult to do it in practice. Filters are often used in conjunction with channels, layers, etc. to achieve the best artistic results.
Video coding and decoding: the video encoding method is a method of converting a file in a certain video format into a file in another video format by a specific compression technique. The most important codec standards in video streaming include h.261, h.263, and h.264 of the international telecommunication union, M-JPEG of the moving picture experts group, and MPEG series standards of the moving picture experts group of the international organization for standardization, and also RealVideo of Real-Networks, WMV of microsoft, QuickTime of Apple, and the like, which are widely used on the internet.
kbps: the code rate is the number of data bits transmitted per unit time during data transmission, and is generally expressed in kbps, i.e., kilobits per second. The Kbps can also indicate the transmission speed of the network, and in order to intuitively indicate that the transmission speed of the network is high, companies generally use kb (kilobits) to indicate, and if Kbps, how many kilobytes are transmitted per second.
QP: and the quantization parameter is used in video coding and decoding.
Low-end model: the model refers to a model with poor CPU performance and poor GPU performance.
High-end model: the model refers to a model with better CPU performance and GPU performance.
According to an embodiment of the present invention, an embodiment of a video processing method is provided.
Alternatively, in the present embodiment, the video processing method may be applied to a hardware environment formed by the server 102, the terminal 104, and the terminal 106 as shown in fig. 1. As shown in fig. 1, server 102 is connected to terminals 104 and 106 via a network, including but not limited to: the wide area network, the metropolitan area network, or the local area network, and the terminals 104 and 106 are not limited to a PC, a mobile phone, a tablet computer, or the like. The video processing method according to the embodiment of the present invention may be executed by the terminal 104, or may be executed by both the terminal 104 and the server 102. The terminal 104 may perform the video processing method of the embodiment of the present invention by a client installed thereon. The client installed on the terminal 104 obtains a first parameter and a second parameter, where the first parameter is used for indicating GPU performance of the terminal 104, and the second parameter is used for indicating CPU performance of the terminal 104. The terminal 104 records the video in real time to obtain a first video, the client installed on the terminal 104 controls a GPU or a CPU of the terminal 104 to perform filter processing on the first video according to the first parameter and/or the second parameter to obtain a second video, the terminal 104 sends the second video to the terminal 106, and the terminal 106 displays the second video in real time.
In the case where the video processing method is executed by both the terminal 104 and the server 102, a network architecture diagram provided by the embodiment of the present invention is shown in fig. 1. As shown in fig. 1, a client installed on a terminal 104 obtains a first parameter and a second parameter, where the first parameter is used for indicating GPU performance of the terminal 104, and the second parameter is used for indicating CPU performance of the terminal 104. The terminal 104 records the video in real time to obtain a first video, the client installed on the terminal 104 obtains a filter scheme according to the first parameter and/or the second parameter, the GPU or the CPU of the terminal 104 is controlled to perform filter processing on the first video according to the filter scheme to obtain a second video, the terminal 104 sends the second video to the terminal 106, and the terminal 106 displays the second video in real time. The client installed on the terminal 104 transmits the filter scheme corresponding to the terminal 104 to the server 102, and the server 102 stores the terminal 104 in association with the corresponding filter scheme. When the client installed on the terminal 104 starts the real-time video call next time, the client acquires the filter scheme associated with the terminal 104 from the server 102, and controls the GPU or the CPU of the terminal 104 to perform filter processing on the first video according to the acquired filter scheme, so as to obtain a second video. The terminal 104 sends the second video to the terminal 106 and the terminal 106 displays the second video in real time.
According to an embodiment of the present invention, there is provided a video processing method, as shown in fig. 2, the method including the steps of:
step S202, a first parameter used for indicating the GPU performance of the first terminal and a second parameter used for indicating the CPU performance of the first terminal are obtained.
And S204, controlling a GPU or a CPU of the first terminal to perform filter processing on the first video according to the first parameter and/or the second parameter to obtain a second video, wherein the first video is a video recorded by the first terminal in real time.
And step S206, controlling the first terminal to send a second video to the second terminal, wherein the second terminal is used for displaying the second video in real time.
The first terminal can record videos in real time through the camera to obtain a first video.
The second terminal may be one or more. When the number of the second terminals is one, the application scene is one-to-one video call; when the number of the second terminals is multiple, the application scene is one-to-many video live broadcast.
Through the first parameter and the second parameter, the GPU performance and the CPU performance of the first terminal can be known. And under the condition that the first parameter shows that the GPU performance of the first terminal is better, controlling the GPU of the first terminal to perform filter processing on the first video.
And under the condition that the first parameter shows that the GPU performance of the first terminal is poor, controlling a CPU of the first terminal to perform filter processing on the first video.
In an embodiment of the invention, the first parameter is indicative of GPU performance of the first terminal, the second parameter is indicative of CPU performance of the first terminal, controlling a GPU or a CPU of the first terminal to perform filter processing on the first video according to the first parameter and/or the second parameter to obtain a second video, controlling the first terminal to send the second video to the second terminal, displaying the second video in real time by the second terminal after the second terminal receives the second video, for first terminals with different performances, the algorithms adopted for filtering the first video are different, the resource consumption of the GPU or the CPU is different when the first video is subjected to filter processing, the technical problem that the video cannot be subjected to corresponding filter processing according to the performance of the terminal in the real-time video call process in the prior art is solved, and the technical effect that the video is subjected to corresponding filter processing according to the performance of the terminal in the real-time video call process is achieved.
Optionally, controlling a GPU or a CPU of the first terminal to perform filter processing on the first video according to the first parameter and/or the second parameter, and obtaining the second video includes: determining a target filter mode according to the first parameter and/or the second parameter, wherein the target filter mode comprises first indication information, and the first indication information is used for indicating that filter processing is carried out on the first video by adopting a GPU or a CPU; and controlling the GPU or the CPU of the first terminal indicated by the target filter mode to perform filter processing on the first video to obtain a second video.
The first terminal can know whether the GPU or the CPU is adopted to carry out filter processing on the first video by reading the first indication information.
And if the first indication information indicates that the GPU is adopted to carry out filter processing on the first video, the first terminal adopts the GPU to carry out filter processing on the first video after reading the first indication information.
And if the first indication information indicates that the CPU is adopted to carry out filter processing on the first video, the CPU is adopted to carry out filter processing on the first video after the first indication information is read by the first terminal.
The target filter pattern may include filter effect information, for example, including whitening, peeling, and the like, in addition to the first indication information.
Whether the first video is processed by the GPU or the CPU can be determined according to one of the first parameter or the second parameter, or can be determined by the first parameter and the second parameter together. Specifically, the following three cases are classified.
Case I: only the first parameter is considered.
If the first parameter indicates that the GPU performance of the first terminal is very good, then it is determined that the first video is filter processed by the GPU of the first terminal. In this case, the first indication information is used to indicate that the first video is filter-processed using the GPU.
If the first parameter indicates that the GPU performance of the first terminal is poor, since many resources of the GPU are used for video display rendering, if the GPU of the first terminal is used to perform filter processing on the first video at this time, the video may be jammed and not smoothly played. In this case, the first video may be filter-processed using the CPU of the first terminal. In this case, the first instruction information is for instructing the filter processing of the first video with the CPU.
Case II: only the second parameter is considered.
If the second parameter indicates that the CPU resource of the first terminal has larger redundancy, the CPU of the first terminal can be used for carrying out filter processing on the first video. In this case, the first instruction information is for instructing the filter processing of the first video with the CPU.
Case III: the first parameter and the second parameter are considered simultaneously.
Determining to filter the first video using the GPU of the first terminal if the first parameter and the second parameter indicate that the GPU resources of the first terminal are more redundant than the CPU resources. In this case, the first indication information is used to indicate that the first video is filter-processed using the GPU.
If the first parameter indicates that the GPU performance of the first terminal is good, and the second parameter indicates that the CPU performance of the first terminal is good, the GPU of the first terminal may be used to perform higher-level filter processing on the first video, for example, to superimpose multiple filter algorithms to obtain a richer filter effect. In this case, the GPU resource of the first terminal can be fully utilized, and a very good filter effect is obtained. In this case, the first indication information is used to indicate that the first video is filter-processed using the GPU.
If the first parameter indicates that the GPU performance of the first terminal is poor and the second parameter indicates that the CPU performance of the first terminal is also poor, since many resources of the GPU are used for video display rendering, if the GPU of the first terminal is used to perform filter processing on the first video at this time, the video may be jammed and not smoothly played. In this case, the first video may be filter-processed using the CPU of the first terminal. In this case, the first instruction information is for instructing the filter processing of the first video with the CPU.
Optionally, determining the target filter mode according to the first parameter and/or the second parameter comprises: judging whether the first parameter meets a first preset condition or not; under the condition that the first parameter meets a first preset condition, generating a target filter mode comprising first sub-indication information, wherein the first sub-indication information is used for indicating that filter processing is carried out on a first video by adopting a GPU of a first terminal; and under the condition that the first parameter does not meet the first preset condition, generating a target filter mode comprising second sub-indication information, wherein the second sub-indication information is used for indicating that the CPU of the first terminal is adopted to carry out filter processing on the first video.
The first parameter indicates GPU performance of the first terminal, if the first parameter meets a first preset condition, the GPU performance of the first terminal is better, at the moment, the GPU of the first terminal is determined to be adopted to carry out filter processing on the first video, a target filter mode is generated, the target filter mode comprises first sub-indication information, and after the first terminal reads the first sub-indication information, the GPU of the first terminal is adopted to carry out filter processing on the first video.
And if the first parameter does not meet the first preset condition, the GPU performance of the first terminal is poor, at the moment, the CPU of the first terminal is determined to be adopted to carry out filter processing on the first video, a target filter mode is generated, the target filter mode comprises second sub-indication information, and the CPU of the first terminal is called to carry out filter processing on the first video.
Optionally, after generating the target filter pattern including the second sub-indication information, the method further includes: and performing filter enhancement processing on a Y channel of the YUV image data of the first video by adopting the CPU of the first terminal, and performing adjustment processing on the chromaticity and tone of the UV channel according to an image histogram lookup table.
And if the first parameter does not meet the first preset condition, the GPU performance of the first terminal is poor, at the moment, the CPU of the first terminal is determined to be adopted to carry out filter processing on the first video, and a target filter mode is generated, wherein the target filter mode comprises second sub-indication information, and the second sub-indication information is used for indicating that the CPU of the first terminal is adopted to carry out filter processing on the first video. And performing filter processing on the Y channel of the YUV image data of the first video by adopting the CPU of the first terminal according to the second sub-indication information. Under the condition that the GPU performance of the first terminal is poor, the CPU of the first terminal is adopted to perform basic filter processing on the first video, so that a user can see a good filter effect, and meanwhile, the situation that too many resources are not occupied is guaranteed, and the first terminal can smoothly display the video.
Optionally, in a case that the first parameter satisfies a first preset condition, generating the target filter pattern including the first sub-indication information includes: under the condition that the first parameter meets a first preset condition, judging whether the first parameter meets a second preset condition; under the condition that the first parameter meets a second preset condition, generating first level indication information in the first sub-indication information, wherein the first level indication information is used for indicating that the GPU of the first terminal is adopted to perform first-level filter processing on the first video; and under the condition that the first parameter does not meet a second preset condition, generating second level indication information in the first sub-indication information, wherein the second level indication information is used for indicating that the GPU of the first terminal is adopted to perform second-level filter processing on the first video, and the resource consumption of the GPU is greater when the first-level filter processing is performed on the first video than when the second-level filter processing is performed on the first video.
And under the condition that the first parameter meets a first preset condition, the GPU performance of the first terminal is better, and at the moment, a target filter mode comprising first sub-indication information is generated.
The first sub-indication information includes level information indicating a complexity of the filter process. The higher the complexity of the filter processing, the greater the resource consumption of the GPU.
The better the GPU performance of the first terminal, the more GPU resources can be used in the filter processing of the first video, and therefore the higher the complexity of the filter processing that can be achieved.
Under the condition that the first parameter meets the second preset condition, the GPU performance of the first terminal is very good, in this case, more GPU resources can be used for filter processing of the first video, the complexity of the filter processing which can be realized is higher, and the first-level filter processing is carried out on the first video.
For example, the GPU of the first terminal can perform the following processing on the first video: carrying out filter processing on three channels of RGB image data of a first video; performing edge detection on RGB image data of a first video; performing brightness and color contrast processing on the first video; and carrying out sharpening processing on the first video, and carrying out filter processing of a second level on the first video.
Under the condition that the first parameter meets the first preset condition but does not meet the second preset condition, the GPU performance of the first terminal is general.
Optionally, after determining the target filter mode according to the first parameter and/or the second parameter, the method further comprises: and performing associated storage on the identification information of the first terminal and the target filter mode so as to search the target filter mode according to the identification information, so that the first terminal performs filter processing on the first video.
In the real-time video call, the target filter mode corresponding to the first terminal can be searched, and then the GPU or the CPU of the first terminal is called according to the target filter mode to process the first video, so that the process that the target filter mode is determined again according to the first parameter and/or the second parameter when the real-time video call function is used every time is avoided, and the computing resources are saved.
Fig. 3 shows the location of various relevant video processing techniques involved throughout the remote real-time video chat at various locations. As shown in fig. 3, a camera of the terminal is used to obtain a video, and RGB data or YUV data is obtained. If the user chooses to skip the filter, the video is not filter processed. Otherwise, controlling the GPU or the CPU of the first terminal to perform filter processing on the video according to the first parameter and/or the second parameter. The GPU is used for a video processing algorithm with good processing effect and processing resource consumption; the CPU is used for processing a fast video processing algorithm of a Y channel. The performance of a GPU and a CPU of a mobile phone (a first terminal) is analyzed according to a first parameter and a second parameter, different algorithms are adopted on different models for processing technologies with the same video effect, and various hardware indexes of a high-end model are excellent in performance. For a high-end model, a CPU can process Y-channel or G-channel data to achieve the effect of positioning facial features, and a filter pendant can be added to a video.
For the low-end model, both the performance of the GPU and the performance of the CPU are poor, particularly in video call, a lot of resources of the GPU are used for video display rendering, if video beautifying is superposed, the video cannot be displayed smoothly, the data in the YUV video format before coding is considered to be processed, only Y data of a single channel is processed, a special Gaussian filtering processing technology is carried out on the Y data, the UV channel is unchanged, the beautifying effect can be achieved, and users of the low-end model can enjoy the video beautifying technology.
And controlling a GPU or a CPU of the first terminal to perform filter processing on the first video according to the first parameter and/or the second parameter to obtain a second video, and previewing the second video locally at the first terminal. And carrying out video reduction and video coding on the second video, and transmitting the second video to the second terminal through the network. After the second terminal receives the video data, the video data is decoded and subjected to video post-processing, and the YUV data is processed in a CPU of the second terminal, so that the effects of video sharpening, video deblocking filtering, contrast enhancement, video de-atomization and suitability for coding, decoding and tuning are achieved. Then, the YUV data is converted into RGB data by the second terminal, and the RGB data is displayed on a display screen.
The video processing method provided by the embodiment of the invention adopts different implementation schemes for a certain fixed filter effect according to different capacities of a CPU and a GPU aiming at different types, such as: if the capability of the model is poor and the processing capability of the GPU is poor, in order to achieve the same beauty effect on the low-end models, a basic quick algorithm of skin grinding is adopted to realize the skin grinding function on the CPU, so that the basic beauty effect is achieved. And aiming at a high-end model, a complex beautifying algorithm is adopted and comprises a face thinning technology, the beautifying and face thinning algorithm is operated on a GPU, a face five sense organs positioning algorithm is performed on a CPU, and finally different users obtain the matched filter effect of the terminal equipment. For a terminal with poor machine type capability, the video is smoothly played in the video chat process; for a high-end model, the powerful CPU and GPU computing power of the high-end model can be separately used, a good filter effect is achieved, and the technical effect of carrying out individualized filter processing according to the model is achieved.
Similarly, there are many implementation schemes for the video filter technology a, one is an RGB format-based implementation scheme with a very good effect on the GPU, and on the CPU, there is a YUV-based technical scheme with almost the same effect.
The GPU performance is sorted in advance, the basic effect A1 of the filter A corresponds to a GPU model with lower performance, the processing links can be gradually increased along with the enhancement of the GPU performance, and the detailed experience of a user is better and better. The same applies to the CPU. Taking the beauty technology as an example, if the GPU performance of the mobile phone terminal has more redundancy than the CPU resource (such a redundancy comparison strategy is counted by big data in advance), the GPU resource is preferentially used to achieve the basic peeling and pox removing effect, and as the GPU performance increases, the deployable technologies also increase, such as a high-end model, which is more suitable for adopting more processing technologies, such as skin color adjustment based on human face, color adjustment of dim light, and final video sharpening enhancement processing, as shown in fig. 4.
The same algorithm filter A is preferentially used in the GPU or the CPU, and is judged according to the comprehensive capacity of the GPU and the CPU of the equipment terminal.
Such as:
model T1 has a general GPU hardware performance, and a general CPU performance, and preferentially uses the CPU to add the beauty filtering processing.
Model T2, GPU is the most basic, such model enables basic versions of beauty on the CPU.
The model T3 is an Android mobile phone with 1.2GHz dual-core CPU, the GPU performance is general, and the model can use basic color filter on the CPU, such as a filter which only processes Y-channel data, such as a gray level graph and edge detection.
Model T4, GPU performance is general, can be based on the beautiful face of basic version.
The model T5 has better GPU performance, and can be used for beautifying the basic edition with the previous superposition function (basic beautifying and tone adjustment).
The model T5 has good GPU performance, and can achieve the beauty effect of the complex version.
The following describes a specific video processing technique according to an embodiment of the present invention by taking skin beautifying, peeling and whitening as an example.
When the user experiences the beauty filter, the interfaces of all terminal devices are the same, fig. 5 shows that the user uses the guide diagram of the video call function for the first time, and if the user clicks to skip, the video is not subjected to filter processing; and if the user clicks to determine, determining whether the CPU or the GPU is used for carrying out filter processing on the video according to the CPU performance parameter (second parameter) and the GPU performance parameter (first parameter) of the terminal. The bottom-layer beautifying image processing technology adopted by different CPUs and GPUs is different for different models. In short, different user interfaces experience the same, but the underlying implementation solutions are different. Before initiating the video chat, the user can perform different degrees of beauty setting.
Fig. 6 shows an implementation flow of the user interface. As shown in fig. 6, the process includes the following steps:
step S602, click the video phone entry.
In step S604, various existing determinations are completed.
Step S606, determine whether the guiding condition of the beauty function is satisfied. If yes, go to step S608; if not, step S616 is performed.
In step S608, a beauty guidance prompt box is popped up.
In step S610, it is determined whether the user selects an attempt. If yes, go to step S612; if not, step S614 is performed.
Step S612, enter the pre-video beauty process.
In step S614, the previous determination process is repeated. If so, go to step S616; if not, the process restarts.
Step S616, enter the video call initiation process.
Filter implementation scheme adaptive to low-end machine type
The low end model filter special effect module positions are shown in fig. 7. The local mobile phone in fig. 7 is the first terminal, and is a low-end phone. The remote handset in fig. 7 is the second terminal.
The low-end model refers to a model with poor CPU performance and GPU performance. In the embodiment of the invention, for a low-end model, a CPU is used for carrying out filter processing on a video, a terminal mobile phone camera acquires video image data, various video image processing (in a camera acquisition module, filter special effect, zooming, preprocessing enhancement and the like) is carried out, various comprehensive data analysis is carried out, parameters suitable for encoder encoding are selected and matched, and the parameters are sent to an encoder for encoding. Specifically, the YUV data format which is acquired by the camera and is suitable for video coding and decoding is universal, in order to reduce data processing, only the Y channel of YUV image data is subjected to buffing processing, and the UV component is not processed, so that the data of the processed video frame is greatly reduced. After the CPU is used for carrying out filter processing on the video, the YUV data is converted into an RGB format, and the RGB data is rendered and displayed, so that the local mobile phone can preview the video. The local mobile phone performs scaling YUV and preprocessing enhancement YUV on the video data processed by the filter, encodes the YUV data by using an encoder, and sends the encoded video data to the far-end mobile phone through a network. The remote mobile phone receives video data sent by the local mobile phone through a network, a decoder is used for decoding the video data (YUV data), the video data is post-processed, the YUV data is converted into RGB data, and the RGB data is rendered and displayed.
Taking a video filter for beauty and skin (fig. 8 shows a filter processing module), other video filters are similar to the processing mode:
1. the beauty and skin care is essentially a filter effect.
2. Timing of beautifying face and skin
1) Skin makeup preview adjustment can be performed before communication;
2) skin makeup real-time adjustment can be performed during the call (in the call process, local preview is adjusted and then transmitted, and in consideration of performance and experience balance, the far-end mobile phone can synchronously see the adjustment effect in the process of uniformly deciding the adjustment of the local mobile phone.
3. The preservation effect is supported.
The technology can support unified effect on all persons and effect on partial persons.
4. The user and the other party need to synchronously see the skin beautifying effect in the conversation.
5. Technically allowing the superposition of two or more filter effects.
6. Controlling by a server: on/off, default effect, statistical operation data on new default intensity effect, different default effect of different people or on/off.
7. Controlling by a client: real-time sliding local preview/remote real-time viewing, saving the intensity of last long-time use.
FIG. 9-1 is a frame of image of the first video, where it can be seen that the wrinkles are darker and the skin color is darker; fig. 9-2 is a frame of image of a second video obtained after the first video is subjected to skin-polishing and whitening according to the video processing method provided by the embodiment of the invention, and it can be seen that compared with fig. 9-1, wrinkles of people are lightened and skin color is whitened in fig. 9-2, so that the effect of beautifying is achieved.
FIG. 10-1 is a frame of image of a first video, where it can be seen that the skin tone of a person is darker; fig. 10-2 is a frame of image in a second video obtained after the first video is subjected to skin-polishing and whitening according to the video processing method provided by the embodiment of the invention, and it can be seen that compared with fig. 10-1, the skin of the human body in fig. 10-2 looks smoother, the skin color is whitened, and the effect of beautifying the face is achieved.
Filter implementation scheme adaptive to high-end machine type
FIG. 11 illustrates a high end model filter special effects module location. The local mobile phone in fig. 11 is the first terminal, and is a high-end phone. The remote handset in fig. 11 is the second terminal.
In the scheme of the adaptive low-end machine shown in fig. 7, only the Y-channel data is subjected to buffing processing, and other processing is not performed, so that the scheme can be applied to an ultra-low-end Android machine type, and users of the low-end machine type can use the skin-beautifying filter effect.
In the adapted high-end machine scheme shown in fig. 11, however, the following is adopted: in a GPU (graphics processing unit) of the mobile phone, processing and peeling processing is carried out on three channels of RGB (red, green and blue), meanwhile, edge detection and edge protection are carried out on RGB image data, the whole image is subjected to bright color processing to process different illumination, video sharpening processing can be further superposed on the finally obtained image before display, and edge information lost due to peeling is made up.
The local mobile phone converts YUV data into RGB format after performing filter processing on the video by using GPU, and renders and displays the RGB data, so that the local mobile phone can preview the video. The local mobile phone performs scaling YUV and preprocessing enhancement YUV on the video data processed by the filter, encodes the YUV data by using an encoder, and sends the encoded video data to the far-end mobile phone through a network. The remote mobile phone receives video data sent by the local mobile phone through a network, a decoder is used for decoding the video data (YUV data), the video data is post-processed, the YUV data is converted into RGB data, and the RGB data is rendered and displayed.
Filter implementation scheme adaptive to high-end machine type and low-end machine type
When the local terminal high-end mobile phone and the opposite terminal low-end mobile phone remotely perform video chat, different implementation schemes are respectively adopted.
In fig. 12, both the local handset and the remote handset are the first terminal and the second terminal.
The local mobile phone records videos in real time, filter processing is carried out on the videos, the local mobile phone serves as a first terminal and sends the videos processed by the filter to the remote mobile phone through a network, and the remote mobile phone serves as a second terminal and receives and plays the videos.
The remote mobile phone records videos in real time, filter processing is carried out on the videos, the remote mobile phone serves as a first terminal and sends the videos processed through the filter to a local mobile phone through a network, and the local mobile phone serves as a second terminal and receives and plays the videos.
The local handset in fig. 12 is a high-end handset type, and the remote handset is a low-end handset type.
In a GPU of a local mobile phone, three channels of RGB are processed and buffed, meanwhile, RGB image data are subjected to edge detection and edge protection, the whole image is subjected to bright color processing to process different illumination, finally obtained images can be subjected to video sharpening processing before being displayed, and edge information lost due to buffing is made up. After the GPU is used for carrying out filter processing on the video, the YUV data is converted into an RGB format, and the RGB data is rendered and displayed, so that the local mobile phone can preview the video. The local mobile phone performs scaling YUV and preprocessing enhancement YUV on the video data processed by the filter, encodes the YUV data by using an encoder, and sends the encoded video data to the far-end mobile phone through a network. The remote mobile phone receives video data sent by the local mobile phone through a network, a decoder is used for decoding the video data (YUV data), the video data is post-processed, the YUV data is converted into RGB data, and the RGB data is rendered and displayed.
For a far-end mobile phone, a CPU is used for carrying out filter processing on a video, a camera acquires a universal YUV data format adaptive to video encoding and decoding, in order to reduce data processing, only the Y channel of YUV image data is subjected to buffing processing, and UV components are not processed, so that the data of processed video frames are greatly reduced. After the CPU is used for carrying out filter processing on the video, the YUV data is converted into an RGB format, and the RGB data is rendered and displayed, so that the far-end mobile phone can preview the video. And the far-end mobile phone performs scaling YUV and preprocessing on the video data processed by the filter to enhance YUV, encodes the YUV data by using an encoder, and sends the encoded video data to the local mobile phone through a network. The local mobile phone receives video data sent by the far-end mobile phone through a network, a decoder is used for decoding the video data (YUV data), the video data is post-processed, the YUV data is converted into RGB data, and the RGB data is rendered and displayed.
Video effects generally fall into several broad categories:
firstly, portrait beautification (skin grinding, whitening, face thinning, red lip and skin ruddy);
secondly, enhancing atmosphere types (holiday scenes, interactive expressions-eyes become red, kisses, clasps and the like);
third, basic filters (elegant, gorgeous, warm, nostalgic, etc. based on the change of color);
fourthly, interactive enhancement class (local mosaic, sectional background changing, 3Davatar and the like);
and fifthly, enhancing reality types (holographic projection, 3D props based on human faces and specific objects and the like-similar fantasy kaka).
In the existing real-time video call, the filter special effect generally has two main problems:
1. most of the videos still stay on the special effect of the solidified filter, and the videos are rarely previewed in real time and sent in real time, so that the video pictures seen by the opposite side and the home terminal are consistent.
2. The negative effect of the video filter special effect superimposed in the video coding and decoding is not considered in most cases, and the video is very jammed in the video chat due to the limitation of the machine type capability.
These two problems, however, will greatly affect the video filter experience of the remote user, including: affecting the definition of the video, the fluency of the motion, etc.
In the video processing method provided by the embodiment of the invention, not only the more pleasant video experience brought to the user by adding the video filter is considered, but also the comprehensive influence on the acquisition frame rate, the acquisition resolution, the encoding and decoding and the like after adding the video filter is comprehensively considered, so that on a terminal with very limited resources such as a mobile phone, the quality of a video call effect is not reduced while the experience of a new function is added to the user, and smooth, clear, stable and power-saving video call can be obtained under the conditions of a low-end machine and low bandwidth; the method can bring a video technology with good experience and easy use for users.
The application of the video filter in the invention is explained by taking a video beautifying function as an example, the video filter is not only used for beautifying a video call of a human face, but also needs to be used together with an image sharpening module and a frame rate adjusting module, so that a beautifying video call effect is obtained under a low bandwidth, and the video filter is used for reducing video noise in a call process, improving the frame rate and enabling the video to be smoother.
In the embodiment of the invention, in the real-time call process, the local preview is adjusted in real time, and the remote end sees the video picture after local adjustment in real time, so that the local seen and remote end can obtain the video filter call effect.
In the embodiment of the invention, the mutual influence of the processing capacities of the CPU and the GPU of the terminal equipment is comprehensively considered end to end, and finally, the video chat experience with the highest cost performance can be obtained by different users under different terminal machine types through various actual tuning.
In the prior art, in the process of filter processing of videos, machine types, CPUs and GPUs are not distinguished basically, and one algorithm is uniformly used for realizing a filter effect, so that for a terminal with poor machine type capability, the terminal is very blocked and the videos are not smooth in the process of video chat, and for a high-end machine type, the powerful CPU and GPU computing capability of the high-end machine type cannot be fully utilized, and the best filter effect cannot be achieved.
The video processing method provided by the embodiment of the invention adopts different implementation schemes for a certain fixed filter effect according to different capacities of a CPU and a GPU aiming at different types, such as: if the capability of the model is poor and the processing capability of the GPU is poor, in order to achieve the same beauty effect on the low-end models, a basic quick algorithm of skin grinding is adopted to realize the skin grinding function on the CPU, so that the basic beauty effect is achieved. Aiming at a high-end model, the most complex beautifying algorithm is adopted and comprises a face thinning technology, the beautifying and face thinning algorithm is operated on a GPU, a facial five sense organs positioning algorithm is performed on a CPU, and finally different users obtain the filter effect matched with the terminal equipment. For a terminal with poor machine type capability, the video is smoothly played in the video chat process; for a high-end model, the powerful CPU and GPU computing capabilities of the high-end model can be separately used, the best filter effect is achieved, and the technical effect of carrying out individualized filter processing according to the model is achieved.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
According to an embodiment of the present invention, there is also provided a video processing apparatus for implementing the above-described video processing method, as shown in fig. 13, the apparatus including: the device comprises an acquisition unit 10, a first control unit 20 and a second control unit 30.
An obtaining unit 10, configured to obtain a first parameter indicating GPU performance of the first terminal and a second parameter indicating CPU performance of the first terminal.
And the first control unit 20 is configured to control a GPU or a CPU of the first terminal to perform filter processing on the first video according to the first parameter and/or the second parameter to obtain a second video, where the first video is a video recorded by the first terminal in real time.
And a second control unit 30, configured to control the first terminal to send the second video to the second terminal, where the second terminal is configured to display the second video in real time.
Optionally, the first control unit 20 comprises: a determining subunit and a control subunit. And the determining subunit is used for determining a target filter mode according to the first parameter and/or the second parameter, wherein the target filter mode comprises first indication information, and the first indication information is used for indicating that the GPU or the CPU is adopted to carry out filter processing on the first video. And the control subunit is used for controlling the GPU or the CPU of the first terminal indicated by the target filter mode to perform filter processing on the first video to obtain a second video.
Optionally, the determining the subunit comprises: the device comprises a judging module, a first generating module and a second generating module. And the judging module is used for judging whether the first parameter meets a first preset condition. And the first generating module is used for generating a target filter mode comprising first sub-indication information under the condition that the first parameter meets a first preset condition, wherein the first sub-indication information is used for indicating that the GPU of the first terminal is adopted to carry out filter processing on the first video. And the second generating module is used for generating a target filter mode comprising second sub-indication information under the condition that the first parameter does not meet the first preset condition, wherein the second sub-indication information is used for indicating that the CPU of the first terminal is adopted to carry out filter processing on the first video.
Optionally, the apparatus further comprises: and calling the unit. And the calling unit is used for performing filter enhancement processing on a Y channel of YUV image data of the first video by adopting a CPU of the first terminal after the second generation module generates a target filter mode comprising the second sub-indication information, and performing adjustment processing on chromaticity and tone according to an image histogram lookup table by using a UV channel.
Optionally, the first generating module comprises: the device comprises a judgment submodule, a first generation submodule and a second generation submodule. And the judging submodule is used for judging whether the first parameter meets a second preset condition or not under the condition that the first parameter meets the first preset condition. And the first generation submodule is used for generating first level indication information in the first sub-indication information under the condition that the first parameter meets a second preset condition, wherein the first level indication information is used for indicating that the GPU of the first terminal is adopted to perform first-level filter processing on the first video. And the second generation submodule is used for generating second level indication information in the first sub-indication information under the condition that the first parameter does not meet a second preset condition, wherein the second level indication information is used for indicating that the GPU of the first terminal is adopted to perform second-level filter processing on the first video, and the resource consumption of the GPU is greater when the first-level filter processing is performed on the first video than when the second-level filter processing is performed on the first video.
Optionally, the first level of filter processing on the first video comprises at least one of: carrying out filter processing on three channels of RGB image data of a first video; performing edge detection on RGB image data of a first video; performing brightness and color contrast processing on the first video; and carrying out sharpening processing on the first video.
Optionally, the apparatus further comprises: and a memory unit. And the storage unit is used for performing associated storage on the identification information of the first terminal and the target filter mode after the determining subunit determines the target filter mode according to the first parameter and/or the second parameter, so that the target filter mode is searched according to the identification information, and the first terminal performs filter processing on the first video.
According to an embodiment of the present invention, there is also provided a server for implementing the above-described video processing method, as shown in fig. 14, the server mainly including a processor 1401, a display 1403, a data interface 1404, a memory 1405, and a network interface 1406, wherein:
data interface 1404 then transmits the target filter pattern associated with the first terminal to processor 1401 primarily by way of data transmission.
The memory 1405 is mainly used for storing the association relationship between the first terminal and the target filter pattern.
The network interface 1406 is mainly used for network communication with terminals and other servers.
The display 1403 is mainly used for displaying the first parameter, the second parameter, and the association relationship between the first terminal and the target filter mode.
The processor 1401 is primarily configured to perform the following operations:
acquiring a first parameter for indicating GPU performance of a first terminal and a second parameter for indicating CPU performance of the first terminal; controlling a GPU or a CPU of the first terminal to perform filter processing on the first video according to the first parameter and/or the second parameter to obtain a second video, wherein the first video is a video recorded by the first terminal in real time; and controlling the first terminal to send the second video to the second terminal, wherein the second terminal is used for displaying the second video in real time.
The processor 1401 is further configured to perform: determining a target filter mode according to the first parameter and/or the second parameter, wherein the target filter mode comprises first indication information, and the first indication information is used for indicating that filter processing is carried out on the first video by adopting a GPU or a CPU; and controlling the GPU or the CPU of the first terminal indicated by the target filter mode to perform filter processing on the first video to obtain a second video.
The processor 1401 is further configured to perform: judging whether the first parameter meets a first preset condition or not; under the condition that the first parameter meets a first preset condition, generating a target filter mode comprising first sub-indication information, wherein the first sub-indication information is used for indicating that filter processing is carried out on a first video by adopting a GPU of a first terminal; and under the condition that the first parameter does not meet the first preset condition, generating a target filter mode comprising second sub-indication information, wherein the second sub-indication information is used for indicating that the CPU of the first terminal is adopted to carry out filter processing on the first video.
The processor 1401 is further configured to perform: and performing filter enhancement processing on a Y channel of the YUV image data of the first video by adopting the CPU of the first terminal, and performing adjustment processing on the chromaticity and tone of the UV channel according to an image histogram lookup table.
The processor 1401 is further configured to perform: under the condition that the first parameter meets a first preset condition, judging whether the first parameter meets a second preset condition; under the condition that the first parameter meets a second preset condition, generating first level indication information in the first sub-indication information, wherein the first level indication information is used for indicating that the GPU of the first terminal is adopted to perform first-level filter processing on the first video; and under the condition that the first parameter does not meet a second preset condition, generating second level indication information in the first sub-indication information, wherein the second level indication information is used for indicating that the GPU of the first terminal is adopted to perform second-level filter processing on the first video, and the resource consumption of the GPU is greater when the first-level filter processing is performed on the first video than when the second-level filter processing is performed on the first video.
The processor 1401 is further configured to perform: carrying out filter processing on three channels of RGB image data of a first video; performing edge detection on RGB image data of a first video; performing brightness and color contrast processing on the first video; and carrying out sharpening processing on the first video.
The processor 1401 is further configured to perform: and performing associated storage on the identification information of the first terminal and the target filter mode so as to search the target filter mode according to the identification information, so that the first terminal performs filter processing on the first video.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
The embodiment of the invention also provides a storage medium. Alternatively, in this embodiment, the storage medium may be configured to store program codes of the video processing method according to the embodiment of the present invention.
Optionally, in this embodiment, the storage medium may be located in at least one of a plurality of network devices in a network of a mobile communication network, a wide area network, a metropolitan area network, or a local area network.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps:
s1, acquiring a first parameter for indicating the GPU performance of the first terminal and a second parameter for indicating the CPU performance of the first terminal;
s2, controlling a GPU or a CPU of the first terminal to perform filter processing on the first video according to the first parameter and/or the second parameter to obtain a second video, wherein the first video is a video recorded by the first terminal in real time;
and S3, controlling the first terminal to send the second video to the second terminal, wherein the second terminal is used for displaying the second video in real time.
Optionally, in this embodiment, the processor executes, according to the program code stored in the storage medium: determining a target filter mode according to the first parameter and/or the second parameter, wherein the target filter mode comprises first indication information, and the first indication information is used for indicating that filter processing is carried out on the first video by adopting a GPU or a CPU; and controlling the GPU or the CPU of the first terminal indicated by the target filter mode to perform filter processing on the first video to obtain a second video.
Optionally, in this embodiment, the processor executes, according to the program code stored in the storage medium: judging whether the first parameter meets a first preset condition or not; under the condition that the first parameter meets a first preset condition, generating a target filter mode comprising first sub-indication information, wherein the first sub-indication information is used for indicating that filter processing is carried out on a first video by adopting a GPU of a first terminal; and under the condition that the first parameter does not meet the first preset condition, generating a target filter mode comprising second sub-indication information, wherein the second sub-indication information is used for indicating that the CPU of the first terminal is adopted to carry out filter processing on the first video.
Optionally, in this embodiment, the processor executes, according to the program code stored in the storage medium: and performing filter enhancement processing on a Y channel of the YUV image data of the first video by adopting the CPU of the first terminal, and performing adjustment processing on the chromaticity and tone of the UV channel according to an image histogram lookup table.
Optionally, in this embodiment, the processor executes, according to the program code stored in the storage medium: under the condition that the first parameter meets a first preset condition, judging whether the first parameter meets a second preset condition; under the condition that the first parameter meets a second preset condition, generating first level indication information in the first sub-indication information, wherein the first level indication information is used for indicating that the GPU of the first terminal is adopted to perform first-level filter processing on the first video; and under the condition that the first parameter does not meet a second preset condition, generating second level indication information in the first sub-indication information, wherein the second level indication information is used for indicating that the GPU of the first terminal is adopted to perform second-level filter processing on the first video, and the resource consumption of the GPU is greater when the first-level filter processing is performed on the first video than when the second-level filter processing is performed on the first video.
Optionally, in this embodiment, the processor executes, according to the program code stored in the storage medium: carrying out filter processing on three channels of RGB image data of a first video; performing edge detection on RGB image data of a first video; performing brightness and color contrast processing on the first video; and carrying out sharpening processing on the first video.
Optionally, in this embodiment, the processor executes, according to the program code stored in the storage medium: and performing associated storage on the identification information of the first terminal and the target filter mode so as to search the target filter mode according to the identification information, so that the first terminal performs filter processing on the first video.
Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A video processing method, comprising:
when a home terminal high-end mobile phone and an opposite terminal low-end mobile phone are remotely subjected to video chat, wherein a first terminal is the home terminal high-end mobile phone, a second terminal is the opposite terminal low-end mobile phone, the GPU performance parameter of the home terminal high-end mobile phone meets a first preset condition, the GPU performance parameter of the opposite terminal low-end mobile phone does not meet the first preset condition,
at the first terminal side:
acquiring a first parameter for indicating GPU performance of a first terminal and a second parameter for indicating CPU performance of the first terminal;
controlling a GPU or a CPU of the first terminal to perform filter processing on a first video according to the first parameter and/or the second parameter to obtain a second video, wherein the first video is a video recorded by the first terminal in real time, and the controlling the GPU or the CPU of the first terminal to perform filter processing on the first video according to the first parameter and/or the second parameter to obtain the second video comprises: processing and peeling three channels of RGB of the first video in a GPU of the first terminal, performing edge detection and edge protection on RGB image data of the first video, performing brightness processing on the whole image to process different illumination, and performing video sharpening processing on the finally obtained image before display;
controlling the first terminal to send the second video to the second terminal, wherein the second terminal is used for displaying the second video in real time;
at the second terminal side:
acquiring a third parameter for indicating the GPU performance of the second terminal and a fourth parameter for indicating the CPU performance of the second terminal;
performing buffing processing on a Y channel of YUV image data of a third video by using a CPU of the second terminal, and not processing a UV component, wherein the third video is a video recorded by the second terminal in real time;
and controlling the second terminal to send a fourth video to the first terminal, wherein the first terminal is used for displaying the fourth video in real time.
2. The method according to claim 1, wherein controlling a GPU or a CPU of the first terminal to perform filter processing on a first video according to the first parameter and/or the second parameter to obtain a second video comprises:
determining a target filter mode according to the first parameter and/or the second parameter, wherein the target filter mode comprises first indication information, and the first indication information is used for indicating that filter processing is performed on the first video by using a GPU or a CPU;
and controlling the GPU or the CPU of the first terminal indicated by the target filter mode to perform filter processing on the first video to obtain the second video.
3. The method of claim 2, wherein determining a target filter mode from the first parameter and/or the second parameter comprises:
judging whether the first parameter meets the first preset condition or not;
and generating a target filter mode comprising first sub-indication information under the condition that the first parameter meets the first preset condition, wherein the first sub-indication information is used for indicating that the GPU of the first terminal is adopted to carry out filter processing on the first video.
4. The method according to claim 3, wherein generating a target filter pattern including first sub-indication information in case that the first parameter satisfies the first preset condition comprises:
under the condition that the first parameter meets the first preset condition, judging whether the first parameter meets a second preset condition;
generating first level indication information in the first sub-indication information under the condition that the first parameter meets the second preset condition, wherein the first level indication information is used for indicating that the GPU of the first terminal is adopted to perform first-level filter processing on the first video;
and under the condition that the first parameter does not meet the second preset condition, generating second level indication information in the first sub-indication information, wherein the second level indication information is used for indicating that the GPU of the first terminal is adopted to perform second-level filter processing on the first video, and the resource consumption of the GPU is greater when the first-level filter processing is performed on the first video than when the second-level filter processing is performed on the first video.
5. The method of claim 2, wherein after determining a target filter pattern from the first parameter and/or the second parameter, the method further comprises:
and performing association storage on the identification information of the first terminal and the target filter mode so as to search the target filter mode according to the identification information and enable the first terminal to perform filter processing on the first video.
6. A video processing apparatus, comprising:
when a home terminal high-end mobile phone and an opposite terminal low-end mobile phone are remotely subjected to video chat, wherein a first terminal is the home terminal high-end mobile phone, a second terminal is the opposite terminal low-end mobile phone, the GPU performance parameter of the home terminal high-end mobile phone meets a first preset condition, the GPU performance parameter of the opposite terminal low-end mobile phone does not meet the first preset condition,
at the first terminal side:
the terminal comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a first parameter for indicating the GPU performance of a first terminal and a second parameter for indicating the CPU performance of the first terminal;
a first control unit, configured to control a GPU or a CPU of the first terminal to perform filter processing on a first video according to the first parameter and/or the second parameter to obtain a second video, where the first video is a video recorded by the first terminal in real time, and the GPU or the CPU of the first terminal is controlled to perform filter processing on the first video according to the first parameter and/or the second parameter to obtain the second video, and the method includes: processing and peeling three channels of RGB of the first video in a GPU of the first terminal, performing edge detection and edge protection on RGB image data of the first video, performing brightness processing on the whole image to process different illumination, and performing video sharpening processing on the finally obtained image before display;
the second control unit is used for controlling the first terminal to send the second video to a second terminal, wherein the second terminal is used for displaying the second video in real time;
at the second terminal side:
the acquiring unit is used for acquiring a third parameter for indicating the GPU performance of the second terminal and a fourth parameter for indicating the CPU performance of the second terminal;
the first control unit is used for performing buffing processing on a Y channel of YUV image data of a third video by using a CPU of the second terminal, and not processing a UV component, wherein the third video is a video recorded by the second terminal in real time;
the second control unit is configured to control the second terminal to send a fourth video to the first terminal, where the first terminal is configured to display the fourth video in real time.
7. The apparatus of claim 6, wherein the first control unit comprises:
a determining subunit, configured to determine a target filter mode according to the first parameter and/or the second parameter, where the target filter mode includes first indication information, and the first indication information is used to indicate that a GPU or a CPU is used to perform filter processing on the first video;
and the control subunit is configured to control the GPU or the CPU of the first terminal indicated by the target filter mode to perform filter processing on the first video to obtain the second video.
8. The apparatus of claim 7, wherein the determining subunit comprises:
the judging module is used for judging whether the first parameter meets the first preset condition or not;
a first generating module, configured to generate a target filter mode including first sub-indication information when the first parameter meets the first preset condition, where the first sub-indication information is used to indicate that a GPU of the first terminal is used to perform filter processing on the first video.
9. The apparatus of claim 8, wherein the first generating module comprises:
the judgment submodule is used for judging whether the first parameter meets a second preset condition or not under the condition that the first parameter meets the first preset condition;
the first generation submodule is used for generating first level indication information in the first sub-indication information under the condition that the first parameter meets the second preset condition, wherein the first level indication information is used for indicating that the GPU of the first terminal is adopted to perform first-level filter processing on the first video;
and a second generation sub-module, configured to generate second level indication information in the first sub-indication information when the first parameter does not satisfy the second preset condition, where the second level indication information is used to indicate that the GPU of the first terminal is used to perform second-level filter processing on the first video, and resource consumption of the GPU is greater when the GPU performs the first-level filter processing on the first video than when the GPU performs the second-level filter processing on the first video.
10. The apparatus of claim 7, further comprising:
and the storage unit is used for associating and storing the identification information of the first terminal with the target filter mode after the determining subunit determines the target filter mode according to the first parameter and/or the second parameter, so as to search the target filter mode according to the identification information, and enable the first terminal to perform filter processing on the first video.
CN201710071869.9A 2017-02-09 2017-02-09 Video processing method and device Active CN108337465B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710071869.9A CN108337465B (en) 2017-02-09 2017-02-09 Video processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710071869.9A CN108337465B (en) 2017-02-09 2017-02-09 Video processing method and device

Publications (2)

Publication Number Publication Date
CN108337465A CN108337465A (en) 2018-07-27
CN108337465B true CN108337465B (en) 2021-05-14

Family

ID=62922651

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710071869.9A Active CN108337465B (en) 2017-02-09 2017-02-09 Video processing method and device

Country Status (1)

Country Link
CN (1) CN108337465B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109379629A (en) * 2018-11-27 2019-02-22 Oppo广东移动通信有限公司 Method for processing video frequency, device, electronic equipment and storage medium
CN109474833B (en) * 2018-11-28 2020-11-27 广州华多网络科技有限公司 Network live broadcast method, related device and system
CN110062278A (en) * 2019-04-12 2019-07-26 北京字节跳动网络技术有限公司 Video data issues method, apparatus, electronic equipment and storage medium
CN110798622B (en) * 2019-11-29 2022-01-25 维沃移动通信有限公司 Shared shooting method and electronic equipment
CN111147801A (en) * 2019-12-31 2020-05-12 视联动力信息技术股份有限公司 Video data processing method and device for video networking terminal
CN112243157A (en) * 2020-10-14 2021-01-19 北京字节跳动网络技术有限公司 Live broadcast control method and device, electronic equipment and computer readable medium
CN112532963B (en) * 2020-12-18 2023-07-18 深圳臻像科技有限公司 AR-based three-dimensional holographic real-time interaction system and method
CN113573120B (en) * 2021-06-16 2023-10-27 北京荣耀终端有限公司 Audio processing method, electronic device, chip system and storage medium
CN115297359A (en) * 2022-07-29 2022-11-04 北京字跳网络技术有限公司 Multimedia data transmission method and device, electronic equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1897732A (en) * 2005-07-12 2007-01-17 乐金电子(中国)研究开发中心有限公司 Mobile communication terminal video frequency talk method and device
CN101354780A (en) * 2007-07-26 2009-01-28 Lg电子株式会社 Graphic data processing apparatus and method
CN103164839A (en) * 2013-03-07 2013-06-19 华为技术有限公司 Method, device and terminal for drawing
CN104392409A (en) * 2014-12-01 2015-03-04 厦门美图之家科技有限公司 Acceleration method for beautifying image
CN105657321A (en) * 2015-11-09 2016-06-08 乐视致新电子科技(天津)有限公司 Adaptive video definition adjusting method, apparatus and terminal
CN105979194A (en) * 2016-05-26 2016-09-28 努比亚技术有限公司 Video image processing apparatus and method
CN106303361A (en) * 2015-06-11 2017-01-04 阿里巴巴集团控股有限公司 Image processing method, device, system and graphic process unit in video calling
CN106375789A (en) * 2016-09-05 2017-02-01 腾讯科技(深圳)有限公司 Media live broadcast method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8503539B2 (en) * 2010-02-26 2013-08-06 Bao Tran High definition personal computer (PC) cam

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1897732A (en) * 2005-07-12 2007-01-17 乐金电子(中国)研究开发中心有限公司 Mobile communication terminal video frequency talk method and device
CN101354780A (en) * 2007-07-26 2009-01-28 Lg电子株式会社 Graphic data processing apparatus and method
CN103164839A (en) * 2013-03-07 2013-06-19 华为技术有限公司 Method, device and terminal for drawing
CN104392409A (en) * 2014-12-01 2015-03-04 厦门美图之家科技有限公司 Acceleration method for beautifying image
CN106303361A (en) * 2015-06-11 2017-01-04 阿里巴巴集团控股有限公司 Image processing method, device, system and graphic process unit in video calling
CN105657321A (en) * 2015-11-09 2016-06-08 乐视致新电子科技(天津)有限公司 Adaptive video definition adjusting method, apparatus and terminal
CN105979194A (en) * 2016-05-26 2016-09-28 努比亚技术有限公司 Video image processing apparatus and method
CN106375789A (en) * 2016-09-05 2017-02-01 腾讯科技(深圳)有限公司 Media live broadcast method and device

Also Published As

Publication number Publication date
CN108337465A (en) 2018-07-27

Similar Documents

Publication Publication Date Title
CN108337465B (en) Video processing method and device
CN105744342B (en) The data transmission method and device of mobile terminal
JP6698081B2 (en) Method for encoding, video processor, method for decoding, video decoder
US10720091B2 (en) Content mastering with an energy-preserving bloom operator during playback of high dynamic range video
TWI547136B (en) Establishing a video conference during a phone call
US11770510B2 (en) Video information compression using sketch-video
WO2020097888A1 (en) Video processing method and apparatus, electronic device, and computer-readable storage medium
US20150034643A1 (en) Sealing disk for induction sealing a container
US20140341280A1 (en) Multiple region video conference encoding
CN115242992B (en) Video processing method, device, electronic equipment and storage medium
CN109076246A (en) Use the method for video coding and system of image data correction mask
CN109640167A (en) Method for processing video frequency, device, electronic equipment and storage medium
CN113810641B (en) Video processing method and device, electronic equipment and storage medium
CN113747240B (en) Video processing method, apparatus and storage medium
JPH0662385A (en) Refresh-corrected image-encoding sub- assembly of data to be encoded and decoding subassembly of image encoded by above subassembly
CN101998051A (en) Image display control device, imaging device provided with the image display control device, image processing device
WO2016060672A1 (en) Video coding using a saliency map
Hartung et al. Object-oriented H. 263 compatible video coding platform for conferencing applications
CN114449199B (en) Video processing method and device, electronic equipment and storage medium
CN113824914B (en) Video processing method and device, electronic equipment and storage medium
CN112262570A (en) Method and system for automatic real-time frame segmentation of high-resolution video streams into constituent features and modification of features in individual frames to create multiple different linear views from the same video source simultaneously
WO2016183154A1 (en) Improved color space compression
US11544830B2 (en) Enhancing image data with appearance controls
CN113691737B (en) Video shooting method and device and storage medium
CN113489899A (en) Special effect video recording method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant