This application claims the benefit of priority of Japanese Application No. 2004-323084 filed Nov. 8, 2004, the disclosure of which also is entirely incorporated herein by reference.
The present invention relates to a data processing method and apparatus for interrupting and resuming a transcode operation.
In the Internet and client/server environments, the size of data handled must be small. However, MPEG-2 (an MPEG standard format defined by the Moving Picture Experts Group) requires a large number of bits to represent each picture or sound. Therefore, in recent years, data attached to a Web page or mail has been converted into MPEG-4 format which requires a smaller number of bits before uploading the Web page or transmitting the mail. The conversion from MPEG-2, etc. to MPEG-4 is achieved by use of a transcode function (that is, a dubbing function for converting a code format or changing a coding rate) which reads out and decodes MPEG-2 encoded data written on a recording medium, re-encodes the decoded data into MPEG-4 format, and stores it on the recording medium.
Incidentally, a transcode operation may be interrupted due to various reasons. If a transcode operation is interrupted and later resumed, the transcoded stream data becomes discontinuous at the point of interruption. Therefore, when the transcode operation has been interrupted, it is necessary to transcode the original data again from its beginning, meaning that the previously obtained transcoded stream data has been wasted.
A technique for preventing transcoded stream data from becoming discontinuous due to interruption of the transcode operation is to store in an interruption point storing unit information on the points of interruption on the read and write media and, when the transcode operation is resumed, retrieve this information from the interruption point storing unit and start the operation at these points of interruption so that the transcoded stream data is continuous (see, e.g., Japanese Patent Laid-Open No. 2001-94935).
Since an MPEG system encodes the current image using a portion of the previously encoded data, the coding rate or the amount of data encoded per second varies according to the rate of change of the input image or sound. The coding rate is not fixed at its initial value. This arrangement allows the coding rate to be increased when a complicated image or a fast-moving image is encoded, making it possible to efficiently generate stream data while maintaining the quality of the image or sound. For example, after being initially set to 5 Mbps (megabit per second), the coding rate may increase to as high as 10 Mbps when a complicated image or a fast-changing image is encoded, which requires a large amount of data to be processed. Assume, therefore, that a transcode operation is interrupted when the coding rate has been increased to 10 Mbps to process a large amount of data. In such a case, resuming the transcode operation with the coding rate set to the initial value 5 Mbps leads to a reduction in the amount of information which can be retrieved and hence a degradation in the quality of the image and sound.
The technique disclosed in the above patent publication stores information on the points of interruption of a transcode operation in units of GOP (Group of Pictures), which allows continuous stream data to be generated when the transcode operation is resumed. However, the above technique does not consider to store information as to the coding rate. Therefore, if a transcode operation to convert one MPEG format to another MPEG format has been interrupted, it must be resumed with the coding rate set to its initial value, since no information on the value of the coding rate other than the initial value is available. This makes the transcoded stream data discontinuous in terms of coding rate, resulting in a degradation in the quality of the image and sound around the point of interruption.
An object of the present invention is to solve the problems described above.
When transcoding encoded data, the present invention determines whether the transcode operation is to be interrupted, and if so, interrupts the operation after storing the current coding rate.
The above arrangement allows the performance of the recording/reproducing apparatus to be increased.
These and other features, objects, and advantages of the present invention will become more apparent from the following description when taken in conjunction with the accompanying drawings wherein:
A preferred embodiment of the present invention will be described below with reference to FIGS. 1 to 4. It should be noted that in the following example, an optical disk is used as a recording medium and a transcode operation is performed to transcode an MPEG-2 encoded signal read from the optical disk into MPEG-4 format and write it back to the optical disk.
The operation of the camera unit 38 will now be described. The imaging sensor (CCD) 4 captures image information through the lens unit 3 driven by the driver 6 and converts it into an electronic signal. The electronic signal is then converted into a video signal by the camera video signal processing circuit 5 and input to the encode/decode processing circuit 7. On the other hand, the microphone 1 captures sound and converts it into an electronic signal. The electronic signal is then converted into an audio signal by the audio input processing circuit 2 and input to the encode/decode processing circuit 7.
The operation of the output unit 39 will now be described. The encode/decode processing circuit 7 digitizes and encodes the input video and audio signals into respective digital signals. Specifically, the encode/decode processing circuit 7 encodes the input signals by use of an MPEG system or a JPEG (Joint Photographic Experts Group) system. The MPEG system is used to encode moving images, while the JPEG system is used to encode still images. The digital audio signal output from the encode/decode processing circuit 7 is input to the audio output terminal 9 through the audio output circuit 8. The digital video signal from the encode/decode processing circuit 7, on the other hand, is input to the display means (LCD) 10 for display and to the video output terminal 11 through the video display/output processing circuit 12.
The operation of the control unit 40 will now be described. This unit detects the operation of the power switch 20 and starts to operate when the power switch 20 has been turned on and required voltages and currents have been supplied from the power supply unit to each circuit and each means of this unit. The camera control microprocessor 14 controls the lens unit 3 through the driver 6 such that the imaging sensor (CCD) 4 captures a desired image of the object. The camera control microprocessor 14 also controls the encode/decode processing circuit 7 such that the encode/decode processing circuit 7 digitizes and encodes a moving image or a still image into a digital signal and temporarily stores it in the D-RAM 13. This digital signal is sent to the signal/control processing circuit 29 in the read/write unit 41 through the interface circuit 19. The camera control microprocessor 14 also monitors the charging circuit 21 to check the state of the power supply as well as detecting the operation of the power switch 20 to perform processing for power supply to the camera unit 38. The built-in battery 16 is used to store backup information, such as date, supplied to the camera control microprocessor 14. The disk insertion/removal monitoring means (module) 17 monitors whether the disk medium 25 has been inserted or removed. This means may be implemented by a switch provided on the insertion slot to detect the presence or absence of the disk medium 25. It should be noted that the above detection switch is energized by the battery 23 and has an electronic signal output.
The operation of the read/write unit 41 will now be described. The read/write unit 41 converts the digital signal (a moving image or a still image) received through the interface circuit 19 into a recording format suitable for the disk medium 25 by use of the signal/control processing circuit 29 and the D-RAM 30 and stores it on the disk medium 25 through the write circuit 32 and the pickup 27. Further, to control the relative position between the disk medium 25 and the pickup 27, the read/write unit 41 reads from the pickup 27 in a time division manner and thereby detects positional information prewritten on the disk medium 25 through the read circuit 28, processes the detected positional information by use of the signal/control processing circuit 29 and the control microprocessor 37, and drives the spindle motor 26, the slide (or feed) motor 31, and the focus and tracking actuators (not shown) within the pickup 27 through the actuator drivers 36. The S-RAM 33 and the flash memory 34 temporarily stores operation data for the positional control and laser power control on the pickup 27 performed by the control microprocessor 37, as well as storing programs, etc., for example. Further, the nonvolatile memory 35 stores operation data such as the position of the pickup 27 calculated by the control microprocessor 37.
Now that the write operation has been described, the following description will be directed to the read operation. When a read operation is performed, the steps for the write operation described above are roughly followed in the reverse direction. That is, the read/write unit 41 reads data written on the disk medium 25 through the pickup 27 and the read circuit 28, converts the data which has a recording format suitable for the disk medium .25 into an MPEG-2 encoded digital signal by use of the signal/control processing circuit 29 and the control microprocessor 37, and sends it to the encode/decode processing circuit 7 through the interface circuit 19. Receiving the encoded digital signal, the encode/decode processing circuit 7 decodes it into video and audio signals. The video signal is input to the display means 10 and the video output terminal 11 through the video display/output processing circuit 12, while the audio signal is input to the audio output terminal 9 through the audio output circuit 8.
The power supply unit has the external power input terminal 22 for receiving power from outside. Further, the battery 23 is charged through the charging circuit 21 from an external power supply connected to the external power input terminal 22. When the external power supply is connected, the power supply circuit 24 converts the external power into required voltages, which are then supplied to each circuit and each means of this recording/reproducing apparatus. When the external power supply is not connected, the power from the battery 23 is fed to each circuit and each means through the power supply circuit 24.
Examples of disk media (25) for storing video signals include: DVD-ROM (Digital Versatile Disc Read Only Memory) for read only; DVD-R (Digital Versatile Disc Recordable) for rewriting only once; and DVD-RW (Digital Versatile Disc Rewritable) and DVD-RAM (Digital Versatile Disc Random Access Memory) for rewriting more than once.
The operation performed by the transcode function will be briefly described below.
First, in order for the camera-equipped recording/reproducing apparatus to initiate a transcode operation, the user selects the scene to be transcoded using a menu and initially sets the coding format (MPEG-4 ), the target image size, and the coding rate. Then, the recording/reproducing apparatus starts the transcode operation. Specifically, the read/write unit 41 reads data written on the disk medium 25, converts the data into an MPEG-2 encoded digital signal by use of the signal/control processing circuit 29, and sends it to the encode/decode processing circuit 7 through the interface circuit 19. Receiving the digital signal, the encode/decode processing unit 7 decodes it into video and audio data and then re-encodes the video and audio data into MPEG-4 format based on the initially set coding format (MPEG-4 ), target image size, and coding rate. After that, the encode/decode processing unit 7 sends the encoded digital signal the encoded video data and audio data to the read/write unit 41 through the interface circuit 19. Receiving the encoded digital signal, the read/write unit 41 converts the signal into a write format suitable for the disk medium 25 by use of the signal/control processing circuit 29 and writes it to the disk medium 25 through the write circuit 32 and the pickup 27. It should be noted that the coding rate varies depending on the rate of change of the input image or sound during the transcode operation. Even if the coding rate is initially set to 5 Mbps, it may increase to as high as 10 Mbps when the image becomes complicated or changes violently and hence the amount of data increases.
The power supply within a portable device such as a video camera does not always provide sufficient power. When the power has reached an insufficient level during a transcode operation, the battery may need to be replaced, requiring the transcode operation to be interrupted. Furthermore, the user may want to interrupt the transcode operation to take, reproduce, or edit a picture. When the transcode operation is interrupted due to a user operation or insufficient power, the recording/reproducing apparatus writes to the EEP-ROM 18 (memory means) such information as the read and write addresses on the disk medium 25 at the time of the interruption, the coding format, and the target image size and information indicating occurrence of an interruption so as to be able to later resume the transcode operation. The recording/reproducing apparatus interrupts the transcode operation in units of GOP. It should be noted that if there is no information on the coding rate at the time of the interruption, the transcode operation must be resumed with the coding rate set to its initial value, making it difficult to generate a stream which is continuous in terms of coding rate. For example, assume that the coding rate is 10 Mbps at the time of the interruption. That is, a large amount of data must be processed around this point of interruption. If the transcode operation is later resumed at this point with the coding rate set to the initial value 5 Mbps, it leads to a reduction in the amount of information which can be retrieved and hence a degradation in the quality of the image and sound. To address this problem, the present embodiment also stores information on the coding rate at the time of the interruption in the EEP-ROM 18 in order to resume the transcode operation so that the transcoded stream (around the point of interruption) is continuous also in terms of coding rate, thereby preventing a degradation in the quality of the image and sound at the point of interruption.
First, the camera-equipped recording/reproducing apparatus performs the following 8 steps: receiving a request for transcoding made by a user through a predetermined operation (step ST301); receiving user selection of a scene to be transcoded using a menu, receiving initial values of transcode parameters such as coding rate, coding format, and target image size, storing these parameter values (referred to in this specification as “transcode information”) in the D-RAM 13, and initiating a transcode operation (step ST302); reading MPEG-2 encoded data from the disk medium 25 (step ST303); separating the read data into encoded video data and audio data (step ST304); decoding the encoded video data and audio data (step ST305); re-encoding the decoded video data and audio data into MPEG-4 format based on the transcode information obtained from the D-RAM 13 (step ST306); multiplexing the encoded video data and audio data to produce stream data (step ST307); and storing the generated stream data on the disk medium 25. Then, at step ST309, the camera control microprocessor 14 determines whether the transcode operation is to be interrupted. At that time, the camera control microprocessor 14 checks whether the power is sufficient, etc. If the transcode operation is to be interrupted due to insufficient power or user operation, then at step ST310 the recording/reproducing apparatus interrupts the transcode operation in units of GOP and stores in the EEP-ROM 18 transcode resume information such as the read and write addresses on the disk medium 25 and the coding rate at the time of the interruption and information indicating occurrence of an interruption as well as the initial values of parameters such as coding format and target image size before ending the processing. It should be noted that the user may want to take a picture during the transcode operation. To handle such a case, at step ST309 the camera control microprocessor 14 checks the photographing start button, the transcoding interrupt button, etc. to determine whether the transcode operation is to be interrupted. As a result, the user is less likely to miss photo opportunities. Further, the user may also want to reproduce or edit a picture. To handle this, the camera control microprocessor 14 checks the corresponding buttons, etc. to determine whether the transcode operation is to be interrupted, allowing the user to quickly start reproducing or editing the picture. If it is determined at step ST309 that the transcode operation is not to be interrupted, then at step ST311 the recording/reproducing apparatus determines whether the transcoding of the selected scene has been completed. If the transcoding has not yet been completed, processing returns to step ST303 and the transcode operation is repeated. If, on the other hand, the transcoding of the selected scene has been completed, the transcode operation is ended. It should be noted that the coding rate varies depending on the rate of change of the input image or sound, meaning that the coding rate may not be at its initial value when processing has returned to step ST303.
As described above, the present invention resumes a transcode operation using the coding rate at the time of the interruption so that the transcoded stream is continuous in terms of coding rate, thereby preventing a degradation in the quality of the image and sound at the point of interruption.
Even though the present embodiment was described as using an optical disk as the recording medium 25 for storing stream data, the present invention is not limited to this particular type of recording medium. For example, a hard disk, a memory card, etc. may be used.
The recording/reproducing apparatus of the present embodiment described above reads data from the disk medium 25, transcodes the read data, and writes it back to the same disk medium 25. However, the transcoded data may be written back to a different recording medium than that from which it was read. For example, the data may be read from an optical disk and written back to a memory card.
The present embodiment was described as applied to a transcode operation in which MPEG-2 coded data is converted into MPEG-4 format. However, the prevent invention can be applied to other coding formats. For example, the present invention can be applied to any image coding format, such as MPEG-7 or H.264, and any voice coding format, such as linear PCM, G.726, AC3, or AAC.
While we have shown and described several embodiments in accordance with our invention, it should be understood that disclosed embodiments are susceptible of changes and modifications without departing from the scope of the invention. Therefore, we do not intend to be bound by the details shown and described herein but intend to cover all such changes and modifications as fall within the ambit of the appended claims.
Number | Date | Country | Kind |
---|---|---|---|
2004-323084 | Nov 2004 | JP | national |