CN106993187B - A kind of coding method of variable frame rate and device - Google Patents
A kind of coding method of variable frame rate and device Download PDFInfo
- Publication number
- CN106993187B CN106993187B CN201710223318.XA CN201710223318A CN106993187B CN 106993187 B CN106993187 B CN 106993187B CN 201710223318 A CN201710223318 A CN 201710223318A CN 106993187 B CN106993187 B CN 106993187B
- Authority
- CN
- China
- Prior art keywords
- macro block
- current coding
- mode
- coding macro
- block
- 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
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/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/146—Data rate or code amount at the encoder output
-
- 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/103—Selection of coding mode or of prediction mode
-
- 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/103—Selection of coding mode or of prediction mode
- H04N19/105—Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
-
- 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/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/136—Incoming video signal characteristics or properties
- H04N19/137—Motion inside a coding unit, e.g. average field, frame or block difference
-
- 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/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/157—Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
- H04N19/159—Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
-
- 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/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/17—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
-
- 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/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/17—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
- H04N19/172—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a picture, frame or field
-
- 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/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/17—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
- H04N19/176—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
-
- 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/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/186—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
-
- 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/507—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction using conditional replenishment
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The present invention provides coding method and the device of a kind of variable frame rate, is applied to video encoder, this method comprises: obtaining current coding macro block;Judge whether current coding macro block is located at stagnant zone, if current coding macro block is located at stagnant zone, current coding macro block is encoded in the way of the first pre-arranged code.If current coding macro block is located at moving region, current coding macro block is encoded in the way of the second pre-arranged code.The device includes: that coded macroblocks obtains module, obtains current coding macro block;Region decision module, judges whether current coding macro block is located at stagnant zone;Stagnant zone coding module encodes current coding macro block in the way of the first pre-arranged code if current coding macro block is located at stagnant zone;Moving region coding module encodes current coding macro block in the way of the second pre-arranged code if current coding macro block is located at moving region.Energy consumption can be reduced using the present invention, improve code efficiency.
Description
Technical field
The present invention relates to video encoding technique fields, specifically, being related to a kind of coding method of variable frame rate, Yi Jiying
With the device of this method.
Background technique
Widely available with HD video, the specialization of Video Applications proposes increasingly higher demands to coding.?
The resolution ratio of monitoring field, video is higher and higher, and the demand based on transmission bandwidth and storage, the compression ratio of video are also stringent
It is required that therefore, the coding quality and compression ratio for improving monitor video are at manifest need.For Video coding processing, figure
Image-to-frame ratio is higher, and encoder bit rate is higher, how according to video image data feature and transmission bandwidth, flexibly changes encoded image frame
Rate can effectively control video frequency coding rate.
In video surveillance applications, coding scene often has that background is largely static and the case where foreground object moves,
And foreground moving object is only in place of area-of-interest.Therefore, the characteristics of efficiently using monitoring scene stationary background, reduction is not felt
Video coding compression ratio can be substantially improved in the encoder bit rate in interest region.And in existing variable frame rate implementation, usually
It is the angle controlled from code rate, the whole frame per second variation for controlling coded frame does not have image content-based also, from the angle of macroblock coding
The method that degree changes frame per second.
Summary of the invention
The main object of the present invention is to provide a kind of coding method of variable frame rate for reducing energy consumption, improving code efficiency.
It is a further object of the present invention to provide a kind of reduction energy consumptions, the code device for the variable frame rate for improving code efficiency.
In order to achieve the above-mentioned main objectives, the coding method of variable frame rate provided by the invention is applied to video encoder,
This method comprises: obtaining current coding macro block;Judge whether current coding macro block is located at stagnant zone, if current coding macro block position
When stagnant zone, current coding macro block is encoded in the way of the first pre-arranged code;If current coding macro block is located at fortune
When dynamic region, current coding macro block is encoded in the way of the second pre-arranged code.
As above scheme as it can be seen that the coding method of variable frame rate of the present invention is by judging region locating for current coding macro block
Whether be stagnant zone, if current coding macro block is located at stagnant zone (i.e. background area), by the way of fast coding into
Row coding, if current coding macro block is located at moving region, using the second pre-arranged code mode, as HEVC/H.265 standard,
The traditional codes mode such as AVC/H.264 standard, guarantees the coding quality of moving region, uses traditional code relative to full frame image
Mode is encoded, and is encoded by the way of fast coding to the coded macroblocks of stagnant zone, can be accelerated static in image
The coding rate in region, to improve code efficiency.
In further embodiment, current coding macro block is encoded in the way of the first pre-arranged code, comprising: selection is worked as
The coding mode of preceding coded macroblocks;The processing of reconstructed frame is carried out to current coding macro block.
It can be seen that relative to existing coding method, for example, HEVC/H.265 standard or AVC/H.264 standard carry out
When coded treatment, to coded macroblocks take prediction, transformation, quantization, loop filtering and entropy coding and etc. a whole set of processing side
Method is encoded the coded macroblocks of background area using the first pre-arranged code mode, processing step can be made to significantly simplify, thus
Reduce hardware power consumption.
In further embodiment, the coding mode of current coding macro block is selected, comprising: set the macroblock mode of predicting unit
For 2N × 2N mode;The motion vector of current coding macro block is set to 0, and obtains and is moved with the immediate optimum prediction of null vector
Vector;The Merge Candidate Set for obtaining current coding macro block, selects the smallest one group of Merge candidate of Merge candidate index as most
Excellent Merge is candidate;The quantization parameter of the quantization parameter of the brightness of current coding macro block and coloration is all set to 0, and by brightness
The corresponding quantization parameter mark of quantization parameter of quantization parameter and coloration be set to 0;Current coding macro block is set to Merge prediction
Mode, so that current coding macro block is encoded to Skip prediction mode.
It can be seen that do not make estimation and piecemeal processing when the coding mode to current coding macro block selects,
Computation complexity is greatly reduced, meanwhile, this programme application HEVC/H.265 standard code, the macroblock mode of predicting unit is set to 2N
× 2N mode, and priority encoding is Merge prediction mode, and coded macroblocks may make to be easier to be encoded to Skip prediction mode, is saved
Code rate.The motion vector of current coding macro block is set to 0, meanwhile, guarantee the quantization parameter of current coding macro block all 0, it can
Number of coded bits is greatly reduced, improves compression ratio.
In further embodiment, the coding mode of current coding macro block is selected, comprising: set the macroblock mode of predicting unit
For the mode of Inter16 × 16;The motion vector of current coding macro block is set to 0, and is obtained immediate optimal pre- with null vector
Survey motion vector;The quantization parameter of the quantization parameter of the brightness of current coding macro block and coloration is all set to 0, and by brightness
Quantization parameter and the corresponding quantization parameter mark of the quantization parameter of coloration are set to 0;Current coding macro block is set to Skip prediction mould
Formula.
By above scheme as it can be seen that this programme application AVC/H.264 standard code, the macroblock mode of predicting unit are set to
The mode of Inter16 × 16, and the motion vector of current coding macro block is set to 0, meanwhile, guarantee the quantization system of current coding macro block
Number all 0 may make coded macroblocks meets to enter Skip prediction mode.
In further embodiment, the processing of reconstructed frame is carried out to current coding macro block, comprising: by the bright of current coding macro block
Degree prediction block data copy in brightness reconstructed block data;The colorimetric prediction block number evidence of current coding macro block is copied into color heavy
Block number is built in.
It can be seen that the motion vector of current coding macro block is set to 0 and after residual error is also configured as 0, it is ensured that reconstructed block
Data are identical with prediction block data, therefore, prediction block data can directly be replicated to the reconstructed block data as reconstructed frame, section
Save the scramble time.
In order to achieve the above-mentioned another object, the code device of variable frame rate provided by the invention is applied to video encoder,
The device includes: that coded macroblocks obtains module, obtains current coding macro block;Region decision module judges that current coding macro block is
It is no to be located at stagnant zone;Stagnant zone coding module utilizes the first pre-arranged code if current coding macro block is located at stagnant zone
Mode encodes current coding macro block;Moving region coding module utilizes if current coding macro block is located at moving region
Second pre-arranged code mode encodes current coding macro block.
As above scheme as it can be seen that the code device of variable frame rate of the present invention is by judging region locating for current coding macro block
Whether be stagnant zone, if current coding macro block is located at stagnant zone (i.e. background area), by the way of fast coding into
Row coding, if current coding macro block is located at moving region, using the second pre-arranged code mode, as HEVC/H.265 standard,
AVC/H.264 standard etc. guarantees the coding quality of moving region, is carried out relative to full frame image using the second pre-arranged code mode
Coding, the coded macroblocks of stagnant zone is encoded by the way of fast coding, can accelerate the volume of stagnant zone in image
Code speed, to improve code efficiency.
Detailed description of the invention
Fig. 1 is the flow chart of the coding method first embodiment of variable frame rate of the present invention.
Fig. 2 be in the coding method first embodiment of variable frame rate of the present invention in the way of the first pre-arranged code to current
The flow chart of coded macroblocks progress coding step.
Fig. 3 is the flow chart of the coding method second embodiment of variable frame rate of the present invention.
Fig. 4 be in the coding method second embodiment of variable frame rate of the present invention in the way of the first pre-arranged code to current
The flow chart of coded macroblocks progress coding step.
Fig. 5 is the structural block diagram of the code device first embodiment of variable frame rate of the present invention.
Fig. 6 is the structural block diagram of the code device second embodiment of variable frame rate of the present invention.
The invention will be further described with reference to the accompanying drawings and embodiments.
Specific embodiment
The coding method of variable frame rate of the present invention is applied in video encoder, for view received in video encoder
Frequency image data is encoded, and can use different coding modes to stagnant zone and moving region, high coding efficiency reduces function
Consumption.
The coding method first embodiment of variable frame rate:
As shown in Figure 1, the coding method of variable frame rate carries out coded treatment with HEVC/H.265 standard in the present embodiment.
After video encoder obtains video image data, when being encoded, step S1 is first carried out, obtains current coding macro block.
Encoder is encoded in a manner of block of pixels in coding, and current coding macro block refers to be compiled in current frame image
The block of pixels of code.
After obtaining current coding macro block, step S2 is executed, judges whether current coding macro block is located at stagnant zone.One frame figure
As that can be divided into moving region (i.e. foreground area) and stagnant zone (i.e. background area), the division in region can pass through existing intelligence
Energy video analysis and identification technology obtain stagnant zone and the moving region of coding scene.Intelligent video analysis and identification technology
Refer to the technology for being identified, detected, analyzing and being handled to video image picture by machine learning or intellectual analysis,
It in the present invention, refers mainly to do position mark to moving target in video image picture, and the related skill of motion region coordinates is provided
Art.By judging the coordinate information of current coding macro block, it can determine whether out whether current coding macro block is located at stagnant zone.
If judge that current coding macro block is located at stagnant zone, step S3 is executed, to working as in the way of the first pre-arranged code
Preceding coded macroblocks is encoded.Referring to fig. 2, the step of current coding macro block being encoded in the way of the first pre-arranged code packet
Include: step S31 selects the coding mode of current coding macro block;Step S32 carries out the processing of reconstructed frame to current coding macro block.
When encoding in the way of the first pre-arranged code to current coding macro block, step S31 is first carried out, the step packet
It includes: the macroblock mode of predicting unit is set to 2N × 2N mode;The motion vector of current coding macro block is set to 0, and obtain with
The immediate optimum prediction motion vector of null vector;The Merge Candidate Set of current coding macro block is obtained, Merge candidate rope is selected
It is candidate as optimal Merge to draw the smallest one group of Merge candidate;By the quantization parameter of the brightness of current coding macro block and coloration
Quantization parameter is all set to 0, and the corresponding quantization parameter mark of the quantization parameter of the quantization parameter of brightness and coloration is set to 0;
Current coding macro block is set to Merge prediction mode, so that current coding macro block is encoded to Skip prediction mode.
In HEVC/H.265 standard, the macroblock mode of predicting unit include 2N × 2N, 2N × N, N × 2N, N × N, 2N ×
NU, 2N × nD, nL × 2N and nR × 2N isotype.The macroblock mode of predicting unit is set to 2N × 2N mode, such as 64 × 64 moulds
Formula, 32 × 32 modes, 16 × 16 modes or 8 × 8 mode isotypes may make that by current coding macro block priority encoding be Merge
Prediction mode.
The motion vector of current coding macro block is set to 0, and obtains the predicted motion vector Candidate Set of current coding macro block,
It is chosen with the immediate predicted motion vector of null vector according to predicted motion vector Candidate Set as optimum prediction motion vector.Choosing
When taking predicted motion vector immediate with null vector, according to the vertical component of predicted motion vector and horizontal component respectively with zero
The respective components of vector seek absolute difference and (SAD), and absolute difference and the smallest motion vector and null vector are closest
Predicted motion vector is optimum prediction motion vector.In the present embodiment, according to traditional advanced motion vector forecasting technology
(AMVP) seek the predicted motion vector Candidate Set of current macro, that is, using space, on the time motion vector correlation, point
Airspace candidate list and time domain candidate list are not established, then optimum prediction motion vector is chosen from candidate list.
When obtaining the Merge Candidate Set of current coding macro block, by traditional Merge processing technique, (i.e. Merge is predicted
Mode), Merge processing technique estimates the fortune of macro block in current prediction unit using the motion information of macro block in neighboring prediction unit
Dynamic information, encoder select optimal movement letter from the Candidate Set being made of the macro block of time-space domain neighboring prediction unit
Breath.In the present embodiment, it is equal to 0 if there is one group of candidate motion vector, and its reference frame index is equal to current macro
Reference frame index then selects the smallest one group candidate motion vector of Merge candidate index candidate as optimal Merge.
In order to reduce number of coded bits, compression ratio is improved, by the amount of the quantization parameter of current coding macro block brightness and coloration
Change coefficient and be all set to 0, and the corresponding quantization parameter mark of the quantization parameter of the quantization parameter of brightness and coloration is set to
0.Residual error coefficient is also all set to 0, only encodes a small amount of prediction syntactic element, so that the processing step of stagnant zone macro block is big
Width simplifies, and reduces hardware power consumption.
In HEVC/H.265 standard, if the prediction mode of coded macroblocks is Merge prediction mode, point of predicting unit
Block mode is 2N × 2N mode, quantization parameter 0, while current coding mode is not free of losses coding mode, then will encode macro
The prediction mode of block is set to Skip prediction mode.Therefore, current coding macro block is set to Merge prediction mode, it can be convenient for current
Coded macroblocks is encoded to Skip prediction mode.
After the coding mode for selecting current coding macro block, step S32 is executed, the place of reconstructed frame is carried out to current coding macro block
Reason.The step includes: to copy to the luma prediction block number evidence of current coding macro block in brightness reconstructed block data;By present encoding
The colorimetric prediction block number of macro block rebuilds block number according to coloration is copied to.
After the motion vector of current coding macro block is set to 0, it is ensured that current frame video image rebuilds block number when rebuilding
According to identical with prediction block data.It therefore can be by the luma prediction block number evidence of current coding macro block and colorimetric prediction block number according to multiple
It makes in reconstructed block data, to terminate the data processing of current coding macro block.
Step S2 is being executed, when judging whether current coding macro block is located at stagnant zone, if judging current coding macro block position
In moving region, S4 is thened follow the steps, current coding macro block is encoded in the way of the second pre-arranged code.The present embodiment
In, the second pre-arranged code mode be to coded macroblocks take prediction, transformation, quantization, loop filtering and entropy coding and etc. into
Capable code processing method can ensure the coding quality of moving region.
The coding method second embodiment of variable frame rate:
As shown in figure 3, in the present embodiment, the coding method application AVC/H.264 standard code of variable frame rate of the present invention.Depending on
After frequency encoder obtains video image data, when being encoded, step S10 is first carried out, obtains current coding macro block.It compiles
Code device is encoded in a manner of block of pixels in coding, and current coding macro block refers to be encoded in current frame image
Block of pixels.
After obtaining current coding macro block, step S20 is executed, judges whether current coding macro block is located at stagnant zone.One frame
Image can be divided into moving region (i.e. foreground area) and stagnant zone (i.e. background area).The division in region can be by existing
Intelligent video analysis and identification technology obtain stagnant zone and the moving region of coding scene.Intelligent video analysis and identification skill
Art refers to the technology for being identified, detected, analyzing and being handled to video image picture by machine learning or intellectual analysis,
In the present invention, it refers mainly to do position mark to moving target in video image picture, and the correlation of motion region coordinates is provided
Technology.By judging the coordinate information of current coding macro block, it can determine whether out whether current coding macro block is located at stagnant zone.
If judge that current coding macro block is located at stagnant zone, step S30 is executed, to working as in the way of the first pre-arranged code
Preceding coded macroblocks is encoded.Referring to fig. 4, the step of current coding macro block being encoded in the way of the first pre-arranged code packet
Include: step S310 selects the coding mode of current coding macro block;Step S320 carries out the place of reconstructed frame to current coding macro block
Reason.
When encoding in the way of the first pre-arranged code to current coding macro block, step S310 is first carried out, the step
It include: that the macroblock mode of predicting unit is set into the mode of Inter16 × 16;The motion vector of current coding macro block is set to 0, and is obtained
It takes and the immediate optimum prediction motion vector of null vector;By the quantization of the quantization parameter of the brightness of current coding macro block and coloration
Coefficient is all set to 0, and the corresponding quantization parameter mark of the quantization parameter of the quantization parameter of brightness and coloration is set to 0;It will work as
Preceding coded macroblocks is set to Skip prediction mode.
Unlike HEVC/H.265 standard, advanced motion vector forecasting technology is not present in AVC/H.264 standard
(AMVP), it is therefore desirable to traditional predicted motion vector (PMV) acquiring method is changed into, for example, mould can be tested using AVC official
Processing method in type (JM).When choosing predicted motion vector immediate with null vector, according to the vertical of predicted motion vector
Component and horizontal component carry out seeking respectively with the respective components of null vector absolute difference and (SAD), absolute difference and the smallest
Motion vector and null vector closest to predicted motion vector be optimum prediction motion vector.In addition, not deposited in AVC/H.264 standard
In traditional Merge processing technique, therefore, it is necessary to be encoded according to the inter-frame forecast mode in AVC/H.264 standard.
In AVC/H.264 standard, if the prediction mode of coded macroblocks is inter-frame forecast mode, the piecemeal of predicting unit
Mode is the mode of Inter16 × 16, and the motion vector of coded macroblocks is set to 0, while the reference frame index of current coding macro block is 0
When, then the prediction mode of coded macroblocks is set to Skip prediction mode.
After the coding mode for selecting current coding macro block, step S320 is executed, reconstructed frame is carried out to current coding macro block
Processing.The step includes: to copy to the luma prediction block number evidence of current coding macro block in brightness reconstructed block data;It will currently compile
The colorimetric prediction block number of decoding macroblock rebuilds block number according to coloration is copied to.
After the motion vector of current coding macro block is set to 0, it is ensured that current frame video image rebuilds block number when rebuilding
According to identical with prediction block data.It therefore can be by the luma prediction block number evidence of current coding macro block and colorimetric prediction block number according to multiple
It makes in reconstructed block data, to terminate the data processing of current coding macro block.
Step S20 is being executed, when judging whether current coding macro block is located at stagnant zone, if judging current coding macro block position
In moving region, S40 is thened follow the steps, current coding macro block is encoded in the way of the second pre-arranged code.The present embodiment
In, the second pre-arranged code mode be to coded macroblocks take prediction, transformation, quantization, loop filtering and entropy coding and etc. into
Capable code processing method can ensure the coding quality of moving region.
The code device first embodiment of variable frame rate:
As shown in figure 5, the code device of variable frame rate includes that coded macroblocks obtains module 1, region decision in the present embodiment
Module 2, stagnant zone coding module 3 and moving region coding module 4.
Coded macroblocks obtains module 1 for obtaining current coding macro block.Video encoder is in coding with the side of block of pixels
Formula is encoded, and current coding macro block refers to the block of pixels encoded in current frame image.
Region decision module 2 is for judging whether current coding macro block is located at stagnant zone.One frame image can be divided into fortune
Dynamic region (i.e. foreground area) and stagnant zone (i.e. background area), the division in region can by existing intelligent video analysis and
Identification technology obtains stagnant zone and the moving region of coding scene.Intelligent video analysis and identification technology refer to passing through machine
Device study or intellectual analysis, the technology that video image picture is identified, detect, analyze and is handled, in the present invention, mainly
Finger does position mark to moving target in video image picture, and provides the relevant technologies of motion region coordinates.Worked as by judgement
The coordinate information of preceding coded macroblocks, can determine whether out whether current coding macro block is located at stagnant zone.
If stagnant zone coding module 3 is for utilizing the first default volume when judging that current coding macro block is located at stagnant zone
Code mode encodes current coding macro block.Wherein, stagnant zone coding module 3 includes coding mode selecting module 31 and again
Model block 32.
Coding mode selecting module 31 is used to select the coding mode of current coding macro block.Coding mode selecting module 31 is selected
Select the coding mode of current coding macro block, comprising: the macroblock mode of predicting unit is set to 2N × 2N mode, such as 64 × 64 moulds
Formula, 32 × 32 modes, 16 × 16 modes or 8 × 8 mode isotypes, and obtain with the immediate optimum prediction of null vector move to
Amount;The motion vector of current coding macro block is set to 0;The Merge Candidate Set of current coding macro block is obtained, selects Merge candidate
It is candidate as optimal Merge to index the smallest one group of Merge candidate;By the quantization parameter and coloration of the brightness of current coding macro block
Quantization parameter be all set to 0, and the corresponding quantization parameter mark of the quantization parameter of the quantization parameter of brightness and coloration is set to
0;Current coding macro block is set to Merge prediction mode, so that current coding macro block is encoded to Skip prediction mode.
The motion vector of current coding macro block is set to 0, and obtains the predicted motion vector Candidate Set of current coding macro block,
It is chosen with the immediate predicted motion vector of null vector according to predicted motion vector Candidate Set as optimum prediction motion vector.Choosing
When taking predicted motion vector immediate with null vector, according to the vertical component of predicted motion vector and horizontal component respectively with zero
The respective components of vector seek absolute difference and (SAD), and absolute difference and the smallest motion vector and null vector are closest
Predicted motion vector is optimum prediction motion vector.In the present embodiment, according to traditional advanced motion vector forecasting technology
(AMVP) seek the predicted motion vector Candidate Set of current macro, that is, using space, on the time motion vector correlation, point
Airspace candidate list and time domain candidate list are not established, then optimum prediction motion vector is chosen from candidate list.
When obtaining the Merge Candidate Set of current coding macro block, by traditional Merge processing technique, (i.e. Merge is predicted
Mode), Merge processing technique estimates the fortune of macro block in current prediction unit using the motion information of macro block in neighboring prediction unit
Dynamic information, encoder select optimal movement letter from the Candidate Set being made of the macro block of time-space domain neighboring prediction unit
Breath.In the present embodiment, it is equal to 0 if there is one group of candidate motion vector, and its reference frame index is equal to current macro
Reference frame index then selects the smallest one group candidate motion vector of Merge candidate index candidate as optimal Merge.
The quantization parameter of the quantization parameter of current coding macro block brightness and coloration is all set to 0, and by the quantization of brightness
Coefficient and the corresponding quantization parameter mark of the quantization parameter of coloration are set to 0.Residual error coefficient is also all set to 0, is only encoded
A small amount of prediction syntactic element reduces hardware power consumption so that the processing step of stagnant zone macro block significantly simplifies.
Rebuild the processing that module 32 is used to carry out current coding macro block reconstructed frame.Module 32 is rebuild to current coding macro block
Carry out the processing of reconstructed frame, comprising: copy to the luma prediction block number evidence of current coding macro block in brightness reconstructed block data;It will
The colorimetric prediction block number of current coding macro block rebuilds block number according to coloration is copied to.
If moving region coding module 4 is for utilizing the second default volume when judging that current coding macro block is located at moving region
Code mode encodes current coding macro block.In the present embodiment, the second pre-arranged code mode be to coded macroblocks take prediction,
Transformation, quantization, loop filtering and entropy coding and etc. progress code processing method, can ensure the coding matter of moving region
Amount.
The code device second embodiment of variable frame rate:
As shown in fig. 6, the code device of variable frame rate includes that coded macroblocks obtains module 5, region decision in the present embodiment
Module 6, stagnant zone coding module 5 and moving region coding module 6.
Coded macroblocks obtains module 5 for obtaining current coding macro block.Video encoder is in coding with the side of block of pixels
Formula is encoded, and current coding macro block refers to the block of pixels encoded in current frame image.
Region decision module 6 is for judging whether current coding macro block is located at stagnant zone.One frame image can be divided into fortune
Dynamic region (i.e. foreground area) and stagnant zone (i.e. background area), the division in region can by existing intelligent video analysis and
Identification technology obtains stagnant zone and the moving region of coding scene.Intelligent video analysis and identification technology refer to passing through machine
Device study or intellectual analysis, the technology that video image picture is identified, detect, analyze and is handled, in the present invention, mainly
Finger does position mark to moving target in video image picture, and provides the relevant technologies of motion region coordinates.Worked as by judgement
The coordinate information of preceding coded macroblocks, can determine whether out whether current coding macro block is located at stagnant zone.
If stagnant zone coding module 7 is for utilizing the first default volume when judging that current coding macro block is located at stagnant zone
Code mode encodes current coding macro block.Wherein, stagnant zone coding module 7 includes coding mode selecting module 71 and again
Model block 72.
Coding mode selecting module 71 is used to select the coding mode of current coding macro block.Coding mode selecting module 71 is selected
Select the coding mode of current coding macro block, comprising: the macroblock mode of predicting unit is set to the mode of Inter16 × 16;It will be current
The motion vector of coded macroblocks is set to 0, and obtains and the immediate optimum prediction motion vector of null vector;By current coding macro block
The quantization parameter of brightness and the quantization parameter of coloration be all set to 0, and by the quantization parameter of the quantization parameter of brightness and coloration
Corresponding quantization parameter mark is set to 0;Current coding macro block is set to Skip prediction mode.
Unlike HEVC/H.265 standard, advanced motion vector forecasting technology is not present in AVC/H.264 standard
(AMVP), it is therefore desirable to traditional predicted motion vector (PMV) acquiring method is changed into, for example, mould can be tested using AVC official
Processing method in type (JM).When choosing predicted motion vector immediate with null vector, according to the vertical of predicted motion vector
Component and horizontal component carry out seeking respectively with the respective components of null vector absolute difference and (SAD), absolute difference and the smallest
Motion vector and null vector closest to predicted motion vector be optimum prediction motion vector.In addition, not deposited in AVC/H.264 standard
In traditional Merge processing technique, therefore, it is necessary to be encoded according to the inter-frame forecast mode in AVC/H.264 standard.
In AVC/H.264 standard, if the prediction mode of coded macroblocks is inter-frame forecast mode, the piecemeal of predicting unit
Mode is the mode of Inter16 × 16, and the motion vector of coded macroblocks is set to 0, while the reference frame index of current coding macro block is 0
When, then the prediction mode of coded macroblocks is set to Skip prediction mode.
Rebuild the processing that module 72 is used to carry out current coding macro block reconstructed frame.Module 72 is rebuild to current coding macro block
Carry out the processing of reconstructed frame, comprising: copy to the luma prediction block number evidence of current coding macro block in brightness reconstructed block data;It will
The colorimetric prediction block number of current coding macro block rebuilds block number according to coloration is copied to.
If moving region coding module 8 is for utilizing the second default volume when judging that current coding macro block is located at moving region
Code mode encodes current coding macro block.In the present embodiment, the second pre-arranged code mode be to coded macroblocks take prediction,
Transformation, quantization, loop filtering and entropy coding and etc. progress code processing method, can ensure the coding matter of moving region
Amount.
It can be seen from the above, the present invention, which passes through, judges whether region locating for current coding macro block is stagnant zone, if currently
It when coded macroblocks is located at stagnant zone (i.e. background area), is encoded by the way of fast coding, if current coding macro block
Positioned at moving region, then the second pre-arranged code mode, such as HEVC/H.265 standard, AVC/H.264 standard traditional code are used
Mode guarantees the coding quality of moving region, is encoded relative to full frame image using traditional code mode, to stagnant zone
Coded macroblocks encoded by the way of fast coding, the coding rate of stagnant zone in image can be accelerated, to improve
Code efficiency.
It should be noted that the above is only a preferred embodiment of the present invention, but the design concept invented is not limited thereto,
All insubstantial modifications made using this design to the present invention, are also fallen within the scope of protection of the present invention.
Claims (8)
1. a kind of coding method of variable frame rate is applied to video encoder characterized by comprising
Obtain current coding macro block;
Judge whether the current coding macro block is located at stagnant zone, if the current coding macro block is located at stagnant zone, benefit
The current coding macro block is encoded with the first pre-arranged code mode;
If the current coding macro block is located at moving region, in the way of the second pre-arranged code to the current coding macro block into
Row coding;
Wherein, described that the current coding macro block is encoded in the way of the first pre-arranged code, comprising: selection is described current
The coding mode of coded macroblocks;The processing of reconstructed frame is carried out to the current coding macro block;
Wherein, the coding mode of the selection current coding macro block, comprising: by the motion vector of the current coding macro block
It is set to 0, and is obtained and the immediate optimum prediction motion vector of null vector;By the quantization system of the brightness of the current coding macro block
Several and coloration quantization parameter is all set to 0, and the quantization parameter of the quantization parameter of the brightness and the coloration is corresponding
Quantization parameter mark is set to 0.
2. the coding method of variable frame rate according to claim 1, which is characterized in that the selection present encoding is macro
The coding mode of block, further includes:
The macroblock mode of predicting unit is set to 2N × 2N mode;
The Merge Candidate Set of the current coding macro block is obtained, the smallest one group of Merge candidate of Merge candidate index is selected to make
It is candidate for optimal Merge;
The current coding macro block is set to Merge prediction mode, so that the current coding macro block is encoded to Skip prediction mould
Formula.
3. the coding method of variable frame rate according to claim 1, which is characterized in that the selection present encoding is macro
The coding mode of block, further includes:
The macroblock mode of predicting unit is set to the mode of Inter16 × 16;
The current coding macro block is set to Skip prediction mode.
4. the coding method of variable frame rate according to claim 2 or 3, which is characterized in that described to the present encoding
The processing of macro block progress reconstructed frame, comprising:
The luma prediction block number evidence of the current coding macro block is copied in brightness reconstructed block data;
The colorimetric prediction block number of the current coding macro block is rebuild into block number according to coloration is copied to.
5. a kind of code device of variable frame rate is applied to video encoder characterized by comprising
Coded macroblocks obtains module, obtains current coding macro block;
Region decision module, judges whether the current coding macro block is located at stagnant zone;
Stagnant zone coding module, if the current coding macro block is located at stagnant zone, in the way of the first pre-arranged code pair
The current coding macro block is encoded;
Moving region coding module, if the current coding macro block is located at moving region, in the way of the second pre-arranged code pair
The current coding macro block is encoded;
Wherein, institute's stagnant zone coding module, which is stated, encodes the current coding macro block in the way of the first pre-arranged code,
Include: coding mode selecting module, selects the coding mode of the current coding macro block;Module is rebuild, to the present encoding
The processing of macro block progress reconstructed frame;
Wherein, the coding mode selecting module selects the coding mode of the current coding macro block, comprising: by the current volume
The motion vector of decoding macroblock is set to 0, and obtains and the immediate optimum prediction motion vector of null vector;The present encoding is macro
The quantization parameter of the brightness of block and the quantization parameter of coloration are all set to 0, and by the quantization parameter of the brightness and the coloration
The corresponding quantization parameter mark of quantization parameter be set to 0.
6. the code device of variable frame rate according to claim 5, which is characterized in that the coding mode selecting module choosing
Select the coding mode of the current coding macro block, further includes:
The macroblock mode of predicting unit is set to 2N × 2N mode;
The Merge Candidate Set of the current coding macro block is obtained, the smallest one group of Merge candidate of Merge candidate index is selected to make
It is candidate for optimal Merge;
The current coding macro block is set to Merge prediction mode, so that the current coding macro block is encoded to Skip prediction mould
Formula.
7. the code device of variable frame rate according to claim 5, which is characterized in that the coding mode selecting module choosing
Select the coding mode of the current coding macro block, further includes:
The macroblock mode of predicting unit is set to the mode of Inter16 × 16;
The current coding macro block is set to Skip prediction mode.
8. the code device of variable frame rate according to claim 6 or 7, which is characterized in that the reconstruction module is to described
The processing of current coding macro block progress reconstructed frame, comprising:
The luma prediction block number evidence of the current coding macro block is copied in brightness reconstructed block data;
The colorimetric prediction block number of the current coding macro block is rebuild into block number according to coloration is copied to.
Priority Applications (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710223318.XA CN106993187B (en) | 2017-04-07 | 2017-04-07 | A kind of coding method of variable frame rate and device |
EP18780319.2A EP3595306A4 (en) | 2017-04-07 | 2018-01-31 | Variable frame rate encoding method and device, computer device and computer readable storage medium |
PCT/CN2018/074759 WO2018184417A1 (en) | 2017-04-07 | 2018-01-31 | Variable frame rate encoding method and device, computer device and computer readable storage medium |
US16/500,920 US10742989B2 (en) | 2017-04-07 | 2018-01-31 | Variable frame rate encoding method and device based on a still area or a motion area |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710223318.XA CN106993187B (en) | 2017-04-07 | 2017-04-07 | A kind of coding method of variable frame rate and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106993187A CN106993187A (en) | 2017-07-28 |
CN106993187B true CN106993187B (en) | 2019-09-06 |
Family
ID=59414917
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710223318.XA Active CN106993187B (en) | 2017-04-07 | 2017-04-07 | A kind of coding method of variable frame rate and device |
Country Status (4)
Country | Link |
---|---|
US (1) | US10742989B2 (en) |
EP (1) | EP3595306A4 (en) |
CN (1) | CN106993187B (en) |
WO (1) | WO2018184417A1 (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2017137444A1 (en) | 2016-02-09 | 2017-08-17 | Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. | Concept for picture/video data streams allowing efficient reducibility or efficient random access |
CN106993187B (en) | 2017-04-07 | 2019-09-06 | 珠海全志科技股份有限公司 | A kind of coding method of variable frame rate and device |
CN110312133B (en) * | 2019-06-27 | 2021-11-23 | 西安万像电子科技有限公司 | Image processing method and device |
CN112312134B (en) * | 2019-08-01 | 2023-03-24 | 杭州海康威视数字技术股份有限公司 | Encoding method, encoding device, electronic equipment and readable storage medium |
KR20210147596A (en) * | 2020-05-29 | 2021-12-07 | 에스케이플래닛 주식회사 | Method and apparatus for providing cloud streaming service |
CN117376571A (en) * | 2022-06-30 | 2024-01-09 | 深圳市中兴微电子技术有限公司 | Image processing method, electronic device, and computer storage medium |
CN117544740A (en) * | 2022-07-28 | 2024-02-09 | 北京字跳网络技术有限公司 | Video recording method, apparatus, device, storage medium, and program product |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102104714A (en) * | 2009-12-15 | 2011-06-22 | 铜陵市维新投资咨询有限公司 | Image denoising and encoding method |
CN103430546A (en) * | 2011-03-09 | 2013-12-04 | 日本电信电话株式会社 | Video encoding device, video encoding method and video encoding program |
CN105940677A (en) * | 2014-01-30 | 2016-09-14 | 高通股份有限公司 | Low complexity sample adaptive offset encoding |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101467875B1 (en) * | 2008-09-04 | 2014-12-02 | 삼성전자주식회사 | Digital camera for varying frame rate and the controlling method thereof |
US9872028B2 (en) * | 2015-06-26 | 2018-01-16 | Intel Corporation | Wireless display adaptations and optimizations based on unfiltered and regional feedback |
CN106993187B (en) | 2017-04-07 | 2019-09-06 | 珠海全志科技股份有限公司 | A kind of coding method of variable frame rate and device |
-
2017
- 2017-04-07 CN CN201710223318.XA patent/CN106993187B/en active Active
-
2018
- 2018-01-31 US US16/500,920 patent/US10742989B2/en active Active
- 2018-01-31 WO PCT/CN2018/074759 patent/WO2018184417A1/en unknown
- 2018-01-31 EP EP18780319.2A patent/EP3595306A4/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102104714A (en) * | 2009-12-15 | 2011-06-22 | 铜陵市维新投资咨询有限公司 | Image denoising and encoding method |
CN103430546A (en) * | 2011-03-09 | 2013-12-04 | 日本电信电话株式会社 | Video encoding device, video encoding method and video encoding program |
CN105940677A (en) * | 2014-01-30 | 2016-09-14 | 高通股份有限公司 | Low complexity sample adaptive offset encoding |
Also Published As
Publication number | Publication date |
---|---|
WO2018184417A1 (en) | 2018-10-11 |
US10742989B2 (en) | 2020-08-11 |
US20200128252A1 (en) | 2020-04-23 |
EP3595306A4 (en) | 2020-08-12 |
CN106993187A (en) | 2017-07-28 |
EP3595306A1 (en) | 2020-01-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106993187B (en) | A kind of coding method of variable frame rate and device | |
Yang et al. | Low-complexity CTU partition structure decision and fast intra mode decision for versatile video coding | |
US9781443B2 (en) | Motion vector encoding/decoding method and device and image encoding/decoding method and device using same | |
RU2654136C2 (en) | Moving image encoding device, moving image decoding device, moving image encoding method and moving image decoding method | |
CN103260031B (en) | Method and apparatus for encoding/decoding to motion vector | |
CN101583036B (en) | Method for determining the relation between movement characteristics and high efficient coding mode in pixel-domain video transcoding | |
CN101431675B (en) | Pixel motion estimating method and apparatus | |
CN103475880B (en) | A kind of based on statistical analysis by H.264 to HEVC low complex degree video transcoding method | |
CN110249628A (en) | For predicting the video encoder and decoder of subregion | |
CN102833532B (en) | For to the method for digital coding video data and digital video encoder system | |
CN101710991A (en) | Fast intra mode prediction for a video encoder | |
CN101888546B (en) | A kind of method of estimation and device | |
CN102047665A (en) | Dynamic image encoding method and dynamic image decoding method | |
CN105141954A (en) | HEVC interframe coding quick mode selection method | |
CN108134939A (en) | A kind of method for estimating and device | |
CN103384325A (en) | Quick inter-frame prediction mode selection method for AVS-M video coding | |
CN102932642A (en) | Interframe coding quick mode selection method | |
Correa et al. | A method for early-splitting of HEVC inter blocks based on decision trees | |
CN104702959B (en) | A kind of intra-frame prediction method and system of Video coding | |
CN101588487A (en) | Video intraframe predictive coding method | |
CN103533349A (en) | Support vector machine-based fast inter-frame prediction macro block mode selection method for B frame | |
CN102984524B (en) | A kind of video coding-decoding method based on block layer decomposition | |
CN100385957C (en) | Kinematic vector predicting method | |
CN113422959A (en) | Video encoding and decoding method and device, electronic equipment and storage medium | |
CN105282557A (en) | H264 rapid movement estimation method for prediction movement vector |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |