JP2005311522A - Digital broadcast receiver - Google Patents

Digital broadcast receiver Download PDF

Info

Publication number
JP2005311522A
JP2005311522A JP2004123167A JP2004123167A JP2005311522A JP 2005311522 A JP2005311522 A JP 2005311522A JP 2004123167 A JP2004123167 A JP 2004123167A JP 2004123167 A JP2004123167 A JP 2004123167A JP 2005311522 A JP2005311522 A JP 2005311522A
Authority
JP
Japan
Prior art keywords
data
value
pcr
audio
register
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2004123167A
Other languages
Japanese (ja)
Inventor
Junichi Abe
淳一 阿部
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2004123167A priority Critical patent/JP2005311522A/en
Publication of JP2005311522A publication Critical patent/JP2005311522A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Television Receiver Circuits (AREA)
  • Television Systems (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Time-Division Multiplex Systems (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To correct synchronization timing in AV reproduction so that timing expected by a transmission system is achieved, and to perform AV synchronization reproduction by preventing the overflow or underflow of an audio buffer without using a PLL circuit. <P>SOLUTION: An AV decoder 14 comprises a PCR comparison section 5 for comparing PCR with a clock signal clk to obtain their frequency error data δf by computation of a video/audio output timing correction 10 for correcting a PTS for synchronizing video data vdata with audio data adata', based on the frequency error data δf, generates enable signals v_en, a_en based on the correction, and controls the operating timing of output data control sections 8, 11; and a PCM data correction section 9 for correcting the audio data adata based on the frequency error data δf. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

この発明は、デジタル放送の送出系システムで用いられているシステムクロックを受信機側において再生せずにAV同期を図り、出力バッファの破綻を防ぎながらAV再生を行うデジタル放送受信機に関するものである。   The present invention relates to a digital broadcast receiver that performs AV reproduction while preventing the output buffer from failing by performing AV synchronization without reproducing the system clock used in the digital broadcast transmission system on the receiver side. .

従来のデジタル放送受信機は、放送送出系システム(以下、送出系システムと記載する)において用いられるシステムクロックをPLL(Phase Lock Loop)回路等で再生し、受信動作にこの再生したシステムクロックを用いてAV同期を図っている。   A conventional digital broadcast receiver reproduces a system clock used in a broadcast transmission system (hereinafter referred to as a transmission system) by a PLL (Phase Lock Loop) circuit or the like, and uses the reproduced system clock for reception operation. AV synchronization is achieved.

従来のデジタル放送受信機は、例えば、受信電波から目的の選局を行うと共に復調を行うチューナ/復調器と、復調されたTS(Transport Stream)から所望のパケットを抽出するトランスポートデコーダと、トランスポートデコーダから出力された各データの映像デコード及び音声デコードを行うAVデコーダと、番組配列情報や放送コンテンツなどのデータを処理するCPUと、CPUで処理された番組情報や放送データに基づいてグラフィックや文字の描画を行うOSDコントローラと、AVデコーダ及びOSDコントローラから出力される映像信号を合成する画像合成器とから構成されている。   A conventional digital broadcast receiver includes, for example, a tuner / demodulator that performs target channel selection and demodulation from a received radio wave, a transport decoder that extracts a desired packet from a demodulated TS (Transport Stream), a transport decoder, and the like. An AV decoder that performs video decoding and audio decoding of each data output from the port decoder, a CPU that processes data such as program arrangement information and broadcast content, graphics and the like based on program information and broadcast data processed by the CPU It is composed of an OSD controller that draws characters and an image synthesizer that synthesizes video signals output from the AV decoder and the OSD controller.

デジタル放送では、送出系システムから映像データと音声データがそれぞれ独立して送出される。このような放送を受信する場合は、デコードする際に映像と音声とを同期させるAV同期が必要になる。このAV同期を実現するため、従来のデジタル放送受信機のチューナは、一定周期で送出系システムから送られてくるPCR(Program Clock Reference)と、受信機に備えられた受信機内部カウンタでカウントしたSTC(System Time Clock)とを比較し、この比較データに基づいてPCRと受信機側でカウントされるSTCが所定の範囲内の精度で同期するように、電圧可変型発振器からなるPLL回路を用いて当該STCを調整し、PCRに同期したSTC、即ち送出側のSTCを再生している(例えば、非特許文献1参照)。   In digital broadcasting, video data and audio data are independently transmitted from a transmission system. When receiving such a broadcast, AV synchronization is required to synchronize video and audio when decoding. In order to realize this AV synchronization, a tuner of a conventional digital broadcast receiver counts with a PCR (Program Clock Reference) sent from a transmission system at a constant cycle and a receiver internal counter provided in the receiver. An STC (System Time Clock) is compared, and a PLL circuit comprising a voltage variable oscillator is used so that the PCR and STC counted on the receiver side are synchronized with accuracy within a predetermined range based on the comparison data. Thus, the STC is adjusted, and the STC synchronized with the PCR, that is, the STC on the transmission side is reproduced (for example, see Non-Patent Document 1).

また、従来のデジタル放送受信機には、固定クロック発生器により所定の周波数のシステムクロックを発生させ、このシステムクロックに基づいてデコーダを動作させてビデオ信号を復調するものがある。この装置では、固定クロック発生器により発生させたシステムクロックをSTCカウンタによりカウントし、このSTCカウント値とPTS(Presentation Time Stamp)復調器から供給されるPTSの値とを出力タイミング調整部が比較し、この結果に基づいて遅延メモリにバッファリングされているビデオ信号の出力タイミングを調整してデコーダへ出力し、当該受信機側のデコーダのビデオ信号の出力タイミングと送信側のエンコーダのビデオ信号の出力タイミングとの同期を図っている(例えば、特許文献1参照)。   Some conventional digital broadcast receivers generate a system clock having a predetermined frequency by a fixed clock generator and operate a decoder based on the system clock to demodulate a video signal. In this apparatus, the system clock generated by the fixed clock generator is counted by the STC counter, and the output timing adjustment unit compares the STC count value with the PTS value supplied from the PTS (Presentation Time Stamp) demodulator. Based on this result, the output timing of the video signal buffered in the delay memory is adjusted and output to the decoder, the output timing of the video signal of the decoder on the receiver side and the output of the video signal of the encoder on the transmission side The timing is synchronized (for example, refer to Patent Document 1).

特開2003−188865号公報(第6頁〜第7頁、図1、図2)Japanese Patent Laying-Open No. 2003-188865 (pages 6 to 7, FIGS. 1 and 2) 社団法人映像情報メディア学会編著「デジタル放送局のしくみ」株式会社オーム社出版、平成13年11月20日発行(第186頁〜第198頁、図11.4、図11.5)Edited by the Institute of Image Information and Television Engineers, “Digital Broadcasting Station Structure”, published by Ohm Publishing Co., Ltd., November 20, 2001 (pages 186 to 198, FIGS. 11.4 and 11.5)

従来のデジタル放送受信機は以上のように構成されているので、PLL回路を使用すると電圧可変型発振器を用意する必要があり、外付けとなる電圧可変型発振器を備えることからTSデコーダ、AVデコーダ等の機能をワンチップ化することが困難になる。またPLL回路を実装する場合には電圧可変型発振器を外付けするだけでなく周辺回路も必要になり、実装部品数が増加して小型化、低価格化を図る場合の障害になるという課題があった。   Since the conventional digital broadcast receiver is configured as described above, if a PLL circuit is used, it is necessary to prepare a voltage variable oscillator, and since an external voltage variable oscillator is provided, a TS decoder and an AV decoder are provided. It is difficult to make such functions into one chip. In addition, when a PLL circuit is mounted, not only an external voltage variable oscillator but also a peripheral circuit is required, which increases the number of mounted parts and becomes an obstacle to downsizing and cost reduction. there were.

また、従来のデジタル放送受信機はAV同期を行うとき送出系システムから送られてくるPTS(Presentation Time Stamp)と受信機側で再生した送出系システムのSTCとを用いて受信動作を行っており、当該送出系システムのSTCを再生することなく受信動作を行うとAV同期に誤差が発生する。更に、送出系システムとデジタル放送受信機が非同期でそれぞれ動作すると、デジタル放送受信機のオーディオ再生において、オーディオ出力バッファのオーバーフローあるいはアンダーフローが発生し、AV再生時に異音が発生するという課題があった。   Further, the conventional digital broadcast receiver performs a receiving operation using a PTS (Presentation Time Stamp) sent from the sending system when performing AV synchronization and the STC of the sending system reproduced on the receiver side. If the reception operation is performed without reproducing the STC of the transmission system, an error occurs in AV synchronization. Furthermore, if the transmission system and the digital broadcast receiver operate asynchronously, the audio output buffer overflows or underflows during audio playback of the digital broadcast receiver, and abnormal noise occurs during AV playback. It was.

この発明は上記のような課題を解決するためになされたもので、送出系システムの期待するAV同期タイミングとなるように、AV再生の同期タイミングを補正すると共に、PLL回路を用いることなくオーディオサンプリングデータを補正し、送信系システムと非同期の受信処理において出力バッファのオーバーフローまたはアンダーフローを防いでAV同期再生を行うデジタル放送受信機を得ることを目的とする。   The present invention has been made to solve the above-described problems, and corrects the AV reproduction synchronization timing so as to achieve the AV synchronization timing expected by the transmission system, and performs audio sampling without using a PLL circuit. It is an object of the present invention to obtain a digital broadcast receiver that corrects data and prevents AV buffer overflow or underflow in reception processing asynchronous with the transmission system system and performs AV synchronous reproduction.

この発明に係るデジタル放送受信機は、AVデコーダが、遂次入力されるPCRと当該受信機で発生させたクロック信号とを比較してクロック信号の誤差を示す周波数誤差データを演算により求めるPCR比較手段と、ビデオデコーダによりPESからデコードされたビデオデータとオーディオデコーダによりPESからデコードされたオーディオデータとを同期させるPTSをビデオデコーダ及びオーディオデコーダからそれぞれ取得し、これらのPTSを周波数誤差データに基づいて補正し、当該補正したPTSに基づくイネーブル信号を生成してビデオデータを出力するビデオバッファ及びオーディオデータを出力するオーディオバッファの動作タイミングを制御する出力タイミング補正手段と、オーディオデコーダより出力されたオーディオデータのサンプリング数を周波数誤差データに基づいて補正するオーディオデータ補正手段とを備えたものである。   The digital broadcast receiver according to the present invention is a PCR comparison in which an AV decoder compares a PCR that is sequentially input with a clock signal generated by the receiver to obtain frequency error data indicating an error of the clock signal by calculation. And PTS for synchronizing the video data decoded from the PES by the video decoder and the audio data decoded from the PES by the audio decoder from the video decoder and the audio decoder, respectively, and obtaining these PTSs based on the frequency error data An output timing correction means for controlling the operation timing of the video buffer for outputting the video data and the audio buffer for outputting the audio data by generating an enable signal based on the corrected PTS and the audio buffer output from the audio decoder. The sampling number of audio data is obtained by a audio data correcting means for correcting, based on the frequency error data.

この発明によれば、AVデコーダに、遂次入力されるPCRと当該受信機で発生させたクロック信号の誤差を示す周波数誤差データを求めるPCR比較手段と、ビデオデータとオーディオデータとを同期させるPTSを周波数誤差データに基づいて補正し、当該補正したPTSに基づくイネーブル信号を生成してビデオバッファ及びオーディオバッファの動作タイミングを制御する出力タイミング補正手段と、オーディオデータのサンプリング数を周波数誤差データに基づいて補正するオーディオデータ補正手段とを備えたので、送出側STCを再生することなくAV同期再生を行うことができ、またオーディオバッファのオーバーフローあるいはアンダーフローによるバッファ破綻を防いで異音発生を防ぐことができるという効果がある。   According to the present invention, the PCR comparison means for obtaining frequency error data indicating the error between the PCR that is sequentially input to the AV decoder and the clock signal generated by the receiver, and the PTS that synchronizes the video data and the audio data. Output timing correction means for controlling the operation timing of the video buffer and the audio buffer by generating an enable signal based on the corrected PTS based on the frequency error data, and the sampling number of the audio data based on the frequency error data Audio data correcting means for correcting the error, so that AV synchronous reproduction can be performed without reproducing the transmission side STC, and the occurrence of abnormal noise can be prevented by preventing buffer breakdown due to overflow or underflow of the audio buffer. There is an effect that can be.

以下、この発明の実施の一形態を説明する。
実施の形態1.
図1は、この発明の実施の形態1によるデジタル放送受信機の構成を示すブロック図である。図示したデジタル放送受信機は、アンテナ15を介してデジタル放送を受信するチューナ1、チューナ1から出力されたIF(Intermediate Frequency)信号を復調するOFDM(Orthogonal Frequency Division Multiplexing)復調部2、OFDM復調部2から出力されるTS(Transport Stream)パケットをデコードするトランスポートデコーダ3、当該受信機のSTC(System Time Clock)を発生する発振器4、及びAVデコーダ14によって構成される。
An embodiment of the present invention will be described below.
Embodiment 1 FIG.
FIG. 1 is a block diagram showing the configuration of a digital broadcast receiver according to Embodiment 1 of the present invention. The illustrated digital broadcast receiver includes a tuner 1 that receives a digital broadcast via an antenna 15, an OFDM (Orthogonal Frequency Division Multiplexing) demodulator 2 that demodulates an IF (Intermediate Frequency) signal output from the tuner 1, and an OFDM demodulator 2 is composed of a transport decoder 3 that decodes a TS (Transport Stream) packet output from 2, an oscillator 4 that generates an STC (System Time Clock) of the receiver, and an AV decoder 14.

AVデコーダ14は、PCR(Program Clock Reference)比較部(PCR比較手段)5、ビデオデコーダ6、及びオーディオデコーダ7を備える。また、ビデオデコーダ6から出力されるビデオデータを制御する出力データ制御部(ビデオバッファ)8、オーディオデコーダ7から出力されるオーディオデータを補正するPCMデータ補正部(オーディオデータ補正手段)9、及びPCMデータ補正部9から出力されたオーディオデータを制御する出力データ制御部(オーディオバッファ)11を備える。   The AV decoder 14 includes a PCR (Program Clock Reference) comparison unit (PCR comparison means) 5, a video decoder 6, and an audio decoder 7. Also, an output data control unit (video buffer) 8 that controls video data output from the video decoder 6, a PCM data correction unit (audio data correction unit) 9 that corrects audio data output from the audio decoder 7, and PCM An output data control unit (audio buffer) 11 that controls the audio data output from the data correction unit 9 is provided.

出力データ制御部8は、ビデオデータを出力する際に用いるビデオバッファを備え、出力データ制御部11は、オーディオデータを出力する際に用いるオーディオバッファを備える。また、AVデコーダ14は、PCR比較部5の比較結果に基づいて出力データ制御部8と出力データ制御部11とを制御するビデオ/オーディオ出力タイミング補正部(出力タイミング補正手段)10を備える。また、出力データ制御部8から出力されるビデオデータのD/A変換を行うD/Aコンバータ12と、出力データ制御部11から出力されるオーディオデータのD/A変換を行うD/Aコンバータ13とを備える。   The output data control unit 8 includes a video buffer used when outputting video data, and the output data control unit 11 includes an audio buffer used when outputting audio data. The AV decoder 14 also includes a video / audio output timing correction unit (output timing correction means) 10 that controls the output data control unit 8 and the output data control unit 11 based on the comparison result of the PCR comparison unit 5. Also, a D / A converter 12 that performs D / A conversion of video data output from the output data control unit 8, and a D / A converter 13 that performs D / A conversion of audio data output from the output data control unit 11. With.

次に動作について説明する。
チューナ1は、アンテナ15を用いて所望の放送波を選択して受信し、当該放送波、即ちRF(Radio Frequency)信号の周波数変換を行ってIF信号を出力する。このIF信号はOFDM復調部2に入力される。OFDM復調部2は、IF信号からTSパケットを抽出し、トランスポートデコーダ3へ当該TSパケットを出力する。トランスポートデコーダ3は、TSパケットのヘッダ情報に含まれるPID(Progrm ID)に基づいて当該TSパケットからPCR(Program Clock Reference)を抽出し、PCRを表すデータpcr<41..0>及び信号pcr_det をAVデコーダ14へ出力する。ここで例示したデータpcr<41..0>は42bitバスのデータ、また信号pcr_det はデータpcr<41..0>を認識する際に用いられる信号である。
Next, the operation will be described.
The tuner 1 selects and receives a desired broadcast wave using the antenna 15, performs frequency conversion of the broadcast wave, that is, an RF (Radio Frequency) signal, and outputs an IF signal. This IF signal is input to the OFDM demodulator 2. The OFDM demodulator 2 extracts a TS packet from the IF signal and outputs the TS packet to the transport decoder 3. The transport decoder 3 extracts a PCR (Program Clock Reference) from the TS packet based on the PID (Progrm ID) included in the header information of the TS packet, data pcr <41..0> representing the PCR, and a signal pcr_det Are output to the AV decoder 14. The data pcr <41..0> illustrated here is 42-bit bus data, and the signal pcr_det is a signal used when recognizing the data pcr <41..0>.

また、トランスポートデコーダ3は、ビデオデータ及びオーディオデータを含むTSパケットからPES(Packetized Elementary Stream)パケットを抽出し、AVデコーダ14へ出力する。AVデコーダ14は、ビデオデータに関するPESパケットpes_v をビデオデコーダ6へ、またオーディオデータに関するPESパケットpes_a をオーディオデコーダ7へ入力する。   Further, the transport decoder 3 extracts a PES (Packetized Elementary Stream) packet from the TS packet including video data and audio data, and outputs the packet packet to the AV decoder 14. The AV decoder 14 inputs the PES packet pes_v related to the video data to the video decoder 6 and the PES packet pes_a related to the audio data to the audio decoder 7.

AVデコーダ14のPCR比較部5は、トランスポートデコーダ3から入力したPCRの表す値、即ちデータpcr<41..0>の値を送出系システム側で用いられているSTC(以下、送出側のSTCと記載する)のカウント値として認識する。また、PCR比較部5は、発振器4が発生させているクロック信号clk を入力し、当該PCR比較部5の内部に備えられた図1では図示を省略したLocal_CNT カウンタにクロック信号clk をカウントさせ、また信号pcr_det から認識されるPCRの受信タイミングにてラッチさせる。PCR比較部5は、このようにLocal_CNT カウンタのカウント値と、前述の送出側のSTCのカウント値とを比較して、これらのカウント値からlocal_cnt カウンタのカウント値の誤差を算出し、周波数誤差データδfを生成する。PCR比較部5は、ここで生成した周波数誤差データδfをビデオ/オーディオ出力タイミング補正部10とPCMデータ補正部9に通知する。   The PCR comparison unit 5 of the AV decoder 14 uses the value represented by the PCR input from the transport decoder 3, that is, the value of the data pcr <41..0> on the STC (hereinafter referred to as the transmission side) used on the transmission system side. It is recognized as a count value). The PCR comparator 5 receives the clock signal clk generated by the oscillator 4 and causes the Local_CNT counter (not shown in FIG. 1) provided in the PCR comparator 5 to count the clock signal clk. In addition, it is latched at the reception timing of the PCR recognized from the signal pcr_det. In this way, the PCR comparison unit 5 compares the count value of the Local_CNT counter with the count value of the aforementioned STC on the transmission side, calculates the error of the count value of the local_cnt counter from these count values, and generates frequency error data δf is generated. The PCR comparison unit 5 notifies the generated frequency error data δf to the video / audio output timing correction unit 10 and the PCM data correction unit 9.

ビデオデコーダ6は、トランスポートデコーダ3にて分離されたPESパケットから、ビデオデータに関するPTS(Presentation Time Stamp)を表すデータpts_v とMPEG−2/4VIDEO規格に則ったES(Elementary Stream)とを分離する。その後、ESを復号化してビデオデータvdata を生成し、出力データ制御部8へ出力する。また、データpts_v を識別する、即ちデータpts_v の区切りを示すPTSイネーブル信号pts_v_w_enを生成し、データpts_v と共にビデオ/オーディオ出力タイミング補正部10に通知する。同様に、オーディオデコーダ7は、トランスポートデコーダ3にて分離されたPESパケットから、オーディオデータに関するPTSを表すデータpts_a とESとを分離し、ESを復号化してオーディオデータadata を生成し、PCMデータ補正部9へ出力する。また、データpts_a を識別する、即ちデータpts_a の区切りを示すPTSイネーブル信号pts_a_w_enを生成し、データpts_a と共にビデオ/オーディオ出力タイミング補正部10に通知する。   The video decoder 6 separates data pts_v representing PTS (Presentation Time Stamp) related to video data and ES (Elementary Stream) in accordance with the MPEG-2 / 4 VIDEO standard from the PES packet separated by the transport decoder 3. . Thereafter, the ES is decoded to generate video data vdata and output to the output data control unit 8. Further, a PTS enable signal pts_v_w_en that identifies the data pts_v, that is, indicates the delimiter of the data pts_v, is generated and notified to the video / audio output timing correction unit 10 together with the data pts_v. Similarly, the audio decoder 7 separates data pts_a and ES representing PTS relating to audio data from the PES packet separated by the transport decoder 3, decodes the ES to generate audio data adata, and PCM data Output to the correction unit 9. Further, a PTS enable signal pts_a_w_en that identifies the data pts_a, that is, indicates a delimiter of the data pts_a, is generated and notified to the video / audio output timing correction unit 10 together with the data pts_a.

PCMデータ補正部9は、PCR比較部5より周波数誤差データδfを入力し、その情報に基づいてオーディオデータadata 、即ちPCMデータを補正し、データの間引き処理、補間処理等を施したオーディオデータadata’、即ち補正PCMデータを生成して出力データ制御部11へ出力する。またPCMデータ補正部9は、発振器4が生成したクロック信号clk に基づいて図示を省略した再生サンプリングクロックclk2を生成し、オーディオバッファである出力データ制御部11、D/Aコンバータ13等に当該再生サンプリングクロックclk2を供給する。   The PCM data correction unit 9 receives the frequency error data δf from the PCR comparison unit 5, corrects the audio data adata, that is, PCM data based on the information, and performs audio thinning processing, interpolation processing, etc., audio data adata That is, the corrected PCM data is generated and output to the output data control unit 11. The PCM data correction unit 9 generates a reproduction sampling clock clk2 (not shown) based on the clock signal clk generated by the oscillator 4, and outputs the reproduction sampling clock clk2 to the output data control unit 11, D / A converter 13 and the like which are audio buffers. Supply sampling clock clk2.

ビデオ/オーディオ出力タイミング補正部10は、ビデオデコーダ6から入力したデータpts_v とPTSイネーブル信号pts_v_w_en、オーディオデコーダ7から入力したデータpts_a とPTSイネーブル信号pts_a_w_en、PCR比較部5から入力した周波数誤差データδfとデータpcr<41..0>と信号pcr_det とカウンタイネーブル信号cnt_en、及びPCMデータ補正部9の処理動作に要する時間を加味してビデオデータの出力イネーブル信号v_enとオーディオデータの出力イネーブル信号a_enとを生成する。   The video / audio output timing correction unit 10 includes the data pts_v input from the video decoder 6 and the PTS enable signal pts_v_w_en, the data pts_a input from the audio decoder 7 and the PTS enable signal pts_a_w_en, and the frequency error data δf input from the PCR comparison unit 5. In consideration of the data pcr <41..0>, the signal pcr_det, the counter enable signal cnt_en, and the time required for the processing operation of the PCM data correction unit 9, the video data output enable signal v_en and the audio data output enable signal a_en Generate.

出力データ制御部8は、出力イネーブル信号v_enに基づいて動作タイミングを調整してD/Aコンバータ12へビデオデータを出力する。また、出力データ制御部11は、イネーブル信号a_enに基づいて動作タイミングを調整してD/Aコンバータ13へオーディオデータを出力する。D/Aコンバータ12は出力データ制御部8から入力したビデオデータのD/A変換を行ってビデオ信号を生成し、D/Aコンバータ13は出力データ制御部11から入力したオーディオデータのD/A変換を行ってオーディオ信号を生成する。このように、ビデオバッファである出力データ制御部8からD/Aコンバータ12を介して出力されるビデオ信号と、オーディオバッファである出力データ制御部11からD/Aコンバータ13を介して出力されるオーディオ信号との同期を、出力イネーブル信号v_enと出力イネーブル信号a_enによって図り、D/Aコンバータ12からビデオ信号を、またD/Aコンバータ13からオーディオ信号を図示されない再生手段に出力してAV再生を行う。   The output data control unit 8 adjusts the operation timing based on the output enable signal v_en and outputs video data to the D / A converter 12. The output data control unit 11 adjusts the operation timing based on the enable signal a_en and outputs audio data to the D / A converter 13. The D / A converter 12 performs D / A conversion of the video data input from the output data control unit 8 to generate a video signal, and the D / A converter 13 performs D / A conversion of the audio data input from the output data control unit 11. Performs conversion to generate an audio signal. As described above, the video signal output from the output data control unit 8 serving as the video buffer via the D / A converter 12 and the output from the output data control unit 11 serving as the audio buffer via the D / A converter 13 are performed. The audio signal is synchronized with the output enable signal v_en and the output enable signal a_en, and the video signal is output from the D / A converter 12 and the audio signal is output from the D / A converter 13 to a reproducing means (not shown) for AV reproduction. Do.

なお、前述のトランスポートデコーダ3及びAVデコーダ14は、発振器4が生成するクロック信号clk をシステムクロックとして、即ち基本的にクロック信号clk に同期して動作する。また、図1に示したリセット信号reset は、トランスポートデコーダ3及びAVデコーダ14のリセット信号で、このリセット信号reset がアクティブになると、後述するトランスポートデコーダ3ならびにAVデコーダ14を構成する各レジスタ、カウンタ等に保持されている内容がクリアされる。   The above-described transport decoder 3 and AV decoder 14 operate using the clock signal clk generated by the oscillator 4 as a system clock, that is, basically in synchronization with the clock signal clk. Further, the reset signal reset shown in FIG. 1 is a reset signal of the transport decoder 3 and the AV decoder 14, and when this reset signal reset becomes active, each register constituting the transport decoder 3 and the AV decoder 14 described later, The contents held in the counter or the like are cleared.

次に、デジタル放送受信機を構成する各部の詳細を説明する。ここでは本発明の要部であるトランスポートデコーダ3、及びAVデコーダ14を構成するPCR比較部5、PCMデータ補正部9、ビデオ/オーディオ出力タイミング補正部10について詳細な説明を行う。   Next, details of each unit constituting the digital broadcast receiver will be described. Here, a detailed description will be given of the PCR comparison unit 5, the PCM data correction unit 9, and the video / audio output timing correction unit 10 constituting the transport decoder 3 and the AV decoder 14, which are the main parts of the present invention.

図2は、実施の形態1によるデジタル放送受信機のトランスポートデコーダの構成を示すブロック図である。図1に示したトランスポートデコーダ3は、例えば図2に示したようにPIDフィルタ部21、PSI(Program Specific Information)解析部22、及びコンテンツデータバッファ23によって構成される。PSI解析部22は、OFDM復調部2から入力したTSパケットの中に含まれているPAT(Program Association Table)及びPMT(Program Map Table)を解析し、ビデオ、オーディオ、PCR、コンテンツ等の各データのPIDをPIDフィルタ部21へ通知する。PIDフィルタ部21は、通知されたPIDに従ってOFDM復調部2から入力したTSパケットから、ビデオデータのPESパケットpes_v 、オーディオデータのPESパケットpes_a 、PCRを表すデータpcr<41..0>及び信号pcr_det 、コンテンツデータのパケットpes_c の各データをそれぞれ分離する。ただし、PCRを表すデータpcr<41..0>及び信号pcr_det 以外は、ビデオ/オーディオ出力タイミング補正部10から出力されるPESイネーブル信号pes_enがアクティブになったとき分離動作を行う。   FIG. 2 is a block diagram showing the configuration of the transport decoder of the digital broadcast receiver according to the first embodiment. The transport decoder 3 illustrated in FIG. 1 includes, for example, a PID filter unit 21, a PSI (Program Specific Information) analysis unit 22, and a content data buffer 23 as illustrated in FIG. The PSI analyzing unit 22 analyzes a PAT (Program Association Table) and a PMT (Program Map Table) included in the TS packet input from the OFDM demodulating unit 2, and each data such as video, audio, PCR, content, etc. Is notified to the PID filter unit 21. From the TS packet input from the OFDM demodulator 2 according to the notified PID, the PID filter unit 21 performs video data PES packet pes_v, audio data PES packet pes_a, PCR data pcr <41..0>, and signal pcr_det. The data of the content data packet pes_c is separated. However, the separation operation is performed when the PES enable signal pes_en output from the video / audio output timing correction unit 10 becomes active except for the data pcr <41..0> representing the PCR and the signal pcr_det.

PIDフィルタ部21は、前述のように通知されたPIDに従ってTSパケットから、PCRデータpcr<41..0>としてアダプテーションフィールド内に含まれるPCR値ベース33bit+PCR値拡張9bitの計42bitのデータを抽出する。また、PESイネーブル信号pes_enがアクティブになってビデオ、オーディオ、コンテンツの各データの分離が許可されると、TSパケットのペイロードに含まれるPESパケットの抽出を開始する。その後、分離・抽出したビデオデータのPESパケットpes_v 、及びオーディオデータのPESパケットpes_a をAVデコーダ14へ、コンテンツデータのパケットpes_c をコンテンツデータバッファ23へ出力する。コンテンツデータバッファ23は、入力されたパケットpes_c を格納し、例えばブラウザソフトウェアなどのプログラム等に基づいて動作する図示を省略した制御手段などにパケットpes_c を適宜出力する。なお、ここで取り扱うパケットpes_c を成すコンテンツデータは、デジタル放送において一般的に行われているサービス内容等に関するデータを指し示すもので、ここではその内容について説明を省略する。   The PID filter unit 21 extracts a total of 42 bits of PCR value base 33 bits + PCR value extension 9 bits included in the adaptation field as PCR data pcr <41..0> from the TS packet according to the PID notified as described above. . When the PES enable signal pes_en becomes active and separation of video, audio, and content data is permitted, extraction of the PES packet included in the payload of the TS packet is started. Thereafter, the PES packet pes_v of the separated and extracted video data and the PES packet pes_a of the audio data are output to the AV decoder 14 and the content data packet pes_c is output to the content data buffer 23. The content data buffer 23 stores the input packet pes_c, and appropriately outputs the packet pes_c to a control unit (not shown) that operates based on a program such as browser software. Note that the content data forming the packet pes_c handled here indicates data related to service contents or the like generally performed in digital broadcasting, and description thereof is omitted here.

図3は、実施の形態1によるデジタル放送受信機のPIDフィルタ部の構成を示すブロック図である。図2に示したPIDフィルタ部21は、OFDM復調部2からTSパケットを入力し、PSI解析部22から入力されるPIDと、ビデオ/オーディオ出力タイミング補正部10から入力されるPESイネーブル信号pes_enに基づいて、TSパケットの内容を解析してビデオデータを含むものをパケットts_vとし、オーディオデータを含むものをパケットts_aとして、またコンテンツデータを含むものをパケットts_cとして夫々出力するTSヘッダ解析/デコード部31と、TSヘッダ解析/デコード部31から出力される各TSパケット、即ちパケットts_v,ts_a,ts_cからそれぞれPESパケットを抽出するPESパケット抽出部32,33,34とを備える。   FIG. 3 is a block diagram showing the configuration of the PID filter unit of the digital broadcast receiver according to the first embodiment. The PID filter unit 21 shown in FIG. 2 receives the TS packet from the OFDM demodulator 2, and receives the PID input from the PSI analyzer 22 and the PES enable signal pes_en input from the video / audio output timing correction unit 10. Based on the TS packet analysis, the TS packet analysis / decoding unit outputs the packet data ts_v including the video data, the packet ts_a including the audio data, and the packet ts_c including the content data. 31 and PES packet extraction units 32, 33, and 34 for extracting PES packets from TS packets output from the TS header analysis / decoding unit 31, that is, packets ts_v, ts_a, and ts_c, respectively.

図4は、TSヘッダ及びPESヘッダの構成を示す説明図である。図4に示したものは、図3のTSヘッダ解析/デコード部31へ入力されるTSパケットのヘッダ部分のビットアサインの一例と、PESパケット抽出部32〜34からそれぞれ出力されるPESパケットのヘッダ部分のビットアサインの一例とを表したものである。
図5は、PCRの構成を示す説明図である。図示したものはこれまでの説明に用いた42bitによってPCRを表したデータの構成例、即ちデータpcr<41..0>のビットアサインの一例である。
図6は、実施の形態1によるデジタル放送受信機のトランスポートデコーダから出力されるPCRのタイミングチャートである。図示したものは、これまでの説明で用いたPCRを表すデータpcr<41..0>及び信号pcr_det のタイミングチャートで、トランスポートデコーダ3から、詳しくは図3に示したTSヘッダ解析/デコード部31から出力されるデータpcr<41..0>及び信号pcr_det を表したものである。
FIG. 4 is an explanatory diagram showing the structure of the TS header and the PES header. 4 shows an example of the bit assignment of the header portion of the TS packet input to the TS header analysis / decoding unit 31 of FIG. 3 and the header of the PES packet output from the PES packet extraction units 32 to 34, respectively. An example of the bit assignment of a part is shown.
FIG. 5 is an explanatory diagram showing the structure of the PCR. What is shown is an example of a data configuration representing PCR by 42 bits used in the above description, that is, an example of bit assignment of data pcr <41..0>.
FIG. 6 is a timing chart of PCR output from the transport decoder of the digital broadcast receiver according to the first embodiment. The timing chart of the data pcr <41..0> and the signal pcr_det representing the PCR used in the above description is shown, and the TS header analysis / decoding unit shown in FIG. The data pcr <41..0> and the signal pcr_det output from 31 are shown.

TSヘッダ解析/デコード部31は、図4に示したTSヘッダ内の13bitで記述されたPIDにより、TSパケットに含まれているデータがビデオ、オーディオ、コンテンツの各データ、あるいはPCRのどれにあたるかを判別する。例えば、判別対象のTSパケットがビデオデータを含むパケットであると判別した場合には、このパケットをパケットts_vとしてPESパケット抽出部32へ出力する。また、判別対象のTSパケットがオーディオデータを含むと判別した場合には、このパケットをオーディオデータを含むパケットts_aとしてPESパケット抽出部33へ出力し、コンテンツデータを含むと判別した場合にはコンテンツデータを含むパケットts_cとしてPESパケット抽出部34へ出力する。ただし、TSヘッダ解析/デコード部31は、ビデオ/オーディオ出力タイミング補正部10から出力されるPESイネーブル信号pes_enがアクティブになるまで、データpcr<41..0>及び信号pcr_det のみを出力する。データpcr<41..0>は、TSパケットのアダプテーションフィールドにPCR値ベース33bit(データpcr_base<32..0> )とPCR値拡張9bit(データpcr_ext<8..0> )として含まれているもので、TSヘッダ解析/デコード部31は、これらを図5に示したように42bitのデータとしてTSパケットから抽出し、AVデコーダ14へ、詳しくはPCR比較部5へ送出する。   The TS header analysis / decoding unit 31 determines whether the data included in the TS packet corresponds to video, audio, content data, or PCR according to the PID described in 13 bits in the TS header shown in FIG. Is determined. For example, when it is determined that the TS packet to be determined is a packet including video data, this packet is output to the PES packet extraction unit 32 as a packet ts_v. If it is determined that the TS packet to be determined includes audio data, this packet is output to the PES packet extraction unit 33 as a packet ts_a including audio data. If it is determined that the TS data includes content data, the content data is output. Is output to the PES packet extraction unit 34 as a packet ts_c including However, the TS header analysis / decoding unit 31 outputs only the data pcr <41..0> and the signal pcr_det until the PES enable signal pes_en output from the video / audio output timing correction unit 10 becomes active. Data pcr <41..0> is included in the adaptation field of the TS packet as a PCR value base 33 bits (data pcr_base <32..0>) and a PCR value extension 9 bits (data pcr_ext <8..0>). Therefore, the TS header analysis / decoding unit 31 extracts these from the TS packet as 42-bit data as shown in FIG. 5, and sends them to the AV decoder 14, specifically to the PCR comparison unit 5.

また、TSヘッダ解析/デコード部31は、TSパケットから取得したPCRが更新される度にアクティブを示すパルス信号を生成し、これを信号pcr_det として出力する。信号pcr_det は、アクティブを示すパルス信号幅が発振器4から出力されるクロック信号clk の1クロック分を有するように生成され、図6に示したようにPCRが更新されるタイミングに同期してTSヘッダ解析/デコード部31から出力される。なお、図6に示した“PCRm”は、m番目に送出されたPCRを表すものである。   In addition, the TS header analysis / decoding unit 31 generates a pulse signal indicating active each time the PCR acquired from the TS packet is updated, and outputs this as a signal pcr_det. The signal pcr_det is generated so that the pulse signal width indicating active has one clock of the clock signal clk output from the oscillator 4, and the TS header is synchronized with the timing at which the PCR is updated as shown in FIG. Output from the analysis / decoding unit 31. Note that “PCRm” shown in FIG. 6 indicates the m-th transmitted PCR.

PESパケット抽出部32〜34は、前述のようにTSパケットからPESパケットの抽出を行う。最初のPESパケット抽出は、図4に示したTSヘッダの内、図中左端に記載した“TSヘッダ”内に示されたPESヘッダの内容から、PESヘッダ開始コードの例えば“0x000001”が検出されたときから開始される。PESヘッダ開始コードが検出される前にTSパケットから抽出されたデータは全て無視する。PESヘッダ開始コードを検出した後は、そのコードが検出されたPESヘッダ内に示された“PESパケット長”から、PESパケットのレングスを分析してPESパケットを抽出する。TSパケットのパケットts_vをTSヘッダ解析/デコード部31から入力したPESパケット抽出部32は、パケットts_vからPESパケットを抽出し、これをPESパケットpes_v としてAVデコーダ14へ出力する。また、同様にパケットts_aをTSヘッダ解析/デコード部31から入力したPESパケット抽出部33は、パケットts_aからPESパケットを抽出し、これをPESパケットpes_a としてAVデコーダ14へ出力する。また、パケットts_cをTSヘッダ解析/デコード部31から入力したPESパケット抽出部34は、パケットts_cからPESパケットを抽出し、これをPESパケットpes_c としてコンテンツデータバッファ23へ出力する。   The PES packet extraction units 32 to 34 extract the PES packet from the TS packet as described above. In the first PES packet extraction, the PES header start code “0x000001”, for example, is detected from the contents of the PES header shown in the “TS header” shown at the left end of the TS header shown in FIG. It starts from the time. All data extracted from the TS packet before the PES header start code is detected is ignored. After detecting the PES header start code, the length of the PES packet is analyzed from the “PES packet length” indicated in the PES header in which the code is detected, and the PES packet is extracted. The PES packet extraction unit 32 that receives the TS packet packet ts_v from the TS header analysis / decoding unit 31 extracts the PES packet from the packet ts_v, and outputs the PES packet to the AV decoder 14 as the PES packet pes_v. Similarly, the PES packet extraction unit 33 that has received the packet ts_a from the TS header analysis / decoding unit 31 extracts the PES packet from the packet ts_a, and outputs this to the AV decoder 14 as a PES packet pes_a. Further, the PES packet extraction unit 34 that has received the packet ts_c from the TS header analysis / decoding unit 31 extracts the PES packet from the packet ts_c, and outputs this to the content data buffer 23 as a PES packet pes_c.

図7は、実施の形態1によるデジタル放送受信機のPCR比較部の構成を示すブロック図である。この図は、これまで説明したPCR比較部5の構成を示したものである。図7に示したPCR比較部5は、図1に示した発振器4から出力されるクロック信号clk をカウントするLocal_CNT カウンタ71、Local_CNT カウンタ71のカウント値を格納するLocal_REG_A レジスタ(カウント値レジスタ)72及びLocal_REG_B レジスタ(カウント値レジスタ)73、PCRを表すデータpcr<41..0>を格納するPCR_REG_A レジスタ(PCR値レジスタ)74及びPCR_REG_B レジスタ(PCR値レジスタ)75、これらのレジスタの値を用いてLocal_CNT カウンタ71から出力されるカウント値の誤差を検出するカウンタ誤差検出部(誤差検出手段)76、カウンタ誤差検出部76から出力されるデータをシフトするシフトレジスタ77,80、シフトレジスタ77から出力されるデータの平均を求める平均化処理部78、シフトレジスタ80から出力されるデータの平均を求める平均化処理部81、及び平均化処理部78と平均化処理部81から出力されるデータに基づいて周波数誤差データδfを算出するδf算出部(周波数誤差データ演算手段)79を備えて構成される。   FIG. 7 is a block diagram showing the configuration of the PCR comparison unit of the digital broadcast receiver according to the first embodiment. This figure shows the configuration of the PCR comparison unit 5 described so far. 7 includes a Local_CNT counter 71 that counts the clock signal clk output from the oscillator 4 shown in FIG. 1, a Local_REG_A register (count value register) 72 that stores the count value of the Local_CNT counter 71, and Local_REG_B register (count value register) 73, PCR_REG_A register (PCR value register) 74 for storing data pcr <41..0> representing PCR, PCR_REG_B register (PCR value register) 75, Local_CNT using the values of these registers A counter error detection unit (error detection means) 76 that detects an error in the count value output from the counter 71, shift registers 77 and 80 that shift data output from the counter error detection unit 76, and output from the shift register 77. Output from the averaging processing unit 78 for obtaining the average of the data and the shift register 80. Average processing unit 81 for obtaining the average of the data to be averaged, and δf calculation unit (frequency error data calculation means) 79 for calculating the frequency error data δf based on the data output from the averaging processing unit 78 and the averaging processing unit 81 It is configured with.

図7に示したように、Local_CNT カウンタ71には、発振器4から出力されるクロック信号clk と、トランスポートデコーダ3から出力される信号pcr_det と、カウント値の初期値としてデータpcr<41..0>が入力される。Local_REG_A レジスタ72は、信号pcr_det とLocal_CNT カウンタ71から出力されるカウント値を示すデータlocal_cnt<41..0>が入力され、データlocal_cnt<41..0>をレジスタ値local_reg_a<41..0>として格納し、また、信号pcr_det に基づいてレジスタ値local_reg_a<41..0>の入力や出力を行う。Local_REG_B レジスタ73は、信号pcr_det とLocal_REG_A レジスタ72から出力されるレジスタ値local_reg_a<41..0>とを入力して、このレジスタ値local_reg_a<41..0>をレジスタ値local_reg_b<41..0>として格納し、また、信号pcr_det に基づいてレジスタ値local_reg_b<41..0>の入力や出力を行う。PCR_REG_A レジスタ74は、信号pcr_det とトランスポートデコーダ3から出力されたデータpcr<41..0>とを入力して、このデータpcr<41..0>をレジスタ値pcr_reg_a<41..0>として格納し、また、信号pcr_det に基づいてレジスタ値pcr_reg_a<41..0>の入力や出力を行う。PCR_REG_B レジスタ75は、信号pcr_det とPCR_REG_A レジスタ74から出力されたレジスタ値pcr_reg_a<41..0>とを入力して、このレジスタ値pcr_reg_a<41..0>をレジスタ値pcr_reg_b<41..0>として格納し、また、信号pcr_det に基づいてレジスタ値pcr_reg_b<41..0>の入力や出力を行う。   As shown in FIG. 7, the Local_CNT counter 71 includes a clock signal clk output from the oscillator 4, a signal pcr_det output from the transport decoder 3, and data pcr <41..0 as an initial value of the count value. > Is entered. The Local_REG_A register 72 receives the signal pcr_det and the data local_cnt <41..0> indicating the count value output from the Local_CNT counter 71, and uses the data local_cnt <41..0> as the register value local_reg_a <41..0>. The register value local_reg_a <41..0> is input or output based on the signal pcr_det. The Local_REG_B register 73 receives the signal pcr_det and the register value local_reg_a <41..0> output from the Local_REG_A register 72, and uses the register value local_reg_a <41..0> as the register value local_reg_b <41..0>. The register value local_reg_b <41..0> is input or output based on the signal pcr_det. The PCR_REG_A register 74 receives the signal pcr_det and the data pcr <41..0> output from the transport decoder 3, and uses the data pcr <41..0> as the register value pcr_reg_a <41..0>. The register value pcr_reg_a <41..0> is input or output based on the signal pcr_det. The PCR_REG_B register 75 receives the signal pcr_det and the register value pcr_reg_a <41..0> output from the PCR_REG_A register 74, and uses the register value pcr_reg_a <41..0> as the register value pcr_reg_b <41..0>. The register value pcr_reg_b <41..0> is input or output based on the signal pcr_det.

カウンタ誤差検出部76は、Local_REG_A レジスタ72、Local_REG_B レジスタ73、PCR_REG_A レジスタ74、及びPCR_REG_B レジスタ75にそれぞれ格納されているレジスタ値と信号pcr_det とを入力し、後述するように信号pcr_det に基づいて各レジスタ値を用いて演算を行い、データdiff<42..0> と差分値δlocal_cnt<41..0>とを求める。   The counter error detection unit 76 inputs the register value and the signal pcr_det stored in the Local_REG_A register 72, Local_REG_B register 73, PCR_REG_A register 74, and PCR_REG_B register 75, respectively. An operation is performed using the value to obtain data diff <42..0> and a difference value δlocal_cnt <41..0>.

シフトレジスタ77は複数のレジスタを備え、例えばN個のレジスタDIFF_0〜DIFF_Nを備え、レジスタDIFF_0から順に格納されているレジスタ値をシフトし、各レジスタDIFF_0〜DIFF_Nに格納されている値を出力する。このシフトレジスタ77には、信号pcr_detとカウンタ誤差検出部76からデータdiff<42..0> が入力され、順次入力されるデータdiff<42..0> を、信号pcr_det に基づいてシフトさせながらレジスタDIFF_0〜DIFF_Nに格納する。   The shift register 77 includes a plurality of registers, for example, includes N registers DIFF_0 to DIFF_N, shifts register values stored in order from the register DIFF_0, and outputs values stored in the registers DIFF_0 to DIFF_N. The shift register 77 receives the signal pcr_det and the data diff <42..0> from the counter error detector 76, and sequentially shifts the input data diff <42..0> based on the signal pcr_det. Store in registers DIFF_0 to DIFF_N.

シフトレジスタ80は複数のレジスタを備え、例えばN個のレジスタLCNT_0〜LCNT_Nを備え、レジスタLCNT_0から順に格納されているレジスタ値をシフトし、各レジスタLCNT_0〜LCNT_nから格納している値を出力する。このシフトレジスタ80には、信号pcr_det とカウンタ誤差検出部76から差分値δlocal_cnt<41..0>が入力される。順次入力される差分値δlocal_cnt<41..0>を、信号pcr_det に基づいてレジスタLCNT_0〜LCNT_Nにシフトさせながら格納する。なお、レジスタLCNT_0〜LCNT_Nの個数はレジスタDIFF_0〜DIFF_Nと同一数とは限らない。   The shift register 80 includes a plurality of registers, for example, includes N registers LCNT_0 to LCNT_N, shifts the register values stored in order from the register LCNT_0, and outputs the stored values from the registers LCNT_0 to LCNT_n. The shift register 80 receives the signal pcr_det and the difference value δlocal_cnt <41..0> from the counter error detector 76. The sequentially inputted difference value Δlocal_cnt <41..0> is stored while being shifted to the registers LCNT_0 to LCNT_N based on the signal pcr_det. Note that the number of registers LCNT_0 to LCNT_N is not necessarily the same as that of the registers DIFF_0 to DIFF_N.

図8は、実施の形態1によるデジタル放送受信機のPCR比較部の動作を示すタイミングチャートである。この図は、図7に示したPCR比較部5が動作するとき、PCR比較部5を構成する各部分で入出力される各信号、データ等の遷移を示したものである。   FIG. 8 is a timing chart showing the operation of the PCR comparison unit of the digital broadcast receiver according to the first embodiment. This figure shows the transition of each signal, data, etc. input / output in each part constituting the PCR comparison unit 5 when the PCR comparison unit 5 shown in FIG. 7 operates.

Local_CNT カウンタ71は、図8に示したように、信号pcr_det が初めてアクティブに変化し、そのあと最初にクロック信号clk が立ち上ったとき、アクティブを示すカウントイネーブル信号cnt_enを生成して出力すると共に、このときPCR比較部5に入力されているPCRを表すデータpcr<41..0>をロードする。これは、信号pcr_det が初めてアクティブになった後、最初にクロック信号clk が立ち上がったタイミングで行われる動作である。このとき、Local_CNT カウンタ71へ入力されるデータpcr<41..0>は、後述するように当該カウンタのカウント値の初期値としてLocal_REG_A レジスタ72へ格納される。初期値のデータpcr<41..0>として、例えば図8に示したデータpcr0がLocal_CNT カウンタ71へ入力され、このタイミングでLocal_CNT カウンタ71からアクティブに変化したカウントイネーブル信号cnt_enが出力される。   As shown in FIG. 8, when the signal pcr_det first changes to active and the clock signal clk rises for the first time, the Local_CNT counter 71 generates and outputs a count enable signal cnt_en indicating the activity. At this time, the data pcr <41..0> representing the PCR input to the PCR comparison unit 5 is loaded. This is an operation performed at the timing when the clock signal clk first rises after the signal pcr_det becomes active for the first time. At this time, data pcr <41..0> input to the Local_CNT counter 71 is stored in the Local_REG_A register 72 as an initial value of the count value of the counter, as will be described later. For example, the data pcr0 shown in FIG. 8 is input to the Local_CNT counter 71 as the initial value data pcr <41..0>, and the count enable signal cnt_en that is actively changed is output from the Local_CNT counter 71 at this timing.

この後、アクティブを示していた信号pcr_det が立ち下ると、そのタイミングでLocal_CNT カウンタ71は、カウント値の初期値local_cnt0を、即ちデータpcr0をLocal_REG_A レジスタ72へ出力する。なお、Local_CNT カウンタ71から出力されるカウントイネーブル信号Local_enは、図1に示したビデオ/オーディオ出力タイミング補正部10へ入力される。   Thereafter, when the signal pcr_det indicating active falls, the Local_CNT counter 71 outputs the initial value local_cnt0 of the count value, that is, the data pcr0 to the Local_REG_A register 72 at that timing. The count enable signal Local_en output from the Local_CNT counter 71 is input to the video / audio output timing correction unit 10 shown in FIG.

PCR_REG_A レジスタ74は、図8に示したように、初期値としてデータpcr0がLocal_CNT カウンタ71にロードされた後、信号pcr_det が立ち下ると、そのときデータpcr<41..0>としてPCR比較部5へ入力されているデータpcr0をロードし、これをレジスタ値pcr_reg_a<41..0>の初期値として格納する。   As shown in FIG. 8, when the signal pcr_det falls after the data pcr0 is loaded to the Local_CNT counter 71 as shown in FIG. The data pcr0 input to is loaded and stored as the initial value of the register value pcr_reg_a <41..0>.

この後、Local_CNT カウンタ71は、クロック信号clk の立ち上りをカウントアップし、42bitでカウント値を表したデータlocal_cnt<41..0>を生成する。次に信号pcr_det がアクティブになったとき、その立ち下りタイミングにおいて、Local_REG_A レジスタ72はレジスタ値local_reg_a<41..0>の初期値local_reg0、即ちデータpcr0をLocal_REG_Bレジスタ73へ出力する。Local_REG_A レジスタ72からLocal_REG_B レジスタ73へシフトされたデータpcr0は、レジスタ値local_reg_b<41..0>としてLocal_REG_B レジスタ73に格納される。またこれと同時にPCR_REG_Aレジスタ74に格納されているレジスタ値pcr_reg_a<41..0>をPCR_REG_B レジスタ75へシフトし、レジスタ値pcr_reg_b<41..0>として格納する。   Thereafter, the Local_CNT counter 71 counts up the rising edge of the clock signal clk, and generates data local_cnt <41..0> representing the count value in 42 bits. Next, when the signal pcr_det becomes active, the Local_REG_A register 72 outputs the initial value local_reg0 of the register value local_reg_a <41..0>, that is, the data pcr0 to the Local_REG_B register 73 at the falling timing. The data pcr0 shifted from the Local_REG_A register 72 to the Local_REG_B register 73 is stored in the Local_REG_B register 73 as a register value local_reg_b <41..0>. At the same time, the register value pcr_reg_a <41..0> stored in the PCR_REG_A register 74 is shifted to the PCR_REG_B register 75 and stored as the register value pcr_reg_b <41..0>.

カウンタ誤差検出部76は、入力されている信号pcr_det がアクティブになると、Local_REG_A レジスタ72からレジスタ値local_reg_a<41..0>を入力し、また、Local_REG_B レジスタ73からレジスタ値local_reg_b<41..0>を入力し、また、PCR_REG_A レジスタ74からレジスタ値pcr_reg_a<41..0>を入力し、また、PCR_REG_B レジスタ75からレジスタ値pcr_reg_b<41..0>を入力して、後述するように演算を行ってデータdiff<42..0> を求める。また、Local_REG_A レジスタ72のレジスタ値local_reg_a<41..0>とLocal_REG_B レジスタ73のレジスタ値local_reg_b<41..0>との差分値を求め、この値を差分値δlocal_cnt<41..0>として出力する。43bitデータとして表されたデータdiff<42..0> は、シフトレジスタ77へ入力され、レジスタDIFF_0に格納される。また、42bitデータとして表された差分値δlocal_cnt<41..0>は、シフトレジスタ80へ入力され、レジスタLCNT_0に格納される。   When the input signal pcr_det becomes active, the counter error detection unit 76 receives the register value local_reg_a <41..0> from the Local_REG_A register 72 and the register value local_reg_b <41..0> from the Local_REG_B register 73. And the register value pcr_reg_a <41..0> is input from the PCR_REG_A register 74, and the register value pcr_reg_b <41..0> is input from the PCR_REG_B register 75, and calculation is performed as described later. To obtain the data diff <42..0>. Also, the difference value between the register value local_reg_a <41..0> of the Local_REG_A register 72 and the register value local_reg_b <41..0> of the Local_REG_B register 73 is obtained, and this value is output as the difference value δlocal_cnt <41..0>. To do. Data diff <42..0> expressed as 43-bit data is input to the shift register 77 and stored in the register DIFF_0. Also, the difference value δlocal_cnt <41..0> expressed as 42-bit data is input to the shift register 80 and stored in the register LCNT_0.

シフトレジスタ77は、入力されている信号pcr_det がアクティブになると、レジスタDIFF_0に格納されている値をレジスタDIFF_1へシフトさせ、同様に各レジスタDIFF_1〜DIFF_N-1に格納されている値をそれぞれ隣のレジスタDIFFへシフトする。このシフト動作及びレジスタDIFF_0へカウンタ誤差検出部76からデータdiff<42..0> が入力される動作は、信号pcr_det がアクティブになる度に行われる。また、シフトレジスタ80は、入力されている信号pcr_det がアクティブになると、レジスタLCNT_0に格納されている値をレジスタLCNT_1へシフトさせ、同様に各レジスタLCNT_1〜LCNT_N-1に格納されている値をそれぞれ隣設されたレジスタLCNTへシフトする。このシフト動作及びレジスタLCNT_0へカウンタ誤差検出部76から差分値δlocal_cnt<41..0>を入力する動作は、信号pcr_det がアクティブになる度に行われる。   When the input signal pcr_det becomes active, the shift register 77 shifts the value stored in the register DIFF_0 to the register DIFF_1, and similarly shifts the values stored in the registers DIFF_1 to DIFF_N-1 to the adjacent ones. Shift to register DIFF. This shift operation and the operation in which the data diff <42..0> is input from the counter error detection unit 76 to the register DIFF_0 are performed every time the signal pcr_det becomes active. Further, when the input signal pcr_det becomes active, the shift register 80 shifts the value stored in the register LCNT_0 to the register LCNT_1, and similarly, the value stored in each of the registers LCNT_1 to LCNT_N-1 is changed. Shift to adjacent register LCNT. This shift operation and the operation of inputting the difference value δlocal_cnt <41..0> from the counter error detection unit 76 to the register LCNT_0 are performed every time the signal pcr_det becomes active.

シフトレジスタ77の各レジスタDIFF_0〜DIFF_Nに格納されている各レジスタ値はシフト動作等に伴って平均化処理部78へ逐次出力され、同様にシフトレジスタ80の各レジスタLCNT_0〜LCNT_Nに格納されている全てのレジスタ値はシフト動作に伴って平均化処理部81へ逐次出力される。   The register values stored in the registers DIFF_0 to DIFF_N of the shift register 77 are sequentially output to the averaging processing unit 78 along with the shift operation and the like, and are similarly stored in the registers LCNT_0 to LCNT_N of the shift register 80. All the register values are sequentially output to the averaging processing unit 81 with the shift operation.

平均化処理部78は、シフトレジスタ77のレジスタDIFF_0〜DIFF_Nに格納されている各レジスタ値を取得し、これらの値の平均値diff_ave<42..0> を演算により求める。この平均値diff<42..0> を求めることにより、データdiff<42..0> に含まれているジッタを除去する。この演算では、各レジスタDIFF_0〜DIFF_Nに格納されている43bitのレジスタ値の上位34bitと下位9bitとを分離して算出し、最終的に上位bitと下位bitとを合算して43bitのデータを生成する。これは、図5に示したPCRを表すデータは、33bitのPCR値ベースデータPCR_BASE<32..0> は90kHz(27MHz/300)のカウント値、また、PCR値拡張データPCR_EXT<8..0> は9bitのカウント値であるため、図5ではPCRを42bitのバスデータとして表現しているが、PCRが表す27MHzのシステムクロックは、‘pcr_base<32..0> ×300+pcr_ext<8..0> ’として求められる。ここではデジタル放送受信機の動作で使用される27MHzのPCRと、送出系システム側で使用されている27MHzのSTCとの差分を検出することを目的としているので、このように27MHzのクロックスピードを基準に考え、デジタル放送受信機側で使用されるPCRを27MHzのクロックスピードでカウントしたときの値に置き換えている。そのため、シフトレジスタ77から出力される各レジスタ値の平均値を求めるときには、上位34bitと下位9bitにそれぞれ分離して平均値を求め、最後に上述のように上位34bitと下位9bitとを合算して27MHzのクロックスピードに対応するカウント値として平均値diff_ave_<42..0>を求める。   The averaging processing unit 78 acquires each register value stored in the registers DIFF_0 to DIFF_N of the shift register 77, and obtains an average value diff_ave <42..0> of these values. By obtaining the average value diff <42..0>, the jitter included in the data diff <42..0> is removed. In this calculation, the upper 34 bits and the lower 9 bits of the 43-bit register value stored in each register DIFF_0 to DIFF_N are calculated separately, and finally the upper bit and the lower bit are added to generate 43-bit data. To do. This is because the data representing the PCR shown in FIG. 5 is the 33-bit PCR value base data PCR_BASE <32..0> is the count value of 90 kHz (27 MHz / 300), and the PCR value extension data PCR_EXT <8..0 > Is a count value of 9 bits, and in FIG. 5, PCR is expressed as 42-bit bus data, but the 27 MHz system clock represented by PCR is' pcr_base <32..0> × 300 + pcr_ext <8..0. > 'Sought as'. The purpose here is to detect the difference between the 27 MHz PCR used in the operation of the digital broadcast receiver and the 27 MHz STC used on the transmission system side. Considering the standard, the PCR used on the digital broadcast receiver side is replaced with the value when counted at a clock speed of 27 MHz. Therefore, when obtaining the average value of each register value output from the shift register 77, the average value is obtained by separating the upper 34 bits and the lower 9 bits, and finally the upper 34 bits and the lower 9 bits are added together as described above. An average value diff_ave_ <42..0> is obtained as a count value corresponding to a clock speed of 27 MHz.

また、同様に平均化処理部81は、シフトレジスタ80のレジスタCNT_0 〜CNT_N に格納されている各レジスタ値を取得し、平均値lcnt_ave<41..0> を求める。このとき、レジスタCNT_0 〜CNT_N の各レジスタ値を上位33bitと下位9bitに分離して、上述のレジスタDIFF_0〜DIFF_Nに格納されているレジスタ値の平均値を求めた場合と同様に演算を行い、27MHzのクロックスピードに対応させたカウント値として求める。   Similarly, the averaging processing unit 81 acquires each register value stored in the registers CNT_0 to CNT_N of the shift register 80, and obtains an average value lcnt_ave <41..0>. At this time, each register value of the registers CNT_0 to CNT_N is separated into upper 33 bits and lower 9 bits, and the calculation is performed in the same manner as in the case where the average value of the register values stored in the registers DIFF_0 to DIFF_N is obtained. It is obtained as a count value corresponding to the clock speed.

δf算出部79は、平均化処理部78によって求められた平均値diff_ave<42..0> と、平均化処理部80によって求められた平均値lcnt_ave<41..0> とを入力し、周波数誤差データδfとして正規化周波数誤差値を求める。なお、ここで求める周波数誤差データδfは、信号pcr_det の立ち下りタイミングに同期してδf算出部79から外部へ更新出力される。周波数誤差データδfの算出式を以下の式(1)〜式(3)に示す。ここで、クロック信号clk の周波数をf、送出側STCの周波数をf×(1+δf)とする。また、平均値diff_ave<42..0> の上位34bitの値をdiff_ave<42..9> と表し、2の補数で表現された値とする。また、平均値diff_ave<42..0> の下位9bitの値を表すdiff_ave<8..0>、平均値lcnt_ave<41..0> の上位33bitの値を表すlcnt_ave<41..9> 、及び平均値lcnt_ave<41..0> の下位9bitの値を表すlcnt_ave<8..0>は正の整数を表す。また、ここではデータバスの10進表記を“10進(データバス名称)”と表現し、例えば、diff_ave<42..9> の10進表記を“10進(diff_ave<42..9> )”と表す。このとき求められるδfは実数である。なお、以下の各式においてT は時間を表す。
f×(1+δf)T−f×T=
10進(diff_ave<42..9>)×300+10進(diff_ave<8..0>)…(1)
f×δf×T=10進(diff_ave<42..9>)×300+10進(diff_ave<8..0>)…(2)
(f×T=10進(lcnt_ave<41..9>)×300+10進(lcnt_ave<8..0>)とおく)
δf=(10進(diff_ave<42..9>)×300+10進(diff_ave<8..0>))
/(10進(lcnt_ave<41..9>)×300+10進(lcnt_ave<8..0>))…(3)
The δf calculation unit 79 receives the average value diff_ave <42..0> obtained by the averaging processing unit 78 and the average value lcnt_ave <41..0> obtained by the averaging processing unit 80, and inputs the frequency A normalized frequency error value is obtained as error data δf. The frequency error data δf obtained here is updated and output from the δf calculation unit 79 to the outside in synchronization with the falling timing of the signal pcr_det. Formulas for calculating the frequency error data δf are shown in the following formulas (1) to (3). Here, the frequency of the clock signal clk is f, and the frequency of the transmission side STC is f × (1 + δf). Further, the value of the upper 34 bits of the average value diff_ave <42..0> is represented as diff_ave <42..9>, and is represented by a two's complement. Also, diff_ave <8..0> representing the lower 9-bit value of the average value diff_ave <42..0>, lcnt_ave <41..9> representing the upper 33-bit value of the average value lcnt_ave <41..0>, Also, lcnt_ave <8..0> representing the lower 9-bit value of the average value lcnt_ave <41..0> represents a positive integer. Here, the decimal notation of the data bus is expressed as “decimal (data bus name)”. For example, the decimal notation of diff_ave <42..9> is “decimal (diff_ave <42..9>). ". Δf obtained at this time is a real number. In the following equations, T represents time.
f × (1 + δf) T−f × T =
Decimal (diff_ave <42..9>) x 300 + decimal (diff_ave <8..0>) (1)
f × δf × T = decimal (diff_ave <42..9>) × 300 + decimal (diff_ave <8..0>) (2)
(F × T = decimal (lcnt_ave <41..9>) × 300 + decimal (lcnt_ave <8..0>))
δf = (decimal (diff_ave <42..9>) x 300 + decimal (diff_ave <8..0>))
/ (Decimal (lcnt_ave <41..9>) x 300 + Decimal (lcnt_ave <8..0>)) ... (3)

図9は、実施の形態1によるデジタル放送受信機のLocal_REG_A レジスタ及びLocal_REG_B レジスタに格納されるデータのビットアサインを示す説明図である。この図は、図7に示したLocal_REG_A レジスタ72及びLocal_REG_B レジスタ73に格納される、即ちLocal_CNT カウンタ71のカウント値を表すデータlocal_cnt<41..0>のビットアサインを示したものである。図示したように、データlocal_cnt<41..0>は、42bitのバスデータで、上位33bitで表されるカウント値ベースデータlocal_cnt_base<41..9>と、下位9bitで表されるカウント値拡張データlocal_cnt_ext<8..0>によって構成されたものである。   FIG. 9 is an explanatory diagram showing bit assignments of data stored in the Local_REG_A register and the Local_REG_B register of the digital broadcast receiver according to the first embodiment. This figure shows bit assignments of data local_cnt <41..0> stored in the Local_REG_A register 72 and the Local_REG_B register 73 shown in FIG. 7, that is, the count value of the Local_CNT counter 71. As shown in the figure, data local_cnt <41..0> is 42-bit bus data, count value base data local_cnt_base <41..9> represented by upper 33 bits, and count value extension data represented by lower 9 bits. It is configured by local_cnt_ext <8..0>.

図10は、実施の形態1によるデジタル放送受信機のLocal_CNT カウンタの構成を示すブロック図である。この図は、図7に示したLocal_CNT カウンタ71の構成を示したもので、PCRを表すデータpcr<41..0>の下位9bitのデータpcr<8..0> の値をカウントする300カウンタ91と、データpcr<41..0>の上位33bitのデータpcr<41..8> の値をカウントするlocal_baseカウンタ92と、信号pcr_det をS入力として、カウントイネーブル信号cnt_enを生成するSRフリップフロップ回路から成るフリップフロップ93とを備える。   FIG. 10 is a block diagram illustrating a configuration of the Local_CNT counter of the digital broadcast receiver according to the first embodiment. This figure shows the configuration of the Local_CNT counter 71 shown in FIG. 7, which is a 300 counter that counts the value of the lower 9-bit data pcr <8..0> of the data pcr <41..0> representing PCR. 91, a local_base counter 92 that counts the value of the upper 33-bit data pcr <41..8> of the data pcr <41..0>, and an SR flip-flop that generates the count enable signal cnt_en using the signal pcr_det as the S input And a flip-flop 93 formed of a circuit.

300カウンタ91には、図1に示した発振器4からクロック信号clk が入力され、また前述のようにデータpcr<8..0> が入力される。Local_baseカウンタ92には、300カウンタ91から出力されるクロック信号base_clkと、前述のようにデータpcr<41..9>が入力される。フリップフロップ93には、前述のようにS入力として信号pcr_det が入力され、R入力としてリセット信号reset が入力される。これらのSR入力に基づいて、Q出力としてカウントイネーブル信号cnt_enを生成し、このカウントイネーブル信号cnt_enを300カウンタ91及びlocal_baseカウンタ92へ入力すると共に、当該Local_CNT カウンタ71の外部へ出力する。なお、前述のリセット信号reset は、300カウンタ91及びlocal_baseカウンタ92へも入力される。   The 300 counter 91 receives the clock signal clk from the oscillator 4 shown in FIG. 1, and receives the data pcr <8..0> as described above. The local_base counter 92 receives the clock signal base_clk output from the 300 counter 91 and the data pcr <41..9> as described above. As described above, the signal pcr_det is input to the flip-flop 93 as the S input, and the reset signal reset is input as the R input. Based on these SR inputs, a count enable signal cnt_en is generated as a Q output, and this count enable signal cnt_en is input to the 300 counter 91 and the local_base counter 92 and output to the outside of the Local_CNT counter 71. The reset signal reset described above is also input to the 300 counter 91 and the local_base counter 92.

Local_CNT カウンタ71は、前述のように初期値としてデータpcr<41..0>を入力し、信号pcr_det が初めてアクティブになったときのデータpcr<41..0>として図8に示したデータpcr0をロードする。フリップフロップ93は、最初にアクティブを示す信号pcr_det が入力されたとき、クロック信号clk の立ち上がりに同期させてアクティブを示すカウントイネーブル信号cnt_enを出力する。すると、300カウンタ91は、アクティブを示すカウントイネーブル信号cnt_enの立ち上がりを検出して、最初にカウントイネーブル信号cnt_enの立ち上がりを検出したときに限り、データバス上の下位9bitのデータpcr<8..0> をロードし、この値をデータlocal_cnt<41..0>の下位9bitのデータlocal_cnt<8..0> の値としてLocal_REG_A レジスタ72の下位9bitへ格納させ、クロック信号clk の立ち上がりのカウントアップを開始する。300カウンタ91は、このときカウントアップを開始した値が0x12C (10進数表示で“300”)に達すると、このカウントした値をクリアすると共に、クロック信号clk の1クロック分のパルス信号をクロック信号base_clkとして出力する。この後、300カウンタ91は、カウントイネーブル信号cnt_enの立ち上がりを検出する度にカウントアップを開始し、そのカウント値をデータlocal_cnt<8..0> としてLocal_REG_A レジスタ72へ出力し、格納させる。また、カウント値が0x12C に達すると、このカウント値をクリアすると共に、クロック信号base_clkを上述のように出力し、このような動作を繰り返す。   The Local_CNT counter 71 receives the data pcr <41..0> as an initial value as described above, and the data pcr0 shown in FIG. 8 as the data pcr <41..0> when the signal pcr_det becomes active for the first time. To load. When the signal pcr_det indicating active is input for the first time, the flip-flop 93 outputs a count enable signal cnt_en indicating active in synchronization with the rising edge of the clock signal clk. Then, the 300 counter 91 detects the rising edge of the count enable signal cnt_en indicating active, and only when the rising edge of the count enable signal cnt_en is first detected, the lower 9 bits of data pcr <8..0 on the data bus. > Is stored in the lower 9 bits of Local_REG_A register 72 as the value of lower 9 bits of data local_cnt <8..0> of data local_cnt <41..0>, and the rising edge of clock signal clk is counted up. Start. The 300 counter 91 clears the counted value when the count-up value reaches 0x12C (“300” in decimal notation) at this time, and also outputs a pulse signal for one clock of the clock signal clk as a clock signal. Output as base_clk. Thereafter, the 300 counter 91 starts counting up every time the rising edge of the count enable signal cnt_en is detected, and outputs the count value as data local_cnt <8..0> to the Local_REG_A register 72 for storage. When the count value reaches 0x12C, the count value is cleared and the clock signal base_clk is output as described above, and such an operation is repeated.

Local_baseカウンタ92は、アクティブを示すカウントイネーブル信号cnt_enの立ち上がりを検出して、300カウンタ91と同時に最初にカウントイネーブル信号cnt_enの立ち上がりを検出したときに限り、データバス上の上位33bitのデータpcr<41..9>をロードし、この値をカウント値を示すデータlocal_cnt<41..0>の上位33bitのデータlocal_cnt<41..9>としてLocal_REG_A レジスタ72の上位33bitへ格納させ、クロック信号clk の立ち上がりのカウントアップを開始する。この後、カウントイネーブル信号cnt_enの立ち上がりを検出する度にカウントアップを開始した値をクリアすると共に再びカウントアップを開始し、そのカウント値を上述のようにカウント値local_cnt<41..9>としてLocal_REG_A レジスタ72へ出力し、格納させる。   The Local_base counter 92 detects the rising edge of the count enable signal cnt_en indicating active, and only when the rising edge of the count enable signal cnt_en is first detected simultaneously with the 300 counter 91, the upper 33 bits of data pcr <41 on the data bus. ..9> is loaded, and this value is stored in the upper 33 bits of the Local_REG_A register 72 as the upper 33 bits of data local_cnt <41..9> of the data local_cnt <41..0> indicating the count value. Starts counting up. After that, every time the rising edge of the count enable signal cnt_en is detected, the value that started counting up is cleared and the counting up is started again, and the count value is set to the count value local_cnt <41..9> as described above. The data is output to the register 72 and stored.

300カウンタ91から出力される下位9bitのデータlocal_cnt<8..0> と、Local_baseカウンタ92から出力される上位33bitのデータlocal_cnt<41..9>は、図9に示したようなビットアサインでLocal_REG_A レジスタ72、またLocal_REG_B レジスタ73に格納される。   The low-order 9-bit data local_cnt <8..0> output from the 300 counter 91 and the high-order 33-bit data local_cnt <41..9> output from the Local_base counter 92 are bit-assigned as shown in FIG. It is stored in the Local_REG_A register 72 and the Local_REG_B register 73.

図11は、実施の形態1によるデジタル放送受信機のカウンタ誤差検出部の構成を示すブロック図である。この図は、図7に示したカウンタ誤差検出部76の構成を示したもので、Local_REG_A レジスタ72に格納されているレジスタ値local_reg_a<41..0>とLocal_REG_B レジスタ73に格納されているレジスタ値local_reg_b<41..0>と減算器102から出力されるlocal_borrow信号とを入力し、これらのレジスタ値を用いて上位33bitデータの減算を行う減算器101と、同じくレジスタ値local_reg_a<41..0>とレジスタ値local_reg_b<41..0>とを入力し、これらのレジスタ値の下位9bitデータの減算を行う減算器102と、PCR_REG_A レジスタ74に格納されているレジスタ値pcr_reg_a<41..0>とPCR_REG_B レジスタ75に格納されているレジスタ値pcr_reg_b<41..0>と減算器104から出力されるpcr_borrow信号とを入力し、これらのレジスタ値を用いて上位33bitデータの減算を行う減算器103と、同じくレジスタ値pcr_reg_a<41..0>とレジスタ値pcr_reg_b<41..0>とを入力し、これらのレジスタ値の下位9bitデータの減算を行う減算器104と、減算器101から出力される差分値δlocal_cnt<41..9>と減算器103から出力される差分値δpcr<41..9>と減算器106から出力されるdiff_borrow 信号とを入力し、これらの値を用いて上位34bitデータの減算を行う減算器105と、減算器102から出力される差分値δlocal_cnt<8..0> と減算器104から出力される差分値δpcr<8..0>とを入力し、これらの値の下位9bitデータの減算を行う減算器106とを備える。   FIG. 11 is a block diagram illustrating a configuration of a counter error detection unit of the digital broadcast receiver according to the first embodiment. This figure shows the configuration of the counter error detection unit 76 shown in FIG. 7. The register value local_reg_a <41..0> stored in the Local_REG_A register 72 and the register value stored in the Local_REG_B register 73 are shown. The local_reg_b <41..0> and the local_borrow signal output from the subtractor 102 are input, and the subtractor 101 that performs subtraction of the upper 33-bit data using these register values, and the register value local_reg_a <41..0 > And the register value local_reg_b <41..0>, the subtracter 102 for subtracting the lower 9-bit data of these register values, and the register value pcr_reg_a <41..0> stored in the PCR_REG_A register 74 And the register value pcr_reg_b <41..0> stored in the PCR_REG_B register 75 and the pcr_borrow signal output from the subtractor 104 are input, and subtraction is performed to subtract the upper 33-bit data using these register values. 103, similarly, the register value pcr_reg_a <41..0> and the register value pcr_reg_b <41..0> are input, and the subtracter 104 for subtracting the lower 9-bit data of these register values is output from the subtractor 101. Difference value δlocal_cnt <41..9>, the difference value δpcr <41..9> output from the subtractor 103, and the diff_borrow signal output from the subtractor 106 are input, and these values are used as the upper rank. A subtractor 105 that subtracts 34-bit data, a difference value δlocal_cnt <8..0> output from the subtractor 102, and a difference value δpcr <8..0> output from the subtractor 104 are input. And a subtractor 106 for subtracting lower 9-bit data of the value of.

減算器101,102は、前述のようにLocal_REG_A レジスタ72に格納されているレジスタ値local_reg_a<41..0>と、Local_REG_B レジスタ73に格納されているレジスタ値local_reg_b<41..0>との差分値を算出する。この演算は、減算器101が上位33bit分の差分値δlocal_cnt<41..9>を求め、減算器102が下位9bit分の差分値δlocal_cnt<8..0> を求める。減算器102が差分値δlocal_cnt<8..0> を求める場合には、以下に示す二つの状況が考えられる。
(a)local_reg_a<8..0>−local_reg_b<8..0>≧0
(b)local_reg_a<8..0>−local_reg_b<8..0><0
減算器102は、上記(a)あるいは上記(b)の内、どちらの状況であるかを判断し、上記(a)の場合は、単純に各データの下位9bitについて減算を行い、その結果を差分値δlocal_cnt<8..0> として出力し、論理値ローレベル(以下、ローレベルをLと記載する)のlocal_borrow信号を生成して減算器101へ出力する。また、(b)の場合は、論理値ハイレベル(以下、ハイレベルをHと記載する)のlocal_borrow信号を生成して減算器101へ出力し、‘0x12C+local_reg_a<8..0>−local_reg_b<8..0>’の演算結果を、差分値δlocal_cnt<8..0> として出力する。
The subtracters 101 and 102 differ between the register value local_reg_a <41..0> stored in the Local_REG_A register 72 and the register value local_reg_b <41..0> stored in the Local_REG_B register 73 as described above. Calculate the value. In this calculation, the subtractor 101 obtains the difference value δlocal_cnt <41..9> for the upper 33 bits, and the subtractor 102 obtains the difference value δlocal_cnt <8..0> for the lower 9 bits. When the subtracter 102 obtains the difference value δlocal_cnt <8..0>, the following two situations can be considered.
(A) local_reg_a <8..0> −local_reg_b <8..0> ≧ 0
(B) local_reg_a <8..0> −local_reg_b <8..0><0
The subtractor 102 determines which of the above conditions (a) or (b), and in the case of (a), the subtractor simply subtracts the lower 9 bits of each data, and the result is obtained. A difference value δlocal_cnt <8..0> is output, and a local_borrow signal having a logical low level (hereinafter, the low level is described as L) is generated and output to the subtractor 101. In the case of (b), a local_borrow signal of logical high level (hereinafter, high level is described as H) is generated and output to the subtractor 101, and '0x12C + local_reg_a <8..0> −local_reg_b <8 ..0>'is output as the difference value δlocal_cnt <8..0>.

また、減算器101では‘local_reg_a<41..9>−local_reg_b<41..9>−(local_borrow信号の値)’の演算を行う。減算器101は、レジスタ値local_reg_a<41..0>とレジスタ値local_reg_b<41..0>の上位33bitデータをそれぞれ入力すると共に、最下位bitに割り当てるlocal_borrow信号を入力して減算を行い、2の補数表現による34bitの算出結果を得る。この算出結果は、34bitの最上位bitを出力せずに、それ以外の33bitの値を出力する。このとき出力されたデータは、差分値δlocal_cnt<41..0>の上位33bitを成す差分値δlocal_cnt<41..9>である。このように減算器101から出力された33bitの差分値δlocal_cnt<41..9>と減算器102から出力された9bitの差分値δlocal_cnt<8..0> とから成る差分値δlocal_cnt<41..0>は、図7に示したシフトレジスタ80に書き込まれる。また更に、減算器101から出力された差分値δlocal_cnt<41..9>は減算器105へ入力され、減算器102から出力された差分値δlocal_cnt<8..0> は減算器106へ入力される。   The subtractor 101 performs an operation of ‘local_reg_a <41..9> −local_reg_b <41..9> − (local_borrow signal value)’. The subtracter 101 inputs the upper 33-bit data of the register value local_reg_a <41..0> and the register value local_reg_b <41..0>, and also inputs and subtracts the local_borrow signal assigned to the lowest bit. To obtain a 34-bit calculation result in the complement expression of. As the calculation result, the most significant bit of 34 bits is not output, but the other 33 bits are output. The data output at this time is the difference value δlocal_cnt <41..9> that is the upper 33 bits of the difference value δlocal_cnt <41..0>. In this way, the difference value δlocal_cnt <41 .. <b> consisting of the 33-bit difference value δlocal_cnt <41..9> output from the subtractor 101 and the 9-bit difference value δlocal_cnt <8..0> output from the subtractor 102. 0> is written into the shift register 80 shown in FIG. Furthermore, the difference value δlocal_cnt <41..9> output from the subtractor 101 is input to the subtractor 105, and the difference value δlocal_cnt <8..0> output from the subtractor 102 is input to the subtractor 106. The

減算器103,104はPCR_REG_A レジスタ74に格納されているレジスタ値pcr_reg_a<41..0>とPCR_REG_B レジスタ75に格納されているレジスタ値pcr_reg_b<41..0>との差分値を算出するとき、減算器101及び減算器102と同様な演算処理を行う。減算器104では、前述の減算器102と同様に、入力したレジスタ値pcr_reg_a<41..0>の下位9bitとレジスタ値pcr_reg_b<41..0>の下位9bitとの関係、即ちレジスタ値pcr_reg_a<8..0> とレジスタ値pcr_reg_b<8..0> の大小関係を判断し、‘pcr_reg_a<8..0>−pcr_reg_b<8..0>≧0’の状況のときは、前述の(a)の場合と同様に単純に減算を行い、その結果を差分値δpcr<41..0>の下位9bit、即ち差分値δpcr<8..0>として出力する。この処理動作と共に論理値Lのpcr_borrow信号を生成して減算器103へ出力する。また、‘pcr_reg_a<8..0>−pcr_reg_b<8..0><0’の状況のときには、前述の(b)の場合と同様に‘0x12C+local_reg_a<8..0>−local_Rreg_b<8..0>’の演算結果を差分値δpcr<41..0>の下位9bit、即ち差分値δpcr<8..0> として出力し、論理値Hのpcr_borrow信号を生成して出力する。   When the subtractors 103 and 104 calculate a difference value between the register value pcr_reg_a <41..0> stored in the PCR_REG_A register 74 and the register value pcr_reg_b <41..0> stored in the PCR_REG_B register 75, The same arithmetic processing as the subtracter 101 and the subtracter 102 is performed. In the subtractor 104, as in the subtractor 102 described above, the relationship between the lower 9 bits of the input register value pcr_reg_a <41..0> and the lower 9 bits of the register value pcr_reg_b <41..0>, that is, the register value pcr_reg_a < 8. Determine the magnitude relationship between the 8..0> and the register value pcr_reg_b <8..0>. If the situation is 'pcr_reg_a <8..0> −pcr_reg_b <8..0> ≧ 0', The subtraction is simply performed as in the case of a), and the result is output as the lower 9 bits of the difference value δpcr <41..0>, that is, the difference value δpcr <8..0>. With this processing operation, a pcr_borrow signal having a logical value L is generated and output to the subtractor 103. Further, in the case of the situation of “pcr_reg_a <8..0> −pcr_reg_b <8..0> <0”, as in the case of (b) described above, “0x12C + local_reg_a <8..0> −local_Rreg_b <8 .. The calculation result of 0> ′ is output as the lower 9 bits of the difference value δpcr <41..0>, that is, the difference value δpcr <8..0>, and a pcr_borrow signal of logical value H is generated and output.

減算器103では‘pcr_reg_a<41..9>−pcr_reg_b<41..9>−(pcr_borrow信号の値)’を算出する。減算器103は、それぞれ33bitのレジスタ値pcr_reg_a<41..9>とレジスタ値pcr_reg_b<41..9>とを入力すると共に、最下位bitに割り当てるpcr_borrow信号を入力して前述のように減算を行い、2の補数表現による34bitの算出結果を得る。この算出結果は、前述の減算器101の動作と同様に、34bitの最上位bitを出力せずに、それ以外の33bitの値を差分値δpcr<41..9>として出力する。このように減算器103から出力された33bitの差分値δpcr<41..9>は減算器105へ入力され、減算器104から出力された9bitの差分値δpcr<8..0> は減算器106へ入力される。   The subtracter 103 calculates “pcr_reg_a <41..9> −pcr_reg_b <41..9> − (value of pcr_borrow signal)”. The subtractor 103 inputs the 33-bit register value pcr_reg_a <41..9> and the register value pcr_reg_b <41..9> respectively, and also inputs the pcr_borrow signal to be assigned to the least significant bit, and performs subtraction as described above. To obtain a 34-bit calculation result in 2's complement expression. Similar to the operation of the subtractor 101 described above, this calculation result outputs the other 33-bit value as the difference value δpcr <41..9> without outputting the most significant bit of 34 bits. Thus, the 33-bit difference value δpcr <41..9> output from the subtractor 103 is input to the subtractor 105, and the 9-bit difference value δpcr <8..0> output from the subtractor 104 is the subtractor. 106 is input.

減算器106では、‘δpcr<8..0> −δlocal_cnt<8..0> ’の演算を行う。減算器106は、この演算を行うとき、入力した差分値δlocal_cnt<8..0> と差分値δpcr<8..0> の大小関係を減算器102と同様に判断し、‘δpcr<8..0> −δlocal_cnt<8..0> ≧0’の場合には、前述の(a)の場合と同様に単純に算出結果をデータdiff<42..0> の下位9bitとして出力し、論理値Lのdiff_borrow 信号を生成して減算器105へ出力する。また、δpcr<8..0>−δlocal_cnt<8..0><0の場合には、0x12C +δpcr<8..0> −δlocal_cnt<8..0> の演算結果をデータdiff<42..0> の下位9bitとして出力し、論理値Hのdiff_borrow 信号を生成して出力する。   The subtractor 106 performs an operation of ‘δpcr <8..0> −δlocal_cnt <8..0>’. When performing this calculation, the subtractor 106 determines the magnitude relationship between the input difference value δlocal_cnt <8..0> and the difference value δpcr <8..0> in the same manner as the subtractor 102, and 'δpcr <8. .0> −δlocal_cnt <8..0> ≧ 0 ′, the calculation result is simply output as the lower 9 bits of the data diff <42..0> as in the case of (a) described above, and the logic A diff_borrow signal of value L is generated and output to the subtractor 105. Further, in the case of δpcr <8..0> −δlocal_cnt <8..0> <0, the calculation result of 0x12C + δpcr <8..0> −δlocal_cnt <8..0> is data diff <42 .. 0> is output as lower 9 bits, and a diff_borrow signal of logical value H is generated and output.

減算器105では、‘δpcr<41..9>−δlocal_cnt<41..9>−(diff_borrow 信号の値)’の演算を行う。減算器105は、減算器101から差分値δlocal_cnt<41..9>を入力し、また減算器103から差分値δpcr<41..9>を入力し、さらに最下位bitに割り当てるpcr_borrow信号を減算器106から入力して前述のように減算を行い、2の補数表現による34bitの算出結果を得る。この算出結果は、データdiff<42..0> の上位34bitとして出力される。減算器105から出力されるデータdiff<42..0> の上位34bitのデータと、減算器106から出力されるデータdiff<42..0> の下位9bitのデータは、合わせて43bitのデータdiff<42..0> としてシフトレジスタ77へ出力される。   The subtractor 105 performs an operation of “δpcr <41..9> −δlocal_cnt <41..9> − (value of diff_borrow signal)”. The subtractor 105 receives the difference value δlocal_cnt <41..9> from the subtractor 101, receives the difference value δpcr <41..9> from the subtractor 103, and further subtracts the pcr_borrow signal assigned to the least significant bit. The data is input from the calculator 106 and subtracted as described above to obtain a 34-bit calculation result in 2's complement expression. This calculation result is output as the upper 34 bits of the data diff <42..0>. The upper 34-bit data of the data diff <42..0> output from the subtractor 105 and the lower 9-bit data of the data diff <42..0> output from the subtractor 106 are combined into a 43-bit data diff. It is output to the shift register 77 as <42..0>.

図12は、実施の形態1によるデジタル放送受信機のビデオ/オーディオ出力タイミング補正部の構成を示すブロック図である。この図は、図1に示したビデオ/オーディオ出力タイミング補正部10の構成を示したもので、二つの入力信号あるいはデータからいずれかを選択して出力するセレクタ130〜133、V_PTS_REG_A レジスタ(ビデオデータPTS値レジスタ)121、V_PTS_REG_B レジスタ(ビデオデータPTS値レジスタ)122、減算器123、乗算器124、V_δPTS_ALLレジスタ125、加算器126、PCM_correct_time レジスタ127、加算器128、比較器129、A_PTS_REG_A レジスタ(オーディオデータPTS値レジスタ)134、A_PTS_REG_B レジスタ(オーディオデータPTS値レジスタ)135、減算器136、乗算器137、加算器138、比較器139、SRフリップフロップ回路から成るフリップフロップ140,141、及びDフリップフロップ回路から成るフリップフロップ142によって構成される。   FIG. 12 is a block diagram showing the configuration of the video / audio output timing correction unit of the digital broadcast receiver according to the first embodiment. This figure shows the configuration of the video / audio output timing correction unit 10 shown in FIG. 1, which selects one of two input signals or data and outputs them, selectors 130 to 133, and a V_PTS_REG_A register (video data). PTS value register) 121, V_PTS_REG_B register (video data PTS value register) 122, subtractor 123, multiplier 124, V_δPTS_ALL register 125, adder 126, PCM_correct_time register 127, adder 128, comparator 129, A_PTS_REG_A register (audio data) PTS value register) 134, A_PTS_REG_B register (audio data PTS value register) 135, subtractor 136, multiplier 137, adder 138, comparator 139, flip-flops 140 and 141 including SR flip-flop circuits, and a D flip-flop circuit It is comprised by the flip-flop 142 which consists of.

図13は、実施の形態1によるデジタル放送受信機のビデオ/オーディオ出力タイミング補正部の動作を示すタイミングチャートである。図13−1は、ビデオデータに関連する信号及びデータのタイミングチャートで、図13−2は、オーディオデータに関連する信号及びデータのタイミングチャートである。図12に示したフリップフロップ142は、前述のようにDフリップフロップ回路から成るもので、D入力としてPCR比較部5から出力されたカウントイネーブル信号cnt_enを入力し、clk 入力として発振器4から出力されるクロック信号clk を入力する。フリップフロップ142は、これらの入力に基づいて図8、図13に示したようなカウントイネーブル信号cnt_en2 を生成して出力する。詳しくは、図8に示したようにカウントイネーブル信号cnt_enがアクティブになると、次のクロック信号clk の立ち上りに同期してアクティブを示すカウントイネーブル信号cnt_en2 を出力する。   FIG. 13 is a timing chart showing the operation of the video / audio output timing correction unit of the digital broadcast receiver according to the first embodiment. FIG. 13A is a timing chart of signals and data related to video data, and FIG. 13B is a timing chart of signals and data related to audio data. The flip-flop 142 shown in FIG. 12 is composed of a D flip-flop circuit as described above, and receives the count enable signal cnt_en output from the PCR comparator 5 as the D input and is output from the oscillator 4 as the clk input. Input the clock signal clk. Based on these inputs, the flip-flop 142 generates and outputs a count enable signal cnt_en2 as shown in FIGS. Specifically, as shown in FIG. 8, when the count enable signal cnt_en becomes active, the count enable signal cnt_en2 indicating active is output in synchronization with the rising edge of the next clock signal clk.

図12に示したセレクタ130は、PCR比較部5から出力されたデータpcr<41..9>をA入力に、またビデオデコーダ6から出力されたデータpts_v をB入力に入力し、どちらか一方のデータをデータpts_v_s としてV_PTS_REG_A レジスタ121へ出力するように切り換える。セレクタ131は、PCR比較部5から出力された信号pcr_det をA入力に、またビデオデコーダ6から出力されたPTSイネーブル信号pts_v_w_enをB入力に入力し、いずれか一方の信号をPTSイネーブル信号pts_v_w_en’ としてV_PTS_REG_A レジスタ121及びV_PTS_REG_B レジスタ122へ出力するように切り換える。   The selector 130 shown in FIG. 12 inputs the data pcr <41..9> output from the PCR comparison unit 5 to the A input and the data pts_v output from the video decoder 6 to the B input. Is switched to output to the V_PTS_REG_A register 121 as data pts_v_s. The selector 131 inputs the signal pcr_det output from the PCR comparison unit 5 to the A input and the PTS enable signal pts_v_w_en output from the video decoder 6 to the B input, and either signal is set as the PTS enable signal pts_v_w_en ′. The output is switched to the V_PTS_REG_A register 121 and the V_PTS_REG_B register 122.

セレクタ132は、データpcr<41..9>をA入力に、オーディオデコーダ7から出力されたデータpts_a をB入力に入力し、いずれか一方のデータをデータpts_a_s としてA_PTS_REG_A レジスタ134へ出力するように切り換える。セレクタ133は、信号pcr_det をA入力に、またオーディオデコーダ7から出力されたオーディオイネーブル信号pts_a_w_enをB入力に入力し、いずれか一方の信号をPTSイネーブル信号pts_a_en’ としてA_PTS_REG_A レジスタ134及びA_PTS_REG_B レジスタ135へ出力するように切り換える。なお、これらのセレクタ130〜133は、フリップフロップ142から出力されるカウントイネーブル信号cnt_en2が、図8及び図13に示したようにアクティブになっときB入力を選択し、それ以外はA入力を選択して出力する。   The selector 132 inputs the data pcr <41..9> to the A input, the data pts_a output from the audio decoder 7 to the B input, and outputs one of the data to the A_PTS_REG_A register 134 as the data pts_a_s. Switch. The selector 133 inputs the signal pcr_det to the A input and the audio enable signal pts_a_w_en output from the audio decoder 7 to the B input, and inputs one of the signals as the PTS enable signal pts_a_en ′ to the A_PTS_REG_A register 134 and the A_PTS_REG_B register 135. Switch to output. The selectors 130 to 133 select the B input when the count enable signal cnt_en2 output from the flip-flop 142 becomes active as shown in FIGS. 8 and 13, and select the A input otherwise. And output.

初期値として“0”が格納されているV_PTS_REG_A レジスタ121は、セレクタ131から入力したPTSイネーブル信号pts_v_w_en’ が立ち下った時、セレクタ130から入力したデータpts_v_s を格納する。同様に初期値として“0”が格納されているV_PTS_REG_B レジスタ122は、上記のPTSイネーブル信号pts_v_w_en’ の立ち下り時にV_PTS_REG_A レジスタ121に格納されているデータをシフトさせて入力する。その後、減算器123が、V_PTS_REG_A レジスタ121とV_PTS_REG_B レジスタ122にそれぞれ格納されている値の差分値δpts_v を求め、加算器126へ出力する。またこれと同時に、乗算器124は、減算器123から出力された差分値δpts_v を入力する。この乗算器124は、差分値δpts_v にPCR比較部5から取得した周波数誤差データδfを乗算した差分値δpts_v’を求め、入力しているPTSイネーブル信号pts_v_w_enの信号パルスの立ち下り時に差分値δpts_v’を出力あるいは更新出力して加算器126に送る。このような差分値δpts_v’を更新/出力する動作は、当該ビデオ/オーディオ出力タイミング補正部10が動作している間行われる。   The V_PTS_REG_A register 121 storing “0” as an initial value stores the data pts_v_s input from the selector 130 when the PTS enable signal pts_v_w_en ′ input from the selector 131 falls. Similarly, the V_PTS_REG_B register 122 storing “0” as an initial value shifts and inputs the data stored in the V_PTS_REG_A register 121 when the PTS enable signal pts_v_w_en ′ falls. Thereafter, the subtractor 123 calculates a difference value δpts_v between the values stored in the V_PTS_REG_A register 121 and the V_PTS_REG_B register 122 and outputs the difference value δpts_v to the adder 126. At the same time, the multiplier 124 inputs the difference value δpts_v output from the subtractor 123. The multiplier 124 obtains a difference value δpts_v ′ obtained by multiplying the difference value δpts_v by the frequency error data δf acquired from the PCR comparison unit 5, and the difference value δpts_v ′ when the signal pulse of the input PTS enable signal pts_v_w_en falls. Is output or updated and sent to the adder 126. Such an operation of updating / outputting the difference value δpts_v ′ is performed while the video / audio output timing correction unit 10 is operating.

加算器126は、減算器123から入力した差分値δpts_v 、乗算器124から入力した差分値δpts_v’、及びV_δPTS_ALL レジスタ125に格納されているデータを加算し、データv_δpts_all を生成して出力する。このデータv_δpts_all は、加算器128に出力されるだけでなく、同時にV_δPTS_ALL レジスタ125に格納されているデータも、このデータv_δpts_all の値に更新される。加算器128は、データv_δpts_allと共に、PCM_correct_timeレジスタ127に格納されているデータを入力し、これらのデータを加算する。このPCM_correct_timeレジスタ127には、図1に示したPCMデータ補正部9の補正処理に要する時間を表したデータ、即ちオフセット時間を表すデータが格納されている。PCMデータ補正部9の処理時間は一定であるため、このオフセット時間を表すデータは固定値で表されるものになり、初期設定において取り扱われる。なお、このオフセット時間とは、PCMデータ補正部9へPCMデータが入力されてから、補正されたPCMデータが出力されるまでの処理時間を指し示すものである。   The adder 126 adds the difference value δpts_v input from the subtractor 123, the difference value δpts_v ′ input from the multiplier 124, and the data stored in the V_δPTS_ALL register 125 to generate and output data v_δpts_all. This data v_δpts_all is not only output to the adder 128, but at the same time, the data stored in the V_δPTS_ALL register 125 is updated to the value of this data v_δpts_all. The adder 128 inputs the data stored in the PCM_correct_time register 127 together with the data v_δpts_all, and adds these data. The PCM_correct_time register 127 stores data representing the time required for the correction processing of the PCM data correction unit 9 shown in FIG. 1, that is, data representing the offset time. Since the processing time of the PCM data correction unit 9 is constant, the data representing this offset time is represented by a fixed value and is handled in the initial setting. The offset time indicates the processing time from when PCM data is input to the PCM data correction unit 9 until the corrected PCM data is output.

その後、図12に示した比較器129は、加算器128から出力されたデータpts’_vとデータlocal_cnt<41..9>とを比較して、‘pts’_v=local_cnt<41..9>’の関係が成立するとき、クロック信号clk の1クロック分のパルスを有する出力イネーブル信号v_enを生成して出力する。なお、図12では図示を省略したが、ビデオ/オーディオ出力タイミング補正部10は、PTSイネーブル信号pts_v_w_enが最初に立ち上がるときのエッジが入力されるまで比較器129がリセット状態になっているように構成される。   Thereafter, the comparator 129 shown in FIG. 12 compares the data pts'_v output from the adder 128 with the data local_cnt <41..9>, and 'pts'_v = local_cnt <41..9>. When the relationship 'is established, an output enable signal v_en having a pulse for one clock of the clock signal clk is generated and output. Although not shown in FIG. 12, the video / audio output timing correction unit 10 is configured such that the comparator 129 is in a reset state until an edge when the PTS enable signal pts_v_w_en first rises is input. Is done.

オーディオ側のデータ処理は、図12に示したように、A_PTS_REG_A レジスタ134にセレクタ133からPTSイネーブル信号pts_a_w_en’ が入力される。A_PTS_REG_A レジスタ134は、入力したPTSイネーブル信号pts_a_w_en’ の立ち下りタイミングでデータpts_a_s を格納し、同時にA_PTS_REG_A レジスタ134に先に格納されていたデータがA_PTS_REG_B レジスタ135へシフトされる。その後、減算器136が、A_PTS_REG_A レジスタ134とA_PTS_REG_B レジスタ135にそれぞれ格納されている値の差分値δpts_a を求め、加算器138へ出力する。またこれと同時に、乗算器137は、減算器136から出力された差分値δpts_a を入力する。この乗算器137は、差分値δpts_a にPCR比較部5から取得した周波数誤差データδfを乗算した差分値δpts_a’を求め、入力しているPTSイネーブル信号pts_a_w_enの信号パルスの立ち下り時に差分値δpts_a’を出力・更新し、加算器138に送る。ビデオ/オーディオ出力タイミング補正部10において、ここまでの処理はビデオ側のデータ処理と同様に行われる。   In the data processing on the audio side, the PTS enable signal pts_a_w_en ′ is input from the selector 133 to the A_PTS_REG_A register 134 as shown in FIG. The A_PTS_REG_A register 134 stores the data pts_a_s at the falling timing of the input PTS enable signal pts_a_w_en ′, and at the same time, the data previously stored in the A_PTS_REG_A register 134 is shifted to the A_PTS_REG_B register 135. Thereafter, the subtracter 136 obtains a difference value δpts_a between values stored in the A_PTS_REG_A register 134 and the A_PTS_REG_B register 135 and outputs the difference value δpts_a to the adder 138. At the same time, the multiplier 137 receives the difference value δpts_a output from the subtractor 136. The multiplier 137 obtains a difference value δpts_a ′ obtained by multiplying the difference value δpts_a by the frequency error data δf acquired from the PCR comparison unit 5, and the difference value δpts_a ′ at the falling edge of the signal pulse of the input PTS enable signal pts_a_w_en. Is output / updated and sent to the adder 138. In the video / audio output timing correction unit 10, the processing so far is performed in the same manner as the data processing on the video side.

加算器138は、減算器136から入力した差分値δpts_a と乗算器137から入力した差分値δpts_a’とを加算してデータpts’_aを生成し、比較器139へ出力する。比較器139は、データlocal_cnt<41..9>と加算器138から出力されたデータpts’_aとを比較し、‘pts’_a=local_cnt<41..9>’となる場合には、クロック信号clk の1クロック分のパルス信号によってアクティブを示す信号a_set を生成する。   The adder 138 adds the difference value δpts_a input from the subtractor 136 and the difference value δpts_a ′ input from the multiplier 137 to generate data pts′_a, and outputs the data pts′_a to the comparator 139. The comparator 139 compares the data local_cnt <41..9> with the data pts'_a output from the adder 138, and if 'pts'_a = local_cnt <41..9>' A signal a_set indicating active is generated by a pulse signal of one clock of the signal clk.

フリップフロップ140は、S入力として比較器138から出力された信号a_set を入力し、またR入力としてリセット信号reset を入力し、これらのSR入力に応じてイネーブル信号a_enを生成する。フリップフロップ140は、アクティブを示す信号a_set が入力され、このときリセット信号reset がアクティブを示していなければ、アクティブを示す出力イネーブル信号a_enを生成して出力する。   The flip-flop 140 receives the signal a_set output from the comparator 138 as an S input, and receives a reset signal reset as an R input, and generates an enable signal a_en according to these SR inputs. The flip-flop 140 receives the signal a_set indicating active, and generates and outputs an output enable signal a_en indicating active if the reset signal reset does not indicate active.

なお、ビデオ/オーディオ出力タイミング補正部10の動作において、出力データ制御部11を制御してビデオデータに関するタイミング補正を常に行うようにしたことに対して、出力データ制御部11を制御してオーディオデータに関するタイミング補正を最初に行うのみとしたのは、ビデオフレームの数量は、例えば30枚に限定されず、デコードするビデオフレームの数量が可変する。これに対してオーディオフレームの数量は固定されており、デコードするオーディオフレームの数量も一定である。そのため、オーディオフレームのデコードは、最初に設定した出力タイミングを使用し続けても障害が発生しない。そこで、この実施の形態1による発明では、ビデオデータ側のタイミング制御を度々行い、オーディオデータ側のタイミング制御を最初に行うのみとして、ビデオデータとオーディオデータのタイミング補正に関する動作制御を簡略化している。   In the operation of the video / audio output timing correction unit 10, the output data control unit 11 is controlled to always perform timing correction on video data, whereas the output data control unit 11 is controlled to control audio data. The reason why the timing correction is only performed first is that the number of video frames is not limited to 30 frames, for example, and the number of video frames to be decoded is variable. On the other hand, the number of audio frames is fixed, and the number of audio frames to be decoded is also constant. Therefore, the decoding of the audio frame does not cause a failure even if the output timing set first is continuously used. Accordingly, in the invention according to the first embodiment, the timing control on the video data side is frequently performed, and the timing control on the audio data side is only performed first, and the operation control relating to the timing correction of the video data and the audio data is simplified. .

また、図12に示したフリップフロップ141は、S入力にカウントイネーブル信号cnt_en2 を入力し、R入力にリセット信号reset を入力して、前述のトランスポートデコーダ3の動作を制御するPESイネーブル信号pes_enを生成する。このフリップフロップ141は、リセット信号reset がアクティブを示していないとき、カウントイネーブル信号cnt_en2 がアクティブを示すと、アクティブを示すPESイネーブル信号pes_enを出力する。   Further, the flip-flop 141 shown in FIG. 12 receives the count enable signal cnt_en2 at the S input and the reset signal reset at the R input, and receives the PES enable signal pes_en for controlling the operation of the transport decoder 3 described above. Generate. When the reset signal reset does not indicate active and the count enable signal cnt_en2 indicates active, the flip-flop 141 outputs the PES enable signal pes_en indicating active.

図14は、実施の形態1によるデジタル放送受信機のPCMデータ補正部の構成を示すブロック図である。この図は、図1に示したPCMデータ補正部9の構成を示したもので、オーディオデコーダ7からPCMデータであるオーディオデータadata を入力してU倍のアップサンプリングを行うアップサンプリング部(アップサンプリング手段)151、アップサンプリング部151から出力されたPCMデータのフィルタリングを行うローパスフィルタ152、ローパスフィルタ152から出力されたPCMデータを保持する補間データテンポラリバッファ(データバッファ)153、PCR比較部5から出力された周波数誤差データδfを入力し、補間データテンポラリバッファ153の動作を制御する補間データテンポラリバッファ読み出し制御部(データバッファ読み出し制御手段)154、及び、補間データテンポラリバッファ153から出力されたPCMデータを蓄積してこれを適宜オーディオ補正データadata’として出力するデータ蓄積メモリ155を備える。また、前述のようにPCMデータ補正部9は、クロック信号clk を入力し、当該クロック信号clk に基づいて再生サンプリングクロックclk2を生成する図示されないクロック生成部を備える。この再生サンプリングクロックclk2は、送出側システムにおいてPCMデータを生成する際に用いられるサンプリング周波数を有するものである。詳しくは、送出系システム側に備えられたAACエンコーダのサンプリングクロックに対応するように受信機側で再生したものである。なお、送出系システム側のサンプリング周波数は、前述のトランスポートデコーダ3から出力されるPESパケットに含まれるAACエンコードのES(Elementary Stream)内に記述されており、クロック生成部は、この記述内容を取得して再生サンプリングクロックclk2を生成する。   FIG. 14 is a block diagram showing the configuration of the PCM data correction unit of the digital broadcast receiver according to the first embodiment. This figure shows a configuration of the PCM data correction unit 9 shown in FIG. 1, and an upsampling unit (upsampling) that inputs audio data adata as PCM data from the audio decoder 7 and performs U-times upsampling. (Means) 151, a low-pass filter 152 that performs filtering of PCM data output from the upsampling unit 151, an interpolation data temporary buffer (data buffer) 153 that holds PCM data output from the low-pass filter 152, and an output from the PCR comparison unit 5 From the interpolation data temporary buffer 153 and the interpolation data temporary buffer 153 which input the frequency error data δf thus inputted and control the operation of the interpolation data temporary buffer 153 and the interpolation data temporary buffer 153. A data storage memory 155 and outputs the accumulated force has been PCM data as appropriate audio correction data adata '. In addition, as described above, the PCM data correction unit 9 includes a clock generation unit (not shown) that receives the clock signal clk and generates the reproduction sampling clock clk2 based on the clock signal clk. The reproduction sampling clock clk2 has a sampling frequency used when generating PCM data in the transmission side system. Specifically, the reproduction is performed on the receiver side so as to correspond to the sampling clock of the AAC encoder provided on the transmission system side. Note that the sampling frequency on the transmission system side is described in an AAC-encoded ES (Elementary Stream) included in the PES packet output from the transport decoder 3 described above, and the clock generation unit converts this description content. Acquire and generate a reproduction sampling clock clk2.

図15は、実施の形態1によるデジタル放送受信機のアップサンプリング部により処理されたPCMデータを示す説明図である。この図は、アップサンプリング部151がAC成分の零値データAC0 を各PCMデータへ補間するときのイメージを示したもので、例えばアップサンプリングの倍率Uを3倍とした場合のデータAC0 の挿入状態を示したものである。アップサンプリング部151は、再生サンプリングクロックclk2に同期させながら次のように動作処理を行う。オーディオデコーダ7からPCMデータadataを入力し、このPCMデータadata を、例えばデータPCM_N-1 、データPCM_N 、データPCM_N+1と表したとき、またアップサンプリング倍率UをU=3としてアップサンプリングする場合には、U−1個、即ち二つのデータAC0 をデータPCM_N-1 、データPCM_N 、データPCM_N+1 のそれぞれ後に挿入する。   FIG. 15 is an explanatory diagram showing PCM data processed by the upsampling unit of the digital broadcast receiver according to the first embodiment. This figure shows an image when the upsampling unit 151 interpolates the AC component zero value data AC0 into each PCM data. For example, the insertion state of the data AC0 when the upsampling factor U is tripled. Is shown. The upsampling unit 151 performs an operation process as follows while synchronizing with the reproduction sampling clock clk2. When PCM data adata is input from the audio decoder 7 and this PCM data adata is expressed as, for example, data PCM_N-1, data PCM_N, data PCM_N + 1, or when upsampling is performed with an upsampling factor U of U = 3 Inserts U-1 pieces of data AC0 after data PCM_N-1, data PCM_N and data PCM_N + 1, respectively.

図15−1は、アップサンプリング部151へ逐次入力されるPCMデータのデータPCM_N-1 、データPCM_N 、データPCM_N+1 を表したもので、これは当該PCMデータ補正部9によって処理される前のPCMデータである。アップサンプリング部151は、図示したように、データPCM_N-1 の後に二つのデータAC0 を挿入し、更にその後に続くデータPCM_N の後に二つのデータAC0 を挿入し、また更にその後に続くデータPCM_N+1 の後に二つのデータAC0 を挿入する。図15−2に示したように、データAC0 を挿入する前、即ち補間前は、滑らかに遷移する信号波形がデータPCM_N-1 ,PCM_N ,PCM_N+1 により表される。前述のように各PCMデータの間にAC成分の零値データAC0 を挿入すると、データAC0 を補間した箇所に対応する信号は零値となるため、図15−2に補間後として示したようにデータPCM_N-1 ,AC0 ,AC0 ,PCM_N ,AC0 ,AC0 ,PCM_N+1 ,AC0 ,AC0 により表される波形は、オーディオデータadata が本来表す信号波形よりも高い周波数成分を有するものとなる。アップサンプリング部151は、このような波形を示すPCMデータをローパスフィルタ152へ出力する。   FIG. 15A shows data PCM_N−1, data PCM_N, and data PCM_N + 1 of PCM data sequentially input to the upsampling unit 151, which is before being processed by the PCM data correction unit 9. PCM data. As shown in the figure, the upsampling unit 151 inserts two data AC0 after the data PCM_N-1, further inserts two data AC0 after the subsequent data PCM_N, and further follows the data PCM_N + 1. Two data AC0 are inserted after. As shown in FIG. 15B, before the data AC0 is inserted, that is, before the interpolation, the signal waveforms that smoothly transition are represented by the data PCM_N-1, PCM_N, and PCM_N + 1. As described above, when the zero value data AC0 of the AC component is inserted between the PCM data, the signal corresponding to the position where the data AC0 is interpolated becomes a zero value. The waveform represented by the data PCM_N-1, AC0, AC0, PCM_N, AC0, AC0, PCM_N + 1, AC0, AC0 has a higher frequency component than the signal waveform originally represented by the audio data adata. The upsampling unit 151 outputs PCM data indicating such a waveform to the low-pass filter 152.

図16は、実施の形態1によるデジタル放送受信機のローパスフィルタにより処理されたPCMデータを示す説明図である。この図は、AC成分の零値を示すデータAC0を補完することによりサンプリング数を増加させたPCMデータをローパスフィルタ152へ入力し、当該ローパスフィルタ152が、補間されたPCMデータが本来の周波数帯域のみから成るように、当該PCMデータに含まれる周波数成分の帯域制限を行う処理動作を示したものである。   FIG. 16 is an explanatory diagram showing PCM data processed by the low pass filter of the digital broadcast receiver according to the first embodiment. In this figure, PCM data in which the number of samplings is increased by complementing data AC0 indicating a zero value of the AC component is input to the low-pass filter 152, and the low-pass filter 152 has the interpolated PCM data in the original frequency band. The processing operation for limiting the band of the frequency component included in the PCM data is shown.

図16−1は、ローパスフィルタ152へ入力されるPCMデータと当該ローパスフィルタ152によりフィルタリングされたPCMデータを示したものである。図示したようにローパスフィルタ152の通過前のPCMデータは、即ち、アップサンプリング部151において、例えばU=3としてアップサンプリングされたPCMデータは、前述のようにデータPCM_N-1 、データAC0 、データAC0 、データPCM_N 、データAC0 、データAC0 、データPCM_N+1 、データAC0 、データAC0 の順で当該ローパスフィルタ152へ逐次入力される。このようにPCMデータを入力したローパスフィルタ152は、図16−1に示したようにフィルタ通過前のデータPCM_N-1 をフィルタ通過後のデータPCM_N-1_0 に、次のフィルタ通過前のデータAC0 をフィルタ通過後のデータPCM_N-1_1 に、次のフィルタ通過前のデータAC0 をフィルタ通過後のデータPCM_N-1_2 に、次のフィルタ通過前のデータPCM_N をフィルタ通過後のデータPCM_N_0 に、次のフィルタ通過前のデータAC0 をフィルタ通過後のデータPCM_N_1 に、次のフィルタ通過前のデータAC0 をフィルタ通過後のデータPCM_N_2 に、次のフィルタ通過前のデータPCM_N+1 をフィルタ通過後のデータPCM_N+1_0 に、次のフィルタ通過前のデータAC0 をフィルタ通過後のデータPCM_N+1_1 に、次のフィルタ通過前のデータAC0 をフィルタ通過後のデータPCM_N+1_2 等にフィルタリングする。このフィルタリングは、図16−2に示したようにフィルタ通過前のデータPCM_N-1 ,AC0 ,AC0 ,PCM_N ,AC0 ,AC0 ,PCM_N+1 ,AC0 ,AC0 が示す波形が、フィルタ通過後として示した滑らかに遷移する波形となるように、零値データAC0 によって含まれていた高周波成分を除去するように行われる。ローパスフィルタ152を通過させたPCMデータは、このようにオーディオ信号の波形を示すデータとなる。   FIG. 16A shows PCM data input to the low-pass filter 152 and PCM data filtered by the low-pass filter 152. As shown in the figure, the PCM data before passing through the low-pass filter 152, that is, the PCM data up-sampled by the up-sampling unit 151 as U = 3, for example, is data PCM_N-1, data AC0, data AC0 as described above. , Data PCM_N, data AC0, data AC0, data PCM_N + 1, data AC0, and data AC0 are sequentially input to the low-pass filter 152. As shown in FIG. 16A, the low-pass filter 152 to which the PCM data is input in this way converts the data PCM_N-1 before passing through the filter into the data PCM_N-1_0 after passing through the filter, and the data AC0 before passing through the next filter. Data PCM_N-1_1 after passing the filter, data AC0 before passing the next filter to data PCM_N-1_2 after passing the filter, data PCM_N before passing the next filter to data PCM_N_0 after passing the filter, The previous data AC0 is converted to data PCM_N_1, the next filtered data AC0 is converted to data PCM_N_2, and the next filtered data PCM_N + 1 is converted to filtered data PCM_N + 1_0. Filter the data AC0 before passing the next filter to the data PCM_N + 1_1 after passing the filter, data AC0 before passing the next filter to the data PCM_N + 1_2 after passing the filter, etc. The In this filtering, as shown in FIG. 16-2, the waveforms indicated by the data PCM_N-1, AC0, AC0, PCM_N, AC0, AC0, PCM_N + 1, AC0, AC0 before passing through the filter are shown as after passing through the filter. The high frequency component included in the zero value data AC0 is removed so as to obtain a smooth transition waveform. The PCM data that has passed through the low-pass filter 152 thus becomes data indicating the waveform of the audio signal.

ローパスフィルタ152から出力されたPCMデータ、即ち図16−1に示したフィルタ通過後の各データPCM_N-1_0 ,PCM_N-1_1 ,PCM_N-1_2 ,PCM_N_0 ,PCM_N_1 ,PCM_N_2 ,PCM_N+1_0 ,PCM_N+1_1 ,PCM_N+1_2 は、遂次補間データテンポラリバッファ153へ格納され、蓄積される。なお、上記各データの名称の最終端に付記された数字は、後述する当該データに対応する位相値を示すものである。   PCM data output from the low-pass filter 152, that is, data PCM_N-1_0, PCM_N-1_1, PCM_N-1_2, PCM_N_0, PCM_N_1, PCM_N_2, PCM_N + 1_0, PCM_N + 1_1, after passing through the filter shown in FIG. PCM_N + 1_2 is stored and accumulated in the successive interpolation data temporary buffer 153. Note that the number appended to the last end of each data name indicates a phase value corresponding to the data described later.

例えば2ポートRAMから成る補間データテンポラリバッファ153は、ローパスフィルタ152を通過したPCMデータ、即ち補間されたPCMデータを全て一時的に格納する。補間データテンポラリバッファ読み出し制御部154は、後述するようにPCR比較部5から取得した周波数誤差データδfに基づいて補間データテンポラリバッファ153から補間されたPCMデータを読み出し、データ蓄積メモリ155へ当該PCMデータを書き込ませる。データ蓄積メモリ155は、再生サンプリングクロックclk2に同期させてPCM補正データadata’を順次出力する。この出力動作は、データ蓄積メモリ155の読み出しアドレス、即ちPCM補正データadata’を読み出すアドレスを、再生サンプリングクロックclk2に同期させてインクリメントしながら行われる。   For example, the interpolation data temporary buffer 153 composed of a 2-port RAM temporarily stores all the PCM data that has passed through the low-pass filter 152, that is, the interpolated PCM data. The interpolation data temporary buffer read control unit 154 reads the PCM data interpolated from the interpolation data temporary buffer 153 based on the frequency error data δf acquired from the PCR comparison unit 5 as will be described later, and stores the PCM data in the data storage memory 155. To write. The data storage memory 155 sequentially outputs the PCM correction data adata ′ in synchronization with the reproduction sampling clock clk2. This output operation is performed while incrementing a read address of the data storage memory 155, that is, an address for reading the PCM correction data adata 'in synchronization with the reproduction sampling clock clk2.

図17は、実施の形態1によるデジタル放送受信機の補間データテンポラリバッファ読み出し制御部の動作を示すフローチャートである。図17−1及び図17−2のフローチャートは、図14に示した補間データテンポラリバッファ読み出し制御部154の制御動作を示したものである。補間データテンポラリバッファ読み出し制御部154は、前述のようにPCR比較部5から入力した周波数誤差データδfを用いて位相シフト値を算出する(ステップST101)。この位相シフト値とは、一回の補正処理によってシフトする位相値のことである。また、この位相値は単位にラジアンを用いて−2πから+2πまでの範囲の位相を表した値である。補間データテンポラリバッファ読み出し制御部154は、位相シフト値を2π×δfの演算によって求める。   FIG. 17 is a flowchart showing the operation of the interpolation data temporary buffer read control unit of the digital broadcast receiver according to the first embodiment. The flowcharts of FIGS. 17A and 17B show the control operation of the interpolation data temporary buffer read control unit 154 shown in FIG. The interpolation data temporary buffer read control unit 154 calculates the phase shift value using the frequency error data δf input from the PCR comparison unit 5 as described above (step ST101). This phase shift value is a phase value shifted by a single correction process. Further, this phase value is a value representing a phase in a range from −2π to + 2π using radians as a unit. The interpolation data temporary buffer read control unit 154 obtains the phase shift value by the calculation of 2π × δf.

その後、位相シフト値が0以上の値であるか否かを判定し(ステップST102)、位相値が0以上であれば、ステップST103へ移行し、0以上でない場合にはステップST111に移行する。位相シフト値が0以上であると判定した場合は、初期値が0で与えられている現在の位相値を読み出す(ステップST103)。ここで読み出される位相値は、補間データテンポラリバッファ読み出し制御部153の内部に備えられたレジスタに保持されているデータで、後述するステップST109において位相シフト値に加算される。ここで位相値とは、実際の送出サンプリングデータ、即ち送出側システムから送出されるオーディオデータのサンプリングタイミングに対する位相のずれを示す値である。次に、この位相値が2πより小さいか否かを判定する(ステップST104)。位相値が2πより小さい位相差であると判定したときは、ステップST107に移行する。また、位相値が2πより小さくないと判定した場合にはステップST105に移行する。ステップST104で位相値が2πより小さいと判定した場合は、位相値に基づいて補間データテンポラリバッファ153の読み出しアドレスを補正する(ステップST107)。この補正アドレスの算出は以下に示す式(4)を用いる。
補正アドレス=基準アドレス+(位相値/2π)×U…(4)
(Uはアップサンプリングしたときの倍率)
なお、式(4)の基準アドレスは、PCMデータのアップサンプリングする前、即ち補間前の基準データが格納されているアドレスを指すもので、図15−2に示したデータPCM_N-1_0 ,PCM_N_0 ,PCM_N+1_0 ,PCM_N+2_0 のように位相値が0のときに読み出されるデータが格納されているアドレスを示す。また、基準データは位相値=0で読み出されるデータ値を指す。なお、この基準アドレスは、図14に示した補間データテンポラリバッファ読み出し制御部154の内部に記憶保存され、当該基準アドレスが補正アドレスに使用される度に、基準アドレス=基準アドレス+U(Uはアップサンプリングした時の倍率)として内容が更新される。
Thereafter, it is determined whether or not the phase shift value is 0 or more (step ST102). If the phase value is 0 or more, the process proceeds to step ST103. If not, the process proceeds to step ST111. If it is determined that the phase shift value is greater than or equal to 0, the current phase value given with an initial value of 0 is read (step ST103). The phase value read here is data held in a register provided in the interpolation data temporary buffer read control unit 153, and is added to the phase shift value in step ST109 described later. Here, the phase value is a value indicating a phase shift with respect to sampling timing of actual transmission sampling data, that is, audio data transmitted from the transmission side system. Next, it is determined whether or not this phase value is smaller than 2π (step ST104). When it is determined that the phase value is smaller than 2π, the process proceeds to step ST107. If it is determined that the phase value is not smaller than 2π, the process proceeds to step ST105. If it is determined in step ST104 that the phase value is smaller than 2π, the read address of the interpolation data temporary buffer 153 is corrected based on the phase value (step ST107). The correction address is calculated using the following formula (4).
Correction address = reference address + (phase value / 2π) × U (4)
(U is the magnification when up-sampling is performed)
Note that the reference address in equation (4) indicates the address where the reference data before upsampling of PCM data, that is, before interpolation, is stored, and the data PCM_N-1_0, PCM_N_0, This indicates the address where the data to be read when the phase value is 0, such as PCM_N + 1_0 and PCM_N + 2_0. Further, the reference data indicates a data value read with a phase value = 0. This reference address is stored and saved in the interpolation data temporary buffer read control unit 154 shown in FIG. 14, and every time the reference address is used as a correction address, reference address = reference address + U (U is up) The content is updated as the magnification when sampling).

ステップST107で読み出しアドレスを補正した後、補間データテンポラリバッファ153から当該補正アドレスに格納されているデータを読み出し、このデータをデータ蓄積メモリ155に書き込ませる(ステップST108)。次に、位相値に位相シフト値を加算する(ステップST109)。更に、補間データテンポラリバッファ153のアドレスを次の基準アドレスにスキップさせる(ステップST110)。この後、再びステップST101に戻り、同一シーケンスを繰り返す。なお、ステップSTS104において、位相値が2π以上であると判定した場合には、ステップST105に移行して位相値から2πを減算し(ステップST105)、補間データテンポラリバッファ153のアドレスを、ステップST110と同様に基準アドレスにスキップさせる(ステップST106)。基準アドレスにスキップした後は、再びステップST103に戻って同一シーケンスを実施する。また、ステップST102で位相シフト値が0以上ではないと判定した場合には、ステップST111に移行する。その後、ステップST103と同様に位相値を読み出し(ステップST111)、次にステップST107と同様に読み出しアドレスを補正する(ステップST112)。その後、ステップST108と同様に補間データテンポラリバッファ153の補正アドレスからデータを読み出し、次にこのデータをデータ蓄積メモリ155に書き込む(ステップST113)。その後、ステップST109と同様に位相値に位相シフト値を加算する(ステップST114)。次に、位相値が−2π以上であるか否かを判定し(ステップST115)、位相値が−2π以上であればステップST117に移行し、位相値が−2π未満であれば、ステップST116に移行する。ステップST117では、補間データテンポラリバッファ153のアドレスをスキップし、再び、ステップST101に移行する。また、ステップST116では位相値に2πを加算して当該位相値を更新し、再びステップST111に移行し、以降の過程を繰り返す。   After correcting the read address in step ST107, the data stored in the correction address is read from the interpolation data temporary buffer 153, and this data is written in the data storage memory 155 (step ST108). Next, the phase shift value is added to the phase value (step ST109). Further, the address of the interpolation data temporary buffer 153 is skipped to the next reference address (step ST110). Then, it returns to step ST101 again and repeats the same sequence. If it is determined in step STS104 that the phase value is 2π or more, the process proceeds to step ST105, where 2π is subtracted from the phase value (step ST105), and the address of the interpolation data temporary buffer 153 is set to step ST110. Similarly, the reference address is skipped (step ST106). After skipping to the reference address, the process returns to step ST103 and the same sequence is performed. On the other hand, if it is determined in step ST102 that the phase shift value is not 0 or more, the process proceeds to step ST111. Thereafter, the phase value is read out similarly to step ST103 (step ST111), and then the read address is corrected similarly to step ST107 (step ST112). Thereafter, in the same manner as in step ST108, data is read from the correction address of the interpolation data temporary buffer 153, and then this data is written in the data storage memory 155 (step ST113). Thereafter, the phase shift value is added to the phase value as in step ST109 (step ST114). Next, it is determined whether or not the phase value is −2π or more (step ST115). If the phase value is −2π or more, the process proceeds to step ST117. If the phase value is less than −2π, the process proceeds to step ST116. Transition. In step ST117, the address of the interpolation data temporary buffer 153 is skipped, and the process proceeds to step ST101 again. In step ST116, 2π is added to the phase value to update the phase value, and the process proceeds to step ST111 again, and the subsequent processes are repeated.

このように補間データテンポラリバッファ読み出し制御部154は、補間データテンポラリバッファ153から読み出されるデータを制御し、データ蓄積メモリ155にこのデータを格納・蓄積させる。PCMデータ補正部9は、このように入力したオーディオデータadata を処理してデータ蓄積メモリ155に蓄積させたデータを前述のようにオーディオ補正データadata’として出力データ制御部11へ出力する。   In this way, the interpolation data temporary buffer read control unit 154 controls the data read from the interpolation data temporary buffer 153, and stores / accumulates this data in the data accumulation memory 155. The PCM data correction unit 9 processes the input audio data adata and outputs the data stored in the data storage memory 155 to the output data control unit 11 as the audio correction data adata 'as described above.

この後、前述のように出力データ制御部11はビデオ/オーディオ出力タイミング補正部10から出力された出力イネーブル信号a_enに基づいてオーディオ補正データadata’をD/Aコンバータ13へ出力する。   Thereafter, the output data control unit 11 outputs the audio correction data adata ′ to the D / A converter 13 based on the output enable signal a_en output from the video / audio output timing correction unit 10 as described above.

以上のように、実施の形態1の発明によれば、PCR比較部5が順次取得したPCRから周波数誤差データδfを求め、ビデオ/オーディオ出力タイミング補正部10が周波数誤差データδfに基づいてビデオバッファの出力データ制御部3及びオーディオバッファの出力データ制御部11を制御し、D/Aコンバータ12から出力されるビデオ信号とD/Aコンバータ13から出力されるオーディオ信号の同期タイミングを補正するようにしたので、PLL回路を備えることなくビデオ信号とオーディオ信号の同期を図ることができ、またAVデコーダ14などのワンチップ化が可能になることから当該受信機の小型化及び低価格化を図ることができるという効果がある。   As described above, according to the invention of the first embodiment, the frequency error data δf is obtained from the PCR sequentially acquired by the PCR comparison unit 5, and the video / audio output timing correction unit 10 determines the video buffer based on the frequency error data δf. The output data control unit 3 and the output data control unit 11 of the audio buffer are controlled so that the synchronization timing of the video signal output from the D / A converter 12 and the audio signal output from the D / A converter 13 is corrected. Therefore, the video signal and the audio signal can be synchronized without providing a PLL circuit, and the AV decoder 14 and the like can be made into one chip, so that the receiver can be reduced in size and price. There is an effect that can be.

また、PCMデータ補正部9が周波数誤差データδfに基づいてPCMデータであるオーディオデータadata を補正するようにしたので、送出系システム側のサンプリングデータはあたかも受信機側の再生サンプリングクロックでサンプリングしたデータのように変換され、その結果としてオーディオ出力バッファのオーバーフローやアンダーフローの発生が防止され、異音の発生を防ぐことができるという効果がある。   In addition, since the PCM data correction unit 9 corrects the audio data adata which is PCM data based on the frequency error data δf, the sampling data on the transmission system side is data sampled with the reproduction sampling clock on the receiver side. As a result, an overflow or underflow of the audio output buffer is prevented, and an abnormal sound can be prevented.

実施の形態2.
以下、この発明の実施の形態2について説明する。
実施の形態2によるデジタル放送受信機は、PCMデータ補正部以外は全て実施の形態1によるデジタル放送受信機と同様に構成され、また同様に動作するものである。ここでは、図1等に示した実施の形態1によるデジタル放送受信機と同様に構成される、PCMデータ補正部以外の部分の説明を省略する。
Embodiment 2. FIG.
The second embodiment of the present invention will be described below.
The digital broadcast receiver according to the second embodiment is configured in the same manner as the digital broadcast receiver according to the first embodiment except for the PCM data correction unit, and operates similarly. Here, description of parts other than the PCM data correction unit configured similarly to the digital broadcast receiver according to Embodiment 1 shown in FIG. 1 and the like is omitted.

図18は、この発明の実施の形態2によるデジタル放送受信機のPCMデータ補正部の構成を示すブロック図である。図18に示したものは図1のPCMデータ補正部9に相当するもので、実施の形態1で図14を用いて説明したPCMデータ補正部9と同様に、PCR比較部5から周波数誤差データδfを入力し、またオーディオデコーダ7からオーディオデータadata を入力し、オーディオ補正データadata’を出力データ制御部11へ出力するもので、より適切なデータ補正を行うものである。図18に示したPCMデータ補正部は、入力したオーディオデータadata を蓄積するデータ蓄積部181、データ蓄積部181に蓄積されているデータのFFT(Fast Fourier Transform)演算を行うFFT演算部(FFT演算手段)182、FFT演算部182から出力されるデータfft_resultを入力し、位相補正及びIDFT(Inverse Discrete-time Fourier Transform)演算を行う位相補正/IDFT演算部(位相補正演算手段)183、PCR比較部5から周波数誤差データδfを入力し、データθ及び信号P_INT を位相補正/IDFT演算部183へ出力する位相補正制御部(位相補正制御手段)185、位相補正/IDFT演算部183の演算結果を示すデータを蓄積し、オーディオ補正データadata’として出力するデータ蓄積部184を備える。なお、実施の形態2によるPCMデータ補正部9も、前述の実施の形態1で説明したPCMデータ補正部9と同様に再生サンプリングクロックclk2を生成する図示されないクロック生成部を備える。   FIG. 18 is a block diagram showing the configuration of the PCM data correction unit of the digital broadcast receiver according to Embodiment 2 of the present invention. 18 corresponds to the PCM data correction unit 9 shown in FIG. 1. Like the PCM data correction unit 9 described with reference to FIG. 14 in the first embodiment, the frequency error data from the PCR comparison unit 5 is shown. δf is input, audio data adata is input from the audio decoder 7, and audio correction data adata ′ is output to the output data control unit 11, and more appropriate data correction is performed. The PCM data correction unit shown in FIG. 18 includes a data storage unit 181 that stores input audio data adata, and an FFT operation unit (FFT operation) that performs an FFT (Fast Fourier Transform) operation on the data stored in the data storage unit 181. Means) 182, phase correction and IDFT (Inverse Discrete-time Fourier Transform) calculation by inputting data fft_result output from FFT calculation unit 182, phase correction / IDFT calculation unit (phase correction calculation means) 183, PCR comparison unit 5 shows the calculation results of the phase correction control unit (phase correction control means) 185 and the phase correction / IDFT calculation unit 183 that input the frequency error data δf from 5 and output the data θ and the signal P_INT to the phase correction / IDFT calculation unit 183. A data storage unit 184 that stores data and outputs the data as audio correction data adata ′ is provided. The PCM data correction unit 9 according to the second embodiment also includes a clock generation unit (not shown) that generates the reproduction sampling clock clk2 in the same manner as the PCM data correction unit 9 described in the first embodiment.

データ蓄積部181は、上述のようにオーディオデコーダ7から出力されたオーディオデータadata のPCMデータを一旦蓄積し、蓄積させたデータを1024サンプル毎にFFT演算部182へ出力する。FFT演算部182は、FFT演算の前処理として、1024サンプルを1フレームとして切り出したサンプリングデータにハミング窓等の窓関数を1フレーム分乗算する。この後、FFT演算を行うようにして折り返し歪の発生を防ぐ。   The data storage unit 181 temporarily stores the PCM data of the audio data adata output from the audio decoder 7 as described above, and outputs the stored data to the FFT operation unit 182 every 1024 samples. The FFT calculation unit 182 multiplies sampling data obtained by cutting out 1024 samples as one frame by a window function such as a Hamming window for one frame as preprocessing of the FFT calculation. Thereafter, the occurrence of aliasing distortion is prevented by performing an FFT operation.

一般に、g(t+ΔT)=g(t)が成り立つ周期関数g (t)において、期間ΔT では以下の式(5)のような近似式が成り立つ。
g(t)≒(1/N)×Σ{ak×exp(j×k×ω×t)}…(5)
(N=ΔT期間中のサンプリング数、0≦k≦N(kは整数)、ω=2π×f、1/f=ΔT、j^2=−1)
式(5)に示された各周波数成分の係数ak(kは0以上の整数)は、FFT演算により算出することが可能なものである。
In general, in the periodic function g (t) where g (t + ΔT) = g (t) holds, an approximate expression such as the following expression (5) holds in the period ΔT.
g (t) ≈ (1 / N) × Σ {ak × exp (j × k × ω × t)} (5)
(N = number of sampling during ΔT period, 0 ≦ k ≦ N (k is an integer), ω = 2π × f, 1 / f = ΔT, j ^ 2 = −1)
The coefficient ak (k is an integer of 0 or more) of each frequency component shown in the equation (5) can be calculated by FFT calculation.

ここで、例えば1024サンプルのサンプリングデータを処理するとき、送出系システム側のサンプリング周波数をf0、受信機側の再生サンプリングクロックの周波数をf0×(1−δf)とすると(ただし、−1<δf<1)、送出系システム側の音声原信号は次の式(6)のように表される。なお、以下に示す各式において、AKは送出システム側の各周波数成分の係数、またBKは受信機側の各周波数成分の係数である。
G(t)≒A0+1/1024×Σ{Ak×exp(j×k×2π×f0×t)}…(6)
また、受信機側にて再生するPCMデータは次の式(7)のように表される。
G’(t)=A0+1/1024×Σ{Bk×exp(j×k×2π×f0×(1−δf)×t)}
…(7)
式(7)は次の式(8)のようにおくことができる。
G’(t)=A0+1/1024×Σ{Bk×exp(j×k×2π×f×t)
×exp(j×k×2π×f0×(−δf)×t)} …(8)
ここで、θ=2π×f0×(−δf)×tとして式(8)を置き換えると、次の式(9)のようになる。
G’(t)=A0+1/1024×Σ{Bk×exp(j×k×θ)×exp(j×k×2π×f×t)}
…(9)
ここで、Bk×exp(j×k×θ)=Akとして式(9)を置き換えると、次の式(10)のようになる。
G’(t)=A0+1/1024×Σ{Ak×exp(j×k×2π×f×t)}≒G(t)…(10)
このように式(10)は式(6)と同様なものとなる。
Here, for example, when processing sampling data of 1024 samples, assuming that the sampling frequency on the transmission system side is f0 and the frequency of the reproduction sampling clock on the receiver side is f0 × (1-δf) (where -1 <δf) <1) The original voice signal on the transmission system side is expressed by the following equation (6). In the following equations, AK is a coefficient of each frequency component on the transmission system side, and BK is a coefficient of each frequency component on the receiver side.
G (t) ≈A0 + 1/1024 × Σ {Ak × exp (j × k × 2π × f0 × t)} (6)
Further, PCM data reproduced on the receiver side is expressed by the following equation (7).
G ′ (t) = A0 + 1/1024 × Σ {Bk × exp (j × k × 2π × f0 × (1−δf) × t)}
... (7)
Expression (7) can be expressed as the following expression (8).
G ′ (t) = A0 + 1/1024 × Σ {Bk × exp (j × k × 2π × f × t)
× exp (j × k × 2π × f0 × (−δf) × t)} (8)
Here, when equation (8) is replaced with θ = 2π × f0 × (−δf) × t, the following equation (9) is obtained.
G ′ (t) = A0 + 1/1024 × Σ {Bk × exp (j × k × θ) × exp (j × k × 2π × f × t)}
... (9)
Here, when equation (9) is replaced with Bk × exp (j × k × θ) = Ak, the following equation (10) is obtained.
G ′ (t) = A0 + 1/1024 × Σ {Ak × exp (j × k × 2π × f × t)} ≈G (t) (10)
Thus, Expression (10) is the same as Expression (6).

これは、送出系システム側においてサンプリングされたPCMデータを受信機側で処理するとき、送出系システムと受信機側とのサンプリング周波数誤差を求めて、その周波数誤差からFFT演算を行った後のサンプリングデータを補正することで、あたかも受信機側の再生サンプリング周波数でサンプリングしたPCMデータのように変換することが可能であることを意味する。また、実際にはFFT演算を行った後のサンプリングデータ、即ち前述のデータfft_resultは全サンプルの内、全体の1/2を中心にして対称な値になることから、その値を正弦関数を用いて表すことができ、sin (k×ω×t)を用いて表現することができる。このことから、データfft_resultはsin (k×(ω×t+θ))=sin (k×ω×t)cos θ+cos (k×ω×t)sin θとして表現することができ、正弦値、余弦値を求め、これらを用いた演算によりPCMデータを補正することができる。ただし、θが2π以上のときには、サンプリングデータを1データ補間する必要があり、逆に−2π以下になるようであればサンプリングデータを1データ間引きする必要がある。位相補正制御部185は、θ=2π×f0×(−δf)×t をサンプリング点ごとの時間で算出し、更にサンプリングデータの補間あるいは間引きが必要になるθ≧2π及びθ≦−2πのときに信号P_INT を生成して位相補正/IDFT演算部183に通知する。   This is because, when processing the PCM data sampled on the transmission system side on the receiver side, the sampling frequency error between the transmission system and the receiver side is obtained, and sampling is performed after performing the FFT operation from the frequency error. By correcting the data, it means that it can be converted as if it were PCM data sampled at the reproduction sampling frequency on the receiver side. In fact, the sampling data after performing the FFT operation, that is, the above-mentioned data fft_result is a symmetric value centering on half of all the samples, and the value is used as a sine function. And can be expressed using sin (k × ω × t). From this, the data fft_result can be expressed as sin (k × (ω × t + θ)) = sin (k × ω × t) cos θ + cos (k × ω × t) sin θ, and the sine value and cosine value are expressed as The PCM data can be corrected by calculation using these. However, when θ is 2π or more, it is necessary to interpolate the sampling data by one data. Conversely, if θ is −2π or less, it is necessary to thin out the sampling data by one data. The phase correction control unit 185 calculates θ = 2π × f0 × (−δf) × t by the time for each sampling point, and when θ ≧ 2π and θ ≦ −2π that further requires interpolation or thinning of the sampling data. To generate a signal P_INT and notify the phase correction / IDFT calculation unit 183 of the signal.

位相補正/IDFT演算部183は、補正位相正弦・余弦値ルックアップテーブル202を作成し、この補正位相正弦・余弦値ルックアップテーブル202と送出側IDFTルックアップテーブル203とを用いてIDFT演算ルックアップテーブル205を作成し、さらにFFT演算部182により算出されたデータfft_resultとIDFT演算ルックアップテーブル206とを用いて各周波数成分のIDFT演算結果を求め、これらの演算結果のデータ和を求めてデータ蓄積部184にPCM補正データとして書き込む。データ蓄積部184は、例えば再生サンプリングクロックclk2に同期させて蓄積しているPCM補正データをオーディオ補正データadata’として出力する。   The phase correction / IDFT calculator 183 creates a corrected phase sine / cosine value lookup table 202, and uses this corrected phase sine / cosine value lookup table 202 and the sending-side IDFT lookup table 203 to look up an IDFT calculation. A table 205 is created. Further, an IDFT calculation result of each frequency component is obtained using the data fft_result calculated by the FFT calculation unit 182 and the IDFT calculation lookup table 206, and a data sum of these calculation results is obtained to store data. This is written as PCM correction data in the unit 184. The data storage unit 184 outputs the PCM correction data stored in synchronization with the reproduction sampling clock clk2, for example, as audio correction data adata '.

図19は、実施の形態2によるデジタル放送受信機の位相補正制御部の動作を示すフローチャートである。図19−1及び図19−2のフローチャートは、図18に示した位相補正制御部185の動作を示すものである。なお、位相補正制御部185は、後述する演算処理等において使用するNレジスタ、補正位相値を格納する補正位相値レジスタ、及び位相初期値を格納する位相初期値レジスタを備えている。位相補正制御部185は、図1に示したPCR比較部5から周波数誤差データδfを入力し、実施の形態1で説明したPCMデータ補正部9と同様に周波数誤差データδfを用いた演算を行って位相シフト値を算出する(ステップST201)。ここで、位相シフト値とは一回の補正でシフトする位相値のことで、実施の形態1において定義した位相シフト値と同義である。次に、補正位相値レジスタに、位相初期値レジスタに格納されている位相初期値を書き込む(ステップST202)。この位相初期値レジスタには、初期値として0が設定されており、位相補正を行う度に格納されている位相初期値が更新される。   FIG. 19 is a flowchart showing the operation of the phase correction control unit of the digital broadcast receiver according to the second embodiment. The flowcharts of FIGS. 19A and 19B illustrate the operation of the phase correction control unit 185 illustrated in FIG. The phase correction control unit 185 includes an N register used in arithmetic processing described later, a correction phase value register that stores a correction phase value, and a phase initial value register that stores a phase initial value. The phase correction control unit 185 receives the frequency error data δf from the PCR comparison unit 5 shown in FIG. 1, and performs a calculation using the frequency error data δf in the same manner as the PCM data correction unit 9 described in the first embodiment. To calculate the phase shift value (step ST201). Here, the phase shift value is a phase value shifted by one correction, and is synonymous with the phase shift value defined in the first embodiment. Next, the phase initial value stored in the phase initial value register is written in the correction phase value register (step ST202). In this phase initial value register, 0 is set as an initial value, and the stored phase initial value is updated each time phase correction is performed.

次に、位相シフト値が0以上か否かを判定し(ステップST203)、0以上の値であればステップST204に移行し、そうでない場合にはステップST214へ移行する。ステップST204では、補正位相値レジスタに格納されている補正位相値を読み出す。ここで補正位相値とは、サンプリング点の位相のずれ分、即ち位相差を示す値である。次に、この補正位相値が2πより小さいか否かを判定する(ステップST205)。補正位相値が2πより小さい場合はステップST209に移行し、そうでない場合はステップST206に移行する。   Next, it is determined whether or not the phase shift value is 0 or more (step ST203). If the value is 0 or more, the process proceeds to step ST204, and if not, the process proceeds to step ST214. In step ST204, the correction phase value stored in the correction phase value register is read. Here, the correction phase value is a value indicating a phase shift of the sampling point, that is, a phase difference. Next, it is determined whether or not the correction phase value is smaller than 2π (step ST205). If the correction phase value is smaller than 2π, the process proceeds to step ST209, and otherwise, the process proceeds to step ST206.

次に位相補正制御部185は、位相補正/IDFT演算部183から入力したREADY信号がアクティブを示しているか否かを判定する(ステップST209)。READY信号がアクティブを示している場合にはステップST210へ移行し、READY信号がアクティブを示していない場合にはステップST209を繰り返す。   Next, phase correction control section 185 determines whether or not the READY signal input from phase correction / IDFT calculation section 183 indicates active (step ST209). When the READY signal indicates active, the process proceeds to step ST210, and when the READY signal does not indicate active, step ST209 is repeated.

ステップST210では、位相補正制御部185は、このとき処理している補正位相値を位相補正/IDFT演算部183に通知する。この後、当該通知した補正位相値に位相シフト値を加算し、算出した値により補正位相値レジスタに格納されている内容を更新する(ステップST211)。次に、Nレジスタの値が後述する位相初期値番号未満であるか否かを判定し(ステップST212)、Nレジスタの値が位相初期値番号未満であればステップST213に移行し、N<位相初期値番号が成立しない場合はステップST224に移行する。ステップST213では、Nレジスタの値に+1を加算し、当該Nレジスタの値をインクリメントしてステップST204へ戻り、以降の過程を繰り返す。   In step ST210, the phase correction control unit 185 notifies the phase correction / IDFT calculation unit 183 of the correction phase value being processed at this time. Thereafter, the phase shift value is added to the notified corrected phase value, and the content stored in the corrected phase value register is updated with the calculated value (step ST211). Next, it is determined whether or not the value of the N register is less than a phase initial value number described later (step ST212). If the value of the N register is less than the phase initial value number, the process proceeds to step ST213, where N <phase. If the initial value number is not established, the process proceeds to step ST224. In step ST213, +1 is added to the value of the N register, the value of the N register is incremented, the process returns to step ST204, and the subsequent processes are repeated.

また、ステップST205で、補正位相値が2π以上であると判定した場合には、位相補正制御部185は、当該判定を行った補正位相値から2πを減算し、この減算値を位相補正値として(ステップST206)、アクティブを示すP_INIT信号を位相補正/IDFT演算部183へ出力し、割込み処理を通知する(ステップST207)。その後、位相初期値番号から1を減算して、この算出値で位相初期値番号を更新し(ステップST208)、ステップST209へ移行する。なお、位相初期値番号の初期値はサンプリング数−1の1023である。   In Step ST205, when it is determined that the correction phase value is 2π or more, the phase correction control unit 185 subtracts 2π from the correction phase value for which the determination has been performed, and uses the subtraction value as the phase correction value. (Step ST206), a P_INIT signal indicating active is output to the phase correction / IDFT calculation unit 183, and an interrupt process is notified (step ST207). Thereafter, 1 is subtracted from the phase initial value number, the phase initial value number is updated with this calculated value (step ST208), and the process proceeds to step ST209. Note that the initial value of the phase initial value number is 1023 which is the sampling number -1.

また、ステップST203で、位相シフト値が0以上ではないと判定した場合は、ステップST214に移行する。ステップST214では、補正位相値レジスタに格納されている補正位相値を読み出す。次に、読み出した補正位相値が−2πより大きいか否かを判定する(ステップST215)。補正位相値が−2πより大きい場合はステップST219に移行し、補正位相値が−2π以下の場合はステップST216に移行する。   On the other hand, if it is determined in step ST203 that the phase shift value is not 0 or more, the process proceeds to step ST214. In step ST214, the correction phase value stored in the correction phase value register is read. Next, it is determined whether or not the read correction phase value is larger than −2π (step ST215). If the correction phase value is greater than −2π, the process proceeds to step ST219, and if the correction phase value is −2π or less, the process proceeds to step ST216.

ステップST219では、位相補正/IDFT演算部183から入力したREADY信号がアクティブを示しているか否かを判定し、アクティブを示した場合のみステップST220に移行し、READY信号がアクティブを示すまでステップST219の過程を繰り返す。READY信号がアクティブになった後、補正位相値を位相補正/IDFT演算部183に通知し(ステップST220)、この補正位相値に位相シフト値を加算し、算出した値で補正位相値レジスタに格納されている内容を更新する(ステップST221)。   In step ST219, it is determined whether or not the READY signal input from the phase correction / IDFT calculation unit 183 indicates active, and only when the signal indicates active, the process proceeds to step ST220. Until the READY signal indicates active, step ST219 Repeat the process. After the READY signal becomes active, the correction phase value is notified to the phase correction / IDFT calculation unit 183 (step ST220), the phase shift value is added to the correction phase value, and the calculated value is stored in the correction phase value register. The updated contents are updated (step ST221).

次に、Nレジスタの値が位相初期値番号未満か否かを判定する(ステップST222)。Nレジスタの値が初期値番号未満の場合は、ステップST223に移行し、Nレジスタの値が初期値番号未満でない場合は、ステップST224に移行する。ステップST223では、Nレジスタの値に1を加算してNレジスタの値をインクリメントし、ステップST214に戻って以降の過程を繰り返す。   Next, it is determined whether or not the value of the N register is less than the phase initial value number (step ST222). When the value of the N register is less than the initial value number, the process proceeds to step ST223, and when the value of the N register is not less than the initial value number, the process proceeds to step ST224. In step ST223, 1 is added to the value of the N register to increment the value of the N register, and the process returns to step ST214 to repeat the subsequent processes.

また、ステップST215で、補正位相値が−2π以下であると判定した場合には、ステップST216に移行する。ステップST216では、ステップST215の判定対象の補正位相値に2πを加算して、この値を補正位相値とする。次に、位相補正制御部185は、アクティブを示すP_INT 信号を位相補正/IDFT補正部183へ出力し、割込み処理を通知する(ステップST217)。その後、位相初期値番号に1を加算し、算出した値で位相初期値番号を更新し(ステップST218)、ステップST219に移行する。   If it is determined in step ST215 that the correction phase value is −2π or less, the process proceeds to step ST216. In step ST216, 2π is added to the correction phase value to be determined in step ST215, and this value is used as the correction phase value. Next, the phase correction control unit 185 outputs a P_INT signal indicating active to the phase correction / IDFT correction unit 183, and notifies an interrupt process (step ST217). Thereafter, 1 is added to the phase initial value number, the phase initial value number is updated with the calculated value (step ST218), and the process proceeds to step ST219.

また、前述のステップST212またはステップST222から、ステップST224に移行したとき、再び補正位相値を読み出す。その後、ステップST224で読み出した補正位相値が−2πより大きいか否かを判定する(ステップST225)。補正位相値が−2πより大きいと判定した場合はステップST226へ移行し、そうではないと判定した場合はステップST216に移行する。   Further, when the process proceeds from step ST212 or step ST222 to step ST224, the correction phase value is read again. Thereafter, it is determined whether or not the correction phase value read in step ST224 is larger than −2π (step ST225). If it is determined that the correction phase value is greater than −2π, the process proceeds to step ST226, and if it is not, the process proceeds to step ST216.

ステップST226では、位相初期値レジスタに補正位相値を書き込み、その後ステップST227に移行する。ステップST227では補正位相値をクリアし、次にNレジスタの値をクリアし(ステップST228)、位相初期値番号に1023を設定し(ステップST229)、ステップST201に戻って以降の過程を繰り返す。   In step ST226, the corrected phase value is written in the phase initial value register, and then the process proceeds to step ST227. In step ST227, the correction phase value is cleared, then the value of the N register is cleared (step ST228), 1023 is set to the phase initial value number (step ST229), the process returns to step ST201 and the subsequent processes are repeated.

次に、位相補正/IDFT演算部について説明する。
図20は、実施の形態2によるデジタル放送受信機の位相補正/IDFT演算部の構成を示すブロック図である。この図は、図18に示した位相補正/IDFT補正部183の構成を示したものである。位相補正/IDFT補正部183は、補正位相正弦・余弦値ルックアップテーブル算出部201と、補正位相正弦・余弦値ルックアップテーブル202と、送出側IDFTルックアップテーブル203と、IDFT演算ルックアップテーブル算出部204と、FFT演算結果蓄積部205と、IDFT演算ルックアップテーブル206と、IDFT演算処理部207とを備えている。
Next, the phase correction / IDFT calculation unit will be described.
FIG. 20 is a block diagram showing the configuration of the phase correction / IDFT calculation unit of the digital broadcast receiver according to the second embodiment. This figure shows the configuration of the phase correction / IDFT correction unit 183 shown in FIG. The phase correction / IDFT correction unit 183 calculates a correction phase sine / cosine value lookup table calculation unit 201, a correction phase sine / cosine value lookup table 202, a transmission-side IDFT lookup table 203, and an IDFT calculation lookup table calculation. Section 204, FFT calculation result storage section 205, IDFT calculation lookup table 206, and IDFT calculation processing section 207.

補正位相正弦・余弦値ルックアップテーブル算出部201は、位相補正制御部185から通知されてくる、補正位相値を示す補正位相データθに基づいて補正位相正弦・余弦値を算出し、算出した値を補正位相正弦・余弦値ルックアップテーブル202に書き込む。図21は、実施の形態2によるデジタル放送受信機の補正位相正弦・余弦値ルックアップテーブル算出部により作成される補正位相正弦・余弦値ルックアップテーブルを示す説明図である。この図は、補正位相正弦・余弦値ルックアップテーブルの内、正弦値について作成されたテーブルのイメージを例示したものである。この補正位相正弦・余弦値ルックアップテーブル202は、補正前のPCMデータのサンプル数1024毎に更新され、通常は1024×1024の各値を有するテーブルとなる。ただし、位相補正制御部185からアクティブを示すP_INT 信号が出力されたとき、補正位相値がプラスの場合は1024×1023の各値を有するテーブルが作成され、補正位相値がマイナスの場合は1024×1025の各値を有するテーブルが作成される。   The corrected phase sine / cosine value look-up table calculation unit 201 calculates the corrected phase sine / cosine value based on the corrected phase data θ that is notified from the phase correction control unit 185 and indicates the corrected phase value, and the calculated value Is written into the corrected phase sine / cosine value lookup table 202. FIG. 21 is an explanatory diagram illustrating a corrected phase sine / cosine value lookup table created by the corrected phase sine / cosine value lookup table calculation unit of the digital broadcast receiver according to the second embodiment. This figure exemplifies an image of a table created for the sine value in the correction phase sine / cosine value lookup table. This correction phase sine / cosine value lookup table 202 is updated for every 1024 samples of PCM data before correction, and is usually a table having values of 1024 × 1024. However, when the P_INT signal indicating active is output from the phase correction control unit 185, a table having each value of 1024 × 1023 is created when the correction phase value is positive, and 1024 × when the correction phase value is negative. A table having each value of 1025 is created.

補正位相正弦・余弦値ルックアップテーブル算出部201は、この補正位相正弦・余弦値ルックアップテーブル202を作成する度に、IDFT演算ルックアップテーブル算出部204にPhase_OK信号を出力する。IDFT演算ルックアップテーブル算出部204は、Phase_OK信号を入力すると補正位相正弦・余弦値ルックアップテーブル202と送出側IDFTルックアップテーブル203とを用いてIDFT演算ルックアップテーブル206を作成する。このとき用いられる送出側IDFTルックアップテーブル203は、補正位相値=0のときのIDFT演算に用いられるルックアップテーブルで、このテーブル内に記載された各値は固定値である。   The correction phase sine / cosine value lookup table calculation unit 201 outputs a Phase_OK signal to the IDFT calculation lookup table calculation unit 204 every time the correction phase sine / cosine value lookup table 202 is created. When the Phase_OK signal is input, the IDFT calculation lookup table calculation unit 204 creates an IDFT calculation lookup table 206 using the corrected phase sine / cosine value lookup table 202 and the transmission side IDFT lookup table 203. The transmission side IDFT lookup table 203 used at this time is a lookup table used for the IDFT calculation when the correction phase value = 0, and each value described in this table is a fixed value.

IDFT演算ルックアップテーブル算出部204は、補正位相正弦・余弦値ルックアップテーブル算出部201からA_INT信号が入力された場合はサンプル数が1024×1025のIDFT演算ルックアップテーブル206を作成し、補正位相正弦・余弦値ルックアップテーブル算出部201からM_INT信号が入力された場合はサンプル数が1024×1023のIDFT演算ルックアップテーブル206を作成する。   When the A_INT signal is input from the corrected phase sine / cosine value lookup table calculation unit 201, the IDFT calculation lookup table calculation unit 204 creates an IDFT calculation lookup table 206 having a number of samples of 1024 × 1025 and corrects the correction phase. When the M_INT signal is input from the sine / cosine value lookup table calculation unit 201, the IDFT calculation lookup table 206 having a number of samples of 1024 × 1023 is created.

また、IDFT演算ルックアップテーブル算出部204には、補正位相正弦・余弦値ルックアップテーブル算出部201からA_INT 信号、あるいはM_INT 信号が入力されるときには、当該補正位相正弦・余弦値ルックアップテーブル算出部201からデータSEND_IDFT_ADR が入力される。IDFT演算ルックアップテーブル算出部204は、このデータSEND_IDFT_ADR に基づいて送出側IDFTルックアップテーブル203の参照順序を変更してIDFT演算ルックアップテーブル206を作成する。   Further, when the A_INT signal or the M_INT signal is input from the correction phase sine / cosine value lookup table calculation unit 201 to the IDFT calculation lookup table calculation unit 204, the correction phase sine / cosine value lookup table calculation unit 204 Data SEND_IDFT_ADR is input from 201. The IDFT calculation lookup table calculation unit 204 changes the reference order of the transmission side IDFT lookup table 203 based on the data SEND_IDFT_ADR and creates the IDFT calculation lookup table 206.

更に、IDFT演算ルックアップテーブル算出部204は、IDFT演算ルックアップテーブル206の完成後、IDFT演算処理部207にIDFT_OK 信号を出力する。IDFT_OK 信号を入力したIDFT演算処理部207は、FFT演算結果蓄積部205からFFT演算結果のデータfft_resultを取得し、このデータfft_resultとIDFT演算ルックアップテーブル206に記述された内容とを用いてIDFT演算を行い、1024サンプルの演算結果を求めてデータ蓄積部184へ出力する。また、IDFT演算ルックアップテーブル算出部204は、サンプル数1023のIDFT演算ルックアップテーブル206を作成した場合にはI_INT0信号をIDFT演算処理部207へ出力し、サンプル数1025のIDFTルックアップテーブル206を作成した場合にはI_INT1信号をIDFT演算処理部207へ出力する。なお、サンプル数1024のIDFTルックアップテーブル206を作成した場合はI_INT0信号、I_INT1信号のいずれも出力しない。   Further, the IDFT calculation lookup table calculation unit 204 outputs an IDFT_OK signal to the IDFT calculation processing unit 207 after the IDFT calculation lookup table 206 is completed. The IDFT calculation processing unit 207 that has received the IDFT_OK signal acquires the FFT calculation result data fft_result from the FFT calculation result storage unit 205, and uses this data fft_result and the contents described in the IDFT calculation lookup table 206 to perform the IDFT calculation. And the calculation result of 1024 samples is obtained and output to the data storage unit 184. Further, when the IDFT calculation lookup table calculation unit 204 creates the IDFT calculation lookup table 206 with the number of samples 1023, the IDFT calculation lookup table 206 outputs the I_INT0 signal to the IDFT calculation processing unit 207, and the IDFT calculation lookup table 206 with the number of samples 1025 is output. If created, the I_INT1 signal is output to the IDFT arithmetic processing unit 207. When the IDFT lookup table 206 having 1024 samples is created, neither the I_INT0 signal nor the I_INT1 signal is output.

次に補正位相正弦・余弦値ルックアップテーブル算出部201の動作を詳細に説明する。
図22は、実施の形態2によるデジタル放送受信機の補正位相正弦・余弦値ルックアップテーブル算出部の動作を示すフローチャートである。図22−1及び図22−2に示したフローチャートは、図20に示した補正位相正弦・余弦値ルックアップテーブル算出部201の動作を示すものである。補正位相正弦・余弦値ルックアップテーブル算出部201は、位相補正制御部185から補正位相値を示す補正位相データθを入力し、位相値αとして補正位相データθを設定する(ステップST301)。次に、設定する補正位相正弦・余弦値ルックアップテーブルのアドレス、即ちデータLUT_ADR の初期値をLUTアドレスに設定する(ステップST302)。ここで、LUT アドレスの初期値とは、データLUT(0,0)の値を書き込むアドレスを指し、データLUT(M,N)のLUTアドレスは、LUTアドレス=LUT アドレス初期値+1024×(M-1)+N-1となる。
Next, the operation of the correction phase sine / cosine value lookup table calculation unit 201 will be described in detail.
FIG. 22 is a flowchart illustrating the operation of the correction phase sine / cosine value lookup table calculation unit of the digital broadcast receiver according to the second embodiment. The flowcharts shown in FIGS. 22-1 and 22-2 show the operation of the correction phase sine / cosine value lookup table calculation unit 201 shown in FIG. The correction phase sine / cosine value lookup table calculation unit 201 receives the correction phase data θ indicating the correction phase value from the phase correction control unit 185, and sets the correction phase data θ as the phase value α (step ST301). Next, the address of the correction phase sine / cosine value lookup table to be set, that is, the initial value of the data LUT_ADR is set as the LUT address (step ST302). Here, the initial value of the LUT address refers to the address to which the value of the data LUT (0,0) is written, and the LUT address of the data LUT (M, N) is LUT address = LUT address initial value + 1024 × (M− 1) + N-1.

次に、位相補正制御部185からアクティブを示すP_INT 信号が入力されているか否かを判定する(ステップST303)。アクティブを示すP_INT 信号が入力されている場合は、ステップST304に移行し、入力されていない場合はステップST308に移行する。ステップST304では、現在のLUT アドレスをデータSEND_IDFT_ADR としてSEND_IDFT_ADR レジスタに格納する。次に、補正位相データθの示す位相値が正か否かを判定する(ステップST305)。補正位相データθの示す位相値が正である場合はステップST307に移行し、補正位相データθの位相値が正ではない場合はステップST306に移行する。ステップST306ではA_INT 信号をIDFT演算ルックアップテーブル算出部204に通知し、そのとき、合わせてSEND_IDFT_ADR レジスタに格納されているデータSEND_IDFT_ADR 、即ちLUT アドレスを通知してステップST308に移行する。   Next, it is determined whether or not a P_INT signal indicating active is input from the phase correction control unit 185 (step ST303). When the P_INT signal indicating active is input, the process proceeds to step ST304, and when not input, the process proceeds to step ST308. In step ST304, the current LUT address is stored in the SEND_IDFT_ADR register as data SEND_IDFT_ADR. Next, it is determined whether or not the phase value indicated by the correction phase data θ is positive (step ST305). When the phase value indicated by the correction phase data θ is positive, the process proceeds to step ST307, and when the phase value of the correction phase data θ is not positive, the process proceeds to step ST306. In step ST306, the A_INT signal is notified to the IDFT calculation lookup table calculation unit 204. At this time, the data SEND_IDFT_ADR stored in the SEND_IDFT_ADR register, that is, the LUT address is notified, and the process proceeds to step ST308.

ステップST305において、補正位相データθが正の値ではないと判定したときは、M_INT 信号をIDFT演算ルックアップテーブル算出部204へ出力し、そのとき、合わせてSEND_IDFT_ADR レジスタに格納されているLUT アドレスを通知し(ステップST307)、その後ステップST308に移行する。次に、位相値αから正弦sin α、余弦cos αの各値を算出し(ステップST308)、補正位相正弦・余弦値ルックアップテーブル202に、データLUT(M,N)として正弦sin α、余弦cos αの各値を書き込む(ステップST309)。次に、位相値αに補正位相データθの値を加算し、この値で位相値αを更新する(ステップST310)。次に、Mレジスタの値が1023未満か否かを判定する(ステップST311)。Mレジスタの値が1023未満の場合はステップST316に移行し、Mレジスタの値が1023未満ではない場合はステップST312に移行する。   In step ST305, when it is determined that the correction phase data θ is not a positive value, the M_INT signal is output to the IDFT calculation lookup table calculation unit 204, and at that time, the LUT address stored in the SEND_IDFT_ADR register is also used. Notification is made (step ST307), and then the process proceeds to step ST308. Next, each value of sine sin α and cosine cos α is calculated from phase value α (step ST308), and sine sin α, cosine as data LUT (M, N) is stored in correction phase sine / cosine value lookup table 202. Each value of cos α is written (step ST309). Next, the value of the correction phase data θ is added to the phase value α, and the phase value α is updated with this value (step ST310). Next, it is determined whether or not the value of the M register is less than 1023 (step ST311). When the value of the M register is less than 1023, the process proceeds to step ST316, and when the value of the M register is not less than 1023, the process proceeds to step ST312.

ステップST316では、Mレジスタの値に1を加算し、この値でMレジスタの値を更新し、その後ステップST302に戻り、以降の過程を繰り返す。ステップST312では、Mレジスタの値をクリアする。次に、アクティブを示すREADY 信号をセットし(ステップST313)、当該READY 信号を位相補正制御部185へ出力する。なお、READY 信号は、初期状態でアクティブを示すようにセットされており、位相値αに補間位相値を示す補正位相データθがセットされたときに自動解除される。   In step ST316, 1 is added to the value of the M register, the value of the M register is updated with this value, and then the process returns to step ST302 to repeat the subsequent processes. In step ST312, the value of the M register is cleared. Next, a READY signal indicating active is set (step ST313), and the READY signal is output to the phase correction control unit 185. The READY signal is set to indicate active in the initial state, and is automatically canceled when the correction phase data θ indicating the interpolation phase value is set to the phase value α.

次に、Nレジスタの値が1025か否かを判定する(ステップST314)。Nレジスタの値が1025である場合はステップST317に移行し、Nレジスタの値が1025ではない場合はステップST315に移行する。ステップST315では、Nレジスタの値に1を加算し、この値をNレジスタの値として更新し、ステップST301に戻って以降の過程を繰り返す。また、ステップST317では、Phase_OK信号をIDFT演算ルックアップテーブル算出部204に出力し、ステップST318に移行する。次に、Nレジスタの値をクリアし(ステップST318)、ステップST301に戻って以降の過程を繰り返す。   Next, it is determined whether or not the value of the N register is 1025 (step ST314). When the value of the N register is 1025, the process proceeds to step ST317, and when the value of the N register is not 1025, the process proceeds to step ST315. In step ST315, 1 is added to the value of the N register, this value is updated as the value of the N register, the process returns to step ST301 and the subsequent steps are repeated. In Step ST317, the Phase_OK signal is output to the IDFT calculation lookup table calculation unit 204, and the process proceeds to Step ST318. Next, the value of the N register is cleared (step ST318), the process returns to step ST301 and the subsequent processes are repeated.

次にIDFT演算ルックアップテーブル算出部204の動作を詳細に説明する。
図23は、実施の形態2によるデジタル放送受信機のIDFT演算ルックアップテーブル算出部の動作を示すフローチャートである。図23−1、図23−2、及び図23−3のフローチャートに示したものは、図20に示したIDFT演算ルックアップテーブル算出部204の動作である。IDFT演算ルックアップテーブル算出部204は、補正位相正弦・余弦値ルックアップテーブル算出部201から出力されるPhase_OK信号が入力された場合はステップST402に移行する。Phase_OK信号が入力されない場合はステップST401を繰り返し、Phase_OK信号が入力されるまで待機する。
Next, the operation of the IDFT calculation lookup table calculation unit 204 will be described in detail.
FIG. 23 is a flowchart showing the operation of the IDFT calculation lookup table calculation unit of the digital broadcast receiver according to the second embodiment. What is shown in the flowcharts of FIGS. 23-1, 23-2, and 23-3 is the operation of the IDFT calculation lookup table calculation unit 204 shown in FIG. If the Phase_OK signal output from the corrected phase sine / cosine value lookup table calculation unit 201 is input, the IDFT calculation lookup table calculation unit 204 proceeds to step ST402. If the Phase_OK signal is not input, step ST401 is repeated and the process waits until the Phase_OK signal is input.

ステップST402では、補正位相正弦・余弦値ルックアップテーブル算出部201からM_INT信号が入力されたか否かを判定する。M_INT 信号が入力された場合はステップST403に移行し、M_INT 信号が入力されていない場合はステップST422に移行する。ステップST422では、補正位相正弦・余弦値ルックアップテーブル算出部201からA_INT 信号が入力されたか否かを判定する。A_INT 信号が入力された場合にはステップST423に移行し、A_INT 信号が入力されていない場合にはステップST442に移行する。   In step ST402, it is determined whether or not the M_INT signal is input from the corrected phase sine / cosine value lookup table calculation unit 201. When the M_INT signal is input, the process proceeds to step ST403, and when the M_INT signal is not input, the process proceeds to step ST422. In step ST422, it is determined whether or not the A_INT signal is input from the corrected phase sine / cosine value lookup table calculation unit 201. When the A_INT signal is input, the process proceeds to step ST423, and when the A_INT signal is not input, the process proceeds to step ST442.

ステップST403では、I_INT0信号をIDFT演算処理部207へ出力する。次に、補正位相正弦・余弦値ルックアップテーブル算出部201から通知されたデータSEND_IDFT_ADR の示す値が、Nレジスタの値以上か否かを判定する(ステップST404)。データSEND_IDFT_ADR の示す値が、Nレジスタの値未満のときには、ステップST405に移行し、Nレジスタの値がデータSEND_IDFT_ADR の値以上の場合にはステップST413に移行する。ステップST405では、補正位相正弦・余弦値ルックアップテーブル202からデータLUT(M,N)を読み出す。次に、送出側IDFTルックアップテーブル203から送出側IDFTデータ(M,N)を読み出す。次に、各テーブルから読み出したデータ値よりIDFT演算ルックアップテーブル206に記述する値を算出する(ステップST407)。次に、IDFT演算ルックアップテーブル206に算出値をデータ(M,N)として書き込む(ステップST408)。その後、Mレジスタの値が1023であるか否かを判定する(ステップST410)。Mレジスタの値が1023である場合はステップST411に移行し、Mレジスタの値が1023ではない場合は、ステップST409に移行する。ステップST409では、Mレジスタの値に1を加算し、この値をMレジスタの値として更新し、ステップST404に戻って以降の過程を繰り返す。また、ステップST411では、Mレジスタの値をクリアする。次に、Nレジスタの値に1を加算し、この値をNレジスタの値としてインクリメントし、Nレジスタの値を更新し(ステップST412)、ステップST404に戻って以降の過程を繰り返す。   In step ST403, an I_INT0 signal is output to IDFT arithmetic processing section 207. Next, it is determined whether or not the value indicated by the data SEND_IDFT_ADR notified from the corrected phase sine / cosine value lookup table calculation unit 201 is equal to or greater than the value of the N register (step ST404). When the value indicated by the data SEND_IDFT_ADR is less than the value of the N register, the process proceeds to step ST405, and when the value of the N register is equal to or greater than the value of the data SEND_IDFT_ADR, the process proceeds to step ST413. In step ST405, the data LUT (M, N) is read from the corrected phase sine / cosine value lookup table 202. Next, the transmission side IDFT data (M, N) is read from the transmission side IDFT lookup table 203. Next, a value described in the IDFT calculation lookup table 206 is calculated from the data value read from each table (step ST407). Next, the calculated value is written as data (M, N) in the IDFT calculation lookup table 206 (step ST408). Thereafter, it is determined whether the value of the M register is 1023 (step ST410). When the value of the M register is 1023, the process proceeds to step ST411, and when the value of the M register is not 1023, the process proceeds to step ST409. In step ST409, 1 is added to the value of the M register, this value is updated as the value of the M register, the process returns to step ST404 and the subsequent processes are repeated. In step ST411, the value of the M register is cleared. Next, 1 is added to the value of the N register, this value is incremented as the value of the N register, the value of the N register is updated (step ST412), the process returns to step ST404 and the subsequent processes are repeated.

また、ステップST404において、Nレジスタの値がデータSEND_IDFT_ADR の値以上であると判定された場合には、補正位相値が2πを超えているとみなし、補正位相正弦・余弦値ルックアップテーブル202からデータLUT(M,N)を読み出し(ステップST413)、この処理においてサンプリング数を一つ間引くため送出側IDFTルックアップテーブル203から送出側IDFTデータ(M,N+1)を読み出す(ステップST414)。その後、ステップST415では、IDFT演算ルックアップテーブル206に記述する値を算出し、ステップST416でIDFT演算ルックアップテーブル206へデータ(M,N)として算出値を書き込む。その後、Mレジスタの値が1023であるか否かを判定し(ステップST417)、Mレジスタの値が1023である場合はステップST419に移行し、Mレジスタの値が1023ではない場合は、ステップST418に移行する。   If it is determined in step ST404 that the value of the N register is equal to or greater than the value of the data SEND_IDFT_ADR, the correction phase value is considered to exceed 2π, and the data is obtained from the correction phase sine / cosine value lookup table 202. LUT (M, N) is read (step ST413), and the sending side IDFT data (M, N + 1) is read from the sending side IDFT lookup table 203 to thin out one sampling number in this process (step ST414). Thereafter, in step ST415, a value described in the IDFT calculation lookup table 206 is calculated, and in step ST416, the calculated value is written as data (M, N) in the IDFT calculation lookup table 206. Thereafter, it is determined whether or not the value of the M register is 1023 (step ST417). If the value of the M register is 1023, the process proceeds to step ST419. If the value of the M register is not 1023, the process proceeds to step ST418. Migrate to

ステップST418では、Mレジスタの値に1を加算し、Mレジスタの値をインクリメントして更新し、ステップST404に戻って以降の過程を繰り返す。また、ステップST419では、Mレジスタの値をクリアする。次に、Nレジスタの値が1022であるか否かを判定する(ステップST420)。Nレジスタの値が1022である場合はステップST451に移行し、Nレジスタの値が1022ではない場合にはステップST421に移行する。ステップST421ではNレジスタの値に1を加算してNレジスタの値をインクリメントして更新し、ステップST404へ戻って以降の過程を繰り返す。   In step ST418, 1 is added to the value of the M register, the value of the M register is incremented and updated, and the process returns to step ST404 to repeat the subsequent processes. In step ST419, the value of the M register is cleared. Next, it is determined whether or not the value of the N register is 1022 (step ST420). When the value of the N register is 1022, the process proceeds to step ST451, and when the value of the N register is not 1022, the process proceeds to step ST421. In step ST421, 1 is added to the value of the N register to increment and update the value of the N register, and the process returns to step ST404 to repeat the subsequent processes.

前述のように、ステップST422において補正位相正弦・余弦値ルックアップテーブル算出部201からA_INT 信号が入力されたと判定した場合には、I_INT1 信号をIDFT演算処理部207に出力し(ステップST423)、その後、前述のステップST404と同様に、補正位相正弦・余弦値ルックアップテーブル算出部201から通知されたデータSEND_IDFT_ADR の示す値が、Nレジスタの値以上か否かを判定する(ステップST424)。データSEND_IDFT_ADR の示す値が、Nレジスタの値未満のときには、ステップST425に移行し、Nレジスタの値がデータSEND_IDFT_ADRの値以上の場合にはステップST433に移行する。図23−2に示したステップST425〜ステップST432の過程は、図23−1に示したステップST405〜ステップST412の過程と同様に処理され、ステップST424に戻る。ここでは、ステップST425〜ステップST432の過程において行われる処理動作の説明を省略する。   As described above, when it is determined in step ST422 that the A_INT signal is input from the corrected phase sine / cosine value lookup table calculation unit 201, the I_INT1 signal is output to the IDFT arithmetic processing unit 207 (step ST423), and then Similarly to step ST404 described above, it is determined whether or not the value indicated by the data SEND_IDFT_ADR notified from the corrected phase sine / cosine value lookup table calculation unit 201 is equal to or greater than the value of the N register (step ST424). When the value indicated by the data SEND_IDFT_ADR is less than the value of the N register, the process proceeds to step ST425, and when the value of the N register is equal to or greater than the value of the data SEND_IDFT_ADR, the process proceeds to step ST433. The process of step ST425 to step ST432 shown in FIG. 23-2 is processed in the same manner as the process of step ST405 to step ST412 shown in FIG. 23-1, and the process returns to step ST424. Here, description of the processing operation performed in the process of step ST425 to step ST432 is omitted.

ステップST423において、Nレジスタの値がデータSEND_IDFT_ADR の値以上であると判定した場合は、補正位相値が−2π以下になっているとみなし、補正位相正弦・余弦値ルックアップテーブル202からデータLUT(M,N)を読み出し(ステップST433)、この処理においてサンプリング数を一つ補間するため送出側IDFTルックアップテーブル203から送出側IDFTデータ(M,N−1)を読み出す(ステップST434)。この後、IDFT演算ルックアップテーブル206に記述する値を算出し(ステップST435)、この算出した値をIDFT演算ルックアップテーブル206へデータ(M,N)として書き込む(ステップST436)。その後、Mレジスタの値が1023であるか否かを判定し(ステップST437)、Mレジスタの値が1023である場合はステップST439に移行し、Mレジスタの値が1023ではない場合はステップST438に移行する。   If it is determined in step ST423 that the value of the N register is equal to or greater than the value of the data SEND_IDFT_ADR, the correction phase value is considered to be −2π or less, and the data LUT ( M, N) is read out (step ST433), and the sending side IDFT data (M, N−1) is read from the sending side IDFT lookup table 203 to interpolate one sampling number in this process (step ST434). Thereafter, a value described in the IDFT calculation lookup table 206 is calculated (step ST435), and the calculated value is written as data (M, N) in the IDFT calculation lookup table 206 (step ST436). Thereafter, it is determined whether or not the value of the M register is 1023 (step ST437). If the value of the M register is 1023, the process proceeds to step ST439. If the value of the M register is not 1023, the process proceeds to step ST438. Transition.

ステップST438では、Mレジスタの値に1を加算し、Mレジスタの値をインクリメントして更新し、ステップST424に戻って以降の過程を繰り返す。また、ステップST439では、Mレジスタの値をクリアする。次に、Nレジスタの値が1024であるか否かを判定する(ステップST440)。Nレジスタの値が1024である場合はステップST451に移行し、Nレジスタの値が1024ではない場合にはステップST441に移行する。ステップST441ではNレジスタの値に1を加算してNレジスタの値をインクリメントして更新し、ステップST424へ戻って以降の過程を繰り返す。   In step ST438, 1 is added to the value of the M register, the value of the M register is incremented and updated, and the process returns to step ST424 to repeat the subsequent processes. In step ST439, the value of the M register is cleared. Next, it is determined whether or not the value of the N register is 1024 (step ST440). When the value of the N register is 1024, the process proceeds to step ST451, and when the value of the N register is not 1024, the process proceeds to step ST441. In step ST441, 1 is added to the value of the N register to increment and update the value of the N register, and the process returns to step ST424 to repeat the subsequent processes.

また、ステップST422において、A_INT信号を入力していないと判定した場合は、補正位相正弦・余弦値ルックアップテーブル202からデータLUT(M,N)を読み出す(ステップST442)。次に、送出側IDFTルックアップテーブル203から送出側IDFTデータ(M,N)を読み出す(ステップST443)。次に、前述のステップST407と同様にIDFT演算ルックアップテーブルに記述する値を算出する(ステップST444)。次に、IDFT演算ルックアップテーブル206に算出した値をデータ(M,N)として書き込む(ステップST445)。その後、Mレジスタの値が1023であるか否かを判定する(ステップST446)。Mレジスタの値が1023である場合はステップST448に移行し、Mレジスタの値が1023ではない場合は、ステップST447に移行する。ステップST447では、Mレジスタの値に1を加算し、この値をMレジスタの値として更新し、ステップST442に戻って以降の過程を繰り返す。また、ステップST448では、Mレジスタの値をクリアする。   If it is determined in step ST422 that the A_INT signal is not input, the data LUT (M, N) is read from the correction phase sine / cosine value lookup table 202 (step ST442). Next, the transmission side IDFT data (M, N) is read from the transmission side IDFT lookup table 203 (step ST443). Next, the value described in the IDFT calculation lookup table is calculated in the same manner as in step ST407 described above (step ST444). Next, the calculated value is written in the IDFT calculation lookup table 206 as data (M, N) (step ST445). Thereafter, it is determined whether or not the value of the M register is 1023 (step ST446). When the value of the M register is 1023, the process proceeds to step ST448, and when the value of the M register is not 1023, the process proceeds to step ST447. In step ST447, 1 is added to the value of the M register, this value is updated as the value of the M register, the process returns to step ST442 and the subsequent processes are repeated. In step ST448, the value of the M register is cleared.

次に、Nレジスタの値が1023であるか否かを判定する(ステップST449)。Nレジスタの値が1023ではないと判定した場合は、Nレジスタの値に1を加算し、この値をNレジスタの値としてインクリメントし、Nレジスタの値を更新して(ステップST450)、ステップST442に戻って以降の過程を繰り返す。また、Nレジスタの値が1023であると判定した場合は、Nレジスタの値をクリアし(ステップST451)、IDFT_OK 信号をIDFT演算処理部207へ出力する。この後、ステップST401へ戻って以降の過程を繰り返す。   Next, it is determined whether or not the value of the N register is 1023 (step ST449). If it is determined that the value of the N register is not 1023, 1 is added to the value of the N register, this value is incremented as the value of the N register, the value of the N register is updated (step ST450), and step ST442 Return to and repeat the subsequent steps. If it is determined that the value of the N register is 1023, the value of the N register is cleared (step ST451), and the IDFT_OK signal is output to the IDFT arithmetic processing unit 207. Then, it returns to step ST401 and repeats the subsequent processes.

前述のステップST452において、IDFT演算ルックアップテーブル204からIDFT_OK 信号が出力されると、IDFT演算処理部207は、FFT演算結果蓄積部205に蓄積されている1フレーム分のデータfft_resultについてIDFTルックアップテーブル206を参照してIDFT演算を開始し、I_INT0信号を入力した場合には1023サンプル、I_INT1信号を入力した場合には11025サンプル、どちらの信号も入力しない場合には1024サンプルの補正されたPCMデータを算出し、これを図18に示したデータ蓄積部184へ出力する。この後、データ蓄積部184に蓄積されたサンプリングデータは、前述のようにオーディオ補正データadata’としてPCMデータ補正部9から出力される。以降の動作は、実施の形態1で説明したデジタル放送受信機と同様である。   In step ST452, when the IDFT_OK signal is output from the IDFT calculation lookup table 204, the IDFT calculation processing unit 207 causes the IDFT lookup table for one frame of data fft_result stored in the FFT calculation result storage unit 205. Referring to 206, the IDFT operation is started, and the corrected PCM data is 1023 samples when the I_INT0 signal is input, 11025 samples when the I_INT1 signal is input, and 1024 samples when neither signal is input. Is output to the data storage unit 184 shown in FIG. Thereafter, the sampling data stored in the data storage unit 184 is output from the PCM data correction unit 9 as the audio correction data adata ′ as described above. The subsequent operation is the same as that of the digital broadcast receiver described in the first embodiment.

以上のように、実施の形態2によれば、PCMデータ補正部9を、PCMデータのFFT演算を行うFFT演算部182と、周波数誤差データδfに基づいて補正位相データθを求め、位相補正/IDFT演算部183の位相補正動作を制御する位相補正制御部185と、補正位相データθに基づいて補正するサンプル数を求め、当該サンプル数のPCM補正データを求めるようにIDFT演算を行う位相補正/IDFT演算部183とを備えて構成したので、送出系システム側のサンプリングデータ(PCMデータ)をあたかも受信機側のサンプリングクロックでサンプリングしたようなサンプリングデータに補正することができ、オーディオバッファのオーバーフローあるいはアンダーフローを防ぎ、オーディオデータを再生したときの異音の発生を防ぐことができるという効果がある。   As described above, according to the second embodiment, the PCM data correction unit 9 obtains the correction phase data θ based on the FFT calculation unit 182 that performs the FFT calculation of the PCM data and the frequency error data δf, and performs phase correction / Phase correction control unit 185 that controls the phase correction operation of the IDFT calculation unit 183, the number of samples to be corrected based on the correction phase data θ, and phase correction / Since it includes the IDFT calculation unit 183, the sampling data (PCM data) on the transmission system side can be corrected to sampling data as if it were sampled with the sampling clock on the receiver side, and an overflow of the audio buffer or Underflow is prevented, and audio data is not There is an effect that it is possible to prevent the occurrence.

この発明の実施の形態1によるデジタル放送受信機の構成を示すブロック図である。It is a block diagram which shows the structure of the digital broadcast receiver by Embodiment 1 of this invention. 実施の形態1によるデジタル放送受信機のトランスポートデコーダの構成を示すブロック図である。3 is a block diagram showing a configuration of a transport decoder of the digital broadcast receiver according to Embodiment 1. FIG. 実施の形態1によるデジタル放送受信機のPIDフィルタ部の構成を示すブロック図である。3 is a block diagram illustrating a configuration of a PID filter unit of the digital broadcast receiver according to Embodiment 1. FIG. TSヘッダ及びPESヘッダの構成を示す説明図である。It is explanatory drawing which shows the structure of TS header and PES header. PCRの構成を示す説明図である。It is explanatory drawing which shows the structure of PCR. 実施の形態1によるデジタル放送受信機のトランスポートデコーダから出力されるPCRのタイミングチャートである。4 is a timing chart of PCR output from the transport decoder of the digital broadcast receiver according to the first embodiment. 実施の形態1によるデジタル放送受信機のPCR比較部の構成を示すブロック図である。3 is a block diagram illustrating a configuration of a PCR comparison unit of the digital broadcast receiver according to Embodiment 1. FIG. 実施の形態1によるデジタル放送受信機のPCR比較部の動作を示すタイミングチャートである。3 is a timing chart illustrating an operation of a PCR comparison unit of the digital broadcast receiver according to the first embodiment. 実施の形態1によるデジタル放送受信機のレジスタに格納されるデータのビットアサインを示す説明図である。6 is an explanatory diagram showing bit assignment of data stored in a register of the digital broadcast receiver according to Embodiment 1. FIG. 実施の形態1によるデジタル放送受信機のカウンタの構成を示すブロック図である。3 is a block diagram illustrating a configuration of a counter of the digital broadcast receiver according to Embodiment 1. FIG. 実施の形態1によるデジタル放送受信機のカウンタ誤差検出部の構成を示すブロック図である。3 is a block diagram illustrating a configuration of a counter error detection unit of the digital broadcast receiver according to Embodiment 1. FIG. 実施の形態1によるデジタル放送受信機のビデオ/オーディオ出力タイミング補正部の構成を示すブロック図である。3 is a block diagram illustrating a configuration of a video / audio output timing correction unit of the digital broadcast receiver according to Embodiment 1. FIG. 実施の形態1によるデジタル放送受信機のビデオ/オーディオ出力タイミング補正部の動作を示すタイミングチャートである。4 is a timing chart showing the operation of the video / audio output timing correction unit of the digital broadcast receiver according to the first embodiment. 実施の形態1によるデジタル放送受信機のビデオ/オーディオ出力タイミング補正部の動作を示すタイミングチャートである。4 is a timing chart showing the operation of the video / audio output timing correction unit of the digital broadcast receiver according to the first embodiment. 実施の形態1によるデジタル放送受信機のPCMデータ補正部の構成を示すブロック図である。3 is a block diagram illustrating a configuration of a PCM data correction unit of the digital broadcast receiver according to Embodiment 1. FIG. 実施の形態1によるデジタル放送受信機のアップサンプリング部により処理されたPCMデータを示す説明図である。6 is an explanatory diagram showing PCM data processed by an upsampling unit of the digital broadcast receiver according to Embodiment 1. FIG. 実施の形態1によるデジタル放送受信機のアップサンプリング部により処理されたPCMデータを示す説明図である。6 is an explanatory diagram showing PCM data processed by an upsampling unit of the digital broadcast receiver according to Embodiment 1. FIG. 実施の形態1によるデジタル放送受信機のローパスフィルタにより処理されたPCMデータを示す説明図である。6 is an explanatory diagram showing PCM data processed by a low-pass filter of the digital broadcast receiver according to Embodiment 1. FIG. 実施の形態1によるデジタル放送受信機のローパスフィルタにより処理されたPCMデータを示す説明図である。6 is an explanatory diagram showing PCM data processed by a low-pass filter of the digital broadcast receiver according to Embodiment 1. FIG. 実施の形態1によるデジタル放送受信機の補間データテンポラリバッファ読み出し制御部の動作を示すフローチャートである。6 is a flowchart illustrating an operation of an interpolation data temporary buffer read control unit of the digital broadcast receiver according to the first embodiment. 実施の形態1によるデジタル放送受信機の補間データテンポラリバッファ読み出し制御部の動作を示すフローチャートである。6 is a flowchart illustrating an operation of an interpolation data temporary buffer read control unit of the digital broadcast receiver according to the first embodiment. この発明の実施の形態2によるデジタル放送受信機のPCMデータ補正部の構成を示すブロック図である。It is a block diagram which shows the structure of the PCM data correction | amendment part of the digital broadcast receiver by Embodiment 2 of this invention. 実施の形態2によるデジタル放送受信機の位相補正制御部の動作を示すフローチャートである。6 is a flowchart illustrating an operation of a phase correction control unit of the digital broadcast receiver according to the second embodiment. 実施の形態2によるデジタル放送受信機の位相補正制御部の動作を示すフローチャートである。6 is a flowchart illustrating an operation of a phase correction control unit of the digital broadcast receiver according to the second embodiment. 実施の形態2によるデジタル放送受信機の位相補正/IDFT演算部の構成を示すブロック図である。6 is a block diagram illustrating a configuration of a phase correction / IDFT calculation unit of a digital broadcast receiver according to Embodiment 2. FIG. 実施の形態2によるデジタル放送受信機の補正位相正弦・余弦値ルックアップテーブル算出部により作成される補正位相正弦・余弦値ルックアップテーブルを示す説明図である。10 is an explanatory diagram showing a corrected phase sine / cosine value lookup table created by a corrected phase sine / cosine value lookup table calculation unit of the digital broadcast receiver according to Embodiment 2. FIG. 実施の形態2によるデジタル放送受信機の補正位相正弦・余弦値ルックアップテーブル算出部の動作を示すフローチャートである。10 is a flowchart illustrating an operation of a correction phase sine / cosine value lookup table calculation unit of the digital broadcast receiver according to the second embodiment. 実施の形態2によるデジタル放送受信機の補正位相正弦・余弦値ルックアップテーブル算出部の動作を示すフローチャートである。10 is a flowchart illustrating an operation of a correction phase sine / cosine value lookup table calculation unit of the digital broadcast receiver according to the second embodiment. 実施の形態2によるデジタル放送受信機のIDFT演算ルックアップテーブル算出部の動作を示すフローチャートである。6 is a flowchart illustrating an operation of an IDFT calculation lookup table calculation unit of the digital broadcast receiver according to the second embodiment. 実施の形態2によるデジタル放送受信機のIDFT演算ルックアップテーブル算出部の動作を示すフローチャートである。6 is a flowchart illustrating an operation of an IDFT calculation lookup table calculation unit of the digital broadcast receiver according to the second embodiment. 実施の形態2によるデジタル放送受信機のIDFT演算ルックアップテーブル算出部の動作を示すフローチャートである。6 is a flowchart illustrating an operation of an IDFT calculation lookup table calculation unit of the digital broadcast receiver according to the second embodiment.

符号の説明Explanation of symbols

1 チューナ、2 OFDM復調部、3 トランスポートデコーダ、4 発振器、5 PCR比較部(PCR比較手段)、6 ビデオデコーダ、7 オーディオデコーダ、8 出力データ制御部(ビデオバッファ)、9 PCMデータ補正部(PCMデータ補正手段)、10 ビデオ/オーディオ出力タイミング補正部(出力タイミング補正手段)、11 出力データ制御部(オーディオバッファ)、12,13 D/Aコンバータ、14 AVデコーダ、15 アンテナ、21 PIDフィルタ部、22 PSI解析部、23 コンテンツデータバッファ、31 TSヘッダ解析/デコード部、32〜34 PESパケット抽出部、71 Local_CNTカウンタ、72 Local_REG_Aレジスタ(カウント値レジスタ)、73 Local_REG_Bレジスタ(カウント値レジスタ)、74 PCR_REG_Aレジスタ(PCR値レジスタ)、75 PCR_REG_Bレジスタ(PCR値レジスタ)、76 カウンタ誤差検出部(誤差検出手段)、77 シフトレジスタ、78 平均化処理部、79 δf算出部(周波数誤差データ演算手段)、80 シフトレジスタ、81 平均化処理部、91 300カウンタ、92 Local_baseカウンタ、93 フリップフロップ、101〜106 減算器、121 V_PTS_REG_Aレジスタ(ビデオデータPTS値レジスタ)、122 V_PTS_REG_Bレジスタ(ビデオデータPTS値レジスタ)、123 減算器、124 乗算器、125 V_δPTS_ALLレジスタ、126 加算器、127 PCM_correct_timeレジスタ、128 加算器、129 比較器、130〜133 セレクタ、134 A_PTS_REG_Aレジスタ(オーディオデータPTS値レジスタ)、135 A_PTS_REG_Bレジスタ(オーディオデータPTS値レジスタ)、136 減算器、137 乗算器、138 加算器、139 比較器、140〜142 フリップフロップ、151 アップサンプリング部(アップサンプリング手段)、152 ローパスフィルタ、153 補間データテンポラリバッファ(データバッファ)、154 補間データテンポラリバッファ読み出し制御部(データバッファ読み出し制御手段)、155 データ蓄積メモリ、181 データ蓄積部、182 FFT演算部(FFT演算手段)、183 位相補正/IDFT演算部(位相補正演算手段)、184 データ蓄積部、185 位相補正制御部(位相補正制御手段)、201 補正位相正弦・余弦値ルックアップテーブル算出部、202 補正位相正弦・余弦値ルックアップテーブル、203 送出側IDFTルックアップテーブル、204 IDFT演算ルックアップテーブル算出部、205 FFT演算結果蓄積部、206 IDFTルックアップテーブル、207 IDFT演算処理部。   1 tuner, 2 OFDM demodulator, 3 transport decoder, 4 oscillator, 5 PCR comparator (PCR comparator), 6 video decoder, 7 audio decoder, 8 output data controller (video buffer), 9 PCM data corrector ( PCM data correction means), 10 video / audio output timing correction section (output timing correction means), 11 output data control section (audio buffer), 12, 13 D / A converter, 14 AV decoder, 15 antenna, 21 PID filter section 22 PSI analysis unit, 23 content data buffer, 31 TS header analysis / decoding unit, 32-34 PES packet extraction unit, 71 Local_CNT counter, 72 Local_REG_A register (count value register), 73 Local_REG_B register (count value register), 74 PCR_REG_A register (PCR value register), 75 PCR_REG_B register (PCR value register), 76 counter error detector (error detector), 77 shift register, 78 averaging processor, 79 δf calculator (frequency error data calculator) , 80 shift register, 81 averaging processing unit, 91 300 counter, 92 Local_base counter, 93 flip-flop, 101-106 subtractor, 121 V_PTS_REG_A register (video data PTS value register), 122 V_PTS_REG_B register (video data PTS value register) , 123 subtractor, 124 multiplier, 125 V_δPTS_ALL register, 126 adder, 127 PCM_correct_time register, 128 adder, 129 comparator, 130 to 133 selector, 134 A_PTS_REG_A register (audio data PTS value register) 135 A_PTS_REG_B register (audio data PTS value register), 136 subtractor, 137 multiplier, 138 adder, 139 comparator, 140 to 142 flip-flop, 151 upsampling unit (upsampling means), 152 low-pass filter, 153 interpolation data Temporary buffer (data buffer), 154 Interpolation data temporary buffer read control section (data buffer read control means), 155 data storage memory, 181 data storage section, 182 FFT operation section (FFT operation means), 183 Phase correction / IDFT operation section (Phase correction calculation means), 184 data storage section, 185 phase correction control section (phase correction control means), 201 corrected phase sine / cosine value lookup table calculation section, 202 corrected phase sine / cosine value level Click-up table, 203 sender IDFT lookup table, 204 IDFT computation lookup table calculating unit, 205 FFT computation result storage unit, 206 IDFT lookup table, 207 IDFT processing unit.

Claims (7)

受信したTSパケットからPCRとPESとを分離するトランスポートデコーダと、前記トランスポートデコーダからPCRとPESとを取得し当該PCRを用いてPESを変換してビデオ信号及びオーディオ信号を出力するAVデコーダとを備えたデジタル放送受信機において、
前記AVデコーダは、遂次入力されるPCRと当該受信機で発生させたクロック信号とを比較して前記クロック信号の誤差を示す周波数誤差データを演算により求めるPCR比較手段と、
ビデオデコーダにより前記PESからデコードされたビデオデータとオーディオデコーダにより前記PESからデコードされたオーディオデータとを同期させるPTSを前記ビデオデコーダ及びオーディオデコーダからそれぞれ取得し、これらのPTSを前記周波数誤差データに基づいて補正し、当該補正したPTSに基づくイネーブル信号を生成して前記ビデオデータを出力するビデオバッファ及び前記オーディオデータを出力するオーディオバッファの動作タイミングを制御する出力タイミング補正手段とを備えたことを特徴とするデジタル放送受信機。
A transport decoder that separates PCR and PES from the received TS packet; an AV decoder that obtains PCR and PES from the transport decoder, converts the PES using the PCR, and outputs a video signal and an audio signal; In a digital broadcast receiver equipped with
The AV decoder comprises a PCR comparison means for comparing the sequentially input PCR and a clock signal generated by the receiver to obtain frequency error data indicating an error of the clock signal by calculation;
PTSs for synchronizing the video data decoded from the PES by the video decoder and the audio data decoded from the PES by the audio decoder are respectively obtained from the video decoder and the audio decoder, and these PTSs are obtained based on the frequency error data. And an output timing correction means for controlling the operation timing of the video buffer that outputs the video data by generating an enable signal based on the corrected PTS and the audio buffer that outputs the audio data. Digital broadcast receiver.
受信したTSパケットからPCRとPESとを分離するトランスポートデコーダと、前記トランスポートデコーダからPCRとPESとを取得し当該PCRを用いてPESを変換してビデオ信号及びオーディオ信号を出力するAVデコーダとを備えたデジタル放送受信機において、
前記AVデコーダは、
遂次入力されるPCRと当該受信機で発生させたクロック信号とを比較して前記クロック信号の誤差を示す周波数誤差データを演算により求めるPCR比較手段と、
ビデオデコーダにより前記PESからデコードされたビデオデータとオーディオデコーダにより前記PESからデコードされたオーディオデータとを同期させるPTSを前記ビデオデコーダ及びオーディオデコーダからそれぞれ取得し、これらのPTSを前記周波数誤差データに基づいて補正し、当該補正したPTSに基づくイネーブル信号を生成して前記ビデオデータを出力するビデオバッファ及び前記オーディオデータを出力するオーディオバッファの動作タイミングを制御する出力タイミング補正手段と、
前記オーディオデコーダより出力されたオーディオデータのサンプリング数を前記周波数誤差データに基づいて補正するオーディオデータ補正手段とを備えたことを特徴とするデジタル放送受信機。
A transport decoder that separates PCR and PES from the received TS packet; an AV decoder that obtains PCR and PES from the transport decoder, converts the PES using the PCR, and outputs a video signal and an audio signal; In a digital broadcast receiver equipped with
The AV decoder
PCR comparison means for calculating frequency error data indicating an error of the clock signal by comparing the sequentially input PCR and the clock signal generated by the receiver;
PTSs for synchronizing the video data decoded from the PES by the video decoder and the audio data decoded from the PES by the audio decoder are respectively obtained from the video decoder and the audio decoder, and these PTSs are obtained based on the frequency error data. Output timing correction means for controlling the operation timing of the video buffer that outputs the video data by generating an enable signal based on the corrected PTS and the audio buffer that outputs the audio data;
An audio data correction means for correcting the number of samplings of audio data output from the audio decoder based on the frequency error data.
PCR比較手段は、当該受信機で発生させたクロック信号をカウントするカウンタと、逐次入力されるPCRの値を順次格納する複数のPCR値レジスタと、前記カウンタのカウント値を順次格納する複数のカウント値レジスタと、前記複数のPCR値レジスタに格納されている各PCR値の差分値を求めると共に前記複数のカウント値レジスタに格納されている各カウント値の差分値を求める誤差検出手段と、前記誤差検出手段が求めたPCR値の差分値及びカウント値の差分値を用いて周波数誤差データを求める演算を行う周波数誤差データ演算手段とを備えたことを特徴とする請求項1または請求項2記載のデジタル放送受信機。   The PCR comparison means includes a counter for counting clock signals generated by the receiver, a plurality of PCR value registers for sequentially storing PCR values sequentially input, and a plurality of counts for sequentially storing the count values of the counters. A value register, error detection means for obtaining a difference value between the PCR values stored in the plurality of PCR value registers and obtaining a difference value between the count values stored in the plurality of count value registers, and the error 3. The frequency error data calculating means for calculating frequency error data using the difference value of the PCR value and the difference value of the count value obtained by the detecting means. Digital broadcast receiver. 出力タイミング補正手段は、ビデオデコーダから逐次入力されるビデオデータに関するPTSを順次格納する複数のビデオデータPTS値レジスタと、
前記複数のビデオデータPTS値レジスタに格納されている各値の差分値を求めると共に当該差分値とPCR比較手段から出力された周波数誤差データとを用いて前記ビデオデータに関するPTSを補正するビデオデータPTS補正手段と、
オーディオデコーダから逐次入力されるオーディオデータに関するPTSを順次格納する複数のオーディオデータPTS値レジスタと、
前記複数のオーディオデータPTS値レジスタに格納されている各値の差分値を求めると共に当該差分値と前記周波数誤差データとを用いて前記オーディオデータに関するPTSを補正するオーディオデータPTS補正手段とを備えたことを特徴とする請求項1記載のデジタル放送受信機。
The output timing correction means includes a plurality of video data PTS value registers for sequentially storing PTSs relating to video data sequentially input from the video decoder,
Video data PTS for obtaining a difference value of each value stored in the plurality of video data PTS value registers and correcting the PTS related to the video data using the difference value and the frequency error data output from the PCR comparison means Correction means;
A plurality of audio data PTS value registers for sequentially storing PTS relating to audio data sequentially input from an audio decoder;
Audio data PTS correction means for calculating a difference value between the values stored in the plurality of audio data PTS value registers and correcting the PTS related to the audio data using the difference value and the frequency error data. The digital broadcast receiver according to claim 1.
出力タイミング補正手段は、ビデオデコーダから逐次入力されるビデオデータに関するPTSを順次格納する複数のビデオデータPTS値レジスタと、
前記複数のビデオデータPTS値レジスタに格納されている各値の差分値を求めると共に当該差分値とPCR比較手段から出力された周波数誤差データとオーディオ補正手段によるオーディオデータの処理時間を示すデータとを用いて前記ビデオデータに関するPTSを補正するビデオデータPTS補正手段と、
オーディオデコーダから逐次入力されるオーディオデータに関するPTSを順次格納する複数のオーディオデータPTS値レジスタと、
前記複数のオーディオデータPTS値レジスタに格納されている各値の差分値を求めると共に当該差分値と前記周波数誤差データとを用いた演算により前記オーディオデータに関するPTSを補正するオーディオデータPTS補正手段とを備えたことを特徴とする請求項2記載のデジタル放送受信機。
The output timing correction means includes a plurality of video data PTS value registers for sequentially storing PTSs relating to video data sequentially input from the video decoder,
The difference value of each value stored in the plurality of video data PTS value registers is obtained, and the difference value, the frequency error data output from the PCR comparison means, and the data indicating the audio data processing time by the audio correction means are obtained. Video data PTS correction means for correcting the PTS for the video data using,
A plurality of audio data PTS value registers for sequentially storing PTS relating to audio data sequentially input from an audio decoder;
Audio data PTS correction means for calculating a difference value of each value stored in the plurality of audio data PTS value registers and correcting the PTS related to the audio data by an operation using the difference value and the frequency error data; The digital broadcast receiver according to claim 2, further comprising:
オーディオデータ補正手段は、オーディオデコーダからオーディオデータとして出力されたPCMデータをアップサンプリングするアップサンプリング手段と、当該アップサンプリングされたPCMデータを格納するデータバッファと、PCR比較手段から出力された周波数誤差データから前記PCMデータの位相を示す値を求め当該位相を示す値に基づいて前記PCMデータの間引きあるいは補間がなされるように前記データバッファからPCMデータを読み出すデータバッファ読み出し制御手段とを備えたことを特徴とする請求項2記載のデジタル放送受信機。   The audio data correction means includes an upsampling means for upsampling PCM data output as audio data from the audio decoder, a data buffer for storing the upsampled PCM data, and frequency error data output from the PCR comparison means. A data buffer read control means for obtaining a value indicating the phase of the PCM data from the data buffer so that the PCM data is thinned out or interpolated based on the value indicating the phase. The digital broadcast receiver according to claim 2, wherein: オーディオデータ補正手段は、オーディオデコーダからオーディオデータとして出力されたPCMデータにFFT演算を施すFFT演算手段と、PCR比較手段から出力された周波数誤差データを周期関数に適用して補正位相を求める位相補正制御手段と、前記補正位相に基づいて前記FFT演算手段から出力される演算結果のサンプリング数を決定し当該サンプリング数の前記FFT演算手段から出力された演算結果にIDFT演算を施す位相補正演算手段とを備えたことを特徴とする請求項2記載のデジタル放送受信機。   The audio data correction means includes an FFT calculation means for performing an FFT calculation on PCM data output as audio data from an audio decoder, and a phase correction for obtaining a correction phase by applying frequency error data output from a PCR comparison means to a periodic function. Control means; phase correction calculation means for determining a sampling number of the calculation result output from the FFT calculation means based on the correction phase, and performing IDFT calculation on the calculation result output from the FFT calculation means of the sampling number; The digital broadcast receiver according to claim 2, further comprising:
JP2004123167A 2004-04-19 2004-04-19 Digital broadcast receiver Withdrawn JP2005311522A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004123167A JP2005311522A (en) 2004-04-19 2004-04-19 Digital broadcast receiver

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004123167A JP2005311522A (en) 2004-04-19 2004-04-19 Digital broadcast receiver

Publications (1)

Publication Number Publication Date
JP2005311522A true JP2005311522A (en) 2005-11-04

Family

ID=35439816

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004123167A Withdrawn JP2005311522A (en) 2004-04-19 2004-04-19 Digital broadcast receiver

Country Status (1)

Country Link
JP (1) JP2005311522A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010161748A (en) * 2009-01-09 2010-07-22 Hitachi Kokusai Electric Inc Mobile receiving terminal and relay apparatus
WO2011081380A2 (en) * 2009-12-28 2011-07-07 (주)더블유코퍼레이션 Method and apparatus for correcting synchronization errors between audio signals and video signals
JP2013143577A (en) * 2012-01-06 2013-07-22 Kawasaki Microelectronics Inc Receiving side device and communication system
CN105208395A (en) * 2015-09-16 2015-12-30 北京暴风科技股份有限公司 Method and system for error correction on time stamps for Android system hardware video decoding

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010161748A (en) * 2009-01-09 2010-07-22 Hitachi Kokusai Electric Inc Mobile receiving terminal and relay apparatus
WO2011081380A2 (en) * 2009-12-28 2011-07-07 (주)더블유코퍼레이션 Method and apparatus for correcting synchronization errors between audio signals and video signals
WO2011081380A3 (en) * 2009-12-28 2011-12-01 (주)더블유코퍼레이션 Method and apparatus for correcting synchronization errors between audio signals and video signals
JP2013143577A (en) * 2012-01-06 2013-07-22 Kawasaki Microelectronics Inc Receiving side device and communication system
CN105208395A (en) * 2015-09-16 2015-12-30 北京暴风科技股份有限公司 Method and system for error correction on time stamps for Android system hardware video decoding
CN105208395B (en) * 2015-09-16 2018-02-09 暴风集团股份有限公司 The method and system of error correction are carried out to the timestamp of Android system hardware video decoding

Similar Documents

Publication Publication Date Title
US6236432B1 (en) MPEG II system with PES decoder
JP4733379B2 (en) Guard interval and fast Fourier transform mode detector in digital video broadcast receiver
KR100707641B1 (en) Decoder apparatus
WO2012124575A1 (en) Reception device, reception method, and program
JP2002064788A (en) Data stream processor and method, and program storage medium
JP2005311522A (en) Digital broadcast receiver
US8107576B2 (en) Synchronization method and related apparatus of an OFDM digital communication system
JP5041844B2 (en) PCR correction circuit
JP4636460B2 (en) Stream playback device
JP4327873B2 (en) Broadcast receiving apparatus, TS packet reproducing apparatus, broadcast receiving method and program
JP2007259313A (en) Stream reproduction method and reproduction apparatus
JP5094993B2 (en) REPRODUCTION DEVICE, REPRODUCTION METHOD, AND SYSTEM INTEGRATED CIRCUIT
US20060192895A1 (en) Method for using a synchronous sampling design in a fixed-rate sampling mode
JP2011049667A (en) Data processor and data processing method
JP4589355B2 (en) Stream playback device
JP2004521527A (en) Method and system for buffering data representing pixels
JP3945190B2 (en) Time stamp generation circuit
JP3737352B2 (en) Start code search circuit
JP2006319552A (en) Multimedia reproducing device
US20110221961A1 (en) Synchronization data detection apparatus, synchronization data detection method, and recording medium
JP2007266682A (en) Video signal conversion device
KR100848904B1 (en) method of real-time PES decoding for audio/video lip sync
JP2000187940A (en) Recording/reproducing device and recorder
JP2004023686A (en) Mpeg2 decoder
JP2001045439A (en) Recorder and method, reproducing device and method and recording medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070416

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20071015

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20080715

A761 Written withdrawal of application

Free format text: JAPANESE INTERMEDIATE CODE: A761

Effective date: 20090324