CN1980392A - Decoding method using video code flow to judge picture poundary and reading in advance picture data, and apparatus therefor - Google Patents

Decoding method using video code flow to judge picture poundary and reading in advance picture data, and apparatus therefor Download PDF

Info

Publication number
CN1980392A
CN1980392A CN 200510110913 CN200510110913A CN1980392A CN 1980392 A CN1980392 A CN 1980392A CN 200510110913 CN200510110913 CN 200510110913 CN 200510110913 A CN200510110913 A CN 200510110913A CN 1980392 A CN1980392 A CN 1980392A
Authority
CN
China
Prior art keywords
decoding
unit
band
information
image
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 200510110913
Other languages
Chinese (zh)
Other versions
CN100481953C (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.)
Tongji University
Original Assignee
Tongji University
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 Tongji University filed Critical Tongji University
Priority to CN 200510110913 priority Critical patent/CN100481953C/en
Publication of CN1980392A publication Critical patent/CN1980392A/en
Application granted granted Critical
Publication of CN100481953C publication Critical patent/CN100481953C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/129Scanning of coding units, e.g. zig-zag scan of transform coefficients or flexible macroblock ordering [FMO]

Landscapes

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

Abstract

When flexible macro block order (FMO) and arbitrary stripe order (ASO) are adopted in video compression standard, the method determines image borderline and prereads one frame of image data in code stream. Based on determining whether current stripe belongs to current image or next frame of image, the method places head of stripe, and data of stripe read out different buffer areas, and records the location of the preread stripe in buffer. Then, the method decodes the current image. Before decoding a frame of image, the method is able to determine borderline between this image and next frame of image so that the method can read out all content of stripe of current decoding image, and carries out decoding operation according to order of macro block raster scan so as to reduce decoding delay, and post-processing delay.

Description

Video code flow is judged the coding/decoding method and the device of image boundary and pre-reading image data
Technical field
How coding/decoding method and device when the present invention relates to video compression standard employing flexible macro-block ordering FMO and any band order ASO technology particularly judge image boundary and coding/decoding method and device how to read the view data of code stream in advance.
Background technology
Band (slice) structure is one of key technology in the source encoding, is widely used in many video compression standards, and as AVS, H.264, MPEG2 etc.When adopting structured band (structured slice) technology in the source encoding, can adapt to the error control good in the network service and the requirement of flexible operating well.In the structured band technology, comprise many key concepts, as flexible macro-block ordering FMO (Flexible Macroblock Ordering) and any band order ASO (AbitrarySliice Order) etc., but for decoding work, when adopting FMO and ASO mechanism, can not guarantee that by the order decoding of band in video code flow necessarily correspondence is decoded by the macro block raster scan order.
The coded system of image:
In video compression standard, image is that unit encodes with macro block (macroblock), and macro block is the square area of 16 * 16 (pixels) sizes, is example (as shown in Figure 1) with the image of 176 * 144 sizes, and this image comprises 99 macro blocks altogether.Among Fig. 1, the sequence number of macro block in piece image according among the figure shown in the arrow order increase progressively, this mode claim by raster scan serial number (0,1 ..., 98).Corresponding with cataloged procedure, decode procedure also is that unit carries out with the macro block, and decoded macroblock content is placed to guarantee the correct of decoded picture by order shown in Figure 1.
The structure of video code flow and tissue:
In video compression standard (as AVS, H.264), original image file is called code stream through the later binary file of coding, and the basic composition unit of information is band (slice) in the code stream, and band is by hierarchy tissue shown in Figure 2.In video code flow, the information of piece image is made up of several bands, and each band comprises slice header (slice header) and strip data (slice data) two parts.
Slice header has comprised first macro block or the total information of all macro blocks in this band, and strip data constitutes (among Fig. 3 be example with 8 macro blocks) by an integer macro block, the interior macro block of band be placed with dual mode, respectively shown in Fig. 3 (a) and Fig. 3 (b).In Fig. 3 (a), place (sequence number that k is first macro block in the band) in the mode that macro block sequence number natural number increases progressively; Among Fig. 3 (b), after the interior macro block sequence number that originally increased progressively according to natural number of band was operated through certain mapping (MAP), the macro block in the band was numbered by k, k+1 ... k+7 becomes i 0, i 1... i 7, and i 0, i 1... i 7Might not increase progressively by 1 step-length, thereby the placement of the macro block in the band no longer has any rule, this mode is called multi-ribbon group flexible macro-block ordering (FlexibleMacroblock Ordering) mode.
Any band sequential technologies (Arbitrary slice order):
Band sequential technologies (ASO) is meant that the placement order of band in code stream might not strictly observe the sequence number monotonically increasing restriction of first macro block of band arbitrarily, that is to say that encoder can send and accept all bands of piece image in any order, shown in Fig. 4 (a), macroblock partitions in the piece image is band #1, band #2, three different bands of band #3, adopt the ASO technology among Fig. 4 (b), the order that three bands (video code flow) among Fig. 4 (a) arrive decoder is band #2, band #1, band #3.
When adopting multi-ribbon group flexible macro-block ordering FMO and any band order ASO technology, if still adopt the mode that the sequential read band is also decoded from code stream can not guarantee that the sequence number of decoded macroblock increases progressively with raster scan order, and if employing is read bands all in the piece image in advance and be temporary, can realize decoding by the macro block raster scan order in conjunction with mapping (MAP) relation of precognition and some information in the slice header.In the video code flow decode procedure, before the piece image complete decoding finished, it was unknown in advance that piece image comprises total band number, becomes the key by macro block raster scan order decoding work so correctly judge image boundary.
The information unit of video code flow: stripe cell and non-stripe cell:
In video compression standard, video code flow is made up of various types of information unit.Information unit can be divided into two classes: a class is the stripe cell of introducing previously, has comprised the video content of real compression; Another kind of is non-stripe cell, has comprised other relevant additional informations.The information that has comprised the information unit type in the unit header of information unit is therefore as long as the unit header of decoded information unit is that stripe cell also is non-stripe cell with regard to this information unit of decidable.
Flow chart such as Fig. 5 of the method for the disclosed at present judgement image boundary (following piece image begins) and the piece image of decoding Shown in, may further comprise the steps as follows:
1) beginning, initialization decoded macroblock number i=0;
2) read the information unit of a video code flow;
3) the decode unit header of this information unit, if stripe cell then jumps to step 4), otherwise the full content of the current non-stripe cell of decoding returns step 2);
4) read band in the current information unit;
5) to reading band, decode this band and accumulative total decoded macroblock number i,
Does 6) decoded macroblock number i equal total macroblock number that this image comprises? if this moment, i equaled total macroblock number that piece image comprises, then the present image decoding finishes (being that ensuing information belongs to piece image down in the code stream), otherwise returns step 2).
The applied device schematic diagram of above-mentioned judgement image boundary and coding/decoding method is as shown in Figure 6:
Whole judgement image boundary and decoding device are by forming with lower module and unit:
1. information unit unit header decoder module, the header of decoded information unit;
2. information unit type identification module, if stripe cell is then read the stripe information in this information unit, otherwise this information unit and continue the read next information unit of decoding;
3. slice header decoder module is used for decoding bar to take the lead;
4. macroblock decode module realizes the macro block decoding;
5. image finishes discrimination module, is used to judge whether present image finishes, and comprises with lower unit:
(1) the decoded macroblock number unit that adds up, the number of accumulative total decoded macroblock;
(2) the total macroblock number and the decoded macroblock of image are counted comparing unit, if current decoded macroblock number equates that with total macroblock number of image then present image finishes.
7. restored map picture frame/field memory is owing to press the order decoding band of band in code stream, so decoded macro block will be through just carrying out other reprocessings such as filtering after keeping in;
8. post processing of image module is used for subsequent operations such as the macro block filtering that carries out according to raster scan order and image zoom, enhancing;
9. image shows and memory module, is used for the demonstration and the storage of image.
The related data of these prior aries has:
1) common joint video team (Joint Video Team) the reference software JM85 version of setting up of the MPEG of Motion Picture Experts Group (moving picture expert group) of the VCEG of video coding expert group of ITU-T (International Telecommunications Union) (video coding experts group) and ISO/IEC (International Standards Organization).
As can be seen from Figure 6, this coding/decoding method and device are decoded successively by the order of band in code stream, also not pre-reading image data.
Summary of the invention
The present invention proposes a kind ofly to adopt flexible macro-block ordering (FMO) and judge that image boundary reaches coding/decoding method and the device of reading piece image data in the code stream in advance during band order (ASO) technology arbitrarily in video compression standard.When the key that realizes the method is a stripe information in the sequential read code stream, how to judge that current band belongs to present image or following piece image, and the slice header of reading left in the different buffering areas with strip data, the position of band in buffer memory read in advance in record.
Judge in the multi-ribbon video code flow that image boundary reaches the coding/decoding method of reading band in advance and is described below:
The flow chart of coding/decoding method of the present invention as shown in Figure 7.May further comprise the steps:
1) beginning, the original position of first information unit of search present image;
2) read current information unit and decoded information unit header;
3) judge whether the current information unit is stripe cell, if stripe cell then jumps to step 4), otherwise the original position of decoding this non-stripe cell and searching for next information unit is returned step 2);
4) the decode full detail of slice header of first band;
First slice header that 5) will solve is placed in the slice header buffering area, the record deposit position;
6) strip data with first band is temporary in the strip data buffering area, the record deposit position;
7) original position of the next information unit of search;
8) read the current information unit and the current information unit header of decoding;
9) whether the current information unit is stripe cell, if then continue to carry out subsequent step; If indicate the information unit of image boundary, then jump to step 15); Otherwise this non-stripe cell information of decoding is returned step 7);
10) preceding several bytes of the slice header in the current stripe cell of decoding are to obtain the information that whether belongs to present image of this band;
11) judge according to the information of the current stripe information that reads and first band whether current band belongs to present image, then continue to carry out subsequent step if belong to, otherwise jump to step 15);
12) the decoding bar remainder bytes of taking the lead;
13) and with the slice header that solves be placed in the slice header buffering area record deposit position;
14) strip data with current stripe cell is temporary in the strip data buffering area, and the record deposit position returns step 7);
15) present image decoding.
As shown in Figure 8, wherein step 15) present image decoding can be according to macro block raster scan order decoding present image till the decoded macroblock sum equals total macroblock number that piece image comprises.Specifically may further comprise the steps:
1) will read the ASCII stream file ASCII pointer and return previous information unit end position, this moment, all bands of present image were all read;
2) initialization decoded macroblock sequence number i=0;
3) decoded macroblock i, i increases progressively 1;
4) judge whether i equals total macroblock number that piece image comprises,, otherwise change step 3) if then the present image decoding finishes.
The applied device schematic diagram of above-mentioned coding/decoding method is as shown in Figure 9:
Whole decoding device comprises with lower module and unit:
1. information unit search module, the original position of search information unit;
2. information unit unit header decoder module, decoded information unit unit header information;
3. information unit type identification module, if stripe cell is then read the stripe information in this information unit, if indicate the information unit of image boundary, then the pre-read procedure of all bands of present image finishes, otherwise this non-stripe cell of decoding and the next information unit of continuation search;
4. part slice header decoder module, the partial bytes that decoding bar is taken the lead is used to judge whether current band belongs to present image;
5. the band discrimination module judges whether current band belongs to present image, takes the lead remainder bytes and continue to read the next band of present image if belong to decoding bar then; Otherwise the pre-read procedure of all bands of present image finishes;
6. remain slice header decoder module, the remainder bytes that decoding bar is taken the lead;
7. read the band cache module, comprised with lower unit:
(1) slice header buffer unit is used for keeping in decoded slice header information.
(2) strip data buffer unit is used for temporary strip data of reading.
8. macroblock decode module realizes the function of decoded macroblock;
9. post processing of image module is used for subsequent operations such as the macro block filtering that carries out according to raster scan order and image zoom, enhancing;
10. image shows and memory module, is used for the demonstration and the storage of image.
Technical solution of the present invention just can correctly be judged the border of this image and following piece image before the decoding piece image, thereby before decoding, can correctly read whole band contents of current decoded picture, can realize decoding, reduce the delay of decoding and reprocessing according to the order of macro block raster scan.
Description of drawings
Fig. 1 is an image that to comprise 99 sizes be 16 * 16 pixel macroblock;
Fig. 2 is the hierarchy institutional framework of piece image;
Fig. 3 (a), Fig. 3 (b) are the modes of emplacement of macro block in the band;
Fig. 4 (a), Fig. 4 (b) are any band sequential schematic;
Fig. 5 is the flow chart of the method for the present disclosed judgement image boundary and the piece image of decoding;
Fig. 6 is the device of the present disclosed judgement image boundary and the piece image of decoding;
Fig. 7 is the technical solution of the present invention flow chart;
Fig. 8 is technical solution of the present invention present image decoding process figure;
Fig. 9 is the applied device of coding/decoding method in the technical solution of the present invention;
Figure 10 is the flow chart of the embodiment of the invention one coding/decoding method;
Figure 11 is the embodiment of the invention one a decoding device schematic diagram;
Figure 12 is the flow chart of the embodiment of the invention two coding/decoding methods;
Figure 13 is the embodiment of the invention two decoding device schematic diagrames;
Figure 14 is the flow chart of the embodiment of the invention three coding/decoding methods;
Figure 15 is the embodiment of the invention three decoding device schematic diagrames;
Embodiment
Embodiment one: judge image boundary and the decoding of reading the piece image data in advance H.264
In H.264, when adopting multi-ribbon flexible macro-block ordering (FMO) technology, the macro block sequence number that increases progressively by natural number in the band through mapping (MAP) operation after, the macro block sequence number in the band may still satisfy the rule that increases progressively by natural number and also may become and have no rule and can say.And when any band order of employing ASO, because it is arbitrarily that band arrives the order of decoder, even the macro block sequence number in the band increases progressively by natural number, can not guarantee by the certain corresponding order decoding of the order decoding of band in code stream by the macro block raster scan.
In order to realize the decoding by the macro block raster scan order, a kind of method is that all band contents of piece image were all read before decoding and kept in, and how to judge that at this moment can image boundary become the key that be correctly decoded.
As noted earlier, piece image in the video code flow is made of several bands, band comprises slice header and strip data two parts, comprised the common information of all macro blocks in the band in the slice header, some information wherein is identical to all bands of piece image, and these information may be different concerning different images, so we can judge whether current band belongs to current decoded picture by these information of decoding from slice header.
Video compression standard H.264 in, all information units all are called network adaptation layer NAL (network adaptationlayer) unit, stripe cell then is video coding layer VCL (video coding layer) unit.Each NAL unit all comprises the byte number of integer, and head and remaining payload information of a byte wherein arranged.In header information, the character that comprises an error flag position, NAL unit is represented and the NAL type, whether the error flag position is used for indicating the NAL unit that receives wrong, the character of NAL unit represents that the position is mainly used in the significance level of expression NAL unit in code stream, generally the influence to decoding is big more, and its numerical value is big more.The NAL type stated data content of NAL unit, from big aspect, the NAL unit is divided into two kinds, a kind of is VCL NAL unit, has comprised the information after the video image compression, promptly above-mentioned stripe cell, another kind of right and wrong VCL NAL unit, also be above-mentioned non-stripe cell, mainly comprised relevant additional information, as Sequence parameter set, picture parameter set (picture parameter set) etc.
In video code flow H.264, picture parameter set (picture parameter set) syntactic structure, this syntactic structure has been stipulated the common information of all bands in the piece image.Different images in video sequence may adopt different picture parameter set syntactic structures, is by the decision of the syntactic element pic_parameter_set_id in slice header (slice header ()) syntactic structure and specifically adopt which kind of picture parameter set syntactic structure.Concerning the slice header of all bands of same width of cloth image, its syntactic element pic parameter_set_id is identical, all bands that are piece image adopt identical picture parameter set syntactic structure, but concerning the different images of same video sequence, the pic_parameter_set_id possibility is identical also may be different, so whether pic_parameter_set_id can be belonged to one of condition of present image as differentiating the current band of reading.In addition, in the slice header of each band, also has the first_mb_in_slice syntactic element, it has stipulated the sequence number of first macro block in this band, the different bands of same width of cloth image, first_mb_in_slice is different, but for the band of different images, first_mb_in_slice may be identical, so can be with first_mb_in_Slice as differentiating the current another one condition whether band belongs to present image of reading.
Except above-mentioned two conditions, in the slice header of each band, also have type of coding (slice_type) and two syntactic elements of frame_num.Slice_type has stipulated the coding method of current band, and in H.264, the coding method of band has 5 kinds, and the different coding method of the value correspondence of different slice_type is as shown in table 1 below.
The different coding method of the different value correspondences of table 1 slice_type
Slice_type The band coding method
0 P(P?slice)
1 B(B?slice)
2 I(P?slice)
3 SP(SP?slice)
4 SI(SI?slice)
5 P(P?slice)
6 B(B?slice)
7 I(I?slice)
8 SP(SP?slice)
9 SI(SI?slice)
Regulation in H.264, when the slice_type of certain band of piece image between 5~9 during value, the coding method of all bands that this width of cloth image is described is identical, when the slice_type of first band of present image greater than 4 and the current slice_type that reads band when being not equal to the slice_type (or Slice_type-5) of first band, current as can be known band belongs to piece image down, so available slice_type is as judging whether current band belongs to one of condition of present image.
Video compression standard with other is the same, has also adopted motion compensation process in H.264.So-called motion compensation further is divided into littler piece with current coding macro block exactly, and the piece that search and present encoding piece mate most in the image of having encoded and calculate the difference of respective pixel in present encoding piece and the match block obtains blocks of prediction then.Encoded and image that be used for motion compensation is commonly referred to reference frame.In code stream H.264, all images all has a numbering, that piece image that occurs after each reference frame, its numbering all can increase progressively, this numbering is represented by the syntactic element frame_num in the slice header, therefore when the current frame_num that reads band and first band not simultaneously, illustrate that current band belongs to descend piece image, whether belong to one of condition of present image so frame_Hum also can be used as the current band of differentiation.
In the decode procedure, it is as follows how to judge whether current band belongs to the method for current encoded image: read a band in the code stream and temporary, decoding bar preceding several bytes of taking the lead then, judge according to these information whether current band belongs to current decoded picture, if belong to current decoded picture then all information in its slice header all will be solved, leave certain position in the buffering area in, to some parameter in the slice header, such as frame_num, field_pic_flag, bottom_field_flag etc. are the same to all bands in the piece image, and these parameters can be placed in the same internal memory; For some parameter, may be different such as quantization parameter QP etc. to the different bands of same width of cloth image, so these parameters are placed on the diverse location in the buffering area, need to use different pointers write down this position.Strip data for not decoding still leaves the position of depositing stripe information at first in, because different strip data will constantly be switched use in the decode procedure, so also need different pointers to indicate the position of strip data in internal memory.
By above explanation, in code stream H.264, specifically differentiate image boundary and pre-reading image data method flow chart as shown in figure 10, specifically describe as follows:
1) beginning, the original position of first NAL unit of search present image;
2) read the current NAL unit and the current NAL unit header of decoding;
3) judge whether current NAL unit is VCL NAL unit, if then execution in step 4), otherwise this NAL unit information of decoding, and the original position that continues to search for next NAL unit, return step 2);
4) the decode slice header of first band;
5) slice header is placed in the slice header buffering area record deposit position;
6) strip data with first band is temporary in the strip data buffering area, the record deposit position;
7) original position of the next NAL of search unit;
8) read current NAL unit and decoding unit head;
9) judge whether current NAL unit is VCL NAL unit, if then execution in step 10), otherwise this NAL unit information of decoding is returned step 7);
10) four syntactic element: first_mb_in_slice in the slice header of the band in the current NAL of the decoding unit, pic_parameter_set_id, Slice_type, frame_num;
11) judge whether to satisfy one of following four conditions: the 1. current pic_parameter_set_id that reads band is not equal to the pic_parameter_set_id of first band; 2. the current first_mb_in_slice that reads band equals the first_mb_in_slice of first band; 3. the Slice_type of first band greater than 4 and the current Slice_type that reads band be not equal to the Slice_type (or Slice_type-5) of first band; 4. the current frame_num that reads band is not equal to the frame_num of first band; If above-mentioned four conditions all do not satisfy, illustrate that current band belongs to present image, order execution in step 12); If above-mentioned four conditions have at least one to satisfy, illustrate that current band belongs to piece image down, jumps to step 15);
12) remaining information in the slice header of current band is all solved;
13) slice header is placed in the slice header buffering area record deposit position;
14) strip data with current band is temporary in the strip data buffering area, and the record deposit position returns step 7);
15) present image decoding can be according to macro block raster scan order decoding present image till the decoded macroblock sum equals total macroblock number that piece image comprises.Specifically as shown in Figure 8, may further comprise the steps:
1) read the ASCII stream file ASCII pointer and return previous information unit end position, this moment, all bands of present image were all read;
2) initialization decoded macroblock sequence number i=0;
3) decoded macroblock i, i increases progressively 1;
4) judge whether i equals total macroblock number that piece image comprises,, otherwise change step 3) if then the present image decoding finishes.
The foregoing description one applied device as shown in figure 11, whole decoding device comprises with lower module and unit:
1.NAL the unit searches module, the original position of search NAL unit;
2.NAL the unit header decoder module, the header of decoding NAL unit;
3.NAL the cell type discrimination module, if the stripe information in this NAL unit is then read in VCL NAL unit, otherwise decode this NAL unit and the next NAL of continuation search unit;
4. part slice header decoder module, preceding four syntactic elements during decoding bar is taken the lead comprise with lower unit:
(1) frame_num decoding unit, the syntactic element frame_num during decoding bar is taken the lead;
(2) Slice_type decoding unit, the syntactic element Slice_type during decoding bar is taken the lead;
(3) first_mb_in_Slice decoding unit, the syntactic element first_mb_in_slice during decoding bar is taken the lead;
(4) pic_parameter_set_id decoding unit, the syntactic element pic_parameter_set_id during decoding bar is taken the lead.
5. the band discrimination module judges with preceding four syntactic elements of slice header whether current band belongs to present image, takes the lead remainder bytes if belong to then decoding bar; Otherwise the pre-read procedure of all bands of present image finishes;
6. slice header remainder bytes decoder module, the remainder bytes that decoding bar is taken the lead;
7. read the band cache module, comprised with lower unit:
(1) slice header buffer unit is used for keeping in decoded slice header information;
(2) strip data buffer unit is used for temporary strip data of reading.
8. macroblock decode module realizes the function of decoded macroblock;
9. the loop filtering module is used for decoded macroblock is carried out filtering;
10. image shows or memory module, is used for the demonstration and the storage of image.
Embodiment two: judge image boundary and the decoding of reading the piece image data in advance H.264
In video flowing H.264, each band has the pic_order_cnt_lsb syntactic element, is used for determining the actual displayed order of image.Concerning different decoded pictures, pic_order_cnt_lsb is different, judges whether current band belongs to the condition of present image so pic_order_cnt_lsb can be used as.In video flowing H.264, contain sequence parameter set (Sequence parameter set) syntactic structure, this syntactic structure has been stipulated the total information of all images in the same video sequence (sequence), 32 different sequence parameter sets are arranged at most H.264, and which sequence parameter set each width of cloth image uses is to be determined by the syntactic element seq_parameter_set_id in picture parameter set (the picture parameter set) syntactic structure.In the sequence parameter set syntactic structure, contain syntactic element pic_order_cnt_type, have only pic_order_cnt_type to equal at 0 o'clock, pic_order_cnt_lsb just can appear in the slice header of video code flow, so arrange when encoder is consistent with decoder, syntactic element pic_order_cnt_type in the parameter set syntactic structure equals at 0 o'clock, only just can judge with pic_order_cnt_lsb whether the current band of reading belongs to present image.
By above-mentioned explanation, syntactic element pic_order_cnt_type in the sequence parameter set syntactic structure that image adopted in video flowing equals under 0 the prerequisite, judge with pic_order_cnt_lsb image boundary and pre-reading image data method flow chart as shown in figure 12, may further comprise the steps:
1) beginning, the original position of first NAL unit of search present image;
2) read current NAL unit and decoding unit head;
3) judge whether current NAL unit is VCL NAL unit, if then execution in step 4), otherwise this NAL unit information of decoding, the original position that continues to search for next NAL unit is returned step 2);
4) the decode slice header of first band,
5) slice header is placed in the slice header buffering area record deposit position;
6) strip data with first band is temporary in the strip data buffering area, the record deposit position;
7) original position of the next NAL of search unit;
8) read current NAL unit and decoding unit head;
9) judge whether current NAL unit is VCL NAL unit, if then execution in step 10), otherwise this NAL unit information of decoding is returned step 7);
10) syntactic element in the slice header of the band in the current NAL of the decoding unit is till syntactic element pic_order_cnt_lsb solves;
11) judge whether the current pic_order_cnt_lsb that reads band is identical with the pic_order_cnt_lsb of first band, if illustrate that then current band belongs to present image, order execution in step 12); Otherwise illustrate that current band belongs to piece image down, jumps to step 15);
12) remaining information in the slice header of the current band of decoding,
13) slice header is placed in the slice header buffering area,
14) strip data with current band is temporary in the strip data buffering area, and the record deposit position returns step 7);
15) present image decoding.This step is with embodiment one.
The applied device of above-mentioned coding/decoding method embodiment comprises as shown in figure 13 with lower module:
1.NAL the unit searches module, the original position of search NAL unit;
2.NAL the unit header decoder module, the header of decoding NAL unit;
3.NAL the cell type discrimination module, if the stripe information in this NAL unit is then read in VCL NAL unit, otherwise decode this NAL unit and the next NAL of continuation search unit;
4. part slice header decoder module, all syntactic elements during decoding bar is taken the lead till pic_order_cnt_lsb;
5. band discrimination module, if the pic_order_cnt_lsb of current band equals the pic_order_cnt_lsb of first band, then current band belongs to present image, decoding bar is taken the lead remainder bytes; Otherwise the pre-read procedure of all bands of present image finishes;
6. slice header remainder bytes decoder module, the remainder bytes that decoding bar is taken the lead.
7. read the band cache module, comprised with lower unit:
(1) slice header buffer unit is used for keeping in decoded slice header information;
(2) strip data buffer unit is used for temporary strip data of reading.
8. macroblock decode module realizes the function of decoded macroblock;
9. the loop filtering module is used for decoded macroblock is carried out filtering;
10. image shows or memory module, is used for the demonstration and the storage of image.
Embodiment three: judge image boundary and the decoding of reading the piece image data in advance H.264
In H.264, the NAL type has 32 kinds of values, and when the NAL type equaled 9, the content of NAL unit was Accessunit delimiter, and this kind NAL unit can be selected to indicate down the beginning of piece image.When Access unitdelimiter NAL unit occurs in code stream, illustrate that ensuing content belongs to piece image down in the code stream, if arrange so coding staff is consistent with decoding side, before piece image begins down, always have under the prerequisite of Access unit delimiter NAL unit appearance, can use the border of Access unit delimiter NAL unit judges image.
Judge with the appearance of Access unit delimiter NAL unit in code stream image boundary and pre-reading image data method flow chart as shown in figure 14, may further comprise the steps:
1) original position of first NAL unit of search present image;
2) read current NAL unit and decoding unit head;
3) judge whether current NAL unit is VCL NAL unit, if then execution in step 4), otherwise decode this NAL unit information and storage, the original position that continues to search for next NAL unit is returned step 2);
4) slice header of the current band of decoding is placed on slice header in the slice header buffering area, the record deposit position;
5) strip data with current band is temporary in the strip data buffering area, the record deposit position;
6) original position of the next NAL of search unit;
7) read current NAL unit and decoding unit head;
8) judge whether current NAL unit is VCL NAL unit, if then return step 4), if Access unitdelimiter NAL unit execution in step 9 then), otherwise return step 6) after decoding NAL unit remaining information and the storage;
9) present image decoding.This step is with embodiment one.
The applied device schematic diagram of above-mentioned coding/decoding method embodiment comprises as shown in figure 15 with lower module:
1.NAL the unit searches module, the original position of search NAL unit;
2.NAL the unit header decoder module, the header of decoding NAL unit;
3.NAL the cell type discrimination module is if Access unit delimiter NAL unit shows that then present image finishes;
4. slice header decoder module, decoding bar are taken the lead information;
5. read the band cache module, comprised with lower unit:
(1) slice header buffer unit is used for keeping in decoded slice header information;
(2) strip data buffer unit is used for temporary strip data of reading.
6. macroblock decode module realizes the function of decoded macroblock;
7. the loop filtering module is used for decoded macroblock is carried out filtering;
8. image shows or memory module, is used for the demonstration and the storage of image.

Claims (13)

1, a kind of video code flow is judged the coding/decoding method of image boundary and pre-reading image data, it is characterized in that may further comprise the steps:
1) the original position decoded information unit unit header information of search information unit;
2) information unit type identification step, if stripe cell is then read the stripe information in this information unit, otherwise this non-stripe cell of decoding and the next information unit of continuation search;
3) the decoding bar part or all of byte of taking the lead judges whether current band belongs to present image;
4) take the lead remainder bytes and continue to read the next band of present image if belong to decoding bar then; Otherwise the pre-read procedure of all bands of present image finishes;
5) read band buffer memory step, temporary respectively decoded slice header information and strip data;
6), carry out the present image decoding according to described temporary storage stripe header and strip data.
2, coding/decoding method according to claim 1 is characterized in that: in described step 2) in the information unit type identification process, if information unit is an information unit of indicating image boundary, then the pre-read procedure of all bands of present image finishes.
3, coding/decoding method according to claim 1 is characterized in that: described information unit is the NAL unit, and described stripe cell is VCL NAL unit.
4,, it is characterized in that described coding/decoding method specifically may further comprise the steps according to the described coding/decoding method of claim 1:
1) original position of first information unit of search present image;
2) read current information unit and decoded information unit header;
3) judge whether the current information unit is stripe cell, if stripe cell then jumps to step 4), otherwise the original position of decoding this non-stripe cell and searching for next information unit is returned step 2);
4) the decode full detail of slice header of first band;
First slice header that 5) will solve is placed in the slice header buffering area, the record deposit position;
6) strip data with first band is temporary in the strip data buffering area, the record deposit position;
7) original position of the next information unit of search;
8) read the current information unit and the current information unit header of decoding;
9) judge whether the current information unit is stripe cell, if then continue to carry out subsequent step; Otherwise this non-stripe cell information of decoding is returned step 7);
10) preceding several bytes of the slice header in the current stripe cell of decoding are to obtain the information that whether belongs to present image of this band;
11) judge according to the information of the current stripe information that reads and first band whether current band belongs to present image, then continue to carry out subsequent step if belong to, otherwise jump to step 15);
12) the decoding bar remaining information of taking the lead;
13) slice header that solves is placed in the slice header buffering area record deposit position;
14) strip data with current stripe cell is temporary in the strip data buffering area, and the record deposit position returns step 7);
15) present image decoding.
5, coding/decoding method according to claim 4, it is characterized in that: in the described step 10), the information in the slice header of the band in the current NAL unit of decoding is following four syntactic elements:
first_mb_in_slice,pic_parameter_set_id,Slice_type,frame_num。
6, coding/decoding method according to claim 5, it is characterized in that: the decision method in the described step 11) is for to judge whether to satisfy one of following four conditions: the 1. current pic_parameter_set_id that reads band is not equal to the pic_parameter_set_id of first band; 2. the current first_mb_in_slice that reads band equals the first_mb_in_slice of first band; 3. the Slice_type of first band greater than 4 and the current Slice_type that reads band be not equal to the Slice_type (or Slice_type-5) of first band; 4. the current frame_num that reads band is not equal to the frame_num of first band; If above-mentioned four conditions all do not satisfy, illustrate that current band belongs to present image, order execution in step 12); If above-mentioned four conditions have at least one to satisfy, then skip to step 15).
7, coding/decoding method according to claim 4, it is characterized in that: in the described step 10), syntactic element in the slice header of the band in the current NAL unit of decoding is till syntactic element pic_order_cnt_lsb solves, judge in the described step 11) whether the current pic_order_cnt_lsb that reads band is identical with the pic_order_cnt_lsb of first band, if, then the order execution in step 12); Otherwise jump to step 15).
8, coding/decoding method according to claim 4, it is characterized in that: in the described step 9), when the current information unit is not stripe cell, comprise that also one judges whether the current information unit is the step of indicating the unit of image boundary, if indicate the unit of image boundary, then skip to step 15), otherwise this non-stripe cell information of decoding is returned step 7).
9,, it is characterized in that described coding/decoding method specifically may further comprise the steps according to the described coding/decoding method of claim 2:
1) original position of first NAL unit of search present image;
2) read current NAL unit and decoding unit head;
3) judge whether current NAL unit is VCL NAL unit, if then execution in step 4), otherwise decode this NAL unit information and storage, the original position that continues to search for next NAL unit is returned step 2);
4) slice header of the current band of decoding is placed on slice header in the slice header buffering area, the record deposit position;
5) strip data with current band is temporary in the strip data buffering area, the record deposit position;
6) original position of the next NAL of search unit;
7) read current NAL unit and decoding unit head;
8) judge whether current NAL unit is VCL NAL unit, if then return step 4), if Access unitdelimiter NAL unit execution in step 9 then), otherwise return step 6) after decoding NAL unit remaining information and the storage;
9) present image decoding.
10), the described coding/decoding method of arbitrary claim in the claim 1 to 9, it is characterized in that: described present image decoding may further comprise the steps:
1) will read the ASCII stream file ASCII pointer and return previous information unit end position, this moment, all bands of present image were all read;
2) initialization decoded macroblock sequence number i=0;
3) decoded macroblock i, i increases progressively 1;
4) judge whether i equals total macroblock number that piece image comprises,, otherwise change step 3) if then the present image decoding finishes.
11, a kind of video code flow is judged the decoding device of image boundary and pre-reading image data, it is characterized in that comprising with lower module:
The information unit search module is used for the original position of search information unit;
Information unit unit header decoder module is used for decoded information unit unit header information;
Information unit type identification module, if stripe cell is then read the stripe information in this information unit, otherwise this non-stripe cell of decoding and the next information unit of continuation search;
Part slice header decoder module, the partial bytes that decoding bar is taken the lead is used to judge whether current band belongs to present image;
The band discrimination module judges whether current band belongs to present image, takes the lead remainder bytes and continue to read the next band of present image if belong to decoding bar then; Otherwise the pre-read procedure of all bands of present image finishes;
Residue slice header decoder module, the remainder bytes that decoding bar is taken the lead;
Read the band cache module, comprised with lower unit:
The slice header buffer unit is used for keeping in decoded slice header information,
The strip data buffer unit is used for temporary strip data of reading,
Macroblock decode module, the function of realization decoded macroblock;
The post processing of image module is used for carrying out subsequent operation according to raster scan order;
Image shows and memory module, is used for the demonstration and the storage of image.
12, decoding device according to claim 11 is characterized in that: described part slice header decoder module, be used for preceding four syntactic elements that decoding bar is taken the lead, and comprise with lower unit:
The frame_num decoding unit, the syntactic element frame_num during decoding bar is taken the lead;
The Slice_type decoding unit, the syntactic element Slice_type during decoding bar is taken the lead;
The first_mb_in_slice decoding unit, the syntactic element first_mb_in_slice during decoding bar is taken the lead;
The pic_parameter_set_id decoding unit, the syntactic element pic_parameter_set_id during decoding bar is taken the lead;
Described band discrimination module judges with preceding four syntactic elements of slice header whether current band belongs to present image, takes the lead remainder bytes if belong to then decoding bar; Otherwise the pre-read procedure of all bands of present image finishes.
13, decoding device according to claim 11 is characterized in that: described part slice header decoder module is used for decoding bar and takes the lead all syntactic elements till pic_order_cnt_lsb;
Described band discrimination module is used to judge that then current band belongs to present image if the pic_order_cnt_lsb of current band equals the pic_order_cnt_lsb of first band, continues decoding bar and takes the lead remainder bytes; Otherwise the pre-read procedure of all bands of present image finishes.
14, a kind of video code flow is judged the decoding device of image boundary and pre-reading image data, it is characterized in that comprising with lower module:
NAL unit searches module, the original position of search NAL unit;
NAL unit header decoder module, the header of decoding NAL unit;
NAL cell type discrimination module is if Access unit delimiter NAL unit shows that then present image finishes;
Slice header decoder module, decoding bar are taken the lead information;
Read the band cache module, comprised with lower unit:
The slice header buffer unit is used for keeping in decoded slice header information;
The strip data buffer unit is used for temporary strip data of reading;
Macroblock decode module, the function of realization decoded macroblock;
The loop filtering module is used for decoded macroblock is carried out filtering;
Image shows or memory module, is used for the demonstration and the storage of image.
CN 200510110913 2005-11-29 2005-11-29 Decoding method using video code flow to judge picture boundary and reading in advance picture data, and apparatus therefor Expired - Fee Related CN100481953C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200510110913 CN100481953C (en) 2005-11-29 2005-11-29 Decoding method using video code flow to judge picture boundary and reading in advance picture data, and apparatus therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200510110913 CN100481953C (en) 2005-11-29 2005-11-29 Decoding method using video code flow to judge picture boundary and reading in advance picture data, and apparatus therefor

Publications (2)

Publication Number Publication Date
CN1980392A true CN1980392A (en) 2007-06-13
CN100481953C CN100481953C (en) 2009-04-22

Family

ID=38131358

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200510110913 Expired - Fee Related CN100481953C (en) 2005-11-29 2005-11-29 Decoding method using video code flow to judge picture boundary and reading in advance picture data, and apparatus therefor

Country Status (1)

Country Link
CN (1) CN100481953C (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102595123A (en) * 2011-01-14 2012-07-18 华为技术有限公司 Stripe coding method and device thereof as well as stripe decoding method and device thereof
WO2012109990A1 (en) * 2011-02-16 2012-08-23 Mediatek Inc. Method and apparatus for slice common information sharing
WO2014048225A1 (en) * 2012-09-26 2014-04-03 中兴通讯股份有限公司 Coding and decoding method and device with parameter set and electronic device
CN107396116A (en) * 2012-01-30 2017-11-24 三星电子株式会社 Video coding and decoding device and non-transitory computer-readable storage media
WO2018023553A1 (en) * 2016-08-04 2018-02-08 SZ DJI Technology Co., Ltd. Parallel video encoding
CN110213650A (en) * 2019-05-17 2019-09-06 芯原微电子(成都)有限公司 The method and device of synchronization character in a kind of software fast search video code flow
CN110765138A (en) * 2019-10-31 2020-02-07 北京达佳互联信息技术有限公司 Data query method, device, server and storage medium

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012095030A1 (en) * 2011-01-14 2012-07-19 华为技术有限公司 Slice encoding method and device and slice decoding method and device
CN102595123B (en) * 2011-01-14 2014-06-04 华为技术有限公司 Stripe coding method and device thereof as well as stripe decoding method and device thereof
CN102595123A (en) * 2011-01-14 2012-07-18 华为技术有限公司 Stripe coding method and device thereof as well as stripe decoding method and device thereof
WO2012109990A1 (en) * 2011-02-16 2012-08-23 Mediatek Inc. Method and apparatus for slice common information sharing
KR101372965B1 (en) * 2011-02-16 2014-03-12 미디어텍 인크. Method and apparatus for slice common information sharing
CN107396116B (en) * 2012-01-30 2020-03-27 三星电子株式会社 Video encoding and decoding apparatus and non-transitory computer-readable storage medium
CN107396116A (en) * 2012-01-30 2017-11-24 三星电子株式会社 Video coding and decoding device and non-transitory computer-readable storage media
WO2014048225A1 (en) * 2012-09-26 2014-04-03 中兴通讯股份有限公司 Coding and decoding method and device with parameter set and electronic device
US11477473B2 (en) 2012-09-26 2022-10-18 Zte Corporation Methods and devices for encoding and decoding using parameter sets, and electronic equipment
CN109155850A (en) * 2016-08-04 2019-01-04 深圳市大疆创新科技有限公司 parallel video coding
US10958923B2 (en) 2016-08-04 2021-03-23 SZ DJI Technology Co., Ltd. Parallel video encoding
WO2018023553A1 (en) * 2016-08-04 2018-02-08 SZ DJI Technology Co., Ltd. Parallel video encoding
CN110213650A (en) * 2019-05-17 2019-09-06 芯原微电子(成都)有限公司 The method and device of synchronization character in a kind of software fast search video code flow
CN110213650B (en) * 2019-05-17 2022-02-15 芯原微电子(成都)有限公司 Method and device for rapidly searching synchronous words in video code stream by software
CN110765138A (en) * 2019-10-31 2020-02-07 北京达佳互联信息技术有限公司 Data query method, device, server and storage medium
CN110765138B (en) * 2019-10-31 2023-01-20 北京达佳互联信息技术有限公司 Data query method, device, server and storage medium

Also Published As

Publication number Publication date
CN100481953C (en) 2009-04-22

Similar Documents

Publication Publication Date Title
CN100481953C (en) Decoding method using video code flow to judge picture boundary and reading in advance picture data, and apparatus therefor
CN101228795B (en) Method and apparatus for weighted prediction for scalable video coding
CN101232616B (en) Method for random access and gradual picture refresh in video coding
CN105392008B (en) A kind of prediction coding and decoding method and corresponding coding and decoding device and electronic equipment
CN107995494B (en) The compression method and decompressing method, computer installation, computer readable storage medium of video image data
TWI375469B (en) A method and apparatus for decoding/encoding a video signal
CN103718557B (en) Method for decoding video
CN104106264B (en) Metadata assisted video decoding
JP3544852B2 (en) Video coding device
CN101485208A (en) Methods and apparatus for multi-view video encoding and decoding
CN100508585C (en) Apparatus and method for controlling reverse-play for digital video bit stream
US7916785B2 (en) Image processing apparatus and method
CN1121673A (en) Method and apparatus for efficient addressing of dram in a video decompression processor
CN101283599A (en) Region of interest H.264 scalable video coding
CN103281529A (en) Image signal decoding apparatus, image signal decoding method, image signal encoding apparatus, image signal encoding method, and program
CN101455085A (en) Image decoding device
CN101115195B (en) Macroblock grade coupled decoding and loop filtering method and apparatus for video code stream
US7848410B2 (en) Video decoding methods and devices
US6178203B1 (en) Method and apparatus for two-row decoding of MPEG video
CN100361152C (en) Method and device for detecting watermark
KR20020027314A (en) Storage of compressed data items
CN100488253C (en) Decoding method and decoder for video code flow crossing multiple strip bands
CN100546390C (en) In picture coding course, realize the method for adaptive scanning
US20060268989A1 (en) Bit stream generation method and bit stream generatation apparatus
KR20010034304A (en) Variable-length encoder

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
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090422

Termination date: 20111129