aboutsummaryrefslogtreecommitdiffstats
path: root/src/tv/bas.h
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2017-08-20 07:43:41 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2017-09-02 07:34:50 +0200
commit496aff5a7954111ddf3b64d1dde664164f344e40 (patch)
tree525db45f8519ec00409304f61652eaa3f9ac68e1 /src/tv/bas.h
parenta52c89800c9826634bcae3a635b71feb905b3641 (diff)
Add implementation of analog TV signal generator (PAL so far)
Quick and dirty Howto: make && tv/osmotv --sdr-soapy --sdr-tx-gain 60 -r 15000000 -c 21 tx-fubk --sdr-tune-args "OFFSET=-3000000"
Diffstat (limited to 'src/tv/bas.h')
-rw-r--r--src/tv/bas.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/tv/bas.h b/src/tv/bas.h
new file mode 100644
index 0000000..42090a6
--- /dev/null
+++ b/src/tv/bas.h
@@ -0,0 +1,25 @@
+
+enum bas_type {
+ BAS_FUBK,
+ BAS_VCR,
+ BAS_IMAGE,
+};
+
+typedef struct bas {
+ double samplerate;
+ enum bas_type type;
+ int fbas; /* if color shall be added */
+ double circle_radius; /* radius of circle in grid units */
+ int color_bar; /* show only color bar on all lines */
+ int grid_only; /* show only the grid */
+ const char *station_id; /* text to display as station id */
+ double color_phase; /* current phase of color carrier */
+ int v_polarity; /* polarity of V color vector */
+ unsigned short *img; /* image data, if it should be used */
+ int img_width, img_height; /* size of image */
+ iir_filter_t lp_y, lp_u, lp_v; /* low pass filters */
+} bas_t;
+
+void bas_init(bas_t *bas, double samplerate, enum bas_type type, int fbas, double circle_radius, int color_bar, int grid_only, const char *station_id, unsigned short *img, int width, int height);
+int bas_generate(bas_t *bas, sample_t *sample);
+