This application is based upon and claims the benefit of priority from prior Japanese Patent Application No. 2011-120931, filed May 30, 2011, the entire contents of which are incorporated herein by reference.
Embodiments described herein relate generally to a video server and a data recording and playback method.
A data file encoded based on H.264 includes a plurality of picture slices forming a picture included in a sequence, a sequence parameter set (SPS) including information on encoding of the entire sequence, and a picture parameter set (PPS) including information on encoding of the entire picture. The sequence corresponds to the entire compressed moving image. The picture is one screen forming the sequence. A unit of a predetermined number of picture slices, based on which a picture can be decoded independently of another picture slice is called a random access unit (RAU). The RAU may include the SPS and/or PPS. The concept of an RAU in H.264 is similar to that of group of pictures (GOP) in MPEG-2.
When these types of data files are played back, a plurality of picture slices included in the RAU need to be decoded based on the SPS and PPS. If the encoding method is MPEG-2, a sequence can be played back from the middle without complicated processing by decoding the GOP because all information necessary for decoding is included in a GOP header.
However, if the encoding method is H.264, the SPS and PPS are not always the first and second data units in an RAU to be read. For example, if an RAU to be read is not the first RAU in a sequence, the SPS and PPS necessary for decoding the RAU may not be in the RAU to be read, but may be the first and second data units in the first RAU in the sequence. To play back such a sequence from the middle, it is necessary to first send to a decoder the SPS and PPS, which are the first and second data units in the first RAU in the sequence, and then send to the decoder the picture slices included in the RAU to be read. Further, the SPS and PPS may be in an RAU in the middle of a sequence, which is not the RAU to be read. In such a case, the SPS and PPS for decoding the picture slices included in the RAU to be read need to be searched for in the sequence. As a result of that, complicated processing is required.
In general, according to one embodiment, a video server includes an analyzer and a storage. The analyzer detects a sequence parameter set and a picture parameter set in a stream of a data file includes picture slices forming a picture included in a sequence, sequence parameter sets necessary for decoding the sequence, and picture parameter sets necessary for decoding the picture. The analyzer stores the detected sequence parameter set and picture parameter set. When the analyzer detects a first picture slice in a random access unit in the stream, the analyzer generates an additional header including all sequence parameter sets and picture parameter sets in the stream of the data file, which are stored before detection of the first picture slice. The random access unit includes the picture slices. The analyzer inserts the additional header immediately before the random access unit. The storage stores the data file in which the additional header is inserted.
The analyzer 11 receives a data file converted based on H.264. The data file includes a plurality of picture slices forming a picture included in a sequence, a sequence parameter set (SPS), and a picture parameter set (PPS). The sequence corresponds to the entire encoded moving image.
One or more units of a predetermined number of picture slices form one picture included in the sequence. A unit including an SPS, a PPS, and the predetermined number of picture slices is called a random access unit (RAU). The RAU does not always include the SPS and PPS. The picture slice is provided with a header, and the header includes a number of a PPS referred to at the time of decoding.
The SPS includes information on encoding of the entire sequence, such as a profile, a level, and an encoding mode of the entire sequence. The SPS is not always the first data unit in the first RAU of the sequence.
The PPS includes information on encoding of the entire picture, such as an entropy encoding mode and a quantization parameter initialization value for each picture. The PPS also includes a number of an SPS referred to at the time of decoding. The PPS is not attached to all the pictures. However, an SPS referred by a PPS must be provided before the PPS.
In accordance with an instruction from the controller 14, the analyzer 11 analyzes the received data file and detects an RAU. If the detected RAU includes an SPS and/or PPS before the first picture slice in the RAU, the analyzer 11 generates an additional header including the SPS and PPS and all the SPSs and PPSs included in the RAUs detected in the data file before the RAU. The additional header is a header newly added to enable easy random access at the time of playback. The analyzer 11 inserts the generated additional header between the detected RAU and the RAU detected last, i.e., immediately before the detected RAU. The analyzer 11 performs this processing for all the RAUs included in the data file. The analyzer 11 outputs the data file in which the additional header has been inserted to the storage 12.
In accordance with an instruction from the controller 14, the storage 12 stores the data file output from the analyzer 11.
The storage 12 also reads a stored data file in accordance with an instruction from the controller 14. When the storage 12 reads the picture slices included in an RAU, the storage 12 reads all the SPSs and PPSs written in the additional header positioned immediately before the RAU, and then reads the picture slices included in the RAU. The storage 12 outputs the read SPSs, PPSs and picture slices to the decoder 13.
In accordance with an instruction from the controller 14, the decoder 13 decodes each picture slice included in the RAU using a PPS designated by the number included in the picture slice and an SPS designated by the number included in the PPS among the SPSs and PPSs written in the additional header immediately before the RAU. The decoder 13 outputs a video signal obtained by decoding to the subsequent stage.
The controller 14 controls the operation of the video server 10.
Next, the operation of the video server 10 configured as described above will be described. First, the case where the video server 10 records a data file having an H.264-encoded stream configuration will be described.
The data file shown in
In the processing shown in
The second data unit in RAU 1 is PPS #1. After performing step S21, the analyzer 11 detects PPS #1 in step S23 (step S23). The analyzer 11 stores PPS #1 detected in step S23 in the inner memory (step S24), and proceeds to step S21.
The third data unit in RAU 1 is picture slice #1, which is the first picture slice in RAU 1. After performing steps S21, S23, the analyzer 11 detects picture slice #1 in step S25 (step S25). When the analyzer 11 detects the first picture slice #1 in RAU 1 (Yes in step S25), the analyzer 11 generates additional header #1 including SPS #1 and PPS #1. The analyzer 11 inserts additional header #1 before SPS #1, which is the first data unit in RAU 1 (step S26). The arrow directed to additional header #1 in
Subsequently, the analyzer 11 determines whether the data stream has ended (step S27). If the data stream continues (No in step S27), the analyzer 11 proceeds to step S21. If the data stream has ended (Yes in step S27), the analyzer 11 finishes processing. The analyzer 11 repeats steps S21-s27 until the data stream ends.
The fourth data unit in RAU 1 is picture slice #2. After performing steps S21, S23, the analyzer 11 detects picture slice #2 in step S25. Since picture slice #2 is not the first picture slice in RAU 1 (No in step S25), the analyzer 11 proceeds to step S21.
After picture slice #2, RAU 2 is detected. The first data unit in RAU 2 is SPS #2. The analyzer 11 detects SPS #2 (Yes in step S21), and stores the detected SPS #2 in the inner memory (step S22).
The second data unit in RAU 2 is picture slice #3, which is the first picture slice in RAU 2. After performing steps S21, S23, the analyzer 11 detects picture slice #3 in step S25 (step S25). Since picture slice #3 is the first picture slice in RAU 2 (Yes in step S25), the analyzer 11 inserts additional header #2 including SPS #1, PPS #1 and SPS #2 before SPS #2, which is the first data unit in RAU 2 (step S26). The arrow directed to additional header #2 in
The third data unit in RAU 2 is PPS #2. After performing step S21, the analyzer 11 detects PPS #2 in step S 23 (Yes in step S23), and stores the detected PPS #2 in the inner memory (step S24).
The fourth data unit in RAU 2 is PPS #3. After performing step S21, the analyzer 11 detects PPS #3 in step S23 (Yes in step S23), and stores the detected PPS #3 in the inner memory (step S24).
The fifth data unit in RAU 2 is picture slice #4. After performing steps S21, S23, the analyzer 11 detects picture slice #4 in step S25. Since picture slice #4 is not the first picture slice in RAU 2 (No in step S25), the analyzer 11 proceeds to step S21.
After picture slice #4, RAU 3 is detected. The first data unit in RAU 3 is picture slice #5, which is the first picture slice in RAU 3. After performing steps S21, S23, the analyzer 11 detects picture slice #5 in step S25. Since picture slice #5 is the first picture slice in RAU 3 (Yes in step S25), the analyzer 11 inserts additional header #3 including SPS #1, PPS #1, SPS #2, PPS #2 and PPS #3 before picture slice #5, which is the first data unit in RAU 3 (step S26). The arrow directed to additional header #3 in
The second data unit in RAU 3 is picture slice #6. After performing steps S21, S23, the analyzer 11 detects picture slice #6 in step S25. Since picture slice #6 is not the first picture slice in RAU 3 (No in step S25), the analyzer 11 proceeds to step S21.
After picture slice #6, RAU 4 is detected. The first data unit in RAU 4 is picture slice #7, which is the first picture slice in RAU 4. After performing steps S21, S23, the analyzer 11 detects picture slice #7 in step S25. Since picture slice #7 is the first picture slice in RAU 4 (Yes in step S25), the analyzer 11 inserts additional header #3 including SPS #1, PPS #1, SPS #2, PPS #2 and PPS #3 before picture slice #7, which is the first data unit in RAU 4 (step S26).
The analyzer 11 stops processing shown in
Next, a case where the video server 10 plays back a recorded data file will be described.
In accordance with a playback instruction from the controller 14, the storage 12 reads a stored data file. Hereinafter, a case where the data file shown in
When the storage 12 receives from the controller 14 the playback instruction to play back the data file from RAU 2, the storage 12 reads the stored data file from a corresponding position. For example, the storage 12 reads SPS #1, PPS #1 and SPS #2 in additional header #2 situated before SPS #2, which is the first data unit in RAU 2. Then, the storage 12 reads picture slices #3, #4 included in RAU 2. The storage 12 outputs the read SPS #1, PPS #1, SPS #2 and picture slices #3, #4 to the decoder 13.
The decoder 13 takes out PPS #1 designated by PPS=1 assigned to picture slices #3, #4 from the SPS #1, PPS #1 and SPS #2 output from the storage 12 (step S51). The decoder 13 takes out SPS #1 designated by SPS=1 assigned to PPS #1 from the SPS #1, PPS #1 and SPS #2 output from the storage 12 (step S52).
The decoder 13 decodes picture slices #3, #4 using the SPS #1 and PPS #1 taken out (step S53). The decoder 13 outputs a video signal obtained by decoding to the subsequent stage.
Subsequently, the decoder 13 determines whether the stream has ended (step S54). If the stream continues (No in step S54), the decoder 13 proceeds to step S51, and processes RAU 3. If the stream has ended (Yes in step S54), the decoder 13 finishes processing.
The decoder 13 also stops the processing shown in
In the above-described embodiment, the analyzer 11 inserts, before the first data unit in the RAU, an additional header including all the SPSs and PPSs detected in the data file before the first picture slice included in the detected RAU. The analyzer 11 does not write the selected SPS and PPS in the additional header but select only an SPS and PPS necessary for decoding the RAU. Therefore, the processing load on the analyzer 11 is small. Further, the analyzer 11 stores in the storage 12 a stream in which the additional header has been inserted before the first data unit of each RAU. Therefore, the SPS and PPS necessary for decoding each RAU are recorded in association with the RAU.
In the above-described embodiment, the decoder 13 reads the additional header situated before the first data unit in the RAU to be played back, and takes out an SPS and PPS necessary for decoding the picture slices included in the RAU from the SPSs and PPSs in the additional header. Then, the decoder 13 decodes the picture slices using the SPS and PPS taken out. Therefore, even if an RAU to be played back is in the middle of a sequence, picture slices included in the RAU can be decoded from the position in order. Since complicated processing, such as searching for an SPS and PPS situated before the RAU, is unnecessary, the order of steps for reading each data unit from the data file stored in the storage 12 is not complicated.
Accordingly, the video server of the present embodiment can play back a stored sequence from the middle with simpler processing.
In the above-described embodiment, the data file has the stream structure shown in
In such a case, the storage 12 reads the SPS and/or PPS included in the RAU in addition to the picture slices included in the RAU, and SPSs and PPSs in the additional header. The storage 12 outputs the read SPSs, PPSs and picture slices to the decoder 13.
The decoder 13 takes out a PPS designated by a number assigned to the picture slices from PPSs output from the storage 12. The decoder 13 takes out an SPS designated by a number assigned to the PPS taken out.
The decoder 13 decodes the picture slices using the SPS and PPS taken out. The decoder 13 outputs a video signal obtained by decoding to the subsequent stage.
While certain embodiments have been described, these embodiments have been presented by way of example only, and are not intended to limit the scope of the inventions. Indeed, the novel embodiments described herein may be embodied in a variety of other forms; furthermore, various omissions, substitutions and changes in the form of the embodiments described herein may be made without departing from the spirit of the inventions. The accompanying claims and their equivalents are intended to cover such forms or modifications as would fall within the scope and spirit of the inventions.
Number | Date | Country | Kind |
---|---|---|---|
2011-120931 | May 2011 | JP | national |
Number | Name | Date | Kind |
---|---|---|---|
6529550 | Tahara et al. | Mar 2003 | B2 |
7602526 | Kandono et al. | Oct 2009 | B2 |
7688471 | Kadono et al. | Mar 2010 | B2 |
7809060 | Toma et al. | Oct 2010 | B2 |
7843994 | Toma et al. | Nov 2010 | B2 |
20060056705 | Kadono et al. | Mar 2006 | A1 |
20060153463 | Notoya et al. | Jul 2006 | A1 |
20060171600 | Kikuchi | Aug 2006 | A1 |
20070104455 | Kikuchi | May 2007 | A1 |
20070110390 | Toma | May 2007 | A1 |
20080117988 | Toma et al. | May 2008 | A1 |
20080118218 | Toma et al. | May 2008 | A1 |
20080118224 | Toma et al. | May 2008 | A1 |
20080131079 | Toma et al. | Jun 2008 | A1 |
20080216116 | Pekonen et al. | Sep 2008 | A1 |
20080219393 | Toma et al. | Sep 2008 | A1 |
20090010323 | Su et al. | Jan 2009 | A1 |
20090316781 | Kadono et al. | Dec 2009 | A1 |
20090323815 | Kadono et al. | Dec 2009 | A1 |
20100020883 | Miyauchi et al. | Jan 2010 | A1 |
20100329632 | Mizutani | Dec 2010 | A1 |
20110200095 | Kadono et al. | Aug 2011 | A1 |
20130064284 | Samuelsson et al. | Mar 2013 | A1 |
Number | Date | Country |
---|---|---|
2004-248255 | Sep 2004 | JP |
2007-325289 | Dec 2007 | JP |
Entry |
---|
Office Action received in Japanese Patent Application No. 2011-120931, mailed on Apr. 9, 2013; 4 pages. |
Number | Date | Country | |
---|---|---|---|
20120307911 A1 | Dec 2012 | US |