CN108184126A - Video coding and coding/decoding method, the encoder and decoder of snapshot image - Google Patents

Video coding and coding/decoding method, the encoder and decoder of snapshot image Download PDF

Info

Publication number
CN108184126A
CN108184126A CN201711448310.XA CN201711448310A CN108184126A CN 108184126 A CN108184126 A CN 108184126A CN 201711448310 A CN201711448310 A CN 201711448310A CN 108184126 A CN108184126 A CN 108184126A
Authority
CN
China
Prior art keywords
frame
reference frame
frames
video data
encoded
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
CN201711448310.XA
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.)
Shengdi Wisdom Technology Co Ltd
Original Assignee
Shengdi Wisdom 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 Shengdi Wisdom Technology Co Ltd filed Critical Shengdi Wisdom Technology Co Ltd
Priority to CN201711448310.XA priority Critical patent/CN108184126A/en
Publication of CN108184126A publication Critical patent/CN108184126A/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/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/573Motion compensation with multiple frame prediction using two or more reference frames in a given prediction direction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/577Motion compensation with bidirectional frame interpolation, i.e. using B-pictures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/58Motion compensation with long-term prediction, i.e. the reference frame for a current frame not being the temporally closest one

Landscapes

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

Abstract

The invention discloses Video coding and coding/decoding method, the encoders and decoder of a kind of snapshot image, belong to video technique field, the method includes:According to preset frame period, every described one reference frame of frame period label in video requency frame data, video data to be encoded, wherein frame of the reference frame where snapshot image are generated, has at least one reference frame between two adjacent I frames;Each object reference frame in encoded video data is treated, is encoded according to the previous reference frame of each object reference frame and/or previous I frames, generates target code video data.The ratio of I frames in video requency frame data can be reduced in this way, and then reduces the data volume of coded compressed data, convenient for the compression and transmission of video data.Meanwhile the formation efficiency of snapshot image is improved, decoding pressure is reduced, has saved decoding resource.

Description

Video coding and coding/decoding method, the encoder and decoder of snapshot image
Technical field
The present embodiments relate to the Video codings and decoding side of video technique field more particularly to a kind of snapshot image Method, encoder and decoder.
Background technology
The original data volume of digital video is bigger, we use to reduce data volume to facilitate through network transmission Various video coding algorithms, the purpose is under conditions of video pictures quality is kept as possible, compress its data volume as far as possible.
H.264/MPEG-4 coding and decoding video algorithm popular at present, the video requency frame data for encoding generation are divided into I frames With P frames.In decoding end, decoding software must be decoded since I frames, then could decode subsequent P frames successively in sequence.By Adjacent I frames or decoded P frames are needed to refer in front of it when common P frames are in decoding, that is to say, that if decoding journey Sequence needs to decode a certain frame image, it is necessary to decode, then decode successively in order, directly the nearest I frame in front of it To being decoded to the frame specified.
It can be seen from the above, when needing to obtain the snapshot image of certain video file, the prior art is needed from the snapshot image Previous I frames start to decode, then successively decode I frames after P frames, until decode until the snapshot image, decoding speed Slowly, and waste computer resource.
Invention content
The embodiment of the present invention provides a kind of Video coding and coding/decoding method of snapshot image, encoder and decoder, with solution Certainly prior art decoding speed is slow, and the problem of waste computer resource.
In a first aspect, the embodiment of the present invention provides a kind of method for video coding of snapshot image, including:
According to preset frame period, every described one reference frame of frame period label in video requency frame data, generate and wait to compile Code video data, wherein frame of the reference frame where snapshot image, the video data to be encoded include at least one I Frame has at least one reference frame between adjacent two I frames;
To each object reference frame in the video data to be encoded, according to the previous ginseng of each object reference frame It examines frame and/or previous I frames is encoded, generate target code video data.
It is described according to preset frame period in a kind of possible realization method of first aspect, in video requency frame data Every described one reference frame of frame period label, before generating video data to be encoded, the method further includes:
It receives user instructions, the user instruction includes the frame period.
In the alternatively possible realization method of first aspect, interval between the I frames and adjacent reference frame etc. In the frame period, the I frames are the frame where the snapshot image.
In the alternatively possible realization method of first aspect, each target in the video data to be encoded is joined Frame is examined, is encoded according to the previous reference frame of each object reference frame and/or previous I frames, generates target code video Data specifically include
For each object reference frame in the video data to be encoded, when the previous frame of the object reference frame When the frame at interval is I frames, the object reference frame is encoded by reference of the I frames;
When the frame of the previous frame period of the object reference frame is reference frame, using the reference frame as with reference to institute Object reference frame is stated to be encoded.
Second aspect, the embodiment of the present invention provide a kind of video encoding/decoding method of snapshot image, including:
Target code video data is received, wherein, the target code video data is fast according to first aspect It is generated according to the method for video coding of image;
Each reference frame in the target code video data and each I frames are cached, abandons the target code video data In P frames and/or B frames;
To each object reference frame of caching, according to the previous reference frame of each object reference frame and/or previous I frames Each object reference frame is decoded, obtains snapshot image.
In a kind of possible realization method of second aspect, each object reference frame of described pair of caching, according to each The previous reference frame of the object reference frame and/or previous I frames are decoded each object reference frame, obtain snapshot plotting Picture specifically includes:
For each object reference frame of caching, when the former frame of the object reference frame is reference frame, reference has solved The reference frame of code decodes the object reference frame, obtains snapshot image;
When the former frame of the object reference frame is I frames, the object reference is decoded with reference to the decoded I frames Frame obtains snapshot image.
In the alternatively possible realization method of second aspect, interval between the I frames and adjacent reference frame etc. In the frame period, the I frames are the frame where the snapshot image.
In the alternatively possible realization method of second aspect, the method further includes:
Each I frames are decoded, obtain the snapshot image.
The third aspect, the embodiment of the present invention provide a kind of encoder, including:
Generation module, for according to preset frame period, joining in video requency frame data every the frame period label one Frame is examined, generates video data to be encoded, wherein frame of the reference frame where snapshot image, the video data packet to be encoded At least one I frames are included, have at least one reference frame between adjacent two I frames;
Coding module, for each object reference frame in the video data to be encoded, according to each target The previous reference frame of reference frame and/or previous I frames are encoded, and generate target code video data.
In a kind of possible realization method of the third aspect, the encoder further includes:
Receiving module, for receiving user instructions, the user instruction includes the frame period.
In the alternatively possible realization method of the third aspect, interval between the I frames and adjacent reference frame etc. In the frame period, the I frames are the frame where the snapshot image.
In the alternatively possible realization method of the third aspect, the coding module, specifically for waiting to compile for described Each object reference frame in code video data, when the frame of the previous frame period of the object reference frame is I frames, with institute It is that reference encodes the object reference frame to state I frames;When the frame of the previous frame period of the object reference frame is ginseng When examining frame, the object reference frame is encoded by reference of the reference frame.
Fourth aspect, the embodiment of the present invention provide a kind of decoder, including:
Receiving module, for receiving target code video data, wherein, the target code video data is according to first The method for video coding of snapshot image described in aspect is generated;
Cache module for caching each reference frame and each I frames in the target code video data, abandons the target P frames and/or B frames in encoded video data;
Decoder module, for each object reference frame to caching, according to the previous reference of each object reference frame Frame and/or previous I frames are decoded each object reference frame, obtain snapshot image.
In a kind of possible realization method of fourth aspect, the decoder module, particularly for each target of caching When the former frame of the object reference frame is reference frame, the mesh is decoded with reference to the decoded reference frame for reference frame Reference frame is marked, obtains snapshot image;When the former frame of the object reference frame is I frames, solved with reference to the decoded I frames The code object reference frame, obtains snapshot image.
In the alternatively possible realization method of fourth aspect, interval between the I frames and adjacent reference frame etc. In the frame period, the I frames are the frame where the snapshot image.
In the alternatively possible realization method of fourth aspect, the decoder module is additionally operable to carry out each I frames Decoding, obtains the snapshot image.
The embodiment of the present invention has the beneficial effect that:
In embodiments of the present invention, according to preset frame period, every the frame period label one in video requency frame data A reference frame generates video data to be encoded, and wherein frame of the reference frame where snapshot image, video data to be encoded is included extremely Lack an I frame, have at least one reference frame between adjacent two I frames, and treat the ginseng of each target in encoded video data Frame is examined, is encoded according to the previous reference frame of each object reference frame and/or previous I frames, generates target code video data. That is the present embodiment, by setting multiple reference frames in video requency frame data, using reference frame instead of I frames come according to first aspect institute The method for video coding for the snapshot image stated generates snapshot image, can reduce the ratio of I frames in video requency frame data in this way, into And the data volume of coded compressed data is reduced, convenient for the compression and transmission of video data.Meanwhile reference frame is set as snapshot plotting As the frame at place, in this way in decoding, snapshot image can be generated by directly decoding the reference frame, improve the generation of snapshot image Efficiency reduces decoding pressure, has saved decoding resource.
Description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, to embodiment or will show below There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is this hair Some bright embodiments, for those of ordinary skill in the art, without having to pay creative labor, can be with Other attached drawings are obtained according to these attached drawings.
Fig. 1 is the I frames of existing Video coding and P frame schematic diagrames;
Fig. 2 is the flow chart of the method for video coding of snapshot image that the embodiment of the present invention one provides;
Fig. 3 a-3c are the distribution schematic diagram of I frames, P frames and reference frame in the embodiment of the present invention one;
Fig. 4 is the flow chart of the method for video coding of snapshot image provided by Embodiment 2 of the present invention;
Fig. 5 is the flow chart of the video encoding/decoding method of snapshot image that the embodiment of the present invention one provides;
Fig. 6 is the flow chart of the video encoding/decoding method of snapshot image provided by Embodiment 2 of the present invention;
Fig. 7 is the structure diagram of encoder that the embodiment of the present invention one provides;
Fig. 8 is the structure diagram of encoder provided by Embodiment 2 of the present invention;
Fig. 9 is the structure diagram of decoder provided in an embodiment of the present invention.
Specific embodiment
Purpose, technical scheme and advantage to make the embodiment of the present invention are clearer, below in conjunction with the embodiment of the present invention In attached drawing, the technical solution in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is Part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art All other embodiments obtained without creative efforts shall fall within the protection scope of the present invention.
Fig. 1 is the I frames of existing Video coding and P frame schematic diagrames, as shown in Figure 1, dividing first video requency frame data Group, the video frame in each group are arranged to I frames and P frames, and then I frames and P frames are encoded using existing coding method. In decoding, since I frames, subsequent P frames are decoded successively, generate each video image.When needing to generate the fast of the video data It during according to image, needs since the previous I frames of frame where the snapshot image, decodes the P frames behind I frames successively, until decoding is extremely Until frame where the snapshot image, not only decoding speed is slow in this way, and wastes decoding resource.
The method of the embodiment of the present invention, by setting multiple reference frames in video requency frame data, which is snapshot Frame where image, when needing to generate the snapshot image of the video data in this way, it is only necessary to decode the reference frame, and then drop The low data volume of encoding and decoding, improves the speed of encoding and decoding, and saved resource.
Simultaneously as I frames are basic reference frame, data volume is generally bigger, close to the compressed picture of a width still image Size.And Vector Message of the P frames due to only including the movement of each block of pixels, data volume very little, only the tens of I frames/ Several or even a few percent.The present embodiment marks snapshot image by setting multiple reference frames, using reference frame instead of I frames, subtracts The quantity of I frames in few video data, that is, reduce the ratio of I frames, improve the ratio of P frames, thereby reduce coded compressed data The data volume of packet, convenient for the transmission of video data.
It should be noted that " first ", " second " in the present embodiment etc. is only intended to mark action, do not indicate that any suitable Order relation.
Technical scheme of the present invention is described in detail with specifically embodiment below.These specific implementations below Example can be combined with each other, and the same or similar concept or process may be repeated no more in some embodiments.
Fig. 2 is the flow chart of the method for video coding of snapshot image that the embodiment of the present invention one provides, and Fig. 3 a-3c are this hair The distribution schematic diagram of I frames, P frames and reference frame in bright embodiment one.As shown in Fig. 2 and Fig. 3 a-3c, the method for the present embodiment can be with Including:
S101, according to preset frame period, every described one reference frame of frame period label, generation in video requency frame data Video data to be encoded, wherein frame of the reference frame where snapshot image, the video data to be encoded include at least one A I frames have at least one reference frame between adjacent two I frames.
The executive agent of the present embodiment is encoder, which can pass through the mode of software, hardware or soft or hard combination It realizes.The encoder can be the part in individual equipment or electronic equipment, e.g. the place in electronic equipment Manage device.
Wherein, electronic equipment can be mobile phone, tablet computer, desktop computer, host computer etc..
For the ease of extracting the snapshot image of video data, then the encoder of the present embodiment obtains generation snapshot image first Frame period, such as every 10 frames generate a snapshot image.It should be noted that the specific root of generation frame period of snapshot image It is determined according to actual needs, the present embodiment is without limitation.
In a kind of possible realization method of the present embodiment, in step S101:According to preset frame period, in video frame Every described one reference frame of frame period label in data, before generating video data to be encoded, the method for the present embodiment may be used also To include:
It receives user instructions, the user instruction includes the frame period.
Specifically, after user determines the generation frame period of snapshot image according to actual needs, which is carried It is sent to encoder in user instruction, such as user's input frame space-number on the encoder, after encoder receives user instruction, The user instruction is parsed, obtains the frame period of its carrying.
Then, encoder marks multiple reference frames, for example, when interframe is divided into 6 frames according to frame period in video requency frame data When, i.e., user it is expected to generate a snapshot image every 6 frames, and encoder is every 6 frame flag, one reference frame, these references at this time Frame is the frame where the snapshot image of video data.Specifically, as shown in Figure 3a, every 6 frame flags in video data frame One reference frame RP.
In order to realize with the same decoding speed of the application, as shown in Figure 1, the prior art can be every 6 frame flag, one I Frame, and frame of the I frames where snapshot image.As shown in figs 3 a-3 c, the present embodiment sets reference frame RP in video data frame, Reference frame RP is the frame where snapshot image.Since the data volume of reference frame RP is far smaller than the data volume of I frames, this sample is implemented The method of example compared with prior art, marks snapshot image instead of I frames using reference frame, can substantially reduce compression to be encoded The data volume of data, convenient for the compression and transmission of video data.
S102, to each object reference frame in the video data to be encoded, according to each object reference frame Previous reference frame and/or previous I frames are encoded, and generate target code video data.
It optionally, can also be in video data in the present embodiment other than above-mentioned reference frame is set in video requency frame data Set I frames and P frames that I frames and B frames or setting I frames, P frames and B frames are either set in frame, the present embodiment is without limitation, It is set with specific reference to actual needs.
Wherein I frames are intracoded frame, i.e., the correlation in frame is only considered when encoding the frame, does not utilize other frames Information.
In Video coding, if the frame of the frame of front as reference, which is only utilized, during coding is known as P frames.
In Video coding, if being known as B frames using the frame of the frame and subsequent frames of front as reference simultaneously.
After generating target code video data according to the above method, target code video data is encoded, wherein to I The coding mode of frame, P frames or B frames can be realized using existing coding mode, for example, using H.261, H.263, the volumes such as H.264 Code standard is encoded.
Wherein, as shown in figs 3 a-3 c, using each reference frame in video data to be encoded as object reference frame, each The coding mode of object reference frame is identical with the coding mode of P frames, but using previous reference frame as with reference to being encoded or It is encoded by reference of previous I frames.
Specifically, as shown in Figure 3a, reference frame RP2 is referred to previous reference frame RP1 and is encoded.Optionally, such as Shown in Fig. 3 b, reference frame RP2 is encoded referring also to previous I frames, is encoded with specific reference to actual needs.Optionally, such as Shown in Fig. 3 c, reference frame RP2 can also be encoded referring concurrently to previous I frames and previous reference frame RP1.
In this way, when decoding target code video data, object reference frame with reference to previous decoded reference frame and/or Decoded I frames are decoded, and do not need to be decoded the P frames in target code video data and/or B frames, and then are realized Quickly generating for snapshot image, and reduce decoding pressure.
The method for video coding of snapshot image provided in an embodiment of the present invention, according to preset frame period, in video frame number Every described one reference frame of frame period label in, video data to be encoded is generated, wherein reference frame is where snapshot image Frame, video data to be encoded includes at least one I frames, has at least one reference frame, and to be encoded between two adjacent I frames Each object reference frame in video data, is compiled according to the previous reference frame of each object reference frame and/or previous I frames Code generates target code video data.That is the present embodiment by setting multiple reference frames in video requency frame data, uses reference Frame marks snapshot image instead of I frames, can reduce the ratio of I frames in video requency frame data in this way, and then reduces coding compression number According to data volume, convenient for the compression and transmission of video data.Meanwhile reference frame is set as to the frame where snapshot image, in this way In decoding, snapshot image can be generated by directly decoding the reference frame, improve the formation efficiency of snapshot image, reduce decoding Pressure has saved decoding resource.
Fig. 4 is the flow chart of the method for video coding of snapshot image provided by Embodiment 2 of the present invention, in above-described embodiment On the basis of, the present embodiment is referred to each object reference frame in the video data to be encoded, according to each described The previous reference frame of object reference frame and/or previous I frames are encoded, and generate the detailed process of target code video data.Such as Shown in Fig. 4, above-mentioned steps S102 can specifically include:
S201, for each object reference frame in the video data to be encoded, it is previous when the object reference frame When the frame of the frame period is I frames, the object reference frame is encoded by reference of the I frames.
In the present embodiment, the distance between the I frames and adjacent reference frame are equal to the frame period.
In this way, above-mentioned steps S102:To each object reference frame in the video data to be encoded, according to each described The previous reference frame of object reference frame and/or previous I frames are encoded, and generation target code video data can specifically include:
For each object reference frame in the video data to be encoded, first determine whether previous apart from the object reference frame The frame of a frame period is I frames also with reference to frame, when the frame of the previous frame period of the object reference frame is I frames, then with the I frames For reference, which is encoded.
For example, as shown in Figure 3a, the frame of the previous frame period of reference frame RP1 is I frames, at this point, reference frame RP1 is being encoded When, it is referred to the I frames and is encoded, the P frames with front are without reference to relationship.
In this way in decoding, reference frame RP1 is also decoded by reference of the I frames, and the I frames and reference frame RP1 Between other P frames can not decode, thereby reduce decoding pressure, quickly generate snapshot image.
S202, when the object reference frame the previous frame period frame be reference frame when, using the reference frame for join It is encoded according to the object reference frame.
When judging the frame of previous frame period of the object reference frame for reference frame, coding when, the object reference frame with The reference frame is that reference is encoded.
For example, with continued reference to shown in Fig. 3 a, the frame of the previous frame period of reference frame RP2 is reference frame RP1, at this point, the ginseng Frame RP2 is examined in coding, reference frame RP1 is referred to and is encoded, the P frames with front are without reference to relationship.
In this way in decoding, reference frame RP2 also using reference frame RP1 be with reference to being decoded, and reference frame RP1 and Other P frames between reference frame RP2 can not decode, and thereby reduce decoding pressure, quickly generate snapshot image.
Optionally, in the present embodiment, the distance between I frames and reference frame are above-mentioned frame period, can set the I frames Into the frame where snapshot image, in this way in decoding, it is only necessary to which I frames and reference frame are decoded, you can generation video data Each snapshot image, entire codec data amount is small, has saved the resource of encoder.
Further, when the frame period for generating snapshot image is identical, as shown in figs 3 a-3 c, the present embodiment passes through in phase Multiple reference frames are set between two adjacent I frames, I frames and reference frame are all provided with being set to the frame where snapshot image, this with shown in Fig. 1 The prior art each I frames be arranged to the method for frame where snapshot image compare, the present embodiment greatly reduces the number of I frames Amount, reduces the ratio of I frames, has correspondingly improved the ratio of P frames, and then reduce amount of coded data, regarded convenient for compressed The transmission of frequency evidence.
The method for video coding of snapshot image provided in an embodiment of the present invention, for each mesh in video data to be encoded Reference frame is marked, the frame for judging the previous frame period of object reference frame is I frames also with reference to frame, when the former frame of the object reference frame When the frame at interval is I frames, the object reference frame is encoded by reference of the I frames;When the previous interframe of the object reference frame Every frame be reference frame when, be with reference to being encoded to the object reference frame using the reference frame, and then realization is to each reference frame Accurate coding, in this way in decoding, each reference frame is decoded with reference to the I frames before it or reference frame, is thereby reduced decoded Data volume has saved decoding resource.
Fig. 5 is the flow chart of the video encoding/decoding method of snapshot image that the embodiment of the present invention one provides, as shown in figure 5, this The coding/decoding method of embodiment can include:
S301, target code video data is received.
The present embodiment refers to what the target code video data after being encoded to above-described embodiment encoder was decoded Process, wherein, reference frame is the frame where snapshot image, and the video data to be encoded includes at least one I frames, described adjacent Two I frames between have at least one reference frame.
The executive agent of the present embodiment is decoder, which can pass through the mode of software, hardware or soft or hard combination It realizes.The decoder can be the part in individual equipment or electronic equipment, e.g. the place in electronic equipment Manage device.
Wherein, electronic equipment can be mobile phone, tablet computer, desktop computer, host computer etc..
In actual use, decoder receives target code video data, which is to be encoded Each object reference frame in video data is carried out according to the previous reference frame of each object reference frame and/or previous I frames Coding generation.And the video data to be encoded is according to preset frame period, every the frame period in video requency frame data One reference frame of label and generate, detailed process with reference to above-described embodiment description, details are not described herein for the present embodiment.
S302, each reference frame in the caching target code video data and each I frames, abandon the target code video P frames and/or B frames in data.
In the present embodiment, target code video data is other than including each reference frame, further include at least one I frames and Multiple P frames or B frames, wherein, there is at least one reference frame between two adjacent I frames.
It can be seen from the above, frame of each reference frame where snapshot image, and in coding, subsequent reference frame is with previous Reference frame and/or previous I frames are that reference is encoded, can in this way in the snapshot image for generating target code video data To cache each reference frame and each I frames, and the P frames in target code video data or B frames are discarded, thereby reduce caching Data volume has saved decoding resource.
S303, each object reference frame for caching, according to the previous reference frame of each object reference frame and/or Previous I frames are decoded each object reference frame, obtain snapshot image.
In decoding, decoder is decoded each object reference frame of caching one by one, specifically, as shown in Figure 3a, if Object reference frame is using previous reference frame as with reference to being encoded, then in decoding, decoder is with the previous ginseng of the object reference frame It is that reference is decoded the object reference frame to examine frame, obtains the corresponding snapshot image of object reference frame.
Optionally, as shown in Figure 3b, if object reference frame is using previous I frames as with reference to the coding carried out, in decoding, solution Code device is decoded the object reference frame by reference of the previous I frames of the object reference frame, obtains object reference frame correspondence Snapshot image.
Optionally, as shown in Figure 3c, if object reference frame is using previous I frames and previous reference frame as the coding with reference to progress, Then in decoding, decoder is carried out using the previous I frames of the object reference frame and previous reference frame as with reference to the object reference frame Decoding, obtains the corresponding snapshot image of object reference frame.
In a kind of possible realization method of the present embodiment, when the distance between I frames and adjacent reference frame are equal to frame Interval, and during frame of the I frames where the snapshot image, the present embodiment further includes:
S304, each I frames are decoded, obtain the snapshot image.
With continued reference to shown in Fig. 3 a, in the present embodiment, when the interval between I frames and reference frame RP1 be equal to reference frame RP1 with The frame period (i.e. 6 frames) of reference frame RP2, and during frame of the setting I frames where snapshot image, decoder is receiving target code After video data, other than caching each reference frame, each I frames are also cached.Then, in decoding, decoder is to each reference frame and each I Frame is decoded, and then obtains each snapshot image of video data.Wherein, I frames need not refer to other frames in decoding, can To be directly decoded.
The video encoding/decoding method of snapshot image provided in an embodiment of the present invention, by receiving target code video data, and Each reference frame in the target code video data and each I frames are cached, abandons the P frames in the target code video data And/or B frames, to each object reference frame of caching, according to the previous reference frame of each object reference frame and/or previous I Frame is decoded each object reference frame, obtains snapshot image.That is the coding/decoding method of the present embodiment, reference frame are snapshot Therefore frame where image, caches and decodes each reference frame, you can obtain each snapshot image of video data, thereby reduce The decoding data amount of decoder, improves decoding speed, has saved the decoding resource of decoder.
Fig. 6 is the flow chart of the video encoding/decoding method of snapshot image provided by Embodiment 2 of the present invention, in above-described embodiment On the basis of, the present embodiment refers to each object reference frame of the decoder to caching, according to each object reference frame Previous reference frame and/or previous I frames each object reference frame is decoded, obtain the detailed process of snapshot image. As shown in fig. 6, above-mentioned steps S303 can specifically include:
S401, each object reference frame for caching, when the former frame of the object reference frame is reference frame, reference The decoded reference frame decodes the object reference frame, obtains snapshot image.
With reference to above-mentioned encoding embodiments it is found that in coding, when the previous frame period of object reference frame is reference frame, with The reference frame is that reference encodes the object reference frame.
Corresponding, in decoding, decoder first caches the reference frame, and the reference frame is decoded, and then caching should Object reference frame, and decode the object reference frame, and then obtain snapshot image with reference to decoded reference frame.
S402, when the object reference frame former frame be I frames when, decode the mesh with reference to the decoded I frames Reference frame is marked, obtains snapshot image.
Similarly, in coding, when the previous frame period of object reference frame is I frames, join using the I frames as with reference to the target Frame is examined to be encoded.
Corresponding, in decoding, decoder first caches the I frames, and the I frames are decoded, and then caches target ginseng Examine frame, and decode the object reference frame, and then obtain snapshot image with reference to decoded I frames.
For example, with continued reference to shown in Fig. 3 a, since RP1 frames are with reference to being encoded, in this way using I frames before In decoding, decoder is first decoded I frames, then using decoded I frames as with reference to being decoded to RP1 frames, obtains fast According to image.RP2 frames are with reference to being encoded using RP1 frames before, and in this way in decoding, decoder first carries out RP1 frames Decoding then using decoded RP1 frames as with reference to being decoded to RP2 frames, obtains another snapshot image, entire decoding process In, it needs decoded data volume less, reduces the decoding pressure of decoder, improve decoding speed, saved computer Decode resource.
I.e. in the present embodiment, when being decoded each reference frame, first determine whether to cache the former frame of each object reference frame It is that I frames are decoded each object reference frame also with reference to frame, and then using different decoding processes, obtains the fast of video data According to image.
The video encoding/decoding method of snapshot image provided in an embodiment of the present invention, by each object reference frame for judging caching Former frame is I frames also with reference to frame, when the former frame of object reference frame is reference frame, is decoded with reference to decoded reference frame The object reference frame obtains snapshot image, and when the former frame of object reference frame is I frames, this is decoded with reference to decoded I frames Object reference frame obtains snapshot image, and then realizes the quick and precisely decoding to reference frame, improves the generation speed of snapshot image Degree, improves user experience.
Fig. 7 is the structure diagram of encoder that the embodiment of the present invention one provides, which can be arranged on arbitrary end In the processor of end equipment, which can realize in a manner that software, hardware or soft/scleroma are closed.As shown in fig. 7, The encoder 100 of the present embodiment can include:
Generation module 110, for according to preset frame period, every the frame period label one in video requency frame data Reference frame generates video data to be encoded, wherein frame of the reference frame where snapshot image, the video data to be encoded Including at least one I frames, there is at least one reference frame between adjacent two I frames;
Coding module 120, for each object reference frame in the video data to be encoded, according to each mesh The previous reference frame and/or previous I frames for marking reference frame are encoded, and generate target code video data.
Fig. 8 is the structure diagram of encoder provided by Embodiment 2 of the present invention.On the basis of above-described embodiment, this reality The encoder 100 for applying example further includes:
Receiving module 130, for receiving user instructions, the user instruction includes the frame period.
In a kind of possible realization method of the present embodiment, the distance between the I frames and adjacent reference frame are equal to The frame period, the I frames are the frame where the snapshot image.
In the alternatively possible realization method of the present embodiment, above-mentioned coding module 120, specifically for being treated for described Each object reference frame in encoded video data, when the frame of the previous frame period of the object reference frame is I frames, with The I frames are that reference encodes the object reference frame;When the frame of the previous frame period of the object reference frame is During reference frame, the object reference frame is encoded by reference of the reference frame.
It should be noted that:The encoder that above-described embodiment provides is in the Video coding processing for carrying out snapshot image, only With the division progress of above-mentioned each function module for example, in practical application, can as needed and by above-mentioned function distribution by Different function modules is completed, i.e., the internal structure of device is divided into different function modules, described above complete to complete Portion or partial function.In addition, encoder and the method for video coding embodiment of snapshot image that above-described embodiment provides belong to Same design, specific implementation process refer to embodiment of the method, and which is not described herein again.
Fig. 9 is the structure diagram of decoder provided in an embodiment of the present invention, which can be arranged on arbitrary terminal In the processor of equipment, which can realize in a manner that software, hardware or soft/scleroma are closed.As shown in figure 9, this The decoder 200 of embodiment can include:
Receiving module 210, for receiving target code video data, wherein, the target code video data is treats Each object reference frame in encoded video data, according to the previous reference frame of each object reference frame and/or previous I frames Coding generation is carried out, the video data to be encoded is according to preset frame period, every the frame in video requency frame data One reference frame of spaced markings and generate, the reference frame be snapshot image where frame, the video data packet to be encoded At least one I frames are included, have at least one reference frame between two adjacent I frames;
Cache module 220, for caching each reference frame and each I frames in the target code video data, described in discarding P frames and/or B frames in target code video data;
Decoder module 230, for each object reference frame to caching, according to the previous ginseng of each object reference frame It examines frame and/or previous I frames to be decoded each object reference frame, obtains snapshot image.
In a kind of possible realization method of the present embodiment, above-mentioned decoder module 230, specifically for for the every of caching A object reference frame when the former frame of the object reference frame is reference frame, is decoded with reference to the decoded reference frame The object reference frame obtains snapshot image;When the former frame of the object reference frame is I frames, with reference to the decoded I Frame decodes the object reference frame, obtains snapshot image.
In the alternatively possible realization method of the present embodiment, the distance between described I frames and adjacent reference frame etc. In the frame period, the I frames are the frame where the snapshot image.
In the alternatively possible realization method of the present embodiment,
The decoder module 230 is additionally operable to be decoded each I frames, obtains the snapshot image.
It should be noted that:The decoder that above-described embodiment provides is in the video decoding process for carrying out snapshot image, only With the division progress of above-mentioned each function module for example, in practical application, can as needed and by above-mentioned function distribution by Different function modules is completed, i.e., the internal structure of device is divided into different function modules, described above complete to complete Portion or partial function.In addition, decoder and the video encoding/decoding method embodiment of snapshot image that above-described embodiment provides belong to Same design, specific implementation process refer to embodiment of the method, and which is not described herein again.
Finally it should be noted that:The above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;To the greatest extent Pipe is described in detail the present invention with reference to foregoing embodiments, it will be understood by those of ordinary skill in the art that:Its according to Can so modify to the technical solution recorded in foregoing embodiments either to which part or all technical features into Row equivalent replacement;And these modifications or replacement, various embodiments of the present invention technology that it does not separate the essence of the corresponding technical solution The range of scheme.

Claims (10)

1. a kind of method for video coding of snapshot image, which is characterized in that including:
According to preset frame period, every described one reference frame of frame period label in video requency frame data, generation is to be encoded to be regarded Frequency evidence, wherein frame of the reference frame where snapshot image, the video data to be encoded include at least one I frames, phase There is at least one reference frame between two adjacent I frames;
To each object reference frame in the video data to be encoded, according to the previous reference frame of each object reference frame And/or previous I frames are encoded, and generate target code video data.
2. according to the method described in claim 1, it is characterized in that, described according to preset frame period, in video requency frame data Every described one reference frame of frame period label, before generating video data to be encoded, the method further includes:
It receives user instructions, the user instruction includes the frame period.
3. method according to claim 1 or 2, which is characterized in that interval between the I frames and adjacent reference frame etc. In the frame period, the I frames are the frame where the snapshot image.
4. according to the method described in claim 3, it is characterized in that, each target in the video data to be encoded Reference frame is encoded according to the previous reference frame of each object reference frame and/or previous I frames, and generation target code regards Frequency evidence, specifically includes:
For each object reference frame in the video data to be encoded, when the previous frame period of the object reference frame Frame be I frames when, using the I frames for reference the object reference frame is encoded;
When the frame of the previous frame period of the object reference frame is reference frame, using the reference frame as with reference to the mesh Mark reference frame is encoded.
5. a kind of video encoding/decoding method of snapshot image, which is characterized in that including:
Target code video data is received, wherein, the target code video data is according to the snapshot described in claim 1 The method for video coding of image is generated;
Each reference frame in the target code video data and each I frames are cached, abandons the P in the target code video data Frame and/or B frames;
To each object reference frame of caching, according to the previous reference frame of each object reference frame and/or previous I frames to every A object reference frame is decoded, and obtains snapshot image.
6. according to the method described in claim 5, it is characterized in that, described pair caching each object reference frame, according to each The previous reference frame of the object reference frame and/or previous I frames are decoded each object reference frame, obtain snapshot plotting Picture specifically includes:
For each object reference frame of caching, when the former frame of the object reference frame is reference frame, with reference to decoded The reference frame decodes the object reference frame, obtains snapshot image;
When the former frame of the object reference frame is I frames, the object reference frame is decoded with reference to the decoded I frames, Obtain snapshot image.
7. method according to claim 5 or 6, which is characterized in that interval between the I frames and adjacent reference frame etc. In the frame period, the I frames are the frame where the snapshot image.
8. the method according to the description of claim 7 is characterized in that the method further includes:
Each I frames are decoded, obtain the snapshot image.
9. a kind of encoder, which is characterized in that including:
Generation module, for according to preset frame period, every described one reference frame of frame period label in video requency frame data, Video data to be encoded is generated, wherein frame of the reference frame where the snapshot image, the video data packet to be encoded At least one I frames are included, have at least one reference frame between adjacent two I frames;
Coding module, for each object reference frame in the video data to be encoded, according to each object reference The previous reference frame of frame and/or previous I frames are encoded, and generate target code video data.
10. a kind of decoder, which is characterized in that including:
Receiving module, for receiving target code video data, wherein, the target code video data is according to claim The method for video coding of snapshot image described in 1 is generated;
Cache module for caching each reference frame and each I frames in the target code video data, abandons the target code P frames and/or B frames in video data;
Decoder module, for each object reference frame for caching, according to the previous reference frame of each object reference frame And/or previous I frames are decoded each object reference frame, obtain snapshot image.
CN201711448310.XA 2017-12-27 2017-12-27 Video coding and coding/decoding method, the encoder and decoder of snapshot image Pending CN108184126A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711448310.XA CN108184126A (en) 2017-12-27 2017-12-27 Video coding and coding/decoding method, the encoder and decoder of snapshot image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711448310.XA CN108184126A (en) 2017-12-27 2017-12-27 Video coding and coding/decoding method, the encoder and decoder of snapshot image

Publications (1)

Publication Number Publication Date
CN108184126A true CN108184126A (en) 2018-06-19

Family

ID=62547729

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711448310.XA Pending CN108184126A (en) 2017-12-27 2017-12-27 Video coding and coding/decoding method, the encoder and decoder of snapshot image

Country Status (1)

Country Link
CN (1) CN108184126A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111629262A (en) * 2020-05-08 2020-09-04 Oppo广东移动通信有限公司 Video image processing method and device, electronic equipment and storage medium
CN112351278A (en) * 2020-11-04 2021-02-09 北京金山云网络技术有限公司 Video encoding method and device and video decoding method and device
CN114554220A (en) * 2022-01-13 2022-05-27 北京信息科技大学 Method for over-limit compression and decoding of fixed scene video based on abstract features

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1744553A1 (en) * 2004-03-15 2007-01-17 Sharp Kabushiki Kaisha Recording/reproduction/edition device
CN101237587A (en) * 2007-02-02 2008-08-06 中兴通讯股份有限公司 A video sequence coding method and its error control system
CN101300840A (en) * 2005-11-04 2008-11-05 微软公司 Multi-view video delivery
CN104618794A (en) * 2014-04-29 2015-05-13 腾讯科技(北京)有限公司 Method and device for playing video
CN106469208A (en) * 2016-08-31 2017-03-01 浙江宇视科技有限公司 A kind of temperature diagram data processing method, temperature diagram data search method and device
CN106791870A (en) * 2016-11-30 2017-05-31 华为技术有限公司 A kind of method for video coding, video encoding/decoding method and relevant device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1744553A1 (en) * 2004-03-15 2007-01-17 Sharp Kabushiki Kaisha Recording/reproduction/edition device
CN101300840A (en) * 2005-11-04 2008-11-05 微软公司 Multi-view video delivery
CN101237587A (en) * 2007-02-02 2008-08-06 中兴通讯股份有限公司 A video sequence coding method and its error control system
CN104618794A (en) * 2014-04-29 2015-05-13 腾讯科技(北京)有限公司 Method and device for playing video
CN106469208A (en) * 2016-08-31 2017-03-01 浙江宇视科技有限公司 A kind of temperature diagram data processing method, temperature diagram data search method and device
CN106791870A (en) * 2016-11-30 2017-05-31 华为技术有限公司 A kind of method for video coding, video encoding/decoding method and relevant device

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111629262A (en) * 2020-05-08 2020-09-04 Oppo广东移动通信有限公司 Video image processing method and device, electronic equipment and storage medium
CN111629262B (en) * 2020-05-08 2022-04-12 Oppo广东移动通信有限公司 Video image processing method and device, electronic equipment and storage medium
CN112351278A (en) * 2020-11-04 2021-02-09 北京金山云网络技术有限公司 Video encoding method and device and video decoding method and device
CN112351278B (en) * 2020-11-04 2023-07-07 北京金山云网络技术有限公司 Video encoding method and device and video decoding method and device
CN114554220A (en) * 2022-01-13 2022-05-27 北京信息科技大学 Method for over-limit compression and decoding of fixed scene video based on abstract features
CN114554220B (en) * 2022-01-13 2023-07-28 北京信息科技大学 Fixed scene video overrun compression and decoding method based on abstract features

Similar Documents

Publication Publication Date Title
US20190198027A1 (en) Audio frame loss recovery method and apparatus
CN105635636B (en) A kind of video conferencing system and its method for realizing transmission of video images control
EP2916543B1 (en) Method for coding/decoding depth image and coding/decoding device
CN108184126A (en) Video coding and coding/decoding method, the encoder and decoder of snapshot image
CN100591120C (en) Video communication method and apparatus
CN1221139C (en) Frame bit length distribution of seamless split, variable coding rate and compressed digital video frequency signals
CN109618170B (en) D2D real-time video streaming transmission method based on network coding
CN1980334A (en) Video-picture composition code transmission method
CN107181744A (en) A kind of Video processing and coding method, processor and encoder
JP2007520973A (en) Image compression for transmission over mobile networks
CN113079406A (en) Video processing method and device
CN101237583B (en) A decoding and coding method and device for multiple screen
AU2010231544A1 (en) System and format for encoding data and three-dimensional rendering
CN114205662A (en) Low-delay video rendering method and device for iOS (internet operating system) end
US10506283B2 (en) Video decoding and rendering using combined jitter and frame buffer
CN102577412B (en) Image coding method and device
CN107197329A (en) Method for video coding and device, storage medium
CN104333765B (en) A kind of processing method and processing unit of net cast stream
CN113539281A (en) Audio signal encoding method and apparatus
CN112367521B (en) Display screen content sharing method and device, computer equipment and storage medium
EP1841237B1 (en) Method and apparatus for video encoding
CN112738509B (en) Video encoding method, video decoding method, storage medium, and electronic device
CN101753270B (en) Code sending method and device
CN112541858A (en) Video image enhancement method, device, equipment, chip and storage medium
JP2003333347A (en) Compression method and decompression method for binary image data, and compression apparatus and decompression apparatus for binary image data

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: 20180619

RJ01 Rejection of invention patent application after publication