瀏覽代碼

Remove dead code

tags/v1.8.0
Xerbo 2 年之前
父節點
當前提交
18ac507d32
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: 34103F6D8F11CEB0
共有 3 個文件被更改,包括 2 次插入12 次删除
  1. +0
    -1
      src/apt.h
  2. +0
    -9
      src/dsp.c
  3. +2
    -2
      src/main.c

+ 0
- 1
src/apt.h 查看文件

@@ -81,7 +81,6 @@ typedef int (*apt_getsamples_t)(void *context, float *samples, int count);
typedef struct { typedef struct {
float *prow[APT_MAX_HEIGHT]; // Row buffers float *prow[APT_MAX_HEIGHT]; // Row buffers
int nrow; // Number of rows int nrow; // Number of rows
int zenith; // Row in image where satellite reaches peak elevation
apt_channel_t chA, chB; // ID of each channel apt_channel_t chA, chB; // ID of each channel
char name[256]; // Stripped filename char name[256]; // Stripped filename
char *palette; // Filename of palette char *palette; // Filename of palette


+ 0
- 9
src/dsp.c 查看文件

@@ -159,7 +159,6 @@ int apt_getpixelrow(float *pixelv, int nrow, int *zenith, int reset, apt_getsamp
static size_t npv; static size_t npv;
static int synced = 0; static int synced = 0;
static float max = 0.0; static float max = 0.0;
static float minDoppler = 1000000000, previous = 0;


if(reset) synced = 0; if(reset) synced = 0;


@@ -183,14 +182,6 @@ int apt_getpixelrow(float *pixelv, int nrow, int *zenith, int reset, apt_getsamp
corr = convolve(&pixelv[1], sync_pattern, SYNC_PATTERN_SIZE - 1); corr = convolve(&pixelv[1], sync_pattern, SYNC_PATTERN_SIZE - 1);
lcorr = convolve(&pixelv[2], sync_pattern, SYNC_PATTERN_SIZE - 2); lcorr = convolve(&pixelv[2], sync_pattern, SYNC_PATTERN_SIZE - 2);
FreqLine = 1.0+((ecorr-lcorr) / corr / APT_IMG_WIDTH / 4.0); FreqLine = 1.0+((ecorr-lcorr) / corr / APT_IMG_WIDTH / 4.0);

float val = fabs(lcorr - ecorr)*0.25 + previous*0.75;
if(val < minDoppler && nrow > 10){
minDoppler = val;
*zenith = nrow;
}
previous = fabs(lcorr - ecorr);

// The point in which the pixel offset is recalculated // The point in which the pixel offset is recalculated
if (corr < 0.75 * max) { if (corr < 0.75 * max) {
synced = 0; synced = 0;


+ 2
- 2
src/main.c 查看文件

@@ -172,7 +172,7 @@ static int processAudio(char *filename, options_t *opts){
img.prow[img.nrow] = (float *) malloc(sizeof(float) * APT_PROW_WIDTH); img.prow[img.nrow] = (float *) malloc(sizeof(float) * APT_PROW_WIDTH);


// Write into memory and break the loop when there are no more samples to read // Write into memory and break the loop when there are no more samples to read
if (apt_getpixelrow(img.prow[img.nrow], img.nrow, &img.zenith, (img.nrow == 0), getsamples, NULL) == 0)
if (apt_getpixelrow(img.prow[img.nrow], img.nrow, NULL, (img.nrow == 0), getsamples, NULL) == 0)
break; break;


if(opts->realtime) pushRow(img.prow[img.nrow], APT_IMG_WIDTH); if(opts->realtime) pushRow(img.prow[img.nrow], APT_IMG_WIDTH);
@@ -197,7 +197,7 @@ static int processAudio(char *filename, options_t *opts){


// Crop noise from start and end of image // Crop noise from start and end of image
if(CONTAINS(opts->effects, Crop_Noise)){ if(CONTAINS(opts->effects, Crop_Noise)){
img.zenith -= apt_cropNoise(&img);
apt_cropNoise(&img);
} }


// Denoise // Denoise


Loading…
取消
儲存