Path: blob/master/thirdparty/libvorbis/modes/floor_all.h
9898 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: key floor settings1314********************************************************************/1516#include "vorbis/codec.h"17#include "backends.h"18#include "books/floor/floor_books.h"1920static const static_codebook*const _floor_128x4_books[]={21&_huff_book_line_128x4_class0,22&_huff_book_line_128x4_0sub0,23&_huff_book_line_128x4_0sub1,24&_huff_book_line_128x4_0sub2,25&_huff_book_line_128x4_0sub3,26};27static const static_codebook*const _floor_256x4_books[]={28&_huff_book_line_256x4_class0,29&_huff_book_line_256x4_0sub0,30&_huff_book_line_256x4_0sub1,31&_huff_book_line_256x4_0sub2,32&_huff_book_line_256x4_0sub3,33};34static const static_codebook*const _floor_128x7_books[]={35&_huff_book_line_128x7_class0,36&_huff_book_line_128x7_class1,3738&_huff_book_line_128x7_0sub1,39&_huff_book_line_128x7_0sub2,40&_huff_book_line_128x7_0sub3,41&_huff_book_line_128x7_1sub1,42&_huff_book_line_128x7_1sub2,43&_huff_book_line_128x7_1sub3,44};45static const static_codebook*const _floor_256x7_books[]={46&_huff_book_line_256x7_class0,47&_huff_book_line_256x7_class1,4849&_huff_book_line_256x7_0sub1,50&_huff_book_line_256x7_0sub2,51&_huff_book_line_256x7_0sub3,52&_huff_book_line_256x7_1sub1,53&_huff_book_line_256x7_1sub2,54&_huff_book_line_256x7_1sub3,55};56static const static_codebook*const _floor_128x11_books[]={57&_huff_book_line_128x11_class1,58&_huff_book_line_128x11_class2,59&_huff_book_line_128x11_class3,6061&_huff_book_line_128x11_0sub0,62&_huff_book_line_128x11_1sub0,63&_huff_book_line_128x11_1sub1,64&_huff_book_line_128x11_2sub1,65&_huff_book_line_128x11_2sub2,66&_huff_book_line_128x11_2sub3,67&_huff_book_line_128x11_3sub1,68&_huff_book_line_128x11_3sub2,69&_huff_book_line_128x11_3sub3,70};71static const static_codebook*const _floor_128x17_books[]={72&_huff_book_line_128x17_class1,73&_huff_book_line_128x17_class2,74&_huff_book_line_128x17_class3,7576&_huff_book_line_128x17_0sub0,77&_huff_book_line_128x17_1sub0,78&_huff_book_line_128x17_1sub1,79&_huff_book_line_128x17_2sub1,80&_huff_book_line_128x17_2sub2,81&_huff_book_line_128x17_2sub3,82&_huff_book_line_128x17_3sub1,83&_huff_book_line_128x17_3sub2,84&_huff_book_line_128x17_3sub3,85};86static const static_codebook*const _floor_256x4low_books[]={87&_huff_book_line_256x4low_class0,88&_huff_book_line_256x4low_0sub0,89&_huff_book_line_256x4low_0sub1,90&_huff_book_line_256x4low_0sub2,91&_huff_book_line_256x4low_0sub3,92};93static const static_codebook*const _floor_1024x27_books[]={94&_huff_book_line_1024x27_class1,95&_huff_book_line_1024x27_class2,96&_huff_book_line_1024x27_class3,97&_huff_book_line_1024x27_class4,9899&_huff_book_line_1024x27_0sub0,100&_huff_book_line_1024x27_1sub0,101&_huff_book_line_1024x27_1sub1,102&_huff_book_line_1024x27_2sub0,103&_huff_book_line_1024x27_2sub1,104&_huff_book_line_1024x27_3sub1,105&_huff_book_line_1024x27_3sub2,106&_huff_book_line_1024x27_3sub3,107&_huff_book_line_1024x27_4sub1,108&_huff_book_line_1024x27_4sub2,109&_huff_book_line_1024x27_4sub3,110};111static const static_codebook*const _floor_2048x27_books[]={112&_huff_book_line_2048x27_class1,113&_huff_book_line_2048x27_class2,114&_huff_book_line_2048x27_class3,115&_huff_book_line_2048x27_class4,116117&_huff_book_line_2048x27_0sub0,118&_huff_book_line_2048x27_1sub0,119&_huff_book_line_2048x27_1sub1,120&_huff_book_line_2048x27_2sub0,121&_huff_book_line_2048x27_2sub1,122&_huff_book_line_2048x27_3sub1,123&_huff_book_line_2048x27_3sub2,124&_huff_book_line_2048x27_3sub3,125&_huff_book_line_2048x27_4sub1,126&_huff_book_line_2048x27_4sub2,127&_huff_book_line_2048x27_4sub3,128};129130static const static_codebook*const _floor_512x17_books[]={131&_huff_book_line_512x17_class1,132&_huff_book_line_512x17_class2,133&_huff_book_line_512x17_class3,134135&_huff_book_line_512x17_0sub0,136&_huff_book_line_512x17_1sub0,137&_huff_book_line_512x17_1sub1,138&_huff_book_line_512x17_2sub1,139&_huff_book_line_512x17_2sub2,140&_huff_book_line_512x17_2sub3,141&_huff_book_line_512x17_3sub1,142&_huff_book_line_512x17_3sub2,143&_huff_book_line_512x17_3sub3,144};145146static const static_codebook*const _floor_Xx0_books[]={1470148};149150static const static_codebook*const *const _floor_books[11]={151_floor_128x4_books,152_floor_256x4_books,153_floor_128x7_books,154_floor_256x7_books,155_floor_128x11_books,156_floor_128x17_books,157_floor_256x4low_books,158_floor_1024x27_books,159_floor_2048x27_books,160_floor_512x17_books,161_floor_Xx0_books,162};163164static const vorbis_info_floor1 _floor[11]={165/* 0: 128 x 4 */166{1671,{0},{4},{2},{0},168{{1,2,3,4}},1694,{0,128, 33,8,16,70},17017160,30,500, 1.,18., 128172},173/* 1: 256 x 4 */174{1751,{0},{4},{2},{0},176{{1,2,3,4}},1774,{0,256, 66,16,32,140},17817960,30,500, 1.,18., 256180},181/* 2: 128 x 7 */182{1832,{0,1},{3,4},{2,2},{0,1},184{{-1,2,3,4},{-1,5,6,7}},1854,{0,128, 14,4,58, 2,8,28,90},18618760,30,500, 1.,18., 128188},189/* 3: 256 x 7 */190{1912,{0,1},{3,4},{2,2},{0,1},192{{-1,2,3,4},{-1,5,6,7}},1934,{0,256, 28,8,116, 4,16,56,180},19419560,30,500, 1.,18., 256196},197/* 4: 128 x 11 */198{1994,{0,1,2,3},{2,3,3,3},{0,1,2,2},{-1,0,1,2},200{{3},{4,5},{-1,6,7,8},{-1,9,10,11}},2012022,{0,128, 8,33, 4,16,70, 2,6,12, 23,46,90},20320460,30,500, 1,18., 128205},206/* 5: 128 x 17 */207{2086,{0,1,1,2,3,3},{2,3,3,3},{0,1,2,2},{-1,0,1,2},209{{3},{4,5},{-1,6,7,8},{-1,9,10,11}},2102,{0,128, 12,46, 4,8,16, 23,33,70, 2,6,10, 14,19,28, 39,58,90},21121260,30,500, 1,18., 128213},214/* 6: 256 x 4 (low bitrate version) */215{2161,{0},{4},{2},{0},217{{1,2,3,4}},2184,{0,256, 66,16,32,140},21922060,30,500, 1.,18., 256221},222/* 7: 1024 x 27 */223{2248,{0,1,2,2,3,3,4,4},{3,4,3,4,3},{0,1,1,2,2},{-1,0,1,2,3},225{{4},{5,6},{7,8},{-1,9,10,11},{-1,12,13,14}},2262,{0,1024, 93,23,372, 6,46,186,750, 14,33,65, 130,260,556,2273,10,18,28, 39,55,79,111, 158,220,312, 464,650,850},22822960,30,500, 3,18., 1024230},231/* 8: 2048 x 27 */232{2338,{0,1,2,2,3,3,4,4},{3,4,3,4,3},{0,1,1,2,2},{-1,0,1,2,3},234{{4},{5,6},{7,8},{-1,9,10,11},{-1,12,13,14}},2352,{0,2048, 186,46,744, 12,92,372,1500, 28,66,130, 260,520,1112,2366,20,36,56, 78,110,158,222, 316,440,624, 928,1300,1700},23723860,30,500, 3,18., 2048239},240/* 9: 512 x 17 */241{2426,{0,1,1,2,3,3},{2,3,3,3},{0,1,2,2},{-1,0,1,2},243{{3},{4,5},{-1,6,7,8},{-1,9,10,11}},2442,{0,512, 46,186, 16,33,65, 93,130,278,2457,23,39, 55,79,110, 156,232,360},24624760,30,500, 1,18., 512248},249250/* 10: X x 0 (LFE floor; edge posts only) */251{2520,{0}, {0},{0},{-1},253{{-1}},2542,{0,12},25560,30,500, 1.,18., 10256},257258};259260261