analogtv_init();
it=(analogtv *)calloc(1,sizeof(analogtv));
+ if (!it) return 0;
it->dpy=dpy;
it->window=window;
it->gc=NULL;
if (it->n_colors) XFreeColors(it->dpy, it->colormap, it->colors, it->n_colors, 0L);
it->n_colors=0;
+ free(it);
}
}
hnc += hni + (int)(random()%65536)-32768;
}
- hnc -= (ANALOGTV_V * ANALOGTV_H)<<8;
+/* hnc -= (ANALOGTV_V * ANALOGTV_H)<<8;*/
}
if (it->rx_signal_level != 0.0)
double *sp;
double cbfc=1.0/128.0;
- sp = it->rx_signal + lineno*ANALOGTV_H + cur_hsync;
+/* sp = it->rx_signal + lineno*ANALOGTV_H + cur_hsync;*/
for (i=-32; i<32; i++) {
lineno = (cur_vsync + i + ANALOGTV_V) % ANALOGTV_V;
sp = it->rx_signal + lineno*ANALOGTV_H;
it->leveltable[height][0].index=0;
}
if (avgheight>=5) {
- it->leveltable[height][height-1].index=0;
+ if (height >= 1) it->leveltable[height][height-1].index=0;
}
if (avgheight>=7) {
it->leveltable[height][1].index=1;
- it->leveltable[height][height-2].index=1;
+ if (height >= 2) it->leveltable[height][height-2].index=1;
}
for (i=0; i<height; i++) {
float *rgb_start, *rgb_end;
double pixbright;
int pixmultinc;
- int bigloadchange,drawcount;
+ int /*bigloadchange,*/drawcount;
double baseload;
double puheight;
int overall_top, overall_bot;
float *raw_rgb_end=raw_rgb_start+3*it->subwidth;
float *rrp;
+ if (! raw_rgb_start) return;
analogtv_setup_frame(it);
analogtv_set_demod(it);
baseload=0.5;
/* if (it->hashnoise_on) baseload=0.5; */
- bigloadchange=1;
+ /*bigloadchange=1;*/
drawcount=0;
it->crtload[ANALOGTV_TOP-1]=baseload;
puheight = puramp(it, 2.0, 1.0, 1.3) * it->height_control *
if (lineno==it->shrinkpulse) {
baseload += 0.4;
- bigloadchange=1;
+ /*bigloadchange=1;*/
it->shrinkpulse=-1;
}
{
int totsignal=0;
- double ncl,diff;
+ double ncl/*,diff*/;
for (i=0; i<ANALOGTV_PIC_LEN; i++) {
totsignal += signal[i];
(totsignal-30000)/100000.0 +
(slineno>184 ? (slineno-184)*(lineno-184)*0.001 * it->squeezebottom
: 0.0));
- diff=ncl - it->crtload[lineno];
- bigloadchange = (diff>0.01 || diff<-0.01);
+ /*diff=ncl - it->crtload[lineno];*/
+ /*bigloadchange = (diff>0.01 || diff<-0.01);*/
it->crtload[lineno]=ncl;
}