summaryrefslogtreecommitdiff
path: root/libavcodec/nellymoser.h
diff options
context:
space:
mode:
authorBartlomiej Wolowiec <bartek.wolowiec@gmail.com>2008-06-08 20:45:18 +0000
committerBartlomiej Wolowiec <bartek.wolowiec@gmail.com>2008-06-08 20:45:18 +0000
commit681f5c1271304d14f1825d32bdf30a3c83029d59 (patch)
treeb238f626d064cbd5d9fe65ca744f4f70891469a7 /libavcodec/nellymoser.h
parentb339f0c6be5f4c15d8136ef180b148550f0071cf (diff)
Separating from nellymoserdec.c parts required by encoder
Originally committed as revision 13713 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/nellymoser.h')
-rw-r--r--libavcodec/nellymoser.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/libavcodec/nellymoser.h b/libavcodec/nellymoser.h
new file mode 100644
index 0000000000..4f415dedb9
--- /dev/null
+++ b/libavcodec/nellymoser.h
@@ -0,0 +1,57 @@
+/*
+ * Common code between Nellymoser encoder and decoder
+ * Copyright (c) 2007 a840bda5870ba11f19698ff6eb9581dfb0f95fa5,
+ * 539459aeb7d425140b62a3ec7dbf6dc8e408a306, and
+ * 520e17cd55896441042b14df2566a6eb610ed444
+ * Copyright (c) 2007 Loic Minier <lool at dooz.org>
+ * Benjamin Larsson
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * @file nellymoser.h
+ * The 3 alphanumeric copyright notices are md5summed they are from the original
+ * implementors. The original code is available from http://code.google.com/p/nelly2pcm/
+ */
+
+#ifndef FFMPEG_NELLYMOSER_H
+#define FFMPEG_NELLYMOSER_H
+
+#include "avcodec.h"
+
+#define NELLY_BANDS 23
+#define NELLY_BLOCK_LEN 64
+#define NELLY_HEADER_BITS 116
+#define NELLY_DETAIL_BITS 198
+#define NELLY_BUF_LEN 128
+#define NELLY_FILL_LEN 124
+#define NELLY_BIT_CAP 6
+#define NELLY_BASE_OFF 4228
+#define NELLY_BASE_SHIFT 19
+#define NELLY_SAMPLES (2 * NELLY_BUF_LEN)
+
+extern const float ff_nelly_dequantization_table[127];
+extern const uint8_t ff_nelly_band_sizes_table[NELLY_BANDS];
+extern const uint16_t ff_nelly_init_table[64];
+extern const int16_t ff_nelly_delta_table[32];
+
+void ff_nelly_get_sample_bits(const float *buf, int *bits);
+
+#endif