CN101035284A - Stream-type video pixel domain code conversion method - Google Patents

Stream-type video pixel domain code conversion method Download PDF

Info

Publication number
CN101035284A
CN101035284A CNA2007100638188A CN200710063818A CN101035284A CN 101035284 A CN101035284 A CN 101035284A CN A2007100638188 A CNA2007100638188 A CN A2007100638188A CN 200710063818 A CN200710063818 A CN 200710063818A CN 101035284 A CN101035284 A CN 101035284A
Authority
CN
China
Prior art keywords
mpeg
motion vector
revaluation
frame
motion
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.)
Granted
Application number
CNA2007100638188A
Other languages
Chinese (zh)
Other versions
CN100499816C (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.)
Tsinghua University
Original Assignee
Tsinghua University
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 Tsinghua University filed Critical Tsinghua University
Priority to CNB2007100638188A priority Critical patent/CN100499816C/en
Publication of CN101035284A publication Critical patent/CN101035284A/en
Application granted granted Critical
Publication of CN100499816C publication Critical patent/CN100499816C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention relates to a streaming video to the pixel domain code, a computer multimedia technology areas, including: MPEG-2 video bit stream format for MPEG-2 decoder frame images and get all the current macro block MPEG-2 encoder motion vectors; Judging the present frame in MPEG - 2 format in the frame type, if I frame is directly MPEG-4 coding; If the frame is B or P frames, for each macro block, the decoder used by the MPEG-2 motion vectors were used campaign re-estimation method estimates from a number of motion vectors; reservations minimum residuals Heavily estimated motion vector and pixel scope of the semi-final thinning search campaign vector encoding; Acer block completion of the MPEG-4 coding; continue to the next frame decoding and transcoding processing. This invention based on the assumption that the campaign designed to better re-estimation methods to move swiftly to the scene, has effectively made up for the streaming video pixel domain transcoding methods used to be linear and deficiencies.

Description

A kind of method of stream-type video pixel domain code conversion
Technical field
The invention belongs to technical field of computer multimedia, particularly Video Transcoding Technology.
Background technology
Digital video is meant the video information with the digital form record, and English corresponding phrase is Digital video.The original data volume of digital video is very big, has all brought very big inconvenience for transmission and storage, so often needs to carry out encoding compression in the practical application.
Video coding adopts the method for estimation to realize the compression of data.Video data is that because picking rate is fast, adjacent image correlation in terms of content is very strong with the image sequence of regular time interval continuous acquisition.Estimation is exactly this correlation of utilizing between image, eliminates redundant information wherein, realizes the compression of data.The general procedure of method for estimating is as follows: the macro block (16 pixels * 16 pixels) that at first present frame (preparing image encoded in the cataloged procedure) is divided into fixed size; Then, for each macro block, (reference picture that coding is selected for use) searched for and compared in reference frame, finds " a coupling macro block " that the content similarity is the highest, the motion vector of the current macro that obtains thus encoding (relative displacement between current macro and the coupling macro block); Then, two macro blocks are subtracted each other obtain residual error, and residual matrix is carried out dct transform; At last motion vector and dct transform coefficient are carried out entropy coding and obtain packed data.
In order to satisfy the different demands of various Video Applications, MPEG of international organization and ITU have successively formulated a series of video compression standard, MPEG-1/2/4 that proposes as MPEG tissue and ITU tissue propose H.261, H.263, H.264 wait.These standards adopt different coding techniques and compression algorithms that original video data (image sequence) is handled, and finally obtain the compressed bit stream of different-format.Each standard all has stronger specific aim when formulating, as, H.261 being primarily aimed at video telephone and video conference, MPEG-2 is primarily aimed at SD and digital TV in high resolution etc.Therefore, adopt compressed bit stream that different standard codes obtains difference to some extent on characteristic, generally be difficult in to intersect between each application and use.A kind of method of dealing with problems is to adopt transcoding technology, and a kind of compressed bit stream of form is converted into another kind of form, as being the MPEG-4 form with the compressed bit stream of MPEG-2 form (packed data that obtains according to the Moving Picture Experts Group-2 coding) transcoding.By transcoding, make the code stream of generation better adapt to the requirement of transmitting or storing.
In various compression standards, MPEG-2 and MPEG-4 are most widely used.Moving Picture Experts Group-2 is primarily aimed at the broadcasted application of digital video, as digital TV; The MPEG-4 standard then has ultralow Bit-Rate Reduction and good error-resilient performance, is primarily aimed at the wireless application field, as mobile video, and video telephone etc.In history, MPEG-2 successfully is applied in the video broadcasting field, and extensively popularizing of digital technology played great impetus.After MPEG-4 releases,, become the first-selection of various fields such as transmission, storage and montage undoubtedly owing to its excellent performance.And, some wireless domain, as wireless video, PDA etc., because the Network Transmission environmental limit requires compressed bit stream to have very low bit rate and good anti-noise ability, this moment, MPEG-2 was difficult to competent.So extensively popularizing of MPEG-4 standard can be described as the inexorable trend of technical development until final replacement MEPG-2.Problem is that the video data major part of remnants now is the compressed format of MPEG-2, is difficult to be applied directly to new field.The most direct method of dealing with problems adopts transcoding technology exactly, and the compressed bit stream of MPEG-2 form directly is changed to the MPEG-4 form.
Video transcoding method mainly can be divided into two big classes: pixel domain code conversion and transform domain transcoding.The transform domain transcoding is realized the conversion of code stream form by the DCT coefficient is carried out motion compensation.The advantage of this method is that amount of calculation is little, and transcoding speed is fast, shortcoming be this method to motion vector, code rates etc. have certain requirement, have brought certain restriction to practical application.Pixel domain code conversion be convenient to realize, but the amount of calculation of transcoding is bigger then relatively flexibly.
Commonly used GOP (group of picthures image sets) structure is at MPEG-2 during at coding among MPEG-2 and the MPEG-4, the general B frame that adopts, the B frame is simultaneously with reference to former and later two contiguous P frame or I frames, as shown in Figure 1a, and the reference frame that the arrow points coding adopts among the figure; And the coding of MPEG-4 generally only adopts the P frame, and the P frame is only with reference to P frame that is close to previously or I frame, shown in Fig. 1 b.The simplest MPEG-2 is realized by MPEG-2 decoder and the cascade of MPEG-4 encoder to the pixel domain code conversion method of MPEG-4, this method as shown in Figure 2, comprise: the video code flow of MPEG-2 form obtains the video image of original yuv format behind the MPEG-2 decoder decode, and then the image of these yuv formats being carried out estimation by the MPEG-4 encoder, coding generates the video code flow of MPEG-4 form.Wherein, when MPEG-4 encodes, the image motion information that can utilize the MPEG-2 decoding to obtain is come auxiliaring coding, the motion vector that promptly utilizes the MPEG-2 decoding to obtain carries out motion revaluation, obtain the approximation of MPEG-4 motion vector fast, thereby avoided carrying out again the complicated calculations that estimation is brought.Because the amount of calculation of estimation generally accounts for the 70%-80% of whole coding computing, so existing MPEG-2 has substantially adopted motion revaluation method to the pixel domain code conversion method of MPEG-4.The motion vector that motion revaluation obtains is accurate more, and code efficiency is high more, is the key technology of video code conversion so design the method for motion revaluation efficiently.
The evaluation method that present existing motion revaluation method mostly adopts linearity to fit, the motion vector that promptly utilizes MPEG-2 decoding to obtain obtains the estimated value of MPEG-4 encoding motion vector by simple time-domain interpolation.The prerequisite hypothesis of these methods is that the movement velocity of object remains unchanged in the image, this is basic the establishment under the major applications occasion and in the less investigation interval (time period of supposing), but change application scenarios or investigation interval greatly faster for some movement velocitys, this hypothesis will no longer be set up suitable, thereby cause the accuracy of the motion vector that motion revaluation obtains to reduce.
Summary of the invention
The present invention proposes a kind of method of new stream-type video pixel domain code conversion, the prerequisite hypothesis of this method is that the acceleration of object of which movement is constant in the image, i.e. the movement velocity of object difference to some extent, but the rate of change of speed remains unchanged.The motion revaluation method that the present invention is based on this hypothesis design can better adapt to the scene of rapid movement, and the method that has effectively remedied existing stream-type video pixel domain code conversion adopts the linear weak point that fits.
The method of a kind of stream-type video pixel domain code conversion that the present invention proposes is characterized in that, may further comprise the steps:
1) video code flow to the MPEG-2 form carries out the MPEG-2 encoding motion vector that the MPEG-2 decoding obtains current frame image and each macro block;
2) judge the frame type of present frame in the MPEG-2 form,, directly carry out the MPEG-4 coding if the I frame then need not carry out motion revaluation;
3) if the B frame then for each macro block, utilizes the MPEG-2 motion vector V that decodes and obtain 1(x, y) and V 2(x y) adopts " constant airspeed " respectively, and the motion revaluation method of " acceleration is constant " and " regional movement is constant " obtains three revaluation motion vectors
Figure A20071006381800061
Figure A20071006381800062
With
Figure A20071006381800063
Then, described three revaluation motion vectors are carried out MPEG-4 motion compensation and residual error more separately respectively, keep the revaluation motion vector of residual error minimum
Figure A20071006381800064
Right
Figure A20071006381800065
The search refinement that carries out the half-pix scope obtains final encoding motion vector V b(x, y);
4) if the P frame then for each macro block, utilizes the motion vector V that decodes and obtain 1(x y) adopts the motion revaluation method of " constant airspeed " and " regional movement is constant " to obtain two revaluation motion vectors respectively
Figure A20071006381800066
With
Figure A20071006381800067
Then, two revaluation motion vectors are carried out MPEG-4 motion compensation and residual error more separately respectively, keep the less revaluation motion vector of residual error
Figure A20071006381800068
The search refinement that this vector is carried out the half-pix scope obtains final encoding motion vector V p(x, y);
5) utilize the final encoding motion vector V that obtains b(x, y) or V p(x y), finishes the MPEG-4 coding of this macro block;
6) output code flow and judge whether transcoding finishes, if do not finish, then continue the decoding next frame and as above each step carry out the transcoding processing.
Characteristics of the present invention and effect
The motion revaluation method of the stream-type video pixel domain code conversion that the present invention proposes based on the constant hypothesis of acceleration of motion, can effectively improve the estimated accuracy of the motion vector under the fast motion scenes when motion vector is carried out revaluation, improve code efficiency.
Description of drawings
Referring-to relation schematic diagram when Fig. 1 is gop structure commonly used among MPEG-2 and the MPEG-4 and each image encoding;
Wherein, the referring-to relation when Fig. 1 (a) is each frame coding of MPEG-2,
Referring-to relation when Fig. 1 (b) is each frame coding of MPEG-4;
Fig. 2 is the pixel domain code conversion method flow block diagram of a kind of simple MPEG-2 decoding and the cascade of MPEG-4 coding;
Fig. 3 is the FB(flow block) of the inventive method;
Fig. 4 is the referring-to relation schematic diagram of B frame in MPEG-2 and MPEG-4 among the MPEG-2, wherein,
Fig. 4 (a) is the referring-to relation figure of B frame among the MPEG-2,
Fig. 4 (b) is referring-to relation figure behind the MPEG-4 for the present frame transcoding;
Fig. 5 is the referring-to relation schematic diagram of P frame in MPEG-2 and MPEG-4 among the MPEG-2, wherein,
The referring-to relation figure of P frame among Fig. 5 (a) MPEG-2,
Fig. 5 (b) present frame transcoding is the referring-to relation figure behind the MPEG-4;
Fig. 6 is MPEG-2 decoding and the gop structure of MPEG-4 coding and the referring-to relation schematic diagram between each image among the embodiment;
Wherein, Fig. 6 (a) is the gop structure of MPEG-2 decoding among the embodiment and the referring-to relation schematic diagram between each image;
Fig. 6 (b) is the gop structure of MPEG-4 coding among the embodiment and the referring-to relation schematic diagram between each image;
Fig. 7 is the referring-to relation schematic diagram of image during the 2nd frame transcoding among the embodiment;
Fig. 8 is the referring-to relation schematic diagram of image during the 3rd frame transcoding among the embodiment;
Fig. 9 is the referring-to relation schematic diagram of image during the 4th frame transcoding among the embodiment;
Figure 10 is the referring-to relation schematic diagram of image during the 5th frame transcoding among the embodiment.
For ease of drawing, the motion vector among the figure has all omitted x component and y component in expression.
Embodiment
The present invention proposes the method for a kind of MPEG-2, be elaborated below in conjunction with accompanying drawing and specific embodiment to the stream-type video pixel domain code conversion of MPEG-4:
The flow process of the inventive method may further comprise the steps as shown in Figure 3:
7) video code flow to the MPEG-2 form carries out the MPEG-2 encoding motion vector (the I frame does not have motion vector) that the MPEG-2 decoding obtains current frame image and each macro block;
8) judge the frame type of present frame in the MPEG-2 form,, directly carry out the MPEG-4 coding if the I frame then need not carry out motion revaluation;
9) if the B frame then for each macro block, utilizes the MPEG-2 motion vector V that decodes and obtain 1(x, y) (in the expression of this motion vector and back motion vector, x and y represent the component of motion vector on x and y both direction respectively) and V 2(x y) adopts " constant airspeed " respectively, and the motion revaluation method of " acceleration is constant " and " regional movement is constant " obtains three revaluation motion vectors
Figure A20071006381800071
With
Figure A20071006381800073
Then, described three revaluation motion vectors are carried out MPEG-4 motion compensation and residual error more separately respectively, keep the revaluation motion vector of residual error minimum
Figure A20071006381800074
Right
Figure A20071006381800075
The search refinement that carries out the half-pix scope obtains final encoding motion vector V b(x, y);
10) if the P frame then for each macro block, utilizes the motion vector V that decodes and obtain 1(x y) adopts the motion revaluation method of " constant airspeed " and " regional movement is constant " to obtain two revaluation motion vectors respectively
Figure A20071006381800076
With
Figure A20071006381800077
Then, two revaluation motion vectors are carried out MPEG-4 motion compensation and residual error more separately respectively, keep the less revaluation motion vector of residual error
Figure A20071006381800078
The search refinement that this vector is carried out the half-pix scope obtains final encoding motion vector V p(x, y);
11) utilize the final encoding motion vector V that obtains b(x, y) or V p(x y), finishes the MPEG-4 coding of this macro block;
12) output code flow and judge whether transcoding finishes, if do not finish, then continue the decoding next frame and as above each step carry out the transcoding processing.
Above-mentioned steps 3) in, when the MPEG-2 decoded picture was the B frame, the motion revaluation method of employing specified as follows:
As shown in Figure 4, the B frame that the current decoding of B ' expression obtains, its reference frame in MPEG-2 is P mAnd P M+1, corresponding motion vector is respectively V 1(x, y) and V 2(x, y).S represents B ' and preceding reference frame P mBetween distance (at interval frame number), t represents B ' and back reference frame P M+1Between distance, shown in Fig. 4 (a).After present frame B ' carried out MPEG-4 coding, the image among the corresponding MPEG-4 was P n, its reference frame in MPEG-4 is former frame P N-1, corresponding motion vector is V b(x, y), shown in Fig. 4 (b).So during to the present frame transcoding, the purpose of its motion revaluation is utilized V exactly 1(x, y) and V 2(x, value y) estimates V b(x, value y).
Each macro block in the current B frame is adopted " constant airspeed " respectively, and the motion vector revaluation method of " acceleration is constant " and " regional movement is constant " obtains corresponding revaluation MPEG-4 motion vector respectively
Figure A20071006381800081
With
Figure A20071006381800083
31) the MPEG-4 encoding motion vector that adopts " constant airspeed " method motion revaluation to obtain
Figure A20071006381800084
Figure A20071006381800085
32) the MPEG-4 encoding motion vector that adopts " acceleration is constant " method motion revaluation to obtain
Figure A20071006381800087
33) the MPEG-4 encoding motion vector that adopts " regional movement is constant " method motion revaluation to obtain
Figure A20071006381800089
Wherein, M 1(x y) is the MPEG-4 encoding motion vector of current coding macro block top adjacent macroblocks, M 2(x y) is the MPEG-4 encoding motion vector of current coding macro block left adjacent macroblocks, M 3(x y) is the MPEG-4 encoding motion vector of current coding macro block upper right side adjacent macroblocks.
Above-mentioned steps 4) in, when the MPEG-2 decoded picture was the P frame, the motion revaluation method of employing specified as follows:
As shown in Figure 5, P M+1Represent the P frame that current decoding obtains, its reference frame in MPEG-2 is P m, corresponding motion vector is respectively V 1(x, y).S represents P M+1With reference frame P mBetween distance (at interval frame number), shown in Fig. 5 (a).To present frame P M+1After carrying out the MPEG-4 coding, the image among the corresponding MPEG-4 is P k, its reference frame in MPEG-4 is former frame P K-1, corresponding motion vector is V p(x, y), shown in Fig. 5 (b).So during to the present frame transcoding, the purpose of its motion revaluation is utilized V exactly 1(x, value y) estimates back V p(x, value y).
Each macro block in the current P frame is adopted the motion vector revaluation method of " constant airspeed " and " regional movement is constant " respectively, obtain corresponding revaluation MPEG-4 motion vector respectively
Figure A20071006381800091
With
Figure A20071006381800092
Specifically be calculated as follows:
41) the MPEG-4 encoding motion vector that obtains of " constant airspeed " method motion revaluation
Figure A20071006381800093
Figure A20071006381800094
42) the MPEG-4 encoding motion vector that obtains of " regional movement is constant " method motion revaluation
Figure A20071006381800095
Figure A20071006381800096
Wherein, M 1(x y) is the MPEG-4 encoding motion vector of current coding macro block top adjacent macroblocks, M 2(x y) is the MPEG-4 encoding motion vector of current coding macro block left adjacent macroblocks, M 3(x y) is the MPEG-4 encoding motion vector of current coding macro block upper right side adjacent macroblocks.
The inventive method content is described further by embodiment:
Present embodiment is that the MPEG-2 form is used to the transcoding of MPEG-4 form.Wherein the GOP length of MPEG-2 video is 16, and frame type is IBBBPBBBPBBBPBBB, and the GOP length of the MPEG-4 video behind the transcoding also is 16, and frame type is IPPPPPPPPPPPPPPP.
Be operating as example with the MPEG-2 of the 1st GOP of video sequence to the transcoding of MPEG-4 below, describe MPEG-2 that the present invention proposes method of operation (the transcoding method of operation of follow-up GOP is similar) in detail to the stream-type video pixel domain code conversion method of MPEG-4.As shown in Figure 6, Fig. 6 (a) is the structure of the 1st GOP that the MPEG-2 decoding obtains in the present embodiment and the referring-to relation between image; Fig. 6 (b) is the structure of the 1st GOP that the MPEG-4 coding obtains in the present embodiment and the referring-to relation between image.
The method of present embodiment may further comprise the steps:
1) the MPEG-2 decoding obtains the 1st two field picture, and the type of coding of judging this frame is the I frame, so do not carry out motion revaluation, directly sends into the MPEG-4 encoder and encodes, and so far the 1st frame transcoding finishes;
2) the MPEG-2 decoding obtains the 2nd two field picture, and the type of coding of judging this frame is the B frame, the MPEG-2 motion vector V that utilizes decoding to obtain 1(x, y) and V 2(x, y) each macro block to this frame adopts motion revaluation method to calculate the MPEG-4 encoding motion vector;
The referring-to relation of this frame as shown in Figure 7, and corresponding to the s=1 among Fig. 4, t=3.
(21) by the 1. MPEG-4 encoding motion vector that obtains of constant airspeed method motion revaluation of formula
Figure A20071006381800097
Figure A20071006381800098
(22) by the 2. MPEG-4 encoding motion vector that obtains of the constant method motion of acceleration revaluation of formula
Figure A20071006381800099
Figure A20071006381800101
= V 1 ( x , y )
(23) by the 3. MPEG-4 encoding motion vector that obtains of the constant method motion of regional movement revaluation of formula
Figure A20071006381800103
Figure A20071006381800104
Above-mentioned three kinds of motion vector revaluation methods have obtained the estimated value of three MPEG-4 encoding motion vectors
Figure A20071006381800105
Figure A20071006381800106
With
Figure A20071006381800107
Right
Figure A20071006381800108
Figure A20071006381800109
With
Figure A200710063818001010
Carry out the MPEG-4 motion compensation respectively, and residual error more separately, the motion vector conduct of residual error minimum kept
Figure A200710063818001011
Right
Figure A200710063818001012
The search that becomes more meticulous of carrying out the half-pix scope obtains motion vector V b(x, y); V b(x y) is final MPEG-4 encoding motion vector; Utilize V at last b(x y) finishes the MPEG-4 encoding process of current macro.So far, the MPEG-2 of current macro handles to the transcoding of MPEG-4 and finishes;
Each macro block in the 2nd frame is carried out transcoding according to the method described above handle, dispose until the 2nd frame transcoding.
3) the MPEG-2 decoding obtains the 3rd two field picture, and the type of coding of judging this frame is the B frame, so adopt motion revaluation method to calculate the MPEG-4 encoding motion vector for each macro block.
The referring-to relation of this frame as shown in Figure 8, and corresponding to the s=2 among Fig. 4, t=2.
(31) by the 1. MPEG-4 encoding motion vector that obtains of constant airspeed method motion revaluation of formula
Figure A200710063818001013
(32) by the 2. MPEG-4 encoding motion vector that obtains of the constant method motion of acceleration revaluation of formula
= 3 8 V 1 ( x , y ) - 1 8 V 2 ( x , y )
(33) by the 3. MPEG-4 encoding motion vector that obtains of the constant method motion of regional movement revaluation of formula
Figure A200710063818001018
Figure A200710063818001019
Above-mentioned three kinds of motion vector revaluation methods have obtained the estimated value of three MPEG-4 encoding motion vectors
Figure A200710063818001020
Figure A200710063818001021
With
Figure A200710063818001022
Right
Figure A200710063818001023
Figure A200710063818001024
With Carry out the MPEG-4 motion compensation respectively, and residual error more separately, the motion vector conduct of residual error minimum kept
Figure A200710063818001026
Right
Figure A200710063818001027
The search that becomes more meticulous of carrying out the half-pix scope obtains motion vector V b(x, y); V b(x y) is final MPEG-4 encoding motion vector; Utilize V at last b(x y) finishes the MPEG-4 encoding process of current macro.So far, the MPEG-2 of current macro handles to the transcoding of MPEG-4 and finishes.
Each macro block in the 3rd frame is carried out transcoding according to the method described above handle, dispose until the 3rd frame transcoding.
4) the MPEG-2 decoding obtains the 4th two field picture, and the type of coding of judging this frame is the B frame, so adopt motion revaluation method to calculate the MPEG-4 encoding motion vector for each macro block.
The referring-to relation of this frame as shown in Figure 9, and corresponding to the s=3 among Fig. 4, t=1.
(41) by the 1. MPEG-4 encoding motion vector that obtains of constant airspeed method motion revaluation of formula
Figure A20071006381800111
Figure A20071006381800112
(42) by the 2. MPEG-4 encoding motion vector that obtains of the constant method motion of acceleration revaluation of formula
Figure A20071006381800114
= 1 6 V 1 ( x , y ) - 1 2 V 2 ( x , y )
(43) by the 3. MPEG-4 encoding motion vector that obtains of the constant method motion of regional movement revaluation of formula
Figure A20071006381800116
Figure A20071006381800117
Above-mentioned three kinds of motion vector revaluation methods have obtained the estimated value of three MPEG-4 encoding motion vectors
Figure A20071006381800119
With
Figure A200710063818001110
Right
Figure A200710063818001111
Figure A200710063818001112
With
Figure A200710063818001113
Carry out the MPEG-4 motion compensation respectively, and residual error more separately, the motion vector conduct of residual error minimum kept
Figure A200710063818001114
Right
Figure A200710063818001115
The search that becomes more meticulous of carrying out the half-pix scope obtains motion vector V b(x, y); V b(x y) is final MPEG-4 encoding motion vector; Utilize V at last b(x y) finishes the MPEG-4 encoding process of current macro.So far, the MPEG-2 of current macro handles to the transcoding of MPEG-4 and finishes;
Each macro block in the 4th frame is carried out transcoding according to the method described above handle, dispose until the 4th frame transcoding.
5) the MPEG-2 decoding obtains the 5th two field picture, and the type of coding of judging this frame is the P frame, so adopt motion revaluation method to calculate the MPEG-4 encoding motion vector for each macro block.
The referring-to relation of this frame as shown in figure 10, and corresponding to the s=4 among Fig. 5.
(51) the MPEG-4 encoding motion vector that obtains by 4. constant airspeed method revaluation
Figure A200710063818001116
Figure A200710063818001117
(52) the MPEG-4 encoding motion vector that obtains by the 5. constant method method of regional movement motion revaluation
Figure A200710063818001118
Figure A200710063818001119
Above-mentioned two kinds of motion vector revaluation methods have obtained the estimated value of two MPEG-4 encoding motion vectors
Figure A200710063818001120
With
Figure A200710063818001121
With
Figure A200710063818001123
Carry out the MPEG-4 motion compensation respectively, and residual error more separately, the less motion vector conduct of residual error kept
Figure A20071006381800121
Right
Figure A20071006381800122
The search that becomes more meticulous of carrying out the half-pix scope obtains motion vector V p(x, y); V p(x y) is final MPEG-4 encoding motion vector; Utilize V at last b(x y) finishes the MPEG-4 encoding process of current macro.So far, the MPEG-2 of current macro handles to the transcoding of MPEG-4 and finishes.
Each macro block in the 5th frame is carried out transcoding according to the method described above handle, dispose until the 5th frame transcoding.
6) since the 6th frame, the type of coding of successive image can find identical situation in the step at above-mentioned 2-5 with referring-to relation among the GOP, so transcoding processing operation is also identical, the corresponding operating that repeats among the 2-5 gets final product;
7) so far the MPEG-2 of the 1st GOP finishes to the transcoding operation of MPEG-4;
8) each GOP in the video sequence is repeated the above-mentioned 1-7 step, finish to the transcoding processing of MPEG-4 until whole M PEG-2.

Claims (3)

1, a kind of method of stream-type video pixel domain code conversion is characterized in that, may further comprise the steps:
1) video code flow to the MPEG-2 form carries out the MPEG-2 encoding motion vector that the MPEG-2 decoding obtains current frame image and each macro block;
2) judge the frame type of present frame in the MPEG-2 form,, directly carry out the MPEG-4 coding if the I frame then need not carry out motion revaluation;
3) if the B frame then for each macro block, utilizes the MPEG-2 motion vector V that decodes and obtain 1(x, y) and V 2(x y) adopts " constant airspeed " respectively, and the motion revaluation method of " acceleration is constant " and " regional movement is constant " obtains three revaluation motion vectors
Figure A2007100638180002C1
With
Figure A2007100638180002C2
Then, described three revaluation motion vectors are carried out MPEG-4 motion compensation and residual error more separately respectively, keep the revaluation motion vector of residual error minimum
Figure A2007100638180002C3
Right
Figure A2007100638180002C4
The search refinement that carries out the half-pix scope obtains final encoding motion vector V b(x, y);
4) if the P frame then for each macro block, utilizes the motion vector V that decodes and obtain 1(x y) adopts the motion revaluation method of " constant airspeed " and " regional movement is constant " to obtain two revaluation motion vectors respectively With
Figure A2007100638180002C6
Then, two revaluation motion vectors are carried out MPEG-4 motion compensation and residual error more separately respectively, keep the less revaluation motion vector of residual error The search refinement that this vector is carried out the half-pix scope obtains final encoding motion vector V p(x, y);
5) utilize the final encoding motion vector V that obtains b(x, y) or V p(x y), finishes the MPEG-4 coding of this macro block;
6) output code flow and judge whether transcoding finishes, if do not finish, then continue the decoding next frame and as above each step carry out the transcoding processing.
2, the method for claim 1 is characterized in that, in the described step 3), obtains revaluation MPEG-4 motion vector
Figure A2007100638180002C8
With
Figure A2007100638180002C9
Be respectively:
31) the MPEG-4 encoding motion vector that adopts " constant airspeed " method motion revaluation to obtain
Figure A2007100638180002C10
Figure A2007100638180002C11
32) the MPEG-4 encoding motion vector that adopts " acceleration is constant " method motion revaluation to obtain
Figure A2007100638180002C12
Figure A2007100638180002C13
33) the MPEG-4 encoding motion vector that adopts " regional movement is constant " method motion revaluation to obtain
Figure A2007100638180003C1
Figure A2007100638180003C2
Wherein, M 1(x y) is the MPEG-4 encoding motion vector of current coding macro block top adjacent macroblocks, M 2(x y) is the MPEG-4 encoding motion vector of current coding macro block left adjacent macroblocks, M 3(x y) is the MPEG-4 encoding motion vector of current coding macro block upper right side adjacent macroblocks.
3, the method for claim 1 is characterized in that, in the described step 4), and the revaluation MPEG-4 motion vector that obtains
Figure A2007100638180003C3
With
Figure A2007100638180003C4
Be respectively:
41) the MPEG-4 encoding motion vector that obtains of " constant airspeed " method motion revaluation
Figure A2007100638180003C5
Figure A2007100638180003C6
42) the MPEG-4 encoding motion vector that obtains of " regional movement is constant " method motion revaluation
Figure A2007100638180003C7
Wherein, M 1(x y) is the MPEG-4 encoding motion vector of current coding macro block top adjacent macroblocks, M 2(x y) is the MPEG-4 encoding motion vector of current coding macro block left adjacent macroblocks, M 3(x y) is the MPEG-4 encoding motion vector of current coding macro block upper right side adjacent macroblocks.
CNB2007100638188A 2007-02-12 2007-02-12 Stream-type video pixel domain code conversion method Expired - Fee Related CN100499816C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2007100638188A CN100499816C (en) 2007-02-12 2007-02-12 Stream-type video pixel domain code conversion method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2007100638188A CN100499816C (en) 2007-02-12 2007-02-12 Stream-type video pixel domain code conversion method

Publications (2)

Publication Number Publication Date
CN101035284A true CN101035284A (en) 2007-09-12
CN100499816C CN100499816C (en) 2009-06-10

Family

ID=38731546

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2007100638188A Expired - Fee Related CN100499816C (en) 2007-02-12 2007-02-12 Stream-type video pixel domain code conversion method

Country Status (1)

Country Link
CN (1) CN100499816C (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103152580A (en) * 2013-03-15 2013-06-12 浙江大学 Fault-tolerant coding method based on picture adaptive frame field
CN103686184A (en) * 2013-11-18 2014-03-26 深圳市云宙多媒体技术有限公司 Adjusting method and system for frame type in trans-coding
CN105847722A (en) * 2015-01-16 2016-08-10 杭州海康威视数字技术股份有限公司 Video storage method and device, video reading method and device and video access system
CN105898308A (en) * 2015-12-18 2016-08-24 乐视云计算有限公司 Resolution-variable coding mode prediction method and device
CN108769616A (en) * 2018-06-21 2018-11-06 泰华智慧产业集团股份有限公司 A kind of real-time video based on RTSP agreements is without plug-in unit method for previewing and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6647061B1 (en) * 2000-06-09 2003-11-11 General Instrument Corporation Video size conversion and transcoding from MPEG-2 to MPEG-4

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103152580A (en) * 2013-03-15 2013-06-12 浙江大学 Fault-tolerant coding method based on picture adaptive frame field
CN103152580B (en) * 2013-03-15 2016-04-13 浙江大学 A kind of fault-tolerant coding method based on frame field adaptive
CN103686184A (en) * 2013-11-18 2014-03-26 深圳市云宙多媒体技术有限公司 Adjusting method and system for frame type in trans-coding
CN103686184B (en) * 2013-11-18 2017-05-17 深圳市云宙多媒体技术有限公司 Adjusting method and system for frame type in trans-coding
CN105847722A (en) * 2015-01-16 2016-08-10 杭州海康威视数字技术股份有限公司 Video storage method and device, video reading method and device and video access system
CN105847722B (en) * 2015-01-16 2019-04-12 杭州海康威视数字技术股份有限公司 A kind of video storage method and device, read method and device and access system
CN105898308A (en) * 2015-12-18 2016-08-24 乐视云计算有限公司 Resolution-variable coding mode prediction method and device
WO2017101350A1 (en) * 2015-12-18 2017-06-22 乐视控股(北京)有限公司 Variable-resolution encoding mode prediction method and device
CN108769616A (en) * 2018-06-21 2018-11-06 泰华智慧产业集团股份有限公司 A kind of real-time video based on RTSP agreements is without plug-in unit method for previewing and system

Also Published As

Publication number Publication date
CN100499816C (en) 2009-06-10

Similar Documents

Publication Publication Date Title
CN100338956C (en) Method and apapratus for generating compact transcoding hints metadata
CN1183489C (en) Equipment of motion estimating and mode judging and its method
CN1229999C (en) Method and device for code and decode motion vector
CN1225127C (en) A coding/decoding end bothway prediction method for video coding
CN100336401C (en) Moving image encoder, moving image decoder, moving image encoding method, moving image decoding method
CN1233160C (en) Method for adaptive encoding and decoding sports image and device thereof
CN100341334C (en) Multi-reference frame rapid movement estimation method based on effective coverage
CN1933601A (en) Method of and apparatus for lossless video encoding and decoding
CN1675848A (en) Method and apparatus for performing high quality fast predictive motion search
CN1663278A (en) Techniques for video encoding and decoding
CN101035277A (en) Method and apparatus for generating compact code-switching hints metadata
CN1258925C (en) Multiple visual-angle video coding-decoding prediction compensation method and apparatus
CN1234943A (en) Transcoder
CN1627824A (en) Bitstream-controlled post-processing filtering
CN1943244A (en) Inter-frame prediction method in video coding, video encoder, video decoding method, and video decoder
CN1642285A (en) Image encoding method and apparatus and image encoding program
CN1969564A (en) Method and system for representing correlated set of images
CN1144469C (en) Motion-vector coding method
CN1236624C (en) Quick full pixel movement evaluation method of multiple kinds of modules
CN1812577A (en) Method of decoding digital video and digital video decoder system thereof
CN101035284A (en) Stream-type video pixel domain code conversion method
CN1320830C (en) Noise estimating method and equipment, and method and equipment for coding video by it
CN1149853C (en) Coding and decoding device with movement compensation
CN101040534A (en) Moving image conversion method, moving image conversion apparatus, moving image conversion system, and server apparatus, and program
CN101065780A (en) Reference picture management in video coding

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090610

Termination date: 20140212