CN102215404B - Decoding method and system of videos inside embedded system - Google Patents

Decoding method and system of videos inside embedded system Download PDF

Info

Publication number
CN102215404B
CN102215404B CN 201110132977 CN201110132977A CN102215404B CN 102215404 B CN102215404 B CN 102215404B CN 201110132977 CN201110132977 CN 201110132977 CN 201110132977 A CN201110132977 A CN 201110132977A CN 102215404 B CN102215404 B CN 102215404B
Authority
CN
China
Prior art keywords
macro block
frame
cos
compensation
result
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN 201110132977
Other languages
Chinese (zh)
Other versions
CN102215404A (en
Inventor
包国兴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
HT mMOBILE Inc
Original Assignee
HT mMOBILE Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by HT mMOBILE Inc filed Critical HT mMOBILE Inc
Priority to CN 201110132977 priority Critical patent/CN102215404B/en
Priority to TW100129016A priority patent/TW201249216A/en
Publication of CN102215404A publication Critical patent/CN102215404A/en
Application granted granted Critical
Publication of CN102215404B publication Critical patent/CN102215404B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a decoding method and system of videos inside an embedded system. The decoding method comprises the following steps of: extracting a 4*4 residual coefficient matrix from a 8*8 residual coefficient matrix of an ith frame of a video streaming by taking a DC (Direct Current) coefficient as an element at a first line and a first row; carrying out inverse quantization and inverse transformation on the 4*4 residual coefficient matrix to obtain a residual image of the video at the ith frame; carrying out motion compensation on the ith frame to obtain a motion compensation image of the video at the ith frame by taking an (i-1)th frame of the video reduced to a quarter of an original size as a reference frame and adopting the motion vectors of macro blocks positioned on various positions of the ith frame; and adding the motion compensation image and the residual image together to obtain the ith frame of the video reduced to a quarter of the original size and outputting the ith frame.

Description

The coding/decoding method of video and system in the embedded system
Technical field
The present invention relates to the information decoding field, relate in particular to coding/decoding method and the system of video in a kind of embedded system.
Background technology
Support the decoding of Sorenson Spark format video based on embedded platform portable terminal (as mobile phone) on, for the video of resolution greater than the resolution of player platform (as the display screen of mobile phone), because the available resources of processor are limited, make video be difficult to direct real-time decoding and play.
For addressing the above problem, prior art proposes following scheme:
Scheme one: carry out format conversion and play again.
The user adopts transcoder (Transcoder) software to convert above-mentioned video the resolution of playing platform at the computer machine, again the video copy behind the conversion resolution is carried out follow-up play on the entertainment applications terminal at last.
The inventor finds, need change earlier video preprocessor when playing above-mentioned video, and must change on computers, operates overelaboratedly, and can not support the online resolution of watching of user greater than the video of the resolution of playing platform.
Scheme two: directly carry out the convergent-divergent decoding.
Existing technology, for the situation of video resolution greater than the resolution of playing platform, employing be this video of complete decoding, then decoded picture is dwindled into the form that playing platform is supported, play again.
The inventor finds that adopt such processing mode, decoding calculating quantity is huge, causes decoding speed low, makes can occur pause in video display process, can't satisfy the purpose that big format video is play in real time.
Summary of the invention
Coding/decoding method and the system of video in a kind of embedded system provided by the invention, the technical problem that solve are slow at decoding speed in the embedded system in the prior art, are difficult to the problem that big format video is play in the real-time online decoding.
For solving the problems of the technologies described above, the invention provides following technical scheme:
The coding/decoding method of video in a kind of embedded system comprises:
It is the residual error coefficient matrix that the residual error coefficient matrix of 8x8 of element i frame from video flowing of first row first row extracts a 4x4 with the DC coefficient;
Residual error coefficient matrix to described 4x4 carries out inverse quantization and inverse transformation, obtains the residual image of the video of i frame;
Be reference frame with the i-1 frame that is reduced into original 1/4 video, adopt the motion vector of the macro block of each position in the i frame that described i frame is carried out motion compensation, obtain the motion compensated image of the video of i frame, with motion compensated image and residual image addition, obtain being reduced into i frame and the output of original 1/4 video.
Preferably, described method also has following characteristics: described inverse transformation is undertaken by following expression:
f ( x , y ) = 1 2 1 2 cos ( π 8 ) 1 2 1 2 cos ( 3 π 8 ) 1 2 1 2 cos ( 3 π 8 ) - 1 2 - 1 2 cos ( π 8 ) 1 2 - 1 2 cos ( 3 π 8 ) - 1 2 1 2 cos ( π 8 ) 1 2 - 1 2 cos ( π 8 ) 1 2 - 1 2 cos ( 3 π 8 ) F ( u , v ) 1 2 1 2 1 2 1 2 1 2 cos ( π 8 ) 1 2 cos ( 3 π 8 ) - 1 2 cos ( 3 π 8 ) - 1 2 cos ( π 8 ) 1 2 - 1 2 - 1 2 1 2 1 2 cos ( 3 π 8 ) - 1 2 cos ( π 8 ) 1 2 cos ( π 8 ) - 1 2 cos ( 3 π 8 )
Wherein, (μ v) is the residual error coefficient matrix of the 4x4 after the inverse quantization processing to F, and (x is y) for carrying out the matrix after inverse transformation is handled for f.
Preferably, described method also has following characteristics: adopt the motion vector of the macro block of each position in the i frame that described i frame is carried out motion compensation, comprising:
The motion vector of the macro block of each position in the described i frame is done processing divided by 2, obtain result, with the integer part of the described result size as the target motion vectors of the macro block of this position;
Adopt the target motion vectors of the macro block of each position in the described i frame to carry out motion compensation.
Preferably, described method also has following characteristics: adopt the target motion vectors of the macro block of each position in the described i frame to carry out motion compensation, comprising:
The result of motion vector is included the macro block of fractional part as macro block to be compensated, the motion vector of described macro block to be compensated is carried out vector compensation divided by the result after 2, be compensated the result, with described compensation result as revised target motion vectors;
Carry out motion compensation according to revised target motion vectors.
Preferably, described method also has following characteristics: the motion vector of described macro block to be compensated is carried out vector compensation divided by the result after 2, be compensated the result, described compensation result as revised target motion vectors, being comprised:
On the nearest frame of judging distance i frame whether the macro block that satisfies following condition is simultaneously arranged, comprising:
Condition 1: with the macro block of described macro block co-located to be compensated;
Condition 2: motion vector includes the macro block of fractional part divided by the result after 2;
Condition 3: never carry out the macro block that vector compensation is handled;
If have, the macro block that then will satisfy above-mentioned condition simultaneously is macro block by way of compensation, the motion vector of described macro block to be compensated is carried out vector superposed operation divided by the motion vector of the fractional part in the result of the motion vector of the result after 2 and described compensation macro block, obtain described compensation result, with described compensation result as revised target motion vectors.
Preferably, described method also has following characteristics: adopt the motion vector of the macro block of each position in the i frame that described i frame is carried out motion compensation, comprising:
Adopt the motion vector of the macro block of each position in the described i frame that described i frame is carried out the motion compensation of bilinear interpolation.
The decode system of video in a kind of embedded system comprises:
Draw-out device, being used for the DC coefficient is that the element of first row, first row is from the residual error coefficient matrix of the 4x4 of residual error coefficient matrix extraction of the 8x8 of video flowing i frame;
Inverse quantization device is used for the residual error coefficient matrix of described 4x4 is carried out inverse quantization;
Inverse transformation device is used for carrying out the inverse transformation processing for the residual error coefficient matrix of the 4x4 after the inverse quantization processing, obtains the residual image of the video of i frame;
Motion compensation unit, the i-1 frame that is used for to be reduced into original 1/4 video is reference frame, adopts the motion vector of the macro block of each position in the i frame that described i frame is carried out motion compensation, obtains the motion compensated image of the video of i frame;
Output device is used for motion compensated image and residual image addition, obtains being reduced into the i frame of original 1/4 video and exports.
Preferably, described system also has following characteristics: described inverse transformation device is that the residual error coefficient matrix of the 4x4 after by following expression described inverse quantization being handled carries out inverse transformation:
f ( x , y ) = 1 2 1 2 cos ( π 8 ) 1 2 1 2 cos ( 3 π 8 ) 1 2 1 2 cos ( 3 π 8 ) - 1 2 - 1 2 cos ( π 8 ) 1 2 - 1 2 cos ( 3 π 8 ) - 1 2 1 2 cos ( π 8 ) 1 2 - 1 2 cos ( π 8 ) 1 2 - 1 2 cos ( 3 π 8 ) F ( u , v ) 1 2 1 2 1 2 1 2 1 2 cos ( π 8 ) 1 2 cos ( 3 π 8 ) - 1 2 cos ( 3 π 8 ) - 1 2 cos ( π 8 ) 1 2 - 1 2 - 1 2 1 2 1 2 cos ( 3 π 8 ) - 1 2 cos ( π 8 ) 1 2 cos ( π 8 ) - 1 2 cos ( 3 π 8 )
Wherein, (μ v) is the residual error coefficient matrix of the 4x4 after the inverse quantization processing to F, and (x is y) for carrying out the matrix after inverse transformation is handled for f.
Preferably, described system also has following characteristics: described motion compensation unit comprises:
Acquisition module is used for the motion vector of the macro block of each position of described i frame is done processing divided by 2, obtains result, with the integer part of the described result size as the target motion vectors of the macro block of this position;
Compensating module, the target motion vectors that is used for the macro block of each position of the described i frame of employing is carried out motion compensation.
Preferably, described system also has following characteristics: described compensating module comprises:
Revise submodule, be used for the result of motion vector is included the macro block of fractional part as macro block to be compensated, the motion vector of described macro block to be compensated is carried out vector compensation divided by the result after 2, is compensated the result, with described compensation result as revised target motion vectors;
The compensation submodule is used for carrying out motion compensation according to revised target motion vectors.
Preferably, described system also has following characteristics: described compensation submodule comprises:
Judging unit is used on the nearest frame of judging distance i frame whether the macro block that satisfies following condition simultaneously being arranged, and comprising:
Condition 1: with the macro block of described macro block co-located to be compensated;
Condition 2: motion vector includes the macro block of fractional part divided by the result after 2;
Condition 3: never carry out the macro block that vector compensation is handled;
Amending unit, be used in described judgment unit judges sometimes, with the macro block that satisfies above-mentioned condition simultaneously macro block by way of compensation, the motion vector of described macro block to be compensated is carried out vector superposed operation divided by the motion vector of the fractional part in the result of the motion vector of the result after 2 and described compensation macro block, obtain described compensation result, with described compensation result as revised target motion vectors.
Preferably, described system also has following characteristics:
Described motion compensation unit, the motion vector that is used for the macro block of each position of the described i frame of employing carries out the motion compensation of bilinear interpolation to described i frame.
A plurality of embodiment provided by the invention, by extracting the residual error coefficient matrix of important residual error coefficient structure 4x4, make that the amount of calculation of the follow-up inverse quantization that carries out and idct transform operation only is original 1/4, reduced the amount of calculation of video decode, improved decoding speed, it is original 1/4 that decoded two field picture size has been become, and reaches the purpose of dwindling video image, satisfied the application demand of real-time decoding video image.
Description of drawings
The schematic flow sheet of the coding/decoding method embodiment of video in the embedded system that Fig. 1 provides for the embodiment of the invention one;
Fig. 2 is the structural representation of the decode system embodiment of video in the embedded system provided by the invention;
Fig. 3 is the structural representation of middle motion compensation unit 204 embodiment illustrated in fig. 2;
Fig. 4 is the structural representation of middle compensating module 302 embodiment illustrated in fig. 3;
Fig. 5 is the middle structural representation of revising submodule 401 embodiment illustrated in fig. 4.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, the present invention is described in further detail below in conjunction with the accompanying drawings and the specific embodiments.Need to prove that under the situation of not conflicting, the embodiment among the application and the feature among the embodiment be combination in any mutually.
Embodiment one
The schematic flow sheet of the coding/decoding method embodiment of video in the embedded system that Fig. 1 provides for the embodiment of the invention one.Method embodiment shown in Figure 1 comprises:
The motion vector of the macro block of each position in step 101, the 8x8 residual error coefficient matrix that obtains i frame in the video flowing and the described i frame.
For example, carry out the entropy decoding by the code stream to i frame in the video flowing and obtain above-mentioned information.
Step 102, be the element of first row first row extracts a 4x4 from the residual error coefficient matrix of described 8x8 residual error coefficient matrix with the DC coefficient.
Coefficient in the residual error coefficient matrix of wherein said 4x4 except the DC coefficient is 15 nearest with the DC coefficient in the residual error coefficient matrix of 8x8 AC coefficients, and these 15 AC coefficients in the residual error coefficient matrix of 4x4 with respect to the azimuth-range of DC coefficient identical with in the residual error coefficient matrix of 8x8.
The residual error coefficient matrix of the following 8x8 of being followed successively by and the residual error coefficient matrix that extracts the corresponding 4x4 that obtains behind the coefficient:
Figure GDA00002856271400071
DC AC 01 AC 02 AC 03 AC 10 AC 11 AC 12 AC 13 AC 20 AC 21 AC 22 AC 23 AC 30 AC 31 AC 32 AC 33
By reducing the number of element in the residual error coefficient matrix, can effectively reduce the amount of calculation of follow-up IDCT part and sport interpolation compensated part, and because image detail mainly concentrates on the position near the DC coefficient, keep the image detail that can maximum minimizing dwindles to lose in the process with nearest 15 parameters of DC coefficient, guarantee picture quality.
Step 103, the residual error coefficient matrix of described 4x4 is carried out inverse quantization;
The residual error coefficient matrix of step 104, the 4x4 after inverse quantization handled carries out inverse transformation, obtains the residual image of the video of i frame, specifically comprises:
f ( x , y ) = 1 2 1 2 cos ( π 8 ) 1 2 1 2 cos ( 3 π 8 ) 1 2 1 2 cos ( 3 π 8 ) - 1 2 - 1 2 cos ( π 8 ) 1 2 - 1 2 cos ( 3 π 8 ) - 1 2 1 2 cos ( π 8 ) 1 2 - 1 2 cos ( π 8 ) 1 2 - 1 2 cos ( 3 π 8 ) F ( u , v ) 1 2 1 2 1 2 1 2 1 2 cos ( π 8 ) 1 2 cos ( 3 π 8 ) - 1 2 cos ( 3 π 8 ) - 1 2 cos ( π 8 ) 1 2 - 1 2 - 1 2 1 2 1 2 cos ( 3 π 8 ) - 1 2 cos ( π 8 ) 1 2 cos ( π 8 ) - 1 2 cos ( 3 π 8 )
Wherein, (μ v) is the residual error coefficient matrix of the 4x4 of inverse quantization to F, and (x y) carries out matrix after inverse transformation is handled for the residual error coefficient matrix of the 4x4 after inverse quantization is handled to f.
Be the 4x4 matrix through the matrix exported after the inverse transformation, totally 16 residual error coefficients have been realized the purpose of downscaled images.
Step 105, the motion vector of the macro block of each position in the described i frame is done processing divided by 2, obtain result, with the integer part of the described result size as the target motion vectors of the macro block of this position;
Step 106, with the i-1 frame that is reduced into original 1/4 video as the reference frame, adopt described target motion vectors that the i frame is carried out motion compensation, obtain motion compensated image;
Wherein, motion compensation mainly is to carry out interpolation according to motion vector, and interpolation method is the method for standard code, but the size of IOB becomes output 8x8 piece by original 16x16.Here use the choice criteria algorithm, can not increase the complexity of interpolation algorithm on the one hand, calculate simply on the other hand, the piece of exporting 8x8 simultaneously can reduce amount of calculation, realizes the decoding convergent-divergent.
Step 107, with motion compensated image and residual image addition, obtain being reduced into i frame and the output of original 1/4 video.
Wherein in the above-mentioned steps, step 102~104 do not have tangible execution sequence with step 105~106.
Need to prove, after extraction and idct transform through the conversion residual error coefficient, the image of I frame decoding reconstruct has been wide and high-shrinkage image half as large, when i frame during as the reference frame of i+1 frame, need carry out dwindling in proportion to the motion vector of i frame.The reference frame that reconstruct is finished need carry out interim storage, unlike the prior art be that the memory space that needs is reduced into 1/4 of canonical solution code space.
The technical scheme that the embodiment of the invention one provides, by extracting the residual error coefficient matrix of important residual error coefficient structure 4x4, the data volume that makes the follow-up inverse quantization that carries out, idct transform and operation of motion compensation calculate only is 1/4 of original data volume, reduced the data volume of decoding, improved decoding speed, it is original 1/4 to make also that simultaneously the size of decoded frame image has become, and reaches the purpose of dwindling video image, has satisfied the application demand of real-time decoding video image.
Embodiment two
Because in the step 106, the reconstruct of i frame need use the i-1 frame of having decoded the front as the reference frame, compare with the i-1 frame that coding side uses, the i-1 frame of reconstruct wide and high is half of coding side i-1 frame, so when carrying out the motion compensation of i frame, the motion vector that the decoding of each macro block need be obtained is divided by two, namely is reduced into original half, compensates with the motion vector after dwindling.The reconstruct of same i-1 frame also is processing like this.If the size of motion vector is odd number, motion vector divided by two processing in, the motion vector that has half-pixel is lost, and causes the error of motion vector precision.After handling multiframe, the motion vector accumulation of losing is more and more, and the image after feasible the dwindling has when playing beats, and influences the video playback effect.Therefore after the step 105 among the embodiment one, also comprise:
Steps A, the result of motion vector is included the macro block of fractional part as macro block to be compensated, the motion vector of described macro block to be compensated is carried out vector compensation divided by the result after 2, be compensated the result, with described compensation result as revised target motion vectors;
Accordingly, step 106 can adopt revised target motion vectors to carry out motion compensation among the embodiment one.
Wherein preferably, in the following way macro block to be compensated is carried out vector compensation, comprising:
On the nearest frame of steps A 1, judging distance i frame whether the macro block that satisfies following condition is simultaneously arranged, comprising:
Condition 1: with the macro block of described macro block co-located to be compensated;
Condition 2: motion vector includes the macro block of fractional part divided by the result after 2;
Condition 3: never carry out the macro block that vector compensation is handled;
If steps A 2 has, the macro block that then will satisfy above-mentioned condition simultaneously is macro block by way of compensation, the motion vector of described macro block to be compensated is carried out vector superposed operation divided by the motion vector of the fractional part in the result of the motion vector of the result after 2 and described compensation macro block, obtain described compensation result, with described compensation result as revised target motion vectors.
At first to how selecting compensating macro block describe:
This compensation macro block should belong to the frame before the i frame, and the position in frame is identical in the position of i frame with this macro block to be compensated; The result of the motion vector of this compensating module after divided by 2 should include fractional part in addition, and namely size is the motion vector of half-pixel; Also will not carry out vector compensation, namely this compensation macro block has abandoned the motion vector of half-pixel in movement compensation process.
Below describe with the vector compensation of the macro block to be compensated of a certain position:
Situation 1: if the motion vector of macro block to be compensated divided by after 2 result direction vector and compensation macro block motion vector divided by after 2 the direction vector of result identical, carry out vector superposed divided by the motion vector of the fractional part in the result after 2 and macro block to be compensated divided by the result after 2 motion vector of compensation macro block, then make the motion vector of macro block to be compensated increase the motion vector of half-pixel divided by the result after 2, become the result that does not have fractional part, realized simultaneously the compensation of the motion vector on the i frame, the compensation macro block lost again;
On the contrary, if the motion vector of macro block to be compensated divided by after 2 result direction vector and compensation macro block motion vector divided by after 2 the direction vector of result opposite, carry out vector superposed divided by the motion vector of the fractional part in the result after 2 and macro block to be compensated divided by the result after 2 motion vector of compensation macro block, then make the motion vector of macro block to be compensated lose the motion vector of half-pixel divided by the result after 2, become the result that does not have fractional part, realized simultaneously the compensation of the motion vector on the i frame, the compensation macro block lost again; Be that the motion vector information that the macro block of same position is lost has been cancelled out each other.
Wherein among the present invention, the motion vector of compensation macro block is called vector compensation divided by the motion vector of the fractional part in the result after 2 and macro block to be compensated divided by the process that the result after 2 superposes.
Situation 2: to the macro block in the i frame, be reduced into the situation that does not have motion vector information to lose for an original half at motion vector, then the motion vector information of losing in the i-1 frame is compensated to the co-located macro block of i frame other frames afterwards, to finish the compensation deals to the motion vector information of losing on the i-1 frame.Can be understood as when first co-located macro block has the frame of the motion vector of losing after the i frame, this frame and i-1 frame are compensated processing.
In actual applications, can handle by adopting following formula:
Mv=(sign(Mv_prev))(1)*(Mv_prev&1)+Mv_vlc
In the formula, Mv_prev is the true motion vector (being that decoded stream obtains motion vector) of macro block to be compensated, opens up such buffer specially and preserve the motion vector that each macro block decoded stream obtains in program.Mv_vlc is the true motion vector (also opening up buffer specially stores) that compensation macro block decoded stream obtains.Mv is the motion vector of the macro block to be compensated behind the vector compensation, directly covers Mv_vlc during storage, and the vector compensation that is used for the motion vector of macro block to be compensated calculates.Mv is divided by the motion vector of the result who obtains after 2 for using in the interpolation compensation, and this motion vector does not need to preserve.Sign (Mv_prev) is the symbol that obtains the former frame macroblock motion vector, Mv_prev﹠amp; The 1st, obtain the decimal place of motion vector of compensation macro block.Because the motion vector precision is half-pix herein, so in program, be 1 o'clock with lowest bit bit representation 0.5(lowest order) or the 0(lowest order be 0 o'clock) pixel motion vector.
By top formula, the fractional part motion vector that realization is lost with the previous frame macro block, the purpose of the motion vector of compensation present frame macro block.
Macro block by same position on subsequent frame carries out the compensation of the motion vector information lost in the previous frame, can reduce the amount lost of motion vector information, avoids occurring the problem that video pictures is beated.
Embodiment three
Different with embodiment one and two is that in order to reach the purpose of decoding video images, present embodiment has adopted following means:
Step B1, be the residual error coefficient matrix that the residual error coefficient matrix of 8x8 of element i frame from video flowing of first row first row extracts a 4x4 with the DC coefficient;
Step B2, the residual error coefficient matrix of described 4x4 is carried out inverse quantization and inverse transformation, obtain the thumbnail image of image in the i frame;
Step B3, to be reduced into original 1/4 i-1 frame with video be reference frame, adopts the motion vector of the macro block of each position in the described i frame that described i frame is carried out the motion compensation of bilinear interpolation, and the result of output movement compensation.
The motion vector of the macro block of each position is original motion vector when wherein carrying out the motion compensation of bilinear interpolation.
Need to prove that embodiment one to three is that example describes with Sorenson Spark standard decoding framework, but is not limited thereto, for MPEG4SP and H.263 the decoding processing framework of standard use equally, because method and flow process are similar, repeat no more herein.
Fig. 2 is the structural representation of the decode system embodiment of video in the embedded system provided by the invention.System shown in Figure 2 embodiment comprises:
Draw-out device 201, being used for the DC coefficient is that the element of first row, first row is from the residual error coefficient matrix of the 4x4 of residual error coefficient matrix extraction of the 8x8 of video flowing i frame;
Inverse quantization device 202 links to each other with described abstraction module 201, is used for the residual error coefficient matrix of described 4x4 is carried out inverse quantization;
Inverse transformation device 203 links to each other with described inverse quantization module 202, is used for carrying out the inverse transformation processing for the residual error coefficient matrix of the 4x4 after the inverse quantization processing, obtains the residual image of the video of i frame;
Motion compensation unit 204, the i-1 frame that is used for to be reduced into original 1/4 video is reference frame, adopts the motion vector of the macro block of each position in the i frame that described i frame is carried out motion compensation, obtains the motion compensated image of the video of i frame;
The output module device links to each other with described motion compensating module 204 with described inverse transform block 203, is used for motion compensated image and residual image addition, obtains being reduced into the i frame of original 1/4 video and exports.
Wherein, the residual error coefficient matrix of the 4x4 after described inverse transformation device can be handled described inverse quantization by following expression carries out inverse transformation, but the expression formula of inverse transformation is not limited in this:
f ( x , y ) = 1 2 1 2 cos ( π 8 ) 1 2 1 2 cos ( 3 π 8 ) 1 2 1 2 cos ( 3 π 8 ) - 1 2 - 1 2 cos ( π 8 ) 1 2 - 1 2 cos ( 3 π 8 ) - 1 2 1 2 cos ( π 8 ) 1 2 - 1 2 cos ( π 8 ) 1 2 - 1 2 cos ( 3 π 8 ) F ( u , v ) 1 2 1 2 1 2 1 2 1 2 cos ( π 8 ) 1 2 cos ( 3 π 8 ) - 1 2 cos ( 3 π 8 ) - 1 2 cos ( π 8 ) 1 2 - 1 2 - 1 2 1 2 1 2 cos ( 3 π 8 ) - 1 2 cos ( π 8 ) 1 2 cos ( π 8 ) - 1 2 cos ( 3 π 8 )
Wherein, (μ v) is the residual error coefficient matrix of the 4x4 of inverse quantization to F, and (x is y) for carrying out the matrix after inverse transformation is handled for f.
Fig. 3 is the structural representation of middle motion compensation unit 204 embodiment illustrated in fig. 2.Motion compensation unit 204 shown in Figure 3 comprises:
Acquisition module 301 is used for the motion vector of the macro block of each position of described i frame is done processing divided by 2, obtains result, with the integer part of the described result size as the target motion vectors of the macro block of this position;
Compensating module 302 links to each other with described acquisition module 301, and the target motion vectors that is used for the macro block of each position of the described i frame of employing is carried out motion compensation.
Fig. 4 is the structural representation of middle compensating module 302 embodiment illustrated in fig. 3.Compensating module 302 shown in Figure 3 comprises:
Revise submodule 401, be used for the result of motion vector is included the macro block of fractional part as macro block to be compensated, the motion vector of described macro block to be compensated is carried out vector compensation divided by the result after 2, be compensated the result, with described compensation result as revised target motion vectors;
Compensation submodule 402 links to each other with described correction submodule, is used for carrying out motion compensation according to revised target motion vectors.
Fig. 5 is the middle structural representation of revising submodule 401 embodiment illustrated in fig. 4.Correction submodule 401 shown in Figure 5 comprises:
Judging unit 501 is used on the nearest frame of judging distance i frame whether the macro block that satisfies following condition simultaneously being arranged, and comprising:
Condition 1: with the macro block of described macro block co-located to be compensated;
Condition 2: motion vector includes the macro block of fractional part divided by the result after 2;
Condition 3: never carry out the macro block that vector compensation is handled;
Amending unit 502, link to each other with described selected cell, be used in described judgment unit judges sometimes, with the macro block that satisfies above-mentioned condition simultaneously macro block by way of compensation, the motion vector of described macro block to be compensated is carried out vector superposed operation divided by the motion vector of the fractional part in the result of the motion vector of the result after 2 and described compensation macro block, obtain described compensation result, with described compensation result as revised target motion vectors.
Optionally, described motion compensation unit, the motion vector that is used for the macro block of each position of the described i frame of employing carries out the motion compensation of bilinear interpolation to described i frame.
System embodiment provided by the invention, by extracting the residual error coefficient matrix of important residual error coefficient structure 4x4, make that the amount of calculation of the follow-up inverse quantization that carries out and idct transform operation only is original 1/4, reduced the amount of calculation of video decode, improved decoding speed, it is original 1/4 that decoded two field picture size has been become, and reaches the purpose of dwindling video image, satisfied the application demand of real-time decoding video image.
In addition, the present invention also can at first obtain the 16x16 residual error coefficient matrix of i frame in the video flowing, and improves decoding speed by extracting operations such as important residual error coefficient, inverse quantization and idct transform, reaches the purpose of dwindling video image.For succinctly, omit the description of specific implementation.
The all or part of step that one of ordinary skill in the art will appreciate that above-described embodiment can use the computer program flow process to realize, described computer program can be stored in the computer-readable recording medium, described computer program (as system, unit, device etc.) on corresponding hardware platform is carried out, when carrying out, comprise one of step or its combination of method embodiment.
Alternatively, all or part of step of above-described embodiment also can use integrated circuit to realize, these steps can be made into integrated circuit modules one by one respectively, perhaps a plurality of modules in them or step is made into the single integrated circuit module and realizes.Like this, the present invention is not restricted to any specific hardware and software combination.
Each device/functional module/functional unit in above-described embodiment can adopt the general calculation device to realize, they can concentrate on the single calculation element, also can be distributed on the network that a plurality of calculation elements form.
Each device/functional module/functional unit in above-described embodiment is realized with the form of software function module and during as independently production marketing or use, can be stored in the computer read/write memory medium.The above-mentioned computer read/write memory medium of mentioning can be read-only memory, disk or CD etc.
The above; only be the specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, anyly is familiar with those skilled in the art in the technical scope that the present invention discloses; can expect easily changing or replacing, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the described protection range of claim.

Claims (12)

1. the coding/decoding method of video in the embedded system is characterized in that, comprising:
Be that the element of first row first row 8 * 8 residual error coefficient matrix of i frame from video flowing extracts one 4 * 4 residual error coefficient matrix with the DC coefficient;
Residual error coefficient matrix to described 4 * 4 carries out inverse quantization and inverse transformation, obtains the residual image of the video of i frame;
Be reference frame with the i-1 frame that is reduced into original 1/4 video, adopt the motion vector of the macro block of each position in the i frame that described i frame is carried out motion compensation, obtain the motion compensated image of the video of i frame, with motion compensated image and residual image addition, obtain being reduced into i frame and the output of original 1/4 video.
2. method according to claim 1 is characterized in that, described inverse transformation is undertaken by following expression:
f ( x , y ) = 1 2 1 2 cos ( π 8 ) 1 2 1 2 cos ( 3 π 8 ) 1 2 1 2 cos ( 3 π 8 ) - 1 2 - 1 2 cos ( π 8 ) 1 2 - 1 2 cos ( 3 π 8 ) - 1 2 1 2 cos ( π 8 ) 1 2 - 1 2 cos ( π 8 ) 1 2 - 1 2 cos ( 3 π 8 ) F ( u , v ) 1 2 1 2 1 2 1 2 1 2 cos ( π 8 ) 1 2 cos ( 3 π 8 ) - 1 2 cos ( 3 π 8 ) - 1 2 cos ( π 8 ) 1 2 - 1 2 - 1 2 1 2 1 2 cos ( 3 π 8 ) - 1 2 cos ( π 8 ) 1 2 cos ( π 8 ) - 1 2 cos ( 3 π 8 )
Wherein, (μ v) is the residual error coefficient matrix of 4 * 4 after the inverse quantization processing to F, and (x is y) for carrying out the matrix after inverse transformation is handled for f.
3. method according to claim 1 is characterized in that, adopts the motion vector of the macro block of each position in the i frame that described i frame is carried out motion compensation, comprising:
The motion vector of the macro block of each position in the described i frame is done processing divided by 2, obtain result, with the integer part of the described result size as the target motion vectors of the macro block of this position;
Adopt the target motion vectors of the macro block of each position in the described i frame to carry out motion compensation.
4. method according to claim 3 is characterized in that, adopts the target motion vectors of the macro block of each position in the described i frame to carry out motion compensation, comprising:
The result of motion vector is included the macro block of fractional part as macro block to be compensated, the motion vector of described macro block to be compensated is carried out vector compensation divided by the result after 2, be compensated the result, with described compensation result as revised target motion vectors;
Carry out motion compensation according to revised target motion vectors.
5. method according to claim 4 is characterized in that, the motion vector of described macro block to be compensated is carried out vector compensation divided by the result after 2, is compensated the result, and described compensation result as revised target motion vectors, being comprised:
On the nearest frame of judging distance i frame whether the macro block that satisfies following condition is simultaneously arranged, comprising:
Condition 1: with the macro block of described macro block co-located to be compensated;
Condition 2: motion vector includes the macro block of fractional part divided by the result after 2;
Condition 3: never carry out the macro block that vector compensation is handled;
If have, the macro block that then will satisfy above-mentioned condition simultaneously is macro block by way of compensation, the motion vector of described macro block to be compensated is carried out vector superposed operation divided by the motion vector of the fractional part in the result of the motion vector of the result after 2 and described compensation macro block, obtain described compensation result, with described compensation result as revised target motion vectors.
6. method according to claim 1 is characterized in that, adopts the motion vector of the macro block of each position in the i frame that described i frame is carried out motion compensation, comprising:
Adopt the motion vector of the macro block of each position in the described i frame that described i frame is carried out the motion compensation of bilinear interpolation.
7. the decode system of video in the embedded system is characterized in that, comprising:
Draw-out device, being used for the DC coefficient is that the element of first row, first row extracts one 4 * 4 residual error coefficient matrix from 8 * 8 residual error coefficient matrix of video flowing i frame;
Inverse quantization device, the residual error coefficient matrix that is used for described 4 * 4 carries out inverse quantization;
Inverse transformation device is used for carrying out the inverse transformation processing for the residual error coefficient matrix of 4 * 4 after the inverse quantization processing, obtains the residual image of the video of i frame;
Motion compensation unit, the i-1 frame that is used for to be reduced into original 1/4 video is reference frame, adopts the motion vector of the macro block of each position in the i frame that described i frame is carried out motion compensation, obtains the motion compensated image of the video of i frame;
Output device is used for motion compensated image and residual image addition, obtains being reduced into the i frame of original 1/4 video and exports.
8. system according to claim 7 is characterized in that, described inverse transformation device is that the residual error coefficient matrix of 4 * 4 after by following expression described inverse quantization being handled carries out inverse transformation:
f ( x , y ) = 1 2 1 2 cos ( π 8 ) 1 2 1 2 cos ( 3 π 8 ) 1 2 1 2 cos ( 3 π 8 ) - 1 2 - 1 2 cos ( π 8 ) 1 2 - 1 2 cos ( 3 π 8 ) - 1 2 1 2 cos ( π 8 ) 1 2 - 1 2 cos ( π 8 ) 1 2 - 1 2 cos ( 3 π 8 ) F ( u , v ) 1 2 1 2 1 2 1 2 1 2 cos ( π 8 ) 1 2 cos ( 3 π 8 ) - 1 2 cos ( 3 π 8 ) - 1 2 cos ( π 8 ) 1 2 - 1 2 - 1 2 1 2 1 2 cos ( 3 π 8 ) - 1 2 cos ( π 8 ) 1 2 cos ( π 8 ) - 1 2 cos ( 3 π 8 )
Wherein, (μ v) is the residual error coefficient matrix of 4 * 4 after the inverse quantization processing to F, and (x is y) for carrying out the matrix after inverse transformation is handled for f.
9. system according to claim 7 is characterized in that, described motion compensation unit comprises:
Acquisition module is used for the motion vector of the macro block of each position of described i frame is done processing divided by 2, obtains result, with the integer part of the described result size as the target motion vectors of the macro block of this position;
Compensating module, the target motion vectors that is used for the macro block of each position of the described i frame of employing is carried out motion compensation.
10. system according to claim 9 is characterized in that, described compensating module comprises:
Revise submodule, be used for the result of motion vector is included the macro block of fractional part as macro block to be compensated, the motion vector of described macro block to be compensated is carried out vector compensation divided by the result after 2, is compensated the result, with described compensation result as revised target motion vectors;
The compensation submodule is used for carrying out motion compensation according to revised target motion vectors.
11. system according to claim 10 is characterized in that, described compensation submodule comprises:
Judging unit is used on the nearest frame of judging distance i frame whether the macro block that satisfies following condition simultaneously being arranged, and comprising:
Condition 1: with the macro block of described macro block co-located to be compensated;
Condition 2: motion vector includes the macro block of fractional part divided by the result after 2;
Condition 3: never carry out the macro block that vector compensation is handled;
Amending unit, be used in described judgment unit judges sometimes, with the macro block that satisfies above-mentioned condition simultaneously macro block by way of compensation, the motion vector of described macro block to be compensated is carried out vector superposed operation divided by the motion vector of the fractional part in the result of the motion vector of the result after 2 and described compensation macro block, obtain described compensation result, with described compensation result as revised target motion vectors.
12. system according to claim 7 is characterized in that:
Described motion compensation unit, the motion vector that is used for the macro block of each position of the described i frame of employing carries out the motion compensation of bilinear interpolation to described i frame.
CN 201110132977 2011-05-20 2011-05-20 Decoding method and system of videos inside embedded system Active CN102215404B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN 201110132977 CN102215404B (en) 2011-05-20 2011-05-20 Decoding method and system of videos inside embedded system
TW100129016A TW201249216A (en) 2011-05-20 2011-08-16 Method for video decoding in an embedded system and system thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201110132977 CN102215404B (en) 2011-05-20 2011-05-20 Decoding method and system of videos inside embedded system

Publications (2)

Publication Number Publication Date
CN102215404A CN102215404A (en) 2011-10-12
CN102215404B true CN102215404B (en) 2013-07-10

Family

ID=44746498

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201110132977 Active CN102215404B (en) 2011-05-20 2011-05-20 Decoding method and system of videos inside embedded system

Country Status (2)

Country Link
CN (1) CN102215404B (en)
TW (1) TW201249216A (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
SG11201408336RA (en) * 2012-07-02 2015-02-27 Samsung Electronics Co Ltd Method and apparatus for entropy coding video and method and apparatus for entropy decoding video
CN111147954A (en) * 2019-12-30 2020-05-12 北京奇艺世纪科技有限公司 Thumbnail extraction method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1204207A (en) * 1997-06-26 1999-01-06 三星电子株式会社 Image format converter and method therefor
CN1866244A (en) * 2006-06-23 2006-11-22 浙江大学 Adaptive display method for graphic image in cooperative design in pervasive environment
CN101710994A (en) * 2009-12-17 2010-05-19 北京中星微电子有限公司 Method and system for video decoding
WO2010067668A1 (en) * 2008-12-08 2010-06-17 シャープ株式会社 Image encoder and image decoder
CN101888549A (en) * 2010-06-18 2010-11-17 浙江大学 Intra-frame 4*4 forecasting model selection method based on transform domain information
WO2011053020A2 (en) * 2009-10-28 2011-05-05 Samsung Electronics Co., Ltd. Method and apparatus for encoding residual block, and method and apparatus for decoding residual block

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1204207A (en) * 1997-06-26 1999-01-06 三星电子株式会社 Image format converter and method therefor
CN1866244A (en) * 2006-06-23 2006-11-22 浙江大学 Adaptive display method for graphic image in cooperative design in pervasive environment
WO2010067668A1 (en) * 2008-12-08 2010-06-17 シャープ株式会社 Image encoder and image decoder
WO2011053020A2 (en) * 2009-10-28 2011-05-05 Samsung Electronics Co., Ltd. Method and apparatus for encoding residual block, and method and apparatus for decoding residual block
CN101710994A (en) * 2009-12-17 2010-05-19 北京中星微电子有限公司 Method and system for video decoding
CN101888549A (en) * 2010-06-18 2010-11-17 浙江大学 Intra-frame 4*4 forecasting model selection method based on transform domain information

Also Published As

Publication number Publication date
CN102215404A (en) 2011-10-12
TW201249216A (en) 2012-12-01

Similar Documents

Publication Publication Date Title
TWI572196B (en) Projected interpolation prediction generation for next generation video coding
US7623575B2 (en) Method and apparatus for sub-pixel motion compensation
JP6163674B2 (en) Content adaptive bi-directional or functional predictive multi-pass pictures for highly efficient next-generation video coding
CN100553321C (en) The coding dynamic filter
KR100995205B1 (en) Processing video data
CN101360238B (en) Image processing device, image processing method
US20240098298A1 (en) Segmentation-based parameterized motion models
CN102369730B (en) Moving picture encoding device, dynamic image decoding device, motion image encoding method and dynamic image decoding method
CN101765011B (en) Method and device for scaling motion estimation
Zhang et al. A spatio-temporal auto regressive model for frame rate upconversion
JP2019118101A (en) Video coding method and image processing apparatus therefor
US20080089418A1 (en) Image encoding apparatus and memory access method
CN110495178A (en) The device and method of 3D Video coding
Zhang et al. A motion-aligned auto-regressive model for frame rate up conversion
CN102215404B (en) Decoding method and system of videos inside embedded system
US10225573B1 (en) Video coding using parameterized motion models
CN101778280B (en) Circuit and method based on AVS motion compensation interpolation
CN100414959C (en) Method for forming preview image
CN100568920C (en) The method and apparatus of the video image brightness interpolating of serial input and line output
CN111327901A (en) Video encoding method, video encoding device, storage medium and encoding device
CN107483936B (en) A kind of light field video inter-prediction method based on macro pixel
Guanghua et al. VLSI Implementation of sub-pixel interpolator for AVS encoder
JP4590337B2 (en) Moving picture coding apparatus and moving picture coding method
Kanimozhi et al. Efficient Lossless Compression Using H. 264/AVC Intra Coding and PWSIP Prediction
WO2020181507A1 (en) Image processing method and apparatus

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
ASS Succession or assignment of patent right

Owner name: CHANGXIN TECHNOLOGY CO., LTD.

Free format text: FORMER OWNER: HT MMOBILE INC.

Effective date: 20120913

C41 Transfer of patent application or patent right or utility model
COR Change of bibliographic data

Free format text: CORRECT: ADDRESS; FROM: TAIWAN, CHINA TO: HONG KONG, CHINA

TA01 Transfer of patent application right

Effective date of registration: 20120913

Address after: Room 5, building 42-56, 12 fortune business center, Kwong Wah Street, Mong Kok, Hongkong, China

Applicant after: HT mMobile Inc.

Address before: Science and Industry Park, Hsinchu County, Taiwan, China, No. 19-1

Applicant before: HT mMobile Inc.

C14 Grant of patent or utility model
GR01 Patent grant