CN109618168A - It is a kind of based on divide pixel value difference handle video encoding/decoding method - Google Patents
It is a kind of based on divide pixel value difference handle video encoding/decoding method Download PDFInfo
- Publication number
- CN109618168A CN109618168A CN201811311217.9A CN201811311217A CN109618168A CN 109618168 A CN109618168 A CN 109618168A CN 201811311217 A CN201811311217 A CN 201811311217A CN 109618168 A CN109618168 A CN 109618168A
- Authority
- CN
- China
- Prior art keywords
- frame
- decoded
- reference frame
- video frame
- resolution
- 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.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/132—Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/44—Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/503—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
- H04N19/51—Motion estimation or motion compensation
- H04N19/513—Processing of motion vectors
- H04N19/517—Processing of motion vectors by encoding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/59—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial sub-sampling or interpolation, e.g. alteration of picture size or resolution
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/80—Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
This application involves a kind of based on the video encoding/decoding method for dividing pixel value difference to handle, after getting the corresponding coded data of video frame to be decoded and the corresponding current reference frame of frame to be decoded, it can determine the image element interpolation mode of current reference frame, using the image element interpolation mode, according to the resolution information of current reference frame, current reference frame is handled, adjust the resolution ratio of current reference frame, obtain object reference frame, even if current reference frame is different from the resolution ratio of video frame to be decoded, also it can be used as the reference frame of video frame to be decoded, decoding video frame is treated according to obtained object reference frame to be encoded, improve the service efficiency of reference frame.
Description
Technical field
This application involves technical field of image processing, are decoded more particularly to a kind of based on the video for dividing pixel value difference to handle
Method.
Background technique
Traditional encoder without distinguishing encodes video frame, in fact it could happen that certain scene videos are ropy to ask
Topic, when being encoded without distinction for all video frames, the resolution ratio of referenced video frame be all it is identical, then regarding
Frequency frame can only refer to the reference frame of same resolution ratio, and the service efficiency of reference frame is not high, and referring-to relation is also inflexible.
Summary of the invention
The embodiment of the invention provides a kind of based on the video encoding/decoding method for dividing pixel value difference to handle, comprising:
Obtain the corresponding coded data of video frame to be decoded;
Obtain the corresponding current reference frame of the video frame to be decoded;
Determine image element interpolation mode;The image element interpolation mode is direct image element interpolation mode and divides picture after sampling
One of plain interpolation method;
It is obtained described wait solve using the image element interpolation mode according to the resolution information of the video frame to be decoded
The corresponding pel motion compensation precision of code video frame;Using the image element interpolation mode, according to the resolution of the video frame to be decoded
Rate information and the pel motion compensation precision handle the current reference frame, obtain corresponding object reference frame:
The image element interpolation mode and according to the institute of the video frame to be decoded after the image element interpolation mode is sampling
When stating resolution ratio of the resolution ratio represented by resolution information greater than the current reference frame, according to the video frame to be decoded
Resolution information carries out up-sampling treatment to the current reference frame, obtains middle reference frame;According to the pel motion compensation precision
Image element interpolation processing is carried out to the middle reference frame, obtains corresponding object reference frame;Or, working as the image element interpolation side
Formula be direct image element interpolation mode and the resolution ratio according to represented by the resolution information of the video frame to be decoded with
When the resolution ratio of the current reference frame is identical, a point picture is directly carried out to the current reference frame according to the pel motion compensation precision
Plain interpolation processing obtains corresponding object reference frame;
The coded data is decoded according to the object reference frame, it is corresponding heavy to obtain the video frame to be decoded
Build video frame.
It is above-mentioned based on divide pixel value difference handle video encoding/decoding method, getting the corresponding coded number of video frame to be decoded
Accordingly and after the corresponding current reference frame of frame to be decoded, it may be determined that the image element interpolation mode of current reference frame, using this point of picture
Plain interpolation method is handled current reference frame according to the resolution information of current reference frame, adjusts point of current reference frame
Resolution obtains object reference frame, even if current reference frame is different from the resolution ratio of video frame to be decoded, also can be used as view to be decoded
The reference frame of frequency frame is treated decoding video frame according to obtained object reference frame and is encoded, and the use effect of reference frame is improved
Rate.
Detailed description of the invention
Fig. 1 is the flow diagram based on the video encoding/decoding method for dividing pixel value difference to handle in one embodiment.
Specific embodiment
The embodiment of the invention provides a kind of based on the video encoding/decoding method for dividing pixel value difference to handle, comprising the following steps:
Step 1, the corresponding coded data of video frame to be decoded is obtained.
Wherein, video frame to be decoded is the video frame for needing to be decoded, and coded data is the data for being decoded.
Decoding end can receive the coded data that coding side is sent by network.Coded data can be coding side and handle according to full resolution
Mode encodes input video frame, is also possible to coding side according to corresponding processing mode down-sampling processing mode
To what is encoded again after input video frame progress down-sampling.
In one embodiment, the corresponding processing mode letter of video frame to be decoded can be obtained from the head information of coded data
Breath, after obtaining the corresponding reconstruction video frame of video frame to be decoded, can according to the matched mode pair of the processing mode information
It rebuilds video frame to be handled, obtains decoding video frame.Head information specifically can be the frame level head information of coded data, indicate to work as
Corresponding input video frame used processing mode when encoded of preceding coded data.For example, working as the frame level head of coded data
When marker in information for determining processing mode is 0, indicate that input video frame is all made of at full resolution when encoded
Reason mode, then decoding end is that the corresponding decoding of video frame to be decoded regards to the reconstruction video frame that coded data is decoded
Frequency frame;When for 1, indicate that input video frame uses down-sampling processing mode when encoded, decoding end can be adopted according to under this
The processing mode that sample processing mode matches is further processed obtained reconstruction video frame, obtains decoding video frame.Further
Processing is such as up-sampling treatment.
In one embodiment, the corresponding decoding frame of video frame to be decoded can be determined from the head information of coded data.
Specifically, decoding end can obtain the corresponding input view of current encoded data from the corresponding sequence-level head information of coded data
Each input video frame used coding framework when encoded in frequency frame sequence, so that it is determined that matching view to be decoded
The decoding frame of frequency frame.For example, when the marker in the sequence-level head information of coded data for determining used coding framework
When being 0, indicate that each input video frame is all made of constant resolution coding framework when encoded in input video frame sequence, then
The decoding frame that constant resolution can be used in decoding end is decoded coded data to obtain the corresponding reconstruction of video frame to be decoded
Video frame;When for 1, indicate that each input video frame is all made of adaptive resolution when encoded in input video frame sequence
Coding framework, decoding end, which just can be used the decoding frame of adaptive resolution and be decoded to obtain to coded data, rebuilds video
Frame sequence.
When decoding end is decoded coded data using the decoding frame of adaptive resolution, can also be calculated according to decision
Method determines the corresponding processing mode of current encoded data.The decision making algorithm should with used by coding side to input video frame into
Used decision making algorithm matches when row coding.
In one embodiment, determine that current encoded data is adopted under from the head information of coded data when decoding end
Sample processing mode is encoded, then down-sampling percent information used by from the beginning decoding end can also obtain in information or under
Method of sampling information, and use and down-sampling percent information or the up-sampling ratio of Downsapling method information matches, up-sampling side
Method carries out up-sampling treatment to obtained reconstruction video frame, obtains decoding video frame.It is adopted for example, down-sampling percent information is corresponding
Sample ratio is 1/2, then decoding end is needed according to 1/2 oversampling ratio and the top sampling method pair of Downsapling method information matches
It rebuilds video frame and carries out up-sampling treatment, obtain decoding video frame.Decoding end can from sequence-level head information, group grade head information with
And any of frame level head information gets the corresponding down-sampling percent information of current encoded data or Downsapling method information.
Step 2, the corresponding current reference frame of video frame to be decoded is obtained.
Wherein, current reference frame is the video frame to be referred to when treating decoding video frame and being decoded.Current reference
Frame is the video frame rebuild to the corresponding coded data of the video frame that can be used as reference frame.Current video frame to be encoded is corresponding
Current reference frame according to the difference of inter-prediction type, can be forward reference frame or bi-directionally referenced frame, video frame pair to be encoded
The number for the current reference frame answered can be one or more.It should be noted that based on the video decoding for dividing pixel value difference to handle
Current reference frame in method is corresponding with the current reference frame in method for video coding.
Specifically, decoding end can carry out entropy to coded data after getting the corresponding coded data of current reference frame
Decoding, inverse quantization, inverse transformation obtain the corresponding prediction residual of each intra-frame prediction block, then by the prediction residual and corresponding ginseng
It examines block to be added to obtain each reconstructed block, to obtain the reconstructed frame of the input video frame, i.e. current reference frame, such as I frame.
In one embodiment, the corresponding each current reference frame of video frame to be decoded can be cached, and establish to
Corresponding relationship between decoding video frame and current reference frame.When treating decoding video frame and being decoded, so that it may directly obtain
Take corresponding current reference frame.The corresponding resolution information of current reference frame can also be obtained.For example, for a GOP group and
Speech, usual multiple posterior video frames to be decoded need to refer to the same preceding reference frame.
In one embodiment, it obtains the corresponding current reference frame of video frame to be decoded to specifically include: obtaining the second reference
Rule, the second resolution sizes relationship with reference to rule including video frame to be decoded and current reference frame;According to the second reference gauge
Then obtain the corresponding current reference frame of video frame to be decoded.
Specifically, second the limitation pass that rule has determined the resolution sizes of video frame to be decoded and current reference frame is referred to
System, it will be understood that for the reference for guaranteeing the current reference frame acquired in cataloged procedure and being acquired in decoding process
The consistency of frame, first is consistent with second with reference to rule with reference to rule.First can be with reference to rule, second with reference to rule
It is pre-set in encoding and decoding standard.It, can application scenarios, requirement of real-time according to coding alternatively, when being encoded
It Deng selection first with reference to rule, and is carried in coded data and refers to Rule Information, decoder is according to the reference in coded data
Rule Information obtains second with reference to rule.Resolution sizes relationship includes that video frame to be decoded is identical and different as reference frame
It is at least one.When second includes that video frame to be decoded is identical as the resolution ratio of reference frame with reference to rule, the second reference rule is also
It may include the processing mode of the resolution ratio of video frame to be decoded and current reference frame with reference to rule.Such as processing mode reference gauge
Then may include the full video frame to be decoded for differentiating processing mode can with reference to full resolution processing mode current reference frame with
And the video frame to be decoded of down-sampling processing mode can be with reference to the one or two of the current reference frame of down-sampling processing mode.
When the second resolution ratio with reference to rule including video frame to be decoded and reference frame is not identical, second can also include with reference to rule
The resolution ratio of resolution ratio and video frame to be decoded that the resolution ratio of video frame to be decoded is greater than current reference frame is less than current ginseng
Examine the one or two of the resolution ratio of frame.Therefore, second may include that original resolution video frame to be decoded can be with reference to rule
It can be with reference to original resolution reference frame, original with reference to down-sampling resolution reference frame, down-sampling resolution ratio video frame to be decoded
Resolution ratio video frame to be decoded can join with reference to original resolution reference frame and down-sampling resolution ratio video frame to be decoded
Examine one of reference frame of down-sampling resolution ratio or a variety of.Wherein original resolution video frame to be decoded refers to the view to be decoded
The resolution ratio of frequency frame is identical as the resolution ratio of corresponding input video frame, and original resolution reference frame refers to the resolution of the reference frame
The resolution ratio of the corresponding input video frame of rate is identical.Down-sampling resolution ratio video frame to be decoded refers to the video frame to be decoded
Corresponding resolution information is down-sampling.Down-sampling resolution reference frame refers to that the corresponding resolution information of the reference frame is adopted under being
Sample.After second is obtained with reference to rule, according to second with reference to the corresponding current reference frame of rule video frame to be decoded, what is made works as
Preceding reference frame meets second with reference to rule.
Step 3, image element interpolation mode is determined;Image element interpolation mode is direct image element interpolation mode and divides after sampling
One of picture element interpolation mode.
Wherein, image element interpolation is to obtain a point pixel scale by the reference data interpolation of pixel whole in current reference frame
The process of reference data.During treating decoding video frame and being decoded, need to be decoded to obtain according to coded data
Motion vector, so that the corresponding position in current reference frame of the decoding block in video frame to be decoded is determined according to motion vector,
And be decoded to obtain residual error according to coded data, the data of corresponding position in current reference frame are added with residual error and are solved
The corresponding data of code block, to obtain reconstructed block.Thus, it handles to obtain target by carrying out image element interpolation to current reference frame
Reference frame, so that it may which the decoding block correctly found in video frame to be decoded from the higher object reference frame of resolution ratio is corresponding
Position promotes decoding quality.
Image element interpolation mode is the mode of the current reference frame progress image element interpolation processing to acquisition, including directly right
Current reference frame carries out image element interpolation processing and to image element interpolation is handled again after current reference frame progress sampling processing.
Specifically, when current reference frame is identical as the resolution ratio of video frame to be decoded, can directly to current reference frame into
The processing of row image element interpolation;It, can be directly to current reference when the resolution ratio of current reference frame and video frame to be decoded is not identical
Frame carries out image element interpolation processing, can also be sampled to obtain to current reference frame identical with video frame resolution to be decoded
Frame carries out image element interpolation processing to obtaining the identical frame of resolution ratio again, is applicable in two kinds of image element interpolation modes.Wherein, to working as
It includes that up-sampling treatment and down-sampling are handled that reference frame, which carries out sampling,.In one embodiment, if the number of current reference frame is
It is multiple, then each current reference frame is sampled respectively to obtain frame identical with video frame resolution to be decoded.
In the present embodiment, current reference frame is sampled to obtain frame identical with video frame resolution to be decoded, it can be
The images match degree between video frame to be decoded and the frame to be referred to is improved to a certain extent, to improve the accurate of inter-prediction
Degree reduces prediction residual, improves the quality of decoding image.
In one embodiment, decoding end and decoding end can be arranged in respective encoding and decoding rule according to current reference frame
Handled to obtain used image element interpolation mode when object reference frame, the image element interpolation mode of use should be consistent
, just current reference frame is carried out to handle corresponding image element interpolation mode according to configuration determination in coding and decoding.
In one embodiment, decoding end can also obtain corresponding point of video frame to be decoded from the head information of coded data
Picture element interpolation mode information.It can specifically be obtained from sequence-level head information, group any of grade head information and frame level head information
Get the corresponding image element interpolation mode information of video frame to be decoded.For example, true when being used in the frame level head information of coded data
When the marker for determining image element interpolation mode is 0, indicates that the corresponding current reference frame of input video frame uses and directly carry out a point picture
Plain interpolation processing indicates the corresponding current reference frame of input video frame using after sampling processing again at image element interpolation when for 1
Reason.Decoding end can be according to mode identical with image element interpolation mode represented by marker in coded data to current reference
Frame carries out image element interpolation and handles to obtain object reference frame, so as to be decoded to obtain to coded data according to object reference frame
Rebuild video frame.
Step 4, using image element interpolation mode, according to the resolution information of video frame to be decoded, to current reference frame into
Row processing, obtains corresponding object reference frame.
Wherein, the resolution information of video frame to be decoded can be the resolution ratio of video frame to be decoded, be also possible to wait solve
Down-sampling percent information corresponding to code video frame.Due to the correspondence for decoding and encoding, the corresponding coding of video frame to be decoded
Data treat encoded video frame and are encoded to obtain, therefore, the resolution information of video frame to be decoded and video to be encoded
The resolution information of frame is identical.Similarly, the corresponding current reference frame of video frame to be decoded is corresponding with video frame to be encoded
Current reference frame be also identical.
Object reference frame is after carrying out image element interpolation processing according to corresponding image element interpolation mode to current reference frame
Obtained video frame.It specifically, can the resolution ratio according to represented by the resolution information of video frame to be decoded and current reference frame
Resolution information represented by proportionate relationship between resolution ratio, determine the corresponding sampling side of used image element interpolation mode
Method, including up-sampling or down-sampling.
It in one embodiment, can be according to the ratio between the resolution ratio of video frame to be decoded and the resolution ratio of current reference frame
Example relationship determines the ratio sampled to current reference frame.For example, if the resolution ratio of video frame to be decoded is 2M*2N, wait solve
The resolution ratio of the corresponding current reference frame of code video frame is M*2N, is adopted then determining that current reference frame with wide 1/2, high 1
Sample ratio carries out up-sampling treatment, obtains frame identical with video frame resolution to be decoded.If the resolution ratio of video frame to be decoded
For M*N, the resolution ratio of the corresponding current reference frame of video frame to be decoded is 2M*2N, it is determined that current reference frame with wide, Gao Jun
Down-sampling processing is carried out for 1/2 oversampling ratio, obtains frame identical with video frame resolution to be decoded.
In one embodiment, since the resolution ratio of input video frame is usually identical, can according to input video frame into
Row down-sampling obtains down-sampling ratio corresponding to video frame to be encoded, and carries out to the input video frame that can be used as reference frame
Down-sampling obtains down-sampling ratio corresponding to reference frame to be encoded, and the corresponding oversampling ratio of decoding video frame is treated in determination, with
And the oversampling ratio of the corresponding current reference frame of video frame to be decoded.For example, by input video frame with 1/2 oversampling ratio
It carries out down-sampling to handle to obtain video frame to be encoded, then the corresponding oversampling ratio of video frame to be decoded is also 1/2, by can make
For reference frame input video frame with 1/4 oversampling ratio carry out down-sampling handle to obtain reference frame to be encoded, then according to
The corresponding down-sampling ratio of current reference frame that the coded data of reference coding frame obtains after rebuilding is also 1/4, then view to be decoded
The corresponding down-sampling ratio of the corresponding current reference frame of frequency frame is also 1/4, then, according to video frame to be decoded, corresponding current
Multiple proportion between reference frame down-sampling ratio, it may be determined that treat decoding video frame corresponding current reference frame and adopted with 2 times
Sample ratio carries out up-sampling treatment and obtains frame identical with video frame resolution to be decoded.
Step 5, coded data is decoded according to object reference frame, obtains the corresponding reconstruction video of video frame to be decoded
Frame.
Wherein, rebuilding video frame is the video frame that decoding and rebuilding obtains.It is appreciated that the corresponding resolution of reconstruction video frame
Rate information is corresponding with the resolution information of the video frame to be encoded in cataloged procedure.If image is believed during coding
Breath is there is no loss, then it is identical for rebuilding video frame with video frame to be encoded, if image information is deposited during coding
It is losing, then it is corresponding with penalty values with the difference of video frame to be encoded to rebuild video frame.Coded data is decoded be to
The corresponding resolution information of decoding video frame carries out.Decoding may include in prediction, inverse transformation, inverse quantization and entropy decoding
At least one, determines with specific reference to the process of coding.In decoding, such as the corresponding current ginseng of available video frame to be decoded
Frame is examined, current reference frame is handled according to video frame to be decoded corresponding resolution information, obtains object reference frame, according to
Object reference frame obtains the corresponding predicted value of video to be decoded, and obtains weight with predicted value according to the prediction residual in coded data
Build video frame.When being obtained in reference frame according to motion vector value with current to be decoded piece of corresponding target reference block, according to coding
The corresponding resolution information of the unit of motion vector in data resolution information corresponding with video frame to be decoded is to coded number
Motion vector in is converted, and target motion vectors are obtained, and is obtaining target reference block according to target motion vectors.
It when being decoded, is decoded according to the corresponding resolution information of video frame to be decoded.Obtain object reference
After frame, reference block corresponding with the encoding block of video frame to be encoded can be obtained from object reference frame, according to reference block to volume
Code block is decoded, and obtains the corresponding reconstruction video frame of video frame to be decoded.
The above method is getting the corresponding coded data of video frame to be decoded and video frame to be decoded is corresponding current
After reference frame, it may be determined that the image element interpolation mode of current reference frame, using the image element interpolation mode, according to current reference frame
Resolution information, current reference frame is handled, the resolution ratio of current reference frame is adjusted, obtains object reference frame, even if
Current reference frame is different from the resolution ratio of video frame to be decoded, also can be used as the reference frame of video frame to be decoded, according to what is obtained
Object reference frame is treated decoding video frame and is encoded, and the service efficiency of reference frame is improved.
Current reference frame is handled according to the resolution information of video frame to be decoded using image element interpolation mode,
Obtaining corresponding object reference frame includes: to obtain the corresponding pel motion compensation precision of video frame to be decoded.Using image element interpolation side
Formula handles current reference frame according to the resolution information of video frame to be decoded and pel motion compensation precision, is corresponded to
Object reference frame.
The resolution information that current reference frame can be obtained, according to video frame to be decoded use image element interpolation mode, with
And the resolution information of video frame to be decoded, current reference frame resolution information and the corresponding movement of video frame to be decoded mend
It repays precision determination and the corresponding oversampling ratio of which kind of sampling processing, sampling processing and picture element interpolation essence is carried out to current reference frame
Degree.
Pel motion compensation precision is generally 1/2 pixel precision, 1/4 pixel precision or 1/8 pixel precision, the movement of higher precision
Estimation can not more obviously promote coding quality, but will lead to being obviously improved for computation complexity.
It can be that the decoding video frame configures corresponding pel motion compensation precision according to the image feature information of video frame to be decoded,
Image feature information such as size of the video frame to be encoded, texture information, movement velocity etc. can integrate a variety of characteristics of image letters
It ceases and determines the corresponding pel motion compensation precision of decoding video frame.Image data entrained by video frame to be decoded is more complicated, image letter
Breath is abundanter, and corresponding pel motion compensation precision is higher.For example, higher movement can be used and mend when carrying out inter-prediction to P frame
The corresponding motion vector of each encoding block in accuracy computation P frame is repaid, and when carrying out inter-prediction to B frame, lower fortune can be used
Dynamic compensation precision calculates the corresponding motion vector of each encoding block in B frame.
Using image element interpolation mode, according to the resolution information of video frame to be decoded and pel motion compensation precision to current
Reference frame is handled, and obtaining corresponding object reference frame includes: image element interpolation side after image element interpolation mode is samples
When formula and the resolution ratio according to represented by the resolution information of video frame to be decoded are less than the resolution ratio of current reference frame, then root
Down-sampling processing is carried out to current reference frame according to the resolution information of video frame to be decoded, obtains middle reference frame;According to movement
Compensation precision carries out image element interpolation processing to intermediate reference frame, obtains corresponding object reference frame.
Image element interpolation mode after the corresponding image element interpolation mode of video frame to be decoded is sampling, expression will be to current
Reference frame first carries out sampling processing, obtains middle reference frame identical with video frame resolution to be decoded, then to intermediate reference frame
Image element interpolation is carried out to handle to obtain corresponding object reference frame.
When the resolution ratio according to represented by the resolution information of video frame to be decoded is less than the resolution ratio of current reference frame,
The proportionate relationship according to resolution ratio between the two just is needed, determines the oversampling ratio for carrying out down-sampling to current reference frame, according to
The oversampling ratio obtains and the middle reference frame to encoding and decoding video codes frame equal resolution after carrying out down-sampling;It is then based on fortune
Dynamic compensation precision carries out image element interpolation processing to intermediate reference frame, obtains object reference frame, also, in this case, pixel
Interpolation precision is identical as pel motion compensation precision.
It is handled point by carrying out down-sampling according to down-sampling processing mode to the input video frame that resolution ratio is 2M*2N
Resolution is the video frame to be encoded of M*N, then the resolution ratio of video frame to be decoded is also M*N, and the resolution ratio of current reference frame is
2M*2N (full resolution processing mode) then handles current reference frame according to 1/2 oversampling ratio progress down-sampling and is differentiated
Rate is the middle reference frame of M*N, if the corresponding pel motion compensation precision of video frame to be decoded obtained is 1/2, then to middle reference
Frame carries out image element interpolation processing according to picture element interpolation precision identical with pel motion compensation precision, i.e. 1/2 image element interpolation precision,
Obtain object reference frame;If obtain the corresponding pel motion compensation precision of video frame to be decoded be 1/4, to intermediate reference frame according to
1/4 image element interpolation precision carries out image element interpolation processing, obtains the higher object reference frame of resolution ratio.
What current reference frame was also possible to obtain by using down-sampling processing mode.For example, by being 2M* to resolution ratio
The input video frame of 2N carries out down-sampling according to down-sampling processing mode and handles to obtain the view to be encoded that resolution ratio is 1/2M*1/2N
Frequency frame, then the resolution ratio of video frame to be decoded is also 1/2M*1/2N, and current reference frame is by being 2M*2N to resolution ratio
Input video frame carries out down-sampling and handles to obtain the corresponding coded data of reference frame to be encoded that resolution ratio is M*N rebuilding to obtain
, then, the resolution ratio of current reference frame is also M*N, thus, the resolution ratio of video frame to be decoded is less than point of current reference frame
Resolution can carry out down-sampling according to 1/2 oversampling ratio to current reference frame and handle to obtain in identical with video frame to be decoded
Between reference frame, then again based on pel motion compensation precision carry out image element interpolation handle to obtain object reference frame.
Using image element interpolation mode, according to the resolution information of video frame to be decoded and pel motion compensation precision to current
Reference frame is handled, obtain corresponding object reference frame include: when image element interpolation mode be direct image element interpolation mode,
And the resolution ratio according to represented by the resolution information of video frame to be decoded be less than current reference frame resolution ratio when, then according to
Picture element interpolation precision is calculated in the resolution information and pel motion compensation precision of decoding video frame;It is straight according to picture element interpolation precision
It connects and image element interpolation processing is carried out to current reference frame, obtain corresponding object reference frame.
, when the corresponding image element interpolation mode of video frame to be decoded is direct image element interpolation mode, expression can be to current
Reference frame directly carries out image element interpolation and handles to obtain object reference frame.It is appreciated that since the resolution ratio of current reference frame is big
In the resolution ratio of video frame to be decoded, therefore, partially divide the data of pixel that can directly be multiplexed in current reference frame, can be used as with
Pel motion compensation precision divides pixel corresponding data accordingly.
The resolution ratio of video frame to be decoded is M*N, and the resolution ratio of current reference frame is 2M*2N, if pel motion compensation precision is
1/2, then current reference frame can be directly as object reference frame;If pel motion compensation precision is 1/4, inserted then pixel is calculated
Being worth precision is 1/2, can carry out image element interpolation to current reference frame with 1/2 picture element interpolation precision and handle to obtain object reference frame.
Using image element interpolation mode, according to the resolution information of video frame to be decoded and pel motion compensation precision to current
Reference frame is handled, and obtaining corresponding object reference frame includes: image element interpolation side after image element interpolation mode is samples
When formula and the resolution ratio according to represented by the resolution information of video frame to be decoded are greater than the resolution ratio of current reference frame, then root
Up-sampling treatment is carried out to current reference frame according to the resolution information of video frame to be decoded, obtains middle reference frame;According to movement
Compensation precision carries out image element interpolation processing to intermediate reference frame, obtains corresponding object reference frame.
When the resolution ratio of video frame to be decoded is greater than the resolution ratio of current reference frame, then need to carry out current reference frame
Up-sampling treatment obtains middle reference frame identical with video frame resolution to be decoded, and it is corresponding to be then based on video frame to be decoded
Pel motion compensation precision to intermediate reference frame carry out image element interpolation processing, obtain object reference frame.
The resolution ratio of video frame to be decoded is 2M*2N, and the resolution ratio of current reference frame is 1/2M*1/2N, then need according to
1/4 oversampling ratio carries out up-sampling treatment to current reference frame and obtains middle reference identical with video frame resolution to be decoded
Frame continues to carry out a point pixel according to 1/2 picture element interpolation precision to obtained middle reference frame if pel motion compensation precision is 1/2
Interpolation processing obtains object reference frame;If pel motion compensation precision is 1/4, continue to obtained middle reference frame according to 1/4 picture
Plain interpolation precision carries out image element interpolation processing, obtains object reference frame.
Using image element interpolation mode, according to the resolution information of video frame to be decoded and pel motion compensation precision to current
Reference frame is handled, obtain corresponding object reference frame include: when image element interpolation mode be direct image element interpolation mode,
And the resolution ratio according to represented by the resolution information of video frame to be decoded it is identical as the resolution ratio of current reference frame when, then basis
Pel motion compensation precision directly carries out image element interpolation processing to current reference frame, obtains corresponding object reference frame.
Input video frame is handled to obtain video frame to be encoded by differentiating processing mode entirely, then video frame to be decoded
Resolution ratio be also former resolution ratio, and when the resolution ratio of current reference frame is also former resolution ratio, then the resolution of video frame to be decoded
Rate is identical with the resolution ratio of current reference frame.Alternatively, being handled to obtain to input video frame by down-sampling mode to be encoded
Video frame, and current reference frame frame is also to be rebuild using the coded data that the identical down-sampling mode using ratio encodes
It arrives, then the resolution ratio of video frame to be decoded and the resolution ratio of current reference frame are identical.It is mended it is possible to be directly based upon movement
Precision is repaid directly current reference frame progress image element interpolation is handled to obtain object reference frame, also, image element interpolation processing pair
The picture element interpolation precision answered is identical with pel motion compensation precision.
By carrying out image element interpolation processing to current reference frame, so that the resolution ratio of current reference frame is higher, count in this way
Obtained video frame to be decoded is more fine relative to the motion vector of reference frame, further decreases prediction residual, Neng Gouti
High coding quality.
Coded data is decoded according to object reference frame, obtains the corresponding reconstruction video frame packet of video frame to be decoded
It includes: third vector parameter is determined according to the corresponding resolution information of video frame to be decoded and first resolution information, the
One resolution information includes target motion vectors unit resolution rate information.It is obtained according to coded data each in video frame to be decoded
To be decoded piece of corresponding target motion vectors.Video to be decoded is obtained according to third vector parameter and target motion vectors
Each to be decoded piece of corresponding reference image block in frame.Coded data is decoded according to reference image block, is obtained to be decoded
The corresponding reconstruction video frame of video frame.
Third vector parameter is for converting the location information or motion vector that obtain motion vector.Third
Vector parameters can be the ratio between first resolution information and the resolution information of video frame to be decoded, can be to be decoded
The resolution information of video frame is obtained divided by first resolution information.It is also possible to first resolution information divided by code to be decoded
What the resolution information of frame obtained.Alternatively, after obtaining ratio, it can be with comparative example multiplied by corresponding coefficient or plus preset inclined
Shifting measures.For example, it is assumed that the down-sampling ratio of current reference frame is 1/3, the down-sampling ratio of video frame to be decoded is 1/6.
Then third vector parameter can be equal to 2 divided by 1/3 for 1/6.It is appreciated that due to decoding the correspondence with coding, according to
The corresponding resolution information of video frame to be decoded and first resolution information determine third vector parameter the step for
It is the step for determining the first vector parameter according to the resolution information and first resolution information of video frame to be encoded
Inverse process.For example, it is assumed that the down-sampling ratio of current reference frame is 1/3, the down-sampling ratio of video frame to be encoded is 1/6.Then
First vector parameter can be equal to 2 divided by 1/6 for 1/3.That is in decoding process, since video frame to be decoded is to be encoded
The down-sampling ratio of video frame after coding video frames, current reference frame is also 1/3, the corresponding down-sampling ratio of video frame to be decoded
Example is 1/6, then third vector parameter is equal to 2 divided by 1/3 for 1/6.
When carrying target motion vectors in coded data, target motion vectors are read from coded data.Work as coded number
According to middle carrying be motion vector difference when, then target prediction motion vector can be calculated, according to motion vector difference and mesh
Mark predicted motion vector obtains target motion vectors.
After obtaining third vector parameter, obtained motion vector or movement are sweared according to third vector parameter
It measures corresponding location information to be converted, the corresponding location information of reference image block is obtained, to obtain reference image block.
After obtaining reference image block, according to carrying to be decoded piece pre- in the pixel value of reference image block and coded data
Residual error is surveyed, the pixel value for rebuilding each image block of video frame is obtained, obtains rebuilding video frame.
Determine that third vector is joined according to the corresponding resolution information of video frame to be decoded and first resolution information
Number includes: to determine that third vector becomes according to the resolution information of the corresponding resolution information of video frame to be decoded and current reference frame
Change parameter;Each to be decoded piece of correspondence in video frame to be decoded is obtained according to third vector parameter and target motion vectors
Reference image block include: to obtain current to be decoded piece of corresponding first location information;According to first location information, third vector
Transformation parameter and target motion vectors obtain current to be decoded piece of corresponding target reference picture block.
Target reference picture can be obtained according to first location information, third vector parameter and target motion vectors
The corresponding second location information of block obtains target reference picture block according to second location information.Due to coding with it is decoded corresponding
Property, the mistake of third vector parameter is determined according to the corresponding resolution information of video frame to be decoded and first resolution information
Journey is to determine that the first vector is joined according to according to the resolution information of video frame to be encoded and the resolution information of current reference frame
Several inverse process.
When the first vector parameter is in the resolution ratio of video frame to be encoded and the resolution information of current reference frame, greatly
When the ratio that resolution information is obtained divided by small resolution information, third vector parameter can be point of video frame to be decoded
In the resolution information of resolution and current reference frame, ratio that small resolution information is obtained divided by big resolution information, wherein big
The corresponding resolution ratio of the small resolution ratio of the corresponding resolution ratio of resolution information is big.Third vector parameter is used for and view to be decoded
Frequency frame and the location information of the frame of resolution information small in current reference frame are converted.
Determine that third vector is joined according to the corresponding resolution information of video frame to be decoded and first resolution information
Number includes: to determine that third is sweared according to the corresponding resolution information of video frame to be decoded and target motion vectors unit resolution rate information
Change of variable parameter;Each to be decoded piece is obtained in video frame to be decoded according to third vector parameter and target motion vectors
Corresponding reference image block includes: to obtain the first motion vector according to target motion vectors and third vector parameter;Root
Current to be decoded piece of corresponding target reference picture block is obtained according to the first motion vector.
Third vector parameter is according to the corresponding resolution information of video frame to be decoded and target motion vectors unit
What resolution information determined.After obtaining third vector parameter, third vector parameter and target can be moved
Vector is multiplied, using obtained product as the first motion vector.It is appreciated that being transported according to third vector parameter and target
Dynamic vector obtains this process of the first motion vector and is obtained currently according to the first vector parameter and the first motion vector
The corresponding target motion vectors of encoding block are inverse process.
When what is carried in coded data is motion vector difference, then obtained according to coded data each in video frame to be decoded
To be decoded piece of corresponding target motion vectors include: that obtained in video frame to be decoded according to coded data current to be decoded piece is right
The motion vector difference answered;
Obtain current to be decoded piece of corresponding initial predicted motion vector;It is corresponding current according to initial predicted motion vector
Motion vector unit resolution rate information and target motion vectors unit resolution rate information, obtain the second vector coefficient;According to
Initial predicted motion vector and the second vector coefficient obtain the corresponding target prediction motion vector of current decoding block;According to mesh
Mark predicted motion vector and motion vector difference obtain target motion vectors.
Specifically, with block to be encoded be with to be decoded piece in cataloged procedure due to decoding it is corresponding, initial predicted, which moves, swears
It is identical that amount obtains rule, therefore current to be decoded piece of corresponding initial motion predictive vector is corresponding with current block to be encoded initial
Predicted motion vector is consistent, and the method for obtaining target prediction motion vector is referred to the method in cataloged procedure, specifically
It repeats no more.Target motion vectors can be the sum of target prediction motion vector and motion vector difference.
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously
The limitation to the application the scope of the patents therefore cannot be interpreted as.It should be pointed out that for those of ordinary skill in the art
For, without departing from the concept of this application, various modifications and improvements can be made, these belong to the guarantor of the application
Protect range.Therefore, the scope of protection shall be subject to the appended claims for the application patent.
Claims (1)
1. a kind of based on the video encoding/decoding method for dividing pixel value difference to handle, comprising:
Obtain the corresponding coded data of video frame to be decoded;
Obtain the corresponding current reference frame of the video frame to be decoded;
Determine image element interpolation mode;Point pixel is inserted after the image element interpolation mode is direct image element interpolation mode and samples
One of value mode;
The view to be decoded is obtained according to the resolution information of the video frame to be decoded using the image element interpolation mode
The corresponding pel motion compensation precision of frequency frame;Using the image element interpolation mode, believed according to the resolution ratio of the video frame to be decoded
Breath and the pel motion compensation precision handle the current reference frame, obtain corresponding object reference frame:
The image element interpolation mode and according to the video frame to be decoded point after the image element interpolation mode is sampling
When resolution ratio represented by resolution information is greater than the resolution ratio of the current reference frame, according to the resolution of the video frame to be decoded
Rate information carries out up-sampling treatment to the current reference frame, obtains middle reference frame;According to the pel motion compensation precision to institute
It states middle reference frame and carries out image element interpolation processing, obtain corresponding object reference frame;Or, when the image element interpolation mode is
Direct image element interpolation mode and the resolution ratio according to represented by the resolution information of the video frame to be decoded with it is described
When the resolution ratio of current reference frame is identical, point pixel is directly carried out to the current reference frame according to the pel motion compensation precision and is inserted
Value processing, obtains corresponding object reference frame;
The coded data is decoded according to the object reference frame, obtains the corresponding reconstruction view of the video frame to be decoded
Frequency frame.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811311217.9A CN109618168A (en) | 2018-11-06 | 2018-11-06 | It is a kind of based on divide pixel value difference handle video encoding/decoding method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811311217.9A CN109618168A (en) | 2018-11-06 | 2018-11-06 | It is a kind of based on divide pixel value difference handle video encoding/decoding method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109618168A true CN109618168A (en) | 2019-04-12 |
Family
ID=66002552
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811311217.9A Pending CN109618168A (en) | 2018-11-06 | 2018-11-06 | It is a kind of based on divide pixel value difference handle video encoding/decoding method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109618168A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110636288A (en) * | 2019-09-27 | 2019-12-31 | 腾讯科技(深圳)有限公司 | Video decoding method, video encoding method, video decoding device, video encoding device and electronic equipment |
CN110677676A (en) * | 2019-09-27 | 2020-01-10 | 腾讯科技(深圳)有限公司 | Video encoding method and apparatus, video decoding method and apparatus, and storage medium |
-
2018
- 2018-11-06 CN CN201811311217.9A patent/CN109618168A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110636288A (en) * | 2019-09-27 | 2019-12-31 | 腾讯科技(深圳)有限公司 | Video decoding method, video encoding method, video decoding device, video encoding device and electronic equipment |
CN110677676A (en) * | 2019-09-27 | 2020-01-10 | 腾讯科技(深圳)有限公司 | Video encoding method and apparatus, video decoding method and apparatus, and storage medium |
CN110636288B (en) * | 2019-09-27 | 2023-11-14 | 腾讯科技(深圳)有限公司 | Video decoding and encoding method and device and electronic equipment |
CN110677676B (en) * | 2019-09-27 | 2024-02-09 | 腾讯科技(深圳)有限公司 | Video encoding method and apparatus, video decoding method and apparatus, and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
DE69224250T2 (en) | Derivation and use of motion vectors in a differential pulse code modulation system | |
CN102217314B (en) | The method and apparatus deleted for video image | |
US8416849B2 (en) | Self-adapting code rate distribution method of video image macro-block level | |
DE69904749T2 (en) | VIDEO CODING WITH MOTION COMPENSATION AND CHOLESKY FACTORIZATION | |
CN107925772A (en) | The apparatus and method that video motion compensation is carried out using optional interpolation filter | |
CN108833916A (en) | Video coding, coding/decoding method, device, storage medium and computer equipment | |
DE10253383B4 (en) | Method and apparatus for encoding moving pictures with fixed computational complexity | |
CN108848381A (en) | Method for video coding, coding/decoding method, device, computer equipment and storage medium | |
CN103621083A (en) | Image encoding device, image decoding device, image encoding method, and image decoding method | |
CN108769682A (en) | Video coding, coding/decoding method, device, computer equipment and storage medium | |
CN109495746A (en) | A kind of method for video coding based on motion vector adjustment | |
CN106878737B (en) | Estimation accelerated method in efficient video coding | |
CN109618159A (en) | A kind of self-adaptive encoding method based on resolution ratio corresponding relationship | |
CN109600615A (en) | A method of video is decoded based on motion information | |
CN109618160A (en) | A kind of method for video coding calculated based on motion information and residual information | |
JP2011124846A (en) | Image encoding device | |
CN109618168A (en) | It is a kind of based on divide pixel value difference handle video encoding/decoding method | |
CN106572352B (en) | A kind of key frame sign control method and device | |
CN108141602A (en) | video motion compensation device and method | |
CN108769696A (en) | A kind of DVC-HEVC video transcoding methods based on Fisher discriminates | |
CN111741300A (en) | Video processing method | |
CN109618154A (en) | A kind of video frame coding/decoding method | |
CN106331706B (en) | Rate-distortion optimization method based on curve matching and the device using this method | |
DE60113358T2 (en) | Encoders, decoders and corresponding methods for orientation interpolation node data | |
CN109660804A (en) | A kind of video frame coding/decoding method based on model selection |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20190412 |