CN1638480A - Video frequency compressing method for motion compensation technology - Google Patents

Video frequency compressing method for motion compensation technology Download PDF

Info

Publication number
CN1638480A
CN1638480A CN200410049156.5A CN200410049156A CN1638480A CN 1638480 A CN1638480 A CN 1638480A CN 200410049156 A CN200410049156 A CN 200410049156A CN 1638480 A CN1638480 A CN 1638480A
Authority
CN
China
Prior art keywords
video
processing unit
motion compensation
compression processing
frequency
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN200410049156.5A
Other languages
Chinese (zh)
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.)
SHANGHAI LONGLIN COMMUNICATION TECHN CO Ltd
Original Assignee
SHANGHAI LONGLIN COMMUNICATION TECHN CO Ltd
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
Priority claimed from PCT/CN2003/000486 external-priority patent/WO2004114666A1/en
Application filed by SHANGHAI LONGLIN COMMUNICATION TECHN CO Ltd filed Critical SHANGHAI LONGLIN COMMUNICATION TECHN CO Ltd
Priority to CN200410049156.5A priority Critical patent/CN1638480A/en
Publication of CN1638480A publication Critical patent/CN1638480A/en
Pending legal-status Critical Current

Links

Images

Abstract

A video compression process of a movement compensation technology comprises the following steps: 1) analyzing the files constituted by video frequency movement compensation compression treatment units and then determining the parameters to be used in the subsequent steps; 2) pre-treating the files constituted by relevant video frequency movement compensation compression treatment units; 3) encoding again the video frequency movement compensation compression treatment unit data stream obtained for deplexer to obtain the video frequency movement compensation compression treatment unit data stream with constant-current; 4) complexing the video frequency movement compensation compression treatment unit data stream after constant-current and the extractive audio/sub-image packages and then executing constant-current again to obtain the final data stream. Through said process for processing video data compression treatment into constant-current, the real time transmission and playing of the video compression data in flow medium network is facilitated; mosaic, emphraxis and unfluency are prevented from appearing and the random access of the code flow can be achieved; and the storage is eligible, operations such as searching, positioning, copy-edit fast forward and quick-return motion are easy to achieved, with high efficiency.

Description

The video-frequency compression method of motion compensation technique
Technical field
The present invention relates to a kind of processing method of data at digital video interframe compress technique, as international standard ISO/MPEG, ITU/H.26x, especially video compression data is treated to constant flow, make it be suitable on stream media network, transmitting in real time, playing, and can accomplish video-frequency compression method the motion compensation technique of the random access of code stream.
Background technology
MPEG (Motion Pictures Experts Group) is translated into Motion Picture Experts Group, and it is under the convening of International Organization for Standardization, is the expert group of digital video and audio frequency formulation compression standard.The standard that this tissue is formulated MPEG1 in 1992 at first, the program that is applied to videodisc is propagated.Broadcast television industry has been seen the meaning of MPEG technology for TV industry from the application of MPEG1 standard, so this tissue has been released the MPEG2 compression standard in 1994 again, set up and looked audio service in the worldwide and use the possibility of carrying out mutual operation.H.26x digital video and audio frequency specified compression standard are that International Telecommunications Union's tissue (ITU) is formulated.
There is the compress technique of three keys to be used, discrete cosine transform that Here it is (DCT), motion compensation (Motion Compensation) and Huffman coding by the MPEG compression standard.DCT has reduced space (Spatial) redundancy of image, and motion compensation has reduced time (Temporal) redundancy of image, and the Huffman coding has then reduced the redundancy of image aspect information (Entropy).Picture material object handles technology has reduced time (Temporal) redundancy of image in conjunction with motion compensation.The integrated application of these several technology makes that the compression ratio of MPEG/H.26x is higher.
The MPEG2 standard class is similar to MPEG1, but its adaptability is stronger, goes for all processes and the link of radio and television.From definition, MPEG1 is actually the subclass of MPEG2.This in the classification chart of the class of the MPEG2 of back and level as can be seen.
The MPEG2 standard is divided into four files, is respectively:
System layer (System, ISO13818-1), describe look, the data multiplex mode of audio frequency and look, the audio sync mode.
(Video ISO13818-2), describes digital video coding mode and decode procedure to the video compression layer.
(Audio ISO13818-3), describes digital audio encoding mode and decode procedure to the audio compression layer.
(Conformance ISO13818-4), illustrates the process of test encoding code stream to consistency, and whether check meets the regulation of first three file.
The MPEG2 compression algorithm time is defined as a general audio compress standard of looking in design, and requirement can take into account different application requirements, can control the bit rate output and the picture quality of compression.For this reason, the MPEG2 compression algorithm is divided into different ranks and classification.The control of class definition chrominance space resolution and output bit flow, level then define the number of plies of looking audio frequency that image resolution ratio, brightness sampling frequency, gradable class can support, flow corresponding to the maximal bit of each class of this grade.
MPEG2 is presentation code data better, has stipulated the structure of a level with sentence structure.Its structure is divided into six layers, is respectively from top to bottom:
Image sequence layer (Video Sequence)
Image sets (GOP, Group of Pictures)
Image (Picture)
Macro block bar (Slice)
Macro block (Macroblock)
Piece (Block)
Image sequence is made of image sets, and the image sequence head of expression beginning and the image stop code that expression finishes are arranged.It is the arbitrary access paragraph.
Image sets (GOP) adds for making things convenient for arbitrary access, and its structure and length are variable, and MPEG2 does not lay down hard and fast rule to this.GOP has two parameters, and promptly length (N) and frame repetition frequency (M) will lay down a definition below.Image sets is random-access units of video.
Image is the unit of display independently, also is basic coding unit.In MPEG2, image can be line by line, also can be interlacing, this point is different with MPEG1, and MPEG1 always line by line.
The macro block bar comprises several continuous macro blocks, is again Synchronism Unit.The purpose that is provided with of macro block bar is the diffusion that prevents error code, when error code appears in a macro block bar, does not influence follow-up macro block bar decoding.
Image is divided into 16 * 16 macro block with luminance array, and macro block is the base unit that carries out motion compensation.A macro block comprises 48 * 8 luminance block, and according to the difference of class, a macro block also comprises two 8 * 8 chrominance block (each of R-Y and B-Y are during the 4:2:0 sampling) or four 8 * 8 chrominance block (each two of R-Y and B-Y are during the 4:2:2 sampling).Piece is the unit that carries out the DCT computing, only comprises brightness or only comprises colourity.
Mention above, MPEG is based on DCT, motion compensation and Huffman encryption algorithm, and thus, MPEG2 has used in the frame compression and interframe to compress dual mode in compression.In order to realize maximum compression ratio in coding, MPEG2 uses three types image, i.e. I frame, P frame and B frame.
I frame (Intra-Frame) is compression in the frame, does not use motion compensation, and medium compression ratio is provided.Because the I frame do not rely on other frames,, be the reference frame in the decoding simultaneously so be random-accessly to go into a little.
P frame (Predicated-Frame) predicts according to the I frame or the P frame of front, uses movement compensating algorithm to compress, thereby compression ratio is than I vertical frame dimension, and data volume on average reaches about 1/3 of I frame.The P frame is the reference frame that the B frame of front and back and follow-up P frame are decoded.The P frame itself has error, if the previous reference frame of P frame also is the P frame, will cause error propagation.
B frame (Bidirectinal-Frame) is based on the frame that interpolation is rebuild, and it is based on two I, P frame or P, the P frame of front and back, and it uses bi-directional predicted, and data volume on average can reach about 1/9 of I frame.B frame itself is as benchmark, therefore can provide under the situation of higher compression ratio not propagated error.
Although it is pointed out that and use this speech of frame (Frame) here, MPEG2 itself must not use frame as unit when regulation is carried out digital image compression, for the video image of interlacing, can make use (Field) as unit.
A GOP is made up of a string I, B, P frame, is initiated with the I frame.The frame number of image is variable among the GOP, and frame number is many can to provide high compression ratio, but can cause the accumulation (error propagation of P frame) of random-access delay (must wait until next I frame) and error.Generally be that two I frames were arranged in one second, be used as random-access inlet.
Also do not stipulate the structure of GOP in MPEG2, the frame repetitive mode can be IP, IB, and IBP, IBBP, even all be the I frame.The repetition rate of reference frame represents that with M different frame repetition frequencies provides different bit rate outputs, influences access delay simultaneously.
And MPEG2 is the subclass of MPEG4.
MPEG4 is presentation code data better, has stipulated the structure of a level with sentence structure.Its structure is divided into six layers, is respectively from top to bottom:
Image sequence layer (Video Sequence)
Image object group (GVOP, Group of video object plane)
Image object (VOP, video object plane)
Macro block bar (Slice)
Macro block (Macroblock)
Piece (Block)
Image sequence is made of the image object group, and the image sequence head of expression beginning and the image stop code that expression finishes are arranged, and is the arbitrary access paragraph.
Image object group (GVOP) adds for making things convenient for arbitrary access, and its structure and length are variable, and MPEG4 does not lay down hard and fast rule to this.The image object group is random-access units of video.
The image object group is the unit of display independently, also is basic coding unit.In MPEG4, image is made up of a plurality of image objects, and this point is different with MPEG2, and the MPEG2 image object is a rectangle always, is the image object special case of MPEG4.
Mention above, MPEG is based on DCT, motion compensation and Huffman encryption algorithm, and thus, MPEG4 has used in the frame compression and interframe to compress dual mode in compression.In order to realize maximum compression ratio in coding, MPEG4 uses three types image object, i.e. I-VOP, P-VOP and B-VOP.
I-VOP (Intra-VOP) is compression in the VOP, does not use motion compensation, and medium compression ratio is provided.Because I-VOP do not rely on other VOP,, be the benchmark VOP in the decoding simultaneously so be random-accessly to go into a little.
P-VOP (Predicated-VOP) predicts according to the I-VOP or the P-VOP of front, use movement compensating algorithm to compress, thereby compression ratio is than I-VOP height.P-VOP is the benchmark VOP that the B-VOP of front and back and follow-up P-VOP are decoded.Itself has error P-VOP, if the previous benchmark VOP of P-VOP also is P-VOP, will cause error propagation.
B-VOP (Bidirectinal-VOP) is based on the VOP that interpolation is rebuild, and it is based on two I, P-VOP or P, the P-VOP of front and back, and its uses bi-directional predicted.B-VOP itself is as benchmark, therefore can provide under the situation of higher compression ratio not propagated error.
A GVOP is made up of a string I, B, P-VOP, is initiated with I-VOP.The VOP number of image is variable among the GVOP, and the VOP number is many can to provide high compression ratio, but can cause the accumulation (error propagation of P-VOP) of random-access delay (must wait until next I-VOP) and error.
Also do not stipulate the structure of GVOP in MPEG4, the VOP repetitive mode can be IP, IB, and IBP, IBBP, even all be I-VOP.The repetition rate of benchmark VOP represents that with M different VOP repetition rates provide different bit rate outputs, influence access delay simultaneously.
When M-JPEG, DV and three kinds of compression methods of MPEG are compared, mentioned this stubborn problem: M-JPEG, DV the random access that is accurate to frame can both be provided, yet, that if the packed data code stream of MPEG is based on I, P frame (or I, P-VOP) or I, P, B frame (or I, P, B-VOP), just could not accomplish this point.This is brought by the motion compensation compression algorithm, and the Positive and Negative Aspects of new technology just show here.In a GOP (or GVOP), want to decode with the B frame or (B-VOP) to the P frame or (P-VOP), must depend on I frame (or I-VOP), so in video flowing of visit, must enter the mouth from I frame (or I-VOP).The consequence that this problem is brought on different application is far from each other.Such as the televiewer is when switching program channel, and the decoding digital video box waits until that the delay deficiency that I frame (or I-VOP) arrival of new channel is produced is trouble, because per second has two I frames (or I-VOP) at least, spectators can not take notice of the delay that this is slight.But very big problem is arranged but on TV station's business.Such as advertisement insertion is difficult to starting point and length that control is inserted, and the material search is slow etc. during non-linear editing.Therefore, existing MPEG code stream, for example the stream rate of DVD is along with the content of picture changes, be unfavorable for real-time broadcast like this through Network Transmission, can cause the overflow or the underflow of the VBV buffer memory of decoding end, mosaic, obstruction and not smooth can appear in picture, even can cause quitting work of decoder.
Summary of the invention
Be unfavorable for search location and editor at existing MPEG/H.26x code stream, and because code stream flow inhomogeneous, the structure of each GOP/GVOP (Group of Pictures/Group of Video Object Plane) interior frame/Object Plane number and frame/Object Plane is unfixing, the uncertainty of flow and causing can not be accomplished the I frame/I-VOP of random position as the arbitrary access inlet, and the difficulty that can't go beyond that causes for fast-forward play, fast reverse play, montage, location etc.The invention provides a kind of video-frequency compression method of the motion compensation technique that overcomes the above problems.
For achieving the above object, the invention provides a kind of video-frequency compression method of motion compensation technique, be characterized in may further comprise the steps:
1) file that video motion compensation compression processing unit is formed is analyzed, and determines in the later step the parameter that uses;
2) file that associated video motion compensation compression processing unit is formed carries out preliminary treatment;
3) the video motion compensation compression processing unit data flow recompile that demultiplexing is obtained obtains the video motion compensation compression processing unit data flow of constant current;
4) audio frequency/sub-picture pack of the video motion after constant current compensation compression processing unit data flow and extraction is carried out multiplexing, and constant current obtains final data stream once more.
Described video-frequency compression method, whether the parameter in the step 1) comprises: be 3:2pulldown after the decoding output, stream identification, audio frequency flow, the frame per second of the bag number, video formats, required audio stream and the caption stream that cut away.
Described video-frequency compression method, step 2) may further comprise the steps:
A, from the file that the video motion compensation compression processing unit of intercepting is formed, extract required audio frequency and sub-picture pack;
B, demultiplexing obtains video motion compensation compression processing unit data flow from the file that the video motion compensation compression processing unit of intercepting is formed;
The system time (SCR) of c, the audio frequency of revising extraction, sub-picture pack and demonstration timestamp (PTS).
Described video-frequency compression method, step c sound intermediate frequency bag shows that the timestamp amendment scheme is: the demonstration timestamp of audio pack be multiply by contraction-expansion factor, and contraction-expansion factor is the ratio that video motion compensation compression processing unit data flow and the theory of audio stream show time (according to the number calculating of display unit) in the file formed of original video motion compensation compression processing unit.
Described video-frequency compression method, the audio pack system time amendment scheme among the step c is: system time (second)=demonstration timestamp (second)-this wraps position (byte)/frame size (byte) * frame time (second)-fixedly empirical value (second) of first audio frequency frame head.
Described video-frequency compression method, the system time of the sub-picture pack among the step c, demonstration timestamp amendment scheme are: come system time, the demonstration timestamp of syndrome image packets according to the system time of the navigation bag of sub-picture pack place video motion compensation compression processing unit in the file of original video motion compensation compression processing unit composition and the difference of theoretic system time.
Described video-frequency compression method, step 4) may further comprise the steps:
1) the video motion compensation compression processing unit data flow packaging multiplexing with constant current is a code stream;
2) audio frequency that extracts and sub-picture pack are inserted in the bag-packaged video motion compensation compression processing unit data flow go;
3) make the number of the bag in each video motion compensation compression processing unit constant, if number less than setting, is filled it with complete zero bag; If number less than setting, then moves on to the beginning that next video motion compensates compression processing unit with additional audio pack and sub-picture pack;
4) revise the system time of each bag.
Described video-frequency compression method, the video motion of the constant current compensation compression processing unit data flow unit of being meant picture number is fixed in the step 3), and unit code stream length is fixed, and then video motion compensation compression processing unit stream rate is fixed.
Described video-frequency compression method, be used for the MPEG2 compression standard, video motion compensation compression processing unit is formed video target files, video motion compensation compression processing unit data flow is a video data stream, the video motion compensation compression processing unit data flow of constant current is meant with image sets (GOP) to be that the unit number of image frames is fixed, and be that unit code stream length is fixed with the image sets, this image sets is a video motion compensation compression processing unit.
Described video-frequency compression method is used for the MPEG2 compression standard, and the video motion compensation compression processing unit data flow of constant current is defined as: an image sets is fixed as 12 or 15 frames; The code stream length of an image sets is fixed; An image sets is fixed and is begun with code word 0x000001b3.
Described video-frequency compression method, be used for the MPEG4/H.264 compression standard, video motion compensation compression processing unit is formed the object video file destination, video motion compensation compression processing unit data flow is a video object data stream, the video motion compensation compression processing unit data flow of constant current is meant with image object group (GVOP) to be that unit image image object (VOP) number is fixing, and be that unit code stream length is fixed with the image object group, this image object group is a video motion compensation compression processing unit.
The constant current of MPEG4 is handled and can be handled the constant current of single image group of objects code stream in the described video-frequency compression method, also can handle the constant current of a plurality of image object group code stream, the image object group code stream after constant current is handled carries out multiplexing generation standard code stream with other image object group code streams and audio frequency/sub-picture pack.
Video motion compensation compression processing unit data flow and the multiplexing generation standard of audio frequency/sub-picture pack code stream in the described video-frequency compression method after the constant current, this standard code stream can be used for the constant current transmission, also can be used for storage.
The invention enables the unit picture number of video data to fix, unit code stream length is fixed, and then video code flow speed is fixed, and obtains the video data of constant current.And can and then video flowing and audio stream etc. be carried out the multiplexing system flow that obtains, thereby obtain the program stream of constant current.Make like this operations such as search location, editor be very easy to, and be suitable for based on network real-time broadcast that can not cause the overflow or the underflow of the VBV buffer memory of decoding end, mosaic, obstruction and not smooth just can not appear in picture.And the constant current standard code stream after the present invention handles, not only can be used for the constant current transmission, make receiving terminal standard decoder normal decoder; Also can be used for storage, because the standard code stream after constant current is handled has the set form unit, reading control can be earlier to the storage file analysis, find out standard code stream set form element length, press the element length computing, operations such as search location, editor, F.F., rewind down are very easy to, with non-constant current standard code stream not the storage of set form element length code stream read control and compare, reading one by one, judge, reading again, the efficient height when reducing search positional editing, F.F., rewind down.
The present invention is further described below in conjunction with drawings and Examples.
Description of drawings
Fig. 1 is the flow chart of MPEG2 embodiment of the present invention.
Fig. 2 is that the frame of MPEG2 embodiment of the present invention defined GOP under the pulldown situation is arranged schematic diagram.
Fig. 3 is that the frame of MPEG2 embodiment of the present invention defined another GOP under no pulldown situation is arranged schematic diagram.
Fig. 4 is the video-frequency compression method processing procedure schematic diagram of MPEG2 embodiment of the present invention.
Fig. 5 is the video-frequency compression method processing procedure schematic diagram of MPEG4 embodiment of the present invention.
Fig. 6 is the flow chart of MPEG4 embodiment of the present invention.
Fig. 7 is the processing procedure schematic diagram that is used to transmit of the standard code stream that obtained by the present invention.
Fig. 8 is the processing procedure schematic diagram that is used to store of the standard code stream that obtained by the present invention.
Embodiment
The detailed performance of each side of the present invention will become clearer in the following description to preferred embodiment in conjunction with the accompanying drawings.Hereinafter earlier do preferred embodiment the present invention is done detailed description with the audio-frequency processing method of looking of MPEG2 compression standard.
Three major parameter SCR/PTS/DTS that will occur in the literary composition are the time tags that characterizes at the system flow ad-hoc location, and they all are a bit of data that encoder inserts in data flow.Wherein:
System time (SCR)
SCR is a system-timing reference.At least inserted once every 0.7 second.Decoder extracts SCR from data flow, SCR is sent to image decoder and audio decoder, makes internal clocking and system clock synchronous.
Show timestamp (PTS)
Image can be divided into many " display units ", and the display unit of image is a frame.PTS represents the demonstration time of display unit, decoder check PTS and with SCR relatively, and display image in view of the above makes itself and system time synchronous.
Decoded time stamp (DTS)
Represent the decode time of this addressed location expectation in System Target Decoder.In hierarchical coding, relevant DTS must be consistent in all hierarchical levels with corresponding addressed location.
The video-frequency compression method of MPEG2 motion compensation technique is with reference to the step among Fig. 1, step 1 wherein: at first to video target files (in MPEG2, video motion compensation compression processing unit is formed video target files, video data stream is a video motion compensation compression processing unit data flow, image sets GOP is video motion compensation compression processing unit) analyze, determine in the later step the parameter that uses.These parameters comprise: 1, after the decoding output, whether per 2 frames repeat to show a field picture, i.e. 3:2 pulldown whether, after 3:2 pulldown is meant decoding output, per 2 frames repeat to show a field picture, this is because film 24fps is different with NTSC 30fps frame per second, the required adjustment of doing in system conversion; 2, cut away what the bag (video object 1, video object 2 ..., keep last video object program; Make whether pure pulldown; And cut away blank screen); 3, determining video formats, promptly is Phase Alternation Line system or TSC-system; 4, determine the stream identification (streamid) of required audio stream and caption stream; 5, determine audio frequency flow (kbps); 6, determine frame per second (frame/seconds).
Certainly, in certain other embodiments, can select different parameters according to different needs, this simple change for the parameter kind of selecting does not exceed scope of the present invention.
With reference to the step 2 among Fig. 1: the associated video file destination is carried out preliminary treatment, the content of being done below comprising:
A) from the video target files of intercepting, extract required audio frequency and sub-picture pack;
B) demultiplexing obtains video data stream from the video target files of intercepting;
Because first GOP of intercepting is not necessarily self-contained, what two B frames of I frame back can not be correct is decoded, and the present invention takes the repetition of the I frame data among first GOP is covered for 2 times the data of its latter two B frame, so just mosaic phenomenon can not occur).
C) revise the audio frequency that extracts, the SCR and the PTS of sub-picture pack.
Audio pack: the PTS of audio pack is meant the demonstration time of the audio frequency frame head that occurs first in this bag.The original PTS of first audio frequency display unit of being intercepted and first video display unit is made comparisons, draw difference, and after intercepting, the PTS of first video display unit of video is about 0.28 second, revises the PTS of first display unit of audio frequency according to difference.Because demonstration time of each audio frame is fixed, as time interval of the audio frame of Doby ac3 be 32 milliseconds, so, just can calculate the PTS of this bag at an easy rate as long as know which audio frame first audio frequency frame head is in this bag.And the SCR of audio pack is the scheduled time of first byte arrival decoder of this bag, rather than the scheduled time of first audio frequency frame head arrival decoder, so SCR amendment scheme of the present invention is: SCR (second)=PTS (second)-this wraps position (byte)/frame size (byte) * frame time (second)-fixedly empirical value (second) of first audio frequency frame head.
Because in the video target files of some DVD, the PTS of video packets is not in strict accordance with the video frame rate in the code stream, as 29.97 frame/seconds, calculate, and the present invention through recompile and multiplexing after code stream calculate SCR, PTS in strict accordance with this frame rate, and come code streams such as multiplexing audio frequency and video in view of the above, can cause the nonsynchronous phenomenon of audio frequency and video like this.This also is to revise the PTS of audio pack and sub-picture pack, the reason of SCR here why.The way that solves is: PTS, the SCR of audio pack be multiply by contraction-expansion factor.Contraction-expansion factor is the ratio that the theory of video data stream and audio stream in the original video file destination shows time (number according to display unit is calculated).The reason of scalable audio is: the transmission code stream of constant code rate is based on the video frame number that transmits fixed number in the set time on network here.
Sub-picture pack: the frequency of occurrences of sub-picture pack is much smaller than video and audio frequency, nor possesses the characteristic of the constant flow of Voice ﹠ Video data flow.The present invention also is different from audio pack to the amendment scheme of SCR, the PTS of sub-picture pack.The present invention comes SCR, the PTS of syndrome image packets according to the SCR of the navigation bag of sub-picture pack place GOP in the original document and the difference of theoretic SCR.
The realization of these preferred steps will help to improve the synchronism of looking audio frequency, adopt other known preliminary treatment to obtain required audio frequency and sub-picture pack and video data stream certainly and equally also can realize the present invention.
With reference to the step 3 among Fig. 1: decoding multiplexing is obtained the video data that the video data stream recompile obtains constant current.At this, the video constant current is defined as: a GOP is fixed as 12/15 frame, is equivalent to fix the reproduction time of a GOP; The code stream length of a GOP is fixed (being unit with the byte); A GOP fixes and begins with video sequence head code word 0x000001b3.In the constant current process,, carry out recompile (under can not the situation of recompile, the intercepting specific length has mosaic like this, should avoid as far as possible) when the code length of a GOP during greater than setting; When the code length of a GOP during less than setting, padding data 0 equals setting until length.
Fig. 2 is that the frame of present embodiment GOP of defined one 12 frame under the pulldown situation according to the present invention is arranged.
Fig. 3 is the frame arrangement that present embodiment does not have a GOP of defined one 15 frame under the pulldown situation according to the present invention.
According to different needs, equally also can define the GOP of different length and frame structure, clearly, this is also within protection scope of the present invention.
At the video data stream of MPEG2 compression standard, after constant current is handled, and audio frequency/sub-picture pack carry out multiplexing generation standard code stream, can make the standard decoder normal decoder when being used for the constant current transmission, editor inserts also very convenient.As the step 4 among Fig. 1: the audio frequency/sub-picture pack of video data stream after the constant current and extraction is carried out multiplexing, and constant current obtains final data stream once more.It comprises following content:
1. the video flowing packaging multiplexing with constant current is a system flow.(the crucial SCR that determines the I frame, PTS DTS) read an addressed location of video earlier.Then the data in this temporary file are packed.Be noted that a GOP sets up another a bag when beginning, purpose is the random access of a GOP; And then back one frame data of I frame are set up another a bag, and purpose is to the visit of I frame data when F.F. or rewind down.
2. the audio frequency that extracts and sub-picture pack are inserted in the bag-packaged video packets and go.Its rule is: calculate this audio frequency or sub-picture pack according to SCR and should be in which GOP and the position in this GOP, and insert according to this position.
3. make the number of the bag among each GOP constant (constant current), comprise video packets, audio pack and sub-picture pack.If number less than setting, is filled it with complete zero bag (2048 byte).If number is less than setting, then additional audio pack and sub-picture pack are moved on to the beginning of next GOP.
4. revise the SCR of each bag.Its rule is: because in transmission over networks, the time interval of giving out a contract for a project is fixed.And the reproduction time of each GOP of the present invention is fixed and the number of the bag of each GOP is fixed.Temporal information SCR in the bag is meant that first byte expectation of this bag arrives the time of decoder.So the SCR of each bag should increase progressively successively equably.
What deserves to be mentioned is, video data stream and audio frequency/sub-picture pack are carried out multiplexing prior art method to be had a variety of, here explanation is a kind of preferable implementation method, those skilled in the art can use other multiplexing methods to realize this step, and do not exceed the disclosed content of the present invention.
The video-frequency compression method processing procedure of above MPEG2 motion compensation technique as shown in Figure 4.
Utilize the inventive method to make that the video data stream of MPEG2 is that the unit number of image frames is constant with GOP, and be that unit code stream length is definitely constant, guaranteed the constant of video code flow speed like this with GOP.Video data stream and audio stream etc. is carried out the multiplexing system flow that obtains, audio stream is exactly constant current originally, as long as and that the flow of subimage etc. and video flowing are compared is very little, so to the very a spot of redundancy of each GOP, just can obtain the MPEG2 program stream of constant current.Utilize the inventive method can accomplish that the length between the adjacent I frame fixes, and the frame number of adjacent I interframe is fixed.This code stream length that is equivalent to GOP is fixed, and the frame number among the GOP is fixed.Make operations such as search location, editor be very easy to like this, another benefit is to be suitable for based on network real-time broadcast, can not cause the overflow or the underflow of the VBV buffer memory of decoding end, and mosaic, obstruction and not smooth just can not appear in picture.
The detailed performance of processing method each side of the video/audio of MPEG4 compression standard is the same with MPEG2's, just MPEG4 practices in the VOP image object (in MPEG4, video motion compensation compression processing unit is formed the object video file destination, video object data stream is video motion compensation compression processing unit data flow, image object group GVOP is a video motion compensation compression processing unit), MPEG2 practices in frame, the MPEG2 image object is a rectangle always, is the image object special case of MPEG4.In addition, the constant current of MPEG4 is handled and can be handled single GVOP code stream constant current, also can handle a plurality of GVOP code stream constant currents, and all same MPEG2 of method is not described in detail in this.After the constant current of MPEG4 code stream is handled, also will with the multiplexing generation video code flow of other GVOP code stream (handle or handle) without constant current through constant current, again and audio frequency/sub-picture pack carry out multiplexing generation standard code stream, make the standard decoder normal decoder.The video-frequency compression method processing procedure of this MPEG4 motion compensation technique is shown in Fig. 5,6.
H.264 the video-frequency compression method of motion compensation technique is identical with MPEG, and above-mentioned constant current method can those skilled in the art be used this step of realization, and does not exceed the disclosed content of the present invention.
Utilize the inventive method to make that the video object data stream of MPEG4/H.264 is that unit image object VOP number is constant with GVOP, and be that unit code stream length is definitely constant, guaranteed the constant of object video VOP stream rate like this with GVOP.Video object data stream and audio stream etc. are carried out the multiplexing system flow that obtains, audio stream is exactly constant current originally, as long as and that the flow of subimage etc. and video flowing are compared is very little, so to the very a spot of redundancy of each GVOP, just can obtain the MPEG4 program stream of constant current.Utilize the inventive method can accomplish that the length between the adjacent I-VOP fixes, and the VOP number between adjacent I-VOP is fixed.This code stream length that is equivalent to GVOP is fixed, and the VOP number among the GVOP is fixed.Make operations such as search location, editor be very easy to like this, another benefit is to be suitable for based on network real-time broadcast, can not cause the overflow or the underflow of the VBV buffer memory of decoding end, and mosaic, obstruction and not smooth just can not appear in picture.
Shown in Fig. 7,8, the standard code stream after the present invention handles can be used for the constant current transmission, makes receiving terminal standard decoder normal decoder; Also can be used for storage, because the standard code stream after constant current is handled has the set form unit, reading control can be earlier to the storage file analysis, find out standard code stream set form element length, press the element length computing, operations such as search location, editor, F.F., rewind down are very easy to, with non-constant current standard code stream not the storage of set form element length code stream read control and compare, reading one by one, judge, reading again, the efficient height when reducing search positional editing, F.F., rewind down.

Claims (13)

1, a kind of video-frequency compression method of motion compensation technique is characterized in that may further comprise the steps:
1) file that video motion compensation compression processing unit is formed is analyzed, and determines in the later step the parameter that uses;
2) file that associated video motion compensation compression processing unit is formed carries out preliminary treatment;
3) the video motion compensation compression processing unit data flow recompile that demultiplexing is obtained obtains the video motion compensation compression processing unit data flow of constant current;
4) audio frequency/sub-picture pack of the video motion after constant current compensation compression processing unit data flow and extraction is carried out multiplexing, and constant current obtains final data stream once more.
2, video-frequency compression method according to claim 1 is characterized in that the parameter in the step 1) comprises: whether after the decoding output is stream identification, audio frequency flow, the frame per second of 3: 2 pulldown, the bag number that cuts away, video formats, required audio stream and caption stream.
3, video-frequency compression method according to claim 1 is characterized in that step 2) may further comprise the steps:
A, from the file that the video motion compensation compression processing unit of intercepting is formed, extract required audio frequency and sub-picture pack;
B, demultiplexing obtains video motion compensation compression processing unit data flow from the file that the video motion compensation compression processing unit of intercepting is formed;
The system time (SCR) of c, the audio frequency of revising extraction, sub-picture pack and demonstration timestamp (PTS).
4, video-frequency compression method according to claim 3, it is characterized in that step c sound intermediate frequency bag shows that the timestamp amendment scheme is: the demonstration timestamp of audio pack be multiply by contraction-expansion factor, and contraction-expansion factor is the ratio that video motion compensation compression processing unit data flow and the theory of audio stream show time (according to the number calculating of display unit) in the file formed of original video motion compensation compression processing unit.
5, video-frequency compression method according to claim 3 is characterized in that the audio pack system time amendment scheme among the step c is: system time (second)=demonstration timestamp (second)-this wraps position (byte)/frame size (byte) * frame time (second)-fixedly empirical value (second) of first audio frequency frame head.
6, video-frequency compression method according to claim 3 is characterized in that the system time of the sub-picture pack among the step c, demonstration timestamp amendment scheme are: come system time, the demonstration timestamp of syndrome image packets according to the system time of the navigation bag of sub-picture pack place video motion compensation compression processing unit in the file of original video motion compensation compression processing unit composition and the difference of theoretic system time.
7, video-frequency compression method according to claim 1 is characterized in that step 4) may further comprise the steps:
1) the video motion compensation compression processing unit data flow packaging multiplexing with constant current is a code stream;
2) audio frequency that extracts and sub-picture pack are inserted in the bag-packaged video motion compensation compression processing unit data flow go;
3) make the number of the bag in each video motion compensation compression processing unit constant, if number less than setting, is filled it with complete zero bag; If number less than setting, then moves on to the beginning that next video motion compensates compression processing unit with additional audio pack and sub-picture pack;
4) revise the system time of each bag.
8, according to the described video-frequency compression method of one of claim 1-7, the video motion compensation compression processing unit data flow unit of the being meant picture number that it is characterized in that constant current in the step 3) is fixed, unit code stream length is fixed, and then video motion compensation compression processing unit stream rate is fixed.
9, video-frequency compression method according to claim 8, it is characterized in that in the MPEG2 compression standard, video motion compensation compression processing unit is formed video target files, video motion compensation compression processing unit data flow is a video data stream, the video motion compensation compression processing unit data flow of constant current is meant with image sets (GOP) to be that the unit number of image frames is fixed, and be that unit code stream length is fixed with the image sets, this image sets is a video motion compensation compression processing unit.
10, video-frequency compression method according to claim 9 is characterized in that in the MPEG2 compression standard, and the video motion of constant current compensation compression processing unit data flow is defined as: an image sets is fixed as 12 or 15 frames; The code stream length of an image sets is fixed; An image sets is fixed and is begun with code word 0x000001b3.
11, video-frequency compression method according to claim 8, it is characterized in that in the MPEG4/H.264 compression standard, video motion compensation compression processing unit is formed the object video file destination, video motion compensation compression processing unit data flow is a video object data stream, the video motion compensation compression processing unit data flow of constant current is meant with image object group (GVOP) to be that unit image image object (VOP) number is fixing, and be that unit code stream length is fixed with the image object group, this image object group is a video motion compensation compression processing unit.
12, video-frequency compression method according to claim 11, the constant current that it is characterized in that MPEG4 is handled and can be handled the constant current of single image group of objects code stream, also can handle the constant current of a plurality of image object group code stream, the image object group code stream after constant current is handled carries out multiplexing generation standard code stream with other image object group code streams and audio frequency/sub-picture pack.
13, according to the described video-frequency compression method of one of claim 1-7, it is characterized in that the video motion after the constant current compensates compression processing unit data flow and the multiplexing generation standard of audio frequency/sub-picture pack code stream, this standard code stream can be used for the constant current transmission, also can be used for storage.
CN200410049156.5A 2003-06-23 2004-06-22 Video frequency compressing method for motion compensation technology Pending CN1638480A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200410049156.5A CN1638480A (en) 2003-06-23 2004-06-22 Video frequency compressing method for motion compensation technology

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
WOPCT/CN03/00486 2003-06-23
PCT/CN2003/000486 WO2004114666A1 (en) 2003-06-23 2003-06-23 Constant stream compression processing method
CN200410049156.5A CN1638480A (en) 2003-06-23 2004-06-22 Video frequency compressing method for motion compensation technology

Publications (1)

Publication Number Publication Date
CN1638480A true CN1638480A (en) 2005-07-13

Family

ID=34862407

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200410049156.5A Pending CN1638480A (en) 2003-06-23 2004-06-22 Video frequency compressing method for motion compensation technology

Country Status (1)

Country Link
CN (1) CN1638480A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101833938A (en) * 2010-03-19 2010-09-15 广东宝莱特医用科技股份有限公司 Method and device for configuring data source for display unit dynamically
CN102647559A (en) * 2012-04-26 2012-08-22 广州盈可视电子科技有限公司 Pan-tilt tracing and recording method and device
CN102739923A (en) * 2011-04-08 2012-10-17 索尼公司 Image processing apparatus, image processing method, and program
CN111277896A (en) * 2020-02-13 2020-06-12 上海高重信息科技有限公司 Method and device for splicing network video stream images
CN112929701A (en) * 2021-02-04 2021-06-08 浙江大华技术股份有限公司 Video coding method, device, equipment and medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101833938A (en) * 2010-03-19 2010-09-15 广东宝莱特医用科技股份有限公司 Method and device for configuring data source for display unit dynamically
CN102739923A (en) * 2011-04-08 2012-10-17 索尼公司 Image processing apparatus, image processing method, and program
CN102647559A (en) * 2012-04-26 2012-08-22 广州盈可视电子科技有限公司 Pan-tilt tracing and recording method and device
CN111277896A (en) * 2020-02-13 2020-06-12 上海高重信息科技有限公司 Method and device for splicing network video stream images
CN112929701A (en) * 2021-02-04 2021-06-08 浙江大华技术股份有限公司 Video coding method, device, equipment and medium
CN112929701B (en) * 2021-02-04 2023-03-17 浙江大华技术股份有限公司 Video coding method, device, equipment and medium

Similar Documents

Publication Publication Date Title
US9992555B2 (en) Signaling random access points for streaming video data
US9716920B2 (en) Signaling attributes for network-streamed video data
JP5770345B2 (en) Video switching for streaming video data
US9843844B2 (en) Network streaming of media data
US9253240B2 (en) Providing sequence data sets for streaming video data
CN1293868A (en) Encoding device and method, decoding device and method and coding system and method
CN1781315A (en) Method for coding sequences of pictures
CN1655619A (en) Transcoding system and method for maintaining timing parameters before and after performing transcoding process
EP2589222B1 (en) Signaling video samples for trick mode video representations
CN102598688A (en) Streaming encoded video data
CN1826809A (en) Robust mode stagger casting with multiple delays for multi-resolution signals
CN1812587A (en) Video coding
CN1178497C (en) Data regeneration transmission device and data regeneration transmission method
CN1794812A (en) Method of transmission flow multiplex
CN1260959C (en) Image decoding method and apparatus and television receiver utilizing the same method
CN1638480A (en) Video frequency compressing method for motion compensation technology
WO2004114666A1 (en) Constant stream compression processing method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication