CN105611291A - Method and device for adding mark information and detection frame loss in video frame - Google Patents

Method and device for adding mark information and detection frame loss in video frame Download PDF

Info

Publication number
CN105611291A
CN105611291A CN201511026855.2A CN201511026855A CN105611291A CN 105611291 A CN105611291 A CN 105611291A CN 201511026855 A CN201511026855 A CN 201511026855A CN 105611291 A CN105611291 A CN 105611291A
Authority
CN
China
Prior art keywords
frame
video
row
component image
sequence number
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
CN201511026855.2A
Other languages
Chinese (zh)
Other versions
CN105611291B (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.)
Shanghai Zhongyuan Network Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology 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
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201511026855.2A priority Critical patent/CN105611291B/en
Publication of CN105611291A publication Critical patent/CN105611291A/en
Application granted granted Critical
Publication of CN105611291B publication Critical patent/CN105611291B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/164Feedback from the receiver or from the transmission channel
    • H04N19/166Feedback from the receiver or from the transmission channel concerning the amount of transmission errors, e.g. bit error rate [BER]

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The embodiment of the invention discloses a method and device for adding mark information and detection frame loss in a video frame. The method comprises following steps: obtaining a to-be-sent YUV video frame; taking the to-be-sent YUV video frame as a current video frame; extracting a Y-component image of the video frame; allocating a continuous original serial number for marking the video frame to the Y-component image of the video frame; converting the original serial number into a binary number with preset digits; embedding the binary number in the Y-component image of the video frame, comprising: modifying the end of a preset component of all pixels in each part of the video frame into the corresponding digit of the binary number; sending the current video frame embedded with the serial number to a video receiver so that the video receiver can detect frame loss according to the mark information. In application of the embodiment of the invention, the storage space can be saved; the processing process of carrying out frame loss detection to the video transmitted in real time is simplified; and the calculation time is saved.

Description

In frame of video, add the method and apparatus of label information and detection frame losing
Technical field
The present invention relates to field of video transmission, particularly a kind of in frame of video, add label information andDetect the method and apparatus of frame losing.
Background technology
Along with the development of internet and mobile Internet, need the application of real-time Transmission video more and more.For example, rapidly, video calling is higher to requirement of real-time in video calling development, but in actual conditionsIn, due to the bandwidth deficiency of network, time delay packet drop is serious, and video decoding/encoding device, demonstration are establishedThe hardware performance such as standby does not reach expection etc., the situation that there will be frame of video to lose, make video receiver withoutThe data that the complete displaying video transmitting terminal of method collects, this has reduced user's experience. A kind of video callingComprehensive, the objective measurement method of frame losing are indispensable for the performance of evaluating a video system. The discriminating of current video frame losing mainly goes to differentiate by human eye whether video sequence has the situation of " frame-skipping ",The method efficiency is low and inaccurate, although there are some parameters can be used for differentiating in video encoding and decoding standardFrame of video is direct loss situation from be encoded to decode procedure, but it is to encoding in video call processBefore and decoding after, show before frame of video loss situation helpless.
In prior art, the processing of the video of real-time Transmission being carried out to frame losing detection has two kinds of modes:
A kind of mode is that the video sequence by generating special chequered with black and white image comes detected transmission systemWhether system has frame loss condition, but it does not use the real video image gathering to analyze, and can not simulateThe whole complex scene of the video of real real-time transmission.
Another is that whether tags detected has something lost by sequence of video images being increased to extra labelWhether leak detected transmission system has frame loss condition, the method need to be in whole transmitting procedure each linkIncrease corresponding memory space and preserve label, and also need to come according to time of reception at video receiverSequence label, the method needs extra storage and sequence to calculate, more complicated.
Summary of the invention
The object of the embodiment of the present invention is to provide a kind of in frame of video, add label information and detectionThe method and apparatus of frame losing, can save memory space, and simplifies the video of real-time Transmission is lostThe processing procedure that frame detects.
For achieving the above object, the embodiment of the invention discloses a kind of label information that adds in frame of videoMethod, be applied to video sending end, comprise step:
Obtain a yuv video frame to be sent, using this frame of video as current video frame, from currentIn frame of video, extract Y component image;
For the described Y component image extracting from current video frame distributes one for this video of markThe original sequence number of frame, the original sequence number of this original sequence number and previous frame is continuous;
This original sequence number is converted to the binary number with default figure place, by every in this binary numberOne as a character element, generates First ray sign character string;
Described First ray sign character string is embedded into the Y extracting in described current video frame and divides spirogramIn picture, comprising: described Y component image is divided into and the umber of described default figure place similar number,A character element in the corresponding described First ray sign character string of every portion, by every Y component image portionIn the end position of default component of all pixels be revised as the character element corresponding with this part;
The described current video frame that has embedded described First ray sign character string in Y component image is sent outGive video receiver, so that the Y that described video receiver can be from the current frame of video receivingIn component image, extract the second sequence number character string, carry out frame losing detection.
Preferably, described original sequence number is increase progressively continuously frame by frame and recycle with frame number in 0-256Number; The number of described default figure place is 8; Described binary number is 8 bits; Described firstSequence number character string has 8 character elements;
Described described Y component image is divided into and the umber of described default figure place similar number, for:Described Y component image is divided into 8 row; Or described Y component image is divided into 8 row;
Be revised as the described position, end by the default component of all pixels in the every portion of this Y component imageThe character element corresponding with this part, for: institute in the each column or row that described Y component image is dividedThere are the vertical component of pixel or the position, end of horizontal component to be revised as the character unit corresponding with these column or rowElement.
For achieving the above object, the embodiment of the invention also discloses a kind of mark letter that adds in frame of videoThe device of breath, is applied to video sending end, and described device comprises:
Acquisition module, for obtaining a yuv video frame to be sent, using this frame of video as currentFrame of video is extracted Y component image from current video frame;
Distribution module, is used to the described Y component image extracting from current video frame to distribute a useIn the original sequence number of this frame of video of mark, the original sequence number of this original sequence number and previous frame is continuous;
Modular converter, for this original sequence number being converted to the binary number with default figure place, willIn this binary number, each,, as a character element, generates First ray sign character string;
Merge module, carries for described First ray sign character string is embedded into described current video frameIn the Y component image of getting, comprising: described Y component image is divided into identical with described default figure placeThe umber of number, a character element in the corresponding described First ray sign character string of every portion, divides YIn the every portion of spirogram picture, the character corresponding with this part is revised as in the position, end of the default component of all pixelsElement;
Sending module, works as for Y component image having been embedded to the described of described First ray sign character stringFront frame of video sends to video receiver, so that described video receiver can be from current looking of receivingFrequently in the Y component image in frame, extract the second sequence number character string, carry out frame losing detection.
Preferably, described original sequence number is increase progressively continuously frame by frame and recycle with frame number in 0-256Number; The number of described default figure place is 8; Described binary number is 8 bits; DescribedOne sequence number character string has 8 character elements;
Described merge module, is divided into 8 row by described Y component image; Or described Y component image is drawnBe divided into 8 row; In the each column or row that described Y component image is divided, the vertical of all pixels dividesThe character element corresponding with these column or row is revised as in the position, end of amount or horizontal component.
For achieving the above object, the embodiment of the invention discloses a kind of method that detects frame losing, be applied toVideo receiver, comprises step:
While often receiving a yuv video frame, using this frame of video as current video frame; This frame of videoIt is extracted before transmission by video sending end Y component image is by the embodiment of the present invention providedIn frame of video, add the method for label information to embed First ray sign character string;
From described Y component image, extract the second sequence number character string, according to described the second sequence numberCharacter string, obtains the actual sequence number of described Y component image;
According to the actual sequence of the described Y component image extracting from current video frame number and previous frameWhether the actual sequence of the Y component image extracting in frame of video is number continuous, determines described current video frameBefore whether have frame losing.
Preferably, described original sequence number is increase progressively continuously frame by frame and recycle with frame number in 0-256Number; The number of described default figure place is 8; Described binary number is 8 bits; Described firstSequence number character string has 8 character elements;
Video sending end by described Y component image be divided into described default figure place similar number partNumber, for: described Y component image is divided into 8 row; Or described Y component image is divided into 8 row;
Video sending end is by the position, end of the default component of all pixels in the every portion of this Y component imageBe revised as the character element corresponding with this part, for: every row that described Y component image is divided or everyIn row, the position, end of the vertical component of all pixels or horizontal component is revised as corresponding with these column or rowCharacter element.
Preferably, the described second sequence number character string that extracts from described Y component image, comprising:
Obtain in 8 row or 8 row that the Y component image of described current video frame is divided each column or rowThe vertical component of all pixels or the last place value of horizontal component;
Determine the character element that each column or row is corresponding, obtain the second sequence number character string, comprising:
Add up the total sum1 that total sum0 that in each row or each row, last place value is 0 and last place value are 1;
Work as sum0==0, the character element that these column or row are corresponding is 1;
Work as sum1==0, the character element that these column or row are corresponding is 0;
In the time of sum0 > 0 and sum1 > 0, if max (sum0, sum1)/min (sum0, sum1)≤ predetermined threshold value, determines in transmitting procedure and has and encode or decoding error, the element that this row or column is correspondingFor the element corresponding to this row or column of prediction; The element corresponding to this row or column of prediction is to press First rayThe character element corresponding to these column or row of sign character string generating mode prediction;
In the time of sum0 > 0 and sum1 > 0, if max (sum0, sum1)/min (sum0,Sum1) > predetermined threshold value, determines in transmitting procedure without coding or decoding error, if sum0 is >Sum1, element corresponding to this row or column is 0, otherwise element corresponding to this row or column is 1.
Preferably, the element corresponding to this row or column of described prediction, obtains as follows:
If the first frame that described present frame is video image, the forecasting sequence of its Y component image number is establishedBe set to 0; If described present frame is not the first frame of video image, the pre-order-checking of its Y component imageRow number are set to: (actual sequence of the Y component image of previous frame number+1) %256, wherein " % "For complementation symbol;
The forecasting sequence number of the Y component image of this present frame is converted to first according to original sequence numberThe mode of sequence number character string, generation forecast sequence number character string obtains from forecasting sequence sign character stringGet the element of this row or column of prediction.
Preferably, described according to described the second sequence number character string, obtain the Y of described current video frameThe actual sequence number of component image, comprising:
According to the process contrary with generating First ray sign character string, by described the second sequence number characterString is converted to the actual sequence number of the Y component image of described present frame.
Preferably, describedly look according to the actual sequence of the Y component image of current video frame number and previous frameWhether frequently whether the actual sequence of the Y component image of frame is number continuous, have before determining described current video frameFrame losing, comprising: in the time that current video frame is not the first frame of video image, is calculated as follows and losesFrame number:
Frame losing number=(the actual sequence – 1+256 of the Y component image of current video frame) %256The actual sequence number of the frame of video Y component image of – previous frame, wherein " % " is complementation symbol;
If frame losing number is 0, determines without frame losing, otherwise have frame losing.
For achieving the above object, the embodiment of the invention also discloses a kind of device that detects frame losing, applicationIn video receiver, described device comprises:
Receiver module, when often receiving a yuv video frame, using this frame of video as working as forward sightFrequently frame; This frame of video is sent out the end Y component image that it is extracted before transmission by the embodiment of the present inventionThe device that adds label information in frame of video providing has embedded First ray sign character string;
Actual sequence extraction module, for extracting the second sequence number word from described Y component imageSymbol string, according to described the second sequence number character string, obtains the actual sequence number of described Y component image;
Determination module, for according to the actual order of the described Y component image extracting from current video frameIn row number and previous frame frame of video, whether the actual sequence of the Y component image that extracts is number continuous, determines instituteBefore stating current video frame, whether there is frame losing.
Preferably, described original sequence number is increase progressively continuously frame by frame and recycle with frame number in 0-256Number; The number of described default figure place is 8; Described binary number is 8 bits; DescribedOne sequence number character string has 8 character elements;
The described Y component image extracting from current video frame is divided into 8 row or quilt by video sending endBe divided into 8 row;
All in the each column or row that the described Y component image extracting from current video frame is dividedThe position, end of the vertical component of pixel or horizontal component is sent out end and is revised as corresponding with these column or rowCharacter element.
Preferably, described actual sequence extraction module specifically for,
Obtain in 8 row or 8 row that described Y component image is divided all pixels of each column or rowVertical component or the last place value of horizontal component;
Determine the character element that each column or row is corresponding, obtain the second sequence number character string, comprising:
Add up the sum that sum that in each row or each row, last place value is 0 and last place value are 1;
Work as sum0==0, the character element that these column or row are corresponding is 1;
Work as sum1==0, the character element that these column or row are corresponding is 0;
In the time of sum0 > 0 and sum1 > 0, if max (sum0, sum1)/min (sum0, sum1)≤ predetermined threshold value, determines in transmitting procedure and has and encode or decoding error, the element that this row or column is correspondingFor the element corresponding to this row or column of prediction; The element corresponding to this row or column of prediction is to press First rayThe character element corresponding to these column or row of sign character string generating mode prediction;
In the time of sum0 > 0 and sum1 > 0, if max (sum0, sum1)/min (sum0, sum1)> predetermined threshold value, determines nothing coding or decoding error in transmitting procedure, if sum0 > is sum1,Element corresponding to this row or column is 0, otherwise element corresponding to this row or column is 1.
Preferably, described actual sequence extraction module specifically for,
If the first frame that described present frame is video image, the forecasting sequence of its Y component image number is establishedBe set to 0; If described present frame is not the first frame of video image, the pre-order-checking of its Y component imageRow number are set to (actual sequence of the Y component image of previous frame number+1) %256, wherein " % "For complementation symbol;
The forecasting sequence number of the Y component image of this present frame is converted to first according to original sequence numberThe mode of sequence number character string, generation forecast sequence number character string obtains from forecasting sequence sign character stringGet the element of this row or column of prediction.
Preferably, described actual sequence extraction module, according to generate First ray sign character string phaseAnti-process, is converted to described the second sequence number character string the Y component image of described current video frameActual sequence number.
Preferably, described determination module specifically for,
In the time that current video frame is not the first frame of video image, be calculated as follows frame losing number:
Frame losing number=(the actual sequence – 1+256 of the Y component image of current video frame) %256The actual sequence number of the Y component image of – previous frame, wherein " % " is complementation symbol;
If frame losing number is 0, determines without frame losing, otherwise have frame losing.
As seen from the above technical solutions, the embodiment of the present invention provides one to add in frame of videoThe method and apparatus of label information and detection frame losing. In frame of video, add a method for label information,Obtain a yuv video frame to be sent, using this frame of video as current video frame, from current videoIn frame, extract Y component image; For the described Y component image extracting from current video frame distributes oneFor the original sequence number of this frame of video of mark, the original sequence number of this original sequence number and previous frame connectsContinuous; This original sequence number is converted to the binary number with default figure place, by every in this binary numberOne as a character element, generates First ray sign character string; By described First ray sign characterString is embedded in the Y component image extracting in described current video frame, comprising: divide spirogram by described YPicture is divided into the umber with described default figure place similar number, the corresponding described First ray word of every portionA character element in symbol string, by the end of the default component of all pixels in every Y component image portionThe character element corresponding with this part is revised as in position; Described First ray number will have been embedded in Y component imageThe described current video frame of character string sends to video receiver, so that described video receiver can be fromIn Y component image in the current frame of video receiving, extract the second sequence number character string, loseFrame detects. Detect a method for frame losing, while often receiving a yuv video frame, by this frame of videoAs current video frame; This frame of video Y component image that it is extracted before transmission by video sending endEmbed First ray sign character string by the method that adds label information in frame of video; Divide from described YIn spirogram picture, extract the second sequence number character string, according to described the second sequence number character string, obtain instituteState the actual sequence number of Y component image; According to the described Y component image extracting from current video frameActual sequence number and previous frame frame of video in the actual sequence number of the Y component image that extracts whether connectContinuous, determine before described current video frame whether have frame losing. Visible, the application embodiment of the present invention, by orderRow number are embedded in the default component of frame of video, do not need to increase more storage as prior artLabel is preserved in space, has therefore saved memory space and computing time, and simplifies real-time TransmissionVideo carries out the processing procedure of frame losing detection. Certainly, implementing arbitrary product of the present invention or method must be notNecessarily need to reach above-described all advantages simultaneously.
Brief description of the drawings
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, below by rightIn embodiment or description of the Prior Art, the accompanying drawing of required use is briefly described, apparently,Accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, do not paying under the prerequisite of creative work, can also obtain the attached of other according to these accompanying drawingsFigure.
The stream of a kind of method that adds label information in frame of video that Fig. 1 provides for the embodiment of the present inventionJourney schematic diagram;
The knot of a kind of device that adds label information in frame of video that Fig. 2 provides for the embodiment of the present inventionStructure schematic diagram;
The schematic flow sheet of a kind of method that detects frame losing that Fig. 3 provides for the embodiment of the present invention;
The structural representation of a kind of device that detects frame losing that Fig. 4 provides for the embodiment of the present invention;
Fig. 5 is the principle schematic that the embodiment of the present invention detects the method for frame losing.
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is enteredRow is described clearly and completely, and obviously, described embodiment is only the present invention's part embodiment,Instead of whole embodiment. Based on the embodiment in the present invention, those of ordinary skill in the art are not havingHave and make the every other embodiment obtaining under creative work prerequisite, all belong to the present invention protectionScope.
The embodiment of the present invention provides a kind of side that adds label information and detect frame losing in frame of videoMethod and device, in this scheme, obtain a yuv video frame to be sent, using this frame of video as working asFront frame of video is extracted Y component image from current video frame; Carry from current video frame for describedThe Y component image of getting distributes an original sequence number for this frame of video of mark, this original seriesNumber continuous with the original sequence number of previous frame; This original sequence number is converted to and has two of default figure placeSystem number, using in this binary number, each,, as a character element, generates First ray sign characterString; Described First ray sign character string is embedded into the Y extracting in described current video frame and divides spirogramIn picture, comprising: described Y component image is divided into and the umber of described default figure place similar number,A character element in the corresponding described First ray sign character string of every portion, by Y component image eachIn part, the character element corresponding with this part is revised as in the position, end of the default component of all pixels; By YThe described current video frame that has embedded described First ray sign character string in component image sends to videoReceiving terminal, so that described video receiver can divide spirogram by the Y from the current frame of video receivingIn picture, extract the second sequence number character string, carry out frame losing detection. Detect a method for frame losing, everyWhile receiving a yuv video frame, using this frame of video as current video frame; This frame of video is sent outThe end Y component image that it is extracted before transmission is by the method embedding that adds label information in frame of videoEnter First ray sign character string; From described Y component image, extract the second sequence number character string,According to described the second sequence number character string, obtain the actual sequence number of described Y component image; According toIn the actual sequence of the described Y component image extracting from current video frame number and previous frame frame of videoWhether whether the actual sequence of the Y component image extracting is number continuous, determine before described current video frameThere is frame losing.
Below by specific embodiment, the present invention is described in detail.
A kind of method that adds label information in frame of video that Fig. 1 provides for the embodiment of the present inventionSchematic flow sheet, is applied to video sending end, can comprise the steps:
S101: obtain a yuv video frame to be sent, using this frame of video as current video frame,From current video frame, extract Y component image.
Described YUV is a kind of color-coded method, is mainly used in optimizing the biography of colour-video signalDefeated, wherein " Y " represents lightness, namely gray value, and " U " and " V " expression isColourity, effect is to describe colors of image and saturation degree, is used to specify the color of pixel. The present embodiment shouldFor the Y component image of frame of video. The Y component image that extracts frame of video is prior art, thisPlace no longer repeats.
For example: according to prior art, get the current yuv video to be sent that has, extracting shouldThe Y component image of current video frame, each frame frame of video namely frame number that all bears serial numbers, described inNumbering, since 0, increases progressively successively. Obtain a yuv video frame to be sent, establish it and be numbered 1,This is numbered to 1 frame of video as the current video frame obtaining, extracts the Y of this current video frameComponent image.
S102: for the described Y component image extracting from current video frame distributes one for markThe original sequence number of this frame of video, the original sequence number of this original sequence number and previous frame is continuous.
For example: having obtained the current video frame that is numbered 1 according to step S101, is this current videoThe Y component image that frame extracts distributes an original sequence number for this frame of video of mark, described formerBeginning sequence number is corresponding with the numbering of this frame of video, the described current video frame that is numbered 1 that obtained,The original sequence number of the Y component image that this frame of video of mark is extracted is 1, and with previous frame frame of videoThe original sequence number of Y component image continuous, the original order of the Y component image of previous frame frame of videoRow number are 0.
S103: this original sequence number is converted to the binary number with default figure place, this two is enteredIn number processed, each,, as a character element, generates First ray sign character string.
Concrete, described original sequence number is increase progressively continuously frame by frame and recycle with frame number in 0-256Number; The number of described default figure place is 8; Described binary number is 8 bits; DescribedOne sequence number character string has 8 character elements.
For example: the original sequence number of the Y component image of mark current video frame is 1, by this original orderRow number 1 are converted to that to have default figure place be 8 binary number, are converted to 8 by this original sequence numberPosition number of bits 00000001, using each in this binary number as a character element,Generating First ray sign character string is [00000001].
S104: described First ray sign character string is embedded into the Y extracting in described current video frameIn component image, comprising: described Y component image is divided into and described default figure place similar numberUmber, a character element in the corresponding described First ray sign character string of every portion, by Y componentIn the every portion of image, the character unit corresponding with this part is revised as in the position, end of the default component of all pixelsElement.
Concrete, described described Y component image is divided into and part of described default figure place similar numberNumber, for: described Y component image is divided into 8 row; Or described Y component image is divided into 8 row;
Be revised as the described position, end by the default component of all pixels in the every portion of this Y component imageThe character element corresponding with this part, for: institute in the each column or row that described Y component image is dividedThere are the vertical component of pixel or the position, end of horizontal component to be revised as the character unit corresponding with these column or rowElement.
For example: described Y component image is divided into and the umber of described default figure place similar number,Suppose described Y component image to be on average divided into 8 row, by all in the every portion of this Y component imageThe character element corresponding with this part is revised as in the position, end of the default component of pixel, by owning of every rowThe character element corresponding with these row is revised as in the end position of the vertical component of pixel, be respectively 0,0,0,0、0、0、0、1。
In practical application, can divide as required the Y component image of frame of video, for example: canSo that the Y component image of frame of video is equally assigned into 8 row or 8 row, also can unequally distribute,As long as video sending end and video receiver are all divided frame of video by identical mode.
S105: will embed the described forward sight of working as of described First ray sign character string in Y component imageFrequently frame sends to video receiver, so that described video receiver can be from the current frame of video receivingIn Y component image in extract the second sequence number character string, carry out frame losing detection.
Concrete example as: will be numbered 1, and embed First ray sign character string in its Y component image[00000001] described current video frame sends to video receiver, so that described video receiver energyIn enough Y component images from the current frame of video receiving, extract the second sequence number character string,Carry out frame losing detection.
The present invention is embodiment illustrated in fig. 1 in application, sequence number can be embedded into the default component of frame of videoIn, do not need to increase more memory space and preserve label as prior art, therefore can saveEconomize the space of frame of video storage, and the sequence number of embedding is what increase progressively, therefore receiving terminal receiver, video frameAnd while detecting frame losing, can save computing time.
A kind of device that adds label information in frame of video that Fig. 2 provides for the embodiment of the present inventionStructural representation, corresponding with the flow process shown in Fig. 1, be applied to video sending end, can comprise and obtainingDelivery piece 201, distribution module 202, modular converter 203, merge module 204 and sending module 205.
Acquisition module 201, for obtaining a yuv video frame to be sent, using this frame of video asCurrent video frame extracts Y component image from current video frame.
Distribution module 202, is used to the described Y component image extracting from current video frame to distribute oneThe individual original sequence number for this frame of video of mark, the original sequence number of this original sequence number and previous frameContinuously.
Modular converter 203, for this original sequence number being converted to the binary number with default figure place,Using in this binary number, each,, as a character element, generates First ray sign character string.
Merge module 204, for being embedded into described current video frame by described First ray sign character stringIn the Y component image of middle extraction, comprising: described Y component image is divided into and described default positionThe umber of number similar number, a character element in the corresponding described First ray sign character string of every portion,The position, end of the default component of all pixels in every Y component image portion is revised as corresponding with this partCharacter element.
Concrete, described original sequence number is increase progressively continuously frame by frame and recycle with frame number in 0-256Number; The number of described default figure place is 8; Described binary number is 8 bits; DescribedOne sequence number character string has 8 character elements;
Described merge module, is divided into 8 row by described Y component image; Or described Y component image is drawnBe divided into 8 row; In the each column or row that described Y component image is divided, the vertical of all pixels dividesThe character element corresponding with these column or row is revised as in the position, end of amount or horizontal component.
Sending module 205, for having embedded Y component image the institute of described First ray sign character stringState current video frame and send to video receiver, so that described video receiver can receive from currentFrame of video in Y component image in extract the second sequence number character string, carry out frame losing detection.
The present invention is embodiment illustrated in fig. 2 in application, sequence number can be embedded into the default component of frame of videoIn, do not need to increase more memory space and preserve label as prior art, therefore can saveEconomize the space of frame of video storage, and the sequence number of embedding is what increase progressively, for receiving terminal receiver, video frame alsoWhile detecting frame losing, can save computing time.
For device embodiment, because it is substantially similar in appearance to embodiment of the method, so the ratio of describingSimpler, relevant part is referring to the part explanation of embodiment of the method.
The schematic flow sheet of a kind of method that detects frame losing that Fig. 3 provides for the embodiment of the present invention, applicationIn video receiver, can comprise the steps:
S301: while often receiving a yuv video frame, using this frame of video as current video frame; ShouldFrame of video is sent out the end Y component image that it is extracted before transmission and provides by the embodiment of the present inventionThe method that adds label information in frame of video embedded First ray sign character string.
For example: when the every reception one yuv video frame of receiving terminal, using this frame of video as current video frame,Suppose to receive and be numbered 1 frame of video as current video frame, the Y component in this current video frameIn image, be embedded into First ray sign character string [00000001].
Concrete, described original sequence number is increase progressively continuously frame by frame and recycle with frame number in 0-256Number; The number of described default figure place is 8; Described binary number is 8 bits; Described firstSequence number character string has 8 character elements;
Video sending end by described Y component image be divided into described default figure place similar number partNumber, for: described Y component image is divided into 8 row; Or described Y component image is divided into 8 row;
Video sending end is by the position, end of the default component of all pixels in the every portion of this Y component imageBe revised as the character element corresponding with this part, for: every row that described Y component image is divided or everyIn row, the position, end of the vertical component of all pixels or horizontal component is revised as corresponding with these column or rowCharacter element.
S302: extract the second sequence number character string from described Y component image, according to describedTwo sequence number character strings, obtain the actual sequence number of described Y component image.
Concrete, the described second sequence number character string that extracts from described Y component image, comprising:
Obtain in 8 row or 8 row that the Y component image of described current video frame is divided each column or rowThe vertical component of all pixels or the last place value of horizontal component;
Determine the character element that each column or row is corresponding, obtain the second sequence number character string, comprising:
Add up the total sum1 that total sum0 that in each row or each row, last place value is 0 and last place value are 1;
Work as sum0==0, the character element that these column or row are corresponding is 1;
Work as sum1==0, the character element that these column or row are corresponding is 0;
In the time of sum0 > 0 and sum1 > 0, if max (sum0, sum1)/min (sum0, sum1)≤ predetermined threshold value, determines in transmitting procedure and has and encode or decoding error, the element that this row or column is correspondingFor the element corresponding to this row or column of prediction; The element corresponding to this row or column of prediction is to press First rayThe character element corresponding to these column or row of sign character string generating mode prediction;
In the time of sum0 > 0 and sum1 > 0, if max (sum0, sum1)/min (sum0,Sum1) > predetermined threshold value, determines in transmitting procedure without coding or decoding error, if sum0 is >Sum1, element corresponding to this row or column is 0, otherwise element corresponding to this row or column is 1.
In the present embodiment, can receive after current video frame that just the Y to current video frame divides spirogramThe sequence number of picture is predicted, obtains forecasting sequence number, obtains forecasting sequence by forecasting sequence number conversionSign character string.
Concrete, the element corresponding to this row or column of described prediction, obtains as follows:
If the first frame that described present frame is video image, the forecasting sequence of its Y component image number is establishedBe set to 0; If described present frame is not the first frame of video image, the pre-order-checking of its Y component imageRow number are set to: (actual sequence of the Y component image of previous frame number+1) %256, wherein " % "For complementation symbol;
The forecasting sequence number of the Y component image of this present frame is converted to first according to original sequence numberThe mode of sequence number character string, generation forecast sequence number character string obtains from forecasting sequence sign character stringGet the element of this row or column of prediction.
For example: when the described current video frame obtaining be video image the first frame, i.e. current video frameBe numbered 0, the original sequence number of its Y component image is 0, the pre-order-checking of its Y component imageRow seqNum_predict is set to 0; When present frame is not the first frame of video image, suppose to obtainThe actual sequence of the Y component image of the previous frame of the current video frame of getting number is 19, current video frameThe forecasting sequence seqNum_predict of Y component image be set to that (Y of previous frame divides spirogramThe actual sequence of picture number+1) %256, wherein " % " is complementation symbol, i.e. (19+1) %256=20;The actual sequence number of supposing the Y component image of the previous frame of the current video frame obtaining is 255, works asThe forecasting sequence seqNum_predict of the Y component image of front frame of video is set to (previous frameThe actual sequence of Y component image number+1) %256, i.e. (255+1) %256=0.
Suppose in this step, current video frame is the second frame, and its Y component image is sent out holds level with both hands allBe divided into 8 row, and embed First ray character string be [00000001], all pixels of every rowThe last place value prediction character element binary_predict[i of the vertical component of point] be respectively 0,0,0,0,0,0,0,1, forecasting sequence sign character string binary[8] be [00000001].
In this step, first obtain in 8 row that the Y component image of described current video frame is divided,The last place value of the vertical component of all pixels of every row.
Add up again the total sum1 that total sum0 that in each row, last place value is 0 and last place value are 1.Suppose 10 of the last place values of the vertical component that has pixel of each row,
The total sum0=10 that in first row, last place value is 0, the total sum1=0 that last place value is 1,Obtain sum1==0, the element binary[0 of this row correspondence]=0;
The total sum0=10 that in secondary series, last place value is 0, the total sum1=0 that last place value is 1,Obtain sum1==0, the element binary[1 of this row correspondence]=0;
The total sum0=10 that in the 3rd row, last place value is 0, the total sum1=0 that last place value is 1,Obtain sum1==0, the element binary[2 of this row correspondence]=0;
The total sum0=6 that in the 4th row, last place value is 0, the total sum1=4 that last place value is 1,Now sum0 > 0 and sum1 > 0, utilize formula " max (sum0, sum1)/min (sum0,Sum1)≤predetermined threshold value " calculate, suppose that predetermined threshold value is 4, max (sum0, sum1)/min(sum0, sum1)=6/4=1.5≤4, determine in transmitting procedure and have coding or decoding error,Element corresponding to this row or column is that the element corresponding to this row or column of prediction is binary[3]=Binary_predict[3]=0, i.e. the element binary[3 of this row correspondence]=0;
The total sum0=4 that in the 5th row, last place value is 0, the total sum1=6 that last place value is 1,Now sum0 > 0 and sum1 > 0, utilize formula " max (sum0, sum1)/min (sum0,Sum1)≤predetermined threshold value " calculate, suppose that predetermined threshold value is 4, max (sum0, sum1)/min(sum0, sum1)=4/6≤4, determines in transmitting procedure and has and encode or decoding error, this rowOr be listed as corresponding element be prediction element corresponding to this row or column be binary[4]=Binary_predict[4]=0, i.e. the element binary[4 of this row correspondence]=0;
The total sum0=10 that in the 6th row, last place value is 0, the total sum1=0 that last place value is 1,Obtain sum1==0, the element binary[5 of this row correspondence]=0;
The total sum0=9 that in the 7th row, last place value is 0, the total sum1=1 that last place value is 1,Now sum0 > 0 and sum1 > 0, utilize formula " max (sum0, sum1)/min (sum0,Sum1) > predetermined threshold value " calculate, suppose that predetermined threshold value is 4, max (sum0, sum1)/min(sum0, sum1)=9/1 > 4, determine nothing coding or decoding error in transmitting procedure, and sum0 >Sum1, the element binary[6 of this row correspondence]=0;
The total sum0=0 that in the 8th row, last place value is 0, the total sum1=10 that last place value is 1,Obtain sum0==0, the element binary[7 of this row correspondence]=1.
Like this, the second sequence of characters string binary[8 of acquisition] be [00000001].
Then, according to the process contrary with generating First ray sign character string, by described the second sequenceSign character string is converted to the actual sequence number of the Y component image of described present frame.
For example: obtain described the second sequence number character string through above stepBinary[8]=[00000001], it is turned according to the process contrary with generating First ray sign character stringThe actual sequence number being changed in the Y component image of described current video frame is 1.
S303: according to the actual sequence of the described Y component image extracting from current video frame number andWhether the actual sequence of the Y component image extracting in previous frame frame of video is number continuous, determines described working asBefore front frame of video, whether there is frame losing.
Concrete, describedly look according to the actual sequence of the Y component image of current video frame number and previous frameWhether frequently whether the actual sequence of the Y component image of frame is number continuous, have before determining described current video frameFrame losing, comprising: in the time that current video frame is not the first frame of video image, is calculated as follows and losesFrame number:
Frame losing number=(the actual sequence – 1+256 of the Y component image of current video frame) %256The actual sequence number of the frame of video Y component image of – previous frame, wherein " % " is complementation symbol;
If frame losing number is 0, determines without frame losing, otherwise have frame losing.
For example: the actual sequence number of supposing the Y component image of current video frame is 230, previous frameThe actual sequence number of frame of video Y component image be 229, according to formula frame losing number=(work as forward sightFrequently the actual sequence – 1+256 of the Y component image of frame) the frame of video Y of %256 – previous frame dividesThe actual sequence number of spirogram picture, calculates frame losing number=(230 – 1+256) %256 – 229=0, determinesWithout frame losing.
The actual sequence number of supposing the Y component image of current video frame is 230, the video of previous frameThe actual sequence of frame Y component image number is 227, according to formula frame losing number=(current video frameThe actual sequence – 1+256 of Y component image) the frame of video Y component image of %256 – previous frameActual sequence number, calculate frame losing number=(230 – 1+256) %256 – 227=2 unequal to 0, determineThere is frame losing.
It should be noted that, in the application not to detecting the specific implementation of described calculating frame losingLimit, any possible implementation can be applied in the application.
The present invention is embodiment illustrated in fig. 3 in application, can simplify the video of real-time Transmission is carried out to frame losing inspectionThe processing procedure of surveying, saves time, and introduces forecasting sequence number, can reduce because of Code And Decode processMiddlely occur wrong and cause detecting the wrong situation of result of frame losing.
The structural representation of a kind of device that detects frame losing that Fig. 4 provides for the embodiment of the present invention, with figureFlow process shown in 3 is corresponding, is applied to video receiver, can comprise receiver module 401, realitySequence number extraction module 402 and determination module 403.
Receiver module 401, when often receiving a yuv video frame, using this frame of video as working asFront frame of video; This frame of video Y component image that it is extracted before transmission by video sending end is by thisThe device that adds label information in frame of video that inventive embodiments provides has embedded First ray numberCharacter string.
Concrete, described original sequence number is increase progressively continuously frame by frame and recycle with frame number in 0-256Number; The number of described default figure place is 8; Described binary number is 8 bits; DescribedOne sequence number character string has 8 character elements;
The described Y component image extracting from current video frame is divided into 8 row or quilt by video sending endBe divided into 8 row;
All in the each column or row that the described Y component image extracting from current video frame is dividedThe position, end of the vertical component of pixel or horizontal component is sent out end and is revised as corresponding with these column or rowCharacter element.
Actual sequence extraction module 402, for extracting the second sequence from described Y component imageSign character string, according to described the second sequence number character string, obtains the actual order of described Y component imageRow number.
Concrete, described actual sequence extraction module specifically for,
Obtain in 8 row or 8 row that described Y component image is divided all pixels of each column or rowVertical component or the last place value of horizontal component;
Determine the character element that each column or row is corresponding, obtain the second sequence number character string, comprising:
Add up the sum that sum that in each row or each row, last place value is 0 and last place value are 1;
Work as sum0==0, the character element that these column or row are corresponding is 1;
Work as sum1==0, the character element that these column or row are corresponding is 0;
In the time of sum0 > 0 and sum1 > 0, if max (sum0, sum1)/min (sum0, sum1)≤ predetermined threshold value, determines in transmitting procedure and has and encode or decoding error, the element that this row or column is correspondingFor the element corresponding to this row or column of prediction; The element corresponding to this row or column of prediction is to press First rayThe character element corresponding to these column or row of sign character string generating mode prediction;
In the time of sum0 > 0 and sum1 > 0, if max (sum0, sum1)/min (sum0,Sum1) > predetermined threshold value, determines in transmitting procedure without coding or decoding error, if sum0 is >Sum1, element corresponding to this row or column is 0, otherwise element corresponding to this row or column is 1.
Concrete, described actual sequence extraction module specifically for,
If the first frame that described present frame is video image, the forecasting sequence of its Y component image number is establishedBe set to 0; If described present frame is not the first frame of video image, the pre-order-checking of its Y component imageRow number are set to (actual sequence of the Y component image of previous frame number+1) %256, wherein " % "For complementation symbol;
The forecasting sequence number of the Y component image of this present frame is converted to first according to original sequence numberThe mode of sequence number character string, generation forecast sequence number character string obtains from forecasting sequence sign character stringGet the element of this row or column of prediction.
Concrete, described actual sequence extraction module, according to generate First ray sign character string phaseAnti-process, the Y that described the second sequence number character string is converted to described current video frame divides spirogramThe actual sequence number of picture.
Determination module 403, for according to the reality of the described Y component image extracting from current video frameWhether the actual sequence of the Y component image extracting in border sequence number and previous frame frame of video is number continuous,Determine before described current video frame and whether have frame losing.
Concrete, described determination module specifically for,
In the time that current video frame is not the first frame of video image, be calculated as follows frame losing number:
Frame losing number=(the actual sequence – 1+256 of the Y component image of current video frame) %256The actual sequence number of the Y component image of – previous frame, wherein " % " is complementation symbol;
If frame losing number is 0, determines without frame losing, otherwise have frame losing.
The present invention is embodiment illustrated in fig. 4 in application, can simplify the video of real-time Transmission is carried out to frame losing inspectionThe processing procedure of surveying, saves time, and introduces forecasting sequence number, can reduce because of Code And Decode processMiddlely occur wrong and cause detecting the wrong situation of result of frame losing.
For device embodiment, because it is substantially similar in appearance to embodiment of the method, so the ratio of describingSimpler, relevant part is referring to the part explanation of embodiment of the method.
It should be noted that, it is any that the embodiment of the present invention is applicable to video calling, live video relay etc.Adopt YUV mode to carry out the situation of realtime video transmission. For example: the present invention is applied to video callingIn, as shown in Figure 5, at transmitting terminal: camera obtains yuv video frame and sends to sequence number to embedDevice, sequence number embedded device is the device that adds label information in frame of video described in above-described embodiment,In each frame yuv video frame, embed after the sequence number increasing progressively continuously, send to encoder, by compilingAfter code device coding, then generate RTP file by packing device packing, send to receiving terminal via network.At receiving terminal: receive RTP file, via group bag device group bag, decoder decoding generates yuv videoFrame, be the device of the detection frame losing described in above-described embodiment via sequence number extractor, extracts to embedSequence number, detects after frame losing, then sends to video display apparatus, displaying video.
It should be noted that, in this article, the relational terms such as the first and second grades is only usedAn entity or operation are separated with another entity or operating space, and not necessarily requirement orImply the relation or the order that between these entities or operation, there are any this reality. And, term" comprise ", " comprising " or its any other variant be intended to contain comprising of nonexcludability, thereby makeThe process, method, article or the equipment that comprise a series of key elements not only comprise those key elements, but alsoComprise other key elements of clearly not listing, or be also included as this process, method, article orThe key element that person's equipment is intrinsic. In the situation that there is no more restrictions, by statement " comprising ... "The key element limiting, and be also not precluded within process, method, article or the equipment that comprises described key elementThere is other identical element.
Each embodiment in this description all adopts relevant mode to describe, phase between each embodimentLike homophase, part stresses referring to, each embodiment mutually and other embodimentDifference.
One of ordinary skill in the art will appreciate that realize said method be whole in embodiment orPart steps is can carry out the hardware that instruction is relevant by program to complete. Described program can be storedIn computer read/write memory medium, the alleged storage medium obtaining here, as: ROM/RAM,Magnetic disc, CD etc.
The foregoing is only preferred embodiment of the present invention, be not intended to limit protection of the present inventionScope. All any amendments of doing within the spirit and principles in the present invention, be equal to replacement, improvement etc.,All be included in protection scope of the present invention.

Claims (16)

1. a method that adds label information in frame of video, is characterized in that, is applied to videoTransmitting terminal, comprises step:
Obtain a yuv video frame to be sent, using this frame of video as current video frame, from currentIn frame of video, extract Y component image;
For the described Y component image extracting from current video frame distributes one for this video of markThe original sequence number of frame, the original sequence number of this original sequence number and previous frame is continuous;
This original sequence number is converted to the binary number with default figure place, by every in this binary numberOne as a character element, generates First ray sign character string;
Described First ray sign character string is embedded into the Y extracting in described current video frame and divides spirogramIn picture, comprising: described Y component image is divided into and the umber of described default figure place similar number,A character element in the corresponding described First ray sign character string of every portion, by every Y component image portionIn the end position of default component of all pixels be revised as the character element corresponding with this part;
The described current video frame that has embedded described First ray sign character string in Y component image is sent outGive video receiver, so that the Y that described video receiver can be from the current frame of video receivingIn component image, extract the second sequence number character string, carry out frame losing detection.
2. method according to claim 1, is characterized in that: described original sequence number is 0-256In the number that increases progressively continuously and recycle frame by frame with frame number; The number of described default figure place is 8; DescribedBinary number is 8 bits; Described First ray sign character string has 8 character elements;
Described described Y component image is divided into and the umber of described default figure place similar number, for:Described Y component image is divided into 8 row; Or described Y component image is divided into 8 row;
Be revised as the described position, end by the default component of all pixels in the every portion of this Y component imageThe character element corresponding with this part, for: institute in the each column or row that described Y component image is dividedThere are the vertical component of pixel or the position, end of horizontal component to be revised as the character unit corresponding with these column or rowElement.
3. a method that detects frame losing, is characterized in that, is applied to video receiver, comprises stepRapid:
While often receiving a yuv video frame, using this frame of video as current video frame; This frame of videoThe Y component image that it is extracted before transmission by video sending end is by method embedding claimed in claim 1Enter First ray sign character string;
From described Y component image, extract the second sequence number character string, according to described the second sequence numberCharacter string, obtains the actual sequence number of described Y component image;
According to the actual sequence of the described Y component image extracting from current video frame number and previous frameWhether the actual sequence of the Y component image extracting in frame of video is number continuous, determines described current video frameBefore whether have frame losing.
4. method according to claim 3, is characterized in that, described original sequence number is 0-256In the number that increases progressively continuously and recycle frame by frame with frame number; The number of described default figure place is 8; DescribedBinary number is 8 bits; Described First ray sign character string has 8 character elements;
Video sending end by described Y component image be divided into described default figure place similar number partNumber, for: described Y component image is divided into 8 row; Or described Y component image is divided into 8 row;
Video sending end is by the position, end of the default component of all pixels in the every portion of this Y component imageBe revised as the character element corresponding with this part, for: every row that described Y component image is divided or everyIn row, the position, end of the vertical component of all pixels or horizontal component is revised as corresponding with these column or rowCharacter element.
5. method according to claim 3, is characterized in that, described from described Y component imageIn extract the second sequence number character string, comprising:
Obtain in 8 row or 8 row that the Y component image of described current video frame is divided each column or rowThe vertical component of all pixels or the last place value of horizontal component;
Determine the character element that each column or row is corresponding, obtain the second sequence number character string, comprising:
Add up the total sum1 that total sum0 that in each row or each row, last place value is 0 and last place value are 1;
Work as sum0==0, the character element that these column or row are corresponding is 1;
Work as sum1==0, the character element that these column or row are corresponding is 0;
In the time of sum0 > 0 and sum1 > 0, if max (sum0, sum1)/min (sum0, sum1)≤ predetermined threshold value, determines in transmitting procedure and has and encode or decoding error, the element that this row or column is correspondingFor the element corresponding to this row or column of prediction; The element corresponding to this row or column of prediction is to press First rayThe character element corresponding to these column or row of sign character string generating mode prediction;
In the time of sum0 > 0 and sum1 > 0, if max (sum0, sum1)/min (sum0,Sum1) > predetermined threshold value, determines in transmitting procedure without coding or decoding error, if sum0 is >Sum1, element corresponding to this row or column is 0, otherwise element corresponding to this row or column is 1.
6. method according to claim 5, is characterized in that: this row of described prediction orBe listed as corresponding element, obtain as follows:
If the first frame that described present frame is video image, the forecasting sequence of its Y component image number is establishedBe set to 0; If described present frame is not the first frame of video image, the pre-order-checking of its Y component imageRow number are set to: (actual sequence of the Y component image of previous frame number+1) %256, wherein " % "For complementation symbol;
The forecasting sequence number of the Y component image of this present frame is converted to first according to original sequence numberThe mode of sequence number character string, generation forecast sequence number character string obtains from forecasting sequence sign character stringGet the element of this row or column of prediction.
7. method according to claim 5, is characterized in that, described according to described the second orderRow sign character string, obtains the actual sequence number of the Y component image of described current video frame, comprising:
According to the process contrary with generating First ray sign character string, by described the second sequence number characterString is converted to the actual sequence number of the Y component image of described present frame.
8. according to the method described in claim 4-7 any one, it is characterized in that, described according to currentThe actual order of the Y component image of the actual sequence of the Y component image of frame of video number and previous frame frame of videoWhether row are number continuous, determine before described current video frame whether have frame losing, comprising: at current video frameWhile being not the first frame of video image, be calculated as follows frame losing number:
Frame losing number=(the actual sequence – 1+256 of the Y component image of current video frame) %256The actual sequence number of the frame of video Y component image of – previous frame, wherein " % " is complementation symbol;
If frame losing number is 0, determines without frame losing, otherwise have frame losing.
9. a device that adds label information in frame of video, is characterized in that, is applied to videoTransmitting terminal, described device comprises:
Acquisition module, for obtaining a yuv video frame to be sent, using this frame of video as currentFrame of video is extracted Y component image from current video frame;
Distribution module, is used to the described Y component image extracting from current video frame to distribute a useIn the original sequence number of this frame of video of mark, the original sequence number of this original sequence number and previous frame is continuous;
Modular converter, for this original sequence number being converted to the binary number with default figure place, willIn this binary number, each,, as a character element, generates First ray sign character string;
Merge module, carries for described First ray sign character string is embedded into described current video frameIn the Y component image of getting, comprising: described Y component image is divided into identical with described default figure placeThe umber of number, a character element in the corresponding described First ray sign character string of every portion, divides YIn the every portion of spirogram picture, the character corresponding with this part is revised as in the position, end of the default component of all pixelsElement;
Sending module, works as for Y component image having been embedded to the described of described First ray sign character stringFront frame of video sends to video receiver, so that described video receiver can be from current looking of receivingFrequently in the Y component image in frame, extract the second sequence number character string, carry out frame losing detection.
10. device according to claim 9, is characterized in that, described original sequence number is 0-256In the number that increases progressively continuously and recycle frame by frame with frame number; The number of described default figure place is 8; DescribedBinary number be 8 bits; Described First ray sign character string has 8 character elements;
Described merge module, is divided into 8 row by described Y component image; Or described Y component image is drawnBe divided into 8 row; In the each column or row that described Y component image is divided, the vertical of all pixels dividesThe character element corresponding with these column or row is revised as in the position, end of amount or horizontal component.
11. 1 kinds are detected the device of frame losing, it is characterized in that, are applied to video receiver, described dressPut and comprise:
Receiver module, when often receiving a yuv video frame, using this frame of video as working as forward sightFrequently frame; This frame of video Y component image that it is extracted before transmission by video sending end is by claimDevice described in 10 has embedded First ray sign character string;
Actual sequence extraction module, for extracting the second sequence number word from described Y component imageSymbol string, according to described the second sequence number character string, obtains the actual sequence number of described Y component image;
Determination module, for according to the actual order of the described Y component image extracting from current video frameIn row number and previous frame frame of video, whether the actual sequence of the Y component image that extracts is number continuous, determines instituteBefore stating current video frame, whether there is frame losing.
12. devices according to claim 11, is characterized in that, described original sequence number isThe number that increases progressively continuously and recycle frame by frame with frame number in 0-256; The number of described default figure place is 8;Described binary number is 8 bits; Described First ray sign character string has 8 character elements;
The described Y component image extracting from current video frame is divided into 8 row or quilt by video sending endBe divided into 8 row;
All in the each column or row that the described Y component image extracting from current video frame is dividedThe position, end of the vertical component of pixel or horizontal component is revised as and these column or row pair by video sending endThe character element of answering.
13. devices according to claim 11, is characterized in that, described actual sequence number extractsModule specifically for,
Obtain in 8 row or 8 row that described Y component image is divided all pixels of each column or rowVertical component or the last place value of horizontal component;
Determine the character element that each column or row is corresponding, obtain the second sequence number character string, comprising:
Add up the sum that sum that in each row or each row, last place value is 0 and last place value are 1;
Work as sum0==0, the character element that these column or row are corresponding is 1;
Work as sum1==0, the character element that these column or row are corresponding is 0;
In the time of sum0 > 0 and sum1 > 0, if max (sum0, sum1)/min (sum0, sum1)≤ predetermined threshold value, determines in transmitting procedure and has and encode or decoding error, the element that this row or column is correspondingFor the element corresponding to this row or column of prediction; The element corresponding to this row or column of prediction is to press First rayThe character element corresponding to these column or row of sign character string generating mode prediction;
In the time of sum0 > 0 and sum1 > 0, if max (sum0, sum1)/min (sum0, sum1)> predetermined threshold value, determines nothing coding or decoding error in transmitting procedure, if sum0 > is sum1,Element corresponding to this row or column is 0, otherwise element corresponding to this row or column is 1.
14. devices according to claim 13, is characterized in that, described actual sequence number extractsModule specifically for,
If the first frame that described present frame is video image, the forecasting sequence of its Y component image number is establishedBe set to 0; If described present frame is not the first frame of video image, the pre-order-checking of its Y component imageRow number are set to (actual sequence of the Y component image of previous frame number+1) %256, wherein " % "For complementation symbol;
The forecasting sequence number of the Y component image of this present frame is converted to first according to original sequence numberThe mode of sequence number character string, generation forecast sequence number character string obtains from forecasting sequence sign character stringGet the element of this row or column of prediction.
15. devices according to claim 13, is characterized in that, described actual sequence number extractsModule, according to the process contrary with generating First ray sign character string, by described the second sequence number characterString is converted to the actual sequence number of the Y component image of described current video frame.
16. according to the device described in claim 12-15 any one, it is characterized in that, described definiteModule specifically for,
In the time that current video frame is not the first frame of video image, be calculated as follows frame losing number:
Frame losing number=(the actual sequence – 1+256 of the Y component image of current video frame) %256The actual sequence number of the Y component image of – previous frame, wherein " % " is complementation symbol;
If frame losing number is 0, determines without frame losing, otherwise have frame losing.
CN201511026855.2A 2015-12-31 2015-12-31 The method and apparatus that mark information is added in the video frame and detects frame losing Active CN105611291B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201511026855.2A CN105611291B (en) 2015-12-31 2015-12-31 The method and apparatus that mark information is added in the video frame and detects frame losing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201511026855.2A CN105611291B (en) 2015-12-31 2015-12-31 The method and apparatus that mark information is added in the video frame and detects frame losing

Publications (2)

Publication Number Publication Date
CN105611291A true CN105611291A (en) 2016-05-25
CN105611291B CN105611291B (en) 2019-01-08

Family

ID=55990793

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201511026855.2A Active CN105611291B (en) 2015-12-31 2015-12-31 The method and apparatus that mark information is added in the video frame and detects frame losing

Country Status (1)

Country Link
CN (1) CN105611291B (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107545214A (en) * 2016-06-28 2018-01-05 阿里巴巴集团控股有限公司 Image sequence number determines method, the method to set up of feature, device and smart machine
CN107734285A (en) * 2017-10-25 2018-02-23 北京奇艺世纪科技有限公司 A kind of picture time-delay calculation system, method and device
CN108307191A (en) * 2018-01-03 2018-07-20 西安万像电子科技有限公司 The alignment schemes and device of image data
CN108495120A (en) * 2018-01-31 2018-09-04 华为技术有限公司 A kind of video frame detection, processing method, apparatus and system
CN109348286A (en) * 2018-10-12 2019-02-15 北京凯视达科技有限公司 Crash detection method, device, play system and computer readable storage medium
CN109656810A (en) * 2018-11-07 2019-04-19 深圳市维海德技术股份有限公司 A kind of adjustment method of image algorithm, debugging system and terminal device
CN109743521A (en) * 2018-12-25 2019-05-10 深圳云天励飞技术有限公司 Method of transmitting video data, device, electronic equipment and storage medium
CN110572695A (en) * 2019-08-07 2019-12-13 苏州科达科技股份有限公司 media data encoding and decoding methods and electronic equipment
CN111107370A (en) * 2019-12-31 2020-05-05 银河互联网电视有限公司 Video watermark embedding processing method and device, electronic equipment and storage medium
CN111131878A (en) * 2019-12-31 2020-05-08 北京百度网讯科技有限公司 Video preprocessing and frame loss detection method and device, electronic equipment and storage medium
CN112653905A (en) * 2019-10-12 2021-04-13 腾讯数码(天津)有限公司 Image processing method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090103617A1 (en) * 2007-10-22 2009-04-23 The Hong Kong University Of Science And Technology Efficient error recovery with intra-refresh
CN101527855A (en) * 2009-04-21 2009-09-09 成都索贝数码科技股份有限公司 Automatic detection method of video signals and system thereof
CN101697577A (en) * 2009-10-27 2010-04-21 中兴通讯股份有限公司 Video sending/receiving device and method
CN102065318A (en) * 2010-12-31 2011-05-18 北京中科大洋科技发展股份有限公司 System and method for detecting frame loss and image split of digital video system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090103617A1 (en) * 2007-10-22 2009-04-23 The Hong Kong University Of Science And Technology Efficient error recovery with intra-refresh
CN101527855A (en) * 2009-04-21 2009-09-09 成都索贝数码科技股份有限公司 Automatic detection method of video signals and system thereof
CN101697577A (en) * 2009-10-27 2010-04-21 中兴通讯股份有限公司 Video sending/receiving device and method
CN102065318A (en) * 2010-12-31 2011-05-18 北京中科大洋科技发展股份有限公司 System and method for detecting frame loss and image split of digital video system

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107545214A (en) * 2016-06-28 2018-01-05 阿里巴巴集团控股有限公司 Image sequence number determines method, the method to set up of feature, device and smart machine
CN107734285A (en) * 2017-10-25 2018-02-23 北京奇艺世纪科技有限公司 A kind of picture time-delay calculation system, method and device
CN108307191A (en) * 2018-01-03 2018-07-20 西安万像电子科技有限公司 The alignment schemes and device of image data
WO2019148859A1 (en) * 2018-01-31 2019-08-08 华为技术有限公司 Method, apparatus and system for detecting and processing video frames
CN108495120A (en) * 2018-01-31 2018-09-04 华为技术有限公司 A kind of video frame detection, processing method, apparatus and system
CN109348286A (en) * 2018-10-12 2019-02-15 北京凯视达科技有限公司 Crash detection method, device, play system and computer readable storage medium
CN109656810A (en) * 2018-11-07 2019-04-19 深圳市维海德技术股份有限公司 A kind of adjustment method of image algorithm, debugging system and terminal device
CN109743521A (en) * 2018-12-25 2019-05-10 深圳云天励飞技术有限公司 Method of transmitting video data, device, electronic equipment and storage medium
CN109743521B (en) * 2018-12-25 2021-10-08 深圳云天励飞技术有限公司 Video data transmission method and device, electronic equipment and storage medium
CN110572695A (en) * 2019-08-07 2019-12-13 苏州科达科技股份有限公司 media data encoding and decoding methods and electronic equipment
CN112653905A (en) * 2019-10-12 2021-04-13 腾讯数码(天津)有限公司 Image processing method, device, equipment and storage medium
CN111107370A (en) * 2019-12-31 2020-05-05 银河互联网电视有限公司 Video watermark embedding processing method and device, electronic equipment and storage medium
CN111131878A (en) * 2019-12-31 2020-05-08 北京百度网讯科技有限公司 Video preprocessing and frame loss detection method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN105611291B (en) 2019-01-08

Similar Documents

Publication Publication Date Title
CN105611291A (en) Method and device for adding mark information and detection frame loss in video frame
CN106663308B (en) Invisible optical tag for transmitting information between computing devices
CN105391972B (en) Image communication apparatus, image transmission apparatus, and image reception apparatus
CN102006473B (en) Video encoder and encoding method, and video decoder and decoding method
RU2014102955A (en) SIGNALING IMPORTANT IMAGE
EP1892630A1 (en) A method for remote displaying and processing based on server/client architecture
AU2020207857A1 (en) Image encoding method and apparatus, and image decoding method and apparatus
CN102156611A (en) Method and apparatus for creating animation message
CN109754046B (en) Two-dimensional code, encoding method, decoding method, device and equipment of two-dimensional code
KR100281463B1 (en) Sub-data encoding apparatus in object based encoding system
KR101354014B1 (en) Coding structure
CN102014279B (en) Method and device for intensifying video image contrast
CN107665128B (en) Image processing method, system, server and readable storage medium
CN103402091A (en) Cloud desktop image classifying and encoding method
US7711046B2 (en) Encoding circuit
CN106664442A (en) Transmitting apparatus, transmitting method, receiving apparatus, and receiving method
CN101710985A (en) Image brightness compensation method for image coding
TW200744382A (en) Block truncation coding (BTC) method and apparatus
CN102055968B (en) Method, system and device for restoring lost video data in multi view point video
CN104469400A (en) Image data compression method based on RFB protocol
CN113469869A (en) Image management method and device
CN110110805A (en) A kind of dynamic two-dimension code recognition methods and equipment based on machine learning
CN113038179A (en) Video encoding method, video decoding method, video encoding device, video decoding device and electronic equipment
CN111385579B (en) Video compression method, device, equipment and storage medium
CN113099220B (en) Video conference video image green screen detection method, system and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20170119

Address after: 201103 Leshan Road, Shanghai, No. 701, room 3, building 33

Applicant after: Shanghai Zhongyuan Network Co., Ltd.

Address before: A 100080 street Beijing city Haidian District North No. 2, building 10, 11 layers of Goldtron expand

Applicant before: Beijing Qiyi Century Science & Technology Co., Ltd.

GR01 Patent grant
GR01 Patent grant