CN101309403A - Frequency domain video transcoding method and transcoding device implementing the same - Google Patents
Frequency domain video transcoding method and transcoding device implementing the same Download PDFInfo
- Publication number
- CN101309403A CN101309403A CN 200710097398 CN200710097398A CN101309403A CN 101309403 A CN101309403 A CN 101309403A CN 200710097398 CN200710097398 CN 200710097398 CN 200710097398 A CN200710097398 A CN 200710097398A CN 101309403 A CN101309403 A CN 101309403A
- Authority
- CN
- China
- Prior art keywords
- motion compensation
- motion
- matrix
- dct
- dct coefficient
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The invention relates to a frequency domain and video frequency transcoding method, which comprises the steps that input video stream is partially decoded; motion compensation is preformed to decoded results, to obtain the DCT coefficient block of a decoding frame; DCT domain reducing sampling is preformed to the obtained DCT coefficient block; motion compensation and partial encoding are preformed to the DCT coefficient block after the reducing sampling, to obtain transcoded video stream; the motion compensation is preformed according to the precision of motion vector during the motion compensation treatment. By adopting the frequency domain and video frequency transcoding method, the programming can be conveniently realized, in addition, under the condition that the method mathematically and strictly in equivalence with the traditional method is guaranteed, approximate one fourth calculation amount is saved compared with the traditional motion compensation method, therefore, the transcoding speed is greatly accelerated.
Description
Technical field
The present invention relates to field of video image processing, more specifically, relate to the down-sampled video transcoding method of a kind of frequency domain and realize its transcoder.
Background technology
Along with the development to medium technique of computer, network technology, digital video compaction technique has obtained using widely.Usually vision signal according to different standard and compressed encoding after, in different surrounding mediums, propagate, on different terminals, display the play, just need carry out the transcoding processing to these compressing video frequency flows.Transcoding is used and is related to many multimedia equipments and systems such as video server, universal multimedia access means, supervisory control system, set-top box.
Video Transcoding Technology is the compressing video frequency flow that a kind of compressing video frequency flow of Standards and formats is processed into the another kind of Standards and formats that more is adapted to certain application-specific.In order to accelerate the speed of video code conversion, the video code conversion on the frequency domain becomes the main flow of technology, and these technology all rely on the motion compensation of frequency domain.Present video code translator, the structure that is based on decoder encoder polyphone is carried out transcoding in spatial domain more.In other words, code stream to be decoded obtains frame of video through corresponding decoder complete decoding earlier, handles decoded frame then on spatial domain, and the processed video frame is encoded fully through corresponding encoder again obtains file behind the transcoding at last.
In order to accelerate transcoding speed, the video code conversion of frequency domain has been introduced a kind of motion compensation process of frequency domain.This method depends on matrix multiplication operation, and operand is bigger.A kind of motion compensation process of prior art as shown in Figure 1.
Existing video code translator structure needs complete decoding to go out frame of video, and then coding.Part Useful Information such as motion vector in the code stream like this, coding mode can not be used in transcoding process once more.To cause transcoding need consume very big amount of calculation, in using in real time, face a lot of problems.
Based on frequency domain video transcoding structure, the conventional motion compensation method that it relates to needs a large amount of matrix multiplication operations, makes that like this transcoding structure arithmetic speed of frequency domain is slow, expends a large amount of calculating.
Summary of the invention
In order to solve the problems of the technologies described above, the present invention proposes a kind of frequency domain code-transferring method frequently, comprise step: input video stream is carried out partial decoding of h; Decoded results is carried out motion compensation, obtain the DCT coefficient block of decoded frame; It is down-sampled that the DCT coefficient block that obtains is carried out the DCT territory; To carry out motion compensation and part coding through down-sampled DCT coefficient block, obtain transcoded video stream; Wherein, in motion compensation process, carry out motion compensation according to the precision of motion vector.
In addition, the present invention also provides a kind of frequency domain video transcoder, comprising: a kind of frequency domain video transcoder comprises: decoder module, carry out partial decoding of h to input video stream; First motion compensating module carries out motion compensation to the output result of decoder module, obtains the DCT coefficient block of decoded frame; Down-sampled module is carried out the down-sampled processing in DCT territory to the DCT coefficient block of motion compensating module output; Second motion compensating module carries out motion compensation to the output of down-sampled module; And coding module, the part coding is carried out in the output of second motion compensating module, to obtain transcoded video stream; Wherein, in described first and second motion compensating modules, carry out motion compensation according to the precision of motion vector.
Utilization is according to frequency domain video code-transferring method of the present invention, can pack processing contains the motion compensation of half-pixel accuracy motion vector, and the compensation of whole pixel motion has identical way of realization with half-pixel motion compensation, is convenient to the programming realization.Motion compensation process according to the present invention is reduced to the form of a matrix multiple with four matrix multiples of conventional method with form, guarantee with conventional method under the strict condition of equivalence on the mathematics, save about 1/4 amount of calculation than traditional motion compensation process, accelerated transcoding speed greatly.
Description of drawings
Fig. 1 is the schematic diagram that shows prior art DCT territory motion compensation process.
Fig. 2 is the system configuration block diagram that shows according to frequency domain video transcoder of the present invention.
Fig. 3 shows the part of 110 parts among Fig. 1 and amplifies.
Fig. 4 is the flow chart that shows according to DCT of the present invention territory motion compensation process.
Embodiment
The video code flow of input has at first obtained motion vector and the irregular coefficient of frame DCT through 210 variable length decoding modules, 220 inverse quantization module.Irregular coefficient of DCT and the DCT coefficient addition that utilizes DCT territory motion compensating module 230 to obtain obtain the DCT coefficient of decoded frame.By DCT territory processing module 240, the DCT coefficient of decoded frame is carried out down-sampled, and send to 250 quantization modules and quantize, then through the video code flow behind the variable-length encoding module 260 output transcodings.Simultaneously, by 270 inverse quantization module and DCT territory motion compensating module 280, the reconstructed frame of output encoder.In motion compensating module 280, utilize the motion vector of 210 modules output, and the motion vector that utilizes motion vector Multiplexing module 290 to obtain encoding.
Wherein, in module 230,280, used DCT of the present invention territory motion compensation process, comprised whole pixel precision and half-pixel accuracy motion compensation, existing explanation respectively:
1) puts in order pixel precision DCT territory motion compensation process
As shown in Figure 1, the DCT territory conventional motion compensation method of whole pixel precision is that the DCT coefficient of compensation macro block is obtained by following formula:
B wherein
1, B
2, B
3And B
4Be respectively the DCT piece that will compensate overlapping four DCT piece coefficients on reference frame,
The DCT coefficient block that obtains for motion compensation.H
iAnd W
iBe the DCT form of translation matrix, translation matrix is for being that other elements all are zero matrix unit matrix except the matrix lower left corner or the upper right corner.
B, H and W are the matrix of 8 * 8 sizes.Therefore, motion compensation show as four and form, amount of calculation is big.
Method of the present invention is shown in the schematic diagram of Fig. 3, and Fig. 3 is that amplify 110 part among Fig. 1, at our algorithm it is redrawn.Suppose that the DCT piece that will compensate is overlapping according to four DCT pieces in motion vector and the reference frame, these four pieces constitute piece b.Piece b moves along the motion vector direction, and (h w), arrives and compensation block
Form piece b ' after the positions aligning of the upper left corner.B ' is represented by frame of broken lines shown in Figure 3.B ' obtains the piece that will compensate with blocking 8*8 piece that matrix m and n get its upper left corner on spatial domain
It is the oblique line part among Fig. 3.Said process can be with equation expression:
Here h (h) and w (w) are translation matrix, and its form is for being that other elements all are zero matrix unit matrix except the matrix lower left corner or the upper right corner:
Subscript h, the side-play amount of w representative motion.M and n are for blocking matrix, and its form is:
I
8It for size 8 unit matrix.Discrete cosine transform is done at formula (2) two ends respectively:
Equivalent transformation is:
Wherein B ' is 16 dct transform forms of b ', and is 8 * 88 point transformation forms in reference frame.Utilize transformation matrix T can finish four 8 * 8 conversions that transform to one 16 * 16 conversion:
According to formula (4), the motion compensation of frequency domain can obtain following form:
Here L is 8 * 16 matrix, and R is 16 * 8 matrix, and B is that four overlapping its sizes of piece are 16 * 16, wherein:
L=M·H
h·T
R=T
T·W
w·N
2) half-pixel accuracy motion compensation process
In the spatial domain, the half-pix interpolation is the mean value of the whole pixel of its adjacent locations.From the spatial domain frequency domain of deriving, the motion compensation of half-pixel position has the form identical with putting in order pixel.
Have for horizontal half-pix compensation:
Here, R
HWith similar being expressed as of above-mentioned R derivation mode:
R
w=T′*W′
w*N
W '
wBe W
wThe half-pix expression form, be W
wBe adjacent matrix W
W-1Average:
W′
w=(W
w+W
w-1)/2
Have for vertical half-pix compensation:
Wherein,
L
H=M*H′
h*T
With W '
wSimilar, H '
hFor:
H′
h=(H
h+H
h-1)/2
Compensation has for the diagonal angle half-pix:
Here, L
HBe 8 * 16 matrixes, R
HBe 16 * 8 matrixes.For code stream, utilize this method can carry out motion compensation fast equally with half-pix kinematic accuracy.
According to the flow chart of the method for the motion compensation in DCT of the present invention territory as shown in Figure 4.Among Fig. 4,, obtain the motion vector 402 of current block in step 402.Then,, calculate whole pixel and half-pix motion vector respectively according to motion vector in step 403, and calculate side-play amount (w, h) (step 404), thereby obtained overlapping region B.The level that draws according to decoding and the motion vector of vertical direction determine the precision of current motion vector.At the precision of different motion vectors, adopt whole pixel, horizontal direction half-pix, vertical direction half-pix and diagonal angle half-pix respectively, that is, use 409,410,411 and 412 modules to compensate respectively.At last the DCT coefficient of the current block after calculating is deposited in the reconstructed frame buffer memory.In step 414, judge whether to carry out the motion compensation of next piece, then continue if desired, otherwise withdraw from.
Frequency domain transcoder and frequency domain motion compensation process that this paper proposes are better than traditional motion compensation process from computation complexity.This method is applicable to the motion compensation of whole pixel and half-pixel accuracy, and whole pixel and half-pix compensation have unified form of calculation, and the program that is easy to realizes.
At the motion compensation of one 8 * 8 sub-piece, analysis mode (1) and formula (5) are added up its corresponding multiplying amount and the amount of addition operations respectively, and its result is as shown in table 1.Know that from table 1 its multiplying amount of method of the present invention is 70% of a conventional method, the amount of addition operations is 80% of a conventional method.When considering the CPU computing, multiplication expends more time than addition, and wherein the shared ratio of multiplication is great, so the inventive method amount of calculation is about 3/4 of a conventional method on the whole.
The required amount of calculation of piece of table 1 motion compensation compares
Addition (number of times) | Multiplication (number of times) | |
This method | 2880 | 3072 |
Conventional method | 3584 | 4096 |
Ratio | 80% | 75% |
Claims (7)
1. frequency domain video code-transferring method comprises step:
Input video stream is carried out partial decoding of h;
Decoded results is carried out motion compensation, obtain the DCT coefficient block of decoded frame;
It is down-sampled that the DCT coefficient block that obtains is carried out the DCT territory;
To carry out motion compensation and part coding through down-sampled DCT coefficient block, obtain transcoded video stream;
Wherein, in motion compensation process, carry out motion compensation according to the precision of motion vector.
2. the method for claim 1, wherein when carrying out motion compensation, according to the precision of motion vector, the mode that adopts the matrix connection to take advantage of obtains the coefficient block after the motion compensation.
3. method as claimed in claim 1 or 2, wherein, when the precision of motion vector during for whole pixel precision motion compensation, adopt following equation to obtain motion-compensated image block:
Wherein,
Be the DCT coefficient matrix that motion compensation obtains, B is the DCT coefficient matrix of original image, L=MH
hT, R=T
TW
wN, M and N are the dct transform forms of blocking matrix, H
hAnd W
wBe respectively the dct transform form of translation matrix, T is a transformation matrix.
4. method as claimed in claim 1 or 2, wherein, when the precision of motion vector is the whole pixel motion compensation of level half, adopt following equation to obtain motion-compensated image block:
Wherein,
Be the DCT coefficient matrix that motion compensation obtains, B is the DCT coefficient matrix of original image, L=MH
hT, R
w=T ' * W '
w* N, M and N are the dct transform forms of blocking matrix, W '
w=(W
w+ W
W-1)/2, H
h, Ww is respectively the dct transform form of translation matrix, T is a transformation matrix.
5. method as claimed in claim 1 or 2, wherein, when the precision of motion vector is vertical half whole pixel motion compensation, adopt following equation to obtain motion-compensated image block:
Wherein,
Be the DCT coefficient matrix that motion compensation obtains, B is the DCT coefficient matrix of original image, L
H=M*H '
h* T, H '
h=(H
h+ H
H-1)/2, M and N are the dct transform forms of blocking matrix, H
hWith Ww be respectively the dct transform form of translation matrix, T is a transformation matrix.
6. method as claimed in claim 1 or 2, wherein, when the precision of motion vector is the whole pixel motion compensation in diagonal angle half, adopt following equation to obtain motion-compensated image block:
Wherein,
Be the DCT coefficient matrix that motion compensation obtains, B is the DCT coefficient matrix of original image, L
H=M*H '
h* T, H '
h=(H
h+ H
H-1)/2, R
w=T ' * W '
w* N, W '
w=(W
w+ W
W-1)/2, M and N are the dct transform forms of blocking matrix, H
hWith Ww be respectively the dct transform form of translation matrix, T is a transformation matrix.
7. frequency domain video transcoder comprises:
Decoder module carries out partial decoding of h to input video stream;
First motion compensating module carries out motion compensation to the output result of decoder module, obtains the DCT coefficient block of decoded frame;
Down-sampled module is carried out the down-sampled processing in DCT territory to the DCT coefficient block of motion compensating module output;
Second motion compensating module carries out motion compensation to the output of down-sampled module; And
Coding module carries out the part coding to the output of second motion compensating module, to obtain transcoded video stream;
Wherein, in described first and second motion compensating modules, carry out motion compensation according to the precision of motion vector.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 200710097398 CN101309403A (en) | 2007-05-15 | 2007-05-15 | Frequency domain video transcoding method and transcoding device implementing the same |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 200710097398 CN101309403A (en) | 2007-05-15 | 2007-05-15 | Frequency domain video transcoding method and transcoding device implementing the same |
Publications (1)
Publication Number | Publication Date |
---|---|
CN101309403A true CN101309403A (en) | 2008-11-19 |
Family
ID=40125583
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 200710097398 Pending CN101309403A (en) | 2007-05-15 | 2007-05-15 | Frequency domain video transcoding method and transcoding device implementing the same |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101309403A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2012016354A1 (en) * | 2010-08-04 | 2012-02-09 | Nxp B.V. | Video player |
CN103098464A (en) * | 2010-08-04 | 2013-05-08 | Nxp股份有限公司 | Video decoder with down-sampler in the frequency domain |
-
2007
- 2007-05-15 CN CN 200710097398 patent/CN101309403A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2012016354A1 (en) * | 2010-08-04 | 2012-02-09 | Nxp B.V. | Video player |
CN103098464A (en) * | 2010-08-04 | 2013-05-08 | Nxp股份有限公司 | Video decoder with down-sampler in the frequency domain |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4006047B2 (en) | Image reduction sampling method | |
CN1697328B (en) | Fast video codec transform implementations | |
KR100965704B1 (en) | 2-d transforms for image and video coding | |
US7689052B2 (en) | Multimedia signal processing using fixed-point approximations of linear transforms | |
US8595281B2 (en) | Transforms with common factors | |
CN103098473A (en) | Low complexity transform coding using adaptive DCT/DST for intra-prediction | |
US20140010284A1 (en) | Image transform and inverse transform method, and image encoding and decoding device using same | |
CN101668207B (en) | Video coding switching system from MPEG to AVS | |
JP2008501250A (en) | Method for transcoding input video based on a first conversion kernel to output video based on a second conversion kernel, and transcoder for converting input video having an input format to output video having an output format | |
CN105474642A (en) | Re-encoding image sets using frequency-domain differences | |
US20090016623A1 (en) | Image processing device, image processing method and program | |
CN101765011B (en) | Method and device for scaling motion estimation | |
CN106878734A (en) | video coding/decoding method and video encoder/decoder | |
CN101309404A (en) | Resolution descending video transcoding method and transcoding device thereof | |
CN104937934A (en) | Autoregressive pixel prediction in the neighborhood of image borders | |
CN101083769B (en) | Coder/decoder and coding/decoding method for processing N bit video data | |
CN101299818A (en) | N level sub-pixel search method and apparatus based on whole pixel searching result | |
CN101309403A (en) | Frequency domain video transcoding method and transcoding device implementing the same | |
CN100440978C (en) | Video image coding method | |
CN1848960B (en) | Residual coding in compliance with a video standard using non-standardized vector quantization coder | |
JPH07143488A (en) | Method and device for decoding image data | |
CN102625109B (en) | Multi-core-processor-based moving picture experts group (MPEG)-2-H.264 transcoding method | |
CN100477795C (en) | Method for converting compressed domain video transcoding coefficient from MPEG-2 to H.264 | |
CN101729886B (en) | Method, system and device for decoding videos | |
CN102215404B (en) | Decoding method and system of videos inside embedded system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Open date: 20081119 |