CN101895764A - Video decoding method for saving storage space - Google Patents

Video decoding method for saving storage space Download PDF

Info

Publication number
CN101895764A
CN101895764A CN 201010247673 CN201010247673A CN101895764A CN 101895764 A CN101895764 A CN 101895764A CN 201010247673 CN201010247673 CN 201010247673 CN 201010247673 A CN201010247673 A CN 201010247673A CN 101895764 A CN101895764 A CN 101895764A
Authority
CN
China
Prior art keywords
frame
decoding
data
video
decoding method
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN 201010247673
Other languages
Chinese (zh)
Other versions
CN101895764B (en
Inventor
史岩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Haiyongshun Innovation Technology Co., Ltd.
Original Assignee
Beijing Haier IC Design Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Haier IC Design Co Ltd filed Critical Beijing Haier IC Design Co Ltd
Priority to CN 201010247673 priority Critical patent/CN101895764B/en
Publication of CN101895764A publication Critical patent/CN101895764A/en
Application granted granted Critical
Publication of CN101895764B publication Critical patent/CN101895764B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention relates to a video decoding method for saving storage space. The method comprises the following steps of: firstly, decoding a first I frame in a video file, and storing the I frame; secondly, decoding a first P frame by using the I frame as a reference, and storing the P frame; thirdly, compressing frame data not serving as a subsequent reference frame, storing the compressed data, and simultaneously deleting the earliest stored frame data; fourthly, decoding all B frames before subsequent P frames in turn by using the first P frame data and the compressed data as references, and compressing B frame data respectively; and finally, deleting all the frames in a storage area, and decoding the next P frame by using the current uncompressed P frame as a reference until each frame of the data in the video file is decoded. The video decoding method greatly reduces the storage space needed by video decoding, and can be widely used for decoding video files with the formats such as MPEG-2, MPEG-4, AVS and the like.

Description

A kind of video encoding/decoding method of saving memory space
Technical field
The present invention relates to the video decode technology, relate in particular to the video encoding/decoding method of saving memory space.
Background technology
Along with the fast development of digital product, increasing electronic product has possessed video playback capability, as PMP, mobile phone, DPF, GPS etc.These electronic products often all have broadcast such as MPEG-2, MPEG-4, the function of format video files such as AVS.Generally, this class video file all be video is divided into a width of cloth width of cloth image again with it as a frame, realize compressing by compression dual mode in interframe compression and the frame.
At present, three kinds of different frame types being arranged, is respectively I frame, P frame and B frame.Wherein, the I frame is a key frame, and the I frame can be decoded separately, does not need the data with reference to other frames; The P frame is the single directional prediction frame, need decode with reference to I frame or the P that has decoded frame; The B frame is a bi-directional predicted frames, need decode with reference to former and later two I frames or P frame.Therefore, generally need to store three frame data at least, promptly need to store two reference frames at least, a B frame to be decoded.And, need store more reference frame toward contact if will consider playback problem.
In addition, video file more and more develops towards clear direction, resolution is more and more higher, the video of FULL HD size has the resolution of 1920*1080 size, intermediate data when this just needs very big memory space to store decoding, yet the resolution of present most playback equipments is far smaller than the resolution of video itself, and this has just caused a large amount of storage data in fact can not be revealed, and has caused data redundancy.
Along with the fierceness all the more of electronic product competition, also more and more higher to the requirement of cost, if can reduce the size of intermediate storage data, will reduce memory space, thereby reduce cost, improve product competitiveness.
Summary of the invention
The invention provides a kind of method for video coding and system that saves memory space.
In first aspect, the invention provides a kind of video encoding/decoding method, this method is:
The first step, first I frame in the decoded video file, and store this I frame;
Second step was reference with the I frame in the first step, first P frame of decoding, and store this P frame;
In the 3rd step, frame data as subsequent reference frame are not compressed, and store data after this compression, the frame data that deletion is simultaneously stored at first;
The 4th step was reference with the frame data in second step, data in the 3rd step after the compression, whole B frames before the decode successive P frame successively, and compress this B frame data respectively;
The 5th step, the whole frames of deletion in the memory block, and be reference with current not compressed P frame, next P frame of decoding, each frame data in this video file are all decoded to be finished.
Preferably, in the whole B frame data processes of the 4th step decoding, when the current B frame data of decoding, delete the packed data of last B frame, to save memory space.
Preferably, after jumping to for the 3rd step, comprise the step of compressing current P frame, and the step of the step of the current P frame of this compression and next P frame of decoding in the 5th step is carried out simultaneously.
Preferably, before the first step, comprise each reference frame in the video file is numbered, and this coding rule is represented by one-bit digital for I frame, P frame in this video file, the B frame is represented by two digits, and the I frame is since 0 order label, the P frame is since 1 order label, and first bit digital of B frame is identical with the P frame of its front, and second-order digit is since 1 serial number.
The present invention makes its image that narrows down to video playback apparatus show required size, and then stores the frame after this compression by particular reference frame is compressed, and is reference frame decoding next frame data with the frame after this compression.The present invention has reduced the needed memory space of decoded video, the bandwidth cost that has been produced when having saved reading of data simultaneously greatly.
Description of drawings
Below with reference to accompanying drawings specific embodiments of the present invention is described in detail, in the accompanying drawings:
Fig. 1 is the video decode schematic diagram of one embodiment of the invention.
Embodiment
For general video file (as MPEG-2, MPEG-4, AVS etc.), each reference frame coded sequence is that I frame back is the P frame, has 0 between two P frames to a plurality of B frames.As I, P, B, B, P, B, B, B, P, B...... structure, wherein, I is that I frame, P are the P frame, and B is the B frame.
Now each reference frame in the video file (comprising I frame, P frame, B frame) is numbered, each frame that is about in I, P, B, B, P, B, B, B, P, the B...... structure is numbered.Coding rule is that I frame, P frame are represented by one-bit digital, and the B frame represented by two digits, and the I frame is since 0 order label, and the P frame is since 1 order label, and first bit digital of B frame is identical with the P frame of its front, and second-order digit is since 1 serial number.Therefore, I, P, B, B, P, B, B, B, P, B...... can be expressed as I0, P1, B11, B12, P2, B21, B22, B23, P3, B31.......This shows that the referring-to relation between each frame is, the P frame is with reference to a last I frame or P frame, and the B frame is with reference to its front I frame or the P frame nearest with it, and promptly P1 is with reference to I0, and P2 is with reference to P1, and P3 is with reference to P2; B11, B12 are with reference to I0 and P1, and B21, B22, B23 are with reference to P1 and P2.
Each frame playing sequence is in the video file, all B frames that each P frame need play before the next P frame in its back are just play oneself then, so the playing sequence of I0, P1, B11, B12, P2, B21, B22, B23, P3, B31...... is I0, B11, B12, P1, B21, B22, B23, P2, B31.......
Fig. 1 is the video decode schematic diagram of one embodiment of the invention.This Fig. 1 is to be that example is set forth with decoding I0, P1, B11, B12, P2, B21, B22, B23, P3, B31.......
In step 110, according to the normal decoder mode I0 frame of decoding, and this I0 frame is stored in the buffering area, so that provide reference for subsequent frame.
In step 120, be first P frame of reference decoder with the I0 frame, the P1 frame of promptly decoding, and store this P1 frame.
In step 130, the image that is not compressed into video playback apparatus as the frame (being the I0 frame) of subsequent reference frame is shown required size, and replaces storage that the I0 frame that is about to be stored in buffering area replaces to the P1 frame.
Particularly, since the I0 frame in the P frame only as the reference frame of P1 frame (and not as P2, P3, P4 ... reference frame), therefore after the P1 frame decoding finishes, this is not compressed into the I0s frame as the I0 frame of reference frame, I0s frame sign after this compression shows that with the image of video playback apparatus required size is identical, and stores this condensed frame I0s; And store the P1 frame simultaneously, the I0 frame in the delete buffer.
In step 140, with I0s frame and P1 frame is reference frame, whole B frames before the decode successive P frame successively, promptly decode successively B11 frame, B12 frame, and B11 frame, B12 frame be compressed into B11s frame, B12s frame respectively, this B11s frame, B12s frame sign show that with the image of video playback apparatus required size is identical, delete the B11s frame simultaneously when decoding B12 frame, to save memory space.
In step 150, clear buffer, i.e. whole frames in the delete buffer, and be reference with existing not compressed frame, be reference promptly with the P1 frame, the next P frame of decoding (being the P2 frame) jumps to step 130 then, up to next I frame occurring.
Need to prove, jumping to step 130 described in the step 150 is that the P1 frame is compressed into P1s, and the P1 that will be stored in buffering area replaces to the P2 frame, that is to say, redirect described herein is not the compression I0 frame in the repeated execution of steps 130 and buffering area is replaced to the P1 frame, but will be as the frame compression of subsequent reference frame, and make respective stored and replace.Equally, next also be to be reference frame with P1s frame, P2 frame, the B21 frame of decoding successively, B22 frame, B23 frame, and, delete B21s frame, B22s frame simultaneously with its corresponding B21s frame, B22s frame, B23s frame of being compressed into.
Preferably, step 120 is carried out simultaneously with step 130, that is to say, simultaneously to compressing with reference to intact I0 frame, can further save memory space like this in the process of decoding P1 frame.
Preferably, step 150 with carry out simultaneously by the step 130 after this step 150 redirect, that is to say, in the process of decoding P2 frame, compressing with reference to intact P1 frame.
This shows, prior art needs to store three frame data (comprising two reference frames and a B frame to be decoded) at least, and the present invention only needs to store two frame data, perhaps only storing frame data adds two and is used to show sized frames data (as B11s and B12s), therefore, the present invention has saved memory space greatly.
Obviously, under the prerequisite that does not depart from true spirit of the present invention and scope, the present invention described here can have many variations.Therefore, the change that all it will be apparent to those skilled in the art that all should be included within the scope that these claims contain.The present invention's scope required for protection is only limited by described claims.

Claims (9)

1. a video encoding/decoding method is characterized in that, comprising:
Step a, first I frame in the decoded video file, and store this I frame;
Step b is reference with the I frame among the step a, first P frame of decoding, and store this P frame;
Step c compresses frame data as subsequent reference frame not, and stores the data after this compression, and deletion simultaneously is the frame data of storage at first;
Steps d is reference with the data after the compression among the frame data among the step b, the step c, whole B frames before the decode successive P frame successively, and compress this B frame data respectively;
Step e, the whole frames of deletion in the memory block, and be reference with current not compressed P frame, next P frame of decoding, each frame data in this video file are all decoded to be finished.
2. a kind of video encoding/decoding method as claimed in claim 1 is characterized in that, in the whole B frame data of described decoding process, when the current B frame data of decoding, deletes the packed data of last B frame, to save memory space.
3. a kind of video encoding/decoding method as claimed in claim 1 is characterized in that, comprises the step that jumps to described step c after next P frame of described decoding.
4. a kind of video encoding/decoding method as claimed in claim 1 is characterized in that described step b, step c carry out simultaneously.
5. a kind of video encoding/decoding method as claimed in claim 3 is characterized in that, comprises the step of compressing current P frame after jumping to described step c; And the step of next P frame of decoding is carried out simultaneously among the step of the current P frame of this compression and the described step e.
6. a kind of video encoding/decoding method as claimed in claim 1, it is characterized in that, the step that each reference frame is numbered in comprising video file before step a, and this coding rule is represented by one-bit digital for I frame, P frame in this video file, the B frame represented by two digits, and the I frame is since 0 order label, and the P frame is since 1 order label, first bit digital of B frame is identical with the P frame of its front, and second-order digit is since 1 serial number.
7. a kind of video encoding/decoding method as claimed in claim 1 is characterized in that, described compression is that the image that described frame data are compressed into video playback apparatus is shown required size.
8. a kind of video encoding/decoding method as claimed in claim 1 is characterized in that, described video file is in MPEG-2, MPEG-4, the AVS form.
9. a kind of video encoding/decoding method as claimed in claim 1 is characterized in that, described memory block is a buffering area.
CN 201010247673 2010-08-09 2010-08-09 Video decoding method for saving storage space Active CN101895764B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201010247673 CN101895764B (en) 2010-08-09 2010-08-09 Video decoding method for saving storage space

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201010247673 CN101895764B (en) 2010-08-09 2010-08-09 Video decoding method for saving storage space

Publications (2)

Publication Number Publication Date
CN101895764A true CN101895764A (en) 2010-11-24
CN101895764B CN101895764B (en) 2012-07-11

Family

ID=43104807

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201010247673 Active CN101895764B (en) 2010-08-09 2010-08-09 Video decoding method for saving storage space

Country Status (1)

Country Link
CN (1) CN101895764B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101513064A (en) * 2006-07-27 2009-08-19 Lsi公司 Method for video decoder memory reduction

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101513064A (en) * 2006-07-27 2009-08-19 Lsi公司 Method for video decoder memory reduction

Also Published As

Publication number Publication date
CN101895764B (en) 2012-07-11

Similar Documents

Publication Publication Date Title
US11245923B2 (en) Representative motion information for temporal motion prediction in video encoding and decoding
JP6059384B2 (en) Method and apparatus for encoding or decoding
EP1775961B1 (en) Video decoding device and method for motion compensation with sequential transfer of reference pictures
CN102104764B (en) Method for compressing, storing and processing image sequence
US8824560B2 (en) Virtual frame buffer system and method
CN101889447A (en) Extension of the AVC standard to encode high resolution digital still pictures in series with video
JP2014510440A (en) Subslice in video coding
US8989275B2 (en) Video processing architecture
CN102075756B (en) Video multiframe prediction encoding and decoding method and device
CN103997650A (en) Video decoding method and video decoder
US9723308B2 (en) Image processing apparatus and image processing method
US20080089418A1 (en) Image encoding apparatus and memory access method
CN102017636B (en) Image decoding
CN102263946B (en) Techniques for storing and retrieving pixel data
CN103109535A (en) Image reproduction method, image reproduction device, image reproduction program, imaging system, and reproduction system
CN1147157C (en) Decoding device and method
CN101895764B (en) Video decoding method for saving storage space
EP1919213A1 (en) Method for interpolating chrominance signal in video encoder and decoder
US9088296B2 (en) Variable length coding and decoding using counters
EP2259432A1 (en) Variable-length code decoding apparatus and method
Lee et al. Low latency variable length coding scheme for frame memory recompression
WO2012120910A1 (en) Moving image coding device and moving image coding method
US8458512B2 (en) Variable-length data storing method and variable-length data storing device
TW202348026A (en) Image coding and decoding method and device, electronic equipment and storage medium
WO2004075562A1 (en) Image decoding device, image encoding device, and method thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20190718

Address after: 266000 Room 1602, Laoshan District, Qingdao City, Shandong Province

Patentee after: Qingdao sea, Yongshun, Amperex Technology Limited

Address before: 100088 room four, Heng Tong Building, No. 205, Huayuan Road, Beijing, Haidian District

Patentee before: Haier IC Design Co., Ltd., Beijing

TR01 Transfer of patent right
CP01 Change in the name or title of a patent holder

Address after: 266000 Room 1602, Laoshan District, Qingdao City, Shandong Province

Patentee after: Qingdao Haiyongshun Innovation Technology Co., Ltd.

Address before: 266000 Room 1602, Laoshan District, Qingdao City, Shandong Province

Patentee before: Qingdao sea, Yongshun, Amperex Technology Limited

CP01 Change in the name or title of a patent holder