CN108243338A - Video decoding, coding method, apparatus and system - Google Patents

Video decoding, coding method, apparatus and system Download PDF

Info

Publication number
CN108243338A
CN108243338A CN201611206456.9A CN201611206456A CN108243338A CN 108243338 A CN108243338 A CN 108243338A CN 201611206456 A CN201611206456 A CN 201611206456A CN 108243338 A CN108243338 A CN 108243338A
Authority
CN
China
Prior art keywords
key frame
frame
key
video
reference video
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201611206456.9A
Other languages
Chinese (zh)
Inventor
胡春波
乐振晓
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital 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 Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN201611206456.9A priority Critical patent/CN108243338A/en
Publication of CN108243338A publication Critical patent/CN108243338A/en
Pending legal-status Critical Current

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/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • 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/136Incoming video signal characteristics or properties
    • H04N19/137Motion inside a coding unit, e.g. average field, frame or block difference
    • 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/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/172Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a picture, frame or field

Landscapes

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

Abstract

The invention discloses a kind of video decoding, coding method, apparatus and systems, belong to video coding and decoding technology field.The method includes:When the first non-key frame between two key frames decodes failure, search meets the second non-key frame of decoding condition in the non-key frame between described two key frames and after first non-key frame, and second non-key frame for meeting decoding condition is and first non-key frame is without the non-key frame with reference to dependence;Obtain the reference video frame of second non-key frame;Second non-key frame is decoded using the reference video frame of second non-key frame.The present invention solves the problem of when video frame decoding fails in the relevant technologies, video cardton is more serious;Reach the shortening interim card time, improve the effect of video playing quality.

Description

Video decoding, coding method, apparatus and system
Technical field
The present invention relates to video coding and decoding technology field, more particularly to a kind of video decoding, coding method, device and it is System.
Background technology
In video coding and decoding technology, video frame is divided into key frame and non-key frame.Key frame is the complete of a width picture Retain, the decoding that a width picture can be completed by only needing this frame data in decoding is shown.Video frame between two key frames For non-key frame, need the data directly or indirectly referred in key frame that could decode to obtain image in decoding.
In practical application, in order to reduce data volume, when being encoded to non-key frame, typically dependent on previous video frame It is encoded.Since non-key frame decoding is typically to rely on previous video frame to be decoded, in a non-key frame not In the case of being successfully decoded, the non-key frame after the non-key frame before next key frame cannot be solved successfully Code.But for the display for ensureing video, decoding end would generally search for next key frame and continue to decode, alternatively, decoding end is to coding End initiates to be inserted into the request of key frame, after the key frame bit stream data recompiled for receiving coding side transmission, continues pair The key frame bit stream data received is decoded.
It is non-before the non-key frame not being successfully decoded to next key frame when being decoded in the manner described above Key frame is more or the non-key frame that is not successfully decoded behind search less than key frame when, these non-key frames institute can be caused right Video can not be normally shown in the longer one section of duration answered, so as to cause more serious video cardton phenomenon;In addition, due to decoding Request insertion key frame completion is encoded obtained non-key frame and abandoned, therefore will also result in the card of a period of time by end needs before Problem.
Invention content
In order to solve in the relevant technologies when decoding failure to non-key frame, if two key frame intervals are excessive, by searching The problem of lower key frame of rope continues to decode, is likely to result in more serious video cardton, an embodiment of the present invention provides one kind Video decoding, coding method, apparatus and system.The technical solution is as follows:
In a first aspect, a kind of video encoding/decoding method is provided, the method includes:When first between two key frames During non-key frame decoding failure, non-key between described two key frames and after first non-key frame Search meets the second non-key frame of decoding condition in frame, and second non-key frame for meeting decoding condition is and described first Non-key frame is without the non-key frame with reference to dependence;The reference video frame of second non-key frame is obtained, the reference regards Frequency frame is that second non-key frame is determined in coding according to the priority of second non-key frame;Utilize described second The reference video frame of non-key frame is decoded second non-key frame.
Optionally, it is described non-key between described two key frames and after first non-key frame Search meets the second non-key frame of decoding condition in frame, including:It is between described two key frames and non-positioned at described first Search meets the non-key frame of the decoding condition in non-key frame after key frame;Meet the solution code-bar what is searched In the non-key frame of part, it is non-key that the non-key frame nearest with the first non-key frame time-domain position is determined as described second Frame.
Optionally, it is described non-key between described two key frames and after first non-key frame Search meets the second non-key frame of decoding condition in frame, including:Sequentially to being located between described two key frames and positioned at institute The bit stream data for stating the non-key frame after the first non-key frame is analyzed, and the bit stream data of each non-key frame includes It is described to exist with reference to dependency information including the non-key frame for stating the reference dependency information of the non-key frame Reference video frame identification and/or the referring-to relation mark directly or indirectly referred to during coding;According to the bit stream data of present analysis In reference dependency information judge that the corresponding non-key frame of the bit stream data of present analysis is with first non-key frame It is no to exist with reference to dependence;First will determine that out is with first non-key frame without the non-key frame with reference to dependence As the second non-key frame for meeting decoding condition.
Optionally, it is described non-key between described two key frames and after first non-key frame Search meets the second non-key frame of decoding condition in frame, including:Sequentially to being located between described two key frames and positioned at institute The bit stream data for stating the non-key frame after the first non-key frame is analyzed, and the bit stream data of each non-key frame includes direct The reference video frame identification of reference;After often analyzing a bit stream data, the reference video frame identification institute tested and analyzed out is right Whether the reference video frame answered has been successfully decoded;Corresponding to the reference video frame that detect first has been successfully decoded Non-key frame as the second non-key frame for meeting decoding condition.
Optionally, it is described non-key between described two key frames and after first non-key frame Search meets the second non-key frame of decoding condition in frame, including:The reference dependence in advance negotiated with coding side is obtained to believe Breath, the reference video frame identification directly or indirectly referred in coding including the non-key frame with reference to dependency information And/or referring-to relation mark;According to the reference dependency information between described two key frames and positioned at described Search meets the second non-key frame of decoding condition in non-key frame after first non-key frame.
Second aspect provides a kind of method for video coding, the method includes:Between two adjacent key frames Non-key frame when being encoded, determine the priority of non-key frame for needing to encode;According to the priority of the non-key frame Determine the reference video frame of the non-key frame;The non-key frame is compiled according to the reference video frame of the non-key frame Code, obtains the bit stream data of the non-key frame.
Optionally, the priority according to the non-key frame determines the reference video frame of the non-key frame, including: Between described two key frames and in other non-key frames before the non-key frame, by priority not less than described Reference video frame of other non-key frames of non-key frame as the non-key frame;If other before the non-key frame are non- The priority of key frame is below the non-key frame, then by the pass in described two key frames before the non-key frame Reference video frame of the key frame as the non-key frame.
Optionally, the reference video frame according to the non-key frame encodes the non-key frame, including:Root According to the image data and non-key frame of the non-key frame reference video frame image data to the non-key frame into Row coding, obtains the bit stream data of the non-key frame;Add by the mark of the reference video frame or with reference to dependency information It adds in the bit stream data of the non-key frame, it is described direct in coding including the non-key frame with reference to dependency information It is identified with the reference video frame identification and/or referring-to relation of indirect reference.
The third aspect, provides a kind of video decoder, and described device includes:Search module, for being closed when to two During the first non-key frame decoding failure between key frame, between described two key frames and positioned at described first non-key Search meets the second non-key frame of decoding condition in non-key frame after frame, described to meet the second non-key of decoding condition Frame is without the non-key frame with reference to dependence with first non-key frame;Acquisition module, for obtaining described search module The reference video frame of second non-key frame searched, the reference video frame are second non-key frames in coding It is determined according to the priority of second non-key frame;Decoder module, for obtained using the acquisition module described the The reference video frame of two non-key frames is decoded second non-key frame.
Optionally, described search module, including:First search unit, between described two key frames and being located at Search meets the non-key frame of the decoding condition in non-key frame after first non-key frame;First determination unit, For in the non-key frame for meeting the decoding condition that is searched in first search unit, will with it is described first non-key The nearest non-key frame of frame time-domain position is determined as second non-key frame.
Optionally, described search module, including:First analytic unit, for sequentially to be located at described two key frames it Between and the bit stream data of non-key frame after first non-key frame analyzed, the code of each non-key frame Stream packets contain the reference dependency information for stating the non-key frame, described with reference to described in including dependency information The reference video frame identification and/or referring-to relation mark that non-key frame is directly or indirectly referred in coding;Judging unit is used for Reference dependency information in the bit stream data of present analysis judges that the bit stream data of present analysis is corresponding non-key Frame whether there is with first non-key frame with reference to dependence;Second determination unit, for will determine that out first with First non-key frame is without the non-key frame with reference to dependence as the second non-key frame for meeting decoding condition.
Optionally, described search module, including:Second analytic unit, for sequentially to be located at described two key frames it Between and the bit stream data of non-key frame after first non-key frame analyzed, the code stream number of each non-key frame According to including the reference video frame identification directly referred to;Detection unit after often analyzing a bit stream data, tests and analyzes out Whether the reference video frame corresponding to the reference video frame identification has been successfully decoded;Third determination unit, for that will detect The non-key frame corresponding to first reference video frame being successfully decoded gone out is as the second non-pass for meeting decoding condition Key frame.
Optionally, described search module, including:Acquiring unit relies on for obtaining the reference negotiated in advance with coding side Relation information, the reference video directly or indirectly referred in coding including the non-key frame with reference to dependency information Frame identification and/or referring-to relation mark;Search unit, for according to it is described with reference to dependency information positioned at described two passes Search between key frame and in the non-key frame after first non-key frame the second non-key frame for meeting decoding condition.
Fourth aspect, provides a kind of video coding apparatus, and described device includes:First determining module, for phase When non-key frame between two adjacent key frames is encoded, the priority of non-key frame for needing to encode is determined;Second really Cover half block, for determining the reference video frame of the non-key frame according to the priority of the non-key frame;Coding module is used for The non-key frame is encoded according to the reference video frame of the non-key frame, obtains the code stream number of the non-key frame According to.
Optionally, second determining module, between described two key frames and positioned at the non-key frame it In other preceding non-key frames, using other non-key frames of priority not less than the non-key frame as the non-key frame Reference video frame;If the priority of other non-key frames before the non-key frame is below the non-key frame, by institute State reference video frame of the key frame as the non-key frame before being located at the non-key frame in two key frames.
Optionally, the coding module, for the image data according to the non-key frame and the ginseng of the non-key frame The image data for examining video frame encodes the non-key frame, obtains the bit stream data of the non-key frame;By the ginseng It examines the mark of video frame or is added in the bit stream data of the non-key frame with reference to dependency information, it is described to be closed with reference to dependence It is reference video frame identification and/or the referring-to relation mark that information includes that the non-key frame is directly or indirectly referred in coding Know.
5th aspect, provides a kind of video coding and decoding system, the system comprises:Video decoder and Video coding Device;Wherein, the device that for example above-mentioned third aspect of the video decoder provides;The video coding apparatus for example above-mentioned 4th The device that aspect provides.
The advantageous effect that technical solution provided in an embodiment of the present invention is brought is:
After failure is decoded to the first non-key frame, by between two key frames and positioned at the first non-key frame Search meets the second non-key frame of decoding condition in non-key frame later, and this meets the second non-key frame of decoding condition For that without the non-key frame with reference to dependence, thus can be decoded at the second non-key frame with the first non-key frame, from And reduce the quantity for the non-key frame that can not be successfully decoded, the time of video cardton is shortened, and then improve video playing Quality.
Description of the drawings
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, the accompanying drawings in the following description is only some embodiments of the present invention, for For those of ordinary skill in the art, without creative efforts, other are can also be obtained according to these attached drawings Attached drawing.
Fig. 1 is according to the implementation environment schematic diagram involved by the coding and decoding video shown in section Example;
Fig. 2A is the method flow diagram of method for video coding provided by one embodiment of the present invention;
Fig. 2 B are the schematic diagrames for the Video coding that another embodiment of the present invention provides;
Fig. 3 A are the method flow diagrams of video encoding/decoding method provided by one embodiment of the present invention;
Fig. 3 B are the decoded schematic diagrames of video that another embodiment of the present invention provides;
Fig. 4 is the block diagram of video coding apparatus provided by one embodiment of the present invention;
Fig. 5 is the block diagram of video decoder provided by one embodiment of the present invention;
Fig. 6 is the block diagram of video coding and decoding system provided by one embodiment of the present invention.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention Formula is described in further detail.
For the ease of the understanding to various embodiments of the present invention, related terms are explained first:
Frame:It is the single width image frame of least unit in video;
Key frame:In coding without reference to other frames, only need this frame data that can complete a width picture in decoding Decoding display, this frame is referred to as key frame;
Non-key frame:Frame between two key frames is known as non-key frame, can be generally referred to as transition frames or intermediate frame, The transition frames for recording predictive information also referred to as predict frame, can be combined in decoding process according to the predictive information of prediction frame recording Crucial frame decoding obtains image;
Key frame interval:Non-key frame sum between continuous two key frames.
Fig. 1 is according to the implementation environment schematic diagram involved by the coding and decoding video shown in section Example.As shown in Figure 1, The implementation environment mainly includes coding side 110, decoding end 120 and communication network 130.
Coding side 110 receives a series of vision signal being made of video frame, coding side 110 according to reception sequencing Each video frame in vision signal is encoded, obtains bit stream data, is then passed bit stream data by communication network 130 Transport to decoding end 120.
Coding side 110, without necessarily referring to other frames, for the coding of non-key frame, needs to join for the coding of key frame At least one video frame before the non-key frame is examined to be encoded.Coding side 110 encodes to be included at least in obtained bit stream data The image data of video frame and control data.For non-key frame, the control data in bit stream data may include non-key frame The mark of reference video frame in coding or with reference to dependency information, this is with reference to dependency information for stating the non-pass Key frame directly or indirectly refers to dependence.Since the similarity-rough set of adjacent non-key frame is high, with reference to preceding non- Key frame is smaller to the bit stream data obtained when rear non-key frame encodes, after coding, usual non-key frame Compression ratio is higher than the compression ratio of key frame.
Decoding end 120 decodes, to key frame successively after bit stream data is received according to the sequencing of video frame Decoding only needs the data of the key frame recording that can complete.Decoding to non-key frame, since the coding of coding side 110 obtains Bit stream data in control data may include non-key frame coding when reference video frame mark or with reference to dependence Information, therefore, decoding end 120 can be according to the control data identification non-key frames in the bit stream data of non-key frame in coding Reference video frame is decoded with reference to the data and the reference video frame of the non-key frame that non-key frame records.
Communication network 130 can be wireline communication network or cordless communication network.Not to communication in the present embodiment The Physical realization of network 130 is defined.In daily life, when user watches video by video application online, What is transmitted by communication network 130 is all bit stream data.
In one implementation, communication network 130 is preferable to the status transmission of data, coding side 110 and decoding end 120 It can realize real-time data transmission, coding side 110 is by the bit stream data real-time Transmission after coding to decoding end 120, decoding end 120 are in real time decoded bit stream data display.
In another implementation, communication network 130 is poor to the status transmission of data, and decoding end 120 may be first Certain bit stream data is cached, how much the data of caching can determine according to the situation of communication network 130, general communication network 130 is poorer, and the data of caching are more.Then decoding end 120 is decoded the bit stream data of caching.
Optionally, which is also possible that the server of third party application, and coding side 110 may be by code stream Data are transferred to server, and when decoding end 120 asks bit stream data to server, bit stream data is transferred to decoding by server End 120.
Optionally, the coding side 110 in the implementation environment and decoding end 120 can be integrated into same equipment, should Equipment can not only carry out Video coding, can also carry out video decoding.
Since the data volume that vision signal includes is very big, network transmission and storage for the ease of vision signal usually exist Sending side can carry out vision signal coding compression and obtain bit stream data, and then the bit stream data received is carried out in receiving side Decoding.In the prior art, it when being encoded to non-key frame, typically relies on previous video frame and is encoded, therefore solving During code when a non-key frame cannot be successfully decoded, decoding end would generally search for next key frame and continue to decode, if There are more non-key frames, these non-key frames between the non-key frame of decoding failure and next key frame cannot be decoded, Then lead to more serious video cardton problem.
This programme reference video frame of at least one non-key frame in coding is not the previous video of the non-key frame Frame specifically refers to the method for video coding shown in Fig. 2A.It is corresponding with the method for video coding in Fig. 2A, by such as scheming When the bit stream data that the method for video coding of 2A encodes is decoded, when a non-key frame decoding failure, in the solution Search one does not depend on the non-key frame of decoding failure and is encoded and non-key apart from this behind the non-key frame of code failure The nearest non-key frame of frame, that is, the reference video frame of the non-key frame searched before the non-key frame of decoding failure and by It is successfully decoded, then by being decoded to the non-key frame searched, can make non-behind the non-key frame of decoding failure Key frame normally decodes, and reduces the time of video cardton, specifically refers to video encoding/decoding method as shown in Figure 3A.
Fig. 2A is the method flow diagram of method for video coding provided by one embodiment of the present invention, which should For in coding side 110 shown in FIG. 1.As shown in Figure 2 A, which may comprise steps of:
Step 201, it when the non-key frame between two adjacent key frames encodes, determines to need to encode non- The priority of key frame.
During actual implementation, it is different excellent that the non-key frame between adjacent two key frames can be divided at least two First grade.About the dividing mode of priority, can specifically be set according to actual demand.The non-key frame of each equal priority Identical coding strategy can be used in coding, the coding strategy that the non-key frame of different priorities uses can be different.
In order to be better understood from the priority of non-key frame, the code stream signal of the Video coding shown in Fig. 2 B is referred to Figure.In Fig. 2 B, I1 and I2 are key frames, and the non-key frame between key frame is divided into 3 priority.Wherein, P2~P4, P6 ~P8, P10~P12, P14~P16, P18~P20, P22~P24, P26~P28, P30~P32 etc. is divided into the 1st priority, P5, P9, P13, P21, P25, P29 etc. are divided into the 2nd priority, and P17, P33 are divided into the 3rd priority.1st priority It is divided between the non-key frame of the 0, the 2nd priority to be divided between the non-key frame of the 3, the 3rd priority between non-key frame and is divided into 15.
Optionally, in practical applications, the priority that can also adjust non-key frame according to demand divides, such as by 3 Priority is adjusted to 4 priority, can also adjust the non-key frame interval of equal priority.
Step 202, the reference video frame of non-key frame is determined according to the priority of non-key frame.
The step in the specific implementation, other non-key frames between two key frames and before the non-key frame In, using priority not less than the non-key frame other non-key frames as the non-key frame reference video frame;If the non-pass The priority of other non-key frames before key frame is below the non-key frame, then will be located at the non-key frame in two key frames Reference video frame of the key frame before as the non-key frame.
It is still illustrated with the code stream shown in Fig. 2 B, as shown in Figure 2 B, key frame I1 and key frame I2 are adjacent Two key frames, P2 to P33 are non-key frames, and the position pointed by arrow is reference video frame of the non-key frame in coding Position.Wherein, the priority of non-key frame P5 be the 2nd priority, between two key frames and positioned at non-key frame P5 it It is preceding without priority higher than non-key frame P5 or the non-key frame identical with non-key frame P5 priority, thus non-key frame P5 Reference video frame is key frame I1.Similarly, the reference video frame of non-key frame P17 is key frame I1.In addition, due to non-key frame The priority of P9 is the 2nd priority, and non-key frame P9 can refer to video frame of the front priority higher than non-key frame P9 and carry out Coding, therefore the reference video frame of non-key frame P9 can be configured to key frame I1.Similarly, the reference video of non-key frame P13 Frame can be configured to key frame I1, and the reference video frame of non-key frame P21 can be configured to non-key frame P17, non-key frame P25 Reference video frame can be configured to non-key frame P17, the reference video frame of non-key frame P29 can be configured to non-key frame P17.In addition, the priority of non-key frame P33 is the 3rd priority, the reference video frame of non-key frame P33 is equal priority Non-key frame P17.Optionally, although not shown in the drawings, the reference video frame of non-key frame P9 may be configured to similarity priority The non-key frame P5 of grade, the reference video frame of non-key frame P13 may be configured to the non-key frame P9 of equal priority, non-pass The reference video frame of key frame P25 may be configured to the non-key frame P21 of equal priority, the reference video of non-key frame P29 Frame may be configured to the non-key frame P25 of equal priority.
Step 203, the non-key frame is encoded according to the reference video frame of the non-key frame, obtains non-key frame Bit stream data.
In practical applications, coding side 110 is when encoding each video frame, it may be determined that the data of the video frame With the video frame whether with reference to other video frame encoded and refer to be which or which video frame weave into this The corresponding bit stream data of video frame.For example, to the coding of key frame, need to be realized according to the key frame, be regarded without reference to other Frequency frame;To the coding of non-key frame, realized according to the reference video frame of non-key frame and the non-key frame, it is also necessary to which this is non- Referring-to relation between key frame and reference video frame is compiled into bit stream data.In addition, a non-key frame relies on another video Frame (the hereinafter referred to as video frame) is encoded, and there are two types of possible situations:One kind is that non-key frame directly refers to the video frame, i.e., The reference video frame of the non-key frame is the video frame;Another kind is the non-key frame indirect reference video frame, i.e., this is non-key Reference video frame of the reference video frame of frame in coding is the video frame, and so on.If a non-key frame is with reference to another A video frame is encoded, then the reference video frame for showing the non-key frame is the video frame.
The step in the specific implementation, according to the image data of non-key frame and the image of the reference video frame of non-key frame Data encode non-key frame, obtain the bit stream data of non-key frame;
It is added in the bit stream data of non-key frame by the mark of reference video frame or with reference to dependency information.With reference to according to Relation information is relied to include reference video frame identification and/or the referring-to relation mark that non-key frame is directly or indirectly referred in coding Know.
Wherein, the mark of reference video frame is for identifying which video frame the reference video frame of non-key frame is specially.Ginseng It examines dependency information and includes reference video frame identification and/or the reference that the non-key frame is directly or indirectly referred in coding Relation identity specifically can include the mark of reference video frame directly referred to, the reference video frame of indirect reference identifies, directly Connect the mark of the referring-to relation between the reference video frame of reference and non-key frame, the reference video frame directly referred to and indirect reference Reference video frame between referring-to relation mark, for example, there are three video frame A, B, C, video frame A is regarded without reference to other Frequency frame encodes, video frame B reference video frames A codings, video frame C reference video frames B codings, then the direct reference videos of video frame B The direct reference video frame B of frame A, video frame C, video frame C indirect reference video frame A.By taking video frame C as an example, the code stream of video frame C The reference dependency information recorded in data can include:The mark of reference video frame B directly referred to as video frame C The mark A of the B and reference video frame A of indirect reference as video frame C can also include the reference video directly referred to The reference between referring-to relation mark (being, for example, C-B), reference video frame B and reference video frame A between frame B and non-key frame Relation identity (being, for example, B-A).
Whether video frame can be successfully decoded, whether only depend on reference video frame that it directly refers under normal conditions It is successfully decoded, if the reference video frame directly referred to can be successfully decoded, which can be successfully decoded, the reference video Frame can be a frame or multi-frame video frame, the referring-to relation mark that the bit stream data in the present embodiment includes either ginseng indirectly The reference video frame identification examined can more easily judge which video frame successfully decoded or failure, there are those reference dependences Relationship, to determine the second non-key frame.
The present embodiment not to reference to dependency information particular content and form be defined, can include with it is non-key Frame has the mark of all video frame of referring-to relation.Optionally, the mark of video frame can be the number of video frame, as P1, The position of P5, I2 etc. or video frame can also be the corresponding time information of video frame, and the present embodiment is not to video frame The specific implementation of mark be defined.
Still by taking Fig. 2 B as an example, for non-key frame P12, reference video frame is non-key frame P11, and non-key frame P11 Reference video frame for non-key frame P10, the reference video frame of non-key frame P10 is non-key frame P9, the ginseng of non-key frame P9 Video frame is examined as key frame I1.That is, non-key frame P12 and non-key frame P11 has directly with reference to dependence, and Have with non-key frame P10, P9 and key frame I1 and indirectly refer to dependence.Therefore, the corresponding references of non-key frame P12 Dependency information can include the mark of the video frame such as non-key frame P11, P10, P9 and key frame I1 in order.
Alternatively, in addition to adding the mark of reference video frame in bit stream data or believing with reference to dependence It ceases so that decoding end is known outside referring-to relation, know by way of negotiating in advance decoding end and believe with reference to dependence Breath.About specific negotiation mode, the present embodiment is not specifically limited, for example, can when sending coded data, will refer to according to Bad relation information is sent to decoding end.
No matter use which kind of mode that decoding end is made to know with reference to dependence, since the coding of non-key frame is based on reference What video frame carried out, therefore video frame can be compressed by coding so that data volume becomes smaller.Generally, when in video Scene stillness when, show varying less between adjacent video frame, coding pressure carried out to non-key frame in this case Contracting, usually can be by the very little of video frame compression.
In addition, the variation between usually there are two video frame being spaced is than the variation between two adjacent video frame It is big, it is therefore, small to compression rates of the reference video frame for the non-key frame of adjacent previous video frame in coding In to compression rates of the reference video frame for the non-key frame of adjacent previous video frame.It is empty in view of network transmission and storage Between the problem of, reference video frame is not before quantity and the reference video frame of the non-key frame of adjacent previous video frame are adjacent The quantity of the non-key frame of one video frame needs reasonable distribution or is configured according to actual environment, to reach comprehensive performance most Good effect.
Optionally, coding side 110 can be adjusted coding mode according to actual demand, but need from next key frame It rises and is adjusted, can also artificially be inserted into a key frame when needing adjustment and be adjusted, do not need to etc. in key frame intervals Non-key frame all coding finish.
In conclusion method for video coding provided in an embodiment of the present invention, by coding, by the non-pass of different stage Key frame presses different rule frame-skipping reference encoders so that after to non-key frame decoding failure, by positioned at decoding failure Search meets the non-key frame of decoding condition in non-key frame after non-key frame, and this meets the non-key frame of decoding condition Be the non-key frame with decoding failure without the non-key frame with reference to dependence, thus can be from meeting the non-key of decoding condition Restore decoding at frame, so as to reduce the quantity for the non-key frame that can not be successfully decoded, shorten the time of video cardton, into And improve video playing quality.
In practical applications, after coding compression is carried out to vision signal, in order to restore video letter as much as possible Number normal display, generally require and be decoded to encoding compressed data, corresponding with Fig. 2A, the decoded method of video can With referring to as shown in Figure 3A the step of.
Fig. 3 A are the method flow diagrams of video encoding/decoding method provided by one embodiment of the present invention, which should For in decoding end 120 shown in FIG. 1.As shown in Figure 3A, which may comprise steps of:
Step 301, when between two key frames the first non-key frame decode failure when, positioned at two key frames it Between and the non-key frame after the first non-key frame in search meet the second non-key frame of decoding condition, meet solution code-bar Second non-key frame of part is without the non-key frame with reference to dependence with the first non-key frame.
In practical applications, bit stream data may cause a part of data to be lost in transmission process due to network It loses, so that there is a situation where decoding fails when being decoded to bit stream data for decoding end 120.Again by decoding in this present embodiment The bit stream data that end 120 receives is that the method as shown in coding side 110 according to Fig. 2A is encoded, adjacent two The reference video frame of at least one non-key frame is not adjacent previous video frame between key frame, therefore non-key first When frame decoding fails, decoded in order to fast quick-recovery, can search for backward whether have it is meet decoding condition second non-key Frame.
Meet the reference video frame of the second non-key frame of decoding condition before the first non-key frame and successfully solved Code, therefore the second non-key frame does not depend on the first non-key frame and is encoded, i.e. the second non-key frame and the first non-key frame without With reference to dependence.In addition, in order to restore the normal decoding of bit stream data as early as possible, meet decoding condition second is non-key First non-key frame that frame can be successfully decoded later for the first non-key frame, the i.e. nearest energy of the first non-key frame of distance The non-key frame being enough successfully decoded.That is, meet decoding condition the second non-key frame be with the first non-key frame without With reference to non-key frame nearest with the first non-key frame time-domain position in the non-key frame of dependence.Due to it is first non-key Frame is without the possible more than one of non-key frame with reference to dependence, by these with the first non-key frame without with reference to the non-of dependence The non-key frame nearest with the first non-key frame time-domain position is determined as the second non-key frame in key frame, so that video The interim card time shortens as possible, and the fault-tolerant effect of video reaches best.
Optionally, regarding in bit stream data can be recognized accurately by parsing the bit stream data received in decoding end 120 Frequency frame is which frame the reference video frame of key frame or non-key frame and each non-key frame is.Therefore, positioned at two Search between key frame and in the non-key frame after the first non-key frame the second non-key frame for meeting decoding condition, packet It includes but is not limited to any one of following three kinds of modes mode:
Mode one:The sequentially code stream to the non-key frame being located between two key frames and after the first non-key frame Data are analyzed, and the bit stream data of each non-key frame includes to state directly or indirectly closing with reference to dependence for non-key frame The reference dependency information of system;Reference dependency information in the bit stream data of present analysis judges present analysis The corresponding non-key frame of bit stream data whether there is with the first non-key frame with reference to dependence;Will determine that out first and the One non-key frame is without the non-key frame with reference to dependence as the second non-key frame for meeting decoding condition.
When this kind of mode is with Video coding, by non-key frame directly or indirectly with reference to dependence with reference to dependence pass It is premised on the mode of information adds the situation in the bit stream data of the non-key frame, this can be wrapped with reference to dependency information Include reference video frame identification and/or the referring-to relation mark that non-key frame is directly or indirectly referred in coding.Thus this kind of side Formula in the specific implementation, can be by the way that the mark for decoding the non-key frame of failure be regarded with what is included with reference to dependency information The mark of frequency frame is compared, if including the mark of the non-key frame of decoding failure with reference to dependency information, illustrates Exist between the non-key frame of decoding failure with reference to dependence, such non-key frame is unsatisfactory for decoding condition.
It is each non-key when being encoded to the non-key frame shown in Fig. 2 B by taking the encoding code stream shown in Fig. 2 B as an example The reference dependence of frame can be as shown in Figure 3B.By the first non-key frame of decoding failure for for P13, two key frame I1 and Non-key frame between I2 and after the first non-key frame includes non-key frame P14 to non-key frame P33 etc., sequentially first right The bit stream data of non-key frame P14 is analyzed, from Fig. 3 B it is found that non-key frame P14 is compiled dependent on non-key frame P13 Code, thus non-key frame P14 is not the non-key frame for meeting decoding condition.And non-key frame P15 and non-key frame P16 are the same as non-pass Key frame P14 is the same, exists with non-key frame P13 and indirectly relies on relationship, thus non-key frame P15 and non-key frame P16 are not yet It is the non-key frame for meeting decoding condition.Next, sequentially the bit stream data of non-key frame P17 is analyzed, due to non-pass The reference video frame of key frame P17 is not present for key frame I1, i.e. non-key frame P17 and the first non-key frame P13 and is closed with reference to dependence System, and be that non-key frame P13 is not present in the non-key frame with reference to dependence with non-key frame P13 from non-key frame later Non-key frame nearest P13, thus non-key frame P17 is the second non-key frame searched.
Mode two:The sequentially code stream to the non-key frame being located between two key frames and after the first non-key frame Data are analyzed, and the bit stream data of each non-key frame includes the reference video frame identification directly referred to;Often analyze a code After flow data, whether the reference video frame corresponding to reference video frame identification tested and analyzed out has been successfully decoded;It will detection The non-key frame corresponding to first reference video frame being successfully decoded gone out is as the second non-pass for meeting decoding condition Key frame.
When this kind of mode is with Video coding, the reference video frame identification that non-key frame is directly referred to is added in the non-pass Premised on situation in the bit stream data of key frame.When it is implemented, it is added when can get coding by parsing bit stream data The reference video frame identification directly referred into the non-key frame in bit stream data.Often analyzing a reference video frame identification When, detect whether the corresponding reference video frame of reference video frame identification has been successfully decoded, if reference video frame is by success Decoding, then can be successfully decoded with reference to the non-key frame of the reference video frame, also illustrate the non-key frame be with it is first non-key The video frame is then determined as the second non-key frame for meeting decoding condition, if ginseng by frame without the non-key frame with reference to dependence It examines video frame to be not yet successfully decoded, then continues to analyze the bit stream data of next video frame after the video frame. Meet the second non-key frame of decoding condition until finding.
It is each non-key when being encoded to the non-key frame shown in Fig. 2 B by taking the encoding code stream shown in Fig. 2 B as an example The reference dependence of frame can be as shown in Figure 3B.By the first non-key frame of decoding failure for for P21, two key frame I1 and Non-key frame between I2 and after the first non-key frame P21 includes non-key frame P22 to non-key frame P33 etc., sequentially First the bit stream data of non-key frame P22 is analyzed.From Fig. 3 B it is found that the reference video frame of non-key frame P22 is non-key The mark for being identified as non-key frame P21 of frame P21, the i.e. reference video frame that the corresponding bit stream datas of non-key frame P22 include, Fail since non-key frame P21 is decoded, i.e. the reference video frame decoding failure of non-key frame P22, thus non-key frame P22 is not Meet the non-key frame of decoding condition.And non-key frame P23 and non-key frame P24 with non-key frame P22 as, equal indirect reference Non-key frame P21, respective reference video frame decodes failure, thus non-key frame P23 and non-key frame P24 is nor symbol Close the non-key frame of decoding condition.Next, sequentially the bit stream data of non-key frame P25 is analyzed, due to non-key frame The reference video frame of P25 is non-key frame P17.If non-key frame P17 is successfully decoded, non-key frame P25 and first is non- Key frame P21 is not present with reference to dependence, and non-key frame P17 is first reference video being successfully decoded detected Frame, that is to say, that the corresponding non-key frame P25 right and wrongs key frame P21 of non-key frame P17 are not present with reference to the non-of dependence The non-key frame nearest from non-key frame P21 in key frame, thus non-key frame P25 is the second non-key frame searched.
Mode three:The reference dependency information negotiated in advance with coding side is obtained, is included with reference to dependency information non- The reference video frame identification and/or referring-to relation mark that key frame is directly or indirectly referred in coding;It is closed according to reference to dependence Be information between two key frames and in the non-key frame after the first non-key frame search meet decoding condition The second non-key frame.
This kind of mode three is to search for the second non-key frame according to reference to dependency information with aforesaid way one, is distinguished It is that bit stream data is analyzed one by one to obtain with reference to dependency information in mode one, and mode three is assisted in advance with coding side Quotient obtains.Since mode three is identical with the search process principle of mode one, no longer mode three is repeated herein, is specifically referred to Aforesaid way one.
No matter which kind of above-mentioned mode is used to search for the second non-key frame, it is non-key in order to be better understood from search second The process of frame refers to the decoded code stream schematic diagram of video shown in Fig. 3 B.The decoded bit stream shown in Fig. 3 B in Fig. 2 B with showing The encoding code stream gone out is corresponding.Decoding order is:When the non-key frame of corresponding 1st priority can not be successfully decoded, after The continuous next priority of decoding is higher than 1 and does not rely on the non-key frame of non-key frame coding or next key frame;It is corresponding When the non-key frame of 2nd priority can not be successfully decoded, continue to decode next priority not less than 2 and not rely on this non-key The non-key frame of frame coding or next key frame;When the non-key frame of corresponding 3rd priority can not be successfully decoded, continue to solve The next priority of code is not less than 3 and does not rely on the non-key frame of the non-key frame or next key frame.In decoding process In, when the non-key frame P2 or P3 or P4 of the 1st priority decode failure, it is preferential that decoding end can jump to closest the 2nd The non-key frame P5 of grade continues to decode;When the non-key frame P13 of the 2nd priority decodes failure, decoding end can jump to distance The non-key frame P17 of the 3rd nearest priority continues to decode;When the non-key frame P21 of the 2nd priority decodes failure, decoding Continue to decode the non-key frame P25 of the 2nd priority in end;When the non-key frame P33 of the 3rd priority decodes failure, due to below The second non-key frame of decoding condition is not met, decoding end continues to decode the second key frame I2, that is, continues to decode next key Frame.
Step 302, the reference video frame of the second non-key frame is obtained, reference video frame is the second non-key frame in coding It is determined according to the priority of the second non-key frame.
The bit stream data that decoding end passes through the second non-key frame of analysis, it may be determined that go out the reference video of the second non-key frame Which frame frame is.During due to being decoded to the second non-key frame, the reference video frame with reference to the second non-key frame and the are needed The bit stream data of two non-key frames, therefore decoding end needs to obtain the reference video frame of the second non-key frame.
Step 303, the second non-key frame is decoded using the reference video frame of the second non-key frame.
Since non-key frame is realized in coding based on reference video frame, non-key frame is being reverted into video image When, need the vedio data progress that data and non-key frame bit stream data with reference to reference video frame are come to non-key frame extensive It is multiple.
When the reference video frame of the second non-key frame has been successfully decoded, then decoded reference video frame is utilized The bit stream data of data and the second non-key frame is decoded the second non-key frame.
When not searching the second non-key frame for meeting decoding condition, decoding end 120 can carry out next key frame Decoding, i.e., be decoded posterior key frame in two adjacent key frames.
In the case of normal decoding, decoding end combination non-key frame bit stream data and corresponding reference video frame can To complete decoding.But in practical applications, due to the dtr signal of communication network, bit stream data may produce in transmission process The situation of data packetloss is given birth to or in decoding process there is a situation where decoding failure, for regarding in these situations, with Fig. 2 B Frequency encodes corresponding, and the fault-tolerant measure after the decoding failure of part non-key frame has been illustrated in Fig. 3 B.
As shown in Figure 3B, in decoding process, when non-key frame P2 or non-key frame P3 or non-key frame P4 decoding errors When, since non-key frame P5 is not encoded directly or indirectly with reference to non-key frame P2 or non-key frame P3 or non-key frame P4, Decoding end can jump to non-key frame P5 and continue to decode;It staggers the time when non-key frame P13 is decoded, since non-key frame P14 is direct It being encoded with reference to non-key frame P13, non-key frame P15 and non-key frame P16 indirect reference non-key frames P13 are encoded, Non-key frame P17 is not encoded, therefore decoding end can jump to non-key frame P17 directly or indirectly with reference to non-key frame P13 Continue to decode;It staggers the time when non-key frame P21 is decoded, since non-key frame P22 is directly encoded with reference to non-key frame P21, Non-key frame P23 and non-key frame P24 indirect reference non-key frames P21 are encoded, and non-key frame P25 does not join directly or indirectly It examines non-key frame P21 to be encoded, therefore decoding end continues to decode non-key frame P25;It staggers the time when non-key frame P33 is decoded, Decoding end continues to decode the second key frame I2, that is, continues to decode next key frame.
It will be apparent that the second non-key frame for meeting decoding condition must simultaneously meet the reference video frame of the second non-key frame Before the first non-key frame of decoding failure, and the reference video frame of the second non-key frame has been successfully decoded.From solution First non-key frame of code failure is when searching for the second non-key frame for meeting decoding condition backward, in order to which determine as early as possible can be by The second non-key frame being successfully decoded, therefore the second non-key frame for being met decoding condition is distance the first non-key frame time domain The nearest non-key frame that can be successfully decoded.
Therefore, when non-key frame decodes failure, search backward meets the second non-key frame of decoding condition and continues to decode, It can restore as early as possible since centre cannot interim card problem caused by decoded non-key frame.
Optionally, in practical applications, the video encoding/decoding method in the embodiment of the present invention and request can be inserted into key The method of frame combines to reach better video display effect.For example, when the first non-key frame decodes failure, pass through the present invention The video encoding/decoding method that embodiment is provided is searched in the bit stream data having received meets the second non-key of decoding condition Frame or key frame if searching the second non-key frame or key frame for meeting decoding condition, continue to decode, if not searching Meet the second non-key frame or key frame of decoding condition, then initiate to be inserted into the request of key frame to coding side, be compiled receiving After the key frame bit stream data recompiled that code end is sent, continue to be decoded the key frame bit stream data received.
In conclusion video encoding/decoding method provided in an embodiment of the present invention, by after to non-key frame decoding failure, Search meets the non-key frame of decoding condition in the non-key frame after the non-key frame of decoding failure, and this meets decoding The non-key frame of condition is non-key frame of the non-key frame without reference dependence with decoding failure, thus can be solved from meeting Restore decoding at the non-key frame of code-bar part, so as to reduce the quantity for the non-key frame that can not be successfully decoded, shorten and regard The time of frequency interim card, and then improve video playing quality.
Fig. 4 is the block diagram of video coding apparatus provided by one embodiment of the present invention, which should In coding side 110 shown in FIG. 1.The video coding apparatus can include:First determining module 401, the second determining module 402 and coding module 403.
First determining module 401, for performing above-mentioned steps 201;
Second determining module 402, for performing above-mentioned steps 202;
Coding module 403, for performing above-mentioned steps 203.
In conclusion video coding apparatus provided in an embodiment of the present invention, by coding, by the non-pass of different stage Key frame presses different rule frame-skipping reference encoders so that after to non-key frame decoding failure, by positioned at decoding failure Search meets the non-key frame of decoding condition in non-key frame after non-key frame, and this meets the non-key frame of decoding condition Be the non-key frame with decoding failure without the non-key frame with reference to dependence, thus can be from meeting the non-key of decoding condition Restore decoding at frame, so as to reduce the quantity for the non-key frame that can not be successfully decoded, shorten the time of video cardton, into And improve video playing quality.
It should be noted that:The video coding apparatus provided in above-described embodiment is when being encoded, only with above-mentioned each work( Can module division progress for example, in practical application, can be as needed and by above-mentioned function distribution by different functions Module is completed, i.e., the internal structure of coding side is divided into different function modules, to complete whole described above or portion Divide function.In addition, the video coding apparatus that above-described embodiment provides belongs to same design with method for video coding embodiment, have Body realizes that process refers to embodiment of the method, and which is not described herein again.
Fig. 5 is the block diagram of video decoder provided by one embodiment of the present invention, which should In decoding end 120 shown in FIG. 1.The video decoder can include:Search module 501, acquisition module 502 and decoding Module 503.
Search module 501 is used to implement the function of above-mentioned steps 301.
Acquisition module 502 is used to implement the function of above-mentioned steps 302.
Decoder module 503 is used to implement the function of above-mentioned steps 303.
In a kind of possible realization method, search module 501, including:
First search unit, for being searched between two key frames and in the non-key frame after the first non-key frame Suo Fuhe decodes the non-key frame of condition.
First determination unit, will be in the non-key frame for meeting decoding condition that is searched in the first search unit The nearest non-key frame of first non-key frame time-domain position is determined as the second non-key frame.
In a kind of possible realization method, search module 501, including:
First analytic unit, for sequentially to being located at the non-pass between two key frames and after the first non-key frame The bit stream data of key frame is analyzed, and the bit stream data of each non-key frame includes relies on pass for stating the reference of non-key frame Be information, with reference to dependency information include non-key frame in coding the reference video frame identification that directly or indirectly refers to and/ Or referring-to relation mark;
Judging unit judges present analysis for the reference dependency information in the bit stream data according to present analysis The corresponding non-key frame of bit stream data whether there is with the first non-key frame with reference to dependence;
Second determination unit, for will determine that out first and the first non-key frame without with reference to the non-key of dependence Frame is as the second non-key frame for meeting decoding condition.
In alternatively possible realization method, search module 501, including:
Second analytic unit, for sequentially to being located at the non-pass between two key frames and after the first non-key frame The bit stream data of key frame is analyzed, and the bit stream data of each non-key frame includes the reference video frame identification directly referred to;
Detection unit, after often analyzing a bit stream data, corresponding to the mark of the reference video frame tested and analyzed out Reference video frame whether be successfully decoded;
Third determination unit, for the non-pass corresponding to first reference video frame being successfully decoded will detecting Key frame is as the second non-key frame for meeting decoding condition.
In alternatively possible realization method, search module 501, including:
Acquiring unit, for obtaining the reference dependency information negotiated in advance with coding side, with reference to dependency information The reference video frame identification and/or referring-to relation mark directly or indirectly referred in coding including non-key frame;
Second search unit, for according to reference to dependency information between two key frames and positioned at first non- Search meets the second non-key frame of decoding condition in non-key frame after key frame.
In conclusion the video decoder provided in the embodiment of the present invention, due in coding, by the non-of different stage Key frame presses different rule frame-skipping reference encoders, thus after to non-key frame decoding failure, by failing positioned at decoding Non-key frame after non-key frame in search meet the non-key frame of decoding condition, and this meets the non-key of decoding condition Frame is non-key frame of the non-key frame without reference dependence with decoding failure, thus can be from the non-pass for meeting decoding condition Restore decoding at key frame, so as to reduce the quantity for the non-key frame that can not be successfully decoded, shorten the time of video cardton, And then improve video playing quality.
It should be noted that:The video decoder provided in above-described embodiment is when being decoded, only with above-mentioned each work( Can module division progress for example, in practical application, can be as needed and by above-mentioned function distribution by different functions Module is completed, i.e., the internal structure of decoding end is divided into different function modules, to complete whole described above or portion Divide function.In addition, the video decoder that above-described embodiment provides belongs to same design with video encoding/decoding method embodiment, have Body realizes that process refers to embodiment of the method, and which is not described herein again.
Fig. 6 is the block diagram of video coding and decoding system provided by one embodiment of the present invention, which includes video Code device 601 and video decoder 602;
Wherein, the video coding apparatus that embodiment provides as shown in Figure 4 above of video coding apparatus 601, video decoding dress Put 602 video decoders that embodiment provides as shown in Figure 5 above.
System provided in this embodiment, by video coding apparatus in coding, by the non-key frame of different stage by not Same rule frame-skipping reference encoder so that after video decoder is to non-key frame decoding failure, by being lost positioned at decoding Search meets the non-key frame of decoding condition in non-key frame after the non-key frame lost, and this meets the non-pass of decoding condition Key frame be the non-key frame with decoding failure without the non-key frame with reference to dependence, thus can be from meeting the non-of decoding condition At key frame restore decoding, so as to reduce the quantity for the non-key frame that can not be successfully decoded, shorten video cardton when Between, and then improve video quality.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
One of ordinary skill in the art will appreciate that hardware can be passed through by realizing all or part of step of above-described embodiment It completes, relevant hardware can also be instructed to complete by program, the program can be stored in a kind of computer-readable In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all the present invention spirit and Within principle, any modification, equivalent replacement, improvement and so on should all be included in the protection scope of the present invention.

Claims (17)

1. a kind of video encoding/decoding method, which is characterized in that the method includes:
When the first non-key frame between two key frames decodes failure, between described two key frames and it is being located at Search meets the second non-key frame of decoding condition in non-key frame after first non-key frame, described to meet solution code-bar Second non-key frame of part is without the non-key frame with reference to dependence with first non-key frame;
The reference video frame of second non-key frame is obtained, the reference video frame is second non-key frame in coding It is determined according to the priority of second non-key frame;
Second non-key frame is decoded using the reference video frame of second non-key frame.
It is 2. according to the method described in claim 1, it is characterized in that, described between described two key frames and positioned at institute The second non-key frame that search in the non-key frame after the first non-key frame meets decoding condition is stated, including:
Search meets the solution between described two key frames and in the non-key frame after first non-key frame The non-key frame of code-bar part;
It, will be nearest with the first non-key frame time-domain position in the non-key frame for meeting the decoding condition searched Non-key frame is determined as second non-key frame.
It is 3. according to the method described in claim 1, it is characterized in that, described between described two key frames and positioned at institute The second non-key frame that search in the non-key frame after the first non-key frame meets decoding condition is stated, including:
The sequentially code stream number to the non-key frame being located between described two key frames and after first non-key frame According to being analyzed, the bit stream data of each non-key frame includes the reference dependence letter for stating the non-key frame Breath, the reference video frame identification directly or indirectly referred in coding including the non-key frame with reference to dependency information And/or referring-to relation mark;
Reference dependency information in the bit stream data of present analysis judges that the bit stream data of present analysis is corresponding non- Key frame whether there is with first non-key frame with reference to dependence;
First will determine that out is used as with first non-key frame without the non-key frame with reference to dependence meets solution code-bar Second non-key frame of part.
It is 4. according to the method described in claim 1, it is characterized in that, described between described two key frames and positioned at institute The second non-key frame that search in the non-key frame after the first non-key frame meets decoding condition is stated, including:
The sequentially code stream number to the non-key frame being located between described two key frames and after first non-key frame According to being analyzed, the bit stream data of each non-key frame includes the reference video frame identification directly referred to;
After often analyzing a bit stream data, whether the reference video frame corresponding to the reference video frame identification tested and analyzed out It has been successfully decoded;
The non-key frame corresponding to reference video frame that detect first has been successfully decoded is as meeting decoding condition The second non-key frame.
It is 5. according to the method described in claim 1, it is characterized in that, described between described two key frames and positioned at institute The second non-key frame that search in the non-key frame after the first non-key frame meets decoding condition is stated, including:
The reference dependency information negotiated in advance with coding side is obtained, the reference dependency information includes described non-key The reference video frame identification and/or referring-to relation mark that frame is directly or indirectly referred in coding;
According to it is described with reference to dependency information between described two key frames and positioned at first non-key frame it Search meets the second non-key frame of decoding condition in non-key frame afterwards.
6. a kind of method for video coding, which is characterized in that the method includes:
When the non-key frame between two adjacent key frames encodes, the preferential of the non-key frame for needing to encode is determined Grade;
The reference video frame of the non-key frame is determined according to the priority of the non-key frame;
The non-key frame is encoded according to the reference video frame of the non-key frame, obtains the code stream of the non-key frame Data.
7. according to the method described in claim 6, it is characterized in that, described in the priority according to the non-key frame determines The reference video frame of non-key frame, including:
Between described two key frames and in other non-key frames before the non-key frame, priority is not less than Reference video frame of other non-key frames of the non-key frame as the non-key frame;
If the priority of other non-key frames before the non-key frame is below the non-key frame, by described two passes Reference video frame of the key frame as the non-key frame in key frame before the non-key frame.
8. the method described according to claim 6 or 7, which is characterized in that the reference video frame according to the non-key frame The non-key frame is encoded, including:
According to the image data of the non-key frame and the image data of the reference video frame of the non-key frame to the non-pass Key frame is encoded, and obtains the bit stream data of the non-key frame;
It is added in the bit stream data of the non-key frame by the mark of the reference video frame or with reference to dependency information, institute State with reference to dependency information include the non-key frame in coding the reference video frame identification that directly or indirectly refers to and/or Referring-to relation identifies.
9. a kind of video decoder, which is characterized in that described device includes:
Search module, for when between two key frames the first non-key frame decode failure when, positioned at described two passes The second non-key frame for meeting decoding condition is searched between key frame and in the non-key frame after first non-key frame, Second non-key frame for meeting decoding condition is without the non-key frame with reference to dependence with first non-key frame;
Acquisition module, for obtaining the reference video frame of second non-key frame that described search block search arrives, the ginseng It is that second non-key frame is determined in coding according to the priority of second non-key frame to examine video frame;
Decoder module, for utilizing the reference video frame of second non-key frame that the acquisition module obtains to described Second non-key frame is decoded.
10. device according to claim 9, which is characterized in that described search module, including:
First search unit, for the non-key frame between described two key frames and after first non-key frame It is middle to search for the non-key frame for meeting the decoding condition;
First determination unit, in the non-key frame for meeting the decoding condition that is searched in first search unit, The non-key frame nearest with the first non-key frame time-domain position is determined as second non-key frame.
11. device according to claim 9, which is characterized in that described search module, including:
First analytic unit, for sequentially to being located between described two key frames and after first non-key frame The bit stream data of non-key frame is analyzed, and the bit stream data of each non-key frame includes to state the non-key frame Reference dependency information, it is described with reference to dependency information include the non-key frame coding when directly or indirectly refer to Reference video frame identification and/or referring-to relation mark;
Judging unit judges the code stream of present analysis for the reference dependency information in the bit stream data according to present analysis The corresponding non-key frame of data whether there is with first non-key frame with reference to dependence;
Second determination unit, for will determine that out first and first non-key frame without with reference to the non-key of dependence Frame is as the second non-key frame for meeting decoding condition.
12. device according to claim 9, which is characterized in that described search module, including:
Second analytic unit, for sequentially to being located between described two key frames and after first non-key frame The bit stream data of non-key frame is analyzed, and the bit stream data of each non-key frame includes the reference video frame mark directly referred to Know;
Detection unit, after often analyzing a bit stream data, corresponding to the reference video frame identification that tests and analyzes out Whether reference video frame has been successfully decoded;
Third determination unit, for the non-key frame corresponding to first reference video frame being successfully decoded will detecting As the second non-key frame for meeting decoding condition.
13. device according to claim 9, which is characterized in that described search module, including:
Acquiring unit, it is described to refer to dependency information for obtaining the reference dependency information negotiated in advance with coding side The reference video frame identification and/or referring-to relation mark directly or indirectly referred in coding including the non-key frame;
Second search unit, for according to it is described with reference to dependency information between described two key frames and positioned at institute State the second non-key frame that search in the non-key frame after the first non-key frame meets decoding condition.
14. a kind of video coding apparatus, which is characterized in that described device includes:
First determining module, for when the non-key frame between two adjacent key frames encodes, determining to need to compile The priority of the non-key frame of code;
Second determining module, for determining the reference video frame of the non-key frame according to the priority of the non-key frame;
Coding module encodes the non-key frame for the reference video frame according to the non-key frame, obtains described The bit stream data of non-key frame.
15. device according to claim 14, which is characterized in that second determining module, in described two passes Between key frame and in other non-key frames before the non-key frame, priority is not less than its of the non-key frame His reference video frame of the non-key frame as the non-key frame;If other non-key frames before the non-key frame is preferential Grade is below the non-key frame, then using the key frame in described two key frames before the non-key frame as described in The reference video frame of non-key frame.
16. the device according to claims 14 or 15, which is characterized in that the coding module, for according to the non-pass The image data of the reference video frame of the image data of key frame and the non-key frame encodes the non-key frame, obtains The bit stream data of the non-key frame;The non-pass is added to by the mark of the reference video frame or with reference to dependency information It is described to include what the non-key frame was directly or indirectly referred in coding with reference to dependency information in the bit stream data of key frame Reference video frame identification and/or referring-to relation mark.
17. a kind of video coding and decoding system, which is characterized in that the system comprises:Video decoder and video coding apparatus;
Wherein, device of the video decoder as described in any one of described claim 9 to 13;
Device of the video coding apparatus as described in any one of described claim 14 to 16.
CN201611206456.9A 2016-12-23 2016-12-23 Video decoding, coding method, apparatus and system Pending CN108243338A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611206456.9A CN108243338A (en) 2016-12-23 2016-12-23 Video decoding, coding method, apparatus and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611206456.9A CN108243338A (en) 2016-12-23 2016-12-23 Video decoding, coding method, apparatus and system

Publications (1)

Publication Number Publication Date
CN108243338A true CN108243338A (en) 2018-07-03

Family

ID=62703464

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611206456.9A Pending CN108243338A (en) 2016-12-23 2016-12-23 Video decoding, coding method, apparatus and system

Country Status (1)

Country Link
CN (1) CN108243338A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110225348A (en) * 2019-06-24 2019-09-10 北京大米科技有限公司 Restorative procedure, device, electronic equipment and the storage medium of video data
WO2020177724A1 (en) * 2019-03-06 2020-09-10 深圳市道通智能航空技术有限公司 Encoding method, image encoder, and image transmission system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030033347A1 (en) * 2001-05-10 2003-02-13 International Business Machines Corporation Method and apparatus for inducing classifiers for multimedia based on unified representation of features reflecting disparate modalities
JP2005175662A (en) * 2003-12-09 2005-06-30 Matsushita Electric Ind Co Ltd Image coding and image generating apparatus
CN101127919A (en) * 2007-09-28 2008-02-20 中兴通讯股份有限公司 A video sequence coding method
CN101969565A (en) * 2010-10-29 2011-02-09 清华大学 Video decoding method meeting multi-viewpoint video standard
CN104702968A (en) * 2015-02-17 2015-06-10 华为技术有限公司 Frame loss method for video frame and video sending device
CN106162191A (en) * 2015-04-08 2016-11-23 杭州海康威视数字技术股份有限公司 A kind of method for video coding based on target and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030033347A1 (en) * 2001-05-10 2003-02-13 International Business Machines Corporation Method and apparatus for inducing classifiers for multimedia based on unified representation of features reflecting disparate modalities
JP2005175662A (en) * 2003-12-09 2005-06-30 Matsushita Electric Ind Co Ltd Image coding and image generating apparatus
CN101127919A (en) * 2007-09-28 2008-02-20 中兴通讯股份有限公司 A video sequence coding method
CN101969565A (en) * 2010-10-29 2011-02-09 清华大学 Video decoding method meeting multi-viewpoint video standard
CN104702968A (en) * 2015-02-17 2015-06-10 华为技术有限公司 Frame loss method for video frame and video sending device
CN106162191A (en) * 2015-04-08 2016-11-23 杭州海康威视数字技术股份有限公司 A kind of method for video coding based on target and system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020177724A1 (en) * 2019-03-06 2020-09-10 深圳市道通智能航空技术有限公司 Encoding method, image encoder, and image transmission system
US12003887B2 (en) 2019-03-06 2024-06-04 Autel Robotics Co., Ltd. Image encoding method, image encoder and image transmission system
CN110225348A (en) * 2019-06-24 2019-09-10 北京大米科技有限公司 Restorative procedure, device, electronic equipment and the storage medium of video data

Similar Documents

Publication Publication Date Title
KR101477315B1 (en) Mechanisms to conceal real time video artifacts caused by frame loss
US7231587B2 (en) Embedded picture PSNR/CRC data in compressed video bitstream
Balasubramaniyan et al. Pindr0p: Using single-ended audio features to determine call provenance
CN100499824C (en) Methods and systems for preventing start code emulation at locations that include non-byte aligned and/or bit-shifted positions
KR20040035778A (en) Encoder redundancy selection system and method
US9277208B2 (en) System and method for estimating quality of video with frame freezing artifacts
WO2012006171A2 (en) Systems and methods for detecting call provenance from call audio
JP4789212B2 (en) Video quality evaluation method and apparatus
KR100914170B1 (en) Packet transmission method with packet retransmission requests and a control mechanism relating to the transmission of such requests
Xu et al. Detection of double MPEG-2 compression based on distributions of DCT coefficients
CN101207823A (en) Method for video encoding of video frequency corresponding synthesis anti-code error
CN106534871B (en) The coding method of Video Codec and coding/decoding method
CN108243338A (en) Video decoding, coding method, apparatus and system
CN109412755A (en) A kind of multimedia data processing method, device and storage medium
CN110191342A (en) Method for video coding and equipment, video encoding/decoding method and equipment
CN111263184B (en) Method, device and equipment for detecting coding and decoding consistency
CN101540901B (en) Method and device for coding/decoding
CN1774883B (en) Media encoded data transmission method, apparatus and program
CN101662680A (en) Method, device and system for measuring video flow performance
US20140119445A1 (en) Method of concealing picture header errors in digital video decoding
US8392803B2 (en) Method and device for identifying video data losses
JPWO2008123125A1 (en) Image quality evaluation system, method and program
WO2008106465A1 (en) Method and apparatus for automatic detection and identification of unidentified video signals
US20050163275A1 (en) Stream decoding system
JP2002016917A (en) Time data decoding method of time-varying image

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20180703

RJ01 Rejection of invention patent application after publication