Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--libcelt/dump_modes/Makefile10
-rw-r--r--libcelt/dump_modes/dump_modes.c (renamed from libcelt/dump_modes.c)8
3 files changed, 15 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
index cabeba67..7f9475fb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -30,4 +30,4 @@ tools/celtdec
tools/celtenc
celt.pc
libcelt.spec
-libcelt/dump_modes
+libcelt/dump_modes/dump_modes
diff --git a/libcelt/dump_modes/Makefile b/libcelt/dump_modes/Makefile
new file mode 100644
index 00000000..3993f533
--- /dev/null
+++ b/libcelt/dump_modes/Makefile
@@ -0,0 +1,10 @@
+CFLAGS=-O2 -Wall -Wextra -DHAVE_CONFIG_H
+INCLUDES=-I../ -I../../
+
+all: dump_modes
+
+dump_modes:
+ $(CC) $(CFLAGS) $(INCLUDES) -DCUSTOM_MODES dump_modes.c ../modes.c ../cwrs.c ../rate.c ../entenc.c ../entdec.c ../mathops.c ../mdct.c ../kiss_fft.c -o dump_modes -lm
+
+clean:
+ rm -f dump_modes
diff --git a/libcelt/dump_modes.c b/libcelt/dump_modes/dump_modes.c
index 359ced9e..ab37ac78 100644
--- a/libcelt/dump_modes.c
+++ b/libcelt/dump_modes/dump_modes.c
@@ -299,9 +299,9 @@ int main(int argc, char **argv)
int i, nb;
FILE *file;
CELTMode **m;
- if (argc%2 != 1)
+ if (argc%2 != 1 || argc<3)
{
- fprintf (stderr, "must have a multiple of 2 arguments\n");
+ fprintf (stderr, "Usage: %s rate frame_size [rate frame_size] [rate frame_size]...\n",argv[0]);
return 1;
}
nb = (argc-1)/2;
@@ -311,7 +311,7 @@ int main(int argc, char **argv)
int Fs, frame;
Fs = atoi(argv[2*i+1]);
frame = atoi(argv[2*i+2]);
- m[i] = celt_mode_create(Fs, frame, NULL);
+ m[i] = opus_custom_mode_create(Fs, frame, NULL);
if (m[i]==NULL)
{
fprintf(stderr,"Error creating mode with Fs=%s, frame_size=%s\n",
@@ -323,7 +323,7 @@ int main(int argc, char **argv)
dump_modes(file, m, nb);
fclose(file);
for (i=0;i<nb;i++)
- celt_mode_destroy(m[i]);
+ opus_custom_mode_destroy(m[i]);
free(m);
return 0;
}