WO2012029854A1 - 動画圧縮制御装置、動画記録装置、動画記録再生装置、動画圧縮制御方法及び記録媒体 - Google Patents

動画圧縮制御装置、動画記録装置、動画記録再生装置、動画圧縮制御方法及び記録媒体 Download PDF

Info

Publication number
WO2012029854A1
WO2012029854A1 PCT/JP2011/069779 JP2011069779W WO2012029854A1 WO 2012029854 A1 WO2012029854 A1 WO 2012029854A1 JP 2011069779 W JP2011069779 W JP 2011069779W WO 2012029854 A1 WO2012029854 A1 WO 2012029854A1
Authority
WO
WIPO (PCT)
Prior art keywords
frame
encoding
moving image
input
buffer
Prior art date
Application number
PCT/JP2011/069779
Other languages
English (en)
French (fr)
Inventor
茂 本間
Original Assignee
ヤマハ株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ヤマハ株式会社 filed Critical ヤマハ株式会社
Publication of WO2012029854A1 publication Critical patent/WO2012029854A1/ja

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • H04N5/91Television signal processing therefor
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/156Availability of hardware or computational resources, e.g. encoding based on power-saving criteria
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/79Processing of colour television signals in connection with recording
    • H04N9/80Transformation of the television signal for recording, e.g. modulation, frequency changing; Inverse transformation for playback
    • H04N9/804Transformation of the television signal for recording, e.g. modulation, frequency changing; Inverse transformation for playback involving pulse code modulation of the colour picture signal components
    • H04N9/8042Transformation of the television signal for recording, e.g. modulation, frequency changing; Inverse transformation for playback involving pulse code modulation of the colour picture signal components involving data reduction

Definitions

  • the present invention relates to a moving image compression control device, a moving image recording device, a moving image recording / playback device, a moving image compression control method, and a recording medium.
  • Patent Document 1 image processing for converting each captured image into a predetermined size and compressing at a specified compression rate is performed, and a change in the data amount of each frame is performed using the result of the image processing.
  • a technique for dynamically controlling a compression parameter according to the above is disclosed.
  • the present invention provides a moving image compression control apparatus and a moving image compression control capable of continuously encoding without stopping the encoding process even when a video with a high processing load is input when resources for performing the encoding process are not sufficient It aims to provide a method.
  • a moving image compression control apparatus includes a buffer having a plurality of storage areas for temporarily storing moving image data sequentially input according to a predetermined frame rate for each frame, and a frame to be encoded in the frame
  • An encoding unit that encodes the input one frame of the moving image data and outputs the encoded data using either an internal encoding process or an inter-frame encoding process that encodes based on a correlation between frames; Measuring means for measuring the processing time of one frame; and input means for inputting the moving image data stored in the buffer to the encoding means for each frame, wherein the input means is a frame measured by the measuring means.
  • the number of processing times of each of the input controls corresponding to a plurality of time ranges equal to or greater than the threshold is defined in advance.
  • the input means according to the number of times of the input control corresponding to the time range, the moving image data of the previous frame from the buffer Input continuously to the encoding means.
  • the moving picture recording apparatus stores the moving picture compression control apparatus according to the first or second aspect and the encoded data for each frame output from the moving picture compression control apparatus in a storage means.
  • a moving image recording apparatus including recording control means.
  • a moving image recording / reproducing apparatus that stores the moving image compression control apparatus according to the first or second aspect, and the encoded data for each frame output from the moving image compression control apparatus. And a reproducing unit that reads out the encoded data for each frame stored in the storage unit in accordance with the frame rate and reproduces the encoded data of the read frame.
  • moving image data sequentially input according to a predetermined frame rate is temporarily stored in a buffer having a plurality of storage areas for each frame and stored in the buffer.
  • the extracted moving image data is extracted for each frame, and the extracted moving image data of one frame is extracted using either an intra-frame encoding process for encoding within the frame or an inter-frame encoding process for encoding based on the correlation between frames. , Encoding the data while measuring the processing time, and outputting the encoded data.
  • the next stored in the buffer instead of the next frame of video data to be encoded, the next stored in the buffer Instead of the next frame of video data to be encoded, the moving image data of the previous frame that encoded extracted from the buffer, performs omitted controlling the encoding of moving image data of the next frame.
  • the recording medium records a program for causing a computer to execute each step of the moving image compression control method.
  • the encoding process can be continued even if a video with a high processing load is input when there are not enough resources for the encoding process.
  • the moving image data of the same frame can be automatically encoded as many times as the number of encoding processing times.
  • the encoding process can be continuously recorded even if a video with a high processing load is input when there are not enough resources for the encoding process.
  • the encoding process can be continued and reproduced.
  • the encoding process can be continued even if a video with a high processing load is input when there are not enough resources for the encoding process.
  • the encoding process can be continued even if a video with a high processing load is input when there are not enough resources for the encoding process.
  • FIG. 1 It is a figure which shows the structural example of the karaoke apparatus which concerns on embodiment. It is a functional block diagram of an external video processing unit according to the embodiment.
  • (A) And (b) is a figure explaining the example of the input buffer which concerns on embodiment. It is a figure which shows the operation
  • (A)-(d) is a figure explaining the example of control of the encoding process in embodiment. It is a figure explaining control of the encoding process concerning a modification (1).
  • the video compression control apparatus controls so that the encoding process of each frame is averaged and completed within a time corresponding to the frame rate when encoding a video shot at a constant frame rate.
  • a video camera that captures video is connected to the karaoke device, and a video compression control device is provided in the karaoke device, and video captured by the video camera is encoded and recorded by the video compression control device.
  • An example of a moving image recording apparatus will be described.
  • FIG. 1 shows the overall configuration of a karaoke apparatus which is an example of a moving image recording apparatus according to the present embodiment.
  • the karaoke apparatus 1 has a video camera 2 connected to a video input terminal (not shown) and a microphone 3 connected to a microphone input terminal (not shown).
  • a video camera 2 connected to a video input terminal (not shown)
  • a microphone 3 connected to a microphone input terminal (not shown).
  • the microphone 3 is, for example, a loudspeaker such as a condenser microphone, and sends a sound signal obtained by collecting the singing sound emitted by the singer to the sound signal processing unit 14.
  • the control unit 11 includes a CPU (Central Processing Unit), a RAM (Random Access Memory), and a ROM (Read Only Memory) memory.
  • the control program stored in the ROM or the RAM is stored in the RAM as a working area. By executing this, each unit connected to the control unit 11 is controlled.
  • the karaoke apparatus 1 displays a background image display mode in which a preset background image is displayed together with lyrics of the song and a picture taken by the video camera 2 together with the lyrics during reproduction of the karaoke song.
  • the control unit 11 controls general functions related to karaoke including performance of music specified by the user, and performs performance control and recording processing for displaying an image corresponding to the mode selected by the user during playback of the karaoke music. And do.
  • the operation unit 12 is an operation unit that accepts an operation from a user by wire or wirelessly, an operation for switching between a background image display mode and an external video display mode, an operation for adjusting the volume of a microphone or a music, an operation for selecting a music, An operation signal for receiving an operation or the like for instructing the reproduction or stop of the music is included, and an operation signal indicating the operation content operated by the user is sent to the control unit 11.
  • the sound source unit 13 reproduces the instructed music data under the control of the control unit 11 to generate a musical sound signal, and sends it to the audio signal processing unit 14.
  • the audio signal processing unit 14 performs predetermined signal processing on the audio signal input from the microphone 3, and combines the musical sound signal and the audio signal transmitted from the sound source unit 13 and emits the sound from the speaker 15.
  • the speaker 15 amplifies and emits the musical sound signal and the audio signal according to the designated volume.
  • the storage unit 16 is composed of a non-volatile storage medium, stores karaoke music data and lyrics data such as MIDI (Musical Instrument Digital Interface) and the like, and is in a format such as MPEG (Moving Picture Experts Group Phase) corresponding thereto.
  • Video data background image data of a background image that has been compression-encoded is stored.
  • the music data defines the tones and control details that should be generated as the performance progresses
  • the lyric data defines the characters that indicate the lyrics that should be displayed as the performance progresses and the color change of the characters Has been.
  • the external video processing unit 17 is configured by, for example, a DSP (Digital Signal Processor), A / D converts a video signal of a subject photographed at a fixed frame rate by the video camera 2, and converts video data for each frame.
  • the video data is generated and sent to the video reproduction unit 18 and the generated video data of each frame is encoded.
  • DSP Digital Signal Processor
  • the external video processing unit 17 includes an input buffer 171, an encoder 172, a compression control unit 173, a measurement unit 174, and an output buffer 175.
  • the input buffer 171 is composed of the storage areas 30 of indexes 0 to n that are blocked, and the storage area of index 0 is the next storage area that follows the storage area of index n.
  • the input buffer 171 sequentially stores moving image data for each frame in a storage area indicated by a pointer Pw indicating a writing position described later, and outputs moving image data from a storage area indicated by a pointer Pr2 indicating a reading position described later.
  • the encoder 172 encodes one of an intra-frame encoding process for encoding within one frame and an inter-frame encoding process for detecting a motion vector between frames and encoding based on a correlation between frames in accordance with a standard such as MPEG-2.
  • the moving image data output from the input buffer 171 is encoded using processing, and encoded data (I picture, P picture, B picture) is output.
  • the compression control unit 173 has a pointer Pw indicating the writing position of the input buffer 171, a pointer Pr 1 indicating a reading reference position referred to when reading from the input buffer 171, and a reading position of the input buffer 171 shown in FIG. Is controlled.
  • the pointer Pw indicates the address of the storage area in which the moving image data is written to the input buffer 171 and is sequentially set from the storage area of index 0.
  • the pointer Pr1 indicates the address of the storage area to be read out from the input buffer 171 next, that is, the frame (to be encoded next) when the encoding process in the encoder 172 is performed within the threshold time based on the frame rate. (Next frame) indicates the stored address.
  • new moving image data is input to the input buffer 171 every 30 ms. If the encoding process is completed within 30 ms on average, the encoding process is not delayed with respect to writing to the input buffer 171. In this case, the index number of the input buffer 171
  • the moving image data is processed by the encoder 172 frame by frame. In other words, in the present embodiment, every time the encoding process is performed, the address in the storage area of the next index is sequentially set for the pointer Pr1.
  • an address of a storage area in which moving image data to be input to the encoder 172 is stored is set according to the encoding processing time. Specifically, if the encoding process is longer than the threshold time, that is, if there is a delay in the encoding process, the frame ( The address of the storage area in which the moving image data of the previous frame) is stored is set. If the encoding process is within the threshold time, the same address as the pointer Pr1 is set in the pointer Pr2. Similarly to the pointer Pr1, the pointer Pr2 is set with the address of the storage area of the moving image data to be read next from the input buffer 171 every time encoding processing is performed.
  • the previous encoding is performed as the moving image data of the frame to be encoded next so as to eliminate the change in the movement in the time axis direction.
  • the moving image data of the same frame as the processed frame is input to the encoder 172 again.
  • the addresses of the storage areas of index 0 are set as the initial values for the pointer Pw, the pointer Pr1, and the pointer Pr2.
  • the storage area of index 0 of the initial value is read when the writing process of the storage areas of index 0 and 1 is completed so that the moving image data reading position in input buffer 171 does not pass the writing position.
  • the measuring unit 174 includes a counter, measures the encoding processing time of one frame in the encoder 172, and outputs the measurement result to the compression control unit 173.
  • the output buffer 175 sequentially stores the encoded data encoded by the encoder 172.
  • the video reproduction unit 18 decodes the background image data corresponding to the karaoke music in the background image display mode, and synthesizes the decoded image data with the lyrics data image to display the display unit 19.
  • the display unit 19 In the external video display mode, the display unit 19 combines the moving image data output from the video camera 2 and the lyrics data image in the external video display mode. And a function of converting the image signal into a displayable format and inputting the image signal to the display unit 19.
  • the display unit 19 is composed of a display device such as a liquid crystal display. Under the control of the control unit 11, the display unit 19 displays an image signal input from the video reproduction unit 18 at a constant frame rate or is received by the operation unit 12. An image representing the operation content is displayed.
  • FIG. 4 shows an operation flow of the performance control process of the karaoke apparatus 1
  • FIG. 5 shows an operation flow of the recording process of the karaoke apparatus 1.
  • step S11 When the control unit 11 accepts an operation for selecting a song by the user via the operation unit 12, the control unit 11 reads out the song data and lyrics data of the selected song from the storage unit 16, stores them in the RAM, and stores the song data in the sound source unit. 13 and playback of the music is started (step S11).
  • step S12 When the external video display mode selection operation is performed by the user via the operation unit 12 (step S12: YES), the control unit 11 outputs an external video signal of a constant frame rate (for example, 30 fps) captured by the video camera 2.
  • a constant frame rate for example, 30 fps
  • the video data for each frame is generated in the external video processing unit 17, and the video playback unit 18 synthesizes the video data for each frame and the lyrics data stored in the RAM in accordance with the progress of the performance of the music. 19 and displayed at a constant frame rate (step S13).
  • the control unit 11 synthesizes the audio signal input to the microphone 3 and the musical sound signal output from the sound source unit 13 in the audio signal processing unit 14 and emits the sound from the speaker 15 (step S15).
  • step S12 if the user does not select the external video display mode (step S12: NO), the control unit 11 reads the background image data corresponding to the music from the storage unit 16 and decodes it in the video playback unit 18. Processing is performed, and the lyrics data stored in the RAM and the decoded background image data are combined and displayed on the display unit 19 in accordance with the progress of the musical performance (step S14). The control unit 11 repeatedly performs the processing of steps S12 to S16 until the performance of the music being played ends (step S16: NO), and ends the processing when the performance of the music ends (step S16: YES).
  • the control unit 11 starts shooting with the video camera 2 and starts recording processing with respect to the external video signal shot at a constant frame rate.
  • the control unit 11 performs A / D conversion on the video signal of the external video input from the video camera 2 at a constant frame rate (for example, 30 fps) and converts it into moving image data for each frame (step S31)
  • a constant frame rate for example, 30 fps
  • the compression control unit 173 sets the address of the storage area of the next index to the pointer Pw (S31). Step S32).
  • the external video processing unit 17 indicates the pointer Pr2 by the compression control unit 173 when the moving image data (f2) is written in the storage area of the index 1 in the input buffer 171.
  • the moving image data (f1) in the storage area of index 0 is output from the input buffer 171 and input to the encoder 172 (step S33).
  • the external video processing unit 17 encodes the moving image data (f1) input from the input buffer 171 by the encoder 172, and at the same time, measures the processing time of one frame during the encoding process by the measuring unit 174, and encodes after the encoding process. Data is output from the encoder 172 to the output buffer 175 (step S34).
  • the control unit 11 reads the encoded data for each frame from the output buffer 175 every predetermined time, and sequentially stores the read encoded data in the predetermined area of the storage unit 16 (step S35).
  • the external video processing unit 17 determines that the encoding processing time measured by the measuring unit 174 is within a threshold time (for example, 30 ms) ( Step S37: YES), as shown in FIG. 6B, the compression controller 173 sets an address indicating the storage area of the next index 1 to the pointer Pr1, and sets the same address as the pointer Pr1 to the pointer Pr2. Then, the compression control unit 173 outputs the moving image data (f2) in the storage area of the index 1 indicated by the pointer Pr2 from the input buffer 171 and inputs it to the encoder 172 (step S38).
  • a threshold time for example, 30 ms
  • 6C shows the state of the input buffer 171 when the encoding process is within the threshold time after the moving image data (f2) is input to the encoder 172.
  • the pointer Pw is set to the storage area of index 4
  • the pointers Pr1 and Pr2 are set to the same storage area of index 2
  • the moving image data (f3) is input from the storage area of index 2 to the encoder 172 and encoded.
  • the external video processing unit 17 uses the compression control unit 173 as shown in FIG. The address indicating the storage area of the next index 3 is set in the pointer Pr1, and the address of the storage area of the same index 2 as the previous time is set in the pointer Pr2. Then, the compression control unit 173 outputs the moving image data (f3) from the storage area of the index 2 indicated by the pointer Pr2, and re-inputs it to the encoder 172 (step S39).
  • the same moving image data (f3) as the previous time is input again to the encoder 172 and encoded.
  • the next encoding process is an inter-frame encoding process.
  • the target of the next encoding process is originally the moving picture data (f4).
  • the encoder 172 by inputting the moving picture data (f3) of the same frame as the previous time to the encoder 172, there is no difference between frames, and the encoding process of this frame is performed. Is shorter than the encoding processing time when moving image data (f4) is input to the encoder 172.
  • the moving image data (f3) of the same frame as the previous frame is encoded as compared with the case where the moving image data (f4) is input to the encoder 172.
  • the processing time cannot be shortened and the encoding processing time does not fall within the threshold time.
  • the processing time of the inter-frame encoding process performed thereafter by inputting the moving image data (f3) to the encoder 172 is shorter than that of the moving image data to be input originally, the encoding process This process may be repeated until the time falls within the threshold time.
  • the processing time of the moving image data (f3) of index 2 re-input to the encoder 172 is within the threshold time, an address indicating the storage area of the next index 4 is set in the pointer Pr1, and the pointer Pr2 Is set to the same address as the pointer Pr1, and the moving image data (f5) stored in the storage area of the index 4 is input to the encoder 172 (step S38).
  • the processing time of the moving image data (f3) of the index 2 re-input to the encoder 172 is not within the threshold time, the address of the storage area of the same index 2 as the previous time is set for the pointer Pr2.
  • the moving image data (f5) stored in the storage area of the index 4 is output from the input buffer 171. Then, it is re-input to the encoder 172 (step S39), and is encoded by the encoder 172.
  • the external video processing unit 17 repeats steps S34 to S39 until the performance of the music being played ends, and when the performance of the music ends (step S36: YES), the recording process ends.
  • the encoding processing time is controlled so as to be averaged and kept within the threshold time, so that the encoding process is performed on the input of the moving image data to the input buffer 171. It is possible to prevent the encoding process from stopping due to overflow of the input buffer 171 in time.
  • next encoding process exceeds the threshold time and the next encoding process is an inter-frame encoding process, the same video data as the previous one is input, so that there is no change in the image with the previous frame,
  • the encoding processing time is shorter than when encoding the next frame. By repeating this until the encoding processing time is within the threshold time, the encoding processing time gradually converges within the threshold time.
  • the above is an operation example of the karaoke apparatus 1 according to the present embodiment.
  • the moving image data of the next frame is not subjected to the encoding process for the moving image data of the next frame. This is input to the encoder 172 and this processing is repeated until the encoding processing time is within the threshold time. Therefore, even if a video with a high encoding processing load such as a fast moving image is output from the video camera 2 due to restrictions on resources for performing the encoding processing, moving image data is input to the input buffer 171 even when the average encoding processing time is output from the video camera 2.
  • the encoded data of the present embodiment is obtained by decimating the actual video motion, but is encoded at the same frame rate as the input video, so that the frame rate is not changed on the player side. Can be played.
  • the encoding processing time exceeds the threshold time for each frame, even if the interframe encoding processing is performed on the moving image data of the same frame as the previous time, the encoding processing is performed for the threshold time. If the process is completed, the image quality degradation can be minimized by merely thinning out the motion for one frame.
  • the encoding process time is equal to or greater than the threshold time
  • input control is performed in which moving image data of the same frame as the frame subjected to the previous encoding process is output from the input buffer 171 and input to the encoder 172.
  • a plurality of time ranges exceeding the threshold time may be set, and the number of times of the input control may be set in advance according to the time range.
  • the time A, the time B, and the time C are set in advance as a time range exceeding the threshold time as 30 ms as the threshold time, and the time A is set as the time B as the number of times of input control. Is set twice and time C is set three times.
  • the moving image data of the same frame as the previous time is output from the input buffer 171 and input to the encoder 172 as in the embodiment.
  • the input control is performed once, and the encoding process for the frame is performed. If the encoding processing time is within the range of time B, the second input control is performed to perform the encoding processing regardless of the first encoding processing time, and the second encoding processing time is measured. If the encoding process time is within the range of time C, the third input control is performed to perform the encoding process regardless of the first and second encoding process times, and the third encoding process time is measured. .
  • the input of the moving image data of the same frame as the frame subjected to the previous encoding processing is input from the input buffer 171 and input to the encoder 172
  • the number of times of performing the input control is arbitrarily set regardless of the encoding processing time, and the encoding process is performed to generate a video with a reduced frame rate. Also good. That is, for example, when the frame rate is 30 fps and the number of times of input control is set to 5, after the moving image data of the first frame is encoded, the first frame instead of the second to fifth frames is encoded. The moving image data of the frame is encoded four times.
  • the second to fifth frames are not encoded and the first frame is encoded five times, so the frame rate after the encoding process does not change at 30 fps. Since the same video is displayed in units, it is possible to display video with a frame rate lowered to 1/5.
  • the same image may be reproduced at a performance timing of a song by using the configuration of the above modification.
  • the control unit 11 of the karaoke apparatus 1 causes the external video processing unit 17 to continuously input the moving image data of the frame input from the input buffer 171 to the encoder 172 at a predetermined performance timing to the encoder 172 for a predetermined number of times.
  • Each encoded data encoded by the encoder 172 and stored in the output buffer 175 is decoded by the video reproduction unit 18 and displayed on the display unit 19 at the same frame rate as the encoding process.
  • a video like a still image may be displayed at the performance timing of the music, or the frame rate may be changed in a pseudo manner according to the genre or tone of the music.
  • a simple video may be generated and played back.
  • the number of times of input control is stored in advance in the storage unit 16 for each genre of music, and input corresponding to the music is performed.
  • the encoding process is performed according to the number of times of control.
  • the external video processing unit 17 (moving image compression control device) is incorporated in the karaoke device 1 has been described.
  • the external video processing unit 17 has a display device such as a personal computer. It may be incorporated in information equipment, or may be used as a separate unit from a karaoke device or a personal computer.
  • the encoded data encoded by the external video processing unit 17 is sequentially stored in the storage unit 16.
  • a DVD or the like externally connected to the karaoke apparatus 1 may be used.
  • the encoded data may be recorded on a recording medium, or the encoded data may be transmitted to an external device connected to the karaoke apparatus 1 by wire or wirelessly.
  • the encoded data encoded as a moving image recording / reproducing apparatus may be stored in the storage unit 16, and the encoded data may be decoded and reproduced by the video reproduction unit 18.
  • a ring buffer is used as the input buffer 171 .
  • the present invention is not limited to the ring buffer, and various types of buffers can be used.

Abstract

 本発明は、エンコード処理を行うリソースが十分ではない場合に、処理負荷の高い映像が入力されてもエンコード処理を停止させることなく継続してエンコードする技術を提供する。動画圧縮制御装置は、所定のフレームレートに従って入力される映像信号をフレーム毎の動画データに変換してバッファの各記憶領域にフレーム毎に順次書き込み、所定記憶領域からフレーム毎の動画データをエンコーダに入力してエンコード処理を行う。動画圧縮制御装置は、1フレームのエンコード処理時間がフレームレートに基づく閾値時間以上のとき、次フレームの動画データをエンコードせず、前回エンコード処理を行った前フレームの動画データを次のエンコード処理対象として、バッファからエンコーダに入力してエンコード処理を行い、エンコード処理時間が閾値時間内のとき、次フレームの動画データをバッファからエンコーダに入力してエンコードする。

Description

動画圧縮制御装置、動画記録装置、動画記録再生装置、動画圧縮制御方法及び記録媒体
 本発明は、動画圧縮制御装置、動画記録装置、動画記録再生装置、動画圧縮制御方法及び記録媒体に関する。
 動画をエンコードして録画する際、圧縮率やフレームレートの変更を行なうことでエンコードの処理負荷を軽減する技術が知られている。下記特許文献1には、撮像された1フレーム毎の画像を所定のサイズに変換し、指定圧縮率で圧縮する画像処理を行うと共に、その画像処理の結果を用い、各フレームのデータ量の変化に応じて圧縮パラメータを動的に制御する技術が開示されている。
日本国特開2007-74248号公報
 従来技術はプロセッサの処理能力やメモリ容量等のリソースが十分であることを想定しているため、動きの速い映像等、エンコードの処理負荷が高い映像がメモリに入力されても、入力に対してエンコード処理が遅れてエンコード処理が停止することはない。しかしながら、エンコードするためのリソースが十分でなければ、処理負荷の高い映像が入力されるとエンコード処理が停止してしまいシステムが破綻する場合がある。
 本発明は、エンコード処理を行うリソースが十分ではない場合に、処理負荷の高い映像が入力されたとしてもエンコード処理を停止させることなく継続してエンコードすることができる動画圧縮制御装置及び動画圧縮制御方法を提供することを目的とする。
 本発明の第1の態様に係る動画圧縮制御装置は、予め定められたフレームレートに従って順次入力される動画データをフレーム毎に一時記憶する複数の記憶領域を有するバッファと、フレーム内でエンコードするフレーム内エンコード処理とフレーム間の相関に基づいてエンコードするフレーム間エンコード処理のいずれかを用いて、入力された1フレームの前記動画データをエンコードしてエンコードデータを出力するエンコード手段と、前記エンコード手段における1フレームの処理時間を計測する計測手段と、前記バッファに記憶された動画データをフレーム毎に前記エンコード手段に入力する入力手段と、を備え、前記入力手段は、前記計測手段により計測されたフレームの前記処理時間が前記フレームレートに基づく閾値以上である場合には、前記バッファ内に記憶された次にエンコードすべき次フレームの動画データに替えて、当該次フレームの直前にエンコードした前フレームの動画データを前記バッファから前記エンコード手段に入力し、当該次フレームの動画データを前記エンコード手段に入力しない入力制御を行う。
 また、本発明の第2の態様に係る動画圧縮制御装置は、前記動画圧縮制御装置において、前記閾値以上の複数の時間範囲に応じたそれぞれの前記入力制御の処理回数が予め規定されており、前記入力手段は、前記処理時間が前記複数の時間範囲のいずれかの範囲内である場合には、当該時間範囲に対応する前記入力制御の処理回数に従い、前記前フレームの動画データを前記バッファから前記エンコード手段に連続して入力する。
 また、本発明の第3の態様に係る動画記録装置は、上記第1又は2の態様に係る動画圧縮制御装置と、前記動画圧縮制御装置から出力されたフレーム毎のエンコードデータを記憶手段に記憶させる記録制御手段とを備えた動画記録装置である。
 また、本発明の第4の態様に係る動画記録再生装置は、上記第1又は2の態様に係る動画圧縮制御装置と、前記動画圧縮制御装置から出力されたフレーム毎のエンコードデータを記憶する記憶手段と、前記記憶手段に記憶された前記フレーム毎のエンコードデータを前記フレームレートに従って読み出し、読み出したフレームのエンコードデータを再生する再生手段とを備えた動画記録再生装置である。
 本発明の第5の態様に係る動画圧縮制御方法は、予め定められたフレームレートに従って順次入力される動画データをフレーム毎に、複数の記憶領域を有するバッファに一時記憶させ、前記バッファに記憶された動画データをフレーム毎に抽出し、フレーム内でエンコードするフレーム内エンコード処理とフレーム間の相関に基づいてエンコードするフレーム間エンコード処理のいずれかを用いて、抽出された1フレームの前記動画データを、その処理時間を計測しながらエンコードしてエンコードデータを出力し、エンコード時に計測されたフレームの前記処理時間が前記フレームレートに基づく閾値以上である場合には、前記バッファ内に記憶された次にエンコードすべき次フレームの動画データに替えて、当該次フレームの直前にエンコードした前フレームの動画データを前記バッファから抽出し、当該次フレームの動画データのエンコードを省略する制御を行う。
 本発明の第6の態様に係る記録媒体は、前記動画圧縮制御方法の各工程をコンピュータに実行させるためのプログラムを記録する。
 第1の態様の構成によれば、エンコード処理を行うリソースが十分でない場合に処理負荷が高い映像が入力されても、エンコード処理を継続して行なうことができる。
 第2の態様の構成によれば、エンコード処理時間に応じた回数だけ同じフレームの動画データを自動でエンコード処理することができる。
 第3の態様の構成によれば、エンコード処理を行うリソースが十分でない場合に処理負荷が高い映像が入力されてもエンコード処理を継続して記録することができる。
 第4の態様の構成によれば、エンコード処理を行うリソースが十分でない場合に処理負荷が高い映像が入力されても、エンコード処理を継続して行い再生することができる。
 第5の態様の方法によれば、エンコード処理を行うリソースが十分でない場合に処理負荷が高い映像が入力されても、エンコード処理を継続して行なうことができる。
 第6の態様の構成によれば、エンコード処理を行うリソースが十分でない場合に処理負荷が高い映像が入力されても、エンコード処理を継続して行なうことができる。
実施形態に係るカラオケ装置の構成例を示す図である。 実施形態に係る外部映像処理部の機能ブロック図である。 (a)及び(b)は実施形態に係る入力バッファの例を説明する図である。 実施形態に係るカラオケ装置の演奏制御処理の動作フローを示す図である。 実施形態に係るカラオケ装置の録画処理の動作フローを示す図である。 (a)~(d)は実施形態におけるエンコード処理の制御例を説明する図である。 変形例(1)に係るエンコード処理の制御を説明する図である。
<概要>
 本発明に係る動画圧縮制御装置は、一定のフレームレートで撮影された映像をエンコードする際、各フレームのエンコード処理が平均してフレームレートに応じた時間内に完了するように制御する。本実施形態においては、映像を撮影するビデオカメラをカラオケ装置に接続すると共に、動画圧縮制御装置をカラオケ装置内に設け、ビデオカメラで撮影された映像を動画圧縮制御装置でエンコード処理して記録する動画記録装置の例を説明する。
<構成>
 図1は、本実施形態に係る動画記録装置の一例であるカラオケ装置の全体構成を表している。図1に示すように、カラオケ装置1は、ビデオ入力端子(図示略)にビデオカメラ2が接続されると共に、マイク入力端子(図示略)にマイク3が接続されている。以下、各部について説明する。
 マイク3は、例えば、コンデンサマイク等の拡声手段であり、歌唱者が発する歌唱音声を収音した音信号を音声信号処理部14へ送出する。制御部11は、CPU(Central Processing Unit)とRAM(Random Access Memory)やROM(Read Only Memory)のメモリで構成されており、RAMをワーキングエリアとして、ROM又はRAMに記憶されている制御プログラムを実行することにより、制御部11と接続されている各部を制御する。本実施形態に係るカラオケ装置1は、カラオケの楽曲の再生中に、予め設定された背景画像を当該楽曲の歌詞と共に表示する背景画像表示モードと、ビデオカメラ2で撮影された画像を歌詞と共に表示する外部映像表示モードとを有し、カラオケの楽曲の再生中にビデオカメラ2で撮影された画像をエンコードして記録する録画処理機能を有する。制御部11は、ユーザが指定した楽曲の演奏等を含むカラオケに関する一般的な機能を制御すると共に、ユーザが選択したモードに応じた画像をカラオケの楽曲の再生中に表示する演奏制御と録画処理とを行う。
 操作部12は、ユーザからの操作を有線又は無線により受付ける操作手段であり、背景画像表示モードと外部映像表示モードとを切替える操作や、マイク音量や楽曲の音量の調節操作、楽曲の選択操作、楽曲の再生や停止を指示する操作等を受付けるための操作子を含んで構成され、ユーザが操作した操作内容を示す操作信号を制御部11へ送出する。
 音源部13は、制御部11の制御の下、指示された楽曲データを再生して楽音信号を生成し、音声信号処理部14へ送出する。音声信号処理部14は、マイク3から入力された音声信号に対し所定の信号処理を施すと共に、音源部13から送出された楽音信号と音声信号とを合成してスピーカ15から放音する。スピーカ15は、楽音信号と音声信号とを指示された音量に従って増幅して放音する。
 記憶部16は、不揮発性記憶媒体で構成され、MIDI(Musical Instrument Digital Interface)等のカラオケの楽曲データや歌詞データを記憶すると共に、これらに対応するMPEG(Moving Picture Experts Group Phase)等の形式で圧縮符号化された背景画像の映像データ(背景画像データ)を記憶する。楽曲データは、演奏の進行に合わせて発生すべき楽音や制御内容等が規定されており、歌詞データは、演奏の進行に合わせて表示すべき歌詞を示す文字や文字の色の変化等が規定されている。
 外部映像処理部17は、例えば、DSP(Digital Signal Processor)で構成されており、ビデオカメラ2において一定のフレームレートで撮影された被写体の映像信号をA/D変換し、フレーム毎の動画データを生成して映像再生部18へ送出するとともに、当該生成した各フレームの動画データをエンコードする。
 具体的には、外部映像処理部17は、図2に示すように、入力バッファ171、エンコーダ172、圧縮制御部173、計測部174及び出力バッファ175を備える。入力バッファ171は、図3(a)に示すように、ブロック化されたインデックス0~nの記憶領域30で構成されており、インデックスnの記憶領域に続く次の記憶領域として、インデックス0の記憶領域が設定されたリングバッファである。
 入力バッファ171は、後述の書込位置を示すポインタPwにより示される記憶領域にフレーム毎の動画データを順次記憶すると共に、後述の読出位置を示すポインタPr2により示される記憶領域から動画データを出力してエンコーダ172に入力する。エンコーダ172は、MPEG-2等の規格に従い、1フレーム内でエンコードするフレーム内エンコード処理と、フレーム間の動きベクトルを検出しフレーム間の相関に基づいてエンコードするフレーム間エンコード処理のいずれかのエンコード処理を用いて入力バッファ171から出力された動画データについてエンコードし、エンコードデータ(Iピクチャ、Pピクチャ、Bピクチャ)を出力する。
 圧縮制御部173は、図3(b)に示す、入力バッファ171の書込位置を示すポインタPw、入力バッファ171から読み出す際に参照される読出参照位置を示すポインタPr1、入力バッファ171の読出位置を示すポインタPr2を制御する。ポインタPwは、入力バッファ171に動画データを書き込む記憶領域のアドレスを示し、インデックス0の記憶領域から順次設定される。また、ポインタPr1は、エンコーダ172におけるエンコード処理がフレームレートに基づく閾値時間内で行われるとした場合において、次に入力バッファ171から読み出されるべき記憶領域のアドレス、つまり、次にエンコードすべきフレーム(次フレーム)が記憶されているアドレスを示している。例えば、フレームレートが30fpsである場合には、30ms毎に新しい動画データが入力バッファ171に入力される。エンコード処理が平均して30ms内で終了している状態であれば入力バッファ171への書き込みに対してエンコード処理に遅れが生じていない状態であり、この場合には、入力バッファ171のインデックスの番号順に1フレームずつ動画データがエンコーダ172で処理されることになる。つまり、本実施形態では、エンコード処理が行われる毎に、次のインデックスの記憶領域におけるアドレスがポインタPr1に対して順番に設定される。
 ポインタPr2は、エンコード処理時間に応じて、エンコーダ172に入力すべき動画データが記憶されている記憶領域のアドレスが設定される。具体的には、エンコード処理が閾値時間以上である場合、つまり、エンコード処理に遅れが生じている場合には、次のエンコード処理対象となるフレームの動画データとして、前回エンコード処理を行ったフレーム(前フレーム)の動画データが記憶されている記憶領域のアドレスが設定される。また、エンコード処理が閾値時間内であれば、ポインタPr1と同じアドレスがポインタPr2に設定される。ポインタPr2は、ポインタPr1と同様に、エンコード処理が行われる毎に、入力バッファ171から次に読み出すべき動画データの記憶領域のアドレスが設定される。このように、エンコーダ172での1フレームの処理時間が閾値時間以上である場合には、時間軸方向の動きの変化を無くすように、次にエンコード処理を行うべきフレームの動画データとして、前回エンコード処理を行ったフレームと同じフレームの動画データがエンコーダ172に再入力される。
 なお、本実施形態においては、ポインタPw、ポインタPr1及びポインタPr2は、初期値としてインデックス0の記憶領域のアドレスが設定される。初期値のインデックス0の記憶領域は、入力バッファ171における動画データの読出し位置が書き込み位置を追い越さないように、インデックス0と1の記憶領域の書き込み処理が終了したときに読み出される。
 計測部174は、カウンタで構成され、エンコーダ172における1フレームのエンコード処理時間を計測して圧縮制御部173に計測結果を出力する。出力バッファ175は、エンコーダ172によってエンコード処理されたエンコードデータを順次記憶する。
 図1に戻り説明を続ける。映像再生部18は、制御部11の制御の下、背景画像表示モードにおいて、カラオケの楽曲に対応する背景画像データをデコードし、デコードした画像データと歌詞データの画像とを合成して表示部19で表示可能な形式の画像信号に変換して表示部19に入力する機能と、外部映像表示モードにおいて、ビデオカメラ2から出力された動画データと歌詞データの画像とを合成して表示部19で表示可能な形式の画像信号に変換して表示部19に入力する機能とを有する。表示部19は、液晶ディスプレイ等の表示装置で構成され、制御部11の制御の下、映像再生部18から入力された画像信号を一定のフレームレートで表示したり、操作部12で受付けられた操作内容を表す画像等を表示する。
<動作>
 次に、本実施形態に係るカラオケ装置1の録画処理と演奏制御処理の動作について説明する。図4は、カラオケ装置1の演奏制御処理の動作フローを示し、図5は、カラオケ装置1の録画処理の動作フローを示す図である。これらの処理は、カラオケの楽曲が再生されると並行して同時に行われる。以下、これらの処理を各図に沿って説明する。なお、図4の説明において、背景画像表示モードがデフォルト設定されており、外部映像表示モードに設定するか否かはユーザが選択する。
(演奏制御処理)
 制御部11は、ユーザによって操作部12を介して楽曲を選択する操作を受付けると、選択された楽曲の楽曲データと歌詞データとを記憶部16から読み出してRAMに記憶し、楽曲データを音源部13に送出して楽曲の再生を開始する(ステップS11)。操作部12を介して外部映像表示モードの選択操作がユーザによりなされると(ステップS12:YES)、制御部11は、ビデオカメラ2で撮影された一定フレームレート(例えば30fps)の外部映像信号のフレーム毎の動画データを外部映像処理部17において生成し、映像再生部18により、楽曲の演奏の進行に合わせてフレーム毎の動画データとRAMに記憶されている歌詞データとを合成して表示部19に出力し、一定のフレームレートで表示する(ステップS13)。また、制御部11は、マイク3に入力された音声信号と音源部13から出力された楽音信号とを音声信号処理部14において合成してスピーカ15から放音する(ステップS15)。
 ステップS12において、ユーザにより外部映像表示モードの選択操作がなされなければ(ステップS12:NO)、制御部11は、映像再生部18において、楽曲に対応する背景画像データを記憶部16から読み出してデコード処理を行い、楽曲の演奏の進行に合わせて、RAMに記憶されている歌詞データとデコードした背景画像データとを合成して表示部19に表示する(ステップS14)。制御部11は、再生中の楽曲の演奏が終了するまでステップS12~16の処理を繰り返し行い(ステップS16:NO)、楽曲の演奏が終了したときに処理を終了する(ステップS16:YES)。
(録画処理)
 次に、本実施形態の録画処理について図5を用いて説明する。制御部11は、楽曲の再生が開始されるとビデオカメラ2で撮影を開始し、一定フレームレートで撮影された外部映像信号について録画処理を開始する。
 制御部11は、外部映像処理部17において、ビデオカメラ2から一定のフレームレート(例えば30fps)で入力される外部映像の映像信号をA/D変換してフレーム毎の動画データに変換し(ステップS31)、ポインタPwが示す入力バッファ171の記憶領域に、各フレームの動画データを順次書き込み、書き込みを行う毎に、圧縮制御部173により次のインデックスの記憶領域のアドレスをポインタPwに設定する(ステップS32)。
また、外部映像処理部17は、図6(a)に示すように、入力バッファ171においてインデックス1の記憶領域に動画データ(f2)を書き込んだときに、圧縮制御部173により、ポインタPr2が示すインデックス0の記憶領域の動画データ(f1)を入力バッファ171から出力してエンコーダ172に入力する(ステップS33)。
 外部映像処理部17は、入力バッファ171から入力された動画データ(f1)をエンコーダ172においてエンコード処理すると同時に、計測部174によりエンコード処理中の1フレームの処理時間を計測し、エンコード処理後のエンコードデータをエンコーダ172から出力バッファ175に出力する(ステップS34)。制御部11は、出力バッファ175からフレーム毎のエンコードデータを所定時間毎に読出し、読み出したエンコードデータを記憶部16の所定領域に順次記憶する(ステップS35)。
 外部映像処理部17は、再生中の楽曲の演奏が終了していない場合において(ステップS36:NO)、計測部174により計測されたエンコード処理時間が閾値時間内(例えば30ms)であるときは(ステップS37:YES)、図6(b)に示すように圧縮制御部173によりポインタPr1に次のインデックス1の記憶領域を示すアドレスを設定し、ポインタPr2にポインタPr1と同じアドレスを設定する。そして、圧縮制御部173は、ポインタPr2が示すインデックス1の記憶領域内の動画データ(f2)を入力バッファ171から出力してエンコーダ172に入力する(ステップS38)。図6(c)は、エンコーダ172に動画データ(f2)が入力された後、エンコード処理が閾値時間内であったときの入力バッファ171の状態を示している。ポインタPwにはインデックス4の記憶領域が設定され、ポインタPr1とPr2には同じインデックス2の記憶領域が設定され、インデックス2の記憶領域から動画データ(f3)がエンコーダ172に入力されてエンコード処理される。
 エンコーダ172におけるこの動画データ(f3)のエンコード処理時間が閾値時間内でなかった場合(ステップS37:NO)、外部映像処理部17は、圧縮制御部173において、図6(d)に示すように、ポインタPr1には次のインデックス3の記憶領域を示すアドレスを設定し、ポインタPr2は前回と同じインデックス2の記憶領域のアドレスを設定する。そして、圧縮制御部173は、ポインタPr2が示すインデックス2の記憶領域から動画データ(f3)を出力してエンコーダ172に再入力する(ステップS39)。この場合には、インデックス3の記憶領域に記憶されている動画データ(f4)の代わりに、前回と同じ動画データ(f3)がエンコーダ172に再入力されてエンコード処理される。例えば、前回の動画データ(f3)のエンコード処理がフレーム内エンコード処理である場合、次のエンコード処理はフレーム間エンコード処理となる。次のエンコード処理の対象は本来であれば動画データ(f4)であるが、前回と同じフレームの動画データ(f3)をエンコーダ172に入力することでフレーム間の差分が無くなり、このフレームのエンコード処理にかかる時間は動画データ(f4)をエンコーダ172に入力したときのエンコード処理時間より短くなる。
 また、次のエンコード処理がフレーム内エンコード処理の場合には、前回のフレームと同じフレームの動画データ(f3)をエンコードしても、動画データ(f4)をエンコーダ172に入力した場合と比べてエンコード処理時間を短縮できず、エンコード処理時間が閾値時間内とならない場合もある。その場合であっても、動画データ(f3)をエンコーダ172に入力することで、その後に行われるフレーム間エンコード処理の処理時間は本来入力すべき動画データの場合と比べて短くなるため、エンコード処理時間が閾値時間内になるまでこの処理を繰り返せばよい。
 例えば、エンコーダ172に再入力されたインデックス2の動画データ(f3)の処理時間が閾値時間内であれば、ポインタPr1には次のインデックス4の記憶領域を示すアドレスが設定されると共に、ポインタPr2にはポインタPr1と同じアドレスが設定され、インデックス4の記憶領域に記憶されている動画データ(f5)がエンコーダ172に入力される(ステップS38)。
 一方、エンコーダ172に再入力されたインデックス2の動画データ(f3)の処理時間が閾値時間内でなければ、ポインタPr2は前回と同じインデックス2の記憶領域のアドレスが設定される。従って、この場合も、インデックス4の記憶領域に記憶されている動画データ(f5)の代わりに、ポインタPr2が示すインデックス2の記憶領域に記憶されている動画データ(f3)が入力バッファ171から出力されてエンコーダ172に再入力され(ステップS39)、エンコーダ172によりエンコード処理される。外部映像処理部17は、再生中の楽曲の演奏が終了するまでステップS34~39処理を繰り返し行い、楽曲の演奏が終了したときに(ステップS36:YES)、録画処理を終了する。
 このように、映像が入力されている間、エンコード処理時間が閾値時間内となるまで、本来エンコード処理すべきフレームについてはエンコードせず、前回エンコードしたフレームと同じフレームの動画データがエンコーダ172に入力される。これにより、エンコードの処理負荷の高い映像が入力されても、エンコード処理時間を平均して閾値時間内に抑えるように制御されるので、入力バッファ171への動画データの入力に対してエンコード処理が間に合わずに入力バッファ171がオーバーフローしてエンコード処理が停止することを防止することができる。つまり、前回のエンコード処理が閾値時間を超えた場合において次のエンコード処理がフレーム間エンコード処理であれば、前回と同じ動画データが入力されることで、前のフレームとの画像の変化が無くなり、次のフレームのエンコード処理を行う場合よりエンコード処理時間が短くなる。これをエンコード処理時間が閾値時間内となるまで繰り返すことで、エンコード処理時間が閾値時間内に徐々に収束する。
 以上が、本実施形態に係るカラオケ装置1の動作例である。上述した本実施形態に係るカラオケ装置1は、フレーム毎のエンコード処理時間が閾値時間以上である場合には、次のフレームの動画データについてはエンコード処理を行わず、前回と同じフレームの動画データをエンコーダ172に入力し、エンコード処理時間が閾値時間内となるまでこの処理を繰り返す。従って、エンコード処理を行うためのリソースに制約があり、動きの速い映像等のエンコード処理負荷が高い映像がビデオカメラ2から出力されても、エンコード処理の平均時間が入力バッファ171に動画データが入力される時間内となるように制御されるので、エンコードを停止させることなく継続することができる。また、本実施形態のエンコードデータは実際の映像の動きが間引かれたものとなっているが、入力映像と同じフレームレートでエンコードされているため、再生機側でフレームレートを変更することなく再生することができる。また、本実施形態では、1フレーム毎にエンコード処理時間が閾値時間を超えているか否か判断するので、前回と同じフレームの動画データについてフレーム間エンコード処理を行っても、そのエンコード処理が閾値時間内で終了すれば1フレーム分の動きが間引かれるだけで画質の劣化を最小限に抑えることができる。
<変形例>
 本発明の実施形態について説明したが、本発明は上述した実施形態に限定されることなく、他の様々な形態で実施可能である。例えば、上述の実施形態を以下のように変形して本発明を実施してもよく、各変形例を組み合わせて実施してもよい。以下、本発明に係る実施形態の変形例について説明する。
(1)上述した実施形態では、エンコード処理時間が閾値時間以上であれば、前回エンコード処理を行ったフレームと同じフレームの動画データを入力バッファ171から出力してエンコーダ172に入力する入力制御を行う例であったが、閾値時間を超える複数の時間範囲を設定し、その時間範囲に応じて当該入力制御の回数を予め設定するようにしてもよい。例えば、図7に示すように、閾値時間として30ms、閾値時間を超える時間範囲として、時間A、時間B、時間Cを予め設定すると共に、入力制御の回数として、時間Aは1回、時間Bは2回、時間Cは3回を設定する。エンコード処理時間が閾値時間30ms以上である場合において、エンコード処理時間が時間Aの範囲内であれば、実施形態と同様、前回と同じフレームの動画データを入力バッファ171から出力してエンコーダ172に入力する入力制御を1回行い、当該フレームに対するエンコード処理を行う。また、エンコード処理時間が時間Bの範囲内であれば、1回目のエンコード処理時間に関わらず、2回目の入力制御を行ってエンコード処理を行い、2回目のエンコード処理時間を計測する。また、エンコード処理時間が時間Cの範囲内であれば、1回目と2回目のエンコード処理時間に関わらず、3回目の入力制御を行ってエンコード処理を行い、3回目のエンコード処理時間を計測する。
(2)また、上述した実施形態では、エンコード処理時間が閾値時間以上である場合に、前回エンコード処理を行ったフレームと同じフレームの動画データを入力バッファ171から出力してエンコーダ172に入力する入力制御を行う例であったが、エンコード処理時間に関わらず、当該入力制御を行う回数を任意に設定してエンコード処理を行うことで、擬似的にフレームレートを下げた映像を生成するようにしてもよい。つまり、例えば、フレームレートが30fpsの場合おいて、入力制御の回数を5回に設定すると、1番目のフレームの動画データがエンコード処理された後、2~5番目のフレームの代わりに1番目のフレームの動画データが4回エンコード処理される。この場合、2~5番目のフレームはエンコード処理されずに1番目のフレームが5回エンコード処理されるので、エンコード処理後のフレームレートは30fpsで変わらないが、同じフレームレートで再生させると5フレーム単位で同じ映像が表示されるのでフレームレートを1/5に下げたような映像を表示させることができる。
 また、上記変形例の構成を利用して、例えば、楽曲のある演奏タイミングにおいて同じ映像を再生させるようにしてもよい。カラオケ装置1の制御部11は、外部映像処理部17により、予め定められた演奏タイミングに入力バッファ171からエンコーダ172に入力されたフレームの動画データを所定回数だけ連続してエンコーダ172に入力するように制御する。そして、エンコーダ172でエンコード処理されて出力バッファ175に記憶された各エンコードデータを映像再生部18においてデコード処理し、エンコード処理と同様のフレームレートで表示部19に表示する。このように構成することにより、楽曲のある演奏タイミングにおいては静止画のような映像を表示させるようにしてもよいし、楽曲のジャンルや曲調等に応じて、フレームレートを擬似的に変更したような映像を生成して再生するようにしてもよい。なお、楽曲のジャンル等に応じてフレームレートを擬似的に変更したような映像を生成する場合には、楽曲のジャンル毎に入力制御の回数を予め記憶部16に記憶し、楽曲に対応する入力制御の回数に従ってエンコード処理を行うように構成する。
(3)また、上述した実施形態では、外部映像処理部17(動画圧縮制御装置)がカラオケ装置1に組み込まれている例を説明したが、外部映像処理部17はパソコン等の表示装置を有する情報機器に組み込まれてもよいし、カラオケ装置やパソコン等とは別体として接続されて利用されてもよい。
(4)また、上述した実施形態では、外部映像処理部17においてエンコード処理されたエンコードデータを記憶部16に順次記憶させる例であったが、例えば、カラオケ装置1と外部接続されたDVD等の記録媒体にエンコードデータを記録するように構成してもよいし、カラオケ装置1と有線又は無線により接続された外部装置に対してエンコードデータを送信するようにしてもよい。また、動画記録再生装置としてエンコード処理されたエンコードデータを記憶部16に記憶すると共に、映像再生部18においてエンコードデータをデコードして再生するようにしてもよい。
(5)また、上述した実施形態では、入力バッファ171としてリングバッファを用いた例を説明したが、リングバッファに限定する必要はなく、様々な種類のバッファを用いることができる。
 1・・・カラオケ装置、2・・・ビデオカメラ、3・・・マイク、11・・・制御部、12・・・操作部、13・・・音源部、14・・・音声信号処理部、15・・・スピーカ、16・・・記憶部、17・・・外部映像処理部、18・・・映像再生部、19・・・表示部、171・・・入力バッファ、172・・・エンコーダ、173・・・圧縮制御部、174・・・計測部、175・・・出力バッファ

Claims (6)

  1.  予め定められたフレームレートに従って順次入力される動画データをフレーム毎に一時記憶する複数の記憶領域を有するバッファと、
     フレーム内でエンコードするフレーム内エンコード処理とフレーム間の相関に基づいてエンコードするフレーム間エンコード処理のいずれかを用いて、入力された1フレームの前記動画データをエンコードしてエンコードデータを出力するエンコード手段と、
     前記エンコード手段における1フレームの処理時間を計測する計測手段と、
     前記バッファに記憶された動画データをフレーム毎に前記エンコード手段に入力する入力手段と、を備え、
     前記入力手段は、前記計測手段により計測されたフレームの前記処理時間が前記フレームレートに基づく閾値以上である場合には、前記バッファ内に記憶された次にエンコードすべき次フレームの動画データに替えて、当該次フレームの直前にエンコードした前フレームの動画データを前記バッファから前記エンコード手段に入力し、当該次フレームの動画データを前記エンコード手段に入力しない入力制御を行うこと
     を特徴とする動画圧縮制御装置。
  2.  前記閾値以上の複数の時間範囲に応じたそれぞれの前記入力制御の処理回数が予め規定されており、
     前記入力手段は、前記処理時間が前記複数の時間範囲のいずれかの範囲内である場合には、当該時間範囲に対応する前記入力制御の処理回数に従い、前記前フレームの動画データを前記バッファから前記エンコード手段に連続して入力することを特徴とする請求項1に記載の動画圧縮制御装置。
  3.  請求項1又は2に記載の動画圧縮制御装置と、
     前記動画圧縮制御装置から出力されたフレーム毎のエンコードデータを記憶手段に記憶させる記録制御手段と
     を備えた動画記録装置。
  4.  請求項1又は2に記載の動画圧縮制御装置と、
     前記動画圧縮制御装置から出力されたフレーム毎のエンコードデータを記憶する記憶手段と、
     前記記憶手段に記憶された前記フレーム毎のエンコードデータを前記フレームレートに従って読み出し、読み出したフレームのエンコードデータを再生する再生手段と
     を備えることを特徴とする動画記録再生装置。
  5.  予め定められたフレームレートに従って順次入力される動画データをフレーム毎に、複数の記憶領域を有するバッファに一時記憶させ、
     前記バッファに記憶された動画データをフレーム毎に抽出し、
     フレーム内でエンコードするフレーム内エンコード処理とフレーム間の相関に基づいてエンコードするフレーム間エンコード処理のいずれかを用いて、抽出された1フレームの前記動画データを、その処理時間を計測しながらエンコードしてエンコードデータを出力し、
     エンコード時に計測されたフレームの前記処理時間が前記フレームレートに基づく閾値以上である場合には、前記バッファ内に記憶された次にエンコードすべき次フレームの動画データに替えて、当該次フレームの直前にエンコードした前フレームの動画データを前記バッファから抽出し、当該次フレームの動画データのエンコードを省略する制御を行うこと
     を特徴とする動画圧縮制御方法。
  6.  請求項5に記載の動画圧縮制御方法の各工程をコンピュータに実行させるためのプログラムを記録する記録媒体。
PCT/JP2011/069779 2010-09-03 2011-08-31 動画圧縮制御装置、動画記録装置、動画記録再生装置、動画圧縮制御方法及び記録媒体 WO2012029854A1 (ja)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2010197879A JP5652066B2 (ja) 2010-09-03 2010-09-03 動画圧縮制御装置、動画記録装置及び動画記録再生装置
JP2010-197879 2010-09-03

Publications (1)

Publication Number Publication Date
WO2012029854A1 true WO2012029854A1 (ja) 2012-03-08

Family

ID=45772932

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2011/069779 WO2012029854A1 (ja) 2010-09-03 2011-08-31 動画圧縮制御装置、動画記録装置、動画記録再生装置、動画圧縮制御方法及び記録媒体

Country Status (2)

Country Link
JP (1) JP5652066B2 (ja)
WO (1) WO2012029854A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113613071A (zh) * 2021-07-30 2021-11-05 上海商汤临港智能科技有限公司 一种图像处理方法、装置、计算机设备和存储介质

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6463960B2 (ja) * 2014-12-11 2019-02-06 株式会社イマジオム 映像記録装置

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005080123A (ja) * 2003-09-02 2005-03-24 Sony Corp 映像符号化装置、映像符号化制御方法及び映像符号化制御プログラム
JP2007074173A (ja) * 2005-09-06 2007-03-22 Matsushita Electric Ind Co Ltd 動画像符号化装置,符号化制御装置,動画像符号化方法
JP2008160359A (ja) * 2006-12-22 2008-07-10 Victor Co Of Japan Ltd 動画像符号化装置、動画像符号化方法、および動画像符号化用プログラム

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001320705A (ja) * 2000-05-09 2001-11-16 Oki Electric Ind Co Ltd 監視カメラの画像データ圧縮装置
JP5369599B2 (ja) * 2008-10-20 2013-12-18 富士通株式会社 映像符号化装置、映像符号化方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005080123A (ja) * 2003-09-02 2005-03-24 Sony Corp 映像符号化装置、映像符号化制御方法及び映像符号化制御プログラム
JP2007074173A (ja) * 2005-09-06 2007-03-22 Matsushita Electric Ind Co Ltd 動画像符号化装置,符号化制御装置,動画像符号化方法
JP2008160359A (ja) * 2006-12-22 2008-07-10 Victor Co Of Japan Ltd 動画像符号化装置、動画像符号化方法、および動画像符号化用プログラム

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113613071A (zh) * 2021-07-30 2021-11-05 上海商汤临港智能科技有限公司 一种图像处理方法、装置、计算机设备和存储介质
CN113613071B (zh) * 2021-07-30 2023-10-20 上海商汤临港智能科技有限公司 一种图像处理方法、装置、计算机设备和存储介质

Also Published As

Publication number Publication date
JP2012054884A (ja) 2012-03-15
JP5652066B2 (ja) 2015-01-14

Similar Documents

Publication Publication Date Title
JP4904914B2 (ja) ストリーム生成装置、撮像装置、およびストリーム生成方法
JP5146503B2 (ja) 動画処理装置、動画再生装置、動画処理方法、動画再生方法及びプログラム
US10244271B2 (en) Audio recording device, audio recording system, and audio recording method
WO2004047441A1 (ja) 伝送装置と伝送方法と再生装置と再生方法およびプログラムと記録媒体
JP2004180290A (ja) 伝送装置と伝送方法と再生装置と再生方法およびプログラムと記録媒体
JP5474417B2 (ja) 動画データ生成装置、動画データ生成システム、動画データ生成方法およびコンピュータープログラム
JP2010178124A (ja) 記録装置及び記録方法
US20100310229A1 (en) Video processing apparatus and vide processing method
JP5652066B2 (ja) 動画圧縮制御装置、動画記録装置及び動画記録再生装置
JP2009088878A (ja) 撮像装置、記録装置、再生装置、撮像方法、記録方法、再生方法及びプログラム
JP5109496B2 (ja) データ配信装置、データ配信方法およびプログラム
JP2013055440A (ja) 撮像装置及び画像音声再生装置
EP0898422A2 (en) Audio signal decompressing apparatus
JP2005006166A (ja) 撮像装置
JP3331344B2 (ja) カラオケ演奏装置
KR100748370B1 (ko) 비디오 및 오디오 데이터를 동기화하는 방법 및 동영상재생 장치
WO2005104125A1 (ja) 記録再生装置、同時記録再生制御方法、および同時記録再生制御プログラム
JP2004215123A (ja) 画像再生装置、画像再生方法及び画像再生プログラム
JP4335087B2 (ja) 音付映像の再生装置
KR0136051B1 (ko) 영상가요 반주장치 및 그 동작방법
JP2017076895A (ja) 音声信号処理装置及び方法
JP2015029211A (ja) 撮像装置
JPH0898134A (ja) データ記録再生装置
KR100703002B1 (ko) 선택적 인코딩이 가능한 신호처리장치 및 그의 선택적인코딩 방법
JP2001197425A (ja) 映像信号処理装置

Legal Events

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

Ref document number: 11821869

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11821869

Country of ref document: EP

Kind code of ref document: A1