Abstract:
A method and apparatus for adaptively enabling a PB frames mode for video data processing. If the PB frames mode is enabled for a given pair of video pictures, and if the motion compensated prediction error for the B-picture in the most recently encoded PB frame is greater than the motion compensated prediction error for the P-picture in same PB frame multiplied by a constant, the PB frames mode is disabled for the PB frame. Otherwise, the PB frames mode remains enabled. If the PB frame is disabled by the PB decision logic, it may remain disabled until certain encoding parameters are met.

Description:
BACKGROUND OF THE INVENTION 
     (1) Field of the Invention 
     The present invention is related to the field of video coding, more specifically, the present invention is a method and an apparatus for adaptively enabling and disabling PB frames mode in an H.263 video coder. 
     (2) Related Art 
     The ITU-T H.263 standard (ITU-T std. H.263-1995, published March 1996) is a standard for a coded representation which can be used for compressing the moving picture component of audio-visual services at low bit rates. The coding algorithm of the H.263 is a hybrid of inter-picture prediction which utilizes temporal redundancy, and transform coding of the remaining signal to reduce spatial redundancy. 
     There are numerous different optional modes in H.263 including a PB frames mode in which two pictures are coded as one unit. The term &#34;PB&#34; stems from P-picture and B-picture. A PB-frame comprises one P-picture predicted from the previous decoded P-picture and one B-picture predicted from both the previous decoded P-picture and the P-picture currently being decoded. With this option, portions of the B-picture maybe bi-directionally predicted from the past and future pictures. 
     There are various trade-offs in selecting an optional mode provided by H.263. Because the modes are optional, it is not necessary for the decoder to support any of the optional modes. If a decoder supports a given mode, the encoder has the option to enable or disable that given mode. 
     Currently, few methods exist for determining whether to enable or disable an optional mode for H.263. Typically, an optional mode is enabled at the beginning of a video data sequence and stays on throughout the entire length of the video data sequence. The disadvantage of this method is that with some types of video, the optional mode results in decreased video quality. For other types of video, the increase in video quality does not justify the increase in the computational overhead associated with the optional mode being enabled. 
     Therefore a method and an apparatus are desirable for allowing a feedback mechanism to determine whether to enable or disable an optional mode to produce the best video quality given a video data sequence. 
     BRIEF SUMMARY OF THE INVENTION 
     A method and an apparatus for adaptively activating a PB frames mode for video data processing disclosed. The method and apparatus determines if the PB frames mode is enabled for a given video frame. If the PB frame mode is enabled, it is determined if the motion compensated prediction error for the B-picture of a PB frame for the given video frame is greater than the motion compensated prediction error for the P-picture in the PB frame multiplied by a constant. The PB frames mode is disabled if the motion compensated prediction error for the B-picture is greater than the motion compensated prediction error for the P-picture multiplied by a constant. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is an exemplary video conferencing system with an embodiment of the present invention. 
     FIG. 2 illustrates an exemplary source coder coupled to the present invention&#39;s PB frames mode decision logic. 
     FIG. 3 is an exemplary flow diagram illustrating the general steps followed by the PB frames mode decision logic. 
     FIG. 4 illustrates the prediction error generation logic used to generate the Error P and Error B values used by the present invention. 
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     The ITU-T H.263 standard (ITU-T std. H.263-1995, published March 1996) provides a PB frames mode which codes two pictures as one unit. The term &#34;PB&#34; stems from P-picture and B-picture types. The PB-frame comprises one P-picture predicted from the previous decoded P-picture and one B-picture predicted from both the previous decoded P-picture and the P-picture currently being decoded. With this option, portions of the B-picture maybe bi-directionally predicted from the past and future pictures. 
     The present invention provides a method and an apparatus for adaptively enabling and disabling the PB frames mode in an H.263 video coder. 
     FIG. 1 is an exemplary video conferencing system with an embodiment of the present invention. Video conferencing system 100 has a plurality of computer systems 102 1  through 102 N  coupled to each other through network 104. Network 104 may be a public switched telephone network (PSTN), a local area network (LAN), an internet, etc. Each computer system 102 has a transport layer 106 and a video coder 108 with the present invention&#39;s PB frame decision logic 109. 
     FIG. 2 illustrates an exemplary source coder coupled to the present invention&#39;s PB frame decision logic. Coder 200 is coupled to PB frame decision logic 109. Coder 200 has error frame logic 201. Error P 210 is a motion compensated prediction error for the P-picture part of the PB-frame. Error B 212 is a motion compensated prediction error for the B-picture part of the PB-frame. A method implemented with the present invention error frame logic 201 to generate Error P 210 and Error B 212 is illustrated in FIG. 4. PB Frames Flag On 216 is a flag which indicates whether the PB frames mode is to be turned on. PB frames flag enabler 203 sets PB Frames Flag On 216 to true responsive to results produced by comparator 215. PB Frames Flag On 216 value is forwarded to coder 200 through switch 217 for the next frame. 
     More specifically, PB Frames Flag On 216 is initially set to true and the number of P-pictures is set to zero. The number of P-pictures is the number of P-pictures encoded while the PB frames mode is disabled. For each frame, if the PB frames mode is on, comparator 215 determines if the motion compensated prediction for the B-picture part of the PB-frame (Error B 212) is greater than the motion compensated prediction error for the P-picture part of the PB-frame multiplied by a constant (Error P 210). 
     If Error B 212 is greater than Error P 210 multiplied by a constant, then PB frame flag enabler 203 sets PB Frames Flag On 216 to false. Coder 200 receives PB Frames Flag On 216 with the value of true and turns PB frames mode off. The number of P-pictures is then set to zero. Further, the B-picture portion of the PB frame bit stream is discarded and the remaining P-picture bit stream 219 is forwarded to video multiplexer coder 220. 
     Otherwise, if the PB frames mode is off, the number of P-pictures encoded while the PB frames mode is disabled is incremented by one. If the number of P-pictures is greater than a predetermined P threshold, then PB frames flag enabler 203 sets PB Frames Flag On 216 to true and coder 200 turns the PB frames mode on. Bit stream 218 is then forwarded to video multiplexer coder 220. 
     FIG. 3 illustrates an exemplary flow diagram of the PB frames mode decision logic. Initially, the PB frames mode is set to true (e.g. PB frames mode is on) and the number of P-pictures (number-P) is set to zero. After each frame is encoded, the value for PB frames mode is modified. 
     If the PB frames mode is switched off (false), the B-picture portion of the encoded frame is discarded before sending the bit stream to the video multiplexer coder for further processing. 
     More specifically, in block 301, if the PB frames mode is on, then in block 302, it is determined whether the error value for the B-picture part of the PB frame is greater than the error value for the P-picture part of the PB frame multiplied by a constant. In block 303, if the error value for the B-picture part of the PB frame is greater than the error value for the P-picture part of the PB frame multiplied by a constant, then the PB frames mode is turned off and the number-P is set to zero. The number-P is the number of P-pictures encoded while PB frames mode is disabled. In block 304, if the error value for the B-picture part of PB frame is less than or equal to the error value for the P-picture part of the PB frame multiplied by a constant, then the PB frames mode remains on. 
     Back in block 301, if the PB frames mode is off, then in block 305 the number of P-pictures encoded while the PB frames mode is disabled is incremented by one. In block 306, if the number of P-pictures is greater than the number of a predetermined P threshold, then in block 307, the PB frames mode is turned on. Otherwise, in block 304, the PB frames mode remains off. In block 308, if there are more frames to be processed, then the process flow returns to block 301. Otherwise, the process flow terminates. 
     FIG. 4 illustrates a method of implementation of the prediction error generation logic used to generate the Error P and Error B values of the present invention. In step 401, the sum of the prediction error is set to zero. In step 402, given a video frame, each macroblock prediction error is added for every macroblock over the entire frame. In step 403, the sum is then divided by the total number of macroblocks in that given frame to produce a prediction error for the given video frame. 
     What has been described is a method and apparatus for adaptively enabling and disabling the PB frames mode in an H.263 video coder. The ITU-T H.263 standard (ITU-T std. H.263-1995, published March 1996) provides a PB frames mode which codes two pictures as one unit. The term &#34;PB&#34; stems from P-picture and B-picture types. PB-frame comprises one P-picture predicted from the previous decoded P-picture and one B-picture predicted from both the previous decoded P-picture and the P-picture currently being decoded. With this option, portions of the B-picture maybe bi-directionally predicted from the past and future pictures. The present invention&#39;s PB frame decision logic adaptively enables and disables the PB frames mode to produce the best video quality given a video data sequence. 
     While certain exemplary embodiments have been described in detail and shown in the accompanying drawings, it is to be understood that such embodiments are merely illustrative of and not restrictive on the broad invention, and that this invention is not to be limited to the specific arrangements and constructions shown and described, since various other modifications may occur to those with ordinary skill in the art.