kopia lustrzana https://github.com/xdsopl/robot36
added 16000hz test, changed downsampling to at least 2 * pixel freq
rodzic
bf05c488aa
commit
e73d00a09b
|
@ -5,6 +5,9 @@ debug
|
|||
11025.ppm
|
||||
11025.wav
|
||||
11025.dat
|
||||
16000.ppm
|
||||
16000.wav
|
||||
16000.dat
|
||||
40000.ppm
|
||||
40000.wav
|
||||
40000.dat
|
||||
|
|
8
Makefile
8
Makefile
|
@ -1,5 +1,5 @@
|
|||
|
||||
CFLAGS = -DUP=1 -DDN=1 -D_GNU_SOURCE=1 -W -Wall -O3 -std=c99 -ffast-math
|
||||
CFLAGS = -DUP=0 -DDN=1 -D_GNU_SOURCE=1 -W -Wall -O3 -std=c99 -ffast-math
|
||||
LDFLAGS = -lm -lasound
|
||||
|
||||
all: encode decode debug
|
||||
|
@ -7,11 +7,13 @@ all: encode decode debug
|
|||
test: all
|
||||
./encode smpte.ppm 8000.wav 8000
|
||||
./encode smpte.ppm 11025.wav 11025
|
||||
./encode smpte.ppm 16000.wav 16000
|
||||
./encode smpte.ppm 40000.wav 40000
|
||||
./encode smpte.ppm 44100.wav 44100
|
||||
./encode smpte.ppm 48000.wav 48000
|
||||
./decode 8000.wav 8000.ppm
|
||||
./decode 11025.wav 11025.ppm
|
||||
./decode 16000.wav 16000.ppm
|
||||
./decode 40000.wav 40000.ppm
|
||||
./decode 44100.wav 44100.ppm
|
||||
./decode 48000.wav 48000.ppm
|
||||
|
@ -19,17 +21,19 @@ test: all
|
|||
fun: all
|
||||
./encode smpte.ppm 8000.wav 8000
|
||||
./encode smpte.ppm 11025.wav 11025
|
||||
./encode smpte.ppm 16000.wav 16000
|
||||
./encode smpte.ppm 40000.wav 40000
|
||||
./encode smpte.ppm 44100.wav 44100
|
||||
./encode smpte.ppm 48000.wav 48000
|
||||
./debug 8000.wav 8000.ppm > 8000.dat
|
||||
./debug 11025.wav 11025.ppm > 11025.dat
|
||||
./debug 16000.wav 16000.ppm > 16000.dat
|
||||
./debug 40000.wav 40000.ppm > 40000.dat
|
||||
./debug 44100.wav 44100.ppm > 44100.dat
|
||||
./debug 48000.wav 48000.ppm > 48000.dat
|
||||
|
||||
clean:
|
||||
rm -f encode decode debug *.o {8000,11025,40000,44100,48000}.{ppm,wav,dat}
|
||||
rm -f encode decode debug *.o {8000,11025,16000,40000,44100,48000}.{ppm,wav,dat}
|
||||
|
||||
encode: encode.o mmap_file.o pcm.o wav.o alsa.o yuv.o
|
||||
|
||||
|
|
2
debug.c
2
debug.c
|
@ -92,7 +92,7 @@ int main(int argc, char **argv)
|
|||
#if DN && !UP
|
||||
int64_t factor_L = 1;
|
||||
// factor_M * step should be smaller than pixel length
|
||||
int64_t factor_M = rate * 0.088 / 320.0;
|
||||
int64_t factor_M = rate * 0.088 / 320.0 / 2;
|
||||
#endif
|
||||
#if !DN
|
||||
int64_t factor_L = 1;
|
||||
|
|
2
decode.c
2
decode.c
|
@ -121,7 +121,7 @@ int main(int argc, char **argv)
|
|||
#if DN && !UP
|
||||
int64_t factor_L = 1;
|
||||
// factor_M * step should be smaller than pixel length
|
||||
int64_t factor_M = rate * 0.088 / 320.0;
|
||||
int64_t factor_M = rate * 0.088 / 320.0 / 2;
|
||||
#endif
|
||||
#if !DN
|
||||
int64_t factor_L = 1;
|
||||
|
|
Ładowanie…
Reference in New Issue