Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
As shown in Figure 1, be a kind of video picture quality enhancement of embodiment of the present invention player method schematic flow sheet, described method comprises:
101, the video data that Video decoding module exports is obtained;
102, picture quality enhancement process is carried out to each pixel of every frame of described video data;
103, the output of the video data after picture quality enhancement process broadcasting is carried out by described.
Optionally, described each pixel of every frame to described video data carries out picture quality enhancement process, can comprise: the picture quality enhancement process each pixel of every frame of described video data being carried out respectively to color, gamma correction and gray value.This process can realize the enhance operation each pixel of every frame of video being carried out to color, gamma correction and gray value.
Optionally, described each pixel of every frame to described video data carries out the picture quality enhancement process of color, gamma correction and gray value respectively, can comprise: call the picture quality enhancement process that concurrent each pixel of every frame to described video data of multimedia instruction set carries out color, gamma correction and gray value respectively.This process can be optimized process computing, makes system process quick.
Optionally, as shown in Figure 2, for the embodiment of the present invention each pixel of every frame to video data carries out the picture quality enhancement handling process schematic diagram of color, gamma correction and gray value respectively, can comprise:
1021, be RGB (RGB) space by the color space of every frame of described video data from YUV (brightness signal Y and two color difference signals U, V) space transforming;
1022, color is carried out to the RGB three primary colors of pixel each in frame and strengthen process;
1023, the color space of every frame is converted to yuv space from rgb space;
1024, gamma correction process is carried out to the luminance Y signals of pixel each in frame;
1025, when grey jump is more than or equal to preset threshold value, Edge contrast is carried out to the grey decision-making of pixel each in frame.
Optionally, the described luminance Y signals to pixel each in frame carries out gamma correction process, can comprise: by Gamma correction question blank, carries out gamma correction process to the luminance Y signals of pixel each in frame.This process can be optimized process computing, makes system process quick.
Optionally, described each pixel of every frame to described video data carries out picture quality enhancement process, can comprise: opened the process of video picture quality enhancement if judge when carrying out video playback next time, then automatically start and picture quality enhancement process is carried out to each pixel of every frame of video data.In order to adapt to the demand of user, opened the prerequisite of picture quality enhancement function user under, just can automatically start when next time plays or close post-processing module.
Optionally, described each pixel of every frame to described video data carries out picture quality enhancement process, can comprise: if judge, the resolution of the frame of described video data is less than 1280*780, then carry out picture quality enhancement process to each pixel of every frame of described video data.Call multimedia instruction set when calculating in different color space, need larger resource consumption, therefore player only just carries out picture quality enhancement process when resolution is less than 1280*780, reduces resource consumption.
Said method embodiment of the present invention reaches and strengthens video image quality, obtains the technique effect of the video of better image quality.
As shown in Figure 3, be the terminal structural representation that a kind of video picture quality enhancement of the embodiment of the present invention is play, described terminal comprises:
Post-processing module 31, for obtaining the video data that Video decoding module exports, carries out picture quality enhancement process to each pixel of every frame of described video data;
Playing controller 32, for carrying out the output of the video data after picture quality enhancement process broadcasting by described.
Optionally, described post-processing module, specifically for carrying out the picture quality enhancement process of color, gamma correction and gray value respectively to each pixel of every frame of described video data.This processing module can realize the enhance operation each pixel of every frame of video being carried out to color, gamma correction and gray value.
Optionally, described post-processing module, carries out the picture quality enhancement process of color, gamma correction and gray value respectively specifically for calling concurrent each pixel of every frame to described video data of multimedia instruction set.This processing module can be optimized process computing, makes system process quick.
Optionally, as shown in Figure 4, be embodiment of the present invention post-processing module structural representation, comprise:
Color space converting unit 311, the color space for the every frame by described video data is converted to rgb space from yuv space;
Color enhancement unit 312, strengthens process for carrying out color to the RGB three primary colors of pixel each in frame;
Described color space converting unit 311, also for the color space of every frame is converted to yuv space from rgb space;
Gammate 313, for carrying out gamma correction process to the luminance Y signals of pixel each in frame;
Sharpening unit 314, for carrying out Edge contrast to the grey decision-making of pixel each in frame when grey jump is more than or equal to preset threshold value.
Optionally, described gammate 313, is further used for by Gamma correction question blank, carries out gamma correction process to the luminance Y signals of pixel each in frame.This processing unit can be optimized process computing, makes system process quick.
Optionally, described post-processing module 31, judges when carrying out video playback next time if be further used for open the process of video picture quality enhancement, then automatically start and carry out picture quality enhancement process to each pixel of every frame of video data.In order to adapt to the demand of user, opened the prerequisite of picture quality enhancement function user under, just can automatically start when next time plays or close post-processing module.
Optionally, described post-processing module 31, judges that if be further used for the resolution of the frame of described video data is less than 1280*780, then carry out picture quality enhancement process to each pixel of every frame of described video data.Call multimedia instruction set when calculating in different color space, need larger resource consumption, therefore player only just carries out picture quality enhancement process when resolution is less than 1280*780, reduces resource consumption.
Said apparatus embodiment of the present invention reaches and strengthens video image quality, obtains the technique effect of the video of better image quality.
As shown in Figure 5, be application example intelligence picture quality enhancement terminal structural representation of the present invention, comprise player, transmission control end, audio playing apparatus, User Interface and memory module.Separation module, audio decoder module, Video decoding module, playing controller, audio frequency rendering module, Video Rendering module and playback interface that this player comprises data communication interface, file read module, generation request of data and classified by resource data.Through delivering to audio playing apparatus by audio frequency rendering module after this audio decoder module exports, this Video decoding module exports through being delivered to the broadcasting Logic control module of User Interface by Video Rendering module after the picture quality enhancement process of post-processing module, and presents to user by the broadcast window of User Interface.
Wherein, file read module by data communication interface from transmission control end Gains resources data.The node (other terminals) that the transmission control module of transmission control end adopts proprietary protocol or P2P agreement and usertracking server and has a resource data carries out communication.
During playing audio-video document, the resource data received is preserved or is kept at a memory module temporarily by transmission control end, as Disk Locality or core position, and preservation address is sent to data communication interface, separation module constantly reads resource data in the mode of request/response from preservation position by file read module and data communication module.
Resource data is classified by this separation module, and voice data is sent to audio decoder module, video data sends to Video decoding module.The frame of parsing transfers to post-processing module each pixel to every frame to carry out the three picture quality enhancement process of aspect of color, gamma correction and grey decision-making by Video decoding module.Frame of video through picture quality enhancement process presents to user by the broadcast window of User Interface after rendering module process.User starts post-processing module by the video source modeling button clicked on User Interface and carries out picture quality enhancement operation.As shown in Figure 6, be application example player workflow schematic diagram of the present invention, comprise the steps:
601, player is started;
602, video and audio file is play;
603, do you judge that post-processing module starts? if so, then 604 are gone to step; If not, then 602 are gone to step;
604, Video decoding module sends frame of video to post-processing module;
605, the color space of every frame is converted to rgb space from yuv space by post-processing module;
606, post-processing module calls multimedia instruction set;
607, the RGB three primary colors of color enhancement unit to pixel each in frame carry out enhancing process;
Color enhancement unit determines the coefficient f (between 0.08 to 0.09) adjusting color.
Strengthen respectively R, G, B three primary colors, the three primary colors after wherein strengthening are denoted as R ', G ', B '.
R=R+(2R-G-B)*f;
G=G+(2G-R-B)*f;
B=B+(2B-R-G)*f。
608, do you judge that the trichromatic enhancing of RGB has processed? if so, then 609 are gone to step; If not, then 607 are gone to step;
609, the color space of every frame is converted to yuv space from rgb space by post-processing module;
610, the luminance Y signals of Gamma correction unit to pixel each in frame carries out Gamma correction process;
The parameter g (between 1 to 1.04) of Gamma correction unit determination Gamma correction.
X-axis represents capture video;
Y-axis represents display video;
As shown in Figure 7, be the relation schematic diagram of application example capture video of the present invention and display video: curve 1 is the relation of ideally capture video and display video, and curve 2 is distortion curves of capture video, and curve 3 is correction curves.
Y=X
g;
Y=X
l/g。
611, do you judge that the Gamma correction process of luminance Y signals completes? if so, then 612 are gone to step; If not, then 610 are gone to step;
612, sharpening unit carries out Edge contrast to the grey decision-making of pixel each in frame when grey jump Diff is greater than threshold value t;
As shown in Figure 8, be the schematic diagram of application example shade of gray of the present invention:
Sharpening unit determination sharpening parameter K (between 0.2 to 0.4)
Adjustment represents the Y value of shade of gray.Threshold value t is 6.
Threshold value t, Diff < t are less than to difference Diff, do not carry out shade of gray and strengthen operation.
Threshold value t, Diff >=t are more than or equal to difference Diff, just carry out shade of gray and strengthen operation.
Calculate excessive shade of gray y;
y=Y
c+Y
u+Y
d+Y
1+Y
r;
Diff=/5Y
c-y/;
Threshold value t, Diff >=t are more than or equal to difference Diff, carry out shade of gray and strengthen operation.
5Y
c-y>0,Y=Y
c+(Diff*K);
5Y
c-y<0,Y=Y
c-(Diff*K)。
613, the broadcast window of User Interface shows the video after this enhancing.
The speed-up computation prioritization scheme of post-processing module:
1, call the computing that multimedia instruction set carrys out concurrent processing picture quality enhancement, such as, to once-through operation, concurrently can carry out the RGB color enhance operation of 8 pixels;
2, because after Gamma correction, the primary colors of each pixel only has 0-255 kind to change.
Set up Gamma correction question blank, reduce calculation step, improve video processing speed.
R’=R
l/g=(0,1,2…255)
l/g;
G’=G
l/g=(0,1,2…255)
l/g;
B’=B
l/g=(0,1,2…255)
1/g;
R=table[R];
G=table[G];
B=table[B]。
Call multimedia instruction set when post-processing module calculates in different color space, need larger resource consumption, therefore player only just can carry out picture quality enhancement process when resolution is less than 1280*780.Simultaneously in order to adapt to the demand of user, also under user opened the prerequisite of picture quality enhancement function, automatically can start when next time plays just understand or close post-processing module.As shown in Figure 9, be application example player intelligent opening augmented video function operation schematic flow sheet of the present invention, comprise the steps:
901, player follow-up play is started;
902, video and audio file is play;
903, do you judge that post-processing module has startup record? if so, then 904 are gone to step; If not, then 902 are gone to step;
904, do you judge that the frame resolution that Video decoding module is sent here is less than 1280*780? if so, then 906 are gone to step; If not, then 905 are gone to step;
905, the broadcast window of User Interface shows undressed video, then goes to step 902;
906, post-processing module starts video source modeling operation automatically;
907, the color space of every frame is converted to rgb space from yuv space by post-processing module;
908, post-processing module calls multimedia instruction set;
909, the RGB three primary colors of color enhancement unit to pixel each in frame carry out enhancing process;
910, do you judge that the trichromatic enhancing of RGB has processed? if so, then 911 are gone to step; If not, then 909 are gone to step;
911, the color space of every frame is converted to yuv space from rgb space by post-processing module;
912, the luminance Y signals of Gamma correction unit to pixel each in frame carries out Gamma correction process;
913, do you judge that the Gamma correction process of luminance Y signals completes? if so, then 914 are gone to step; If not, then 912 are gone to step;
914, sharpening unit carries out Edge contrast to the grey decision-making of pixel each in frame when grey jump Diff is greater than threshold value t;
915, the broadcast window of User Interface shows the video after this enhancing.
The above-mentioned application example user of the present invention, when playing video and audio file, obtains the video of better image quality.
Those skilled in the art can also recognize the various illustrative components, blocks (illustrative logical block) that the embodiment of the present invention is listed, unit, and step can pass through electronic hardware, computer software, or both combinations realize.For the replaceability (interchangeability) of clear displaying hardware and software, above-mentioned various illustrative components (illustrative components), unit and step have universally described their function.Such function is the designing requirement realizing depending on specific application and whole system by hardware or software.Those skilled in the art for often kind of specifically application, can use the function described in the realization of various method, but this realization can should not be understood to the scope exceeding embodiment of the present invention protection.
Various illustrative logical block described in the embodiment of the present invention, or unit can pass through general processor, digital signal processor, application-specific integrated circuit (ASIC) (ASIC), field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the design of above-mentioned any combination realizes or operates described function.General processor can be microprocessor, and alternatively, this general processor also can be any traditional processor, controller, microcontroller or state machine.Processor also can be realized by the combination of calculation element, such as digital signal processor and microprocessor, multi-microprocessor, and a Digital Signal Processor Core combined by one or more microprocessor, or other similar configuration any realizes.
The software module that method described in the embodiment of the present invention or the step of algorithm directly can embed hardware, processor performs or the combination of both.Software module can be stored in the storage medium of other arbitrary form in RAM memory, flash memory, ROM memory, eprom memory, eeprom memory, register, hard disk, moveable magnetic disc, CD-ROM or this area.Exemplarily, storage medium can be connected with processor, with make processor can from storage medium reading information, and write information can be deposited to storage medium.Alternatively, storage medium can also be integrated in processor.Processor and storage medium can be arranged in ASIC, and ASIC can be arranged in user terminal.Alternatively, processor and storage medium also can be arranged in the different parts in user terminal.
In one or more exemplary design, the above-mentioned functions described by the embodiment of the present invention can realize in the combination in any of hardware, software, firmware or this three.If realized in software, these functions can store on the medium with computer-readable, or are transmitted on the medium of computer-readable with one or more instruction or code form.Computer readable medium comprises computer storage medium and is convenient to make to allow computer program transfer to the communication medium in other place from a place.Storage medium can be that any general or special computer can the useable medium of access.Such as, such computer readable media can include but not limited to RAM, ROM, EEPROM, CD-ROM or other optical disc storage, disk storage or other magnetic storage device, or other anyly may be used for carrying or store the medium that can be read the program code of form with instruction or data structure and other by general or special computer or general or special processor.In addition, any connection can be properly termed computer readable medium, such as, if software is by a coaxial cable, optical fiber computer, twisted-pair feeder, Digital Subscriber Line (DSL) or being also comprised in defined computer readable medium with wireless way for transmittings such as such as infrared, wireless and microwaves from a web-site, server or other remote resource.Described video disc (disk) and disk (disc) comprise Zip disk, radium-shine dish, CD, DVD, floppy disk and Blu-ray Disc, and disk is usually with magnetic duplication data, and video disc carries out optical reproduction data with laser usually.Above-mentioned combination also can be included in computer readable medium.
Above-described embodiment; object of the present invention, technical scheme and beneficial effect are further described; be understood that; the foregoing is only the specific embodiment of the present invention; the protection range be not intended to limit the present invention; within the spirit and principles in the present invention all, any amendment made, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.