media/libopus/celt/quant_bands.h

Thu, 15 Jan 2015 15:59:08 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:59:08 +0100
branch
TOR_BUG_9701
changeset 10
ac0c01689b40
permissions
-rw-r--r--

Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 /* Copyright (c) 2007-2008 CSIRO
     2    Copyright (c) 2007-2009 Xiph.Org Foundation
     3    Written by Jean-Marc Valin */
     4 /*
     5    Redistribution and use in source and binary forms, with or without
     6    modification, are permitted provided that the following conditions
     7    are met:
     9    - Redistributions of source code must retain the above copyright
    10    notice, this list of conditions and the following disclaimer.
    12    - Redistributions in binary form must reproduce the above copyright
    13    notice, this list of conditions and the following disclaimer in the
    14    documentation and/or other materials provided with the distribution.
    16    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    17    ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    18    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    19    A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
    20    OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    21    EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
    22    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
    23    PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
    24    LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
    25    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    26    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    27 */
    29 #ifndef QUANT_BANDS
    30 #define QUANT_BANDS
    32 #include "arch.h"
    33 #include "modes.h"
    34 #include "entenc.h"
    35 #include "entdec.h"
    36 #include "mathops.h"
    38 #ifdef FIXED_POINT
    39 extern const signed char eMeans[25];
    40 #else
    41 extern const opus_val16 eMeans[25];
    42 #endif
    44 void amp2Log2(const CELTMode *m, int effEnd, int end,
    45       celt_ener *bandE, opus_val16 *bandLogE, int C);
    47 void log2Amp(const CELTMode *m, int start, int end,
    48       celt_ener *eBands, const opus_val16 *oldEBands, int C);
    50 void quant_coarse_energy(const CELTMode *m, int start, int end, int effEnd,
    51       const opus_val16 *eBands, opus_val16 *oldEBands, opus_uint32 budget,
    52       opus_val16 *error, ec_enc *enc, int C, int LM,
    53       int nbAvailableBytes, int force_intra, opus_val32 *delayedIntra,
    54       int two_pass, int loss_rate, int lfe);
    56 void quant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, opus_val16 *error, int *fine_quant, ec_enc *enc, int C);
    58 void quant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 *oldEBands, opus_val16 *error, int *fine_quant, int *fine_priority, int bits_left, ec_enc *enc, int C);
    60 void unquant_coarse_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int intra, ec_dec *dec, int C, int LM);
    62 void unquant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int *fine_quant, ec_dec *dec, int C);
    64 void unquant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int *fine_quant, int *fine_priority, int bits_left, ec_dec *dec, int C);
    66 #endif /* QUANT_BANDS */

mercurial