Abstract:
A system and method for block-based per-pixel correction for film-based sources. The appearance of mixed film/video can be improved through an adaptive selection of normal deinterlaced video relative to inverse telecine video. This adaptive selection process is based on pixel difference measures of sub-blocks within defined blocks of pixels.

Description:
[0001]    This application claims priority to provisional application No. 60/971,662, filed Sep. 12, 2007, which is incorporated by reference herein, in its entirety, for all purposes. 
     
    
     BACKGROUND 
       [0002]    1. Field of the Invention 
         [0003]    The present invention relates generally to television signal decoding and, more particularly, to a system and method for block-based per-pixel correction for film-based sources. 
         [0004]    2. Introduction 
         [0005]    Modern high-resolution and high-definition televisions require a method for displaying lower-resolution field-based content (e.g., SDTV, 1080i) in a high quality way. Some types of field-based content can be created through the conversion of a progressive source (such as film) using a process commonly referred to as telecine. 
         [0006]    To illustrate the telecine process, consider for example the process of converting 24 frame/s film to 59.94 Hz NTSC video. NTSC is made up of fields, which are made up of every other horizontal scanline. One field contains all the odd numbered scanlines, while the next field contains all the even numbered scanlines. A frame is then the combination of two consecutive fields viewed at the same time. This process is called interlacing. 
         [0007]    The conversion of 24 frame/s file to 29.97 frame/s NTSC interlaced video is known as 3:2 pulldown. In this conversion, there are approximately four frames of film for every five frames of NTSC video. These four frames are “stretched” into five by exploiting the interlaced nature of NTSC video. To illustrate this relation, consider the 3:2 pulldown of  FIG. 1 . 
         [0008]    As illustrated, for every NTSC frame, there are actually two fields, one for the odd-numbered lines of the image, designated as the top field (TF), and one for the even-numbered lines, designated as the bottom field (BF). There are, therefore, ten NTSC fields for every four film frames. To accommodate this “stretching,” the telecine process alternately places the first film frame across two fields, the second frame across three fields, the third frame across two fields, and the fourth frame across three fields. The cycle repeats itself completely after four film frames have been converted. As illustrated, the TF of the second film frame and the BF of the fourth film frame are duplicate copies. 
         [0009]    The particular pulldown method that is applied is based on the type of film and the type of display format (e.g., NTSC, PAL, etc.). As such, various other pulldown methods such as 2:2, 5:5, 6:4, 8:7, etc. can be used for a given application 
         [0010]    To display field-based content that is generated by a particular telecine process on a modern television display, it is therefore necessary to recover the original progressive source content such as film. This source can be reconstructed from the field-based content using an inverse telecine process. In this inverse telecine process, it is critical that the correct cadence (e.g., 2:2, 3:2, 5:5, 6:4, 8:7, etc.) of the field-based content be identified so that the correct fields can be weaved together to produce the original progressive source. 
         [0011]    Unfortunately, many films that have undergone telecine have been subsequently edited using video equipment that ignores the original film cadence. The result is “mixed” content where normal video is overlaid on top of film that has undergone a telecine process (e.g., 3:2). If inverse telecine is performed on such video, the video-mode parts appear to be “weaved” as well, which is visually unappealing. 
         [0012]    One solution to this problem is to turn off telecine for certain portions of the screen and use a normal video-mode deinterlacer for those cases. What is needed therefore is an efficient mechanism for detecting the regions that contain video-mode content and appropriately switching to video mode for those regions. 
       SUMMARY 
       [0013]    A system and/or method for block-based per-pixel correction for film-based sources, substantially as shown in and/or described in connection with at least one of the figures, as set forth more completely in the claims. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0014]    In order to describe the manner in which the above-recited and other advantages and features of the invention can be obtained, a more particular description of the invention briefly described above will be rendered by reference to specific embodiments thereof which are illustrated in the appended drawings. Understanding that these drawings depict only typical embodiments of the invention and are not therefore to be considered limiting of its scope, the invention will be described and explained with additional specificity and detail through the use of the accompanying drawings in which: 
           [0015]      FIG. 1  illustrates an example of a telecine process. 
           [0016]      FIG. 2  illustrates an example of sub-blocks within a block of pixels. 
           [0017]      FIG. 3  illustrates an embodiment of a processing block in a motion-adaptive deinterlacer (MAD) that weaves fields together. 
           [0018]      FIG. 4  illustrates a flowchart of a process of the present invention. 
       
    
    
     DETAILED DESCRIPTION 
       [0019]    Various embodiments of the invention are discussed in detail below. While specific implementations are discussed, it should be understood that this is done for illustration purposes only. A person skilled in the relevant art will recognize that other components and configurations may be used without parting from the spirit and scope of the invention. 
         [0020]    When normal video is overlaid on top of film that has undergone a telecine process (e.g., 3:2), objectionable artifacts can occur when an inverse telecine process is performed. For example, titles (or tickers) that move or fade may be laid over film material. When this mixed content is passed to an intelligent MPEG encoder, the encoder can sometimes pick up the strong 3:2 cadence of the underlying film material, resulting in a poor display of the moving text. 
         [0021]    In accordance with the present invention, an adaptive block-based per-pixel mechanism is provided that can turn off the inverse telecine process for certain portions of the screen and use a normal video-mode deinterlacer instead. In this manner, the normal video-mode content would not undergo the inverse telecine process, which can produce objectionable display of the video-mode content. 
         [0022]    One of the difficulties of per-pixel correction is the determination of which regions contain video-mode content. In the present invention, it is recognized that the differences between the repeat fields can be used to determine the areas on the screen that are suspected to contain video-mode content. 
         [0023]    In the example of a 3:2 cadence, such as that illustrated in  FIG. 1 , the repeat field occurs when the same field is utilized twice. This happens during the “3” part of the 3:2 cadence. In the example of  FIG. 1 , the repeat fields occur in the top fields (TFs) of Frame  2  and the bottom fields (BFs) of Frame  4 . 
         [0024]    In the present invention, the detection of those regions that are suspected to contain video mode content is enabled by dividing the source field into blocks of pixels. In one embodiment, the source field is divided into 16×8 blocks. Each block is further subdivided into four 8×4 sub-blocks and four 16×2 sub-blocks.  FIG. 2  illustrates the vertically-oriented and horizontally-oriented sub-blocks within 16×8 blocks. The advantage of using horizontal and vertical rectangular sub-blocks is to provide sensitivity to video moving in both the horizontal and vertical directions. The vertical rectangle is wider because it provides better immunity to comb filter artifacts. 
         [0025]    For each of these sub-blocks a repeat field difference (RFD) function can be defined. In one embodiment, the RFD function is the signed luma difference between the two repeat fields. In an alternative embodiment, the RFD function can be based on luma and chroma components. 
         [0026]    In a luma-only implementation, the function RFD(x,y) can be defined as the signed luma difference between the two repeat fields, or Y1(x, y)−Y2(x, y), where Y1 and Y2 are the luma values for the source frame. The signed RFD(x, y) is then summed over each sub-block, taking the absolute value of the result. If the upper left corner of each 16×8 block is (bx, by) then the following difference function for the sub-block can be defined as: 
         [0000]    
       
         
           
             
               sbdiff 
                
               
                   
               
                
               1 
                
               
                 ( 
                 
                   sbx 
                   , 
                   sby 
                 
                 ) 
               
             
             = 
             
                
               
                 
                   ∑ 
                   
                     i 
                     = 
                     sby 
                   
                   
                     sby 
                     + 
                     7 
                   
                 
                  
                 
                   
                     ∑ 
                     
                       j 
                       = 
                       sbx 
                     
                     
                       sbx 
                       + 
                       3 
                     
                   
                    
                   
                     RFD 
                      
                     
                       ( 
                       
                         j 
                         , 
                         i 
                       
                       ) 
                     
                   
                 
               
                
             
           
         
       
     
         [0000]    where (sbx, sby) corresponds to the x and y coordinates of each sub-block, or more formally:
       sbx=bx, bx+4, bx+8, bx+12   sby=by       
 
         [0029]    As noted, each 16×8 block is also divided into four 16×2 blocks. Again, the signed RFD(x, y) is summed over each sub-block, taking the absolute value of the result. More formally, 
         [0000]    
       
         
           
             
               sbdiff 
                
               
                   
               
                
               2 
                
               
                 ( 
                 
                   sbx 
                   , 
                   sby 
                 
                 ) 
               
             
             = 
             
                
               
                 
                   ∑ 
                   
                     i 
                     = 
                     sby 
                   
                   
                     sby 
                     + 
                     1 
                   
                 
                  
                 
                   
                     ∑ 
                     
                       j 
                       = 
                       sbx 
                     
                     
                       sbx 
                       + 
                       15 
                     
                   
                    
                   
                     RFD 
                      
                     
                       ( 
                       
                         j 
                         , 
                         i 
                       
                       ) 
                     
                   
                 
               
                
             
           
         
       
     
         [0000]    where (sbx, shy) corresponds to the x and y coordinates of each sub-block, or more formally:
       sbx=bx   sby=by, by+2, by+4, by+6       
 
         [0032]    The sbdiff1 for each of the vertically-oriented sub-blocks and the sbdiff2 values for each of the horizontally-oriented sub-blocks are compared to a threshold to determine if per-pixel correction should be enabled for that particular block. If any of the sbdiff1 or sbdiff2 values exceed the threshold, then a flag rf_motion(bx,by) is set for that block indicating the presence of significant repeat field motion. 
         [0033]    As would be appreciated, the specific number of vertically-oriented and horizontally-oriented sub-blocks chosen can be implementation dependent. Also, the same number of sub-blocks need not be used. If that is the case, different thresholds may be used in the analysis vertical and horizontal analysis. 
         [0034]    In one embodiment, a histogram of values of sbdiff1 and sbdiff2 are created. For example, a histogram for sbdiff1 can be created that has 64 bins, each with different thresholds. The rf_motion(bx, by) could then be set based upon the largest inhabited bin, or some linear combination of the bin values. Likewise, the histogram could also be used for sbdiff2. 
         [0035]      FIG. 3  illustrates an embodiment of a processing block in a motion-adaptive deinterlacer (MAD) that weaves fields together. As each output frame is being generated by the MAD, this processing block is generally designed to switch between using either the normal deinterlaced video or inverse telecine video based on the flags generated during detection. In areas where a flag indicates that video-mode content has been detected, the normal deinterlaced video is selected by selector  310 . Otherwise, the inverse telecine video is used for that block of pixels. 
         [0036]    The control of the switching by selector  310  is based on the input received from blend control module  320 . In general, blend control module  320  can be designed to forward an indication of repeat field motion that is determined using functions such as sbdiff1 and sbdifj2. In one embodiment, the “Per pixel Unexpected Motion” value is set to be a maximum value when a 16×8 block is flagged as containing significant repeat field motion, and is set to a minimum value when the 16×8 block is not flagged. 
         [0037]    In one embodiment, a set of flags is stored for each of the possible phases for a particular telecine cadence. In the example of a 3:2 pulldown illustrated in  FIG. 1 , five phases are present. A set of flags can therefore be stored for each of the five possible 3:2 pulldown phases. In this embodiment, since the flags are only updated on the repeat field, the effect of the flags is the same for five output frames (provided the MAD stays locked to the same phase in the 3:2 pattern). The flags are then reset and regenerated every time a repeat field is encountered in order to track moving video. If the MAD otherwise detects a lock loss, the flags can be reset. 
         [0038]    In one embodiment, one or more previous sets of flags are stored for each phase. In this embodiment, the current flag and the previous sets of flags are OR&#39;d together for a block to determine whether or not to use the normal deinterlaced video. In this manner, the identification of significant repeat field motion in a block would impact other blocks that are temporally proximate to that block. It should be noted that if a scene change is detected, the one or more previous sets of flags can be deemed to be invalid and therefore cleared. 
         [0039]    In another embodiment, the identification of significant repeat field motion in a block would impact other blocks that are spatially proximate to that block. Here, the identification of significant repeat field motion in a block can lead to the use of normal deinterlaced video for one or more adjacent blocks. For example, all blocks diagonally, horizontally, and/or vertically adjacent to a flagged block could be corrected as well. In this manner, the likelihood that normal video is displayed using an inverse telecine process is reduced. 
         [0040]    In general, the impact of a flagged block on other proximate blocks serves to create an expanded more uniform correction zone. Also, as the correction zone is enlarged/reduced based on the detection/non-detection of significant repeat field differences, the process of the present invention is adaptive to the per-pixel detection analysis. 
         [0041]    To further illustrate the features of the present invention, reference is now made to the flowchart of  FIG. 4 . As illustrated, the process begins at step  402  where a pixel block is selected for processing. In one embodiment, the screen is divided into a plurality of pixel blocks (e.g., 16×8 pixel block). Here, it should be noted that the plurality of pixel blocks can be distinct or overlapping. In general, using overlapped blocks provides another approach for consistency during detection. 
         [0042]    For the selected block, a blend control signal is generated at step  404 . In one embodiment, this blend control signal is based on whether or not the pixel block has been flagged as containing significant repeat field motion. In one embodiment, the significant repeat field motion is identified based on a difference measure analysis for a plurality of sub-blocks within the pixel block. As would be appreciated, the number and size of the sub-blocks would be implementation dependent. In one embodiment, vertical and horizontal rectangular sub-blocks are used to provide sensitivity to video moving in both the horizontal and vertical directions. 
         [0043]    In another embodiment, the blend control signal can also be based on the existence of other flagged blocks that are proximate to the selected block. In various embodiments, these other flagged blocks can be temporally or spatially proximate to the selected block. An advantage of generating a blend control signal based on the existence of other flagged blocks that are proximate to the selected block is the creation of larger more uniform correction zones. 
         [0044]    After the blend control signal is generated at step  404 , the video output is selected at step  406  based on the blend control signal. Here, the blend control signal can be used by a selector module in determining whether normal deinterlaced video or inverse telecine video should be selected for output. If unexpected motion is signaled by the blend control signal for the selected block, then the normal deinterlaced video output is selected. Otherwise, the inverse telecine video output is selected. 
         [0045]    As has been described, the block-based per-pixel correction process reduces undesirable artifacts because it differentiates the video areas of the screen from film areas of the screen. In this adaptive approach, only those blocks that have the potential of including such undesirable artifacts are corrected through the selection of normal deinterlaced video. 
         [0046]    As would be appreciated, the principles of the present invention can be employed for doing per-pixel correction on other types of cadences that are found in test material (such as 3:2:3:2:2, 5:5, 6:4, 8:7, etc.). The present invention can also be useful for motion judder cancellation, which also needs to detect cadences and reliably detect whether a particular part of the screen is film or video. 
         [0047]    These and other aspects of the present invention will become apparent to those skilled in the art by a review of the preceding detailed description. Although a number of salient features of the present invention have been described above, the invention is capable of other embodiments and of being practiced and carried out in various ways that would be apparent to one of ordinary skill in the art after reading the disclosed invention, therefore the above description should not be considered to be exclusive of these other embodiments. Also, it is to be understood that the phraseology and terminology employed herein are for the purposes of description and should not be regarded as limiting.