[MPlayer-dev-eng] [PATCH] Enhanced Cropdetect Code - 0th Order Entropy

Roger Heflin rogerheflin at gmail.com
Fri Aug 15 18:27:14 CEST 2008


Roger Heflin wrote:
> 
> This code is to add the ability to detect junk added around original 4:3 
> content that are broadcast in 16:9 format with bars that contain slowly 
> moving logos around them that defeats the current cropdetect code.
> 
> I believe it follows all coding standards, but it would not surprise me 
> if I missed something.
> 
> As the code is done, the old functionality appears to work just like it 
> did before, the entropy part is default disabled.
> 
> I have not tested the 4 bpp part of the case statement as I don't 
> believe have I have any video of that type to test with, the 1 bpp test 
> all worked as expected (old behavior worked if entropy was set to -1 
> (default off)), and new behavior worked if entropy was set to a value 
> and the limit was set to (-1) off.
> 
> New manpage excerpt to go with the code:
> 
>       cropdetect[=limit:round:entropy]
>               Calculates  necessary  cropping parameters and prints the 
> recom-
>               mended parameters to stdout.   The crop is the  Boolean  
> AND  of
>               the 2 methods (unless entropy or limit is disabled by 
> setting it
>               to -1), if both are on then both must want it to be 
> cropped  for
>               it to be cropped, so turning off one is probably wise.
>                  <limit>
>                       Threshold,  which  can  be optionally specified 
> from off
>                       (-1) to nothing (0) to everything (255) (default: 
> 24).
>                  <round>
>                       Value which the width/height should be divisible 
> by (de-
>                       fault:  16).   The  offset  is automatically 
> adjusted to
>                       center the video.  Use 2 to  get  only  even  
> dimensions
>                       (needed  for  4:2:2 video).  16 is best when 
> encoding to
>                       most video codecs.
>                  <entropy>
>                       A measure of randomness, the lower the number  
> the  less
>                       random.  It can be used to remove annoying borders 
> added
>                       to 4:3 videos that are filled out to widescreen.   
> Valid
>                       values  are  -1 (off) to 0 (nothing) to 255.  
> Default is
>                       -1 (off), a reasonable value  that  works  for  
> my  case
>                       seems  to  be in the 140 range (140 is equivalent 
> to en-
>                       tropy of 4.75 bits).
> 
> If someone believes this change warrants an entry in the AUTHORS file 
> that please add an entry.
> 
>         Comments?
>         Roger
> 

Has anyone checked to see if this patch will be accepted?

I sent it on 7/30.

                           Roger



More information about the MPlayer-dev-eng mailing list