org.jcodec.codecs.vp8
Class FilterUtil.Segment

java.lang.Object
  extended by org.jcodec.codecs.vp8.FilterUtil.Segment
Enclosing class:
FilterUtil

public static class FilterUtil.Segment
extends Object


Constructor Summary
FilterUtil.Segment()
           
 
Method Summary
 void applyHorizontally(Macroblock.Subblock right, Macroblock.Subblock left, int a)
           
 void applyVertically(Macroblock.Subblock lower, Macroblock.Subblock upper, int a)
           
 void filterSb(int hev_threshold, int interior_limit, int edge_limit)
           
 FilterUtil.Segment getSigned()
           
static FilterUtil.Segment horizontal(Macroblock.Subblock right, Macroblock.Subblock left, int a)
           
 boolean isFilterRequired(int interior, int edge)
          All functions take (among other things) a segment (of length at most 4 + 4 = 8) symmetrically straddling an edge.
 boolean isHighVariance(int threshold)
          HEV - Hight Edge Variance.
static FilterUtil.Segment vertical(Macroblock.Subblock lower, Macroblock.Subblock upper, int a)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilterUtil.Segment

public FilterUtil.Segment()
Method Detail

isFilterRequired

public boolean isFilterRequired(int interior,
                                int edge)
All functions take (among other things) a segment (of length at most 4 + 4 = 8) symmetrically straddling an edge. The pixel values (or pointers) are always given in order, from the "beforemost" to the "aftermost". So, for a horizontal edge (written "|"), an 8-pixel segment would be ordered p3 p2 p1 p0 | q0 q1 q2 q3. Filtering is disabled if the difference between any two adjacent "interior" pixels in the 8-pixel segment exceeds the relevant threshold (I). A more complex thresholding calculation is done for the group of four pixels that straddle the edge, in line with the calculation in simple_segment() above.


isHighVariance

public boolean isHighVariance(int threshold)
HEV - Hight Edge Variance. Filtering is altered if (at least) one of the differences on either side of the edge exceeds a threshold (we have "high edge variance").

Parameters:
threshold -
p1 - before
p0 - before
q0 - after
q1 - after
Returns:

getSigned

public FilterUtil.Segment getSigned()

horizontal

public static FilterUtil.Segment horizontal(Macroblock.Subblock right,
                                            Macroblock.Subblock left,
                                            int a)

vertical

public static FilterUtil.Segment vertical(Macroblock.Subblock lower,
                                          Macroblock.Subblock upper,
                                          int a)

applyHorizontally

public void applyHorizontally(Macroblock.Subblock right,
                              Macroblock.Subblock left,
                              int a)

applyVertically

public void applyVertically(Macroblock.Subblock lower,
                            Macroblock.Subblock upper,
                            int a)

filterSb

public void filterSb(int hev_threshold,
                     int interior_limit,
                     int edge_limit)
Parameters:
hev_threshold - detect high edge variance
interior_limit - disable filter
edge_limit -
this -


Copyright © 2013. All Rights Reserved.