From e0a4563a56e55413ac38aa97e9303b16bfbb9323 Mon Sep 17 00:00:00 2001 From: Dominik Auras Date: Tue, 22 Apr 2014 23:11:40 +0200 Subject: [PATCH 1/2] Add "high"-resolution modes Pasokon P3, P5 and P7 Tested against MMSSTV and HamRadio software --- pysstv/color.py | 46 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/pysstv/color.py b/pysstv/color.py index 00b8c2c..b933902 100644 --- a/pysstv/color.py +++ b/pysstv/color.py @@ -102,6 +102,50 @@ class Robot36(ColorSSTV): [(self.INTER_CH_FREQS[channel], self.INTER_CH_GAP), (FREQ_VIS_START, self.PORCH)], ((byte_to_freq(p[channel]), uv_pixel_time) for p in pixels)) + + +class PasokonP3(ColorSSTV): + """ + [ VIS code or horizontal sync here ] + Back porch - 5 time units of black (1500 Hz). + Red component - 640 pixels of 1 time unit each. + Gap - 5 time units of black. + Green component - 640 pixels of 1 time unit each. + Gap - 5 time units of black. + Blue component - 640 pixels of 1 time unit each. + Front porch - 5 time units of black. + Horizontal Sync - 25 time units of 1200 Hz. + """ + TIMEUNIT = 1000/4800. # ms + COLOR_SEQ = (RED, GREEN, BLUE) + VIS_CODE = 0x71 + WIDTH = 640 + HEIGHT = 480+16 + SYNC = 25 * TIMEUNIT + SCAN = WIDTH * TIMEUNIT + INTER_CH_GAP = 5 * TIMEUNIT + + def before_channel(self, index): + if index == self.COLOR_SEQ[0]: + yield FREQ_BLACK, self.INTER_CH_GAP + + def after_channel(self, index): + yield FREQ_BLACK, self.INTER_CH_GAP + + +class PasokonP5(PasokonP3): + TIMEUNIT = 1000/3200. # ms + VIS_CODE = 0x72 + SYNC = 25 * TIMEUNIT + SCAN = PasokonP3.WIDTH * TIMEUNIT + INTER_CH_GAP = 5 * TIMEUNIT + +class PasokonP7(PasokonP3): + TIMEUNIT = 1000/2400. # ms + VIS_CODE = 0xF3 + SYNC = 25 * TIMEUNIT + SCAN = PasokonP3.WIDTH * TIMEUNIT + INTER_CH_GAP = 5 * TIMEUNIT -MODES = (MartinM1, MartinM2, ScottieS1, ScottieS2, Robot36) +MODES = (MartinM1, MartinM2, ScottieS1, ScottieS2, Robot36, PasokonP3, PasokonP5, PasokonP7) From 6f5ea1a5ef768dba2cd4cf878fea82aedaa4a882 Mon Sep 17 00:00:00 2001 From: Dominik Auras Date: Tue, 22 Apr 2014 23:17:34 +0200 Subject: [PATCH 2/2] Update README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7ad810e..e356316 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Command line usage $ python -m pysstv -h usage: __main__.py [-h] - [--mode {MartinM2,MartinM1,Robot24BW,ScottieS2,ScottieS1,Robot8BW}] + [--mode {MartinM2,MartinM1,Robot24BW,ScottieS2,ScottieS1,Robot8BW,PasokonP3,PasokonP5,PasokonP7}] [--rate RATE] [--bits BITS] image.png output.wav @@ -26,7 +26,7 @@ Command line usage optional arguments: -h, --help show this help message and exit - --mode {MartinM2,MartinM1,Robot24BW,ScottieS2,ScottieS1,Robot8BW} + --mode {MartinM2,MartinM1,Robot24BW,ScottieS2,ScottieS1,Robot8BW,PasokonP3,PasokonP5,PasokonP7} image mode (default: Martin M1) --rate RATE sampling rate (default: 48000) --bits BITS bits per sample (default: 16)