Path: blob/master/thirdparty/libvorbis/modes/residue_44p51.h
9902 views
/********************************************************************1* *2* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *3* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *4* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *5* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *6* *7* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2010 *8* by the Xiph.Org Foundation https://xiph.org/ *9* *10********************************************************************1112function: toplevel residue templates for 32/44.1/48kHz uncoupled1314********************************************************************/1516#include "vorbis/codec.h"17#include "backends.h"1819#include "books/coupled/res_books_51.h"2021/***** residue backends *********************************************/2223static const vorbis_info_residue0 _residue_44p_lo={240,-1, -1, 7,-1,-1,25/* 0 1 2 3 4 5 6 7 8 */26{0},27{-1},28{ 0, 1, 2, 7, 17, 31},29{ 0, 0, 99, 7, 17, 31},30};3132static const vorbis_info_residue0 _residue_44p={330,-1, -1, 8,-1,-1,34/* 0 1 2 3 4 5 6 7 8 */35{0},36{-1},37{ 0, 1, 1, 2, 7, 17, 31},38{ 0, 0, 99, 99, 7, 17, 31},39};4041static const vorbis_info_residue0 _residue_44p_hi={420,-1, -1, 8,-1,-1,43/* 0 1 2 3 4 5 6 7 8 */44{0},45{-1},46{ 0, 1, 2, 4, 7, 17, 31},47{ 0, 1, 2, 4, 7, 17, 31},48};4950static const vorbis_info_residue0 _residue_44p_lfe={510,-1, -1, 2,-1,-1,52/* 0 1 2 3 4 5 6 7 8 */53{0},54{-1},55{ 32},56{ -1}57};5859static const static_bookblock _resbook_44p_n1={60{61{0},62{0,&_44pn1_p1_0},6364{&_44pn1_p2_0,&_44pn1_p2_1,0},65{&_44pn1_p3_0,&_44pn1_p3_1,0},66{&_44pn1_p4_0,&_44pn1_p4_1,0},6768{&_44pn1_p5_0,&_44pn1_p5_1,&_44pn1_p4_1},69{&_44pn1_p6_0,&_44pn1_p6_1,&_44pn1_p6_2},70}71};7273static const static_bookblock _resbook_44p_0={74{75{0},76{0,&_44p0_p1_0},7778{&_44p0_p2_0,&_44p0_p2_1,0},79{&_44p0_p3_0,&_44p0_p3_1,0},80{&_44p0_p4_0,&_44p0_p4_1,0},8182{&_44p0_p5_0,&_44p0_p5_1,&_44p0_p4_1},83{&_44p0_p6_0,&_44p0_p6_1,&_44p0_p6_2},84}85};8687static const static_bookblock _resbook_44p_1={88{89{0},90{0,&_44p1_p1_0},9192{&_44p1_p2_0,&_44p1_p2_1,0},93{&_44p1_p3_0,&_44p1_p3_1,0},94{&_44p1_p4_0,&_44p1_p4_1,0},9596{&_44p1_p5_0,&_44p1_p5_1,&_44p1_p4_1},97{&_44p1_p6_0,&_44p1_p6_1,&_44p1_p6_2},98}99};100101static const static_bookblock _resbook_44p_2={102{103{0},104{0,0,&_44p2_p1_0},105{0,&_44p2_p2_0,0},106107{&_44p2_p3_0,&_44p2_p3_1,0},108{&_44p2_p4_0,&_44p2_p4_1,0},109{&_44p2_p5_0,&_44p2_p5_1,0},110111{&_44p2_p6_0,&_44p2_p6_1,&_44p2_p5_1},112{&_44p2_p7_0,&_44p2_p7_1,&_44p2_p7_2,&_44p2_p7_3}113}114};115static const static_bookblock _resbook_44p_3={116{117{0},118{0,0,&_44p3_p1_0},119{0,&_44p3_p2_0,0},120121{&_44p3_p3_0,&_44p3_p3_1,0},122{&_44p3_p4_0,&_44p3_p4_1,0},123{&_44p3_p5_0,&_44p3_p5_1,0},124125{&_44p3_p6_0,&_44p3_p6_1,&_44p3_p5_1},126{&_44p3_p7_0,&_44p3_p7_1,&_44p3_p7_2,&_44p3_p7_3}127}128};129static const static_bookblock _resbook_44p_4={130{131{0},132{0,0,&_44p4_p1_0},133{0,&_44p4_p2_0,0},134135{&_44p4_p3_0,&_44p4_p3_1,0},136{&_44p4_p4_0,&_44p4_p4_1,0},137{&_44p4_p5_0,&_44p4_p5_1,0},138139{&_44p4_p6_0,&_44p4_p6_1,&_44p4_p5_1},140{&_44p4_p7_0,&_44p4_p7_1,&_44p4_p7_2,&_44p4_p7_3}141}142};143static const static_bookblock _resbook_44p_5={144{145{0},146{0,0,&_44p5_p1_0},147{0,&_44p5_p2_0,0},148149{&_44p5_p3_0,&_44p5_p3_1,0},150{&_44p5_p4_0,&_44p5_p4_1,0},151{&_44p5_p5_0,&_44p5_p5_1,0},152153{&_44p5_p6_0,&_44p5_p6_1,&_44p5_p5_1},154{&_44p5_p7_0,&_44p5_p7_1,&_44p5_p7_2,&_44p5_p7_3}155}156};157static const static_bookblock _resbook_44p_6={158{159{0},160{0,0,&_44p6_p1_0},161{0,&_44p6_p2_0,0},162163{&_44p6_p3_0,&_44p6_p3_1,0},164{&_44p6_p4_0,&_44p6_p4_1,0},165{&_44p6_p5_0,&_44p6_p5_1,0},166167{&_44p6_p6_0,&_44p6_p6_1,&_44p6_p5_1},168{&_44p6_p7_0,&_44p6_p7_1,&_44p6_p7_2,&_44p6_p7_3}169}170};171static const static_bookblock _resbook_44p_7={172{173{0},174{0,0,&_44p7_p1_0},175{0,&_44p7_p2_0,0},176177{&_44p7_p3_0,&_44p7_p3_1,0},178{&_44p7_p4_0,&_44p7_p4_1,0},179{&_44p7_p5_0,&_44p7_p5_1,0},180181{&_44p7_p6_0,&_44p7_p6_1,&_44p7_p5_1},182{&_44p7_p7_0,&_44p7_p7_1,&_44p7_p7_2,&_44p7_p7_3}183}184};185static const static_bookblock _resbook_44p_8={186{187{0},188{0,0,&_44p8_p1_0},189{0,&_44p8_p2_0,0},190191{&_44p8_p3_0,&_44p8_p3_1,0},192{&_44p8_p4_0,&_44p8_p4_1,0},193{&_44p8_p5_0,&_44p8_p5_1,0},194195{&_44p8_p6_0,&_44p8_p6_1,&_44p8_p5_1},196{&_44p8_p7_0,&_44p8_p7_1,&_44p8_p7_2,&_44p8_p7_3}197}198};199static const static_bookblock _resbook_44p_9={200{201{0},202{0,0,&_44p9_p1_0},203{0,&_44p9_p2_0,0},204205{&_44p9_p3_0,&_44p9_p3_1,0},206{&_44p9_p4_0,&_44p9_p4_1,0},207{&_44p9_p5_0,&_44p9_p5_1,0},208209{&_44p9_p6_0,&_44p9_p6_1,&_44p9_p5_1},210{&_44p9_p7_0,&_44p9_p7_1,&_44p9_p7_2,&_44p9_p7_3}211}212};213214static const static_bookblock _resbook_44p_ln1={215{216{&_44pn1_l0_0,&_44pn1_l0_1,0},217{&_44pn1_l1_0,&_44pn1_p6_1,&_44pn1_p6_2},218}219};220static const static_bookblock _resbook_44p_l0={221{222{&_44p0_l0_0,&_44p0_l0_1,0},223{&_44p0_l1_0,&_44p0_p6_1,&_44p0_p6_2},224}225};226static const static_bookblock _resbook_44p_l1={227{228{&_44p1_l0_0,&_44p1_l0_1,0},229{&_44p1_l1_0,&_44p1_p6_1,&_44p1_p6_2},230}231};232static const static_bookblock _resbook_44p_l2={233{234{&_44p2_l0_0,&_44p2_l0_1,0},235{&_44p2_l1_0,&_44p2_p7_2,&_44p2_p7_3},236}237};238static const static_bookblock _resbook_44p_l3={239{240{&_44p3_l0_0,&_44p3_l0_1,0},241{&_44p3_l1_0,&_44p3_p7_2,&_44p3_p7_3},242}243};244static const static_bookblock _resbook_44p_l4={245{246{&_44p4_l0_0,&_44p4_l0_1,0},247{&_44p4_l1_0,&_44p4_p7_2,&_44p4_p7_3},248}249};250static const static_bookblock _resbook_44p_l5={251{252{&_44p5_l0_0,&_44p5_l0_1,0},253{&_44p5_l1_0,&_44p5_p7_2,&_44p5_p7_3},254}255};256static const static_bookblock _resbook_44p_l6={257{258{&_44p6_l0_0,&_44p6_l0_1,0},259{&_44p6_l1_0,&_44p6_p7_2,&_44p6_p7_3},260}261};262static const static_bookblock _resbook_44p_l7={263{264{&_44p7_l0_0,&_44p7_l0_1,0},265{&_44p7_l1_0,&_44p7_p7_2,&_44p7_p7_3},266}267};268static const static_bookblock _resbook_44p_l8={269{270{&_44p8_l0_0,&_44p8_l0_1,0},271{&_44p8_l1_0,&_44p8_p7_2,&_44p8_p7_3},272}273};274static const static_bookblock _resbook_44p_l9={275{276{&_44p9_l0_0,&_44p9_l0_1,0},277{&_44p9_l1_0,&_44p9_p7_2,&_44p9_p7_3},278}279};280281282static const vorbis_info_mapping0 _map_nominal_51[2]={283{2, {0,0,0,0,0,1}, {0,2}, {0,2}, 4,{0,3,0,0},{2,4,1,3}},284{2, {0,0,0,0,0,1}, {1,2}, {1,2}, 4,{0,3,0,0},{2,4,1,3}}285};286static const vorbis_info_mapping0 _map_nominal_51u[2]={287{2, {0,0,0,0,0,1}, {0,2}, {0,2}, 0,{0},{0}},288{2, {0,0,0,0,0,1}, {1,2}, {1,2}, 0,{0},{0}}289};290291static const vorbis_residue_template _res_44p51_n1[]={292{2,0,30, &_residue_44p_lo,293&_huff_book__44pn1_short,&_huff_book__44pn1_short,294&_resbook_44p_n1,&_resbook_44p_n1},295296{2,0,30, &_residue_44p_lo,297&_huff_book__44pn1_long,&_huff_book__44pn1_long,298&_resbook_44p_n1,&_resbook_44p_n1},299300{1,2,6, &_residue_44p_lfe,301&_huff_book__44pn1_lfe,&_huff_book__44pn1_lfe,302&_resbook_44p_ln1,&_resbook_44p_ln1}303};304static const vorbis_residue_template _res_44p51_0[]={305{2,0,15, &_residue_44p_lo,306&_huff_book__44p0_short,&_huff_book__44p0_short,307&_resbook_44p_0,&_resbook_44p_0},308309{2,0,30, &_residue_44p_lo,310&_huff_book__44p0_long,&_huff_book__44p0_long,311&_resbook_44p_0,&_resbook_44p_0},312313{1,2,6, &_residue_44p_lfe,314&_huff_book__44p0_lfe,&_huff_book__44p0_lfe,315&_resbook_44p_l0,&_resbook_44p_l0}316};317static const vorbis_residue_template _res_44p51_1[]={318{2,0,15, &_residue_44p_lo,319&_huff_book__44p1_short,&_huff_book__44p1_short,320&_resbook_44p_1,&_resbook_44p_1},321322{2,0,30, &_residue_44p_lo,323&_huff_book__44p1_long,&_huff_book__44p1_long,324&_resbook_44p_1,&_resbook_44p_1},325326{1,2,6, &_residue_44p_lfe,327&_huff_book__44p1_lfe,&_huff_book__44p1_lfe,328&_resbook_44p_l1,&_resbook_44p_l1}329};330static const vorbis_residue_template _res_44p51_2[]={331{2,0,15, &_residue_44p,332&_huff_book__44p2_short,&_huff_book__44p2_short,333&_resbook_44p_2,&_resbook_44p_2},334335{2,0,30, &_residue_44p,336&_huff_book__44p2_long,&_huff_book__44p2_long,337&_resbook_44p_2,&_resbook_44p_2},338339{1,2,6, &_residue_44p_lfe,340&_huff_book__44p2_lfe,&_huff_book__44p2_lfe,341&_resbook_44p_l2,&_resbook_44p_l2}342};343static const vorbis_residue_template _res_44p51_3[]={344{2,0,15, &_residue_44p,345&_huff_book__44p3_short,&_huff_book__44p3_short,346&_resbook_44p_3,&_resbook_44p_3},347348{2,0,30, &_residue_44p,349&_huff_book__44p3_long,&_huff_book__44p3_long,350&_resbook_44p_3,&_resbook_44p_3},351352{1,2,6, &_residue_44p_lfe,353&_huff_book__44p3_lfe,&_huff_book__44p3_lfe,354&_resbook_44p_l3,&_resbook_44p_l3}355};356static const vorbis_residue_template _res_44p51_4[]={357{2,0,15, &_residue_44p,358&_huff_book__44p4_short,&_huff_book__44p4_short,359&_resbook_44p_4,&_resbook_44p_4},360361{2,0,30, &_residue_44p,362&_huff_book__44p4_long,&_huff_book__44p4_long,363&_resbook_44p_4,&_resbook_44p_4},364365{1,2,6, &_residue_44p_lfe,366&_huff_book__44p4_lfe,&_huff_book__44p4_lfe,367&_resbook_44p_l4,&_resbook_44p_l4}368};369static const vorbis_residue_template _res_44p51_5[]={370{2,0,15, &_residue_44p_hi,371&_huff_book__44p5_short,&_huff_book__44p5_short,372&_resbook_44p_5,&_resbook_44p_5},373374{2,0,30, &_residue_44p_hi,375&_huff_book__44p5_long,&_huff_book__44p5_long,376&_resbook_44p_5,&_resbook_44p_5},377378{1,2,6, &_residue_44p_lfe,379&_huff_book__44p5_lfe,&_huff_book__44p5_lfe,380&_resbook_44p_l5,&_resbook_44p_l5}381};382static const vorbis_residue_template _res_44p51_6[]={383{2,0,15, &_residue_44p_hi,384&_huff_book__44p6_short,&_huff_book__44p6_short,385&_resbook_44p_6,&_resbook_44p_6},386387{2,0,30, &_residue_44p_hi,388&_huff_book__44p6_long,&_huff_book__44p6_long,389&_resbook_44p_6,&_resbook_44p_6},390391{1,2,6, &_residue_44p_lfe,392&_huff_book__44p6_lfe,&_huff_book__44p6_lfe,393&_resbook_44p_l6,&_resbook_44p_l6}394};395396397static const vorbis_residue_template _res_44p51_7[]={398{2,0,15, &_residue_44p_hi,399&_huff_book__44p7_short,&_huff_book__44p7_short,400&_resbook_44p_7,&_resbook_44p_7},401402{2,0,30, &_residue_44p_hi,403&_huff_book__44p7_long,&_huff_book__44p7_long,404&_resbook_44p_7,&_resbook_44p_7},405406{1,2,6, &_residue_44p_lfe,407&_huff_book__44p6_lfe,&_huff_book__44p6_lfe,408&_resbook_44p_l6,&_resbook_44p_l6}409};410static const vorbis_residue_template _res_44p51_8[]={411{2,0,15, &_residue_44p_hi,412&_huff_book__44p8_short,&_huff_book__44p8_short,413&_resbook_44p_8,&_resbook_44p_8},414415{2,0,30, &_residue_44p_hi,416&_huff_book__44p8_long,&_huff_book__44p8_long,417&_resbook_44p_8,&_resbook_44p_8},418419{1,2,6, &_residue_44p_lfe,420&_huff_book__44p6_lfe,&_huff_book__44p6_lfe,421&_resbook_44p_l6,&_resbook_44p_l6}422};423static const vorbis_residue_template _res_44p51_9[]={424{2,0,15, &_residue_44p_hi,425&_huff_book__44p9_short,&_huff_book__44p9_short,426&_resbook_44p_9,&_resbook_44p_9},427428{2,0,30, &_residue_44p_hi,429&_huff_book__44p9_long,&_huff_book__44p9_long,430&_resbook_44p_9,&_resbook_44p_9},431432{1,2,6, &_residue_44p_lfe,433&_huff_book__44p6_lfe,&_huff_book__44p6_lfe,434&_resbook_44p_l6,&_resbook_44p_l6}435};436437static const vorbis_mapping_template _mapres_template_44_51[]={438{ _map_nominal_51, _res_44p51_n1 }, /* -1 */439{ _map_nominal_51, _res_44p51_0 }, /* 0 */440{ _map_nominal_51, _res_44p51_1 }, /* 1 */441{ _map_nominal_51, _res_44p51_2 }, /* 2 */442{ _map_nominal_51, _res_44p51_3 }, /* 3 */443{ _map_nominal_51, _res_44p51_4 }, /* 4 */444{ _map_nominal_51u, _res_44p51_5 }, /* 5 */445{ _map_nominal_51u, _res_44p51_6 }, /* 6 */446{ _map_nominal_51u, _res_44p51_7 }, /* 7 */447{ _map_nominal_51u, _res_44p51_8 }, /* 8 */448{ _map_nominal_51u, _res_44p51_9 }, /* 9 */449};450451452