The method of assuring qualified video frequency transmission of low-code ratio wireless channel
Technical field
The present invention relates to a kind of method that improves video signal quality, especially a kind ofly be applied to low code check wireless channel terminal under the high bit-error environment, when not having enough channel retransmission of video frames, video quality is very poor or can't transmit vision signal the time, to ensure the method for high quality vision signal.Belong to communication technical field.
Background technology
Because the increase, particularly 3G network of wireless signal-path band width are about to put into effect, increasing portable terminal adopts the Video Applications of big data quantity, such as visual telephone, and Streaming Media, radiovision is live.Because the restriction of the acceptable price of user, can not provide unlimited bandwidth to Video Applications for the user again: can provide wireless channel such as 3G network, but generally only use the 64K channel to carry visual telephone business up to 384K.
Yet the regulation error rate can reach 10 in the 3G business
-4To 10
-6, in the border district, or the error rate will reach 10 under the situation of high-speed motion
-3Picture quality almost can not be accepted in this case.In order to guarantee picture quality, must in view data, add error correcting code or retransmitting images frame.Because the limiting at these 2 and all be difficult to realization of channel.Therefore prior art can not be carried out video traffic at channel bit error rate than condition with higher., visual telephone is voice frequency telephone transmission of video no longer such as being lowered one's standard or status.
Be that example is introduced prior art problems below with the visual telephone business:
Existing technical scheme is by the 3G324 agreement regulation of the ITU of International Telecommunications Union tissue.The 64K Channel Transmission is adopted in suggestion in the agreement, adopts MPEG4 or H.263 as Video Codec, G.723.1 or AMR as audio codec.Yet the channel of video passage has only (all the other leave voice channel and command channel for) about 40K under the 64K channel condition.Adopt MPEG4 or H.263 as Video Codec encoding and decoding QCIF picture size, per second 15 two field pictures (normal conditions) need to consume the 40K channel.
Therefore in order to solve the problem that the vicious situation hypograph of channel quality descends, in the 3G324 protocol suite, error checking and correction and retransmission mechanism have been adopted.H.223 in the agreement data unit is added check code because the restriction of channel, just added the CRC check sign indicating number it can only debugging can not error correction.When finding mistake, CRC require distance terminal to retransmit this frame.If the error rate is very low (less than 10
-5) situation under still passable, but when the error rate is very high (10
-3To 10
-4) situation under just may.Because a frame of video mean size is about 2.5k.If the error rate is 10
-5, so average per 40 frames have a mistake, transmit in each second under the situation of 15 frames, and the erroneous frame that it is 1K that the average per second of 64K channel need retransmit a size, this is no problem.If but the error rate is 10
-4, so, the average per second of 64K channel will retransmit the erroneous frame of 10K.The 64K channel is not accomplished at all.Therefore the error rate is〉10
-4The time 64K channel can not finish re-transmission, can only abandon the ungird picture frame of wrong data of the picture frame that has mistake or pressure.
Prior art almost exhausts the bandwidth that wireless network can provide, and can retransmit a frame once in a while under the not high situation of channel bit error rate, but does not have unnecessary channel to come data retransmission under the situation of high bit-error.Because the characteristic of video compression is: temporal correlation is very high, and (up to 16 frames) several frames are all relevant continuously for a frame and back, and a frame mistake must retransmit this frame, and not so image can influence and reach 1 second time, thus at channel bit error rate than higher (10
-4To 10
-5) situation under the non-constant of wireless terminal picture quality, at channel bit error rate than higher (10
-3To 10
-4) situation under can not start video traffic.
Summary of the invention
Main purpose of the present invention is to provide a kind of method of assuring qualified video frequency transmission of low-code ratio wireless channel, it solves low code check wireless channel terminal under the high bit-error environment, when not having enough channel retransmission of video frames, video quality is very poor or can't transmit the problem of vision signal, ensures that local host still can obtain high quality video signal.
The present invention is achieved through the following technical solutions above-mentioned purpose:
A kind of method of assuring qualified video frequency transmission of low-code ratio wireless channel, it comprises that the vision signal input equipment transfers data to the remote host encoder, encoder transfers data to the 3G channel by protocol stack after data are encoded, the local host decoder is decoded for the data that receive by the 3G channel, play these data subsequently, it is characterized in that, also comprise the steps:
Step 1, the remote host encoder carries out macroblock packet with the video signal data that obtains;
Step 2 is carried out the data dividing processing to each macro block group, and data are divided into significant data, general significant data, non-significant data three classes;
Step 3, add checking algorithm check code with error correction for significant data, general significant data adds the checking algorithm check code with error detection function, adds the checking algorithm check code with error detection function for other non-significant datas and carries out verification or do not make checking treatment;
Step 4 sends above-mentioned data together and to enter channel and transmit;
Step 5, the local host decoder is handled the significant data that receives, general significant data and non-significant data respectively; Make significant data obtain reliable transmission, general significant data and non-significant data are then determined concrete processing according to corresponding threshold value;
Step 6, local host sends the re-transmission signaling according to the important kind of misdata and the concrete zone of misdata generation, and remote host transmits misdata again.
Comprise in the data format that described vision signal input equipment adopts when transferring data to the remote host encoder: control field, macro block information, macro block significant data section, SRC field, the general significant data of macro block and non-significant data section and crc field; Wherein,
The CSN subsequence number that control field is used for carrying sequence type, the sequence number of data and is used to indicate the macro block group number;
How many bytes macro block information is used to indicate is a macro block group, and the quantity and the arranging situation of each macro block group the inside macro block and little macro block;
Macro block significant data section is used to deposit cuts apart later significant data to data, thereafter followed by the SRC field; The check code of SRC field is used for described significant data is carried out error correction;
General significant data of macro block and non-significant data section are used for store data and cut apart later general significant data and non-significant data, thereafter followed by crc field; Check code in the crc field is used to find the error situation of described general significant data and non-significant data.
In the described step 5,, find wrong and more after the error correction, the significant data after the error correction is sent to decoder decode by checking algorithm check code with error correction if significant data mistake ratio is less than or equal to predetermined threshold value; If wrong ratio greater than predetermined threshold value, in the time of can't carrying out error correction, is not issued decoder with this significant data and decoded, but send error reporting to high level, high level requires to retransmit this significant data by agreement to remote host.
In the described step 5,, when error rate is less than or equal to predetermined threshold value, described general significant data is directly issued decoder decode if find that by checking algorithm check code general significant data makes a mistake with error detection function; If have ratio that the checking algorithm check code of error detection function finds that general significant data makes a mistake greater than predetermined threshold value,, this general significant data do not decoded then to the upper strata reporting errors.
In the described step 5, do not deal with, perhaps when the error rate of non-significant data surpasses threshold value, require remote host to retransmit for non-significant data.
The data that described step 1 is specially a frame become macro block or little macro block, and macro block or little macro block are stamped sign, and macro block or the little macro block for predetermined quantity divides into groups again; To stamp packet header for the grouping bag after macro block or the little macroblock packet, identify data cases in the size of described grouping bag, grouping bag and the bag that divides into groups.
The data that described step 5 requires remote host to retransmit are the type and the residing concrete zone of misdata of misdata in the macro block group.
The described data that require remote host to retransmit are that the other side in the macro block group requires the data area that retransmits.
Also comprise the agreement that to send into data protocol stack after macroblock packet and data are cut apart after the described step 3,, carry out data backup, prepare against the recipient and require data re-transmission sending into the data that store a window before high-rise.
Described step 5 also comprises the environment change as the mobile subscriber, and when the error rate surpassed threshold value, re-transmission signaling remote host after the macroblock number in original predetermined number of macroblocks macro block group is reduced, transmitted the macro block group more again.
According to technical scheme provided by the invention as can be known:
1, adopts the higher coding and decoding video algorithm of code efficiency that data are classified according to importance, H.264 replace MPEG4 or H.263 such as adopting.Adopt the error correcting code that has error correction such as SRC for the important information in the frame of video, reduce number of retransmissions.Non-significant data can adopt the CRC check sign indicating number, the make mistake quantity of frame of verification.
2, improve retransmission mechanism.Because video traffic do not need to guarantee that data are entirely true, get final product so only need retransmit significant data, if non-significant data amount of error is not just not to need to retransmit very greatly, thereby guarantee can normally start video traffic under the higher environment of channel bit error rate.
Description of drawings
Fig. 1 is present device, agreement and channel system architecture block diagram;
Fig. 2 is a flow chart of data processing schematic diagram of the present invention.
Embodiment
Below in conjunction with embodiment the present invention is done detailed description further.
With the visual telephone business is example, adopts the 3G324 agreement of ITU tissue to realize visual telephone business, and H.264 the present invention adopts video algorithm to replace MPEG4 or video algorithm H.263, adds macroblock packet and data partitioning algorithm at last at algorithm flow H.264; Improve H.223 (hereinafter to be referred as EH.223) agreement, adopt SRC and CRC mixing check code to come check errors; Cut apart later important video data for data and adopt SRC, general significant data and non-significant data adopt the CRC algorithm; Improve H.245 algorithm, add the message that retransmits the macro block group, add the message that retransmits important information, general important information, non-important information.
Particularly, the detailed process of the inventive method is as follows:
Macroblock packet: through the later data of H.264 encoding, to the macro block (16 x 16block) of each frame the inside or little macro block (macroblock) divides into groups.Encoder can be stamped sign to them after the data of one frame are become macro block or little macro block, and macro block and the little macro block for some divides into groups then.Such as per 512 pixels is one group, is exactly one group of 2 16 * 16block so, one group of one 16 x 16block and 44 * 4macroblock, one group of 8 macroblock or the like.Concrete how many pixels are the one group of situation decision that will see channel size and channel bit error rate.Will stamp packet header for the grouping bag, identifying this is the grouping bag, the size of bag, data cases in the bag.
Data are cut apart: then each macro block group carried out the data dividing processing, just information are divided into category-A (significant data), and category-B (general significant data), C class (non-significant data) three classes put together transmission to various other data of level then.H.223 handle after receiving data.Foundation is the concrete dividing method of coded data H.264:
1, the macroblock partition of different sizes and shape.Motion compensation to each 16 * 16 pixel macroblock can be adopted different sizes and shape, H.264 supports 7 kinds of patterns, as shown in Figure 2.The motion compensation of little block mode is that the processing of motion details has improved performance, has reduced blocking artifact, has improved the quality of image.This just can satisfy the said macroblock packet condition in front.
2, also often utilize in H.264 method that data are cut apart to deal with the variation of channel code rate.Say that on the whole the notion that data are cut apart is exactly to produce the video data with different priorities to come service quality QoS in the network enabled in encoder.For example adopt based on the data of grammer and cut apart (syntax-baseddata partitioning) method, every frame data are divided into several parts by its importance, allow when buffering area overflows, to abandon not too important information.Also can adopt similar time data to cut apart (temporaldata partitioning) method, finish by in P frame and B frame, using a plurality of reference frames.
Embodiment of the invention employing grammer is cut apart data is divided into several classes, and significant data is carried out verification.Specifically referring to H.264 standard code.
Data backup: the EH.223 agreement that will send into data the 3G324 protocol stack after macroblock packet and data are cut apart.Before sending into high level, store the data of a window (4-8 frame), in case the other side requires to retransmit.
Add check code: the general CRC of employing carries out verification for AL-SDU in H.223, because the CRC check sign indicating number can not error correction, so the present invention adopts SRC check code (seeing following SRC for details describes).SRC check code data transfer rate and redundancy rate are 1:4, yet channel is limited, can not total data adopt the SRC coding in 64K channel the inside, so will adopt SRC and CRC hybrid coding method.Therefore, among the present invention, the AL3 form that no longer adopts at the EH.223adapter layer transmits data, but adopts new transformat (being defined as the AL4 form) that data are organized.
AL4 form in an example of the present invention is as shown in the table:
(1) |
Control field (0,1,2 or 3byte) |
(2) |
AL-PDU (macro block information 2-4byte) |
(3) |
AL-PDU (macro block significant data section N byte) |
(4) |
The SRC field |
(5) |
AL-PDU (general significant data of macro block and non-significant data section) |
(6) |
Crc field |
In the AL4 form, control field, macro block information, macro block significant data section, SRC field, the general significant data of macro block and non-significant data section and crc field; Wherein, theing contents are as follows of each field:
A) control field
(1) |
The PT sequence type |
(2) |
SN sequence number (indication frame number) |
(3) |
CSN subsequence number (indication macro block group number) |
B) AL-PDU (macro block information 2-4byte)
Indication macro block group information.Comprise macro block group of how many byte of indication, the quantity and the arranging situation of each macro block group the inside macro block and little macro block.
C) AL-PDU (macro block significant data section N byte)
Data are cut apart later important information to be placed on here.Allow following SRC check code to its error correction.
D) AL-PDU (general significant data of macro block and non-significant data section)
Data are cut apart later non-important information to be placed on here.Allow the CRC check sign indicating number find error situation.
Carry out the SRC coding for important information in the AL4 form, carry out the CRC coding for unessential information.Can guarantee that so important data can error correction, unessential data can be found mistake.
Send and retransmit signaling: at the decoder of local host end, when decoding for the data that receive, if the significant data mistake is not a lot, the SRC check code can be found mistake and change mistake.If mistake much can not error correction, send error reporting to high level, high-rise by H.245 requiring to retransmit significant data in this macro block group to remote host.So will change the method that whole bag in the existing scheme retransmits into and retransmit significant data in macro block group or the macro block group.If CRC finds that general significant data makes a mistake but whether it has error correcting capability, directly issuing decoder under error rate is not very high situation decodes, if mistake is very high, then (error rate is very high to be meant to the upper strata reporting errors if error rate is very high, agreement finds that continuously a lot of parcel CRC check make mistakes, and perhaps the parcel CRC check ratio of makeing mistakes is greater than certain threshold value).The upper strata requires remote host to retransmit the type of misdata in the macro block group and the concrete zone of misdata by EH.245, for example transmits the other side in the macro block group and requires the data area that retransmits.EH.245 can cooperate EH.223 to send the re-transmission order, and the data that indicating remote need retransmit are which frames of data, and which macro block group is that significant data also is non-significant data.Therefore EH.245 will add resend messages, will describe in detail in the message to retransmit which macro block group in which frame, is that the re-transmission significant data also is non-significant data.Detect such as: local host and to be numbered 10 general important data of first macro block group of frame and to make a mistake, and error rate is higher, it just can send signaling remote host data retransmission, and the signaling back is numbered 10 the general significant data of first macro block group (3) of frame (2) immediately following signal location information-(1) that requires data retransmission.
When mobile subscriber's environment change, when the error rate became big, EH.245 should have the ability that the notice remote host diminishes the macro block group to help retransmitting in addition.Implementation method is: the error rates of data that local host discovery remote host transmits is all bigger in a period of time, it just sends the order that changes macroblock size and gives remote host. and remote host is received after this order, macroblock size is diminished, and the data volume that can at every turn retransmit diminishes like this.Weak point is that the number of bag can increase, and this can increase the excessive data consumption of bag.Otherwise the error rates of data that local host discovery remote host transmits is all smaller in a period of time, and it just sends the order that changes macroblock size and gives remote host.Remote host is received after this order, and macroblock size is become the big excessive data consumption that reduces bag.
Feasibility analysis of the present invention is:
The category-A data, the category-B data, the ratio of C class data is roughly 1:1:3; That is: category-A takies the 4K channel, and category-B takies the 4K channel.The C class takies the 12K channel.
For category-A The data SRC verification; Because so SRC check code rate=1/4 is category-A data occupancy 20K channel.Category-B and C class data all adopt CRC check, and busy channel is constant.
So video takies the 36K channel altogether, audio frequency takies average 8K channel, and signaling takies the 4K channel; The 64K channel also has the 16K channel more than needed, can be used for retransmitting the frame of makeing mistakes.The SRC algorithm not only can be checked mistake, but also can error correction.
Employing after cutting apart according to frame of video macroblock packet of the present invention and data has the check code verification significant data of error correction and adopts the check code error detection that has measuring ability, and can in the high bit-error channel, the result according to the different check sign indicating number select to retransmit the significant data or the method for non-significant data, can ensure in the low-rate channel under the high bit-error environment and carry out video traffic, and the quality of video image is significantly improved.
It should be noted last that, above embodiment is only unrestricted in order to the explanation the technical solution of the utility model, although the utility model is had been described in detail with reference to preferred embodiment, those of ordinary skill in the art is to be understood that, can make amendment or be equal to replacement the technical solution of the utility model, and not breaking away from the spirit and scope of technical solutions of the utility model, it all should be encompassed in the middle of the claim scope of the present utility model.