CN106303697B - A kind of P frame processing method and equipment - Google Patents

A kind of P frame processing method and equipment Download PDF

Info

Publication number
CN106303697B
CN106303697B CN201610703073.6A CN201610703073A CN106303697B CN 106303697 B CN106303697 B CN 106303697B CN 201610703073 A CN201610703073 A CN 201610703073A CN 106303697 B CN106303697 B CN 106303697B
Authority
CN
China
Prior art keywords
frame
threshold value
region
threshold
pixel
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
CN201610703073.6A
Other languages
Chinese (zh)
Other versions
CN106303697A (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.)
Hisense Broadband Multimedia Technology Co Ltd
Original Assignee
Hisense Broadband Multimedia Technology 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 Hisense Broadband Multimedia Technology Co Ltd filed Critical Hisense Broadband Multimedia Technology Co Ltd
Priority to CN201610703073.6A priority Critical patent/CN106303697B/en
Publication of CN106303697A publication Critical patent/CN106303697A/en
Application granted granted Critical
Publication of CN106303697B publication Critical patent/CN106303697B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440281Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by altering the temporal resolution, e.g. by frame skipping

Abstract

The invention discloses a kind of P frame processing method and equipment, display image is divided into multiple regions in advance, the first P frame after successively obtaining I frame and the 2nd P frame after the first P frame, determine pixel average of each region in the first P frame, specified region is screened from region according to pixel average and for the preset threshold value in each region, determined whether to abandon the first P frame according to the quantity in the corresponding specified region of each threshold value, until all P frames after I frame complete the judgement whether abandoned.By that will show that picture divides multiple regions, and the importance of each region and the variation degree relative to I frame is combined to determine whether to abandon P frame, the image quality optimization that P frame is handled in video decoding process is realized, so as to promote user's viewing experience on the basis of guaranteeing picture quality.

Description

A kind of P frame processing method and equipment
Technical field
The present invention relates to video decoding filed, in particular to a kind of P frame processing method.The present invention also relates to a kind of view Frequency decoding apparatus.
Background technique
Video refers to is captured a series of static images in a manner of electric signal, is noted down, and is handled, and is stored, transmission, and again Existing various technologies, and decode be then using ad hoc approach number be reduced into representated by it perhaps by electric impulse signal, Optical signal, radio wave etc. are converted into the process of information, data representated by it etc..With the continuous development of network technology and The continuous raising of living standard, the clarity for the video that user sees it by display terminal, fluency are also more next More pay attention to, correspondingly, how to improve coding and decoding video speed to improve user experience and also increasingly become institute, display terminal manufacturer It solves the problems, such as.
Continuous several width images can be divided into P, B during being encoded for continuous dynamic image by the prior art, I three types, I frame indicate key frame, P frame by before it P frame or the prediction of I frame come, the expression of P frame be this frame with The difference of a key frame (or P frame) before, the picture of caching is superimposed with the difference of this frame definition before needing when decoding to use, Generate final picture.
It is limited to objective condition, being not possible to completely eliminate at present brought by the time delay in video transmitting procedure influences, needle The scene relatively high to delay requirement is generally guaranteed using following processing strategie in the prior art and improves decoding speed:
(1) data buffer storage in transmission and decoding process is reduced, decoder is rapidly input;
(2) code stream of special scenes is recompiled, reduce the quantity of I frame in code stream and removes B frame, improve decoding The decoded speed of device;
(3) it takes random drop or before and after frames to compare difference, loses a certain proportion of P frame.
For mode described above (3), the realization process of the prior art is usually a certain number of P frames of random drop, The either pixel difference of former and later two P frame representative images of overall calculation, abandons if difference is in certain threshold values, otherwise will Reservation, then calculate next P frame to be abandoned for the P frame of reservation as reference frame loop.
Present inventor in the implementation of the present invention, it is found that it is each existing P frame processing mode is not directed to image The data information content in a region is analyzed, and Processing Algorithm is very simple, to significantly impact picture quality and use Family experience.
Summary of the invention
The embodiment of the present invention provides a kind of P frame processing method and device, to solve in the prior art at the discarding of P frame The problem of reason simply leads to poor user experience, user's viewing experience can be promoted on the basis of guaranteeing picture quality, the party Display image is divided into multiple regions in advance by method, further comprising the steps of:
In video code flow decoding process, the first P frame after successively obtaining I frame and the after the first P frame Two P frames, the I frame contain at least two continuous P frame later;
Determine pixel average of each region in the first P frame, the pixel average is according to the first P frame In in each pixel and the 2nd P frame the chromaticity coordinates difference of corresponding pixel points generate;
According to the pixel average and it is each preset threshold value in region, specified area is screened from the region Domain, the pixel average in the specified region are higher than the threshold value in the specified region;
Determine whether to abandon the first P frame according to the quantity in the corresponding specified region of each threshold value, until the I frame All P frames afterwards complete the judgement whether abandoned.
In addition, the embodiment of the present application also provides a kind of P frame processing apparatus, comprising:
Module is obtained, for successively obtaining the first P frame after I frame and the 2nd P frame after the first P frame, institute It states I frame and contains at least two continuous P frame later;
Processing module, for determining pixel average of each region in the first P frame, the pixel average root It is generated according to the chromaticity coordinates difference of corresponding pixel points in each pixel in the first P frame and the 2nd P frame;
Screening module, for according to the pixel average and be each preset threshold value in region, from the region Middle to screen specified region, the pixel average in the specified region is higher than the threshold value in the specified region;
Determining module, for determining whether to abandon the first P according to the quantity in the corresponding specified region of each threshold value Frame, until all P frames after the I frame complete the judgement whether abandoned.
Compared with prior art, the advantageous effects for the technical solution that the embodiment of the present invention is proposed include:
In advance will display image be divided into multiple regions, successively obtain I frame after the first P frame and in the first P frame The 2nd P frame later determines pixel average of each region in the first P frame, according to pixel average and is each region Preset threshold value screens specified region from region, determines whether discarding first according to the quantity in the corresponding specified region of each threshold value P frame, until all P frames after I frame complete the judgement whether abandoned.By that will show that picture divides multiple regions, and combine each The importance in a region and variation degree relative to I frame determine whether to abandon P frame, realizes P frame in video decoding process The image quality optimization of processing, so as to promote user's viewing experience on the basis of guaranteeing picture quality.
Detailed description of the invention
It, below will be to attached drawing needed in embodiment description in order to illustrate more clearly of technical solution of the present invention It is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, general for this field For logical technical staff, without creative efforts, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is the disposed of in its entirety flow diagram of audio-video in the prior art;
A kind of flow diagram for P frame processing method that Fig. 2 is proposed by the embodiment of the present invention;
The flow diagram of P frame processing method under a kind of concrete application scene that Fig. 3 is proposed by the embodiment of the present invention;
" checked spun antung " the region division strategy and weight distribution table that Fig. 4 is proposed by the embodiment of the present invention;
The priority policy that Fig. 5 is proposed by the embodiment of the present invention judges schematic diagram.
A kind of structural schematic diagram for P frame processing apparatus that Fig. 6 is proposed by the embodiment of the present invention.
Specific embodiment
As shown in Figure 1, for the disposed of in its entirety flow diagram of audio-video in the prior art, the process is big from front end to rear end Cause is divided into four-stage: it is defeated that head end code stream extracts stage, code stream assembling and analysis processing stage, code stream decoding stage and display Stage out.There are many reason of audio and video playing introducing delay, and to reduce delay will be from the treatment process sublevel of entire audio-video Piecewise analysis.Since the strategy that each stage reduces low delay is different, the application is directed to phase III " code stream decoding rank Section " delay optimize processing, wherein i.e. be related to for P frame discarding optimization.
Just as described in the background of the present invention, the particular field of low delay is required for certain special scenes game etc. Scape, it is basic using skills such as " reduce transmission and decoding buffer zone, remove I, B frame to TS recodification, is random to jump P frame " in the prior art Art realizes the quick decoding of video, for " random to jump P frame ", although low delay can be solved to a certain degree Problem, but current jump P frame strategy mostly uses greatly random jump or is handled by the direct difference comparison of before and after frames, these processing Strategy will have a huge impact image quality, can not guarantee the viewing experience of user while realizing quickly decoding.
In view of above the problems of the prior art, present applicant proposes a kind of P frame processing methods.This method will be by that will show Show that picture divides multiple regions, and the importance of each region and the variation degree relative to I frame is combined to determine whether to abandon P Frame realizes the image quality optimization that P frame is handled in video decoding process, uses so as to be promoted on the basis of guaranteeing picture quality Family viewing experience.
Conceived based on foregoing invention, before the specific steps for executing the program, needs in advance to be divided into display image Multiple regions.The division is intended to show that image distinguishes different zones according to use habit, and technical staff can be for these not With region according to the degree setting priority and/or threshold value being concerned, it is subsequent when determining whether to abandon P frame i.e. with the P frame Whether the variation degree of middle different piece, which can reach threshold value and reach the quantity in the region of threshold value, is judged.
In the preferred embodiment of the application, technical staff can to display image carried out region division it Afterwards, corresponding priority is set for each region, is that each region is set further according to the appointed priority of multiple regions after division Set threshold value, wherein the corresponding threshold value in the region of high priority be lower than low priority the corresponding threshold value in region, in this way it is concerned more More regions easier can be retained.
In the particular embodiment, the invention proposes " checked spun antung " region division strategies, should " checked spun antung " region division One secondary audiovisual presentation is divided into nine big regions by strategy, assigns different threshold values to it respectively according to the difference of human eye attention rate And it is divided into the different region of area.In this specific embodiment, display image is specifically divided according to nine grids mode, And show that the central area of image corresponds to first threshold, the central area up and down of the display image corresponds to second threshold, this is aobvious The left and right central area of diagram picture corresponds to third threshold value, corresponding 4th threshold value of four angular zones of the display image, wherein the first threshold Value, second threshold, third threshold value, the 4th threshold value according to from small to large distinguish value.
As shown in Fig. 2, a kind of flow diagram of the P frame processing method proposed by the embodiment of the present invention, including it is following Step:
Step S201, the first P frame after successively obtaining I frame and the 2nd P frame after the first P frame, the I frame Continuous P frame is contained at least two later.
As stated in the background art, the image after I frame is made of multiple P frames, therefore the application judges whether to need to abandon When some P frame, need to be used as reference to determine the need for abandoning based on the P frame after the I frame and the P frame before the P frame, because This step successively obtains the first P frame after I frame and the 2nd P frame after the first P frame, the selection mode of specific P frame Difference can be according to practical decoding requirements depending on, have no effect on the protection scope of the application.
Step S202, pixel average of each region in the first P frame is determined, the pixel average is according to institute The chromaticity coordinates difference for stating corresponding pixel points in each pixel and the 2nd P frame in the first P frame generates.
The step is intended to determine the first P frame relative to I frame and the variable quantity of the 2nd P frame, in order to which the variable quantity is specific Change, it is indicated by the application with " pixel average ", and the pixel average is according to each pixel in the first P frame Point and the chromaticity coordinates difference of corresponding pixel points in the 2nd P frame generate.
In a preferred embodiment of the present application, the step of obtaining " pixel average " is as follows:
Step a) obtains the chromaticity coordinates and the 2nd P frame base of each pixel of the first P frame based on the I frame In the chromaticity coordinates of each pixel of the I frame;
Step b) is sat according to the color that the chromaticity coordinates obtains each pixel of the 2nd P frame relative to the first P frame Mark difference;
Step c) generates each region in the first P according to the quantity of the difference and the pixel in each region Pixel average in frame.
In actual application scenarios, for the realization of initialization operation, the chromaticity coordinates of one group of default also can be set, have Body, the selection for defaulting chromaticity coordinates can be configured according to actual needs, such as luminance component, chroma blue component and red Chroma color component is specifically chosen the variation of content within the scope of protection of this application.
Step S203, according to the pixel average and it is each preset threshold value in region, is sieved from the region Specified region is selected, the pixel average in the specified region is higher than the threshold value in the specified region.
In the step, decoder according to the preset threshold value in each region, by the pixel average in each region respectively with this Preset threshold values is compared, and taking pixel average to be higher than the region of preset threshold is specified region, in actual application scenarios In, the manner of comparison in this step, can be pixel average one by one with threshold comparison, be also possible to first to pixel average into Row comparison is compared with threshold value again, such to change the protection scope that will not influence the application.
Step S204, determine whether to abandon the first P frame according to the quantity in the corresponding specified region of each threshold value, directly All P frames after to the I frame complete the judgement whether abandoned.
In this step by quantity corresponding to the specified region filtered out in step S203 and with the corresponding relationship of threshold value It is compared, it is determined whether abandon the first P frame.
In a preferred embodiment, which includes first threshold, second threshold, third threshold value and the 4th threshold value, specifically Situation is divided into following three kinds:
The quantity of situation one, the corresponding specified region of first threshold is not zero, and retains the first P frame;
The quantity of situation two, the corresponding specified region of first threshold is zero, and second threshold is corresponding with third threshold value specified The sum of the quantity in region is greater than or equal to the first threshold value, retains the first P frame;Or, second threshold finger corresponding with third threshold value The sum of the quantity in region is determined less than the first threshold value, the number in second threshold, third threshold value specified region corresponding with the 4th threshold value The sum of amount abandons the first P frame less than the second threshold value;
Situation three, the first threshold, second threshold, specified region corresponding to third threshold value quantity be zero, and The quantity in the corresponding specified region of the 4th threshold value abandons the first P frame less than the second threshold value.
It should be noted that the first threshold value is less than the second threshold value, and the above is only this Shens in the above deterministic process Please be for a kind of preferred embodiment whether P frame abandons, on the basis of using this result as judgment basis, specific judgement side The difference of formula has no effect on the protection scope of the application.
In addition, it should be noted that, after this step realizes the judgement whether abandoned for the first P frame, the step Difference based on judging result is executed to different processing modes, specifically, if the first P frame is retained, the first P frame is replaced Change original I frame, and successively obtain the first P frame after new frame image and the 2nd P frame after the first P frame, if this One P frame is dropped, and the 2nd P frame is replaced with the first P frame, and successively obtains the 2nd P frame after the first new P frame image, All P frames after completing I frame by the above-mentioned process of repetition again complete the judgement whether abandoned.
It can be seen that compared with prior art, the advantageous effects packet for the technical solution that the embodiment of the present invention is proposed It includes:
In advance will display image be divided into multiple regions, successively obtain I frame after the first P frame and in the first P frame The 2nd P frame later determines pixel average of each region in the first P frame, according to pixel average and is each region Preset threshold value screens specified region from region, determines whether discarding first according to the quantity in the corresponding specified region of each threshold value P frame, until all P frames after I frame complete the judgement whether abandoned.By that will show that picture divides multiple regions, and combine each The importance in a region and variation degree relative to I frame determine whether to abandon P frame, realizes P frame in video decoding process The image quality optimization of processing, so as to promote user's viewing experience on the basis of guaranteeing picture quality.
Below in conjunction with the attached drawing in the present invention, clear, complete description is carried out to the technical solution in the present invention, is shown So, described embodiment is a part of the embodiments of the present invention, instead of all the embodiments.Based on the implementation in the present invention Example, those of ordinary skill in the art's every other embodiment obtained without making creative work, all belongs to In the scope of protection of the invention.
As described above, can be taken in the processing strategie of the scene relatively high for delay requirement well known in the prior art Random drop or before and after frames comparison difference lose the mode of a certain proportion of P frame.Although the processing strategie can solve to a certain degree Certainly the problem of low delay, but the jump P frame strategy taken is random jump or is handled by the direct difference comparison of before and after frames, this A little processing strategies will have an impact image quality, not can guarantee user experience.
The embodiment of the present invention carries out emphasis optimization in order to solve the problem above-mentioned, for P frame processing strategie, proposes such as figure Method shown in 3 selects the P frame to be abandoned, the party using distinctive " checked spun antung " allocation strategy and weight distribution strategy Method the following steps are included:
Step S301, different weight allocation processings is carried out to each piece of region according to eye recognition characteristic.
It needs to carry out subarea processing to image in actual application scenarios, in this step, as shown in figure 4, being this hair " checked spun antung " the region division strategy and weight distribution table that bright embodiment is proposed, it can be seen that " the well word that the present invention uses One secondary audiovisual presentation is divided into nine big regions by lattice " region division strategy, is assigned respectively to it according to the difference of human eye attention rate It gives different weights and is divided into the different region of area.Weight takes tetra- values of W1, W2, W3, W4 respectively, region respectively with A1, A2, A3, A4, A5, A6, A7, A8, A9 label.Weighting ratio relationship are as follows: the face of W1=2*W2=4*W3=5*W4, A1~A9 Product relationship are as follows: A1=2*A2=4*A4=5*A6, wherein the region A2=A3, A4=A5, A6=A7=A8=A9, A1 is core Region assigns highest weight, and A2, A3 are time nucleus, assigns secondary high weight, and so on.
When decoder gets the information for dividing the image in region, one group of frame number is randomly selected first as reference For the realization of initialization operation reference frame of one group of frame number as default also can be set, specifically, default reference frame in frame Selection can be configured according to actual needs, the variation for being specifically chosen content will not influence protection scope of the present invention. For example, it is assumed that reference frame I frame is In, the P frame after reference frame I frame is followed successively by Pn、Pn+1、Pn+2... and so on, of the invention In specific embodiment, P is obtained respectivelynBased on InEach pixel reference value, then obtain P respectivelyn+1Based on InIt is each The reference value of a pixel determines P according to the reference value of each pixel respectivelyn+1With PnDifference, successively calculate Pn+1 With Pn+2、Pn+2With Pn+3... difference.
Step S302, the reference value and difference that each pixel of P frame is calculated based on reference frame, difference and region are weighed Value, which is multiplied, obtains the weighted value of each pixel of P frame.
P is obtained respectively according to reference framenThe reference value Y of each pixel based on reference framen、CrnAnd Cbn, then distinguish Obtain Pn+1The reference value Y of each pixel based on reference framen+1、Crn+1And Cbn+1, according to the reference value of each pixel P is determined respectivelyn+1With PnDifference Dyn、Dcrn、Dcbn, and successively calculate Pn+1With Pn+2、Pn+2With Pn+3... difference.? Here, reference frame can be the default reference frame of setting, is also possible to select according to the actual situation, is specifically chosen the change of content Change will not influence protection scope of the present invention.
Then, the region where each pixel is determined according to nine big regions of division, obtains the weight in the region W, using weight W as the factor respectively with difference Dyn、Dcrn、DcbnIt does multiplying and obtains the value Ey after each pixel weightingn, Ecrn, Ecbn,
Eyn=W*Dyn
Ecrn=W*Dcrn
Ecbn=W*Dcbn
Wherein, weight W takes some value in W1~W4 according to pixel region respectively.
Step S303, the weighted average of each pixel in each region calculated according to weighted value and compared with threshold values, it will The zone marker that weighted average is higher than threshold values is 1 and counts.
The weighted value Ey of each pixel in each region is counted in this stepn, Ecrn, Ecbn, will be in each region The weighted value of all pixels point is added, and summation after being added is determined each in nine big regions divided by the number of all pixels point The weighted average Aey in regionn, Aecbn, Aecrn, then by the weighted average in each region come out respectively with it is each The threshold values in region is compared, if being lower than threshold values, this zone marker is 0, is higher than threshold values, then this zone marker 1, and count It is all be marked as 1 region.
In a specific embodiment of the present invention, the threshold value in this step can be is configured according to the weight in each region , it is also possible to according to the regional value flexible setting in each region, certainly, in actual application scenarios, in this step Manner of comparison can be weighted average one by one with threshold comparison, be also possible to first compare again and threshold weighted average Value compares, such to change the protection scope that will not influence the application.
Step S304, the region for being is marked to carry out the processing judgement of P frame by all.
In a specific embodiment of the present invention, specific P frame processing strategie is as described in Figure 5, including following judgment step:
A) such as A1=1, then this P frame is not abandoned, is otherwise performed the next step;
B) such as A1+A2+A3+A4+A5 >=2, then this P frame is not abandoned, otherwise basis
The value of A1+A2+A3+A4+A5 is that 1 or 0 selection executes step c or d, step c is executed when value is 1, when value is 0 Execute step d;
C) such as A1+A2+A3+A4+A5=1, and A6+A7+A8+A9 >=3, then do not abandon this P frame, otherwise such as A1+A2+A3+ A4+A5=1, and A6+A7+A8+A9 < 3, then abandon;
D) such as A1+A2+A3+A4+A5=0, and A6+A7+A8+A9 < 4, then abandon this P frame, otherwise do not abandon this P frame;
If PnIt is dropped, then continues the P for calculating next P frame according to above-mentioned algorithmn+1Whether frame is dropped;
If PnIt is not dropped, then with this PnFrame recalculates the P frame that next group of needs are dropped as reference frame.
Technical solution and tradition that the embodiment of the present application is proposed determine the scheme comparison of P frame pixel difference, further The algorithm for optimizing frame losing, emphasis is accustomed to audio-video region segmentation being nine big regions according to the focusing of human eye, and big by nine Region assigns different parameters respectively, if A1 differentiation in different regions is little and is marked as 0, reselection consideration time key area A2 The region~A5, eventually passes through logic calculation, is in selection using the comprehensive strategic judged respectively key area, non-key area No discarding P frame, improves image quality and user experience.
Based on inventive concept same as the above method, the embodiment of the present application also proposed a kind of P frame processing apparatus, knot Structure schematic diagram is as shown in fig. 6, specifically include:
Module 61 is obtained, for successively obtaining the first P frame after I frame and the 2nd P frame after the first P frame, Continuous P frame is contained at least two after the I frame;
Processing module 62, for determining pixel average of each region in the first P frame, the pixel average It is generated according to the chromaticity coordinates difference of corresponding pixel points in each pixel in the first P frame and the 2nd P frame;
Screening module 63, for according to the pixel average and be each preset threshold value in region, from the area Specified region is screened in domain, the pixel average in the specified region is higher than the threshold value in the specified region;
Determining module 64, for determining whether to abandon described first according to the quantity in the corresponding specified region of each threshold value P frame, until all P frames after the I frame complete the judgement whether abandoned.
In specific application scenarios, the processing module is specifically used for:
The chromaticity coordinates and the 2nd P frame for obtaining each pixel of the first P frame based on the I frame are based on the I The chromaticity coordinates of each pixel of frame;
The chromaticity coordinates difference of each pixel of the 2nd P frame relative to the first P frame is obtained according to the chromaticity coordinates;
Each region is generated in the first P frame according to the quantity of the difference and the pixel in each region Pixel average.
In specific application scenarios, the threshold value includes first threshold, second threshold, third threshold value and the 4th threshold Value, the determining module are specifically used for:
If the quantity in the corresponding specified region of the first threshold is not zero, retain the first P frame;
If the quantity in the corresponding specified region of the first threshold is zero, and the second threshold is corresponding with third threshold value The sum of the quantity in specified region is greater than or equal to the first threshold value, retains the first P frame;
If the quantity in specified region corresponding to the first threshold, second threshold, third threshold value is zero, and described The quantity in the corresponding specified region of four threshold values abandons the first P frame less than the second threshold value;
If the quantity in the corresponding specified region of the first threshold is zero, the second threshold is corresponding with the third threshold value The sum of the quantity in specified region less than the first threshold value, the second threshold, the third threshold value and the 4th threshold value pair The sum of the quantity in the specified region answered abandons the first P frame less than the second threshold value;
Wherein, first threshold value is less than second threshold value.
In specific application scenarios, further includes:
Setup module 65 is each region for the priority appointed according to the multiple region after division The threshold value is set;
Wherein, the corresponding threshold value in the region of high priority is lower than the corresponding threshold value in region of low priority.
In specific application scenarios, the display image is specifically divided according to nine grids mode, in which:
The central area of the display image corresponds to the first threshold, and the central area up and down of the display image is corresponding The second threshold, the left and right central area of the display image correspond to the third threshold value, four angular regions of the display image Domain corresponds to the 4th threshold value.
It can be seen that the technical solution by applying the application, is divided into multiple regions for display image in advance, successively obtains The first P frame after taking I frame and the 2nd P frame after the first P frame determine pixel of each region in the first P frame It is corresponding according to each threshold value to screen specified region according to pixel average and for the preset threshold value in each region from region for average value The quantity in specified region determine whether to abandon the first P frame, until all P frames after I frame complete the judgement that whether abandons.Pass through Display picture is divided into multiple regions, and the importance of each region and the variation degree relative to I frame is combined to determine whether P frame is abandoned, the image quality optimization that P frame is handled in video decoding process is realized, so as on the basis of guaranteeing picture quality Promote user's viewing experience.
Modules can integrate in one in the specific embodiment of the invention, can also be deployed separately, and above-mentioned module is closed And be a module, multiple submodule can also be further split into.
Through the above description of the embodiments, those skilled in the art can be understood that the embodiment of the present invention The mode of necessary general hardware platform can also be added to realize by software by hardware realization.Based on such reason Solution, the technical solution of the embodiment of the present invention can be embodied in the form of software products, which can store one In a non-volatile memory medium (can be CD+ROM, USB flash disk, mobile hard disk etc.), including some instructions are used so that a meter It calculates machine equipment (can be personal computer, server or network side equipment etc.) and executes each implement scene of the embodiment of the present invention The method.
It will be appreciated by those skilled in the art that the accompanying drawings are only schematic diagrams of a preferred implementation scenario, module in attached drawing or Process is not necessarily implemented necessary to the embodiment of the present invention.
It will be appreciated by those skilled in the art that the module in device in implement scene can be described according to implement scene into Row is distributed in the device of implement scene, can also be carried out corresponding change and is located at the one or more dresses for being different from this implement scene In setting.The module of above-mentioned implement scene can be merged into a module, can also be further split into multiple submodule.
The serial number of the above embodiments of the invention is only for description, does not represent the superiority and inferiority of implement scene.
Disclosed above is only several specific implementation scenes of the embodiment of the present invention, and still, the embodiment of the present invention is not office It is limited to this, the changes that any person skilled in the art can think of should all fall into the business limitation range of the embodiment of the present invention.

Claims (8)

1. a kind of P frame processing method, which is characterized in that display image is divided into multiple regions in advance, this method comprises:
In video code flow decoding process, the first P frame after successively obtaining I frame and the 2nd P after the first P frame Frame, the I frame contain at least two continuous P frame later;
Determine pixel average of each region in the first P frame, the pixel average is according to every in the first P frame The chromaticity coordinates difference of corresponding pixel points generates in a pixel and the 2nd P frame;
According to the pixel average and it is each preset threshold value in region, specified region, institute is screened from the region The pixel average for stating specified region is higher than the threshold value in the specified region;
Determine whether to abandon the first P frame according to the quantity in the corresponding specified region of each threshold value, until after the I frame All P frames complete the judgement whether abandoned;
The threshold value includes first threshold, second threshold, third threshold value and the 4th threshold value, according to the corresponding finger of each threshold value The quantity for determining region determines whether to abandon the first P frame, specifically:
If the quantity in the corresponding specified region of the first threshold is not zero, retain the first P frame;
If the quantity in the corresponding specified region of the first threshold is zero, and the second threshold is corresponding with third threshold value specified The sum of the quantity in region is greater than or equal to the first threshold value, retains the first P frame;
If the quantity in specified region corresponding to the first threshold, second threshold, third threshold value is zero, and the 4th threshold It is worth the quantity in corresponding specified region less than the second threshold value, abandons the first P frame;
If the quantity in the corresponding specified region of the first threshold is zero, second threshold finger corresponding with the third threshold value The sum of the quantity in region is determined less than the first threshold value, and the second threshold, the third threshold value are corresponding with the 4th threshold value The sum of the quantity in specified region abandons the first P frame less than the second threshold value;
Wherein, first threshold value is less than second threshold value.
2. the method as described in claim 1, which is characterized in that determine that pixel of each region in the first P frame is average Value, specifically includes:
The chromaticity coordinates and the 2nd P frame for obtaining each pixel of the first P frame based on the I frame are based on the I frame The chromaticity coordinates of each pixel;
The chromaticity coordinates difference of each pixel of the 2nd P frame relative to the first P frame is obtained according to the chromaticity coordinates;
Pixel of each region in the first P frame is generated according to the quantity of the difference and the pixel in each region Average value.
3. method according to claim 1 or 2, which is characterized in that successively obtain I frame after the first P frame and described Before the 2nd P frame after first P frame, further includes:
According to the appointed priority in the multiple region after division, the threshold value is set for each region;
Wherein, the corresponding threshold value in the region of high priority is lower than the corresponding threshold value in region of low priority.
4. method according to claim 1 or 2, which is characterized in that the display image is specifically carried out according to nine grids mode It divides, in which:
The central area of the display image correspond to the first threshold, described in the correspondence of central area up and down of the display image Second threshold, the left and right central area of the display image correspond to the third threshold value, four angular zones pair of the display image Answer the 4th threshold value.
5. a kind of P frame processing apparatus, which is characterized in that display image is divided into multiple regions in advance, comprising:
Module is obtained, for successively obtaining the first P frame after I frame and the 2nd P frame after the first P frame, the I frame Continuous P frame is contained at least two later;
Processing module, for determining pixel average of each region in the first P frame, the pixel average is according to institute The chromaticity coordinates difference for stating corresponding pixel points in each pixel and the 2nd P frame in the first P frame generates;
Screening module, for according to the pixel average and be each preset threshold value in region, sieved from the region Specified region is selected, the pixel average in the specified region is higher than the threshold value in the specified region;
Determining module, for determining whether to abandon the first P frame according to the quantity in the corresponding specified region of each threshold value, directly All P frames after to the I frame complete the judgement whether abandoned;
The threshold value includes first threshold, second threshold, third threshold value and the 4th threshold value, and the determining module is specifically used for:
If the quantity in the corresponding specified region of the first threshold is not zero, retain the first P frame;
If the quantity in the corresponding specified region of the first threshold is zero, and the second threshold is corresponding with third threshold value specified The sum of the quantity in region is greater than or equal to the first threshold value, retains the first P frame;
If the quantity in specified region corresponding to the first threshold, second threshold, third threshold value is zero, and the 4th threshold It is worth the quantity in corresponding specified region less than the second threshold value, abandons the first P frame;
If the quantity in the corresponding specified region of the first threshold is zero, second threshold finger corresponding with the third threshold value The sum of the quantity in region is determined less than the first threshold value, and the second threshold, the third threshold value are corresponding with the 4th threshold value The sum of the quantity in specified region abandons the first P frame less than the second threshold value;
Wherein, first threshold value is less than second threshold value.
6. device as claimed in claim 5, which is characterized in that the processing module is specifically used for:
The chromaticity coordinates and the 2nd P frame for obtaining each pixel of the first P frame based on the I frame are based on the I frame The chromaticity coordinates of each pixel;
The chromaticity coordinates difference of each pixel of the 2nd P frame relative to the first P frame is obtained according to the chromaticity coordinates;
Pixel of each region in the first P frame is generated according to the quantity of the difference and the pixel in each region Average value.
7. such as device described in claim 5 or 6, which is characterized in that further include:
Institute is arranged for the priority appointed according to the multiple region after division for each region in setup module State threshold value;
Wherein, the corresponding threshold value in the region of high priority is lower than the corresponding threshold value in region of low priority.
8. such as device described in claim 5 or 6, which is characterized in that the display image is specifically carried out according to nine grids mode It divides, in which:
The central area of the display image correspond to the first threshold, described in the correspondence of central area up and down of the display image Second threshold, the left and right central area of the display image correspond to the third threshold value, four angular zones pair of the display image Answer the 4th threshold value.
CN201610703073.6A 2016-08-22 2016-08-22 A kind of P frame processing method and equipment Active CN106303697B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610703073.6A CN106303697B (en) 2016-08-22 2016-08-22 A kind of P frame processing method and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610703073.6A CN106303697B (en) 2016-08-22 2016-08-22 A kind of P frame processing method and equipment

Publications (2)

Publication Number Publication Date
CN106303697A CN106303697A (en) 2017-01-04
CN106303697B true CN106303697B (en) 2019-07-02

Family

ID=57661274

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610703073.6A Active CN106303697B (en) 2016-08-22 2016-08-22 A kind of P frame processing method and equipment

Country Status (1)

Country Link
CN (1) CN106303697B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112637538B (en) * 2020-12-15 2022-08-02 重庆紫光华山智安科技有限公司 Smart tag method, system, medium, and terminal for optimizing video analysis
CN112822505B (en) * 2020-12-31 2023-03-03 杭州星犀科技有限公司 Audio and video frame loss method, device, system, storage medium and computer equipment
CN116801047B (en) * 2023-08-17 2024-02-13 深圳市艾科维达科技有限公司 Weight normalization-based set top box image processing module and method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1689337A (en) * 2002-10-09 2005-10-26 皇家飞利浦电子股份有限公司 Sequential digital image compression
EP2200325A3 (en) * 2008-12-17 2011-01-19 Sony Corporation Information processor and method therefor
CN102695028A (en) * 2012-05-22 2012-09-26 广东威创视讯科技股份有限公司 Dynamic frame rate reduction method and system for video images
CN103283249A (en) * 2010-12-09 2013-09-04 赛格纳斯广播公司 Systems and methods for prioritization of data for intelligent discard in a communication network
CN105357592A (en) * 2015-10-26 2016-02-24 山东大学苏州研究院 Selective frame dropping method for streaming media adaptive transmission

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1689337A (en) * 2002-10-09 2005-10-26 皇家飞利浦电子股份有限公司 Sequential digital image compression
EP2200325A3 (en) * 2008-12-17 2011-01-19 Sony Corporation Information processor and method therefor
CN103283249A (en) * 2010-12-09 2013-09-04 赛格纳斯广播公司 Systems and methods for prioritization of data for intelligent discard in a communication network
CN102695028A (en) * 2012-05-22 2012-09-26 广东威创视讯科技股份有限公司 Dynamic frame rate reduction method and system for video images
CN105357592A (en) * 2015-10-26 2016-02-24 山东大学苏州研究院 Selective frame dropping method for streaming media adaptive transmission

Also Published As

Publication number Publication date
CN106303697A (en) 2017-01-04

Similar Documents

Publication Publication Date Title
CN103310820B (en) A kind of method that multimedia player is optimized
CN106303697B (en) A kind of P frame processing method and equipment
CN103841389B (en) A kind of video broadcasting method and player
US9594974B2 (en) Depth image filtering method, and depth image filtering threshold obtaining method and apparatus
CN111327959A (en) Video frame insertion method and related device
CN105376642B (en) Video playing resolution ratio switching method and system
JP5896497B2 (en) Method and wireless handheld device for determining the hue of an image
CN105282622B (en) A kind of method and apparatus of handoff scenario
US20170163902A1 (en) Method and electronic device for generating high dynamic range image
CN105574813B (en) A kind of image processing method and device
EP1841223A1 (en) Moving picture image reproduction method and moving picture image reproduction apparatus
CN104822008A (en) Video synchronizing method and device
CN106888169A (en) Video broadcasting method and device
CN106791850A (en) Method for video coding and device
CN108322652A (en) A kind of focusing reminding method and terminal
CN106851332B (en) Video stream processing method, device and system
CN106131671A (en) A kind of method and device regulating video definition
CN109600654A (en) Barrage processing method, device and electronic equipment
US20170161875A1 (en) Video resolution method and apparatus
CN111405339A (en) Split screen display method, electronic equipment and storage medium
Shi et al. Continuous prediction for quality of experience in wireless video streaming
CN104883478B (en) Video processing method and device
CN110392295A (en) Multi-channel video plays the implementation method of automatic split screen in a kind of video monitoring system
CN114245035A (en) Video generation method and device, equipment and medium
CN113747160A (en) Video coding configuration method, device, equipment and computer readable storage medium

Legal Events

Date Code Title Description
C06 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