Realtimestagram
Libraries | Use Clauses | Constants | Types | Functions | Procedures
curves_pkg Package Reference

Description

Package which provides functions to create Look Up Tables for various functions The generated Look Up Table can be placed in a lookup_table entity.

See also
lookup_table
Package Body >> curves_pkg

Functions

array_pixel   create_straight_lut ( size: in integer , c: in real 1.0 )
array_pixel   create_negated_lut ( size: in integer )
array_pixel   create_sigmoid_lut ( size: in integer , c: in real 1.0 )
array_pixel   create_gamma_lut (
size: in integer
gamma: in real 1.0
c: in real 1.0
)
array_pixel   create_sine_lut ( size: in integer , c: in real 1.0 )

Procedures

  verify_valid_value( variable value: in real ,constant wordsize: in integer )
  report_lut_value( variable value: in real ,constant index: in integer )

Libraries

ieee 

Use Clauses

std_logic_1164 
numeric_std 
math_real 

Constants

wordsize  integer := 8
 Bit depth of pixels.

Types

array_pixel array ( natural range <> ) of std_logic_vector ( wordsize - 1 downto 0 )
 array of std_logic_vectors

Member Function Documentation

§ create_gamma_lut()

array_pixel create_gamma_lut (   size in integer ,
  gamma in real 1 . 0 ,
  c in real 1 . 0  
)
Function

Function to create Look up table for a gamma function The gamma function is

\[p_{out}=c*p_{max}*(\frac{p_{in}}{p_{max}})^{\gamma} \]

Parameters
[in]sizeNumber of elements to create
[in]gammaGamma factor
[in]cAmplification factor
gamma.png

§ create_negated_lut()

array_pixel create_negated_lut (   size in integer  
)
Function

Function to create Look up table for a negated line The negate function is

\[p_{out}=p_{max}-p_{in} \]

Parameters
[in]sizeNumber of elements to create
negate.png

§ create_sigmoid_lut()

array_pixel create_sigmoid_lut (   size in integer ,
  c in real 1 . 0  
)
Function

Function to create Look up table for a sigmoid function The sigmoid function is

\[p_{out}=\frac{p_{max}}{1+\exp({-c/p_{max}*(p_{in}-p_{max})})} \]

Parameters
[in]sizeNumber of elements to create
[in]cAmplification factor
sigmoid.png

§ create_sine_lut()

array_pixel create_sine_lut (   size in integer ,
  c in real 1 . 0  
)
Function

Function to create Look up table for a sine function The sine function is

\[p_{out}=p_{max} * sin^c\left (\frac{\pi*x}{width} \right)\]

Parameters
[in]sizeNumber of elements to create
[in]cOrder
vignette_curve.png

§ create_straight_lut()

array_pixel create_straight_lut (   size in integer ,
  c in real 1 . 0  
)
Function

Function to create Look up table for a straight line Used for testing purposes, creates a straight line. The straight function is

\[p_{out}=c*p_{in} \]

Parameters
[in]sizeNumber of elements to create
[in]cAmplification factor
straight.png

§ report_lut_value()

report_lut_value ( variable   value in real ,
constant   index in integer  
)
Procedure

Procedure to pretty print out a LUT value

Parameters
[in]valueValue to be printed
[in]indexIndex to print

§ verify_valid_value()

verify_valid_value ( variable   value in real ,
constant   wordsize in integer  
)
Procedure

Procedure to assert that value can be represented in bit range

Parameters
[in]valueValue to compare
[in]wordsizeBit depth

Member Data Documentation

§ array_pixel

array_pixel array ( natural range <> ) of std_logic_vector ( wordsize - 1 downto 0 )
Type

array of std_logic_vectors

§ ieee

ieee
Library

§ math_real

math_real
Package

§ numeric_std

numeric_std
Package

§ std_logic_1164

std_logic_1164
Package

§ wordsize

wordsize integer := 8
Constant

Bit depth of pixels.


The documentation for this class was generated from the following file: