Commit f8e43bb0 authored by Monty's avatar Monty

Catch up commit for the merge

svn path=/branches/branch_monty_20011009/vorbis/; revision=2589
parent d40e7df7
......@@ -11,7 +11,7 @@
********************************************************************
function: PCM data vector blocking, windowing and dis/reassembly
last mod: $Id: block.c,v 1.50.2.8 2001/12/11 08:19:39 xiphmont Exp $
last mod: $Id: block.c,v 1.50.2.9 2001/12/12 09:13:39 xiphmont Exp $
Handle windowing, overlap-add, etc of the PCM vectors. This is made
more amusing by Vorbis' current two allowed block sizes.
......@@ -511,6 +511,7 @@ int vorbis_analysis_blockout(vorbis_dsp_state *v,vorbis_block *vb){
if(bp==-1)return(0); /* not enough data currently to search for a
full long block */
v->nW=bp;
//v->nW=0;
}else
v->nW=0;
......@@ -745,8 +746,8 @@ int vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb){
for(;i<sizeW;i++)
pcm[i]=p[i];
_analysis_output("lapped",seq,pcm,sizeW,0,0);
_analysis_output("buffered",seq++,v->pcm[j],sizeW+beginW,0,0);
//_analysis_output("lapped",seq,pcm,sizeW,0,0);
//_analysis_output("buffered",seq++,v->pcm[j],sizeW+beginW,0,0);
}
......
/********************************************************************
* *
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2001 *
* by the XIPHOPHORUS Company http://www.xiph.org/ *
* *
********************************************************************
function: static codebook autogenerated by vq/somethingorother
********************************************************************/
#ifndef _V__44c0_s2_p6_0_VQH_
#define _V__44c0_s2_p6_0_VQH_
#include "codebook.h"
static long _vq_quantlist__44c0_s2_p6_0[] = {
4,
3,
5,
2,
6,
1,
7,
0,
8,
};
static long _vq_lengthlist__44c0_s2_p6_0[] = {
1, 2, 3, 4, 5, 6, 7, 8, 8, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0,
};
static float _vq_quantthresh__44c0_s2_p6_0[] = {
-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5,
};
static long _vq_quantmap__44c0_s2_p6_0[] = {
7, 5, 3, 1, 0, 2, 4, 6,
8,
};
static encode_aux_threshmatch _vq_auxt__44c0_s2_p6_0 = {
_vq_quantthresh__44c0_s2_p6_0,
_vq_quantmap__44c0_s2_p6_0,
9,
9
};
static static_codebook _44c0_s2_p6_0 = {
2, 81,
_vq_lengthlist__44c0_s2_p6_0,
1, -531628032, 1611661312, 4, 0,
_vq_quantlist__44c0_s2_p6_0,
NULL,
&_vq_auxt__44c0_s2_p6_0,
NULL,
0
};
#endif
/********************************************************************
* *
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2001 *
* by the XIPHOPHORUS Company http://www.xiph.org/ *
* *
********************************************************************
function: static codebook autogenerated by vq/somethingorother
********************************************************************/
#ifndef _V__44c0_s4_p7_0_VQH_
#define _V__44c0_s4_p7_0_VQH_
#include "codebook.h"
static long _vq_quantlist__44c0_s4_p7_0[] = {
3,
2,
4,
1,
5,
0,
6,
};
static long _vq_lengthlist__44c0_s4_p7_0[] = {
1, 4, 5,10,10,10,10, 2, 4,10,10,10,10,10, 5,10,
10,10,10,10,10,10,10,10,10,10,10,10, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9,
};
static float _vq_quantthresh__44c0_s4_p7_0[] = {
-167.5, -100.5, -33.5, 33.5, 100.5, 167.5,
};
static long _vq_quantmap__44c0_s4_p7_0[] = {
5, 3, 1, 0, 2, 4, 6,
};
static encode_aux_threshmatch _vq_auxt__44c0_s4_p7_0 = {
_vq_quantthresh__44c0_s4_p7_0,
_vq_quantmap__44c0_s4_p7_0,
7,
7
};
static static_codebook _44c0_s4_p7_0 = {
2, 49,
_vq_lengthlist__44c0_s4_p7_0,
1, -520544256, 1624293376, 3, 0,
_vq_quantlist__44c0_s4_p7_0,
NULL,
&_vq_auxt__44c0_s4_p7_0,
NULL,
0
};
#endif
/********************************************************************
* *
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2001 *
* by the XIPHOPHORUS Company http://www.xiph.org/ *
* *
********************************************************************
function: static codebook autogenerated by vq/somethingorother
********************************************************************/
#ifndef _V__44c0_s4_p7_1_VQH_
#define _V__44c0_s4_p7_1_VQH_
#include "codebook.h"
static long _vq_quantlist__44c0_s4_p7_1[] = {
11,
10,
12,
9,
13,
8,
14,
7,
15,
6,
16,
5,
17,
4,
18,
3,
19,
2,
20,
1,
21,
0,
22,
};
static long _vq_lengthlist__44c0_s4_p7_1[] = {
1, 4, 4, 7, 7, 9, 8,10,10,11,10,12,10,12,11,11,
12,10,10,10, 9,10,10, 5, 5, 6, 9,10,10,11,10,11,
12,11,13,10,11,11,13,11,11, 9,10,10,11,10,13, 7,
4, 9, 8,10,10,11,10,11,11,12,11,11,11,11,11,10,
10,10, 9,10, 9,13, 7, 7,10,10,11,12,12,13,13,11,
12,12,13,12,12,12,13,12,12,11,11,12,13, 9, 6,10,
7,10,10,12,12,11,13,13,13,13,13,13,12,11,13,10,
10,10,11,13,10,11,10,11,12,13,13,13,13,12,13,12,
13,13,13,13,11,13,13,11,13,13,13,13,13,10, 7,13,
11,13,12,12,13,13,13,13,13,13,13,11,12,11,13,12,
12,13,13,13,11, 8,13,13,13,13,13,13,13,13,13,13,
13,13,12,11,13,10,13,13,13,13,13, 9,12,12,12,13,
13,13,13,13,13,13,12,13,13,11,12,11,12,13,13,13,
13,13,13,11,13, 8,13,13,13,13,13,13,13,13,13,13,
13,10,13,11,13,13,13,13,13,13,13,13,13,13,12,13,
13,13,13,13,13,13,13,13,13,13,12,13,12,13,13,13,
13,13,13,13,13,13,13,13,13,13,13,13,13,12,13,13,
13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,
13,13,13,13,13,11,13,12,13,12,13,13,13,13,13,13,
13,13,13,13,13,13,13,13,13,12,13,13,13,12,13,13,
13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,
13,13,13,10,13,11,13,10,12,13,13,13,13,13,13,13,
13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,
13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,
13,10,13, 7,13,13,13,13,13,13,13,13,13,13,13,13,
13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,
13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, 7,
13,11,13,13,13,13,13,13,13,13,13,13,13,13,13,13,
13,13,13,13,13,13,12,13,13,13,13,13,13,13,13,13,
13,13,13,13,13,13,13,13,13,13,13,13,13,11,13,13,
13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,
13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,
13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,
13,
};
static float _vq_quantthresh__44c0_s4_p7_1[] = {
-31.5, -28.5, -25.5, -22.5, -19.5, -16.5, -13.5, -10.5,
-7.5, -4.5, -1.5, 1.5, 4.5, 7.5, 10.5, 13.5,
16.5, 19.5, 22.5, 25.5, 28.5, 31.5,
};
static long _vq_quantmap__44c0_s4_p7_1[] = {
21, 19, 17, 15, 13, 11, 9, 7,
5, 3, 1, 0, 2, 4, 6, 8,
10, 12, 14, 16, 18, 20, 22,
};
static encode_aux_threshmatch _vq_auxt__44c0_s4_p7_1 = {
_vq_quantthresh__44c0_s4_p7_1,
_vq_quantmap__44c0_s4_p7_1,
23,
23
};
static static_codebook _44c0_s4_p7_1 = {
2, 529,
_vq_lengthlist__44c0_s4_p7_1,
1, -525303808, 1614282752, 5, 0,
_vq_quantlist__44c0_s4_p7_1,
NULL,
&_vq_auxt__44c0_s4_p7_1,
NULL,
0
};
#endif
/********************************************************************
* *
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2001 *
* by the XIPHOPHORUS Company http://www.xiph.org/ *
* *
********************************************************************
function: static codebook autogenerated by vq/somethingorother
********************************************************************/
#ifndef _V__44c0_s4_p7_2_VQH_
#define _V__44c0_s4_p7_2_VQH_
#include "codebook.h"
static long _vq_quantlist__44c0_s4_p7_2[] = {
1,
0,
2,
};
static long _vq_lengthlist__44c0_s4_p7_2[] = {
2, 5, 5, 8, 6, 6, 7, 6, 7, 6, 5, 6, 8, 7, 7, 8,
6, 8, 5, 6, 6, 8, 7, 7, 8, 7, 7, 8, 7, 8, 8, 9,
8, 9, 9, 9, 6, 7, 7, 8, 6, 7, 9, 7, 7, 6, 6, 7,
8, 7, 7, 8, 7, 8, 6, 7, 8, 8, 8, 7, 7, 8, 8, 6,
7, 7, 8, 6, 7, 7, 6, 6, 6, 7, 7, 8, 7, 7, 9, 7,
6,
};
static float _vq_quantthresh__44c0_s4_p7_2[] = {
-0.5, 0.5,
};
static long _vq_quantmap__44c0_s4_p7_2[] = {
1, 0, 2,
};
static encode_aux_threshmatch _vq_auxt__44c0_s4_p7_2 = {
_vq_quantthresh__44c0_s4_p7_2,
_vq_quantmap__44c0_s4_p7_2,
3,
3
};
static static_codebook _44c0_s4_p7_2 = {
4, 81,
_vq_lengthlist__44c0_s4_p7_2,
1, -535822336, 1611661312, 2, 0,
_vq_quantlist__44c0_s4_p7_2,
NULL,
&_vq_auxt__44c0_s4_p7_2,
NULL,
0
};
#endif
/********************************************************************
* *
* THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. *
* USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY *
* THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. *
* PLEASE READ THESE TERMS DISTRIBUTING. *
* *
* THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 *
* by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company *
* http://www.xiph.org/ *
* *
********************************************************************
function: static codebook autogenerated by huff/huffbuld
********************************************************************/
#ifndef _V__44c1_long_VQH_
#define _V__44c1_long_VQH_
#include "codebook.h"
static long _huff_lengthlist__44c1_long[] = {
3,13,12,13,14, 5, 8,12,11, 5, 5, 7, 9, 6, 7,13,
10, 5, 4, 6, 8, 7, 8,14,10, 6, 5, 6, 8, 9, 8,13,
11, 7, 7, 6, 5,13,10, 9, 4,16,16,16,16, 2, 4,11,
8,16,16,16,16, 4, 6,10,14,12,14,12, 6,11,10,10,
};
static static_codebook _huff_book__44c1_long = {
2, 64,
_huff_lengthlist__44c1_long,
0, 0, 0, 0, 0,
NULL,
NULL,
NULL,
0
};
#endif
/********************************************************************
* *
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2001 *
* by the XIPHOPHORUS Company http://www.xiph.org/ *
* *
********************************************************************
function: static codebook autogenerated by vq/somethingorother
********************************************************************/
#ifndef _V__44c1_s0_p1_0_VQH_
#define _V__44c1_s0_p1_0_VQH_
#include "codebook.h"
static long _vq_quantlist__44c1_s0_p1_0[] = {
2,
1,
3,
0,
4,
};
static long _vq_lengthlist__44c1_s0_p1_0[] = {
2, 5, 5, 0, 0, 0, 5, 5, 0, 0, 0, 5, 5, 0, 0, 0,
7, 7, 0, 0, 0, 0, 0, 0, 0, 5, 8, 7, 0, 0, 0, 8,
7, 0, 0, 0, 8, 7, 0, 0, 0,10, 9, 0, 0, 0, 0, 0,
0, 0, 5, 7, 8, 0, 0, 0, 7, 8, 0, 0, 0, 7, 8, 0,
0, 0, 9,10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 5, 8, 7, 0, 0, 0, 7, 6, 0, 0,
0, 7, 7, 0, 0, 0, 9, 8, 0, 0, 0, 0, 0, 0, 0, 5,
8, 8, 0, 0, 0, 6, 7, 0, 0, 0, 7, 6, 0, 0, 0, 9,
9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 5, 8, 7, 0, 0, 0, 7, 6, 0, 0, 0, 7, 6,
0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 5, 7, 8, 0,
0, 0, 6, 7, 0, 0, 0, 6, 7, 0, 0, 0, 9, 9, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
7, 9,10, 0, 0, 0, 9, 9, 0, 0, 0, 8,10, 0, 0, 0,
11,10, 0, 0, 0, 0, 0, 0, 0, 7,10, 9, 0, 0, 0, 9,
9, 0, 0, 0, 9, 8, 0, 0, 0,10,11, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0,
};
static float _vq_quantthresh__44c1_s0_p1_0[] = {
-1.5, -0.5, 0.5, 1.5,
};
static long _vq_quantmap__44c1_s0_p1_0[] = {
3, 1, 0, 2, 4,
};
static encode_aux_threshmatch _vq_auxt__44c1_s0_p1_0 = {
_vq_quantthresh__44c1_s0_p1_0,
_vq_quantmap__44c1_s0_p1_0,
5,
5
};
static static_codebook _44c1_s0_p1_0 = {
4, 625,
_vq_lengthlist__44c1_s0_p1_0,
1, -533725184, 1611661312, 3, 0,
_vq_quantlist__44c1_s0_p1_0,
NULL,
&_vq_auxt__44c1_s0_p1_0,
NULL,
0
};
#endif
/********************************************************************
* *
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2001 *
* by the XIPHOPHORUS Company http://www.xiph.org/ *
* *
********************************************************************
function: static codebook autogenerated by vq/somethingorother
********************************************************************/
#ifndef _V__44c1_s0_p2_0_VQH_
#define _V__44c1_s0_p2_0_VQH_
#include "codebook.h"
static long _vq_quantlist__44c1_s0_p2_0[] = {
4,
3,
5,
2,
6,
1,
7,
0,
8,
};
static long _vq_lengthlist__44c1_s0_p2_0[] = {
1, 4, 4, 7, 7, 0, 0, 0, 0, 0, 4, 4, 7, 7, 0, 0,
0, 0, 0, 4, 4, 7, 7, 0, 0, 0, 0, 0, 6, 6, 7, 7,
0, 0, 0, 0, 0, 0, 0, 7, 7, 0, 0, 0, 0, 0, 0, 0,
8, 8, 0, 0, 0, 0, 0, 0, 0, 8, 9, 0, 0, 0, 0, 0,
0, 0,10,10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0,
};
static float _vq_quantthresh__44c1_s0_p2_0[] = {
-3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5,
};
static long _vq_quantmap__44c1_s0_p2_0[] = {
7, 5, 3, 1, 0, 2, 4, 6,
8,
};
static encode_aux_threshmatch _vq_auxt__44c1_s0_p2_0 = {
_vq_quantthresh__44c1_s0_p2_0,
_vq_quantmap__44c1_s0_p2_0,
9,
9
};
static static_codebook _44c1_s0_p2_0 = {
2, 81,
_vq_lengthlist__44c1_s0_p2_0,
1, -531628032, 1611661312, 4, 0,
_vq_quantlist__44c1_s0_p2_0,
NULL,
&_vq_auxt__44c1_s0_p2_0,
NULL,
0
};
#endif
/********************************************************************
* *
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2001 *
* by the XIPHOPHORUS Company http://www.xiph.org/ *
* *
********************************************************************
function: static codebook autogenerated by vq/somethingorother
********************************************************************/
#ifndef _V__44c1_s0_p3_0_VQH_
#define _V__44c1_s0_p3_0_VQH_
#include "codebook.h"
static long _vq_quantlist__44c1_s0_p3_0[] = {
8,
7,
9,
6,
10,
5,
11,
4,
12,
3,
13,
2,
14,
1,
15,
0,
16,
};
static long _vq_lengthlist__44c1_s0_p3_0[] = {
1, 4, 5, 7, 7, 8, 7, 9, 9, 0, 0, 0, 0, 0, 0, 0,
0, 0, 5, 4, 7, 7, 8, 8,10,10, 0, 0, 0, 0, 0, 0,
0, 0, 0, 4, 4, 7, 7, 8, 8,10,10, 0, 0, 0, 0, 0,
0, 0, 0, 0, 6, 7, 8, 7, 8, 8,10,10, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 7, 7, 8, 8,10,10, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9,10,10, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 8, 9, 9,11,10, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10,10,10, 9,11,11,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10,10,11,
11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,11,11,
11,12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,11,
11,12,12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
12,12,12,12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,