Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP4879958B2 - Video / audio stream transmission control method, video / audio stream transmission control apparatus, video / audio stream transmission control program, and computer-readable recording medium recording the program - Google Patents
[go: Go Back, main page]

JP4879958B2 - Video / audio stream transmission control method, video / audio stream transmission control apparatus, video / audio stream transmission control program, and computer-readable recording medium recording the program - Google Patents

Video / audio stream transmission control method, video / audio stream transmission control apparatus, video / audio stream transmission control program, and computer-readable recording medium recording the program Download PDF

Info

Publication number
JP4879958B2
JP4879958B2 JP2008309286A JP2008309286A JP4879958B2 JP 4879958 B2 JP4879958 B2 JP 4879958B2 JP 2008309286 A JP2008309286 A JP 2008309286A JP 2008309286 A JP2008309286 A JP 2008309286A JP 4879958 B2 JP4879958 B2 JP 4879958B2
Authority
JP
Japan
Prior art keywords
video
audio
transmission
frame
transmission control
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.)
Active
Application number
JP2008309286A
Other languages
Japanese (ja)
Other versions
JP2010136040A (en
Inventor
健 中村
淳 清水
隆一 谷田
登 原田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NTT Inc
NTT Inc USA
Original Assignee
Nippon Telegraph and Telephone Corp
NTT Inc USA
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 Nippon Telegraph and Telephone Corp, NTT Inc USA filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2008309286A priority Critical patent/JP4879958B2/en
Publication of JP2010136040A publication Critical patent/JP2010136040A/en
Application granted granted Critical
Publication of JP4879958B2 publication Critical patent/JP4879958B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Description

本発明は、映像符号化データと音声符号化データとを多重化して一定のビットレートで伝送するときに、伝送遅延を長くすることなく伝送映像の画質の向上を実現し、かつ、伝送映像の画質の劣化を招くことなしに伝送遅延を短くすることを実現する映像・音声ストリーム伝送制御方法およびその装置と、その映像・音声ストリーム伝送制御方法の実現に用いられる映像・音声ストリーム伝送制御プログラムおよびそのプログラムを記録したコンピュータ読み取り可能な記録媒体とに関する。   The present invention realizes an improvement in image quality of transmission video without increasing transmission delay when video encoded data and audio encoded data are multiplexed and transmitted at a constant bit rate. Video / audio stream transmission control method and apparatus for realizing a reduction in transmission delay without causing degradation of image quality, and video / audio stream transmission control program used for realizing the video / audio stream transmission control method The present invention relates to a computer-readable recording medium on which the program is recorded.

一般に、映像と音声とを圧縮して一定のビットレートで多重化して伝送するシステムでは、映像と音声とを別々にビットレート制御するようにしていた。   In general, in a system in which video and audio are compressed and multiplexed and transmitted at a constant bit rate, the video and audio are bit-rate controlled separately.

この伝送にあたっては、映像の圧縮データが一定の遅延時間内にデコーダに伝送されるように映像の符号量を制御する必要がある。   In this transmission, it is necessary to control the code amount of the video so that the compressed data of the video is transmitted to the decoder within a certain delay time.

このとき、伝送遅延時間を短くするためには、映像符号量の変動をより抑制する必要があることから、映像符号量が大きくなった場合には、その符号量を大きく抑制する必要がある。一方、伝送映像の画質を向上するためには、大きな映像符号量の変動に対応できるようにする必要があることから、伝送遅延時間を長くする必要がある。   At this time, in order to shorten the transmission delay time, it is necessary to further suppress fluctuations in the video code amount. Therefore, when the video code amount increases, it is necessary to largely suppress the code amount. On the other hand, in order to improve the image quality of transmission video, it is necessary to be able to cope with large fluctuations in the video code amount, so it is necessary to increase the transmission delay time.

そこで、従来技術では、伝送遅延時間を短くすることを優先する場合には、伝送映像の画質よりも伝送遅延時間を優先する形で伝送遅延時間を設定し、一方、伝送映像の画質の向上を実現することを優先する場合には、伝送遅延時間よりも伝送映像の画質を優先する形で伝送遅延時間を設定するようにしていた。   Therefore, in the prior art, when priority is given to shortening the transmission delay time, the transmission delay time is set to give priority to the transmission delay time over the image quality of the transmission video, while improving the image quality of the transmission video. When priority is given to realization, the transmission delay time is set in such a manner that the image quality of the transmission video is given priority over the transmission delay time.

このような本発明に関連する従来技術については、下記の非特許文献1,2参照に記載されている。
ISO/IEC 13818-2 Annex C, ITU-T Recomendation H.264 AnnexC 映像情報メディア学会編,"総合マルチメディア選書 MPEG",オーム社, 1996
Such conventional techniques related to the present invention are described in the following non-patent documents 1 and 2.
ISO / IEC 13818-2 Annex C, ITU-T Recomendation H.264 Annex C The Institute of Image Information and Television Engineers, "Comprehensive Multimedia Selection MPEG", Ohmsha, 1996

しかしながら、従来技術に従っていると、伝送映像の画質よりも伝送遅延時間を優先する形で伝送遅延時間を設定するようにすると、映像符号量の変動をより抑制する必要があることから、映像符号量が大きくなった場合には、その符号量を大きく抑制する必要があることで伝送映像の画質が劣化するという問題がある。   However, according to the prior art, if the transmission delay time is set so that the transmission delay time is given priority over the image quality of the transmission video, it is necessary to further suppress fluctuations in the video code amount. When the signal becomes large, there is a problem that the image quality of the transmission video is deteriorated because it is necessary to largely suppress the code amount.

一方、伝送遅延時間よりも伝送映像の画質を優先する形で伝送遅延時間を設定するようにすると、伝送映像の画質を向上するためには、大きな映像符号量の変動に対応できるようにする必要があることから、伝送遅延時間が長くなるという問題がある。   On the other hand, if the transmission delay time is set to give priority to the transmission video quality over the transmission delay time, in order to improve the transmission video quality, it is necessary to be able to cope with large fluctuations in the video code amount. Therefore, there is a problem that the transmission delay time becomes long.

本発明はかかる事情に鑑みてなされたものであって、映像符号化データと音声符号化データとを多重化して一定のビットレートで伝送するという構成を採るときに、伝送遅延を長くすることなく伝送映像の画質の向上を実現し、かつ、伝送映像の画質の劣化を招くことなしに伝送遅延を短くすることを実現する新たな映像・音声ストリーム伝送制御技術の提供を目的とする。   The present invention has been made in view of such circumstances, and when adopting a configuration in which video encoded data and audio encoded data are multiplexed and transmitted at a constant bit rate, the transmission delay is not increased. It is an object of the present invention to provide a new video / audio stream transmission control technology that realizes improvement of the quality of transmission video and shortens transmission delay without causing deterioration of the quality of transmission video.

この目的を達成するために、本発明は、映像符号化データと音声符号化データとを多重化して一定のビットレートで伝送するという構成を採るときに、次のように伝送を制御する。   In order to achieve this object, the present invention controls transmission as follows when adopting a configuration in which video encoded data and audio encoded data are multiplexed and transmitted at a constant bit rate.

(1)通常時は、音声符号化データを映像符号化データよりもできるだけ早いタイミングに伝送する。   (1) In normal times, audio encoded data is transmitted as soon as possible than video encoded data.

(2)ある映像フレームを符号化する場合の符号量が大きいことで、映像デコーダバッファがアンダーフローする場合、すなわち、一定遅延時間内に映像符号化データを伝送できないことが判明した場合には、音声符号化データの伝送ビットレートを下げ、映像符号化データの伝送ビットレートを上げることで、そのアンダーフローの発生を回避する。このとき、音声符号化データの伝送を停止させ、映像符号化データのみを伝送させるようにすることもある。   (2) When it is found that the video decoder buffer underflows due to a large code amount when encoding a video frame, that is, when it is found that video encoded data cannot be transmitted within a certain delay time, By lowering the transmission bit rate of the audio encoded data and increasing the transmission bit rate of the video encoded data, the occurrence of the underflow is avoided. At this time, transmission of audio encoded data may be stopped and only video encoded data may be transmitted.

(3)アンダーフローの発生を回避した場合には、その後、音声符号化データの伝送タイミングが遅れているので、所定の期間、音声符号化データの伝送ビットレートを上げ、映像符号化データの伝送ビットレートを下げる。これにより、音声符号化データの伝送タイミングを徐々に早め、元の伝送タイミングに戻った時点で映像符号化データおよび音声符号化データの伝送ビットレートを元に戻すことで、所定の期間内に、音声符号化データおよび映像符号化データの伝送ビットレートを通常の伝送ビットレートに復帰させる。   (3) When the occurrence of underflow is avoided, since the transmission timing of the encoded audio data is later, the transmission bit rate of the encoded audio data is increased for a predetermined period, and the encoded video data is transmitted. Reduce the bit rate. Thereby, the transmission timing of the audio encoded data is gradually advanced, and by returning the transmission bit rate of the video encoded data and the audio encoded data at the time of returning to the original transmission timing, within a predetermined period, The transmission bit rates of the audio encoded data and the video encoded data are returned to the normal transmission bit rate.

従来技術では、映像と音声とを圧縮して一定のビットレートで多重化して伝送する場合に、音声は映像に比べて伝送タイミングに自由度があるのに、この自由度を十分利用していなかった。   In the conventional technology, when video and audio are compressed and multiplexed and transmitted at a constant bit rate, audio has less freedom in transmission timing than video, but this degree of freedom is not fully utilized. It was.

本発明はその点に着目して、この自由度を映像の符号量の変動幅拡大に活用することにより、伝送遅延を短くすることを優先する場合に問題となる伝送映像の画質の劣化を解決するとともに、伝送映像の画質の向上を図る場合に問題となる伝送遅延の増大を解決するようにするのである。   The present invention pays attention to this point, and by utilizing this degree of freedom for expanding the fluctuation range of the code amount of the video, it solves the degradation of the quality of the transmission video, which is a problem when priority is given to shortening the transmission delay. At the same time, an increase in transmission delay, which is a problem when improving the image quality of transmission video, is solved.

本発明によれば、映像符号化データと音声符号化データとを多重化して一定のビットレートで伝送するときに、伝送遅延を長くすることなく伝送映像の画質の向上を実現できるようになる。   According to the present invention, when video encoded data and audio encoded data are multiplexed and transmitted at a constant bit rate, it is possible to improve the image quality of the transmitted video without increasing the transmission delay.

そして、本発明によれば、映像符号化データと音声符号化データとを多重化して一定のビットレートで伝送するときに、伝送映像の画質の劣化を招くことなしに伝送遅延を短くすることを実現できるようになる。   According to the present invention, when video encoded data and audio encoded data are multiplexed and transmitted at a constant bit rate, the transmission delay can be shortened without causing deterioration of the image quality of the transmitted video. Can be realized.

以下、実施の形態に従って本発明を詳細に説明する。   Hereinafter, the present invention will be described in detail according to embodiments.

〔1〕実施形態例の構成
図1に、本発明により構成される映像・音声符号化伝送装置の一実施形態例を図示する。
[1] Configuration of Embodiment FIG. 1 illustrates an embodiment of a video / audio encoding / transmission apparatus configured according to the present invention.

この図において、映像符号化部10は、映像・音声重畳信号のうち映像信号を入力し、映像信号を符号化して映像ストリームを出力する。音声符号化部20は、映像・音声重畳信号のうち音声信号を入力し、音声信号を符号化して音声ストリームを出力する。多重化部30は、音声ストリームと映像ストリームとを所定のビットレートとなるように多重化して出力する。   In this figure, a video encoding unit 10 receives a video signal among video / audio superimposed signals, encodes the video signal, and outputs a video stream. The audio encoding unit 20 receives an audio signal from the video / audio superimposed signal, encodes the audio signal, and outputs an audio stream. The multiplexing unit 30 multiplexes and outputs the audio stream and the video stream so as to have a predetermined bit rate.

本実施形態例において、音声符号化部20は、映像符号化部10の設定する音声伝送ビットレートに従って音声ストリームの伝送ビットレートを制御し、さらに、フレーム毎もしくは逐次、音声発生符号量を映像符号化部10に伝達する機能を持つほかは従来技術と同様であるので、その内部構成についての詳しい説明は省略する。   In the present embodiment, the audio encoding unit 20 controls the transmission bit rate of the audio stream according to the audio transmission bit rate set by the video encoding unit 10, and further converts the audio generation code amount for each frame or sequentially into the video code. Since it is the same as that of the prior art except that it has a function of transmitting to the conversion unit 10, a detailed description of its internal configuration is omitted.

映像符号化部10は、映像信号をフレーム目標符号量に従って符号化することで映像ストリームを生成する映像フレーム符号化部11と、映像フレーム符号化部11を制御することで映像ストリームの生成を制御するとともに、映像ストリームおよび音声ストリームの伝送ビットレートを制御する映像符号化制御部12と、映像ストリームの伝送ビットレートの制御のために設けられる出力バッファ13とを備える。   The video encoding unit 10 controls the generation of the video stream by controlling the video frame encoding unit 11 and the video frame encoding unit 11 that generate the video stream by encoding the video signal according to the frame target code amount. In addition, a video encoding control unit 12 for controlling the transmission bit rate of the video stream and the audio stream, and an output buffer 13 provided for controlling the transmission bit rate of the video stream are provided.

そして、映像符号化制御部12は、上記の制御を実現するために、映像符号化の制御処理を実行する符号化制御実行部120と、映像ストリームが規定の遅延時間内に受信側で受信できるようにするためのバッファ検定を行うバッファ検定部121とを備える。   In order to realize the above control, the video encoding control unit 12 can receive the video stream within the specified delay time and the encoding control execution unit 120 that executes the video encoding control process. And a buffer verification unit 121 that performs buffer verification for the purpose.

この符号化制御実行部120は、フレーム目標符号量を算出するフレーム目標符号量算出部1200と、映像フレーム符号化部11に伝達するフレーム目標符号量を決定するフレーム目標符号量決定部1201と、映像デコーダバッファのアンダーフローが発生する状態であるのか否かを判断するとともに、映像デコーダバッファのオーバーフローが発生する状態であるのか否かを判断するアンダーフロー・オーバーフロー発生判断部1202と、映像デコーダバッファのアンダーフローが発生する状態にあるときに、映像ストリームおよび音声ストリームの伝送ビットレートを定常時のものから変更する制御を行う伝送レート変更制御部1203と、伝送レート変更制御部1203の変更した伝送ビットレートを元の伝送ビットレートに復帰させるための制御を行う伝送レート復帰制御部1204とを備える。   The encoding control execution unit 120 includes a frame target code amount calculation unit 1200 that calculates a frame target code amount, a frame target code amount determination unit 1201 that determines a frame target code amount to be transmitted to the video frame encoding unit 11, An underflow / overflow occurrence determination unit 1202 that determines whether or not an underflow of the video decoder buffer occurs and determines whether or not an overflow of the video decoder buffer occurs; and a video decoder buffer The transmission rate change control unit 1203 performs control to change the transmission bit rate of the video stream and the audio stream from the steady state when underflow occurs, and the transmission changed by the transmission rate change control unit 1203 Restore the bit rate to the original transmission bit rate. And a transmission rate restoration control section 1204 performs control to.

一方、バッファ検定部121は、バッファ検定に必要となる映像デコーダバッファのバッファサイズについての処理を実行するデコーダバッファサイズ処理部1210と、バッファ検定に必要となる映像デコーダバッファの占有量についての処理を実行するデコーダバッファ占有量処理部1211と、映像デコーダバッファのオーバーフロー発生時に伝送タイミングを遅らせるために挿入するフィラーデータ(スタッフィングデータ)の量を決定して、映像フレーム符号化部11に伝達する処理を行うフィラーデータ量決定部1212とを備える。   On the other hand, the buffer verification unit 121 executes a process for the buffer size of the video decoder buffer necessary for the buffer verification and a process for the occupation amount of the video decoder buffer required for the buffer verification. Decoder buffer occupation amount processing unit 1211 to be executed, and processing for determining the amount of filler data (stuffing data) to be inserted in order to delay the transmission timing when an overflow of the video decoder buffer occurs, and transmitting the processing to the video frame encoding unit 11 A filler data amount determination unit 1212 to perform.

このように構成される本実施形態例に係る映像・音声符号化伝送装置は、図2のαの個所で示すように、映像フレームiと音声フレームjとが同時にデコードされて出力されるという関係(表示時刻と表示期間とが同じである関係)にある場合で説明するならば、図2のβの個所で示すように、音声フレームjの符号化データを映像フレームiの符号化データよりも先に伝送するという構成を採る。   The video / audio encoding / transmission apparatus according to the present embodiment configured as described above has a relationship in which the video frame i and the audio frame j are decoded and output at the same time, as indicated by the part α in FIG. In the case where (the display time and the display period are the same relationship), the encoded data of the audio frame j is more than the encoded data of the video frame i, as indicated by the position β in FIG. A configuration of transmitting first is adopted.

ここで、本実施形態例では、簡素化のために、図中に示すように、音声フレームの時間的な長さは“1/P(P:映像フレームレート)”であるとし、音声フレームの符号量は一定値であるとする。   Here, in this embodiment, for the sake of simplification, as shown in the figure, the time length of the audio frame is assumed to be “1 / P (P: video frame rate)”, and the audio frame The code amount is assumed to be a constant value.

〔2〕バッファ検定
次に、本発明の説明に入る前に、映像デコーダバッファのアンダーフローおよびオーバーフローが発生するのか否かについて検出するためのバッファ検定の処理について説明する。なお、ここに言うバッファ検定とは、MPEG2で要求するVBV(Video Buffering Verifier)の規格や、H.264で要求するHRD(Hypothetical Reference Decoder)の規格に該当する。
[2] Buffer Verification Next, before entering the description of the present invention, a buffer verification process for detecting whether underflow or overflow of the video decoder buffer occurs will be described. The buffer verification referred to here is the VBV (Video Buffering Verifier) standard required by MPEG2, This corresponds to the HRD (Hypothetical Reference Decoder) standard required by H.264.

バッファ検定では、図3の上段に示すように、映像フレームiのエンコード終了時刻から映像フレームiのデコード開始時刻までに伝送可能な映像符号量を映像デコーダバッファサイズBmax(i)と定義し、映像フレームi−1の伝送終了時刻から映像フレームiのデコード開始時刻までに伝送可能な映像符号量を映像デコーダバッファ占有量B(i)と定義する。   In the buffer verification, as shown in the upper part of FIG. 3, the video code amount that can be transmitted from the encoding end time of the video frame i to the decoding start time of the video frame i is defined as the video decoder buffer size Bmax (i). The amount of video code that can be transmitted from the transmission end time of frame i-1 to the decoding start time of video frame i is defined as video decoder buffer occupation amount B (i).

映像フレームiに対しての目標符号量に応じて映像フレームiの発生符号量S(i)が決まると、図3の中段に示すように、映像フレームi−1の伝送終了時刻を起点として、その発生符号量S(i)を映像デコーダバッファ占有量B(i)に割り付けることで、映像フレームiの伝送終了時刻が映像フレームiのデコード開始時刻よりも前になるのか後になるのかを判定できる。   When the generated code amount S (i) of the video frame i is determined according to the target code amount for the video frame i, as shown in the middle part of FIG. 3, the transmission end time of the video frame i-1 is used as a starting point. By assigning the generated code amount S (i) to the video decoder buffer occupation amount B (i), it is possible to determine whether the transmission end time of the video frame i is before or after the decoding start time of the video frame i. .

映像フレームiの伝送終了時刻が映像フレームiのデコード開始時刻よりも後になる場合には、映像フレームiの符号量が大きいことで映像デコーダバッファがアンダーフローすることになり、バッファが破綻することになる。   When the transmission end time of the video frame i is later than the decoding start time of the video frame i, the video decoder buffer underflows due to a large code amount of the video frame i, and the buffer breaks down. Become.

すなわち、映像デコーダバッファ占有量B(i)と映像フレームiの発生符号量S(i)との大小比較を行うことで、映像デコーダバッファがアンダーフローするのか否かを判定できることになる。   That is, it is possible to determine whether or not the video decoder buffer underflows by comparing the video decoder buffer occupation amount B (i) with the generated code amount S (i) of the video frame i.

なお、以下に説明するように、本発明は、このアンダーフローによるバッファ破綻を伝送映像の画質の低下を招くことなく回避することを実現する。ちなみに、従来技術では、アンダーフローとなる場合には、映像フレームiの符号量を抑制するようにしている。ただ、そのようにすると伝送映像の画質の低下を招くことになる。   Note that, as will be described below, the present invention achieves avoidance of the buffer failure due to the underflow without causing deterioration of the image quality of the transmission video. Incidentally, in the prior art, when underflow occurs, the code amount of the video frame i is suppressed. However, if this is done, the quality of the transmitted video will be degraded.

一方、それまでの映像フレームの符号量が少ない場合には、映像デコーダバッファ占有量B(i)が映像デコーダバッファサイズBmax(i)よりも大きくなるという映像デコーダバッファのオーバーフローが起こる。つまり、映像フレームi−1の伝送終了時刻が映像フレームiのエンコード終了時刻よりも前になるということが起こることで、フィラーデータを挿入しないと、映像フレームiの伝送開始が早すぎてしまうということが起こる。   On the other hand, when the code amount of the video frame so far is small, the video decoder buffer overflows such that the video decoder buffer occupation amount B (i) becomes larger than the video decoder buffer size Bmax (i). That is, the transmission end time of the video frame i-1 occurs before the encoding end time of the video frame i, and if the filler data is not inserted, the transmission start of the video frame i is too early. Things happen.

これから、映像デコーダバッファサイズBmax(i)と映像デコーダバッファ占有量B(i)との大小比較を行うことで、映像デコーダバッファがオーバーフローするのか否かを判定できることになる。   From this, it is possible to determine whether or not the video decoder buffer overflows by comparing the video decoder buffer size Bmax (i) with the video decoder buffer occupation amount B (i).

このようにして、この2つの大小比較処理に従って、バッファ検定を行うことで、映像デコーダバッファがアンダーフローするのかということと、映像デコーダバッファがオーバーフローするのかということを判定できることになる。   In this way, it is possible to determine whether the video decoder buffer underflows and whether the video decoder buffer overflows by performing the buffer test according to the two size comparison processes.

前述した映像デコーダバッファサイズBmax(i)の定義から分かるように、映像と音声とを多重化して一定のビットレートで伝送するという構成を採るときに、音声フレームの符号量が変動しない場合には、“Bmax(i)=Bmax(i+1)”というように、映像デコーダバッファサイズBmax(p)は変動しない。一方、前述した映像デコーダバッファ占有量B(i)の定義から分かるように、音声フレームの符号量が変動しない場合でも、映像フレームiの発生符号量S(i)に応じて“B(i)≠B(i+1)”となることから、映像デコーダバッファ占有量B(p)は変動する。   As can be seen from the definition of the video decoder buffer size Bmax (i) described above, when the configuration is such that video and audio are multiplexed and transmitted at a constant bit rate, the code amount of the audio frame does not vary. The video decoder buffer size Bmax (p) does not vary as “Bmax (i) = Bmax (i + 1)”. On the other hand, as can be seen from the definition of the video decoder buffer occupancy B (i) described above, even if the code amount of the audio frame does not vary, “B (i)” depends on the generated code amount S (i) of the video frame i. ≠ B (i + 1) ”, the video decoder buffer occupation amount B (p) varies.

そこで、バッファ検定では、映像フレームiの発生符号量S(i)が決まると、図3の中段に示すように、
B(i)−S(i)=B* (i)
を求めて、図3の後段に示すように、
* (i)+R/P=B(i+1)
を算出することにより、映像デコーダバッファサイズBmax(i+1)を更新するようにしている。ここで、Rは映像の伝送ビットレート、Pは映像フレームレートを表している。
Therefore, in the buffer test, when the generated code amount S (i) of the video frame i is determined, as shown in the middle part of FIG.
B (i) -S (i) = B * (i)
As shown in the latter part of FIG.
B * (i) + R / P = B (i + 1)
By calculating, the video decoder buffer size Bmax (i + 1) is updated. Here, R represents a video transmission bit rate, and P represents a video frame rate.

〔3〕本実施形態例の実行する処理
次に、本実施形態例に係る映像・音声符号化伝送装置の実行する処理について説明する。まず最初に、図4に従って、本実施形態例に係る映像・音声符号化伝送装置の実行する処理について簡単に説明する。
[3] Processing Performed by the Present Embodiment The processing performed by the video / audio encoding / transmission apparatus according to the present embodiment will now be described. First, a process executed by the video / audio encoding / transmission apparatus according to the present embodiment will be briefly described with reference to FIG.

本実施形態例に係る映像・音声符号化伝送装置では、図2のβの個所で示すとともに、図4の上段に示すように、映像フレームに対応付けられる音声フレームの符号化データをその映像フレームの符号化データよりも先に伝送するように処理する。   In the video / audio encoding / transmission apparatus according to the present embodiment, the encoded data of the audio frame associated with the video frame is shown in the video frame as indicated by the position β in FIG. It is processed so that it is transmitted before the encoded data.

このようにして、音声の符号化データを映像の符号化データよりも先に伝送しているときに、前述したバッファ検定に従って、図4の中段に示すように、映像フレームiの符号化データを伝送すると映像デコーダバッファがアンダーフローするということを検出すると、図4の下段に示すように、映像フレームiと同時に伝送することになる音声フレーム(図4の例では音声フレームj+5)の符号化データの伝送を停止することで、そのアンダーフローを回避するように処理する。   In this way, when the audio encoded data is transmitted prior to the video encoded data, the encoded data of the video frame i is converted according to the buffer test described above, as shown in the middle of FIG. When it is detected that the video decoder buffer underflows when transmitted, the encoded data of the audio frame (audio frame j + 5 in the example of FIG. 4) to be transmitted simultaneously with the video frame i as shown in the lower part of FIG. By stopping the transmission, the processing is performed to avoid the underflow.

そして、そのアンダーフローを回避すると、音声の符号化データの伝送を一時的に停止させたことにより音声の符号化データの伝送タイミングが遅れているので、音声の符号化データの伝送を再開する際に、例えば5つの音声フレームについて伝送ビットレートを上げ、それに対応した映像フレームについて伝送ビットレートを下げることで、音声の伝送タイミングの遅れを取り戻すように処理する。   If the underflow is avoided, the transmission of the encoded audio data is delayed because the transmission of the encoded audio data is temporarily stopped. In addition, for example, the transmission bit rate is increased for five audio frames, and the transmission bit rate is decreased for the video frames corresponding to the five audio frames, thereby processing to recover the delay of the audio transmission timing.

この構成に従って、従来技術では、映像デコーダバッファがアンダーフローとなる場合に、映像フレームiの符号量を抑制することでアンダーフローを回避するようにしていたのに対して、本実施形態例に係る映像・音声符号化伝送装置では、映像フレームiの符号量を抑制することなくアンダーフローを回避することができるようになるので、伝送映像の画質の低下を招くことなくアンダーフローを回避することができるようになる。   According to this configuration, in the conventional technique, when the video decoder buffer is underflowed, the underflow is avoided by suppressing the code amount of the video frame i. In the video / audio encoding / transmission apparatus, underflow can be avoided without suppressing the code amount of the video frame i, and therefore, underflow can be avoided without causing deterioration in image quality of the transmitted video. become able to.

図5〜図7に、本実施形態例に係る映像・音声符号化伝送装置の備える映像符号化部10の実行するフローチャートを図示する。次に、これらのフローチャートに従って、映像符号化部10の実行する処理について詳細に説明する。   5 to 7 show flowcharts executed by the video encoding unit 10 included in the video / audio encoding / transmission apparatus according to this embodiment. Next, the processing executed by the video encoding unit 10 will be described in detail according to these flowcharts.

映像符号化部10は、図5〜図7のフローチャートに示すように、まず最初に、ステップS101で、GOP内のフレーム数をN、映像伝送ビットレートをR、映像フレームレートをPで表すならば、q番目のGOP(group of pictures)であるGOP(q)の目標符号量G(q)を、
G(q)=N×(R/P)+前のGOPからの繰越符号量
という式に従って算出する。
As shown in the flowcharts of FIGS. 5 to 7, the video encoding unit 10 first represents the number of frames in the GOP as N, the video transmission bit rate as R, and the video frame rate as P in step S101. For example, the target code amount G (q) of GOP (q) which is the qth GOP (group of pictures) is
Calculation is performed according to the equation: G (q) = N × (R / P) + carry code amount from previous GOP.

続いて、ステップS102で、下記の参考文献などに記載される方法に従って、GOP(q)の目標符号量G(q)を今後のNフレームに対して配分して、次フレームの目標符号量T(i)を求める。   Subsequently, in step S102, the target code amount G (q) of GOP (q) is allocated to future N frames according to the method described in the following references and the like, and the target code amount T of the next frame is determined. (I) is determined.

〔参考文献〕International Organisation for Standardisation, Test Model Editing Committee, 1993. Test Model5. April, ISO-IEC/JTC1/SC29/WG11/N0400
続いて、ステップS103で、バッファ検定に従い、次フレームの目標符号量T(i)が映像デコーダバッファ占有量B(i)よりも小さいのか否かを判断する。すなわち、
T(i)<B(i)
が成立するのか否かを判断するのである。
[References] International Organization for Standardisation, Test Model Editing Committee, 1993. Test Model 5. April, ISO-IEC / JTC1 / SC29 / WG11 / N0400
Subsequently, in step S103, it is determined whether the target code amount T (i) of the next frame is smaller than the video decoder buffer occupation amount B (i) according to the buffer test. That is,
T (i) <B (i)
It is judged whether or not is established.

このステップS103の判断処理に従って、次フレームの目標符号量T(i)が映像デコーダバッファ占有量B(i)よりも小さいことを判断するとき、すなわち、映像デコーダバッファがアンダーフローしないことを判断するときには、ステップS104に進んで、目標符号量T(i)に従って映像フレームiを符号化する。なお、このとき、指定があるときには、フィールド単位で符号化することになる。   According to the determination process in step S103, when it is determined that the target code amount T (i) of the next frame is smaller than the video decoder buffer occupation amount B (i), that is, it is determined that the video decoder buffer does not underflow. Sometimes, the process proceeds to step S104, and the video frame i is encoded according to the target code amount T (i). At this time, if specified, encoding is performed in field units.

続いて、ステップS105で、図3で説明したように、映像デコーダバッファ占有量B(i)からフレーム発生符号量S(i)を減算することでB* (i)を算出する。すなわち、図3に記載するB* (i)
* (i)=B(i)−S(i)
を算出するのである。
Subsequently, in step S105, as described in FIG. 3, B * (i) is calculated by subtracting the frame generation code amount S (i) from the video decoder buffer occupation amount B (i). That is, B * (i) described in FIG.
B * (i) = B (i) -S (i)
Is calculated.

続いて、ステップS106で、映像デコーダバッファ占有量を更新することで、次の映像フレームi+1についての映像デコーダバッファ占有量B(i+1)を求める。すなわち、図3に記載するように、
B(i+1)=B* (i)+(R/P)
を算出するのである。
In step S106, the video decoder buffer occupation amount B (i + 1) for the next video frame i + 1 is obtained by updating the video decoder buffer occupation amount. That is, as described in FIG.
B (i + 1) = B * (i) + (R / P)
Is calculated.

続いて、ステップS107で、バッファ検定に従い、映像デコーダバッファ占有量B(i+1)が映像デコーダバッファサイズBmax(i+1)よりも大きいのか否かを判断する。すなわち、
B(i+1)>Bmax(i+1)
が成立するのか否かを判断するのである。
Subsequently, in step S107, it is determined whether the video decoder buffer occupation amount B (i + 1) is larger than the video decoder buffer size Bmax (i + 1) according to the buffer test. That is,
B (i + 1)> Bmax (i + 1)
It is judged whether or not is established.

このステップS107の判断処理に従って、映像デコーダバッファ占有量B(i+1)が映像デコーダバッファサイズBmax(i+1)よりも大きいことを判断するとき、すなわち、映像デコーダバッファがオーバーフローすることを判断するときには、ステップS108に進んで、
F(i)=B(i+1)−Bmax(i+1)
により算出される超過分のフィラーデータF(i)を挿入するとともに、
B(i+1)←B(i+1)−F(i)=Bmax(i+1)
に従って、映像デコーダバッファ占有量B(i+1)を更新する。
When it is determined that the video decoder buffer occupancy B (i + 1) is larger than the video decoder buffer size Bmax (i + 1) according to the determination process of step S107, that is, when it is determined that the video decoder buffer overflows, Proceed to S108
F (i) = B (i + 1) −Bmax (i + 1)
Insert the filler data F (i) of excess calculated by
B (i + 1) ← B (i + 1) −F (i) = Bmax (i + 1)
Accordingly, the video decoder buffer occupation amount B (i + 1) is updated.

続いて、ステップS109で、映像フレームの番号を指定する変数iの値を1つインクリメントし、続くステップS110で、符号化処理中のGOPの符号化が終了したのか否かを判断して、符号化処理中のGOPの符号化が終了していないことを判断するときには、ステップS102の処理に戻り、符号化処理中のGOPの符号化が終了したことを判断するときには、次のGOPを符号化すべくステップS101の処理に戻る。   Subsequently, in step S109, the value of the variable i that specifies the number of the video frame is incremented by one. In the subsequent step S110, it is determined whether or not the encoding of the GOP being encoded has been completed. When it is determined that the encoding of the GOP being encoded is not completed, the process returns to step S102, and when it is determined that the encoding of the GOP being encoded is completed, the next GOP is encoded. Accordingly, the process returns to step S101.

一方、ステップS107の判断処理に従って、映像デコーダバッファ占有量B(i+1)が映像デコーダバッファサイズBmax(i+1)よりも小さいことを判断するときには、映像デコーダバッファがオーバーフローしないことを判断して、ステップS108の処理を行うことなく直ちにステップS109の処理に進んで、映像フレームの番号を指定する変数iの値を1つインクリメントし、続くステップS110で、符号化処理中のGOPの符号化が終了したのか否かを判断して、符号化処理中のGOPの符号化が終了していないことを判断するときには、ステップS102の処理に戻り、符号化処理中のGOPの符号化が終了したことを判断するときには、次のGOPを符号化すべくステップS101の処理に戻る。   On the other hand, when it is determined that the video decoder buffer occupation amount B (i + 1) is smaller than the video decoder buffer size Bmax (i + 1) according to the determination process in step S107, it is determined that the video decoder buffer does not overflow, and step S108 is performed. Immediately without proceeding to step S109, the process proceeds to step S109, where the value of the variable i that designates the number of the video frame is incremented by one. In step S110, whether the encoding of the GOP being encoded has been completed. If it is determined whether or not the GOP encoding during the encoding process has not been completed, the process returns to step S102 to determine that the GOP encoding during the encoding process has ended. Sometimes, the process returns to step S101 to encode the next GOP.

このようにして、映像符号化部10は、映像デコーダバッファがアンダーフローしない場合には、ステップS101〜ステップS110の処理を繰り返していくことで、従来技術と同様の処理に従って、映像フレームの符号化データを生成していくように制御することになる。   In this way, when the video decoder buffer does not underflow, the video encoding unit 10 repeats the processes of steps S101 to S110, thereby encoding the video frame according to the same process as in the prior art. It will be controlled to generate data.

一方、ステップS103の判断処理に従って、次フレームの目標符号量T(i)が映像デコーダバッファ占有量B(i)よりも大きいことを判断するとき、すなわち、映像デコーダバッファがアンダーフローする状態(図4の中段に示す状態)になることを判断するときには、ステップS111に進んで、伝送を停止する音声フレームの個数を指定する変数nに初期値の1をセットする。   On the other hand, when it is determined that the target code amount T (i) of the next frame is larger than the video decoder buffer occupation amount B (i) according to the determination process in step S103, that is, the video decoder buffer underflows (see FIG. 4), the process proceeds to step S111, and an initial value 1 is set to a variable n that designates the number of voice frames for which transmission is to be stopped.

続いて、ステップS112で、図4に示す映像フレームiのデコード開始時刻DTS(i)から遡るn音声フレーム目の伝送開始時刻が、映像フレーム(i−1)の伝送開始時刻τ(i−1)よりも後であるのか否かを判断する。すなわち、
τ(i−1)≦DTS(i)−n/P
が成立するのか否かを判断するのである。
Subsequently, in step S112, the transmission start time of the nth audio frame going back from the decoding start time DTS (i) of the video frame i shown in FIG. 4 is the transmission start time τ (i−1) of the video frame (i−1). ) And later. That is,
τ (i−1) ≦ DTS (i) −n / P
It is judged whether or not is established.

このステップS112の判断処理に従って、映像フレームiのデコード開始時刻DTS(i)から遡るn音声フレーム目の伝送開始時刻が、映像フレーム(i−1)の伝送開始時刻τ(i−1)よりも後であることを判断するときには、ステップS113に進んで、音声符号化データnフレーム分の符号量がバッファ超過分の符号量以上であるのか否かを判断する。すなわち、1音声フレーム分の符号化データの符号量をAudio-frame-bitで表すならば、
n×Audio-frame-bit≧T(i)−B(i)
が成立するのか否かを判断するのである。
According to the determination process in step S112, the transmission start time of the nth audio frame that goes back from the decoding start time DTS (i) of the video frame i is greater than the transmission start time τ (i-1) of the video frame (i-1). When it is determined later, the process proceeds to step S113, and it is determined whether or not the code amount for n frames of audio encoded data is greater than or equal to the code amount for the buffer excess. That is, if the code amount of encoded data for one audio frame is represented by Audio-frame-bit,
n × Audio-frame-bit ≧ T (i) −B (i)
It is judged whether or not is established.

このステップS113の判断処理に従って、音声符号化データnフレーム分の符号量がバッファ超過分の符号量以上ではないことを判断するときには、ステップS114に進んで、変数nの値を1つインクリメントしてから、ステップS112の処理に戻る。   When it is determined in accordance with the determination process in step S113 that the code amount for the n frames of audio encoded data is not equal to or greater than the code amount for the buffer excess, the process proceeds to step S114, and the value of the variable n is incremented by one. Then, the process returns to step S112.

このステップS112〜ステップS114の処理について説明するならば、要するに、この処理では、何個の音声フレームの伝送を停止させればバッファ超過分の“T(i)−B(i)”という符号量をバッファを超過させない形(アンダーフローが発生しない形)で伝送できることになるのかということを探索するようにしている。そして、この探索にあたって、映像フレームiのデコード開始時刻DTS(i)から遡るn音声フレーム目の伝送開始時刻が、映像フレーム(i−1)の伝送開始時刻τ(i−1)よりも前になると、伝送タイミングが決定済みの映像フレーム(i−1)に対して影響を与えることになってしまうので、そこまで遡ることは認めないようにするという条件を課して、この探索を行うようにしている。   If the processing of step S112 to step S114 is described, in short, in this processing, if the transmission of how many audio frames is stopped, the code amount “T (i) −B (i)” that is excess of the buffer Is searched for whether it can be transmitted in a form that does not exceed the buffer (a form in which underflow does not occur). In this search, the transmission start time of the nth audio frame that goes back from the decoding start time DTS (i) of the video frame i is before the transmission start time τ (i−1) of the video frame (i−1). Then, since the transmission timing will be affected to the determined video frame (i-1), this search is performed under the condition that it is not allowed to go back to that point. I have to.

このようにして、ステップS112〜ステップS114の処理を繰り返していくときに、ステップS112で、映像フレームiのデコード開始時刻DTS(i)から遡るn音声フレーム目の伝送開始時刻が、映像フレーム(i−1)の伝送開始時刻τ(i−1)よりも前であることを判断すると、ステップS115に進んで、次フレームの目標符号量T(i)を、映像デコーダバッファ占有量B(i)に音声フレーム(n−1)分の符号量を加算した値でクリッピングする。   In this way, when the processing of step S112 to step S114 is repeated, in step S112, the transmission start time of the nth audio frame that goes back from the decoding start time DTS (i) of the video frame i is the video frame (i If it is determined that the transmission start time τ (i−1) before −1) is reached, the process proceeds to step S115, and the target code amount T (i) of the next frame is determined as the video decoder buffer occupation amount B (i). Is clipped with a value obtained by adding the code amount for the audio frame (n−1) to the above.

以下、説明の便宜上、伝送を停止する音声フレームの個数をnと記載することで統一する。これから、ステップS115では、次フレームの目標符号量T(i)を、
T(i)=B(i)+n×Audio-frame-bit
でクリッピングすることで説明する。
Hereinafter, for convenience of explanation, the number of voice frames whose transmission is to be stopped is described as n. In step S115, the target code amount T (i) of the next frame is
T (i) = B (i) + n × Audio-frame-bit
It will be explained by clipping with.

このクリッピングの意味するところは、ステップS115の処理に入ってくるということは、バッファ超過分“T(i)−B(i)”を完全にカバーできるところまで音声フレームを停止させることはできないので、遡ることが可能なところまでの数の音声フレームを停止させて、それでも残るバッファ超過分については目標符号量T(i)を減らして対処する、という考え方に基づいてクリッピングを行うことにある。   The meaning of this clipping is that the processing enters step S115 because the audio frame cannot be stopped until the buffer excess “T (i) -B (i)” can be completely covered. Clipping is performed based on the idea that the number of audio frames that can be traced is stopped and the remaining buffer excess is dealt with by reducing the target code amount T (i).

ステップS115の処理を終了し、また、ステップS113の判断処理に従って、音声符号化データnフレーム分の符号量がバッファ超過分の符号量以上であることを判断すると、ステップS116に進んで、目標符号量T(i)に従って映像フレームiを符号化する。なお、このとき、指定があるときには、フィールド単位で符号化することになる。   When the process of step S115 is completed and it is determined that the code amount for the n frames of audio encoded data is equal to or greater than the code amount for the buffer excess according to the determination process of step S113, the process proceeds to step S116, and the target code Video frame i is encoded according to the quantity T (i). At this time, if specified, encoding is performed in field units.

続いて、ステップS117で、音声符号化部20および多重化部30に対して、映像フレームiのデコード開始時刻DTS(i)から遡るn音声フレームの伝送を停止することを伝達する。   In step S117, the audio encoding unit 20 and the multiplexing unit 30 are informed that transmission of n audio frames going back from the decoding start time DTS (i) of the video frame i is stopped.

この伝達を受けて、音声符号化部20および多重化部30は、映像フレームiのデコード開始時刻DTS(i)から遡るn音声フレームの伝送を停止させ、これにより、図4の下段に示すように、映像デコーダバッファのアンダーフローが回避されることになる。   In response to this transmission, the audio encoding unit 20 and the multiplexing unit 30 stop the transmission of the n audio frames going back from the decoding start time DTS (i) of the video frame i, and as shown in the lower part of FIG. In addition, underflow of the video decoder buffer is avoided.

続いて、ステップS118で、n×Audio-frame-bit分の符号量が利用可能な符号量として音声符号化側から映像符号化側に渡されたことに対応して、映像デコーダバッファ占有量B(i)および映像デコーダバッファサイズBmax(i)を修正する。すなわち、
B(i) ←B(i)+n×Audio-frame-bit
Bmax(i)←Bmax(i)+n×Audio-frame-bit
という式に従って、映像デコーダバッファ占有量B(i)および映像デコーダバッファサイズBmax(i)を修正するのである。
Subsequently, in step S118, the video decoder buffer occupancy amount B corresponds to the fact that the code amount for n × Audio-frame-bit is passed from the audio encoding side to the video encoding side as an available code amount. (I) and the video decoder buffer size Bmax (i) are corrected. That is,
B (i) ← B (i) + n × Audio-frame-bit
Bmax (i) ← Bmax (i) + n × Audio-frame-bit
The video decoder buffer occupancy B (i) and the video decoder buffer size Bmax (i) are corrected according to the following equation.

続いて、ステップS119で、音声符号化部20および多重化部30に対して、音声伝送ビットレートを、映像フレームiのデコード開始時刻DTS(i)から予め設定されるA個の音声フレーム期間に渡って、
C=(n/A)×通常時の音声伝送ビットレート
という一定量Cだけ、通常時の音声伝送ビットレートから上げることを伝達する。
Subsequently, in step S119, for the audio encoding unit 20 and the multiplexing unit 30, the audio transmission bit rate is set to A audio frame periods set in advance from the decoding start time DTS (i) of the video frame i. Across
It conveys that the normal audio transmission bit rate is increased by a certain amount C, C = (n / A) × normal audio transmission bit rate.

すなわち、n個の音声フレームの伝送を一時的に停止させたことにより音声の伝送タイミングが遅れているので、音声フレームの伝送を再開する際に、A個の音声フレームについて伝送ビットレートを上げ、それに対応した映像フレームについて伝送ビットレートを下げることで、音声の伝送タイミングの遅れを取り戻すように処理するのである。図4では、n=1、A=5を想定して図示している。   That is, since the transmission timing of the voice is delayed because the transmission of the n audio frames is temporarily stopped, when the transmission of the audio frame is resumed, the transmission bit rate is increased for the A audio frames, The video frame corresponding thereto is processed so as to recover the delay in the audio transmission timing by lowering the transmission bit rate. In FIG. 4, it is assumed that n = 1 and A = 5.

続いて、ステップS120で、ステップS102のところで記載した参考文献などに記載される方法に従って、GOP(q)の目標符号量G(q)を今後のNフレームに対して配分して、次フレームの目標符号量T(i)を求める。   Subsequently, in step S120, the target code amount G (q) of GOP (q) is allocated to future N frames according to the method described in the reference document described in step S102, and the next frame. A target code amount T (i) is obtained.

続いて、ステップS121で、次フレームの目標符号量T(i)が映像デコーダバッファ占有量B(i)以上である場合には、次フレームの目標符号量T(i)をそのB(i)でクリッピングする。すなわち、
T(i)←min(T(i),B(i))
というようにクリッピングするのである。
Subsequently, in step S121, when the target code amount T (i) of the next frame is equal to or larger than the video decoder buffer occupation amount B (i), the target code amount T (i) of the next frame is set to B (i). Clip with. That is,
T (i) ← min (T (i), B (i))
Clip it like this.

この処理段階では、一度音声フレームの伝送を停止させた後、その停止による伝送タイミングの遅れを取り戻すべく非通常時の複雑な伝送処理を行っている最中であり、これから、この処理段階で映像デコーダバッファがアンダーフローすることになったとしても、再度音声フレームの伝送を停止させるような複雑な処理は行わないで、次フレームの目標符号量T(i)を映像デコーダバッファ占有量B(i)でクリッピングするように処理するのである。   In this processing stage, once transmission of the audio frame is stopped, complex transmission processing in an unusual time is being performed in order to recover the delay in transmission timing due to the stop. Even if the decoder buffer underflows, the target code amount T (i) of the next frame is calculated as the video decoder buffer occupancy B (i) without performing complicated processing for stopping transmission of the audio frame again. ) To perform clipping.

続いて、ステップS122で、目標符号量T(i)に従って映像フレームiを符号化する。なお、このとき、指定があるときには、フィールド単位で符号化することになる。   Subsequently, in step S122, the video frame i is encoded according to the target code amount T (i). At this time, if specified, encoding is performed in field units.

続いて、ステップS123で、図3で説明したように、映像デコーダバッファ占有量B(i)からフレーム発生符号量S(i)を減算することでB* (i)を算出する。すなわち、図3に記載するB* (i)
* (i)=B(i)−S(i)
を算出するのである。
Subsequently, in step S123, as described in FIG. 3, B * (i) is calculated by subtracting the frame generation code amount S (i) from the video decoder buffer occupation amount B (i). That is, B * (i) described in FIG.
B * (i) = B (i) -S (i)
Is calculated.

続いて、ステップS124で、映像デコーダバッファサイズを更新することで、次の映像フレームi+1についての映像デコーダバッファサイズBmax(i+1)を求める。前述したように、音声フレームの伝送ビットレートが変動しない場合には、映像デコーダバッファサイズBmax(p)は変動しない値となる。しかしながら、音声フレームの伝送ビットレートが変動している場合には、図8に示すように、映像デコーダバッファサイズBmax(p)も変動することになる。   In step S124, the video decoder buffer size Bmax (i + 1) for the next video frame i + 1 is obtained by updating the video decoder buffer size. As described above, when the transmission bit rate of the audio frame does not vary, the video decoder buffer size Bmax (p) is a value that does not vary. However, when the transmission bit rate of the audio frame varies, the video decoder buffer size Bmax (p) also varies as shown in FIG.

これから、このステップS124では、
Bmax(i+1)=Bmax(i)− delta_R(i)/P
という式に従って、次の映像フレームi+1についての映像デコーダバッファサイズBmax(i+1)を更新するのである。
From now on, in this step S124,
Bmax (i + 1) = Bmax (i) -delta_R (i) / P
The video decoder buffer size Bmax (i + 1) for the next video frame i + 1 is updated according to the following formula.

ここで、 delta_R(i)は、
delta_R(i)=
“DTS(i−1)〜DTS(i)間の映像伝送ビットレート”
−“DTS(i−1)−D〜DTS(i)−D間の映像伝送ビットレート”
で定義される。
Where delta_R (i) is
delta_R (i) =
"Video transmission bit rate between DTS (i-1) and DTS (i)"
-"Video transmission bit rate between DTS (i-1) -D to DTS (i) -D"
Defined by

この delta_R(i)に記載される“DTS(i−1)〜DTS(i)間の映像伝送ビットレート”とは、図8で説明するならば、図8の中段に示す映像伝送ビットレートxに相当するものである。また、この delta_R(i)に記載される“DTS(i−1)−D〜DTS(i)−D間の映像伝送ビットレート”とは、図8で説明するならば、図8の中段に示す映像伝送ビットレートyに相当するものである。また、この delta_R(i)に記載されるDは、図8中に記載するように、映像フレームiのエンコード終了時刻からデコード開始時刻までの時間を映像フレーム数に換算した値(図8の例ではD=6)である。   The “video transmission bit rate between DTS (i−1) to DTS (i)” described in delta_R (i) is the video transmission bit rate x shown in the middle of FIG. It is equivalent to. In addition, the “video transmission bit rate between DTS (i−1) -D to DTS (i) -D” described in delta_R (i) is the middle part of FIG. This corresponds to the video transmission bit rate y shown. Further, D described in delta_R (i) is a value obtained by converting the time from the encoding end time of video frame i to the decoding start time into the number of video frames as shown in FIG. 8 (example in FIG. 8). Then, D = 6).

続いて、ステップS125で、映像デコーダバッファ占有量を更新することで、次の映像フレームi+1についての映像デコーダバッファ占有量B(i+1)を求める。このとき、音声の伝送ビットレートが通常時のものからCだけ増えていることから、ステップS106の処理とは異なって、
B(i+1)=B* (i)+((R−C)/P)
という式に従って、映像デコーダバッファ占有量B(i+1)を更新することになる。
Subsequently, in step S125, the video decoder buffer occupation amount B (i + 1) for the next video frame i + 1 is obtained by updating the video decoder buffer occupation amount. At this time, since the audio transmission bit rate is increased by C from the normal one, unlike the processing of step S106,
B (i + 1) = B * (i) + ((R−C) / P)
The video decoder buffer occupancy B (i + 1) is updated according to the following equation.

続いて、ステップS126で、デコーダ検定に従って、映像デコーダバッファがオーバーフローするのか否かを判断して、映像デコーダバッファがオーバーフローすることを判断するときには、
F(i)=max(0,B(i+1)−Bmax(i+1))
により算出される超過分のフィラーデータF(i)を挿入するとともに、
B(i+1)←B(i+1)−F(i)=Bmax(i+1)
に従って、映像デコーダバッファ占有量B(i+1)を更新する。
Subsequently, when it is determined in step S126 whether the video decoder buffer overflows according to the decoder test, the video decoder buffer overflows.
F (i) = max (0, B (i + 1) −Bmax (i + 1))
Insert the filler data F (i) of excess calculated by
B (i + 1) ← B (i + 1) −F (i) = Bmax (i + 1)
Accordingly, the video decoder buffer occupation amount B (i + 1) is updated.

続いて、ステップS127で、映像フレームの番号を指定する変数iの値を1つインクリメントし、続くステップS128で、映像フレームiの伝送開始時刻が音声伝送ビットレートを上げている期間内であるのか否かを判断する。   Subsequently, in step S127, the value of the variable i designating the video frame number is incremented by one. In the subsequent step S128, is the transmission start time of the video frame i within the period during which the audio transmission bit rate is increased? Judge whether or not.

このステップS128の判断処理に従って、映像フレームiの伝送開始時刻が音声伝送ビットレートを上げている期間内であることを判断するときには、ステップS129に進んで、符号化処理中のGOPの符号化が終了したのか否かを判断して、符号化処理中のGOPの符号化が終了していないことを判断するときには、ステップS120の処理に戻り、符号化処理中のGOPの符号化が終了したことを判断するときには、続くステップS130で、次のGOPを処理すべくGOP初期化処理を実行してから、ステップS120の処理に戻る。   When it is determined that the transmission start time of the video frame i is within the period in which the audio transmission bit rate is increased according to the determination process of step S128, the process proceeds to step S129, and the GOP being encoded is encoded. If it is determined whether or not the GOP encoding during the encoding process is not completed, the process returns to step S120, and the GOP encoding during the encoding process is completed. In step S130, a GOP initialization process is executed to process the next GOP, and the process returns to step S120.

一方、ステップS128の判断処理に従って、映像フレームiの伝送開始時刻が音声伝送ビットレートを上げている期間内ではないことを判断するときには、符号化処理中のGOPの符号化が終了したのか否かを判断して、符号化処理中のGOPの符号化が終了していないことを判断するときには、ステップS102の処理に戻り、符号化処理中のGOPの符号化が終了したことを判断するときには、次のGOPを符号化すべくステップS101の処理に戻る。   On the other hand, when it is determined that the transmission start time of the video frame i is not within the period in which the audio transmission bit rate is increased according to the determination process in step S128, whether or not the GOP encoding during the encoding process has ended. When it is determined that the encoding of the GOP being encoded has not been completed, the process returns to step S102, and when it is determined that the encoding of the GOP being encoded has been completed, The process returns to step S101 to encode the next GOP.

このようにして、映像符号化部10は、図5〜図7のフローチャートを実行することで、音声フレームの符号化データを映像フレームの符号化データよりも先に伝送しつつ、映像デコーダバッファがアンダーフローすることを検出すると、音声フレームの符号化データの伝送を停止することで、そのアンダーフローを回避して、その後、音声フレームの符号化データの伝送ビットレートを通常時よりも上げることで音声の伝送タイミングの遅れを取り戻すように処理する。   In this manner, the video encoding unit 10 executes the flowcharts of FIGS. 5 to 7 to transmit the encoded data of the audio frame before the encoded data of the video frame, while the video decoder buffer When underflow is detected, the transmission of the encoded data of the audio frame is stopped to avoid the underflow, and then the transmission bit rate of the encoded data of the audio frame is increased from the normal time. Processing is performed to recover the delay in the transmission timing of the voice.

この処理に従って、映像の符号量を抑制することなく映像デコーダバッファがアンダーフローを回避することができるようになるので、伝送映像の画質の低下を招くことなくアンダーフローを回避することができるようになる。   According to this processing, the video decoder buffer can avoid underflow without suppressing the video code amount, so that underflow can be avoided without degrading the image quality of the transmitted video. Become.

以上、図示実施形態例に従って本発明を説明したが、本発明はこれに限定されるものではない。例えば、実施形態例では、映像デコーダバッファがアンダーフローすることを検出すると、音声フレームの符号化データの伝送を停止することで、そのアンダーフローを回避するようにしたが、伝送停止まで実行するのではなくて、音声フレームの符号化データの伝送ビットレートを下げることで、そのアンダーフローを回避するようにしてもよい。   As mentioned above, although this invention was demonstrated according to the example of illustration embodiment, this invention is not limited to this. For example, in the embodiment, when the underflow of the video decoder buffer is detected, the transmission of the encoded data of the audio frame is stopped to avoid the underflow. Instead, the underflow may be avoided by lowering the transmission bit rate of the encoded data of the audio frame.

本発明は、映像符号化データと音声符号化データとを多重化して一定のビットレートで伝送する場合に適用できるものであり、本発明を適用することで、伝送遅延を長くすることなく伝送映像の画質の向上を実現できるようになるとともに、伝送映像の画質の劣化を招くことなしに伝送遅延を短くすることを実現できるようになる。   The present invention can be applied when video encoded data and audio encoded data are multiplexed and transmitted at a constant bit rate. By applying the present invention, transmission video can be transmitted without increasing transmission delay. The image quality can be improved, and the transmission delay can be shortened without deteriorating the image quality of the transmitted video.

本発明の一実施形態例である。1 is an example embodiment of the present invention. 本発明の実行する伝送処理の説明図である。It is explanatory drawing of the transmission process which this invention performs. バッファ検定の説明図である。It is explanatory drawing of a buffer test | inspection. 本発明の実行する伝送処理の説明図である。It is explanatory drawing of the transmission process which this invention performs. 映像符号化部の実行するフローチャートである。It is a flowchart which a video encoding part performs. 映像符号化部の実行するフローチャートである。It is a flowchart which a video encoding part performs. 映像符号化部の実行するフローチャートである。It is a flowchart which a video encoding part performs. 映像デコーダバッファサイズの変動の説明図である。It is explanatory drawing of the fluctuation | variation of a video decoder buffer size.

符号の説明Explanation of symbols

10 映像符号化部
11 映像フレーム符号化部
12 映像符号化制御部
13 出力バッファ
20 音声符号化部
30 多重化部
120 符号化制御実行部
121 バッファ検定部
1200 フレーム目標符号量算出部
1201 フレーム目標符号量決定部
1202 アンダーフロー・オーバーフロー発生判断部
1203 伝送レート変更制御部
1204 伝送レート復帰制御部
1210 デコーダバッファサイズ処理部
1211 デコーダバッファ占有量処理部
1212 フィラーデータ量決定部
DESCRIPTION OF SYMBOLS 10 Video encoding part 11 Video frame encoding part 12 Video encoding control part 13 Output buffer 20 Audio | voice encoding part 30 Multiplexing part 120 Encoding control execution part 121 Buffer verification part 1200 Frame target code amount calculation part 1201 Frame target code Amount determining unit 1202 Underflow / overflow occurrence determining unit 1203 Transmission rate change control unit 1204 Transmission rate return control unit 1210 Decoder buffer size processing unit 1211 Decoder buffer occupancy processing unit 1212 Filler data amount determining unit

Claims (6)

映像符号化データと音声符号化データとを多重化して一定のビットレートで伝送するとともに、その伝送にあたって、少なくとも複数音声フレーム分の音声符号化データを映像符号化データよりも時間的に先に伝送することを制御する映像・音声ストリーム伝送制御方法であって、
映像を符号化する場合の第i番目の映像フレームの目標符号量T(i)と映像デコードバッファのバッファ占有量B(i)とにより前記映像デコーダバッファのアンダーフローが発生する状態となったのか否かを判断する過程と、
前記アンダーフローが発生する状態となったことを判断するときに、前記第i番目の映像フレームのデコード開始時刻から遡るn音声フレーム目の伝送開始時刻が第i−1番目の映像フレームの伝送開始時刻より前にならないという条件のもとで、n音声フレーム分の符号量が前記目標符号量T(i)と前記バッファ占有量B(i)との差以上になる最も小さいnの値を算出する過程と、
前記条件のもとでnの値が算出された場合に、前記n音声フレーム分の音声符号化データの伝送を停止させて映像符号化データのみを伝送させることで、映像符号化データの伝送ビットレートを上げ、前記アンダーフローの発生を回避する過程と、
前記アンダーフローの発生を回避した後、所定の期間内に、音声符号化データおよび映像符号化データの伝送ビットレートを前記一定のビットレートのときの伝送ビットレートに復帰させる過程とを備えることを、
特徴とする映像・音声ストリーム伝送制御方法。
Video encoded data and audio encoded data are multiplexed and transmitted at a constant bit rate, and at the time of transmission, audio encoded data for at least a plurality of audio frames is transmitted earlier in time than video encoded data. A video / audio stream transmission control method for controlling
Whether the video decoder buffer underflow occurs due to the target code amount T (i) of the i-th video frame and the buffer occupancy B (i) of the video decode buffer when the video is encoded. The process of determining whether or not,
When it is determined that the underflow has occurred, the transmission start time of the nth audio frame retroactive from the decoding start time of the i-th video frame is the transmission start of the (i-1) -th video frame. Under the condition that the time does not come before the time, the smallest n value is calculated such that the code amount for n speech frames is equal to or greater than the difference between the target code amount T (i) and the buffer occupation amount B (i). The process of
When the value of n is calculated under the above condition, transmission of the encoded video data is stopped by stopping transmission of the encoded audio data for the n audio frames and transmitting only the encoded video data. Increasing the rate and avoiding the occurrence of the underflow;
A step of returning the transmission bit rate of the audio encoded data and the video encoded data to the transmission bit rate at the constant bit rate within a predetermined period after avoiding the occurrence of the underflow. ,
Characteristic video / audio stream transmission control method.
請求項1に記載の映像・音声ストリーム伝送制御方法において、
前記回避する過程では、前記条件のもとでnの値が算出されなかった場合に、前記目標符号量T(i)が、前記第i番目の映像フレームのデコード開始時刻から遡るn音声フレーム目の伝送開始時刻が第i−1番目の映像フレームの伝送開始時刻より前にならない最大の個数のn音声フレーム分の符号量と前記バッファ占有量B(i)との和となるように、前記目標符号量T(i)をクリッピングすることにより、前記アンダーフローの発生を回避することを、
特徴とする映像・音声ストリーム伝送制御方法。
The video / audio stream transmission control method according to claim 1,
In the avoiding process, when the value of n is not calculated under the above conditions, the target code amount T (i) is the nth audio frame that goes back from the decoding start time of the i-th video frame. So that the transmission amount of the maximum number of n audio frames not before the transmission start time of the (i-1) -th video frame is the sum of the code occupancy B (i). To avoid the occurrence of the underflow by clipping the target code amount T (i) ,
Characteristic video / audio stream transmission control method.
映像符号化データと音声符号化データとを多重化して一定のビットレートで伝送するとともに、その伝送にあたって、少なくとも複数音声フレーム分の音声符号化データを映像符号化データよりも時間的に先に伝送することを制御する映像・音声ストリーム伝送制御装置であって、
映像を符号化する場合の第i番目の映像フレームの目標符号量T(i)と映像デコードバッファのバッファ占有量B(i)とにより前記映像デコーダバッファのアンダーフローが発生する状態となったのか否かを判断する手段と、
前記アンダーフローが発生する状態となったことを判断するときに、前記第i番目の映像フレームのデコード開始時刻から遡るn音声フレーム目の伝送開始時刻が第i−1番目の映像フレームの伝送開始時刻より前にならないという条件のもとで、n音声フレーム分の符号量が前記目標符号量T(i)と前記バッファ占有量B(i)との差以上になる最も小さいnの値を算出する手段と、
前記条件のもとでnの値が算出された場合に、前記n音声フレーム分の音声符号化データの伝送を停止させて映像符号化データのみを伝送させることで、映像符号化データの伝送ビットレートを上げ、前記アンダーフローの発生を回避する手段と、
前記アンダーフローの発生を回避した後、所定の期間内に、音声符号化データおよび映像符号化データの伝送ビットレートを前記一定のビットレートのときの伝送ビットレートに復帰させる手段とを備えることを、
特徴とする映像・音声ストリーム伝送制御装置。
Video encoded data and audio encoded data are multiplexed and transmitted at a constant bit rate, and at the time of transmission, audio encoded data for at least a plurality of audio frames is transmitted earlier in time than video encoded data. A video / audio stream transmission control device for controlling
Whether the video decoder buffer underflow occurs due to the target code amount T (i) of the i-th video frame and the buffer occupancy B (i) of the video decode buffer when the video is encoded. Means for determining whether or not,
When it is determined that the underflow has occurred, the transmission start time of the nth audio frame retroactive from the decoding start time of the i-th video frame is the transmission start of the (i-1) -th video frame. Under the condition that the time does not come before the time, the smallest n value is calculated such that the code amount for n speech frames is equal to or greater than the difference between the target code amount T (i) and the buffer occupation amount B (i). Means to
When the value of n is calculated under the above condition, transmission of the encoded video data is stopped by stopping transmission of the encoded audio data for the n audio frames and transmitting only the encoded video data. Means for increasing the rate and avoiding the occurrence of the underflow;
Means for returning the transmission bit rate of the audio encoded data and the video encoded data to the transmission bit rate at the constant bit rate within a predetermined period after avoiding the occurrence of the underflow. ,
A video / audio stream transmission control device.
請求項3に記載の映像・音声ストリーム伝送制御装置において、
前記回避する手段は、前記条件のもとでnの値が算出されなかった場合に、前記目標符号量T(i)が、前記第i番目の映像フレームのデコード開始時刻から遡るn音声フレーム目の伝送開始時刻が第i−1番目の映像フレームの伝送開始時刻より前にならない最大の個数のn音声フレーム分の符号量と前記バッファ占有量B(i)との和となるように、前記目標符号量T(i)をクリッピングすることにより、前記アンダーフローの発生を回避することを、
特徴とする映像・音声ストリーム伝送制御装置。
The video / audio stream transmission control device according to claim 3,
The avoiding means includes the nth audio frame in which the target code amount T (i) goes back from the decoding start time of the i-th video frame when the value of n is not calculated under the conditions. So that the transmission amount of the maximum number of n audio frames not before the transmission start time of the (i-1) -th video frame is the sum of the code occupancy B (i). To avoid the occurrence of the underflow by clipping the target code amount T (i) ,
A video / audio stream transmission control device.
請求項1または2に記載の映像・音声ストリーム伝送制御方法をコンピュータに実行させるための映像・音声ストリーム伝送制御プログラム。   A video / audio stream transmission control program for causing a computer to execute the video / audio stream transmission control method according to claim 1. 請求項1または2に記載の映像・音声ストリーム伝送制御方法をコンピュータに実行させるための映像・音声ストリーム伝送制御プログラムを記録したコンピュータ読み取り可能な記録媒体。   A computer-readable recording medium recording a video / audio stream transmission control program for causing a computer to execute the video / audio stream transmission control method according to claim 1.
JP2008309286A 2008-12-04 2008-12-04 Video / audio stream transmission control method, video / audio stream transmission control apparatus, video / audio stream transmission control program, and computer-readable recording medium recording the program Active JP4879958B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008309286A JP4879958B2 (en) 2008-12-04 2008-12-04 Video / audio stream transmission control method, video / audio stream transmission control apparatus, video / audio stream transmission control program, and computer-readable recording medium recording the program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008309286A JP4879958B2 (en) 2008-12-04 2008-12-04 Video / audio stream transmission control method, video / audio stream transmission control apparatus, video / audio stream transmission control program, and computer-readable recording medium recording the program

Publications (2)

Publication Number Publication Date
JP2010136040A JP2010136040A (en) 2010-06-17
JP4879958B2 true JP4879958B2 (en) 2012-02-22

Family

ID=42346887

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008309286A Active JP4879958B2 (en) 2008-12-04 2008-12-04 Video / audio stream transmission control method, video / audio stream transmission control apparatus, video / audio stream transmission control program, and computer-readable recording medium recording the program

Country Status (1)

Country Link
JP (1) JP4879958B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5152072B2 (en) * 2009-03-31 2013-02-27 日本電気株式会社 Statistical multiplexing apparatus, encoder, and statistical multiplexing method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07202820A (en) * 1993-12-28 1995-08-04 Matsushita Electric Ind Co Ltd Bit rate control system
JPH0863884A (en) * 1994-08-23 1996-03-08 Mitsubishi Electric Corp Digital information coding / decoding device
JPH11340938A (en) * 1998-05-28 1999-12-10 Sony Corp Data multiplexing apparatus and method

Also Published As

Publication number Publication date
JP2010136040A (en) 2010-06-17

Similar Documents

Publication Publication Date Title
EP2364551B1 (en) Multiplexed video streaming
US9313488B2 (en) Hypothetical reference decoder
US20060036759A1 (en) Mechanism for transmitting elementary streams in a broadcast environment
US7835436B2 (en) Video-encoding device and video-encoding control method
CN103155580A (en) Adaptive streaming of video at different quality levels
CN102461195A (en) Method and apparatus for splicing a compressed data stream
JP4872253B2 (en) Multiplexing device, multiplexing method, program, and recording medium
JP5064305B2 (en) Bit rate conversion apparatus and conversion method
US7333711B2 (en) Data distribution apparatus and method, and data distribution system
US20060239563A1 (en) Method and device for compressed domain video editing
JP4358215B2 (en) Video encoding apparatus and method
JP6344386B2 (en) Time-series data encoding apparatus, method and program, and time-series data re-encoding apparatus, method and program
JP4879958B2 (en) Video / audio stream transmission control method, video / audio stream transmission control apparatus, video / audio stream transmission control program, and computer-readable recording medium recording the program
US8295347B2 (en) Information processing apparatus and information processing method, recording medium, and program
US20090185620A1 (en) Video encoding apparatus and method for the same
US8311104B2 (en) Information processing apparatus and method, recording medium, and program
US8619864B2 (en) Transcoding/encoding with code amount adjustment and stuffing bits
JP4878051B2 (en) Encoded stream transmission method, encoded stream transmission apparatus, encoded stream transmission control program, and recording medium therefor
US9124868B2 (en) 3D encoding apparatus
JP4755239B2 (en) Video code amount control method, video encoding device, video code amount control program, and recording medium therefor
JP4878052B2 (en) Video code amount control method, video encoding device, video code amount control program, and recording medium therefor
JP2011004163A (en) Transmitter
JP2005151095A (en) Statistical multiplexer and method
WO2008047714A1 (en) Code conversion method, transcoder, and integrated circuit thereof
JP4928569B2 (en) Segment encoding method, segment encoding apparatus, segment encoding program and recording medium thereof, parallel encoding system, partial re-encoding system

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20100331

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110308

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110412

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110607

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20111129

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20111130

R150 Certificate of patent or registration of utility model

Ref document number: 4879958

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20141209

Year of fee payment: 3

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350