Path: blob/master/thirdparty/libvorbis/modes/residue_44.h
9903 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-2009 *8* by the Xiph.Org Foundation https://xiph.org/ *9* *10********************************************************************1112function: toplevel residue templates for 32/44.1/48kHz1314********************************************************************/1516#include "vorbis/codec.h"17#include "backends.h"18#include "books/coupled/res_books_stereo.h"1920/***** residue backends *********************************************/2122static const vorbis_info_residue0 _residue_44_low={230,-1, -1, 9,-1,-1,24/* 0 1 2 3 4 5 6 7 */25{0},26{-1},27{ 0, 1, 2, 2, 4, 8, 16, 32},28{ 0, 0, 0,999, 4, 8, 16, 32},29};3031static const vorbis_info_residue0 _residue_44_mid={320,-1, -1, 10,-1,-1,33/* 0 1 2 3 4 5 6 7 8 */34{0},35{-1},36{ 0, 1, 1, 2, 2, 4, 8, 16, 32},37{ 0, 0,999, 0,999, 4, 8, 16, 32},38};3940static const vorbis_info_residue0 _residue_44_high={410,-1, -1, 10,-1,-1,42/* 0 1 2 3 4 5 6 7 8 */43{0},44{-1},45{ 0, 1, 2, 4, 8, 16, 32, 71,157},46{ 0, 1, 2, 3, 4, 8, 16, 71,157},47};4849static const static_bookblock _resbook_44s_n1={50{51{0},{0,0,&_44cn1_s_p1_0},{0,0,&_44cn1_s_p2_0},52{0,0,&_44cn1_s_p3_0},{0,0,&_44cn1_s_p4_0},{0,0,&_44cn1_s_p5_0},53{&_44cn1_s_p6_0,&_44cn1_s_p6_1},{&_44cn1_s_p7_0,&_44cn1_s_p7_1},54{&_44cn1_s_p8_0,&_44cn1_s_p8_1,&_44cn1_s_p8_2}55}56};57static const static_bookblock _resbook_44sm_n1={58{59{0},{0,0,&_44cn1_sm_p1_0},{0,0,&_44cn1_sm_p2_0},60{0,0,&_44cn1_sm_p3_0},{0,0,&_44cn1_sm_p4_0},{0,0,&_44cn1_sm_p5_0},61{&_44cn1_sm_p6_0,&_44cn1_sm_p6_1},{&_44cn1_sm_p7_0,&_44cn1_sm_p7_1},62{&_44cn1_sm_p8_0,&_44cn1_sm_p8_1,&_44cn1_sm_p8_2}63}64};6566static const static_bookblock _resbook_44s_0={67{68{0},{0,0,&_44c0_s_p1_0},{0,0,&_44c0_s_p2_0},69{0,0,&_44c0_s_p3_0},{0,0,&_44c0_s_p4_0},{0,0,&_44c0_s_p5_0},70{&_44c0_s_p6_0,&_44c0_s_p6_1},{&_44c0_s_p7_0,&_44c0_s_p7_1},71{&_44c0_s_p8_0,&_44c0_s_p8_1,&_44c0_s_p8_2}72}73};74static const static_bookblock _resbook_44sm_0={75{76{0},{0,0,&_44c0_sm_p1_0},{0,0,&_44c0_sm_p2_0},77{0,0,&_44c0_sm_p3_0},{0,0,&_44c0_sm_p4_0},{0,0,&_44c0_sm_p5_0},78{&_44c0_sm_p6_0,&_44c0_sm_p6_1},{&_44c0_sm_p7_0,&_44c0_sm_p7_1},79{&_44c0_sm_p8_0,&_44c0_sm_p8_1,&_44c0_sm_p8_2}80}81};8283static const static_bookblock _resbook_44s_1={84{85{0},{0,0,&_44c1_s_p1_0},{0,0,&_44c1_s_p2_0},86{0,0,&_44c1_s_p3_0},{0,0,&_44c1_s_p4_0},{0,0,&_44c1_s_p5_0},87{&_44c1_s_p6_0,&_44c1_s_p6_1},{&_44c1_s_p7_0,&_44c1_s_p7_1},88{&_44c1_s_p8_0,&_44c1_s_p8_1,&_44c1_s_p8_2}89}90};91static const static_bookblock _resbook_44sm_1={92{93{0},{0,0,&_44c1_sm_p1_0},{0,0,&_44c1_sm_p2_0},94{0,0,&_44c1_sm_p3_0},{0,0,&_44c1_sm_p4_0},{0,0,&_44c1_sm_p5_0},95{&_44c1_sm_p6_0,&_44c1_sm_p6_1},{&_44c1_sm_p7_0,&_44c1_sm_p7_1},96{&_44c1_sm_p8_0,&_44c1_sm_p8_1,&_44c1_sm_p8_2}97}98};99100static const static_bookblock _resbook_44s_2={101{102{0},{0,0,&_44c2_s_p1_0},{0,0,&_44c2_s_p2_0},{0,0,&_44c2_s_p3_0},103{0,0,&_44c2_s_p4_0},{0,0,&_44c2_s_p5_0},{0,0,&_44c2_s_p6_0},104{&_44c2_s_p7_0,&_44c2_s_p7_1},{&_44c2_s_p8_0,&_44c2_s_p8_1},105{&_44c2_s_p9_0,&_44c2_s_p9_1,&_44c2_s_p9_2}106}107};108static const static_bookblock _resbook_44s_3={109{110{0},{0,0,&_44c3_s_p1_0},{0,0,&_44c3_s_p2_0},{0,0,&_44c3_s_p3_0},111{0,0,&_44c3_s_p4_0},{0,0,&_44c3_s_p5_0},{0,0,&_44c3_s_p6_0},112{&_44c3_s_p7_0,&_44c3_s_p7_1},{&_44c3_s_p8_0,&_44c3_s_p8_1},113{&_44c3_s_p9_0,&_44c3_s_p9_1,&_44c3_s_p9_2}114}115};116static const static_bookblock _resbook_44s_4={117{118{0},{0,0,&_44c4_s_p1_0},{0,0,&_44c4_s_p2_0},{0,0,&_44c4_s_p3_0},119{0,0,&_44c4_s_p4_0},{0,0,&_44c4_s_p5_0},{0,0,&_44c4_s_p6_0},120{&_44c4_s_p7_0,&_44c4_s_p7_1},{&_44c4_s_p8_0,&_44c4_s_p8_1},121{&_44c4_s_p9_0,&_44c4_s_p9_1,&_44c4_s_p9_2}122}123};124static const static_bookblock _resbook_44s_5={125{126{0},{0,0,&_44c5_s_p1_0},{0,0,&_44c5_s_p2_0},{0,0,&_44c5_s_p3_0},127{0,0,&_44c5_s_p4_0},{0,0,&_44c5_s_p5_0},{0,0,&_44c5_s_p6_0},128{&_44c5_s_p7_0,&_44c5_s_p7_1},{&_44c5_s_p8_0,&_44c5_s_p8_1},129{&_44c5_s_p9_0,&_44c5_s_p9_1,&_44c5_s_p9_2}130}131};132static const static_bookblock _resbook_44s_6={133{134{0},{0,0,&_44c6_s_p1_0},{0,0,&_44c6_s_p2_0},{0,0,&_44c6_s_p3_0},135{0,0,&_44c6_s_p4_0},136{&_44c6_s_p5_0,&_44c6_s_p5_1},137{&_44c6_s_p6_0,&_44c6_s_p6_1},138{&_44c6_s_p7_0,&_44c6_s_p7_1},139{&_44c6_s_p8_0,&_44c6_s_p8_1},140{&_44c6_s_p9_0,&_44c6_s_p9_1,&_44c6_s_p9_2}141}142};143static const static_bookblock _resbook_44s_7={144{145{0},{0,0,&_44c7_s_p1_0},{0,0,&_44c7_s_p2_0},{0,0,&_44c7_s_p3_0},146{0,0,&_44c7_s_p4_0},147{&_44c7_s_p5_0,&_44c7_s_p5_1},148{&_44c7_s_p6_0,&_44c7_s_p6_1},149{&_44c7_s_p7_0,&_44c7_s_p7_1},150{&_44c7_s_p8_0,&_44c7_s_p8_1},151{&_44c7_s_p9_0,&_44c7_s_p9_1,&_44c7_s_p9_2}152}153};154static const static_bookblock _resbook_44s_8={155{156{0},{0,0,&_44c8_s_p1_0},{0,0,&_44c8_s_p2_0},{0,0,&_44c8_s_p3_0},157{0,0,&_44c8_s_p4_0},158{&_44c8_s_p5_0,&_44c8_s_p5_1},159{&_44c8_s_p6_0,&_44c8_s_p6_1},160{&_44c8_s_p7_0,&_44c8_s_p7_1},161{&_44c8_s_p8_0,&_44c8_s_p8_1},162{&_44c8_s_p9_0,&_44c8_s_p9_1,&_44c8_s_p9_2}163}164};165static const static_bookblock _resbook_44s_9={166{167{0},{0,0,&_44c9_s_p1_0},{0,0,&_44c9_s_p2_0},{0,0,&_44c9_s_p3_0},168{0,0,&_44c9_s_p4_0},169{&_44c9_s_p5_0,&_44c9_s_p5_1},170{&_44c9_s_p6_0,&_44c9_s_p6_1},171{&_44c9_s_p7_0,&_44c9_s_p7_1},172{&_44c9_s_p8_0,&_44c9_s_p8_1},173{&_44c9_s_p9_0,&_44c9_s_p9_1,&_44c9_s_p9_2}174}175};176177static const vorbis_residue_template _res_44s_n1[]={178{2,0,32, &_residue_44_low,179&_huff_book__44cn1_s_short,&_huff_book__44cn1_sm_short,180&_resbook_44s_n1,&_resbook_44sm_n1},181182{2,0,32, &_residue_44_low,183&_huff_book__44cn1_s_long,&_huff_book__44cn1_sm_long,184&_resbook_44s_n1,&_resbook_44sm_n1}185};186static const vorbis_residue_template _res_44s_0[]={187{2,0,16, &_residue_44_low,188&_huff_book__44c0_s_short,&_huff_book__44c0_sm_short,189&_resbook_44s_0,&_resbook_44sm_0},190191{2,0,32, &_residue_44_low,192&_huff_book__44c0_s_long,&_huff_book__44c0_sm_long,193&_resbook_44s_0,&_resbook_44sm_0}194};195static const vorbis_residue_template _res_44s_1[]={196{2,0,16, &_residue_44_low,197&_huff_book__44c1_s_short,&_huff_book__44c1_sm_short,198&_resbook_44s_1,&_resbook_44sm_1},199200{2,0,32, &_residue_44_low,201&_huff_book__44c1_s_long,&_huff_book__44c1_sm_long,202&_resbook_44s_1,&_resbook_44sm_1}203};204205static const vorbis_residue_template _res_44s_2[]={206{2,0,16, &_residue_44_mid,207&_huff_book__44c2_s_short,&_huff_book__44c2_s_short,208&_resbook_44s_2,&_resbook_44s_2},209210{2,0,32, &_residue_44_mid,211&_huff_book__44c2_s_long,&_huff_book__44c2_s_long,212&_resbook_44s_2,&_resbook_44s_2}213};214static const vorbis_residue_template _res_44s_3[]={215{2,0,16, &_residue_44_mid,216&_huff_book__44c3_s_short,&_huff_book__44c3_s_short,217&_resbook_44s_3,&_resbook_44s_3},218219{2,0,32, &_residue_44_mid,220&_huff_book__44c3_s_long,&_huff_book__44c3_s_long,221&_resbook_44s_3,&_resbook_44s_3}222};223static const vorbis_residue_template _res_44s_4[]={224{2,0,16, &_residue_44_mid,225&_huff_book__44c4_s_short,&_huff_book__44c4_s_short,226&_resbook_44s_4,&_resbook_44s_4},227228{2,0,32, &_residue_44_mid,229&_huff_book__44c4_s_long,&_huff_book__44c4_s_long,230&_resbook_44s_4,&_resbook_44s_4}231};232static const vorbis_residue_template _res_44s_5[]={233{2,0,16, &_residue_44_mid,234&_huff_book__44c5_s_short,&_huff_book__44c5_s_short,235&_resbook_44s_5,&_resbook_44s_5},236237{2,0,32, &_residue_44_mid,238&_huff_book__44c5_s_long,&_huff_book__44c5_s_long,239&_resbook_44s_5,&_resbook_44s_5}240};241static const vorbis_residue_template _res_44s_6[]={242{2,0,16, &_residue_44_high,243&_huff_book__44c6_s_short,&_huff_book__44c6_s_short,244&_resbook_44s_6,&_resbook_44s_6},245246{2,0,32, &_residue_44_high,247&_huff_book__44c6_s_long,&_huff_book__44c6_s_long,248&_resbook_44s_6,&_resbook_44s_6}249};250static const vorbis_residue_template _res_44s_7[]={251{2,0,16, &_residue_44_high,252&_huff_book__44c7_s_short,&_huff_book__44c7_s_short,253&_resbook_44s_7,&_resbook_44s_7},254255{2,0,32, &_residue_44_high,256&_huff_book__44c7_s_long,&_huff_book__44c7_s_long,257&_resbook_44s_7,&_resbook_44s_7}258};259static const vorbis_residue_template _res_44s_8[]={260{2,0,16, &_residue_44_high,261&_huff_book__44c8_s_short,&_huff_book__44c8_s_short,262&_resbook_44s_8,&_resbook_44s_8},263264{2,0,32, &_residue_44_high,265&_huff_book__44c8_s_long,&_huff_book__44c8_s_long,266&_resbook_44s_8,&_resbook_44s_8}267};268static const vorbis_residue_template _res_44s_9[]={269{2,0,16, &_residue_44_high,270&_huff_book__44c9_s_short,&_huff_book__44c9_s_short,271&_resbook_44s_9,&_resbook_44s_9},272273{2,0,32, &_residue_44_high,274&_huff_book__44c9_s_long,&_huff_book__44c9_s_long,275&_resbook_44s_9,&_resbook_44s_9}276};277278static const vorbis_mapping_template _mapres_template_44_stereo[]={279{ _map_nominal, _res_44s_n1 }, /* -1 */280{ _map_nominal, _res_44s_0 }, /* 0 */281{ _map_nominal, _res_44s_1 }, /* 1 */282{ _map_nominal, _res_44s_2 }, /* 2 */283{ _map_nominal, _res_44s_3 }, /* 3 */284{ _map_nominal, _res_44s_4 }, /* 4 */285{ _map_nominal, _res_44s_5 }, /* 5 */286{ _map_nominal, _res_44s_6 }, /* 6 */287{ _map_nominal, _res_44s_7 }, /* 7 */288{ _map_nominal, _res_44s_8 }, /* 8 */289{ _map_nominal, _res_44s_9 }, /* 9 */290};291292293