CN1466376A - Video code stream transmission processing method - Google Patents

Video code stream transmission processing method Download PDF

Info

Publication number
CN1466376A
CN1466376A CNA021123713A CN02112371A CN1466376A CN 1466376 A CN1466376 A CN 1466376A CN A021123713 A CNA021123713 A CN A021123713A CN 02112371 A CN02112371 A CN 02112371A CN 1466376 A CN1466376 A CN 1466376A
Authority
CN
China
Prior art keywords
code stream
buffer memory
macro block
mode
thresholding
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
CNA021123713A
Other languages
Chinese (zh)
Other versions
CN100369476C (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CNB021123713A priority Critical patent/CN100369476C/en
Publication of CN1466376A publication Critical patent/CN1466376A/en
Application granted granted Critical
Publication of CN100369476C publication Critical patent/CN100369476C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

A video stream transmission process method includes: a data packet effective load threshold 1 two buffer storages 1,2 as large as the threshold are designed and initialized with the biggest effective bit number stipulated in the protocol as the basis, a macrocode stream output from the coder is stored in buffer storage 2 which position attribute is judged, the sum of streams in buffer storages 1 and 2 is judged to see if it is smaller than threshold 1,and to packet and package the streams in case smaller than threshold 1, or continue to packet and package streams in the case bigger or equal to threshold1, to package transmission protocol packets to user data protocol packets to IP packets entering into an IP channel then return back.

Description

A kind of video code stream transmission processing method
Technical field
The invention belongs to image information transmission and process field, be specifically related to a kind of self adaptation of video code flow efficiently packaging method.
Background technology
Transmission real-time video code stream has become the important component part that internet multimedia is used on Internet, and entering video code flow packing this a part of key issue just before the channel, it directly has influence on making full use of of Internet resources and efficiency of transmission.If it is improper that the video data encapsulation mode is selected, will cause the increase of communication-cost; If the video packets of data payload is excessive, occur when congested when network like this, just cause losing of video packets of data and then damage image quality easily; If the payload of video packets of data is too small, will waste the valuable network bandwidth.
Traditional video data packaging method has two classes: a class is to be the Mode A packaging method of partitioning boundary with frame or macro block group (GOB), is exactly to be the Mode B/C packaging method of partitioning boundary with macro block (MB) in addition.In the Mode A packaging method, the load head accounts for 4 bytes, enters channel after adding the code stream encapsulation of GOB of fixed number; In Mode B/C packaging method, the load head accounts for 8/12 byte, enters channel after adding the code stream encapsulation of MB of fixed number.If adopt Mode B/C packaging method,, can cause the increase of communication-cost because the load head takies too much byte.In addition, the GOB or the MB of encapsulation fixed number can cause in the packet payload on the low side under low code check, the waste bandwidth resource, and under high code check, can cause in the packet payload to surpass the maximum significant bit number of agreement predetermined data bag, cause the data-bag lost in the transmission easily.United States Patent (USP) 6,154, it is the packing unit that 780 " Method and apparatus fortransmission of a flexible and error resilient video bit stream " propose with sheet (Slice), and the number of macro block can dynamically be adjusted among the Slice, but H.263 the Slice structure is option in the agreement at ITU-T, thereby its using value is not high; In addition, this packaging method is owing to use the Slice structure, so increase the Slice header structure on each packet, this has increased communication-cost undoubtedly, has reduced the efficiency of transmission of video code flow.
Summary of the invention
Technical problem to be solved by this invention provides a kind of self adaptation of video code flow efficiently packaging method, to overcome that described communication-cost is big, the code stream efficiency of transmission is low and the shortcoming of easy packet loss during network congestion.
Video code stream transmission processing method proposed by the invention may further comprise the steps:
The first step, based on the maximum significant bit number of agreement predetermined data bag, setting data is surrounded by the thresholding 1 of effect load, and buffer memory 1, buffer memory 2 that two sizes are set is thresholding 1, and it is carried out initialization;
Second step, the code stream of a macro block of encoder output is deposited to buffer memory 2;
The 3rd goes on foot, judges the position attribution of this macro block;
The 4th step, judge in the buffer memory 1 that whether the code stream sum is less than thresholding 1 in the code stream and buffer memory 2; If then turned to for the 6th step, otherwise continued for the 5th step;
The 5th the step, to carry out the packing encapsulation process of code stream more than or equal to the situation of thresholding 1;
This step is divided into three steps again:
1. serve as the encapsulation border whether according to current data packet, code stream in the buffer memory 1 is packaged into the real-time transport protocol (rtp) bag with Mode A or Mode B/C with the macro block group, and with buffer memory 1 zero clearing;
2. according to the position attribution of current coded macroblocks, determine the encapsulation mode of next RTP bag: Mode A or Mode B/C;
3. code stream in the buffer memory 2 is moved in the buffer memory 1, and with buffer memory 2 zero clearings; Changed for the 7th step over to;
The 6th the step, to carry out the packing encapsulation process of code stream less than the situation of thresholding 1;
This step is divided into four steps again:
1. code stream in the buffer memory 2 is moved in the buffer memory 1, and with buffer memory 2 zero clearings;
2. deposit code stream in the macro block of buffer memory 1 and the original position that this macro block is in a frame or macro block group from buffer memory 2 if current coded macroblocks is first, then current RTP bag serves as the encapsulation border with the macro block group;
3. if current coded macroblocks position, then turned to for second step not in the ending of picture frame;
4. serve as the encapsulation border whether according to current data packet with the macro block group, with code stream in the buffer memory 1 with pattern
A or Mode B/C are packaged into the RTP bag, and with buffer memory 1 zero clearing;
The 7th goes on foot, RTP is sealed dressed up User Datagram Protoco (UDP) (UDP) bag;
The 8th step, report protocol package to be packaged into IP bag user data, enter the IP channel; Returned for second step.
The present invention is based on the maximum significant bit number of agreement predetermined data bag, setting data is surrounded by the upper limit of imitating load, with the subelement of macro block as the code stream encapsulation, reach the upper limit of payload when the code stream number of plurality of sub unit, just these subelements are packaged into packet, and add corresponding Mode A or Mode B/C load header according to the position of first subelement in image, send into channel then; Therefore the present invention can the different code checks of self adaptation, the different video scene, the macro block code stream of number could vary is packaged into packet with mixed mode, thereby has reduced communication-cost, improved the code stream efficiency of transmission; This inventive method computational complexity is low in addition, satisfies the demand of real-time, can be widely used in not having the video communication on the IP network that service quality (QoS) guarantees, strong robustness has higher utility.
Description of drawings
Fig. 1 is the specific embodiment flow chart of the method for the invention;
Fig. 2 is a flow chart of judging the macro block position attribute in the method for the invention;
Fig. 3 is the packing encapsulation process flow chart of code stream when the code stream sum is more than or equal to thresholding 1 in code stream and the buffer memory 2 in the buffer memory 1;
Fig. 4 is the packing encapsulation process flow chart of code stream when the code stream sum is less than thresholding 1 in code stream and the buffer memory 2 in the buffer memory 1;
Embodiment
The present invention is described in further detail below in conjunction with accompanying drawing.
With IEEE 802.3 agreements is example, specifies as follows to video code stream transmission processing method of the present invention.Referring to Fig. 1:
The first step, based on the maximum significant bit number of IEEE 802.3 agreement predetermined data bags, setting data is surrounded by the thresholding Th1 of effect load, and buffer memory Buf1, Buf2 that two sizes are set is Th1; To the global variable g_nMbPos position of macro block (expression), g_PacketFrmGob (expression packet whether be encapsulation border with GOB) initialization; Concrete enforcement is as follows:
A.IEEE 802.3 agreements regulation: the size of Ethernet bag is 1.5kByte, and the ethernet packet header size is 14Byte, IP packet header size is 20Byte, UDP packet header size is 8Byte, RTP packet header size is 12Byte, Payload (load) head size reaches a large amount of experimental results for 4Byte (Mode A), 8Byte (ModeB), 12Byte (Mode C) in view of the above so can hold payload capacity: 1.5k-14-20-8-12-12=1434 in packet, and we are made as 1408 Byte with data packet payload thresholding Th1;
b.g_nMbPos=0;g_PacketFrmGob=1;
Wherein: g_nMbPos: the position of expression macro block.
When macro block is in the original position of a frame or GOB, g_nMbPos=0;
When macro block is in the end position of a frame, g_nMbPos=1;
During other positions, g_nMbPos=2;
G_PacketFrmGob: whether expression RTP bag is the encapsulation border with GOB.
G_nPackFrmGob=1, representing the RTP bag is to be the encapsulation border with GOB;
G_npackFrmGob=0, representing the RTP bag is not to be the encapsulation border with GOB;
Second step, the code stream of a macro block of encoder output is deposited to buffer memory Buf2;
The 3rd goes on foot, judges the position attribution of this macro block; With reference to Fig. 2, specifically implement as follows:, carry out following operation: g_nMbPos=0 if this macro block is the initial macro block of a frame or GOB; Otherwise, judge that whether this macro block is that the ending macro block of a frame is, then g_nMbPos=1; Deny, then g_nMbPos=2;
Do you the 4th step, judge that (among the Buf1 among code stream+Buf2 code stream) is more than or equal to Th1? less than Th1, then turned to for the 6th step;
The 5th the step, to carry out the packing encapsulation process of code stream more than or equal to the situation of Th1.This step is divided into three steps again:
1. whether be the sign g_PacketFrmGob on encapsulation border according to current data packet, code stream among the Buf1 is packaged into the RTP bag with Mode A or Mode B/C with GOB, and with the Buf1 zero clearing; With reference to Fig. 3, specifically implement as follows: if g_PacketFrmGob=1 carries out following operation: code stream among the Buf1 is packaged into the RTP bag with Mode A; With the Buf1 zero clearing; Otherwise code stream among the Buf1 is packaged into the RTP bag with Mode B/C; With the Buf1 zero clearing;
2. according to the position attribution sign g_nMbPos of current coded macroblocks, determine the encapsulation mode of next RTP bag: Mode A or Mode B/C; With reference to Fig. 3, specifically implement as follows: if g_nMbPos=0, g_PacketFrmGob=1; Otherwise, g_PacketFrmGob=0;
3. code stream among the Buf2 is moved among the Buf1, and with the Buf2 zero clearing; Changed for the 7th step over to;
The 6th the step, to carry out the packing encapsulation process of code stream less than the situation of Th1.This step is divided into four steps again:
1. code stream among the Buf2 is moved among the Buf1, and with the Buf2 zero clearing;
2. deposit code stream in the macro block of Buf1 and the original position that this macro block is in a frame or GOB from Buf2 if current coded macroblocks is first, then the current RTP bag is the encapsulation border with GOB; With reference to Fig. 4, specifically implement as follows: if g_nMbPos=0 and to be first deposit code stream in the macro block of Buf1, then g_PacketFrmGob=1 from Buf2;
3. if current coded macroblocks position, then turned to for second step not in the ending of picture frame; With reference to Fig. 4, specifically implement as follows: if g_nMbPos ≠ 1 turned to for second step;
4. whether be the sign g_PacketFrmGob on encapsulation border according to current data packet, code stream among the Buf1 is packaged into the RTP bag with Mode A or Mode B/C with GOB, and with the Buf1 zero clearing; With reference to Fig. 4, specifically implement as follows: if g_PacketFrmGob=1 carries out following operation: code stream among the Buf1 is packaged into the RTP bag with Mode A; With the Buf1 zero clearing; Otherwise, code stream among the Buf1 is packaged into the RTP bag with Mode B/C; With the Buf1 zero clearing;
The 7th goes on foot, RTP is sealed dress up the UDP bag;
The 8th goes on foot, UDP is sealed dress up the IP bag, enters the IP channel; Returned for second step.

Claims (4)

1, a kind of video code stream transmission processing method may further comprise the steps:
The first step, based on the maximum significant bit number of agreement predetermined data bag, setting data is surrounded by the thresholding 1 of effect load, and buffer memory 1, buffer memory 2 that two sizes are set is thresholding 1, and it is carried out initialization;
Second step, the code stream of a macro block of encoder output is deposited to buffer memory 2;
The 3rd goes on foot, judges the position attribution of this macro block;
The 4th step, judge in the buffer memory 1 that whether the code stream sum is less than thresholding 1 in the code stream and buffer memory 2; If then turned to for the 6th step, otherwise continued for the 5th step;
The 5th the step, to carry out the packing encapsulation process of code stream more than or equal to the situation of thresholding 1;
The 6th the step, to carry out the packing encapsulation process of code stream less than the situation of thresholding 1;
The 7th goes on foot, RTP is sealed dressed up the User Datagram Protoco (UDP) bag;
The 8th step, report protocol package to be packaged into IP bag user data, enter the IP channel; Returned for second step.
2, a kind of video code stream transmission processing method according to claim 1, it is characterized in that described the 5th the step may further comprise the steps:
1), serve as the encapsulation border whether according to current data packet with the macro block group, code stream in the buffer memory 1 is packaged into the RTP bag with Mode A or Mode B/C, and with buffer memory 1 zero clearing;
2), according to the position attribution of current coded macroblocks, determine the encapsulation mode of next RTP bag: Mode A or Mode B/C;
3), code stream in the buffer memory 2 is moved in the buffer memory 1, and with buffer memory 2 zero clearings.
3, a kind of video code stream transmission processing method according to claim 1, it is characterized in that described the 6th the step may further comprise the steps:
1), code stream in the buffer memory 2 is moved in the buffer memory 1, and with buffer memory 2 zero clearing;
2) deposit code stream in the macro block of buffer memory 1 and the original position that this macro block is in a frame or macro block group from buffer memory 2 if current coded macroblocks is first, then current RTP bag serves as the encapsulation border with the macro block group;
3) if current coded macroblocks position, then turned to for second step not in the ending of picture frame;
4), serve as the encapsulation border whether according to current data packet with the macro block group, code stream in the buffer memory 1 is packaged into the RTP bag with Mode A or Mode B/C, and with buffer memory 1 zero clearing.
4, a kind of video code stream transmission processing method according to claim 1 is characterized in that described payload thresholding 1 is set at 1408 Byte in IEEE 802.3 agreements.
CNB021123713A 2002-06-29 2002-06-29 Video code stream transmission processing method Expired - Fee Related CN100369476C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB021123713A CN100369476C (en) 2002-06-29 2002-06-29 Video code stream transmission processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB021123713A CN100369476C (en) 2002-06-29 2002-06-29 Video code stream transmission processing method

Publications (2)

Publication Number Publication Date
CN1466376A true CN1466376A (en) 2004-01-07
CN100369476C CN100369476C (en) 2008-02-13

Family

ID=34141894

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB021123713A Expired - Fee Related CN100369476C (en) 2002-06-29 2002-06-29 Video code stream transmission processing method

Country Status (1)

Country Link
CN (1) CN100369476C (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101141375B (en) * 2006-09-05 2010-12-22 华为技术有限公司 Packet transmission method, transmission apparatus and system within LAN
CN101998141B (en) * 2008-06-19 2013-06-05 华为技术有限公司 Method, device and system for packaging, encoding and decoding video data

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6154780A (en) * 1996-12-18 2000-11-28 Intel Corporation Method and apparatus for transmission of a flexible and error resilient video bitstream
KR100235617B1 (en) * 1996-12-31 1999-12-15 전주범 Digital- vhs encoding method and encoder
KR100363162B1 (en) * 1998-11-02 2003-01-24 삼성전자 주식회사 Method and apparatus for transmitting and recovering video signal
WO2002019709A1 (en) * 2000-08-25 2002-03-07 Hamid Gharavi Dual priority video transmission for mobile applications

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101141375B (en) * 2006-09-05 2010-12-22 华为技术有限公司 Packet transmission method, transmission apparatus and system within LAN
CN101998141B (en) * 2008-06-19 2013-06-05 华为技术有限公司 Method, device and system for packaging, encoding and decoding video data

Also Published As

Publication number Publication date
CN100369476C (en) 2008-02-13

Similar Documents

Publication Publication Date Title
CN1906906A (en) Optimized radio bearer configuration for voice over IP
CN1196339C (en) Method and apparatus for streaming scalable video
CN1303796C (en) Transmitting data over a general packet radio service wireless network
CN1339878A (en) Data transmitter and data transmitting method
CN101057461A (en) Apparatus and method for compressing of herder in a broad band wireless communication system
CN1615618A (en) A bi-directional packet data transmission system and method
CN1330359A (en) Method and device for transmission different business data using internet protocol datagram
CN1148931C (en) Method for implementing stream medium transmission based on real time transmission protocol and transmission control protocol
CN1859206A (en) Method for multiplexing residual bandwidth and network equipment
CN1299479C (en) Slicing transmitting method of tunnel packet
CN1152313C (en) Section-by-section congestion control method based on random early detection
CN101137060A (en) Video transmission method, system and equipment
CN101047476A (en) Method and device for selecting modulation mode
CN1248465C (en) Management method of data fransmission/receiving butter region in network communication
CN1339212A (en) Method and apparatus for reconstructing media
Altonen et al. Open-source RTP library for high-speed 4K HEVC video streaming
CN1466376A (en) Video code stream transmission processing method
CN1543104A (en) Data transmission method for mobile packet network
CN1812368A (en) Method for transmitting message data by IP facsimile gateway
CN1842080A (en) Method for adjusting transmission control protocol receive window
CN1968398A (en) Method for interface adaptation between IPTV and stream media equipment
CN1885830A (en) Method and gateway for transmitting voice stream based on network load in wireless packet network
CN1694455A (en) Over platform end-to-end PTP protocol stack designing method
CN1337810A (en) Method and system using radio communication system to transmit IP communication quantity
CN1219373C (en) Communication method based on cell packet access network protocol stack

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20080213

Termination date: 20140629

EXPY Termination of patent right or utility model