Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
michael@0 | 1 | /******************************************************************** |
michael@0 | 2 | * * |
michael@0 | 3 | * This FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * |
michael@0 | 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * |
michael@0 | 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * |
michael@0 | 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * |
michael@0 | 7 | * * |
michael@0 | 8 | * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * |
michael@0 | 9 | * by the Xiph.Org Foundation http://www.xiph.org/ * |
michael@0 | 10 | * * |
michael@0 | 11 | ******************************************************************** |
michael@0 | 12 | |
michael@0 | 13 | function: toplevel residue templates 16/22kHz |
michael@0 | 14 | last mod: $Id: residue_16.h 16962 2010-03-11 07:30:34Z xiphmont $ |
michael@0 | 15 | |
michael@0 | 16 | ********************************************************************/ |
michael@0 | 17 | |
michael@0 | 18 | /***** residue backends *********************************************/ |
michael@0 | 19 | |
michael@0 | 20 | static const static_bookblock _resbook_16s_0={ |
michael@0 | 21 | { |
michael@0 | 22 | {0}, |
michael@0 | 23 | {0,0,&_16c0_s_p1_0}, |
michael@0 | 24 | {0}, |
michael@0 | 25 | {0,0,&_16c0_s_p3_0}, |
michael@0 | 26 | {0,0,&_16c0_s_p4_0}, |
michael@0 | 27 | {0,0,&_16c0_s_p5_0}, |
michael@0 | 28 | {0,0,&_16c0_s_p6_0}, |
michael@0 | 29 | {&_16c0_s_p7_0,&_16c0_s_p7_1}, |
michael@0 | 30 | {&_16c0_s_p8_0,&_16c0_s_p8_1}, |
michael@0 | 31 | {&_16c0_s_p9_0,&_16c0_s_p9_1,&_16c0_s_p9_2} |
michael@0 | 32 | } |
michael@0 | 33 | }; |
michael@0 | 34 | static const static_bookblock _resbook_16s_1={ |
michael@0 | 35 | { |
michael@0 | 36 | {0}, |
michael@0 | 37 | {0,0,&_16c1_s_p1_0}, |
michael@0 | 38 | {0}, |
michael@0 | 39 | {0,0,&_16c1_s_p3_0}, |
michael@0 | 40 | {0,0,&_16c1_s_p4_0}, |
michael@0 | 41 | {0,0,&_16c1_s_p5_0}, |
michael@0 | 42 | {0,0,&_16c1_s_p6_0}, |
michael@0 | 43 | {&_16c1_s_p7_0,&_16c1_s_p7_1}, |
michael@0 | 44 | {&_16c1_s_p8_0,&_16c1_s_p8_1}, |
michael@0 | 45 | {&_16c1_s_p9_0,&_16c1_s_p9_1,&_16c1_s_p9_2} |
michael@0 | 46 | } |
michael@0 | 47 | }; |
michael@0 | 48 | static const static_bookblock _resbook_16s_2={ |
michael@0 | 49 | { |
michael@0 | 50 | {0}, |
michael@0 | 51 | {0,0,&_16c2_s_p1_0}, |
michael@0 | 52 | {0,0,&_16c2_s_p2_0}, |
michael@0 | 53 | {0,0,&_16c2_s_p3_0}, |
michael@0 | 54 | {0,0,&_16c2_s_p4_0}, |
michael@0 | 55 | {&_16c2_s_p5_0,&_16c2_s_p5_1}, |
michael@0 | 56 | {&_16c2_s_p6_0,&_16c2_s_p6_1}, |
michael@0 | 57 | {&_16c2_s_p7_0,&_16c2_s_p7_1}, |
michael@0 | 58 | {&_16c2_s_p8_0,&_16c2_s_p8_1}, |
michael@0 | 59 | {&_16c2_s_p9_0,&_16c2_s_p9_1,&_16c2_s_p9_2} |
michael@0 | 60 | } |
michael@0 | 61 | }; |
michael@0 | 62 | |
michael@0 | 63 | static const vorbis_residue_template _res_16s_0[]={ |
michael@0 | 64 | {2,0,32, &_residue_44_mid, |
michael@0 | 65 | &_huff_book__16c0_s_single,&_huff_book__16c0_s_single, |
michael@0 | 66 | &_resbook_16s_0,&_resbook_16s_0}, |
michael@0 | 67 | }; |
michael@0 | 68 | static const vorbis_residue_template _res_16s_1[]={ |
michael@0 | 69 | {2,0,32, &_residue_44_mid, |
michael@0 | 70 | &_huff_book__16c1_s_short,&_huff_book__16c1_s_short, |
michael@0 | 71 | &_resbook_16s_1,&_resbook_16s_1}, |
michael@0 | 72 | |
michael@0 | 73 | {2,0,32, &_residue_44_mid, |
michael@0 | 74 | &_huff_book__16c1_s_long,&_huff_book__16c1_s_long, |
michael@0 | 75 | &_resbook_16s_1,&_resbook_16s_1} |
michael@0 | 76 | }; |
michael@0 | 77 | static const vorbis_residue_template _res_16s_2[]={ |
michael@0 | 78 | {2,0,32, &_residue_44_high, |
michael@0 | 79 | &_huff_book__16c2_s_short,&_huff_book__16c2_s_short, |
michael@0 | 80 | &_resbook_16s_2,&_resbook_16s_2}, |
michael@0 | 81 | |
michael@0 | 82 | {2,0,32, &_residue_44_high, |
michael@0 | 83 | &_huff_book__16c2_s_long,&_huff_book__16c2_s_long, |
michael@0 | 84 | &_resbook_16s_2,&_resbook_16s_2} |
michael@0 | 85 | }; |
michael@0 | 86 | |
michael@0 | 87 | static const vorbis_mapping_template _mapres_template_16_stereo[3]={ |
michael@0 | 88 | { _map_nominal, _res_16s_0 }, /* 0 */ |
michael@0 | 89 | { _map_nominal, _res_16s_1 }, /* 1 */ |
michael@0 | 90 | { _map_nominal, _res_16s_2 }, /* 2 */ |
michael@0 | 91 | }; |
michael@0 | 92 | |
michael@0 | 93 | static const static_bookblock _resbook_16u_0={ |
michael@0 | 94 | { |
michael@0 | 95 | {0}, |
michael@0 | 96 | {0,0,&_16u0__p1_0}, |
michael@0 | 97 | {0,0,&_16u0__p2_0}, |
michael@0 | 98 | {0,0,&_16u0__p3_0}, |
michael@0 | 99 | {0,0,&_16u0__p4_0}, |
michael@0 | 100 | {0,0,&_16u0__p5_0}, |
michael@0 | 101 | {&_16u0__p6_0,&_16u0__p6_1}, |
michael@0 | 102 | {&_16u0__p7_0,&_16u0__p7_1,&_16u0__p7_2} |
michael@0 | 103 | } |
michael@0 | 104 | }; |
michael@0 | 105 | static const static_bookblock _resbook_16u_1={ |
michael@0 | 106 | { |
michael@0 | 107 | {0}, |
michael@0 | 108 | {0,0,&_16u1__p1_0}, |
michael@0 | 109 | {0,0,&_16u1__p2_0}, |
michael@0 | 110 | {0,0,&_16u1__p3_0}, |
michael@0 | 111 | {0,0,&_16u1__p4_0}, |
michael@0 | 112 | {0,0,&_16u1__p5_0}, |
michael@0 | 113 | {0,0,&_16u1__p6_0}, |
michael@0 | 114 | {&_16u1__p7_0,&_16u1__p7_1}, |
michael@0 | 115 | {&_16u1__p8_0,&_16u1__p8_1}, |
michael@0 | 116 | {&_16u1__p9_0,&_16u1__p9_1,&_16u1__p9_2} |
michael@0 | 117 | } |
michael@0 | 118 | }; |
michael@0 | 119 | static const static_bookblock _resbook_16u_2={ |
michael@0 | 120 | { |
michael@0 | 121 | {0}, |
michael@0 | 122 | {0,0,&_16u2_p1_0}, |
michael@0 | 123 | {0,0,&_16u2_p2_0}, |
michael@0 | 124 | {0,0,&_16u2_p3_0}, |
michael@0 | 125 | {0,0,&_16u2_p4_0}, |
michael@0 | 126 | {&_16u2_p5_0,&_16u2_p5_1}, |
michael@0 | 127 | {&_16u2_p6_0,&_16u2_p6_1}, |
michael@0 | 128 | {&_16u2_p7_0,&_16u2_p7_1}, |
michael@0 | 129 | {&_16u2_p8_0,&_16u2_p8_1}, |
michael@0 | 130 | {&_16u2_p9_0,&_16u2_p9_1,&_16u2_p9_2} |
michael@0 | 131 | } |
michael@0 | 132 | }; |
michael@0 | 133 | |
michael@0 | 134 | static const vorbis_residue_template _res_16u_0[]={ |
michael@0 | 135 | {1,0,32, &_residue_44_low_un, |
michael@0 | 136 | &_huff_book__16u0__single,&_huff_book__16u0__single, |
michael@0 | 137 | &_resbook_16u_0,&_resbook_16u_0}, |
michael@0 | 138 | }; |
michael@0 | 139 | static const vorbis_residue_template _res_16u_1[]={ |
michael@0 | 140 | {1,0,32, &_residue_44_mid_un, |
michael@0 | 141 | &_huff_book__16u1__short,&_huff_book__16u1__short, |
michael@0 | 142 | &_resbook_16u_1,&_resbook_16u_1}, |
michael@0 | 143 | |
michael@0 | 144 | {1,0,32, &_residue_44_mid_un, |
michael@0 | 145 | &_huff_book__16u1__long,&_huff_book__16u1__long, |
michael@0 | 146 | &_resbook_16u_1,&_resbook_16u_1} |
michael@0 | 147 | }; |
michael@0 | 148 | static const vorbis_residue_template _res_16u_2[]={ |
michael@0 | 149 | {1,0,32, &_residue_44_hi_un, |
michael@0 | 150 | &_huff_book__16u2__short,&_huff_book__16u2__short, |
michael@0 | 151 | &_resbook_16u_2,&_resbook_16u_2}, |
michael@0 | 152 | |
michael@0 | 153 | {1,0,32, &_residue_44_hi_un, |
michael@0 | 154 | &_huff_book__16u2__long,&_huff_book__16u2__long, |
michael@0 | 155 | &_resbook_16u_2,&_resbook_16u_2} |
michael@0 | 156 | }; |
michael@0 | 157 | |
michael@0 | 158 | |
michael@0 | 159 | static const vorbis_mapping_template _mapres_template_16_uncoupled[3]={ |
michael@0 | 160 | { _map_nominal_u, _res_16u_0 }, /* 0 */ |
michael@0 | 161 | { _map_nominal_u, _res_16u_1 }, /* 1 */ |
michael@0 | 162 | { _map_nominal_u, _res_16u_2 }, /* 2 */ |
michael@0 | 163 | }; |