aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2024-02-18 13:57:18 -0500
committerJean-Marc Valin <jmvalin@jmvalin.ca>2024-02-18 13:57:18 -0500
commit5eeb5766718c32db20680cfc5ce7cee068df84f3 (patch)
tree4a85a38da002ee907b87d55b5fa3792d4eec007e
parent393d463fdd6d17f3fef126a019102694ad89e2f7 (diff)
downloadlibopus-5eeb5766718c32db20680cfc5ce7cee068df84f3.tar.gz
Instructions for reusing loss simulator
-rw-r--r--dnn/lossgen.c50
-rw-r--r--dnn/lossgen.h26
2 files changed, 76 insertions, 0 deletions
diff --git a/dnn/lossgen.c b/dnn/lossgen.c
index 4730e697..308e24c0 100644
--- a/dnn/lossgen.c
+++ b/dnn/lossgen.c
@@ -1,3 +1,53 @@
+/* Copyright (c) 2023 Amazon */
+/*
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/* This packet loss simulator can be used independently of the Opus codebase.
+ Do do that, you need to compile the following files:
+ dnn/lossgen.c
+ dnn/lossgen_data.c
+
+ To to that, the following files are needed as #include
+ dnn/lossgen_data.h
+ dnn/lossgen.h
+ dnn/nnet_arch.h
+ dnn/nnet.h
+ dnn/parse_lpcnet_weights.c (included despite being a C file)
+ dnn/vec_avx.h
+ dnn/vec.h
+ celt/os_support.h
+ celt/arch.h
+ celt/x86/x86_arch_macros.h
+ include/opus_defines.h
+ include/opus_types.h
+
+
+ Additionally, the code in dnn/lossgen_demo.c can be used to generate losses from
+ the command line.
+*/
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/dnn/lossgen.h b/dnn/lossgen.h
index 06b771de..3b704ec3 100644
--- a/dnn/lossgen.h
+++ b/dnn/lossgen.h
@@ -1,3 +1,29 @@
+/* Copyright (c) 2023 Amazon */
+/*
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
#ifndef LOSSGEN_H
#define LOSSGEN_H