WO2007125458A2 - Method and apparatus for encoding/transcoding and decoding - Google Patents

Method and apparatus for encoding/transcoding and decoding Download PDF

Info

Publication number
WO2007125458A2
WO2007125458A2 PCT/IB2007/051405 IB2007051405W WO2007125458A2 WO 2007125458 A2 WO2007125458 A2 WO 2007125458A2 IB 2007051405 W IB2007051405 W IB 2007051405W WO 2007125458 A2 WO2007125458 A2 WO 2007125458A2
Authority
WO
WIPO (PCT)
Prior art keywords
information
encoding
picture
video
macroblock
Prior art date
Application number
PCT/IB2007/051405
Other languages
French (fr)
Other versions
WO2007125458A3 (en
Inventor
Declan Patrick Kelly
Jin Wang
Daqing Zhang
Original Assignee
Koninklijke Philips Electronics N.V.
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 Koninklijke Philips Electronics N.V. filed Critical Koninklijke Philips Electronics N.V.
Priority to JP2009507215A priority Critical patent/JP2009535881A/en
Priority to EP07735542A priority patent/EP2014099A2/en
Publication of WO2007125458A2 publication Critical patent/WO2007125458A2/en
Publication of WO2007125458A3 publication Critical patent/WO2007125458A3/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/40Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using video transcoding, i.e. partial or full decoding of a coded input stream followed by re-encoding of the decoded output stream
    • 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/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/132Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
    • 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/136Incoming video signal characteristics or properties
    • H04N19/137Motion inside a coding unit, e.g. average field, frame or block difference
    • H04N19/139Analysis of motion vectors, e.g. their magnitude, direction, variance or reliability
    • 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/136Incoming video signal characteristics or properties
    • H04N19/14Coding unit complexity, e.g. amount of activity or edge presence estimation
    • 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/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/172Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a picture, frame or field
    • 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/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/174Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a slice, e.g. a line of blocks or a group of blocks
    • 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/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/46Embedding additional information in the video signal during the compression process
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/61Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding

Definitions

  • the invention relates to a method and apparatus for encoding/transcoding and decoding, in particular to a method and apparatus for encoding/transcoding and decoding with lowered code rate.
  • SDTV/HDTV digital television
  • MPEG Motion Picture Experts Group
  • H.263 High Definition Video Experts Group
  • Quicktime etc. the main purpose of these standards is to make the compressed video stream have lower bit rate and better image quality.
  • the bit rate it is more important to lower the bit rate than to obtain a good image quality, for example, in the case where video and audio file is played on the mobile device (such as mobile phone).
  • the storage capacity of mobile device is very limited, and if the rate bit is too high, the video compression file will be too large, and it is impossible to storage enough video compression file in the mobile device to be played for users.
  • the code rate can be lowered by means of image frame duplication, the ratio of lowering the code rate is very limited, and the image quality will be also affected.
  • Present invention provides a method and apparatus of encoding/transcoding for lowering the code rate more effectively, and a method and apparatus of decoding for recovering images effectively when decoding.
  • a method for encoding comprising steps of: acquiring a location information, said location information being used to identify the location of a video information, the complexity of said video information being less than a predetermined threshold; based on said location information, writing a predetermined error information into an encoded video stream to replace the encoding of said video information.
  • an apparatus for encoding comprising: an acquiring device for acquiring a location information, said location information being used to identify the location of a video information; a writing device, based on said location information, for writing a predetermined error information into an encoded video stream to replace the encoding of said video information.
  • a method for decoding comprising steps of: determining a replacing video information based on a error information in a compressed video stream, said error information being written at the time of encoding; replacing the predetermined error information with said replacing video information.
  • an apparatus for decoding comprising: a determining device for determining a replacing video information based on a error information in a compressed video stream, said error information being written at the time of encoding; a replacing device for replacing the predetermined error information with said replacing video information.
  • a method for transcoding for converting a video stream encoded with first compression ratio into a video stream encoded with second compression ratio, comprising steps of: partly decoding the video stream encoded with first compression ratio; acquiring location information based on said partly decoded video stream, said location information being used to identify the location of a video information, the complexity of said video information being less than a predetermined threshold; based on said location information, writing a predetermined error information into an encoded video stream to replace the encoding of said video information.
  • an apparatus for transcoding for converting a video stream encoded with first compression ratio into a video stream encoded with second compression ratio, comprising: a partly decoding device for partly decoding the video stream encoded with first compression ratio; a partly encoding device for encoding the partly decoded video stream with second compression ratio, in order to obtain a partly encoded video stream, said partly encoding device comprising: an acquiring device for acquiring a location information, said location information being used to identify the location of a video information; a writing device, based on said location information, for writing a predetermined error information into an encoded video stream to replace the encoding of said video information.
  • a computer program product for encoding comprising: code for acquiring a location information, said location information being used to identify the location of a video information, the complexity of said video information being less than a predetermined threshold; code for writing a predetermined error information into an encoded video stream to replace the encoding of said video information, based on said location information.
  • the present invention provides a method and apparatus for encoding/transcoding and decoding, and predetermined error information can be written at the encoding/transcoding end, and code rate is decreased effectively. Meanwhile, the predetermined error information can be easily detected at the decoding end and be error- hidden, which ensures the quality of images resulted when users play video file via the mobile device.
  • Figure 1 is a method flowchart of writing an image error in accordance with an embodiment of present invention.
  • Figure 2 is a method flowchart of writing a slice error in accordance with an embodiment of present invention.
  • Figure 3 is a method flowchart of writing a macroblock error in accordance with an embodiment of present invention.
  • Figure 4 is a structural schematic view of an apparatus for encoding in accordance with an embodiment of present invention.
  • Figure 5 is a structural schematic view of an apparatus for transcoding in accordance with an embodiment of present invention.
  • Figure 6 is a structural schematic view of an apparatus for decoding in accordance with an embodiment of present invention.
  • present invention will be described in details with respect to a method and apparatus for encoding/transcoding and decoding in MPEG2 standard. It will be understood by those skilled in the art that present invention could be modified and applied to other types of encoding/decoding standard, such as H.263 or Quicktime standard, on the basis of without departing the scope of content of present invention.
  • a method for encoding comprising steps of: acquiring a location information, said location information being used to identify the location of a video information, the complexity of said video information being less than a predetermined threshold; based on said location information, writing a predetermined error information into an encoded video stream to replace the encoding of said video information.
  • the predetermined error information could comprise three types of picture class error information, slice class error information and macroblock class error information. Prior to writing the predetermined error information, it is required to obtain the location information of writing error, and said location information could be ID information that identified a specific picture, slice or macroblock.
  • the complexity of the video information could comprise: motion vector complexity of image information, smoothness of slice and macroblock, and motion vector complexity of macroblock. Detailed description is as following.
  • Figure 1 is a method flowchart of writing an image error in accordance with an embodiment of present invention.
  • the video data are encoded according to a predetermined standard (such as MPEG2).
  • a predetermined standard such as MPEG2
  • the raw video data are processed to form I- frame, P-frame and B-frame, and form a certain sequence based on the parameter setting.
  • several operations such as DCT transformation, quantitation, VCL and motion prediction, motion compensation and so on are performed to them, and the detailed description will be omitted.
  • I-frame is encoded only based on the information of the frame of picture itself
  • P-frame is predict-encoded based on the previous proximate I-frame or P-frame, that is, a reference frame (such as I-frame or P-frame) will be acquired firstly, then motion estimation will be performed to current frame (such as P-frame) based on the reference frame, then a reference motion vector of current frame will be calculated.
  • B-frame is predict-encoded based on itself, or previous or subsequent frames.
  • step Sl 10 it is determined that whether the current picture is I-frame, and if it is I-frame, picture class error will be not written into the current picture, and to directly proceed to flow A section (described in details in figure 2).
  • step S 120 it is determined that whether the motion vector complexity of current picture is above a threshold.
  • the motion vector complexity of picture is calculated by means of mean-square error.
  • the motion vector complexity of current k ⁇ frame of picture is determined by calculating the mean-square error ⁇ f orwar d (Picture.. [k]), ⁇ bac kw a r d (Picture.. [k]) of forward motion vector and backward motion vector of current k ⁇ frame of picture:
  • M denotes the number of macroblock included in the width direction of k ⁇ frame of picture
  • M denotes the number of macroblock included in the height direction of k ⁇ frame of picture
  • MV fonvard Peak motion vector
  • MVf orW ard (i, j) and MVbackward (i, j) are the forward motion vector and backward motion vector of (i, j) th macroblock respectively.
  • the complexity of current picture motion vector is determined by two predetermined thresholds ⁇ i ow , and ⁇ hi g h, if ⁇ forward (Picture.. [k]) ⁇ ow and ⁇ backward (Picture..[k]) ⁇ /ow , it could be determined that the motion vector complexity of current picture is lower. If ⁇ 3f orwa rd (Picture.. [k])>c h i g h and ⁇ backward (Picture..[k]) >c h i g h , current picture will be a motion vector with high complexity. If both of above two cases are not satisfied, current picture will be a motion vector with moderate complexity.
  • a picture class error is written into the pictures with lower complexity of motion vector, that is, it is only required to write a picture header of current frame, and the specific video data of corresponding frame will be not reserved, and it is not considered to write picture class error into pictures with moderate and high complexity of motion vector, so as to avoid affecting the quality of picture playing severely.
  • setting of threshold ⁇ i ow could be based on the ration of reduced code rate, for example, the magnitude of threshold ⁇ i ow may be in direct proportion to the ration of reduced code rate.
  • a picture class error is written into a picture whose complexity of motion vector is determined lower.
  • the written frame error is detected by means of the error detect mechanism at the decoding end, and then is recovered with the method of frame recovery.
  • step S 150 it is determined that whether next frame of picture will be proceeded. If the next frame of picture is proceeded, jump to step SI lO, otherwise the flow will end.
  • Figure 2 is a method flowchart of writing a slice error in accordance with an embodiment of present invention.
  • step S220 it is determined that whether the current slice is a smooth slice, and if it is not a smooth slice, slice class error will be not written into the current slice, and to directly proceed to flow B section (described in details in figure 3).
  • To determine whether current slice is a smooth slice is determined by calculating the number of smooth macroblock included in current slice. If the number of smooth macroblock included in current slice is above a threshold, current slice is considered as a smooth slice. Otherwise, current slice is not considered as a smooth slice.
  • whether a macroblock is a smooth macroblock is determined by calculating the gradient.
  • Edge detection is the most primary operation of detecting significant local changes in a picture.
  • step edge is related to the local peak of the first-order derivative of the picture.
  • Gradient is a measure of varying of function, and a picture may be regarded as sampling spots array of picture strength continuing function. Therefore, similar to the case of one dimension, the significant changing of picture grey scale value could be detected by the discrete approximate function of gradient.
  • the gradient is a two dimension equivalent equation of the first-order derivative, and the gradient vector G of vector pixel spot p contains lateral gradient vector G x and longitudinal gradient vector G y :
  • the direction of vector G(x,y) is the direction of largest varying ratio when the function f(x, y) increases;
  • the magnitude of gradient is given by the following: I CKxM ⁇ ⁇ G; + G;
  • angle ⁇ is the angle relative to x axis.
  • gradients in sixteen directions formed by averagely dividing a circumference centered at a pixel spot are calculated, and the maximal gradient value Counter m ⁇ X and the a minimal gradient value Counter ⁇ n are taken therein.
  • the macroblock is an edge macroblock
  • the macroblock is a texture macroblock
  • the macroblock is a smooth macroblock; wherein Ti and T 2 are two predetermined large and small thresholds respectively.
  • step S240 If it is determined that current slice is a smooth slice, proceed to step S240, and a slice class error is written into the current slice, that is, only the slice header is reserved, and related slice data could be discarded completely or partly, or particular parameters in corresponding slices is set to be illegal value to reduce the code rate.
  • the decoder detects this type of errors using existing error detection module.
  • the corresponding parameters set to be illegal value they could be detected by special error process mechanism.
  • Table 1 shows the corresponding legal value of some parameters, for example, at the time of encoding, Slice start code in the table is set to be a value that is not between 0x00000101 and 0x00000 IAF, then fault will arise at the time of decoding. It will be known to the decoding device that slice data has been lost according to the specific error, and data recovery will be needed.
  • step S260 it is determined that whether next slice will be proceeded. If next slice is proceeded, jump to step S220, and it is determined that whether next slice is a smooth slice. Otherwise, the whole flow will end.
  • Figure 3 is a method flowchart of writing a macroblock error in accordance with an embodiment of present invention.
  • step S310 it is determined that whether the type of current macroblock is a smooth macroblock, and if it is not a smooth macroblock, directly jump to step S380, and it is determined that whether next macroblock will be proceeded. If the type of current macroblock is a smooth macroblock, proceed to step S340, and it is determined that whether motion vector complexity of current macroblock is above a threshold.
  • the method of determining the motion vector complexity of current macroblock is similar to that in step S 130 in figure 1, and same description is not necessary.
  • step S380 If after determining the motion vector complexity of current macroblock is above a threshold, directly jump to step S380, and it is determined that whether next macroblock is proceeded.
  • step S360 If after determining the motion vector complexity of current macroblock is less than or equal to a threshold, the flow proceed to step S360, and a macroblock class error is written into current macroblock, for example, invalid shorter variable length code defined in the motion picture compression standard variable length code table is used to replace the valid longer variable length code in order to reduce the code rate, such as replacing 'ObOOOOl I l ' with 'ObI 11 '.
  • the written picture class error is mainly divided into two kinds: one is to only keep the picture header of current picture, and discard corresponding all or part of picture data. This kind of error could be easily detected at the decoder end without special error detection mechanism, and then error hiding is performed using corresponding frame recovery method; the other is to set some related parameters in the MPEG standard to be illegal value, and this kind of error must be detected after adding special error process mechanism.
  • picture start code is '0x00000100', and it is set to be OxOOOOO IFF', and then it is regarded as a write picture error
  • the parameters in picture header are each converted into illegal value or other values, which depends on the capability of error detection mechanism at the decoder end. For example, as to the parameter picture coding type in a picure, if there is no special error detection mechanism, the parameter will not be detected exactly, and the effect of final picture will be worse; if there is special error detection mechanism, the parameter will be detected exactly, and the effect of final picture will be good.
  • step S380 it is determined that whether next macroblock will be proceeded. If the next macroblock is proceeded, jump to step S320, and it is determined that whether next macroblock is a smooth macroblock. Otherwise, the whole flow will end.
  • Figure 4 is a structural schematic view of an apparatus for encoding in accordance with an embodiment of present invention.
  • the apparatus for encoding 400 includes: an acquiring device 410 and a writing device 420.
  • the acquiring device 410 is used to acquire a location information, said location information being used to identify the location of a video information; the writing device 420 sis used to write a predetermined error information into an encoded video stream to replace the encoding of said video information, based on said location information.
  • the acquiring device 410 comprises a picture detection device 412, for detecting whether a picture class error information is suitable to be written into a frame of picture, in order to reduce code rate.
  • Picture detection device 412 detects firstly whether current frame of picture is I- frame, according to an embodiment of present invention, for I-frame picture, it is not considered to write picture class error information, and it is considered to write picture class error information only for P-frame and B-frame.
  • picture detection device 412 For P-frame and B-frame, picture detection device 412 then detects motion vector complexity of the frame of picture, if the motion vector complexity of the frame of picture is above a predetermined threshold, it is not considered to write picture class error information, and it is only considered to write the slice class error or macroblock class error. If the motion vector complexity of the frame of picture is less than or equal to a predetermined threshold, it is considered to write picture class error information.
  • the acquiring device 410 further comprises a slice detection device 416, for detecting whether a slice class error information is suitable to be written into a slice, in order to reduce code rate.
  • the slice detection device 416 detects whether slice class error information is written into each slice of the picture. To determine whether current slice is a smooth slice is determined by calculating the number of smooth macroblocks contained in current slice. If the number of smooth macroblocks contained in current slice is above a threshold, it is considered that current slice is a smooth slice.
  • the acquiring device 410 further comprises a macroblock detection device 418, for detecting whether a macroblock class error is suitable to be written into a macroblock, and the variable length coding corresponding to the macroblock is replaced with a shorter illegal coding, in order to reduce code rate.
  • a macroblock detection device 418 for detecting whether a macroblock class error is suitable to be written into a macroblock, and the variable length coding corresponding to the macroblock is replaced with a shorter illegal coding, in order to reduce code rate.
  • the macroblock detection device 418 firstly determines that whether the type of current macroblock is a smooth macroblock, and if it is not a smooth macroblock, the macroblock detection device 418 determines that whether motion vector complexity of current macroblock is above a threshold.
  • the method of determining the motion vector complexity of current macroblock is similar to that in step S 130 in figure 1, and same description is not necessary.
  • a corresponding location information of a picture/slice/macroblock could be obtained, and the picture/slice/macroblock corresponding to the location information is suitable to be written into a predetermined error, in order to reduce code rate.
  • a writing device 420 based on a location information obtained by above acquiring device 410, a writing device 420 writes a predetermined error information, for example, encoding a shorter variable length code into a video stream, to replace the video information corresponding to the location information, or discard directly the video data between two header data, so that the apparatus for decoding could know the data at this location have been lost based on the specific error, and data recovery is needed.
  • the writing device 420 writes said predetermined error information into a compressed video stream, and it would be understood by those skilled in the art that, the writing device 420 could also be contained in the variable length coding device 470.
  • the apparatus for encoding 400 also contains a Discrete Cosine Transform device (DCT in the figure) 450, a quantiser (Q in the figure), a variable length coding device (VLC in the figure) 470, a motion estimation device (ME in the figure) 480, and a motion compensation device (MC in the figure) 490.
  • DCT Discrete Cosine Transform
  • Q quantiser
  • VLC variable length coding
  • ME motion estimation device
  • MC motion compensation device
  • the quantiser 460 is used to set different quantizing levels on demands, in order to reducing code rate. Only after quantized, especially setting different quantization for low-frequency components and high-frequency components according to the physical characters of human eyes, the coefficients of most of the high frequency components become zero. Generally, human eyes are sensitive to the low frequency components, and not sensitive to the high frequency components much. Therefore, the low frequency components will be quantized finely, and high frequency components will be quantized coarsely.
  • variable length coding device 470 converts the quantization coefficients to variable length code, such as Huffman code, according to the quantization magnitude provided by the quantiser 460.
  • the motion estimation device 480 is used to acquire a reference frame (such as I- frame or P-frame) from a frame storage (not shown in the figures), and perform motion estimation to current frame (such as P-frame) based on the reference frame, in order to obtain a reference motion vector of current frame by computing.
  • the motion compensation device 490 is used to displace accordingly the reference frame according to the prediction mode and reference motion vector, so as to predict current frame. This process of prediction motion is similar to that in prior art, and detailed description is omitted.
  • the computer program includes: code for acquiring a location information, said location information being used to identify the location of a video information, the complexity of said video information being less than a predetermined threshold; code for writing a predetermined error information into an encoded video stream to replace the encoding of said video information, based on said location information.
  • the apparatus for encoding according to an embodiment of present invention could also be applied in an apparatus for transcoding, for converting a video stream encoded with first compression ratio into a video stream encoded with second compression ratio, for example, a compressed video stream without predetermined error information written in could be partly decoded, and then re-encoded by the partly encoding device according to an embodiment of present invention, to write in a predetermined error information.
  • Figure 5 is a structural schematic view of an apparatus for transcoding in accordance with an embodiment of present invention.
  • the apparatus for transcoding 500 includes: an acquiring device 510 and a writing device 520.
  • the acquiring device 510 comprises a picture detection device 512, a slice detection device 516 and a macroblock detection device 518.
  • the functions of above respective means is similar to those of the acquiring device 410, the writing device 420, the picture detection device 412, the slice detection device 416 and the macroblock detection device 418 disclosed in figure 4, and same description is not necessary.
  • the apparatus for transcoding 500 further includes a variable length decoding device (VLD in the figure) 530 and an inversion quantiser (IQ in the figure) 540.
  • VLD variable length decoding device
  • IQ inversion quantiser
  • the apparatus for encoding 400 performs detection to slice and macroblock in spatial domain of picture
  • the apparatus for transcoding 500 performs detection mainly to DC coefficients and AC coefficients, in the DCT domain (i.e. frequency domain) after inversion quantized.
  • Picture detection is to analyze and detect to the motion vector after variable length decoded.
  • variable length decoding device 530 and an inversion quantiser 540 together form a partly decoding device (shown in a dashed block in the figure) in the apparatus for transcoding 500, for partly decoding a video stream encoded with first compression ratio.
  • the apparatus for transcoding 500 further includes a quantiser (Ql in the figure) 550, a variable length encoding device (VLC in the figure) 560, and together with the acquiring device 510 and writing device 520, form a partly encoding device (shown in a dashed block in the figure) in the apparatus for transcoding 500, for re-encoding a partly decoded video stream with second compression ratio, in order to obtain a video stream containing a predetermined error.
  • a quantiser Ql in the figure
  • VLC variable length encoding device
  • Figure 6 is a structural schematic view of an apparatus for decoding in accordance with an embodiment of present invention.
  • the apparatus for decoding 600 includes: a motion compensation device 610, for reducing time redundancy using the correlation among the frames. Since motion compensation is not an emphasis for present invention, the related details of technology of motion compensation will be not described in details.
  • the motion compensation device 610 includes an error recovery device 620, the error recovery device 620 determined a replacing video information to replace a predetermined error information written by the apparatus for encoding 400/apparatus for transcoding 500.
  • the error recovery device 620 includes an acquiring device 622, for acquiring a predetermined error information, and the predetermined error information is written in to a video stream when the video stream is encoded by the apparatus for encoding 400/apparatus for transcoding 500. Wherein the acquiring device 622 could also be an error detection device.
  • the error recovery device 620 could further include a determination device 624, for determining a replacing video information, the method for determining could use video information at certain locations in reference frame as the replacing video information.
  • the error recovery device 620 could further include a filling device 626, for filling the location of a predetermined error information with a determined replacing video information.
  • the determining device 624 and filling device 626 could be merged into a device defined as error hiding, and it analyzes the related error, determines scheme of error hiding, and performs operation of error hiding.
  • the apparatus for decoding 600 could further include a variable length decoding device (VLD in the figure) 660, an inversion quantiser (IQ in the figure) 670 and an inversion Discrete Cosine Transform device (IDCT in the figure) 680.
  • VLD variable length decoding device
  • IQ in the figure
  • IDCT inversion Discrete Cosine Transform device
  • the corresponding functions of decoding correspond to the variable length encoding device 670, the quantiser 660 and the Discrete Cosine Transform device 650 of the apparatus for encoding 600 in figure 4, and same description is not necessary.
  • the acquiring device 522 acquires a predetermined error information
  • the determination device 624 determines recovery of the predetermined error information by corresponding method based on the predetermined error information.
  • the filling device 626 fills the location of lost macroblock with the determined replacing macroblock. Finally, a video image sequence after error recovery is output, and presented to the users by a display device (not shown in figures).

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The present invention provides a method and apparatus for encoding/transcoding and decoding, wherein the method for encoding comprises steps of: acquiring a location information, said location information being used to identify the location of a video information, the complexity of said video information being less than a predetermined threshold; based on said location information, writing a predetermined error information into an encoded video stream to replace the encoding of said video information. With present invention, a predetermined error information can be written at the encoding/transcoding end, and code rate is decreased effectively. Meanwhile, the predetermined error information can be easily detected at the decoding end and be error- hidden, which ensures the quality of images resulted when users play video file via the mobile device.

Description

METHOD AND APPARATUS FOR ENCODING/TRANSCODING AND DECODING
FIELD OF THE INVENTION
The invention relates to a method and apparatus for encoding/transcoding and decoding, in particular to a method and apparatus for encoding/transcoding and decoding with lowered code rate.
BACKGROUND OF THE INVENTION
In an aspect of digital television (SDTV/HDTV) and multimedia application, a lot of video compression standard appear, such as MPEG (Motion Picture Experts Group), H.263 and Quicktime etc., in order to meet various requirements. The main purpose of these standards is to make the compressed video stream have lower bit rate and better image quality.
In some cases of application, it is more important to obtain a better image quality, such as in the case where video information with high-definition is played using Blu-Ray disc at home.
However, in other cases of application, it is more important to lower the bit rate than to obtain a good image quality, for example, in the case where video and audio file is played on the mobile device (such as mobile phone). Usually, the storage capacity of mobile device is very limited, and if the rate bit is too high, the video compression file will be too large, and it is impossible to storage enough video compression file in the mobile device to be played for users. Although the code rate can be lowered by means of image frame duplication, the ratio of lowering the code rate is very limited, and the image quality will be also affected.
Therefore, there is a need of providing a method and apparatus of encoding/transcoding for lowering the code rate more effectively, and a method and apparatus of decoding for recovering images effectively when decoding.
SUMMARY OF THE INVENTION
Present invention provides a method and apparatus of encoding/transcoding for lowering the code rate more effectively, and a method and apparatus of decoding for recovering images effectively when decoding. In accordance with an embodiment of present invention, it is provided a method for encoding, comprising steps of: acquiring a location information, said location information being used to identify the location of a video information, the complexity of said video information being less than a predetermined threshold; based on said location information, writing a predetermined error information into an encoded video stream to replace the encoding of said video information.
In accordance with an embodiment of present invention, it is provided an apparatus for encoding, comprising: an acquiring device for acquiring a location information, said location information being used to identify the location of a video information; a writing device, based on said location information, for writing a predetermined error information into an encoded video stream to replace the encoding of said video information.
In accordance with an embodiment of present invention, it is provided a method for decoding, comprising steps of: determining a replacing video information based on a error information in a compressed video stream, said error information being written at the time of encoding; replacing the predetermined error information with said replacing video information.
In accordance with an embodiment of present invention, it is provided an apparatus for decoding, comprising: a determining device for determining a replacing video information based on a error information in a compressed video stream, said error information being written at the time of encoding; a replacing device for replacing the predetermined error information with said replacing video information.
In accordance with an embodiment of present invention, it is provided a method for transcoding, for converting a video stream encoded with first compression ratio into a video stream encoded with second compression ratio, comprising steps of: partly decoding the video stream encoded with first compression ratio; acquiring location information based on said partly decoded video stream, said location information being used to identify the location of a video information, the complexity of said video information being less than a predetermined threshold; based on said location information, writing a predetermined error information into an encoded video stream to replace the encoding of said video information.
In accordance with an embodiment of present invention, it is provided an apparatus for transcoding, for converting a video stream encoded with first compression ratio into a video stream encoded with second compression ratio, comprising: a partly decoding device for partly decoding the video stream encoded with first compression ratio; a partly encoding device for encoding the partly decoded video stream with second compression ratio, in order to obtain a partly encoded video stream, said partly encoding device comprising: an acquiring device for acquiring a location information, said location information being used to identify the location of a video information; a writing device, based on said location information, for writing a predetermined error information into an encoded video stream to replace the encoding of said video information.
In accordance with an embodiment of present invention, it is provided a computer program product for encoding, comprising: code for acquiring a location information, said location information being used to identify the location of a video information, the complexity of said video information being less than a predetermined threshold; code for writing a predetermined error information into an encoded video stream to replace the encoding of said video information, based on said location information.
In summary, the present invention provides a method and apparatus for encoding/transcoding and decoding, and predetermined error information can be written at the encoding/transcoding end, and code rate is decreased effectively. Meanwhile, the predetermined error information can be easily detected at the decoding end and be error- hidden, which ensures the quality of images resulted when users play video file via the mobile device.
In the following, other objects and achievements of present invention will be apparent through the description of present invention and claims with reference to the figures, and prevent invention will be fully understood.
BRIEF DESCRIPTION OF THE DRAWINGS
Figure 1 is a method flowchart of writing an image error in accordance with an embodiment of present invention.
Figure 2 is a method flowchart of writing a slice error in accordance with an embodiment of present invention.
Figure 3 is a method flowchart of writing a macroblock error in accordance with an embodiment of present invention.
Figure 4 is a structural schematic view of an apparatus for encoding in accordance with an embodiment of present invention. Figure 5 is a structural schematic view of an apparatus for transcoding in accordance with an embodiment of present invention.
Figure 6 is a structural schematic view of an apparatus for decoding in accordance with an embodiment of present invention.
In all of above figures, same references denote the same, similar or corresponding characters or functions.
DESCRIPTION OF THE PREFERRED EMBODIMENT
In the following, the preferred embodiments of present invention will be described in details with reference to the accompany figures.
In accordance with one embodiment of present invention, present invention will be described in details with respect to a method and apparatus for encoding/transcoding and decoding in MPEG2 standard. It will be understood by those skilled in the art that present invention could be modified and applied to other types of encoding/decoding standard, such as H.263 or Quicktime standard, on the basis of without departing the scope of content of present invention.
In accordance with an embodiment of present invention, it is provided a method for encoding, comprising steps of: acquiring a location information, said location information being used to identify the location of a video information, the complexity of said video information being less than a predetermined threshold; based on said location information, writing a predetermined error information into an encoded video stream to replace the encoding of said video information.
Wherein the predetermined error information could comprise three types of picture class error information, slice class error information and macroblock class error information. Prior to writing the predetermined error information, it is required to obtain the location information of writing error, and said location information could be ID information that identified a specific picture, slice or macroblock.
Wherein the complexity of the video information could comprise: motion vector complexity of image information, smoothness of slice and macroblock, and motion vector complexity of macroblock. Detailed description is as following.
Next, with reference to the figure 1 to 3, the method flowcharts of three encoding methods, i.e. writing predetermined picture class error information, slice class error information and macroblock class error information, are described respectively. Figure 1 is a method flowchart of writing an image error in accordance with an embodiment of present invention.
Firstly, the video data are encoded according to a predetermined standard (such as MPEG2). Before compressed and encoded, the raw video data are processed to form I- frame, P-frame and B-frame, and form a certain sequence based on the parameter setting. Then, several operations such as DCT transformation, quantitation, VCL and motion prediction, motion compensation and so on are performed to them, and the detailed description will be omitted.
Wherein I-frame is encoded only based on the information of the frame of picture itself, and P-frame is predict-encoded based on the previous proximate I-frame or P-frame, that is, a reference frame (such as I-frame or P-frame) will be acquired firstly, then motion estimation will be performed to current frame (such as P-frame) based on the reference frame, then a reference motion vector of current frame will be calculated. B-frame is predict-encoded based on itself, or previous or subsequent frames.
At step Sl 10, it is determined that whether the current picture is I-frame, and if it is I-frame, picture class error will be not written into the current picture, and to directly proceed to flow A section (described in details in figure 2).
If after determining it is P-frame or B-frame, rather than I-frame, at step S 120, it is determined that whether the motion vector complexity of current picture is above a threshold. The motion vector complexity of picture is calculated by means of mean-square error. The motion vector complexity of current kΛ frame of picture is determined by calculating the mean-square error σforward (Picture.. [k]), ^backward (Picture.. [k]) of forward motion vector and backward motion vector of current kΛ frame of picture:
Figure imgf000007_0001
j I AJ -I JV-U ? Wherein M denotes the number of macroblock included in the width direction of kΛ frame of picture, and M denotes the number of macroblock included in the height direction of kΛ frame of picture, and average forward motion vector MV fonvard (Picture.. [k]) and
Figure imgf000008_0001
Figure imgf000008_0002
average backward motion vector MVbackward (Picture.. [k]) of k frame of picture are:
Wherein MVforWard (i, j) and MVbackward (i, j) are the forward motion vector and backward motion vector of (i, j) th macroblock respectively.
The complexity of current picture motion vector is determined by two predetermined thresholds σiow, and σhigh, if σ forward (Picture.. [k])<σιow and ^backward (Picture..[k]) <σ/ow, it could be determined that the motion vector complexity of current picture is lower. If <3forward (Picture.. [k])>chigh and ^backward (Picture..[k]) >chigh , current picture will be a motion vector with high complexity. If both of above two cases are not satisfied, current picture will be a motion vector with moderate complexity.
According to an embodiment of present invention, it is only considered that a picture class error is written into the pictures with lower complexity of motion vector, that is, it is only required to write a picture header of current frame, and the specific video data of corresponding frame will be not reserved, and it is not considered to write picture class error into pictures with moderate and high complexity of motion vector, so as to avoid affecting the quality of picture playing severely.
According to an embodiment of present invention, setting of threshold σiow could be based on the ration of reduced code rate, for example, the magnitude of threshold σiow may be in direct proportion to the ration of reduced code rate.
At step S 140, a picture class error is written into a picture whose complexity of motion vector is determined lower. The written frame error is detected by means of the error detect mechanism at the decoding end, and then is recovered with the method of frame recovery.
At step S 150, it is determined that whether next frame of picture will be proceeded. If the next frame of picture is proceeded, jump to step SI lO, otherwise the flow will end.
Figure 2 is a method flowchart of writing a slice error in accordance with an embodiment of present invention.
Firstly, at step S220, it is determined that whether the current slice is a smooth slice, and if it is not a smooth slice, slice class error will be not written into the current slice, and to directly proceed to flow B section (described in details in figure 3).
To determine whether current slice is a smooth slice is determined by calculating the number of smooth macroblock included in current slice. If the number of smooth macroblock included in current slice is above a threshold, current slice is considered as a smooth slice. Otherwise, current slice is not considered as a smooth slice.
According to an embodiment of present invention, whether a macroblock is a smooth macroblock is determined by calculating the gradient. Edge detection is the most primary operation of detecting significant local changes in a picture. In the case of one dimension, step edge is related to the local peak of the first-order derivative of the picture. Gradient is a measure of varying of function, and a picture may be regarded as sampling spots array of picture strength continuing function. Therefore, similar to the case of one dimension, the significant changing of picture grey scale value could be detected by the discrete approximate function of gradient.
The gradient is a two dimension equivalent equation of the first-order derivative, and the gradient vector G of vector pixel spot p contains lateral gradient vector Gx and longitudinal gradient vector Gy:
Q = BMI . f(x ... Iy ...1} + f(X>y _ 1) + /(jc + Iy - 1) - f (X-\ty + {) - /{*', y + Ij - f(χ + I, y + 1}
There are two important properties related to the gradient: (1) the direction of vector G(x,y) is the direction of largest varying ratio when the function f(x, y) increases; (2) the magnitude of gradient is given by the following: I CKxM ^ ^G; + G;
In practice application, it is usually to approximate to the magnitude of gradient with absolute value:
KKxM " G. + G,
It can be known from the analysis of vector that, the direction of gradient is defined
Figure imgf000010_0001
as:
Wherein angle θ is the angle relative to x axis.
According to an embodiment of present invention, gradients in sixteen directions formed by averagely dividing a circumference centered at a pixel spot are calculated, and the maximal gradient value CountermΑX and the a minimal gradient value Counter^n are taken therein.
If I Countermax - Counter ^n | >Ti,the macroblock is an edge macroblock;
If T2< CountermΑX - Counter^n <Ti,the macroblock is a texture macroblock;
If CountermΑX - Counter^n <T2,the macroblock is a smooth macroblock; wherein Ti and T2 are two predetermined large and small thresholds respectively.
If it is determined that current slice is a smooth slice, proceed to step S240, and a slice class error is written into the current slice, that is, only the slice header is reserved, and related slice data could be discarded completely or partly, or particular parameters in corresponding slices is set to be illegal value to reduce the code rate.
Corresponding to the scheme of only reserving the slice header, the decoder detects this type of errors using existing error detection module. As to the corresponding parameters set to be illegal value, they could be detected by special error process mechanism. Table 1 shows the corresponding legal value of some parameters, for example, at the time of encoding, Slice start code in the table is set to be a value that is not between 0x00000101 and 0x00000 IAF, then fault will arise at the time of decoding. It will be known to the decoding device that slice data has been lost according to the specific error, and data recovery will be needed. Table 1
Figure imgf000011_0001
Finally, at step S260, it is determined that whether next slice will be proceeded. If next slice is proceeded, jump to step S220, and it is determined that whether next slice is a smooth slice. Otherwise, the whole flow will end.
Figure 3 is a method flowchart of writing a macroblock error in accordance with an embodiment of present invention.
At step S310, it is determined that whether the type of current macroblock is a smooth macroblock, and if it is not a smooth macroblock, directly jump to step S380, and it is determined that whether next macroblock will be proceeded. If the type of current macroblock is a smooth macroblock, proceed to step S340, and it is determined that whether motion vector complexity of current macroblock is above a threshold. The method of determining the motion vector complexity of current macroblock is similar to that in step S 130 in figure 1, and same description is not necessary.
If after determining the motion vector complexity of current macroblock is above a threshold, directly jump to step S380, and it is determined that whether next macroblock is proceeded.
If after determining the motion vector complexity of current macroblock is less than or equal to a threshold, the flow proceed to step S360, and a macroblock class error is written into current macroblock, for example, invalid shorter variable length code defined in the motion picture compression standard variable length code table is used to replace the valid longer variable length code in order to reduce the code rate, such as replacing 'ObOOOOl I l ' with 'ObI 11 '.
According to an embodiment of present invention, the written picture class error is mainly divided into two kinds: one is to only keep the picture header of current picture, and discard corresponding all or part of picture data. This kind of error could be easily detected at the decoder end without special error detection mechanism, and then error hiding is performed using corresponding frame recovery method; the other is to set some related parameters in the MPEG standard to be illegal value, and this kind of error must be detected after adding special error process mechanism. For example, picture start code is '0x00000100', and it is set to be OxOOOOO IFF', and then it is regarded as a write picture error; picture_coding_type=' ObOOl ', which means the picture is I-frame, if it is set to be 'ObIOl ', it is also regarded as a write picture error.
Considering the situations in practice, the parameters in picture header are each converted into illegal value or other values, which depends on the capability of error detection mechanism at the decoder end. For example, as to the parameter picture coding type in a picure, if there is no special error detection mechanism, the parameter will not be detected exactly, and the effect of final picture will be worse; if there is special error detection mechanism, the parameter will be detected exactly, and the effect of final picture will be good.
Finally, at step S380, it is determined that whether next macroblock will be proceeded. If the next macroblock is proceeded, jump to step S320, and it is determined that whether next macroblock is a smooth macroblock. Otherwise, the whole flow will end.
Figure 4 is a structural schematic view of an apparatus for encoding in accordance with an embodiment of present invention.
The apparatus for encoding 400 includes: an acquiring device 410 and a writing device 420. The acquiring device 410 is used to acquire a location information, said location information being used to identify the location of a video information; the writing device 420 sis used to write a predetermined error information into an encoded video stream to replace the encoding of said video information, based on said location information.
According to an embodiment of present invention, the acquiring device 410 comprises a picture detection device 412, for detecting whether a picture class error information is suitable to be written into a frame of picture, in order to reduce code rate.
Picture detection device 412 detects firstly whether current frame of picture is I- frame, according to an embodiment of present invention, for I-frame picture, it is not considered to write picture class error information, and it is considered to write picture class error information only for P-frame and B-frame.
For P-frame and B-frame, picture detection device 412 then detects motion vector complexity of the frame of picture, if the motion vector complexity of the frame of picture is above a predetermined threshold, it is not considered to write picture class error information, and it is only considered to write the slice class error or macroblock class error. If the motion vector complexity of the frame of picture is less than or equal to a predetermined threshold, it is considered to write picture class error information.
The acquiring device 410 further comprises a slice detection device 416, for detecting whether a slice class error information is suitable to be written into a slice, in order to reduce code rate.
For P-frame and B-frame picture having a motion vector complexity above a predetermined threshold, the slice detection device 416 detects whether slice class error information is written into each slice of the picture. To determine whether current slice is a smooth slice is determined by calculating the number of smooth macroblocks contained in current slice. If the number of smooth macroblocks contained in current slice is above a threshold, it is considered that current slice is a smooth slice.
The acquiring device 410 further comprises a macroblock detection device 418, for detecting whether a macroblock class error is suitable to be written into a macroblock, and the variable length coding corresponding to the macroblock is replaced with a shorter illegal coding, in order to reduce code rate.
The macroblock detection device 418 firstly determines that whether the type of current macroblock is a smooth macroblock, and if it is not a smooth macroblock, the macroblock detection device 418 determines that whether motion vector complexity of current macroblock is above a threshold. The method of determining the motion vector complexity of current macroblock is similar to that in step S 130 in figure 1, and same description is not necessary.
In summary, after detected by the picture detection device 412/ the slice detection device 416/ the macroblock detection device 418, a corresponding location information of a picture/slice/macroblock could be obtained, and the picture/slice/macroblock corresponding to the location information is suitable to be written into a predetermined error, in order to reduce code rate.
Afterwards, according to an embodiment of present invention, based on a location information obtained by above acquiring device 410, a writing device 420 writes a predetermined error information, for example, encoding a shorter variable length code into a video stream, to replace the video information corresponding to the location information, or discard directly the video data between two header data, so that the apparatus for decoding could know the data at this location have been lost based on the specific error, and data recovery is needed. Here the writing device 420 writes said predetermined error information into a compressed video stream, and it would be understood by those skilled in the art that, the writing device 420 could also be contained in the variable length coding device 470.
The apparatus for encoding 400 also contains a Discrete Cosine Transform device (DCT in the figure) 450, a quantiser (Q in the figure), a variable length coding device (VLC in the figure) 470, a motion estimation device (ME in the figure) 480, and a motion compensation device (MC in the figure) 490.
Wherein the Discrete Cosine Transform device 450 is used to receive raw video image sequence, and performs discrete cosine transformation, for resulted DCT coefficients, the quantiser 460 is used to set different quantizing levels on demands, in order to reducing code rate. Only after quantized, especially setting different quantization for low-frequency components and high-frequency components according to the physical characters of human eyes, the coefficients of most of the high frequency components become zero. Generally, human eyes are sensitive to the low frequency components, and not sensitive to the high frequency components much. Therefore, the low frequency components will be quantized finely, and high frequency components will be quantized coarsely.
The variable length coding device 470 converts the quantization coefficients to variable length code, such as Huffman code, according to the quantization magnitude provided by the quantiser 460.
The motion estimation device 480 is used to acquire a reference frame (such as I- frame or P-frame) from a frame storage (not shown in the figures), and perform motion estimation to current frame (such as P-frame) based on the reference frame, in order to obtain a reference motion vector of current frame by computing. The motion compensation device 490 is used to displace accordingly the reference frame according to the prediction mode and reference motion vector, so as to predict current frame. This process of prediction motion is similar to that in prior art, and detailed description is omitted.
It should be understood that according to an embodiment in present invention, all/part of the functions of the apparatus for encoding 400 disclosed in figure 4 could also be achieved by means of an appropriately programmed computer, the computer is loaded a computer program for encoding. The computer program includes: code for acquiring a location information, said location information being used to identify the location of a video information, the complexity of said video information being less than a predetermined threshold; code for writing a predetermined error information into an encoded video stream to replace the encoding of said video information, based on said location information.
Above said computer program product could be stored in a storage media.
These parts of above said computer program code could be provided to a processor to generate a machine, so that the code implemented on the processor creates an apparatus for achieving above functions.
It will be understood to those skilled in the art that the apparatus for encoding according to an embodiment of present invention could also be applied in an apparatus for transcoding, for converting a video stream encoded with first compression ratio into a video stream encoded with second compression ratio, for example, a compressed video stream without predetermined error information written in could be partly decoded, and then re-encoded by the partly encoding device according to an embodiment of present invention, to write in a predetermined error information.
Figure 5 is a structural schematic view of an apparatus for transcoding in accordance with an embodiment of present invention.
The apparatus for transcoding 500 includes: an acquiring device 510 and a writing device 520. The acquiring device 510 comprises a picture detection device 512, a slice detection device 516 and a macroblock detection device 518. The functions of above respective means is similar to those of the acquiring device 410, the writing device 420, the picture detection device 412, the slice detection device 416 and the macroblock detection device 418 disclosed in figure 4, and same description is not necessary.
The apparatus for transcoding 500 further includes a variable length decoding device (VLD in the figure) 530 and an inversion quantiser (IQ in the figure) 540. The corresponding functions of decoding correspond to the variable length encoding device 470 and quantiser 460 of the apparatus for encoding 400 in figure 4, and same description is not necessary.
It differs from the apparatus for encoding 400 in detection of slice and macroblock, the apparatus for encoding 400 performs detection to slice and macroblock in spatial domain of picture, and the apparatus for transcoding 500 performs detection mainly to DC coefficients and AC coefficients, in the DCT domain (i.e. frequency domain) after inversion quantized. Picture detection is to analyze and detect to the motion vector after variable length decoded.
Wherein the variable length decoding device 530 and an inversion quantiser 540 together form a partly decoding device (shown in a dashed block in the figure) in the apparatus for transcoding 500, for partly decoding a video stream encoded with first compression ratio.
The apparatus for transcoding 500 further includes a quantiser (Ql in the figure) 550, a variable length encoding device (VLC in the figure) 560, and together with the acquiring device 510 and writing device 520, form a partly encoding device (shown in a dashed block in the figure) in the apparatus for transcoding 500, for re-encoding a partly decoded video stream with second compression ratio, in order to obtain a video stream containing a predetermined error.
Figure 6 is a structural schematic view of an apparatus for decoding in accordance with an embodiment of present invention.
The apparatus for decoding 600 includes: a motion compensation device 610, for reducing time redundancy using the correlation among the frames. Since motion compensation is not an emphasis for present invention, the related details of technology of motion compensation will be not described in details.
The motion compensation device 610 includes an error recovery device 620, the error recovery device 620 determined a replacing video information to replace a predetermined error information written by the apparatus for encoding 400/apparatus for transcoding 500. The error recovery device 620 includes an acquiring device 622, for acquiring a predetermined error information, and the predetermined error information is written in to a video stream when the video stream is encoded by the apparatus for encoding 400/apparatus for transcoding 500. Wherein the acquiring device 622 could also be an error detection device.
The error recovery device 620 could further include a determination device 624, for determining a replacing video information, the method for determining could use video information at certain locations in reference frame as the replacing video information.
The error recovery device 620 could further include a filling device 626, for filling the location of a predetermined error information with a determined replacing video information. In other words, the determining device 624 and filling device 626 could be merged into a device defined as error hiding, and it analyzes the related error, determines scheme of error hiding, and performs operation of error hiding.
The apparatus for decoding 600 could further include a variable length decoding device (VLD in the figure) 660, an inversion quantiser (IQ in the figure) 670 and an inversion Discrete Cosine Transform device (IDCT in the figure) 680. The corresponding functions of decoding correspond to the variable length encoding device 670, the quantiser 660 and the Discrete Cosine Transform device 650 of the apparatus for encoding 600 in figure 4, and same description is not necessary.
After the compression video stream is decoded by the variable length decoding device 660, the acquiring device 522 acquires a predetermined error information, the determination device 624 determines recovery of the predetermined error information by corresponding method based on the predetermined error information.
Next, the filling device 626 fills the location of lost macroblock with the determined replacing macroblock. Finally, a video image sequence after error recovery is output, and presented to the users by a display device (not shown in figures).
It should be understood by those skilled in the art that, the method and apparatus for encoding/transcoding and decoding disclosed in present invention can be modified without departing the content of present invention. Therefore, the protect scope of present invention should be limited by the content of appended claims.

Claims

CLAIMS:
1. A method for encoding, comprising steps of:
(a) acquiring a location information, said location information being used to identify the location of a video information, the complexity of said video information being less than a predetermined threshold;
(b) based on said location information, writing a predetermined error information into an encoded video stream to replace the encoding of said video information.
2. The method of claim 1, wherein the step (a) includes a step of: detecting the property of complexity of a picture, to acquire the location information of said picture; wherein the step (b) includes based on the location information of said picture, writing a predetermined error information into an encoded video stream to replace the encoding of said picture.
3. The method of claim 2, wherein the property of complexity of said picture is motion vector complexity of said picture.
4. The method of claim 1, wherein the step (a) includes a step of: detecting the property of complexity of a macroblock, to acquire the location information of said macroblock; wherein the step (b) includes based on the location information of said macroblock, writing a predetermined error information into an encoded video stream to replace the encoding of said macroblock.
5. The method of claim 4, wherein the property of complexity of said macroblock is smoothness information of said macroblock.
6. An apparatus for encoding, comprising: an acquiring device for acquiring a location information, said location information being used to identify the location of a video information; a writing device, based on said location information, for writing a predetermined error information into an encoded video stream to replace the encoding of said video information.
7. The apparatus of claim 6, wherein the acquiring device includes: a picture detection device, for detecting the property of complexity of a picture, to acquire the location information of said picture; wherein the writing device is used to write a predetermined error information into an encoded video stream to replace the encoding of said picture, based on the location information of said picture.
8. The apparatus of claim 7, wherein the property of complexity of said picture is motion vector complexity of said picture.
9. The apparatus of claim 6, wherein the acquiring device includes: a macroblock detecting device, for detecting the property of complexity of a macroblock, to acquire the location information of said macroblock; wherein the writing device is used to write a predetermined error information into an encoded video stream to replace the encoding of said macroblock, based on the location information of said macroblock.
10. The apparatus of claim 9, wherein the property of complexity of said macroblock is smoothness information of said macroblock.
11. A method for decoding, comprising steps of: determining a replacing video information based on a error information in a compressed video stream, said error information being written at the time of encoding; replacing the predetermined error information with said replacing video information.
12. An apparatus for decoding, comprising: a determining device for determining a replacing video information based on a error information in a compressed video stream, said error information being written at the time of encoding; a replacing device for replacing the predetermined error information with said replacing video information.
13. A method for transcoding, for converting a video stream encoded with first compression ratio into a video stream encoded with second compression ratio, comprising steps of: partly decoding the video stream encoded with first compression ratio; acquiring location information based on said partly decoded video stream, said location information being used to identify the location of a video information, the complexity of said video information being less than a predetermined threshold; based on said location information, writing a predetermined error information into an video stream encoded with second compression ratio to replace the encoding of said video information.
14. An apparatus for transcoding, for converting a video stream encoded with first compression ratio into a video stream encoded with second compression ratio, comprising: a partly decoding device, for partly decoding the video stream encoded with first compression ratio; a partly encoding device, for encoding the partly decoded video stream with second compression ratio, in order to obtain a partly encoded video stream, said partly encoding device comprising: an acquiring device for acquiring a location information based on the partly decoded video stream, said location information being used to identify the location of a video information, the complexity of said video information being less than a predetermined threshold; a writing device, based on said location information, for writing a predetermined error information into an encoded video stream to replace the encoding of said video information.
15. A computer program product for encoding, comprising: code for acquiring a location information, said location information being used to identify the location of a video information, the complexity of said video information being less than a predetermined threshold; code for writing a predetermined error information into an encoded video stream to replace the encoding of said video information, based on said location information.
PCT/IB2007/051405 2006-04-27 2007-04-19 Method and apparatus for encoding/transcoding and decoding WO2007125458A2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2009507215A JP2009535881A (en) 2006-04-27 2007-04-19 Method and apparatus for encoding / transcoding and decoding
EP07735542A EP2014099A2 (en) 2006-04-27 2007-04-19 Method and apparatus for encoding/transcoding and decoding

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200610077155.0 2006-04-27
CN200610077155 2006-04-27

Publications (2)

Publication Number Publication Date
WO2007125458A2 true WO2007125458A2 (en) 2007-11-08
WO2007125458A3 WO2007125458A3 (en) 2008-01-10

Family

ID=38610679

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/IB2007/051405 WO2007125458A2 (en) 2006-04-27 2007-04-19 Method and apparatus for encoding/transcoding and decoding

Country Status (4)

Country Link
EP (1) EP2014099A2 (en)
JP (1) JP2009535881A (en)
TW (1) TW200743386A (en)
WO (1) WO2007125458A2 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2077669A3 (en) * 2008-01-07 2009-09-23 Mitsubishi Electric Corporation Transcoder and receiver
WO2012031506A1 (en) * 2010-09-07 2012-03-15 中国科学院深圳先进技术研究院 Multimedia slice transcoding method, system and memory medium based on overlapping edge
WO2012095030A1 (en) * 2011-01-14 2012-07-19 华为技术有限公司 Slice encoding method and device and slice decoding method and device
US8230744B2 (en) 2009-05-06 2012-07-31 Cequr Sa Low-dead volume microfluidic circuit and methods
CN110753240A (en) * 2018-07-24 2020-02-04 视联动力信息技术股份有限公司 Transcoding control method and device based on video network
CN111010575A (en) * 2019-12-17 2020-04-14 北京数码视讯科技股份有限公司 Code stream fault tolerance method and device and readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030053537A1 (en) * 2001-03-05 2003-03-20 Chang-Su Kim Systems and methods for reducing frame rates in a video data stream
EP1475971A1 (en) * 2002-04-16 2004-11-10 Mitsubishi Denki Kabushiki Kaisha Video data conversion device and video data conversion method
US20050147163A1 (en) * 2003-12-30 2005-07-07 Microsoft Corporation Scalable video transcoding
WO2005065030A2 (en) * 2004-01-08 2005-07-21 Videocodes, Inc. Video compression device and a method for compressing video
WO2005120077A1 (en) * 2004-06-03 2005-12-15 Sony Corporation Image processing device, program thereof, and method thereof
WO2006012384A2 (en) * 2004-07-20 2006-02-02 Qualcomm Incorporated Method and apparatus for encoder assisted-frame rate up conversion (ea-fruc) for video compression

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030053537A1 (en) * 2001-03-05 2003-03-20 Chang-Su Kim Systems and methods for reducing frame rates in a video data stream
EP1475971A1 (en) * 2002-04-16 2004-11-10 Mitsubishi Denki Kabushiki Kaisha Video data conversion device and video data conversion method
US20050147163A1 (en) * 2003-12-30 2005-07-07 Microsoft Corporation Scalable video transcoding
WO2005065030A2 (en) * 2004-01-08 2005-07-21 Videocodes, Inc. Video compression device and a method for compressing video
WO2005120077A1 (en) * 2004-06-03 2005-12-15 Sony Corporation Image processing device, program thereof, and method thereof
WO2006012384A2 (en) * 2004-07-20 2006-02-02 Qualcomm Incorporated Method and apparatus for encoder assisted-frame rate up conversion (ea-fruc) for video compression

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2077669A3 (en) * 2008-01-07 2009-09-23 Mitsubishi Electric Corporation Transcoder and receiver
US8230744B2 (en) 2009-05-06 2012-07-31 Cequr Sa Low-dead volume microfluidic circuit and methods
WO2012031506A1 (en) * 2010-09-07 2012-03-15 中国科学院深圳先进技术研究院 Multimedia slice transcoding method, system and memory medium based on overlapping edge
US9031135B2 (en) 2010-09-07 2015-05-12 Shenzhen Institutes Of Advanced Technology Chinese Academy Of Sciences Multi-media slicing and transcoding system and storage medium and method thereof
WO2012095030A1 (en) * 2011-01-14 2012-07-19 华为技术有限公司 Slice encoding method and device and slice decoding method and device
CN110753240A (en) * 2018-07-24 2020-02-04 视联动力信息技术股份有限公司 Transcoding control method and device based on video network
CN110753240B (en) * 2018-07-24 2022-04-05 视联动力信息技术股份有限公司 Transcoding control method and device based on video network
CN111010575A (en) * 2019-12-17 2020-04-14 北京数码视讯科技股份有限公司 Code stream fault tolerance method and device and readable storage medium
CN111010575B (en) * 2019-12-17 2022-08-02 北京数码视讯科技股份有限公司 Code stream fault tolerance method and device and readable storage medium

Also Published As

Publication number Publication date
EP2014099A2 (en) 2009-01-14
WO2007125458A3 (en) 2008-01-10
TW200743386A (en) 2007-11-16
JP2009535881A (en) 2009-10-01

Similar Documents

Publication Publication Date Title
US8358701B2 (en) Switching decode resolution during video decoding
US9204173B2 (en) Methods and apparatus for enhanced performance in a multi-pass video encoder
US8340182B2 (en) Video decoding apparatus and video decoding method
JP4324690B2 (en) Method and apparatus for estimating the objective quality of compressed video data
US8045611B2 (en) Video processing and recording apparatuses and methods
JP4393875B2 (en) System and method for providing a single layer video encoded bitstream suitable for reduced complexity decoding
US8385427B2 (en) Reduced resolution video decode
US20080232477A1 (en) Method and Device For Coding and Decoding of Video Error Resilience
KR20050004862A (en) A method and system for estimating objective quality of compressed video data
US20090296809A1 (en) Encoding/decoding device, encoding/decoding method and storage medium
EP2014099A2 (en) Method and apparatus for encoding/transcoding and decoding
JP2005510149A (en) Method and system for detecting intra-coded pictures and extracting intra DC scheme and macroblock coding parameters from uncompressed digital video
WO2012015654A1 (en) Method and system for encoding video frames using a plurality of processors
JP2000350212A (en) Decoding device and display system for video signal
JP2012054818A (en) Image processing apparatus and image processing method
JP2007049553A (en) Moving image encoding method, device, and program
US20070025438A1 (en) Elastic storage
TW200301655A (en) Method of detecting motion vector
JP3812808B2 (en) Skip region detection type moving image encoding apparatus and recording medium
CN1798346A (en) Method and apparatus for rehiding mistakes included in decoding image
US7706440B2 (en) Method for reducing bit rate requirements for encoding multimedia data
JP3896635B2 (en) Image data conversion apparatus and method, prediction coefficient generation apparatus and method
JP4384629B2 (en) Encoding error measuring apparatus and encoding error measuring program
JP4793150B2 (en) Video signal processing apparatus, video signal information processing method, and program
US20100040150A1 (en) Method and apparatus for encoding video data stream

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: 07735542

Country of ref document: EP

Kind code of ref document: A2

WWE Wipo information: entry into national phase

Ref document number: 2007735542

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2009507215

Country of ref document: JP

NENP Non-entry into the national phase

Ref country code: DE