Abstract:
Presented herein is a dual context audio parser. A header of the audio frame is provided for parsing, the header forming a portion of a particular packet. A first portion of the audio frame is provided for parsing, the first portion of the audio frames being stored in a memory. A second portion of the audio frame is provided for parsing, the second portion of the audio frame forming another portion of the particular packet, after the first portion is parsed.

Description:
RELATED APPLICATIONS  
       [0001]     [Not Applicable] 
       FEDERALLY SPONSORED RESEARCH OR DEVELOPMENT  
       [0002]     [Not Applicable] 
       [MICROFICHE/COPYRIGHT REFERENCE] 
       [0003]     [Not Applicable] 
       BACKGROUND OF THE INVENTION  
       [0004]     The audio frames include a frame header and frame data. Pursuant to MPEG-1 Layer 3 (MP3), the packets are of fixed length. The packets are associated with, and carry at least a portion of, an audio frame. However, where the audio frame associated with a packet comprises less data than the length of the packet, the data from the next audio frame is packed into the packet to match the packet length.  
         [0005]     When a receiver receives packets, the receiver parses the audio frames. Parsing the audio frames includes parsing the audio frame header followed by the audio frame data. The audio frame header includes information used to parse the audio frame data. However, in cases where a portion of the audio frame data is packed into a previous packet, the portion is encountered before the audio frame header.  
         [0006]     Further limitations and disadvantages of conventional and traditional approaches will become apparent to one of ordinary skill in the art through comparison of such systems with the present invention as set forth in the remainder of the present application with reference to the drawings.  
       BRIEF SUMMARY OF THE INVENTION  
       [0007]     Presented herein is a dual context audio parser.  
         [0008]     In one embodiment, there is presented a method for parsing an audio frame. The method comprises providing a header of the audio frame for parsing, the header forming a portion of a particular packet, providing a first portion of the audio frame for parsing, the first portion of the audio frames being stored in a memory, and providing a second portion of the audio frame for parsing, the second portion of the audio frame forming another portion of the particular packet, after parsing the first portion.  
         [0009]     In another embodiment, the second portion immediately follows the header in the particular audio frame.  
         [0010]     In another embodiment, the first portion of the audio frame forms a portion of another packet, the another packet being received immediately before the particular packet.  
         [0011]     In another embodiment, the method further comprises storing a first portion of another audio frame.  
         [0012]     In another embodiment, the first portion of the another audio frame immediately follows the second portion of the particular audio frame.  
         [0013]     In another embodiment, storing the first portion of the another audio frame further comprises storing the portion of the another audio frame in a first memory, and the method further comprises storing the second portion in a second memory.  
         [0014]     In another embodiment, the method further comprises storing the header of the audio frame in the second memory.  
         [0015]     In another embodiment, there is presented a system for parsing an audio frame. The system comprises host feed logic, a main FIFO, and a reservoir FIFO. The host feed logic receives a packet. The main FIFO stores an audio frame header and at least a portion of audio frame data associated with the audio frame header, from the packet. The reservoir FIFO stores a portion of audio frame data from another audio frame, from the packet.  
         [0016]     In another embodiment, the at least the portion of audio frame data associated with the audio frame header immediately follows the audio frame header in the packet.  
         [0017]     In another embodiment, the portion of audio frame data from another audio frame immediately follows the at least the portion of audio frame data associated with the audio frame header.  
         [0018]     In another embodiment, an audio frame header for the current audio frame and another portion of audio frame data from future audio frame form a portion of another packet.  
         [0019]     In another embodiment, the system further comprises a circuit for fetching the header of the current audio frame from the main FIFO, fetching the portion of the future audio frame from the reservoir FIFO, and fetching the another portion of the another audio frame from the main FIFO after fetching the portion of the another audio frame from the reservoir FIFO.  
         [0020]     These and other features and advantages of the present invention may be appreciated from a review of the following detailed description of the present invention, along with the accompanying figures in which like reference numerals refer to like parts throughout.  
     
    
     BRIEF DESCRIPTION OF SEVERAL VIEWS OF THE DRAWINGS  
       [0021]      FIG. 1  is a block diagram describing packets carrying audio frames;  
         [0022]      FIG. 2  is a flow diagram for parsing audio frames in accordance with an embodiment of the present invention;  
         [0023]      FIG. 3  is a block diagram of a receiver in accordance with an embodiment of the present invention;  
         [0024]      FIG. 4  is a flow diagram describing the operation of the host feed logic in accordance with an embodiment of the present invention; and  
         [0025]      FIG. 5  is a flow diagram describing the operation of the extractor state machine in accordance with an embodiment of the present invention.  
     
    
     DETAILED DESCRIPTION OF THE INVENTION  
       [0026]     Referring now to  FIG. 1 , there is illustrated a block diagram of packets  105  carrying audio frames  110 . The audio frames  110  include a frame header  110   a  and frame data. Pursuant to MPEG-1 Layer 3 (MP3), the packets  105  are of fixed length. The packets  105  are associated with, and carry at least a portion of, an audio frame  110 . However, where the audio frame  110  associated with a packet  105  comprises less data than the length of the packet  105 , the data from the next audio frame  110  is packed into the packet  105  to match the packet length.  
         [0027]     For example, packet  105 ( n− 1) is associated with audio frame  110 ( n− 1), and packet  105 ( n ) is associated with audio frame  110 ( n ). Accordingly, packet  105 ( n− 1) carries audio frame header  110   a ( n− 1) and audio frame data  110   b ( n− 1), while packet  105 ( n ) carries audio frame header  110   a ( n ) and audio frame data  110   b ( n ). However, the audio frame  110 ( n ) comprises less data than the length of the packet  105 ( n ). A portion  110   b ′( n+ 1) from the audio frame data  110   b ( n+ 1) is packed into packet  105 ( n ). The audio frame header  110   a ( n+ 1) and the remaining portion  110   b ″( n+ 1) of the audio frame data  110   b ( n+ 1) are carried in packet  105 ( n+ 1).  
         [0028]     When a receiver receives packets  105 , the receiver parses the audio frames  110 . Parsing the audio frames  110  includes parsing the audio frame header  110   a  followed by the audio frame data  110   b . The audio frame header  110   a  includes information used to parse the audio frame data  110   b . However, in cases where a portion of the audio frame data  110   b ′ is packed into a previous packet  105 , the portion  110   b ′ is encountered before the audio frame header  110   a . For example, audio frame data portion  110   b ′( n+ 1) is encountered before the audio frame header  110   a ( n+ 1). In order to parse audio frame data portion  110   b ′( n+ 1), the audio fame data portion  110   b ′( n+ 1) is stored until the audio frame header  110   a ( n+ 1) is parsed. After parsing audio frame header  110   a ( n+ 1), the audio frame data portion  110   b ′( n+ 1) is retrieved from storage and parsed. After the portion of the audio frame data  110   b ′( n+ 1) is parsed, the remaining portion of the audio frame data  110   b ″( n+ 1) is parsed.  
         [0029]     Referring now to  FIG. 2 , there is illustrated a block diagram for parsing audio frames. At  205 , a particular packet is selected. At  210 , the audio frame header  110   a  is parsed. If a portion  110   b ′ of the audio frame data  110   b  is carried in another packet  105  at  215 , such as the previous packet, the portion of the audio frame data  110   b ′ stored in the another packet  105  is parsed at  220 . If at  215 , there is no portion of the audio frame data  110   b ′ carried in another packet  105 ,  220  is bypassed.  
         [0030]     At  225 , the audio frame data  110   b  carried in the packet  105  is parsed. At  230 , a determination is made whether a portion of another audio frame data  110   b ′ is stored in the packet  105 . If a portion of another audio frame data  100   b ′ is stored in the packet  105 , the portion of another audio frame data  110   b ′ is stored at  235 . Otherwise,  235  is bypassed. The foregoing,  205 - 235 , is then repeated for the next packet  105 .  
         [0031]     Referring now to  FIG. 3 , there is illustrated a block diagram of a receiver  300  for parsing audio frames in accordance with an embodiment of the present invention. The receiver  300  comprises host feed logic  305 , a main FIFO  310 , a reservoir FIFO  315 , an extractor data path  320 , and an extractor state machine  325 .  
         [0032]     The host feed logic  305  receives packets  105 . When the host feed logic  305  receives a packet  105 , the host feed logic  305  places the audio frame header  110   a  and the audio frame data  110   b  of the data audio frame  110  associated with the packet into the main FIFO  310 .  
         [0033]     However, where the audio frame  110  comprises less data than the length of the packet  105 , a portion of the next audio frame data  110   b ′ is carried in the packet  105  to fill the length of the packet. Where the packet  105  includes a portion of the next audio frame data  110   b ′, the host feed logic  305  writes the portion of the next audio frame data  110   b ′ in the reservoir FIFO  315 .  
         [0034]     For example, packet  105 ( n ) carries audio frame header  110   a ( n ), audio frame data  110   b ( n ), and a portion of audio frame data  110   b ′( n+ 1). When the host feed logic  305  receives packet  105 ( n ), the host feed logic  305  writes the audio frame header  110   a ( n ) and the audio frame data  110   b ( n ) in the main FIFO  310 . The host feed logic  305  writes the audio frame data  110   b ′( n+ 1) into the reservoir FIFO  315 .  
         [0035]     The extractor data path  320  provides the audio frames  110  for parsing. The extractor state machine  325  controls the extractor data path  320 . The extractor state machine  325  causes the extractor data path  320  to fetch and output audio frame headers  110   a  followed by audio frame data  110   b.    
         [0036]     As noted above, some audio frames  110  may include audio frame data  110   b  that is stored in both the main FIFO  310  and the reservoir FIFO  315 . For example, the portion of audio frame data  110   b ′( n+ 1) gets stored in the reservoir FIFO  315 , while the audio frame header  110   a ( n+ 1) and the portion of audio frame data  110   b ″( n+ 1) get stored in the main FIFO  310 .  
         [0037]     When the extractor data path  320  provides the audio frame header  110   a ( n+ 1) for parsing, the extractor state machine  325  detects that the audio frame data portion  110   b ′( n+ 1) is not stored in the main FIFO  315 . Upon detecting that the audio frame data portion  110   b ′( n+ 1) is not stored in the main FIFO  315 , the extractor state machine  325  causes the extractor data path  320  to fetch and provide the audio frame data portion  110   b ′( n+ 1) from the reservoir FIFO  310  for parsing. When the extractor data path  320  finishes fetching and providing audio frame data portion  110  for parsing, the extractor state machine  325  detects the foregoing and causes the extractor data path  110  to fetch and provide the remaining portion of the audio frame data  110   b ″( n+ 1) from the reservoir FIFO  310  for parsing.  
         [0038]     Referring now to  FIG. 4 , there is illustrated a flow diagram describing the operation of the host feed logic  305  in accordance with an embodiment of the present invention. At  405 , a particular packet  105  is received. At  410 , the audio frame header  110   a  of the audio frame  110  associated with the packet  105  received during  405  is written to the main FIFO  310 . At  415 , the audio frame data  110   b  of the audio frame  110  associated with the packet  105  is written to the main FIFO  310 .  
         [0039]     As noted above, if an audio frame  110  comprises less data than the packet  105  associated therewith, a portion of the audio frame data  110   b ′ from the next audio frame is also carried in the packet  105 . Accordingly, at  420 , a determination is made whether the packet  105  carries a portion of the next audio frame data  110   b′.    
         [0040]     If during  420 , the packet  105  does carry a portion of the next audio frame data  110   b , the portion of the next audio frame data  110   b ′ is written ( 425 ) to the reservoir FIFO. If the packet  105  does not carry a portion of the next audio frame data  110   b ,  425  is bypassed. The host feeder logic  305  then repeats  405  for the next packet.  
         [0041]     Referring now to  FIG. 5 , there is illustrated a block diagram describing the operation of the extractor data path  320  and the extractor state machine  325  in accordance with an embodiment of the present invention. At  505 , the extractor state machine  325  provides the audio frame header  110   a  from the main FIFO  310  for parsing. At  510 , a determination is made whether a portion of the audio frame data  110   b ′ was carried in a different packet  105  from the packet  105  carrying the audio frame header  110   a.    
         [0042]     As noted above, if the previous audio frame  110  comprises less data than the packet  105  length associated therewith, a portion of the audio frame data  110   b ′ is also carried in the packet  105 . In the foregoing case, the host feed logic  320  writes the portion of the audio frame data  110   b ′ to the reservoir FIFO  315 .  
         [0043]     If at  510 , a portion of the audio frame data  110   b ′ was carried in a different packet  105 , the extractor data path  320  fetches and provides ( 515 ) the portion of the audio frame data  110   b ′ from the reservoir FIFO  315  for parsing. If at  510 , no portion of the audio frame data  110   b ′ was carried in a different packet,  515  is bypassed. At  520 , the extractor data path  320  fetches either the remaining portion of the audio frame data  110   b ″ or the entire audio frame data lob from the main FIFO  315 .  
         [0044]     The embodiments described herein may be implemented as a board level product, as a single chip, application specific integrated circuit (ASIC), or with varying levels of the decoder system integrated with other portions of the system as separate components. The degree of integration of the decoder system will primarily be determined by the speed and cost considerations. Because of the sophisticated nature of modern processor, it is possible to utilize a commercially available processor, which may be implemented external to an ASIC implementation. Alternatively, if the processor is available as an ASIC core or logic block, then the commercially available processor can be implemented as part of an ASIC device wherein certain functions can be implemented in firmware.  
         [0045]     While the present invention has been described with reference to certain embodiments, it will be understood by those skilled in the art that various changes may be made and equivalents may be substituted without departing from the scope of the present invention. In addition, many modifications may be made to adapt a particular situation or material to the teachings of the present invention without departing from its scope. Therefore, it is intended that the present invention not be limited to the particular embodiment disclosed, but that the present invention will include all embodiments falling within the scope of the appended claims.