Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
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-2007 * |
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 8/11kHz |
michael@0 | 14 | last mod: $Id: residue_8.h 16962 2010-03-11 07:30:34Z xiphmont $ |
michael@0 | 15 | |
michael@0 | 16 | ********************************************************************/ |
michael@0 | 17 | |
michael@0 | 18 | #include "vorbis/codec.h" |
michael@0 | 19 | #include "backends.h" |
michael@0 | 20 | |
michael@0 | 21 | /***** residue backends *********************************************/ |
michael@0 | 22 | |
michael@0 | 23 | static const static_bookblock _resbook_8s_0={ |
michael@0 | 24 | { |
michael@0 | 25 | {0}, |
michael@0 | 26 | {0,0,&_8c0_s_p1_0}, |
michael@0 | 27 | {0}, |
michael@0 | 28 | {0,0,&_8c0_s_p3_0}, |
michael@0 | 29 | {0,0,&_8c0_s_p4_0}, |
michael@0 | 30 | {0,0,&_8c0_s_p5_0}, |
michael@0 | 31 | {0,0,&_8c0_s_p6_0}, |
michael@0 | 32 | {&_8c0_s_p7_0,&_8c0_s_p7_1}, |
michael@0 | 33 | {&_8c0_s_p8_0,&_8c0_s_p8_1}, |
michael@0 | 34 | {&_8c0_s_p9_0,&_8c0_s_p9_1,&_8c0_s_p9_2} |
michael@0 | 35 | } |
michael@0 | 36 | }; |
michael@0 | 37 | static const static_bookblock _resbook_8s_1={ |
michael@0 | 38 | { |
michael@0 | 39 | {0}, |
michael@0 | 40 | {0,0,&_8c1_s_p1_0}, |
michael@0 | 41 | {0}, |
michael@0 | 42 | {0,0,&_8c1_s_p3_0}, |
michael@0 | 43 | {0,0,&_8c1_s_p4_0}, |
michael@0 | 44 | {0,0,&_8c1_s_p5_0}, |
michael@0 | 45 | {0,0,&_8c1_s_p6_0}, |
michael@0 | 46 | {&_8c1_s_p7_0,&_8c1_s_p7_1}, |
michael@0 | 47 | {&_8c1_s_p8_0,&_8c1_s_p8_1}, |
michael@0 | 48 | {&_8c1_s_p9_0,&_8c1_s_p9_1,&_8c1_s_p9_2} |
michael@0 | 49 | } |
michael@0 | 50 | }; |
michael@0 | 51 | |
michael@0 | 52 | static const vorbis_residue_template _res_8s_0[]={ |
michael@0 | 53 | {2,0,32, &_residue_44_mid, |
michael@0 | 54 | &_huff_book__8c0_s_single,&_huff_book__8c0_s_single, |
michael@0 | 55 | &_resbook_8s_0,&_resbook_8s_0}, |
michael@0 | 56 | }; |
michael@0 | 57 | static const vorbis_residue_template _res_8s_1[]={ |
michael@0 | 58 | {2,0,32, &_residue_44_mid, |
michael@0 | 59 | &_huff_book__8c1_s_single,&_huff_book__8c1_s_single, |
michael@0 | 60 | &_resbook_8s_1,&_resbook_8s_1}, |
michael@0 | 61 | }; |
michael@0 | 62 | |
michael@0 | 63 | static const vorbis_mapping_template _mapres_template_8_stereo[2]={ |
michael@0 | 64 | { _map_nominal, _res_8s_0 }, /* 0 */ |
michael@0 | 65 | { _map_nominal, _res_8s_1 }, /* 1 */ |
michael@0 | 66 | }; |
michael@0 | 67 | |
michael@0 | 68 | static const static_bookblock _resbook_8u_0={ |
michael@0 | 69 | { |
michael@0 | 70 | {0}, |
michael@0 | 71 | {0,0,&_8u0__p1_0}, |
michael@0 | 72 | {0,0,&_8u0__p2_0}, |
michael@0 | 73 | {0,0,&_8u0__p3_0}, |
michael@0 | 74 | {0,0,&_8u0__p4_0}, |
michael@0 | 75 | {0,0,&_8u0__p5_0}, |
michael@0 | 76 | {&_8u0__p6_0,&_8u0__p6_1}, |
michael@0 | 77 | {&_8u0__p7_0,&_8u0__p7_1,&_8u0__p7_2} |
michael@0 | 78 | } |
michael@0 | 79 | }; |
michael@0 | 80 | static const static_bookblock _resbook_8u_1={ |
michael@0 | 81 | { |
michael@0 | 82 | {0}, |
michael@0 | 83 | {0,0,&_8u1__p1_0}, |
michael@0 | 84 | {0,0,&_8u1__p2_0}, |
michael@0 | 85 | {0,0,&_8u1__p3_0}, |
michael@0 | 86 | {0,0,&_8u1__p4_0}, |
michael@0 | 87 | {0,0,&_8u1__p5_0}, |
michael@0 | 88 | {0,0,&_8u1__p6_0}, |
michael@0 | 89 | {&_8u1__p7_0,&_8u1__p7_1}, |
michael@0 | 90 | {&_8u1__p8_0,&_8u1__p8_1}, |
michael@0 | 91 | {&_8u1__p9_0,&_8u1__p9_1,&_8u1__p9_2} |
michael@0 | 92 | } |
michael@0 | 93 | }; |
michael@0 | 94 | |
michael@0 | 95 | static const vorbis_residue_template _res_8u_0[]={ |
michael@0 | 96 | {1,0,32, &_residue_44_low_un, |
michael@0 | 97 | &_huff_book__8u0__single,&_huff_book__8u0__single, |
michael@0 | 98 | &_resbook_8u_0,&_resbook_8u_0}, |
michael@0 | 99 | }; |
michael@0 | 100 | static const vorbis_residue_template _res_8u_1[]={ |
michael@0 | 101 | {1,0,32, &_residue_44_mid_un, |
michael@0 | 102 | &_huff_book__8u1__single,&_huff_book__8u1__single, |
michael@0 | 103 | &_resbook_8u_1,&_resbook_8u_1}, |
michael@0 | 104 | }; |
michael@0 | 105 | |
michael@0 | 106 | static const vorbis_mapping_template _mapres_template_8_uncoupled[2]={ |
michael@0 | 107 | { _map_nominal_u, _res_8u_0 }, /* 0 */ |
michael@0 | 108 | { _map_nominal_u, _res_8u_1 }, /* 1 */ |
michael@0 | 109 | }; |