libsstvenc
Asynchronous Analogue SSTV encoder
Loading...
Searching...
No Matches
SSTV mode specifications.
Collaboration diagram for SSTV mode specifications.:

Topics

 Colour Space/Order bitmap
 

Data Structures

struct  sstvenc_encoder_pulse
 
struct  sstvenc_mode
 

Macros

#define SSTVENC_PERIOD_VIS_START   (300000u)
 
#define SSTVENC_PERIOD_VIS_SYNC   (10000u)
 
#define SSTVENC_PERIOD_VIS_BIT   (30000u)
 
#define SSTVENC_PERIOD_FSKID_BIT   (22000u)
 
#define SSTVENC_PASOKON_P3_TIMEUNIT   (1000000000.0 / 4800.0)
 
#define SSTVENC_PASOKON_P5_TIMEUNIT   (1000000000.0 / 3200.0)
 
#define SSTVENC_PASOKON_P7_TIMEUNIT   (1000000000.0 / 2400.0)
 
#define SSTVENC_PASOKON_SYNC(unit)
 
#define SSTVENC_PASOKON_GAP(unit)
 
#define SSTVENC_PASOKON_SCAN(unit)
 

Functions

uint8_t sstvenc_get_mode_count ()
 
const struct sstvenc_modesstvenc_get_mode_by_idx (uint8_t idx)
 
const struct sstvenc_modesstvenc_get_mode_by_name (const char *name)
 
uint64_t sstvenc_pulseseq_get_txtime (const struct sstvenc_encoder_pulse *seq)
 
uint64_t sstvenc_mode_get_txtime (const struct sstvenc_mode *const mode, const char *fsk_id)
 
size_t sstvenc_mode_get_fb_sz (const struct sstvenc_mode *const mode)
 
uint32_t sstvenc_get_pixel_posn (const struct sstvenc_mode *const mode, uint16_t x, uint16_t y)
 

Variables

static const struct sstvenc_encoder_pulse sstvenc_sstv_robotbw_fp []
 
static const struct sstvenc_encoder_pulse sstvenc_sstv_robot36_fp []
 
static const struct sstvenc_encoder_pulse sstvenc_sstv_robot36_gap []
 
static const struct sstvenc_encoder_pulse sstvenc_sstv_robot72_fp []
 
static const struct sstvenc_encoder_pulse sstvenc_sstv_robot72_gap01 []
 
static const struct sstvenc_encoder_pulse sstvenc_sstv_robot72_gap12 []
 
static const struct sstvenc_encoder_pulse sstvenc_sstv_scottie_fp []
 
static const struct sstvenc_encoder_pulse sstvenc_sstv_scottie_sep01 []
 
static const struct sstvenc_encoder_pulse sstvenc_sstv_scottie_sep12 []
 
static const struct sstvenc_encoder_pulse sstvenc_sstv_scottie_bp []
 
static const struct sstvenc_encoder_pulse sstvenc_sstv_martin_fp []
 
static const struct sstvenc_encoder_pulse sstvenc_sstv_martin_sep []
 
static const struct sstvenc_encoder_pulse sstvenc_sstv_pasokon_p3_fp []
 
static const struct sstvenc_encoder_pulse sstvenc_sstv_pasokon_p3_sep []
 
static const struct sstvenc_encoder_pulse sstvenc_sstv_pasokon_p5_fp []
 
static const struct sstvenc_encoder_pulse sstvenc_sstv_pasokon_p5_sep []
 
static const struct sstvenc_encoder_pulse sstvenc_sstv_pasokon_p7_fp []
 
static const struct sstvenc_encoder_pulse sstvenc_sstv_pasokon_p7_sep []
 
static const struct sstvenc_encoder_pulse sstvenc_sstv_pd_fp []
 
static const struct sstvenc_encoder_pulse sstvenc_sstv_wraasesc2_180_fp []
 
static const struct sstvenc_encoder_pulse sstvenc_sstv_wraasesc2_120_fp []
 
static const struct sstvenc_encoder_pulse sstvenc_sstv_wraasesc2_sep []
 
static const struct sstvenc_mode sstvenc_sstv_modes []
 

Detailed Description


Data Structure Documentation

◆ sstvenc_encoder_pulse

struct sstvenc_encoder_pulse

Convenience structure, encodes the duration and frequency of a pulse.

Definition at line 141 of file sstvmode.h.

Collaboration diagram for sstvenc_encoder_pulse:
Data Fields
uint32_t duration_ns

The duration of the pulse in nanoseconds. A duration of 0ns is used to terminate an array of pulse definitions.

uint32_t frequency

The pulse frequency in hertz.

◆ sstvenc_mode

struct sstvenc_mode

Description of a SSTV mode. This encodes all of the specifications of a given mode.

Definition at line 155 of file sstvmode.h.

Collaboration diagram for sstvenc_mode:
Data Fields
const struct sstvenc_encoder_pulse * backporch

Back-porch sync pulses after channel 2 (or after channel 0 for mono SSTV modes). May be NULL if there's no backporch at the end of a scan line.

uint16_t colour_space_order

The colour space mode and order used. This is a bitmap, see SSTVENC_MODE_ORDER

const char * description

Human-readable description of a mode, e.g. Martin M1

const struct sstvenc_encoder_pulse * finalseq

Final sequence pulses following last scan line. May be NULL if there is no final pulse sequence after the final scan line.

const struct sstvenc_encoder_pulse * frontporch

Front-porch sync pulses that happen before channel 0 is sent. An array terminated with a 0Hz 0sec "pulse". May be NULL if there are no start-of-scan pulses before channel 0.

const struct sstvenc_encoder_pulse * gap01

Sync pulses between channel 0 and channel 1. May be NULL if there are no pulses between channels 0 and 1.

const struct sstvenc_encoder_pulse * gap12

Sync pulses between channel 1 and channel 2. May be NULL if there are no pulses between channels 1 and 2.

const struct sstvenc_encoder_pulse * gap23

Sync pulses between channel 2 and channel 3. May be NULL if there are no pulses between channels 2 and 3.

uint16_t height

Height of the SSTV image sent in pixels.

const struct sstvenc_encoder_pulse * initseq

Initial sequence pulses prior to first scan line. May be NULL if the mode does not include pulses prior to the first scan line.

const char * name

Short-hand name of a SSTV mode, e.g. M1

uint32_t scanline_period_ns[4]

Scanline periods for each of the three channels. For mono modes, only the first is used.

uint8_t vis_code

The VIS code sent at the start of the SSTV transmission.

uint16_t width

Width of the SSTV image sent in pixels.

Macro Definition Documentation

◆ SSTVENC_PASOKON_GAP

#define SSTVENC_PASOKON_GAP ( unit)
Value:
(5 * unit)

Definition at line 93 of file sstvmode.c.

◆ SSTVENC_PASOKON_P3_TIMEUNIT

#define SSTVENC_PASOKON_P3_TIMEUNIT   (1000000000.0 / 4800.0)

Definition at line 88 of file sstvmode.c.

◆ SSTVENC_PASOKON_P5_TIMEUNIT

#define SSTVENC_PASOKON_P5_TIMEUNIT   (1000000000.0 / 3200.0)

Definition at line 89 of file sstvmode.c.

◆ SSTVENC_PASOKON_P7_TIMEUNIT

#define SSTVENC_PASOKON_P7_TIMEUNIT   (1000000000.0 / 2400.0)

Definition at line 90 of file sstvmode.c.

◆ SSTVENC_PASOKON_SCAN

#define SSTVENC_PASOKON_SCAN ( unit)
Value:
(640 * unit)

Definition at line 94 of file sstvmode.c.

◆ SSTVENC_PASOKON_SYNC

#define SSTVENC_PASOKON_SYNC ( unit)
Value:
(25 * unit)

Definition at line 92 of file sstvmode.c.

◆ SSTVENC_PERIOD_FSKID_BIT

#define SSTVENC_PERIOD_FSKID_BIT   (22000u)

Definition at line 24 of file sstvmode.h.

Referenced by sstvenc_encoder_next_fsk_pulse(), and sstvenc_mode_get_txtime().

◆ SSTVENC_PERIOD_VIS_BIT

#define SSTVENC_PERIOD_VIS_BIT   (30000u)

Definition at line 22 of file sstvmode.h.

Referenced by sstvenc_encoder_next_vis_pulse(), and sstvenc_mode_get_txtime().

◆ SSTVENC_PERIOD_VIS_START

#define SSTVENC_PERIOD_VIS_START   (300000u)

Definition at line 20 of file sstvmode.h.

Referenced by sstvenc_encoder_next_vis_pulse(), and sstvenc_mode_get_txtime().

◆ SSTVENC_PERIOD_VIS_SYNC

#define SSTVENC_PERIOD_VIS_SYNC   (10000u)

Definition at line 21 of file sstvmode.h.

Referenced by sstvenc_encoder_next_vis_pulse(), and sstvenc_mode_get_txtime().

Function Documentation

◆ sstvenc_get_mode_by_idx()

const struct sstvenc_mode * sstvenc_get_mode_by_idx ( uint8_t idx)

Return the Nth SSTV mode. Returns NULL if we're off the end of the array.

Definition at line 585 of file sstvmode.c.

585 {
586 if (idx < sstvenc_get_mode_count()) {
587 return &sstvenc_sstv_modes[idx];
588 } else {
589 return NULL;
590 }
591}
uint8_t sstvenc_get_mode_count()
Definition sstvmode.c:581
static const struct sstvenc_mode sstvenc_sstv_modes[]
Definition sstvmode.c:164

References sstvenc_get_mode_count(), and sstvenc_sstv_modes.

Referenced by show_modes().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sstvenc_get_mode_by_name()

const struct sstvenc_mode * sstvenc_get_mode_by_name ( const char * name)

Return the SSTV mode whose name matches this. Returns NULL if no such matching mode is found.

Definition at line 593 of file sstvmode.c.

593 {
594 for (uint8_t idx = 0; idx < sstvenc_get_mode_count(); idx++) {
595 if (!strcmp(sstvenc_sstv_modes[idx].name, name)) {
596 return &sstvenc_sstv_modes[idx];
597 }
598 }
599 return NULL;
600}

References sstvenc_mode::name, sstvenc_get_mode_count(), and sstvenc_sstv_modes.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sstvenc_get_mode_count()

uint8_t sstvenc_get_mode_count ( )

Return the number of SSTV modes defined.

Definition at line 581 of file sstvmode.c.

581 {
582 return sizeof(sstvenc_sstv_modes) / sizeof(sstvenc_sstv_modes[0]);
583}

References sstvenc_sstv_modes.

Referenced by sstvenc_get_mode_by_idx(), and sstvenc_get_mode_by_name().

Here is the caller graph for this function:

◆ sstvenc_get_pixel_posn()

uint32_t sstvenc_get_pixel_posn ( const struct sstvenc_mode *const mode,
uint16_t x,
uint16_t y )

Fetch the offset into the framebuffer for the given pixel.

Parameters
[in]modeSSTV mode in use
[in]x,yPixel co-ordinates
Returns
The array offset into the framebuffer that describes this pixel position.

Definition at line 704 of file sstvmode.c.

705 {
706 assert(x < mode->width);
707 assert(y < mode->height);
708
709 uint32_t idx = y * mode->width;
710 idx += x;
711
714 /* These are 3-colour tuples */
715 idx *= 3;
716 }
717
718 return idx;
719}
#define SSTVENC_CSO_MODE_MONO
Definition sstvmode.h:60
#define SSTVENC_CSO_MASK_MODE
Definition sstvmode.h:45
uint16_t width
Definition sstvmode.h:215
uint16_t colour_space_order
Definition sstvmode.h:226

References sstvenc_mode::colour_space_order, sstvenc_mode::height, SSTVENC_CSO_MASK_MODE, SSTVENC_CSO_MODE_MONO, and sstvenc_mode::width.

Referenced by main(), and sstvenc_encoder_next_channel_pulse().

Here is the caller graph for this function:

◆ sstvenc_mode_get_fb_sz()

size_t sstvenc_mode_get_fb_sz ( const struct sstvenc_mode *const mode)

Return the size of the framebuffer needed for this mode in bytes.

Definition at line 692 of file sstvmode.c.

692 {
693 size_t sz = mode->width * mode->height * sizeof(uint8_t);
694
697 /* 3 channels needed */
698 sz *= 3;
699 }
700
701 return sz;
702}
uint16_t height
Definition sstvmode.h:220

References sstvenc_mode::colour_space_order, sstvenc_mode::height, SSTVENC_CSO_MASK_MODE, SSTVENC_CSO_MODE_MONO, and sstvenc_mode::width.

◆ sstvenc_mode_get_txtime()

uint64_t sstvenc_mode_get_txtime ( const struct sstvenc_mode *const mode,
const char * fsk_id )

Compute the transmission time of the specified mode in nanoseconds.

Parameters
[in]modeThe SSTV mode being computed
[in]fsk_idThe FSK ID being transmitted, for length calculations. If no FSK is enabled, set this to NULL.

Definition at line 614 of file sstvmode.c.

615 {
616 uint64_t txtime = 0;
617
618 /* Compute each scan line */
620
621 for (uint8_t ch = 0; ch < 4; ch++) {
624 /* There's a scan line here */
625 txtime += mode->scanline_period_ns[ch];
626
627 switch (ch) {
628 case 0:
630 mode->gap01);
631 break;
632 case 1:
634 mode->gap12);
635 break;
636 case 2:
638 mode->gap23);
639 break;
640 default:
641 break;
642 }
643 }
644 }
645
646 txtime += sstvenc_pulseseq_get_txtime(mode->backporch);
647
648 /* This is repeated for each scan line */
651 /* Each scan line is two image lines */
652 txtime *= mode->height / 2;
653 break;
654 default:
655 /* Each scan line is an image line */
656 txtime *= mode->height;
657 break;
658 }
659
660 /*
661 * VIS header:
662 */
663 txtime += 1000
664 * (SSTVENC_PERIOD_VIS_START /* START bit 1 */
665 + SSTVENC_PERIOD_VIS_SYNC /* START bit 2 */
666 + SSTVENC_PERIOD_VIS_START /* START bit 3 */
667 + SSTVENC_PERIOD_VIS_BIT /* START bit 4 */
668 + (7 * SSTVENC_PERIOD_VIS_BIT) /* data bits */
669 + SSTVENC_PERIOD_VIS_BIT /* PARITY bit */
670 + SSTVENC_PERIOD_VIS_BIT /* STOP bit */
671 );
672
673 /* Before and after, we have sequences of pulses */
674 txtime += sstvenc_pulseseq_get_txtime(mode->initseq);
675 txtime += sstvenc_pulseseq_get_txtime(mode->finalseq);
676
677 if (fsk_id) {
678 /* Add the duration of the FSK ID */
679 txtime += 1000
681 * 12) /* 12 bits preamble */
682 + (SSTVENC_PERIOD_FSKID_BIT * strlen(fsk_id)
683 * 6) /* 6 bits/char ID */
685 * 6) /* 6 bits trailer */
686 );
687 }
688
689 return txtime;
690}
#define SSTVENC_CSO_CH_NONE
Definition sstvmode.h:86
#define SSTVENC_CSO_MODE_YUV2
Definition sstvmode.h:75
#define SSTVENC_MODE_GET_CH(n, mode)
Definition sstvmode.h:108
const struct sstvenc_encoder_pulse * gap01
Definition sstvmode.h:179
const struct sstvenc_encoder_pulse * backporch
Definition sstvmode.h:198
const struct sstvenc_encoder_pulse * finalseq
Definition sstvmode.h:204
const struct sstvenc_encoder_pulse * gap23
Definition sstvmode.h:191
const struct sstvenc_encoder_pulse * gap12
Definition sstvmode.h:185
const struct sstvenc_encoder_pulse * frontporch
Definition sstvmode.h:173
const struct sstvenc_encoder_pulse * initseq
Definition sstvmode.h:166
uint32_t scanline_period_ns[4]
Definition sstvmode.h:210
uint64_t sstvenc_pulseseq_get_txtime(const struct sstvenc_encoder_pulse *seq)
Definition sstvmode.c:603
#define SSTVENC_PERIOD_FSKID_BIT
Definition sstvmode.h:24
#define SSTVENC_PERIOD_VIS_SYNC
Definition sstvmode.h:21
#define SSTVENC_PERIOD_VIS_BIT
Definition sstvmode.h:22
#define SSTVENC_PERIOD_VIS_START
Definition sstvmode.h:20

References sstvenc_mode::backporch, sstvenc_mode::colour_space_order, sstvenc_mode::finalseq, sstvenc_mode::frontporch, sstvenc_mode::gap01, sstvenc_mode::gap12, sstvenc_mode::gap23, sstvenc_mode::height, sstvenc_mode::initseq, sstvenc_mode::scanline_period_ns, SSTVENC_CSO_CH_NONE, SSTVENC_CSO_MASK_MODE, SSTVENC_CSO_MODE_YUV2, SSTVENC_MODE_GET_CH, SSTVENC_PERIOD_FSKID_BIT, SSTVENC_PERIOD_VIS_BIT, SSTVENC_PERIOD_VIS_START, SSTVENC_PERIOD_VIS_SYNC, and sstvenc_pulseseq_get_txtime().

Referenced by show_modes().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sstvenc_pulseseq_get_txtime()

uint64_t sstvenc_pulseseq_get_txtime ( const struct sstvenc_encoder_pulse * seq)

Compute the transmission time of a given pulse sequence.

Definition at line 603 of file sstvmode.c.

603 {
604 uint64_t txtime = 0;
605
606 while ((seq != NULL) && (seq->duration_ns > 0)) {
607 txtime += seq->duration_ns;
608 seq++;
609 }
610
611 return txtime;
612}

References sstvenc_encoder_pulse::duration_ns.

Referenced by sstvenc_mode_get_txtime().

Here is the caller graph for this function:

Variable Documentation

◆ sstvenc_sstv_martin_fp

const struct sstvenc_encoder_pulse sstvenc_sstv_martin_fp[]
static
Initial value:
= {
{.frequency = SSTVENC_FREQ_SYNC, .duration_ns = 4862000},
{.frequency = SSTVENC_FREQ_BLACK, .duration_ns = 572000},
{.frequency = 0, .duration_ns = 0},
}
#define SSTVENC_FREQ_BLACK
Definition sstvfreq.h:21
#define SSTVENC_FREQ_SYNC
Definition sstvfreq.h:19

Definition at line 75 of file sstvmode.c.

75 {
76 {.frequency = SSTVENC_FREQ_SYNC, .duration_ns = 4862000},
77 {.frequency = SSTVENC_FREQ_BLACK, .duration_ns = 572000},
78 {.frequency = 0, .duration_ns = 0},
79};

◆ sstvenc_sstv_martin_sep

const struct sstvenc_encoder_pulse sstvenc_sstv_martin_sep[]
static
Initial value:
= {
{.frequency = SSTVENC_FREQ_BLACK, .duration_ns = 572000},
{.frequency = 0, .duration_ns = 0},
}

Definition at line 81 of file sstvmode.c.

81 {
82 {.frequency = SSTVENC_FREQ_BLACK, .duration_ns = 572000},
83 {.frequency = 0, .duration_ns = 0},
84};

◆ sstvenc_sstv_modes

const struct sstvenc_mode sstvenc_sstv_modes[]
static

Definition at line 164 of file sstvmode.c.

164 {
165 /* Robot B/W modes */
166 {
167 .description = "Robot 8 B/W",
168 .name = "R8BW",
169 .initseq = NULL,
170 .frontporch = sstvenc_sstv_robotbw_fp,
171 .gap01 = NULL,
172 .gap12 = NULL,
173 .backporch = NULL,
174 .finalseq = NULL,
175 .scanline_period_ns = {59900000, 0, 0},
176 .width = 160,
177 .height = 120,
178 .colour_space_order = SSTVENC_MODE_ORDER(
181 .vis_code = 0x02,
182 },
183 {
184 .description = "Robot 12 B/W",
185 .name = "R12BW",
186 .initseq = NULL,
187 .frontporch = sstvenc_sstv_robotbw_fp,
188 .gap01 = NULL,
189 .gap12 = NULL,
190 .backporch = NULL,
191 .finalseq = NULL,
192 .scanline_period_ns = {93000000, 0, 0},
193 .width = 160,
194 .height = 120,
195 .colour_space_order = SSTVENC_MODE_ORDER(
198 .vis_code = 0x86,
199 },
200 {
201 .description = "Robot 24 B/W",
202 .name = "R24BW",
203 .initseq = NULL,
204 .frontporch = sstvenc_sstv_robotbw_fp,
205 .gap01 = NULL,
206 .gap12 = NULL,
207 .backporch = NULL,
208 .finalseq = NULL,
209 .scanline_period_ns = {93000000, 0, 0},
210 .width = 320,
211 .height = 240,
212 .colour_space_order = SSTVENC_MODE_ORDER(
215 .vis_code = 0x0a,
216 },
217 /* Robot colour modes */
218 {
219 .description = "Robot 36",
220 .name = "R36",
221 .initseq = NULL,
222 .frontporch = sstvenc_sstv_robot36_fp,
226 .backporch = NULL,
227 .finalseq = NULL,
228 .scanline_period_ns = {88000000, 44000000, 88000000, 44000000},
229 .width = 320,
230 .height = 240,
231 .colour_space_order = SSTVENC_MODE_ORDER(
234 .vis_code = 0x08,
235 },
236 {
237 .description = "Robot 72",
238 .name = "R72",
239 .initseq = NULL,
240 .frontporch = sstvenc_sstv_robot72_fp,
243 .gap23 = NULL,
244 .backporch = NULL,
245 .finalseq = NULL,
246 .scanline_period_ns = {138000000, 69000000, 69000000},
247 .width = 320,
248 .height = 240,
249 .colour_space_order = SSTVENC_MODE_ORDER(
252 .vis_code = 0x0c,
253 },
254 /* Scottie modes */
255 {
256 .description = "Scottie S1",
257 .name = "S1",
258 .initseq = NULL,
259 .frontporch = sstvenc_sstv_scottie_fp,
262 .backporch = sstvenc_sstv_scottie_bp,
263 .finalseq = NULL,
264 .scanline_period_ns = {136740000, 136740000, 136740000},
265 .width = 320,
266 .height = 256,
267 .colour_space_order = SSTVENC_MODE_ORDER(
270 .vis_code = 0x3c,
271 },
272 {
273 .description = "Scottie S2",
274 .name = "S2",
275 .initseq = NULL,
276 .frontporch = sstvenc_sstv_scottie_fp,
279 .backporch = sstvenc_sstv_scottie_bp,
280 .finalseq = NULL,
281 .scanline_period_ns = {86564000, 86564000, 86564000},
282 .width = 320,
283 .height = 256,
284 .colour_space_order = SSTVENC_MODE_ORDER(
287 .vis_code = 0x38,
288 },
289 {
290 .description = "Scottie DX",
291 .name = "SDX",
292 .initseq = NULL,
293 .frontporch = sstvenc_sstv_scottie_fp,
296 .backporch = sstvenc_sstv_scottie_bp,
297 .finalseq = NULL,
298 .scanline_period_ns = {344100000, 344100000, 344100000},
299 .width = 320,
300 .height = 256,
301 .colour_space_order = SSTVENC_MODE_ORDER(
304 .vis_code = 0x4c,
305 },
306 /* Martin modes */
307 {
308 .description = "Martin M1",
309 .name = "M1",
310 .initseq = NULL,
311 .frontporch = sstvenc_sstv_martin_fp,
314 .backporch = sstvenc_sstv_martin_sep,
315 .finalseq = NULL,
316 .scanline_period_ns = {146432000, 146432000, 146432000},
317 .width = 320,
318 .height = 256,
319 .colour_space_order = SSTVENC_MODE_ORDER(
322 .vis_code = 0x2c,
323 },
324 {
325 .description = "Martin M2",
326 .name = "M2",
327 .initseq = NULL,
328 .frontporch = sstvenc_sstv_martin_fp,
331 .backporch = sstvenc_sstv_martin_sep,
332 .finalseq = NULL,
333 .scanline_period_ns = {73216000, 73216000, 73216000},
334 .width = 320,
335 .height = 256,
336 .colour_space_order = SSTVENC_MODE_ORDER(
339 .vis_code = 0x28,
340 },
341 /* Pasokon modes */
342 {
343 .description = "Pasokon P3",
344 .name = "P3",
345 .initseq = NULL,
346 .frontporch = sstvenc_sstv_pasokon_p3_fp,
349 .backporch = sstvenc_sstv_pasokon_p3_sep,
350 .finalseq = NULL,
351 .scanline_period_ns
355 .width = 640,
356 .height = 496,
357 .colour_space_order = SSTVENC_MODE_ORDER(
360 .vis_code = 0x71,
361 },
362 {
363 .description = "Pasokon P5",
364 .name = "P5",
365 .initseq = NULL,
366 .frontporch = sstvenc_sstv_pasokon_p5_fp,
369 .backporch = sstvenc_sstv_pasokon_p5_sep,
370 .finalseq = NULL,
371 .scanline_period_ns
375 .width = 640,
376 .height = 496,
377 .colour_space_order = SSTVENC_MODE_ORDER(
380 .vis_code = 0x72,
381 },
382 {
383 .description = "Pasokon P7",
384 .name = "P7",
385 .initseq = NULL,
386 .frontporch = sstvenc_sstv_pasokon_p7_fp,
389 .backporch = sstvenc_sstv_pasokon_p7_sep,
390 .finalseq = NULL,
391 .scanline_period_ns
395 .width = 640,
396 .height = 496,
397 .colour_space_order = SSTVENC_MODE_ORDER(
400 .vis_code = 0x73,
401 },
402 /* PD modes */
403 {
404 .description = "PD-50",
405 .name = "PD50",
406 .initseq = NULL,
407 .frontporch = sstvenc_sstv_pd_fp,
408 .gap01 = NULL,
409 .gap12 = NULL,
410 .backporch = NULL,
411 .finalseq = NULL,
412 .scanline_period_ns = {91520000, 91520000, 91520000, 91520000},
413 .width = 320,
414 .height = 256,
415 .colour_space_order = SSTVENC_MODE_ORDER(
418 .vis_code = 0x5d,
419 },
420 {
421 .description = "PD-90",
422 .name = "PD90",
423 .initseq = NULL,
424 .frontporch = sstvenc_sstv_pd_fp,
425 .gap01 = NULL,
426 .gap12 = NULL,
427 .backporch = NULL,
428 .finalseq = NULL,
429 .scanline_period_ns = {170240000, 170240000, 170240000, 170240000},
430 .width = 320,
431 .height = 256,
432 .colour_space_order = SSTVENC_MODE_ORDER(
435 .vis_code = 0x63,
436 },
437 {
438 .description = "PD-120",
439 .name = "PD120",
440 .initseq = NULL,
441 .frontporch = sstvenc_sstv_pd_fp,
442 .gap01 = NULL,
443 .gap12 = NULL,
444 .backporch = NULL,
445 .finalseq = NULL,
446 .scanline_period_ns = {121600000, 121600000, 121600000, 121600000},
447 .width = 640,
448 .height = 496,
449 .colour_space_order = SSTVENC_MODE_ORDER(
452 .vis_code = 0x5f,
453 },
454 {
455 .description = "PD-160",
456 .name = "PD160",
457 .initseq = NULL,
458 .frontporch = sstvenc_sstv_pd_fp,
459 .gap01 = NULL,
460 .gap12 = NULL,
461 .backporch = NULL,
462 .finalseq = NULL,
463 .scanline_period_ns = {195584000, 195584000, 195584000, 195584000},
464 .width = 512,
465 .height = 400,
466 .colour_space_order = SSTVENC_MODE_ORDER(
469 .vis_code = 0x62,
470 },
471 {
472 .description = "PD-180",
473 .name = "PD180",
474 .initseq = NULL,
475 .frontporch = sstvenc_sstv_pd_fp,
476 .gap01 = NULL,
477 .gap12 = NULL,
478 .backporch = NULL,
479 .finalseq = NULL,
480 .scanline_period_ns = {183040000, 183040000, 183040000, 183040000},
481 .width = 640,
482 .height = 496,
483 .colour_space_order = SSTVENC_MODE_ORDER(
486 .vis_code = 0x60,
487 },
488 {
489 .description = "PD-240",
490 .name = "PD240",
491 .initseq = NULL,
492 .frontporch = sstvenc_sstv_pd_fp,
493 .gap01 = NULL,
494 .gap12 = NULL,
495 .backporch = NULL,
496 .finalseq = NULL,
497 .scanline_period_ns = {244480000, 244480000, 244480000, 244480000},
498 .width = 640,
499 .height = 496,
500 .colour_space_order = SSTVENC_MODE_ORDER(
503 .vis_code = 0x61,
504 },
505 {
506 .description = "PD-290",
507 .name = "PD290",
508 .initseq = NULL,
509 .frontporch = sstvenc_sstv_pd_fp,
510 .gap01 = NULL,
511 .gap12 = NULL,
512 .backporch = NULL,
513 .finalseq = NULL,
514 .scanline_period_ns = {228800000, 228800000, 228800000, 228800000},
515 .width = 800,
516 .height = 616,
517 .colour_space_order = SSTVENC_MODE_ORDER(
520 .vis_code = 0x5e,
521 },
522 /*
523 * Wraase SC-2 modes
524 *
525 * Separator is needed for W260 and W2120, but not W2180 in QSSTV and
526 * slowrx. W2180 has a half-length pulse in the front porch sequence.
527 */
528 {
529 .description = "Wraase SC-2 60",
530 .name = "W260",
531 .initseq = NULL,
532 .frontporch = sstvenc_sstv_wraasesc2_120_fp,
535 .backporch = NULL,
536 .finalseq = NULL,
537 .scanline_period_ns = {77627500, 77627500, 77627500},
538 .width = 320,
539 .height = 256,
540 .colour_space_order = SSTVENC_MODE_ORDER(
543 .vis_code = 0xbb,
544 },
545 {
546 .description = "Wraase SC-2 120",
547 .name = "W2120",
548 .initseq = NULL,
549 .frontporch = sstvenc_sstv_wraasesc2_120_fp,
552 .backporch = NULL,
553 .finalseq = NULL,
554 .scanline_period_ns = {155985000, 155985000, 155985000},
555 .width = 320,
556 .height = 256,
557 .colour_space_order = SSTVENC_MODE_ORDER(
560 .vis_code = 0x3f,
561 },
562 {
563 .description = "Wraase SC-2 180",
564 .name = "W2180",
565 .initseq = NULL,
566 .frontporch = sstvenc_sstv_wraasesc2_180_fp,
567 .gap01 = NULL,
568 .gap12 = NULL,
569 .backporch = NULL,
570 .finalseq = NULL,
571 .scanline_period_ns = {235000000, 235000000, 235000000},
572 .width = 320,
573 .height = 256,
574 .colour_space_order = SSTVENC_MODE_ORDER(
577 .vis_code = 0x37,
578 },
579};
#define SSTVENC_CSO_CH_R
Definition sstvmode.h:90
#define SSTVENC_CSO_CH_B
Definition sstvmode.h:92
#define SSTVENC_CSO_CH_Y
Definition sstvmode.h:87
#define SSTVENC_CSO_CH_G
Definition sstvmode.h:91
#define SSTVENC_CSO_CH_U
Definition sstvmode.h:88
#define SSTVENC_CSO_CH_Y2
Definition sstvmode.h:93
#define SSTVENC_CSO_CH_V
Definition sstvmode.h:89
#define SSTVENC_CSO_MODE_YUV
Definition sstvmode.h:66
#define SSTVENC_CSO_MODE_RGB
Definition sstvmode.h:63
#define SSTVENC_MODE_ORDER(cs, c0, c1, c2, c3)
Definition sstvmode.h:127
#define SSTVENC_PASOKON_P7_TIMEUNIT
Definition sstvmode.c:90
static const struct sstvenc_encoder_pulse sstvenc_sstv_robot36_gap[]
Definition sstvmode.c:27
static const struct sstvenc_encoder_pulse sstvenc_sstv_martin_sep[]
Definition sstvmode.c:81
static const struct sstvenc_encoder_pulse sstvenc_sstv_pasokon_p7_sep[]
Definition sstvmode.c:132
static const struct sstvenc_encoder_pulse sstvenc_sstv_scottie_sep01[]
Definition sstvmode.c:57
static const struct sstvenc_encoder_pulse sstvenc_sstv_wraasesc2_180_fp[]
Definition sstvmode.c:146
static const struct sstvenc_encoder_pulse sstvenc_sstv_robot36_fp[]
Definition sstvmode.c:21
static const struct sstvenc_encoder_pulse sstvenc_sstv_robot72_gap12[]
Definition sstvmode.c:45
static const struct sstvenc_encoder_pulse sstvenc_sstv_scottie_bp[]
Definition sstvmode.c:69
static const struct sstvenc_encoder_pulse sstvenc_sstv_wraasesc2_sep[]
Definition sstvmode.c:158
static const struct sstvenc_encoder_pulse sstvenc_sstv_pasokon_p3_fp[]
Definition sstvmode.c:96
static const struct sstvenc_encoder_pulse sstvenc_sstv_pd_fp[]
Definition sstvmode.c:139
static const struct sstvenc_encoder_pulse sstvenc_sstv_pasokon_p5_sep[]
Definition sstvmode.c:118
static const struct sstvenc_encoder_pulse sstvenc_sstv_pasokon_p7_fp[]
Definition sstvmode.c:124
#define SSTVENC_PASOKON_SCAN(unit)
Definition sstvmode.c:94
#define SSTVENC_PASOKON_P5_TIMEUNIT
Definition sstvmode.c:89
static const struct sstvenc_encoder_pulse sstvenc_sstv_scottie_sep12[]
Definition sstvmode.c:62
static const struct sstvenc_encoder_pulse sstvenc_sstv_scottie_fp[]
Definition sstvmode.c:52
static const struct sstvenc_encoder_pulse sstvenc_sstv_pasokon_p5_fp[]
Definition sstvmode.c:110
#define SSTVENC_PASOKON_P3_TIMEUNIT
Definition sstvmode.c:88
static const struct sstvenc_encoder_pulse sstvenc_sstv_robotbw_fp[]
Definition sstvmode.c:15
static const struct sstvenc_encoder_pulse sstvenc_sstv_robot72_fp[]
Definition sstvmode.c:33
static const struct sstvenc_encoder_pulse sstvenc_sstv_wraasesc2_120_fp[]
Definition sstvmode.c:152
static const struct sstvenc_encoder_pulse sstvenc_sstv_pasokon_p3_sep[]
Definition sstvmode.c:104
static const struct sstvenc_encoder_pulse sstvenc_sstv_martin_fp[]
Definition sstvmode.c:75
static const struct sstvenc_encoder_pulse sstvenc_sstv_robot72_gap01[]
Definition sstvmode.c:39

Referenced by sstvenc_get_mode_by_idx(), sstvenc_get_mode_by_name(), and sstvenc_get_mode_count().

◆ sstvenc_sstv_pasokon_p3_fp

const struct sstvenc_encoder_pulse sstvenc_sstv_pasokon_p3_fp[]
static
Initial value:
= {
{.frequency = SSTVENC_FREQ_SYNC,
{.frequency = SSTVENC_FREQ_BLACK,
{.frequency = 0, .duration_ns = 0},
}
#define SSTVENC_PASOKON_GAP(unit)
Definition sstvmode.c:93
#define SSTVENC_PASOKON_SYNC(unit)
Definition sstvmode.c:92

Definition at line 96 of file sstvmode.c.

96 {
97 {.frequency = SSTVENC_FREQ_SYNC,
99 {.frequency = SSTVENC_FREQ_BLACK,
101 {.frequency = 0, .duration_ns = 0},
102};

◆ sstvenc_sstv_pasokon_p3_sep

const struct sstvenc_encoder_pulse sstvenc_sstv_pasokon_p3_sep[]
static
Initial value:
= {
{.frequency = SSTVENC_FREQ_BLACK,
{.frequency = 0, .duration_ns = 0},
}

Definition at line 104 of file sstvmode.c.

104 {
105 {.frequency = SSTVENC_FREQ_BLACK,
107 {.frequency = 0, .duration_ns = 0},
108};

◆ sstvenc_sstv_pasokon_p5_fp

const struct sstvenc_encoder_pulse sstvenc_sstv_pasokon_p5_fp[]
static
Initial value:
= {
{.frequency = SSTVENC_FREQ_SYNC,
{.frequency = SSTVENC_FREQ_BLACK,
{.frequency = 0, .duration_ns = 0},
}

Definition at line 110 of file sstvmode.c.

110 {
111 {.frequency = SSTVENC_FREQ_SYNC,
113 {.frequency = SSTVENC_FREQ_BLACK,
115 {.frequency = 0, .duration_ns = 0},
116};

◆ sstvenc_sstv_pasokon_p5_sep

const struct sstvenc_encoder_pulse sstvenc_sstv_pasokon_p5_sep[]
static
Initial value:
= {
{.frequency = SSTVENC_FREQ_BLACK,
{.frequency = 0, .duration_ns = 0},
}

Definition at line 118 of file sstvmode.c.

118 {
119 {.frequency = SSTVENC_FREQ_BLACK,
121 {.frequency = 0, .duration_ns = 0},
122};

◆ sstvenc_sstv_pasokon_p7_fp

const struct sstvenc_encoder_pulse sstvenc_sstv_pasokon_p7_fp[]
static
Initial value:
= {
{.frequency = SSTVENC_FREQ_SYNC,
{.frequency = SSTVENC_FREQ_BLACK,
{.frequency = 0, .duration_ns = 0},
}

Definition at line 124 of file sstvmode.c.

124 {
125 {.frequency = SSTVENC_FREQ_SYNC,
127 {.frequency = SSTVENC_FREQ_BLACK,
129 {.frequency = 0, .duration_ns = 0},
130};

◆ sstvenc_sstv_pasokon_p7_sep

const struct sstvenc_encoder_pulse sstvenc_sstv_pasokon_p7_sep[]
static
Initial value:
= {
{.frequency = SSTVENC_FREQ_BLACK,
{.frequency = 0, .duration_ns = 0},
}

Definition at line 132 of file sstvmode.c.

132 {
133 {.frequency = SSTVENC_FREQ_BLACK,
135 {.frequency = 0, .duration_ns = 0},
136};

◆ sstvenc_sstv_pd_fp

const struct sstvenc_encoder_pulse sstvenc_sstv_pd_fp[]
static
Initial value:
= {
{.frequency = SSTVENC_FREQ_SYNC, .duration_ns = 20000000},
{.frequency = SSTVENC_FREQ_BLACK, .duration_ns = 2080000},
{.frequency = 0, .duration_ns = 0},
}

Definition at line 139 of file sstvmode.c.

139 {
140 {.frequency = SSTVENC_FREQ_SYNC, .duration_ns = 20000000},
141 {.frequency = SSTVENC_FREQ_BLACK, .duration_ns = 2080000},
142 {.frequency = 0, .duration_ns = 0},
143};

◆ sstvenc_sstv_robot36_fp

const struct sstvenc_encoder_pulse sstvenc_sstv_robot36_fp[]
static
Initial value:
= {
{.frequency = SSTVENC_FREQ_SYNC, .duration_ns = 9000000},
{.frequency = SSTVENC_FREQ_BLACK, .duration_ns = 3000000},
{.frequency = 0, .duration_ns = 0},
}

Definition at line 21 of file sstvmode.c.

21 {
22 {.frequency = SSTVENC_FREQ_SYNC, .duration_ns = 9000000},
23 {.frequency = SSTVENC_FREQ_BLACK, .duration_ns = 3000000},
24 {.frequency = 0, .duration_ns = 0},
25};

◆ sstvenc_sstv_robot36_gap

const struct sstvenc_encoder_pulse sstvenc_sstv_robot36_gap[]
static
Initial value:
= {
{.frequency = SSTVENC_FREQ_BLACK, .duration_ns = 4500000},
{.frequency = SSTVENC_FREQ_VIS_START, .duration_ns = 1500000},
{.frequency = 0, .duration_ns = 0},
}
#define SSTVENC_FREQ_VIS_START
Definition sstvfreq.h:22

Definition at line 27 of file sstvmode.c.

27 {
28 {.frequency = SSTVENC_FREQ_BLACK, .duration_ns = 4500000},
29 {.frequency = SSTVENC_FREQ_VIS_START, .duration_ns = 1500000},
30 {.frequency = 0, .duration_ns = 0},
31};

◆ sstvenc_sstv_robot72_fp

const struct sstvenc_encoder_pulse sstvenc_sstv_robot72_fp[]
static
Initial value:
= {
{.frequency = SSTVENC_FREQ_SYNC, .duration_ns = 9000000},
{.frequency = SSTVENC_FREQ_BLACK, .duration_ns = 3000000},
{.frequency = 0, .duration_ns = 0},
}

Definition at line 33 of file sstvmode.c.

33 {
34 {.frequency = SSTVENC_FREQ_SYNC, .duration_ns = 9000000},
35 {.frequency = SSTVENC_FREQ_BLACK, .duration_ns = 3000000},
36 {.frequency = 0, .duration_ns = 0},
37};

◆ sstvenc_sstv_robot72_gap01

const struct sstvenc_encoder_pulse sstvenc_sstv_robot72_gap01[]
static
Initial value:
= {
{.frequency = SSTVENC_FREQ_BLACK, .duration_ns = 4500000},
{.frequency = SSTVENC_FREQ_VIS_START, .duration_ns = 1500000},
{.frequency = 0, .duration_ns = 0},
}

Definition at line 39 of file sstvmode.c.

39 {
40 {.frequency = SSTVENC_FREQ_BLACK, .duration_ns = 4500000},
41 {.frequency = SSTVENC_FREQ_VIS_START, .duration_ns = 1500000},
42 {.frequency = 0, .duration_ns = 0},
43};

◆ sstvenc_sstv_robot72_gap12

const struct sstvenc_encoder_pulse sstvenc_sstv_robot72_gap12[]
static
Initial value:
= {
{.frequency = SSTVENC_FREQ_WHITE, .duration_ns = 4500000},
{.frequency = SSTVENC_FREQ_VIS_START, .duration_ns = 1500000},
{.frequency = 0, .duration_ns = 0},
}
#define SSTVENC_FREQ_WHITE
Definition sstvfreq.h:23

Definition at line 45 of file sstvmode.c.

45 {
46 {.frequency = SSTVENC_FREQ_WHITE, .duration_ns = 4500000},
47 {.frequency = SSTVENC_FREQ_VIS_START, .duration_ns = 1500000},
48 {.frequency = 0, .duration_ns = 0},
49};

◆ sstvenc_sstv_robotbw_fp

const struct sstvenc_encoder_pulse sstvenc_sstv_robotbw_fp[]
static
Initial value:
= {
{.frequency = SSTVENC_FREQ_SYNC, .duration_ns = 7000000},
{.frequency = 0, .duration_ns = 0},
}

Definition at line 15 of file sstvmode.c.

15 {
16 {.frequency = SSTVENC_FREQ_SYNC, .duration_ns = 7000000},
17 {.frequency = 0, .duration_ns = 0},
18};

◆ sstvenc_sstv_scottie_bp

const struct sstvenc_encoder_pulse sstvenc_sstv_scottie_bp[]
static
Initial value:
= {
{.frequency = SSTVENC_FREQ_BLACK, .duration_ns = 1500000},
{.frequency = 0, .duration_ns = 0},
}

Definition at line 69 of file sstvmode.c.

69 {
70 {.frequency = SSTVENC_FREQ_BLACK, .duration_ns = 1500000},
71 {.frequency = 0, .duration_ns = 0},
72};

◆ sstvenc_sstv_scottie_fp

const struct sstvenc_encoder_pulse sstvenc_sstv_scottie_fp[]
static
Initial value:
= {
{.frequency = SSTVENC_FREQ_BLACK, .duration_ns = 1500000},
{.frequency = 0, .duration_ns = 0},
}

Definition at line 52 of file sstvmode.c.

52 {
53 {.frequency = SSTVENC_FREQ_BLACK, .duration_ns = 1500000},
54 {.frequency = 0, .duration_ns = 0},
55};

◆ sstvenc_sstv_scottie_sep01

const struct sstvenc_encoder_pulse sstvenc_sstv_scottie_sep01[]
static
Initial value:
= {
{.frequency = SSTVENC_FREQ_BLACK, .duration_ns = 3000000},
{.frequency = 0, .duration_ns = 0},
}

Definition at line 57 of file sstvmode.c.

57 {
58 {.frequency = SSTVENC_FREQ_BLACK, .duration_ns = 3000000},
59 {.frequency = 0, .duration_ns = 0},
60};

◆ sstvenc_sstv_scottie_sep12

const struct sstvenc_encoder_pulse sstvenc_sstv_scottie_sep12[]
static
Initial value:
= {
{.frequency = SSTVENC_FREQ_BLACK, .duration_ns = 1500000},
{.frequency = SSTVENC_FREQ_SYNC, .duration_ns = 9000000},
{.frequency = SSTVENC_FREQ_BLACK, .duration_ns = 1500000},
{.frequency = 0, .duration_ns = 0},
}

Definition at line 62 of file sstvmode.c.

62 {
63 {.frequency = SSTVENC_FREQ_BLACK, .duration_ns = 1500000},
64 {.frequency = SSTVENC_FREQ_SYNC, .duration_ns = 9000000},
65 {.frequency = SSTVENC_FREQ_BLACK, .duration_ns = 1500000},
66 {.frequency = 0, .duration_ns = 0},
67};

◆ sstvenc_sstv_wraasesc2_120_fp

const struct sstvenc_encoder_pulse sstvenc_sstv_wraasesc2_120_fp[]
static
Initial value:
= {
{.frequency = SSTVENC_FREQ_SYNC, .duration_ns = 5522500},
{.frequency = SSTVENC_FREQ_BLACK, .duration_ns = 1000000},
{.frequency = 0, .duration_ns = 0},
}

Definition at line 152 of file sstvmode.c.

152 {
153 {.frequency = SSTVENC_FREQ_SYNC, .duration_ns = 5522500},
154 {.frequency = SSTVENC_FREQ_BLACK, .duration_ns = 1000000},
155 {.frequency = 0, .duration_ns = 0},
156};

◆ sstvenc_sstv_wraasesc2_180_fp

const struct sstvenc_encoder_pulse sstvenc_sstv_wraasesc2_180_fp[]
static
Initial value:
= {
{.frequency = SSTVENC_FREQ_SYNC, .duration_ns = 5522500},
{.frequency = SSTVENC_FREQ_BLACK, .duration_ns = 500000},
{.frequency = 0, .duration_ns = 0},
}

Definition at line 146 of file sstvmode.c.

146 {
147 {.frequency = SSTVENC_FREQ_SYNC, .duration_ns = 5522500},
148 {.frequency = SSTVENC_FREQ_BLACK, .duration_ns = 500000},
149 {.frequency = 0, .duration_ns = 0},
150};

◆ sstvenc_sstv_wraasesc2_sep

const struct sstvenc_encoder_pulse sstvenc_sstv_wraasesc2_sep[]
static
Initial value:
= {
{.frequency = SSTVENC_FREQ_BLACK, .duration_ns = 500000},
{.frequency = 0, .duration_ns = 0},
}

Definition at line 158 of file sstvmode.c.

158 {
159 {.frequency = SSTVENC_FREQ_BLACK, .duration_ns = 500000},
160 {.frequency = 0, .duration_ns = 0},
161};