media/libopus/celt/modes.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 /* Copyright (c) 2007-2008 CSIRO
michael@0 2 Copyright (c) 2007-2009 Xiph.Org Foundation
michael@0 3 Copyright (c) 2008 Gregory Maxwell
michael@0 4 Written by Jean-Marc Valin and Gregory Maxwell */
michael@0 5 /*
michael@0 6 Redistribution and use in source and binary forms, with or without
michael@0 7 modification, are permitted provided that the following conditions
michael@0 8 are met:
michael@0 9
michael@0 10 - Redistributions of source code must retain the above copyright
michael@0 11 notice, this list of conditions and the following disclaimer.
michael@0 12
michael@0 13 - Redistributions in binary form must reproduce the above copyright
michael@0 14 notice, this list of conditions and the following disclaimer in the
michael@0 15 documentation and/or other materials provided with the distribution.
michael@0 16
michael@0 17 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
michael@0 18 ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
michael@0 19 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
michael@0 20 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
michael@0 21 OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
michael@0 22 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
michael@0 23 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
michael@0 24 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
michael@0 25 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
michael@0 26 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
michael@0 27 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
michael@0 28 */
michael@0 29
michael@0 30 #ifndef MODES_H
michael@0 31 #define MODES_H
michael@0 32
michael@0 33 #include "opus_types.h"
michael@0 34 #include "celt.h"
michael@0 35 #include "arch.h"
michael@0 36 #include "mdct.h"
michael@0 37 #include "entenc.h"
michael@0 38 #include "entdec.h"
michael@0 39
michael@0 40 #define MAX_PERIOD 1024
michael@0 41
michael@0 42 #ifndef OVERLAP
michael@0 43 #define OVERLAP(mode) ((mode)->overlap)
michael@0 44 #endif
michael@0 45
michael@0 46 #ifndef FRAMESIZE
michael@0 47 #define FRAMESIZE(mode) ((mode)->mdctSize)
michael@0 48 #endif
michael@0 49
michael@0 50 typedef struct {
michael@0 51 int size;
michael@0 52 const opus_int16 *index;
michael@0 53 const unsigned char *bits;
michael@0 54 const unsigned char *caps;
michael@0 55 } PulseCache;
michael@0 56
michael@0 57 /** Mode definition (opaque)
michael@0 58 @brief Mode definition
michael@0 59 */
michael@0 60 struct OpusCustomMode {
michael@0 61 opus_int32 Fs;
michael@0 62 int overlap;
michael@0 63
michael@0 64 int nbEBands;
michael@0 65 int effEBands;
michael@0 66 opus_val16 preemph[4];
michael@0 67 const opus_int16 *eBands; /**< Definition for each "pseudo-critical band" */
michael@0 68
michael@0 69 int maxLM;
michael@0 70 int nbShortMdcts;
michael@0 71 int shortMdctSize;
michael@0 72
michael@0 73 int nbAllocVectors; /**< Number of lines in the matrix below */
michael@0 74 const unsigned char *allocVectors; /**< Number of bits in each band for several rates */
michael@0 75 const opus_int16 *logN;
michael@0 76
michael@0 77 const opus_val16 *window;
michael@0 78 mdct_lookup mdct;
michael@0 79 PulseCache cache;
michael@0 80 };
michael@0 81
michael@0 82
michael@0 83 #endif

mercurial