piSmasher Configuration Libraries
piSmasher peripheral device configuration libraries
vid_tpg.h File Reference

Video Test Pattern Generator Userspace I/O Driver FreeBSD. More...

Go to the source code of this file.

Data Structures

struct  vidtpg
 

Enumerations

enum  vidtpg_bgpat {
  BGPAT_VIDEOIN = 0x00, BGPAT_HORZRAMP = 0x01, BGPAT_VERTRAMP = 0x02, BGPAT_TEMPRAMP = 0x03,
  BGPAT_SLDRED = 0x04, BGPAT_SLDGREEN = 0x05, BGPAT_SLDBLUE = 0x6, BGPAT_SLDBLACK = 0x07,
  BGPAT_SLDWHITE = 0x08, BGPAT_COLORBARS = 0x09, BGPAT_ZONEPLATE = 0x0A, BGPAT_TARTANBARS = 0x0B,
  BGPAT_CROSSHATCH = 0x0C, BGPAT_COLORSWEEP = 0x0D, BGPAT_HORZVERTRAMP = 0x0E, BGPAT_CHECKER = 0x0F,
  BGPAT_PSEUDORAND = 0x10, BGPAT_DPCOLORRAMP = 0x11, BGPAT_DPBWVERT = 0x12, BGPAT_DPCOLORSQ = 0x13
}
 
enum  vidtpg_fgpat { FGPAT_NOOVERLAY = 0x00, FGPAT_MOVINGBOX = 0x01, FGPAT_XHAIR = 0x02 }
 
enum  vidtpg_rgb_mask { RGBMASK_NONE = 0x00, RGBMASK_RED = 0x01, RGBMASK_GREEN = 0x02, RGBMASK_BLUE = 0x04 }
 
enum  vidtpg_color_fmt { COLORFMT_RGB = 0x00, COLORFMT_YUV444 = 0x01, COLORFMT_YUV422 = 0x02, COLORFMT_YUV420 = 0x03 }
 
enum  vidtpg_en_input { ENINPUT_DISABLE = 0x00, ENINPUT_ENABLE = 0x01 }
 

Functions

int vidtpg_init (struct vidtpg *tpg, const char *devname)
 
int vidtpg_set_pattern (struct vidtpg *tpg, enum vidtpg_bgpat bgpat, enum vidtpg_fgpat fgpat)
 
int vidtpg_set_format (struct vidtpg *tpg, int height, int width, enum vidtpg_color_fmt color_fmt)
 

Detailed Description

Video Test Pattern Generator Userspace I/O Driver FreeBSD.

Author
R. Bush bush@.nosp@m.krtk.nosp@m.l.com
Version
0.1
Date
July 10, 2018 Copyright (c) 2018, krtkl inc. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of the FreeBSD Project.

Enumeration Type Documentation

◆ vidtpg_bgpat

Enumerator
BGPAT_VIDEOIN 

Pass the video input straight through the video output

BGPAT_HORZRAMP 

Horizontal Ramp which increases each component (RGB or Y) horizontally by 1

BGPAT_VERTRAMP 

Vertical Ramp which increases each component (RGB or Y) vertically by 1

BGPAT_TEMPRAMP 

Temporal Ramp which increases every pixel by a value set in the motion_speed register for every frame.

BGPAT_SLDRED 

Solid red output

BGPAT_SLDGREEN 

Solid green output

BGPAT_SLDBLUE 

Solid blue output

BGPAT_SLDBLACK 

Solid black output

BGPAT_SLDWHITE 

Solid white output

BGPAT_COLORBARS 

Color bars

BGPAT_ZONEPLATE 

Zone Plate output produces a ROM based sinusoidal pattern.

BGPAT_TARTANBARS 

Tartan Color Bars

BGPAT_CROSSHATCH 

Draws a cross hatch pattern.

BGPAT_COLORSWEEP 

Color sweep pattern

BGPAT_HORZVERTRAMP 

A combined vertical and horizontal ramp

BGPAT_CHECKER 

Black and white checker board

BGPAT_PSEUDORAND 

Pseudorandom pattern

BGPAT_DPCOLORRAMP 

DisplayPort color ramp

BGPAT_DPBWVERT 

DisplayPort black and white vertical lines

BGPAT_DPCOLORSQ 

DisplayPort color square

53  {
54  BGPAT_VIDEOIN = 0x00,
55  BGPAT_HORZRAMP = 0x01,
56  BGPAT_VERTRAMP = 0x02,
57  BGPAT_TEMPRAMP = 0x03,
58  BGPAT_SLDRED = 0x04,
59  BGPAT_SLDGREEN = 0x05,
60  BGPAT_SLDBLUE = 0x6,
61  BGPAT_SLDBLACK = 0x07,
62  BGPAT_SLDWHITE = 0x08,
63  BGPAT_COLORBARS = 0x09,
64  BGPAT_ZONEPLATE = 0x0A,
65  BGPAT_TARTANBARS = 0x0B,
66  BGPAT_CROSSHATCH = 0x0C,
67  BGPAT_COLORSWEEP = 0x0D,
68  BGPAT_HORZVERTRAMP = 0x0E,
69  BGPAT_CHECKER = 0x0F,
70  BGPAT_PSEUDORAND = 0x10,
71  BGPAT_DPCOLORRAMP = 0x11,
72  BGPAT_DPBWVERT = 0x12,
73  BGPAT_DPCOLORSQ = 0x13,
Definition: vid_tpg.h:61
Definition: vid_tpg.h:62
Definition: vid_tpg.h:69
Definition: vid_tpg.h:63
Definition: vid_tpg.h:55
Definition: vid_tpg.h:56
Definition: vid_tpg.h:71
Definition: vid_tpg.h:53
Definition: vid_tpg.h:60
Definition: vid_tpg.h:54
Definition: vid_tpg.h:68
Definition: vid_tpg.h:70
Definition: vid_tpg.h:72
Definition: vid_tpg.h:64
Definition: vid_tpg.h:66
Definition: vid_tpg.h:65
Definition: vid_tpg.h:59
Definition: vid_tpg.h:57
Definition: vid_tpg.h:67
Definition: vid_tpg.h:58

◆ vidtpg_color_fmt

Enumerator
COLORFMT_RGB 

RGB format

COLORFMT_YUV444 

YUV 4:4:4 format

COLORFMT_YUV422 

YUV 4:2:2 format

COLORFMT_YUV420 

YUV 4:2:0 format

89  {
90  COLORFMT_RGB = 0x00,
91  COLORFMT_YUV444 = 0x01,
92  COLORFMT_YUV422 = 0x02,
93  COLORFMT_YUV420 = 0x03,
Definition: vid_tpg.h:91
Definition: vid_tpg.h:89
Definition: vid_tpg.h:92
Definition: vid_tpg.h:90

◆ vidtpg_en_input

Enumerator
ENINPUT_DISABLE 

Ignore input video stream

ENINPUT_ENABLE 

Use input video stream

96  {
97  ENINPUT_DISABLE = 0x00,
98  ENINPUT_ENABLE = 0x01,
Definition: vid_tpg.h:97
Definition: vid_tpg.h:96

◆ vidtpg_fgpat

Enumerator
FGPAT_NOOVERLAY 

No overlay pattern.

FGPAT_MOVINGBOX 

Enabled moving box drawn over video output

FGPAT_XHAIR 

Draws crosshairs one pixel in width on the output video

76  {
77  FGPAT_NOOVERLAY = 0x00,
78  FGPAT_MOVINGBOX = 0x01,
79  FGPAT_XHAIR = 0x02,
Definition: vid_tpg.h:77
Definition: vid_tpg.h:76
Definition: vid_tpg.h:78

◆ vidtpg_rgb_mask

Enumerator
RGBMASK_NONE 

No masking

RGBMASK_RED 

Mask out the red component

RGBMASK_GREEN 

Mask out the green component

RGBMASK_BLUE 

Mask out the blue component

82  {
83  RGBMASK_NONE = 0x00,
84  RGBMASK_RED = 0x01,
85  RGBMASK_GREEN = 0x02,
86  RGBMASK_BLUE = 0x04,
Definition: vid_tpg.h:83
Definition: vid_tpg.h:85
Definition: vid_tpg.h:82
Definition: vid_tpg.h:84