WO2010125616A1 - 符号化ストリーム復号装置 - Google Patents

符号化ストリーム復号装置 Download PDF

Info

Publication number
WO2010125616A1
WO2010125616A1 PCT/JP2009/004878 JP2009004878W WO2010125616A1 WO 2010125616 A1 WO2010125616 A1 WO 2010125616A1 JP 2009004878 W JP2009004878 W JP 2009004878W WO 2010125616 A1 WO2010125616 A1 WO 2010125616A1
Authority
WO
WIPO (PCT)
Prior art keywords
decoding
stream
circuit
invalidation
control
Prior art date
Application number
PCT/JP2009/004878
Other languages
English (en)
French (fr)
Inventor
森江太士
宮阪修二
蔵田和司
工藤洋介
Original Assignee
パナソニック株式会社
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 パナソニック株式会社 filed Critical パナソニック株式会社
Priority to CN200980157961.0A priority Critical patent/CN102349272A/zh
Priority to JP2011511191A priority patent/JPWO2010125616A1/ja
Publication of WO2010125616A1 publication Critical patent/WO2010125616A1/ja
Priority to US13/234,830 priority patent/US20120005562A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/30Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
    • H03M7/40Conversion to or from variable length codes, e.g. Shannon-Fano code, Huffman code, Morse code
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/75Media network packet handling
    • H04L65/762Media network packet handling at the source 
    • 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/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
    • H04N19/89Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving methods or arrangements for detection of transmission errors at the decoder
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/005Correction of errors induced by the transmission channel, if related to the coding algorithm

Definitions

  • the present invention relates to a signal processing apparatus that handles stream data, and more particularly, to an encoded stream decoding apparatus that includes variable-length encoded data.
  • variable-length code decoding device described in Patent Document 1 has a configuration in which an error can be easily detected when a bitstream to be decoded is incorrect.
  • the variable length code decoding device includes a first storage unit 1, a decoding unit 2, a timer unit 3, and a control unit 4.
  • the first storage unit 1 stores the received variable length code data.
  • the decoding unit 2 decodes the Huffman code read from the first storage unit 1.
  • the timer unit 3 outputs a time-up signal after a predetermined time has elapsed from the start of decoding by the decoding unit 2.
  • the control unit 4 forcibly terminates the decoding by the decoding unit 2 based on the time-up signal from the timer unit 3.
  • JP 2002-185332 A (page 3-11, FIG. 1 etc.)
  • the present invention solves the above-described problems, and an object of the present invention is to provide an encoded stream decoding apparatus that can efficiently detect errors in a system that requires high-speed and complicated processing.
  • the present invention detects a stream error based on the total consumed stream amount after the decoding process and the number of decoding processes, so that it does not wait for a long timeout period. To do.
  • the encoded stream decoding apparatus of the present invention includes a buffer unit that stores a stream input from the outside, a decoding unit that performs a variable-length code decoding process on the stream stored in the buffer unit, and the decoding unit A control unit for generating a control signal for controlling the operation and outputting the control signal to the decoding unit, a threshold setting unit for storing a threshold value of a consumption stream consumed by the decoding unit, a threshold value of the threshold setting unit, And an invalidating unit that generates a decoding invalidation signal based on the consumed stream amount consumed by the decoding unit and outputs the decoding invalidation signal to the control unit.
  • the encoded stream decoding apparatus further comprises a filling confirmation means for confirming that a sufficient amount of stream considering the threshold stored by the threshold setting means is stored in the buffer means. Is characterized in that the decoding means waits until the filling of the stream is confirmed by the filling confirmation means.
  • the present invention provides the encoded stream decoding apparatus, wherein when the control means receives a decoding invalidation signal from the invalidation means, the control means stops the decoding operation of the decoding means by the control signal, and the decoding means When the invalidation means generates a decoding invalidation signal, the decoding process is stopped by the control signal from the control means, and the stream is not consumed.
  • the present invention provides the encoded stream decoding apparatus, wherein the control means generates a control signal for continuing the decoding of the decoding means even when receiving the decoding invalidation signal from the invalidating means, and the decoding means comprises: The decoding invalidation signal generated by the invalidation means is received, and while receiving the decoding invalidation signal, the control means behaves as if it received the control signal generated by the control means and operated. It is characterized by that.
  • the decoding unit does not perform a decoding process while receiving a decoding invalidation signal from the invalidating unit, and generates a special value as a decoding result.
  • the decoding result of the special value is output to the control means.
  • the present invention is characterized in that, in the encoded stream decoding apparatus, the decoding means reduces power consumption such as clock down while receiving a decoding invalidation signal from the invalidation means.
  • control means determines whether or not a decoding invalidation signal is generated from the invalidating means after completion of a task consisting of a series of decoding processes, and the decoding invalidation When the control signal is generated, control for returning is performed.
  • the invalidation unit can transmit a difference between the threshold value of the threshold setting unit and the total consumption amount of the stream consumed by the decoding unit, and the buffer unit can store the internal stream.
  • a state storage unit that can transmit a state, and the state storage unit sets a new difference between the threshold and the total stream consumption when the interrupted decoding process is resumed after the decoding process in the decoding unit is interrupted.
  • the threshold setting unit is notified as a threshold value, and the stream state of the buffer unit is restored.
  • the state storage unit changes a difference between the threshold value and the total stream consumption amount and notifies the threshold setting unit, and the buffer to cope with the change.
  • the stream state of the means is changed so that the stream can be rewound or skipped.
  • the encoded stream decoding apparatus further includes another control unit that generates another control signal for controlling the operation of the decoding unit and outputs the control signal to the decoding unit. While receiving the decoding invalidation signal from the conversion means, the decoding processing based on the control signal from the other control means is executed.
  • control unit controls a plurality of tasks in parallel, and the decoding unit performs the decoding process based on any one of the plurality of tasks. While receiving the decryption invalidation signal from the invalidation means, the decryption process of another task is executed.
  • the encoded stream decoding apparatus of the present invention includes a buffer unit that stores a stream input from the outside, a decoding unit that performs a variable-length code decoding process on the stream stored in the buffer unit, and controls the operation of the decoding unit
  • a control unit that generates a control signal for output to the decoding unit, a threshold setting unit that stores a threshold of the number of times the control signal is generated by the control unit, a threshold of the threshold setting unit, and the control unit
  • an invalidating means for generating a decoding invalidation signal based on the number of generations of the control signal and notifying the control means.
  • the present invention further comprises a filling confirmation means for confirming that a predetermined amount of stream has been stored in the buffer means, and the control means uses the filling confirmation means to reduce the stream to a predetermined amount.
  • the decoding means is made to wait until it is confirmed that the charging is completed.
  • the present invention provides the encoded stream decoding apparatus, wherein when the control means receives a decoding invalidation signal from the invalidation means, the control means stops the decoding operation in the decoding means by the control signal, and the decoding means comprises: When the invalidation means generates a decoding invalidation signal, the decoding process is stopped in response to the control signal from the control means, and the stream is not consumed.
  • the consumption stream amount that has been decoded is accumulated, and when the total consumption stream amount exceeds the threshold value of the threshold setting unit, Alternatively, when the number of times the control signal is generated by the control means, that is, when the number of decoding processes exceeds the threshold value of the threshold setting means, the invalidation means immediately generates a decoding invalidation signal. It is detected immediately without generating.
  • the buffer means does not enter the underflow state until the decoding invalidation signal is generated by the invalidating means.
  • the decoding means stops the consumption of the stream, so that the buffer means can be used even when the external stream input is delayed after the generation of the decoding invalidating signal. Will not fall into an underflow condition.
  • control means it is not necessary for the control means to check for each decoding process whether or not the decoding invalidation signal is generated and whether or not the buffer means is in an underflow state. It becomes.
  • the decoding means when a decoding invalidation signal is generated, the decoding means outputs a special value, for example, 0, as a decoding result. Therefore, even if a decoding invalidation signal is generated during audio signal processing, the output is silent. Can be. Therefore, generation of noise due to stream errors is prevented without performing exception processing by the control means.
  • control means does not perform error detection every time the decoding process is executed, but after completion of the continuous series of decoding processes, obtains the presence or absence of the generation of the decoding invalidation signal from the invalidating means, Since return processing is performed as necessary, it is possible to insert error detection and return processing at predetermined regular intervals while simplifying control by the control means for executing each decoding processing.
  • the state storage means stores the difference between the threshold value and the total stream consumption and the stream state of the buffer means, the task consisting of a series of continuous decoding processes is temporarily interrupted. It is possible to perform decoding processing of other tasks and other streams, and then resume the interrupted task.
  • the difference between the threshold value and the total stream consumption is changed from the original value, and the state of the stream of the buffer means is changed correspondingly. It becomes possible to skip.
  • control means processes a plurality of tasks or when there are a plurality of control means
  • decoding invalidation signal when a decoding invalidation signal is generated, another task or other control means can use the decoding means.
  • a stream error can be detected without causing a long waiting time, so that a decoding system or multitask system that operates at high speed or a constant bit rate can be used. Even when a non-codec is handled, the relative waiting time until error detection can be effectively shortened.
  • FIG. 1 is a block diagram showing a configuration of an encoded stream decoding apparatus according to Embodiment 1 of the present invention.
  • FIG. 2 is a flowchart showing a processing example of the encoded stream decoding apparatus.
  • FIG. 3 is a block diagram showing the configuration of the encoded stream decoding apparatus according to Embodiment 2 of the present invention.
  • FIG. 4 is a flowchart showing a processing example of the encoded stream decoding apparatus.
  • FIG. 5 is a block diagram showing a configuration of an encoded stream decoding apparatus according to Embodiment 3 of the present invention.
  • FIG. 6 is a flowchart showing a processing example of the encoded stream decoding apparatus.
  • FIG. 1 is a block diagram showing a configuration of an encoded stream decoding apparatus according to Embodiment 1 of the present invention.
  • FIG. 2 is a flowchart showing a processing example of the encoded stream decoding apparatus.
  • FIG. 3 is a block diagram showing the configuration of the encoded stream decoding apparatus
  • FIG. 7 is a block diagram showing a configuration of an encoded stream decoding apparatus according to Embodiment 4 of the present invention.
  • FIG. 8 is a flowchart showing a processing example of the encoded stream decoding apparatus.
  • FIG. 9 is a block diagram showing a configuration of an encoded stream decoding apparatus according to Embodiment 5 of the present invention.
  • FIG. 10 is a block diagram showing another configuration of the encoded stream decoding apparatus.
  • FIG. 11 is a block diagram showing a configuration of an encoded stream decoding apparatus according to Embodiment 6 of the present invention.
  • FIG. 12 is a diagram illustrating an example of an encoding table.
  • FIG. 13 is a block diagram showing a configuration of a conventional variable length code decoding apparatus.
  • FIG. 1 is a block diagram showing a configuration of an encoded stream decoding apparatus according to Embodiment 1 of the present invention.
  • the encoded stream decoding apparatus shown in FIG. 1 includes a buffer circuit 11, a decoding circuit 12, a control circuit 13 made of, for example, a processor, a threshold setting circuit 14, and an invalidation circuit 15, and a stream input from the outside.
  • the variable length code is decoded.
  • the buffer circuit (buffer means) 11 is filled with a stream input from the outside in preparation for decoding processing.
  • the decoding circuit (decoding means) 12 performs a variable length decoding process corresponding to the control signal on the stream input from the buffer circuit 11, and outputs a decoding result and a consumption amount of the stream consumed at that time.
  • control circuit (control means) 13 performs various controls regarding the decoding operation of the decoding circuit 12.
  • a series of operations of the control circuit 13 is hereinafter referred to as a task.
  • the control circuit 13 generates a control signal for controlling the decoding circuit 12 and repeats the operation of receiving the decoding result.
  • a method of generating the control signal a method of determining the next control signal depending on the stream input so far, a method of determining by decoding the header portion of the stream, and the like are conceivable.
  • the threshold value setting circuit (threshold value setting means) 14 is set with a threshold value before the start of the decoding process by the outside or the control circuit 13, and outputs the threshold value to the invalidation circuit 15. Furthermore, the invalidation circuit (invalidation means) 15 calculates the sum of the stream consumptions output from the decoding circuit 12, and validates the decoding invalidation signal if it exceeds the threshold value output from the threshold setting circuit 14. To do. Specifically, “0” is output as the decryption invalidation signal when the sum of the stream consumption amounts is equal to or smaller than the threshold value, and “1” as the decryption invalidation signal when the sum of the stream consumption amounts exceeds the threshold value. Is output.
  • FIG. 2 shows a decoding process flow according to this configuration.
  • the threshold setting circuit 14 stores the threshold received from the outside or the control circuit 13.
  • the “16” bits are set as the “threshold value” equal to the normal (no error) total consumed stream amount.
  • the control circuit 13 enters an iterative process for the decoding process. It is assumed that the control circuit 13 knows that decoding is completed in six decoding processes by analyzing the header portion of the stream or the like, or knows in advance by the standard.
  • the control circuit 13 After confirming that the buffer circuit 11 is not in the underflow state, the control circuit 13 generates a control signal for decoding the variable length code, and the decoding circuit 12 looks at the head of the stream of the buffer circuit 11 and “1”, which is a length of “0”, is transmitted to the invalidation circuit 15 as a stream consumption amount, and the invalidation circuit 15 compares the threshold value “16” with the sum “1” of the stream consumption amounts. Since the sum of the stream consumption amounts is equal to or less than the threshold value, the invalidation circuit 15 outputs “0” as the decoding invalidation signal. Since the decoding invalidation signal is “0”, the decoding circuit 12 performs the decoding process and outputs the decoding result “a” to the control circuit 13. The control circuit 13 confirms that the decoding invalidation signal is “0” and continues the processing.
  • the control circuit 13 After confirming that the buffer circuit 11 is not in the underflow state, the control circuit 13 generates a control signal for decoding the variable length code, and the decoding circuit 12 looks at the head of the stream of the buffer circuit 11 and The length “3” of “110” is transmitted to the invalidation circuit 15 as the stream consumption amount, and the invalidation circuit 15 compares the threshold value “16” with the sum “4” of the stream consumption amounts. Since the sum of the stream consumption amounts is equal to or less than the threshold value, the invalidation circuit 15 outputs “0” as the decoding invalidation signal. Since the decoding invalidation signal is “0”, the decoding circuit 12 performs the decoding process and outputs the decoding result “c” to the control circuit 13. The control circuit 13 confirms that the decoding invalidation signal is “0” and continues the processing.
  • the control circuit 13 After confirming that the buffer circuit 11 is not in the underflow state, the control circuit 13 generates a control signal for decoding the variable-length code, and the decoding circuit 12 looks at the head of the stream of the buffer circuit 11 and “1”, which is a length of “0”, is transmitted to the invalidation circuit 15 as a stream consumption amount, and the invalidation circuit 15 compares the threshold value “16” with the sum “5” of the stream consumption amounts. Since the sum of the stream consumption amounts is equal to or less than the threshold value, the invalidation circuit 15 outputs “0” as the decoding invalidation signal. Since the decoding invalidation signal is “0”, the decoding circuit 12 performs the decoding process and outputs the decoding result “a” to the control circuit 13. The control circuit 13 confirms that the decoding invalidation signal is “0” and continues the processing.
  • the control circuit 13 After confirming that the buffer circuit 11 is not in the underflow state, the control circuit 13 generates a control signal for decoding the variable-length code, and the decoding circuit 12 looks at the head of the stream of the buffer circuit 11 and “2”, which is a length of “10”, is transmitted to the invalidation circuit 15 as a stream consumption amount, and the invalidation circuit 15 compares the threshold value “16” with the sum “7” of the stream consumption amounts. Since the sum of the stream consumption amounts is equal to or less than the threshold value, the invalidation circuit 15 outputs “0” as the decoding invalidation signal. Since the decoding invalidation signal is “0”, the decoding circuit 12 performs the decoding process and outputs the decoding result “b” to the control circuit 13. The control circuit 13 confirms that the decoding invalidation signal is “0” and continues the processing.
  • the control circuit 13 After confirming that the buffer circuit 11 is not in the underflow state, the control circuit 13 generates a control signal for decoding the variable-length code, and the decoding circuit 12 looks at the head of the stream of the buffer circuit 11 and “2”, which is a length of “10”, is transmitted to the invalidation circuit 15 as a stream consumption amount, and the invalidation circuit 15 compares the threshold value “16” with the sum “9” of the stream consumption amounts. Since the sum of the stream consumption amounts is equal to or less than the threshold value, the invalidation circuit 15 outputs “0” as the decoding invalidation signal. Since the decoding invalidation signal is “0”, the decoding circuit 12 performs the decoding process and outputs the decoding result “b” to the control circuit 13. The control circuit 13 confirms that the decoding invalidation signal is “0” and continues the processing.
  • the control circuit 13 After confirming that the buffer circuit 11 is not in the underflow state, the control circuit 13 generates a control signal for decoding the variable length code, and the decoding circuit 12 looks at the head of the stream of the buffer circuit 11 and “7”, which is the length of “1111111”, is transmitted to the invalidation circuit 15 as a stream consumption amount, and the invalidation circuit 15 compares the threshold value “16” with the sum “16” of the stream consumption amounts. Since the sum of the stream consumption amounts is equal to or less than the threshold value, the invalidation circuit 15 outputs “0” as the decoding invalidation signal. Since the decoding invalidation signal is “0”, the decoding circuit 12 performs a decoding process and outputs the decoding result “h” to the control circuit 13.
  • the 17th bit is a stream that follows the stream that should be decoded.
  • the threshold setting circuit 14 stores the threshold received from the outside or the control circuit 13. It is assumed that 16 bits as the stream length are input from the outside, and that “16” is set as a threshold value.
  • the control circuit 13 enters an iterative process for the decoding process.
  • the control circuit 13 After confirming that the buffer circuit 11 is not in the underflow state, the control circuit 13 generates a control signal for decoding the variable length code, and the decoding circuit 12 looks at the head of the stream of the buffer circuit 11 and “1”, which is a length of “0”, is transmitted to the invalidation circuit 15 as a stream consumption amount, and the invalidation circuit 15 compares the threshold value “16” with the sum “1” of the stream consumption amounts. Since the sum of the stream consumption amounts is equal to or less than the threshold value, the invalidation circuit 15 outputs “0” as the decoding invalidation signal. Since the decoding invalidation signal is “0”, the decoding circuit 12 performs the decoding process and outputs the decoding result “a” to the control circuit 13. The control circuit 13 confirms that the decoding invalidation signal is “0” and continues the processing.
  • the control circuit 13 After confirming that the buffer circuit 11 is not in the underflow state, the control circuit 13 generates a control signal for decoding the variable length code, and the decoding circuit 12 looks at the head of the stream of the buffer circuit 11 and The length “3” of “110” is transmitted to the invalidation circuit 15 as the stream consumption amount, and the invalidation circuit 15 compares the threshold value “16” with the sum “4” of the stream consumption amounts. Since the sum of the stream consumption amounts is equal to or less than the threshold value, the invalidation circuit 15 outputs “0” as the decoding invalidation signal. Since the decoding invalidation signal is “0”, the decoding circuit 12 performs the decoding process and outputs the decoding result “c” to the control circuit 13. The control circuit 13 confirms that the decoding invalidation signal is “0” and continues the processing.
  • the control circuit 13 After confirming that the buffer circuit 11 is not in the underflow state, the control circuit 13 generates a control signal for decoding the variable length code, and the decoding circuit 12 acquires the stream “0” from the buffer circuit 11.
  • the decryption circuit 12 transmits the stream consumption “1” to the invalidation circuit 15, and the invalidation circuit 15 compares the threshold value “16” with the total stream consumption “5”. Since the sum of the stream consumption amounts is equal to or less than the threshold value, the invalidation circuit 15 outputs “0” as the decoding invalidation signal. Since the decoding invalidation signal is “0”, the decoding circuit 12 performs the decoding process and outputs the decoding result “a” to the control circuit 13.
  • the control circuit 13 confirms that the decoding invalidation signal is “0” and continues the processing.
  • the control circuit 13 After confirming that the buffer circuit 11 is not in the underflow state, the control circuit 13 generates a control signal for decoding the variable-length code, and the decoding circuit 12 looks at the head of the stream of the buffer circuit 11 and “2”, which is a length of “10”, is transmitted to the invalidation circuit 15 as a stream consumption amount, and the invalidation circuit 15 compares the threshold value “16” with the sum “7” of the stream consumption amounts. Since the sum of the stream consumption amounts is equal to or less than the threshold value, the invalidation circuit 15 outputs “0” as the decoding invalidation signal. Since the decoding invalidation signal is “0”, the decoding circuit 12 performs the decoding process and outputs the decoding result “b” to the control circuit 13. The control circuit 13 confirms that the decoding invalidation signal is “0” and continues the processing.
  • the control circuit 13 After confirming that the buffer circuit 11 is not in the underflow state, the control circuit 13 generates a control signal for decoding the variable-length code, and the decoding circuit 12 looks at the head of the stream of the buffer circuit 11 and The length “1111111” “7” is transmitted to the invalidation circuit 15 as the stream consumption amount, and the invalidation circuit 15 compares the threshold value “16” with the total stream consumption amount “14”. Since the sum of the stream consumption amounts is equal to or less than the threshold value, the invalidation circuit 15 outputs “0” as the decoding invalidation signal. Since the decoding invalidation signal is “0”, the decoding circuit 12 performs a decoding process and outputs the decoding result “h” to the control circuit 13. The control circuit 13 confirms that the decoding invalidation signal is “0” and continues the processing.
  • the control circuit 13 After confirming that the buffer circuit 11 is not in the underflow state, the control circuit 13 generates a control signal for decoding the variable length code, and the decoding circuit 12 looks at the head of the stream of the buffer circuit 11 and The length “3” of “110” is transmitted to the invalidation circuit 15 as the stream consumption amount, and the invalidation circuit 15 compares the threshold value “16” with the sum “17” of the stream consumption amounts. Since the sum of the stream consumption amounts exceeds the threshold value, the invalidation circuit 15 outputs “1” as a decoding invalidation signal. Since the decoding invalidation signal is “1”, the control circuit 13 outputs to the decoding circuit 12 a control signal for stopping the decoding repetition process. As a result, the decoding circuit 12 stops the decoding process and does not consume the stream thereafter. Further, the control circuit 13 performs a return process and ends the task.
  • the stream length when there is no error is stored in the header, and the correct stream length can be acquired before decoding.
  • the configuration of the present embodiment can be adopted by using the maximum value of or using the maximum length that may be an actual usage scene as a threshold value.
  • FIG. 3 is a block diagram showing the configuration of the encoded stream decoding apparatus according to Embodiment 2 of the present invention. Unlike the first embodiment, this configuration has a filling confirmation circuit 16. The rest is the same as in the first embodiment.
  • a filling confirmation circuit (filling confirmation means) 16 receives a filling stream amount from the buffer circuit 11 and a threshold value from a threshold setting circuit. Both are compared, and if the amount of the filled stream is equal to or greater than the threshold value, the control circuit 13 is notified of this.
  • FIG. 4 shows a processing flow example of this configuration.
  • the control circuit 13 After the threshold value is set, the control circuit 13 generates a first control signal after the filling confirmation circuit 16 confirms the filling amount equal to or larger than the threshold value of the stream to the buffer circuit 11, and until the confirmation, the decoding circuit 12 performs the decoding. Wait for processing. The rest is the same as in the first embodiment.
  • This configuration can eliminate the possibility of underflow during decoding processing in a system with unstable stream supply. For this reason, in a system in which the decoding circuit 12 returns an invalid value when underflow with a small amount of data in the decoding process, underflow determination during decoding decoding can be omitted. Further, in a system in which the decoding circuit 12 waits until the buffer circuit 12 is filled at the time of underflow, when an underflow occurs at the time of decoding processing, the control circuit 13 waits until the buffer circuit 12 is filled. The configuration prevents underflow during the decoding process, and the control circuit 13 can be used for processing other tasks until the buffer circuit 12 is filled before the decoding process starts.
  • FIG. 5 is a block diagram showing a configuration of an encoded stream decoding apparatus according to Embodiment 3 of the present invention.
  • the decoding invalidation signal generated by the invalidation circuit 15 is also notified to the decoding circuit 12. Further, it is assumed that how many times the decoding process is necessary is known in advance.
  • FIG. 6 shows a processing flow example of this configuration.
  • the control circuit 13 does not perform branching based on the decoding invalidation signal when executing the decoding processing, and continues to generate a control signal for continuing the decoding processing regardless of the decoding invalidation signal.
  • the decoding circuit 12 accepts the control signal generated by the control circuit 13 when the decoding invalidation signal is “1”, but does not actually perform the decoding process. “0” is output to the control circuit 13 as a decoding result, and it behaves as if the decoding process was received in response to the control signal.
  • the decoding circuit 12 may perform clock down, power interruption, or the like in order to reduce power consumption of unnecessary circuits.
  • the control circuit 13 performs control for the return process when the decoding invalidation signal has been enabled after the end of the last decoding process.
  • the threshold setting circuit 14 stores the threshold received from the outside or the control circuit 13. It is assumed that 16 bits as the stream length are input from the outside, and that “16” is set as a threshold value.
  • the control circuit 13 enters an iterative process for the decoding process. It is assumed that the control circuit 13 knows that decoding is completed after 6 decoding processes.
  • the control circuit 13 generates a control signal for decoding the variable-length code, and the decoding circuit 12 looks at the beginning of the stream of the buffer circuit 11 and sets “1”, which is “0” in length, as the stream consumption amount.
  • the invalidation circuit 15 compares the threshold value “16” with the total stream consumption “1”. Since the sum of the stream consumption amounts is equal to or less than the threshold value, the invalidation circuit 15 outputs “0” as the decoding invalidation signal. Since the decoding invalidation signal is “0”, the decoding circuit 12 performs the decoding process and outputs the decoding result “a” to the control circuit 13. The control circuit 13 continues the process regardless of the decoding invalidation signal.
  • the control circuit 13 generates a control signal for decoding the variable length code, and the decoding circuit 12 looks at the head of the stream of the buffer circuit 11 and sets “3”, which is “110” in length, as the stream consumption amount.
  • the invalidation circuit 15 compares the threshold value “16” with the total stream consumption “4”. Since the sum of the stream consumption amounts is equal to or less than the threshold value, the invalidation circuit 15 outputs “0” as the decoding invalidation signal. Since the decoding invalidation signal is “0”, the decoding circuit 12 performs the decoding process and outputs the decoding result “c” to the control circuit 13. The control circuit 13 continues the process regardless of the decoding invalidation signal.
  • the control circuit 13 generates a control signal for decoding the variable length code, and the decoding circuit 12 acquires the stream “0” from the buffer circuit 11.
  • the decryption circuit 12 transmits the stream consumption “1” to the invalidation circuit 15, and the invalidation circuit 15 compares the threshold value “16” with the total stream consumption “5”. Since the sum of the stream consumption amounts is equal to or less than the threshold value, the invalidation circuit 15 outputs “0” as the decoding invalidation signal. Since the decoding invalidation signal is “0”, the decoding circuit 12 performs the decoding process and outputs the decoding result “a” to the control circuit 13. The control circuit 13 continues the process regardless of the decoding invalidation signal.
  • the control circuit 13 generates a control signal for decoding the variable length code, and the decoding circuit 12 looks at the head of the stream of the buffer circuit 11 and sets “7”, which is the length of “1111111” as the stream consumption amount.
  • the invalidation circuit 15 compares the threshold value “16” with the stream consumption sum “12”. Since the sum of the stream consumption amounts is equal to or less than the threshold value, the invalidation circuit 15 outputs “0” as the decoding invalidation signal. Since the decoding invalidation signal is “0”, the decoding circuit 12 performs a decoding process and outputs the decoding result “h” to the control circuit 13. The control circuit 13 continues the process regardless of the decoding invalidation signal.
  • the control circuit 13 generates a control signal for decoding the variable length code, and the decoding circuit 12 looks at the head of the stream of the buffer circuit 11 and sets “5” which is the length of “11110” as the stream consumption amount.
  • the invalidation circuit 15 compares the threshold value “16” with the total stream consumption “17”. Since the sum of the stream consumption amounts exceeds the threshold value, the invalidation circuit 15 outputs “1” as a decoding invalidation signal. Since the decoding invalidation signal is “1”, the decoding circuit 12 does not perform the decoding process, but outputs “0” as the decoding result. The control circuit 13 continues the process regardless of the decoding invalidation signal.
  • the control circuit 13 generates a control signal for decoding the variable length code, but since the decoding invalidation signal is “1”, the decoding circuit 12 does not perform the decoding process and outputs “0” as the decoding result. To do.
  • the control circuit 13 does not need to determine whether the value of the decoding invalidation signal is “0” or “1” for each decoding process. Since the stream input from the outside usually has no error in many cases, the processing that the control circuit 13 has to perform in each decoding process on the stream without the error can be reduced. If the decoding invalidation signal is “1” at the end, the control circuit 13 may perform control such as discarding one task with an error.
  • FIG. 7 is a block diagram showing a configuration of an encoded stream decoding apparatus according to Embodiment 4 of the present invention.
  • the configuration of the present embodiment includes a state storage circuit 17.
  • the state storage circuit (state storage means) 17 stores the difference between the threshold value input from the invalidation circuit 15 and the total stream consumption (threshold value-total stream consumption) and the state of the stream in the buffer circuit 11. Also, the difference between the stored threshold and the total stream consumption is notified to the threshold setting circuit 14 to restore the stream state of the buffer circuit 11.
  • FIG. 8 shows a processing flow example of this configuration.
  • the control circuit 13 can perform control for interrupting the decoding process when determining whether to continue the decoding process.
  • the state storage circuit 17 receives the difference between the threshold value input from the invalidation circuit 15 and the total stream consumption and the buffer circuit acquired from the buffer circuit 11. The state of 11 streams is stored.
  • decoding is resumed, the state of the stream in the buffer circuit 11 is restored, the difference between the stored threshold and the total stream consumption is notified to the threshold setting circuit 14 as a new threshold, and the interrupted process is resumed.
  • the state storage circuit 17 is the difference between the threshold “16” and the total stream consumption “7”. “9” and the state held by the buffer circuit 11 such as a pointer pointing to the head of the stream are stored. Thereafter, when the decoding process is resumed, “9” is set as a new threshold value in the threshold setting circuit 14, the pointer of the buffer circuit 11 is set, and if necessary, the stream is filled. Resume processing from processing.
  • control circuit 13 is realized by a processor that also executes tasks other than the decoding process, a more complicated system can be configured if it can be switched to another task in the middle of the decoding process.
  • stream skipping and rewinding can be realized by changing and restoring the difference between the threshold value and the total stream consumption and the state of the stream in the buffer circuit 11.
  • FIG. 9 is a block diagram showing the configuration of the encoded stream decoding apparatus according to Embodiment 5 of the present invention.
  • the configuration of the present embodiment includes a control circuit 13a and another control circuit (other control means) 13b.
  • the decoding circuit 12 accepts only the control signal generated by any one of the control circuits (for example, 13a), and the task of the control circuit 13a being executed is completed, or the method of the fourth embodiment Until the processing is interrupted, only the control signal from the same control circuit 13a is accepted.
  • the decoding invalidation signal becomes valid to “1”
  • the decoding circuit 12 does not need to perform decoding for the task thereafter, so that only the control signal generated by the other control circuit 13b is accepted. To do.
  • FIG. 10 shows a configuration in which one control circuit 13 performs a plurality of tasks 18a and 18b in parallel.
  • each task 18a, 18b outputs a control signal
  • an identification signal for distinguishing the tasks is output at the same time, whereby processing can be performed in the same manner as when there are a plurality of control circuits.
  • FIG. 11 is a block diagram showing a configuration of an encoded stream decoding apparatus according to Embodiment 6 of the present invention.
  • 11 includes a buffer circuit 11, a decoding circuit 12, a control circuit 13, a threshold setting circuit 14, an invalidation circuit 15, and a filling confirmation circuit 16.
  • the buffer circuit 11 is filled with a stream input from the outside in preparation for the decoding process.
  • the decoding circuit 12 performs a decoding process corresponding to the control signal on the stream input from the buffer circuit 11, and outputs a decoding result.
  • the control circuit 13 generates a control signal for controlling the decoding circuit 12 and receives the result.
  • the threshold setting circuit (threshold setting means) 14 is set by the external or control circuit 13 the number of times that the control circuit 13 generates the control signal, that is, the threshold of the number of decoding processes, and the threshold is invalidated by the circuit 15. Output to.
  • the invalidation circuit 15 compares the number of times that the control circuit 13 has generated the control signal with the threshold value from the threshold value setting circuit 14, and if the predetermined number of control signal generation times exceeds the threshold value, the invalidation circuit 15 validates the decoding invalidation signal.
  • the filling confirmation circuit 16 receives the filling stream amount from the buffer circuit 11 and notifies the control circuit 13 when the filling stream amount is equal to or larger than a predetermined amount.
  • the threshold setting circuit 14 stores a threshold received from the outside or the control circuit 13.
  • “6” is input from the outside as the number of normal control signal generations (normal number of decoding processes), and “6” is set as a threshold value.
  • the control circuit 13 enters an iterative process for the decoding process.
  • the control circuit 13 generates a control signal for decoding the variable length code, and the invalidation circuit 15 compares the threshold “6” with the number of control signal generations “1”. Since the number of generations of the control signal is less than or equal to the threshold value, the invalidation circuit 15 outputs “0” as the decoding invalidation signal. Since the decoding invalidation signal is “0”, the decoding circuit 12 performs the decoding process and outputs the decoding result “a” to the control circuit 13. Since the decoding result is not “h”, the control circuit 13 continues the processing.
  • the control circuit 13 generates a control signal for decoding the variable-length code, and the invalidation circuit 15 compares the threshold “6” with the number of control signal generations “2”. Since the total number of control signal generations is less than or equal to the threshold value, the invalidation circuit 15 outputs “0” as a decoding invalidation signal. Since the decoding invalidation signal is “0”, the decoding circuit 12 performs the decoding process and outputs the decoding result “c” to the control circuit 13. Since the decoding result is not “h”, the control circuit 13 continues the processing.
  • the control circuit 13 generates a control signal for decoding the variable-length code, and the invalidation circuit 15 compares the threshold “6” with the number of control signal generations “3”. Since the total number of control signal generations is less than or equal to the threshold value, the invalidation circuit 15 outputs “0” as a decoding invalidation signal. Since the decoding invalidation signal is “0”, the decoding circuit 12 performs the decoding process and outputs the decoding result “a” to the control circuit 13. Since the decoding result is not “h”, the control circuit 13 continues the processing.
  • the control circuit 13 generates a control signal for decoding the variable-length code, and the invalidation circuit 15 compares the threshold “6” with the number of control signal generations “4”. Since the total number of control signal generations is less than or equal to the threshold value, the invalidation circuit 15 outputs “0” as a decoding invalidation signal. Since the decoding invalidation signal is “0”, the decoding circuit 12 performs the decoding process and outputs the decoding result “b” to the control circuit 13. Since the decoding result is not “h”, the control circuit 13 continues the processing.
  • the control circuit 13 generates a control signal for decoding the variable length code, and the invalidation circuit 15 compares the threshold “6” with the number of control signal generations “5”. Since the total number of control signal generations is less than or equal to the threshold value, the invalidation circuit 15 outputs “0” as a decoding invalidation signal. Since the decoding invalidation signal is “0”, the decoding circuit 12 performs the decoding process and outputs the decoding result “b” to the control circuit 13. Since the decoding result is not “h”, the control circuit 13 continues the processing.
  • the control circuit 13 generates a control signal for decoding the variable length code, and the invalidation circuit 15 compares the threshold “6” with the number of control signal generations “6”. Since the total number of control signal generations is less than or equal to the threshold value, the invalidation circuit 15 outputs “0” as a decoding invalidation signal. Since the decoding invalidation signal is “0”, the decoding circuit 12 performs the decoding process and outputs the decoding result “b” to the control circuit 13. Since the decoding result is not “h”, the control circuit 13 continues the processing.
  • the control circuit 13 generates a control signal for decoding the variable-length code, and the invalidation circuit 15 compares the threshold “6” with the number of control signal generations “7”. Since the total number of control signal generation times exceeds the threshold value, the invalidation circuit 15 outputs “1” as a decoding invalidation signal. Since the decoding invalidation signal is “1”, the control circuit 13 generates a control signal for stopping the decoding process, and as a result, the decoding circuit 12 does not perform the decoding process. Thereafter, the control circuit 13 ends the process.
  • the encoded stream decoding apparatus can detect stream errors without requiring a long waiting time, the apparatus for decoding audio or video using advanced encoding technology, or a variable It is useful when applied to applications such as communication devices using long codes.
  • Buffer circuit (buffer means) 12 Decoding circuit (decoding means) 13 Control circuit (control means) 13b Other control circuit (other control means) 14 Threshold setting circuit (threshold setting means) 15 Invalidation circuit (invalidation means) 16 Filling confirmation circuit (filling confirmation means) 17 State storage circuit (state storage means)

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Theoretical Computer Science (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Communication Control (AREA)

Abstract

 符号化ストリーム復号装置において、充填確認回路16はバッファ回路11に十分な量のストリームが格納されていることを確認する。その後、制御回路13は復号回路12に制御信号を出力して可変長復号処理を指示することを繰り返し始める。この復号処理の繰り返しにより、バッファ回路11での総消費ストリーム量が閾値設定回路14の閾値以上となった場合には、無効化回路15が「1」値の復号無効化信号を生成して制御回路13に出力する。制御回路13は、復号無効化信号を受けると、復号処理の停止を指示する制御信号を復号回路12に出力し、復号回路12は復号処理を停止する。従って、長い待ち時間を要することなく、ストリームの誤りが検出される。

Description

符号化ストリーム復号装置
 本発明は、ストリームデータを扱う信号処理装置に係り、特に可変長符号化されたデータを含む符号化ストリームの復号装置に関する。
 デジタル信号処理技術の進歩に伴ない、DVDやBD、SDメモリカードなどを記憶媒体として、動画や音声を格納するAV信号を記録・再生する各種装置が開発され、様々な用途で利用されている。更に、放送波によるAV信号の送受信や、デジタルネットワークを介したAV信号の送受信を行うような装置も広く普及しつつある。このような応用用途では、高品質なAV信号の記録・再生を実現するため、複雑な符号化技術が使用されている。従って、これらの処理には多大な演算量と複雑な制御が必要となる。しかし、その一方で、実際の利用場面では、記憶媒体の読み書きや送受信の過程でAV信号にエラーが発生する可能性も考慮して処理を行う必要がある。
 従来、特許文献1に記載の可変長符号復号装置では、復号するべきビットストリームが誤っていた場合に、誤りを容易に検出できる構成をとっている。
 この可変長符号復号装置は、図13に示すように、第1記憶部1と、復号部2と、タイマー部3と、制御部4とを備える。第1記憶部1は、受信した可変長符号データを記憶する。復号部2は、第1記憶部1から読み出されたハフマン符号を復号する。タイマー部3は、復号部2による復号の開始から所定時間経過後にタイムアップ信号を出力する。制御部4は、タイマー部3のタイムアップ信号に基づいて復号部2による復号を強制終了させる。
 このように構成することにより、可変長符号の誤りに起因して復号処理の時間が所定時間以上になった場合に、タイマー部のタイムアップ信号に基づいて復号部による復号が強制終了される。これにより、可変長符号に誤りがあることが検出されると共に、復号処理時間の超過による画像のこま落ちや音声の欠落が発生することが防止される。
特開2002-185332号公報(第3-11頁、図1等)
 しかしながら、前記従来の構成では、可変長符号に誤りがあった場合、タイムアウト信号が発生するまで一定の時間、処理が進まなくなる。システムが高速化するほどタイムアウト時間が相対的に長くなるため、高速に処理を行う必要があるシステムではタイムアウト時間の影響が大きくなるという課題がある。
 また、ビットレートが一定ではないような場合や、複数の処理を同時に処理するようなシステムにおいて、リソースの競合が起こった場合などでは、処理時間に揺らぎが発生する。前記従来の構成では、処理時間に揺らぎが発生した場合には、タイムアウト時間を最も長いものに設定する必要があると考えられるため、複雑な処理を行う必要があるシステムにおいてタイムアウト時間が長くなってしまうという課題がある。
 本発明は、前記課題を解決するものであり、その目的は、高速かつ複雑な処理が必要とされるシステムで効率的に誤りを検出できる符号化ストリーム復号装置を提供することにある。
 以上の目的を達成するため、本発明では、復号処理を終えた総消費ストリーム量や復号処理の回数でもってストリームの誤りを検出し、これにより、長いタイムアウト時間を一律に待つことがないようにする。
 具体的に、本発明の符号化ストリーム復号装置は、外部から入力されるストリームを蓄えるバッファ手段と、前記バッファ手段に蓄えられたストリームに対し可変長符号復号処理を行う復号手段と、前記復号手段の動作を制御するための制御信号を生成して前記復号手段に出力する制御手段と、前記復号手段で消費された消費ストリームの閾値を格納する閾値設定手段と、前記閾値設定手段の閾値と、前記復号手段で消費された消費ストリーム量とに基づいて復号無効化信号を発生して前記制御手段に出力する無効化手段とを備えたことを特徴とする。
 本発明は、前記符号化ストリーム復号装置において、前記閾値設定手段が格納する閾値を考慮した十分な量のストリーム量が前記バッファ手段に蓄えられたことを確認する充填確認手段を備え、前記制御手段は、前記充填確認手段によりストリームの充填が確認されるまで前記復号手段を待機させることを特徴とする。
 本発明は、前記符号化ストリーム復号装置において、前記制御手段は、前記無効化手段から復号無効化信号を受けたとき、制御信号により前記復号手段の復号動作を停止させ、前記復号手段は、前記無効化手段が復号無効化信号を発生しているとき、前記制御手段からの制御信号により復号処理を停止し、ストリームを消費しないことを特徴とする。
 本発明は、前記符号化ストリーム復号装置において、前記制御手段は、前記無効化手段から復号無効化信号を受けても、前記復号手段の復号を継続させる制御信号を生成し、前記復号手段は、前記無効化手段が発生する復号無効化信号を受け、この復号無効化信号を受けている間は、前記制御手段に対して、前記制御手段が生成する制御信号を受理して動作したようにふるまうことを特徴とする。
 本発明は、前記符号化ストリーム復号装置において、前記復号手段は、前記無効化手段からの復号無効化信号を受けている間は、復号処理を行わず、復号結果として特殊な値を生成して、その特殊な値の復号結果を前記制御手段に出力することを特徴とする。
 本発明は、前記符号化ストリーム復号装置において、前記復号手段は、前記無効化手段からの復号無効化信号を受けている間は、クロックダウンなどの消費電力の低減を行うことを特徴とする。
 本発明は、前記符号化ストリーム復号装置において、前記制御手段は、一連の復号処理からなるタスクの終了後、前記無効化手段から復号無効化信号が発生しているかどうかを判断し、その復号無効化信号が発生しているとき、復帰のための制御を行うことを特徴とする。
 本発明は、前記符号化ストリーム復号装置において、前記無効化手段から前記閾値設定手段の閾値と前記復号手段で消費したストリーム総消費量との差分を伝えられると共に、前記バッファ手段から内部のストリームの状態を伝えられる状態保存手段を備え、前記状態保存手段は、前記復号手段での復号処理が中断した後、その中断した復号処理の再開時には、前記閾値とストリーム総消費量との差分を新たな閾値として前記閾値設定手段に通知すると共に、前記バッファ手段のストリームの状態を復元させることを特徴とする。
 本発明は、前記符号化ストリーム復号装置において、前記状態保存手段は、前記閾値とストリーム総消費量との差分を変更して前記閾値設定手段に通知すると共に、この変更に対応するように前記バッファ手段のストリームの状態を変更して、ストリームの巻き戻し又はスキップを可能としたことを特徴とする。
 本発明は、前記符号化ストリーム復号装置において、前記復号手段の動作を制御するための他の制御信号を生成して前記復号手段に出力する他の制御手段を備え、前記復号手段は、前記無効化手段から復号無効化信号を受けている間は、前記他の制御手段からの制御信号に基づく復号処理を実行することを特徴とする。
 本発明は、前記符号化ストリーム復号装置において、前記制御手段は、複数のタスクを並列に制御し、前記復号手段は、前記複数のタスクのうち何れか1つのタスクに基づく復号処理の実行時において前記無効化手段から復号無効化信号を受けている間は、他タスクの復号処理を実行することを特徴とする。
 本発明の符号化ストリーム復号装置は、外部から入力されるストリームを蓄えるバッファ手段と、前記バッファ手段に蓄えられたストリームに対し可変長符号復号処理を行う復号手段と、前記復号手段の動作を制御するための制御信号を生成して前記復号手段に出力する制御手段と、前記制御手段での制御信号の生成回数の閾値を格納する閾値設定手段と、前記閾値設定手段の閾値と前記制御手段での制御信号の生成回数とに基づいて復号無効化信号を発生して前記制御手段に通知する無効化手段とを備えたことを特徴とする。
 本発明は、前記符号化ストリーム復号装置において、所定量のストリーム量が前記バッファ手段に蓄えられたことを確認する充填確認手段を備え、前記制御手段は、前記充填確認手段によりストリームの所定量への充填が確認されるまで前記復号手段を待機させることを特徴とする。
 本発明は、前記符号化ストリーム復号装置において、前記制御手段は、前記無効化手段から復号無効化信号を受けたとき、制御信号により前記復号手段での復号動作を停止させ、前記復号手段は、前記無効化手段が復号無効化信号を発生しているとき、前記制御手段からの制御信号を受けて、復号処理を停止し、ストリームを消費しないことを特徴とする。
 以上により、本発明では、一連の復号処理を行うタスクにおいて、復号処理を行う毎にその復号処理を終えた消費ストリーム量を蓄積し、総消費ストリーム量が閾値設定手段の閾値を越えた際、又は、制御手段での制御信号の生成回数、即ち、復号処理の回数が閾値設定手段の閾値を越えた際には、直ちに無効化手段が復号無効化信号を生成するので、ストリーム誤りが待ち時間を発生することなく直ちに検出される。
 特に、本発明では、復号処理を開始した後に、外部からのストリーム入力が滞った場合にも、無効化手段による復号無効化信号の発生までは、バッファ手段はアンダーフロー状態にならない。
 更に、本発明では、無効化手段による復号無効化信号の発生時には、復号手段がストリームの消費を停止するので、復号無効化信号の発生後に外部からのストリーム入力が滞った場合にも、バッファ手段はアンダーフロー状態に陥らない。
 加えて、本発明では、復号無効化信号の発生の有無や、バッファ手段がアンダーフロー状態に陥っているか否かを制御手段が復号処理毎に確認する必要がないので、制御手段による制御が簡単化される。
 また、本発明では、復号無効化信号の発生時には、復号手段が復号結果として、特殊な値、例えば0を出力するので、音声信号処理時に復号無効化信号が発生しても出力を無音状態などにできる。従って、制御手段による例外処理を行うことなく、ストリームの誤りによる雑音の発生が防止される。
 更に、本発明では、制御手段は復号処理の実行毎に誤り検出を行わないが、連続した一連の復号処理実行の終了後に、無効化手段から復号無効化信号の発生の有無を取得して、必要に応じて復帰処理を行うので、各復号処理の実行のための制御手段による制御を簡単化しつつ、所定定間隔毎に誤り検出及び復帰処理を挿入することができる。
 加えて、本発明では、状態保存手段には、閾値とストリーム総消費量との差分や、バッファ手段のストリームの状態が保存されるので、一連の連続した復号処理から成るタスクを一旦中断して、他タスクや他ストリームの復号処理を行い、その後に、その中断したタスクを再開することが可能となる。
 また、本発明では、中断したタスクの再開時には、閾値とストリーム総消費量との差分を元の値から変更し、それに対応してバッファ手段のストリームの状態を変更するので、ストリームの巻き戻しやスキップをすることが可能になる。
 更に、本発明では、制御手段が複数のタスクを処理する場合や、制御手段が複数存在する場合において、復号無効化信号の発生時には、他のタスク又は他の制御手段が復号手段を使用できる。
 以上説明したように、本発明の符号化ストリーム復号装置によれば、長い待ち時間を発生させることなくストリームの誤りを検出できるので、高速に動作する復号システムやマルチタスクシステム、又はビットレートが一定でないコーデックを扱う場合にも、誤り検出までの相対的な待ち時間を効果的に短縮できる効果を奏する。
図1は本発明の実施形態1に係る符号化ストリーム復号装置の構成を示すブロック図である。 図2は同符号化ストリーム復号装置の処理例を示すフローチャート図である。 図3は本発明の実施形態2に係る符号化ストリーム復号装置の構成を示すブロック図である。 図4は同符号化ストリーム復号装置の処理例を示すフローチャート図である。 図5は本発明の実施形態3に係る符号化ストリーム復号装置の構成を示すブロック図である。 図6は同符号化ストリーム復号装置の処理例を示すフローチャート図である。 図7は本発明の実施形態4に係る符号化ストリーム復号装置の構成を示すブロック図である。 図8は同符号化ストリーム復号装置の処理例を示すフロー図である。 図9は本発明の実施形態5に係る符号化ストリーム復号装置の構成を示すブロック図である。 図10は同符号化ストリーム復号装置の他の構成を示すブロック図である。 図11は本発明の実施形態6に係る符号化ストリーム復号装置の構成を示すブロック図である。 図12は符号化テーブルの一例を示す図である。 図13は従来の可変長符号復号化装置の構成を示すブロック図である。
 以下、本発明の実施形態に係る符号化ストリーム復号装置について図面を参照しながら説明する。
 (実施形態1)
 図1は、本発明の実施形態1に係る符号化ストリーム復号装置の構成を示すブロック図である。
 図1に示す符号化ストリーム復号装置は、バッファ回路11と、復号回路12と、例えばプロセッサから成る制御回路13と、閾値設定回路14と、無効化回路15とを備え、外部から入力されるストリームに対して可変長符号の復号を行う。
 バッファ回路(バッファ手段)11は、復号処理に備え、外部から入力されるストリームを充填する。復号回路(復号手段)12は、バッファ回路11から入力されるストリームに対し、制御信号に対応する可変長復号処理を行い、復号結果とその際に消費したストリームの消費量を出力する。
 また、制御回路(制御手段)13は、復号回路12の復号動作についての各種の制御を行う。制御回路13の一連の動作を以後タスクと呼ぶ。復号のためのタスクでは、制御回路13は復号回路12を制御する制御信号を生成し、その復号結果を受信する動作を繰り返す。制御信号の生成方法は、それまでのストリーム入力に依存して次の制御信号を決定する方法や、ストリームのヘッダ部分をデコードして決定する方法などが考えられる。
 閾値設定回路(閾値設定手段)14は、外部又は制御回路13により復号処理の開始前に閾値を設定され、その閾値を無効化回路15に出力する。更に、無効化回路(無効化手段)15は、復号回路12から出力されるストリーム消費量の総和を演算し、それが閾値設定回路14から出力される閾値を越えれば復号無効化信号を有効にする。具体的には、ストリーム消費量の総和が閾値以下の場合は復号無効化信号として「0」を出力し、ストリーム消費量の総和が閾値を越えた場合には、復号無効化信号として「1」を出力するものとする。
 符号化テーブルが図12で表されるような符号化ストリーム「0110010101111111」を可変長復号する動作を説明する。図2はこの構成による復号処理フローを示す。
 先ず、閾値設定回路14は、外部又は制御回路13から受信した閾値を記憶する。ここでは、ストリーム長である16ビットが外部から入力されることを想定して、正常な(誤りのない)総消費ストリーム量に等しい「閾値」として、その「16」ビットを設定するものとする。次に、制御回路13は復号処理のための繰り返し処理に入る。制御回路13は、6回の復号処理で復号が終了することをストリームのヘッダ部分の解析等により知っているか、又は規格により予め知っているものとする。
 1回目:制御回路13が、バッファ回路11がアンダーフロー状態でないことを確認した後、可変長符号を復号する制御信号を生成し、復号回路12がバッファ回路11のストリームの先頭を見て、「0」の長さである「1」をストリーム消費量として無効化回路15に伝え、無効化回路15が閾値「16」とストリーム消費量の総和「1」との比較を行う。ストリーム消費量の総和が閾値以下であるので、無効化回路15は復号無効化信号として「0」を出力する。復号無効化信号が「0」であるので、復号回路12は復号処理を行い、復号結果「a」を制御回路13に出力する。制御回路13は復号無効化信号が「0」であることを確認して処理を継続する。
 2回目:制御回路13が、バッファ回路11がアンダーフロー状態でないことを確認した後、可変長符号を復号する制御信号を生成し、復号回路12がバッファ回路11のストリームの先頭を見て、「110」の長さである「3」をストリーム消費量として無効化回路15に伝え、無効化回路15が閾値「16」とストリーム消費量の総和「4」との比較を行う。ストリーム消費量の総和が閾値以下であるので、無効化回路15は復号無効化信号として「0」を出力する。復号無効化信号が「0」であるので、復号回路12は復号処理を行い、復号結果「c」を制御回路13に出力する。制御回路13は復号無効化信号が「0」であることを確認して処理を継続する。
 3回目:制御回路13が、バッファ回路11がアンダーフロー状態でないことを確認した後、可変長符号を復号する制御信号を生成し、復号回路12がバッファ回路11のストリームの先頭を見て、「0」の長さである「1」をストリーム消費量として無効化回路15に伝え、無効化回路15が閾値「16」とストリーム消費量の総和「5」との比較を行う。ストリーム消費量の総和が閾値以下であるので、無効化回路15は復号無効化信号として「0」を出力する。復号無効化信号が「0」であるので、復号回路12は復号処理を行い、復号結果「a」を制御回路13に出力する。制御回路13は復号無効化信号が「0」であることを確認して処理を継続する。
 4回目:制御回路13が、バッファ回路11がアンダーフロー状態でないことを確認した後、可変長符号を復号する制御信号を生成し、復号回路12がバッファ回路11のストリームの先頭を見て、「10」の長さである「2」をストリーム消費量として無効化回路15に伝え、無効化回路15が閾値「16」とストリーム消費量の総和「7」との比較を行う。ストリーム消費量の総和が閾値以下であるので、無効化回路15は復号無効化信号として「0」を出力する。復号無効化信号が「0」であるので、復号回路12は復号処理を行い、復号結果「b」を制御回路13に出力する。制御回路13は復号無効化信号が「0」であることを確認して処理を継続する。
 5回目:制御回路13が、バッファ回路11がアンダーフロー状態でないことを確認した後、可変長符号を復号する制御信号を生成し、復号回路12がバッファ回路11のストリームの先頭を見て、「10」の長さである「2」をストリーム消費量として無効化回路15に伝え、無効化回路15が閾値「16」とストリーム消費量の総和「9」との比較を行う。ストリーム消費量の総和が閾値以下であるので、無効化回路15は復号無効化信号として「0」を出力する。復号無効化信号が「0」であるので、復号回路12は復号処理を行い、復号結果「b」を制御回路13に出力する。制御回路13は復号無効化信号が「0」であることを確認して処理を継続する。
 6回目:制御回路13が、バッファ回路11がアンダーフロー状態でないことを確認した後、可変長符号を復号する制御信号を生成し、復号回路12がバッファ回路11のストリームの先頭を見て、「1111111」の長さである「7」をストリーム消費量として無効化回路15に伝え、無効化回路15が閾値「16」とストリーム消費量の総和「16」との比較を行う。ストリーム消費量の総和が閾値以下であるので、無効化回路15は復号無効化信号として「0」を出力する。復号無効化信号が「0」であるので、復号回路12は復号処理を行い、復号結果「h」を制御回路13に出力する。
 次に、ストリームが誤って「0110010111111111(0)」と入力された場合を考える。ここで、17ビット目は本来復号するべきストリームの次に続くストリームである。
 先ず、閾値設定回路14は、外部又は制御回路13から受信した閾値を記憶する。ストリーム長である16ビットが外部から入力され、その「16」を閾値として設定するものとする。次に、制御回路13は復号処理のための繰り返し処理に入る。
 1回目:制御回路13が、バッファ回路11がアンダーフロー状態でないことを確認した後、可変長符号を復号する制御信号を生成し、復号回路12がバッファ回路11のストリームの先頭を見て、「0」の長さである「1」をストリーム消費量として無効化回路15に伝え、無効化回路15が閾値「16」とストリーム消費量の総和「1」との比較を行う。ストリーム消費量の総和が閾値以下であるので、無効化回路15は復号無効化信号として「0」を出力する。復号無効化信号が「0」であるので、復号回路12は復号処理を行い、復号結果「a」を制御回路13に出力する。制御回路13は復号無効化信号が「0」であることを確認して処理を継続する。
 2回目:制御回路13が、バッファ回路11がアンダーフロー状態でないことを確認した後、可変長符号を復号する制御信号を生成し、復号回路12がバッファ回路11のストリームの先頭を見て、「110」の長さである「3」をストリーム消費量として無効化回路15に伝え、無効化回路15が閾値「16」とストリーム消費量の総和「4」との比較を行う。ストリーム消費量の総和が閾値以下であるので、無効化回路15は復号無効化信号として「0」を出力する。復号無効化信号が「0」であるので、復号回路12は復号処理を行い、復号結果「c」を制御回路13に出力する。制御回路13は復号無効化信号が「0」であることを確認して処理を継続する。
 3回目:制御回路13が、バッファ回路11がアンダーフロー状態でないことを確認した後、可変長符号を復号する制御信号を生成し、復号回路12がストリーム「0」をバッファ回路11より取得する。復号回路12はストリーム消費量「1」を無効化回路15に伝え、無効化回路15が閾値「16」とストリーム消費量の総和「5」との比較を行う。ストリーム消費量の総和が閾値以下であるので、無効化回路15は復号無効化信号として「0」を出力する。復号無効化信号が「0」であるので、復号回路12は復号処理を行い、復号結果「a」を制御回路13に出力する。制御回路13は復号無効化信号が「0」であることを確認して処理を継続する。
 4回目:制御回路13が、バッファ回路11がアンダーフロー状態でないことを確認した後、可変長符号を復号する制御信号を生成し、復号回路12がバッファ回路11のストリームの先頭を見て、「10」の長さである「2」をストリーム消費量として無効化回路15に伝え、無効化回路15が閾値「16」とストリーム消費量の総和「7」との比較を行う。ストリーム消費量の総和が閾値以下であるので、無効化回路15は復号無効化信号として「0」を出力する。復号無効化信号が「0」であるので、復号回路12は復号処理を行い、復号結果「b」を制御回路13に出力する。制御回路13は復号無効化信号が「0」であることを確認して処理を継続する。
 5回目:制御回路13が、バッファ回路11がアンダーフロー状態でないことを確認した後、可変長符号を復号する制御信号を生成し、復号回路12がバッファ回路11のストリームの先頭を見て、「1111111」の長さである「7」をストリーム消費量として無効化回路15に伝え、無効化回路15が閾値「16」とストリーム消費量の総和「14」との比較を行う。ストリーム消費量の総和が閾値以下であるので、無効化回路15は復号無効化信号として「0」を出力する。復号無効化信号が「0」であるので、復号回路12は復号処理を行い、復号結果「h」を制御回路13に出力する。制御回路13は復号無効化信号が「0」であることを確認して処理を継続する。
 6回目:制御回路13が、バッファ回路11がアンダーフロー状態でないことを確認した後、可変長符号を復号する制御信号を生成し、復号回路12がバッファ回路11のストリームの先頭を見て、「110」の長さである「3」をストリーム消費量として無効化回路15に伝え、無効化回路15が閾値「16」とストリーム消費量の総和「17」との比較を行う。ストリーム消費量の総和が閾値を越えているので、無効化回路15は復号無効化信号として「1」を出力する。復号無効化信号が「1」であるので、制御回路13は復号の繰り返し処理を中止する制御信号を復号回路12に出力する。その結果、復号回路12は復号処理を停止し、その後はストリームを消費しない。更に、制御回路13は復帰処理を行い、タスクを終了する。
 この構成により、本来よりも復号処理が多くなるようなストリームの誤りを検出できる。本実施形態では、総消費ストリーム量が閾値を越えれば直ちにストリーム誤りと検出できるので、従来のように長い待ち時間を経てタイムアップ信号が出力される場合と比較して、ストリームの誤り検出に長い待ち時間が発生しない。制御回路(プロセッサ)13の処理性能が今後更に向上してシステムがより高速化すれば、復号処理もより短時間で終了できるので、誤り検出までの時間はより一層短縮される。
 本実施形態では、誤りのない場合のストリームの長さがヘッダに格納されており、復号する前に正しいストリーム長を取得できる場合を想定しているが、それがない場合でも、コーデックの規格上の最大値を利用するか、実際の利用場面であり得る最大長を閾値として用いることにより、本実施形態の構成を採用することができる。
 (実施形態2)
 図3は、本発明の実施形態2に係る符号化ストリーム復号装置の構成を示すブロック図である。この構成では、実施形態1と異なり、充填確認回路16を持つ。それ以外は実施形態1と同じである。
 図3において、充填確認回路(充填確認手段)16は、バッファ回路11から充填ストリーム量を入力され、閾値設定回路から閾値を入力される。この両者を比較し、充填ストリーム量が閾値以上になれば、そのことを制御回路13に通知する。
 図4はこの構成の処理フロー例を示す。制御回路13は、閾値の設定後、充填確認回路16によりバッファ回路11へのストリームの閾値以上の充填量が確認された後、最初の制御信号を生成し、その確認までは復号回路12の復号処理を待機させる。それ以外は実施形態1と同じである。
 この構成により、ストリームの供給が不安定なシステムにおいて、復号処理時にアンダーフローが発生する可能性を排除することができる。そのため、復号処理にデータ量が少ないアンダーフロー時に復号回路12が不正な値を返すようなシステムにおいて、復号の繰り返し処理中でのアンダーフロー判定を省略できる。また、アンダーフロー時にバッファ回路12が充填されるまで復号回路12が待機するようなシステムでは、復号処理時にアンダーフローが発生すると、制御回路13はバッファ回路12が充填されるまで待たされるが、本構成により復号処理時のアンダーフローを防ぎ、復号処理開始前にバッファ回路12が充填されるまでの間、制御回路13を他タスクの処理のために使用することが可能である。
 (実施形態3)
 図5は、本発明の実施形態3に係る符号化ストリーム復号装置の構成を示すブロック図である。
 本実施形態の構成では、実施形態2と異なり、無効化回路15が発生する復号無効化信号は復号回路12にも通知される。また、予め復号処理が何回必要なのかは予め分かっているものとする。
 図6は、この構成の処理フロー例を示す。実施形態2と異なり、制御回路13は復号処理実行時に復号無効化信号に基づく分岐を行わず、復号無効化信号とは無関係に復号処理を継続させる制御信号の生成を続行する。また、復号回路12は、復号無効化信号が「1」で有効な場合は、前記制御回路13が発生する制御信号を受理するが、復号処理は実際には行わずに、特殊な値として「0」を復号結果として制御回路13に出力し、制御信号を受けて復号処理をしたようにふるまう。このとき、復号回路12は、不要回路の消費電力低減のために、クロックダウンや、電源を遮断する等を行っても良い。また、制御回路13は、最後の復号処理終了後に復号無効化信号が有効になっていた場合に、復帰処理のための制御を行う。
 符号化テーブルが図12で表されるようなストリーム「0110010101111111」が、誤って「0110011111111111(0)」と入力された場合を考える。ここで、17ビット目は本来復号するべきストリームの次に続くストリームである。
 先ず、閾値設定回路14は、外部又は制御回路13から受信した閾値を記憶する。ストリーム長である16ビットが外部から入力され、その「16」を閾値として設定するものとする。次に、充填確認回路16がストリームの充填を確認した後、制御回路13は復号処理のための繰り返し処理に入る。制御回路13は、6回の復号処理で復号が終了することを知っているものとする。
 1回目:制御回路13が可変長符号を復号する制御信号を生成し、復号回路12がバッファ回路11のストリームの先頭を見て、「0」の長さである「1」をストリーム消費量として無効化回路15に伝え、無効化回路15が閾値「16」とストリーム消費量の総和「1」との比較を行う。ストリーム消費量の総和が閾値以下であるので、無効化回路15は復号無効化信号として「0」を出力する。復号無効化信号が「0」であるので、復号回路12は復号処理を行い、復号結果「a」を制御回路13に出力する。制御回路13は復号無効化信号に関わらず処理を継続する。
 2回目:制御回路13が可変長符号を復号する制御信号を生成し、復号回路12がバッファ回路11のストリームの先頭を見て、「110」の長さである「3」をストリーム消費量として無効化回路15に伝え、無効化回路15が閾値「16」とストリーム消費量の総和「4」との比較を行う。ストリーム消費量の総和が閾値以下であるので、無効化回路15は復号無効化信号として「0」を出力する。復号無効化信号が「0」であるので、復号回路12は復号処理を行い、復号結果「c」を制御回路13に出力する。制御回路13は復号無効化信号に関わらず処理を継続する。
 3回目:制御回路13が可変長符号を復号する制御信号を生成し、復号回路12がストリーム「0」をバッファ回路11より取得する。復号回路12はストリーム消費量「1」を無効化回路15に伝え、無効化回路15が閾値「16」とストリーム消費量の総和「5」との比較を行う。ストリーム消費量の総和が閾値以下であるので、無効化回路15は復号無効化信号として「0」を出力する。復号無効化信号が「0」であるので、復号回路12は復号処理を行い、復号結果「a」を制御回路13に出力する。制御回路13は復号無効化信号に関わらず処理を継続する。
 4回目:制御回路13が可変長符号を復号する制御信号を生成し、復号回路12がバッファ回路11のストリームの先頭を見て、「1111111」の長さである「7」をストリーム消費量として無効化回路15に伝え、無効化回路15が閾値「16」とストリーム消費量の総和「12」との比較を行う。ストリーム消費量の総和が閾値以下であるので、無効化回路15は復号無効化信号として「0」を出力する。復号無効化信号が「0」であるので、復号回路12は復号処理を行い、復号結果「h」を制御回路13に出力する。制御回路13は復号無効化信号に関わらず処理を継続する。
 5回目:制御回路13が可変長符号を復号する制御信号を生成し、復号回路12がバッファ回路11のストリームの先頭を見て、「11110」の長さである「5」をストリーム消費量として無効化回路15に伝え、無効化回路15が閾値「16」とストリーム消費量の総和「17」との比較を行う。ストリーム消費量の総和が閾値を越えているので、無効化回路15は復号無効化信号として「1」を出力する。復号無効化信号が「1」であるので、復号回路12は復号処理を行わないが、復号結果として「0」を出力する。制御回路13は復号無効化信号に関わらず処理を継続する。
 6回目:制御回路13が可変長符号を復号する制御信号を生成するが、復号無効化信号が「1」であるので、復号回路12は復号処理を行わず、復号結果として「0」を出力する。
 本実施形態の構成では、制御回路13は復号処理毎に復号無効化信号の値が「0」か「1」かを判定する必要がない。外部から入力されるストリームは、通常、誤りがない場合が多いので、この誤りがないストリームに対して制御回路13が各復号処理で行わなければいけない処理を削減できる。制御回路13は、最後に復号無効化信号が「1」になっていれば、誤りがある1タスク分を捨てる等の制御を行えば済む。
 (実施形態4)
 図7は、本発明の実施形態4に係る符号化ストリーム復号装置の構成を示すブロック図である。
 本実施形態の構成では、実施形態1と異なり、状態保存回路17を備える。状態保存回路(状態保存手段)17は、無効化回路15から入力される閾値とストリーム総消費量との差分(閾値-ストリーム総消費量)及びバッファ回路11内のストリームの状態を記憶する。また、記憶した前記閾値とストリーム総消費量の差分を閾値設定回路14に通知し、バッファ回路11のストリームの状態を復元する。
 図8はこの構成の処理フロー例を示す。前記実施形態3と異なり、制御回路13は復号処理の継続の判定時に復号処理を中断するための制御を行うことができる。復号処理を中断する際には、制御回路13による処理継続判定直後に、状態保存回路17が無効化回路15から入力される閾値とストリーム総消費量との差分及びバッファ回路11から取得したバッファ回路11のストリームの状態を記憶する。復号再開時には、バッファ回路11のストリームの状態を復元し、記憶した閾値とストリーム総消費量との差分を新たな閾値として閾値設定回路14に通知して、中断した処理を再開する。
 例えば、実施形態1のストリームに誤りがない場合の例で、4回目の復号処理の後に中断をする場合、状態保存回路17は閾値「16」とストリーム総消費量「7」との差分である「9」と、ストリームの先頭を指すポインタなどバッファ回路11が保持する状態を保存する。その後、復号処理を再開する場合には、閾値設定回路14に新たな閾値として「9」を設定し、バッファ回路11のポインタの設定や、必要であればストリームの充填を行い、5回目の復号処理から処理を再開する。
 制御回路13が復号処理以外のタスクも実行するプロセッサで実現される場合、復号処理の途中で他のタスクに切り替えることが可能であれば、より複雑なシステムを構成可能となる。
 また、復号再開時には、閾値とストリーム総消費量との差分、及びバッファ回路11のストリームの状態を変更して復元することにより、ストリームのスキップや巻き戻しを実現することもできる。
 (実施形態5)
 図9は、本発明の実施形態5に係る符号化ストリーム復号装置の構成を示すブロック図である。
 本実施形態の構成では、実施形態1と異なり、制御回路13aと、他の制御回路(他の制御手段)13bとを備える。この構成において、通常時、復号回路12は、何れか一方の制御回路(例えば13a)が生成した制御信号のみを受け付け、実行中の制御回路13aのタスクが終了するか、又は実施形態4の方法で処理が中断されるまで同じ制御回路13aからの制御信号のみを受け付ける。しかし、復号無効化信号が「1」に有効になった場合には、以後は復号回路12はそのタスクでは復号する必要がないため、他方の制御回路13bが生成する制御信号のみを受け付けるようにする。
 図10は、1つの制御回路13が複数のタスク18a、18bを並列に行っている構成を示す。この場合にも、各タスク18a、18bが制御信号を出力する際に、同時にタスクを区別するための識別信号を出力することにより、複数の制御回路が存在する場合と同様に処理ができる。
 (実施形態6)
 図11は、本発明の実施形態6に係る符号化ストリーム復号装置の構成を示すブロック図である。
 図11に示す符号化ストリーム復号装置は、バッファ回路11と、復号回路12と、制御回路13と、閾値設定回路14と、無効化回路15と、充填確認回路16とを備える。
 バッファ回路11は、復号処理に備え、外部から入力されるストリームを充填する。復号回路12は、バッファ回路11から入力されるストリームに対し、制御信号に対応する復号処理を行い、復号結果を出力する。制御回路13は、復号回路12を制御する制御信号を生成し、その結果を受信する。
 また、閾値設定回路(閾値設定手段)14は、外部又は制御回路13により、制御回路13が制御信号を生成する回数、即ち、復号処理の回数の閾値を設定され、その閾値を無効化回路15に出力する。
 無効化回路15は、前記制御回路13が制御信号を生成した回数と、閾値設定回路14からの閾値とを比較して、予め定めた制御信号生成回数が閾値を越えれば復号無効化信号を有効にする。充填確認回路16は、バッファ回路11から充填ストリーム量が入力され、この充填ストリーム量が所定量以上になれば、そのことを制御回路13に通知する。
 本実施形態の構成においても、図4で示した実施形態2と同様の制御を行うことができる。
 符号化テーブルが図12で表されるようなストリーム「0110010101111111」が、誤って「0110010101011111(0)」と入力された場合を考える。ここで、17ビット目は本来復号するべきストリームの次に続くストリームである。また、復号結果が「h」となったときに1タスク分の復号処理を終了するものとする。
 先ず、閾値設定回路14は、外部又は制御回路13から受信した閾値を記憶する。ここでは、正常な制御信号生成回数(正常な復号処理回数)として「6」が外部から入力され、その「6」を閾値として設定するものとする。次に、充填確認回路16がストリームの充填を確認した後、制御回路13は復号処理のための繰り返し処理に入る。
 1回目:制御回路13が可変長符号を復号する制御信号を生成し、無効化回路15が閾値「6」と制御信号生成回数「1」との比較を行う。制御信号生成回数が閾値以下であるので、無効化回路15は復号無効化信号として「0」を出力する。復号無効化信号が「0」であるので、復号回路12は復号処理を行い、復号結果「a」を制御回路13に出力する。制御回路13は復号結果が「h」ではないので、処理を継続する。
 2回目:制御回路13が可変長符号を復号する制御信号を生成し、無効化回路15が閾値「6」と制御信号生成回数「2」との比較を行う。制御信号生成回数の総和が閾値以下であるので、無効化回路15は復号無効化信号として「0」を出力する。復号無効化信号が「0」であるので、復号回路12は復号処理を行い、復号結果「c」を制御回路13に出力する。制御回路13は復号結果が「h」ではないので、処理を継続する。
 3回目:制御回路13が可変長符号を復号する制御信号を生成し、無効化回路15が閾値「6」と制御信号生成回数「3」との比較を行う。制御信号生成回数の総和が閾値以下であるので、無効化回路15は復号無効化信号として「0」を出力する。復号無効化信号が「0」であるので、復号回路12は復号処理を行い、復号結果「a」を制御回路13に出力する。制御回路13は復号結果が「h」ではないので、処理を継続する。
 4回目:制御回路13が可変長符号を復号する制御信号を生成し、無効化回路15が閾値「6」と制御信号生成回数「4」との比較を行う。制御信号生成回数の総和が閾値以下であるので、無効化回路15は復号無効化信号として「0」を出力する。復号無効化信号が「0」であるので、復号回路12は復号処理を行い、復号結果「b」を制御回路13に出力する。制御回路13は復号結果が「h」ではないので、処理を継続する。
 5回目:制御回路13が可変長符号を復号する制御信号を生成し、無効化回路15が閾値「6」と制御信号生成回数「5」との比較を行う。制御信号生成回数の総和が閾値以下であるので、無効化回路15は復号無効化信号として「0」を出力する。復号無効化信号が「0」であるので、復号回路12は復号処理を行い、復号結果「b」を制御回路13に出力する。制御回路13は復号結果が「h」ではないので、処理を継続する。
 6回目:制御回路13が可変長符号を復号する制御信号を生成し、無効化回路15が閾値「6」と制御信号生成回数「6」との比較を行う。制御信号生成回数の総和が閾値以下であるので、無効化回路15は復号無効化信号として「0」を出力する。復号無効化信号が「0」であるので、復号回路12は復号処理を行い、復号結果「b」を制御回路13に出力する。制御回路13は復号結果が「h」ではないので、処理を継続する。
 7回目:制御回路13が可変長符号を復号する制御信号を生成し、無効化回路15が閾値「6」と制御信号生成回数「7」との比較を行う。制御信号生成回数の総和が閾値を越えているので、無効化回路15は復号無効化信号として「1」を出力する。復号無効化信号が「1」であるので、制御回路13は復号処理を停止させる制御信号を生成し、その結果、復号回路12は復号処理を行わない。その後、制御回路13は処理を終了する。
 尚、本実施形態では、充填確認回路16を持つ構成の場合を説明したが、これを持たない実施形態1の場合にも同様に本発明を適用できるのは勿論である。また、本実施形態は前記第3~第5の実施形態と組み合せても良いのは言うまでもない。
 以上説明したように、本発明に係る符号化ストリーム復号装置は、長い待ち時間を要することなくストリームの誤りを検出できるので、高度な符号化技術を用いた音声や動画像の復号装置、又は可変長符号を用いた通信装置等の用途に適用して有用である。
11  バッファ回路(バッファ手段)
12  復号回路(復号手段)
13  制御回路(制御手段)
13b 他の制御回路(他の制御手段)
14  閾値設定回路(閾値設定手段)
15  無効化回路(無効化手段)
16  充填確認回路(充填確認手段)
17  状態保存回路(状態保存手段)

Claims (14)

  1.  外部から入力されるストリームを蓄えるバッファ手段と、
     前記バッファ手段に蓄えられたストリームに対し可変長符号復号処理を行う復号手段と、
     前記復号手段の動作を制御するための制御信号を生成して前記復号手段に出力する制御手段と、
     前記復号手段で消費された消費ストリームの閾値を格納する閾値設定手段と、
     前記閾値設定手段の閾値と、前記復号手段で消費された消費ストリーム量とに基づいて復号無効化信号を発生して前記制御手段に出力する無効化手段とを備えた
     ことを特徴とする符号化ストリーム復号装置。
  2.  前記請求項1記載の符号化ストリーム復号装置において、
     前記閾値設定手段が格納する閾値を考慮した十分な量のストリーム量が前記バッファ手段に蓄えられたことを確認する充填確認手段を備え、
     前記制御手段は、前記充填確認手段によりストリームの充填が確認されるまで前記復号手段を待機させる
     ことを特徴とする符号化ストリーム復号装置。
  3.  前記請求項1又は2記載の符号化ストリーム復号装置において、
     前記制御手段は、前記無効化手段から復号無効化信号を受けたとき、制御信号により前記復号手段の復号動作を停止させ、
     前記復号手段は、前記無効化手段が復号無効化信号を発生しているとき、前記制御手段からの制御信号により復号処理を停止し、ストリームを消費しない
     ことを特徴とする符号化ストリーム復号装置。
  4.  前記請求項1又は2記載の符号化ストリーム復号装置において、
     前記制御手段は、前記無効化手段から復号無効化信号を受けても、前記復号手段の復号を継続させる制御信号を生成し、
     前記復号手段は、前記無効化手段が発生する復号無効化信号を受け、この復号無効化信号を受けている間は、前記制御手段に対して、前記制御手段が生成する制御信号を受理して動作したようにふるまう
     ことを特徴とする符号化ストリーム復号装置。
  5.  前記請求項4記載の符号化ストリーム復号装置において、
     前記復号手段は、
     前記無効化手段からの復号無効化信号を受けている間は、復号処理を行わず、
    復号結果として特殊な値を生成して、その特殊な値の復号結果を前記制御手段に出力する
     ことを特徴とする符号化ストリーム復号装置。
  6.  前記請求項4又は5記載の符号化ストリーム復号装置において、
     前記復号手段は、
     前記無効化手段からの復号無効化信号を受けている間は、クロックダウンなどの消費電力の低減を行う
     ことを特徴とする符号化ストリーム復号装置。
  7.  前記請求項5記載の符号化ストリーム復号装置において、
     前記制御手段は、
     一連の復号処理からなるタスクの終了後、前記無効化手段から復号無効化信号が発生しているかどうかを判断し、その復号無効化信号が発生しているとき、復帰のための制御を行う
     ことを特徴とする符号化ストリーム復号装置。
  8.  前記請求項3記載の符号化ストリーム復号装置において、
     前記無効化手段から前記閾値設定手段の閾値と前記復号手段で消費したストリーム総消費量との差分を伝えられると共に、前記バッファ手段から内部のストリームの状態を伝えられる状態保存手段を備え、
     前記状態保存手段は、前記復号手段での復号処理が中断した後、その中断した復号処理の再開時には、前記閾値とストリーム総消費量との差分を新たな閾値として前記閾値設定手段に通知すると共に、前記バッファ手段のストリームの状態を復元させる
     ことを特徴とする符号化ストリーム復号装置。
  9.  前記請求項8記載の符号化ストリーム復号装置において、
     前記状態保存手段は、
     前記閾値とストリーム総消費量との差分を変更して前記閾値設定手段に通知すると共に、この変更に対応するように前記バッファ手段のストリームの状態を変更して、
     ストリームの巻き戻し又はスキップを可能とした
     ことを特徴とする符号化ストリーム復号装置。
  10.  前記請求項3記載の符号化ストリーム復号装置において、
     前記復号手段の動作を制御するための他の制御信号を生成して前記復号手段に出力する他の制御手段を備え、
     前記復号手段は、前記無効化手段から復号無効化信号を受けている間は、前記他の制御手段からの制御信号に基づく復号処理を実行する
     ことを特徴とする符号化ストリーム復号装置。
  11.  前記請求項3記載の符号化ストリーム復号装置において、
     前記制御手段は、複数のタスクを並列に制御し、
     前記復号手段は、前記複数のタスクのうち何れか1つのタスクに基づく復号処理の実行時において前記無効化手段から復号無効化信号を受けている間は、他タスクの復号処理を実行する
     ことを特徴とする符号化ストリーム復号装置。
  12.  外部から入力されるストリームを蓄えるバッファ手段と、
     前記バッファ手段に蓄えられたストリームに対し可変長符号復号処理を行う復号手段と、
     前記復号手段の動作を制御するための制御信号を生成して前記復号手段に出力する制御手段と、
     前記制御手段での制御信号の生成回数の閾値を格納する閾値設定手段と、
     前記閾値設定手段の閾値と前記制御手段での制御信号の生成回数とに基づいて復号無効化信号を発生して前記制御手段に通知する無効化手段とを備えた
     ことを特徴とする符号化ストリーム復号装置。
  13.  前記請求項12記載の符号化ストリーム復号装置において、
     所定量のストリーム量が前記バッファ手段に蓄えられたことを確認する充填確認手段を備え、
     前記制御手段は、前記充填確認手段によりストリームの所定量への充填が確認されるまで前記復号手段を待機させる
     ことを特徴とする符号化ストリーム復号装置。
  14.  前記請求項12又は13記載の符号化ストリーム復号装置において、
     前記制御手段は、前記無効化手段から復号無効化信号を受けたとき、制御信号により前記復号手段での復号動作を停止させ、
     前記復号手段は、前記無効化手段が復号無効化信号を発生しているとき、前記制御手段からの制御信号を受けて、復号処理を停止し、ストリームを消費しない
     ことを特徴とする符号化ストリーム復号装置。
PCT/JP2009/004878 2009-04-27 2009-09-25 符号化ストリーム復号装置 WO2010125616A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN200980157961.0A CN102349272A (zh) 2009-04-27 2009-09-25 编码流解码装置
JP2011511191A JPWO2010125616A1 (ja) 2009-04-27 2009-09-25 符号化ストリーム復号装置
US13/234,830 US20120005562A1 (en) 2009-04-27 2011-09-16 Encoded stream decoding device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2009-108080 2009-04-27
JP2009108080 2009-04-27

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US13/234,830 Continuation US20120005562A1 (en) 2009-04-27 2011-09-16 Encoded stream decoding device

Publications (1)

Publication Number Publication Date
WO2010125616A1 true WO2010125616A1 (ja) 2010-11-04

Family

ID=43031783

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2009/004878 WO2010125616A1 (ja) 2009-04-27 2009-09-25 符号化ストリーム復号装置

Country Status (4)

Country Link
US (1) US20120005562A1 (ja)
JP (1) JPWO2010125616A1 (ja)
CN (1) CN102349272A (ja)
WO (1) WO2010125616A1 (ja)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103269257B (zh) 2013-05-13 2016-08-24 杰发科技(合肥)有限公司 一种检测变长编码码流错误的方法和解码及错误检测装置
US20160301945A1 (en) * 2015-02-09 2016-10-13 Hitachi Information & Telecommunication Engineering, Ltd. Image compression/decompression device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01106580A (ja) * 1987-10-19 1989-04-24 Canon Inc 復号化装置
WO2007032058A1 (ja) * 2005-09-13 2007-03-22 Mitsubishi Denki Kabushiki Kaisha 復号装置

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5842033A (en) * 1992-06-30 1998-11-24 Discovision Associates Padding apparatus for passing an arbitrary number of bits through a buffer in a pipeline system
US7366961B1 (en) * 2000-01-24 2008-04-29 Ati Technologies, Inc. Method and system for handling errors
KR100838902B1 (ko) * 2000-11-29 2008-06-16 소니 가부시끼 가이샤 스트림 처리 장치

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01106580A (ja) * 1987-10-19 1989-04-24 Canon Inc 復号化装置
WO2007032058A1 (ja) * 2005-09-13 2007-03-22 Mitsubishi Denki Kabushiki Kaisha 復号装置

Also Published As

Publication number Publication date
US20120005562A1 (en) 2012-01-05
CN102349272A (zh) 2012-02-08
JPWO2010125616A1 (ja) 2012-10-25

Similar Documents

Publication Publication Date Title
JP5173880B2 (ja) シリアルデータ転送装置
JP3022784B2 (ja) 高速の可変長復号化装置
JP2007095040A (ja) データ処理装置、プログラム、記録媒体、コンテンツ再生装置
US20110280320A1 (en) Encoding apparatus and the method
EP0653888B1 (en) Moving picture decoding control system
US6904089B1 (en) Encoding device and decoding device
JP4815559B2 (ja) 同期受信機
WO2010125616A1 (ja) 符号化ストリーム復号装置
JP5734057B2 (ja) マイクロコントローラ及びその制御方法
JP2000307661A (ja) 符号化装置および復号化装置
EP1187342A2 (en) Signal processing apparatus and method, and recording medium
JP4941254B2 (ja) 画像圧縮装置、プリンタ、及び複合機
US6459736B1 (en) Moving picture decoding apparatus and method
JP4612436B2 (ja) オーディオデコード装置
WO2006070299A1 (en) Method and apparatus for synchronization control of digital signals
JP4373283B2 (ja) 映像音声復号方法、映像音声復号装置、映像音声復号プログラム及びそのプログラムを記録したコンピュータ読み取り可能な記録媒体
JP2005065080A (ja) ヘッダ受信回路
JPS58150383A (ja) テレビジヨン用フレ−ム間符号化復号化装置
JP2003198378A (ja) 復号化装置および復号化方法ならびに記憶媒体、プログラム
KR100362911B1 (ko) 허프만코드를 사용하는 비디오 디코딩 처리 장치
JP5890052B2 (ja) マイクロコントローラ
JPH1074140A (ja) データ転送方法、復号装置、データ転送装置及びデータ処理装置
US7573535B2 (en) Image data processing circuit
CN103795955A (zh) 电子设备、动态图像再生装置、动态图像解码方法
JP2006080788A (ja) 動画符号化装置

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 200980157961.0

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 09843961

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2011511191

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 09843961

Country of ref document: EP

Kind code of ref document: A1