Set empty images to all blank since uninitialized pixels cause problems with some renders
This commit is contained in:
parent
d6048c572f
commit
b6602c2e99
|
@ -54,6 +54,7 @@ class satnogs_sstv_pd120_demod(gr.top_block):
|
||||||
##################################################
|
##################################################
|
||||||
# Variables
|
# Variables
|
||||||
##################################################
|
##################################################
|
||||||
|
self.sstv_low_pass = sstv_low_pass = firdes.low_pass(1.0, 4*4160*4 , 1e3,2e3, firdes.WIN_HAMMING, 6.76)
|
||||||
self.intermediate_samp_rate = intermediate_samp_rate = int(4*4160*4 / 5)
|
self.intermediate_samp_rate = intermediate_samp_rate = int(4*4160*4 / 5)
|
||||||
self.audio_samp_rate = audio_samp_rate = 48000
|
self.audio_samp_rate = audio_samp_rate = 48000
|
||||||
|
|
||||||
|
@ -198,7 +199,7 @@ class satnogs_sstv_pd120_demod(gr.top_block):
|
||||||
firdes.WIN_HAMMING,
|
firdes.WIN_HAMMING,
|
||||||
6.76))
|
6.76))
|
||||||
self.hilbert_fc_0 = filter.hilbert_fc(65, firdes.WIN_HAMMING, 6.76)
|
self.hilbert_fc_0 = filter.hilbert_fc(65, firdes.WIN_HAMMING, 6.76)
|
||||||
self.freq_xlating_fir_filter_xxx_0_0 = filter.freq_xlating_fir_filter_ccc(5, [63], 1750, (4*4160*4 ))
|
self.freq_xlating_fir_filter_xxx_0_0 = filter.freq_xlating_fir_filter_ccc(5, sstv_low_pass, 1750, (4*4160*4 ))
|
||||||
self.analog_wfm_rcv_0 = analog.wfm_rcv(
|
self.analog_wfm_rcv_0 = analog.wfm_rcv(
|
||||||
quad_rate=4*4160*4,
|
quad_rate=4*4160*4,
|
||||||
audio_decimation=1,
|
audio_decimation=1,
|
||||||
|
@ -349,6 +350,13 @@ class satnogs_sstv_pd120_demod(gr.top_block):
|
||||||
def set_waterfall_file_path(self, waterfall_file_path):
|
def set_waterfall_file_path(self, waterfall_file_path):
|
||||||
self.waterfall_file_path = waterfall_file_path
|
self.waterfall_file_path = waterfall_file_path
|
||||||
|
|
||||||
|
def get_sstv_low_pass(self):
|
||||||
|
return self.sstv_low_pass
|
||||||
|
|
||||||
|
def set_sstv_low_pass(self, sstv_low_pass):
|
||||||
|
self.sstv_low_pass = sstv_low_pass
|
||||||
|
self.freq_xlating_fir_filter_xxx_0_0.set_taps(self.sstv_low_pass)
|
||||||
|
|
||||||
def get_intermediate_samp_rate(self):
|
def get_intermediate_samp_rate(self):
|
||||||
return self.intermediate_samp_rate
|
return self.intermediate_samp_rate
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,9 @@ sstv_pd120_sink_impl::sstv_pd120_sink_impl(const char *filename_png)
|
||||||
{
|
{
|
||||||
set_history(sync_length);
|
set_history(sync_length);
|
||||||
d_line = new float[line_length];
|
d_line = new float[line_length];
|
||||||
|
|
||||||
d_image = png::image<png::rgb_pixel>(image_width, image_height);
|
d_image = png::image<png::rgb_pixel>(image_width, image_height);
|
||||||
|
blank_image();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -179,6 +181,18 @@ sstv_pd120_sink_impl::render_line()
|
||||||
d_image_y = 0;
|
d_image_y = 0;
|
||||||
d_initial_sync = true;
|
d_initial_sync = true;
|
||||||
d_num_image++;
|
d_num_image++;
|
||||||
|
blank_image();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
sstv_pd120_sink_impl::blank_image()
|
||||||
|
{
|
||||||
|
std::cout << "Blanking Image" << std::endl;
|
||||||
|
for (size_t y = 0; y < image_height; y++) {
|
||||||
|
for (size_t x = 0; x < image_width; x++) {
|
||||||
|
d_image.set_pixel(x, y, png::rgb_pixel(0, 0, 0));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,7 @@ private:
|
||||||
bool is_sync(size_t pos, const float *samples);
|
bool is_sync(size_t pos, const float *samples);
|
||||||
|
|
||||||
void render_line();
|
void render_line();
|
||||||
|
void blank_image();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
sstv_pd120_sink_impl(const char *filename_png);
|
sstv_pd120_sink_impl(const char *filename_png);
|
||||||
|
|
Loading…
Reference in New Issue