Quantcast Rangeinfo Filter for Avisynth [Readme] - digitalFAQ.com Forums [Archives]
  #1  
11-25-2012, 09:07 PM
kvcd.net Archives's Avatar
kvcd.net Archives kvcd.net Archives is offline
Free Member
 
Join Date: May 2012
Posts: 84
Thanks: 0
Thanked 1 Time in 1 Post
RangeInfo - An Avisynth filter for pixel value range inspection

By Ross Thomas <ross@grinfinity.com>

RangeInfo is a diagnostic filter for Avisynth. Its purpose is to allow fairly detailed inspection of pixel value ranges within a clip. That is to say, it will tell you various pieces of information such as the pixels with the lowest and highest values (for Y, U and V) in the frame and for the clip overall, amongst others.

It can also optionally highlight pixels within a certain range in a very attractive vivid green.

I wrote this filter to investigate the output from various sources to see if it conformed to the CCIR-601 specification that broadcast video be limited to using certain ranges of pixel values. It can also be useful for checking the range of a clip to help determine what levels adjustment might be necessary.

Usage
Code:
RangeInfo(clip clip, bool show, int ylow, int yhigh, int ulow, int uhigh, int vlow, int vhigh)
ParameterMeaningDefault
clipSpecifies the clip to affect.last
showDetermines if the various statistics are computed and displayed overlayed onto the clip. The statistics displayed areTrue
 - Filter version.  
 - Current frame number. 
 - Minimum, maximum, mean and most common pixel value for each of the frame's Y, U and V. 
 - Minimum and maximum for each of the entire clip's Y, U and V, as well as the frame numbers in which these values were last seen. 
ylow, yhighThe low bound for Y highlighting. In other words, all pixels with a value between "ylow" and "yhigh" inclusive will be highlighted.0, 0
ulow, uhighAs ylow and yhigh for the U component.0, 0
vlow, vhighAs ulow and uhigh for the V component.0, 0

Examples

Displays the range statistics, but does not highlight:
Code:
RangeInfo()
Highlights all pixels in the Y component within the range 0 to 15 inclusive, but does not display statistics:
Code:
RangeInfo(show=false, ylow=0, yhigh=15)
Highlights all pixels in the U and V components within the range 241 to 255 inclusive, and displays overlayed statistics:
Code:
RangeInfo(ulow=241, uhigh=255, vlow=241, vhigh=255)
Known Issues: None.

To-Do:
- MMX/SSE optimizations (I have to learn x86 assembler first...). Since this is a diagnostic filter this is pretty low priority.
- Check parameters for sanity.
- Check clip resolution to ensure statistics will fit.
- Possibly compute mean, most common, mean minimum and mean maximum values for the entire clip, but I'm not sure this would be useful.

History:
- 0.1 - First release. Alpha code. Danger, Will Robinson!

Download here: SansGrip's Avisynth Filters [DOWNLOADS]
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Site Staff / Ad Manager
 
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Ghostbuster Filter for Avisynth [Readme] kvcd.net Archives Avisynth Scripting 0 11-25-2012 09:00 PM
Blockbuster Filter for Avisynth [Readme] kvcd.net Archives Avisynth Scripting 0 11-25-2012 07:38 PM
NoMoSmooth Filter for Avisynth [Readme] kvcd.net Archives Avisynth Scripting 0 11-25-2012 07:00 PM
Sampler filter for Avisynth [Readme] kvcd.net Archives Avisynth Scripting 0 11-25-2012 06:24 PM
RemoveBorders filter for Avisynth [Readme] kvcd.net Archives Avisynth Scripting 0 10-28-2012 08:04 AM

Thread Tools



 
All times are GMT -5. The time now is 07:01 AM  —  vBulletin Jelsoft Enterprises Ltd