CN103024384B - A kind of Video coding, coding/decoding method and device - Google Patents

A kind of Video coding, coding/decoding method and device Download PDF

Info

Publication number
CN103024384B
CN103024384B CN201210544223.5A CN201210544223A CN103024384B CN 103024384 B CN103024384 B CN 103024384B CN 201210544223 A CN201210544223 A CN 201210544223A CN 103024384 B CN103024384 B CN 103024384B
Authority
CN
China
Prior art keywords
picture
frame
ref
represent
max
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
CN201210544223.5A
Other languages
Chinese (zh)
Other versions
CN103024384A (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.)
Shenzhen mengwang video Co., Ltd
Original Assignee
BAC INFORMATION 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 BAC INFORMATION TECHNOLOGY Co Ltd filed Critical BAC INFORMATION TECHNOLOGY Co Ltd
Priority to CN201210544223.5A priority Critical patent/CN103024384B/en
Publication of CN103024384A publication Critical patent/CN103024384A/en
Application granted granted Critical
Publication of CN103024384B publication Critical patent/CN103024384B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The present invention is directed to the film source that illumination variation occurs, propose a kind of Video coding, coding/decoding method and device.The method carries out correction process in the same way by the monochrome information to reference frame, chrominance information, thus the correlation strengthened between reference frame and coded frame, finally reach, reduce the number of intra prediction mode of MB of prediction frame, reduce code check consumption, promote the performance of encoder on inter-frame information redundancy is eliminated.

Description

A kind of Video coding, coding/decoding method and device
Technical field
The present invention relates to coding and decoding video field, particularly relate to a kind of Video coding, coding/decoding method and device.
Background technology
When the change of video image generation global illumination, (such as mute is dark by bright turn, so that disappear completely to produce the image of monochrome information gradual change; Mute is by secretly brightening, finally completely clear).Now, on the one hand, can there is relatively large change in the monochrome information of consecutive frame image, and but then, because the body matter correlation of image still exists, the inter-frame information redundancy of video image is still very large.Now, according to the inter-frame prediction techniques of conventional coder, but cannot judge both correlations, thus in MB of prediction frame, produce the problem that intra prediction mode is uprushed, code check rises rapidly, cause the decline of conventional coder in inter-frame prediction techniques performance.Therefore need to propose a kind of novel encoding and decoding strategy, solve the problems referred to above.
Summary of the invention
The object of the embodiment of the present invention is to propose a kind of audio-video document decoding method and device.
The decode video files method that the present invention proposes comprises:
Obtain frame t(current encoded frame), and note is set t=0, note tfor current sign variable;
Judge whether current encoded frame is I frame or scene switch frame; If not, then utilize the first coding method to frame tencode;
Find next image to be encoded by coded sequence, if next image to be encoded exists, then image to be encoded for the next one is set to frame t, continue to perform acquisition frame t.
Wherein said " utilizes the first coding method to frame tencode " be specially:
Arrange m=0, m represents relative to frame tthrough the reference frame number of light gradient judgement;
Judge frame trelative to picture ref1(the first reference picture), picture ref2whether (the second reference picture) there is monochrome information gradual change, if there is monochrome information gradual change, arranges and makes note t=1; Arranging m is the first numerical value;
To the picture of non-NULL ref1, non-NULL picture ref2carry out the correction in the same way of monochrome information, obtain the correction parameter collection of a reference picture, the second reference picture;
Utilize the picture of corrected in the same way non-NULL ref1and the picture of non-NULL ref2replace reference frame corresponding in reference listing;
Judge that whether all reference frames of current encoded frame are all through the judgement of light gradient; If not, then continue execution and " judge frame trelative to picture ref1(the first reference picture), picture ref2whether (the second reference picture) there is monochrome information gradual change ";
If so, then to frame tin each macro block carry out conventional coded treatment; Judge whether " note t=1 and optimum prediction mode is inter-frame forecast mode ", if not then perform " by coded sequence find next image to be encoded "; If so, the first reference picture that in the optimum prediction mode confirmed in " conventional coded treatment " described in then transmitting to decoding end, optimum reference frame is corresponding or the correction parameter collection of the second reference picture.
The present invention also provides a kind of decode video files method, and the method comprises:
Obtain the correction parameter collection of current decoded frame and the first reference picture or the second reference picture; Judge whether that current sign variable is 0, if not, then carried out the correction in the same way of monochrome information by the reference frame of the correction parameter set pair current decoded frame of the first described reference picture or the second reference picture;
The reference frame of corrected in the same way current decoded frame is utilized to carry out regular decode to current decoded frame;
Find next image to be decoded by decoding order, if next image to be decoded exists, then image to be decoded for the next one is set to current decoded frame, continue " finding next image to be decoded by decoding order ".
The present invention also provides a kind of video file code device, and this device comprises: the first acquiring unit, the first processing unit, the second processing unit;
First acquiring unit, for obtaining frame t(current encoded frame), and note is set t=0, note tfor current sign variable;
First processing unit, comprises the first judging unit, the 3rd processing unit and the 11 processing unit;
Described first judging unit, for judging whether current encoded frame is I frame or scene switch frame;
Described 3rd processing unit, for when the first judging unit judged result is no, then utilizes the first coding method to frame tencode;
11 processing unit, for when the judged result of the first judging unit is for being, utilizes the second coding method to frame tencode;
Second processing unit, finding next image to be encoded for pressing coded sequence, if next image to be encoded exists, then image to be encoded for the next one being set to frame t, notice execution first acquiring unit, if next image to be encoded does not exist, then process ends process.
The present invention also provides a kind of decode video files device, and this device comprises: decoding acquiring unit, the first codec processing unit, the second codec processing unit, the 3rd codec processing unit;
Decoding acquiring unit, for obtaining the correction parameter collection of current decoded frame and the first reference picture or the second reference picture;
First codec processing unit, comprises the first decoding judgement unit, decoded luminance information correction unit, regular decode unit;
The first described decoding judgement unit, for judging whether that current sign variable is 0;
Described decoded luminance information correction unit, for when the judged result of the first decoding judgement unit is no, the correction in the same way of monochrome information is carried out, notice execution second codec processing unit by the reference frame of the correction parameter set pair current decoded frame of the first described reference picture or the second reference picture;
Regular decode unit, for when the judged result of the first decoding judgement unit is for being, carries out regular decode process to described current decoded frame; Notice execution the 3rd codec processing unit;
Second codec processing unit, for utilizing the reference frame of corrected in the same way current decoded frame to carry out regular decode to current decoded frame, notice execution the 3rd codec processing unit;
3rd codec processing unit, finding next image to be decoded for pressing decoding order, if next image to be decoded exists, then image to be decoded for the next one being set to current decoded frame, notice decoding acquiring unit;
Wherein, described decoded luminance information correction unit " carries out the correction in the same way of monochrome information " method by the reference frame of the correction parameter set pair current decoded frame of the first described reference picture or the second reference picture is:
ref t , m y ( i , j ) = k T y * ( ref t y ( i , j ) - min _ picture ref y ) + min _ frame t y
Wherein, the span of i, j is: 1≤i≤height yaMP.AMp.Amp & 1≤j≤width y; for the pixel value that the monochrome information of the reference frame of current decoded frame arranges in the i-th row jth; the pixel value that the monochrome information correcting the reference frame of rear current decoded frame in the same way for monochrome information arranges in the i-th row jth; be respectively the monochrome information adjustment factor of the corresponding reference frame of the current decoded frame that passes over from coding side, the minimum luminance value of the corresponding reference frame of current decoded frame, the minimum luminance value of original coding frame that current decoded frame is corresponding.
The present invention is directed to the film source that illumination variation occurs, propose a kind of novel decoding method.This method carries out correction process in the same way by the monochrome information to reference frame, chrominance information, thus the correlation strengthened between reference frame and coded frame, finally reach, reduce the number of intra prediction mode of MB of prediction frame, reduce code check consumption, promote the performance of encoder on inter-frame information redundancy is eliminated.
Accompanying drawing explanation
Fig. 1 is the embodiment of the present invention 1 method for video coding flow chart;
Fig. 2 is that step 104 in the embodiment of the present invention 1 " utilizes the first coding method to frame tencode " method flow diagram;
Fig. 3 is the embodiment of the present invention 2 video encoding/decoding method flow chart;
Fig. 4 is the embodiment of the present invention 3 video coding apparatus structural representation;
Fig. 5 is the structural representation of the 3rd processing unit in the embodiment of the present invention 3 video coding apparatus;
Fig. 6 is the embodiment of the present invention 4 video decoder structural representation.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearly understand, below in conjunction with drawings and Examples, the present invention being further elaborated, for convenience of explanation, illustrate only the part relevant to the embodiment of the present invention.Should be appreciated that the specific embodiment that this place is described, only for explaining the present invention, not in order to limit the present invention.
The invention provides a kind of based on image generation monochrome information gradual change when, for a kind of novel coding strategy that illumination gradual change film source occurs.
The prerequisite of the method is: suppose that all images are the n bitmaps with identical resolution.
Conveniently represent, the n bitmap in full refers to that each pixel of image n bit unsigned integer represents.Suppose that current encoded frame and the first reference picture, the second reference picture are all n bitmaps, the brightness value of its all pixel forms the monochrome information of respective image, the U chromatic value of all pixels forms the U chrominance information of respective image, and the V chromatic value of all pixels forms the V chrominance information of respective image; Remember that line number, the columns of its monochrome information are respectively: height y, width y; Remember that line number, the columns of its U chrominance information are respectively: height u, width u; Remember that line number, the columns of its V chrominance information are respectively: height v, width v.
Embodiment 1, the invention provides a kind of method for video coding, and see Fig. 1, the method can be:
Step 101: obtain current encoded frame, and carry out initialization operation and note t=0.
In the present invention, note tfor current sign variable; When encoding, t is the coding sequence number of current encoded frame; When decoding, t then represents the Decoding Order Number of current decoded frame.
Step 102: judge whether current encoded frame is I frame or scene switch frame, if perform step 103; Then perform step 104 if not.
In the present invention, frame tfor current encoded image; The decision method of this step Scene switch frame, belongs to prior art, is not repeated at this.
Step 103: utilize the second coding method (i.e. conventional I frame coding techniques) to frame tencode, then perform step 105; Conventional I frame coding techniques described in this step refers to intra-frame coding techniques, does not have the concept of reference frame, does not carry out inter prediction, only carry out infra-frame prediction.
Step 104: utilize the first coding method to frame tencode, then perform step 105.
Step 105: find next image to be encoded by coded sequence, judge whether next image to be encoded exists, then performs step 106 if not; If then, image to be encoded for the next one is set to current encoded image frame t, re-execute step 101.
Step 106: process ends.
See Fig. 2, in said method, step 104 " utilizes the first coding method to frame tencode " method can be:
Step 1041: initialization operation, namely arranges m=0, and m represents through the reference frame number of light gradient judgement.
Step 1042: judge frame trelative to picture ref1, picture ref2whether there is monochrome information gradual change, if there is monochrome information gradual change, then perform step 1043; If there is not monochrome information gradual change, then perform step 1045.
Step 1043: make note t=1;
In the present invention, picture ref1be the first reference picture, picture ref2it is the second reference picture.
Step 1044: arranging m is the first numerical value;
In step 1044, to arrange m be the method for the first numerical value can be:
Step 10441 judges whether picture ref1coding sequence number and picture ref2coding sequence number be all less than the coding sequence number of current encoded frame and picture ref1, picture ref2all encoded, if so, then perform step 10442; If not, then step 10443 is performed.
Step 10442: first make m=m+2, then performs step 1046.
Step 10443: judge whether picture ref1coding sequence number and picture ref2coding sequence number be all less than the coding sequence number of current encoded frame and picture ref1, picture ref2all uncoded, if so, then perform step 10444; If not, then step 10445 is performed.
Step 10444: first arrange m=m+2, then by picture ref1, picture ref2replace with the coding reconstructed image of its correspondence respectively, then perform step 1046.
Step 10445: first arrange m=m+1, is then less than the reference picture of current encoded frame coding sequence number, replaces with the coding reconstructed image of its correspondence by coding sequence number, another reference image setting is empty, then performs step 1046.
Step 1045: first arranging m is second value,
Namely to arrange m be the method for second value can be: m=m+sign (picture ref1)+sign (picture ref2), then perform step 1048
Wherein,
Sign (picture ref1) represent picture ref1be reference frame or be not reference frame time corresponding value;
Sign (picture ref2) represent picture ref2be reference frame or be not reference frame time corresponding value;
Step 1046: to the picture of non-NULL ref1, non-NULL picture ref2carry out the correction in the same way of monochrome information, obtain the correction parameter collection of the first reference picture, the second reference picture.
Step 1047: utilize the first reference picture of corrected in the same way non-NULL and the second reference picture of non-NULL to replace reference frame corresponding in reference listing.
Step 1048: judge that whether all reference frames of current encoded frame are all through the judgement of light gradient, namely determine whether
M>number list0+ number list1and frame tfor B frame) or (m>number list0and frame tfor P frame), if so, then perform step 1049; If not, then execution step 1042 is reentered;
Wherein number list0represent reference frame sum in forward direction reference listing; Number list1represent reference frame sum in backward reference listing.
Step 1049: to frame tin each macro block carry out conventional coded treatment flow process: carry out inter prediction, infra-frame prediction, rate-distortion optimization (RDO) model selection obtain optimum prediction mode, conversion, quantification and entropy code etc., finally complete frame tcoding.
Conventional coded treatment flow process (refer to inter-frame coding techniques, have the concept of reference frame, predictive mode can be considered in interframe and frame) described in this step all belongs to the content of prior art, is not repeated at this.
Step 1050: judge whether " note t=1 and optimum prediction mode is inter-frame forecast mode ", if then perform step 1051; As no execution step 105;
Step 1051: the first reference picture that in the optimum prediction mode confirmed in the conventional code processing method described in decoding end transmission step 1049, optimum reference frame is corresponding or the correction parameter collection of the second reference picture; Perform step 105;
Wherein, described " transmitting the correction parameter collection of the first reference picture corresponding to optimum reference frame in described optimum prediction mode or the second reference picture "; If the reference frame that namely the first reference picture is corresponding is optimum reference frame, then only transmit the correction parameter collection corresponding with the first reference picture, that is: if carried out U, V chrominance information in the method further to correct in the same way, so correction parameter collection has comprised further now decoding end k T y = k T 1 y , min _ picture ref y = min _ picture ref 1 y , k T u = k T 1 u , min _ picture ref u = min _ picture ref 1 u , k T v = k T 1 v , min _ picture ref v = min _ picture ref 1 v .
Wherein, it is the first reference picture monochrome information adjustment factor; represent picture ref1minimum luminance value; represent frame tminimum luminance value;
it is the first reference picture U chrominance information adjustment factor; represent picture ref1minimum U chromatic value; represent frame tminimum U chromatic value;
it is the first reference picture V chrominance information degree adjustment factor; represent frame tminimum V chromatic value; represent picture ref1minimum V chromatic value; be respectively the monochrome information adjustment factor of the corresponding reference frame of the current decoded frame that passes over from coding side, the minimum luminance value of the corresponding reference frame of current decoded frame, the minimum luminance value of original coding frame that current decoded frame is corresponding.
" frame is judged in step 1042 trelative to picture ref1, picture ref2whether there is monochrome information gradual change " method can be:
Step 10421: obtain the first reference picture and the second reference picture;
In this step, the method choosing the first reference picture and the second reference picture can be:
(1) choose satisfied sequence number of playing and be less than the image of current encoded frame broadcasting sequence number as the first reference picture;
(2) choose satisfied sequence number of playing and be greater than the image of current encoded frame broadcasting sequence number as the second reference picture.
(3) same current encoded frame frame t, the first corresponding reference picture and the second reference picture can not be used to " judge frame simultaneously trelative to picture ref1, picture ref2whether there is monochrome information gradual change " judgement.That is, for same current encoded frame, carry out " judging frame trelative to picture ref1, picture ref2whether there is monochrome information gradual change " time, the first reference picture and the second reference picture can not simultaneously " being selected ".
Step 10422: whether the first reference picture described in judgement and the second reference picture meet reference picture standard; Then re-execute step 10421 if not; If then perform step 10423;
Above-mentioned determination methods can be:
Judge whether the first reference picture and the second reference picture meet following condition simultaneously:
(1) first reference picture has identical encoding state with the second reference picture, i.e. the first reference picture and the second reference picture or all encoded, or does not all encode;
The coding sequence number of (2) first reference pictures and the coding sequence number of the second reference picture can not be greater than the coding sequence number of current encoded frame simultaneously.
Step 10423: obtain current encoded frame frame tthe probability distribution of monochrome information:
The probability distribution method of described acquisition current encoded frame monochrome information can be:
p t ( frame t y , k ) = cout ( frame t y , k ) / ( widty y * height y ) , k = 0,1,2 , . . . , 2 n - 1
Wherein,
sign ( frame t y ( i , j ) , k ) = 1 , frame t y ( i , j ) = k 0 , else
Wherein, y represents monochrome information; represent current encoded frame frame tmonochrome information; represent the pixel value of the image luminance information being positioned at current encoded frame i-th row jth row; represent corresponding value when equaling k and be not equal to k; Sum (variable | condition) represent all variable summations satisfied condition; represent frame tthe pixel value of middle monochrome information equals the pixel number of k; for probability distribution; The present invention supposes that all images are the n bitmaps with identical resolution.The monochrome information of the brightness value composing images of all pixels of image, line number, the columns of note image luminance information are respectively: height y, width y.N bitmap in the present invention refers to that each pixel of image n bit unsigned integer represents.
Step 10424: the probability distribution obtaining the first reference picture monochrome information, and the probability distribution of the second reference picture monochrome information.
In this step, the probability distribution method obtaining the first reference picture monochrome information can be:
p ref 1 ( picture ref 1 y , k ) = cout ( picture ref 1 y , k ) / ( widty y * height y ) , k = 0,1,2 , . . . , 2 n - 1
Wherein,
sign ( picture ref 1 y ( i , j ) , k ) = 1 , picture ref 1 y ( i , j ) = k 0 , else
Wherein, y represents monochrome information; represent the first reference picture picture ref1monochrome information; represent the pixel value of the image luminance information being positioned at the first reference picture i-th row jth row; represent corresponding value when equaling k and be not equal to k; Sum (variable | condition) represent all variable summations satisfied condition; represent picture ref1the pixel value of middle monochrome information equals the pixel number of k; for probability distribution; The present invention supposes that all images are the n bitmaps with identical resolution.The monochrome information of the brightness value composing images of all pixels of image, line number, the columns of note image luminance information are respectively: height y, width y.N bitmap in the present invention refers to that each pixel of image n bit unsigned integer represents.
In this step, the probability distribution method obtaining the second reference picture monochrome information can be:
p t ( picture ref 2 y , k ) = cout ( picture ref 2 y , k ) / ( widty y * height y ) , k = 0,1,2 , . . . , 2 n - 1
Wherein,
sign ( picture ref 2 y ( i , j ) , k ) = 1 , picture ref 2 y ( i , j ) = k 0 , else
Wherein, y represents monochrome information; represent the second reference picture picture ref2monochrome information; represent the pixel value of the image luminance information being positioned at the second reference picture i-th row jth row; represent corresponding value when equaling k and be not equal to k; Sum (variable | condition) represent all variable summations satisfied condition; represent picture ref2the pixel value of middle monochrome information equals the pixel number of k; for probability distribution; The present invention supposes that all images are the n bitmaps with identical resolution.The monochrome information of the brightness value composing images of all pixels of image, line number, the columns of note image luminance information are respectively: height y, width y.N bitmap in the present invention refers to that each pixel of image n bit unsigned integer represents.
Step 10425: whether the probability distribution determination current encoded frame according to the monochrome information of the current encoded frame obtained, the first reference picture, the second reference picture monochrome information gradual change occurs.
In this step, determine that the method whether current encoded frame monochrome information gradual change occurs can be:
Judge whether
max 0 &le; k &le; 2 n - 1 ( p ref 1 ( picture ref 1 y , k ) ) < max 0 &le; k &le; 2 n - 1 ( p t ( frame t y , k ) ) < max 0 &le; k &le; 2 n - 1 ( p ref 2 ( p ref 2 y , k ) )
Or
max 0 &le; k &le; 2 n - 1 ( p ref 2 ( picture ref 2 y , k ) ) < max 0 &le; k &le; 2 n - 1 ( p t ( frame t y , k ) ) < max 0 &le; k &le; 2 n - 1 ( p ref 1 ( p ref 1 y , k ) )
If so, then frame trelative to picture ref1, picture ref2there is monochrome information gradual change;
If not, then frame trelative to picture ref1, picture ref2there is not monochrome information gradual change.;
Wherein, represent all variable maximizings satisfied condition; Min (variable | condition) represent and all variablees satisfied condition are minimized; Y represents monochrome information; represent the second reference picture picture ref2monochrome information; for probability distribution; represent the first reference picture picture ref1monochrome information; for probability distribution.
" to the picture of non-NULL in above-mentioned steps 1046 ref1, non-NULL picture ref2carry out monochrome information, correction in the same way, obtain the correction parameter collection of the first reference picture, the second reference picture " method can be:
Step 10461: the first reference picture picture carrying out non-NULL ref1, non-NULL the second reference picture picture ref2monochrome information corrects in the same way, and bearing calibration is carried out as follows:
Step 104611: first, calculates current encoded frame frame tmonochrome information be worth most:
max _ frame t y = arg ( max 0 &le; k &le; 2 n - 1 ( p t ( frame t y , k ) ) )
In full, represent all variable maximizings satisfied condition; Min (variable | condition) represent and all variablees satisfied condition are minimized; represent frame tmaximum brightness value; represent frame tminimum luminance value; represent and first meet 0≤k≤2 to all n-1 ask for maximum, then k assignment corresponding for maximum is given in other words 0≤k≤2 nmake in-1 reach maximum k value, namely
p t ( frame t y , arg ( max 0 &le; k &le; 2 n - 1 ( p t ( frame t y , k ) ) ) ) = max 0 &le; k &le; 2 n - 1 ( p t ( frame t y , k ) ) , max _ frame t y Represent frame tmaximum brightness value; represent frame tminimum luminance value;
Step 104612: then, calculates the first reference picture picture of non-NULL ref1and the second reference picture picture of non-NULL ref2monochrome information be worth most:
max _ picture ref 1 y = arg ( max 0 &le; k &le; 2 n - 1 ( p ref 1 ( picture ref 1 y , k ) ) )
max _ picture ref 2 y = arg ( max 0 &le; k &le; 2 n - 1 ( p ref 2 ( picture ref 2 y , k ) ) )
In full, represent all variable maximizings satisfied condition; Min (variable | condition) represent and all variablees satisfied condition are minimized; represent picture ref1maximum brightness value; represent picture ref1minimum luminance value; represent picture ref2maximum brightness value; represent picture ref2minimum luminance value; represent and first meet 0≤k≤2 to all n-1 ask for maximum, then k assignment corresponding for maximum given, in other words 0≤k≤2 nmake in-1 reach the k value of maximum, namely p ref 1 ( picture ref 1 y , arg ( max 0 &le; k &le; 2 n - 1 ( p ref 1 ( picture ref 1 y , k ) ) ) ) = max 0 &le; k &le; 2 n - 1 ( p ref 1 ( picture ref 1 y , k ) ) ; represent and first meet 0≤k≤2 to all n-1 ask for maximum, then k assignment corresponding for maximum is given in other words 0≤k≤2 nmake in-1 reach maximum k value, namely p ref 2 ( picture ref 2 y , arg ( max 0 &le; k &le; 2 n - 1 ( p ref 2 ( picture ref 2 y , k ) ) ) ) = max 0 &le; k &le; 2 n - 1 ( p ref 2 ( picture ref 2 y , k ) ) ; represent picture ref1maximum brightness value; represent picture ref1minimum luminance value; represent picture ref2maximum brightness value; represent picture ref2minimum luminance value.
Step 104613: monochrome information is carried out to the brightness value of the first reference picture of non-NULL and each pixel of the second reference picture of non-NULL and corrects in the same way:
picture ref 1 , m y ( i , j ) = k T 1 y * ( picture ref 1 y ( i , j ) - min _ picture ref 1 y ) + min _ frame t y
picture ref 2 , m y ( i , j ) = k T 2 y * ( picture ref 2 y ( i , j ) - min _ picture ref 2 y ) + min _ frame t y
Wherein, k T 1 y = max _ frame t y - min _ frame t y max _ picture ref 1 y - min _ picture ref 1 y ; k T 2 y = max _ frame t y - min _ frame t y max _ picture ref 2 y - min _ picture ref 2 y ; The span of i, j is: 1≤i≤height yaMP.AMp.Amp & 1≤j≤width y; it is the first reference picture monochrome information adjustment factor; it is the second reference picture monochrome information adjustment factor; T1, T2 represent the coding sequence number of the corresponding reference frame of the first reference picture, the coding sequence number of the corresponding reference frame of the second reference picture respectively; Correction parameter collection is:
After carrying out above-mentioned several step, the correction parameter collection of the first reference picture, the second reference picture can be obtained.
In full, be respectively the monochrome information of the first reference picture, pixel value that the monochrome information of the second reference picture arranges in the i-th row jth; be respectively the pixel value that monochrome information corrects the rear monochrome information of the first reference picture in the same way, the monochrome information of the second reference picture arranges in the i-th row jth.
In step 1046, in order to better realize the correction in the same way of reference picture, the first reference picture picture of non-NULL can also be carried out further ref1, non-NULL the second reference picture picture ref2u chrominance information correct in the same way and correct in the same way with V chrominance information; Correction parameter collection increases the correction parameter collection of U, V chrominance information accordingly.
Step 10462: carry out U chrominance information and correct in the same way, bearing calibration is carried out as follows:
Utilize the monochrome information bearing calibration in the same way of step step 10461 above, carry out U chrominance information and correct in the same way, only with the correlated variables correlated variables of all brightness being replaced to U colourity.
Step 104621: first, calculates current encoded frame frame tu chrominance information be worth most:
max _ frame t u = arg ( max 0 &le; k &le; 2 n - 1 ( p t ( frame t u , k ) ) )
In full, represent all variable maximizings satisfied condition; Min (variable | condition) represent and all variablees satisfied condition are minimized; represent frame tmaximum U chromatic value; represent frame tminimum U chromatic value; represent and first meet 0≤k≤2 to all n-1 ask for maximum, then k assignment corresponding for maximum is given in other words 0≤k≤2 nmake in-1 reach maximum k value, namely
p t ( frame t u , arg ( max 0 &le; k &le; 2 n - 1 ( p t ( frame t u , k ) ) ) ) = max 0 &le; k &le; 2 n - 1 ( p t ( frame t u , k ) ) ; represent frame tmaximum U chromatic value; represent frame tminimum U chromatic value;
Step 104622: then, calculates the first reference picture picture of non-NULL ref1and the second reference picture picture of non-NULL ref2u chrominance information be worth most:
max _ picture ref 1 u = arg ( max 0 &le; k &le; 2 n - 1 ( p ref 1 ( picture ref 1 u , k ) ) )
max _ picture ref 2 u = arg ( max 0 &le; k &le; 2 n - 1 ( p ref 2 ( picture ref 2 u , k ) ) )
Wherein, represent all variable maximizings satisfied condition; Min (variable | condition) represent and all variablees satisfied condition are minimized; represent picture ref1maximum U chromatic value; represent picture ref1minimum U chromatic value; represent picture ref2maximum U chromatic value; represent picture ref2minimum U chromatic value; represent and first meet 0≤k≤2 to all n-1 ask for maximum, then k assignment corresponding for maximum is given in other words 0≤k≤2 nmake in-1 reach the k value of maximum, namely p ref 1 ( picture ref 1 u , arg ( max 0 &le; k &le; 2 n - 1 ( p ref 1 ( picture ref 1 u , k ) ) ) ) = max 0 &le; k &le; 2 n - 1 ( p ref 1 ( picture ref 1 u , k ) ) ; represent and first meet 0≤k≤2 to all n-1 ask for maximum, then k assignment corresponding for maximum is given in other words 0≤k≤2 nmake in-1 reach maximum k value, namely p ref 2 ( picture ref 2 u , arg ( max 0 &le; k &le; 2 n - 1 ( p ref 2 ( picture ref 2 u , k ) ) ) ) = max 0 &le; k &le; 2 n - 1 ( p ref 1 ( picture ref 2 u , k ) ) ; represent picture ref1maximum U chromatic value; represent picture ref1minimum U chromatic value; represent picture ref2maximum U chromatic value; represent picture ref2minimum U chromatic value;
Step 104623: U chrominance information is carried out to the U chrominance information of the first reference picture of non-NULL and each pixel of the second reference picture of non-NULL and corrects in the same way:
picture ref 1 , m u ( i , j ) = k 1 u * ( picture ref 1 u ( i , j ) - min _ picture ref 1 u ) + min _ frame t u
picture ref 2 , m u ( i , j ) = k 2 u * ( picture ref 2 u ( i , j ) - min _ picture ref 2 u ) + min _ frame t u Wherein, k T 1 u = max _ frame t u - min _ frame t u max _ picture ref 1 u - min _ picture ref 1 u ; k T 2 u = max _ frame t u - min _ frame t u max _ picture ref 2 u - min _ picture ref 2 u ; Wherein, the span of i, j is: 1≤i≤height uaMP.AMp.Amp & 1≤j≤width u; it is the first reference picture U chrominance information adjustment factor; it is the second reference picture U chrominance information adjustment factor; T1, T2 represent the coding sequence number of the corresponding reference frame of the first reference picture, the coding sequence number of the corresponding reference frame of the second reference picture respectively; Accordingly, described " correction parameter collection " comprises the correction parameter collection of U chrominance information further
In full, be respectively the U chrominance information of the first reference picture, pixel value that the U chrominance information of the second reference picture arranges in the i-th row jth; be respectively the pixel value that U chrominance information corrects the rear U chrominance information of the first reference picture in the same way, the U chrominance information of the second reference picture arranges in the i-th row jth.
Step 10463: then, carry out V chrominance information and correct in the same way, bearing calibration is carried out as follows:
Utilize the monochrome information bearing calibration in the same way of step 10461 above, carry out V chrominance information and correct in the same way, only with the correlated variables correlated variables of all brightness being replaced to V colourity.
Step 104631: first, calculates current encoded frame frame tv chrominance information:
max _ frame t v = arg ( max 0 &le; k &le; 2 n - 1 ( p t ( frame t v , k ) ) )
In full, represent all variable maximizings satisfied condition; Min (variable | condition) represent and all variablees satisfied condition are minimized; represent frame tmaximum V chromatic value; represent frame tminimum V chromatic value; represent and first meet 0≤k≤2 to all n-1 ask for maximum, then k assignment corresponding for maximum is given in other words 0≤k≤2 nmake in-1 reach maximum k value, namely p t ( frame t v , arg ( max 0 &le; k &le; 2 n - 1 ( p t ( frame t v , k ) ) ) ) = max 0 &le; k &le; 2 n - 1 ( p t ( frame t v , k ) ) ; represent frame tmaximum V chromatic value; represent frame tminimum V chromatic value.
Step 104632: then, calculates the first reference picture picture of non-NULL ref1and the second reference picture picture of non-NULL ref2v chrominance information be worth most:
max _ picture ref 1 v = arg ( max 0 &le; k &le; 2 n - 1 ( p ref 1 ( picture ref 1 v , k ) ) )
max _ picture ref 2 v = arg ( max 0 &le; k &le; 2 n - 1 ( p ref 2 ( picture ref 2 v , k ) ) )
Wherein, represent all variable maximizings satisfied condition; Min (variable | condition) represent and all variablees satisfied condition are minimized; represent picture ref1maximum V chromatic value; represent picture ref1minimum V chromatic value; represent picture ref2maximum V chromatic value; represent picture ref2minimum V chromatic value; represent and first meet 0≤k≤2 to all n-1 ask for maximum, then k assignment corresponding for maximum is given in other words 0≤k≤2 nmake in-1 reach the k value of maximum, namely p ref 1 ( picture ref 1 v , arg ( max 0 &le; k &le; 2 n - 1 ( p ref 1 ( picture ref 1 v , k ) ) ) ) = max 0 &le; k &le; 2 n - 1 ( p ref 1 ( picture ref 1 v , k ) ) ; represent and first meet 0≤k≤2 to all n-1 ask for maximum, then k assignment corresponding for maximum is given in other words 0≤k≤2 nmake in-1 reach maximum k value, namely p ref 2 ( picture ref 2 v , arg ( max 0 &le; k &le; 2 n - 1 ( p ref 2 ( picture ref 2 v , k ) ) ) ) = max 0 &le; k &le; 2 n - 1 ( p ref 1 ( picture ref 2 v , k ) ) ; represent picture ref1maximum V chromatic value; represent picture ref1minimum V chromatic value; represent picture ref2maximum V chromatic value; Represent picture ref2minimum V chromatic value;
Step 104633: V chrominance information is carried out to the V chrominance information of the first reference picture of non-NULL and each pixel of the second reference picture of non-NULL and corrects in the same way:
picture ref 1 , m v ( i , j ) = k 1 v * ( picture ref 1 v ( i , j ) - min _ picture ref 1 v ) + min _ frame t v
picture ref 2 , m v ( i , j ) = k 2 v * ( picture ref 2 v ( i , j ) - min _ picture ref 2 v ) + min _ frame t v
Wherein, k T 1 v = max _ frame t v - min _ frame t v max _ picture ref 1 v - min _ picture ref 1 v ;
k T 2 v = max _ frame t v - min _ frame t v max _ picture ref 2 v - min _ picture ref 2 v ; The span of i, j is: 1≤i≤height vaMP.AMp.Amp & 1≤j≤width v; it is the first reference picture V chrominance information degree adjustment factor; it is the second reference picture V chrominance information degree adjustment factor; T1, T2 represent the coding sequence number of the corresponding reference frame of the first reference picture, the coding sequence number of the corresponding reference frame of the second reference picture respectively; Accordingly, described correction parameter collection " comprise further: the correction parameter collection of V chrominance information represent frame tmaximum V chromatic value; represent frame tminimum V chromatic value. be respectively the V chrominance information of the first reference picture, pixel value that the monochrome information of the second reference picture arranges in the i-th row jth; be respectively the pixel value that V chrominance information corrects the rear V chrominance information of the first reference picture in the same way, the V chrominance information of the second reference picture arranges in the i-th row jth.
Embodiment 2, corresponding to above-mentioned method for video coding, the present invention also provides a kind of video encoding/decoding method, and see Fig. 3, the method is:
Step 201: the correction parameter collection obtaining current decoded frame and the first reference picture or the second reference picture;
Step 202: judge whether that described current sign variable is 0, if not, then performs step 204; If then perform step 203;
Step 203: carry out regular decode, then performs step 206;
Step 204: the correction in the same way being carried out monochrome information by the reference frame of the correction parameter set pair current decoded frame of the first described reference picture or the second reference picture;
Step 205: utilize the reference frame of corrected in the same way current decoded frame to carry out regular decode to current decoded frame;
Step 206: whether the current decoded frame described in judgement is last frame to be decoded of current video sequence, is then set to current decoded frame if not and performs step 201 by frame to be decoded for the next one; If then perform step 207;
Step 207: process ends.
Pass through the correction parameter collection of the first described reference picture or the second reference picture in step 204, the method corrected in the same way of the reference frame of current decoded frame being carried out to monochrome information can be:
ref t , m y ( i . j ) = k T y * ( ref t y ( i , j ) - min _ picture ref y ) + min _ frame t y
Wherein, the span of i, j is: 1≤i≤height yaMP.AMp.Amp & 1≤j≤width y; for the pixel value that the monochrome information of the reference frame of current decoded frame arranges in the i-th row jth; the pixel value that the monochrome information correcting the reference frame of rear current decoded frame in the same way for monochrome information arranges in the i-th row jth; be respectively the monochrome information adjustment factor of the corresponding reference frame of the current decoded frame that passes over from coding side, the minimum luminance value of the corresponding reference frame of current decoded frame, the minimum luminance value of original coding frame that current decoded frame is corresponding.
When having carried out U, V chrominance information timing in the same way in coding method, coding/decoding method adaptive increase should carry out to the reference frame of current decoded frame the process that U, V chrominance information corrects in the same way:
(1) reference frame to current decoded frame described in carries out the method that U chrominance information corrects in the same way and is specially:
ref t , m u ( i . j ) = k T u * ( ref t u ( i , j ) - min _ picture ref u ) + min _ frame t u
Wherein, the span of i, j is: 1≤i≤height uaMP.AMp.Amp & 1≤j≤width u; for the pixel value that the U chrominance information of the reference frame of current decoded frame arranges in the i-th row jth; the pixel value that the U chrominance information correcting the reference frame of rear current decoded frame in the same way for U chrominance information arranges in the i-th row jth; be respectively the U chrominance information degree adjustment factor of the corresponding reference frame of the current decoded frame that passes over from coding side, the minimum U chromatic value of the corresponding reference frame of current decoded frame, the minimum U chromatic value of original coding frame that current decoded frame is corresponding.
(2) described in " V chrominance information carried out to the reference frame of current decoded frame correct in the same way " method be specially:
ref t , m v ( i . j ) = k T v * ( ref t v ( i , j ) - min _ picture ref v ) + min _ frame t v
Wherein, the span of i, j is: 1≤i≤height vaMP.AMp.Amp & 1≤j≤width v; for the pixel value that the V chrominance information of the reference frame of current decoded frame arranges in the i-th row jth; the pixel value that the V chrominance information correcting the reference frame of rear current decoded frame in the same way for V chrominance information arranges in the i-th row jth; be respectively the V chrominance information degree adjustment factor of the corresponding reference frame of the current decoded frame that passes over from coding side, the minimum V chromatic value of the corresponding reference frame of current decoded frame, the minimum V chromatic value of original coding frame that current decoded frame is corresponding.
Embodiment 3, see Fig. 4; Corresponding to embodiment 1, the present invention also provides a kind of video decoder, and this device comprises: the first acquiring unit, the first processing unit, the second processing unit;
First acquiring unit, for obtaining frame t(current encoded frame), and note is set t=0, note tfor current sign variable;
First processing unit, comprises the first judging unit and the 3rd processing unit and the 11 processing unit;
Described first judging unit, for judging whether current encoded frame is I frame or scene switch frame;
Described 3rd processing unit, for when the first judging unit judged result is no, then utilizes the first coding method to frame tencode;
11 processing unit, for when the judged result of the first judging unit is for being, utilizes the second coding method to frame tencode;
Second processing unit, finding next image to be encoded for pressing coded sequence, if next image to be encoded exists, then image to be encoded for the next one being set to frame t, notice execution first acquiring unit, if next image to be encoded does not exist, then process ends process.
(1) see Fig. 5, the 3rd described processing unit comprises the first setting unit, fourth processing unit, correcting unit, replacement unit, the 5th processing unit;
Described first setting unit, arrange m=0, m represents relative to frame tthrough the reference frame number of light gradient judgement;
Described fourth processing unit, comprises the second judging unit and the second setting unit;
Described second judging unit, for judging frame trelative to picture ref1(the first reference picture), picture ref2whether (the second reference picture) there is monochrome information gradual change;
Described second setting unit, for making note when the second judging unit judged result for the gradual change of generation monochrome information is then arranged t=1; Arranging m is the first numerical value;
Correcting unit, for the picture to non-NULL ref1, non-NULL picture ref2carry out the correction in the same way of monochrome information, obtain the correction parameter collection of a reference picture, the second reference picture;
Replacement unit, for utilizing the picture of corrected in the same way non-NULL ref1and the picture of non-NULL ref2replace reference frame corresponding in reference listing;
5th processing unit, comprises the 3rd judging unit, the 6th processing unit,
Described 3rd judging unit, for judging that whether all reference frames of current encoded frame are all through the judgement of light gradient, perform the second judging unit if not, if perform the 6th processing unit;
Described 6th processing unit, to frame tin each macro block carry out conventional coded treatment; Judge whether " note t=1 and optimum prediction mode is inter-frame forecast mode ", then perform the second processing unit if not; If so, the first reference picture that in the optimum prediction mode confirmed in " conventional coded treatment " described in then transmitting to video decoder, optimum reference frame is corresponding or the correction parameter collection of the second reference picture, perform the second processing unit;
If so, then to frame tin each macro block carry out conventional coded treatment; Judge whether " note t=1 and optimum prediction mode is inter-frame forecast mode ", then notify if not the second processing unit " by coded sequence find next image to be encoded "; If so, the correction parameter collection of the first reference picture that in the optimum prediction mode confirmed in described " conventional coded treatment ", optimum reference frame is corresponding or the second reference picture is then transmitted.
(2) described second judging unit comprises second acquisition unit, the 4th judging unit, the 7th processing unit, the first determining unit:
Second acquisition unit, for obtaining picture ref1with picture ref2;
4th judging unit, for judging described picture ref1and picture ref2whether meet reference picture standard;
7th processing unit comprises the 8th processing unit, the 9th processing unit;
8th processing unit is no for the judged result when the 4th judging unit, then notice performs second acquisition unit;
9th processing unit, is yes for the judged result when the 4th judging unit, then obtains frame tthe probability distribution of monochrome information; Obtain picture ref1the probability distribution of monochrome information, and picture ref2the probability distribution of monochrome information;
First determining unit, whether the probability distribution determination current encoded frame for the monochrome information according to the current encoded frame obtained, the first reference picture, the second reference picture there is monochrome information gradual change.
(3) described second acquisition unit comprises: first chooses unit, second chooses unit, the 3rd and choose unit, the second determining unit;
First chooses unit, is less than the image of current encoded frame broadcasting sequence number as the first reference picture for choosing satisfied sequence number of playing;
Second chooses unit, is greater than the image of current encoded frame broadcasting sequence number as the second reference picture for choosing satisfied sequence number of playing.
3rd chooses unit, for same current encoded frame frame t, the first corresponding reference picture and the second reference picture can not be used to " judge frame simultaneously trelative to picture ref1, picture ref2whether there is monochrome information gradual change " judgement.
(4) described fourth processing unit comprises the 5th judging unit, the 6th judging unit, the 7th judging unit;
5th judging unit, for judging picture ref1and picture ref2whether meet the condition of the 6th judging unit and the 7th judging unit simultaneously:
6th judging unit, for determining picture ref1with picture ref2there is identical encoding state, i.e. the first reference picture and the second reference picture or all encoded, or all do not encode;
7th judging unit, for determining picture ref1coding sequence number and picture ref2coding sequence number can not be greater than frame simultaneously tcoding sequence number.
(5) the 9th processing unit described in comprises the 3rd acquiring unit, the 4th acquiring unit, the 5th acquiring unit;
3rd acquiring unit, for " obtaining frame tthe probability distribution of monochrome information " be:
p t ( frame t y , k ) = count ( frame t y , k ) / ( width y * height y ) , k = 0,1,2 , . . . , 2 n - 1
Wherein,
sign ( frame t y ( i , j ) , k ) = 1 , frame t y ( i , j ) = k 0 , else
Y represents monochrome information; represent current encoded frame frame tmonochrome information; represent the pixel value of the image luminance information being positioned at current encoded frame i-th row jth row; represent corresponding value when equaling k and be not equal to k; Sum (variable | condition) represent all variable summations satisfied condition; represent frame tthe pixel value of middle monochrome information equals the pixel number of k; for probability distribution; The monochrome information of the brightness value composing images of all pixels of image, line number, the columns of note image luminance information are respectively: height y, width y;
4th acquiring unit, for " obtaining the probability distribution of the first reference picture monochrome information ":
p ref 1 ( frame ref 1 y , k ) = count ( frame ref 1 y , k ) / ( width y * height y ) , k = 0,1,2 , . . . , 2 n - 1
Wherein,
sign ( picture ref 1 y ( i , j ) , k ) = 1 , picture ref 1 y ( i , j ) = k 0 , else
Y represents monochrome information; represent the first reference picture picture ref1monochrome information; represent the pixel value of the image luminance information being positioned at the first reference picture i-th row jth row; represent corresponding value when equaling k and be not equal to k; Sum (variable | condition) represent all variable summations satisfied condition; represent picture ref1the pixel value of middle monochrome information equals the pixel number of k; for probability distribution; The monochrome information of the brightness value composing images of all pixels of image, line number, the columns of note image luminance information are respectively: height y, width y.N bitmap in the present invention refers to that each pixel of image n bit unsigned integer represents;
5th acquiring unit, for " obtaining the probability distribution of the second reference picture monochrome information ":
p t ( picture ref 2 y , k ) = count ( picture ref 2 y , k ) / ( width y * height y ) , k = 0,1,2 , . . . , 2 n - 1
Wherein,
sign ( picture ref 2 y ( i , j ) , k ) = 1 , picture ref 2 y ( i , j ) = k 0 , else
Wherein, y represents monochrome information; represent the second reference picture picture ref2monochrome information; represent the pixel value of the image luminance information being positioned at the second reference picture i-th row jth row; represent corresponding value when equaling k and be not equal to k; Sum (variable | condition) represent all variable summations satisfied condition; represent picture ref2the pixel value of middle monochrome information equals the pixel number of k; for probability distribution; The monochrome information of the brightness value composing images of all pixels of image, line number, the columns of note image luminance information are respectively: height y, width y.
(7) the first determining unit described in comprises the 8th judging unit, the second determining unit:
8th judging unit, for judging whether
max 0 &le; k &le; 2 n - 1 ( p ref 1 ( picture ref 1 y , k ) ) < max 0 &le; k &le; 2 n - 1 ( p t ( frame t y , k ) ) < max 0 &le; k &le; 2 n - 1 ( p ref 2 ( p ref 2 y , k ) )
Or
max 0 &le; k &le; 2 n - 1 ( p ref 2 ( picture ref 2 y , k ) ) < max 0 &le; k &le; 2 n - 1 ( p t ( frame t y , k ) ) < max 0 &le; k &le; 2 n - 1 ( p ref 1 ( p ref 1 y , k ) )
Second determining unit is yes for working as the 8th judging unit judged result, then frame trelative to picture ref1, picture ref2there is monochrome information gradual change; Ruo Dang eight judging unit judged result is no, then frame trelative to picture ref1, picture ref2there is not monochrome information gradual change;
Wherein, represent all variable maximizings satisfied condition; Min (variable | condition) represent and all variablees satisfied condition are minimized; Y represents monochrome information; represent the second reference picture picture ref2monochrome information; for probability distribution; represent the first reference picture picture ref1monochrome information; for probability distribution.
(8) correcting unit described in comprises monochrome information correcting unit, and wherein monochrome information correcting unit comprises: the first computing unit, the second computing unit, the 3rd computing unit;
First computing unit, for calculating current encoded frame frame tmonochrome information be worth most;
max _ frame t y = arg ( max 0 &le; k &le; 2 n - 1 ( p t ( frame t y , k ) ) )
Wherein, represent all variable maximizings satisfied condition; Min (variable | condition) represent and all variablees satisfied condition are minimized; represent and first meet 0≤k≤2 to all n-1 ask for maximum, then k assignment corresponding for maximum is given represent frame tmaximum brightness value; represent frame tminimum luminance value;
Second computing unit, for calculating the first reference picture picture of non-NULL ref1and the second reference picture picture of non-NULL ref2monochrome information be worth most;
max _ picture ref 1 y = arg ( max 0 &le; k &le; 2 n - 1 ( p ref 1 ( picture ref 1 y , k ) ) )
max _ picture ref 2 y = arg ( max 0 &le; k &le; 2 n - 1 ( p ref 2 ( picture ref 2 y , k ) ) )
Wherein, represent all variable maximizings satisfied condition; Min (variable | condition) represent and all variablees satisfied condition are minimized; represent and first meet 0≤k≤2 to all n-1 ask for maximum, then k assignment corresponding for maximum is given represent picture ref1maximum brightness value; represent picture ref1minimum luminance value; represent picture ref2maximum brightness value; represent picture ref2minimum luminance value;
3rd computing unit, for calculating the first reference picture picture of non-NULL ref1and the second reference picture picture of non-NULL ref2monochrome information be worth most, obtain the correction parameter collection of a reference diagram or the second reference picture;
picture ref 1 , m y ( i , j ) = k T 1 y * ( picture ref 1 y ( i , j ) - min _ picture ref 1 y ) + min _ frame t y
picture ref 2 , m y ( i , j ) = k T 2 y * ( picture ref 2 y ( i , j ) - min _ picture ref 2 y ) + min _ frame t y
Wherein, k T 1 y = max _ frame t y - min _ frame t y max _ picture ref 1 y - min _ picture ref 1 y ; k T 2 y = max _ frame t y - min _ frame t y max _ picture ref 2 y - min _ picture ref 2 y ; The span of i, j is: 1≤i≤height yaMP.AMp.Amp & 1≤j≤width y; it is the first reference picture monochrome information adjustment factor; it is the second reference picture monochrome information adjustment factor; T1, T2 represent the coding sequence number of the corresponding reference frame of the first reference picture, the coding sequence number of the corresponding reference frame of the second reference picture respectively; Correction parameter collection is: max (variable | condition) represent all variable maximizings satisfied condition; Min (variable | condition) represent and all variablees satisfied condition are minimized; be respectively the monochrome information of the first reference picture, pixel value that the monochrome information of the second reference picture arranges in the i-th row jth; be respectively the pixel value that monochrome information corrects the rear monochrome information of the first reference picture in the same way, the monochrome information of the second reference picture arranges in the i-th row jth.
(9), described correcting unit comprises U chrominance information correcting unit and V chrominance information correcting unit further;
U chrominance information correcting unit, for the picture to non-NULL ref1, non-NULL picture ref2carry out U chrominance information to correct in the same way
V chrominance information correcting unit, for the picture to non-NULL ref1, non-NULL picture ref2carry out V chrominance information to correct in the same way.
Described U chrominance information correcting unit comprises the 4th computing unit, the 5th computing unit, the 6th computing unit;
4th computing unit, for calculating frame tu chrominance information be worth most:
max _ frame t u = arg ( max 0 &le; k &le; 2 n - 1 ( p t ( frame t u , k ) ) )
Wherein, represent all variable maximizings satisfied condition; Min (variable | condition) represent and all variablees satisfied condition are minimized; represent and first meet 0≤k≤2 to all n-1 ask for maximum, then k assignment corresponding for maximum is given represent frame tmaximum U chromatic value; represent frame tminimum U chromatic value;
5th computing unit, for calculating the picture of non-NULL ref1and the picture of non-NULL ref2u chrominance information be worth most:
max _ picture ref 1 u = arg ( max 0 &le; k &le; 2 n - 1 ( p ref 1 ( picture ref 1 u , k ) ) )
max _ picture ref 2 u = arg ( max 0 &le; k &le; 2 n - 1 ( p ref 2 ( picture ref 2 u , k ) ) )
Wherein, represent all variable maximizings satisfied condition; Min (variable | condition) represent and all variablees satisfied condition are minimized; represent and first meet 0≤k≤2 to all n-1 ask for maximum, then k assignment corresponding for maximum is given in other words 0≤k≤2 nmake in-1 reach the k value of maximum, namely p ref 1 ( picture ref 1 u , arg ( max 0 &le; k &le; 2 n - 1 ( p ref 1 ( picture ref 1 u , k ) ) ) ) = max 0 &le; k &le; 2 n - 1 ( p ref 1 ( picture ref 1 u , k ) ) ; represent and first meet 0≤k≤2 to all n-1 ask for maximum, then k assignment corresponding for maximum is given in other words 0≤k≤2 nmake in-1 reach maximum k value, namely p ref 2 ( picture ref 2 u , arg ( max 0 &le; k &le; 2 n - 1 ( p ref 2 ( picture ref 2 u , k ) ) ) ) = max 0 &le; k &le; 2 n - 1 ( p ref 2 ( picture ref 2 u , k ) ) ; represent picture ref1maximum U chromatic value; represent picture ref1minimum U chromatic value;
represent picture ref2maximum U chromatic value; represent picture ref2minimum U chromatic value;
6th computing unit, for the picture to non-NULL ref1and the picture of non-NULL ref2the U chrominance information of each pixel is carried out U chrominance information and is corrected in the same way:
picture ref 1 , m u ( i , j ) = k 1 u * ( picture ref 1 u ( i , j ) - min _ picture ref 1 u ) + min _ frame t u
picture ref 2 , m u ( i , j ) = k 2 u * ( picture ref 2 u ( i , j ) - min _ picture ref 2 u ) + min _ frame t u ;
Wherein, k T 1 u = max _ frame t u - min _ frame t u max _ picture ref 1 u - min _ picture ref 1 u ;
k T 2 u = max _ frame t u - min _ frame t u max _ picture ref 2 u - min _ picture ref 2 u ;
The span of i, j is: 1≤i≤height uaMP.AMp.Amp & 1≤j≤width u; it is the first reference picture U chrominance information adjustment factor; it is the second reference picture U chrominance information adjustment factor; T1, T2 represent the coding sequence number of the corresponding reference frame of the first reference picture, the coding sequence number of the corresponding reference frame of the second reference picture respectively; Described correction parameter collection comprises further: the correction parameter collection of U chrominance information be respectively the U chrominance information of the first reference picture, pixel value that the U chrominance information of the second reference picture arranges in the i-th row jth; be respectively the pixel value that U chrominance information corrects the rear U chrominance information of the first reference picture in the same way, the U chrominance information of the second reference picture arranges in the i-th row jth).
(10) V chrominance information correcting unit comprises the 7th computing unit, the 8th computing unit, the 9th computing unit;
7th computing unit, for calculating frame tv chrominance information:
max _ frame t v = arg ( max 0 &le; k &le; 2 n - 1 ( p t ( frame t v , k ) ) )
Wherein, represent all variable maximizings satisfied condition; Min (variable | condition) represent and all variablees satisfied condition are minimized; represent and first meet all ask for maximum, then k assignment corresponding for maximum is given in other words 0≤k≤2 nmake in-1 reach maximum k value, namely
p t ( frame t v , arg ( max 0 &le; k &le; 2 n - 1 ( p t ( frame t v , k ) ) ) ) = max 0 &le; k &le; 2 n - 1 ( p t ( frame t v , k ) ) ; represent frame tmaximum V chromatic value; represent frame tminimum V chromatic value;
8th computing unit, for calculating the picture of non-NULL ref1and the picture of non-NULL ref2v chrominance information be worth most:
max _ picture ref 1 v = arg ( max 0 &le; k &le; 2 n - 1 ( p ref 1 ( picture ref 1 v , k ) ) )
max _ picture ref 2 v = arg ( max 0 &le; k &le; 2 n - 1 ( p ref 2 ( picture ref 2 v , k ) ) )
Wherein, represent all variable maximizings satisfied condition; Min (variable | condition) represent and all variablees satisfied condition are minimized; represent and first meet 0≤k≤2 to all n-1 ask for maximum, then k assignment corresponding for maximum is given in other words 0≤k≤2 nmake in-1 reach the k value of maximum, namely p ref 1 ( picture ref 1 v , arg ( max 0 &le; k &le; 2 n - 1 ( p ref 1 ( picture ref 1 v , k ) ) ) ) = max 0 &le; k &le; 2 n - 1 ( p ref 1 ( picture ref 1 v , k ) ) ; represent and first meet 0≤k≤2 to all n-1 ask for maximum, then k assignment corresponding for maximum is given in other words 0≤k≤2 nmake in-1 reach maximum k value, namely p ref 2 ( picture ref 2 v , arg ( max 0 &le; k &le; 2 n - 1 ( p ref 2 ( picture ref 2 v , k ) ) ) ) = max 0 &le; k &le; 2 n - 1 ( p ref 1 ( picture ref 2 v , k ) ) ; represent picture ref1maximum V chromatic value; represent picture ref1minimum V chromatic value; represent picture ref2maximum V chromatic value; Represent picture ref2minimum V chromatic value;
9th computing unit, for the picture to non-NULL ref1and the picture of non-NULL ref2the V chrominance information of each pixel is carried out V chrominance information and is corrected in the same way:
picture ref 1 , m v ( i , j ) = k 1 v * ( picture ref 1 v ( i , j ) - min _ picture ref 1 v ) + min _ frame t v
picture ref 2 , m v ( i , j ) = k 2 v * ( picture ref 2 v ( i , j ) - min _ picture ref 2 v ) + min _ frame t v
Wherein, k T 1 v = max _ frame t v - min _ frame t v max _ picture ref 1 v - min _ picture ref 1 v ;
k T 2 v = max _ frame t v - min _ frame t v max _ picture ref 2 v - min _ picture ref 2 v ;
The span of i, j is: 1≤i≤height vaMP.AMp.Amp & 1≤j≤width v; it is the first reference picture V chrominance information degree adjustment factor; it is the second reference picture V chrominance information degree adjustment factor; T1, T2 represent the coding sequence number of the corresponding reference frame of the first reference picture, the coding sequence number of the corresponding reference frame of the second reference picture respectively; Described correction parameter collection comprises further: the correction parameter collection of V chrominance information be respectively the V chrominance information of the first reference picture, pixel value that the monochrome information of the second reference picture arranges in the i-th row jth; be respectively the pixel value that V chrominance information corrects the rear V chrominance information of the first reference picture in the same way, the V chrominance information of the second reference picture arranges in the i-th row jth.
(11) the first setting unit described in comprises: the 9th judging unit, the tenth processing unit;
9th judging unit, for judging whether picture ref1coding sequence number and picture ref2coding sequence number be all less than the coding sequence number of current encoded frame and picture ref1, picture ref2all encoded;
First tenth processing unit, for being yes when the 9th judging unit judged result, then make m=m+2, then notifies that monochrome information correcting unit continues " to the picture of non-NULL ref1, non-NULL picture ref2carry out the correction in the same way of monochrome information ";
When the 9th judging unit judged result is no, then judge whether picture ref1coding sequence number and picture ref2coding sequence number be all less than the coding sequence number of current encoded frame and picture ref1, picture ref2all uncoded, if so, then first m=m+2 is set, then by picture ref1, picture ref2replace with the coding reconstructed image of its correspondence respectively, then continue " to the picture of non-NULL ref1, non-NULL picture ref2carry out the correction in the same way of monochrome information "; If not, then m=m+1 is set, then coding sequence number is less than the first or second reference picture of current encoded frame coding sequence number, replace with the coding reconstructed image of its correspondence, another first or second reference image setting is empty, then notifies that monochrome information correcting unit continues " to the picture of non-NULL ref1, non-NULL picture ref2carry out the correction in the same way of monochrome information ".
(12), described fourth processing unit comprises the 3rd setting unit further;
3rd setting unit comprises the 4th setting unit and the first notification unit;
4th setting unit, for when the second judging unit judged result is not for monochrome information gradual change occurs, then arranging m is second value;
m=m+sign(picture ref1)+sign(picture ref2),
Wherein,
Wherein, m represents relative to frame tthrough the reference frame number of light gradient judgement; Sign (picture ref1) represent picture ref1be reference frame or be not reference frame time corresponding value; Sign (picture ref2, k) represent picture ref2be reference frame or be not reference frame time corresponding value;
First notification unit, for arranging after m is second value, notifies that the second judging unit continues " judging that whether all reference frames of current encoded frame are all through the judgement of light gradient ".
(13), the 3rd described judging unit, " judging that whether all reference frames of current encoded frame are all through the judgement of light gradient " is specially;
M>number list0+ number list1and frame tfor B frame) or (m>number list0and frame tfor P frame);
Wherein, m represents relative to frame tthrough the reference frame number of light gradient judgement; Number list0represent reference frame sum in forward direction reference listing; Number list1represent reference frame sum in backward reference listing.
Corresponding to embodiment 4, see Fig. 6, the present invention also provides a kind of video decoder, and described device comprises: decoding acquiring unit, the first codec processing unit, the second codec processing unit, the 3rd codec processing unit;
Decoding acquiring unit, for obtaining the correction parameter collection of current decoded frame and the first reference picture or the second reference picture;
First codec processing unit, comprises the first decoding judgement unit, decoded luminance information correction unit, regular decode unit;
The first described decoding judgement unit, for judging whether that current sign variable is 0;
Described decoded luminance information correction unit, for when the judged result of the first decoding judgement unit is no, the correction in the same way of monochrome information is carried out, notice execution second codec processing unit by the reference frame of the correction parameter set pair current decoded frame of the first described reference picture or the second reference picture;
Regular decode unit, for when the judged result of the first decoding judgement unit is for being, carries out regular decode process to described current decoded frame; Notice execution the 3rd codec processing unit;
Second codec processing unit, for utilizing the reference frame of corrected in the same way current decoded frame to carry out regular decode to current decoded frame, notice execution the 3rd codec processing unit;
3rd codec processing unit, finding next image to be decoded for pressing decoding order, if next image to be decoded exists, then image to be decoded for the next one being set to current decoded frame, notice decoding acquiring unit;
Wherein, described decoded luminance information correction unit " carries out the correction in the same way of monochrome information " method by the reference frame of the correction parameter set pair current decoded frame of the first described reference picture or the second reference picture is:
ref t , m y ( i . j ) = k T y * ( ref t y ( i , j ) - min _ picture ref y ) + min _ frame t y
Wherein, the span of i, j is: 1≤i≤height yaMP.AMp.Amp & 1≤j≤width y; for the pixel value that the monochrome information of the reference frame of current decoded frame arranges in the i-th row jth; the pixel value that the monochrome information correcting the reference frame of rear current decoded frame in the same way for monochrome information arranges in the i-th row jth; be respectively the monochrome information adjustment factor of the corresponding reference frame of the current decoded frame that passes over from coding side, the monochrome information of the original coding frame that monochrome information is worth most, current decoded frame is corresponding of the corresponding reference frame of current decoded frame is worth most.
When video decoder includes U chrominance information correcting unit and V chrominance information correcting unit, the first codec processing unit of this video decoder comprises decoding U chrominance information correcting unit, V chrominance information correcting unit further;
U chrominance information correcting unit, after the monochrome information for having carried out the reference frame of current decoded frame when decoded luminance information correction unit corrects, continues to carry out U chrominance information to the reference frame of current decoded frame and corrects in the same way:
ref t , m u ( i . j ) = k T u * ( ref t u ( i , j ) - min _ picture ref u ) + min _ frame t u
Wherein, the span of i, j is: 1≤i≤height uaMP.AMp.Amp & 1≤j≤width u; for the pixel value that the U chrominance information of the reference frame of current decoded frame arranges in the i-th row jth; the pixel value that the U chrominance information correcting the reference frame of rear current decoded frame in the same way for U chrominance information arranges in the i-th row jth; be respectively the U chrominance information degree adjustment factor of the corresponding reference frame of the current decoded frame that passes over from coding side, the U chrominance information of the original coding frame that U chrominance information is worth most, current decoded frame is corresponding of the corresponding reference frame of current decoded frame is worth most;
Decoding V chrominance information correcting unit, after the monochrome information for having carried out the reference frame of current decoded frame when decoded luminance information correction unit corrects, continues to carry out U chrominance information to the reference frame of current decoded frame and corrects in the same way:
ref t , m v ( i . j ) = k T v * ( ref t v ( i , j ) - min _ picture ref v ) + min _ frame t v
Wherein, the span of i, j is: 1≤i≤height vaMP.AMp.Amp & 1≤j≤width v; for the pixel value that the V chrominance information of the reference frame of current decoded frame arranges in the i-th row jth; the pixel value that the V chrominance information correcting the reference frame of rear current decoded frame in the same way for V chrominance information arranges in the i-th row jth; be respectively the V chrominance information degree adjustment factor of the corresponding reference frame of the current decoded frame that passes over from coding side, the V chrominance information of the original coding frame that V chrominance information is worth most, current decoded frame is corresponding of the corresponding reference frame of current decoded frame is worth most.
In sum, the present invention is directed to the film source that illumination variation occurs, propose a kind of novel decoding method.The method method carries out correction process in the same way by the monochrome information to reference frame, chrominance information, thus the correlation strengthened between reference frame and coded frame, finally reach, reduce the number of intra prediction mode of MB of prediction frame, reduce code check consumption, promote the performance of encoder on inter-frame information redundancy is eliminated.
Those having ordinary skill in the art will appreciate that, the all or part of step realized in above-described embodiment method can have been come by program command related hardware, described program can be stored in a computer read/write memory medium, and described storage medium can be ROM, RAM, disk, CD etc.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, all any amendments done within the spirit and principles in the present invention, equivalent replacement and improvement etc., all should be included within protection scope of the present invention.

Claims (30)

1. a method for video coding, is characterized in that, the method comprises:
Obtain current encoded frame frame t, and note is set t=0, note tfor current sign variable;
Judge whether current encoded frame is I frame or scene switch frame; If so, then utilize conventional I frame coding techniques to frame tencode; If not, then utilize the first coding method to frame tencode;
Find next image to be encoded by coded sequence, if next image to be encoded exists, then image to be encoded for the next one is set to frame t, continue to perform acquisition frame t;
Described " utilizes the first coding method to frame tencode " be specially:
Arrange m=0, m represents relative to frame tthrough the reference frame number of light gradient judgement;
Judge frame trelative to the first reference picture picture ref1, the second reference picture picture ref2whether there is monochrome information gradual change, if there is monochrome information gradual change, arrange and make note t=1; Arranging m is the first numerical value;
To the picture of non-NULL ref1, non-NULL picture ref2carry out the correction in the same way of monochrome information, obtain the correction parameter collection of the first reference picture, the second reference picture;
Utilize the picture of corrected in the same way non-NULL ref1and the picture of non-NULL ref2replace reference frame corresponding in reference listing;
Judge that whether all reference frames of current encoded frame are all through the judgement of light gradient; If not, then continue execution and " judge frame trelative to the first reference picture picture ref1, the second reference picture picture ref2whether there is monochrome information gradual change ";
If so, then to frame tin each macro block carry out conventional coded treatment; Judge whether " note t=1 and optimum prediction mode is inter-frame forecast mode ", if not then perform " by coded sequence find next image to be encoded "; If so, the first reference picture that in the optimum prediction mode confirmed in " conventional coded treatment " described in then transmitting to decoding end, optimum reference frame is corresponding or the correction parameter collection of the second reference picture;
Described " to the picture of non-NULL ref1, non-NULL picture ref2carry out the correction in the same way of monochrome information, obtain the correction parameter collection of the first reference picture, the second reference picture " be specially:
(1) current encoded frame frame is calculated tmonochrome information be worth most;
max _ frame t y = arg ( max 0 &le; k &le; 2 n - 1 ( p t ( frame t y , k ) ) )
Wherein, represent all variable maximizings satisfied condition; Min (variable | condition) represent and all variablees satisfied condition are minimized; represent frame tmaximum brightness value; represent frame tminimum luminance value; represent and first meet 0≤k≤2 to all n-1 ask for maximum, then k assignment corresponding for maximum is given n is the number of bits that each pixel of image signless integer used represents, for probability distribution;
(2) the first reference picture picture of non-NULL is calculated ref1and the second reference picture picture of non-NULL ref2monochrome information be worth most;
max _ picture ref 1 y = arg ( max 0 &le; k &le; 2 n - 1 ( p ref 1 ( picture ref 1 y , k ) ) )
max _ picture ref 2 y = arg ( max 0 &le; k &le; 2 n - 1 ( p ref 2 ( picture ref 2 y , k ) ) )
Wherein, represent all variable maximizings satisfied condition; Min (variable | condition) represent and all variablees satisfied condition are minimized; represent picture ref1maximum brightness value; represent picture ref1minimum luminance value; represent picture ref2maximum brightness value; represent picture ref2minimum luminance value; represent and first meet 0≤k≤2 to all n-1 ask for maximum, then k assignment corresponding for maximum is given for probability distribution;
(3) the first reference picture picture of non-NULL is calculated ref1and the second reference picture picture of non-NULL ref2monochrome information be worth most, obtain the correction parameter collection of a reference diagram or the second reference picture;
picture ref 1 , m y ( i , j ) = k T 1 y * ( picture ref 1 y ( i , j ) - min _ picture ref 1 y ) + min _ frame t y picture ref 2 , m y ( i , j ) = k T 2 y * ( picture ref 2 y ( i , j ) - min _ picture ref 2 y ) + min _ frame t y Wherein, k T 1 y = max _ frame t y - min _ frame t y max _ picture ref 1 y - min _ picture ref 1 y ; k T 2 y = max _ frame t y - min _ frame t y max _ picture ref 2 y - min _ picture ref 2 y ; The span of i, j is: 1≤i≤height yaMP.AMp.Amp & 1≤j≤width y, line number, the columns of image luminance information are respectively: height y, width y; it is the first reference picture monochrome information adjustment factor; it is the second reference picture monochrome information adjustment factor; T1, T2 represent the coding sequence number of the corresponding reference frame of the first reference picture, the coding sequence number of the corresponding reference frame of the second reference picture respectively; Correction parameter collection is: max (variable | condition) represent all variable maximizings satisfied condition; Min (variable | condition) represent and all variablees satisfied condition are minimized; be respectively the monochrome information of the first reference picture, pixel value that the monochrome information of the second reference picture arranges in the i-th row jth; be respectively the pixel value that monochrome information corrects the rear monochrome information of the first reference picture in the same way, the monochrome information of the second reference picture arranges in the i-th row jth.
2. method for video coding according to claim 1, is characterized in that, described " judges frame trelative to picture ref1, picture ref2whether there is monochrome information gradual change " method be:
Obtain picture ref1with picture ref2;
Picture described in judgement ref1and picture ref2whether meet reference picture standard; If not, then " obtaining the first reference picture and the second reference picture " is continued; If so, then frame is obtained tthe probability distribution of monochrome information; Obtain picture ref1the probability distribution of monochrome information, and picture ref2the probability distribution of monochrome information;
Whether the probability distribution determination current encoded frame according to the monochrome information of the current encoded frame obtained, the first reference picture, the second reference picture there is monochrome information gradual change.
3. method for video coding according to claim 2, is characterized in that, described " obtains picture ref1with picture ref2" method be:
(1) choose satisfied sequence number of playing and be less than the image of current encoded frame broadcasting sequence number as the first reference picture;
(2) choose satisfied sequence number of playing and be greater than the image of current encoded frame broadcasting sequence number as the second reference picture;
(3) same current encoded frame frame t, the first corresponding reference picture and the second reference picture can not be used to " judge frame simultaneously trelative to picture ref1, picture ref2whether there is monochrome information gradual change " judgement.
4. method for video coding according to claim 3, is characterized in that, the described " picture described in judgement ref1and picture ref2whether meet reference picture standard " method be:
Judge picture ref1and picture ref2whether meet following condition simultaneously:
(1) picture ref1with picture ref2there is identical encoding state, i.e. the first reference picture and the second reference picture or all encoded, or all do not encode;
(2) picture ref1coding sequence number and picture ref2coding sequence number can not be greater than frame simultaneously tcoding sequence number.
5. method for video coding according to claim 4, is characterized in that, described " obtains frame tthe probability distribution of monochrome information " method is specially:
p t ( frame t y , k ) = count ( frame t y , k ) / ( width y * height y ) , k = 0,1,2 , . . . , 2 n - 1
Wherein,
sign ( frame t y ( i , j ) , k ) = 1 , frame t y ( i , j ) = k 0 , else
Y represents monochrome information; N is the number of bits that each pixel of image signless integer used represents; represent current encoded frame frame tmonochrome information; represent the pixel value of the image luminance information being positioned at current encoded frame i-th row jth row; represent corresponding value when equaling k and be not equal to k; Sum (variable | condition) represent all variable summations satisfied condition; represent frame tthe pixel value of middle monochrome information equals the pixel number of k; for probability distribution; The monochrome information of the brightness value composing images of all pixels of image, line number, the columns of note image luminance information are respectively: height y, width y.
6. method for video coding according to claim 5, is characterized in that, described " obtains picture ref1the probability distribution of monochrome information, and picture ref2the probability distribution of monochrome information " be specially:
Described " obtaining the probability distribution of the first reference picture monochrome information " method is:
p ref 1 ( picture ref 1 y , k ) = count ( picture ref 1 y , k ) / ( width y * height y ) , k = 0,1,2 , . . . , 2 n - 1
Wherein,
sign ( picture ref 1 y ( i , j ) , k ) = 1 , picture ref 1 y ( i , j ) = k 0 , else
Y represents monochrome information; represent the first reference picture picture ref1monochrome information; represent the pixel value of the image luminance information being positioned at the first reference picture i-th row jth row; represent corresponding value when equaling k and be not equal to k; Sum (variable | condition) represent all variable summations satisfied condition; represent picture ref1the pixel value of middle monochrome information equals the pixel number of k; for probability distribution; The monochrome information of the brightness value composing images of all pixels of image, line number, the columns of note image luminance information are respectively: height y, width y;
Described " obtaining the probability distribution of the second reference picture monochrome information " method is:
p t ( picture ref 2 y , k ) = count ( picture ref 2 y , k ) / ( width y * height y ) , k = 0,1,2 , . . . , 2 n - 1
Wherein,
sign ( picture ref 2 y ( i , j ) , k ) = 1 , picture ref 2 y ( i , j ) = k 0 , else
Wherein, y represents monochrome information; represent the second reference picture Picture ref2monochrome information; represent the pixel value of the image luminance information being positioned at the second reference picture i-th row jth row; represent corresponding value when equaling k and be not equal to k; Sum (variable | condition) represent all variable summations satisfied condition; represent picture ref2the pixel value of middle monochrome information equals the pixel number of k; for probability distribution; The monochrome information of the brightness value composing images of all pixels of image, line number, the columns of note image luminance information are respectively: height y, width y.
7. method for video coding according to claim 6, it is characterized in that, described " whether the probability distribution determination current encoded frame according to the monochrome information of the current encoded frame obtained, the first reference picture, the second reference picture monochrome information gradual change occurs " is specially:
Judge whether
max 0 &le; k &le; 2 n - 1 ( p ref 1 ( picture ref 1 y , k ) ) < max 0 &le; k &le; 2 n - 1 ( p t ( frame t y , k ) ) < max 0 &le; k &le; 2 n - 1 ( p ref 2 ( picture ref 2 y , k ) )
Or
max 0 &le; k &le; 2 n - 1 ( p ref 2 ( picture ref 2 y , k ) ) < max 0 &le; k &le; 2 n - 1 ( p t ( frame t y , k ) ) < max 0 &le; k &le; 2 n - 1 ( p ref 1 ( picture ref 1 y , k ) )
If so, then frame trelative to picture ref1, picture ref2there is monochrome information gradual change;
If not, then frame trelative to picture ref1, picture ref2there is not monochrome information gradual change;
Wherein, represent all variable maximizings satisfied condition; Min (variable | condition) represent and all variablees satisfied condition are minimized; Y represents monochrome information; represent the second reference picture picture ref2monochrome information; for probability distribution; represent the first reference picture picture ref1monochrome information; for probability distribution.
8. method for video coding according to claim 1, is characterized in that, described " to the picture of non-NULL ref1, non-NULL picture ref2carry out the correction in the same way of monochrome information " after comprise further: the picture carrying out non-NULL ref1, non-NULL picture ref2u chrominance information correct in the same way and correct in the same way with V chrominance information.
9. method for video coding according to claim 8, is characterized in that, described " carry out the picture of non-NULL ref1, non-NULL picture ref2u chrominance information correct in the same way " be specially:
First, frame is calculated tu chrominance information be worth most:
max _ frame t u = arg ( max 0 &le; k &le; 2 n - 1 ( p t ( frame t u , k ) ) )
Wherein, represent all variable maximizings satisfied condition; Min (variable | condition) represent and all variablees satisfied condition are minimized; represent frame tmaximum U chromatic value; represent frame tminimum U chromatic value; represent and first meet 0≤k≤2 to all n-1 ask for maximum, then k assignment corresponding for maximum is given
Then, the picture of non-NULL is calculated ref1and the picture of non-NULL ref2u chrominance information be worth most:
max _ picture ref 1 u = arg ( max 0 &le; k &le; 2 n - 1 ( p ref 1 ( picture ref 1 u , k ) ) )
max _ picture ref 2 u = arg ( max 0 &le; k &le; 2 n - 1 ( p ref 2 ( picture ref 2 u , k ) ) )
Wherein, represent all variable maximizings satisfied condition; Min (variable | condition) represent and all variablees satisfied condition are minimized; represent picture ref1maximum U chromatic value; represent picture ref1minimum U chromatic value; represent picture ref2maximum U chromatic value; represent picture ref2minimum U chromatic value; represent and first meet 0≤k≤2 to all n-1 ask for maximum, then k assignment corresponding for maximum is given in other words 0≤k≤2 nmake in-1 reach the k value of maximum, namely p ref 1 ( picture ref 1 u , arg ( max 0 &le; k &le; 2 n - 1 ( p ref 1 ( picture ref 1 u , k ) ) ) ) = max 0 &le; k &le; 2 n - 1 ( p ref 1 ( pictu e ref 1 u , k ) ) ; represent and first meet 0≤k≤2 to all n-1 ask for maximum, then k assignment corresponding for maximum is given in other words 0≤k≤2 nmake in-1 reach the k value of maximum, namely p ref 2 ( picture ref 2 u , arg ( max 0 &le; k &le; 2 n - 1 ( p ref 2 ( picture ref 2 u , k ) ) ) ) = max 0 &le; k &le; 2 n - 1 ( p ref 2 ( pictu e ref 2 u , k ) ) ;
To the picture of non-NULL ref1and the picture of non-NULL ref2the U chrominance information of each pixel is carried out U chrominance information and is corrected in the same way:
picture ref 1 , m u ( i , j ) = k 1 u * ( picture ref 1 u ( i , j ) - min _ picture ref 1 u ) + min _ frame t u
picture ref 2 , m u ( i , j ) = k 2 u * ( picture ref 2 u ( i , j ) - min _ picture ref 2 u ) + min _ frame t u ;
Wherein, k T 1 u = max _ frame t u - min _ frame t u max _ picture ref 1 u - min _ picture ref 1 u ;
k T 2 u = max _ frame t u - min _ frame t u max _ picture ref 2 u - min _ picture ref 2 u ;
The span of i, j is: 1≤i≤height uaMP.AMp.Amp & 1≤j≤width u; it is the first reference picture U chrominance information adjustment factor; it is the second reference picture U chrominance information adjustment factor; T1, T2 represent the coding sequence number of the corresponding reference frame of the first reference picture, the coding sequence number of the corresponding reference frame of the second reference picture respectively; Described correction parameter collection comprises further: the correction parameter collection of U chrominance information be respectively the U chrominance information of the first reference picture, pixel value that the U chrominance information of the second reference picture arranges in the i-th row jth; be respectively the pixel value that U chrominance information corrects the rear U chrominance information of the first reference picture in the same way, the U chrominance information of the second reference picture arranges in the i-th row jth.
10. method for video coding according to claim 8, is characterized in that, described " carry out the picture of non-NULL ref1, non-NULL picture ref2v chrominance information correct in the same way " be specially:
Calculate frame tv chrominance information:
max _ frame t v = arg ( max 0 &le; k &le; 2 n - 1 ( p t ( frame t v , k ) ) )
Wherein, represent all variable maximizings satisfied condition; Min (variable | condition) represent and all variablees satisfied condition are minimized; represent frame tmaximum V chromatic value; represent frame tminimum V chromatic value; represent and first meet 0≤k≤2 to all n-1 ask for maximum, then k assignment corresponding for maximum is given in other words 0≤k≤2 nmake in-1 reach the k value of maximum, namely p t ( frame t v , arg ( max 0 &le; k &le; 2 n - 1 ( p t ( frame t v , k ) ) ) ) = max 0 &le; k &le; 2 n - 1 ( p t ( frame t v , k ) ) ;
Then, the picture of non-NULL is calculated ref1and the picture of non-NULL ref2v chrominance information be worth most:
max _ picture ref 1 v = arg ( max 0 &le; k &le; 2 n - 1 ( p ref 1 ( picture ref 1 v , k ) ) )
max _ picture ref 2 v = arg ( max 0 &le; k &le; 2 n - 1 ( p ref 2 ( picture ref 2 v , k ) ) )
Wherein, represent all variable maximizings satisfied condition; Min (variable | condition) represent and all variablees satisfied condition are minimized; represent picture ref1maximum V chromatic value; represent picture ref1minimum V chromatic value; represent picture ref2maximum V chromatic value; represent picture ref2minimum V chromatic value; represent and first meet 0≤k≤2 to all n-1 ask for maximum, then k assignment corresponding for maximum is given in other words 0≤k≤2 nmake in-1 reach the k value of maximum, namely p ref 1 ( picture ref 1 v , arg ( max 0 &le; k &le; 2 n - 1 ( p ref 1 ( picture ref 1 v , k ) ) ) ) = max 0 &le; k &le; 2 n - 1 ( p ref 1 ( picture ref 1 v , k ) ) ; represent and first meet 0≤k≤2 to all n-1 ask for maximum, then k assignment corresponding for maximum is given in other words 0≤k≤2 nmake in-1 reach the k value of maximum, namely p ref 2 ( picture ref 2 v , arg ( max 0 &le; k &le; 2 n - 1 ( p ref 2 ( picture ref 2 v , k ) ) ) ) = max 0 &le; k &le; 2 n - 1 ( p ref 2 ( picture ref 2 v , k ) ) ;
To the picture of non-NULL ref1and the picture of non-NULL ref2the V chrominance information of each pixel is carried out V chrominance information and is corrected in the same way:
picture ref 1 , m v ( i , j ) = k 1 v * ( picture ref 1 v ( i , j ) - min _ picture ref 1 v ) + min _ frame t v
picture ref 2 , m v ( i , j ) = k 2 v * ( picture ref 2 v ( i , j ) - min _ picture ref 2 v ) + min _ frame t v
Wherein, k T 1 v = max _ frame t v - min _ frame t v max _ picture ref 1 v - min _ picture ref 1 v ;
k T 2 v = max _ frame t v - min _ frame t v max _ picture ref 2 v - min _ picture ref 2 v ;
The span of i, j is: 1≤i≤height vaMP.AMp.Amp & 1≤j≤width v; it is the first reference picture V chrominance information degree adjustment factor; it is the second reference picture V chrominance information degree adjustment factor; T1, T2 represent the coding sequence number of the corresponding reference frame of the first reference picture, the coding sequence number of the corresponding reference frame of the second reference picture respectively; Described correction parameter collection comprises further: the correction parameter collection of V chrominance information be respectively the V chrominance information of the first reference picture, pixel value that the monochrome information of the second reference picture arranges in the i-th row jth; be respectively the pixel value that V chrominance information corrects the rear V chrominance information of the first reference picture in the same way, the V chrominance information of the second reference picture arranges in the i-th row jth.
11. method for video coding according to claim 1, is characterized in that, described " arranging m is the first numerical value " is specially:
Judge whether picture ref1coding sequence number and picture ref2coding sequence number be all less than the coding sequence number of current encoded frame and picture ref1, picture ref2all encoded, if so, then first make m=m+2, then continue " to the picture of non-NULL ref1, non-NULL picture ref2carry out the correction in the same way of monochrome information ";
If not, then picture is judged whether ref1coding sequence number and picture ref2coding sequence number be all less than the coding sequence number of current encoded frame and picture ref1, picture ref2all uncoded, if so, then first m=m+2 is set, then by picture ref1, picture ref2replace with the coding reconstructed image of its correspondence respectively, then continue " to the picture of non-NULL ref1, non-NULL picture ref2carry out the correction in the same way of monochrome information "; If not, then m=m+1 is set, then coding sequence number is less than the first or second reference picture of current encoded frame coding sequence number, replaces with the coding reconstructed image of its correspondence, another first or second reference image setting is empty, then continues " to the picture of non-NULL ref1, non-NULL picture ref2carry out the correction in the same way of monochrome information ".
12. method for video coding according to claim 1 or 11, it is characterized in that, described " judges frame trelative to the first reference picture picture ref1, the second reference picture picture ref2whether there is monochrome information gradual change ", if there is not monochrome information gradual change, then arranging m is second value, then continues " judging that whether all reference frames of current encoded frame are all through the judgement of light gradient ".
13. method for video coding according to claim 12, is characterized in that, the method for described " arranging m is second value " is:
m=m+sign(picture ref1)+sign(picture ref2),
Wherein,
Wherein, m represents relative to frame tthrough the reference frame number of light gradient judgement; Sign (picture ref1) represent picture ref1be reference frame or be not reference frame time corresponding value; Sign (picture ref2, k) represent picture ref2be reference frame or be not reference frame time corresponding value.
14. method for video coding according to claim 1 or 13, it is characterized in that, described " judging that whether all reference frames of current encoded frame are all through the judgement of light gradient " is specially;
M > number list0+ number list1and frame tfor B frame, or, m > number list0and frame tfor P frame;
Wherein, m represents relative to frame tthrough the reference frame number of light gradient judgement; Number list0represent reference frame sum in forward direction reference listing; Number list1represent reference frame sum in backward reference listing.
15. 1 kinds of video encoding/decoding methods, is characterized in that, described method comprises:
Obtain the correction parameter collection of current decoded frame and the first reference picture or the second reference picture; Judge whether that current sign variable is 0, if so, then carry out regular decode, if not, then carried out the correction in the same way of monochrome information by the reference frame of the correction parameter set pair current decoded frame of the first described reference picture or the second reference picture;
The reference frame of corrected in the same way current decoded frame is utilized to carry out regular decode to current decoded frame;
Find next image to be decoded by decoding order, if next image to be decoded exists, then image to be decoded for the next one is set to current decoded frame, continue " finding next image to be decoded by decoding order ";
The method of described " being carried out the correction in the same way of monochrome information by the reference frame of the correction parameter set pair current decoded frame of the first described reference picture or the second reference picture " is:
ref t , m y ( i , j ) = k T y * ( ref t y ( i , j ) - min _ pictu re ref y ) + min _ f rame t y
Wherein, the span of i, j is: 1≤i≤height yaMP.AMp.Amp & 1≤j≤width y, line number, the columns of image luminance information are respectively: height y, width y; ref t ythe pixel value that the monochrome information of the reference frame that (i, j) is current decoded frame arranges in the i-th row jth; the pixel value that the monochrome information correcting the reference frame of rear current decoded frame in the same way for monochrome information arranges in the i-th row jth; be respectively the monochrome information adjustment factor of the corresponding reference frame of the current decoded frame that passes over from coding side, the minimum luminance value of the corresponding reference frame of current decoded frame, the minimum luminance value of original coding frame that current decoded frame is corresponding.
16. video encoding/decoding methods according to claim 15, it is characterized in that, comprise further after described " being carried out the correction in the same way of monochrome information by the reference frame of the correction parameter set pair current decoded frame of the first described reference picture or the second reference picture ": U, V chrominance information is carried out to the reference frame of current decoded frame and corrects in the same way;
Described " carrying out U chrominance information to the reference frame of current decoded frame to correct in the same way " method is:
ref t , m u ( i , j ) = k T u * ( ref t u ( i , j ) - min _ picture ref u ) + min _ frame t u
Wherein, the span of i, j is: 1≤i≤height uaMP.AMp.Amp & 1≤j≤width u; ref t uthe pixel value that the U chrominance information of the reference frame that (i, j) is current decoded frame arranges in the i-th row jth; the pixel value that the U chrominance information correcting the reference frame of rear current decoded frame in the same way for U chrominance information arranges in the i-th row jth; be respectively the U chrominance information degree adjustment factor of the corresponding reference frame of the current decoded frame that passes over from coding side, the minimum U chromatic value of the corresponding reference frame of current decoded frame, the minimum U chromatic value of original coding frame that current decoded frame is corresponding;
Described " carrying out U chrominance information to the reference frame of current decoded frame to correct in the same way " method is:
ref t , m v ( i , j ) = k T v * ( ref t v ( i , j ) - min _ picture ref v ) + min _ frame t v
Wherein, the span of i, j is: 1≤i≤height vaMP.AMp.Amp & 1≤j≤width v; for the pixel value that the V chrominance information of the reference frame of current decoded frame arranges in the i-th row jth; the pixel value that the V chrominance information correcting the reference frame of rear current decoded frame in the same way for V chrominance information arranges in the i-th row jth; be respectively the V chrominance information degree adjustment factor of the corresponding reference frame of the current decoded frame that passes over from coding side, the minimum V chromatic value of the corresponding reference frame of current decoded frame, the minimum V chromatic value of original coding frame that current decoded frame is corresponding.
17. 1 kinds of video coding apparatus, is characterized in that, this device comprises: the first acquiring unit, the first processing unit and the second processing unit;
First acquiring unit, for obtaining current encoded frame frame t, and note is set t=0, note tfor current sign variable;
First processing unit, comprises the first judging unit, the 3rd processing unit and the 11 processing unit;
Described first judging unit, for judging whether current encoded frame is I frame or scene switch frame;
Described 3rd processing unit, for when the first judging unit judged result is no, then utilizes the first coding method to frame tencode;
11 processing unit, for when the judged result of the first judging unit is for being, utilizes conventional I frame coding techniques to frame tencode;
Second processing unit, finding next image to be encoded for pressing coded sequence, if next image to be encoded exists, then image to be encoded for the next one being set to frame t, notice execution first acquiring unit, if next image to be encoded does not exist, then process ends process;
The 3rd described processing unit comprises the first setting unit, fourth processing unit, correcting unit, replacement unit and the 5th processing unit;
Described first setting unit, arrange m=0, m represents relative to frame tthrough the reference frame number of light gradient judgement;
Described fourth processing unit, comprises the second judging unit and the second setting unit;
Described second judging unit, for judging frame trelative to the first reference picture picture ref1, the second reference picture picture ref2whether there is monochrome information gradual change;
Described second setting unit, for making note when the second judging unit judged result for the gradual change of generation monochrome information is then arranged t=1; Arranging m is the first numerical value;
Correcting unit, for the picture to non-NULL ref1, non-NULL picture ref2carry out the correction in the same way of monochrome information, obtain the correction parameter collection of the first reference picture, the second reference picture;
Replacement unit, for utilizing the picture of corrected in the same way non-NULL ref1and the picture of non-NULL ref2replace reference frame corresponding in reference listing;
5th processing unit, comprises the 3rd judging unit and the 6th processing unit,
Described 3rd judging unit, for judging that whether all reference frames of current encoded frame are all through the judgement of light gradient, perform the second judging unit if not, if perform the 6th processing unit;
Described 6th processing unit, to frame tin each macro block carry out conventional coded treatment; Judge whether " note t=1 and optimum prediction mode is inter-frame forecast mode ", then perform the second processing unit if not; If so, the correction parameter collection of the first reference picture that in the optimum prediction mode confirmed in described " conventional coded treatment ", optimum reference frame is corresponding or the second reference picture is then transmitted to video decoder, notice execution second processing unit;
Described correcting unit comprises monochrome information correcting unit, and wherein monochrome information correcting unit comprises: the first computing unit, the second computing unit and the 3rd computing unit;
First computing unit, for calculating current encoded frame frame tmonochrome information be worth most;
max _ frame t y = arg ( max 0 &le; k &le; 2 n - 1 ( p t ( frame t y , k ) ) )
Wherein, represent all variable maximizings satisfied condition; Min (variable | condition) represent and all variablees satisfied condition are minimized; represent frame tmaximum brightness value; represent frame tminimum luminance value; represent and first meet 0≤k≤2 to all n-1 ask for maximum, then k assignment corresponding for maximum is given n is the number of bits that each pixel of image signless integer used represents, for probability distribution;
Second computing unit, for calculating the first reference picture picture of non-NULL ref1and the second reference picture picture of non-NULL ref2monochrome information be worth most;
max _ picture ref 1 y = arg ( max 0 &le; k &le; 2 n - 1 ( p ref 1 ( picture ref 1 y , k ) ) )
max _ picture ref 2 y = arg ( max 0 &le; k &le; 2 n - 1 ( p ref 2 ( picture ref 2 y , k ) ) )
Wherein, represent all variable maximizings satisfied condition; Min (variable | condition) represent and all variablees satisfied condition are minimized; represent picture ref1maximum brightness value; represent picture ref1minimum luminance value; represent picture ref2maximum brightness value; represent picture ref2minimum luminance value; represent and first meet 0≤k≤2 to all n-1 ask for maximum, then k assignment corresponding for maximum is given for probability distribution;
3rd computing unit, for calculating the first reference picture picture of non-NULL ref1and the second reference picture picture of non-NULL ref2monochrome information be worth most, obtain the correction parameter collection of a reference diagram or the second reference picture;
picture ref 1 , m y ( i , j ) = k T 1 y * ( picture ref 1 y ( i . j ) - min _ picture ref 1 y ) + min _ frame t y picture ref 2 , m y ( i , j ) = k T 2 y * ( picture ref 2 y ( i , j ) - min _ picture ref 2 y ) + min _ frame t y Wherein,
k T 1 y = max _ frame t y - min _ frame t y max _ picture ref 1 y - min _ picture ref 1 y ; k T 2 y = max _ frame t y - min _ frame t y max _ picture ref 2 y - min _ picture ref 2 y ; The span of i, j is: 1≤i≤height yaMP.AMp.Amp & 1≤j≤width y, line number, the columns of image luminance information are respectively: height y, width y; it is the first reference picture monochrome information adjustment factor; it is the second reference picture monochrome information adjustment factor; T1, T2 represent the coding sequence number of the corresponding reference frame of the first reference picture, the coding sequence number of the corresponding reference frame of the second reference picture respectively; Correction parameter collection is: max (variable | condition) represent all variable maximizings satisfied condition; Min (variable | condition) represent and all variablees satisfied condition are minimized; be respectively the monochrome information of the first reference picture, pixel value that the monochrome information of the second reference picture arranges in the i-th row jth; be respectively the pixel value that monochrome information corrects the rear monochrome information of the first reference picture in the same way, the monochrome information of the second reference picture arranges in the i-th row jth.
18. video coding apparatus according to claim 17, is characterized in that, described second judging unit comprises second acquisition unit, the 4th judging unit, the 7th processing unit and the first determining unit:
Second acquisition unit, for obtaining picture ref1with picture ref2;
4th judging unit, for judging described picture ref1and picture ref2whether meet reference picture standard;
7th processing unit comprises the 8th processing unit and the 9th processing unit;
8th processing unit is no for the judged result when the 4th judging unit, then notice performs second acquisition unit;
9th processing unit, is yes for the judged result when the 4th judging unit, then obtains frame tthe probability distribution of monochrome information; Obtain picture ref1the probability distribution of monochrome information, and picture ref2the probability distribution of monochrome information;
First determining unit, whether the probability distribution determination current encoded frame for the monochrome information according to the current encoded frame obtained, the first reference picture, the second reference picture there is monochrome information gradual change.
19. video coding apparatus according to claim 18, is characterized in that, described second acquisition unit comprises: first chooses unit, second chooses unit, the 3rd and choose unit and the second determining unit;
First chooses unit, is less than the image of current encoded frame broadcasting sequence number as the first reference picture for choosing satisfied sequence number of playing;
Second chooses unit, is greater than the image of current encoded frame broadcasting sequence number as the second reference picture for choosing satisfied sequence number of playing;
3rd chooses unit, for same current encoded frame frame t, the first corresponding reference picture and the second reference picture can not be used to " judge frame simultaneously trelative to picture ref1, picture ref2whether there is monochrome information gradual change " judgement.
20. video coding apparatus according to claim 19, is characterized in that, described fourth processing unit comprises the 5th judging unit, the 6th judging unit and the 7th judging unit;
5th judging unit, for judging picture ref1and picture ref2whether meet the condition of the 6th judging unit and the 7th judging unit simultaneously:
6th judging unit, for determining picture ref1with picture ref2there is identical encoding state, i.e. the first reference picture and the second reference picture or all encoded, or all do not encode;
7th judging unit, for determining picture ref1coding sequence number and picture ref2coding sequence number can not be greater than frame simultaneously tcoding sequence number.
21. video coding apparatus according to claim 20, is characterized in that, the 9th described processing unit comprises the 3rd acquiring unit, the 4th acquiring unit and the 5th acquiring unit;
3rd acquiring unit, for " obtaining frame tthe probability distribution of monochrome information " be:
p t ( frame t y , k ) = count ( frame t y , k ) / ( width y * height y ) , k = 0,1,2 . . . , 2 n - 1
Wherein,
sign ( frame t y ( i , j ) , k ) = 1 , frame t y ( i , j ) = k 0 , else
Y represents monochrome information; represent current encoded frame frame tmonochrome information; represent the pixel value of the image luminance information being positioned at current encoded frame i-th row jth row; represent corresponding value when equaling k and be not equal to k; Sum (variable | condition) represent all variable summations satisfied condition; represent frame tthe pixel value of middle monochrome information equals the pixel number of k; for probability distribution; The monochrome information of the brightness value composing images of all pixels of image, line number, the columns of note image luminance information are respectively: height y, width y;
4th acquiring unit, for " obtaining the probability distribution of the first reference picture monochrome information ":
p ref 1 ( picture ref 1 y , k ) = count ( picture ref 1 y , k ) / ( width y * height y ) , k = 0,1,2 . . . , 2 n - 1
Wherein,
sign ( picture ref 1 y ( i , j ) , k ) = 1 , picture ref 1 y ( i , j ) = k 0 , else
Y represents monochrome information; represent the first reference picture picture ref1monochrome information; represent the pixel value of the image luminance information being positioned at the first reference picture i-th row jth row; represent corresponding value when equaling k and be not equal to k; Sum (variable | condition) represent all variable summations satisfied condition; represent picture ref1the pixel value of middle monochrome information equals the pixel number of k; for probability distribution; The monochrome information of the brightness value composing images of all pixels of image, line number, the columns of note image luminance information are respectively: height y, width y;
5th acquiring unit, for " obtaining the probability distribution of the second reference picture monochrome information ":
p t ( picture ref 2 y , k ) = count ( picture ref 2 y , k ) / ( width y * height y ) , k = 0,1,2 . . . , 2 n - 1
Wherein,
sign ( picture ref 2 y ( i , j ) , k ) = 1 , picture ref 2 y ( i , j ) = k 0 , else
Wherein, y represents monochrome information; N is the number of bits that each pixel of image signless integer used represents; represent the second reference picture picture ref2monochrome information; represent the pixel value of the image luminance information being positioned at the second reference picture i-th row jth row; represent corresponding value when equaling k and be not equal to k; Sum (variable | condition) represent all variable summations satisfied condition; represent picture ref2the pixel value of middle monochrome information equals the pixel number of k; for probability distribution; The monochrome information of the brightness value composing images of all pixels of image, line number, the columns of note image luminance information are respectively: height y, width y.
22. video coding apparatus according to claim 21, is characterized in that, the first described determining unit comprises the 8th judging unit and the second determining unit:
8th judging unit, for judging whether
max 0 &le; k &le; 2 n - 1 ( p ref 1 ( picture ref 1 y , k ) ) < max 0 &le; k &le; 2 n - 1 ( p t ( frame t y , k ) ) < max 0 &le; k &le; 2 n - 1 ( p ref 2 ( picture ref 2 y , k ) )
Or
max 0 &le; k &le; 2 n - 1 ( p ref 2 ( picture ref 2 y , k ) ) < max 0 &le; k &le; 2 n - 1 ( p t ( frame t y , k ) ) < max 0 &le; k &le; 2 n - 1 ( p ref 1 ( picture ref 1 y , k ) )
Second determining unit is yes for working as the 8th judging unit judged result, then frame trelative to picture ref1, picture ref2there is monochrome information gradual change; Ruo Dang eight judging unit judged result is no, then frame trelative to picture ref1, picture ref2there is not monochrome information gradual change;
Wherein, represent all variable maximizings satisfied condition; Min (variable | condition) represent and all variablees satisfied condition are minimized; Y represents monochrome information; represent the second reference picture picture ref2monochrome information; for probability distribution; represent the first reference picture picture ref1monochrome information; for probability distribution.
23. video coding apparatus according to claim 17, is characterized in that, described correcting unit comprises U chrominance information correcting unit and V chrominance information correcting unit further;
U chrominance information correcting unit, for the picture to non-NULL ref1, non-NULL picture ref2carry out U chrominance information to correct in the same way
V chrominance information correcting unit, for the picture to non-NULL ref1, non-NULL picture ref2carry out V chrominance information to correct in the same way.
24. video coding apparatus according to claim 23, is characterized in that, described U chrominance information correcting unit comprises the 4th computing unit, the 5th computing unit and the 6th computing unit;
4th computing unit, for calculating frame tu chrominance information be worth most:
max _ frame t u = arg ( max 0 &le; k &le; 2 n - 1 ( p t ( frame t u , k ) ) )
Wherein, represent all variable maximizings satisfied condition; Min (variable | condition) represent and all variablees satisfied condition are minimized; represent frame tmaximum U chromatic value; represent frame tminimum U chromatic value; represent and first meet 0≤k≤2 to all n-1 ask for maximum, then k assignment corresponding for maximum is given
5th computing unit, for calculating the picture of non-NULL ref1and the picture of non-NULL ref2u chrominance information be worth most:
max _ picture ref 1 u = arg ( max 0 &le; k &le; 2 n - 1 ( p ref 1 ( picture ref 1 u , k ) ) )
max _ picture ref 2 u = arg ( max 0 &le; k &le; 2 n - 1 ( p ref 2 ( picture ref 2 u , k ) ) )
Wherein, represent all variable maximizings satisfied condition; Min (variable | condition) represent and all variablees satisfied condition are minimized; represent picture ref1minimum U chromatic value; represent picture ref2maximum U chromatic value; represent picture ref2minimum U chromatic value; represent and first meet 0≤k≤2 to all n-1 ask for maximum, then k assignment corresponding for maximum is given in other words 0≤k≤2 nmake in-1 reach the k value of maximum, namely p ref 1 ( picture ref 1 u , arg ( max 0 &le; k &le; 2 n - 1 ( p ref 1 ( picture ref 1 u , k ) ) ) ) = max 0 &le; k &le; 2 n - 1 ( p ref 1 ( picture ref 1 u , k ) ) ; represent and first meet 0≤k≤2 to all n-1 ask for maximum, then k assignment corresponding for maximum is given in other words 0≤k≤2 nmake in-1 reach the k value of maximum, namely p ref 2 ( picture ref 2 u , arg ( max 0 &le; k &le; 2 n - 1 ( p ref 2 ( picture ref 2 u , k ) ) ) ) = max 0 &le; k &le; 2 n - 1 ( p ref 2 ( picture ref 2 u , k ) ) ; represent picture ref1maximum U chromatic value;
6th computing unit, for the picture to non-NULL ref1and the picture of non-NULL ref2the U chrominance information of each pixel is carried out U chrominance information and is corrected in the same way:
picture ref 1 , m u ( i , j ) = k 1 u * ( picture ref 1 u ( i , j ) - min _ picture ref 1 u ) + min _ frame t u
picture ref 2 , m u ( i , j ) = k 2 u * ( picture ref 2 u ( i , j ) - min _ picture ref 2 u ) + min _ frame t u ;
Wherein, k T 1 u = max _ frame t u - min _ frame t u max _ picture ref 1 u - min _ pictrue ref 1 u ;
k T 2 u = max _ frame t u - min _ frame t u max _ picture ref 2 u - min _ pictrue ref 2 u ;
The span of i, j is: 1≤i≤height uaMP.AMp.Amp & 1≤j≤width u; it is the first reference picture U chrominance information adjustment factor; it is the second reference picture U chrominance information adjustment factor; T1, T2 represent the coding sequence number of the corresponding reference frame of the first reference picture, the coding sequence number of the corresponding reference frame of the second reference picture respectively; Described correction parameter collection comprises further: the correction parameter collection of U chrominance information be respectively the U chrominance information of the first reference picture, pixel value that the U chrominance information of the second reference picture arranges in the i-th row jth; be respectively the pixel value that U chrominance information corrects the rear U chrominance information of the first reference picture in the same way, the U chrominance information of the second reference picture arranges in the i-th row jth.
25. video coding apparatus according to claim 24, is characterized in that, V chrominance information correcting unit comprises the 7th computing unit, the 8th computing unit and the 9th computing unit;
7th computing unit, for calculating frame tv chrominance information:
max _ frame t v = arg ( max 0 &le; k &le; 2 n - 1 ( p t ( frame t v , k ) ) )
Wherein, represent all variable maximizings satisfied condition; Min (variable | condition) represent and all variablees satisfied condition are minimized; represent frame tmaximum V chromatic value; represent frame tminimum V chromatic value; represent and first meet 0≤k≤2 to all n-1 ask for maximum, then k assignment corresponding for maximum is given in other words 0≤k≤2 nmake in-1 reach the k value of maximum, namely p t ( frame t v , arg ( max 0 &le; k &le; 2 n - 1 ( p t ( farame t v , k ) ) ) ) = max 0 &le; k &le; 2 n - 1 ( p t ( frame t v , k ) ) ;
8th computing unit, for calculating the picture of non-NULL ref1and the picture of non-NULL ref2v chrominance information be worth most:
max _ frame ref 1 v = arg ( max 0 &le; k &le; 2 n - 1 ( p ref 1 ( frame ref 1 v , k ) ) )
max _ pictre ref 2 v = arg ( max 0 &le; k &le; 2 n - 1 ( p ref 2 ( picture fef , 2 v , k ) ) )
Wherein, represent all variable maximizings satisfied condition; Min (variable | condition) represent and all variablees satisfied condition are minimized; represent picture ref1minimum V chromatic value; represent picture ref2maximum V chromatic value; represent picture ref2minimum V chromatic value; represent and first meet 0≤k≤2 to all n-1 ask for maximum, then k assignment corresponding for maximum is given in other words 0≤k≤2 wmake in-1 reach the k value of maximum, namely p raf 1 ( picture ref 1 v , arg ( max 0 &le; k &le; 2 n - 1 ( p ref 1 ( picture ref , 1 v , k ) ) ) ) = max 0 &le; k &le; 2 n - 1 ( p ref 1 ( picture ref 1 v , k ) ) ; represent and first meet 0≤k≤2 to all n-1 ask for maximum, then k assignment corresponding for maximum is given in other words 0≤k≤2 nmake in-1 reach the k value of maximum, namely p raf 2 ( picture ref 2 v , arg ( max 0 &le; k &le; 2 n - 1 ( p ref 2 ( picture ref , 2 v , k ) ) ) ) = max 0 &le; k &le; 2 n - 1 ( p ref 2 ( picture ref 2 v , k ) ) ; represent picture ref1maximum V chromatic value;
9th computing unit, for the picture to non-NULL ref1and the picture of non-NULL ref2the V chrominance information of each pixel is carried out V chrominance information and is corrected in the same way:
picture ref 1 , m u ( i , j ) = k 1 v * ( picture ref 1 v ( i , j ) - min _ picture ref 1 v ) + min _ frame t v
picture ref 2 , m v ( i , j ) = k 2 v * ( picture ref 2 v ( i , j ) - min _ picture ref 2 v ) + min _ frame t v
Wherein, k T 1 v = max _ frame t v - min _ frame t v max _ picture ref 1 v - min _ pictrue ref 1 v ;
k T 2 v = max _ frame t v - min _ frame t v max _ picture ref 2 v - min _ pictrue ref 2 v ;
The span of i, j is: 1≤i≤height vaMP.AMp.Amp & 1≤j≤width v; it is the first reference picture V chrominance information degree adjustment factor; it is the second reference picture V chrominance information degree adjustment factor; T1, T2 represent the coding sequence number of the corresponding reference frame of the first reference picture, the coding sequence number of the corresponding reference frame of the second reference picture respectively; Described correction parameter collection comprises further: the correction parameter collection of V chrominance information be respectively the V chrominance information of the first reference picture, pixel value that the monochrome information of the second reference picture arranges in the i-th row jth; be respectively the pixel value that V chrominance information corrects the rear V chrominance information of the first reference picture in the same way, the V chrominance information of the second reference picture arranges in the i-th row jth.
26. video coding apparatus according to claim 17, is characterized in that, the first described setting unit comprises: the 9th judging unit and the tenth processing unit;
9th judging unit, for judging whether picture ref1coding sequence number and picture ref2coding sequence number be all less than the coding sequence number of current encoded frame and picture ref1, picture ref2all encoded;
Tenth processing unit, for being yes when the 9th judging unit judged result, then first make m=m+2, then notice performs monochrome information correcting unit;
When the 9th judging unit judged result is no, then judge whether picture ref1coding sequence number and picture ref2coding sequence number be all less than the coding sequence number of current encoded frame and picture ref1, picture ref2all uncoded, if so, then first m=m+2 is set, then by picture ref1, picture ref2replace with the coding reconstructed image of its correspondence respectively, then continue " to the picture of non-NULL ref1, non-NULL picture ref2carry out the correction in the same way of monochrome information "; If not, then m=m+1 is set, then coding sequence number is less than the first or second reference picture of current encoded frame coding sequence number, replace with the coding reconstructed image of its correspondence, another first or second reference image setting is empty, then notifies that monochrome information correcting unit continues " to the picture of non-NULL ref1, non-NULL picture ref2carry out the correction in the same way of monochrome information ".
27. video coding apparatus according to claim 17 or 26, it is characterized in that, described fourth processing unit comprises the 3rd setting unit further;
3rd setting unit comprises the 4th setting unit and the first notification unit;
4th setting unit, for when the second judging unit judged result is not for monochrome information gradual change occurs, then arranging m is second value;
m=m+sign(picture ref1)+sign(picture ref2),
Wherein,
Wherein, m represents relative to frame tthrough the reference frame number of light gradient judgement; Sign (picture ref1) represent picture ref1be reference frame or be not reference frame time corresponding value; Sign (picture ref2, k) represent picture ref2be reference frame or be not reference frame time corresponding value;
First notification unit, for arranging after m is second value, notice execution second judging unit.
28. video coding apparatus according to claim 17, is characterized in that, the 3rd described judging unit, and " judging that whether all reference frames of current encoded frame are all through the judgement of light gradient " is specially;
M > number list0+ number list1and frame tfor B frame, or, m > number list0and frame tfor P frame;
Wherein, m represents relative to frame tthrough the reference frame number of light gradient judgement; Number list0represent reference frame sum in forward direction reference listing; Number list1represent reference frame sum in backward reference listing.
29. 1 kinds of video decoders, is characterized in that, described device comprises: decoding acquiring unit, the first codec processing unit, the second codec processing unit and the 3rd codec processing unit;
Decoding acquiring unit, for obtaining the correction parameter collection of current decoded frame and the first reference picture or the second reference picture;
First codec processing unit, comprises the first decoding judgement unit, decoded luminance information correction unit and regular decode unit;
The first described decoding judgement unit, for judging whether that current sign variable is 0;
Described decoded luminance information correction unit, for when the judged result of the first decoding judgement unit is no, the correction in the same way of monochrome information is carried out, notice execution second codec processing unit by the reference frame of the correction parameter set pair current decoded frame of the first described reference picture or the second reference picture;
Regular decode unit, for when the judged result of the first decoding judgement unit is for being, carries out regular decode process to described current decoded frame; Notice execution the 3rd codec processing unit;
Second codec processing unit, for utilizing the reference frame of corrected in the same way current decoded frame to carry out regular decode to current decoded frame, notice execution the 3rd codec processing unit;
3rd codec processing unit, finding next image to be decoded for pressing decoding order, if next image to be decoded exists, then image to be decoded for the next one being set to current decoded frame, notice decoding acquiring unit;
Wherein, described decoded luminance information correction unit " carries out the correction in the same way of monochrome information " method by the reference frame of the correction parameter set pair current decoded frame of the first described reference picture or the second reference picture is:
ref t , m y ( i , j ) = k T y * ( ref t y ( i , j ) - min _ pictu re ref y ) + min _ frame t y
Wherein, the span of i, j is: 1≤i≤height yaMP.AMp.Amp & 1≤j≤width y, line number, the columns of image luminance information are respectively: height y, width y; for the pixel value that the monochrome information of the reference frame of current decoded frame arranges in the i-th row jth; the pixel value that the monochrome information correcting the reference frame of rear current decoded frame in the same way for monochrome information arranges in the i-th row jth; be respectively the monochrome information adjustment factor of the corresponding reference frame of the current decoded frame that passes over from coding side, the minimum luminance value of the corresponding reference frame of current decoded frame, the minimum luminance value of original coding frame that current decoded frame is corresponding.
30. video decoders according to claim 29, is characterized in that, the first described codec processing unit comprises decoding U chrominance information correcting unit and V chrominance information correcting unit further;
U chrominance information correcting unit, after the monochrome information for having carried out the reference frame of current decoded frame when decoded luminance information correction unit corrects, continues to carry out U chrominance information to the reference frame of current decoded frame and corrects in the same way:
ref t , m u ( i , j ) = k T u * ( ref t u ( i , j ) - min _ pictu re ref u ) + min _ frame t u
Wherein, the span of i, j is: 1≤i≤height uaMP.AMp.Amp & 1≤j≤width u; for the pixel value that the U chrominance information of the reference frame of current decoded frame arranges in the i-th row jth; the pixel value that the U chrominance information correcting the reference frame of rear current decoded frame in the same way for U chrominance information arranges in the i-th row jth; be respectively the U chrominance information degree adjustment factor of the corresponding reference frame of the current decoded frame that passes over from coding side, the minimum U chromatic value of the corresponding reference frame of current decoded frame, the minimum U chromatic value of original coding frame that current decoded frame is corresponding;
Decoding V chrominance information correcting unit, after monochrome information for having carried out the reference frame of current decoded frame when decoded luminance information correction unit corrects, continue to carry out U chrominance information to the reference frame of current decoded frame to correct in the same way, notice execution the 3rd codec processing unit:
ref t , m v ( i , j ) = k T v * ( ref t v ( i , j ) - min _ pictu re ref v ) + min _ frame t v
Wherein, the span of i, j is: 1≤i≤height vaMP.AMp.Amp & 1≤j≤width v; for the pixel value that the V chrominance information of the reference frame of current decoded frame arranges in the i-th row jth; the pixel value that the V chrominance information correcting the reference frame of rear current decoded frame in the same way for V chrominance information arranges in the i-th row jth; be respectively the V chrominance information degree adjustment factor of the corresponding reference frame of the current decoded frame that passes over from coding side, the minimum V chromatic value of the corresponding reference frame of current decoded frame, the minimum V chromatic value of original coding frame that current decoded frame is corresponding.
CN201210544223.5A 2012-12-14 2012-12-14 A kind of Video coding, coding/decoding method and device Active CN103024384B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210544223.5A CN103024384B (en) 2012-12-14 2012-12-14 A kind of Video coding, coding/decoding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210544223.5A CN103024384B (en) 2012-12-14 2012-12-14 A kind of Video coding, coding/decoding method and device

Publications (2)

Publication Number Publication Date
CN103024384A CN103024384A (en) 2013-04-03
CN103024384B true CN103024384B (en) 2015-10-21

Family

ID=47972457

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210544223.5A Active CN103024384B (en) 2012-12-14 2012-12-14 A kind of Video coding, coding/decoding method and device

Country Status (1)

Country Link
CN (1) CN103024384B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103327324A (en) * 2013-05-13 2013-09-25 深圳市云宙多媒体技术有限公司 Method and system for coding and decoding light sudden change video
CN103227925B (en) * 2013-05-13 2016-05-11 深圳市云宙多媒体技术有限公司 A kind of self adaptation B frame coding method and system
CN103297778B (en) * 2013-05-27 2017-04-19 华为技术有限公司 Methods and equipment for encoding and decoding images
CN113382255B (en) * 2019-06-21 2022-05-20 杭州海康威视数字技术股份有限公司 Encoding and decoding method, device and storage medium
CN112422970B (en) * 2020-10-29 2024-05-17 西安万像电子科技有限公司 Image coding method and device
CN115077574B (en) * 2022-04-28 2023-10-20 横川机器人(深圳)有限公司 Inductance type absolute value encoder based on environmental induction

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101277447A (en) * 2008-04-15 2008-10-01 北京航空航天大学 Method for rapidly predicting frame space of aerophotographic traffic video
CN101335890A (en) * 2007-06-25 2008-12-31 华为技术有限公司 Encoding and decoding method with image output controllable, encoder and decoder
CN102630013A (en) * 2012-04-01 2012-08-08 北京捷成世纪科技股份有限公司 Bit rate control video compression method and device on basis of scene switching

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101200535B1 (en) * 2006-01-12 2012-11-27 (주)휴맥스 Adaptive motion estimation/compensation device for MB-based illumination change and method thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101335890A (en) * 2007-06-25 2008-12-31 华为技术有限公司 Encoding and decoding method with image output controllable, encoder and decoder
CN101277447A (en) * 2008-04-15 2008-10-01 北京航空航天大学 Method for rapidly predicting frame space of aerophotographic traffic video
CN102630013A (en) * 2012-04-01 2012-08-08 北京捷成世纪科技股份有限公司 Bit rate control video compression method and device on basis of scene switching

Also Published As

Publication number Publication date
CN103024384A (en) 2013-04-03

Similar Documents

Publication Publication Date Title
CN103024384B (en) A kind of Video coding, coding/decoding method and device
CN101919255B (en) Reference selection for video interpolation or extrapolation
CN100518315C (en) Coding/decoding apparatus adopting articulation improving technology and spatial scalable compression scheme, and method thereof
CN101711481B (en) Method and apparatus for video coding using prediction data refinement
US6816552B2 (en) Interpolation of video compression frames
CN101415122B (en) Forecasting encoding/decoding method and apparatus between frames
US8239766B2 (en) Multimedia coding techniques for transitional effects
US8144782B2 (en) Adaptive motion estimation/compensation device for MB/based illumination change and method thereof
US20070065026A1 (en) Method of and apparatus for lossless video encoding and decoding
CN105264888A (en) Encoding strategies for adaptive switching of color spaces, color sampling rates and/or bit depths
CN105191312B (en) Resource for being encoded to vision signal
JP2009201112A (en) Coding and decoding methods for direct mode
CN102084655A (en) Video encoding by filter selection
CN106060539B (en) A kind of method for video coding of low transmission bandwidth
CN110933430B (en) Secondary coding optimization method
CN1695381A (en) Sharpness enhancement in post-processing of digital video signals using coding information and local spatial features
CN100591136C (en) Video frequency intraframe coding method based on null field decomposition
CN104685885A (en) Signaling scalability information in a parameter set
GB2332115A (en) Motion vector prediction method
CN101867813A (en) Multi-view video coding method oriented for interactive application
CN101931820A (en) Spatial error concealing method
CN117480778A (en) Residual coding and video coding methods, devices, equipment and systems
CN114793282B (en) Neural network-based video compression with bit allocation
CN104902281A (en) Hamming code plus one-based information hiding method of HEVC video
CN115914654A (en) Neural network loop filtering method and device for video coding

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
DD01 Delivery of document by public notice

Addressee: Song Xiuli

Document name: Notification of Passing Examination on Formalities

DD01 Delivery of document by public notice

Addressee: BAC Information Technology Co., Ltd.

Document name: Notification of Passing Preliminary Examination of the Application for Invention

C53 Correction of patent for invention or patent application
CB02 Change of applicant information

Address after: Unit B1 9 building 518057 Guangdong city of Shenzhen province Nanshan District high in the four EVOC Technology Building No. 31

Applicant after: BAC Information Technology Co., Ltd.

Address before: Guangdong city of Shenzhen province Futian District 518042 building Che Kung Temple Zhenye Industry Exhibition 2102

Applicant before: BAC Information Technology Co., Ltd.

C53 Correction of patent for invention or patent application
CB02 Change of applicant information

Address after: 518057 Guangdong Province, Shenzhen city Nanshan District District Science Park Keyuan Road branch science park A1 unit 4 Building 403-405 unit

Applicant after: BAC Information Technology Co., Ltd.

Address before: Unit B1 9 building 518057 Guangdong city of Shenzhen province Nanshan District high in the four EVOC Technology Building No. 31

Applicant before: BAC Information Technology Co., Ltd.

C14 Grant of patent or utility model
GR01 Patent grant
CP03 Change of name, title or address

Address after: 518000 Guangdong city of Shenzhen province Nanshan District Guangdong streets high in the four Longtaili Technology Building Room 325 No. 30

Patentee after: Shenzhen Monternet encyclopedia Information Technology Co. Ltd.

Address before: 518057 Guangdong Province, Shenzhen city Nanshan District District Science Park Keyuan Road branch science park A1 unit 4 Building 403-405 unit

Patentee before: BAC Information Technology Co., Ltd.

CP03 Change of name, title or address
CP01 Change in the name or title of a patent holder

Address after: 518000 Guangdong city of Shenzhen province Nanshan District Guangdong streets high in the four Longtaili Technology Building Room 325 No. 30

Patentee after: Shenzhen mengwang video Co., Ltd

Address before: 518000 Guangdong city of Shenzhen province Nanshan District Guangdong streets high in the four Longtaili Technology Building Room 325 No. 30

Patentee before: SHENZHEN MONTNETS ENCYCLOPEDIA INFORMATION TECHNOLOGY Co.,Ltd.

CP01 Change in the name or title of a patent holder