Video transcoding method and apparatus

Abstract
Provided are a method and apparatus for selecting an appropriate reference frame at high speed from a plurality of reference frames when transcoding an input video stream into a different format having a different group of pictures (GOP) structure from that of the input video stream. A transcoder, which transcodes an input video stream into an output video stream, includes a reconstruction unit which reconstructs transform coefficients and a video frame from the input video stream; a selection unit which selects one of a first frame, which is referred to by the video frame, and a second frame, which is located at a different position from the first frame, based on sizes of the transform coefficients; and an encoding unit which encodes the reconstructed video frame by referring to the selected frame.
Description

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other aspects of the present invention will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings, in which:



FIG. 1A illustrates a GOP structure of a MPEG-2 video main profile;



FIG. 1B illustrates a GOP structure of an H.264 baseline profile;



FIGS. 2A and 2B illustrate the concept of multiple referencing supported by H.264;



FIGS. 3A and 3B are diagrams for explaining a method of selecting a reference frame in a transcoding process;



FIG. 4 is a block diagram of a transcoder according to an exemplary embodiment of the present invention;



FIG. 5 is a block diagram of a reconstruction unit included in the transcoder of FIG. 4; and



FIG. 6 is a block diagram of an encoding unit included in the transcoder of FIG. 4.


Claims
  • 1. A transcoder which transcodes an input video stream into an output video stream, the transcoder comprising: a reconstruction unit which reconstructs transform coefficients and a video frame from the input video stream;a selection unit which selects one of a first frame, which is referred to by the video frame, and a second frame, which is located at a different position from the first frame, based on sizes of the transform coefficients; andan encoding unit which encodes the reconstructed video frame by referring to the selected frame.
  • 2. The transcoder of claim 1, wherein the second frame is located immediately before the video frame.
  • 3. The transcoder of claim 1, wherein the input video stream is a Motion Picture Experts Group (MPEG) standard video stream, and the output video stream is an H.264 standard video stream.
  • 4. The transcoder of claim 1, wherein the selection unit selects the first frame as a reference frame for a block if a sum of absolute values of the transform coefficients for the block does not exceed a predetermined threshold value, and selects the second frame as the reference frame for the block if the sum of the absolute values of the transform coefficients for the block exceeds the predetermined threshold value.
  • 5. The transcoder of claim 4, wherein the threshold value is obtained by dividing a sum of absolute values of transform coefficients included in a single frame by the number of blocks.
  • 6. The transcoder of claim 4, wherein the threshold value is obtained by dividing a sum of absolute values of transform coefficients included in currently processed blocks among transform coefficients included in a single frame by the number of the currently processed blocks.
  • 7. The transcoder of claim 4, wherein the threshold value is obtained by multiplying a value, which is obtained by dividing a sum of absolute values of transform coefficients included in a single frame by the number of blocks, by a predetermined variable coefficient, and the variable coefficient is determined by the number of blocks remaining to be processed in the single frame and a remaining time before a time limit.
  • 8. The transcoder of claim 7, wherein the variable coefficient is obtained by dividing a value, which is obtained by dividing the number of the remaining blocks by the number of the blocks included in the single frame, by a value, which is obtained by multiplying the remaining time by a frame rate.
  • 9. The transcoder of claim 1, wherein the encoding unit uses a motion vector of the input video stream if the selected frame is the first frame, and estimates a motion vector by referring to the second frame if the selected frame is the second frame.
  • 10. The transcoder of claim 1, wherein the reconstruction unit comprises: an entropy decoder which decodes the input video stream, and reconstructs quantization coefficients and motion vectors;a dequantization unit which dequantizes the quantization coefficients to obtain the transform coefficients;an inverse transform unit which inversely transforms the transform coefficients; andan inverse prediction unit which performs motion compensation on a reference frame using the motion vectors to generate a predictive frame, and generates the reconstructed video frame by adding the predictive frame to the result of the inverse transform.
  • 11. The transcoder of claim 1, wherein the encoding unit comprises: a prediction unit which obtains motion vectors allocated to blocks of the reconstructed video frame using one of the first and the second frames as a reference frame, performs motion compensation on the reference frame using the motion vectors to generate a predictive frame, and generates a residual by subtracting the predictive frame from the reconstructed video frame;a transform unit which performs a spatial transform on the residual to obtain the transform coefficients;a quantization unit which quantizes the transform coefficients to generate quantization coefficients; andan entropy encoder which encodes the quantization coefficients and the motion vectors to generate the output video stream.
  • 12. A method of transcoding an input video stream into an output video stream, the method comprising: reconstructing transform coefficients and a video frame from the input video stream;selecting one of a first frame, which is referred to by the video frame, and a second frame, which is located at a different position from the first frame, based on sizes of the transform coefficients; andencoding the reconstructed video frame by referring to the selected frame.
  • 13. The method of claim 12, wherein the second frame is located immediately before the video frame.
  • 14. The method of claim 12, wherein the input video stream is a Motion Picture Experts Group (MPEG) standard video stream, and the output video stream is an H.264 standard video stream.
  • 15. The method of claim 12, wherein the selecting one of the first and the second frame comprises: selecting the first frame as a reference frame for a block if a sum of absolute values of the transform coefficients for the block does not exceed a predetermined threshold value; andselecting the second frame as the reference frame for the block if the sum of the absolute values of the transform coefficients for the block exceeds the predetermined threshold value.
  • 16. The method of claim 15, wherein the threshold value is obtained by dividing a sum of absolute values of transform coefficients included in a single frame by the number of blocks.
  • 17. The method of claim 15, wherein the threshold value is obtained by dividing a sum of absolute values of transform coefficients included in currently processed blocks among transform coefficients included in a single frame by the number of the currently processed blocks.
  • 18. The method of claim 15, wherein the threshold value is obtained by multiplying a value, which is obtained by dividing a sum of * absolute values of transform coefficients included in a single frame by the number of blocks, by a predetermined variable coefficient, and the variable coefficient is determined by the number of blocks remaining to be processed in the single frame and a remaining time before a time limit.
  • 19. The method of claim 18, wherein the variable coefficient is obtained by dividing a value, which is obtained by dividing the number of the remaining blocks by the number of the blocks included in the single frame, by a value, which is obtained by multiplying the remaining time by a frame rate.
  • 20. The method of claim 12, wherein the encoding the reconstructed video frame comprises using a motion vector of the input video stream if the selected frame is the first frame, and estimating a motion vector by referring to the second frame if the selected frame is the second frame.
Priority Claims (2)
Number Date Country Kind
10-2006-0018295 Feb 2006 KR national
10-2007-0000791 Jan 2007 KR national