CN105120261B - Method and apparatus for generating multi code Rate of Chinese character video - Google Patents
Method and apparatus for generating multi code Rate of Chinese character video Download PDFInfo
- Publication number
- CN105120261B CN105120261B CN201510599663.4A CN201510599663A CN105120261B CN 105120261 B CN105120261 B CN 105120261B CN 201510599663 A CN201510599663 A CN 201510599663A CN 105120261 B CN105120261 B CN 105120261B
- Authority
- CN
- China
- Prior art keywords
- video
- motion vector
- code check
- candidate
- piecemeal
- 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
Abstract
This application discloses the method and apparatus for generating multi code Rate of Chinese character video.One specific implementation mode of the method includes:Obtain the video of input;Estimation is carried out to the video of input based on the first code check, obtains best first motion vector of the video of the first code check and the triple of at least one bit number comprising candidate motion vector, the prediction error of candidate motion vector and candidate motion vector;Best second motion vector of the video of the second code check is estimated based on the second code check and triple;The coding mode of the video of the second code check is determined according to best second motion vector.The embodiment efficiently utilizes the correlation of motion vector between multi code Rate of Chinese character video, improves the coding rate in multi code Rate of Chinese character video generating process.
Description
Technical field
This application involves image communication technology fields, and in particular to the processing technology field of video, it is more particularly, to raw
At the method and apparatus of multi code Rate of Chinese character video.
Background technology
The video data digit that the unit interval transmits when video code rate, i.e. video data transmission.Video code rate is higher, unit
Time, the interior video data digit transmitted was more, and transmission post-processes obtained file just closer original document, transmission of video
Bandwidth occupancy is higher than also.
In net cast and video on-demand system, server end needs to provide the video code flow of a variety of different code checks, with
Adapt to different bandwidth conditions.However, server end needs to consume a large amount of calculating money to reach preferable data compression rate
Source, thus it is limited in the computing resource of system, and server end can not generate the video of multiple code checks in real time, cause
Client needs buffer time to come waiting for server end to encode video, quick, real-time to provide to the user
Video playing service.In the offline trans-coding system of video, the generation of multi code Rate of Chinese character video also consumes a large amount of computing resource, exists
The slow problem of calculating speed.
Invention content
The purpose of the application is to propose that one kind is improved for generating multi code Rate of Chinese character video method and device, more than solving
The technical issues of background technology part is mentioned.
In a first aspect, this application provides a kind of method for generating multi code Rate of Chinese character video, the method includes:It obtains defeated
The video entered;Estimation is carried out to the video of the input based on the first code check, obtains best the of the video of the first code check
One motion vector and at least one include candidate motion vector, the prediction error of the candidate motion vector and the candidate fortune
The triple of the bit number of dynamic vector;The best of the video of second code check is estimated based on the second code check and the triple
Second motion vector;The coding mode of the video of second code check is determined according to best second motion vector.
In some embodiments, described that estimation is carried out to the video of the input based on the first code check, including:To defeated
Each piecemeal of each subframe, determines at least one candidate motion vector in the video entered;Calculate the ratio of the candidate motion vector
Special number and prediction error, obtain the triple of each piecemeal;Determine the quantization parameter of first code check;According to described
The triple of the quantization parameter of one code check and each piecemeal calculates the motion vector rate distortion of each piecemeal
Cost;The triple is traversed, the candidate in the triple of the motion vector rate distortion costs minimum of each piecemeal will be made
Best first motion vector of the motion vector as each piecemeal.
In some embodiments, the video that second code check is estimated based on the second code check and the triple
Best second motion vector, including:Determine the quantization parameter of second code check;Quantization parameter based on second code check with
And the triple of each piecemeal, calculate the motion vector rate distortion generation that piecemeal is corresponded in the video of second code check
Valence;The triple for traversing each piecemeal will make the triple of the motion vector rate distortion costs minimum of the corresponding piecemeal
In best second motion vector of the candidate motion vector as the corresponding piecemeal.
In some embodiments, the volume of the video that second code check is determined according to best second motion vector
Pattern, including:Determine at least one candidate coding pattern of the video of second code check and the candidate coding pattern pair
The quantization parameter answered;Calculate the corresponding distortion parameter of at least one candidate coding pattern and number of coded bits, wherein institute
State the bit number that bit number, the candidate coding pattern that number of coded bits includes the best second motion vector needs need
And the bit number that the corresponding prediction error of best second motion vector needs;It is corresponding based on the candidate coding pattern
Quantization parameter, distortion parameter and number of coded bits calculate in the correspondence subframe of the video of second code check and correspond to piecemeal
Coding mode rate distortion costs;The candidate coding pattern is traversed, it is right in the correspondence subframe of the video of second code check to make
Answer coding mode of the candidate coding pattern of the coding mode rate distortion costs minimum of piecemeal as the corresponding piecemeal.
In some embodiments, the method further includes:Described first yard is determined according to best first motion vector
The coding mode of the video of rate.
In some embodiments, the volume of the video that first code check is determined according to best first motion vector
Pattern, including:Determine at least one candidate coding pattern of the video of first code check and the candidate coding pattern pair
The quantization parameter answered;Calculate the corresponding distortion parameter of at least one candidate coding pattern and number of coded bits, wherein institute
State the bit number that bit number, the candidate coding pattern that number of coded bits includes the best first motion vector needs need
And the bit number that the corresponding prediction error of best first motion vector needs;It is corresponding based on the candidate coding pattern
Quantization parameter, distortion parameter and number of coded bits calculate the coding mould of each piecemeal described in the video of first code check
Formula rate distortion costs;The candidate coding pattern is traversed, the coding of each piecemeal described in the video of first code check will be made
Coding mode of the candidate coding pattern of pattern rate distortion costs minimum as each piecemeal.
In some embodiments, the method further includes:Obtain the resolution ratio and described of the video of first code check
The resolution ratio of the video of two code checks;By the resolution of the resolution ratio of the video of first code check divided by the video of second code check
Rate obtains removing the factor again;And the best of the video of second code check is being estimated based on the second code check and the triple
Before second motion vector, by the candidate motion vector in the triple according to described times except the factor is removed again.
In some embodiments, the method further includes:Best second motion vector is optimized.
In some embodiments, described that best second motion vector is optimized, including:Determine the second code
The motion vector optimization set of piecemeal is corresponded in the video of rate;Calculate all motion vectors in the motion vector optimization set
Corresponding rate distortion costs;By the motion vector of rate distortion costs minimum as an optimization after best second motion vector;
Wherein, the motion vector optimization set includes best second motion vector, and with best second motion vector
Euclidean distance minimum eight motion vectors.
In some embodiments, the method further includes:According to the coding mode of the video of first code check to described
The video of input is encoded, to generate the video of first code check;And the coding of the video according to second code check
Pattern encodes the video of the input, to generate the video of second code check.
In some embodiments, first code check is higher than second code check.
Second aspect, this application provides a kind of device for generating multi code Rate of Chinese character video, described device includes:It obtains single
Member is configured to obtain the video of input;First estimation unit, be configured to based on the first code check to the video of the input into
Row estimation show that at least one includes candidate motion vector, the prediction error of the candidate motion vector and the candidate
Best first motion vector of the video of the triple of the bit number of motion vector and the first code check;Second estimation unit, matches
Set best second motion vector of the video for estimating second code check based on the second code check and the triple;First
Determination unit is configured to determine the coding mode of the video of second code check according to best second motion vector.
In some embodiments, first estimation unit is further configured to:To each subframe in the video of input
Each piecemeal determines at least one candidate motion vector;The bit number and prediction error for calculating the candidate motion vector, obtain
The triple of each piecemeal;Determine the quantization parameter of first code check;According to the quantization parameter of first code check with
And the triple of each piecemeal calculates the motion vector rate distortion costs of each piecemeal;Traverse the ternary
Group will make the candidate motion vector in the triple of the motion vector rate distortion costs minimum of each piecemeal as described every
Best first motion vector of a piecemeal.
In some embodiments, second estimation unit is further configured to:Determine the quantization of second code check
Parameter;The triple of quantization parameter and each piecemeal based on second code check calculates second code check
Video in correspond to the motion vector rate distortion costs of piecemeal;The triple for traversing each piecemeal will make the correspondence point
Candidate motion vector in the triple of the motion vector rate distortion costs minimum of block as the corresponding piecemeal best second
Motion vector.
In some embodiments, first determination unit is further configured to:Determine the video of second code check
At least one candidate coding pattern and the corresponding quantization parameter of the candidate coding pattern;Calculate at least one candidate volume
The corresponding distortion parameter of pattern and number of coded bits, wherein the number of coded bits includes the best second movement arrow
Measure the bit number needed, the bit number that the candidate coding pattern needs and the corresponding prediction of best second motion vector
The bit number that error needs;Based on the corresponding quantization parameter of the candidate coding pattern, distortion parameter and number of coded bits, meter
Calculate the coding mode rate distortion costs that piecemeal is corresponded in the correspondence subframe of the video of second code check;Traverse the candidate code
Pattern will correspond to the candidate of the coding mode rate distortion costs minimum of piecemeal in the correspondence subframe for the video for making second code check
Coding mode of the coding mode as the corresponding piecemeal.
In some embodiments, described device further includes:Second determination unit is configured to according to best first fortune
Dynamic vector determines the coding mode of the video of first code check.
In some embodiments, second determination unit is further configured to:Determine the video of first code check
At least one candidate coding pattern and the corresponding quantization parameter of the candidate coding pattern;Calculate at least one candidate volume
The corresponding distortion parameter of pattern and number of coded bits, wherein the number of coded bits includes the best first movement arrow
Measure the bit number needed, the bit number that the candidate coding pattern needs and the corresponding prediction of best first motion vector
The bit number that error needs;Based on the corresponding quantization parameter of the candidate coding pattern, distortion parameter and number of coded bits, meter
Calculate the coding mode rate distortion costs of each piecemeal described in the video of first code check;The candidate coding pattern is traversed,
The candidate coding pattern of the coding mode rate distortion costs minimum of each piecemeal described in the video of first code check will be made to make
For the coding mode of each piecemeal.
In some embodiments, described device further includes adjustment unit, is configured to:Obtain the video of first code check
Resolution ratio and second code check video resolution ratio;By the resolution ratio of the video of first code check divided by described second
The resolution ratio of the video of code check obtains removing the factor again;And it is based on the second code check and described three in second estimation unit
Before tuple estimates best second motion vector of the video of second code check, by the candidate motion vector in the triple
According to described times except the factor is removed again.
In some embodiments, described device further includes:Optimize unit, is configured to best second motion vector
It optimizes.
In some embodiments, the optimization unit is further configured to:It is right in the video of second code check to determine
Answer the motion vector optimization set of piecemeal;Calculate the corresponding rate distortion of all motion vectors in the motion vector optimization set
Cost;By the motion vector of rate distortion costs minimum as an optimization after best second motion vector;Wherein, the movement
Vector optimization set includes best second motion vector, and minimum with the Euclidean distance of best second motion vector
Eight motion vectors.
In some embodiments, described device further includes coding unit, is configured to:According to the video of first code check
Coding mode the video of the input is encoded, to generate the video of first code check;And according to described second
The coding mode of the video of code check encodes the video of the input, to generate the video of second code check.
In some embodiments, first code check is higher than second code check.
Method and apparatus provided by the present application for generating multi code Rate of Chinese character video, by obtaining the video of input, subsequent base
Estimation is carried out to the video of input in the first code check, is obtained at least one comprising candidate motion vector, the Candidate Motion
Best the first of the video of the triple and the first code check of the prediction error of vector and the bit number of the candidate motion vector
Motion vector estimates best second motion vector of the video of the second code check, finally based on the second code check and triple later
The coding mode that the video of second code check is determined according to best second motion vector, regards to efficiently utilize multi code Rate of Chinese character
The correlation of motion vector between frequency, improves the coding rate in multi code Rate of Chinese character video generating process.
Description of the drawings
Non-limiting embodiment is described in detail with reference to made by the following drawings by reading, other features,
Objects and advantages will become more apparent upon:
Fig. 1 is that this application can be applied to exemplary system architecture figures therein;
Fig. 2 is the flow chart according to one embodiment of the method for generating multi code Rate of Chinese character video of the application;
Fig. 3 a are the schematic diagrames according to a kind of flow chart of data processing for generating multi code Rate of Chinese character video of the application;
Fig. 3 b are the schematic diagrames according to another flow chart of data processing for generating multi code Rate of Chinese character video of the application;
Fig. 4 is the flow chart according to another embodiment of the method for generating multi code Rate of Chinese character video of the application;
Fig. 5 is the structural schematic diagram according to one embodiment of the device for generating multi code Rate of Chinese character video of the application;
Fig. 6 is adapted for the structural representation of the computer system for the terminal device or server of realizing the embodiment of the present application
Figure.
Specific implementation mode
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to
Convenient for description, is illustrated only in attached drawing and invent relevant part with related.
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase
Mutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 is shown can be using the application for generating the method for multi code Rate of Chinese character video or for generating multi code Rate of Chinese character video
Device embodiment exemplary system architecture 100.
As shown in Figure 1, system architecture 100 may include terminal device 101,102,103, network 104 and server 105.
Network 104 between terminal device 101,102,103 and server 105 provide communication link medium.Network 104 can be with
Including various connection types, such as wired, wireless communication link or fiber optic cables etc..
User can be interacted by network 104 with server 105 with using terminal equipment 101,102,103, to receive or send out
Send message etc..The client application of various playable videos can be installed, such as video is straight on terminal device 101,102,103
Broadcast client, video online request client, local video player and the browser etc. for being loaded with video playing application.
Terminal device 101,102,103 can be the various electronic equipments for having display screen and supporting network connection, packet
Include but be not limited to smart mobile phone, smartwatch, tablet computer, E-book reader, MP3 player (Moving Picture
Experts Group Audio Layer III, dynamic image expert's compression standard audio level 3), MP4 (Moving
Picture Experts Group Audio Layer IV, dynamic image expert's compression standard audio level 4) player, knee
Mo(u)ld top half pocket computer and desktop computer etc..
Server 105 can be to provide the server of various services, such as to being played on terminal device 101,102,103
Video provides the background video Play Server that video data supports, Video Coding Server, video decoding server and regards
Frequency transcoding server etc..Video Coding Server can encode video data;Video decoding server can be to receiving
To video data be decoded, to obtain video content;Video code conversion server can convert encoded video code flow
At another video code flow, to adapt to different network bandwidths.Above-mentioned video playing server, Video Coding Server, video
The result of the processing such as inquiry, coding, decoding, transcoding can be fed back to terminal and set by decoding server and video code conversion server
It is standby.
It should be noted that the method for generating multi code Rate of Chinese character video that the embodiment of the present application is provided is generally by server
105 execute, and correspondingly, the device for generating multi code Rate of Chinese character video is generally positioned in server 105.
It should be understood that the number of the terminal device, network and server in Fig. 1 is only schematical.According to realization need
It wants, can have any number of terminal device, network and server.
With continued reference to Fig. 2, one embodiment of the method for generating multi code Rate of Chinese character video according to the application is shown
Flow 200.The method for generating multi code Rate of Chinese character video, includes the following steps:
Step 201, the video of input is obtained.
In the present embodiment, the method for generating multi code Rate of Chinese character video runs electronic equipment thereon (such as shown in Fig. 1
Server) video data of input can be extracted from the video database that it is stored.In practical applications, if the service
Device transmits video data to terminal, then can be by the video data currently transmitted video as input.
In some embodiments, the method for generating multi code Rate of Chinese character video runs electronic equipment (such as Fig. 1 institutes thereon
The server shown) by wired connection mode or radio connection from user the terminal of video playing can be carried out using it
Receive video playing request.Wherein, above-mentioned video playing request includes address or other marks that user it is expected the video played
Know information.In practice, video playing address can be web page interlinkage, generally by uniform resource locator (Uniform
Resource Locator, URL) it indicates, can also be the information such as video name, issuing time, publisher.It is more for generating
The electronic equipment of the method operation of bit-rate video thereon can be asked according to video playing from the database for being stored in server
The video data that the middle video address inquired in being asked with video playing or identification information match, as regarding for the input
Frequently.
It should be pointed out that above-mentioned radio connection can include but is not limited to 3G/4G connections, WiFi connections, bluetooth
Connection, WiMAX connections, Zigbee connections, UWB (Ultra Wideband) connections and other currently known or exploitations in the future
Radio connection.
In general, user watches video using the video playing application installed in terminal, at this moment, user can be by direct
The video link presented in input video address or click video playing application, which is fetched to server, initiates video playing request.?
In the present embodiment, above-mentioned video may include rm formats, rmvb formats, mpeg formats, mov formats, mtv formats, dat formats,
Wmv formats, avi formats, 3gp formats, amv formats, dmv formats, formatted video or other futures will for flv formats etc.
The format of exploitation video (as long as the video file of this format can be opened with video player and play it includes video
Content).
Step 202, estimation is carried out to the video of input based on the first code check, obtains the best of the video of the first code check
First motion vector and it is at least one include candidate motion vector, the prediction error of candidate motion vector and candidate motion vector
Bit number triple.
In the present embodiment, based on the video obtained in step 201, above-mentioned electronic equipment (such as service shown in FIG. 1
Device) quantization parameter can be determined based on the first code check, and the video of above-mentioned input is transported using various method for estimating
Dynamic estimation.Wherein the first code check can be adaptable to a certain bandwidth regard code check, correspondingly, the second code check described below can
To be adaptable to the video code rate of another bandwidth.
In some optional realization methods of the present embodiment, the mode that estimation is carried out to the video of above-mentioned input can
By be based on transform domain in a manner of.For example, Fourier transformation can be carried out to the block of adjacent two frame in the video of input, according to two
The phase correlation of the Fourier transformation of frame image estimates motion vector.
Specifically, above-mentioned in the estimation mode based on transform domain, it is assumed that reference frame waits in the video of input
The luminance signal of luminance signal with block and the match block in prediction frame is respectively l1(x) and l2(x), x is bivector, they
Relationship be represented by:
l2(x)=l1(x-t) (1)
Wherein, t is motion vector.L is used respectively1(k) and L2(k) l is indicated1(x) and l2(x) Fourier transformation, wherein k
=2 π/x after then doing Fourier transformation to the luminance signal of the block in two field pictures, have following relationship:
L2(k)=ej2πkt·L1(k) (2)
As can be seen that the to be matched piece of phase difference between the Fourier transformation of match block is and the relevant amount of motion vector.
For each candidate motion vector, it can obtain a corresponding phase difference, then it can be further according to the rate of phase difference
Distortion performance estimates best motion vector.
When estimating best motion vector according to the distortion performance of phase difference, each Candidate Motion arrow can be calculated
The prediction error and bit number of amount, and the quantization parameter based on the first code check, candidate motion vector and its prediction error and bit
Number, establishes the rate distortion costs function of phase difference, and best the is determined by minimizing the rate distortion costs function of the phase difference
One motion vector.
In some optional realization methods of the present embodiment, the mode that estimation is carried out to the video of above-mentioned input can
To be in a manner of block-based estimation.It is waited for reference frame for example, can be searched in the frame to be estimated of the video of input
Highest piece of match block matching degree, and the relative displacement between to be matched piece in the block and reference frame is calculated, estimate as movement
The result of meter.In motion estimation process, can preserve to be matched piece in the block and reference frame in each frame to be estimated it
Between relative displacement, as a candidate motion vector, calculate and preserve coding the required bit number of the candidate motion vector
With the prediction error of the candidate motion vector and best first candidate motion vector, to obtain to be matched piece of the triple.
In further realization method, above-mentioned block-based estimation can be realized in the following way:
First, to each piecemeal of each subframe in the video of input, at least one candidate motion vector is determined.In this implementation
In example, rough estimation can be carried out to the video of input, or determine an estimation of motion vectors range, it will be within the scope of this
All motion vectors as candidate motion vector.
Then, calculate candidate motion vector bit number and prediction error, obtain the piecemeal comprising candidate motion vector,
The triple of the bit number and prediction error of candidate motion vector.Wherein, the bit number of candidate motion vector is by motion vector
Required bit number when coding write-in video code flow, can by Variable Length Code (Variable-Length Coding,
VLC) table obtains;Predict difference of the error between the corresponding image block of candidate motion vector and most matched image block.In advance
SSD (Sum of Squared Difference, the quadratic sum of difference) or SAD (Sum of can be used by surveying error
Absolute Difference, relative error) it indicates.
Later, the quantization parameter (Quantization Parameter, QP) of the first code check is determined.Quantization parameter is quantization
The step-length of tolerance, numerical value is bigger, and expression step-length is longer, and the quality of video is poorer.In the present embodiment, the quantization of different code checks
Parameter is different.The quantization parameter can be H.264 parameter specified in standard.During actual coding, code check can be passed through
Control module obtains the quantization parameter of the first code check.
Later, the motion vector of each piecemeal is calculated according to the triple of the quantization parameter of the first code check and each piecemeal
Rate distortion costs.In the present embodiment, motion vector rate distortion costs J can use following formula (3) to indicate:
Jmotion=Epred+λmotion*Rmotion (3)
Wherein, EpredTo predict error, can be indicated with SAD or SSD, RmotionIndicate the required ratio of motion vector
Special number, λ indicate Lagrange's multiplier, λmotionValue be:
λmotion=0.85 × 2(QP-12)/3 (4)
Wherein, QP is the quantization parameter of H.264 code check in standard.
Finally, all triples are traversed, will be made in the triple of motion vector rate distortion costs minimum of each piecemeal
Best first motion vector of the candidate motion vector as each piecemeal.Best first fortune can be obtained by formula (5)
Dynamic vector:
min(Jmotion)=min (Epred+λmotion*Rmotion) (5)
In above-mentioned block-based motion estimation process, the video of the first code check is estimated by minimizing rate distortion costs
Motion vector, can ensure the precision of the motion vector of the video of the first code check, to ensure that Video coding accuracy.
Step 203, best second motion vector of the video of the second code check is estimated based on the second code check and triple.
In the present embodiment, the second code check is different from the first code check, and quantization parameter is different.In order to improve the second code check
The estimation efficiency of video, can be based on the quantization parameter of the second code check, the institute in the estimation of the video of the first code check
The motion vector of the video of the second code check is estimated on the basis of the triple of acquisition.
In some optional realization methods of the present embodiment, second code check can be estimated in the following way
Best second motion vector of video:
First, the quantization parameter of the second code check is determined.Similarly with the first code check, which can H.264 mark
Parameter specified in standard.During actual coding, the quantization parameter of the second code check can be obtained by rate control module.
Then, obtained triple and the amount of the second code check in the motion estimation process of the video based on the first code check
Change parameter, calculates the motion vector rate distortion costs for corresponding to piecemeal in the video of the second code check.It is corresponding in the video of second code check
The calculating of the motion vector rate distortion costs of piecemeal can also be calculated according to above-mentioned formula (3) and (4).
Later, the triple for traversing each piecemeal loses the motion vector rate that piecemeal is corresponded in the video for making the second code check
Best second motion vector of the candidate motion vector as corresponding piecemeal in the triple of true Least-cost.
In the estimation procedure of best second motion vector of the video of above-mentioned second code check, due to directly using first yard
The bit number and prediction error of the candidate motion vector, candidate motion vector that are preserved in the motion estimation process of the video of rate, save
It has gone the determining candidate motion vector of the video of the second code check, prediction error calculation and bit number to calculate, has accelerated the second code check
Video estimation of motion vectors process.Simultaneously as the motion vector of the video of the second code check is regarding based on the first code check
What the motion vector of frequency was derived from, it is ensured that the precision of the motion vector of the second bit-rate video, to ensure that second code
The distortion performance of the video of rate.
Step 204, the coding mode of the video of the second code check is determined according to best second motion vector.
In Video coding, a certain video frame can be encoded, then by the movement between other frames and the video
Offset is encoded, in this way, it is possible to reduce the data volume of coding accelerates coding rate.In the present embodiment, the second code check is determined
Video best second motion vector after, which can be encoded.Specifically, it may be determined that the movement is sweared
Corresponding coding mode is measured, is encoded using determining coding mode.
In the h .264 standard, the type of video frame may include:I frames (intracoded frame), P frame (inter prediction encodings
Frame) and B frames (bi-directional predictive coding frame).H.264 in standard, the partitioned mode of each frame image in video may include:
16 × 16,16 × 8,8 × 16,8 × 8,8 × 4,4 × 8, wherein all there are many coding modes, such as horizontal mould for each partitioned mode
Formula, vertical mode, diagonal model etc..It, can root if former frame has been completed to encode for a certain frame in video
The forced coding pattern of present frame is determined according to present frame and the motion vector of previous interframe.Specifically, it can be sweared according to movement
Incidence relation between amount and each coding mode, to search the coding mode so that the distortion minimum of encoded video.
In some optional realization methods of the present embodiment, the video of the second code check can be determined in the following way
Coding mode:
First, at least one candidate coding pattern and the corresponding quantization of candidate coding pattern of the video of the second code check are determined
Parameter.It in the present embodiment, can be using all coding modes in above-mentioned H.264 standard as candidate coding pattern.As showing
Example, in the coding of P frames, can using the corresponding a variety of coding modes of above-mentioned a variety of partitioned modes as candidate coding pattern, and
The quantization parameter of these candidate coding patterns in the h .264 standard is searched respectively.
Then, the corresponding distortion parameter of at least one candidate coding pattern and number of coded bits are calculated.Wherein, encoding ratio
Special number includes the bit number that bit number, the candidate coding pattern of best second motion vector needs need and best second movement
The bit number that the corresponding prediction error of vector needs.Number of coded bits can be the bit number of Variable Length Code (VLC), Ke Yitong
H.264 defined variable length code table is crossed to obtain to inquire.Best second motion vector is corresponding to predict that the coding of error can also
The referred to as coded residual of the second bit-rate video, the bit number needed are the ratio that the coded residual of the video of the second code check needs
Special number.
Later, it is based on the corresponding quantization parameter of candidate coding pattern, distortion parameter and number of coded bits, calculates second code
The coding mode rate distortion costs of piecemeal are corresponded in the correspondence subframe of the video of rate.In the present embodiment, coding mode rate is distorted
Cost J can use following formula (6) to indicate:
Jmode=Erec+λmode*Rtotal (6)
Wherein, ErecIt indicates, using caused distortion after the coding mode, current coding mode and forced coding can be used
The SAD and SSD of pattern indicate, RtotalPresentation code bit number, λ indicate Lagrange's multiplier, λmodeValue be:
λmode=0.85 × 2(QP-12)/3 (7)
Wherein, QP is the quantization parameter of the H.264 coding mode in standard.
Finally, candidate coding pattern is traversed, the coding mould of piecemeal will be corresponded in the correspondence subframe for the video for making the second code check
Coding mode of the candidate coding pattern of formula rate distortion costs minimum as corresponding piecemeal.It can be obtained most by formula (8)
Good first motion vector:
min(Jmode)=min (Erec+λmode*Rtotal) (8)
Estimate the coding mode of the video of the second code check by minimizing rate distortion costs in the above method, can reduce
Distortion in Video coding ensures the precision of Video coding.
In some optional realization methods of the present embodiment, the method for generating multi code Rate of Chinese character video can also include:
The coding mode of the video of the first code check is determined according to best first motion vector.It is possible to further true in the following way
The coding mode of the video of fixed first code check:
First, at least one candidate coding pattern and the corresponding quantization of candidate coding pattern of the video of the first code check are determined
Parameter;Then, the corresponding distortion parameter of at least one candidate coding pattern and number of coded bits are calculated, wherein coded-bit
Number includes the bit number that bit number, the candidate coding pattern of best first motion vector needs need and best first movement arrow
Measure the bit number that corresponding prediction error needs;Later, be based on the corresponding quantization parameter of candidate coding pattern, distortion parameter and
Number of coded bits calculates the coding mode rate distortion costs of each piecemeal described in the video of the first code check;Finally traversal is candidate
Coding mode makees the candidate coding pattern of the coding mode rate distortion costs minimum of each piecemeal in the video for making the first code check
For the coding mode of each piecemeal.The determination of the flow that the coding mode determines and the coding mode of the video of above-mentioned second code check
Flow is similar, differs only in best first motion vector and best second motion vector differs, therefore, can be based on
On the coding mode of the second bit-rate video that has described determine method be similarly determined the first code check video coding mode,
Details are not described herein again.
In some optional realization methods of the present embodiment, before above-mentioned steps 203, for generating regarding for multi code Rate of Chinese character
The method of frequency can also include:The resolution ratio of the video of the first code check and the resolution ratio of the video of the second code check are obtained, by first
The resolution ratio of the video of the resolution ratio of the video of code check divided by second code check obtains removing the factor again;And it will be in triple
Candidate motion vector according to again except the factor is removed again.In this way, having in the video of the first code check and the video of the second code check
When different resolution ratio, motion vector remove again accordingly, with the estimation of the video of the second code check of guarantee
Accuracy.
After the coding mode of the video of the video and the second code check that determine the first code check, input can be regarded respectively
Frequency encoded according to corresponding coding mode, to obtain the first code check video and the second code check video.It is appreciated that
The estimation of second bit-rate video described above and coding mode are determined that method for other code checks, then can obtain more
The video of a difference code check.Optionally, the first code check is more than the second code check.
With continued reference to Fig. 3 a, it illustrates a kind of flow chart of data processing for generating multi code Rate of Chinese character video according to the application
Schematic diagram.After estimation being carried out to the video 301 of input, it can be deduced that the first motion vector 302 is sweared according to the first movement
Amount carries out the determination of the first coding mode 3031, can carry out coding to the video 301 of input later and generate regarding for the first code check
Frequently 3032.The estimation of the video of the second code check and the video of third code check is carried out based on the first motion vector 302, calculates the
Second motion vector 3041 of two code checks and the third motion vector 3051 of third code check, then respectively according to the second motion vector
3041 and third motion vector 3051 determine the second code check video second coding mode 3042 and third code check video
Third coding mode 3052 later encodes the video 301 of input using the second coding mode 3042, generates the second code check
Video 3043, the video 301 of input is encoded using third coding mode 3052, generate third code check video
3053.And so on, generate the video of multiple code checks.
In some optional realization methods, the video of input is compiled in the coding mode of the video according to the first code check
Yard, it, can be using the video of the first code check as in the video generating process of the second code check after the video for generating the first code check
Input video reevaluates motion vector according to formula (5) and formula (8), determines the coding mode of the video of the second code check, to generate
Multi code Rate of Chinese character video.
With further reference to Fig. 3 b, it illustrates another data processings for generating multi code Rate of Chinese character video according to the application
The schematic diagram of flow.After estimation being carried out to the video 306 of input, it can be deduced that the first motion vector 307, according to the first fortune
Dynamic vector 307 carries out the determination of the first coding mode 3081, can carry out coding to the video 306 of input later and generate first yard
The video 3082 of rate.The estimation that the video of the second code check is carried out based on the first motion vector 307, obtains regarding for the second code check
Second motion vector 3091 of frequency is then based on the estimation that the second motion vector 3091 carries out the video of third code check, obtains
Go out the third motion vector 3101 of the video of third code check, then respectively according to the second motion vector 3091 and third motion vector
3101 determine the third coding mode 3102 of the video of the second coding mode 3092 of the video of the second code check and third code check, it
The video 3082 of first code check is encoded using the second coding mode 3092 afterwards, the video 3093 of the second code check is generated, adopts
The video 3093 of second code check is encoded with third coding mode 3102, generates the video 3103 of third code check.With such
It pushes away, generates the video of multiple code checks.
The method that above-described embodiment of the application provides is by by the time in the motion estimation process of the video of the first code check
It selects in the estimation of motion vector and its bit number and prediction error applied to the video of other code checks, simplifies multi code Rate of Chinese character and regard
The step of frequency generates, accelerates the generation of multi code Rate of Chinese character video, has saved the computing resource of system, improve the life of multi code Rate of Chinese character video
At speed, meanwhile, it ensure that the distortion performance of Video coding in multi code Rate of Chinese character video generating process.
With further reference to Fig. 4, it illustrates the flows of another embodiment of the method for generating multi code Rate of Chinese character video
400.This is used to generate the flow 400 of the method for multi code Rate of Chinese character video, includes the following steps:
Step 401, the video of input is obtained.
In the present embodiment, the method for generating multi code Rate of Chinese character video runs electronic equipment thereon (such as shown in Fig. 1
Server) video data of input can be extracted from the video database that it is stored.In some embodiments, for generating
The electronic equipment (such as server shown in FIG. 1) of the method operation of multi code Rate of Chinese character video thereon can pass through wired connection mode
Or radio connection carries out the terminal of video playing using it from user and receives video playing request.Wherein, above-mentioned video
Playing request includes address or the other identifier information that user it is expected the video played.Method for generating multi code Rate of Chinese character video
The electronic equipment of operation thereon can ask the inquiry from the database for be stored in server to be broadcast with video according to video playing
Put the video address or the matched video data of identification information in request, the video as the input.
Step 402, estimation is carried out to the video of input based on the first code check, obtains the best of the video of the first code check
First motion vector and it is at least one include candidate motion vector, the prediction error of candidate motion vector and candidate motion vector
Bit number triple.
In the present embodiment, based on the video obtained in step 401, above-mentioned electronic equipment (such as service shown in FIG. 1
Device) quantization parameter can be determined based on the first code check, and the video of above-mentioned input is transported using various method for estimating
Dynamic estimation.Wherein the first code check can be adaptable to a certain bandwidth regard code check, correspondingly, the second code check described below can
To be adaptable to the video code rate of another bandwidth.
In some optional realization methods of the present embodiment, the mode that estimation is carried out to the video of above-mentioned input can
By be based on transform domain in a manner of.For example, Fourier transformation can be carried out to the block of adjacent two frame in the video of input, according to two
The phase correlation of the Fourier transformation of frame image estimates motion vector.
In some optional realization methods of the present embodiment, the mode that estimation is carried out to the video of above-mentioned input can
To be in a manner of block-based estimation.For example, can be searched in the frame to be estimated of the video of input and the block in reference frame
Highest piece of matching degree, and the relative displacement between the reference block in the block and reference frame is calculated, the result as estimation.
It may be used and search highest piece of matching degree such as under type:Motion vector search ranges are determined first, that is, are determined
Then candidate motion vector is calculated the prediction error and bit number of candidate motion vector, is waited for based on to be matched piece in reference frame
The matching degree of prediction block in estimation frame establishes the rate distortion costs function of motion vector, is determined later according to candidate motion vector
Match block in frame to be estimated calculates the corresponding motion vector rate distortion costs of the prediction block.Finally traverse all Candidate Motions
Vector estimates motion vector by minimizing the rate distortion costs function.Wherein, matching degree can be based on characteristics of image progress
It calculates.Further, characteristics of image can be the features such as the feature, such as the texture of image, color of spatial domain.
Step 403, best second motion vector of the video of the second code check is estimated based on the second code check and triple.
In the present embodiment, the second code check is different from the first code check, and quantization parameter is different, in order to improve the second code check
The estimation efficiency of video, can be based on the quantization parameter of the second code check, the institute in the estimation of the video of the first code check
The motion vector of the video of the second code check is estimated on the basis of the triple of acquisition.
In some optional realization methods of the present embodiment, second code check can be estimated in the following way
Best second motion vector of video:
First, the quantization parameter of the second code check is determined.The quantization parameter can be H.264 parameter specified in standard.?
During actual coding, the quantization parameter of the second code check can be obtained by rate control module.
Then, obtained triple and the amount of the second code check in the motion estimation process of the video based on the first code check
Change parameter, calculates the motion vector rate distortion costs for corresponding to piecemeal in the video of the second code check.It is corresponding in the video of second code check
The calculating of the motion vector rate distortion costs of piecemeal can also be calculated according to above-mentioned formula (3) and (4).
Later, the triple for traversing each piecemeal loses the motion vector rate that piecemeal is corresponded in the video for making the second code check
Best second motion vector of the candidate motion vector as corresponding piecemeal in the triple of true Least-cost.
Step 404, best second motion vector is optimized.
In the present embodiment, may be used best second motion vector that a variety of optimal ways obtain step 403 into
Row optimization, such as the method iterative calculation of IBP (Iteration Back Projection, iterative backprojection) may be used most
The optimal value of good second motion vector, when optimal value so that the error convergence of reference frame and interframe to be matched or being less than a certain threshold value
When, stop iteration, using current optimal value as the optimum results of best second motion vector.
In some optional realization methods of the present embodiment, it can come in the following way to best second motion vector
It optimizes:
First, the motion vector optimization set that piecemeal is corresponded in the video of the second code check is determined.The optimization set can be
Including the set of optimum movement vector and its eight closest motion vector.Wherein, eight closest motion vectors can
Think eight nearest motion vectors of Euclidean distance.Due to being typically estimated as based on image pixel for motion vector, so fortune
Dynamic vector is Pixel-level, then when best second motion vector is (x, y) (unit of wherein x, y are pixel), closest
Eight motion vectors be (x, y+1), (x+1, y), (x+1, y+1), (x, y-1), (x-1, y), (x-1, y-1), (x-1, y+1)
And (x+1, y-1).
Then, the corresponding rate distortion costs of all motion vectors in motion vector optimization set are calculated.In the present embodiment
In, it according to the quantization parameter of fixed second code check in above-described embodiment and can calculate in motion vector optimization set
Each corresponding bit number of motion vector and prediction error, use above-mentioned formula (3) to calculate institute in motion vector optimization set later
There are the corresponding rate distortion costs of motion vector.
By the motion vector of rate distortion costs minimum as an optimization after best second motion vector.It is i.e. excellent from motion vector
Change selection in set so that rate distortion costs minimum motion vector result as an optimization.
Step 405, the coding mode of the video of the second code check is determined according to best second motion vector.
In the h .264 standard, the type of video frame may include:I frames (intracoded frame), P frame (inter prediction encodings
Frame) and B frames (bi-directional predictive coding frame).H.264 in standard, the partitioned mode of each frame image in video may include:
16 × 16,16 × 8,8 × 16,8 × 8,8 × 4,4 × 8, wherein all there are many coding modes, such as horizontal mould for each partitioned mode
Formula, vertical mode, diagonal model etc..It, can root if former frame has been completed to encode for a certain frame in video
The forced coding pattern of present frame is determined according to present frame and the motion vector of previous interframe.Specifically, after can be according to optimization
Best second motion vector and each coding mode between incidence relation, to search so that the minimum volume of the distortion of encoded video
Pattern.
It, can be based on the volume of the second bit-rate video already described above in some optional realization methods of the present embodiment
Pattern determine method be similarly determined the first code check video coding mode, details are not described herein again.
After the coding mode of the video of the video and the second code check that determine the first code check, input can be regarded respectively
Frequency encoded according to corresponding coding mode, to obtain the first code check video and the second code check video.It is appreciated that
The estimation of second bit-rate video described above and coding mode are determined that method for other code checks, then can obtain more
The video of a difference code check.Optionally, the first code check is more than the second code check.
Figure 4, it is seen that compared with the corresponding embodiments of Fig. 2, it is used to generate regarding for multi code Rate of Chinese character in the present embodiment
The flow 400 of the method for frequency increases the step 404 optimized to best second motion vector.The present embodiment describes as a result,
Scheme can further refine the second code check video estimation, to further decrease promoted multi code Rate of Chinese character video generate
Distortion in the process promotes the accuracy of Video coding.
With further reference to Fig. 5, as the realization to method shown in above-mentioned each figure, it is more for generating that this application provides one kind
One embodiment of the device of the video of code check, the device embodiment is corresponding with embodiment of the method shown in Fig. 2, device tool
Body can be applied in various electronic equipments.
As shown in figure 5, the device 500 for generating multi code Rate of Chinese character video described in the present embodiment includes:Acquiring unit 501,
First estimation unit 502, the second estimation unit 503 and the first determination unit 504.Wherein, acquiring unit 501 is configured to obtain
Take the video of input;First estimation unit 502 is configured to carry out estimation to the video of input based on the first code check, obtains
Best first motion vector of the video of first code check and it is at least one comprising candidate motion vector, candidate motion vector it is pre-
Survey the triple of the bit number of error and candidate motion vector;Second estimation unit 503 be configured to based on the second code check and
Triple estimates best second motion vector of the video of the second code check;First determination unit 504 is configured to according to best
Two motion vectors determine the coding mode of the video of the second code check.
In the present embodiment, acquiring unit 501 can be set from the electronics of the method operation of multi code Rate of Chinese character video thereon is generated
Extraction user asks the video played in standby (such as server shown in FIG. 1) stored video data.First estimation unit
502 can determine quantization parameter based on the first code check, each in the video acquired in rate distortion costs function pair by minimizing
Subframe carries out estimation, obtains at least one triple comprising candidate motion vector and its bit number and prediction error, with
And first code check video best first motion vector.Second estimation unit 503 can be based on 502 gained of the first estimation unit
The triple gone out and the second code check are estimated by minimizing rate distortion costs function to carry out movement to the video of the second code check
Meter, to obtain best second motion vector.First determination unit 504 can be according to the quantization parameter of coding mode and best
Two motion vectors establish the rate distortion costs function of coding mode, in the coding mode of plurality of optional, choose so that coding mould
Coding mode of the coding mode of the rate distortion costs function minimum of formula as the video of the second code check.
In some optional realization methods of the present embodiment, device 500 can also include the second determination unit 505 and
506 (not shown) of coding unit.Second determination unit 505 is configured to determine the first code check according to best first motion vector
The coding mode of video.Coding unit 505 be configured to according to the coding mode of the video of the first code check to the video of input into
Row coding, to generate the video of the first code check;And the video of input is carried out according to the coding mode of the video of the second code check
Coding, to generate the video of the second code check.
It will be understood by those skilled in the art that above-mentioned for generate the device 500 of multi code Rate of Chinese character video to further include some other
Known features, such as processor, memory etc., in order to unnecessarily obscure embodiment of the disclosure, these well known structures exist
It is not shown in Fig. 5.
Below with reference to Fig. 6, it illustrates the calculating suitable for terminal device or server for realizing the embodiment of the present application
The structural schematic diagram of machine system 600.
As shown in fig. 6, computer system 600 includes central processing unit (CPU) 601, it can be read-only according to being stored in
Program in memory (ROM) 602 or be loaded into the program in random access storage device (RAM) 603 from storage section 608 and
Execute various actions appropriate and processing.In RAM 603, also it is stored with system 600 and operates required various programs and data.
CPU 601, ROM 602 and RAM 603 are connected with each other by bus 604.Input/output (I/O) interface 605 is also connected to always
Line 604.
It is connected to I/O interfaces 605 with lower component:Importation 606 including keyboard, mouse etc.;It is penetrated including such as cathode
The output par, c 607 of spool (CRT), liquid crystal display (LCD) etc. and loud speaker etc.;Storage section 608 including hard disk etc.;
And the communications portion 609 of the network interface card including LAN card, modem etc..Communications portion 609 via such as because
The network of spy's net executes communication process.Driver 610 is also according to needing to be connected to I/O interfaces 605.Detachable media 611, such as
Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on driver 610, as needed in order to be read from thereon
Computer program be mounted into storage section 608 as needed.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description
Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be tangibly embodied in machine readable
Computer program on medium, the computer program include the program code for method shown in execution flow chart.At this
In the embodiment of sample, which can be downloaded and installed by communications portion 609 from network, and/or from removable
Medium 611 is unloaded to be mounted.
Flow chart in attached drawing and block diagram, it is illustrated that according to the system of the various embodiments of the application, method and computer journey
The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation
A part for a part for one module, program segment, or code of table, the module, program segment, or code includes one or more
Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box
The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical
On can be basically executed in parallel, they can also be executed in the opposite order sometimes, this is depended on the functions involved.Also it wants
It is noted that the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart, Ke Yiyong
The dedicated hardware based system of defined functions or operations is executed to realize, or can be referred to specialized hardware and computer
The combination of order is realized.
Being described in unit involved in the embodiment of the present application can be realized by way of software, can also be by hard
The mode of part is realized.Described unit can also be arranged in the processor, for example, can be described as:A kind of processor packet
Include acquiring unit, the first estimation unit, the second estimation unit and the first determination unit.Wherein, the title of these units is at certain
In the case of do not constitute restriction to the unit itself, for example, acquiring unit is also described as " obtaining the video of input
Unit ".
As on the other hand, present invention also provides a kind of nonvolatile computer storage media, the non-volatile calculating
Machine storage medium can be nonvolatile computer storage media included in device described in above-described embodiment;Can also be
Individualism, without the nonvolatile computer storage media in supplying terminal.Above-mentioned nonvolatile computer storage media is deposited
One or more program is contained, when one or more of programs are executed by an equipment so that the equipment:It obtains
The video of input;Estimation is carried out to the video of input based on the first code check, obtains best the first of the video of the first code check
Motion vector and at least one ratio comprising candidate motion vector, the prediction error of candidate motion vector and candidate motion vector
The triple of special number;Best second motion vector of the video of the second code check is estimated based on the second code check and triple;According to
Best second motion vector determines the coding mode of the video of the second code check.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.People in the art
Member should be appreciated that invention scope involved in the application, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic
Scheme, while should also cover in the case where not departing from the inventive concept, it is carried out by above-mentioned technical characteristic or its equivalent feature
Other technical solutions of arbitrary combination and formation.Such as features described above has similar work(with (but not limited to) disclosed herein
Can technical characteristic replaced mutually and the technical solution that is formed.
Claims (20)
1. a kind of method for generating multi code Rate of Chinese character video, which is characterized in that the method includes:
Obtain the video of input;
Estimation is carried out to the video of the input based on the first code check, obtains best first movement of the video of the first code check
Vector and it is at least one include candidate motion vector, the prediction error of the candidate motion vector and the candidate motion vector
Bit number triple;
Best second motion vector of the video of second code check is estimated based on the second code check and the triple;
The coding mode of the video of second code check is determined according to best second motion vector;
The video of the input is encoded according to the coding mode of the video of first code check, to generate described first yard
The video of rate;And
The video of the input is encoded according to the coding mode of the video of second code check, to generate the second code
The video of rate.
2. according to the method described in claim 1, it is characterized in that, described carry out the video of the input based on the first code check
Estimation, including:
To each piecemeal of each subframe in the video of input, at least one candidate motion vector is determined;
The bit number and prediction error for calculating the candidate motion vector, obtain the triple of each piecemeal;
Determine the quantization parameter of first code check;
Each piecemeal is calculated according to the triple of the quantization parameter of first code check and each piecemeal
Motion vector rate distortion costs;
The triple is traversed, the candidate fortune in the triple of the motion vector rate distortion costs minimum of each piecemeal will be made
Best first motion vector of the dynamic vector as each piecemeal.
3. according to the method described in claim 2, it is characterized in that, described be based on the second code check and triple estimation institute
Best second motion vector of the video of the second code check is stated, including:
Determine the quantization parameter of second code check;
The triple of quantization parameter and each piecemeal based on second code check calculates second code check
The motion vector rate distortion costs of piecemeal are corresponded in video;
The triple for traversing each piecemeal will make the triple of the motion vector rate distortion costs minimum of the corresponding piecemeal
In best second motion vector of the candidate motion vector as the corresponding piecemeal.
4. according to the method described in claim 3, it is characterized in that, described according to described in the best second motion vector determination
The coding mode of the video of second code check, including:
Determine at least one candidate coding pattern and the corresponding quantization of the candidate coding pattern of the video of second code check
Parameter;
Calculate the corresponding distortion parameter of at least one candidate coding pattern and number of coded bits, wherein the encoding ratio
Special number includes the bit number that best second motion vector bit number, the candidate coding pattern that need need and described
The corresponding bit number predicted error and needed of best second motion vector;
Based on the corresponding quantization parameter of the candidate coding pattern, distortion parameter and number of coded bits, the second code is calculated
The coding mode rate distortion costs of piecemeal are corresponded in the correspondence subframe of the video of rate;
The candidate coding pattern is traversed, the coding mode of piecemeal will be corresponded in the correspondence subframe for the video for making second code check
Coding mode of the candidate coding pattern of rate distortion costs minimum as the corresponding piecemeal.
5. according to the method described in claim 2, it is characterized in that, the method further includes:
The coding mode of the video of first code check is determined according to best first motion vector.
6. according to the method described in claim 5, it is characterized in that, described according to described in the best first motion vector determination
The coding mode of the video of first code check, including:
Determine at least one candidate coding pattern and the corresponding quantization of the candidate coding pattern of the video of first code check
Parameter;
Calculate the corresponding distortion parameter of at least one candidate coding pattern and number of coded bits, wherein the encoding ratio
Special number includes the bit number that best first motion vector bit number, the candidate coding pattern that need need and described
The corresponding bit number predicted error and needed of best first motion vector;
Based on the corresponding quantization parameter of the candidate coding pattern, distortion parameter and number of coded bits, described first yard is calculated
The coding mode rate distortion costs of each piecemeal described in the video of rate;
The candidate coding pattern is traversed, the coding mode rate of each piecemeal described in the video of first code check will be made to be distorted
Coding mode of the candidate coding pattern of Least-cost as each piecemeal.
7. according to the method described in claim 1, it is characterized in that, the method further includes:
Obtain the resolution ratio of the video of first code check and the resolution ratio of the video of second code check;
By the resolution ratio of the video of first code check divided by the resolution ratio of the video of second code check, obtain removing the factor again;
And
Before estimating best second motion vector of video of second code check based on the second code check and the triple,
By the candidate motion vector in the triple according to described times except the factor is removed again.
8. according to the method described in claim 1, it is characterized in that, the method further includes:
Best second motion vector is optimized.
9. according to the method described in claim 8, it is characterized in that, described optimize best second motion vector,
Including:
Determine the motion vector optimization set that piecemeal is corresponded in the video of second code check;
Calculate the corresponding rate distortion costs of all motion vectors in the motion vector optimization set;
By the motion vector of rate distortion costs minimum as an optimization after best second motion vector;
Wherein, the motion vector optimization set includes best second motion vector, and is moved with described best second
Eight motion vectors of the Euclidean distance minimum of vector.
10. according to any methods of claim 1-9, which is characterized in that first code check is higher than second code check.
11. a kind of for generating the device of multi code Rate of Chinese character video, which is characterized in that described device includes:
Acquiring unit is configured to obtain the video of input;
First estimation unit is configured to carry out estimation to the video of the input based on the first code check, obtains first yard
Best first motion vector of the video of rate and at least one prediction for including candidate motion vector, the candidate motion vector
The triple of the bit number of error and the candidate motion vector;
Second estimation unit is configured to estimate the video of second code check most based on the second code check and the triple
Good second motion vector;
First determination unit is configured to determine the coding of the video of second code check according to best second motion vector
Pattern;
Coding unit is configured to:The video of the input is compiled according to the coding mode of the video of first code check
Code, to generate the video of first code check, and according to the coding mode of the video of second code check to the input
Video is encoded, to generate the video of second code check.
12. according to the devices described in claim 11, which is characterized in that first estimation unit is further configured to:
To each piecemeal of each subframe in the video of input, at least one candidate motion vector is determined;
The bit number and prediction error for calculating the candidate motion vector, obtain the triple of each piecemeal;
Determine the quantization parameter of first code check;
Each piecemeal is calculated according to the triple of the quantization parameter of first code check and each piecemeal
Motion vector rate distortion costs;
The triple is traversed, the candidate fortune in the triple of the motion vector rate distortion costs minimum of each piecemeal will be made
Best first motion vector of the dynamic vector as each piecemeal.
13. device according to claim 12, which is characterized in that second estimation unit is further configured to:
Determine the quantization parameter of second code check;
The triple of quantization parameter and each piecemeal based on second code check calculates second code check
The motion vector rate distortion costs of piecemeal are corresponded in video;
The triple for traversing each piecemeal will make the triple of the motion vector rate distortion costs minimum of the corresponding piecemeal
In best second motion vector of the candidate motion vector as the corresponding piecemeal.
14. device according to claim 13, which is characterized in that first determination unit is further configured to:
Determine at least one candidate coding pattern and the corresponding quantization of the candidate coding pattern of the video of second code check
Parameter;
Calculate the corresponding distortion parameter of at least one candidate coding pattern and number of coded bits, wherein the encoding ratio
Special number includes the bit number that best second motion vector bit number, the candidate coding pattern that need need and described
The corresponding bit number predicted error and needed of best second motion vector;
Based on the corresponding quantization parameter of the candidate coding pattern, distortion parameter and number of coded bits, the second code is calculated
The coding mode rate distortion costs of piecemeal are corresponded in the correspondence subframe of the video of rate;
The candidate coding pattern is traversed, the coding mode of piecemeal will be corresponded in the correspondence subframe for the video for making second code check
Coding mode of the candidate coding pattern of rate distortion costs minimum as the corresponding piecemeal.
15. device according to claim 12, which is characterized in that described device further includes:
Second determination unit is configured to determine the coding of the video of first code check according to best first motion vector
Pattern.
16. device according to claim 15, which is characterized in that second determination unit is further configured to:
Determine at least one candidate coding pattern and the corresponding quantization of the candidate coding pattern of the video of first code check
Parameter;
Calculate the corresponding distortion parameter of at least one candidate coding pattern and number of coded bits, wherein the encoding ratio
Special number includes the bit number that best first motion vector bit number, the candidate coding pattern that need need and described
The corresponding bit number predicted error and needed of best first motion vector;
Based on the corresponding quantization parameter of the candidate coding pattern, distortion parameter and number of coded bits, described first yard is calculated
The coding mode rate distortion costs of each piecemeal described in the video of rate;
The candidate coding pattern is traversed, the coding mode rate of each piecemeal described in the video of first code check will be made to be distorted
Coding mode of the candidate coding pattern of Least-cost as each piecemeal.
17. according to the devices described in claim 11, which is characterized in that described device further includes adjustment unit, is configured to:
Obtain the resolution ratio of the video of first code check and the resolution ratio of the video of second code check;
By the resolution ratio of the video of first code check divided by the resolution ratio of the video of second code check, obtain removing the factor again;
And
The best of the video of second code check is estimated based on the second code check and the triple in second estimation unit
Before second motion vector, by the candidate motion vector in the triple according to described times except the factor is removed again.
18. according to the devices described in claim 11, which is characterized in that described device further includes:
Optimize unit, is configured to optimize best second motion vector.
19. device according to claim 18, which is characterized in that the optimization unit is further configured to:
Determine the motion vector optimization set that piecemeal is corresponded in the video of second code check;
Calculate the corresponding rate distortion costs of all motion vectors in the motion vector optimization set;
By the motion vector of rate distortion costs minimum as an optimization after best second motion vector;
Wherein, the motion vector optimization set includes best second motion vector, and is moved with described best second
Eight motion vectors of the Euclidean distance minimum of vector.
20. according to any devices of claim 11-19, which is characterized in that first code check is higher than the second code
Rate.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510599663.4A CN105120261B (en) | 2015-09-18 | 2015-09-18 | Method and apparatus for generating multi code Rate of Chinese character video |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510599663.4A CN105120261B (en) | 2015-09-18 | 2015-09-18 | Method and apparatus for generating multi code Rate of Chinese character video |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105120261A CN105120261A (en) | 2015-12-02 |
CN105120261B true CN105120261B (en) | 2018-11-02 |
Family
ID=54668131
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510599663.4A Active CN105120261B (en) | 2015-09-18 | 2015-09-18 | Method and apparatus for generating multi code Rate of Chinese character video |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105120261B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113965753B (en) * | 2021-12-20 | 2022-05-17 | 康达洲际医疗器械有限公司 | Inter-frame image motion estimation method and system based on code rate control |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103220550B (en) * | 2012-01-19 | 2016-12-07 | 华为技术有限公司 | The method and device of video conversion |
CN102595135B (en) * | 2012-02-24 | 2013-03-27 | 中国科学技术大学 | Method and device for scalable video coding |
-
2015
- 2015-09-18 CN CN201510599663.4A patent/CN105120261B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN105120261A (en) | 2015-12-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103931184B (en) | Method and apparatus for being coded and decoded to video | |
TWI622288B (en) | Video decoding method | |
JP5480775B2 (en) | Video compression method | |
JP2022050585A (en) | Method and device for chroma prediction | |
US20180288363A1 (en) | Methods and apparatuses for image processing to optimize image resolution and for optimizing video streaming bandwidth for vr videos | |
CN103858431A (en) | Multiview video data encoding method and device, and decoding method and device | |
TWI684356B (en) | A method and apparatus for determining motion vector prediction value, computer readable storage medium | |
CN102783147A (en) | Budget encoding | |
CN103918255A (en) | Method and device for encoding a depth map of multi viewpoint video data, and method and device for decoding the encoded depth map | |
CN110248189B (en) | Video quality prediction method, device, medium and electronic equipment | |
CN101103632A (en) | Method for processing video frequency through dynamicly based on normal flow quantization step | |
US11115678B2 (en) | Diversified motion using multiple global motion models | |
US20200296422A1 (en) | Image encoding and decoding method, apparatus, and system, and storage medium | |
CN105340274A (en) | Depth map encoding method and apparatus thereof, and depth map decoding method and an apparatus thereof | |
CN102291581A (en) | Realizing method of self-adaptive motion estimation supporting frame field | |
CN117480778A (en) | Residual coding and video coding methods, devices, equipment and systems | |
KR20130103140A (en) | Preprocessing method before image compression, adaptive motion estimation for improvement of image compression rate, and image data providing method for each image service type | |
CN105120261B (en) | Method and apparatus for generating multi code Rate of Chinese character video | |
CN108401185B (en) | Reference frame selection method, video transcoding method, electronic device and storage medium | |
CN104509117A (en) | Receiving device, transmission device, and image transmission method | |
CN104038768B (en) | The many reference field rapid motion estimating methods and system of a kind of coding mode | |
TWI735297B (en) | Coding of video and audio with initialization fragments | |
CN106134202A (en) | MMT assets and there is the distortion signaling of enhancing of ISOBMFF of MMT QOS descriptor of the improvement comprising multiple QOE operating point | |
Kumar et al. | Efficiency enhancement of K-multi constraints paths in hybrid video coder using information based quantization method | |
CN102948147A (en) | Video rate control based on transform-coefficients histogram |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |