summaryrefslogtreecommitdiff
path: root/vp8/common
diff options
context:
space:
mode:
authorYaowu Xu <yaowu@google.com>2012-03-09 17:32:50 -0800
committerYaowu Xu <yaowu@google.com>2012-03-15 07:36:47 -0700
commit6035da5448392244936f1e1a9079e7f6cd857ffe (patch)
treedb96cbb161633c0db567204bcd730d56da1ec7ad /vp8/common
parent2b1c2990a98f090d91ab3ca5c6c1e1ce7ee1a701 (diff)
downloadlibvpx-6035da5448392244936f1e1a9079e7f6cd857ffe.tar
libvpx-6035da5448392244936f1e1a9079e7f6cd857ffe.tar.gz
libvpx-6035da5448392244936f1e1a9079e7f6cd857ffe.tar.bz2
libvpx-6035da5448392244936f1e1a9079e7f6cd857ffe.zip
WebM Experimental Codec Branch Snapshot
This is a code snapshot of experimental work currently ongoing for a next-generation codec. The codebase has been cut down considerably from the libvpx baseline. For example, we are currently only supporting VBR 2-pass rate control and have removed most of the code relating to coding speed, threading, error resilience, partitions and various other features. This is in part to make the codebase easier to work on and experiment with, but also because we want to have an open discussion about how the bitstream will be structured and partitioned and not have that conversation constrained by past work. Our basic working pattern has been to initially encapsulate experiments using configure options linked to #IF CONFIG_XXX statements in the code. Once experiments have matured and we are reasonably happy that they give benefit and can be merged without breaking other experiments, we remove the conditional compile statements and merge them in. Current changes include: * Temporal coding experiment for segments (though still only 4 max, it will likely be increased). * Segment feature experiment - to allow various bits of information to be coded at the segment level. Features tested so far include mode and reference frame information, limiting end of block offset and transform size, alongside Q and loop filter parameters, but this set is very fluid. * Support for 8x8 transform - 8x8 dct with 2nd order 2x2 haar is used in MBs using 16x16 prediction modes within inter frames. * Compound prediction (combination of signals from existing predictors to create a new predictor). * 8 tap interpolation filters and 1/8th pel motion vectors. * Loop filter modifications. * Various entropy modifications and changes to how entropy contexts and updates are handled. * Extended quantizer range matched to transform precision improvements. There are also ongoing further experiments that we hope to merge in the near future: For example, coding of motion and other aspects of the prediction signal to better support larger image formats, use of larger block sizes (e.g. 32x32 and up) and lossless non-transform based coding options (especially for key frames). It is our hope that we will be able to make regular updates and we will warmly welcome community contributions. Please be warned that, at this stage, the codebase is currently slower than VP8 stable branch as most new code has not been optimized, and even the 'C' has been deliberately written to be simple and obvious, not fast. The following graphs have the initial test results, numbers in the tables measure the compression improvement in terms of percentage. The build has the following optional experiments configured: --enable-experimental --enable-enhanced_interp --enable-uvintra --enable-high_precision_mv --enable-sixteenth_subpel_uv CIF Size clips: http://getwebm.org/tmp/cif/ HD size clips: http://getwebm.org/tmp/hd/ (stable_20120309 represents encoding results of WebM master branch build as of commit#7a15907) They were encoded using the following encode parameters: --good --cpu-used=0 -t 0 --lag-in-frames=25 --min-q=0 --max-q=63 --end-usage=0 --auto-alt-ref=1 -p 2 --pass=2 --kf-max-dist=9999 --kf-min-dist=0 --drop-frame=0 --static-thresh=0 --bias-pct=50 --minsection-pct=0 --maxsection-pct=800 --sharpness=0 --arnr-maxframes=7 --arnr-strength=3(for HD,6 for CIF) --arnr-type=3 Change-Id: I5c62ed09cfff5815a2bb34e7820d6a810c23183c
Diffstat (limited to 'vp8/common')
-rw-r--r--vp8/common/alloccommon.c73
-rw-r--r--vp8/common/arm/arm_systemdependent.c2
-rw-r--r--vp8/common/arm/filter_arm.c2
-rw-r--r--vp8/common/arm/neon/recon_neon.c2
-rw-r--r--vp8/common/arm/reconintra_arm.c2
-rw-r--r--vp8/common/blockd.c11
-rw-r--r--vp8/common/blockd.h114
-rw-r--r--vp8/common/coefupdateprobs.h175
-rw-r--r--vp8/common/common.h3
-rw-r--r--vp8/common/debugmodes.c7
-rw-r--r--vp8/common/defaultcoefcounts.h187
-rw-r--r--vp8/common/entropy.c50
-rw-r--r--vp8/common/entropy.h11
-rw-r--r--vp8/common/entropymode.c265
-rw-r--r--vp8/common/entropymode.h13
-rw-r--r--vp8/common/entropymv.c39
-rw-r--r--vp8/common/entropymv.h38
-rw-r--r--vp8/common/filter.c533
-rw-r--r--vp8/common/filter.h14
-rw-r--r--vp8/common/findnearmv.c72
-rw-r--r--vp8/common/findnearmv.h22
-rw-r--r--vp8/common/generic/systemdependent.c105
-rw-r--r--vp8/common/idct.h34
-rw-r--r--vp8/common/idctllm.c244
-rw-r--r--vp8/common/implicit_segmentation.c277
-rw-r--r--vp8/common/invtrans.c91
-rw-r--r--vp8/common/invtrans.h7
-rw-r--r--vp8/common/loopfilter.c243
-rw-r--r--vp8/common/loopfilter.h3
-rw-r--r--vp8/common/loopfilter_filters.c182
-rw-r--r--vp8/common/maskingmv.c855
-rw-r--r--vp8/common/modecont.c54
-rw-r--r--vp8/common/modecont.h4
-rw-r--r--vp8/common/onyx.h22
-rw-r--r--vp8/common/onyxc_int.h85
-rw-r--r--vp8/common/onyxd.h1
-rw-r--r--vp8/common/postproc.c8
-rw-r--r--vp8/common/pred_common.c339
-rw-r--r--vp8/common/pred_common.h51
-rw-r--r--vp8/common/predict_rotated.c85
-rw-r--r--vp8/common/quant_common.c116
-rw-r--r--vp8/common/quant_common.h1
-rw-r--r--vp8/common/recon.c32
-rw-r--r--vp8/common/recon.h107
-rw-r--r--vp8/common/reconinter.c209
-rw-r--r--vp8/common/reconinter.h6
-rw-r--r--vp8/common/reconintra.c509
-rw-r--r--vp8/common/reconintra4x4.c24
-rw-r--r--vp8/common/rotate.h2827
-rw-r--r--vp8/common/rotate2.h2827
-rw-r--r--vp8/common/seg_common.c167
-rw-r--r--vp8/common/seg_common.h85
-rw-r--r--vp8/common/subpixel.h23
-rw-r--r--vp8/common/systemdependent.h2
-rw-r--r--vp8/common/tapify.py106
-rw-r--r--vp8/common/threading.h94
-rw-r--r--vp8/common/x86/mask_sse3.asm484
-rw-r--r--vp8/common/x86/recon_wrapper_sse2.c2
-rw-r--r--vp8/common/x86/subpixel_ssse3.asm20
-rw-r--r--vp8/common/x86/vp8_asm_stubs.c43
-rw-r--r--vp8/common/x86/x86_systemdependent.c8
61 files changed, 11183 insertions, 834 deletions
diff --git a/vp8/common/alloccommon.c b/vp8/common/alloccommon.c
index ee6e1cafe..5a7c79c8f 100644
--- a/vp8/common/alloccommon.c
+++ b/vp8/common/alloccommon.c
@@ -9,7 +9,7 @@
*/
-#include "vpx_config.h"
+#include "vpx_ports/config.h"
#include "blockd.h"
#include "vpx_mem/vpx_mem.h"
#include "onyxc_int.h"
@@ -20,17 +20,37 @@
extern void vp8_init_scan_order_mask();
-static void update_mode_info_border(MODE_INFO *mi, int rows, int cols)
+static void update_mode_info_border( VP8_COMMON *cpi, MODE_INFO *mi_base )
{
+ int stride = cpi->mode_info_stride;
int i;
- vpx_memset(mi - cols - 2, 0, sizeof(MODE_INFO) * (cols + 1));
- for (i = 0; i < rows; i++)
+ // Clear down top border row
+ vpx_memset(mi_base, 0, sizeof(MODE_INFO) * cpi->mode_info_stride);
+
+ // Clear left border column
+ for (i = 1; i < cpi->mb_rows+1; i++)
{
- /* TODO(holmer): Bug? This updates the last element of each row
- * rather than the border element!
- */
- vpx_memset(&mi[i*cols-1], 0, sizeof(MODE_INFO));
+ vpx_memset(&mi_base[i*stride], 0, sizeof(MODE_INFO));
+ }
+}
+static void update_mode_info_in_image( VP8_COMMON *cpi, MODE_INFO *mi )
+{
+ int stride = cpi->mode_info_stride;
+ int rows = cpi->mb_rows;
+ int cols = cpi->mb_cols;
+ int i, j;
+
+ // For each in image mode_info element set the in image flag to 1
+ for (i = 0; i < cpi->mb_rows; i++)
+ {
+ for (j = 0; j < cpi->mb_cols; j++)
+ {
+ mi->mbmi.mb_in_image = 1;
+ mi++; // Next element in the row
+ }
+
+ mi++; // Step over border element at start of next row
}
}
@@ -116,7 +136,7 @@ int vp8_alloc_frame_buffers(VP8_COMMON *oci, int width, int height)
oci->mi = oci->mip + oci->mode_info_stride + 1;
/* allocate memory for last frame MODE_INFO array */
-#if CONFIG_ERROR_CONCEALMENT
+
oci->prev_mip = vpx_calloc((oci->mb_cols + 1) * (oci->mb_rows + 1), sizeof(MODE_INFO));
if (!oci->prev_mip)
@@ -126,10 +146,6 @@ int vp8_alloc_frame_buffers(VP8_COMMON *oci, int width, int height)
}
oci->prev_mi = oci->prev_mip + oci->mode_info_stride + 1;
-#else
- oci->prev_mip = NULL;
- oci->prev_mi = NULL;
-#endif
oci->above_context = vpx_calloc(sizeof(ENTROPY_CONTEXT_PLANES) * oci->mb_cols, 1);
@@ -139,10 +155,8 @@ int vp8_alloc_frame_buffers(VP8_COMMON *oci, int width, int height)
return 1;
}
- update_mode_info_border(oci->mi, oci->mb_rows, oci->mb_cols);
-#if CONFIG_ERROR_CONCEALMENT
- update_mode_info_border(oci->prev_mi, oci->mb_rows, oci->mb_cols);
-#endif
+ update_mode_info_border(oci, oci->mip);
+ update_mode_info_in_image(oci, oci->mi);
return 0;
}
@@ -153,10 +167,10 @@ void vp8_setup_version(VP8_COMMON *cm)
if (!CONFIG_EXPERIMENTAL)
vpx_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM,
"Bitstream was created by an experimental "
- "encoder");
+ "encoder");
cm->experimental = 1;
}
-
+
switch (cm->version & 0x3)
{
case 0:
@@ -172,17 +186,19 @@ void vp8_setup_version(VP8_COMMON *cm)
cm->full_pixel = 0;
break;
case 2:
+ case 3:
cm->no_lpf = 1;
cm->filter_type = NORMAL_LOOPFILTER;
cm->use_bilinear_mc_filter = 1;
cm->full_pixel = 0;
break;
- case 3:
- cm->no_lpf = 1;
- cm->filter_type = SIMPLE_LOOPFILTER;
- cm->use_bilinear_mc_filter = 1;
- cm->full_pixel = 1;
- break;
+ // Full pel only code deprecated in experimental code base
+ //case 3:
+ // cm->no_lpf = 1;
+ // cm->filter_type = SIMPLE_LOOPFILTER;
+ // cm->use_bilinear_mc_filter = 1;
+ // cm->full_pixel = 1;
+ // break;
}
}
void vp8_create_common(VP8_COMMON *oci)
@@ -190,14 +206,16 @@ void vp8_create_common(VP8_COMMON *oci)
vp8_machine_specific_config(oci);
vp8_init_mbmode_probs(oci);
+
vp8_default_bmode_probs(oci->fc.bmode_prob);
+ oci->txfm_mode = ONLY_4X4;
oci->mb_no_coeff_skip = 1;
+ oci->comp_pred_mode = HYBRID_PREDICTION;
oci->no_lpf = 0;
oci->filter_type = NORMAL_LOOPFILTER;
oci->use_bilinear_mc_filter = 0;
oci->full_pixel = 0;
- oci->multi_token_partition = ONE_PARTITION;
oci->clr_type = REG_YUV;
oci->clamp_type = RECON_CLAMP_REQUIRED;
@@ -207,6 +225,9 @@ void vp8_create_common(VP8_COMMON *oci)
/* Default disable buffer to buffer copying */
oci->copy_buffer_to_gf = 0;
oci->copy_buffer_to_arf = 0;
+#if CONFIG_QIMODE
+ oci->kf_ymode_probs_update = 0;
+#endif
}
void vp8_remove_common(VP8_COMMON *oci)
diff --git a/vp8/common/arm/arm_systemdependent.c b/vp8/common/arm/arm_systemdependent.c
index 2b45afe4b..c0467cd84 100644
--- a/vp8/common/arm/arm_systemdependent.c
+++ b/vp8/common/arm/arm_systemdependent.c
@@ -9,7 +9,7 @@
*/
-#include "vpx_config.h"
+#include "vpx_ports/config.h"
#include "vpx_ports/arm.h"
#include "vp8/common/g_common.h"
#include "vp8/common/pragmas.h"
diff --git a/vp8/common/arm/filter_arm.c b/vp8/common/arm/filter_arm.c
index 6d95eb8e3..6582fb29a 100644
--- a/vp8/common/arm/filter_arm.c
+++ b/vp8/common/arm/filter_arm.c
@@ -9,7 +9,7 @@
*/
-#include "vpx_config.h"
+#include "vpx_ports/config.h"
#include <math.h>
#include "vp8/common/filter.h"
#include "vp8/common/subpixel.h"
diff --git a/vp8/common/arm/neon/recon_neon.c b/vp8/common/arm/neon/recon_neon.c
index d2aafd51f..09fd2a56f 100644
--- a/vp8/common/arm/neon/recon_neon.c
+++ b/vp8/common/arm/neon/recon_neon.c
@@ -9,7 +9,7 @@
*/
-#include "vpx_config.h"
+#include "vpx_ports/config.h"
#include "vp8/common/recon.h"
#include "vp8/common/blockd.h"
diff --git a/vp8/common/arm/reconintra_arm.c b/vp8/common/arm/reconintra_arm.c
index cd82baf7c..f8f4dca3e 100644
--- a/vp8/common/arm/reconintra_arm.c
+++ b/vp8/common/arm/reconintra_arm.c
@@ -9,7 +9,7 @@
*/
-#include "vpx_config.h"
+#include "vpx_ports/config.h"
#include "vp8/common/blockd.h"
#include "vp8/common/reconintra.h"
#include "vpx_mem/vpx_mem.h"
diff --git a/vp8/common/blockd.c b/vp8/common/blockd.c
index 1fc3cd0ca..60ef31217 100644
--- a/vp8/common/blockd.c
+++ b/vp8/common/blockd.c
@@ -12,6 +12,7 @@
#include "blockd.h"
#include "vpx_mem/vpx_mem.h"
+
const unsigned char vp8_block2left[25] =
{
0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8
@@ -20,3 +21,13 @@ const unsigned char vp8_block2above[25] =
{
0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 4, 5, 6, 7, 6, 7, 8
};
+
+const unsigned char vp8_block2left_8x8[25] =
+{
+ 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 4, 6, 6, 6, 6, 8
+};
+const unsigned char vp8_block2above_8x8[25] =
+{
+ 0, 0, 0, 0, 2, 2, 2, 2, 0, 0, 0, 0, 2, 2, 2, 2, 4, 4, 4, 4, 6, 6, 6, 6, 8
+};
+
diff --git a/vp8/common/blockd.h b/vp8/common/blockd.h
index 6cb3fe1bb..89fe03516 100644
--- a/vp8/common/blockd.h
+++ b/vp8/common/blockd.h
@@ -14,21 +14,26 @@
void vpx_log(const char *format, ...);
-#include "vpx_config.h"
+#include "vpx_ports/config.h"
#include "vpx_scale/yv12config.h"
#include "mv.h"
#include "treecoder.h"
#include "subpixel.h"
#include "vpx_ports/mem.h"
+#include "common.h"
#define TRUE 1
#define FALSE 0
+//#define MODE_STATS
+
/*#define DCPRED 1*/
#define DCPREDSIMTHRESH 0
#define DCPREDCNTTHRESH 3
#define MB_FEATURE_TREE_PROBS 3
+#define PREDICTION_PROBS 3
+
#define MAX_MB_SEGMENTS 4
#define MAX_REF_LF_DELTAS 4
@@ -60,11 +65,13 @@ typedef struct
extern const unsigned char vp8_block2left[25];
extern const unsigned char vp8_block2above[25];
+extern const unsigned char vp8_block2left_8x8[25];
+extern const unsigned char vp8_block2above_8x8[25];
+
#define VP8_COMBINEENTROPYCONTEXTS( Dest, A, B) \
Dest = ((A)!=0) + ((B)!=0);
-
typedef enum
{
KEY_FRAME = 0,
@@ -77,6 +84,7 @@ typedef enum
V_PRED, /* vertical prediction */
H_PRED, /* horizontal prediction */
TM_PRED, /* Truemotion prediction */
+ I8X8_PRED, /* 8x8 based prediction, each 8x8 has its own prediction mode */
B_PRED, /* block based prediction, each block has its own prediction mode */
NEARESTMV,
@@ -88,21 +96,32 @@ typedef enum
MB_MODE_COUNT
} MB_PREDICTION_MODE;
-/* Macroblock level features */
+// Segment level features.
typedef enum
{
- MB_LVL_ALT_Q = 0, /* Use alternate Quantizer .... */
- MB_LVL_ALT_LF = 1, /* Use alternate loop filter value... */
- MB_LVL_MAX = 2 /* Number of MB level features supported */
+ SEG_LVL_ALT_Q = 0, // Use alternate Quantizer ....
+ SEG_LVL_ALT_LF = 1, // Use alternate loop filter value...
+ SEG_LVL_REF_FRAME = 2, // Optional Segment reference frame
+ SEG_LVL_MODE = 3, // Optional Segment mode
+ SEG_LVL_EOB = 4, // EOB end stop marker.
+ SEG_LVL_TRANSFORM = 5, // Block transform size.
+ SEG_LVL_MAX = 6 // Number of MB level features supported
-} MB_LVL_FEATURES;
+} SEG_LVL_FEATURES;
-/* Segment Feature Masks */
-#define SEGMENT_ALTQ 0x01
-#define SEGMENT_ALT_LF 0x02
+// Segment level features.
+typedef enum
+{
+ TX_4X4 = 0, // 4x4 dct transform
+ TX_8X8 = 1, // 8x8 dct transform
+
+ TX_SIZE_MAX = 2 // Number of differnt transforms avaialble
+
+} TX_SIZE;
#define VP8_YMODES (B_PRED + 1)
#define VP8_UV_MODES (TM_PRED + 1)
+#define VP8_I8X8_MODES (TM_PRED + 1)
#define VP8_MVREFS (1 + SPLITMV - NEARESTMV)
@@ -139,7 +158,12 @@ typedef enum
union b_mode_info
{
- B_PREDICTION_MODE as_mode;
+ struct {
+ B_PREDICTION_MODE first;
+#if CONFIG_COMP_INTRA_PRED
+ B_PREDICTION_MODE second;
+#endif
+ } as_mode;
int_mv mv;
};
@@ -155,13 +179,26 @@ typedef enum
typedef struct
{
MB_PREDICTION_MODE mode, uv_mode;
- MV_REFERENCE_FRAME ref_frame;
- int_mv mv;
-
+#if CONFIG_COMP_INTRA_PRED
+ MB_PREDICTION_MODE second_mode, second_uv_mode;
+#endif
+ MV_REFERENCE_FRAME ref_frame, second_ref_frame;
+ TX_SIZE txfm_size;
+ int_mv mv, second_mv;
unsigned char partitioning;
unsigned char mb_skip_coeff; /* does this mb has coefficients at all, 1=no coefficients, 0=need decode tokens */
unsigned char need_to_clamp_mvs;
unsigned char segment_id; /* Which set of segmentation parameters should be used for this MB */
+
+ // Flags used for prediction status of various bistream signals
+ unsigned char seg_id_predicted;
+ unsigned char ref_predicted;
+
+ // Indicates if the mb is part of the image (1) vs border (0)
+ // This can be useful in determining whether the MB provides
+ // a valid predictor
+ unsigned char mb_in_image;
+
} MB_MODE_INFO;
typedef struct
@@ -205,8 +242,12 @@ typedef struct MacroBlockD
int fullpixel_mask;
YV12_BUFFER_CONFIG pre; /* Filtered copy of previous frame reconstruction */
+ struct {
+ uint8_t *y_buffer, *u_buffer, *v_buffer;
+ } second_pre;
YV12_BUFFER_CONFIG dst;
+ MODE_INFO *prev_mode_info_context;
MODE_INFO *mode_info_context;
int mode_info_stride;
@@ -229,13 +270,24 @@ typedef struct MacroBlockD
unsigned char update_mb_segmentation_data;
/* 0 (do not update) 1 (update) the macroblock segmentation feature data. */
- unsigned char mb_segement_abs_delta;
+ unsigned char mb_segment_abs_delta;
/* Per frame flags that define which MB level features (such as quantizer or loop filter level) */
/* are enabled and when enabled the proabilities used to decode the per MB flags in MB_MODE_INFO */
- vp8_prob mb_segment_tree_probs[MB_FEATURE_TREE_PROBS]; /* Probability Tree used to code Segment number */
- signed char segment_feature_data[MB_LVL_MAX][MAX_MB_SEGMENTS]; /* Segment parameters */
+ // Probability Tree used to code Segment number
+ vp8_prob mb_segment_tree_probs[MB_FEATURE_TREE_PROBS];
+
+
+ // Segment features
+ signed char segment_feature_data[MAX_MB_SEGMENTS][SEG_LVL_MAX];
+ unsigned int segment_feature_mask[MAX_MB_SEGMENTS];
+
+#if CONFIG_FEATUREUPDATES
+ // keep around the last set so we can figure out what updates...
+ unsigned int old_segment_feature_mask[MAX_MB_SEGMENTS];
+ signed char old_segment_feature_data[MAX_MB_SEGMENTS][SEG_LVL_MAX];
+#endif
/* mode_based Loop filter adjustment */
unsigned char mode_ref_lf_delta_enabled;
@@ -244,8 +296,8 @@ typedef struct MacroBlockD
/* Delta values have the range +/- MAX_LOOP_FILTER */
signed char last_ref_lf_deltas[MAX_REF_LF_DELTAS]; /* 0 = Intra, Last, GF, ARF */
signed char ref_lf_deltas[MAX_REF_LF_DELTAS]; /* 0 = Intra, Last, GF, ARF */
- signed char last_mode_lf_deltas[MAX_MODE_LF_DELTAS]; /* 0 = BPRED, ZERO_MV, MV, SPLIT */
- signed char mode_lf_deltas[MAX_MODE_LF_DELTAS]; /* 0 = BPRED, ZERO_MV, MV, SPLIT */
+ signed char last_mode_lf_deltas[MAX_MODE_LF_DELTAS]; /* 0 = BPRED, ZERO_MV, MV, SPLIT */
+ signed char mode_lf_deltas[MAX_MODE_LF_DELTAS]; /* 0 = BPRED, ZERO_MV, MV, SPLIT */
/* Distance of MB away from frame edges */
int mb_to_left_edge;
@@ -253,15 +305,17 @@ typedef struct MacroBlockD
int mb_to_top_edge;
int mb_to_bottom_edge;
- int ref_frame_cost[MAX_REF_FRAMES];
-
-
unsigned int frames_since_golden;
unsigned int frames_till_alt_ref_frame;
vp8_subpix_fn_t subpixel_predict;
vp8_subpix_fn_t subpixel_predict8x4;
vp8_subpix_fn_t subpixel_predict8x8;
vp8_subpix_fn_t subpixel_predict16x16;
+ vp8_subpix_fn_t subpixel_predict_avg8x8;
+ vp8_subpix_fn_t subpixel_predict_avg16x16;
+#if CONFIG_HIGH_PRECISION_MV
+ int allow_high_precision_mv;
+#endif /* CONFIG_HIGH_PRECISION_MV */
void *current_bc;
@@ -284,4 +338,20 @@ typedef struct MacroBlockD
extern void vp8_build_block_doffsets(MACROBLOCKD *x);
extern void vp8_setup_block_dptrs(MACROBLOCKD *x);
+static void update_blockd_bmi(MACROBLOCKD *xd)
+{
+ int i;
+ int is_4x4;
+ is_4x4 = (xd->mode_info_context->mbmi.mode == SPLITMV) ||
+ (xd->mode_info_context->mbmi.mode == I8X8_PRED) ||
+ (xd->mode_info_context->mbmi.mode == B_PRED);
+
+ if (is_4x4)
+ {
+ for (i = 0; i < 16; i++)
+ {
+ xd->block[i].bmi = xd->mode_info_context->bmi[i];
+ }
+ }
+}
#endif /* __INC_BLOCKD_H */
diff --git a/vp8/common/coefupdateprobs.h b/vp8/common/coefupdateprobs.h
index 9e194dc9a..05e456393 100644
--- a/vp8/common/coefupdateprobs.h
+++ b/vp8/common/coefupdateprobs.h
@@ -183,3 +183,178 @@ const vp8_prob vp8_coef_update_probs [BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTE
},
},
};
+const vp8_prob vp8_coef_update_probs_8x8 [BLOCK_TYPES]
+ [COEF_BANDS]
+ [PREV_COEF_CONTEXTS]
+ [ENTROPY_NODES] =
+{
+ {
+ {
+ {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, },
+ {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, },
+ {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, },
+ },
+ {
+ {255, 229, 255, 255, 255, 255, 255, 255, 255, 255, 255, },
+ {219, 234, 255, 255, 255, 255, 255, 255, 255, 255, 255, },
+ {239, 204, 229, 255, 255, 255, 255, 255, 255, 255, 255, },
+ },
+ {
+ {255, 209, 229, 255, 255, 255, 255, 255, 255, 255, 255, },
+ {239, 219, 255, 255, 255, 255, 255, 255, 255, 255, 255, },
+ {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, },
+ },
+ {
+ {255, 204, 229, 255, 255, 255, 255, 255, 255, 255, 255, },
+ {229, 209, 234, 255, 255, 255, 255, 255, 255, 255, 255, },
+ {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, },
+ },
+ {
+ {255, 193, 209, 255, 255, 255, 255, 255, 255, 255, 255, },
+ {229, 198, 239, 255, 255, 255, 255, 255, 255, 255, 255, },
+ {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, },
+ },
+ {
+ {255, 204, 204, 255, 255, 255, 255, 255, 255, 255, 255, },
+ {219, 198, 229, 255, 255, 255, 255, 255, 255, 255, 255, },
+ {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, },
+ },
+ {
+ {255, 198, 204, 255, 255, 255, 255, 255, 255, 255, 255, },
+ {209, 193, 234, 249, 255, 255, 255, 255, 255, 255, 255, },
+ {255, 255, 249, 255, 255, 255, 255, 255, 255, 255, 255, },
+ },
+ {
+ {255, 214, 214, 255, 255, 255, 255, 255, 255, 255, 255, },
+ {173, 193, 234, 255, 255, 255, 255, 255, 255, 255, 255, },
+ {249, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, },
+ },
+ },
+ {
+ {
+ {255, 255, 234, 255, 255, 255, 255, 255, 255, 255, 255, },
+ {224, 224, 219, 255, 255, 255, 255, 255, 255, 255, 255, },
+ {229, 239, 234, 255, 255, 255, 255, 255, 255, 255, 255, },
+ },
+ {
+ {255, 234, 224, 255, 255, 255, 255, 255, 255, 255, 255, },
+ {224, 234, 234, 255, 255, 255, 255, 255, 255, 255, 255, },
+ {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, },
+ },
+ {
+ {255, 255, 229, 255, 255, 255, 255, 255, 255, 255, 255, },
+ {229, 255, 234, 255, 255, 255, 255, 255, 255, 255, 255, },
+ {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, },
+ },
+ {
+ {255, 255, 229, 255, 255, 255, 255, 255, 255, 255, 255, },
+ {224, 255, 239, 255, 255, 255, 255, 255, 255, 255, 255, },
+ {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, },
+ },
+ {
+ {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, },
+ {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, },
+ {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, },
+ },
+ {
+ {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, },
+ {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, },
+ {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, },
+ },
+ {
+ {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, },
+ {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, },
+ {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, },
+ },
+ {
+ {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, },
+ {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, },
+ {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, },
+ },
+ },
+ {
+ {
+ {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, },
+ {224, 219, 234, 255, 255, 255, 255, 255, 255, 255, 255, },
+ {234, 183, 214, 255, 255, 255, 255, 255, 255, 255, 255, },
+ },
+ {
+ {255, 193, 229, 255, 249, 255, 255, 255, 255, 255, 255, },
+ {229, 214, 234, 249, 255, 255, 255, 255, 255, 255, 255, },
+ {255, 249, 255, 255, 249, 255, 255, 255, 255, 255, 255, },
+ },
+ {
+ {255, 198, 229, 255, 255, 255, 255, 255, 255, 255, 255, },
+ {229, 219, 249, 255, 255, 255, 255, 255, 255, 255, 255, },
+ {255, 255, 255, 249, 255, 255, 255, 255, 255, 255, 255, },
+ },
+ {
+ {255, 193, 224, 255, 255, 255, 255, 255, 255, 255, 255, },
+ {229, 204, 234, 249, 249, 255, 255, 255, 255, 255, 255, },
+ {255, 249, 249, 255, 244, 249, 255, 255, 255, 255, 255, },
+ },
+ {
+ {255, 178, 224, 255, 249, 255, 255, 255, 255, 255, 255, },
+ {234, 224, 234, 249, 255, 255, 255, 255, 255, 255, 255, },
+ {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, },
+ },
+ {
+ {255, 183, 229, 255, 249, 255, 255, 255, 255, 255, 255, },
+ {234, 219, 234, 255, 255, 255, 255, 255, 255, 255, 255, },
+ {255, 249, 249, 255, 249, 255, 255, 255, 255, 255, 255, },
+ },
+ {
+ {255, 193, 224, 249, 255, 244, 255, 255, 255, 255, 255, },
+ {219, 224, 229, 255, 255, 249, 255, 255, 255, 255, 255, },
+ {255, 255, 255, 249, 249, 255, 255, 255, 255, 255, 255, },
+ },
+ {
+ {255, 193, 229, 255, 255, 255, 255, 255, 255, 255, 255, },
+ {224, 224, 239, 255, 255, 255, 255, 255, 255, 255, 255, },
+ {249, 244, 249, 255, 255, 255, 255, 255, 255, 255, 255, },
+ },
+ },
+ {
+ {
+ {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, },
+ {249, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, },
+ {255, 239, 234, 244, 239, 244, 249, 255, 255, 255, 255, },
+ },
+ {
+ {255, 249, 239, 239, 244, 255, 255, 255, 255, 255, 255, },
+ {255, 249, 244, 255, 249, 255, 255, 255, 255, 255, 255, },
+ {255, 255, 239, 255, 255, 249, 255, 255, 255, 255, 255, },
+ },
+ {
+ {255, 244, 239, 239, 244, 255, 255, 255, 255, 255, 255, },
+ {255, 234, 239, 234, 249, 255, 255, 255, 255, 255, 255, },
+ {255, 255, 229, 239, 234, 249, 244, 255, 255, 255, 255, },
+ },
+ {
+ {255, 239, 229, 239, 234, 234, 255, 255, 255, 255, 255, },
+ {255, 239, 234, 229, 244, 239, 255, 234, 255, 255, 255, },
+ {255, 229, 209, 229, 239, 234, 244, 229, 255, 249, 255, },
+ },
+ {
+ {255, 239, 234, 229, 244, 249, 255, 249, 255, 255, 255, },
+ {255, 234, 229, 244, 234, 249, 255, 249, 255, 255, 255, },
+ {255, 229, 239, 229, 249, 255, 255, 244, 255, 255, 255, },
+ },
+ {
+ {255, 239, 234, 239, 234, 239, 255, 249, 255, 255, 255, },
+ {255, 229, 234, 239, 239, 239, 255, 244, 255, 255, 255, },
+ {255, 229, 234, 239, 239, 244, 255, 255, 255, 255, 255, },
+ },
+ {
+ {255, 219, 224, 229, 229, 234, 239, 224, 255, 255, 255, },
+ {255, 229, 229, 224, 234, 229, 239, 239, 255, 255, 255, },
+ {255, 229, 224, 239, 234, 239, 224, 224, 255, 249, 255, },
+ },
+ {
+ {255, 234, 229, 244, 229, 229, 255, 214, 255, 255, 255, },
+ {255, 239, 234, 239, 214, 239, 255, 209, 255, 255, 255, },
+ {249, 239, 219, 209, 219, 224, 239, 204, 255, 255, 255, },
+ },
+ },
+
+};
diff --git a/vp8/common/common.h b/vp8/common/common.h
index 9a93da991..999f79f2f 100644
--- a/vp8/common/common.h
+++ b/vp8/common/common.h
@@ -13,7 +13,7 @@
#define common_h 1
#include <assert.h>
-
+#include "vpx_config.h"
/* Interface header for common constant data structures and lookup tables */
#include "vpx_mem/vpx_mem.h"
@@ -38,5 +38,4 @@
#define vp8_zero_array( Dest, N) vpx_memset( Dest, 0, N * sizeof( *Dest));
-
#endif /* common_h */
diff --git a/vp8/common/debugmodes.c b/vp8/common/debugmodes.c
index 46064e61d..6d306578b 100644
--- a/vp8/common/debugmodes.c
+++ b/vp8/common/debugmodes.c
@@ -97,7 +97,12 @@ void vp8_print_modes_and_motion_vectors(MODE_INFO *mi, int rows, int cols, int f
bindex = (b_row & 3) * 4 + (b_col & 3);
if (mi[mb_index].mbmi.mode == B_PRED)
- fprintf(mvs, "%2d ", mi[mb_index].bmi[bindex].as_mode);
+ {
+ fprintf(mvs, "%2d ", mi[mb_index].bmi[bindex].as_mode.first);
+#if CONFIG_COMP_INTRA_PRED
+ fprintf(mvs, "%2d ", mi[mb_index].bmi[bindex].as_mode.second);
+#endif
+ }
else
fprintf(mvs, "xx ");
diff --git a/vp8/common/defaultcoefcounts.h b/vp8/common/defaultcoefcounts.h
new file mode 100644
index 000000000..d84361bf9
--- /dev/null
+++ b/vp8/common/defaultcoefcounts.h
@@ -0,0 +1,187 @@
+/*
+ * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+/* Generated file, included by entropy.c */
+
+static const unsigned int vp8_default_coef_counts_8x8[BLOCK_TYPES]
+ [COEF_BANDS]
+ [PREV_COEF_CONTEXTS]
+ [MAX_ENTROPY_TOKENS] =
+{
+
+ { /* block Type 0 */
+ { /* Coeff Band 0 */
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
+ },
+ { /* Coeff Band 1 */
+ { 21041, 13314, 3420, 592, 117, 0, 0, 0, 0, 0, 0, 11783},
+ { 48236, 6918, 586, 153, 0, 0, 0, 0, 0, 0, 0, 23137},
+ { 676112, 106685, 24701, 6003, 1426, 429, 165, 0, 0, 0, 0, 28910}
+ },
+ { /* Coeff Band 2 */
+ { 660107, 75227, 8451, 1345, 259, 0, 0, 0, 0, 0, 0, 0},
+ { 79164, 36835, 6865, 1185, 246, 47, 0, 0, 0, 0, 0, 2575},
+ { 19469, 14330, 3070, 579, 94, 6, 0, 0, 0, 0, 0, 44}
+ },
+ { /* Coeff Band 3 */
+ { 1978004, 235343, 28485, 3242, 271, 0, 0, 0, 0, 0, 0, 0},
+ { 228684, 106736, 21431, 2842, 272, 46, 0, 0, 0, 0, 0, 9266},
+ { 32470, 27496, 6852, 1386, 45, 93, 0, 0, 0, 0, 0, 0}
+ },
+ { /* Coeff Band 4 */
+ { 1911212, 224613, 49653, 13748, 2541, 568, 48, 0, 0, 0, 0, 0},
+ { 196670, 103472, 44473, 11490, 2432, 977, 72, 0, 0, 0, 0, 9447},
+ { 37876, 40417, 19142, 6069, 1799, 727, 51, 0, 0, 0, 0, 0}
+ },
+ { /* Coeff Band 5 */
+ { 3813399, 437714, 64387, 11312, 695, 219, 0, 0, 0, 0, 0, 0},
+ { 438288, 215917, 61905, 10194, 674, 107, 0, 0, 0, 0, 0, 17808},
+ { 99139, 93643, 30054, 5758, 802, 171, 0, 0, 0, 0, 0, 0}
+ },
+ { /* Coeff Band 6 */
+ { 12259383, 1625505, 234927, 46306, 8417, 1456, 151, 0, 0, 0, 0, 0},
+ { 1518161, 734287, 204240, 44228, 9462, 2240, 65, 0, 0, 0, 0, 107630},
+ { 292470, 258894, 94925, 25864, 6662, 2055, 170, 0, 0, 0, 0, 0}
+ },
+ { /* Coeff Band 7 */
+ { 9791308, 2118949, 169439, 16735, 1122, 0, 0, 0, 0, 0, 0, 0},
+ { 1500281, 752410, 123259, 13065, 1168, 47, 0, 0, 0, 0, 0, 707182},
+ { 193067, 142638, 31018, 4719, 516, 138, 0, 0, 0, 0, 0, 12439}
+ }
+ },
+ { /* block Type 1 */
+ { /* Coeff Band 0 */
+ { 16925, 10553, 852, 16, 63, 87, 47, 0, 0, 0, 0, 31232},
+ { 39777, 26839, 6822, 1908, 678, 456, 227, 168, 35, 0, 0, 46825},
+ { 17300, 16666, 4168, 1209, 492, 154, 118, 207, 0, 0, 0, 19608}
+ },
+ { /* Coeff Band 1 */
+ { 35882, 31722, 4625, 1270, 266, 237, 0, 0, 0, 0, 0, 0},
+ { 15426, 13894, 4482, 1305, 281, 43, 0, 0, 0, 0, 0, 18627},
+ { 3900, 6552, 3472, 1723, 746, 366, 115, 35, 0, 0, 0, 798}
+ },
+ { /* Coeff Band 2 */
+ { 21998, 29132, 3353, 679, 46, 0, 0, 0, 0, 0, 0, 0},
+ { 9098, 15767, 3794, 792, 268, 47, 0, 0, 0, 0, 0, 22402},
+ { 4007, 8472, 2844, 687, 217, 0, 0, 0, 0, 0, 0, 2739}
+ },
+ { /* Coeff Band 3 */
+ { 0, 31414, 2911, 682, 96, 0, 0, 0, 0, 0, 0, 0},
+ { 0, 16515, 4425, 938, 124, 0, 0, 0, 0, 0, 0, 31369},
+ { 0, 4833, 2787, 1213, 150, 0, 0, 0, 0, 0, 0, 3744}
+ },
+ { /* Coeff Band 4 */
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
+ },
+ { /* Coeff Band 5 */
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
+ },
+ { /* Coeff Band 6 */
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 52762},
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13326}
+ },
+ { /* Coeff Band 7 */
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
+ }
+ },
+ { /* block Type 2 */
+ { /* Coeff Band 0 */
+ { 4444, 1614, 120, 48, 0, 48, 0, 0, 0, 0, 0, 278},
+ { 192436, 103730, 24494, 9845, 4122, 1193, 102, 0, 0, 0, 0, 2577},
+ { 3473446, 2308716, 815510, 370374, 167797, 92152, 12073, 86, 0, 0, 0, 6801}
+ },
+ { /* Coeff Band 1 */
+ { 2150616, 1136388, 250011, 86888, 31434, 13746, 1243, 0, 0, 0, 0, 0},
+ { 1179945, 799802, 266012, 106787, 40809, 16486, 1546, 0, 0, 0, 0, 2673},
+ { 465128, 504130, 286989, 146259, 62380, 30192, 2866, 20, 0, 0, 0, 0}
+ },
+ { /* Coeff Band 2 */
+ { 2157762, 1177519, 282665, 108499, 43389, 23224, 2597, 34, 0, 0, 0, 0},
+ { 1135685, 813705, 278079, 123255, 53935, 29492, 3152, 39, 0, 0, 0, 2978},
+ { 391894, 428037, 264216, 144306, 69326, 40281, 5541, 29, 0, 0, 0, 38}
+ },
+ { /* Coeff Band 3 */
+ { 6669109, 3468471, 782161, 288484, 115500, 51083, 4943, 41, 0, 0, 0, 0},
+ { 3454493, 2361636, 809524, 337663, 141343, 65036, 6361, 0, 0, 0, 0, 8730},
+ { 1231825, 1359522, 824686, 420784, 185517, 98731, 10973, 72, 0, 0, 0, 20}
+ },
+ { /* Coeff Band 4 */
+ { 7606203, 3452846, 659856, 191703, 49335, 14336, 450, 0, 0, 0, 0, 0},
+ { 3806506, 2379332, 691697, 224938, 61966, 18324, 766, 0, 0, 0, 0, 8193},
+ { 1270110, 1283728, 628775, 243378, 72617, 24897, 1087, 0, 0, 0, 0, 0}
+ },
+ { /* Coeff Band 5 */
+ { 15314169, 7436809, 1579928, 515790, 167453, 58305, 3502, 19, 0, 0, 0, 0},
+ { 7021286, 4667922, 1545706, 574463, 191793, 68748, 4048, 1, 0, 0, 0, 17222},
+ { 2011989, 2145878, 1185336, 534879, 195719, 79103, 5343, 4, 0, 0, 0, 37}
+ },
+ { /* Coeff Band 6 */
+ { 63458382, 25384462, 4208045, 1091050, 299011, 95242, 5238, 33, 0, 0, 0, 0},
+ { 25638401, 14694085, 3945978, 1195420, 344813, 117355, 6703, 0, 0, 0, 0, 216811},
+ { 5988177, 5824044, 2754413, 1077350, 370739, 139710, 9693, 38, 0, 0, 0, 1835}
+ },
+ { /* Coeff Band 7 */
+ { 74998348, 29342158, 2955001, 452912, 69631, 9516, 37, 0, 0, 0, 0, 0},
+ { 24762356, 13281085, 2409883, 436787, 68948, 10658, 36, 0, 0, 0, 0, 6614989},
+ { 3882867, 3224489, 1052289, 252890, 46967, 8548, 154, 0, 0, 0, 0, 194354}
+ }
+ },
+ { /* block Type 3 */
+ { /* Coeff Band 0 */
+ { 10583, 12059, 3155, 1041, 248, 175, 24, 2, 0, 0, 0, 5717},
+ { 42461, 41782, 13553, 4966, 1352, 855, 89, 0, 0, 0, 0, 15000},
+ { 4691125, 5045589, 2673566, 1089317, 378161, 160268, 18252, 813, 69, 13, 0, 49}
+ },
+ { /* Coeff Band 1 */
+ { 1535203, 1685686, 924565, 390329, 141709, 60523, 5983, 171, 0, 0, 0, 0},
+ { 1594021, 1793276, 1016078, 441332, 164159, 70843, 8098, 311, 0, 0, 0, 11312},
+ { 1225223, 1430184, 888492, 460713, 203286, 115149, 22061, 804, 7, 0, 0, 0}
+ },
+ { /* Coeff Band 2 */
+ { 1522386, 1590366, 799910, 303691, 96625, 37608, 3637, 180, 33, 11, 0, 0},
+ { 1682184, 1793869, 913649, 353520, 113674, 46309, 4736, 221, 18, 3, 0, 963},
+ { 1574580, 1740474, 954392, 417994, 151400, 67091, 8000, 536, 73, 10, 0, 63}
+ },
+ { /* Coeff Band 3 */
+ { 4963672, 5197790, 2585383, 982161, 313333, 118498, 16014, 536, 62, 0, 0, 0},
+ { 5223913, 5569803, 2845858, 1107384, 364949, 147841, 18296, 658, 11, 11, 0, 1866},
+ { 4042207, 4548894, 2608767, 1154993, 446290, 221295, 41054, 2438, 124, 20, 0, 0}
+ },
+ { /* Coeff Band 4 */
+ { 3857216, 4431325, 2670447, 1330169, 553301, 286825, 46763, 1917, 0, 0, 0, 0},
+ { 4226215, 4963701, 3046198, 1523923, 644670, 355519, 58792, 2525, 0, 0, 0, 1298},
+ { 3831873, 4580350, 3018580, 1660048, 797298, 502983, 123906, 7172, 16, 0, 0, 0}
+ },
+ { /* Coeff Band 5 */
+ { 8524543, 9285149, 4979435, 2039330, 683458, 266032, 22628, 270, 0, 0, 0, 0},
+ { 9432163, 10428088, 5715661, 2385738, 838389, 326264, 29981, 361, 0, 0, 0, 884},
+ { 9039066, 10368964, 6136765, 2862030, 1098269, 511668, 63105, 945, 14, 0, 0, 0}
+ },
+ { /* Coeff Band 6 */
+ { 33222872, 34748297, 17701695, 7214933, 2602336, 1191859, 187873, 12667, 390, 3, 0, 0},
+ { 34765051, 37140719, 19525578, 8268934, 3085012, 1473864, 246743, 15258, 736, 3, 0, 8403},
+ { 28591289, 32252393, 19037068, 9213729, 4020653, 2372354, 586420, 67428, 3920, 92, 7, 3}
+ },
+ { /* Coeff Band 7 */
+ { 68604786, 60777665, 19712887, 5656955, 1520443, 507166, 51829, 2466, 10, 0, 0, 0},
+ { 55447403, 51682540, 19008774, 5928582, 1706884, 595531, 65998, 3661, 101, 0, 0, 8468343},
+ { 28321970, 29149398, 13565882, 5258675, 1868588, 898041, 192023, 21497, 672, 17, 0, 1884921}
+ }
+ }
+ };
diff --git a/vp8/common/entropy.c b/vp8/common/entropy.c
index 652450c78..2c1667225 100644
--- a/vp8/common/entropy.c
+++ b/vp8/common/entropy.c
@@ -60,6 +60,22 @@ DECLARE_ALIGNED(16, const int, vp8_default_zig_zag1d[16]) =
9, 12, 13, 10,
7, 11, 14, 15,
};
+DECLARE_ALIGNED(64, cuchar, vp8_coef_bands_8x8[64]) = { 0, 1, 2, 3, 5, 4, 4, 5,
+ 5, 3, 6, 3, 5, 4, 6, 6,
+ 6, 5, 5, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7
+};
+DECLARE_ALIGNED(64, const int, vp8_default_zig_zag1d_8x8[64]) =
+{
+ 0, 1, 8, 16, 9, 2, 3, 10, 17, 24, 32, 25, 18, 11, 4, 5,
+ 12, 19, 26, 33, 40, 48, 41, 34, 27, 20, 13, 6, 7, 14, 21, 28,
+ 35, 42, 49, 56, 57, 50, 43, 36, 29, 22, 15, 23, 30, 37, 44, 51,
+ 58, 59, 52, 45, 38, 31, 39, 46, 53, 60, 61, 54, 47, 55, 62, 63,
+};
DECLARE_ALIGNED(16, const short, vp8_default_inv_zig_zag[16]) =
{
@@ -70,8 +86,7 @@ DECLARE_ALIGNED(16, const short, vp8_default_inv_zig_zag[16]) =
};
DECLARE_ALIGNED(16, short, vp8_default_zig_zag_mask[16]);
-
-const int vp8_mb_feature_data_bits[MB_LVL_MAX] = {7, 6};
+DECLARE_ALIGNED(64, short, vp8_default_zig_zag_mask_8x8[64]);//int64_t
/* Array indices are identical to previously-existing CONTEXT_NODE indices */
@@ -113,7 +128,10 @@ void vp8_init_scan_order_mask()
{
vp8_default_zig_zag_mask[vp8_default_zig_zag1d[i]] = 1 << i;
}
-
+ for (i = 0; i < 64; i++)
+ {
+ vp8_default_zig_zag_mask_8x8[vp8_default_zig_zag1d_8x8[i]] = 1 << i;
+ }
}
static void init_bit_tree(vp8_tree_index *p, int n)
@@ -156,11 +174,37 @@ vp8_extra_bit_struct vp8_extra_bits[12] =
};
#include "default_coef_probs.h"
+#include "defaultcoefcounts.h"
void vp8_default_coef_probs(VP8_COMMON *pc)
{
+ int h;
vpx_memcpy(pc->fc.coef_probs, default_coef_probs,
sizeof(default_coef_probs));
+ h = 0;
+ do
+ {
+ int i = 0;
+
+ do
+ {
+ int k = 0;
+
+ do
+ {
+ unsigned int branch_ct [ENTROPY_NODES] [2];
+ vp8_tree_probs_from_distribution(
+ MAX_ENTROPY_TOKENS, vp8_coef_encodings, vp8_coef_tree,
+ pc->fc.coef_probs_8x8 [h][i][k], branch_ct, vp8_default_coef_counts_8x8 [h][i][k],
+ 256, 1);
+
+ }
+ while (++k < PREV_COEF_CONTEXTS);
+ }
+ while (++i < COEF_BANDS);
+ }
+ while (++h < BLOCK_TYPES);
+
}
void vp8_coef_tree_initialize()
diff --git a/vp8/common/entropy.h b/vp8/common/entropy.h
index 3c25453a7..c7a41f58b 100644
--- a/vp8/common/entropy.h
+++ b/vp8/common/entropy.h
@@ -14,7 +14,7 @@
#include "treecoder.h"
#include "blockd.h"
-
+#include "common.h"
/* Coefficient token alphabet */
#define ZERO_TOKEN 0 /* 0 Extra Bits 0+0 */
@@ -52,7 +52,6 @@ extern vp8_extra_bit_struct vp8_extra_bits[12]; /* indexed by token value */
#define MAX_PROB 255
#define DCT_MAX_VALUE 8192
-
/* Coefficients are predicted via a 3-dimensional probability table. */
/* Outside dimension. 0 = Y no DC, 1 = Y2, 2 = UV, 3 = Y with DC */
@@ -64,6 +63,7 @@ extern vp8_extra_bit_struct vp8_extra_bits[12]; /* indexed by token value */
#define COEF_BANDS 8
extern DECLARE_ALIGNED(16, const unsigned char, vp8_coef_bands[16]);
+extern DECLARE_ALIGNED(64, const unsigned char, vp8_coef_bands_8x8[64]);
/* Inside dimension is 3-valued measure of nearby complexity, that is,
the extent to which nearby coefficients are nonzero. For the first
@@ -87,15 +87,14 @@ extern DECLARE_ALIGNED(16, const unsigned char, vp8_coef_bands[16]);
extern DECLARE_ALIGNED(16, const unsigned char, vp8_prev_token_class[MAX_ENTROPY_TOKENS]);
extern const vp8_prob vp8_coef_update_probs [BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTEXTS] [ENTROPY_NODES];
-
+extern const vp8_prob vp8_coef_update_probs_8x8 [BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTEXTS] [ENTROPY_NODES];
struct VP8Common;
void vp8_default_coef_probs(struct VP8Common *);
-
extern DECLARE_ALIGNED(16, const int, vp8_default_zig_zag1d[16]);
extern DECLARE_ALIGNED(16, const short, vp8_default_inv_zig_zag[16]);
extern short vp8_default_zig_zag_mask[16];
-extern const int vp8_mb_feature_data_bits[MB_LVL_MAX];
-
+extern DECLARE_ALIGNED(64, const int, vp8_default_zig_zag1d_8x8[64]);
+extern short vp8_default_zig_zag_mask_8x8[64];//int64_t
void vp8_coef_tree_initialize(void);
#endif
diff --git a/vp8/common/entropymode.c b/vp8/common/entropymode.c
index 930e896ce..f220a6ba0 100644
--- a/vp8/common/entropymode.c
+++ b/vp8/common/entropymode.c
@@ -9,15 +9,59 @@
*/
+#include "modecont.h"
#include "entropymode.h"
#include "entropy.h"
#include "vpx_mem/vpx_mem.h"
-static const unsigned int kf_y_mode_cts[VP8_YMODES] = { 1607, 915, 812, 811, 5455};
-static const unsigned int y_mode_cts [VP8_YMODES] = { 8080, 1908, 1582, 1007, 5874};
+#if CONFIG_QIMODE
+const unsigned int kf_y_mode_cts[8][VP8_YMODES] =
+{
+ {17, 6, 5, 2, 22, 203},
+ {27, 13, 13, 6, 27, 170},
+ {35, 17, 18, 9, 26, 152},
+ {45, 22, 24, 12, 27, 126},
+ {58, 26, 29, 13, 26, 104},
+ {73, 33, 36, 17, 20, 78},
+ {88, 38, 39, 19, 16, 57},
+ {99, 42, 43, 21, 12, 39},
+};
+#else
+static const unsigned int kf_y_mode_cts[VP8_YMODES] = {
+ 49, 22, 23, 11, 23, 128};
+#endif
+
+static const unsigned int y_mode_cts [VP8_YMODES] = {
+ 106, 25, 21, 13, 16, 74};
+
+#if CONFIG_UVINTRA
+static const unsigned int uv_mode_cts [VP8_YMODES] [VP8_UV_MODES] ={
+ { 210, 20, 20, 6},
+ { 180, 60, 10, 6},
+ { 150, 20, 80, 6},
+ { 170, 35, 35, 16},
+ { 142, 51, 45, 18}, /* never used */
+ { 160, 40, 46, 10},
+};
+#else
static const unsigned int uv_mode_cts [VP8_UV_MODES] = { 59483, 13605, 16492, 4230};
+#endif
+
+static const unsigned int i8x8_mode_cts [VP8_UV_MODES] = {93, 69, 81, 13};
+
+#if CONFIG_UVINTRA
+static const unsigned int kf_uv_mode_cts [VP8_YMODES] [VP8_UV_MODES] ={
+ { 180, 34, 34, 8},
+ { 132, 74, 40, 10},
+ { 132, 40, 74, 10},
+ { 152, 46, 40, 18},
+ { 142, 51, 45, 18}, /* never used */
+ { 142, 51, 45, 18},
+};
+#else
static const unsigned int kf_uv_mode_cts[VP8_UV_MODES] = { 5319, 1904, 1703, 674};
+#endif
static const unsigned int bmode_cts[VP8_BINTRAMODES] =
{
@@ -117,23 +161,30 @@ const vp8_tree_index vp8_bmode_tree[18] = /* INTRAMODECONTEXTNODE value */
/* Again, these trees use the same probability indices as their
explicitly-programmed predecessors. */
-
-const vp8_tree_index vp8_ymode_tree[8] =
+const vp8_tree_index vp8_ymode_tree[10] =
{
-DC_PRED, 2,
4, 6,
-V_PRED, -H_PRED,
- -TM_PRED, -B_PRED
+ -TM_PRED, 8,
+ -B_PRED, -I8X8_PRED
};
-const vp8_tree_index vp8_kf_ymode_tree[8] =
+const vp8_tree_index vp8_kf_ymode_tree[10] =
{
-B_PRED, 2,
4, 6,
-DC_PRED, -V_PRED,
- -H_PRED, -TM_PRED
+ -H_PRED, 8,
+ -TM_PRED, -I8X8_PRED
};
+const vp8_tree_index vp8_i8x8_mode_tree[6] =
+{
+ -DC_PRED, 2,
+ -V_PRED, 4,
+ -H_PRED, -TM_PRED
+};
const vp8_tree_index vp8_uv_mode_tree[6] =
{
-DC_PRED, 2,
@@ -168,11 +219,33 @@ struct vp8_token_struct vp8_bmode_encodings [VP8_BINTRAMODES];
struct vp8_token_struct vp8_ymode_encodings [VP8_YMODES];
struct vp8_token_struct vp8_kf_ymode_encodings [VP8_YMODES];
struct vp8_token_struct vp8_uv_mode_encodings [VP8_UV_MODES];
+struct vp8_token_struct vp8_i8x8_mode_encodings [VP8_UV_MODES];
struct vp8_token_struct vp8_mbsplit_encodings [VP8_NUMMBSPLITS];
struct vp8_token_struct vp8_mv_ref_encoding_array [VP8_MVREFS];
struct vp8_token_struct vp8_sub_mv_ref_encoding_array [VP8_SUBMVREFS];
+#if CONFIG_HIGH_PRECISION_MV
+const vp8_tree_index vp8_small_mvtree_hp [30] =
+{
+ 2, 16,
+ 4, 10,
+ 6, 8,
+ -0, -1,
+ -2, -3,
+ 12, 14,
+ -4, -5,
+ -6, -7,
+ 18, 24,
+ 20, 22,
+ -8, -9,
+ -10, -11,
+ 26, 28,
+ -12, -13,
+ -14, -15
+};
+struct vp8_token_struct vp8_small_mvencodings_hp [16];
+#endif /* CONFIG_HIGH_PRECISION_MV */
const vp8_tree_index vp8_small_mvtree [14] =
{
@@ -184,9 +257,10 @@ const vp8_tree_index vp8_small_mvtree [14] =
-4, -5,
-6, -7
};
-
struct vp8_token_struct vp8_small_mvencodings [8];
+
+
void vp8_init_mbmode_probs(VP8_COMMON *x)
{
unsigned int bct [VP8_YMODES] [2]; /* num Ymodes > num UV modes */
@@ -196,22 +270,56 @@ void vp8_init_mbmode_probs(VP8_COMMON *x)
x->fc.ymode_prob, bct, y_mode_cts,
256, 1
);
+#if CONFIG_QIMODE
+ {
+ int i;
+ for (i=0;i<8;i++)
+ vp8_tree_probs_from_distribution(
+ VP8_YMODES, vp8_kf_ymode_encodings, vp8_kf_ymode_tree,
+ x->kf_ymode_prob[i], bct, kf_y_mode_cts[i],
+ 256, 1
+ );
+ }
+#else
vp8_tree_probs_from_distribution(
VP8_YMODES, vp8_kf_ymode_encodings, vp8_kf_ymode_tree,
x->kf_ymode_prob, bct, kf_y_mode_cts,
256, 1
);
+#endif
+#if CONFIG_UVINTRA
+ {
+ int i;
+ for (i=0;i<VP8_YMODES;i++)
+ {
+ vp8_tree_probs_from_distribution(
+ VP8_UV_MODES, vp8_uv_mode_encodings, vp8_uv_mode_tree,
+ x->kf_uv_mode_prob[i], bct, kf_uv_mode_cts[i],
+ 256, 1);
+ vp8_tree_probs_from_distribution(
+ VP8_UV_MODES, vp8_uv_mode_encodings, vp8_uv_mode_tree,
+ x->fc.uv_mode_prob[i], bct, uv_mode_cts[i],
+ 256, 1);
+ }
+ }
+#else
vp8_tree_probs_from_distribution(
VP8_UV_MODES, vp8_uv_mode_encodings, vp8_uv_mode_tree,
x->fc.uv_mode_prob, bct, uv_mode_cts,
- 256, 1
- );
+ 256, 1);
+
vp8_tree_probs_from_distribution(
VP8_UV_MODES, vp8_uv_mode_encodings, vp8_uv_mode_tree,
x->kf_uv_mode_prob, bct, kf_uv_mode_cts,
+ 256, 1);
+#endif
+ vp8_tree_probs_from_distribution(
+ VP8_UV_MODES, vp8_i8x8_mode_encodings, vp8_i8x8_mode_tree,
+ x->i8x8_mode_prob, bct, i8x8_mode_cts,
256, 1
- );
+ );
vpx_memcpy(x->fc.sub_mv_ref_prob, sub_mv_ref_prob, sizeof(sub_mv_ref_prob));
+
}
@@ -262,6 +370,7 @@ void vp8_entropy_mode_init()
vp8_tokens_from_tree(vp8_ymode_encodings, vp8_ymode_tree);
vp8_tokens_from_tree(vp8_kf_ymode_encodings, vp8_kf_ymode_tree);
vp8_tokens_from_tree(vp8_uv_mode_encodings, vp8_uv_mode_tree);
+ vp8_tokens_from_tree(vp8_i8x8_mode_encodings, vp8_i8x8_mode_tree);
vp8_tokens_from_tree(vp8_mbsplit_encodings, vp8_mbsplit_tree);
vp8_tokens_from_tree_offset(vp8_mv_ref_encoding_array,
@@ -270,4 +379,138 @@ void vp8_entropy_mode_init()
vp8_sub_mv_ref_tree, LEFT4X4);
vp8_tokens_from_tree(vp8_small_mvencodings, vp8_small_mvtree);
+#if CONFIG_HIGH_PRECISION_MV
+ vp8_tokens_from_tree(vp8_small_mvencodings_hp, vp8_small_mvtree_hp);
+#endif
+}
+
+void vp8_init_mode_contexts(VP8_COMMON *pc)
+{
+ vpx_memset(pc->mv_ref_ct, 0, sizeof(pc->mv_ref_ct));
+ vpx_memset(pc->mv_ref_ct_a, 0, sizeof(pc->mv_ref_ct_a));
+
+ vpx_memcpy( pc->mode_context,
+ default_vp8_mode_contexts,
+ sizeof (pc->mode_context));
+ vpx_memcpy( pc->mode_context_a,
+ default_vp8_mode_contexts,
+ sizeof (pc->mode_context_a));
+
+}
+
+void vp8_accum_mv_refs(VP8_COMMON *pc,
+ MB_PREDICTION_MODE m,
+ const int ct[4])
+{
+ int (*mv_ref_ct)[4][2];
+
+ if(pc->refresh_alt_ref_frame)
+ mv_ref_ct = pc->mv_ref_ct_a;
+ else
+ mv_ref_ct = pc->mv_ref_ct;
+
+ if (m == ZEROMV)
+ {
+ ++mv_ref_ct [ct[0]] [0] [0];
+ }
+ else
+ {
+ ++mv_ref_ct [ct[0]] [0] [1];
+ if (m == NEARESTMV)
+ {
+ ++mv_ref_ct [ct[1]] [1] [0];
+ }
+ else
+ {
+ ++mv_ref_ct [ct[1]] [1] [1];
+ if (m == NEARMV)
+ {
+ ++mv_ref_ct [ct[2]] [2] [0];
+ }
+ else
+ {
+ ++mv_ref_ct [ct[2]] [2] [1];
+ if (m == NEWMV)
+ {
+ ++mv_ref_ct [ct[3]] [3] [0];
+ }
+ else
+ {
+ ++mv_ref_ct [ct[3]] [3] [1];
+ }
+ }
+ }
+ }
+}
+
+void vp8_update_mode_context(VP8_COMMON *pc)
+{
+ int i, j;
+ int (*mv_ref_ct)[4][2];
+ int (*mode_context)[4];
+
+ if(pc->refresh_alt_ref_frame)
+ {
+ mv_ref_ct = pc->mv_ref_ct_a;
+ mode_context = pc->mode_context_a;
+ }
+ else
+ {
+ mv_ref_ct = pc->mv_ref_ct;
+ mode_context = pc->mode_context;
+ }
+
+ for (j = 0; j < 6; j++)
+ {
+ for (i = 0; i < 4; i++)
+ {
+ int this_prob;
+ int count = mv_ref_ct[j][i][0] + mv_ref_ct[j][i][1];
+ /* preventing rare occurances from skewing the probs */
+ if (count>=4)
+ {
+ this_prob = 256 * mv_ref_ct[j][i][0] / count;
+ this_prob = this_prob? (this_prob<255?this_prob:255):1;
+ mode_context[j][i] = this_prob;
+ }
+ }
+ }
+}
+#include "vp8/common/modecont.h"
+void print_mode_contexts(VP8_COMMON *pc)
+{
+ int j, i;
+ printf("====================\n");
+ for(j=0; j<6; j++)
+ {
+ for (i = 0; i < 4; i++)
+ {
+ printf( "%4d ", pc->mode_context[j][i]);
+ }
+ printf("\n");
+ }
+ printf("====================\n");
+ for(j=0; j<6; j++)
+ {
+ for (i = 0; i < 4; i++)
+ {
+ printf( "%4d ", pc->mode_context_a[j][i]);
+ }
+ printf("\n");
+ }
+
+}
+void print_mv_ref_cts(VP8_COMMON *pc)
+{
+ int j, i;
+ for(j=0; j<6; j++)
+ {
+ for (i = 0; i < 4; i++)
+ {
+ printf("(%4d:%4d) ",
+ pc->mv_ref_ct[j][i][0],
+ pc->mv_ref_ct[j][i][1]);
+ }
+ printf("\n");
+ }
}
diff --git a/vp8/common/entropymode.h b/vp8/common/entropymode.h
index fdb170df3..09d5c7704 100644
--- a/vp8/common/entropymode.h
+++ b/vp8/common/entropymode.h
@@ -38,7 +38,7 @@ extern const vp8_tree_index vp8_bmode_tree[];
extern const vp8_tree_index vp8_ymode_tree[];
extern const vp8_tree_index vp8_kf_ymode_tree[];
extern const vp8_tree_index vp8_uv_mode_tree[];
-
+extern const vp8_tree_index vp8_i8x8_mode_tree[];
extern const vp8_tree_index vp8_mbsplit_tree[];
extern const vp8_tree_index vp8_mv_ref_tree[];
extern const vp8_tree_index vp8_sub_mv_ref_tree[];
@@ -46,6 +46,7 @@ extern const vp8_tree_index vp8_sub_mv_ref_tree[];
extern struct vp8_token_struct vp8_bmode_encodings [VP8_BINTRAMODES];
extern struct vp8_token_struct vp8_ymode_encodings [VP8_YMODES];
extern struct vp8_token_struct vp8_kf_ymode_encodings [VP8_YMODES];
+extern struct vp8_token_struct vp8_i8x8_mode_encodings [VP8_UV_MODES];
extern struct vp8_token_struct vp8_uv_mode_encodings [VP8_UV_MODES];
extern struct vp8_token_struct vp8_mbsplit_encodings [VP8_NUMMBSPLITS];
@@ -55,12 +56,20 @@ extern struct vp8_token_struct vp8_mv_ref_encoding_array [VP8_MVREFS];
extern struct vp8_token_struct vp8_sub_mv_ref_encoding_array [VP8_SUBMVREFS];
extern const vp8_tree_index vp8_small_mvtree[];
-
extern struct vp8_token_struct vp8_small_mvencodings [8];
+#if CONFIG_HIGH_PRECISION_MV
+extern const vp8_tree_index vp8_small_mvtree_hp[];
+extern struct vp8_token_struct vp8_small_mvencodings_hp [16];
+#endif
void vp8_entropy_mode_init(void);
void vp8_init_mbmode_probs(VP8_COMMON *x);
+extern void vp8_init_mode_contexts(VP8_COMMON *pc);
+extern void vp8_update_mode_context(VP8_COMMON *pc);;
+extern void vp8_accum_mv_refs(VP8_COMMON *pc,
+ MB_PREDICTION_MODE m,
+ const int ct[4]);
void vp8_default_bmode_probs(vp8_prob dest [VP8_BINTRAMODES-1]);
void vp8_kf_default_bmode_probs(vp8_prob dest [VP8_BINTRAMODES] [VP8_BINTRAMODES] [VP8_BINTRAMODES-1]);
diff --git a/vp8/common/entropymv.c b/vp8/common/entropymv.c
index e5df1f095..90195f7bc 100644
--- a/vp8/common/entropymv.c
+++ b/vp8/common/entropymv.c
@@ -11,6 +11,41 @@
#include "entropymv.h"
+#if CONFIG_HIGH_PRECISION_MV
+const MV_CONTEXT_HP vp8_mv_update_probs_hp[2] =
+{
+ {{
+ 237,
+ 246,
+ 253, 253, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254,
+ 254, 254, 254, 254, 254, 250, 250, 252, 254, 254, 254
+ }},
+ {{
+ 231,
+ 243,
+ 245, 253, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254,
+ 254, 254, 254, 254, 254, 251, 251, 254, 254, 254, 254
+ }}
+};
+const MV_CONTEXT_HP vp8_default_mv_context_hp[2] =
+{
+ {{
+ /* row */
+ 162, /* is short */
+ 128, /* sign */
+ 220, 204, 180, 192, 192, 119, 192, 192, 180, 140, 192, 192, 224, 224, 224, /* short tree */
+ 128, 129, 132, 75, 145, 178, 206, 239, 254, 254, 254 /* long bits */
+ }},
+ {{
+ /* same for column */
+ 164, /* is short */
+ 128,
+ 220, 204, 180, 192, 192, 119, 192, 192, 180, 140, 192, 192, 224, 224, 224, /* short tree */
+ 128, 130, 130, 74, 148, 180, 203, 236, 254, 254, 254 /* long bits */
+ }}
+};
+#endif /* CONFIG_HIGH_PRECISION_MV */
+
const MV_CONTEXT vp8_mv_update_probs[2] =
{
{{
@@ -35,15 +70,11 @@ const MV_CONTEXT vp8_default_mv_context[2] =
225, 146, 172, 147, 214, 39, 156, /* short tree */
128, 129, 132, 75, 145, 178, 206, 239, 254, 254 /* long bits */
}},
-
-
-
{{
/* same for column */
164, /* is short */
128,
204, 170, 119, 235, 140, 230, 228,
128, 130, 130, 74, 148, 180, 203, 236, 254, 254 /* long bits */
-
}}
};
diff --git a/vp8/common/entropymv.h b/vp8/common/entropymv.h
index 2db1e385b..d97c12eab 100644
--- a/vp8/common/entropymv.h
+++ b/vp8/common/entropymv.h
@@ -13,16 +13,18 @@
#define __INC_ENTROPYMV_H
#include "treecoder.h"
+#include "vpx_config.h"
enum
{
mv_max = 1023, /* max absolute value of a MV component */
MVvals = (2 * mv_max) + 1, /* # possible values "" */
- mvfp_max = 255, /* max absolute value of a full pixel MV component */
- MVfpvals = (2 * mvfp_max) +1, /* # possible full pixel MV values */
-
mvlong_width = 10, /* Large MVs have 9 bit magnitudes */
mvnum_short = 8, /* magnitudes 0 through 7 */
+ mvnum_short_bits = 3, /* number of bits for short mvs */
+
+ mvfp_max = 255, /* max absolute value of a full pixel MV component */
+ MVfpvals = (2 * mvfp_max) + 1, /* # possible full pixel MV values */
/* probability offsets for coding each MV component */
@@ -41,4 +43,34 @@ typedef struct mv_context
extern const MV_CONTEXT vp8_mv_update_probs[2], vp8_default_mv_context[2];
+#if CONFIG_HIGH_PRECISION_MV
+enum
+{
+ mv_max_hp = 2047, /* max absolute value of a MV component */
+ MVvals_hp = (2 * mv_max_hp) + 1, /* # possible values "" */
+ mvlong_width_hp = 11, /* Large MVs have 9 bit magnitudes */
+ mvnum_short_hp = 16, /* magnitudes 0 through 15 */
+ mvnum_short_bits_hp = 4, /* number of bits for short mvs */
+
+ mvfp_max_hp = 255, /* max absolute value of a full pixel MV component */
+ MVfpvals_hp = (2 * mvfp_max_hp) + 1, /* # possible full pixel MV values */
+
+ /* probability offsets for coding each MV component */
+
+ mvpis_short_hp = 0, /* short (<= 7) vs long (>= 8) */
+ MVPsign_hp, /* sign for non-zero */
+ MVPshort_hp, /* 8 short values = 7-position tree */
+
+ MVPbits_hp = MVPshort_hp + mvnum_short_hp - 1, /* mvlong_width long value bits */
+ MVPcount_hp = MVPbits_hp + mvlong_width_hp /* (with independent probabilities) */
+};
+
+typedef struct mv_context_hp
+{
+ vp8_prob prob[MVPcount_hp]; /* often come in row, col pairs */
+} MV_CONTEXT_HP;
+
+extern const MV_CONTEXT_HP vp8_mv_update_probs_hp[2], vp8_default_mv_context_hp[2];
+#endif /* CONFIG_HIGH_PRECISION_MV */
+
#endif
diff --git a/vp8/common/filter.c b/vp8/common/filter.c
index ae5952952..d1ef79666 100644
--- a/vp8/common/filter.c
+++ b/vp8/common/filter.c
@@ -13,8 +13,26 @@
#include "filter.h"
#include "vpx_ports/mem.h"
-DECLARE_ALIGNED(16, const short, vp8_bilinear_filters[8][2]) =
+DECLARE_ALIGNED(16, const short, vp8_bilinear_filters[SUBPEL_SHIFTS][2]) =
{
+#if SUBPEL_SHIFTS==16
+ { 128, 0 },
+ { 120, 8 },
+ { 112, 16 },
+ { 104, 24 },
+ { 96, 32 },
+ { 88, 40 },
+ { 80, 48 },
+ { 72, 56 },
+ { 64, 64 },
+ { 56, 72 },
+ { 48, 80 },
+ { 40, 88 },
+ { 32, 96 },
+ { 24, 104 },
+ { 16, 112 },
+ { 8, 120 }
+#else
{ 128, 0 },
{ 112, 16 },
{ 96, 32 },
@@ -23,8 +41,197 @@ DECLARE_ALIGNED(16, const short, vp8_bilinear_filters[8][2]) =
{ 48, 80 },
{ 32, 96 },
{ 16, 112 }
+#endif /* SUBPEL_SHIFTS==16 */
+};
+
+#if CONFIG_ENHANCED_INTERP
+#define FILTER_ALPHA 60
+DECLARE_ALIGNED(16, const short, vp8_sub_pel_filters[SUBPEL_SHIFTS][2*INTERP_EXTEND]) =
+{
+ /* Generated using MATLAB:
+ * alpha = 0.6;
+ * b=intfilt(8,4,alpha);
+ * bi=round(128*b);
+ * ba=flipud(reshape([bi 0], 8, 8));
+ * disp(num2str(ba, '%d,'))
+ */
+#if SUBPEL_SHIFTS==16
+#if FILTER_ALPHA == 70
+ /* alpha = 0.70 */
+ { 0, 0, 0, 128, 0, 0, 0, 0},
+ { 0, 2, -6, 126, 8, -3, 1, 0},
+ {-1, 4, -11, 123, 18, -7, 3, -1},
+ {-1, 5, -15, 119, 27, -10, 4, -1},
+ {-2, 6, -18, 113, 38, -13, 5, -1},
+ {-2, 7, -20, 106, 49, -16, 6, -2},
+ {-2, 8, -22, 98, 59, -18, 7, -2},
+ {-2, 8, -22, 89, 69, -20, 8, -2},
+ {-2, 8, -21, 79, 79, -21, 8, -2},
+ {-2, 8, -20, 69, 89, -22, 8, -2},
+ {-2, 7, -18, 59, 98, -22, 8, -2},
+ {-2, 6, -16, 49, 106, -20, 7, -2},
+ {-1, 5, -13, 38, 113, -18, 6, -2},
+ {-1, 4, -10, 27, 119, -15, 5, -1},
+ {-1, 3, -7, 18, 123, -11, 4, -1},
+ { 0, 1, -3, 8, 126, -6, 2, 0}
+#elif FILTER_ALPHA == 65
+ /* alpha = 0.65 */
+ { 0, 0, 0, 128, 0, 0, 0, 0},
+ { 0, 2, -6, 126, 8, -3, 1, 0},
+ {-1, 3, -10, 123, 18, -6, 2, -1},
+ {-1, 5, -14, 118, 27, -10, 4, -1},
+ {-1, 5, -17, 112, 38, -13, 5, -1},
+ {-2, 6, -19, 106, 48, -15, 5, -1},
+ {-2, 7, -21, 98, 59, -17, 6, -2},
+ {-2, 7, -21, 89, 69, -19, 7, -2},
+ {-2, 7, -20, 79, 79, -20, 7, -2},
+ {-2, 7, -19, 69, 89, -21, 7, -2},
+ {-2, 6, -17, 59, 98, -21, 7, -2},
+ {-1, 5, -15, 48, 106, -19, 6, -2},
+ {-1, 5, -13, 38, 112, -17, 5, -1},
+ {-1, 4, -10, 27, 118, -14, 5, -1},
+ {-1, 2, -6, 18, 123, -10, 3, -1},
+ { 0, 1, -3, 8, 126, -6, 2, 0}
+#elif FILTER_ALPHA == 60
+ /* alpha = 0.60 */
+ { 0, 0, 0, 128, 0, 0, 0, 0},
+ { 0, 2, -6, 126, 8, -3, 1, 0},
+ {-1, 3, -10, 123, 18, -6, 2, -1},
+ {-1, 4, -14, 118, 28, -9, 3, -1},
+ {-1, 5, -17, 112, 38, -12, 4, -1},
+ {-1, 6, -19, 105, 48, -15, 5, -1},
+ {-1, 6, -20, 97, 58, -17, 6, -1},
+ {-1, 6, -20, 88, 69, -19, 6, -1},
+ {-1, 6, -20, 79, 79, -20, 6, -1},
+ {-1, 6, -19, 69, 88, -20, 6, -1},
+ {-1, 6, -17, 58, 97, -20, 6, -1},
+ {-1, 5, -15, 48, 105, -19, 6, -1},
+ {-1, 4, -12, 38, 112, -17, 5, -1},
+ {-1, 3, -9, 28, 118, -14, 4, -1},
+ {-1, 2, -6, 18, 123, -10, 3, -1},
+ { 0, 1, -3, 8, 126, -6, 2, 0}
+#elif FILTER_ALPHA == 55
+ /* alpha = 0.55 */
+ { 0, 0, 0, 128, 0, 0, 0, 0},
+ { 0, 1, -5, 126, 8, -3, 1, 0},
+ {-1, 2, -10, 123, 18, -6, 2, 0},
+ {-1, 4, -13, 118, 27, -9, 3, -1},
+ {-1, 5, -16, 112, 37, -12, 4, -1},
+ {-1, 5, -18, 105, 48, -14, 4, -1},
+ {-1, 5, -19, 97, 58, -16, 5, -1},
+ {-1, 6, -19, 88, 68, -18, 5, -1},
+ {-1, 6, -19, 78, 78, -19, 6, -1},
+ {-1, 5, -18, 68, 88, -19, 6, -1},
+ {-1, 5, -16, 58, 97, -19, 5, -1},
+ {-1, 4, -14, 48, 105, -18, 5, -1},
+ {-1, 4, -12, 37, 112, -16, 5, -1},
+ {-1, 3, -9, 27, 118, -13, 4, -1},
+ { 0, 2, -6, 18, 123, -10, 2, -1},
+ { 0, 1, -3, 8, 126, -5, 1, 0}
+#elif FILTER_ALPHA == 50
+ /* alpha = 0.50 */
+ { 0, 0, 0, 128, 0, 0, 0, 0},
+ { 0, 1, -5, 126, 8, -3, 1, 0},
+ { 0, 2, -10, 122, 18, -6, 2, 0},
+ {-1, 3, -13, 118, 27, -9, 3, 0},
+ {-1, 4, -16, 112, 37, -11, 3, 0},
+ {-1, 5, -17, 104, 48, -14, 4, -1},
+ {-1, 5, -18, 96, 58, -16, 5, -1},
+ {-1, 5, -19, 88, 68, -17, 5, -1},
+ {-1, 5, -18, 78, 78, -18, 5, -1},
+ {-1, 5, -17, 68, 88, -19, 5, -1},
+ {-1, 5, -16, 58, 96, -18, 5, -1},
+ {-1, 4, -14, 48, 104, -17, 5, -1},
+ { 0, 3, -11, 37, 112, -16, 4, -1},
+ { 0, 3, -9, 27, 118, -13, 3, -1},
+ { 0, 2, -6, 18, 122, -10, 2, 0},
+ { 0, 1, -3, 8, 126, -5, 1, 0}
+#elif FILTER_ALPHA == 0
+ /* Lagrangian interpolation filter */
+ { 0, 0, 0, 128, 0, 0, 0, 0},
+ { 0, 1, -5, 126, 8, -3, 1, 0},
+ {-1, 3, -10, 122, 18, -6, 2, 0},
+ {-1, 4, -13, 118, 27, -9, 3, -1},
+ {-1, 4, -16, 112, 37, -11, 4, -1},
+ {-1, 5, -18, 105, 48, -14, 4, -1},
+ {-1, 5, -19, 97, 58, -16, 5, -1},
+ {-1, 6, -19, 88, 68, -18, 5, -1},
+ {-1, 6, -19, 78, 78, -19, 6, -1},
+ {-1, 5, -18, 68, 88, -19, 6, -1},
+ {-1, 5, -16, 58, 97, -19, 5, -1},
+ {-1, 4, -14, 48, 105, -18, 5, -1},
+ {-1, 4, -11, 37, 112, -16, 4, -1},
+ {-1, 3, -9, 27, 118, -13, 4, -1},
+ { 0, 2, -6, 18, 122, -10, 3, -1},
+ { 0, 1, -3, 8, 126, -5, 1, 0}
+#endif /* FILTER_ALPHA */
+#else /* SUBPEL_SHIFTS==16 */
+#if FILTER_ALPHA == 70
+ /* alpha = 0.70 */
+ { 0, 0, 0, 128, 0, 0, 0, 0},
+ {-1, 4, -11, 123, 18, -7, 3, -1},
+ {-2, 6, -18, 113, 38, -13, 5, -1},
+ {-2, 8, -22, 98, 59, -18, 7, -2},
+ {-2, 8, -21, 79, 79, -21, 8, -2},
+ {-2, 7, -18, 59, 98, -22, 8, -2},
+ {-1, 5, -13, 38, 113, -18, 6, -2},
+ {-1, 3, -7, 18, 123, -11, 4, -1}
+#elif FILTER_ALPHA == 65
+ /* alpha = 0.65 */
+ { 0, 0, 0, 128, 0, 0, 0, 0},
+ {-1, 3, -10, 123, 18, -6, 2, -1},
+ {-1, 5, -17, 112, 38, -13, 5, -1},
+ {-2, 7, -21, 98, 59, -17, 6, -2},
+ {-2, 7, -20, 79, 79, -20, 7, -2},
+ {-2, 6, -17, 59, 98, -21, 7, -2},
+ {-1, 5, -13, 38, 112, -17, 5, -1},
+ {-1, 2, -6, 18, 123, -10, 3, -1}
+#elif FILTER_ALPHA == 60
+ /* alpha = 0.60 */
+ { 0, 0, 0, 128, 0, 0, 0, 0},
+ {-1, 3, -10, 123, 18, -6, 2, -1},
+ {-1, 5, -17, 112, 38, -12, 4, -1},
+ {-1, 6, -20, 97, 58, -17, 6, -1},
+ {-1, 6, -20, 79, 79, -20, 6, -1},
+ {-1, 6, -17, 58, 97, -20, 6, -1},
+ {-1, 4, -12, 38, 112, -17, 5, -1},
+ {-1, 2, -6, 18, 123, -10, 3, -1}
+#elif FILTER_ALPHA == 55
+ /* alpha = 0.55 */
+ { 0, 0, 0, 128, 0, 0, 0, 0},
+ {-1, 2, -10, 123, 18, -6, 2, 0},
+ {-1, 5, -16, 112, 37, -12, 4, -1},
+ {-1, 5, -19, 97, 58, -16, 5, -1},
+ {-1, 6, -19, 78, 78, -19, 6, -1},
+ {-1, 5, -16, 58, 97, -19, 5, -1},
+ {-1, 4, -12, 37, 112, -16, 5, -1},
+ { 0, 2, -6, 18, 123, -10, 2, -1}
+#elif FILTER_ALPHA == 50
+ /* alpha = 0.50 */
+ { 0, 0, 0, 128, 0, 0, 0, 0},
+ { 0, 2, -10, 122, 18, -6, 2, 0},
+ {-1, 4, -16, 112, 37, -11, 3, 0},
+ {-1, 5, -18, 96, 58, -16, 5, -1},
+ {-1, 5, -18, 78, 78, -18, 5, -1},
+ {-1, 5, -16, 58, 96, -18, 5, -1},
+ { 0, 3, -11, 37, 112, -16, 4, -1},
+ { 0, 2, -6, 18, 122, -10, 2, 0}
+#elif FILTER_ALPHA == 0
+ /* Lagrangian interpolation filter */
+ { 0, 0, 0, 128, 0, 0, 0, 0},
+ {-1, 3, -10, 122, 18, -6, 2, 0},
+ {-1, 4, -16, 112, 37, -11, 4, -1},
+ {-1, 5, -19, 97, 58, -16, 5, -1},
+ {-1, 6, -19, 78, 78, -19, 6, -1},
+ {-1, 5, -16, 58, 97, -19, 5, -1},
+ {-1, 4, -11, 37, 112, -16, 4, -1},
+ { 0, 2, -6, 18, 122, -10, 3, -1},
+#endif /* FILTER_ALPHA */
+#endif /* SUBPEL_SHIFTS==16 */
};
+#else // CONFIG_ENHANCED_INTERP
+
DECLARE_ALIGNED(16, const short, vp8_sub_pel_filters[8][6]) =
{
@@ -38,6 +245,8 @@ DECLARE_ALIGNED(16, const short, vp8_sub_pel_filters[8][6]) =
{ 0, -1, 12, 123, -6, 0 },
};
+#endif // CONFIG_ENHANCED_INTERP
+
static void filter_block2d_first_pass
(
unsigned char *src_ptr,
@@ -56,13 +265,37 @@ static void filter_block2d_first_pass
{
for (j = 0; j < output_width; j++)
{
+#if INTERP_EXTEND == 3
Temp = ((int)src_ptr[-2 * (int)pixel_step] * vp8_filter[0]) +
((int)src_ptr[-1 * (int)pixel_step] * vp8_filter[1]) +
- ((int)src_ptr[0] * vp8_filter[2]) +
- ((int)src_ptr[pixel_step] * vp8_filter[3]) +
- ((int)src_ptr[2*pixel_step] * vp8_filter[4]) +
- ((int)src_ptr[3*pixel_step] * vp8_filter[5]) +
+ ((int)src_ptr[0] * vp8_filter[2]) +
+ ((int)src_ptr[pixel_step] * vp8_filter[3]) +
+ ((int)src_ptr[2*pixel_step] * vp8_filter[4]) +
+ ((int)src_ptr[3*pixel_step] * vp8_filter[5]) +
(VP8_FILTER_WEIGHT >> 1); /* Rounding */
+#elif INTERP_EXTEND == 4
+ Temp = ((int)src_ptr[-3 * (int)pixel_step] * vp8_filter[0]) +
+ ((int)src_ptr[-2 * (int)pixel_step] * vp8_filter[1]) +
+ ((int)src_ptr[-1 * (int)pixel_step] * vp8_filter[2]) +
+ ((int)src_ptr[0] * vp8_filter[3]) +
+ ((int)src_ptr[pixel_step] * vp8_filter[4]) +
+ ((int)src_ptr[2 * pixel_step] * vp8_filter[5]) +
+ ((int)src_ptr[3 * pixel_step] * vp8_filter[6]) +
+ ((int)src_ptr[4 * pixel_step] * vp8_filter[7]) +
+ (VP8_FILTER_WEIGHT >> 1); /* Rounding */
+#elif INTERP_EXTEND == 5
+ Temp = ((int)src_ptr[-4 * (int)pixel_step] * vp8_filter[0]) +
+ ((int)src_ptr[-3 * (int)pixel_step] * vp8_filter[1]) +
+ ((int)src_ptr[-2 * (int)pixel_step] * vp8_filter[2]) +
+ ((int)src_ptr[-1 * (int)pixel_step] * vp8_filter[3]) +
+ ((int)src_ptr[0] * vp8_filter[4]) +
+ ((int)src_ptr[pixel_step] * vp8_filter[5]) +
+ ((int)src_ptr[2 * pixel_step] * vp8_filter[6]) +
+ ((int)src_ptr[3 * pixel_step] * vp8_filter[7]) +
+ ((int)src_ptr[4 * pixel_step] * vp8_filter[8]) +
+ ((int)src_ptr[5 * pixel_step] * vp8_filter[9]) +
+ (VP8_FILTER_WEIGHT >> 1); /* Rounding */
+#endif
/* Normalize back to 0-255 */
Temp = Temp >> VP8_FILTER_SHIFT;
@@ -102,13 +335,37 @@ static void filter_block2d_second_pass
for (j = 0; j < output_width; j++)
{
/* Apply filter */
+#if INTERP_EXTEND == 3
Temp = ((int)src_ptr[-2 * (int)pixel_step] * vp8_filter[0]) +
((int)src_ptr[-1 * (int)pixel_step] * vp8_filter[1]) +
- ((int)src_ptr[0] * vp8_filter[2]) +
- ((int)src_ptr[pixel_step] * vp8_filter[3]) +
- ((int)src_ptr[2*pixel_step] * vp8_filter[4]) +
- ((int)src_ptr[3*pixel_step] * vp8_filter[5]) +
+ ((int)src_ptr[0] * vp8_filter[2]) +
+ ((int)src_ptr[pixel_step] * vp8_filter[3]) +
+ ((int)src_ptr[2*pixel_step] * vp8_filter[4]) +
+ ((int)src_ptr[3*pixel_step] * vp8_filter[5]) +
(VP8_FILTER_WEIGHT >> 1); /* Rounding */
+#elif INTERP_EXTEND == 4
+ Temp = ((int)src_ptr[-3 * (int)pixel_step] * vp8_filter[0]) +
+ ((int)src_ptr[-2 * (int)pixel_step] * vp8_filter[1]) +
+ ((int)src_ptr[-1 * (int)pixel_step] * vp8_filter[2]) +
+ ((int)src_ptr[0] * vp8_filter[3]) +
+ ((int)src_ptr[pixel_step] * vp8_filter[4]) +
+ ((int)src_ptr[2 * pixel_step] * vp8_filter[5]) +
+ ((int)src_ptr[3 * pixel_step] * vp8_filter[6]) +
+ ((int)src_ptr[4 * pixel_step] * vp8_filter[7]) +
+ (VP8_FILTER_WEIGHT >> 1); /* Rounding */
+#elif INTERP_EXTEND == 5
+ Temp = ((int)src_ptr[-4 * (int)pixel_step] * vp8_filter[0]) +
+ ((int)src_ptr[-3 * (int)pixel_step] * vp8_filter[1]) +
+ ((int)src_ptr[-2 * (int)pixel_step] * vp8_filter[2]) +
+ ((int)src_ptr[-1 * (int)pixel_step] * vp8_filter[3]) +
+ ((int)src_ptr[0] * vp8_filter[4]) +
+ ((int)src_ptr[pixel_step] * vp8_filter[5]) +
+ ((int)src_ptr[2 * pixel_step] * vp8_filter[6]) +
+ ((int)src_ptr[3 * pixel_step] * vp8_filter[7]) +
+ ((int)src_ptr[4 * pixel_step] * vp8_filter[8]) +
+ ((int)src_ptr[5 * pixel_step] * vp8_filter[9]) +
+ (VP8_FILTER_WEIGHT >> 1); /* Rounding */
+#endif
/* Normalize back to 0-255 */
Temp = Temp >> VP8_FILTER_SHIFT;
@@ -128,6 +385,83 @@ static void filter_block2d_second_pass
}
}
+/*
+ * The only functional difference between filter_block2d_second_pass()
+ * and this function is that filter_block2d_second_pass() does a sixtap
+ * filter on the input and stores it in the output. This function
+ * (filter_block2d_second_pass_avg()) does a sixtap filter on the input,
+ * and then averages that with the content already present in the output
+ * ((filter_result + dest + 1) >> 1) and stores that in the output.
+ */
+static void filter_block2d_second_pass_avg
+(
+ int *src_ptr,
+ unsigned char *output_ptr,
+ int output_pitch,
+ unsigned int src_pixels_per_line,
+ unsigned int pixel_step,
+ unsigned int output_height,
+ unsigned int output_width,
+ const short *vp8_filter
+)
+{
+ unsigned int i, j;
+ int Temp;
+
+ for (i = 0; i < output_height; i++)
+ {
+ for (j = 0; j < output_width; j++)
+ {
+ /* Apply filter */
+#if INTERP_EXTEND == 3
+ Temp = ((int)src_ptr[-2 * (int)pixel_step] * vp8_filter[0]) +
+ ((int)src_ptr[-1 * (int)pixel_step] * vp8_filter[1]) +
+ ((int)src_ptr[0] * vp8_filter[2]) +
+ ((int)src_ptr[pixel_step] * vp8_filter[3]) +
+ ((int)src_ptr[2*pixel_step] * vp8_filter[4]) +
+ ((int)src_ptr[3*pixel_step] * vp8_filter[5]) +
+ (VP8_FILTER_WEIGHT >> 1); /* Rounding */
+#elif INTERP_EXTEND == 4
+ Temp = ((int)src_ptr[-3 * (int)pixel_step] * vp8_filter[0]) +
+ ((int)src_ptr[-2 * (int)pixel_step] * vp8_filter[1]) +
+ ((int)src_ptr[-1 * (int)pixel_step] * vp8_filter[2]) +
+ ((int)src_ptr[0] * vp8_filter[3]) +
+ ((int)src_ptr[pixel_step] * vp8_filter[4]) +
+ ((int)src_ptr[2 * pixel_step] * vp8_filter[5]) +
+ ((int)src_ptr[3 * pixel_step] * vp8_filter[6]) +
+ ((int)src_ptr[4 * pixel_step] * vp8_filter[7]) +
+ (VP8_FILTER_WEIGHT >> 1); /* Rounding */
+#elif INTERP_EXTEND == 5
+ Temp = ((int)src_ptr[-4 * (int)pixel_step] * vp8_filter[0]) +
+ ((int)src_ptr[-3 * (int)pixel_step] * vp8_filter[1]) +
+ ((int)src_ptr[-2 * (int)pixel_step] * vp8_filter[2]) +
+ ((int)src_ptr[-1 * (int)pixel_step] * vp8_filter[3]) +
+ ((int)src_ptr[0] * vp8_filter[4]) +
+ ((int)src_ptr[pixel_step] * vp8_filter[5]) +
+ ((int)src_ptr[2 * pixel_step] * vp8_filter[6]) +
+ ((int)src_ptr[3 * pixel_step] * vp8_filter[7]) +
+ ((int)src_ptr[4 * pixel_step] * vp8_filter[8]) +
+ ((int)src_ptr[5 * pixel_step] * vp8_filter[9]) +
+ (VP8_FILTER_WEIGHT >> 1); /* Rounding */
+#endif
+
+ /* Normalize back to 0-255 */
+ Temp = Temp >> VP8_FILTER_SHIFT;
+
+ if (Temp < 0)
+ Temp = 0;
+ else if (Temp > 255)
+ Temp = 255;
+
+ output_ptr[j] = (unsigned char) ((output_ptr[j] + Temp + 1) >> 1);
+ src_ptr++;
+ }
+
+ /* Start next row */
+ src_ptr += src_pixels_per_line - output_width;
+ output_ptr += output_pitch;
+ }
+}
static void filter_block2d
(
@@ -139,13 +473,14 @@ static void filter_block2d
const short *VFilter
)
{
- int FData[9*4]; /* Temp data buffer used in filtering */
+ int FData[(3+INTERP_EXTEND*2)*4]; /* Temp data buffer used in filtering */
/* First filter 1-D horizontally... */
- filter_block2d_first_pass(src_ptr - (2 * src_pixels_per_line), FData, src_pixels_per_line, 1, 9, 4, HFilter);
+ filter_block2d_first_pass(src_ptr - ((INTERP_EXTEND-1) * src_pixels_per_line), FData, src_pixels_per_line, 1,
+ 3+INTERP_EXTEND*2, 4, HFilter);
/* then filter verticaly... */
- filter_block2d_second_pass(FData + 8, output_ptr, output_pitch, 4, 4, 4, 4, VFilter);
+ filter_block2d_second_pass(FData + 4*(INTERP_EXTEND-1), output_ptr, output_pitch, 4, 4, 4, 4, VFilter);
}
@@ -179,20 +514,48 @@ void vp8_sixtap_predict8x8_c
{
const short *HFilter;
const short *VFilter;
- int FData[13*16]; /* Temp data buffer used in filtering */
+ // int FData[(7+INTERP_EXTEND*2)*16]; /* Temp data buffer used in filtering */
+ int FData[(7+INTERP_EXTEND*2)*8]; /* Temp data buffer used in filtering */
HFilter = vp8_sub_pel_filters[xoffset]; /* 6 tap */
VFilter = vp8_sub_pel_filters[yoffset]; /* 6 tap */
/* First filter 1-D horizontally... */
- filter_block2d_first_pass(src_ptr - (2 * src_pixels_per_line), FData, src_pixels_per_line, 1, 13, 8, HFilter);
+ filter_block2d_first_pass(src_ptr - ((INTERP_EXTEND-1) * src_pixels_per_line), FData, src_pixels_per_line, 1,
+ 7+INTERP_EXTEND*2, 8, HFilter);
/* then filter verticaly... */
- filter_block2d_second_pass(FData + 16, dst_ptr, dst_pitch, 8, 8, 8, 8, VFilter);
+ filter_block2d_second_pass(FData + 8*(INTERP_EXTEND-1), dst_ptr, dst_pitch, 8, 8, 8, 8, VFilter);
}
+void vp8_sixtap_predict_avg8x8_c
+(
+ unsigned char *src_ptr,
+ int src_pixels_per_line,
+ int xoffset,
+ int yoffset,
+ unsigned char *dst_ptr,
+ int dst_pitch
+)
+{
+ const short *HFilter;
+ const short *VFilter;
+ // int FData[(7+INTERP_EXTEND*2)*16]; /* Temp data buffer used in filtering */
+ int FData[(7+INTERP_EXTEND*2)*8]; /* Temp data buffer used in filtering */
+
+ HFilter = vp8_sub_pel_filters[xoffset]; /* 6 tap */
+ VFilter = vp8_sub_pel_filters[yoffset]; /* 6 tap */
+
+ /* First filter 1-D horizontally... */
+ filter_block2d_first_pass(src_ptr - ((INTERP_EXTEND-1) * src_pixels_per_line), FData, src_pixels_per_line, 1,
+ 7+INTERP_EXTEND*2, 8, HFilter);
+
+ /* then filter verticaly... */
+ filter_block2d_second_pass_avg(FData + 8*(INTERP_EXTEND-1), dst_ptr, dst_pitch, 8, 8, 8, 8, VFilter);
+}
+
void vp8_sixtap_predict8x4_c
(
unsigned char *src_ptr,
@@ -205,17 +568,19 @@ void vp8_sixtap_predict8x4_c
{
const short *HFilter;
const short *VFilter;
- int FData[13*16]; /* Temp data buffer used in filtering */
+ // int FData[(7+INTERP_EXTEND*2)*16]; /* Temp data buffer used in filtering */
+ int FData[(3+INTERP_EXTEND*2)*8]; /* Temp data buffer used in filtering */
HFilter = vp8_sub_pel_filters[xoffset]; /* 6 tap */
VFilter = vp8_sub_pel_filters[yoffset]; /* 6 tap */
/* First filter 1-D horizontally... */
- filter_block2d_first_pass(src_ptr - (2 * src_pixels_per_line), FData, src_pixels_per_line, 1, 9, 8, HFilter);
+ filter_block2d_first_pass(src_ptr - ((INTERP_EXTEND-1) * src_pixels_per_line), FData, src_pixels_per_line, 1,
+ 3+INTERP_EXTEND*2, 8, HFilter);
/* then filter verticaly... */
- filter_block2d_second_pass(FData + 16, dst_ptr, dst_pitch, 8, 8, 4, 8, VFilter);
+ filter_block2d_second_pass(FData + 8*(INTERP_EXTEND-1), dst_ptr, dst_pitch, 8, 8, 4, 8, VFilter);
}
@@ -231,20 +596,48 @@ void vp8_sixtap_predict16x16_c
{
const short *HFilter;
const short *VFilter;
- int FData[21*24]; /* Temp data buffer used in filtering */
+ // int FData[(15+INTERP_EXTEND*2)*24]; /* Temp data buffer used in filtering */
+ int FData[(15+INTERP_EXTEND*2)*16]; /* Temp data buffer used in filtering */
HFilter = vp8_sub_pel_filters[xoffset]; /* 6 tap */
VFilter = vp8_sub_pel_filters[yoffset]; /* 6 tap */
/* First filter 1-D horizontally... */
- filter_block2d_first_pass(src_ptr - (2 * src_pixels_per_line), FData, src_pixels_per_line, 1, 21, 16, HFilter);
+ filter_block2d_first_pass(src_ptr - ((INTERP_EXTEND-1) * src_pixels_per_line), FData, src_pixels_per_line, 1,
+ 15+INTERP_EXTEND*2, 16, HFilter);
/* then filter verticaly... */
- filter_block2d_second_pass(FData + 32, dst_ptr, dst_pitch, 16, 16, 16, 16, VFilter);
+ filter_block2d_second_pass(FData + 16*(INTERP_EXTEND-1), dst_ptr, dst_pitch, 16, 16, 16, 16, VFilter);
}
+void vp8_sixtap_predict_avg16x16_c
+(
+ unsigned char *src_ptr,
+ int src_pixels_per_line,
+ int xoffset,
+ int yoffset,
+ unsigned char *dst_ptr,
+ int dst_pitch
+)
+{
+ const short *HFilter;
+ const short *VFilter;
+ // int FData[(15+INTERP_EXTEND*2)*24]; /* Temp data buffer used in filtering */
+ int FData[(15+INTERP_EXTEND*2)*16]; /* Temp data buffer used in filtering */
+
+ HFilter = vp8_sub_pel_filters[xoffset]; /* 6 tap */
+ VFilter = vp8_sub_pel_filters[yoffset]; /* 6 tap */
+
+ /* First filter 1-D horizontally... */
+ filter_block2d_first_pass(src_ptr - ((INTERP_EXTEND-1) * src_pixels_per_line), FData,
+ src_pixels_per_line, 1, 15+INTERP_EXTEND*2, 16, HFilter);
+
+ /* then filter verticaly... */
+ filter_block2d_second_pass_avg(FData + 16*(INTERP_EXTEND-1), dst_ptr, dst_pitch,
+ 16, 16, 16, 16, VFilter);
+}
/****************************************************************************
*
@@ -349,6 +742,44 @@ static void filter_block2d_bil_second_pass
}
}
+/*
+ * As before for filter_block2d_second_pass_avg(), the functional difference
+ * between filter_block2d_bil_second_pass() and filter_block2d_bil_second_pass_avg()
+ * is that filter_block2d_bil_second_pass() does a bilinear filter on input
+ * and stores the result in output; filter_block2d_bil_second_pass_avg(),
+ * instead, does a bilinear filter on input, averages the resulting value
+ * with the values already present in the output and stores the result of
+ * that back into the output ((filter_result + dest + 1) >> 1).
+ */
+static void filter_block2d_bil_second_pass_avg
+(
+ unsigned short *src_ptr,
+ unsigned char *dst_ptr,
+ int dst_pitch,
+ unsigned int height,
+ unsigned int width,
+ const short *vp8_filter
+)
+{
+ unsigned int i, j;
+ int Temp;
+
+ for (i = 0; i < height; i++)
+ {
+ for (j = 0; j < width; j++)
+ {
+ /* Apply filter */
+ Temp = ((int)src_ptr[0] * vp8_filter[0]) +
+ ((int)src_ptr[width] * vp8_filter[1]) +
+ (VP8_FILTER_WEIGHT / 2);
+ dst_ptr[j] = (unsigned int)(((Temp >> VP8_FILTER_SHIFT) + dst_ptr[j] + 1) >> 1);
+ src_ptr++;
+ }
+
+ /* Next row... */
+ dst_ptr += dst_pitch;
+ }
+}
/****************************************************************************
*
@@ -395,6 +826,26 @@ static void filter_block2d_bil
filter_block2d_bil_second_pass(FData, dst_ptr, dst_pitch, Height, Width, VFilter);
}
+static void filter_block2d_bil_avg
+(
+ unsigned char *src_ptr,
+ unsigned char *dst_ptr,
+ unsigned int src_pitch,
+ unsigned int dst_pitch,
+ const short *HFilter,
+ const short *VFilter,
+ int Width,
+ int Height
+)
+{
+ unsigned short FData[17*16]; /* Temp data buffer used in filtering */
+
+ /* First filter 1-D horizontally... */
+ filter_block2d_bil_first_pass(src_ptr, FData, src_pitch, Height + 1, Width, HFilter);
+
+ /* then 1-D vertically... */
+ filter_block2d_bil_second_pass_avg(FData, dst_ptr, dst_pitch, Height, Width, VFilter);
+}
void vp8_bilinear_predict4x4_c
(
@@ -454,6 +905,26 @@ void vp8_bilinear_predict8x8_c
}
+void vp8_bilinear_predict_avg8x8_c
+(
+ unsigned char *src_ptr,
+ int src_pixels_per_line,
+ int xoffset,
+ int yoffset,
+ unsigned char *dst_ptr,
+ int dst_pitch
+)
+{
+ const short *HFilter;
+ const short *VFilter;
+
+ HFilter = vp8_bilinear_filters[xoffset];
+ VFilter = vp8_bilinear_filters[yoffset];
+
+ filter_block2d_bil_avg(src_ptr, dst_ptr, src_pixels_per_line,
+ dst_pitch, HFilter, VFilter, 8, 8);
+}
+
void vp8_bilinear_predict8x4_c
(
unsigned char *src_ptr,
@@ -492,3 +963,23 @@ void vp8_bilinear_predict16x16_c
filter_block2d_bil(src_ptr, dst_ptr, src_pixels_per_line, dst_pitch, HFilter, VFilter, 16, 16);
}
+
+void vp8_bilinear_predict_avg16x16_c
+(
+ unsigned char *src_ptr,
+ int src_pixels_per_line,
+ int xoffset,
+ int yoffset,
+ unsigned char *dst_ptr,
+ int dst_pitch
+)
+{
+ const short *HFilter;
+ const short *VFilter;
+
+ HFilter = vp8_bilinear_filters[xoffset];
+ VFilter = vp8_bilinear_filters[yoffset];
+
+ filter_block2d_bil_avg(src_ptr, dst_ptr, src_pixels_per_line,
+ dst_pitch, HFilter, VFilter, 16, 16);
+}
diff --git a/vp8/common/filter.h b/vp8/common/filter.h
index 0f225c25a..d502216d2 100644
--- a/vp8/common/filter.h
+++ b/vp8/common/filter.h
@@ -8,15 +8,23 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-
#ifndef FILTER_H
#define FILTER_H
+#include "vpx_config.h"
+#include "vpx_scale/yv12config.h"
+
#define BLOCK_HEIGHT_WIDTH 4
#define VP8_FILTER_WEIGHT 128
#define VP8_FILTER_SHIFT 7
-extern const short vp8_bilinear_filters[8][2];
-extern const short vp8_sub_pel_filters[8][6];
+#if CONFIG_SIXTEENTH_SUBPEL_UV
+#define SUBPEL_SHIFTS 16
+#else
+#define SUBPEL_SHIFTS 8
+#endif
+
+extern const short vp8_bilinear_filters[SUBPEL_SHIFTS][2];
+extern const short vp8_sub_pel_filters[SUBPEL_SHIFTS][INTERP_EXTEND*2];
#endif //FILTER_H
diff --git a/vp8/common/findnearmv.c b/vp8/common/findnearmv.c
index c1022363e..a74147106 100644
--- a/vp8/common/findnearmv.c
+++ b/vp8/common/findnearmv.c
@@ -21,10 +21,12 @@ const unsigned char vp8_mbsplit_offset[4][16] = {
/* Predict motion vectors using those from already-decoded nearby blocks.
Note that we only consider one 4x4 subblock from each candidate 16x16
macroblock. */
+
void vp8_find_near_mvs
(
MACROBLOCKD *xd,
const MODE_INFO *here,
+ const MODE_INFO *lf_here,
int_mv *nearest,
int_mv *nearby,
int_mv *best_mv,
@@ -36,6 +38,7 @@ void vp8_find_near_mvs
const MODE_INFO *above = here - xd->mode_info_stride;
const MODE_INFO *left = here - 1;
const MODE_INFO *aboveleft = above - 1;
+ const MODE_INFO *third = NULL;
int_mv near_mvs[4];
int_mv *mv = near_mvs;
int *cntx = cnt;
@@ -51,10 +54,10 @@ void vp8_find_near_mvs
if (above->mbmi.mv.as_int)
{
(++mv)->as_int = above->mbmi.mv.as_int;
- mv_bias(ref_frame_sign_bias[above->mbmi.ref_frame], refframe, mv, ref_frame_sign_bias);
+ mv_bias(ref_frame_sign_bias[above->mbmi.ref_frame],
+ refframe, mv, ref_frame_sign_bias);
++cntx;
}
-
*cntx += 2;
}
@@ -64,38 +67,44 @@ void vp8_find_near_mvs
if (left->mbmi.mv.as_int)
{
int_mv this_mv;
-
this_mv.as_int = left->mbmi.mv.as_int;
- mv_bias(ref_frame_sign_bias[left->mbmi.ref_frame], refframe, &this_mv, ref_frame_sign_bias);
+ mv_bias(ref_frame_sign_bias[left->mbmi.ref_frame],
+ refframe, &this_mv, ref_frame_sign_bias);
if (this_mv.as_int != mv->as_int)
{
(++mv)->as_int = this_mv.as_int;
++cntx;
}
-
*cntx += 2;
}
else
cnt[CNT_INTRA] += 2;
}
-
- /* Process above left */
- if (aboveleft->mbmi.ref_frame != INTRA_FRAME)
+ /* Process above left or the one frome last frame */
+ if ( aboveleft->mbmi.ref_frame != INTRA_FRAME||
+ (lf_here->mbmi.ref_frame==LAST_FRAME && refframe == LAST_FRAME))
{
if (aboveleft->mbmi.mv.as_int)
{
+ third = aboveleft;
+ }
+ else if(lf_here->mbmi.mv.as_int)
+ {
+ third = lf_here;
+ }
+ if(third)
+ {
int_mv this_mv;
-
- this_mv.as_int = aboveleft->mbmi.mv.as_int;
- mv_bias(ref_frame_sign_bias[aboveleft->mbmi.ref_frame], refframe, &this_mv, ref_frame_sign_bias);
+ this_mv.as_int = third->mbmi.mv.as_int;
+ mv_bias(ref_frame_sign_bias[third->mbmi.ref_frame],
+ refframe, &this_mv, ref_frame_sign_bias);
if (this_mv.as_int != mv->as_int)
{
(++mv)->as_int = this_mv.as_int;
++cntx;
}
-
*cntx += 1;
}
else
@@ -105,14 +114,16 @@ void vp8_find_near_mvs
/* If we have three distinct MV's ... */
if (cnt[CNT_SPLITMV])
{
- /* See if above-left MV can be merged with NEAREST */
+ /* See if the third MV can be merged with NEAREST */
if (mv->as_int == near_mvs[CNT_NEAREST].as_int)
cnt[CNT_NEAREST] += 1;
}
cnt[CNT_SPLITMV] = ((above->mbmi.mode == SPLITMV)
+ (left->mbmi.mode == SPLITMV)) * 2
- + (aboveleft->mbmi.mode == SPLITMV);
+ + (
+ lf_here->mbmi.mode == SPLITMV ||
+ aboveleft->mbmi.mode == SPLITMV);
/* Swap near and nearest if necessary */
if (cnt[CNT_NEAR] > cnt[CNT_NEAREST])
@@ -135,21 +146,40 @@ void vp8_find_near_mvs
nearest->as_int = near_mvs[CNT_NEAREST].as_int;
nearby->as_int = near_mvs[CNT_NEAR].as_int;
+ /* Make sure that the 1/8th bits of the Mvs are zero if high_precision
+ * is not being used, by truncating the last bit towards 0
+ */
+#if CONFIG_HIGH_PRECISION_MV
+ if (!xd->allow_high_precision_mv)
+ {
+ if (best_mv->as_mv.row & 1)
+ best_mv->as_mv.row += (best_mv->as_mv.row > 0 ? -1 : 1);
+ if (best_mv->as_mv.col & 1)
+ best_mv->as_mv.col += (best_mv->as_mv.col > 0 ? -1 : 1);
+ if (nearest->as_mv.row & 1)
+ nearest->as_mv.row += (nearest->as_mv.row > 0 ? -1 : 1);
+ if (nearest->as_mv.col & 1)
+ nearest->as_mv.col += (nearest->as_mv.col > 0 ? -1 : 1);
+ if (nearby->as_mv.row & 1)
+ nearby->as_mv.row += (nearby->as_mv.row > 0 ? -1 : 1);
+ if (nearby->as_mv.col & 1)
+ nearby->as_mv.col += (nearby->as_mv.col > 0 ? -1 : 1);
+ }
+#endif
+
//TODO: move clamp outside findnearmv
vp8_clamp_mv2(nearest, xd);
vp8_clamp_mv2(nearby, xd);
vp8_clamp_mv2(best_mv, xd);
}
-vp8_prob *vp8_mv_ref_probs(
+vp8_prob *vp8_mv_ref_probs(VP8_COMMON *pc,
vp8_prob p[VP8_MVREFS-1], const int near_mv_ref_ct[4]
)
{
- p[0] = vp8_mode_contexts [near_mv_ref_ct[0]] [0];
- p[1] = vp8_mode_contexts [near_mv_ref_ct[1]] [1];
- p[2] = vp8_mode_contexts [near_mv_ref_ct[2]] [2];
- p[3] = vp8_mode_contexts [near_mv_ref_ct[3]] [3];
- /*p[3] = vp8_mode_contexts [near_mv_ref_ct[1] + near_mv_ref_ct[2] + near_mv_ref_ct[3]] [3];*/
+ p[0] = pc->vp8_mode_contexts [near_mv_ref_ct[0]] [0];
+ p[1] = pc->vp8_mode_contexts [near_mv_ref_ct[1]] [1];
+ p[2] = pc->vp8_mode_contexts [near_mv_ref_ct[2]] [2];
+ p[3] = pc->vp8_mode_contexts [near_mv_ref_ct[3]] [3];
return p;
}
-
diff --git a/vp8/common/findnearmv.h b/vp8/common/findnearmv.h
index c142a0415..523000b55 100644
--- a/vp8/common/findnearmv.h
+++ b/vp8/common/findnearmv.h
@@ -16,6 +16,7 @@
#include "blockd.h"
#include "modecont.h"
#include "treecoder.h"
+#include "onyxc_int.h"
static void mv_bias(int refmb_ref_frame_sign_bias, int refframe, int_mv *mvp, const int *ref_frame_sign_bias)
@@ -75,13 +76,14 @@ void vp8_find_near_mvs
(
MACROBLOCKD *xd,
const MODE_INFO *here,
+ const MODE_INFO *lfhere,
int_mv *nearest, int_mv *nearby, int_mv *best,
int near_mv_ref_cts[4],
int refframe,
int *ref_frame_sign_bias
);
-vp8_prob *vp8_mv_ref_probs(
+vp8_prob *vp8_mv_ref_probs(VP8_COMMON *pc,
vp8_prob p[VP8_MVREFS-1], const int near_mv_ref_ct[4]
);
@@ -125,8 +127,6 @@ static B_PREDICTION_MODE left_block_mode(const MODE_INFO *cur_mb, int b)
--cur_mb;
switch (cur_mb->mbmi.mode)
{
- case B_PRED:
- return (cur_mb->bmi + b + 3)->as_mode;
case DC_PRED:
return B_DC_PRED;
case V_PRED:
@@ -135,15 +135,18 @@ static B_PREDICTION_MODE left_block_mode(const MODE_INFO *cur_mb, int b)
return B_HE_PRED;
case TM_PRED:
return B_TM_PRED;
+ case I8X8_PRED:
+ case B_PRED:
+ return (cur_mb->bmi + b + 3)->as_mode.first;
default:
return B_DC_PRED;
}
}
-
- return (cur_mb->bmi + b - 1)->as_mode;
+ return (cur_mb->bmi + b - 1)->as_mode.first;
}
-static B_PREDICTION_MODE above_block_mode(const MODE_INFO *cur_mb, int b, int mi_stride)
+static B_PREDICTION_MODE above_block_mode(const MODE_INFO
+ *cur_mb, int b, int mi_stride)
{
if (!(b >> 2))
{
@@ -152,8 +155,6 @@ static B_PREDICTION_MODE above_block_mode(const MODE_INFO *cur_mb, int b, int mi
switch (cur_mb->mbmi.mode)
{
- case B_PRED:
- return (cur_mb->bmi + b + 12)->as_mode;
case DC_PRED:
return B_DC_PRED;
case V_PRED:
@@ -162,12 +163,15 @@ static B_PREDICTION_MODE above_block_mode(const MODE_INFO *cur_mb, int b, int mi
return B_HE_PRED;
case TM_PRED:
return B_TM_PRED;
+ case I8X8_PRED:
+ case B_PRED:
+ return (cur_mb->bmi + b + 12)->as_mode.first;
default:
return B_DC_PRED;
}
}
- return (cur_mb->bmi + b - 4)->as_mode;
+ return (cur_mb->bmi + b - 4)->as_mode.first;
}
#endif
diff --git a/vp8/common/generic/systemdependent.c b/vp8/common/generic/systemdependent.c
index 75b0984bb..6168dc5ef 100644
--- a/vp8/common/generic/systemdependent.c
+++ b/vp8/common/generic/systemdependent.c
@@ -9,7 +9,7 @@
*/
-#include "vpx_config.h"
+#include "vpx_ports/config.h"
#include "vp8/common/g_common.h"
#include "vp8/common/subpixel.h"
#include "vp8/common/loopfilter.h"
@@ -17,54 +17,9 @@
#include "vp8/common/idct.h"
#include "vp8/common/onyxc_int.h"
-#if CONFIG_MULTITHREAD
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#elif defined(_WIN32)
-#include <windows.h>
-typedef void (WINAPI *PGNSI)(LPSYSTEM_INFO);
-#endif
-#endif
-
extern void vp8_arch_x86_common_init(VP8_COMMON *ctx);
extern void vp8_arch_arm_common_init(VP8_COMMON *ctx);
-#if CONFIG_MULTITHREAD
-static int get_cpu_count()
-{
- int core_count = 16;
-
-#if HAVE_UNISTD_H
-#if defined(_SC_NPROCESSORS_ONLN)
- core_count = sysconf(_SC_NPROCESSORS_ONLN);
-#elif defined(_SC_NPROC_ONLN)
- core_count = sysconf(_SC_NPROC_ONLN);
-#endif
-#elif defined(_WIN32)
- {
- PGNSI pGNSI;
- SYSTEM_INFO sysinfo;
-
- /* Call GetNativeSystemInfo if supported or
- * GetSystemInfo otherwise. */
-
- pGNSI = (PGNSI) GetProcAddress(
- GetModuleHandle(TEXT("kernel32.dll")), "GetNativeSystemInfo");
- if (pGNSI != NULL)
- pGNSI(&sysinfo);
- else
- GetSystemInfo(&sysinfo);
-
- core_count = sysinfo.dwNumberOfProcessors;
- }
-#else
- /* other platforms */
-#endif
-
- return core_count > 0 ? core_count : 1;
-}
-#endif
-
void vp8_machine_specific_config(VP8_COMMON *ctx)
{
#if CONFIG_RUNTIME_CPU_DETECT
@@ -75,34 +30,67 @@ void vp8_machine_specific_config(VP8_COMMON *ctx)
rtcd->idct.idct1_scalar_add = vp8_dc_only_idct_add_c;
rtcd->idct.iwalsh1 = vp8_short_inv_walsh4x4_1_c;
rtcd->idct.iwalsh16 = vp8_short_inv_walsh4x4_c;
-
+ rtcd->idct.idct8 = vp8_short_idct8x8_c;
+ rtcd->idct.idct1_scalar_add_8x8 = vp8_dc_only_idct_add_8x8_c;
+ rtcd->idct.ihaar2 = vp8_short_ihaar2x2_c;
rtcd->recon.copy16x16 = vp8_copy_mem16x16_c;
rtcd->recon.copy8x8 = vp8_copy_mem8x8_c;
+ rtcd->recon.avg16x16 = vp8_avg_mem16x16_c;
+ rtcd->recon.avg8x8 = vp8_avg_mem8x8_c;
rtcd->recon.copy8x4 = vp8_copy_mem8x4_c;
rtcd->recon.recon = vp8_recon_b_c;
+ rtcd->recon.recon_uv = vp8_recon_uv_b_c;
rtcd->recon.recon2 = vp8_recon2b_c;
rtcd->recon.recon4 = vp8_recon4b_c;
rtcd->recon.recon_mb = vp8_recon_mb_c;
rtcd->recon.recon_mby = vp8_recon_mby_c;
rtcd->recon.build_intra_predictors_mby =
vp8_build_intra_predictors_mby;
+#if CONFIG_COMP_INTRA_PRED
+ rtcd->recon.build_comp_intra_predictors_mby =
+ vp8_build_comp_intra_predictors_mby;
+#endif
rtcd->recon.build_intra_predictors_mby_s =
vp8_build_intra_predictors_mby_s;
rtcd->recon.build_intra_predictors_mbuv =
vp8_build_intra_predictors_mbuv;
rtcd->recon.build_intra_predictors_mbuv_s =
vp8_build_intra_predictors_mbuv_s;
+#if CONFIG_COMP_INTRA_PRED
+ rtcd->recon.build_comp_intra_predictors_mbuv =
+ vp8_build_comp_intra_predictors_mbuv;
+#endif
rtcd->recon.intra4x4_predict =
vp8_intra4x4_predict;
+#if CONFIG_COMP_INTRA_PRED
+ rtcd->recon.comp_intra4x4_predict =
+ vp8_comp_intra4x4_predict;
+#endif
+ rtcd->recon.intra8x8_predict =
+ vp8_intra8x8_predict;
+#if CONFIG_COMP_INTRA_PRED
+ rtcd->recon.comp_intra8x8_predict =
+ vp8_comp_intra8x8_predict;
+#endif
+ rtcd->recon.intra_uv4x4_predict =
+ vp8_intra_uv4x4_predict;
+#if CONFIG_COMP_INTRA_PRED
+ rtcd->recon.comp_intra_uv4x4_predict =
+ vp8_comp_intra_uv4x4_predict;
+#endif
- rtcd->subpix.sixtap16x16 = vp8_sixtap_predict16x16_c;
- rtcd->subpix.sixtap8x8 = vp8_sixtap_predict8x8_c;
- rtcd->subpix.sixtap8x4 = vp8_sixtap_predict8x4_c;
- rtcd->subpix.sixtap4x4 = vp8_sixtap_predict_c;
- rtcd->subpix.bilinear16x16 = vp8_bilinear_predict16x16_c;
- rtcd->subpix.bilinear8x8 = vp8_bilinear_predict8x8_c;
- rtcd->subpix.bilinear8x4 = vp8_bilinear_predict8x4_c;
- rtcd->subpix.bilinear4x4 = vp8_bilinear_predict4x4_c;
+ rtcd->subpix.sixtap16x16 = vp8_sixtap_predict16x16_c;
+ rtcd->subpix.sixtap8x8 = vp8_sixtap_predict8x8_c;
+ rtcd->subpix.sixtap_avg16x16 = vp8_sixtap_predict_avg16x16_c;
+ rtcd->subpix.sixtap_avg8x8 = vp8_sixtap_predict_avg8x8_c;
+ rtcd->subpix.sixtap8x4 = vp8_sixtap_predict8x4_c;
+ rtcd->subpix.sixtap4x4 = vp8_sixtap_predict_c;
+ rtcd->subpix.bilinear16x16 = vp8_bilinear_predict16x16_c;
+ rtcd->subpix.bilinear8x8 = vp8_bilinear_predict8x8_c;
+ rtcd->subpix.bilinear_avg16x16 = vp8_bilinear_predict_avg16x16_c;
+ rtcd->subpix.bilinear_avg8x8 = vp8_bilinear_predict_avg8x8_c;
+ rtcd->subpix.bilinear8x4 = vp8_bilinear_predict8x4_c;
+ rtcd->subpix.bilinear4x4 = vp8_bilinear_predict4x4_c;
rtcd->loopfilter.normal_mb_v = vp8_loop_filter_mbv_c;
rtcd->loopfilter.normal_b_v = vp8_loop_filter_bv_c;
@@ -133,17 +121,10 @@ void vp8_machine_specific_config(VP8_COMMON *ctx)
#if ARCH_ARM
vp8_arch_arm_common_init(ctx);
#endif
-#if CONFIG_EXTEND_QRANGE
rtcd->idct.idct1 = vp8_short_idct4x4llm_1_c;
rtcd->idct.idct16 = vp8_short_idct4x4llm_c;
rtcd->idct.idct1_scalar_add = vp8_dc_only_idct_add_c;
rtcd->idct.iwalsh1 = vp8_short_inv_walsh4x4_1_c;
rtcd->idct.iwalsh16 = vp8_short_inv_walsh4x4_c;
-#endif
-
-
-#if CONFIG_MULTITHREAD
- ctx->processor_core_count = get_cpu_count();
-#endif /* CONFIG_MULTITHREAD */
}
diff --git a/vp8/common/idct.h b/vp8/common/idct.h
index f5fd94dfd..e8ca23d66 100644
--- a/vp8/common/idct.h
+++ b/vp8/common/idct.h
@@ -31,6 +31,34 @@
#include "arm/idct_arm.h"
#endif
+
+#ifndef vp8_idct_idct8
+#define vp8_idct_idct8 vp8_short_idct8x8_c
+#endif
+extern prototype_idct(vp8_idct_idct8);
+
+#ifndef vp8_idct_idct8_1
+#define vp8_idct_idct8_1 vp8_short_idct8x8_1_c
+#endif
+extern prototype_idct(vp8_idct_idct8_1);
+
+#ifndef vp8_idct_ihaar2
+#define vp8_idct_ihaar2 vp8_short_ihaar2x2_c
+#endif
+extern prototype_idct(vp8_idct_ihaar2);
+
+#ifndef vp8_idct_ihaar2_1
+#define vp8_idct_ihaar2_1 vp8_short_ihaar2x2_1_c
+#endif
+extern prototype_idct(vp8_idct_ihaar2_1);
+
+#ifndef vp8_idct_idct1_scalar_add_8x8
+#define vp8_idct_idct1_scalar_add_8x8 vp8_dc_only_idct_add_8x8_c
+#endif
+extern prototype_idct_scalar_add(vp8_idct_idct1_scalar_add_8x8);
+
+
+
#ifndef vp8_idct_idct1
#define vp8_idct_idct1 vp8_short_idct4x4llm_1_c
#endif
@@ -69,6 +97,12 @@ typedef struct
vp8_second_order_fn_t iwalsh1;
vp8_second_order_fn_t iwalsh16;
+
+ vp8_idct_fn_t idct8;
+ vp8_idct_fn_t idct8_1;
+ vp8_idct_scalar_add_fn_t idct1_scalar_add_8x8;
+ vp8_idct_fn_t ihaar2;
+ vp8_idct_fn_t ihaar2_1;
} vp8_idct_rtcd_vtable_t;
#if CONFIG_RUNTIME_CPU_DETECT
diff --git a/vp8/common/idctllm.c b/vp8/common/idctllm.c
index a71e4be9c..f0536d5e4 100644
--- a/vp8/common/idctllm.c
+++ b/vp8/common/idctllm.c
@@ -22,11 +22,15 @@
* so
* x * sqrt(2) * cos (pi/8) = x + x * (sqrt(2) *cos(pi/8)-1).
**************************************************************************/
-#include "vpx_config.h"
+#include "vpx_ports/config.h"
+
+
+#include <math.h>
static const int cospi8sqrt2minus1 = 20091;
static const int sinpi8sqrt2 = 35468;
static const int rounding = 0;
+
void vp8_short_idct4x4llm_c(short *input, short *output, int pitch)
{
int i;
@@ -76,20 +80,11 @@ void vp8_short_idct4x4llm_c(short *input, short *output, int pitch)
temp2 = (ip[3] * sinpi8sqrt2 + rounding) >> 16;
d1 = temp1 + temp2;
-
-#if !CONFIG_EXTEND_QRANGE
- op[0] = (a1 + d1 + 4) >> 3;
- op[3] = (a1 - d1 + 4) >> 3;
-
- op[1] = (b1 + c1 + 4) >> 3;
- op[2] = (b1 - c1 + 4) >> 3;
-#else
op[0] = (a1 + d1 + 16) >> 5;
op[3] = (a1 - d1 + 16) >> 5;
op[1] = (b1 + c1 + 16) >> 5;
op[2] = (b1 - c1 + 16) >> 5;
-#endif
ip += shortpitch;
op += shortpitch;
@@ -102,11 +97,7 @@ void vp8_short_idct4x4llm_1_c(short *input, short *output, int pitch)
int a1;
short *op = output;
int shortpitch = pitch >> 1;
-#if !CONFIG_EXTEND_QRANGE
- a1 = ((input[0] + 4) >> 3);
-#else
a1 = ((input[0] + 16) >> 5);
-#endif
for (i = 0; i < 4; i++)
{
op[0] = a1;
@@ -119,11 +110,7 @@ void vp8_short_idct4x4llm_1_c(short *input, short *output, int pitch)
void vp8_dc_only_idct_add_c(short input_dc, unsigned char *pred_ptr, unsigned char *dst_ptr, int pitch, int stride)
{
-#if !CONFIG_EXTEND_QRANGE
- int a1 = ((input_dc + 4) >> 3);
-#else
int a1 = ((input_dc + 16) >> 5);
-#endif
int r, c;
for (r = 0; r < 4; r++)
@@ -185,17 +172,11 @@ void vp8_short_inv_walsh4x4_c(short *input, short *output)
c2 = a1 - b1;
d2 = d1 - c1;
-#if !CONFIG_EXTEND_QRANGE
- op[0] = (a2 + 3) >> 3;
- op[1] = (b2 + 3) >> 3;
- op[2] = (c2 + 3) >> 3;
- op[3] = (d2 + 3) >> 3;
-#else
op[0] = (a2 + 1) >> 2;
op[1] = (b2 + 1) >> 2;
op[2] = (c2 + 1) >> 2;
op[3] = (d2 + 1) >> 2;
-#endif
+
ip += 4;
op += 4;
}
@@ -207,11 +188,7 @@ void vp8_short_inv_walsh4x4_1_c(short *input, short *output)
int a1;
short *op = output;
-#if !CONFIG_EXTEND_QRANGE
- a1 = (input[0] + 3 )>> 3;
-#else
a1 = (input[0] + 1 )>> 2;
-#endif
for (i = 0; i < 4; i++)
{
@@ -222,3 +199,212 @@ void vp8_short_inv_walsh4x4_1_c(short *input, short *output)
op += 4;
}
}
+
+
+void vp8_dc_only_idct_add_8x8_c(short input_dc,
+ unsigned char *pred_ptr,
+ unsigned char *dst_ptr,
+ int pitch, int stride)
+{
+ int a1 = ((input_dc + 16) >> 5);
+ int r, c, b;
+ unsigned char *orig_pred = pred_ptr;
+ unsigned char *orig_dst = dst_ptr;
+ for (b = 0; b < 4; b++)
+ {
+ for (r = 0; r < 4; r++)
+ {
+ for (c = 0; c < 4; c++)
+ {
+ int a = a1 + pred_ptr[c] ;
+
+ if (a < 0)
+ a = 0;
+
+ if (a > 255)
+ a = 255;
+
+ dst_ptr[c] = (unsigned char) a ;
+ }
+
+ dst_ptr += stride;
+ pred_ptr += pitch;
+ }
+ dst_ptr = orig_dst + (b+1)%2*4 + (b+1)/2*4*stride;
+ pred_ptr = orig_pred + (b+1)%2*4 + (b+1)/2*4*pitch;
+ }
+}
+
+#define W1 2841 /* 2048*sqrt(2)*cos(1*pi/16) */
+#define W2 2676 /* 2048*sqrt(2)*cos(2*pi/16) */
+#define W3 2408 /* 2048*sqrt(2)*cos(3*pi/16) */
+#define W5 1609 /* 2048*sqrt(2)*cos(5*pi/16) */
+#define W6 1108 /* 2048*sqrt(2)*cos(6*pi/16) */
+#define W7 565 /* 2048*sqrt(2)*cos(7*pi/16) */
+
+/* row (horizontal) IDCT
+ *
+ * 7 pi 1 dst[k] = sum c[l] * src[l] * cos( -- *
+ * ( k + - ) * l ) l=0 8 2
+ *
+ * where: c[0] = 128 c[1..7] = 128*sqrt(2) */
+
+static void idctrow (int *blk)
+{
+ int x0, x1, x2, x3, x4, x5, x6, x7, x8;
+ /* shortcut */
+ if (!((x1 = blk[4] << 11) | (x2 = blk[6]) | (x3 = blk[2]) |
+ (x4 = blk[1]) | (x5 = blk[7]) | (x6 = blk[5]) | (x7 = blk[3])))
+ {
+ blk[0] = blk[1] = blk[2] = blk[3] = blk[4]
+ = blk[5] = blk[6] = blk[7] = blk[0] << 3;
+ return;
+ }
+
+ x0 = (blk[0] << 11) + 128; /* for proper rounding in the fourth stage */
+ /* first stage */
+ x8 = W7 * (x4 + x5);
+ x4 = x8 + (W1 - W7) * x4;
+ x5 = x8 - (W1 + W7) * x5;
+ x8 = W3 * (x6 + x7);
+ x6 = x8 - (W3 - W5) * x6;
+ x7 = x8 - (W3 + W5) * x7;
+
+ /* second stage */
+ x8 = x0 + x1;
+ x0 -= x1;
+ x1 = W6 * (x3 + x2);
+ x2 = x1 - (W2 + W6) * x2;
+ x3 = x1 + (W2 - W6) * x3;
+ x1 = x4 + x6;
+ x4 -= x6;
+ x6 = x5 + x7;
+ x5 -= x7;
+
+ /* third stage */
+ x7 = x8 + x3;
+ x8 -= x3;
+ x3 = x0 + x2;
+ x0 -= x2;
+ x2 = (181 * (x4 + x5) + 128) >> 8;
+ x4 = (181 * (x4 - x5) + 128) >> 8;
+
+ /* fourth stage */
+ blk[0] = (x7 + x1) >> 8;
+ blk[1] = (x3 + x2) >> 8;
+ blk[2] = (x0 + x4) >> 8;
+ blk[3] = (x8 + x6) >> 8;
+ blk[4] = (x8 - x6) >> 8;
+ blk[5] = (x0 - x4) >> 8;
+ blk[6] = (x3 - x2) >> 8;
+ blk[7] = (x7 - x1) >> 8;
+}
+
+/* column (vertical) IDCT
+ *
+ * 7 pi 1 dst[8*k] = sum c[l] * src[8*l] *
+ * cos( -- * ( k + - ) * l ) l=0 8 2
+ *
+ * where: c[0] = 1/1024 c[1..7] = (1/1024)*sqrt(2) */
+static void idctcol (int *blk)
+{
+ int x0, x1, x2, x3, x4, x5, x6, x7, x8;
+
+ /* shortcut */
+ if (!((x1 = (blk[8 * 4] << 8)) | (x2 = blk[8 * 6]) | (x3 = blk[8 * 2]) |
+ (x4 = blk[8 * 1]) | (x5 = blk[8 * 7]) | (x6 = blk[8 * 5]) |
+ (x7 = blk[8 * 3])))
+ {
+ blk[8 * 0] = blk[8 * 1] = blk[8 * 2] = blk[8 * 3]
+ = blk[8 * 4] = blk[8 * 5] = blk[8 * 6]
+ = blk[8 * 7] = ((blk[8 * 0] + 32) >>6);
+ return;
+ }
+
+ x0 = (blk[8 * 0] << 8) + 16384;
+
+ /* first stage */
+ x8 = W7 * (x4 + x5) + 4;
+ x4 = (x8 + (W1 - W7) * x4) >> 3;
+ x5 = (x8 - (W1 + W7) * x5) >> 3;
+ x8 = W3 * (x6 + x7) + 4;
+ x6 = (x8 - (W3 - W5) * x6) >> 3;
+ x7 = (x8 - (W3 + W5) * x7) >> 3;
+
+ /* second stage */
+ x8 = x0 + x1;
+ x0 -= x1;
+ x1 = W6 * (x3 + x2) + 4;
+ x2 = (x1 - (W2 + W6) * x2) >> 3;
+ x3 = (x1 + (W2 - W6) * x3) >> 3;
+ x1 = x4 + x6;
+ x4 -= x6;
+ x6 = x5 + x7;
+ x5 -= x7;
+
+ /* third stage */
+ x7 = x8 + x3;
+ x8 -= x3;
+ x3 = x0 + x2;
+ x0 -= x2;
+ x2 = (181 * (x4 + x5) + 128) >> 8;
+ x4 = (181 * (x4 - x5) + 128) >> 8;
+
+ /* fourth stage */
+ blk[8 * 0] = (x7 + x1 ) >> 14;
+ blk[8 * 1] = (x3 + x2 ) >> 14;
+ blk[8 * 2] = (x0 + x4 ) >> 14;
+ blk[8 * 3] = (x8 + x6 ) >> 14;
+ blk[8 * 4] = (x8 - x6 ) >> 14;
+ blk[8 * 5] = (x0 - x4 ) >> 14;
+ blk[8 * 6] = (x3 - x2 ) >> 14;
+ blk[8 * 7] = (x7 - x1 ) >> 14;
+}
+
+#define TX_DIM 8
+void vp8_short_idct8x8_c(short *coefs, short *block, int pitch)
+{
+ int X[TX_DIM*TX_DIM];
+ int i,j;
+ int shortpitch = pitch >> 1;
+
+ for (i = 0; i < TX_DIM; i++)
+ {
+ for (j = 0; j < TX_DIM; j++)
+ {
+ X[i * TX_DIM + j] = (int)(coefs[i * TX_DIM + j]+1
+ + (coefs[i * TX_DIM + j]<0))>>2;
+ }
+ }
+ for (i = 0; i < 8; i++)
+ idctrow (X + 8 * i);
+
+ for (i = 0; i < 8; i++)
+ idctcol (X + i);
+
+ for (i = 0; i < TX_DIM; i++)
+ {
+ for (j = 0; j < TX_DIM; j++)
+ {
+ block[i*shortpitch+j] = X[i * TX_DIM + j]>>1;
+ }
+ }
+}
+
+
+void vp8_short_ihaar2x2_c(short *input, short *output, int pitch)
+{
+ int i, x;
+ short *ip = input; //0,1, 4, 8
+ short *op = output;
+ for (i = 0; i < 16; i++)
+ {
+ op[i] = 0;
+ }
+
+ op[0] = (ip[0] + ip[1] + ip[4] + ip[8] + 1)>>1;
+ op[1] = (ip[0] - ip[1] + ip[4] - ip[8])>>1;
+ op[4] = (ip[0] + ip[1] - ip[4] - ip[8])>>1;
+ op[8] = (ip[0] - ip[1] - ip[4] + ip[8])>>1;
+}
+
diff --git a/vp8/common/implicit_segmentation.c b/vp8/common/implicit_segmentation.c
new file mode 100644
index 000000000..3f72f8455
--- /dev/null
+++ b/vp8/common/implicit_segmentation.c
@@ -0,0 +1,277 @@
+/*
+ * Copyright (c) 2012 The WebM project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "vp8/common/onyxc_int.h"
+
+#define MAX_REGIONS 24000
+#define NULL 0
+
+#define min_mbs_in_region 3
+
+// this linked list structure holds equivalences for connected
+// component labeling
+struct list_el {
+ int label;
+ int seg_value;
+ int count;
+ struct list_el * next;
+};
+typedef struct list_el item;
+
+// connected colorsegments
+typedef struct
+{
+ int min_x;
+ int min_y;
+ int max_x;
+ int max_y;
+ long long sum_x;
+ long long sum_y;
+ int pixels;
+ int seg_value;
+ int label;
+} segment_info;
+
+
+typedef enum
+{
+ SEGMENT_MODE,
+ SEGMENT_MV,
+ SEGMENT_REFFRAME,
+ SEGMENT_SKIPPED
+} SEGMENT_TYPE;
+
+
+// this merges the two equivalence lists and
+// then makes sure that every label points to the same
+// equivalence list
+void merge ( item *labels, int u, int v )
+{
+ item *a = labels[u].next;
+ item *b = labels[v].next;
+ item c;
+ item *it = &c;
+ int count;
+
+ // check if they are already merged
+ if(u==v || a==b)
+ return;
+
+ count = a->count + b->count;
+
+ // merge 2 sorted linked lists.
+ while ( a != NULL && b != NULL )
+ {
+ if ( a->label < b->label)
+ {
+ it->next = a;
+ a = a->next;
+ }
+ else
+ {
+ it->next = b;
+ b = b->next;
+ }
+
+ it = it->next;
+ }
+
+ if ( a == NULL )
+ it->next = b;
+ else
+ it->next = a;
+
+ it = c.next;
+
+ // make sure every equivalence in the linked list points to this new ll
+ while( it != NULL)
+ {
+ labels[it->label].next = c.next;
+ it=it->next;
+ }
+ c.next->count = count;
+
+}
+
+void segment_via_mode_info( VP8_COMMON *oci, int how)
+{
+ MODE_INFO *mi = oci->mi;
+ int i,j;
+ int mb_index = 0;
+
+ int label=1;
+ int pitch = oci->mb_cols;
+
+ // holds linked list equivalences
+ // the max should probably be allocated at a higher level in oci
+ item equivalences[MAX_REGIONS];
+ int eq_ptr = 0;
+ item labels[MAX_REGIONS];
+ segment_info segments[MAX_REGIONS];
+ int label_count = 1;
+ int labeling[400*300];
+ int *lp = labeling;
+
+ label_count = 1;
+ memset(labels,0,sizeof(labels));
+ memset(segments,0,sizeof(segments));
+
+ /* Go through each macroblock first pass labelling */
+ for (i = 0; i < oci->mb_rows; i++,lp+=pitch)
+ {
+ for (j = 0; j < oci->mb_cols; j++)
+ {
+ // int above seg_value, left seg_value, this seg_value...
+ int a=-1,l=-1,n=-1;
+
+ // above label, left label
+ int al=-1,ll=-1;
+ if(i)
+ {
+ al=lp[j-pitch];
+ a = labels[al].next->seg_value;
+ }
+ if(j)
+ {
+ ll=lp[j-1];
+ l = labels[ll].next->seg_value;
+ }
+
+ // what setting are we going to do the implicit segmentation on
+ switch (how)
+ {
+ case SEGMENT_MODE:
+ n= mi[mb_index].mbmi.mode;
+ break;
+ case SEGMENT_MV:
+ n = mi[mb_index].mbmi.mv.as_int;
+ if(mi[mb_index].mbmi.ref_frame == INTRA_FRAME)
+ n=-9999999;
+ break;
+ case SEGMENT_REFFRAME:
+ n = mi[mb_index].mbmi.ref_frame;
+ break;
+ case SEGMENT_SKIPPED:
+ n = mi[mb_index].mbmi.mb_skip_coeff;
+ break;
+ }
+
+ // above and left both have the same seg_value
+ if(n==a&&n==l)
+ {
+ // pick the lowest label
+ lp[j] = (al<ll?al:ll);
+ labels[lp[j]].next->count++;
+
+ // merge the above and left equivalencies
+ merge( labels, al, ll );
+ }
+ // this matches above seg_value
+ else if(n==a)
+ {
+ // give it the same label as above
+ lp[j]=al;
+ labels[al].next->count++;
+ }
+ // this matches left seg_value
+ else if(n==l)
+ {
+ // give it the same label as above
+ lp[j]=ll;
+ labels[ll].next->count++;
+ }
+ else
+ {
+ // new label doesn't match either
+ item *e = &labels[label];
+ item *nl = &equivalences[eq_ptr++];
+ lp[j]=label;
+ nl->label = label;
+ nl->next = 0;
+ nl->seg_value = n;
+ nl->count = 1;
+ e->next = nl;
+ label++;
+ }
+ mb_index++;
+ }
+ mb_index++;
+ }
+ lp = labeling;
+
+ // give new labels to regions
+ for(i=1;i<label;i++)
+ if(labels[i].next->count >min_mbs_in_region && labels[labels[i].next->label].label == 0 )
+ {
+ segment_info *cs= &segments[label_count];
+ cs->label = label_count;
+ labels[labels[i].next->label].label = label_count++;
+ labels[labels[i].next->label].seg_value = labels[i].next->seg_value;
+ cs->seg_value = labels[labels[i].next->label].seg_value;
+ cs->min_x = oci->mb_cols;
+ cs->min_y = oci->mb_rows;
+ cs->max_x = 0;
+ cs->max_y = 0;
+ cs->sum_x = 0;
+ cs->sum_y = 0;
+ cs->pixels= 0;
+
+ }
+ lp = labeling;
+
+ // this is just to gather stats...
+ for(i=0;i<oci->mb_rows;i++,lp+=pitch)
+ {
+ for(j=0;j<oci->mb_cols;j++)
+ {
+ segment_info *cs;
+ int oldlab = labels[lp[j]].next->label;
+ int lab = labels[oldlab].label;
+ lp[j] = lab;
+
+ cs= &segments[lab];
+
+ cs->min_x = (j<cs->min_x?j:cs->min_x);
+ cs->max_x = (j>cs->max_x?j:cs->max_x);
+ cs->min_y = (i<cs->min_y?i:cs->min_y);
+ cs->max_y = (i>cs->max_y?i:cs->max_y);
+ cs->sum_x += j;
+ cs->sum_y += i;
+ cs->pixels ++;
+
+ lp[j] = lab;
+ mb_index++;
+ }
+ mb_index++;
+ }
+
+ {
+ lp = labeling;
+ printf("labelling \n");
+ mb_index = 0;
+ for(i=0;i<oci->mb_rows;i++,lp+=pitch)
+ {
+ for(j=0;j<oci->mb_cols;j++)
+ {
+ printf("%4d",lp[j]);
+ }
+ printf(" ");
+ for(j=0;j<oci->mb_cols;j++,mb_index++)
+ {
+ //printf("%3d",mi[mb_index].mbmi.mode );
+ printf("%4d:%4d",mi[mb_index].mbmi.mv.as_mv.row,mi[mb_index].mbmi.mv.as_mv.col );
+ }
+ printf("\n");
+ ++mb_index;
+ }
+ printf("\n");
+ }
+}
+
diff --git a/vp8/common/invtrans.c b/vp8/common/invtrans.c
index 81a3f2d89..eed8363a3 100644
--- a/vp8/common/invtrans.c
+++ b/vp8/common/invtrans.c
@@ -24,13 +24,23 @@ static void recon_dcblock(MACROBLOCKD *x)
}
}
+static void recon_dcblock_8x8(MACROBLOCKD *x)
+{
+ BLOCKD *b = &x->block[24]; //for coeff 0, 2, 8, 10
+ x->block[0].dqcoeff[0] = b->diff[0];
+ x->block[4].dqcoeff[0] = b->diff[1];
+ x->block[8].dqcoeff[0] = b->diff[4];
+ x->block[12].dqcoeff[0] = b->diff[8];
+
+}
+
void vp8_inverse_transform_b(const vp8_idct_rtcd_vtable_t *rtcd, BLOCKD *b, int pitch)
{
- if (b->eob > 1)
- IDCT_INVOKE(rtcd, idct16)(b->dqcoeff, b->diff, pitch);
- else
+ if (b->eob <= 1)
IDCT_INVOKE(rtcd, idct1)(b->dqcoeff, b->diff, pitch);
+ else
+ IDCT_INVOKE(rtcd, idct16)(b->dqcoeff, b->diff, pitch);
}
@@ -66,6 +76,7 @@ void vp8_inverse_transform_mb(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *x
int i;
if (x->mode_info_context->mbmi.mode != B_PRED &&
+ x->mode_info_context->mbmi.mode != I8X8_PRED &&
x->mode_info_context->mbmi.mode != SPLITMV)
{
/* do 2nd order transform on the dc block */
@@ -86,3 +97,77 @@ void vp8_inverse_transform_mb(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *x
}
}
+
+
+void vp8_inverse_transform_b_8x8(const vp8_idct_rtcd_vtable_t *rtcd, short *input_dqcoeff, short *output_coeff, int pitch)//pay attention to use when 8x8
+{
+ // int b,i;
+ //if (b->eob > 1)
+ IDCT_INVOKE(rtcd, idct8)(input_dqcoeff, output_coeff, pitch);
+ //else
+ //IDCT_INVOKE(rtcd, idct8_1)(b->dqcoeff, b->diff, pitch);//pitch
+
+}
+
+
+void vp8_inverse_transform_mby_8x8(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *x)
+{
+ int i;
+
+ // do 2nd order transform on the dc block
+ IDCT_INVOKE(rtcd, ihaar2)(x->block[24].dqcoeff, x->block[24].diff, 8);
+
+ recon_dcblock_8x8(x); //need to change for 8x8
+ for (i = 0; i < 9; i += 8)
+ {
+ vp8_inverse_transform_b_8x8(rtcd, &x->block[i].dqcoeff[0], &x->block[i].diff[0], 32);
+ }
+ for (i = 2; i < 11; i += 8)
+ {
+ vp8_inverse_transform_b_8x8(rtcd, &x->block[i+2].dqcoeff[0], &x->block[i].diff[0], 32);
+ }
+
+}
+void vp8_inverse_transform_mbuv_8x8(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *x)
+{
+ int i;
+
+ for (i = 16; i < 24; i += 4)
+ {
+ vp8_inverse_transform_b_8x8(rtcd, &x->block[i].dqcoeff[0], &x->block[i].diff[0], 16);
+ }
+
+}
+
+
+void vp8_inverse_transform_mb_8x8(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *x)
+{
+ int i;
+
+ if (x->mode_info_context->mbmi.mode != B_PRED &&
+ x->mode_info_context->mbmi.mode != SPLITMV)
+ {
+ // do 2nd order transform on the dc block
+
+ IDCT_INVOKE(rtcd, ihaar2)(&x->block[24].dqcoeff[0], x->block[24].diff, 8);//dqcoeff[0]
+ recon_dcblock_8x8(x); //need to change for 8x8
+
+ }
+
+ for (i = 0; i < 9; i += 8)
+ {
+ vp8_inverse_transform_b_8x8(rtcd, &x->block[i].dqcoeff[0], &x->block[i].diff[0], 32);
+ }
+ for (i = 2; i < 11; i += 8)
+ {
+ vp8_inverse_transform_b_8x8(rtcd, &x->block[i+2].dqcoeff[0], &x->block[i].diff[0], 32);
+ }
+
+
+ for (i = 16; i < 24; i += 4)
+ {
+ vp8_inverse_transform_b_8x8(rtcd, &x->block[i].dqcoeff[0], &x->block[i].diff[0], 16);
+ }
+
+}
+
diff --git a/vp8/common/invtrans.h b/vp8/common/invtrans.h
index d14573b91..4c4f0d3d2 100644
--- a/vp8/common/invtrans.h
+++ b/vp8/common/invtrans.h
@@ -12,7 +12,7 @@
#ifndef __INC_INVTRANS_H
#define __INC_INVTRANS_H
-#include "vpx_config.h"
+#include "vpx_ports/config.h"
#include "idct.h"
#include "blockd.h"
extern void vp8_inverse_transform_b(const vp8_idct_rtcd_vtable_t *rtcd, BLOCKD *b, int pitch);
@@ -20,4 +20,9 @@ extern void vp8_inverse_transform_mb(const vp8_idct_rtcd_vtable_t *rtcd, MACROBL
extern void vp8_inverse_transform_mby(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *x);
extern void vp8_inverse_transform_mbuv(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *x);
+extern void vp8_inverse_transform_b_8x8(const vp8_idct_rtcd_vtable_t *rtcd, short *input_dqcoeff, short *output_coeff, int pitch);
+extern void vp8_inverse_transform_mb_8x8(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *x);
+extern void vp8_inverse_transform_mby_8x8(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *x);
+extern void vp8_inverse_transform_mbuv_8x8(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *x);
+
#endif
diff --git a/vp8/common/loopfilter.c b/vp8/common/loopfilter.c
index fe0644bdd..1cac063e0 100644
--- a/vp8/common/loopfilter.c
+++ b/vp8/common/loopfilter.c
@@ -14,10 +14,14 @@
#include "onyxc_int.h"
#include "vpx_mem/vpx_mem.h"
+#include "vp8/common/seg_common.h"
+
typedef unsigned char uc;
prototype_loopfilter(vp8_loop_filter_horizontal_edge_c);
prototype_loopfilter(vp8_loop_filter_vertical_edge_c);
+
+
prototype_loopfilter(vp8_mbloop_filter_horizontal_edge_c);
prototype_loopfilter(vp8_mbloop_filter_vertical_edge_c);
@@ -68,6 +72,14 @@ void vp8_loop_filter_bh_c(unsigned char *y_ptr, unsigned char *u_ptr,
vp8_loop_filter_horizontal_edge_c(v_ptr + 4 * uv_stride, uv_stride, lfi->blim, lfi->lim, lfi->hev_thr, 1);
}
+void vp8_loop_filter_bh8x8_c(unsigned char *y_ptr, unsigned char *u_ptr,
+ unsigned char *v_ptr, int y_stride, int uv_stride,
+ loop_filter_info *lfi)
+{
+ vp8_mbloop_filter_horizontal_edge_c(
+ y_ptr + 8 * y_stride, y_stride, lfi->blim, lfi->lim, lfi->hev_thr, 2);
+}
+
void vp8_loop_filter_bhs_c(unsigned char *y_ptr, int y_stride,
const unsigned char *blimit)
{
@@ -92,6 +104,14 @@ void vp8_loop_filter_bv_c(unsigned char *y_ptr, unsigned char *u_ptr,
vp8_loop_filter_vertical_edge_c(v_ptr + 4, uv_stride, lfi->blim, lfi->lim, lfi->hev_thr, 1);
}
+void vp8_loop_filter_bv8x8_c(unsigned char *y_ptr, unsigned char *u_ptr,
+ unsigned char *v_ptr, int y_stride, int uv_stride,
+ loop_filter_info *lfi)
+{
+ vp8_mbloop_filter_vertical_edge_c(
+ y_ptr + 8, y_stride, lfi->blim, lfi->lim, lfi->hev_thr, 2);
+}
+
void vp8_loop_filter_bvs_c(unsigned char *y_ptr, int y_stride,
const unsigned char *blimit)
{
@@ -133,7 +153,7 @@ static void lf_init_lut(loop_filter_info_n *lfi)
lfi->mode_lf_lut[H_PRED] = 1;
lfi->mode_lf_lut[TM_PRED] = 1;
lfi->mode_lf_lut[B_PRED] = 0;
-
+ lfi->mode_lf_lut[I8X8_PRED]=0;
lfi->mode_lf_lut[ZEROMV] = 1;
lfi->mode_lf_lut[NEARESTMV] = 2;
lfi->mode_lf_lut[NEARMV] = 2;
@@ -194,7 +214,7 @@ void vp8_loop_filter_init(VP8_COMMON *cm)
}
void vp8_loop_filter_frame_init(VP8_COMMON *cm,
- MACROBLOCKD *mbd,
+ MACROBLOCKD *xd,
int default_filt_lvl)
{
int seg, /* segment number */
@@ -215,22 +235,23 @@ void vp8_loop_filter_frame_init(VP8_COMMON *cm,
int lvl_seg = default_filt_lvl;
int lvl_ref, lvl_mode;
- /* Note the baseline filter values for each segment */
- if (mbd->segmentation_enabled)
+
+ // Set the baseline filter values for each segment
+ if ( segfeature_active( xd, seg, SEG_LVL_ALT_LF ) )
{
/* Abs value */
- if (mbd->mb_segement_abs_delta == SEGMENT_ABSDATA)
+ if (xd->mb_segment_abs_delta == SEGMENT_ABSDATA)
{
- lvl_seg = mbd->segment_feature_data[MB_LVL_ALT_LF][seg];
+ lvl_seg = get_segdata( xd, seg, SEG_LVL_ALT_LF );
}
else /* Delta Value */
{
- lvl_seg += mbd->segment_feature_data[MB_LVL_ALT_LF][seg];
+ lvl_seg += get_segdata( xd, seg, SEG_LVL_ALT_LF );;
lvl_seg = (lvl_seg > 0) ? ((lvl_seg > 63) ? 63: lvl_seg) : 0;
}
}
- if (!mbd->mode_ref_lf_delta_enabled)
+ if (!xd->mode_ref_lf_delta_enabled)
{
/* we could get rid of this if we assume that deltas are set to
* zero when not in use; encoder always uses deltas
@@ -245,12 +266,12 @@ void vp8_loop_filter_frame_init(VP8_COMMON *cm,
ref = INTRA_FRAME;
/* Apply delta for reference frame */
- lvl_ref += mbd->ref_lf_deltas[ref];
+ lvl_ref += xd->ref_lf_deltas[ref];
/* Apply delta for Intra modes */
mode = 0; /* B_PRED */
/* Only the split mode BPRED has a further special case */
- lvl_mode = lvl_ref + mbd->mode_lf_deltas[mode];
+ lvl_mode = lvl_ref + xd->mode_lf_deltas[mode];
lvl_mode = (lvl_mode > 0) ? (lvl_mode > 63 ? 63 : lvl_mode) : 0; /* clamp */
lfi->lvl[seg][ref][mode] = lvl_mode;
@@ -265,12 +286,12 @@ void vp8_loop_filter_frame_init(VP8_COMMON *cm,
int lvl_ref = lvl_seg;
/* Apply delta for reference frame */
- lvl_ref += mbd->ref_lf_deltas[ref];
+ lvl_ref += xd->ref_lf_deltas[ref];
/* Apply delta for Inter modes */
for (mode = 1; mode < 4; mode++)
{
- lvl_mode = lvl_ref + mbd->mode_lf_deltas[mode];
+ lvl_mode = lvl_ref + xd->mode_lf_deltas[mode];
lvl_mode = (lvl_mode > 0) ? (lvl_mode > 63 ? 63 : lvl_mode) : 0; /* clamp */
lfi->lvl[seg][ref][mode] = lvl_mode;
@@ -282,7 +303,7 @@ void vp8_loop_filter_frame_init(VP8_COMMON *cm,
void vp8_loop_filter_frame
(
VP8_COMMON *cm,
- MACROBLOCKD *mbd
+ MACROBLOCKD *xd
)
{
YV12_BUFFER_CONFIG *post = cm->frame_to_show;
@@ -302,7 +323,7 @@ void vp8_loop_filter_frame
const MODE_INFO *mode_info_context = cm->mi;
/* Initialize the loop filter for this frame. */
- vp8_loop_filter_frame_init(cm, mbd, cm->filter_level);
+ vp8_loop_filter_frame_init(cm, xd, cm->filter_level);
/* Set up the buffer pointers */
y_ptr = post->y_buffer;
@@ -315,13 +336,14 @@ void vp8_loop_filter_frame
for (mb_col = 0; mb_col < cm->mb_cols; mb_col++)
{
int skip_lf = (mode_info_context->mbmi.mode != B_PRED &&
+ mode_info_context->mbmi.mode != I8X8_PRED &&
mode_info_context->mbmi.mode != SPLITMV &&
mode_info_context->mbmi.mb_skip_coeff);
const int mode_index = lfi_n->mode_lf_lut[mode_info_context->mbmi.mode];
const int seg = mode_info_context->mbmi.segment_id;
const int ref_frame = mode_info_context->mbmi.ref_frame;
-
+ int tx_type = mode_info_context->mbmi.txfm_size;
filter_level = lfi_n->lvl[seg][ref_frame][mode_index];
if (filter_level)
@@ -335,21 +357,34 @@ void vp8_loop_filter_frame
lfi.hev_thr = lfi_n->hev_thr[hev_index];
if (mb_col > 0)
- LF_INVOKE(&cm->rtcd.loopfilter, normal_mb_v)
+ vp8_loop_filter_mbv_c
(y_ptr, u_ptr, v_ptr, post->y_stride, post->uv_stride, &lfi);
if (!skip_lf)
- LF_INVOKE(&cm->rtcd.loopfilter, normal_b_v)
- (y_ptr, u_ptr, v_ptr, post->y_stride, post->uv_stride, &lfi);
+ {
+ if(tx_type == TX_8X8)
+ vp8_loop_filter_bv8x8_c
+ (y_ptr, u_ptr, v_ptr, post->y_stride, post->uv_stride, &lfi);
+ else
+ LF_INVOKE(&cm->rtcd.loopfilter, normal_b_v)
+ (y_ptr, u_ptr, v_ptr, post->y_stride, post->uv_stride, &lfi);
+
+ }
/* don't apply across umv border */
if (mb_row > 0)
- LF_INVOKE(&cm->rtcd.loopfilter, normal_mb_h)
+ vp8_loop_filter_mbh_c
(y_ptr, u_ptr, v_ptr, post->y_stride, post->uv_stride, &lfi);
if (!skip_lf)
- LF_INVOKE(&cm->rtcd.loopfilter, normal_b_h)
- (y_ptr, u_ptr, v_ptr, post->y_stride, post->uv_stride, &lfi);
+ {
+ if(tx_type == TX_8X8)
+ vp8_loop_filter_bh8x8_c
+ (y_ptr, u_ptr, v_ptr, post->y_stride, post->uv_stride, &lfi);
+ else
+ LF_INVOKE(&cm->rtcd.loopfilter, normal_b_h)
+ (y_ptr, u_ptr, v_ptr, post->y_stride, post->uv_stride, &lfi);
+ }
}
else
{
@@ -390,7 +425,7 @@ void vp8_loop_filter_frame
void vp8_loop_filter_frame_yonly
(
VP8_COMMON *cm,
- MACROBLOCKD *mbd,
+ MACROBLOCKD *xd,
int default_filt_lvl
)
{
@@ -415,7 +450,7 @@ void vp8_loop_filter_frame_yonly
#endif
/* Initialize the loop filter for this frame. */
- vp8_loop_filter_frame_init( cm, mbd, default_filt_lvl);
+ vp8_loop_filter_frame_init( cm, xd, default_filt_lvl);
/* Set up the buffer pointers */
y_ptr = post->y_buffer;
@@ -426,12 +461,14 @@ void vp8_loop_filter_frame_yonly
for (mb_col = 0; mb_col < cm->mb_cols; mb_col++)
{
int skip_lf = (mode_info_context->mbmi.mode != B_PRED &&
+ mode_info_context->mbmi.mode != I8X8_PRED &&
mode_info_context->mbmi.mode != SPLITMV &&
mode_info_context->mbmi.mb_skip_coeff);
const int mode_index = lfi_n->mode_lf_lut[mode_info_context->mbmi.mode];
const int seg = mode_info_context->mbmi.segment_id;
const int ref_frame = mode_info_context->mbmi.ref_frame;
+ int tx_type = mode_info_context->mbmi.txfm_size;
filter_level = lfi_n->lvl[seg][ref_frame][mode_index];
@@ -446,21 +483,33 @@ void vp8_loop_filter_frame_yonly
lfi.hev_thr = lfi_n->hev_thr[hev_index];
if (mb_col > 0)
- LF_INVOKE(&cm->rtcd.loopfilter, normal_mb_v)
+ vp8_loop_filter_mbv_c
(y_ptr, 0, 0, post->y_stride, 0, &lfi);
if (!skip_lf)
- LF_INVOKE(&cm->rtcd.loopfilter, normal_b_v)
- (y_ptr, 0, 0, post->y_stride, 0, &lfi);
+ {
+ if(tx_type == TX_8X8)
+ vp8_loop_filter_bv8x8_c
+ (y_ptr, 0, 0, post->y_stride, 0, &lfi);
+ else
+ LF_INVOKE(&cm->rtcd.loopfilter, normal_b_v)
+ (y_ptr, 0, 0, post->y_stride, 0, &lfi);
+ }
/* don't apply across umv border */
if (mb_row > 0)
- LF_INVOKE(&cm->rtcd.loopfilter, normal_mb_h)
+ vp8_loop_filter_mbh_c
(y_ptr, 0, 0, post->y_stride, 0, &lfi);
if (!skip_lf)
- LF_INVOKE(&cm->rtcd.loopfilter, normal_b_h)
- (y_ptr, 0, 0, post->y_stride, 0, &lfi);
+ {
+ if(tx_type == TX_8X8)
+ vp8_loop_filter_bh8x8_c
+ (y_ptr, 0, 0, post->y_stride, 0, &lfi);
+ else
+ LF_INVOKE(&cm->rtcd.loopfilter, normal_b_h)
+ (y_ptr, 0, 0, post->y_stride, 0, &lfi);
+ }
}
else
{
@@ -493,11 +542,134 @@ void vp8_loop_filter_frame_yonly
}
}
+#if CONFIG_FEATUREUPDATES
+// TODO: Multiple copies of loop filtering code should be pruned and
+// cut down. This just adds yet another so that I can do an if
+// on segment.
+void vp8_loop_filter_frame_segment(VP8_COMMON *cm, MACROBLOCKD *xd,
+ int default_filt_lvl, int segment)
+{
+ YV12_BUFFER_CONFIG *post = cm->frame_to_show;
+
+ unsigned char *y_ptr;
+ int mb_row;
+ int mb_col;
+
+ loop_filter_info_n *lfi_n = &cm->lf_info;
+ loop_filter_info lfi;
+
+ int filter_level;
+ FRAME_TYPE frame_type = cm->frame_type;
+
+ /* Point at base of Mb MODE_INFO list */
+ const MODE_INFO *mode_info_context = cm->mi;
+
+#if 0
+ if(default_filt_lvl == 0) /* no filter applied */
+ return;
+#endif
+
+ /* Initialize the loop filter for this frame. */
+ vp8_loop_filter_frame_init(cm, xd, default_filt_lvl);
+
+ /* Set up the buffer pointers */
+ y_ptr = post->y_buffer;
+
+ /* vp8_filter each macro block */
+ for (mb_row = 0; mb_row < cm->mb_rows; mb_row++)
+ {
+ for (mb_col = 0; mb_col < cm->mb_cols; mb_col++)
+ {
+ int skip_lf = (mode_info_context->mbmi.mode != B_PRED
+ && mode_info_context->mbmi.mode != I8X8_PRED
+ && mode_info_context->mbmi.mode != SPLITMV
+ && mode_info_context->mbmi.mb_skip_coeff);
+
+ const int mode_index = lfi_n->mode_lf_lut[mode_info_context->mbmi
+ .mode];
+ const int seg = mode_info_context->mbmi.segment_id;
+ const int ref_frame = mode_info_context->mbmi.ref_frame;
+
+ filter_level = lfi_n->lvl[seg][ref_frame][mode_index];
+
+ // check if this mb has filtering applied
+ // and then whether it is the right segment or
+ // if not whether the passed in segment is 0 and this
+ // segment has no alt lf
+
+ // TODO: Make this work for when segment 0 has the alt lv enabled
+ if (filter_level
+ && (seg == segment
+ || (!segfeature_active(xd, seg, SEG_LVL_ALT_LF)
+ && segment == 0)))
+ {
+ if (cm->filter_type == NORMAL_LOOPFILTER)
+ {
+ const int hev_index =
+ lfi_n->hev_thr_lut[frame_type][filter_level];
+ lfi.mblim = lfi_n->mblim[filter_level];
+ lfi.blim = lfi_n->blim[filter_level];
+ lfi.lim = lfi_n->lim[filter_level];
+ lfi.hev_thr = lfi_n->hev_thr[hev_index];
+
+ if (mb_col > 0)
+ vp8_loop_filter_mbv_c(y_ptr, 0, 0, post->y_stride, 0,
+ &lfi);
+
+ if (!skip_lf)
+ LF_INVOKE(&cm->rtcd.loopfilter, normal_b_v)(
+ y_ptr, 0, 0, post->y_stride, 0, &lfi);
+
+ /* don't apply across umv border */
+ if (mb_row > 0)
+ vp8_loop_filter_mbh_c(y_ptr, 0, 0, post->y_stride, 0,
+ &lfi);
+
+ if (!skip_lf)
+ LF_INVOKE(&cm->rtcd.loopfilter, normal_b_h)(
+ y_ptr, 0, 0, post->y_stride, 0, &lfi);
+ }
+ else
+ {
+ if (mb_col > 0)
+ LF_INVOKE(&cm->rtcd.loopfilter, simple_mb_v)(
+ y_ptr, post->y_stride,
+ lfi_n->mblim[filter_level]);
+
+ if (!skip_lf)
+ LF_INVOKE(&cm->rtcd.loopfilter, simple_b_v)(
+ y_ptr, post->y_stride,
+ lfi_n->blim[filter_level]);
+
+ /* don't apply across umv border */
+ if (mb_row > 0)
+ LF_INVOKE(&cm->rtcd.loopfilter, simple_mb_h)(
+ y_ptr, post->y_stride,
+ lfi_n->mblim[filter_level]);
+
+ if (!skip_lf)
+ LF_INVOKE(&cm->rtcd.loopfilter, simple_b_h)(
+ y_ptr, post->y_stride,
+ lfi_n->blim[filter_level]);
+ }
+ }
+
+ y_ptr += 16;
+ mode_info_context++; /* step to next MB */
+
+ }
+
+ y_ptr += post->y_stride * 16 - post->y_width;
+ mode_info_context++; /* Skip border mb */
+ }
+
+}
+#endif
void vp8_loop_filter_partial_frame
(
VP8_COMMON *cm,
- MACROBLOCKD *mbd,
+ MACROBLOCKD *xd,
int default_filt_lvl
)
{
@@ -514,7 +686,7 @@ void vp8_loop_filter_partial_frame
loop_filter_info lfi;
int filter_level;
- int alt_flt_enabled = mbd->segmentation_enabled;
+ int alt_flt_enabled = xd->segmentation_enabled;
FRAME_TYPE frame_type = cm->frame_type;
const MODE_INFO *mode_info_context;
@@ -539,15 +711,15 @@ void vp8_loop_filter_partial_frame
{
for (i = 0; i < MAX_MB_SEGMENTS; i++)
{ /* Abs value */
- if (mbd->mb_segement_abs_delta == SEGMENT_ABSDATA)
+ if (xd->mb_segment_abs_delta == SEGMENT_ABSDATA)
{
- lvl_seg[i] = mbd->segment_feature_data[MB_LVL_ALT_LF][i];
+ lvl_seg[i] = get_segdata( xd, i, SEG_LVL_ALT_LF );
}
/* Delta Value */
else
{
- lvl_seg[i] = default_filt_lvl
- + mbd->segment_feature_data[MB_LVL_ALT_LF][i];
+ lvl_seg[i] = default_filt_lvl +
+ get_segdata( xd, i, SEG_LVL_ALT_LF );
lvl_seg[i] = (lvl_seg[i] > 0) ?
((lvl_seg[i] > 63) ? 63: lvl_seg[i]) : 0;
}
@@ -563,6 +735,7 @@ void vp8_loop_filter_partial_frame
for (mb_col = 0; mb_col < mb_cols; mb_col++)
{
int skip_lf = (mode_info_context->mbmi.mode != B_PRED &&
+ mode_info_context->mbmi.mode != I8X8_PRED &&
mode_info_context->mbmi.mode != SPLITMV &&
mode_info_context->mbmi.mb_skip_coeff);
diff --git a/vp8/common/loopfilter.h b/vp8/common/loopfilter.h
index 9887cf55b..0ae2b9a1b 100644
--- a/vp8/common/loopfilter.h
+++ b/vp8/common/loopfilter.h
@@ -14,6 +14,7 @@
#include "vpx_ports/mem.h"
#include "vpx_config.h"
+#include "blockd.h"
#define MAX_LOOP_FILTER 63
@@ -40,7 +41,7 @@ typedef struct
DECLARE_ALIGNED(SIMD_WIDTH, unsigned char, hev_thr[4][SIMD_WIDTH]);
unsigned char lvl[4][4][4];
unsigned char hev_thr_lut[2][MAX_LOOP_FILTER + 1];
- unsigned char mode_lf_lut[10];
+ unsigned char mode_lf_lut[MB_MODE_COUNT];
} loop_filter_info_n;
typedef struct
diff --git a/vp8/common/loopfilter_filters.c b/vp8/common/loopfilter_filters.c
index 10228ae09..dbfd3c96f 100644
--- a/vp8/common/loopfilter_filters.c
+++ b/vp8/common/loopfilter_filters.c
@@ -10,6 +10,7 @@
#include <stdlib.h>
+#include "vpx_config.h"
#include "loopfilter.h"
#include "onyxc_int.h"
@@ -148,7 +149,8 @@ void vp8_loop_filter_vertical_edge_c
do
{
mask = vp8_filter_mask(limit[0], blimit[0],
- s[-4], s[-3], s[-2], s[-1], s[0], s[1], s[2], s[3]);
+ s[-4], s[-3], s[-2], s[-1],
+ s[0], s[1], s[2], s[3]);
hev = vp8_hevmask(thresh[0], s[-2], s[-1], s[0], s[1]);
@@ -158,62 +160,95 @@ void vp8_loop_filter_vertical_edge_c
}
while (++i < count * 8);
}
-
-static __inline void vp8_mbfilter(signed char mask, uc hev,
- uc *op2, uc *op1, uc *op0, uc *oq0, uc *oq1, uc *oq2)
+static __inline signed char vp8_flatmask(uc thresh,
+ uc p4, uc p3, uc p2, uc p1, uc p0,
+ uc q0, uc q1, uc q2, uc q3, uc q4)
{
- signed char s, u;
- signed char vp8_filter, Filter1, Filter2;
- signed char ps2 = (signed char) * op2 ^ 0x80;
- signed char ps1 = (signed char) * op1 ^ 0x80;
- signed char ps0 = (signed char) * op0 ^ 0x80;
- signed char qs0 = (signed char) * oq0 ^ 0x80;
- signed char qs1 = (signed char) * oq1 ^ 0x80;
- signed char qs2 = (signed char) * oq2 ^ 0x80;
-
- /* add outer taps if we have high edge variance */
- vp8_filter = vp8_signed_char_clamp(ps1 - qs1);
- vp8_filter = vp8_signed_char_clamp(vp8_filter + 3 * (qs0 - ps0));
- vp8_filter &= mask;
-
- Filter2 = vp8_filter;
- Filter2 &= hev;
-
- /* save bottom 3 bits so that we round one side +4 and the other +3 */
- Filter1 = vp8_signed_char_clamp(Filter2 + 4);
- Filter2 = vp8_signed_char_clamp(Filter2 + 3);
- Filter1 >>= 3;
- Filter2 >>= 3;
- qs0 = vp8_signed_char_clamp(qs0 - Filter1);
- ps0 = vp8_signed_char_clamp(ps0 + Filter2);
-
-
- /* only apply wider filter if not high edge variance */
- vp8_filter &= ~hev;
- Filter2 = vp8_filter;
-
- /* roughly 3/7th difference across boundary */
- u = vp8_signed_char_clamp((63 + Filter2 * 27) >> 7);
- s = vp8_signed_char_clamp(qs0 - u);
- *oq0 = s ^ 0x80;
- s = vp8_signed_char_clamp(ps0 + u);
- *op0 = s ^ 0x80;
-
- /* roughly 2/7th difference across boundary */
- u = vp8_signed_char_clamp((63 + Filter2 * 18) >> 7);
- s = vp8_signed_char_clamp(qs1 - u);
- *oq1 = s ^ 0x80;
- s = vp8_signed_char_clamp(ps1 + u);
- *op1 = s ^ 0x80;
-
- /* roughly 1/7th difference across boundary */
- u = vp8_signed_char_clamp((63 + Filter2 * 9) >> 7);
- s = vp8_signed_char_clamp(qs2 - u);
- *oq2 = s ^ 0x80;
- s = vp8_signed_char_clamp(ps2 + u);
- *op2 = s ^ 0x80;
+ signed char flat = 0;
+ flat |= (abs(p1 - p0) > 1) * -1;
+ flat |= (abs(q1 - q0) > 1) * -1;
+ flat |= (abs(p0 - p2) > 1) * -1;
+ flat |= (abs(q0 - q2) > 1) * -1;
+ flat |= (abs(p3 - p0) > 1) * -1;
+ flat |= (abs(q3 - q0) > 1) * -1;
+ flat |= (abs(p4 - p0) > 1) * -1;
+ flat |= (abs(q4 - q0) > 1) * -1;
+ flat = ~flat;
+ return flat;
}
+static __inline void vp8_mbfilter(signed char mask, uc hev, uc flat,
+ uc *op4, uc *op3, uc *op2, uc *op1, uc *op0,
+ uc *oq0, uc *oq1, uc *oq2, uc *oq3, uc *oq4)
+{
+ /* use a 7 tap filter [1, 1, 1, 2, 1, 1, 1] for flat line */
+ if(flat && mask)
+ {
+ unsigned char p0, q0;
+ unsigned char p1, q1;
+ unsigned char p2, q2;
+ unsigned char p3, q3;
+ unsigned char p4, q4;
+
+ p4 = *op4;
+ p3 = *op3;
+ p2 = *op2;
+ p1 = *op1;
+ p0 = *op0;
+ q0 = *oq0;
+ q1 = *oq1;
+ q2 = *oq2;
+ q3 = *oq3;
+ q4 = *oq4;
+
+ *op2 = ( p4 + p4 + p3 + p2 + p2 + p1 + p0 + q0 + 4)>>3;
+ *op1 = ( p4 + p3 + p2 + p1 + p1 + p0 + q0 + q1 + 4)>>3;
+ *op0 = ( p3 + p2 + p1 + p0 + p0 + q0 + q1 + q2 + 4)>>3;
+ *oq0 = ( p2 + p1 + p0 + q0 + q0 + q1 + q2 + q3 + 4)>>3;
+ *oq1 = ( p1 + p0 + q0 + q1 + q1 + q2 + q3 + q4 + 4)>>3;
+ *oq2 = ( p0 + q0 + q1 + q2 + q2 + q3 + q4 + q4 + 4)>>3;
+ }
+ else
+ {
+ signed char ps0, qs0;
+ signed char ps1, qs1;
+ signed char vp8_filter, Filter1, Filter2;
+ signed char u;
+
+ ps1 = (signed char) * op1 ^ 0x80;
+ ps0 = (signed char) * op0 ^ 0x80;
+ qs0 = (signed char) * oq0 ^ 0x80;
+ qs1 = (signed char) * oq1 ^ 0x80;
+
+ /* add outer taps if we have high edge variance */
+ vp8_filter = vp8_signed_char_clamp(ps1 - qs1);
+ vp8_filter &= hev;
+
+ /* inner taps */
+ vp8_filter = vp8_signed_char_clamp(vp8_filter + 3 * (qs0 - ps0));
+ vp8_filter &= mask;
+
+ Filter1 = vp8_signed_char_clamp(vp8_filter + 4);
+ Filter2 = vp8_signed_char_clamp(vp8_filter + 3);
+ Filter1 >>= 3;
+ Filter2 >>= 3;
+ u = vp8_signed_char_clamp(qs0 - Filter1);
+ *oq0 = u ^ 0x80;
+ u = vp8_signed_char_clamp(ps0 + Filter2);
+ *op0 = u ^ 0x80;
+ vp8_filter = Filter1;
+
+ /* outer tap adjustments */
+ vp8_filter += 1;
+ vp8_filter >>= 1;
+ vp8_filter &= ~hev;
+
+ u = vp8_signed_char_clamp(qs1 - vp8_filter);
+ *oq1 = u ^ 0x80;
+ u = vp8_signed_char_clamp(ps1 + vp8_filter);
+ *op1 = u ^ 0x80;
+ }
+}
void vp8_mbloop_filter_horizontal_edge_c
(
unsigned char *s,
@@ -226,6 +261,7 @@ void vp8_mbloop_filter_horizontal_edge_c
{
signed char hev = 0; /* high edge variance */
signed char mask = 0;
+ signed char flat = 0;
int i = 0;
/* loop filter designed to work using chars so that we can make maximum use
@@ -236,11 +272,16 @@ void vp8_mbloop_filter_horizontal_edge_c
mask = vp8_filter_mask(limit[0], blimit[0],
s[-4*p], s[-3*p], s[-2*p], s[-1*p],
- s[0*p], s[1*p], s[2*p], s[3*p]);
+ s[ 0*p], s[ 1*p], s[ 2*p], s[ 3*p]);
hev = vp8_hevmask(thresh[0], s[-2*p], s[-1*p], s[0*p], s[1*p]);
- vp8_mbfilter(mask, hev, s - 3 * p, s - 2 * p, s - 1 * p, s, s + 1 * p, s + 2 * p);
+ flat = vp8_flatmask(thresh[0],
+ s[-5*p], s[-4*p], s[-3*p], s[-2*p], s[-1*p],
+ s[ 0*p], s[ 1*p], s[ 2*p], s[ 3*p], s[ 4*p]);
+ vp8_mbfilter(mask, hev, flat,
+ s - 5*p, s - 4*p, s- 3*p, s - 2*p, s - 1*p,
+ s, s + 1*p, s+ 2*p, s + 3*p, s + 4*p );
++s;
}
@@ -261,18 +302,23 @@ void vp8_mbloop_filter_vertical_edge_c
{
signed char hev = 0; /* high edge variance */
signed char mask = 0;
+ signed char flat = 0;
int i = 0;
do
{
mask = vp8_filter_mask(limit[0], blimit[0],
- s[-4], s[-3], s[-2], s[-1], s[0], s[1], s[2], s[3]);
+ s[-4], s[-3], s[-2], s[-1],
+ s[0], s[1], s[2], s[3]);
hev = vp8_hevmask(thresh[0], s[-2], s[-1], s[0], s[1]);
-
- vp8_mbfilter(mask, hev, s - 3, s - 2, s - 1, s, s + 1, s + 2);
-
+ flat = vp8_flatmask(thresh[0],
+ s[-5],s[-4],s[-3],s[-2],s[-1],
+ s[ 0],s[ 1],s[ 2],s[ 3],s[ 4]);
+ vp8_mbfilter(mask, hev, flat,
+ s - 5, s - 4, s - 3, s - 2, s - 1,
+ s, s + 1, s + 2, s + 3, s + 4);
s += p;
}
while (++i < count * 8);
@@ -280,7 +326,9 @@ void vp8_mbloop_filter_vertical_edge_c
}
/* should we apply any filter at all ( 11111111 yes, 00000000 no) */
-static __inline signed char vp8_simple_filter_mask(uc blimit, uc p1, uc p0, uc q0, uc q1)
+static __inline signed char vp8_simple_filter_mask(uc blimit,
+ uc p1, uc p0,
+ uc q0, uc q1)
{
/* Why does this cause problems for win32?
* error C2143: syntax error : missing ';' before 'type'
@@ -290,7 +338,9 @@ static __inline signed char vp8_simple_filter_mask(uc blimit, uc p1, uc p0, uc q
return mask;
}
-static __inline void vp8_simple_filter(signed char mask, uc *op1, uc *op0, uc *oq0, uc *oq1)
+static __inline void vp8_simple_filter(signed char mask,
+ uc *op1, uc *op0,
+ uc *oq0, uc *oq1)
{
signed char vp8_filter, Filter1, Filter2;
signed char p1 = (signed char) * op1 ^ 0x80;
@@ -327,8 +377,12 @@ void vp8_loop_filter_simple_horizontal_edge_c
do
{
- mask = vp8_simple_filter_mask(blimit[0], s[-2*p], s[-1*p], s[0*p], s[1*p]);
- vp8_simple_filter(mask, s - 2 * p, s - 1 * p, s, s + 1 * p);
+ mask = vp8_simple_filter_mask(blimit[0],
+ s[-2*p], s[-1*p],
+ s[0*p], s[1*p]);
+ vp8_simple_filter(mask,
+ s - 2 * p, s - 1 * p,
+ s, s + 1 * p);
++s;
}
while (++i < 16);
diff --git a/vp8/common/maskingmv.c b/vp8/common/maskingmv.c
new file mode 100644
index 000000000..d01a18fc8
--- /dev/null
+++ b/vp8/common/maskingmv.c
@@ -0,0 +1,855 @@
+/*
+ ============================================================================
+ Name : maskingmv.c
+ Author : jimbankoski
+ Version :
+ Copyright : Your copyright notice
+ Description : Hello World in C, Ansi-style
+ ============================================================================
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+extern unsigned int vp8_sad16x16_sse3(
+ unsigned char *src_ptr,
+ int src_stride,
+ unsigned char *ref_ptr,
+ int ref_stride,
+ int max_err);
+
+extern void vp8_sad16x16x3_sse3(
+ unsigned char *src_ptr,
+ int src_stride,
+ unsigned char *ref_ptr,
+ int ref_stride,
+ int *results);
+
+extern int vp8_growmaskmb_sse3(
+ unsigned char *om,
+ unsigned char *nm);
+
+extern void vp8_makemask_sse3(
+ unsigned char *y,
+ unsigned char *u,
+ unsigned char *v,
+ unsigned char *ym,
+ int yp,
+ int uvp,
+ int ys,
+ int us,
+ int vs,
+ int yt,
+ int ut,
+ int vt);
+
+unsigned int vp8_sad16x16_unmasked_wmt(
+ unsigned char *src_ptr,
+ int src_stride,
+ unsigned char *ref_ptr,
+ int ref_stride,
+ unsigned char *mask);
+
+unsigned int vp8_sad16x16_masked_wmt(
+ unsigned char *src_ptr,
+ int src_stride,
+ unsigned char *ref_ptr,
+ int ref_stride,
+ unsigned char *mask);
+
+unsigned int vp8_masked_predictor_wmt(
+ unsigned char *masked,
+ unsigned char *unmasked,
+ int src_stride,
+ unsigned char *dst_ptr,
+ int dst_stride,
+ unsigned char *mask);
+unsigned int vp8_masked_predictor_uv_wmt(
+ unsigned char *masked,
+ unsigned char *unmasked,
+ int src_stride,
+ unsigned char *dst_ptr,
+ int dst_stride,
+ unsigned char *mask);
+unsigned int vp8_uv_from_y_mask(
+ unsigned char *ymask,
+ unsigned char *uvmask);
+int yp=16;
+unsigned char sxy[]=
+{
+40,40,40,60,60,60,60,40,40,40,40,60,60,60,60,40,80,120,120,90,90,90,90,90,80,120,120,90,90,90,90,90,
+40,40,40,60,60,60,60,40,40,40,40,60,60,60,60,40,80,120,120,90,90,90,90,90,80,120,120,90,90,90,90,90,
+40,40,60,60,60,60,40,40,40,40,60,60,60,60,40,40,80,120,120,90,90,90,90,90,80,120,120,90,90,90,90,90,
+40,40,60,60,60,60,40,40,40,40,60,60,60,60,40,40,80,120,120,90,90,90,90,90,80,120,120,90,90,90,90,90,
+40,60,60,60,60,40,40,40,40,60,60,60,60,40,40,40,80,120,120,90,90,90,90,90,80,120,120,90,90,90,90,90,
+60,60,60,60,40,40,40,40,60,60,60,60,40,40,40,40,80,120,120,90,90,90,90,90,80,120,120,90,90,90,90,90,
+60,60,60,60,40,40,40,40,60,60,60,60,40,40,40,40,80,120,120,90,90,90,90,90,80,120,120,90,90,90,90,90,
+60,60,60,60,40,40,40,40,60,60,60,60,40,40,40,40,80,120,120,90,90,90,90,90,80,120,120,90,90,90,90,90,
+40,60,60,60,60,40,40,40,40,60,60,60,60,40,40,40,80,120,120,90,90,90,90,90,80,120,120,90,90,90,90,90,
+40,60,60,60,60,40,40,40,40,60,60,60,60,40,40,40,80,120,120,90,90,90,90,90,80,120,120,90,90,90,90,90,
+40,40,60,60,60,60,40,40,40,40,60,60,60,60,40,40,80,120,120,90,90,90,90,90,80,120,120,90,90,90,90,90,
+40,40,60,60,60,60,40,40,40,40,60,60,60,60,40,40,80,120,120,90,90,90,90,90,80,120,120,90,90,90,90,90,
+40,40,40,60,60,60,60,40,40,40,40,60,60,60,60,40,80,120,120,90,90,90,90,90,80,120,120,90,90,90,90,90,
+40,40,40,60,60,60,60,40,40,40,40,60,60,60,60,40,80,120,120,90,90,90,90,90,80,120,120,90,90,90,90,90,
+40,40,40,60,60,60,60,40,40,40,40,60,60,60,60,40,80,120,120,90,90,90,90,90,80,120,120,90,90,90,90,90,
+40,40,40,60,60,60,60,40,40,40,40,60,60,60,60,40,80,120,120,90,90,90,90,90,80,120,120,90,90,90,90,90
+};
+
+unsigned char sts[]=
+{
+2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
+2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
+2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
+2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
+2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
+2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
+2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
+2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
+2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
+2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
+2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
+2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
+2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
+2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
+2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
+2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
+};
+unsigned char str[]=
+{
+1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
+};
+
+unsigned char y[]=
+{
+40,40,40,60,60,60,60,40,40,40,40,60,60,60,60,40,
+40,40,40,60,60,60,60,40,40,40,40,60,60,60,60,40,
+40,40,60,60,60,60,40,40,40,40,60,60,60,60,40,40,
+40,40,60,60,60,60,40,40,40,40,60,60,60,60,40,40,
+40,60,60,60,60,40,40,40,40,60,60,60,60,40,40,40,
+60,60,60,60,40,40,40,40,60,60,60,60,40,40,40,40,
+60,60,60,60,40,40,40,40,60,60,60,60,40,40,40,40,
+60,60,60,60,40,40,40,40,60,60,60,60,40,40,40,40,
+40,60,60,60,60,40,40,40,40,60,60,60,60,40,40,40,
+40,60,60,60,60,40,40,40,40,60,60,60,60,40,40,40,
+40,40,60,60,60,60,40,40,40,40,60,60,60,60,40,40,
+40,40,60,60,60,60,40,40,40,40,60,60,60,60,40,40,
+40,40,40,60,60,60,60,40,40,40,40,60,60,60,60,40,
+40,40,40,60,60,60,60,40,40,40,40,60,60,60,60,40,
+40,40,40,60,60,60,60,40,40,40,40,60,60,60,60,40,
+40,40,40,60,60,60,60,40,40,40,40,60,60,60,60,40
+};
+int uvp=8;
+unsigned char u[]=
+{
+90,80,70,70,90,90,90,17,
+90,80,70,70,90,90,90,17,
+84,70,70,90,90,90,17,17,
+84,70,70,90,90,90,17,17,
+80,70,70,90,90,90,17,17,
+90,80,70,70,90,90,90,17,
+90,80,70,70,90,90,90,17,
+90,80,70,70,90,90,90,17
+};
+
+unsigned char v[]=
+{
+80,80,80,80,80,80,80,80,
+80,80,80,80,80,80,80,80,
+80,80,80,80,80,80,80,80,
+80,80,80,80,80,80,80,80,
+80,80,80,80,80,80,80,80,
+80,80,80,80,80,80,80,80,
+80,80,80,80,80,80,80,80,
+80,80,80,80,80,80,80,80
+};
+
+unsigned char ym[256];
+unsigned char uvm[64];
+typedef struct
+{
+ unsigned char y;
+ unsigned char yt;
+ unsigned char u;
+ unsigned char ut;
+ unsigned char v;
+ unsigned char vt;
+ unsigned char use;
+} COLOR_SEG_ELEMENT;
+
+/*
+COLOR_SEG_ELEMENT segmentation[]=
+{
+ { 60,4,80,17,80,10, 1},
+ { 40,4,15,10,80,10, 1},
+};
+*/
+
+COLOR_SEG_ELEMENT segmentation[]=
+{
+ { 79,44,92,44, 237,60, 1},
+};
+
+unsigned char pixel_mask(unsigned char y,unsigned char u,unsigned char v,
+ COLOR_SEG_ELEMENT sgm[],
+ int c)
+{
+ COLOR_SEG_ELEMENT *s=sgm;
+ unsigned char m =0;
+ int i;
+ for(i=0;i<c;i++,s++)
+ m |= ( abs(y-s->y)< s->yt &&
+ abs(u-s->u)< s->ut &&
+ abs(v-s->v)< s->vt ? 255 : 0 );
+
+ return m;
+}
+int neighbors[256][8];
+int makeneighbors(void)
+{
+ int i,j;
+ for(i=0;i<256;i++)
+ {
+ int r=(i>>4),c=(i&15);
+ int ni=0;
+ for(j=0;j<8;j++)
+ neighbors[i][j]=i;
+ for(j=0;j<256;j++)
+ {
+ int nr=(j>>4),nc=(j&15);
+ if(abs(nr-r)<2&&abs(nc-c)<2)
+ neighbors[i][ni++]=j;
+ }
+ }
+ return 0;
+}
+void grow_ymask(unsigned char *ym)
+{
+ unsigned char nym[256];
+ int i,j;
+
+ for(i=0;i<256;i++)
+ {
+ nym[i]=ym[i];
+ for(j=0;j<8;j++)
+ {
+ nym[i]|=ym[neighbors[i][j]];
+ }
+ }
+ for(i=0;i<256;i++)
+ ym[i]=nym[i];
+}
+void make_mb_mask(unsigned char *y, unsigned char *u, unsigned char *v,
+ unsigned char *ym, unsigned char *uvm,
+ int yp, int uvp,
+ COLOR_SEG_ELEMENT sgm[],
+ int count)
+{
+ int r,c;
+ unsigned char *oym = ym;
+
+ memset(ym,20,256);
+ for(r=0;r<8;r++,uvm+=8,u+=uvp,v+=uvp,y+=(yp+yp),ym+=32)
+ for(c=0;c<8;c++)
+ {
+ int y1=y[c<<1];
+ int u1=u[c];
+ int v1=v[c];
+ int m = pixel_mask(y1,u1,v1,sgm,count);
+ uvm[c] = m;
+ ym[c<<1] = uvm[c];// = pixel_mask(y[c<<1],u[c],v[c],sgm,count);
+ ym[(c<<1)+1] = pixel_mask(y[1+(c<<1)],u[c],v[c],sgm,count);
+ ym[(c<<1)+16] = pixel_mask(y[yp+(c<<1)],u[c],v[c],sgm,count);
+ ym[(c<<1)+17] = pixel_mask(y[1+yp+(c<<1)],u[c],v[c],sgm,count);
+ }
+ grow_ymask(oym);
+}
+
+int masked_sad(unsigned char *src, int p, unsigned char *dst, int dp,
+ unsigned char *ym )
+{
+ int i,j;
+ unsigned sad = 0;
+ for(i=0;i<16;i++,src+=p,dst+=dp,ym+=16)
+ for(j=0;j<16;j++)
+ if(ym[j])
+ sad+= abs(src[j]-dst[j]);
+
+ return sad;
+}
+
+int compare_masks(unsigned char *sym, unsigned char *ym)
+{
+ int i,j;
+ unsigned sad = 0;
+ for(i=0;i<16;i++,sym += 16,ym+=16)
+ for(j=0;j<16;j++)
+ sad+= (sym[j]!=ym[j]?1:0);
+
+ return sad;
+}
+int unmasked_sad(unsigned char *src, int p, unsigned char *dst, int dp,
+ unsigned char *ym)
+{
+ int i,j;
+ unsigned sad = 0;
+ for(i=0;i<16;i++,src+=p,dst+=dp,ym+=16)
+ for(j=0;j<16;j++)
+ if(!ym[j])
+ sad+= abs(src[j]-dst[j]);
+
+ return sad;
+}
+int masked_motion_search( unsigned char *y, unsigned char *u, unsigned char *v,
+ int yp, int uvp,
+ unsigned char *dy, unsigned char *du, unsigned char *dv,
+ int dyp, int duvp,
+ COLOR_SEG_ELEMENT sgm[],
+ int count,
+ int *mi,
+ int *mj,
+ int *ui,
+ int *uj,
+ int *wm)
+{
+ int i,j;
+
+ unsigned char ym[256];
+ unsigned char uvm[64];
+ unsigned char dym[256];
+ unsigned char duvm[64];
+ unsigned int e = 0 ;
+ int beste=256;
+ int bmi=-32,bmj=-32;
+ int bui=-32,buj=-32;
+ int beste1=256;
+ int bmi1=-32,bmj1=-32;
+ int bui1=-32,buj1=-32;
+ int obeste;
+
+ // first try finding best mask and then unmasked
+ beste = 0xffffffff;
+
+ // find best unmasked mv
+ for(i=-32;i<32;i++)
+ {
+ unsigned char *dyz = i*dyp + dy;
+ unsigned char *duz = i/2*duvp + du;
+ unsigned char *dvz = i/2*duvp + dv;
+ for(j=-32;j<32;j++)
+ {
+ // 0,0 masked destination
+ make_mb_mask(dyz+j,duz+j/2, dvz+j/2, dym, duvm, dyp, duvp,sgm,count);
+
+ e = unmasked_sad(y, yp, dyz+j, dyp, dym );
+
+ if(e<beste)
+ {
+ bui=i;
+ buj=j;
+ beste=e;
+ }
+ }
+ }
+ //bui=0;buj=0;
+ // best mv masked destination
+ make_mb_mask(dy+bui*dyp+buj,du+bui/2*duvp+buj/2, dv+bui/2*duvp+buj/2,
+ dym, duvm, dyp, duvp,sgm,count);
+
+ obeste = beste;
+ beste = 0xffffffff;
+
+ // find best masked
+ for(i=-32;i<32;i++)
+ {
+ unsigned char *dyz = i*dyp + dy;
+ for(j=-32;j<32;j++)
+ {
+ e = masked_sad(y, yp, dyz+j, dyp, dym );
+
+ if(e<beste)
+ {
+ bmi=i;
+ bmj=j;
+ beste=e;
+ }
+ }
+ }
+ beste1=beste+obeste;
+ bmi1=bmi;bmj1=bmj;
+ bui1=bui;buj1=buj;
+
+ beste = 0xffffffff;
+ // source mask
+ make_mb_mask(y,u, v, ym, uvm, yp, uvp,sgm,count);
+
+ // find best mask
+ for(i=-32;i<32;i++)
+ {
+ unsigned char *dyz = i*dyp + dy;
+ unsigned char *duz = i/2*duvp + du;
+ unsigned char *dvz = i/2*duvp + dv;
+ for(j=-32;j<32;j++)
+ {
+ // 0,0 masked destination
+ make_mb_mask(dyz+j,duz+j/2, dvz+j/2, dym, duvm, dyp, duvp,sgm,count);
+
+ e = compare_masks(ym, dym);
+
+ if(e<beste)
+ {
+ bmi=i;
+ bmj=j;
+ beste=e;
+ }
+ }
+ }
+
+
+ // best mv masked destination
+ make_mb_mask(dy+bmi*dyp+bmj,du+bmi/2*duvp+bmj/2, dv+bmi/2*duvp+bmj/2,
+ dym, duvm, dyp, duvp,sgm,count);
+
+ obeste = masked_sad(y, yp, dy+bmi*dyp+bmj, dyp, dym );
+
+ beste = 0xffffffff;
+
+ // find best unmasked mv
+ for(i=-32;i<32;i++)
+ {
+ unsigned char *dyz = i*dyp + dy;
+ for(j=-32;j<32;j++)
+ {
+ e = unmasked_sad(y, yp, dyz+j, dyp, dym );
+
+ if(e<beste)
+ {
+ bui=i;
+ buj=j;
+ beste=e;
+ }
+ }
+ }
+ beste += obeste;
+
+
+ if(beste<beste1)
+ {
+ *mi = bmi;
+ *mj = bmj;
+ *ui = bui;
+ *uj = buj;
+ *wm = 1;
+ }
+ else
+ {
+ *mi = bmi1;
+ *mj = bmj1;
+ *ui = bui1;
+ *uj = buj1;
+ *wm = 0;
+
+ }
+ return 0;
+}
+
+int predict(unsigned char *src, int p, unsigned char *dst, int dp,
+ unsigned char *ym, unsigned char *prd )
+{
+ int i,j;
+ for(i=0;i<16;i++,src+=p,dst+=dp,ym+=16, prd+=16)
+ for(j=0;j<16;j++)
+ prd[j]=(ym[j] ? src[j]:dst[j]);
+ return 0;
+}
+
+int fast_masked_motion_search( unsigned char *y, unsigned char *u, unsigned char *v,
+ int yp, int uvp,
+ unsigned char *dy, unsigned char *du, unsigned char *dv,
+ int dyp, int duvp,
+ COLOR_SEG_ELEMENT sgm[],
+ int count,
+ int *mi,
+ int *mj,
+ int *ui,
+ int *uj,
+ int *wm)
+{
+ int i,j;
+
+ unsigned char ym[256];
+ unsigned char ym2[256];
+ unsigned char uvm[64];
+ unsigned char dym2[256];
+ unsigned char dym[256];
+ unsigned char duvm[64];
+ unsigned int e = 0 ;
+ int beste=256;
+ int bmi=-32,bmj=-32;
+ int bui=-32,buj=-32;
+ int beste1=256;
+ int bmi1=-32,bmj1=-32;
+ int bui1=-32,buj1=-32;
+ int obeste;
+
+ // first try finding best mask and then unmasked
+ beste = 0xffffffff;
+
+#if 0
+ for(i=0;i<16;i++)
+ {
+ unsigned char *dy = i*yp + y;
+ for(j=0;j<16;j++)
+ printf("%2x",dy[j]);
+ printf("\n");
+ }
+ printf("\n");
+
+ for(i=-32;i<48;i++)
+ {
+ unsigned char *dyz = i*dyp + dy;
+ for(j=-32;j<48;j++)
+ printf("%2x",dyz[j]);
+ printf("\n");
+ }
+#endif
+
+ // find best unmasked mv
+ for(i=-32;i<32;i++)
+ {
+ unsigned char *dyz = i*dyp + dy;
+ unsigned char *duz = i/2*duvp + du;
+ unsigned char *dvz = i/2*duvp + dv;
+ for(j=-32;j<32;j++)
+ {
+ // 0,0 masked destination
+ vp8_makemask_sse3(dyz+j,duz+j/2, dvz+j/2, dym, dyp, duvp,
+ sgm[0].y,sgm[0].u,sgm[0].v,
+ sgm[0].yt,sgm[0].ut,sgm[0].vt);
+
+ vp8_growmaskmb_sse3(dym,dym2);
+
+ e = vp8_sad16x16_unmasked_wmt(y, yp, dyz+j, dyp, dym2 );
+
+ if(e<beste)
+ {
+ bui=i;
+ buj=j;
+ beste=e;
+ }
+ }
+ }
+ //bui=0;buj=0;
+ // best mv masked destination
+
+ vp8_makemask_sse3(dy+bui*dyp+buj,du+bui/2*duvp+buj/2, dv+bui/2*duvp+buj/2,
+ dym, dyp, duvp,
+ sgm[0].y,sgm[0].u,sgm[0].v,
+ sgm[0].yt,sgm[0].ut,sgm[0].vt);
+
+ vp8_growmaskmb_sse3(dym,dym2);
+
+ obeste = beste;
+ beste = 0xffffffff;
+
+ // find best masked
+ for(i=-32;i<32;i++)
+ {
+ unsigned char *dyz = i*dyp + dy;
+ for(j=-32;j<32;j++)
+ {
+ e = vp8_sad16x16_masked_wmt(y, yp, dyz+j, dyp, dym2 );
+ if(e<beste)
+ {
+ bmi=i;
+ bmj=j;
+ beste=e;
+ }
+ }
+ }
+ beste1=beste+obeste;
+ bmi1=bmi;bmj1=bmj;
+ bui1=bui;buj1=buj;
+
+ // source mask
+ vp8_makemask_sse3(y,u, v,
+ ym, yp, uvp,
+ sgm[0].y,sgm[0].u,sgm[0].v,
+ sgm[0].yt,sgm[0].ut,sgm[0].vt);
+
+ vp8_growmaskmb_sse3(ym,ym2);
+
+ // find best mask
+ for(i=-32;i<32;i++)
+ {
+ unsigned char *dyz = i*dyp + dy;
+ unsigned char *duz = i/2*duvp + du;
+ unsigned char *dvz = i/2*duvp + dv;
+ for(j=-32;j<32;j++)
+ {
+ // 0,0 masked destination
+ vp8_makemask_sse3(dyz+j,duz+j/2, dvz+j/2, dym, dyp, duvp,
+ sgm[0].y,sgm[0].u,sgm[0].v,
+ sgm[0].yt,sgm[0].ut,sgm[0].vt);
+
+ vp8_growmaskmb_sse3(dym,dym2);
+
+ e = compare_masks(ym2, dym2);
+
+ if(e<beste)
+ {
+ bmi=i;
+ bmj=j;
+ beste=e;
+ }
+ }
+ }
+
+ vp8_makemask_sse3(dy+bmi*dyp+bmj,du+bmi/2*duvp+bmj/2, dv+bmi/2*duvp+bmj/2,
+ dym, dyp, duvp,
+ sgm[0].y,sgm[0].u,sgm[0].v,
+ sgm[0].yt,sgm[0].ut,sgm[0].vt);
+
+ vp8_growmaskmb_sse3(dym,dym2);
+
+ obeste = vp8_sad16x16_masked_wmt(y, yp, dy+bmi*dyp+bmj, dyp, dym2 );
+
+ beste = 0xffffffff;
+
+ // find best unmasked mv
+ for(i=-32;i<32;i++)
+ {
+ unsigned char *dyz = i*dyp + dy;
+ for(j=-32;j<32;j++)
+ {
+ e = vp8_sad16x16_unmasked_wmt(y, yp, dyz+j, dyp, dym2 );
+
+ if(e<beste)
+ {
+ bui=i;
+ buj=j;
+ beste=e;
+ }
+ }
+ }
+ beste += obeste;
+
+ if(beste<beste1)
+ {
+ *mi = bmi;
+ *mj = bmj;
+ *ui = bui;
+ *uj = buj;
+ *wm = 1;
+ }
+ else
+ {
+ *mi = bmi1;
+ *mj = bmj1;
+ *ui = bui1;
+ *uj = buj1;
+ *wm = 0;
+ beste=beste1;
+
+ }
+ return beste;
+}
+
+int predict_all(unsigned char *ym, unsigned char *um, unsigned char *vm,
+ int ymp, int uvmp,
+ unsigned char *yp, unsigned char *up, unsigned char *vp,
+ int ypp, int uvpp,
+ COLOR_SEG_ELEMENT sgm[],
+ int count,
+ int mi,
+ int mj,
+ int ui,
+ int uj,
+ int wm)
+{
+ int i,j;
+ unsigned char dym[256];
+ unsigned char dym2[256];
+ unsigned char duvm[64];
+ unsigned char *yu=ym,*uu=um, *vu=vm;
+
+ unsigned char *dym3=dym2;
+
+ ym+=mi*ymp+mj;
+ um+=mi/2*uvmp+mj/2;
+ vm+=mi/2*uvmp+mj/2;
+
+ yu+=ui*ymp+uj;
+ uu+=ui/2*uvmp+uj/2;
+ vu+=ui/2*uvmp+uj/2;
+
+ // best mv masked destination
+ if(wm)
+ vp8_makemask_sse3(ym,um, vm, dym, ymp, uvmp,
+ sgm[0].y,sgm[0].u,sgm[0].v,
+ sgm[0].yt,sgm[0].ut,sgm[0].vt);
+ else
+ vp8_makemask_sse3(yu,uu, vu, dym, ymp, uvmp,
+ sgm[0].y,sgm[0].u,sgm[0].v,
+ sgm[0].yt,sgm[0].ut,sgm[0].vt);
+
+ vp8_growmaskmb_sse3(dym,dym2);
+ vp8_masked_predictor_wmt(ym,yu,ymp,yp,ypp,dym3);
+ vp8_uv_from_y_mask(dym3,duvm);
+ vp8_masked_predictor_uv_wmt(um,uu,uvmp,up,uvpp,duvm);
+ vp8_masked_predictor_uv_wmt(vm,vu,uvmp,vp,uvpp,duvm);
+
+ return 0;
+}
+
+unsigned char f0p[1280*720*3/2];
+unsigned char f1p[1280*720*3/2];
+unsigned char prd[1280*720*3/2];
+unsigned char msk[1280*720*3/2];
+
+
+int mainz(int argc, char *argv[]) {
+
+ FILE *f=fopen(argv[1],"rb");
+ FILE *g=fopen(argv[2],"wb");
+ int w=atoi(argv[3]),h=atoi(argv[4]);
+ int y_stride=w,uv_stride=w/2;
+ int r,c;
+ unsigned char *f0=f0p,*f1=f1p,*t;
+ unsigned char ym[256],uvm[64];
+ unsigned char ym2[256],uvm2[64];
+ unsigned char ym3[256],uvm3[64];
+ int a,b;
+
+ COLOR_SEG_ELEMENT last={ 20,20,20,20, 230,20, 1},best;
+#if 0
+ makeneighbors();
+ COLOR_SEG_ELEMENT segmentation[]=
+ {
+ { 60,4,80,17,80,10, 1},
+ { 40,4,15,10,80,10, 1},
+ };
+ make_mb_mask(y, u, v,ym2,uvm2,16,8,segmentation,1);
+
+ vp8_makemask_sse3(y,u,v,ym, (int) 16,(int) 8,
+ (int) segmentation[0].y,(int) segmentation[0].u,(int) segmentation[0].v,
+ segmentation[0].yt,segmentation[0].ut,segmentation[0].vt);
+
+ vp8_growmaskmb_sse3(ym,ym3);
+
+ a = vp8_sad16x16_masked_wmt(str,16,sts,16,ym3);
+ b = vp8_sad16x16_unmasked_wmt(str,16,sts,16,ym3);
+
+ vp8_masked_predictor_wmt(str,sts,16,ym,16,ym3);
+
+ vp8_uv_from_y_mask(ym3,uvm3);
+
+ return 4;
+#endif
+ makeneighbors();
+
+
+ memset(prd,128,w*h*3/2);
+
+ fread(f0,w*h*3/2,1,f);
+
+ while(!feof(f))
+ {
+ unsigned char *ys=f1,*yd=f0,*yp=prd;
+ unsigned char *us=f1+w*h,*ud=f0+w*h,*up=prd+w*h;
+ unsigned char *vs=f1+w*h*5/4,*vd=f0+w*h*5/4,*vp=prd+w*h*5/4;
+ fread(f1,w*h*3/2,1,f);
+
+ ys+=32*y_stride;yd+=32*y_stride;yp+=32*y_stride;
+ us+=16*uv_stride;ud+=16*uv_stride;up+=16*uv_stride;
+ vs+=16*uv_stride;vd+=16*uv_stride;vp+=16*uv_stride;
+ for(r=32;r<h-32;r+=16,
+ ys+=16*w,yd+=16*w,yp+=16*w,
+ us+=8*uv_stride,ud+=8*uv_stride,up+=8*uv_stride,
+ vs+=8*uv_stride,vd+=8*uv_stride,vp+=8*uv_stride)
+ {
+ for(c=32;c<w-32;c+=16)
+ {
+ int mi,mj,ui,uj,wm;
+ int bmi,bmj,bui,buj,bwm;
+ unsigned char ym[256];
+
+ if(vp8_sad16x16_sse3( ys+c,y_stride, yd+c,y_stride,0xffff) == 0)
+ bmi=bmj=bui=buj=bwm=0;
+ else
+ {
+ COLOR_SEG_ELEMENT cs[5];
+ int j;
+ unsigned int beste=0xfffffff;
+ unsigned int bestj=0;
+
+ // try color from last mb segmentation
+ cs[0] = last;
+
+ // try color segs from 4 pixels in mb recon as segmentation
+ cs[1].y = yd[c + y_stride + 1];cs[1].u = ud[c/2 + uv_stride];
+ cs[1].v = vd[c/2 + uv_stride];
+ cs[1].yt = cs[1].ut = cs[1].vt = 20;
+ cs[2].y = yd[c + w + 14];
+ cs[2].u = ud[c/2 + uv_stride+7];
+ cs[2].v = vd[c/2 + uv_stride+7];
+ cs[2].yt = cs[2].ut = cs[2].vt = 20;
+ cs[3].y = yd[c + w*14 + 1];
+ cs[3].u = ud[c/2 + uv_stride*7];
+ cs[3].v = vd[c/2 + uv_stride*7];
+ cs[3].yt = cs[3].ut = cs[3].vt = 20;
+ cs[4].y = yd[c + w*14 + 14];
+ cs[4].u = ud[c/2 + uv_stride*7+7];
+ cs[4].v = vd[c/2 + uv_stride*7+7];
+ cs[4].yt = cs[4].ut = cs[4].vt = 20;
+
+ for(j=0;j<5;j++)
+ {
+ int e;
+
+ e = fast_masked_motion_search(
+ ys+c, us+c/2, vs+c/2, y_stride, uv_stride,
+ yd+c, ud+c/2, vd+c/2, y_stride, uv_stride,
+ &cs[j], 1, &mi,&mj,&ui,&uj,&wm);
+
+ if(e<beste)
+ {
+ bmi=mi;bmj=mj;bui=ui;buj=uj,bwm=wm;
+ bestj=j;
+ beste=e;
+ }
+ }
+ best = cs[bestj];
+ //best = segmentation[0];
+ last = best;
+ }
+ predict_all(yd+c, ud+c/2, vd+c/2, w, uv_stride,
+ yp+c, up+c/2, vp+c/2, w, uv_stride,
+ &best, 1, bmi,bmj,bui,buj,bwm);
+
+ }
+ }
+ fwrite(prd,w*h*3/2,1,g);
+ t=f0;
+ f0=f1;
+ f1=t;
+
+ }
+ fclose(f);
+ fclose(g);
+ return;
+}
diff --git a/vp8/common/modecont.c b/vp8/common/modecont.c
index 86a74bc0f..d80e16ee5 100644
--- a/vp8/common/modecont.c
+++ b/vp8/common/modecont.c
@@ -10,31 +10,33 @@
#include "entropy.h"
-
-const int vp8_mode_contexts[6][4] =
+const int default_vp8_mode_contexts[6][4] =
+{
+ { /* 0 */
+ 7, 1, 1, 183},
+ { /* 1 */
+ 14, 18, 14, 147},
+ {/* 2 */
+ 135, 64, 57, 68},
+ { /* 3 */
+ 60, 56, 128, 65},
+ {/* 4 */
+ 159, 134, 128, 34},
+ { /* 5 */
+ 234, 188, 128, 28},
+};
+const int default_vp8_mode_contexts_a[6][4] =
{
- {
- /* 0 */
- 7, 1, 1, 143,
- },
- {
- /* 1 */
- 14, 18, 14, 107,
- },
- {
- /* 2 */
- 135, 64, 57, 68,
- },
- {
- /* 3 */
- 60, 56, 128, 65,
- },
- {
- /* 4 */
- 159, 134, 128, 34,
- },
- {
- /* 5 */
- 234, 188, 128, 28,
- },
+ { /* 0 */
+ 4, 1, 1, 143},
+ { /* 1 */
+ 7, 9, 7, 107},
+ {/* 2 */
+ 95, 34, 57, 68},
+ { /* 3 */
+ 95, 56, 128, 65},
+ {/* 4 */
+ 159, 67, 128, 34},
+ { /* 5 */
+ 234, 94, 128, 28},
};
diff --git a/vp8/common/modecont.h b/vp8/common/modecont.h
index 24db88295..f219d7594 100644
--- a/vp8/common/modecont.h
+++ b/vp8/common/modecont.h
@@ -12,6 +12,6 @@
#ifndef __INC_MODECONT_H
#define __INC_MODECONT_H
-extern const int vp8_mode_contexts[6][4];
-
+extern const int default_vp8_mode_contexts[6][4];
+extern const int default_vp8_mode_contexts_a[6][4];
#endif
diff --git a/vp8/common/onyx.h b/vp8/common/onyx.h
index 015b4c4d4..574c8bfb5 100644
--- a/vp8/common/onyx.h
+++ b/vp8/common/onyx.h
@@ -53,7 +53,6 @@ extern "C"
typedef enum
{
- MODE_REALTIME = 0x0,
MODE_GOODQUALITY = 0x1,
MODE_BESTQUALITY = 0x2,
MODE_FIRSTPASS = 0x3,
@@ -155,15 +154,6 @@ extern "C"
int best_allowed_q;
int cq_level;
- // allow internal resizing ( currently disabled in the build !!!!!)
- int allow_spatial_resampling;
- int resample_down_water_mark;
- int resample_up_water_mark;
-
- // allow internal frame rate alterations
- int allow_df;
- int drop_frames_water_mark;
-
// two pass datarate control
int two_pass_vbrbias; // two pass datarate control tweaks
int two_pass_vbrmin_section;
@@ -175,21 +165,9 @@ extern "C"
// these parameters aren't to be used in final build don't use!!!
int play_alternate;
int alt_freq;
- int alt_q;
- int key_q;
- int gold_q;
-
- int multi_threaded; // how many threads to run the encoder on
- int token_partitions; // how many token partitions to create for multi core decoding
int encode_breakout; // early breakout encode threshold : for video conf recommend 800
- unsigned int error_resilient_mode; // Bitfield defining the error
- // resiliency features to enable. Can provide
- // decodable frames after losses in previous
- // frames and decodable partitions after
- // losses in the same frame.
-
int arnr_max_frames;
int arnr_strength ;
int arnr_type ;
diff --git a/vp8/common/onyxc_int.h b/vp8/common/onyxc_int.h
index 11a830ff6..535eabb42 100644
--- a/vp8/common/onyxc_int.h
+++ b/vp8/common/onyxc_int.h
@@ -32,34 +32,38 @@
void vp8_initialize_common(void);
#define MINQ 0
-#define MAXQ 127
+
+#define MAXQ 255
+#define QINDEX_BITS 8
+
#define QINDEX_RANGE (MAXQ + 1)
#define NUM_YV12_BUFFERS 4
-#define MAX_PARTITIONS 9
+#define COMP_PRED_CONTEXTS 2
typedef struct frame_contexts
{
vp8_prob bmode_prob [VP8_BINTRAMODES-1];
vp8_prob ymode_prob [VP8_YMODES-1]; /* interframe intra mode probs */
+#if CONFIG_UVINTRA
+ vp8_prob uv_mode_prob [VP8_YMODES][VP8_UV_MODES-1];
+#else
vp8_prob uv_mode_prob [VP8_UV_MODES-1];
+#endif
vp8_prob sub_mv_ref_prob [VP8_SUBMVREFS-1];
vp8_prob coef_probs [BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTEXTS] [ENTROPY_NODES];
+ vp8_prob coef_probs_8x8 [BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTEXTS] [ENTROPY_NODES];
MV_CONTEXT mvc[2];
MV_CONTEXT pre_mvc[2]; /* not to caculate the mvcost for the frame if mvc doesn't change. */
+#if CONFIG_HIGH_PRECISION_MV
+ MV_CONTEXT_HP mvc_hp[2];
+ MV_CONTEXT_HP pre_mvc_hp[2]; /* not to caculate the mvcost for the frame if mvc doesn't change. */
+#endif
} FRAME_CONTEXT;
typedef enum
{
- ONE_PARTITION = 0,
- TWO_PARTITION = 1,
- FOUR_PARTITION = 2,
- EIGHT_PARTITION = 3
-} TOKEN_PARTITION;
-
-typedef enum
-{
RECON_CLAMP_REQUIRED = 0,
RECON_CLAMP_NOTREQUIRED = 1
} CLAMP_TYPE;
@@ -70,6 +74,21 @@ typedef enum
BILINEAR = 1
} INTERPOLATIONFILTERTYPE;
+typedef enum
+{
+ SINGLE_PREDICTION_ONLY = 0,
+ COMP_PREDICTION_ONLY = 1,
+ HYBRID_PREDICTION = 2,
+ NB_PREDICTION_TYPES = 3,
+} COMPPREDMODE_TYPE;
+
+/* TODO: allows larger transform */
+typedef enum
+{
+ ONLY_4X4 = 0,
+ ALLOW_8X8 = 1
+} TXFM_MODE;
+
typedef struct VP8_COMMON_RTCD
{
#if CONFIG_RUNTIME_CPU_DETECT
@@ -127,6 +146,8 @@ typedef struct VP8Common
/* profile settings */
int experimental;
int mb_no_coeff_skip;
+ TXFM_MODE txfm_mode;
+ COMPPREDMODE_TYPE comp_pred_mode;
int no_lpf;
int use_bilinear_mc_filter;
int full_pixel;
@@ -152,6 +173,9 @@ typedef struct VP8Common
MODE_INFO *prev_mi; /* 'mi' from last frame (points into prev_mip) */
+ // Persistent mb segment id map used in prediction.
+ unsigned char * last_frame_seg_map;
+
INTERPOLATIONFILTERTYPE mcomp_filter_type;
LOOPFILTERTYPE filter_type;
@@ -176,24 +200,53 @@ typedef struct VP8Common
ENTROPY_CONTEXT_PLANES *above_context; /* row of context for each plane */
ENTROPY_CONTEXT_PLANES left_context; /* (up to) 4 contexts "" */
-
/* keyframe block modes are predicted by their above, left neighbors */
vp8_prob kf_bmode_prob [VP8_BINTRAMODES] [VP8_BINTRAMODES] [VP8_BINTRAMODES-1];
+#if CONFIG_QIMODE
+ vp8_prob kf_ymode_prob[8][VP8_YMODES-1]; /* keyframe "" */
+ int kf_ymode_probs_index;
+ int kf_ymode_probs_update;
+#else
vp8_prob kf_ymode_prob [VP8_YMODES-1]; /* keyframe "" */
+#endif
+#if CONFIG_UVINTRA
+ vp8_prob kf_uv_mode_prob[VP8_YMODES] [VP8_UV_MODES-1];
+#else
vp8_prob kf_uv_mode_prob [VP8_UV_MODES-1];
+#endif
+
+ vp8_prob i8x8_mode_prob [VP8_UV_MODES-1];
+
+ vp8_prob prob_intra_coded;
+ vp8_prob prob_last_coded;
+ vp8_prob prob_gf_coded;
+ // Context probabilities when using predictive coding of segment id
+ vp8_prob segment_pred_probs[PREDICTION_PROBS];
+ unsigned char temporal_update;
+ // Context probabilities for reference frame prediction
+ unsigned char ref_scores[MAX_REF_FRAMES];
+ vp8_prob ref_pred_probs[PREDICTION_PROBS];
+ vp8_prob mod_refprobs[MAX_REF_FRAMES][PREDICTION_PROBS];
+
+ vp8_prob prob_comppred[COMP_PRED_CONTEXTS];
+
+ FRAME_CONTEXT lfc_a; /* last alt ref entropy */
FRAME_CONTEXT lfc; /* last frame entropy */
FRAME_CONTEXT fc; /* this frame entropy */
- unsigned int current_video_frame;
+ int mv_ref_ct[6][4][2];
+ int mode_context[6][4];
+ int mv_ref_ct_a[6][4][2];
+ int mode_context_a[6][4];
+ int vp8_mode_contexts[6][4];
+ unsigned int current_video_frame;
int near_boffset[3];
int version;
- TOKEN_PARTITION multi_token_partition;
-
#ifdef PACKET_TESTING
VP8_HEADER oh;
#endif
@@ -203,9 +256,7 @@ typedef struct VP8Common
#if CONFIG_RUNTIME_CPU_DETECT
VP8_COMMON_RTCD rtcd;
#endif
-#if CONFIG_MULTITHREAD
- int processor_core_count;
-#endif
+
#if CONFIG_POSTPROC
struct postproc_state postproc_state;
#endif
diff --git a/vp8/common/onyxd.h b/vp8/common/onyxd.h
index 08f1cca80..d3b2c18d1 100644
--- a/vp8/common/onyxd.h
+++ b/vp8/common/onyxd.h
@@ -32,7 +32,6 @@ extern "C"
int Version;
int postprocess;
int max_threads;
- int error_concealment;
int input_partition;
} VP8D_CONFIG;
typedef enum
diff --git a/vp8/common/postproc.c b/vp8/common/postproc.c
index ace4c113c..d88b419bc 100644
--- a/vp8/common/postproc.c
+++ b/vp8/common/postproc.c
@@ -9,7 +9,7 @@
*/
-#include "vpx_config.h"
+#include "vpx_ports/config.h"
#include "vpx_scale/yv12config.h"
#include "postproc.h"
#include "vpx_scale/yv12extend.h"
@@ -1024,9 +1024,9 @@ int vp8_post_proc_frame(VP8_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp8_ppflags_t
if ((ppflags->display_b_modes_flag & (1<<mi->mbmi.mode))
|| (ppflags->display_mb_modes_flag & B_PRED))
{
- Y = B_PREDICTION_MODE_colors[bmi->as_mode][0];
- U = B_PREDICTION_MODE_colors[bmi->as_mode][1];
- V = B_PREDICTION_MODE_colors[bmi->as_mode][2];
+ Y = B_PREDICTION_MODE_colors[bmi->as_mode.first][0];
+ U = B_PREDICTION_MODE_colors[bmi->as_mode.first][1];
+ V = B_PREDICTION_MODE_colors[bmi->as_mode.first][2];
POSTPROC_INVOKE(RTCD_VTABLE(oci), blend_b)
(yl+bx, ul+(bx>>1), vl+(bx>>1), Y, U, V, 0xc000, y_stride);
diff --git a/vp8/common/pred_common.c b/vp8/common/pred_common.c
new file mode 100644
index 000000000..6bbb619e5
--- /dev/null
+++ b/vp8/common/pred_common.c
@@ -0,0 +1,339 @@
+/*
+ * Copyright (c) 2012 The WebM project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "vp8/common/pred_common.h"
+
+// TBD prediction functions for various bitstream signals
+
+// Returns a context number for the given MB prediction signal
+unsigned char get_pred_context( VP8_COMMON *const cm,
+ MACROBLOCKD *const xd,
+ PRED_ID pred_id )
+{
+ int pred_context;
+ MODE_INFO *m = xd->mode_info_context;
+
+ // Note:
+ // The mode info data structure has a one element border above and to the
+ // left of the entries correpsonding to real macroblocks.
+ // The prediction flags in these dummy entries are initialised to 0.
+ switch (pred_id)
+ {
+ case PRED_SEG_ID:
+ pred_context = (m - 1)->mbmi.seg_id_predicted +
+ (m - cm->mode_info_stride)->mbmi.seg_id_predicted;
+ break;
+
+
+ case PRED_REF:
+ pred_context = (m - 1)->mbmi.ref_predicted +
+ (m - cm->mode_info_stride)->mbmi.ref_predicted;
+ break;
+
+ case PRED_COMP:
+ // Context based on use of comp pred flag by neighbours
+ //pred_context =
+ // ((m - 1)->mbmi.second_ref_frame != INTRA_FRAME) +
+ // ((m - cm->mode_info_stride)->mbmi.second_ref_frame != INTRA_FRAME);
+
+ // Context based on mode and reference frame
+ //if ( m->mbmi.ref_frame == LAST_FRAME )
+ // pred_context = 0 + (m->mbmi.mode != ZEROMV);
+ //else if ( m->mbmi.ref_frame == GOLDEN_FRAME )
+ // pred_context = 2 + (m->mbmi.mode != ZEROMV);
+ //else
+ // pred_context = 4 + (m->mbmi.mode != ZEROMV);
+
+ if ( m->mbmi.ref_frame == LAST_FRAME )
+ pred_context = 0;
+ else
+ pred_context = 1;
+
+ break;
+
+ default:
+ // TODO *** add error trap code.
+ pred_context = 0;
+ break;
+ }
+
+ return pred_context;
+}
+
+// This function returns a context probability for coding a given
+// prediction signal
+vp8_prob get_pred_prob( VP8_COMMON *const cm,
+ MACROBLOCKD *const xd,
+ PRED_ID pred_id )
+{
+ vp8_prob pred_probability;
+ int pred_context;
+
+ // Get the appropriate prediction context
+ pred_context = get_pred_context( cm, xd, pred_id );
+
+ switch (pred_id)
+ {
+ case PRED_SEG_ID:
+ pred_probability = cm->segment_pred_probs[pred_context];
+ break;
+
+ case PRED_REF:
+ pred_probability = cm->ref_pred_probs[pred_context];
+ break;
+
+ case PRED_COMP:
+ // In keeping with convention elsewhre the probability returned is
+ // the probability of a "0" outcome which in this case means the
+ // probability of comp pred off.
+ pred_probability = cm->prob_comppred[pred_context];
+ break;
+
+ default:
+ // TODO *** add error trap code.
+ pred_probability = 128;
+ break;
+ }
+
+ return pred_probability;
+}
+
+// This function returns the status of the given prediction signal.
+// I.e. is the predicted value for the given signal correct.
+unsigned char get_pred_flag( MACROBLOCKD *const xd,
+ PRED_ID pred_id )
+{
+ unsigned char pred_flag = 0;
+
+ switch (pred_id)
+ {
+ case PRED_SEG_ID:
+ pred_flag = xd->mode_info_context->mbmi.seg_id_predicted;
+ break;
+
+ case PRED_REF:
+ pred_flag = xd->mode_info_context->mbmi.ref_predicted;
+ break;
+
+ default:
+ // TODO *** add error trap code.
+ pred_flag = 0;
+ break;
+}
+
+ return pred_flag;
+}
+
+// This function sets the status of the given prediction signal.
+// I.e. is the predicted value for the given signal correct.
+void set_pred_flag( MACROBLOCKD *const xd,
+ PRED_ID pred_id,
+ unsigned char pred_flag)
+{
+ switch (pred_id)
+ {
+ case PRED_SEG_ID:
+ xd->mode_info_context->mbmi.seg_id_predicted = pred_flag;
+ break;
+
+ case PRED_REF:
+ xd->mode_info_context->mbmi.ref_predicted = pred_flag;
+ break;
+
+ default:
+ // TODO *** add error trap code.
+ break;
+ }
+}
+
+
+// The following contain the guts of the prediction code used to
+// peredict various bitstream signals.
+
+// Macroblock segment id prediction function
+unsigned char get_pred_mb_segid( VP8_COMMON *const cm, int MbIndex )
+{
+ // Currently the prediction for the macroblock segment ID is
+ // the value stored for this macroblock in the previous frame.
+ return cm->last_frame_seg_map[MbIndex];
+}
+
+MV_REFERENCE_FRAME get_pred_ref( VP8_COMMON *const cm,
+ MACROBLOCKD *const xd )
+{
+ MODE_INFO *m = xd->mode_info_context;
+
+ MV_REFERENCE_FRAME left;
+ MV_REFERENCE_FRAME above;
+ MV_REFERENCE_FRAME above_left;
+ MV_REFERENCE_FRAME pred_ref = LAST_FRAME;
+
+ int segment_id = xd->mode_info_context->mbmi.segment_id;
+ int seg_ref_active;
+ int i;
+
+ unsigned char frame_allowed[MAX_REF_FRAMES] = {1,1,1,1};
+ unsigned char ref_score[MAX_REF_FRAMES];
+ unsigned char best_score = 0;
+ unsigned char left_in_image;
+ unsigned char above_in_image;
+ unsigned char above_left_in_image;
+
+ // Is segment coding ennabled
+ seg_ref_active = segfeature_active( xd, segment_id, SEG_LVL_REF_FRAME );
+
+ // Special case treatment if segment coding is enabled.
+ // Dont allow prediction of a reference frame that the segment
+ // does not allow
+ if ( seg_ref_active )
+ {
+ for ( i = 0; i < MAX_REF_FRAMES; i++ )
+ {
+ frame_allowed[i] =
+ check_segref( xd, segment_id, i );
+
+ // Score set to 0 if ref frame not allowed
+ ref_score[i] = cm->ref_scores[i] * frame_allowed[i];
+ }
+ }
+ else
+ vpx_memcpy( ref_score, cm->ref_scores, sizeof(ref_score) );
+
+ // Reference frames used by neighbours
+ left = (m - 1)->mbmi.ref_frame;
+ above = (m - cm->mode_info_stride)->mbmi.ref_frame;
+ above_left = (m - 1 - cm->mode_info_stride)->mbmi.ref_frame;
+
+ // Are neighbours in image
+ left_in_image = (m - 1)->mbmi.mb_in_image;
+ above_in_image = (m - cm->mode_info_stride)->mbmi.mb_in_image;
+ above_left_in_image = (m - 1 - cm->mode_info_stride)->mbmi.mb_in_image;
+
+ // Adjust scores for candidate reference frames based on neigbours
+ if ( frame_allowed[left] && left_in_image )
+ {
+ ref_score[left] += 16;
+ if ( above_left_in_image && (left == above_left) )
+ ref_score[left] += 4;
+ }
+ if ( frame_allowed[above] && above_in_image )
+ {
+ ref_score[above] += 16;
+ if ( above_left_in_image && (above == above_left) )
+ ref_score[above] += 4;
+ }
+
+ // Now choose the candidate with the highest score
+ for ( i = 0; i < MAX_REF_FRAMES; i++ )
+ {
+ if ( ref_score[i] > best_score )
+ {
+ pred_ref = i;
+ best_score = ref_score[i];
+ }
+ }
+
+ return pred_ref;
+}
+
+// Functions to computes a set of modified reference frame probabilities
+// to use when the prediction of the reference frame value fails
+void calc_ref_probs( int * count, vp8_prob * probs )
+{
+ int tot_count;
+
+ tot_count = count[0] + count[1] + count[2] + count[3];
+ if ( tot_count )
+ {
+ probs[0] = (vp8_prob)((count[0] * 255) / tot_count);
+ probs[0] += !probs[0];
+ }
+ else
+ probs[0] = 128;
+
+ tot_count -= count[0];
+ if ( tot_count )
+ {
+ probs[1] = (vp8_prob)((count[1] * 255) / tot_count);
+ probs[1] += !probs[1];
+ }
+ else
+ probs[1] = 128;
+
+ tot_count -= count[1];
+ if ( tot_count )
+ {
+ probs[2] = (vp8_prob)((count[2] * 255) / tot_count);
+ probs[2] += !probs[2];
+ }
+ else
+ probs[2] = 128;
+
+}
+
+// Computes a set of modified conditional probabilities for the reference frame
+// Values willbe set to 0 for reference frame options that are not possible
+// because wither they were predicted and prediction has failed or because
+// they are not allowed for a given segment.
+void compute_mod_refprobs( VP8_COMMON *const cm )
+{
+ int norm_cnt[MAX_REF_FRAMES];
+ int intra_count;
+ int inter_count;
+ int last_count;
+ int gfarf_count;
+ int gf_count;
+ int arf_count;
+
+ intra_count = cm->prob_intra_coded;
+ inter_count = (255 - intra_count);
+ last_count = (inter_count * cm->prob_last_coded)/255;
+ gfarf_count = inter_count - last_count;
+ gf_count = (gfarf_count * cm->prob_gf_coded)/255;
+ arf_count = gfarf_count - gf_count;
+
+ // Work out modified reference frame probabilities to use where prediction
+ // of the reference frame fails
+ norm_cnt[0] = 0;
+ norm_cnt[1] = last_count;
+ norm_cnt[2] = gf_count;
+ norm_cnt[3] = arf_count;
+ calc_ref_probs( norm_cnt, cm->mod_refprobs[INTRA_FRAME] );
+ cm->mod_refprobs[INTRA_FRAME][0] = 0; // This branch implicit
+
+ norm_cnt[0] = intra_count;
+ norm_cnt[1] = 0;
+ norm_cnt[2] = gf_count;
+ norm_cnt[3] = arf_count;
+ calc_ref_probs( norm_cnt, cm->mod_refprobs[LAST_FRAME]);
+ cm->mod_refprobs[LAST_FRAME][1] = 0; // This branch implicit
+
+ norm_cnt[0] = intra_count;
+ norm_cnt[1] = last_count;
+ norm_cnt[2] = 0;
+ norm_cnt[3] = arf_count;
+ calc_ref_probs( norm_cnt, cm->mod_refprobs[GOLDEN_FRAME] );
+ cm->mod_refprobs[GOLDEN_FRAME][2] = 0; // This branch implicit
+
+ norm_cnt[0] = intra_count;
+ norm_cnt[1] = last_count;
+ norm_cnt[2] = gf_count;
+ norm_cnt[3] = 0;
+ calc_ref_probs( norm_cnt, cm->mod_refprobs[ALTREF_FRAME] );
+ cm->mod_refprobs[ALTREF_FRAME][2] = 0; // This branch implicit
+
+ // Score the reference frames based on overal frequency.
+ // These scores contribute to the prediction choices.
+ // Max score 17 min 1
+ cm->ref_scores[INTRA_FRAME] = 1 + (intra_count * 16 / 255);
+ cm->ref_scores[LAST_FRAME] = 1 + (last_count * 16 / 255);
+ cm->ref_scores[GOLDEN_FRAME] = 1 + (gf_count * 16 / 255);
+ cm->ref_scores[ALTREF_FRAME] = 1 + (arf_count * 16 / 255);
+}
diff --git a/vp8/common/pred_common.h b/vp8/common/pred_common.h
new file mode 100644
index 000000000..cd68035b8
--- /dev/null
+++ b/vp8/common/pred_common.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2012 The WebM project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "type_aliases.h"
+#include "onyxc_int.h"
+#include "vp8/common/blockd.h"
+
+#ifndef __INC_PRED_COMMON_H__
+#define __INC_PRED_COMMON_H__ 1
+
+
+// Predicted items
+typedef enum
+{
+ PRED_SEG_ID = 0, // Segment identifier
+ PRED_REF = 1,
+ PRED_COMP = 2
+
+} PRED_ID;
+
+
+extern unsigned char get_pred_context( VP8_COMMON *const cm,
+ MACROBLOCKD *const xd,
+ PRED_ID pred_id );
+
+extern vp8_prob get_pred_prob( VP8_COMMON *const cm,
+ MACROBLOCKD *const xd,
+ PRED_ID pred_id );
+
+extern unsigned char get_pred_flag( MACROBLOCKD *const xd,
+ PRED_ID pred_id );
+
+extern void set_pred_flag( MACROBLOCKD *const xd,
+ PRED_ID pred_id,
+ unsigned char pred_flag);
+
+
+extern unsigned char get_pred_mb_segid( VP8_COMMON *const cm, int MbIndex );
+
+extern MV_REFERENCE_FRAME get_pred_ref( VP8_COMMON *const cm,
+ MACROBLOCKD *const xd );
+extern void compute_mod_refprobs( VP8_COMMON *const cm );
+
+#endif /* __INC_PRED_COMMON_H__ */
diff --git a/vp8/common/predict_rotated.c b/vp8/common/predict_rotated.c
new file mode 100644
index 000000000..0880bfb4c
--- /dev/null
+++ b/vp8/common/predict_rotated.c
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2012 The WebM project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#if CONFIG_ROTATION
+typedef struct
+{
+ int y;
+ int x;
+ unsigned long t;
+} tap;
+
+typedef struct
+{
+ tap pt[4];
+} point_taps;
+
+typedef struct
+{
+ point_taps pt[256];
+} mb_taps;
+
+mb_taps mt_8x8[] =
+{
+ #include "rotate2.h"
+};
+
+mb_taps mt[] =
+{
+ #include "rotate.h"
+};
+
+void predict_rotated_16x16(int rotation_index, unsigned char *src, int sp,
+ unsigned char *dst, int dp)
+{
+ int i, j, k, p = 0;
+
+ for (i = 0; i < 16; i++, dst += dp)
+ {
+ for (j = 0; j < 16; j++, p++)
+ {
+ unsigned int sum = 32768;
+
+ for (k = 0; k < 4; k++)
+ {
+ tap *tp = &mt[rotation_index].pt[p].pt[k];
+ sum += src[tp->y * sp + tp->x] * tp->t;
+ }
+ sum >>= 16;
+ dst[j] = sum;
+ }
+ }
+}
+void predict_rotated_8x8(int rotation_index, unsigned char *src, int sp,
+ unsigned char *dst, int dp)
+{
+ int i, j, k, p = 0;
+
+ for (i = 0; i < 8; i++, dst += dp)
+ {
+ for (j = 0; j < 8; j++, p++)
+ {
+ unsigned int sum = 32768;
+
+ for (k = 0; k < 4; k++)
+ {
+ tap *tp = &mt_8x8[rotation_index].pt[p].pt[k];
+ sum += src[tp->y * sp + tp->x] * tp->t;
+ }
+ sum >>= 16;
+ dst[j] = sum;
+ }
+ }
+}
+#endif
+
+
+
+
diff --git a/vp8/common/quant_common.c b/vp8/common/quant_common.c
index b8e6e2972..0bb44f588 100644
--- a/vp8/common/quant_common.c
+++ b/vp8/common/quant_common.c
@@ -11,57 +11,34 @@
#include "quant_common.h"
+static int dc_qlookup[QINDEX_RANGE];
+static int ac_qlookup[QINDEX_RANGE];
-#if !CONFIG_EXTEND_QRANGE
-static const int dc_qlookup[QINDEX_RANGE] =
-{
- 4, 5, 6, 7, 8, 9, 10, 10, 11, 12, 13, 14, 15, 16, 17, 17,
- 18, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 25, 25, 26, 27, 28,
- 29, 30, 31, 32, 33, 34, 35, 36, 37, 37, 38, 39, 40, 41, 42, 43,
- 44, 45, 46, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
- 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
- 75, 76, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
- 91, 93, 95, 96, 98, 100, 101, 102, 104, 106, 108, 110, 112, 114, 116, 118,
- 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 143, 145, 148, 151, 154, 157,
-};
-
-static const int ac_qlookup[QINDEX_RANGE] =
-{
- 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
- 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
- 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
- 52, 53, 54, 55, 56, 57, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76,
- 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108,
- 110, 112, 114, 116, 119, 122, 125, 128, 131, 134, 137, 140, 143, 146, 149, 152,
- 155, 158, 161, 164, 167, 170, 173, 177, 181, 185, 189, 193, 197, 201, 205, 209,
- 213, 217, 221, 225, 229, 234, 239, 245, 249, 254, 259, 264, 269, 274, 279, 284,
-};
-#else
-
-static const int dc_qlookup[QINDEX_RANGE] =
-{
- 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
- 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, 32, 34, 36, 38, 40, 42,
- 44, 46, 49, 52, 55, 58, 61, 64, 67, 70, 73, 76, 79, 82, 85, 88,
- 92, 96, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 144, 148, 152,
- 156, 160, 164, 168, 172, 176, 180, 184, 188, 192, 196, 200, 205, 210, 215, 220,
- 225, 230, 235, 240, 245, 250, 255, 260, 265, 270, 275, 280, 285, 290, 295, 300,
- 310, 320, 330, 340, 350, 360, 370, 380, 390, 400, 410, 420, 430, 440, 450, 460,
- 472, 484, 496, 508, 520, 532, 544, 556, 572, 588, 608, 628, 648, 668, 692, 720,
-};
-
-static const int ac_qlookup[QINDEX_RANGE] =
+#define ACDC_MIN 4
+
+void vp8_init_quant_tables()
{
- 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
- 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 51,
- 54, 57, 60, 63, 66, 69, 72, 76, 80, 84, 88, 92, 96, 100, 105, 110,
- 115, 120, 125, 130, 135, 140, 146, 152, 158, 164, 170, 176, 182, 188, 194, 200,
- 206, 212, 218, 224, 232, 240, 248, 256, 264, 272, 280, 288, 296, 304, 312, 320,
- 330, 340, 350, 360, 370, 380, 392, 404, 416, 428, 440, 454, 468, 482, 496, 510,
- 524, 540, 556, 572, 588, 604, 622, 640, 658, 676, 696, 716, 736, 756, 776, 796,
- 820, 844, 868, 892, 916, 944, 972, 1000, 1032, 1064, 1096, 1128, 1168, 1208, 1252, 1300
-};
-#endif
+ int i;
+ int current_val = 4;
+ int last_val = 4;
+ int ac_val;
+
+ for ( i = 0; i < QINDEX_RANGE; i++ )
+ {
+ ac_qlookup[i] = current_val;
+ current_val = (int)((double)current_val * 1.02);
+ if ( current_val == last_val )
+ current_val++;
+ last_val = current_val;
+
+ ac_val = ac_qlookup[i];
+ dc_qlookup[i] = (0.000000305 * ac_val * ac_val * ac_val) +
+ (-0.00065 * ac_val * ac_val) +
+ (0.9 * ac_val) + 0.5;
+ if ( dc_qlookup[i] < ACDC_MIN )
+ dc_qlookup[i] = ACDC_MIN;
+ }
+}
int vp8_dc_quant(int QIndex, int Delta)
{
@@ -69,8 +46,8 @@ int vp8_dc_quant(int QIndex, int Delta)
QIndex = QIndex + Delta;
- if (QIndex > 127)
- QIndex = 127;
+ if (QIndex > MAXQ)
+ QIndex = MAXQ;
else if (QIndex < 0)
QIndex = 0;
@@ -84,16 +61,13 @@ int vp8_dc2quant(int QIndex, int Delta)
QIndex = QIndex + Delta;
- if (QIndex > 127)
- QIndex = 127;
+ if (QIndex > MAXQ)
+ QIndex = MAXQ;
else if (QIndex < 0)
QIndex = 0;
-#if !CONFIG_EXTEND_QRANGE
- retval = dc_qlookup[ QIndex ] * 2;
-#else
retval = dc_qlookup[ QIndex ];
-#endif
+
return retval;
}
@@ -103,8 +77,8 @@ int vp8_dc_uv_quant(int QIndex, int Delta)
QIndex = QIndex + Delta;
- if (QIndex > 117)
- QIndex = 117;
+ if (QIndex > MAXQ)
+ QIndex = MAXQ;
else if (QIndex < 0)
QIndex = 0;
@@ -117,8 +91,8 @@ int vp8_ac_yquant(int QIndex)
{
int retval;
- if (QIndex > 127)
- QIndex = 127;
+ if (QIndex > MAXQ)
+ QIndex = MAXQ;
else if (QIndex < 0)
QIndex = 0;
@@ -132,17 +106,15 @@ int vp8_ac2quant(int QIndex, int Delta)
QIndex = QIndex + Delta;
- if (QIndex > 127)
- QIndex = 127;
+ if (QIndex > MAXQ)
+ QIndex = MAXQ;
else if (QIndex < 0)
QIndex = 0;
-#if !CONFIG_EXTEND_QRANGE
- retval = (ac_qlookup[ QIndex ] * 155) / 100;
- if (retval < 8)
- retval = 8;
-#else
- retval = ac_qlookup[ QIndex ];
-#endif
+
+ retval = (ac_qlookup[ QIndex ] * 775) / 1000;
+ if (retval < 4)
+ retval = 4;
+
return retval;
}
int vp8_ac_uv_quant(int QIndex, int Delta)
@@ -151,8 +123,8 @@ int vp8_ac_uv_quant(int QIndex, int Delta)
QIndex = QIndex + Delta;
- if (QIndex > 127)
- QIndex = 127;
+ if (QIndex > MAXQ)
+ QIndex = MAXQ;
else if (QIndex < 0)
QIndex = 0;
diff --git a/vp8/common/quant_common.h b/vp8/common/quant_common.h
index cb64d8eb8..0d8099e9b 100644
--- a/vp8/common/quant_common.h
+++ b/vp8/common/quant_common.h
@@ -13,6 +13,7 @@
#include "blockd.h"
#include "onyxc_int.h"
+extern void vp8_init_quant_tables();
extern int vp8_ac_yquant(int QIndex);
extern int vp8_dc_quant(int QIndex, int Delta);
extern int vp8_dc2quant(int QIndex, int Delta);
diff --git a/vp8/common/recon.c b/vp8/common/recon.c
index eebf6dcb9..279fbe82f 100644
--- a/vp8/common/recon.c
+++ b/vp8/common/recon.c
@@ -9,7 +9,7 @@
*/
-#include "vpx_config.h"
+#include "vpx_ports/config.h"
#include "recon.h"
#include "blockd.h"
@@ -44,6 +44,36 @@ void vp8_recon_b_c
}
}
+void vp8_recon_uv_b_c
+(
+ unsigned char *pred_ptr,
+ short *diff_ptr,
+ unsigned char *dst_ptr,
+ int stride
+)
+{
+ int r, c;
+
+ for (r = 0; r < 4; r++)
+ {
+ for (c = 0; c < 4; c++)
+ {
+ int a = diff_ptr[c] + pred_ptr[c] ;
+
+ if (a < 0)
+ a = 0;
+
+ if (a > 255)
+ a = 255;
+
+ dst_ptr[c] = (unsigned char) a ;
+ }
+
+ dst_ptr += stride;
+ diff_ptr += 8;
+ pred_ptr += 8;
+ }
+}
void vp8_recon4b_c
(
unsigned char *pred_ptr,
diff --git a/vp8/common/recon.h b/vp8/common/recon.h
index 7cfc779cd..9fb12c85d 100644
--- a/vp8/common/recon.h
+++ b/vp8/common/recon.h
@@ -29,6 +29,11 @@
#define prototype_intra4x4_predict(sym) \
void sym(BLOCKD *x, int b_mode, unsigned char *predictor)
+#if CONFIG_COMP_INTRA_PRED
+#define prototype_comp_intra4x4_predict(sym) \
+ void sym(BLOCKD *x, int b_mode, int mode2, unsigned char *predictor)
+#endif
+
struct vp8_recon_rtcd_vtable;
#if ARCH_X86 || ARCH_X86_64
@@ -49,6 +54,16 @@ extern prototype_copy_block(vp8_recon_copy16x16);
#endif
extern prototype_copy_block(vp8_recon_copy8x8);
+#ifndef vp8_recon_avg16x16
+#define vp8_recon_avg16x16 vp8_avg_mem16x16_c
+#endif
+extern prototype_copy_block(vp8_recon_avg16x16);
+
+#ifndef vp8_recon_avg8x8
+#define vp8_recon_avg8x8 vp8_avg_mem8x8_c
+#endif
+extern prototype_copy_block(vp8_recon_avg8x8);
+
#ifndef vp8_recon_copy8x4
#define vp8_recon_copy8x4 vp8_copy_mem8x4_c
#endif
@@ -59,6 +74,12 @@ extern prototype_copy_block(vp8_recon_copy8x4);
#endif
extern prototype_recon_block(vp8_recon_recon);
+#ifndef vp8_recon_recon_uv
+#define vp8_recon_recon_uv vp8_recon_uv_b_c
+#endif
+extern prototype_recon_block(vp8_recon_recon_uv);
+
+extern prototype_recon_block(vp8_recon_recon);
#ifndef vp8_recon_recon2
#define vp8_recon_recon2 vp8_recon2b_c
#endif
@@ -85,6 +106,20 @@ extern prototype_recon_macroblock(vp8_recon_recon_mby);
extern prototype_build_intra_predictors\
(vp8_recon_build_intra_predictors_mby);
+#if CONFIG_COMP_INTRA_PRED
+#ifndef vp8_recon_build_comp_intra_predictors_mby
+#define vp8_recon_build_comp_intra_predictors_mby vp8_build_comp_intra_predictors_mby
+#endif
+extern prototype_build_intra_predictors\
+ (vp8_recon_build_comp_intra_predictors_mby);
+#endif
+
+#ifndef vp8_recon_build_intra8x8_predictors_mby
+#define vp8_recon_build_intra8x8_predictors_mby vp8_build_intra8x8_predictors_mby
+#endif
+extern prototype_build_intra_predictors\
+ (vp8_recon_build_intra8x8_predictors_mby);
+
#ifndef vp8_recon_build_intra_predictors_mby_s
#define vp8_recon_build_intra_predictors_mby_s vp8_build_intra_predictors_mby_s
#endif
@@ -97,39 +132,111 @@ extern prototype_build_intra_predictors\
extern prototype_build_intra_predictors\
(vp8_recon_build_intra_predictors_mbuv);
+#ifndef vp8_recon_build_intra8x8_predictors_mbuv
+#define vp8_recon_build_intra8x8_predictors_mbuv vp8_build_intra8x8_predictors_mbuv
+#endif
+extern prototype_build_intra_predictors\
+ (vp8_recon_build_intra8x8_predictors_mbuv);
+
#ifndef vp8_recon_build_intra_predictors_mbuv_s
#define vp8_recon_build_intra_predictors_mbuv_s vp8_build_intra_predictors_mbuv_s
#endif
extern prototype_build_intra_predictors\
(vp8_recon_build_intra_predictors_mbuv_s);
+#if CONFIG_COMP_INTRA_PRED
+#ifndef vp8_recon_build_comp_intra_predictors_mbuv
+#define vp8_recon_build_comp_intra_predictors_mbuv vp8_build_comp_intra_predictors_mbuv
+#endif
+extern prototype_build_intra_predictors\
+ (vp8_recon_build_comp_intra_predictors_mbuv);
+#endif
+
#ifndef vp8_recon_intra4x4_predict
#define vp8_recon_intra4x4_predict vp8_intra4x4_predict
#endif
extern prototype_intra4x4_predict\
(vp8_recon_intra4x4_predict);
+#if CONFIG_COMP_INTRA_PRED
+#ifndef vp8_recon_comp_intra4x4_predict
+#define vp8_recon_comp_intra4x4_predict vp8_comp_intra4x4_predict
+#endif
+extern prototype_comp_intra4x4_predict\
+ (vp8_recon_comp_intra4x4_predict);
+#endif
+
+#ifndef vp8_recon_intra8x8_predict
+#define vp8_recon_intra8x8_predict vp8_intra8x8_predict
+#endif
+extern prototype_intra4x4_predict\
+ (vp8_recon_intra8x8_predict);
+
+#if CONFIG_COMP_INTRA_PRED
+#ifndef vp8_recon_comp_intra8x8_predict
+#define vp8_recon_comp_intra8x8_predict vp8_comp_intra8x8_predict
+#endif
+extern prototype_comp_intra4x4_predict\
+ (vp8_recon_comp_intra8x8_predict);
+#endif
+
+#ifndef vp8_recon_intra_uv4x4_predict
+#define vp8_recon_intra_uv4x4_predict vp8_intra_uv4x4_predict
+#endif
+extern prototype_intra4x4_predict\
+ (vp8_recon_intra_uv4x4_predict);
+
+#if CONFIG_COMP_INTRA_PRED
+#ifndef vp8_recon_comp_intra_uv4x4_predict
+#define vp8_recon_comp_intra_uv4x4_predict vp8_comp_intra_uv4x4_predict
+#endif
+extern prototype_comp_intra4x4_predict\
+ (vp8_recon_comp_intra_uv4x4_predict);
+#endif
typedef prototype_copy_block((*vp8_copy_block_fn_t));
typedef prototype_recon_block((*vp8_recon_fn_t));
typedef prototype_recon_macroblock((*vp8_recon_mb_fn_t));
typedef prototype_build_intra_predictors((*vp8_build_intra_pred_fn_t));
typedef prototype_intra4x4_predict((*vp8_intra4x4_pred_fn_t));
+#if CONFIG_COMP_INTRA_PRED
+typedef prototype_comp_intra4x4_predict((*vp8_comp_intra4x4_pred_fn_t));
+#endif
typedef struct vp8_recon_rtcd_vtable
{
vp8_copy_block_fn_t copy16x16;
vp8_copy_block_fn_t copy8x8;
+ vp8_copy_block_fn_t avg16x16;
+ vp8_copy_block_fn_t avg8x8;
vp8_copy_block_fn_t copy8x4;
vp8_recon_fn_t recon;
+ vp8_recon_fn_t recon_uv;
vp8_recon_fn_t recon2;
vp8_recon_fn_t recon4;
vp8_recon_mb_fn_t recon_mb;
vp8_recon_mb_fn_t recon_mby;
vp8_build_intra_pred_fn_t build_intra_predictors_mby_s;
vp8_build_intra_pred_fn_t build_intra_predictors_mby;
+#if CONFIG_COMP_INTRA_PRED
+ vp8_build_intra_pred_fn_t build_comp_intra_predictors_mby;
+#endif
vp8_build_intra_pred_fn_t build_intra_predictors_mbuv_s;
vp8_build_intra_pred_fn_t build_intra_predictors_mbuv;
+#if CONFIG_COMP_INTRA_PRED
+ vp8_build_intra_pred_fn_t build_comp_intra_predictors_mbuv;
+#endif
vp8_intra4x4_pred_fn_t intra4x4_predict;
+#if CONFIG_COMP_INTRA_PRED
+ vp8_comp_intra4x4_pred_fn_t comp_intra4x4_predict;
+#endif
+ vp8_intra4x4_pred_fn_t intra8x8_predict;
+#if CONFIG_COMP_INTRA_PRED
+ vp8_comp_intra4x4_pred_fn_t comp_intra8x8_predict;
+#endif
+ vp8_intra4x4_pred_fn_t intra_uv4x4_predict;
+#if CONFIG_COMP_INTRA_PRED
+ vp8_comp_intra4x4_pred_fn_t comp_intra_uv4x4_predict;
+#endif
} vp8_recon_rtcd_vtable_t;
#if CONFIG_RUNTIME_CPU_DETECT
diff --git a/vp8/common/reconinter.c b/vp8/common/reconinter.c
index e4e8a80a4..bd08e7f2c 100644
--- a/vp8/common/reconinter.c
+++ b/vp8/common/reconinter.c
@@ -9,7 +9,7 @@
*/
-#include "vpx_config.h"
+#include "vpx_ports/config.h"
#include "vpx/vpx_integer.h"
#include "recon.h"
#include "subpixel.h"
@@ -62,6 +62,28 @@ void vp8_copy_mem16x16_c(
}
+void vp8_avg_mem16x16_c(
+ unsigned char *src,
+ int src_stride,
+ unsigned char *dst,
+ int dst_stride)
+{
+ int r;
+
+ for (r = 0; r < 16; r++)
+ {
+ int n;
+
+ for (n = 0; n < 16; n++)
+ {
+ dst[n] = (dst[n] + src[n] + 1) >> 1;
+ }
+
+ src += src_stride;
+ dst += dst_stride;
+ }
+}
+
void vp8_copy_mem8x8_c(
unsigned char *src,
int src_stride,
@@ -92,6 +114,28 @@ void vp8_copy_mem8x8_c(
}
+void vp8_avg_mem8x8_c(
+ unsigned char *src,
+ int src_stride,
+ unsigned char *dst,
+ int dst_stride)
+{
+ int r;
+
+ for (r = 0; r < 8; r++)
+ {
+ int n;
+
+ for (n = 0; n < 8; n++)
+ {
+ dst[n] = (dst[n] + src[n] + 1) >> 1;
+ }
+
+ src += src_stride;
+ dst += dst_stride;
+ }
+}
+
void vp8_copy_mem8x4_c(
unsigned char *src,
int src_stride,
@@ -136,7 +180,11 @@ void vp8_build_inter_predictors_b(BLOCKD *d, int pitch, vp8_subpix_fn_t sppf)
if (d->bmi.mv.as_mv.row & 7 || d->bmi.mv.as_mv.col & 7)
{
ptr = ptr_base + d->pre + (d->bmi.mv.as_mv.row >> 3) * d->pre_stride + (d->bmi.mv.as_mv.col >> 3);
+#if CONFIG_SIXTEENTH_SUBPEL_UV
+ sppf(ptr, d->pre_stride, (d->bmi.mv.as_mv.col & 7)<<1, (d->bmi.mv.as_mv.row & 7)<<1, pred_ptr, pitch);
+#else
sppf(ptr, d->pre_stride, d->bmi.mv.as_mv.col & 7, d->bmi.mv.as_mv.row & 7, pred_ptr, pitch);
+#endif
}
else
{
@@ -170,7 +218,11 @@ static void build_inter_predictors4b(MACROBLOCKD *x, BLOCKD *d, int pitch)
if (d->bmi.mv.as_mv.row & 7 || d->bmi.mv.as_mv.col & 7)
{
+#if CONFIG_SIXTEENTH_SUBPEL_UV
+ x->subpixel_predict8x8(ptr, d->pre_stride, (d->bmi.mv.as_mv.col & 7)<<1, (d->bmi.mv.as_mv.row & 7)<<1, pred_ptr, pitch);
+#else
x->subpixel_predict8x8(ptr, d->pre_stride, d->bmi.mv.as_mv.col & 7, d->bmi.mv.as_mv.row & 7, pred_ptr, pitch);
+#endif
}
else
{
@@ -189,7 +241,11 @@ static void build_inter_predictors2b(MACROBLOCKD *x, BLOCKD *d, int pitch)
if (d->bmi.mv.as_mv.row & 7 || d->bmi.mv.as_mv.col & 7)
{
+#if CONFIG_SIXTEENTH_SUBPEL_UV
+ x->subpixel_predict8x4(ptr, d->pre_stride, (d->bmi.mv.as_mv.col & 7)<<1, (d->bmi.mv.as_mv.row & 7)<<1, pred_ptr, pitch);
+#else
x->subpixel_predict8x4(ptr, d->pre_stride, d->bmi.mv.as_mv.col & 7, d->bmi.mv.as_mv.row & 7, pred_ptr, pitch);
+#endif
}
else
{
@@ -205,8 +261,10 @@ void vp8_build_inter16x16_predictors_mbuv(MACROBLOCKD *x)
unsigned char *upred_ptr = &x->predictor[256];
unsigned char *vpred_ptr = &x->predictor[320];
- int mv_row = x->mode_info_context->mbmi.mv.as_mv.row;
- int mv_col = x->mode_info_context->mbmi.mv.as_mv.col;
+ int omv_row = x->mode_info_context->mbmi.mv.as_mv.row;
+ int omv_col = x->mode_info_context->mbmi.mv.as_mv.col;
+ int mv_row = omv_row;
+ int mv_col = omv_col;
int offset;
int pre_stride = x->block[16].pre_stride;
@@ -231,11 +289,19 @@ void vp8_build_inter16x16_predictors_mbuv(MACROBLOCKD *x)
uptr = x->pre.u_buffer + offset;
vptr = x->pre.v_buffer + offset;
+#if CONFIG_SIXTEENTH_SUBPEL_UV
+ if ((omv_row | omv_col) & 15)
+ {
+ x->subpixel_predict8x8(uptr, pre_stride, omv_col & 15, omv_row & 15, upred_ptr, 8);
+ x->subpixel_predict8x8(vptr, pre_stride, omv_col & 15, omv_row & 15, vpred_ptr, 8);
+ }
+#else /* CONFIG_SIXTEENTH_SUBPEL_UV */
if ((mv_row | mv_col) & 7)
{
x->subpixel_predict8x8(uptr, pre_stride, mv_col & 7, mv_row & 7, upred_ptr, 8);
x->subpixel_predict8x8(vptr, pre_stride, mv_col & 7, mv_row & 7, vpred_ptr, 8);
}
+#endif /* CONFIG_SIXTEENTH_SUBPEL_UV */
else
{
RECON_INVOKE(&x->rtcd->recon, copy8x8)(uptr, pre_stride, upred_ptr, 8);
@@ -317,7 +383,11 @@ void vp8_build_inter16x16_predictors_mby(MACROBLOCKD *x)
if ((mv_row | mv_col) & 7)
{
+#if CONFIG_SIXTEENTH_SUBPEL_UV
+ x->subpixel_predict16x16(ptr, pre_stride, (mv_col & 7)<<1, (mv_row & 7)<<1, pred_ptr, 16);
+#else
x->subpixel_predict16x16(ptr, pre_stride, mv_col & 7, mv_row & 7, pred_ptr, 16);
+#endif
}
else
{
@@ -336,31 +406,33 @@ static void clamp_mv_to_umv_border(MV *mv, const MACROBLOCKD *xd)
* filtering. The bottom and right edges use 16 pixels plus 2 pixels
* left of the central pixel when filtering.
*/
- if (mv->col < (xd->mb_to_left_edge - (19 << 3)))
+ if (mv->col < (xd->mb_to_left_edge - ((16+INTERP_EXTEND) << 3)))
mv->col = xd->mb_to_left_edge - (16 << 3);
- else if (mv->col > xd->mb_to_right_edge + (18 << 3))
+ else if (mv->col > xd->mb_to_right_edge + ((15+INTERP_EXTEND) << 3))
mv->col = xd->mb_to_right_edge + (16 << 3);
- if (mv->row < (xd->mb_to_top_edge - (19 << 3)))
+ if (mv->row < (xd->mb_to_top_edge - ((16+INTERP_EXTEND) << 3)))
mv->row = xd->mb_to_top_edge - (16 << 3);
- else if (mv->row > xd->mb_to_bottom_edge + (18 << 3))
+ else if (mv->row > xd->mb_to_bottom_edge + ((15+INTERP_EXTEND) << 3))
mv->row = xd->mb_to_bottom_edge + (16 << 3);
}
/* A version of the above function for chroma block MVs.*/
static void clamp_uvmv_to_umv_border(MV *mv, const MACROBLOCKD *xd)
{
- mv->col = (2*mv->col < (xd->mb_to_left_edge - (19 << 3))) ?
+ mv->col = (2*mv->col < (xd->mb_to_left_edge - ((16+INTERP_EXTEND) << 3))) ?
(xd->mb_to_left_edge - (16 << 3)) >> 1 : mv->col;
- mv->col = (2*mv->col > xd->mb_to_right_edge + (18 << 3)) ?
+ mv->col = (2*mv->col > xd->mb_to_right_edge + ((15+INTERP_EXTEND) << 3)) ?
(xd->mb_to_right_edge + (16 << 3)) >> 1 : mv->col;
- mv->row = (2*mv->row < (xd->mb_to_top_edge - (19 << 3))) ?
+ mv->row = (2*mv->row < (xd->mb_to_top_edge - ((16+INTERP_EXTEND) << 3))) ?
(xd->mb_to_top_edge - (16 << 3)) >> 1 : mv->row;
- mv->row = (2*mv->row > xd->mb_to_bottom_edge + (18 << 3)) ?
+ mv->row = (2*mv->row > xd->mb_to_bottom_edge + ((15+INTERP_EXTEND) << 3)) ?
(xd->mb_to_bottom_edge + (16 << 3)) >> 1 : mv->row;
}
+
+
void vp8_build_inter16x16_predictors_mb(MACROBLOCKD *x,
unsigned char *dst_y,
unsigned char *dst_u,
@@ -372,6 +444,7 @@ void vp8_build_inter16x16_predictors_mb(MACROBLOCKD *x,
unsigned char *ptr;
unsigned char *uptr, *vptr;
+ int_mv _o16x16mv;
int_mv _16x16mv;
unsigned char *ptr_base = x->pre.y_buffer;
@@ -388,13 +461,18 @@ void vp8_build_inter16x16_predictors_mb(MACROBLOCKD *x,
if ( _16x16mv.as_int & 0x00070007)
{
+#if CONFIG_SIXTEENTH_SUBPEL_UV
+ x->subpixel_predict16x16(ptr, pre_stride, (_16x16mv.as_mv.col & 7)<<1, (_16x16mv.as_mv.row & 7)<<1, dst_y, dst_ystride);
+#else
x->subpixel_predict16x16(ptr, pre_stride, _16x16mv.as_mv.col & 7, _16x16mv.as_mv.row & 7, dst_y, dst_ystride);
+#endif
}
else
{
RECON_INVOKE(&x->rtcd->recon, copy16x16)(ptr, pre_stride, dst_y, dst_ystride);
}
+ _o16x16mv = _16x16mv;
/* calc uv motion vectors */
if ( _16x16mv.as_mv.row < 0)
_16x16mv.as_mv.row -= 1;
@@ -417,16 +495,106 @@ void vp8_build_inter16x16_predictors_mb(MACROBLOCKD *x,
uptr = x->pre.u_buffer + offset;
vptr = x->pre.v_buffer + offset;
+#if CONFIG_SIXTEENTH_SUBPEL_UV
+ if ( _o16x16mv.as_int & 0x000f000f)
+ {
+ x->subpixel_predict8x8(uptr, pre_stride, _o16x16mv.as_mv.col & 15, _o16x16mv.as_mv.row & 15, dst_u, dst_uvstride);
+ x->subpixel_predict8x8(vptr, pre_stride, _o16x16mv.as_mv.col & 15, _o16x16mv.as_mv.row & 15, dst_v, dst_uvstride);
+ }
+#else /* CONFIG_SIXTEENTH_SUBPEL_UV */
if ( _16x16mv.as_int & 0x00070007)
{
x->subpixel_predict8x8(uptr, pre_stride, _16x16mv.as_mv.col & 7, _16x16mv.as_mv.row & 7, dst_u, dst_uvstride);
x->subpixel_predict8x8(vptr, pre_stride, _16x16mv.as_mv.col & 7, _16x16mv.as_mv.row & 7, dst_v, dst_uvstride);
}
+#endif /* CONFIG_SIXTEENTH_SUBPEL_UV */
else
{
RECON_INVOKE(&x->rtcd->recon, copy8x8)(uptr, pre_stride, dst_u, dst_uvstride);
RECON_INVOKE(&x->rtcd->recon, copy8x8)(vptr, pre_stride, dst_v, dst_uvstride);
}
+
+}
+
+/*
+ * This function should be called after an initial call to
+ * vp8_build_inter16x16_predictors_mb() or _mby()/_mbuv().
+ * It will run a second sixtap filter on a (different) ref
+ * frame and average the result with the output of the
+ * first sixtap filter. The second reference frame is stored
+ * in x->second_pre (the reference frame index is in
+ * x->mode_info_context->mbmi.second_ref_frame). The second
+ * motion vector is x->mode_info_context->mbmi.second_mv.
+ *
+ * This allows blending prediction from two reference frames
+ * which sometimes leads to better prediction than from a
+ * single reference framer.
+ */
+void vp8_build_2nd_inter16x16_predictors_mb(MACROBLOCKD *x,
+ unsigned char *dst_y,
+ unsigned char *dst_u,
+ unsigned char *dst_v,
+ int dst_ystride,
+ int dst_uvstride)
+{
+ int offset;
+ unsigned char *ptr;
+ unsigned char *uptr, *vptr;
+
+ int mv_row = x->mode_info_context->mbmi.second_mv.as_mv.row;
+ int mv_col = x->mode_info_context->mbmi.second_mv.as_mv.col;
+ int omv_row, omv_col;
+
+ unsigned char *ptr_base = x->second_pre.y_buffer;
+ int pre_stride = x->block[0].pre_stride;
+
+ ptr = ptr_base + (mv_row >> 3) * pre_stride + (mv_col >> 3);
+
+ if ((mv_row | mv_col) & 7)
+ {
+#if CONFIG_SIXTEENTH_SUBPEL_UV
+ x->subpixel_predict_avg16x16(ptr, pre_stride, (mv_col & 7)<<1, (mv_row & 7)<<1, dst_y, dst_ystride);
+#else
+ x->subpixel_predict_avg16x16(ptr, pre_stride, mv_col & 7, mv_row & 7, dst_y, dst_ystride);
+#endif
+ }
+ else
+ {
+ RECON_INVOKE(&x->rtcd->recon, avg16x16)(ptr, pre_stride, dst_y, dst_ystride);
+ }
+
+ /* calc uv motion vectors */
+ omv_row = mv_row;
+ omv_col = mv_col;
+ mv_row = (mv_row + (mv_row > 0)) >> 1;
+ mv_col = (mv_col + (mv_col > 0)) >> 1;
+
+ mv_row &= x->fullpixel_mask;
+ mv_col &= x->fullpixel_mask;
+
+ pre_stride >>= 1;
+ offset = (mv_row >> 3) * pre_stride + (mv_col >> 3);
+ uptr = x->second_pre.u_buffer + offset;
+ vptr = x->second_pre.v_buffer + offset;
+
+#if CONFIG_SIXTEENTH_SUBPEL_UV
+ if ((omv_row | omv_col) & 15)
+ {
+ x->subpixel_predict_avg8x8(uptr, pre_stride, omv_col & 15, omv_row & 15, dst_u, dst_uvstride);
+ x->subpixel_predict_avg8x8(vptr, pre_stride, omv_col & 15, omv_row & 15, dst_v, dst_uvstride);
+ }
+#else /* CONFIG_SIXTEENTH_SUBPEL_UV */
+ if ((mv_row | mv_col) & 7)
+ {
+ x->subpixel_predict_avg8x8(uptr, pre_stride, mv_col & 7, mv_row & 7, dst_u, dst_uvstride);
+ x->subpixel_predict_avg8x8(vptr, pre_stride, mv_col & 7, mv_row & 7, dst_v, dst_uvstride);
+ }
+#endif /* CONFIG_SIXTEENTH_SUBPEL_UV */
+ else
+ {
+ RECON_INVOKE(&x->rtcd->recon, avg8x8)(uptr, pre_stride, dst_u, dst_uvstride);
+ RECON_INVOKE(&x->rtcd->recon, avg8x8)(vptr, pre_stride, dst_v, dst_uvstride);
+ }
}
static void build_inter4x4_predictors_mb(MACROBLOCKD *x)
@@ -439,6 +607,7 @@ static void build_inter4x4_predictors_mb(MACROBLOCKD *x)
x->block[ 2].bmi = x->mode_info_context->bmi[ 2];
x->block[ 8].bmi = x->mode_info_context->bmi[ 8];
x->block[10].bmi = x->mode_info_context->bmi[10];
+
if (x->mode_info_context->mbmi.need_to_clamp_mvs)
{
clamp_mv_to_umv_border(&x->block[ 0].bmi.mv.as_mv, x);
@@ -447,6 +616,7 @@ static void build_inter4x4_predictors_mb(MACROBLOCKD *x)
clamp_mv_to_umv_border(&x->block[10].bmi.mv.as_mv, x);
}
+
build_inter_predictors4b(x, &x->block[ 0], 16);
build_inter_predictors4b(x, &x->block[ 2], 16);
build_inter_predictors4b(x, &x->block[ 8], 16);
@@ -461,6 +631,7 @@ static void build_inter4x4_predictors_mb(MACROBLOCKD *x)
x->block[i+0].bmi = x->mode_info_context->bmi[i+0];
x->block[i+1].bmi = x->mode_info_context->bmi[i+1];
+
if (x->mode_info_context->mbmi.need_to_clamp_mvs)
{
clamp_mv_to_umv_border(&x->block[i+0].bmi.mv.as_mv, x);
@@ -484,8 +655,6 @@ static void build_inter4x4_predictors_mb(MACROBLOCKD *x)
BLOCKD *d0 = &x->block[i];
BLOCKD *d1 = &x->block[i+1];
- /* Note: uv mvs already clamped in build_4x4uvmvs() */
-
if (d0->bmi.mv.as_int == d1->bmi.mv.as_int)
build_inter_predictors2b(x, d0, 8);
else
@@ -534,6 +703,9 @@ void build_4x4uvmvs(MACROBLOCKD *x)
if (x->mode_info_context->mbmi.need_to_clamp_mvs)
clamp_uvmv_to_umv_border(&x->block[uoffset].bmi.mv.as_mv, x);
+ if (x->mode_info_context->mbmi.need_to_clamp_mvs)
+ clamp_uvmv_to_umv_border(&x->block[uoffset].bmi.mv.as_mv, x);
+
x->block[voffset].bmi.mv.as_mv.row =
x->block[uoffset].bmi.mv.as_mv.row ;
x->block[voffset].bmi.mv.as_mv.col =
@@ -548,6 +720,16 @@ void vp8_build_inter_predictors_mb(MACROBLOCKD *x)
{
vp8_build_inter16x16_predictors_mb(x, x->predictor, &x->predictor[256],
&x->predictor[320], 16, 8);
+
+ if (x->mode_info_context->mbmi.second_ref_frame)
+ {
+ /* 256 = offset of U plane in Y+U+V buffer;
+ * 320 = offset of V plane in Y+U+V buffer.
+ * (256=16x16, 320=16x16+8x8). */
+ vp8_build_2nd_inter16x16_predictors_mb(x, x->predictor,
+ &x->predictor[256],
+ &x->predictor[320], 16, 8);
+ }
}
else
{
@@ -555,4 +737,3 @@ void vp8_build_inter_predictors_mb(MACROBLOCKD *x)
build_inter4x4_predictors_mb(x);
}
}
-
diff --git a/vp8/common/reconinter.h b/vp8/common/reconinter.h
index 456812ecd..c8e2f803b 100644
--- a/vp8/common/reconinter.h
+++ b/vp8/common/reconinter.h
@@ -19,6 +19,12 @@ extern void vp8_build_inter16x16_predictors_mb(MACROBLOCKD *x,
unsigned char *dst_v,
int dst_ystride,
int dst_uvstride);
+extern void vp8_build_2nd_inter16x16_predictors_mb(MACROBLOCKD *x,
+ unsigned char *dst_y,
+ unsigned char *dst_u,
+ unsigned char *dst_v,
+ int dst_ystride,
+ int dst_uvstride);
extern void vp8_build_inter16x16_predictors_mby(MACROBLOCKD *x);
diff --git a/vp8/common/reconintra.c b/vp8/common/reconintra.c
index 16dadc47d..501eacab2 100644
--- a/vp8/common/reconintra.c
+++ b/vp8/common/reconintra.c
@@ -9,7 +9,7 @@
*/
-#include "vpx_config.h"
+#include "vpx_ports/config.h"
#include "recon.h"
#include "reconintra.h"
#include "vpx_mem/vpx_mem.h"
@@ -28,13 +28,12 @@ void vp8_recon_intra_mbuv(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x)
}
}
-void vp8_build_intra_predictors_mby(MACROBLOCKD *x)
+void vp8_build_intra_predictors_mby_internal(MACROBLOCKD *x, unsigned char *ypred_ptr, int y_stride, int mode)
{
unsigned char *yabove_row = x->dst.y_buffer - x->dst.y_stride;
unsigned char yleft_col[16];
unsigned char ytop_left = yabove_row[-1];
- unsigned char *ypred_ptr = x->predictor;
int r, c, i;
for (i = 0; i < 16; i++)
@@ -43,7 +42,7 @@ void vp8_build_intra_predictors_mby(MACROBLOCKD *x)
}
/* for Y */
- switch (x->mode_info_context->mbmi.mode)
+ switch (mode)
{
case DC_PRED:
{
@@ -70,11 +69,7 @@ void vp8_build_intra_predictors_mby(MACROBLOCKD *x)
{
average += yleft_col[i];
}
-
}
-
-
-
shift = 3 + x->up_available + x->left_available;
expected_dc = (average + (1 << (shift - 1))) >> shift;
}
@@ -83,7 +78,11 @@ void vp8_build_intra_predictors_mby(MACROBLOCKD *x)
expected_dc = 128;
}
- vpx_memset(ypred_ptr, expected_dc, 256);
+ for (r = 0; r < 16; r++)
+ {
+ vpx_memset(ypred_ptr, expected_dc, 16);
+ ypred_ptr += y_stride; /*16;*/
+ }
}
break;
case V_PRED:
@@ -96,7 +95,7 @@ void vp8_build_intra_predictors_mby(MACROBLOCKD *x)
((int *)ypred_ptr)[1] = ((int *)yabove_row)[1];
((int *)ypred_ptr)[2] = ((int *)yabove_row)[2];
((int *)ypred_ptr)[3] = ((int *)yabove_row)[3];
- ypred_ptr += 16;
+ ypred_ptr += y_stride;
}
}
break;
@@ -107,7 +106,7 @@ void vp8_build_intra_predictors_mby(MACROBLOCKD *x)
{
vpx_memset(ypred_ptr, yleft_col[r], 16);
- ypred_ptr += 16;
+ ypred_ptr += y_stride;
}
}
@@ -130,11 +129,14 @@ void vp8_build_intra_predictors_mby(MACROBLOCKD *x)
ypred_ptr[c] = pred;
}
- ypred_ptr += 16;
+ ypred_ptr += y_stride;
}
}
break;
+#if CONIFG_I8X8
+ case I8X8_PRED:
+#endif
case B_PRED:
case NEARESTMV:
case NEARMV:
@@ -146,133 +148,41 @@ void vp8_build_intra_predictors_mby(MACROBLOCKD *x)
}
}
-void vp8_build_intra_predictors_mby_s(MACROBLOCKD *x)
+void vp8_build_intra_predictors_mby(MACROBLOCKD *x)
{
+ vp8_build_intra_predictors_mby_internal(x, x->predictor, 16,
+ x->mode_info_context->mbmi.mode);
+}
- unsigned char *yabove_row = x->dst.y_buffer - x->dst.y_stride;
- unsigned char yleft_col[16];
- unsigned char ytop_left = yabove_row[-1];
- unsigned char *ypred_ptr = x->predictor;
- int r, c, i;
-
- int y_stride = x->dst.y_stride;
- ypred_ptr = x->dst.y_buffer; /*x->predictor;*/
-
- for (i = 0; i < 16; i++)
- {
- yleft_col[i] = x->dst.y_buffer [i* x->dst.y_stride -1];
- }
-
- /* for Y */
- switch (x->mode_info_context->mbmi.mode)
- {
- case DC_PRED:
- {
- int expected_dc;
- int i;
- int shift;
- int average = 0;
-
-
- if (x->up_available || x->left_available)
- {
- if (x->up_available)
- {
- for (i = 0; i < 16; i++)
- {
- average += yabove_row[i];
- }
- }
-
- if (x->left_available)
- {
-
- for (i = 0; i < 16; i++)
- {
- average += yleft_col[i];
- }
-
- }
-
-
-
- shift = 3 + x->up_available + x->left_available;
- expected_dc = (average + (1 << (shift - 1))) >> shift;
- }
- else
- {
- expected_dc = 128;
- }
-
- /*vpx_memset(ypred_ptr, expected_dc, 256);*/
- for (r = 0; r < 16; r++)
- {
- vpx_memset(ypred_ptr, expected_dc, 16);
- ypred_ptr += y_stride; /*16;*/
- }
- }
- break;
- case V_PRED:
- {
-
- for (r = 0; r < 16; r++)
- {
-
- ((int *)ypred_ptr)[0] = ((int *)yabove_row)[0];
- ((int *)ypred_ptr)[1] = ((int *)yabove_row)[1];
- ((int *)ypred_ptr)[2] = ((int *)yabove_row)[2];
- ((int *)ypred_ptr)[3] = ((int *)yabove_row)[3];
- ypred_ptr += y_stride; /*16;*/
- }
- }
- break;
- case H_PRED:
- {
+void vp8_build_intra_predictors_mby_s(MACROBLOCKD *x)
+{
+ vp8_build_intra_predictors_mby_internal(x, x->dst.y_buffer, x->dst.y_stride,
+ x->mode_info_context->mbmi.mode);
+}
- for (r = 0; r < 16; r++)
- {
+#if CONFIG_COMP_INTRA_PRED
+void vp8_build_comp_intra_predictors_mby(MACROBLOCKD *x)
+{
+ unsigned char predictor[2][256];
+ int i;
- vpx_memset(ypred_ptr, yleft_col[r], 16);
- ypred_ptr += y_stride; /*16;*/
- }
+ vp8_build_intra_predictors_mby_internal(x, predictor[0], 16,
+ x->mode_info_context->mbmi.mode);
+ vp8_build_intra_predictors_mby_internal(x, predictor[1], 16,
+ x->mode_info_context->mbmi.second_mode);
- }
- break;
- case TM_PRED:
+ for (i = 0; i < 256; i++)
{
-
- for (r = 0; r < 16; r++)
- {
- for (c = 0; c < 16; c++)
- {
- int pred = yleft_col[r] + yabove_row[ c] - ytop_left;
-
- if (pred < 0)
- pred = 0;
-
- if (pred > 255)
- pred = 255;
-
- ypred_ptr[c] = pred;
- }
-
- ypred_ptr += y_stride; /*16;*/
- }
-
- }
- break;
- case B_PRED:
- case NEARESTMV:
- case NEARMV:
- case ZEROMV:
- case NEWMV:
- case SPLITMV:
- case MB_MODE_COUNT:
- break;
+ x->predictor[i] = (predictor[0][i] + predictor[1][i] + 1) >> 1;
}
}
+#endif
-void vp8_build_intra_predictors_mbuv(MACROBLOCKD *x)
+void vp8_build_intra_predictors_mbuv_internal(MACROBLOCKD *x,
+ unsigned char *upred_ptr,
+ unsigned char *vpred_ptr,
+ int uv_stride,
+ int mode)
{
unsigned char *uabove_row = x->dst.u_buffer - x->dst.uv_stride;
unsigned char uleft_col[16];
@@ -280,8 +190,7 @@ void vp8_build_intra_predictors_mbuv(MACROBLOCKD *x)
unsigned char *vabove_row = x->dst.v_buffer - x->dst.uv_stride;
unsigned char vleft_col[20];
unsigned char vtop_left = vabove_row[-1];
- unsigned char *upred_ptr = &x->predictor[256];
- unsigned char *vpred_ptr = &x->predictor[320];
+
int i, j;
for (i = 0; i < 8; i++)
@@ -290,7 +199,7 @@ void vp8_build_intra_predictors_mbuv(MACROBLOCKD *x)
vleft_col[i] = x->dst.v_buffer [i* x->dst.uv_stride -1];
}
- switch (x->mode_info_context->mbmi.uv_mode)
+ switch (mode)
{
case DC_PRED:
{
@@ -332,10 +241,15 @@ void vp8_build_intra_predictors_mbuv(MACROBLOCKD *x)
}
- vpx_memset(upred_ptr, expected_udc, 64);
- vpx_memset(vpred_ptr, expected_vdc, 64);
-
-
+ /*vpx_memset(upred_ptr,expected_udc,64);*/
+ /*vpx_memset(vpred_ptr,expected_vdc,64);*/
+ for (i = 0; i < 8; i++)
+ {
+ vpx_memset(upred_ptr, expected_udc, 8);
+ vpx_memset(vpred_ptr, expected_vdc, 8);
+ upred_ptr += uv_stride; /*8;*/
+ vpred_ptr += uv_stride; /*8;*/
+ }
}
break;
case V_PRED:
@@ -346,8 +260,8 @@ void vp8_build_intra_predictors_mbuv(MACROBLOCKD *x)
{
vpx_memcpy(upred_ptr, uabove_row, 8);
vpx_memcpy(vpred_ptr, vabove_row, 8);
- upred_ptr += 8;
- vpred_ptr += 8;
+ upred_ptr += uv_stride; /*8;*/
+ vpred_ptr += uv_stride; /*8;*/
}
}
@@ -360,8 +274,8 @@ void vp8_build_intra_predictors_mbuv(MACROBLOCKD *x)
{
vpx_memset(upred_ptr, uleft_col[i], 8);
vpx_memset(vpred_ptr, vleft_col[i], 8);
- upred_ptr += 8;
- vpred_ptr += 8;
+ upred_ptr += uv_stride; /*8;*/
+ vpred_ptr += uv_stride; /*8;*/
}
}
@@ -393,8 +307,8 @@ void vp8_build_intra_predictors_mbuv(MACROBLOCKD *x)
vpred_ptr[j] = predv;
}
- upred_ptr += 8;
- vpred_ptr += 8;
+ upred_ptr += uv_stride; /*8;*/
+ vpred_ptr += uv_stride; /*8;*/
}
}
@@ -410,147 +324,260 @@ void vp8_build_intra_predictors_mbuv(MACROBLOCKD *x)
}
}
+void vp8_build_intra_predictors_mbuv(MACROBLOCKD *x)
+{
+ vp8_build_intra_predictors_mbuv_internal(x,
+ &x->predictor[256],
+ &x->predictor[320],
+ 8,
+ x->mode_info_context->mbmi.uv_mode);
+}
+
void vp8_build_intra_predictors_mbuv_s(MACROBLOCKD *x)
{
- unsigned char *uabove_row = x->dst.u_buffer - x->dst.uv_stride;
- unsigned char uleft_col[16];
- unsigned char utop_left = uabove_row[-1];
- unsigned char *vabove_row = x->dst.v_buffer - x->dst.uv_stride;
- unsigned char vleft_col[20];
- unsigned char vtop_left = vabove_row[-1];
- unsigned char *upred_ptr = x->dst.u_buffer; /*&x->predictor[256];*/
- unsigned char *vpred_ptr = x->dst.v_buffer; /*&x->predictor[320];*/
- int uv_stride = x->dst.uv_stride;
+ vp8_build_intra_predictors_mbuv_internal(x,
+ x->dst.u_buffer,
+ x->dst.v_buffer,
+ x->dst.uv_stride,
+ x->mode_info_context->mbmi.uv_mode);
+}
- int i, j;
+#if CONFIG_COMP_INTRA_PRED
+void vp8_build_comp_intra_predictors_mbuv(MACROBLOCKD *x)
+{
+ unsigned char predictor[2][2][64];
+ int i;
- for (i = 0; i < 8; i++)
+ vp8_build_intra_predictors_mbuv_internal(x, predictor[0][0], predictor[1][0], 8,
+ x->mode_info_context->mbmi.uv_mode);
+ vp8_build_intra_predictors_mbuv_internal(x, predictor[0][1], predictor[1][1], 8,
+ x->mode_info_context->mbmi.second_uv_mode);
+ for (i = 0; i < 64; i++)
{
- uleft_col[i] = x->dst.u_buffer [i* x->dst.uv_stride -1];
- vleft_col[i] = x->dst.v_buffer [i* x->dst.uv_stride -1];
+ x->predictor[256 + i] = (predictor[0][0][i] + predictor[0][1][i] + 1) >> 1;
+ x->predictor[256 + 64 + i] = (predictor[1][0][i] + predictor[1][1][i] + 1) >> 1;
}
+}
+#endif
+
+void vp8_intra8x8_predict(BLOCKD *x,
+ int mode,
+ unsigned char *predictor)
+{
- switch (x->mode_info_context->mbmi.uv_mode)
+ unsigned char *yabove_row = *(x->base_dst) + x->dst - x->dst_stride;
+ unsigned char yleft_col[8];
+ unsigned char ytop_left = yabove_row[-1];
+ int r, c, i;
+
+ for (i = 0; i < 8; i++)
{
- case DC_PRED:
+ yleft_col[i] = (*(x->base_dst))[x->dst - 1 + i * x->dst_stride];
+ }
+ switch (mode)
{
- int expected_udc;
- int expected_vdc;
- int i;
- int shift;
- int Uaverage = 0;
- int Vaverage = 0;
-
- if (x->up_available)
+ case DC_PRED:
{
+ int expected_dc = 0;
+
for (i = 0; i < 8; i++)
{
- Uaverage += uabove_row[i];
- Vaverage += vabove_row[i];
+ expected_dc += yabove_row[i];
+ expected_dc += yleft_col[i];
}
- }
+ expected_dc = (expected_dc + 8) >> 4;
- if (x->left_available)
- {
- for (i = 0; i < 8; i++)
+ for (r = 0; r < 8; r++)
{
- Uaverage += uleft_col[i];
- Vaverage += vleft_col[i];
+ for (c = 0; c < 8; c++)
+ {
+ predictor[c] = expected_dc;
+ }
+ predictor += 16;
}
}
-
- if (!x->up_available && !x->left_available)
+ break;
+ case V_PRED:
{
- expected_udc = 128;
- expected_vdc = 128;
+ for (r = 0; r < 8; r++)
+ {
+ for (c = 0; c < 8; c++)
+ {
+
+ predictor[c] = yabove_row[c];
+ }
+ predictor += 16;
+ }
+
}
- else
+ break;
+ case H_PRED:
{
- shift = 2 + x->up_available + x->left_available;
- expected_udc = (Uaverage + (1 << (shift - 1))) >> shift;
- expected_vdc = (Vaverage + (1 << (shift - 1))) >> shift;
+
+ for (r = 0; r < 8; r++)
+ {
+ for (c = 0; c < 8; c++)
+ {
+ predictor[c] = yleft_col[r];
+ }
+ predictor += 16;
+ }
}
+ break;
+ case TM_PRED:
+ {
+ /* prediction similar to true_motion prediction */
+ for (r = 0; r < 8; r++)
+ {
+ for (c = 0; c < 8; c++)
+ {
+ int pred = yabove_row[c] - ytop_left + yleft_col[r];
+ if (pred < 0)
+ pred = 0;
+ if (pred > 255)
+ pred = 255;
+ predictor[c] = pred;
+ }
- /*vpx_memset(upred_ptr,expected_udc,64);*/
- /*vpx_memset(vpred_ptr,expected_vdc,64);*/
- for (i = 0; i < 8; i++)
- {
- vpx_memset(upred_ptr, expected_udc, 8);
- vpx_memset(vpred_ptr, expected_vdc, 8);
- upred_ptr += uv_stride; /*8;*/
- vpred_ptr += uv_stride; /*8;*/
+ predictor += 16;
+ }
}
+ break;
}
- break;
- case V_PRED:
- {
- int i;
+}
- for (i = 0; i < 8; i++)
- {
- vpx_memcpy(upred_ptr, uabove_row, 8);
- vpx_memcpy(vpred_ptr, vabove_row, 8);
- upred_ptr += uv_stride; /*8;*/
- vpred_ptr += uv_stride; /*8;*/
- }
+#if CONFIG_COMP_INTRA_PRED
+void vp8_comp_intra8x8_predict(BLOCKD *x,
+ int mode, int second_mode,
+ unsigned char *out_predictor)
+{
+
+ unsigned char predictor[2][8*16];
+ int i, j;
- }
- break;
- case H_PRED:
- {
- int i;
+ vp8_intra8x8_predict(x, mode, predictor[0]);
+ vp8_intra8x8_predict(x, second_mode, predictor[1]);
- for (i = 0; i < 8; i++)
+ for (i = 0; i < 8*16; i += 16)
+ {
+ for (j = i; j < i + 8; j++)
{
- vpx_memset(upred_ptr, uleft_col[i], 8);
- vpx_memset(vpred_ptr, vleft_col[i], 8);
- upred_ptr += uv_stride; /*8;*/
- vpred_ptr += uv_stride; /*8;*/
+ out_predictor[j] = (predictor[0][j] + predictor[1][j] + 1) >> 1;
}
}
+}
+#endif
- break;
- case TM_PRED:
+void vp8_intra_uv4x4_predict(BLOCKD *x,
+ int mode,
+ unsigned char *predictor)
+{
+
+ unsigned char *above_row = *(x->base_dst) + x->dst - x->dst_stride;
+ unsigned char left_col[4];
+ unsigned char top_left = above_row[-1];
+ int r, c, i;
+
+ for (i = 0; i < 4; i++)
{
- int i;
+ left_col[i] = (*(x->base_dst))[x->dst - 1 + i * x->dst_stride];
+ }
+ switch (mode)
+ {
+ case DC_PRED:
+ {
+ int expected_dc = 0;
- for (i = 0; i < 8; i++)
+ for (i = 0; i < 4; i++)
+ {
+ expected_dc += above_row[i];
+ expected_dc += left_col[i];
+ }
+ expected_dc = (expected_dc + 4) >> 3;
+
+ for (r = 0; r < 4; r++)
+ {
+ for (c = 0; c < 4; c++)
+ {
+ predictor[c] = expected_dc;
+ }
+ predictor += 8;
+ }
+ }
+ break;
+ case V_PRED:
{
- for (j = 0; j < 8; j++)
+ for (r = 0; r < 4; r++)
{
- int predu = uleft_col[i] + uabove_row[j] - utop_left;
- int predv = vleft_col[i] + vabove_row[j] - vtop_left;
+ for (c = 0; c < 4; c++)
+ {
- if (predu < 0)
- predu = 0;
+ predictor[c] = above_row[c];
+ }
+ predictor += 8;
+ }
- if (predu > 255)
- predu = 255;
+ }
+ break;
+ case H_PRED:
+ {
- if (predv < 0)
- predv = 0;
+ for (r = 0; r < 4; r++)
+ {
+ for (c = 0; c < 4; c++)
+ {
+ predictor[c] = left_col[r];
+ }
+ predictor += 8;
+ }
+ }
+ break;
+ case TM_PRED:
+ {
+ /* prediction similar to true_motion prediction */
+ for (r = 0; r < 4; r++)
+ {
+ for (c = 0; c < 4; c++)
+ {
+ int pred = above_row[c] - top_left + left_col[r];
+ if (pred < 0)
+ pred = 0;
- if (predv > 255)
- predv = 255;
+ if (pred > 255)
+ pred = 255;
+ predictor[c] = pred;
+ }
- upred_ptr[j] = predu;
- vpred_ptr[j] = predv;
+ predictor += 8;
}
-
- upred_ptr += uv_stride; /*8;*/
- vpred_ptr += uv_stride; /*8;*/
}
-
- }
- break;
- case B_PRED:
- case NEARESTMV:
- case NEARMV:
- case ZEROMV:
- case NEWMV:
- case SPLITMV:
- case MB_MODE_COUNT:
break;
}
}
+
+#if CONFIG_COMP_INTRA_PRED
+void vp8_comp_intra_uv4x4_predict(BLOCKD *x,
+ int mode, int mode2,
+ unsigned char *out_predictor)
+{
+ unsigned char predictor[2][8*4];
+ int i, j;
+
+ vp8_intra_uv4x4_predict(x, mode, predictor[0]);
+ vp8_intra_uv4x4_predict(x, mode2, predictor[1]);
+
+ for (i = 0; i < 4*8; i += 8)
+ {
+ for (j = i; j < i + 4; j++)
+ {
+ out_predictor[j] = (predictor[0][j] + predictor[1][j] + 1) >> 1;
+ }
+ }
+}
+#endif
+
+/* TODO: try different ways of use Y-UV mode correlation
+ Current code assumes that a uv 4x4 block use same mode
+ as corresponding Y 8x8 area
+ */
diff --git a/vp8/common/reconintra4x4.c b/vp8/common/reconintra4x4.c
index 3841227e3..ab8be4815 100644
--- a/vp8/common/reconintra4x4.c
+++ b/vp8/common/reconintra4x4.c
@@ -9,7 +9,7 @@
*/
-#include "vpx_config.h"
+#include "vpx_ports/config.h"
#include "recon.h"
#include "vpx_mem/vpx_mem.h"
#include "reconintra.h"
@@ -295,6 +295,28 @@ void vp8_intra4x4_predict(BLOCKD *x,
}
}
+
+#if CONFIG_COMP_INTRA_PRED
+void vp8_comp_intra4x4_predict(BLOCKD *x,
+ int b_mode, int b_mode2,
+ unsigned char *out_predictor)
+{
+ unsigned char predictor[2][4*16];
+ int i, j;
+
+ vp8_intra4x4_predict(x, b_mode, predictor[0]);
+ vp8_intra4x4_predict(x, b_mode2, predictor[1]);
+
+ for (i = 0; i < 16*4; i += 16)
+ {
+ for (j = i; j < i + 4; j++)
+ {
+ out_predictor[j] = (predictor[0][j] + predictor[1][j] + 1) >> 1;
+ }
+ }
+}
+#endif
+
/* copy 4 bytes from the above right down so that the 4x4 prediction modes using pixels above and
* to the right prediction have filled in pixels to use.
*/
diff --git a/vp8/common/rotate.h b/vp8/common/rotate.h
new file mode 100644
index 000000000..580f55279
--- /dev/null
+++ b/vp8/common/rotate.h
@@ -0,0 +1,2827 @@
+ // angle of -2.5 degrees
+ -1, 0, 14696, -1, 1, 11702, 0, 0, 24063, 0, 1, 15075, // 0, 0
+ -1, 1, 13787, -1, 2, 11164, 0, 1, 25366, 0, 2, 15219, // 0, 1
+ -1, 2, 12938, -1, 3, 10637, 0, 2, 26660, 0, 3, 15301, // 0, 2
+ -1, 3, 12159, -1, 4, 10135, 0, 3, 27912, 0, 4, 15330, // 0, 3
+ -1, 4, 11461, -1, 5, 9673, 0, 4, 29078, 0, 5, 15324, // 0, 4
+ -1, 5, 10855, -1, 6, 9265, 0, 5, 30105, 0, 6, 15311, // 0, 5
+ -1, 6, 10351, -1, 7, 8927, 0, 6, 30939, 0, 7, 15319, // 0, 6
+ -1, 7, 9959, -1, 8, 8669, 0, 7, 31532, 0, 8, 15376, // 0, 7
+ 0, 8, 31444, 0, 9, 15301, 1, 8, 10065, 1, 9, 8726, // 0, 8
+ 0, 9, 30876, 0, 10, 15193, 1, 9, 10482, 1, 10, 8985, // 0, 9
+ 0, 10, 30064, 0, 11, 15135, 1, 10, 11013, 1, 11, 9324, // 0,10
+ 0, 11, 29055, 0, 12, 15100, 1, 11, 11652, 1, 12, 9729, // 0,11
+ 0, 12, 27903, 0, 13, 15060, 1, 12, 12388, 1, 13, 10185, // 0,12
+ 0, 13, 26660, 0, 14, 14990, 1, 13, 13211, 1, 14, 10675, // 0,13
+ 0, 14, 25368, 0, 15, 14872, 1, 14, 14109, 1, 15, 11187, // 0,14
+ 0, 15, 24063, 0, 16, 14696, 1, 15, 15076, 1, 16, 11701, // 0,15
+ 0, 0, 14872, 0, 1, 11187, 1, 0, 25368, 1, 1, 14109, // 1, 0
+ 0, 1, 13853, 0, 2, 10644, 1, 1, 26893, 1, 2, 14146, // 1, 1
+ 0, 2, 12897, 0, 3, 10102, 1, 2, 28430, 1, 3, 14107, // 1, 2
+ 0, 3, 12014, 0, 4, 9575, 1, 3, 29938, 1, 4, 14009, // 1, 3
+ 0, 4, 11218, 0, 5, 9082, 1, 4, 31361, 1, 5, 13875, // 1, 4
+ 0, 5, 10528, 0, 6, 8645, 1, 5, 32624, 1, 6, 13739, // 1, 5
+ 0, 6, 9961, 0, 7, 8286, 1, 6, 33642, 1, 7, 13647, // 1, 6
+ 0, 7, 9534, 0, 8, 8024, 1, 7, 34340, 1, 8, 13638, // 1, 7
+ 1, 8, 34261, 1, 9, 13582, 2, 8, 9626, 2, 9, 8067, // 1, 8
+ 1, 9, 33585, 1, 10, 13548, 2, 9, 10074, 2, 10, 8329, // 1, 9
+ 1, 10, 32586, 1, 11, 13600, 2, 10, 10665, 2, 11, 8685, // 1,10
+ 1, 11, 31339, 1, 12, 13694, 2, 11, 11385, 2, 12, 9118, // 1,11
+ 1, 12, 29928, 1, 13, 13789, 2, 12, 12216, 2, 13, 9603, // 1,12
+ 1, 13, 28427, 1, 14, 13850, 2, 13, 13141, 2, 14, 10118, // 1,13
+ 1, 14, 26893, 1, 15, 13853, 2, 14, 14145, 2, 15, 10645, // 1,14
+ 1, 15, 25366, 1, 16, 13787, 2, 15, 15220, 2, 16, 11163, // 1,15
+ 1, 0, 14990, 1, 1, 10676, 2, 0, 26660, 2, 1, 13210, // 2, 0
+ 1, 1, 13850, 1, 2, 10119, 2, 1, 28427, 2, 2, 13140, // 2, 1
+ 1, 2, 12769, 1, 3, 9546, 2, 2, 30239, 2, 3, 12982, // 2, 2
+ 1, 3, 11760, 1, 4, 8976, 2, 3, 32052, 2, 4, 12748, // 2, 3
+ 1, 4, 10842, 1, 5, 8432, 2, 4, 33795, 2, 5, 12467, // 2, 4
+ 1, 5, 10041, 1, 6, 7943, 2, 5, 35364, 2, 6, 12188, // 2, 5
+ 1, 6, 9390, 1, 7, 7543, 2, 6, 36631, 2, 7, 11972, // 2, 6
+ 1, 7, 8918, 1, 8, 7266, 2, 7, 37470, 2, 8, 11882, // 2, 7
+ 2, 8, 37402, 2, 9, 11842, 3, 8, 8994, 3, 9, 7298, // 2, 8
+ 2, 9, 36582, 2, 10, 11897, 3, 9, 9484, 3, 10, 7573, // 2, 9
+ 2, 10, 35332, 2, 11, 12079, 3, 10, 10156, 3, 11, 7969, // 2,10
+ 2, 11, 33777, 2, 12, 12323, 3, 11, 10983, 3, 12, 8453, // 2,11
+ 2, 12, 32045, 2, 13, 12569, 3, 12, 11934, 3, 13, 8988, // 2,12
+ 2, 13, 30239, 2, 14, 12769, 3, 13, 12982, 3, 14, 9546, // 2,13
+ 2, 14, 28430, 2, 15, 12897, 3, 14, 14107, 3, 15, 10102, // 2,14
+ 2, 15, 26660, 2, 16, 12938, 3, 15, 15301, 3, 16, 10637, // 2,15
+ 2, 0, 15060, 2, 1, 10185, 3, 0, 27903, 3, 1, 12388, // 3, 0
+ 2, 1, 13789, 2, 2, 9603, 3, 1, 29928, 3, 2, 12216, // 3, 1
+ 2, 2, 12569, 2, 3, 8988, 3, 2, 32045, 3, 3, 11934, // 3, 2
+ 2, 3, 11411, 2, 4, 8358, 3, 3, 34213, 3, 4, 11554, // 3, 3
+ 2, 4, 10337, 2, 5, 7737, 3, 4, 36354, 3, 5, 11108, // 3, 4
+ 2, 5, 9388, 2, 6, 7165, 3, 5, 38330, 3, 6, 10653, // 3, 5
+ 2, 6, 8617, 2, 7, 6695, 3, 6, 39949, 3, 7, 10275, // 3, 6
+ 2, 7, 8082, 2, 8, 6381, 3, 7, 40994, 3, 8, 10079, // 3, 7
+ 3, 8, 40940, 3, 9, 10051, 4, 8, 8141, 4, 9, 6404, // 3, 8
+ 3, 9, 39912, 3, 10, 10221, 4, 9, 8690, 4, 10, 6713, // 3, 9
+ 3, 10, 38307, 3, 11, 10569, 4, 10, 9479, 4, 11, 7181, // 3,10
+ 3, 11, 36343, 3, 12, 10995, 4, 11, 10452, 4, 12, 7746, // 3,11
+ 3, 12, 34213, 3, 13, 11411, 4, 12, 11554, 4, 13, 8358, // 3,12
+ 3, 13, 32052, 3, 14, 11760, 4, 13, 12747, 4, 14, 8977, // 3,13
+ 3, 14, 29938, 3, 15, 12014, 4, 14, 14009, 4, 15, 9575, // 3,14
+ 3, 15, 27912, 3, 16, 12159, 4, 15, 15330, 4, 16, 10135, // 3,15
+ 3, 0, 15100, 3, 1, 9728, 4, 0, 29055, 4, 1, 11653, // 4, 0
+ 3, 1, 13694, 3, 2, 9118, 4, 1, 31339, 4, 2, 11385, // 4, 1
+ 3, 2, 12323, 3, 3, 8452, 4, 2, 33777, 4, 3, 10984, // 4, 2
+ 3, 3, 10995, 3, 4, 7746, 4, 3, 36343, 4, 4, 10452, // 4, 3
+ 3, 4, 9730, 3, 5, 7022, 4, 4, 38966, 4, 5, 9818, // 4, 4
+ 3, 5, 8578, 3, 6, 6328, 4, 5, 41487, 4, 6, 9143, // 4, 5
+ 3, 6, 7626, 3, 7, 5739, 4, 6, 43626, 4, 7, 8545, // 4, 6
+ 3, 7, 6987, 3, 8, 5354, 4, 7, 44999, 4, 8, 8196, // 4, 7
+ 4, 8, 44962, 4, 9, 8177, 5, 8, 7029, 5, 9, 5368, // 4, 8
+ 4, 9, 43602, 4, 10, 8507, 5, 9, 7678, 5, 10, 5749, // 4, 9
+ 4, 10, 41475, 4, 11, 9081, 5, 10, 8646, 5, 11, 6334, // 4,10
+ 4, 11, 38966, 4, 12, 9730, 5, 11, 9818, 5, 12, 7022, // 4,11
+ 4, 12, 36354, 4, 13, 10337, 5, 12, 11108, 5, 13, 7737, // 4,12
+ 4, 13, 33795, 4, 14, 10842, 5, 13, 12467, 5, 14, 8432, // 4,13
+ 4, 14, 31361, 4, 15, 11218, 5, 14, 13875, 5, 15, 9082, // 4,14
+ 4, 15, 29078, 4, 16, 11461, 5, 15, 15325, 5, 16, 9672, // 4,15
+ 4, 0, 15135, 4, 1, 9323, 5, 0, 30064, 5, 1, 11014, // 5, 0
+ 4, 1, 13600, 4, 2, 8685, 5, 1, 32586, 5, 2, 10665, // 5, 1
+ 4, 2, 12079, 4, 3, 7969, 5, 2, 35332, 5, 3, 10156, // 5, 2
+ 4, 3, 10569, 4, 4, 7180, 5, 3, 38307, 5, 4, 9480, // 5, 3
+ 4, 4, 9081, 4, 5, 6334, 5, 4, 41475, 5, 5, 8646, // 5, 4
+ 4, 5, 7659, 4, 6, 5472, 5, 5, 44700, 5, 6, 7705, // 5, 5
+ 4, 6, 6422, 4, 7, 4690, 5, 6, 47630, 5, 7, 6794, // 5, 6
+ 4, 7, 5590, 4, 8, 4164, 5, 7, 49588, 5, 8, 6194, // 5, 7
+ 5, 8, 49566, 5, 9, 6183, 6, 8, 5615, 6, 9, 4172, // 5, 8
+ 5, 9, 47619, 5, 10, 6768, 6, 9, 6455, 6, 10, 4694, // 5, 9
+ 5, 10, 44700, 5, 11, 7659, 6, 10, 7705, 6, 11, 5472, // 5,10
+ 5, 11, 41487, 5, 12, 8578, 6, 11, 9143, 6, 12, 6328, // 5,11
+ 5, 12, 38330, 5, 13, 9388, 6, 12, 10653, 6, 13, 7165, // 5,12
+ 5, 13, 35364, 5, 14, 10041, 6, 13, 12188, 6, 14, 7943, // 5,13
+ 5, 14, 32624, 5, 15, 10528, 6, 14, 13740, 6, 15, 8644, // 5,14
+ 5, 15, 30105, 5, 16, 10855, 6, 15, 15311, 6, 16, 9265, // 5,15
+ 5, 0, 15193, 5, 1, 8986, 6, 0, 30876, 6, 1, 10481, // 6, 0
+ 5, 1, 13548, 5, 2, 8329, 6, 1, 33585, 6, 2, 10074, // 6, 1
+ 5, 2, 11897, 5, 3, 7573, 6, 2, 36582, 6, 3, 9484, // 6, 2
+ 5, 3, 10221, 5, 4, 6714, 6, 3, 39912, 6, 4, 8689, // 6, 3
+ 5, 4, 8507, 5, 5, 5749, 6, 4, 43602, 6, 5, 7678, // 6, 4
+ 5, 5, 6768, 5, 6, 4694, 6, 5, 47619, 6, 6, 6455, // 6, 5
+ 5, 6, 5099, 5, 7, 3620, 6, 6, 51701, 6, 7, 5116, // 6, 6
+ 5, 7, 3853, 5, 8, 2795, 6, 7, 54839, 6, 8, 4049, // 6, 7
+ 6, 8, 54831, 6, 9, 4044, 7, 8, 3864, 7, 9, 2797, // 6, 8
+ 6, 9, 51701, 6, 10, 5099, 7, 9, 5116, 7, 10, 3620, // 6, 9
+ 6, 10, 47630, 6, 11, 6422, 7, 10, 6794, 7, 11, 4690, // 6,10
+ 6, 11, 43626, 6, 12, 7626, 7, 11, 8545, 7, 12, 5739, // 6,11
+ 6, 12, 39949, 6, 13, 8617, 7, 12, 10275, 7, 13, 6695, // 6,12
+ 6, 13, 36631, 6, 14, 9390, 7, 13, 11972, 7, 14, 7543, // 6,13
+ 6, 14, 33642, 6, 15, 9961, 7, 14, 13647, 7, 15, 8286, // 6,14
+ 6, 15, 30939, 6, 16, 10351, 7, 15, 15319, 7, 16, 8927, // 6,15
+ 6, 0, 15301, 6, 1, 8727, 7, 0, 31444, 7, 1, 10064, // 7, 0
+ 6, 1, 13582, 6, 2, 8068, 7, 1, 34261, 7, 2, 9625, // 7, 1
+ 6, 2, 11842, 6, 3, 7298, 7, 2, 37402, 7, 3, 8994, // 7, 2
+ 6, 3, 10051, 6, 4, 6403, 7, 3, 40940, 7, 4, 8142, // 7, 3
+ 6, 4, 8177, 6, 5, 5368, 7, 4, 44962, 7, 5, 7029, // 7, 4
+ 6, 5, 6183, 6, 6, 4172, 7, 5, 49566, 7, 6, 5615, // 7, 5
+ 6, 6, 4044, 6, 7, 2797, 7, 6, 54831, 7, 7, 3864, // 7, 6
+ 6, 7, 1903, 6, 8, 1347, 7, 7, 60382, 7, 8, 1904, // 7, 7
+ 7, 8, 60382, 7, 9, 1903, 8, 8, 1905, 8, 9, 1346, // 7, 8
+ 7, 9, 54839, 7, 10, 3853, 8, 9, 4049, 8, 10, 2795, // 7, 9
+ 7, 10, 49588, 7, 11, 5590, 8, 10, 6193, 8, 11, 4165, // 7,10
+ 7, 11, 44999, 7, 12, 6987, 8, 11, 8195, 8, 12, 5355, // 7,11
+ 7, 12, 40994, 7, 13, 8082, 8, 12, 10079, 8, 13, 6381, // 7,12
+ 7, 13, 37470, 7, 14, 8918, 8, 13, 11883, 8, 14, 7265, // 7,13
+ 7, 14, 34340, 7, 15, 9534, 8, 14, 13638, 8, 15, 8024, // 7,14
+ 7, 15, 31532, 7, 16, 9959, 8, 15, 15376, 8, 16, 8669, // 7,15
+ 7, -1, 8669, 7, 0, 15376, 8, -1, 9959, 8, 0, 31532, // 8, 0
+ 7, 0, 8024, 7, 1, 13638, 8, 0, 9534, 8, 1, 34340, // 8, 1
+ 7, 1, 7266, 7, 2, 11883, 8, 1, 8918, 8, 2, 37469, // 8, 2
+ 7, 2, 6381, 7, 3, 10079, 8, 2, 8082, 8, 3, 40994, // 8, 3
+ 7, 3, 5354, 7, 4, 8195, 8, 3, 6987, 8, 4, 45000, // 8, 4
+ 7, 4, 4164, 7, 5, 6193, 8, 4, 5590, 8, 5, 49589, // 8, 5
+ 7, 5, 2795, 7, 6, 4049, 8, 5, 3853, 8, 6, 54839, // 8, 6
+ 7, 6, 1347, 7, 7, 1905, 8, 6, 1903, 8, 7, 60381, // 8, 7
+ 8, 7, 1905, 8, 8, 60382, 9, 7, 1347, 9, 8, 1902, // 8, 8
+ 8, 8, 3864, 8, 9, 54831, 9, 8, 2797, 9, 9, 4044, // 8, 9
+ 8, 9, 5615, 8, 10, 49566, 9, 9, 4172, 9, 10, 6183, // 8,10
+ 8, 10, 7029, 8, 11, 44962, 9, 10, 5368, 9, 11, 8177, // 8,11
+ 8, 11, 8141, 8, 12, 40940, 9, 11, 6403, 9, 12, 10052, // 8,12
+ 8, 12, 8994, 8, 13, 37402, 9, 12, 7298, 9, 13, 11842, // 8,13
+ 8, 13, 9626, 8, 14, 34261, 9, 13, 8068, 9, 14, 13581, // 8,14
+ 8, 14, 10065, 8, 15, 31444, 9, 14, 8727, 9, 15, 15300, // 8,15
+ 8, -1, 8927, 8, 0, 15319, 9, -1, 10351, 9, 0, 30939, // 9, 0
+ 8, 0, 8286, 8, 1, 13647, 9, 0, 9961, 9, 1, 33642, // 9, 1
+ 8, 1, 7543, 8, 2, 11972, 9, 1, 9390, 9, 2, 36631, // 9, 2
+ 8, 2, 6695, 8, 3, 10275, 9, 2, 8617, 9, 3, 39949, // 9, 3
+ 8, 3, 5739, 8, 4, 8545, 9, 3, 7626, 9, 4, 43626, // 9, 4
+ 8, 4, 4690, 8, 5, 6794, 9, 4, 6422, 9, 5, 47630, // 9, 5
+ 8, 5, 3620, 8, 6, 5116, 9, 5, 5099, 9, 6, 51701, // 9, 6
+ 8, 6, 2797, 8, 7, 3864, 9, 6, 4044, 9, 7, 54831, // 9, 7
+ 9, 7, 4049, 9, 8, 54839, 10, 7, 2795, 10, 8, 3853, // 9, 8
+ 9, 8, 5116, 9, 9, 51701, 10, 8, 3620, 10, 9, 5099, // 9, 9
+ 9, 9, 6455, 9, 10, 47619, 10, 9, 4694, 10, 10, 6768, // 9,10
+ 9, 10, 7678, 9, 11, 43602, 10, 10, 5749, 10, 11, 8507, // 9,11
+ 9, 11, 8690, 9, 12, 39912, 10, 11, 6714, 10, 12, 10220, // 9,12
+ 9, 12, 9484, 9, 13, 36582, 10, 12, 7573, 10, 13, 11897, // 9,13
+ 9, 13, 10074, 9, 14, 33585, 10, 13, 8329, 10, 14, 13548, // 9,14
+ 9, 14, 10482, 9, 15, 30876, 10, 14, 8986, 10, 15, 15192, // 9,15
+ 9, -1, 9265, 9, 0, 15311, 10, -1, 10855, 10, 0, 30105, // 10, 0
+ 9, 0, 8645, 9, 1, 13740, 10, 0, 10528, 10, 1, 32623, // 10, 1
+ 9, 1, 7943, 9, 2, 12188, 10, 1, 10041, 10, 2, 35364, // 10, 2
+ 9, 2, 7165, 9, 3, 10653, 10, 2, 9388, 10, 3, 38330, // 10, 3
+ 9, 3, 6328, 9, 4, 9143, 10, 3, 8578, 10, 4, 41487, // 10, 4
+ 9, 4, 5472, 9, 5, 7705, 10, 4, 7659, 10, 5, 44700, // 10, 5
+ 9, 5, 4694, 9, 6, 6455, 10, 5, 6768, 10, 6, 47619, // 10, 6
+ 9, 6, 4172, 9, 7, 5615, 10, 6, 6183, 10, 7, 49566, // 10, 7
+ 10, 7, 6193, 10, 8, 49588, 11, 7, 4164, 11, 8, 5591, // 10, 8
+ 10, 8, 6794, 10, 9, 47630, 11, 8, 4690, 11, 9, 6422, // 10, 9
+ 10, 9, 7705, 10, 10, 44700, 11, 9, 5472, 11, 10, 7659, // 10,10
+ 10, 10, 8646, 10, 11, 41475, 11, 10, 6334, 11, 11, 9081, // 10,11
+ 10, 11, 9479, 10, 12, 38307, 11, 11, 7180, 11, 12, 10570, // 10,12
+ 10, 12, 10156, 10, 13, 35332, 11, 12, 7969, 11, 13, 12079, // 10,13
+ 10, 13, 10665, 10, 14, 32586, 11, 13, 8685, 11, 14, 13600, // 10,14
+ 10, 14, 11013, 10, 15, 30064, 11, 14, 9323, 11, 15, 15136, // 10,15
+ 10, -1, 9673, 10, 0, 15325, 11, -1, 11461, 11, 0, 29077, // 11, 0
+ 10, 0, 9082, 10, 1, 13875, 11, 0, 11218, 11, 1, 31361, // 11, 1
+ 10, 1, 8432, 10, 2, 12467, 11, 1, 10842, 11, 2, 33795, // 11, 2
+ 10, 2, 7737, 10, 3, 11108, 11, 2, 10337, 11, 3, 36354, // 11, 3
+ 10, 3, 7022, 10, 4, 9818, 11, 3, 9730, 11, 4, 38966, // 11, 4
+ 10, 4, 6334, 10, 5, 8646, 11, 4, 9081, 11, 5, 41475, // 11, 5
+ 10, 5, 5749, 10, 6, 7678, 11, 5, 8507, 11, 6, 43602, // 11, 6
+ 10, 6, 5368, 10, 7, 7029, 11, 6, 8177, 11, 7, 44962, // 11, 7
+ 11, 7, 8195, 11, 8, 44999, 12, 7, 5354, 12, 8, 6988, // 11, 8
+ 11, 8, 8545, 11, 9, 43626, 12, 8, 5739, 12, 9, 7626, // 11, 9
+ 11, 9, 9143, 11, 10, 41487, 12, 9, 6328, 12, 10, 8578, // 11,10
+ 11, 10, 9818, 11, 11, 38966, 12, 10, 7022, 12, 11, 9730, // 11,11
+ 11, 11, 10452, 11, 12, 36343, 12, 11, 7746, 12, 12, 10995, // 11,12
+ 11, 12, 10983, 11, 13, 33777, 12, 12, 8452, 12, 13, 12324, // 11,13
+ 11, 13, 11385, 11, 14, 31339, 12, 13, 9118, 12, 14, 13694, // 11,14
+ 11, 14, 11652, 11, 15, 29055, 12, 14, 9728, 12, 15, 15101, // 11,15
+ 11, -1, 10135, 11, 0, 15330, 12, -1, 12159, 12, 0, 27912, // 12, 0
+ 11, 0, 9575, 11, 1, 14009, 12, 0, 12014, 12, 1, 29938, // 12, 1
+ 11, 1, 8976, 11, 2, 12747, 12, 1, 11760, 12, 2, 32053, // 12, 2
+ 11, 2, 8358, 11, 3, 11554, 12, 2, 11411, 12, 3, 34213, // 12, 3
+ 11, 3, 7746, 11, 4, 10452, 12, 3, 10995, 12, 4, 36343, // 12, 4
+ 11, 4, 7180, 11, 5, 9479, 12, 4, 10569, 12, 5, 38308, // 12, 5
+ 11, 5, 6714, 11, 6, 8690, 12, 5, 10221, 12, 6, 39911, // 12, 6
+ 11, 6, 6403, 11, 7, 8141, 12, 6, 10051, 12, 7, 40941, // 12, 7
+ 12, 7, 10079, 12, 8, 40994, 13, 7, 6381, 13, 8, 8082, // 12, 8
+ 12, 8, 10275, 12, 9, 39949, 13, 8, 6695, 13, 9, 8617, // 12, 9
+ 12, 9, 10653, 12, 10, 38330, 13, 9, 7165, 13, 10, 9388, // 12,10
+ 12, 10, 11108, 12, 11, 36354, 13, 10, 7737, 13, 11, 10337, // 12,11
+ 12, 11, 11554, 12, 12, 34213, 13, 11, 8358, 13, 12, 11411, // 12,12
+ 12, 12, 11934, 12, 13, 32045, 13, 12, 8988, 13, 13, 12569, // 12,13
+ 12, 13, 12216, 12, 14, 29928, 13, 13, 9603, 13, 14, 13789, // 12,14
+ 12, 14, 12388, 12, 15, 27903, 13, 14, 10185, 13, 15, 15060, // 12,15
+ 12, -1, 10637, 12, 0, 15301, 13, -1, 12938, 13, 0, 26660, // 13, 0
+ 12, 0, 10102, 12, 1, 14107, 13, 0, 12897, 13, 1, 28430, // 13, 1
+ 12, 1, 9546, 12, 2, 12982, 13, 1, 12769, 13, 2, 30239, // 13, 2
+ 12, 2, 8988, 12, 3, 11934, 13, 2, 12569, 13, 3, 32045, // 13, 3
+ 12, 3, 8452, 12, 4, 10983, 13, 3, 12323, 13, 4, 33778, // 13, 4
+ 12, 4, 7969, 12, 5, 10156, 13, 4, 12079, 13, 5, 35332, // 13, 5
+ 12, 5, 7573, 12, 6, 9484, 13, 5, 11897, 13, 6, 36582, // 13, 6
+ 12, 6, 7298, 12, 7, 8994, 13, 6, 11842, 13, 7, 37402, // 13, 7
+ 13, 7, 11883, 13, 8, 37470, 14, 7, 7266, 14, 8, 8917, // 13, 8
+ 13, 8, 11972, 13, 9, 36631, 14, 8, 7543, 14, 9, 9390, // 13, 9
+ 13, 9, 12188, 13, 10, 35364, 14, 9, 7943, 14, 10, 10041, // 13,10
+ 13, 10, 12467, 13, 11, 33795, 14, 10, 8432, 14, 11, 10842, // 13,11
+ 13, 11, 12747, 13, 12, 32052, 14, 11, 8976, 14, 12, 11761, // 13,12
+ 13, 12, 12982, 13, 13, 30239, 14, 12, 9546, 14, 13, 12769, // 13,13
+ 13, 13, 13141, 13, 14, 28427, 14, 13, 10119, 14, 14, 13849, // 13,14
+ 13, 14, 13211, 13, 15, 26660, 14, 14, 10676, 14, 15, 14989, // 13,15
+ 13, -1, 11164, 13, 0, 15220, 14, -1, 13787, 14, 0, 25365, // 14, 0
+ 13, 0, 10644, 13, 1, 14145, 14, 0, 13853, 14, 1, 26894, // 14, 1
+ 13, 1, 10119, 13, 2, 13141, 14, 1, 13850, 14, 2, 28426, // 14, 2
+ 13, 2, 9603, 13, 3, 12216, 14, 2, 13789, 14, 3, 29928, // 14, 3
+ 13, 3, 9118, 13, 4, 11385, 14, 3, 13694, 14, 4, 31339, // 14, 4
+ 13, 4, 8685, 13, 5, 10665, 14, 4, 13600, 14, 5, 32586, // 14, 5
+ 13, 5, 8329, 13, 6, 10074, 14, 5, 13548, 14, 6, 33585, // 14, 6
+ 13, 6, 8068, 13, 7, 9626, 14, 6, 13582, 14, 7, 34260, // 14, 7
+ 14, 7, 13638, 14, 8, 34340, 15, 7, 8024, 15, 8, 9534, // 14, 8
+ 14, 8, 13647, 14, 9, 33642, 15, 8, 8286, 15, 9, 9961, // 14, 9
+ 14, 9, 13740, 14, 10, 32624, 15, 9, 8645, 15, 10, 10527, // 14,10
+ 14, 10, 13875, 14, 11, 31361, 15, 10, 9082, 15, 11, 11218, // 14,11
+ 14, 11, 14009, 14, 12, 29938, 15, 11, 9575, 15, 12, 12014, // 14,12
+ 14, 12, 14107, 14, 13, 28430, 15, 12, 10102, 15, 13, 12897, // 14,13
+ 14, 13, 14145, 14, 14, 26893, 15, 13, 10644, 15, 14, 13854, // 14,14
+ 14, 14, 14109, 14, 15, 25368, 15, 14, 11187, 15, 15, 14872, // 14,15
+ 14, -1, 11702, 14, 0, 15076, 15, -1, 14696, 15, 0, 24062, // 15, 0
+ 14, 0, 11187, 14, 1, 14109, 15, 0, 14872, 15, 1, 25368, // 15, 1
+ 14, 1, 10676, 14, 2, 13211, 15, 1, 14990, 15, 2, 26659, // 15, 2
+ 14, 2, 10185, 14, 3, 12388, 15, 2, 15060, 15, 3, 27903, // 15, 3
+ 14, 3, 9728, 14, 4, 11652, 15, 3, 15100, 15, 4, 29056, // 15, 4
+ 14, 4, 9323, 14, 5, 11013, 15, 4, 15135, 15, 5, 30065, // 15, 5
+ 14, 5, 8986, 14, 6, 10482, 15, 5, 15193, 15, 6, 30875, // 15, 6
+ 14, 6, 8727, 14, 7, 10065, 15, 6, 15301, 15, 7, 31443, // 15, 7
+ 15, 7, 15376, 15, 8, 31532, 16, 7, 8669, 16, 8, 9959, // 15, 8
+ 15, 8, 15319, 15, 9, 30939, 16, 8, 8927, 16, 9, 10351, // 15, 9
+ 15, 9, 15311, 15, 10, 30105, 16, 9, 9265, 16, 10, 10855, // 15,10
+ 15, 10, 15325, 15, 11, 29078, 16, 10, 9673, 16, 11, 11460, // 15,11
+ 15, 11, 15330, 15, 12, 27912, 16, 11, 10135, 16, 12, 12159, // 15,12
+ 15, 12, 15301, 15, 13, 26660, 16, 12, 10637, 16, 13, 12938, // 15,13
+ 15, 13, 15220, 15, 14, 25366, 16, 13, 11164, 16, 14, 13786, // 15,14
+ 15, 14, 15076, 15, 15, 24063, 16, 14, 11702, 16, 15, 14695, // 15,15
+ // angle of -2.0 degrees
+ -1, 0, 13368, -1, 1, 10104, 0, 0, 28495, 0, 1, 13569, // 0, 0
+ -1, 1, 12574, -1, 2, 9662, 0, 1, 29831, 0, 2, 13469, // 0, 1
+ -1, 2, 11829, -1, 3, 9229, 0, 2, 31146, 0, 3, 13332, // 0, 2
+ -1, 3, 11143, -1, 4, 8816, 0, 3, 32406, 0, 4, 13171, // 0, 3
+ -1, 4, 10528, -1, 5, 8438, 0, 4, 33564, 0, 5, 13006, // 0, 4
+ -1, 5, 9995, -1, 6, 8107, 0, 5, 34567, 0, 6, 12867, // 0, 5
+ -1, 6, 9558, -1, 7, 7839, 0, 6, 35362, 0, 7, 12777, // 0, 6
+ -1, 7, 9224, -1, 8, 7643, 0, 7, 35905, 0, 8, 12764, // 0, 7
+ 0, 8, 35844, 0, 9, 12728, 1, 8, 9290, 1, 9, 7674, // 0, 8
+ 0, 9, 35315, 0, 10, 12717, 1, 9, 9635, 1, 10, 7869, // 0, 9
+ 0, 10, 34532, 0, 11, 12783, 1, 10, 10086, 1, 11, 8135, // 0,10
+ 0, 11, 33539, 0, 12, 12899, 1, 11, 10635, 1, 12, 8463, // 0,11
+ 0, 12, 32391, 0, 13, 13038, 1, 12, 11269, 1, 13, 8838, // 0,12
+ 0, 13, 31138, 0, 14, 13176, 1, 13, 11977, 1, 14, 9245, // 0,13
+ 0, 14, 29828, 0, 15, 13291, 1, 14, 12746, 1, 15, 9671, // 0,14
+ 0, 15, 28495, 0, 16, 13368, 1, 15, 13569, 1, 16, 10104, // 0,15
+ 0, 0, 13291, 0, 1, 9671, 1, 0, 29828, 1, 1, 12746, // 1, 0
+ 0, 1, 12412, 0, 2, 9202, 1, 1, 31358, 1, 2, 12564, // 1, 1
+ 0, 2, 11580, 0, 3, 8735, 1, 2, 32886, 1, 3, 12335, // 1, 2
+ 0, 3, 10808, 0, 4, 8284, 1, 3, 34369, 1, 4, 12075, // 1, 3
+ 0, 4, 10111, 0, 5, 7865, 1, 4, 35750, 1, 5, 11810, // 1, 4
+ 0, 5, 9509, 0, 6, 7497, 1, 5, 36955, 1, 6, 11575, // 1, 5
+ 0, 6, 9020, 0, 7, 7202, 1, 6, 37906, 1, 7, 11408, // 1, 6
+ 0, 7, 8662, 0, 8, 6997, 1, 7, 38534, 1, 8, 11343, // 1, 7
+ 1, 8, 38481, 1, 9, 11317, 2, 8, 8718, 2, 9, 7020, // 1, 8
+ 1, 9, 37866, 1, 10, 11360, 2, 9, 9086, 2, 10, 7224, // 1, 9
+ 1, 10, 36926, 1, 11, 11507, 2, 10, 9587, 2, 11, 7516, // 1,10
+ 1, 11, 35730, 1, 12, 11721, 2, 11, 10204, 2, 12, 7881, // 1,11
+ 1, 12, 34358, 1, 13, 11964, 2, 12, 10918, 2, 13, 8296, // 1,12
+ 1, 13, 32881, 1, 14, 12203, 2, 13, 11709, 2, 14, 8743, // 1,13
+ 1, 14, 31358, 1, 15, 12412, 2, 14, 12564, 2, 15, 9202, // 1,14
+ 1, 15, 29831, 1, 16, 12574, 2, 15, 13470, 2, 16, 9661, // 1,15
+ 1, 0, 13176, 1, 1, 9245, 2, 0, 31138, 2, 1, 11977, // 2, 0
+ 1, 1, 12203, 1, 2, 8742, 2, 1, 32881, 2, 2, 11710, // 2, 1
+ 1, 2, 11272, 1, 3, 8232, 2, 2, 34650, 2, 3, 11382, // 2, 2
+ 1, 3, 10397, 1, 4, 7728, 2, 3, 36399, 2, 4, 11012, // 2, 3
+ 1, 4, 9597, 1, 5, 7252, 2, 4, 38057, 2, 5, 10630, // 2, 4
+ 1, 5, 8902, 1, 6, 6829, 2, 5, 39526, 2, 6, 10279, // 2, 5
+ 1, 6, 8344, 1, 7, 6491, 2, 6, 40688, 2, 7, 10013, // 2, 6
+ 1, 7, 7951, 1, 8, 6266, 2, 7, 41432, 2, 8, 9887, // 2, 7
+ 2, 8, 41389, 2, 9, 9867, 3, 8, 7996, 3, 9, 6284, // 2, 8
+ 2, 9, 40656, 2, 10, 9977, 3, 9, 8397, 3, 10, 6506, // 2, 9
+ 2, 10, 39503, 2, 11, 10226, 3, 10, 8966, 3, 11, 6841, // 2,10
+ 2, 11, 38042, 2, 12, 10559, 3, 11, 9674, 3, 12, 7261, // 2,11
+ 2, 12, 36392, 2, 13, 10922, 3, 12, 10488, 3, 13, 7734, // 2,12
+ 2, 13, 34650, 2, 14, 11272, 3, 13, 11382, 3, 14, 8232, // 2,13
+ 2, 14, 32886, 2, 15, 11580, 3, 14, 12334, 3, 15, 8736, // 2,14
+ 2, 15, 31146, 2, 16, 11829, 3, 15, 13332, 3, 16, 9229, // 2,15
+ 2, 0, 13038, 2, 1, 8838, 3, 0, 32391, 3, 1, 11269, // 3, 0
+ 2, 1, 11964, 2, 2, 8296, 3, 1, 34358, 3, 2, 10918, // 3, 1
+ 2, 2, 10922, 2, 3, 7734, 3, 2, 36392, 3, 3, 10488, // 3, 2
+ 2, 3, 9924, 2, 4, 7164, 3, 3, 38450, 3, 4, 9998, // 3, 3
+ 2, 4, 8995, 2, 5, 6611, 3, 4, 40452, 3, 5, 9478, // 3, 4
+ 2, 5, 8175, 2, 6, 6108, 3, 5, 42271, 3, 6, 8982, // 3, 5
+ 2, 6, 7516, 2, 7, 5703, 3, 6, 43733, 3, 7, 8584, // 3, 6
+ 2, 7, 7072, 2, 8, 5443, 3, 7, 44649, 3, 8, 8372, // 3, 7
+ 3, 8, 44616, 3, 9, 8359, 4, 8, 7106, 4, 9, 5455, // 3, 8
+ 3, 9, 43710, 3, 10, 8558, 4, 9, 7556, 4, 10, 5712, // 3, 9
+ 3, 10, 42256, 3, 11, 8940, 4, 10, 8224, 4, 11, 6116, // 3,10
+ 3, 11, 40444, 3, 12, 9421, 4, 11, 9056, 4, 12, 6615, // 3,11
+ 3, 12, 38450, 3, 13, 9924, 4, 12, 9998, 4, 13, 7164, // 3,12
+ 3, 13, 36399, 3, 14, 10397, 4, 13, 11012, 4, 14, 7728, // 3,13
+ 3, 14, 34369, 3, 15, 10808, 4, 14, 12074, 4, 15, 8285, // 3,14
+ 3, 15, 32406, 3, 16, 11143, 4, 15, 13171, 4, 16, 8816, // 3,15
+ 3, 0, 12899, 3, 1, 8463, 4, 0, 33539, 4, 1, 10635, // 4, 0
+ 3, 1, 11721, 3, 2, 7881, 4, 1, 35730, 4, 2, 10204, // 4, 1
+ 3, 2, 10559, 3, 3, 7261, 4, 2, 38042, 4, 3, 9674, // 4, 2
+ 3, 3, 9421, 3, 4, 6615, 4, 3, 40444, 4, 4, 9056, // 4, 3
+ 3, 4, 8332, 3, 5, 5965, 4, 4, 42861, 4, 5, 8378, // 4, 4
+ 3, 5, 7342, 3, 6, 5350, 4, 5, 45146, 4, 6, 7698, // 4, 5
+ 3, 6, 6530, 3, 7, 4838, 4, 6, 47049, 4, 7, 7119, // 4, 6
+ 3, 7, 6000, 3, 8, 4513, 4, 7, 48240, 4, 8, 6783, // 4, 7
+ 4, 8, 48218, 4, 9, 6774, 5, 8, 6023, 5, 9, 4521, // 4, 8
+ 4, 9, 47035, 4, 10, 7100, 5, 9, 6558, 5, 10, 4843, // 4, 9
+ 4, 10, 45139, 4, 11, 7667, 5, 10, 7377, 5, 11, 5353, // 4,10
+ 4, 11, 42861, 4, 12, 8332, 5, 11, 8378, 5, 12, 5965, // 4,11
+ 4, 12, 40452, 4, 13, 8995, 5, 12, 9478, 5, 13, 6611, // 4,12
+ 4, 13, 38057, 4, 14, 9597, 5, 13, 10630, 5, 14, 7252, // 4,13
+ 4, 14, 35750, 4, 15, 10111, 5, 14, 11810, 5, 15, 7865, // 4,14
+ 4, 15, 33564, 4, 16, 10528, 5, 15, 13007, 5, 16, 8437, // 4,15
+ 4, 0, 12783, 4, 1, 8135, 5, 0, 34532, 5, 1, 10086, // 5, 0
+ 4, 1, 11507, 4, 2, 7517, 5, 1, 36926, 5, 2, 9586, // 5, 1
+ 4, 2, 10226, 4, 3, 6842, 5, 2, 39503, 5, 3, 8965, // 5, 2
+ 4, 3, 8940, 4, 4, 6116, 5, 3, 42256, 5, 4, 8224, // 5, 3
+ 4, 4, 7667, 4, 5, 5353, 5, 4, 45139, 5, 5, 7377, // 5, 4
+ 4, 5, 6451, 4, 6, 4591, 5, 5, 48019, 5, 6, 6475, // 5, 5
+ 4, 6, 5400, 4, 7, 3911, 5, 6, 50587, 5, 7, 5638, // 5, 6
+ 4, 7, 4708, 4, 8, 3466, 5, 7, 52266, 5, 8, 5096, // 5, 7
+ 5, 8, 52253, 5, 9, 5092, 6, 8, 4721, 6, 9, 3470, // 5, 8
+ 5, 9, 50581, 5, 10, 5624, 6, 9, 5418, 6, 10, 3913, // 5, 9
+ 5, 10, 48019, 5, 11, 6451, 6, 10, 6475, 6, 11, 4591, // 5,10
+ 5, 11, 45146, 5, 12, 7342, 6, 11, 7698, 6, 12, 5350, // 5,11
+ 5, 12, 42271, 5, 13, 8175, 6, 12, 8982, 6, 13, 6108, // 5,12
+ 5, 13, 39526, 5, 14, 8902, 6, 13, 10279, 6, 14, 6829, // 5,13
+ 5, 14, 36955, 5, 15, 9509, 6, 14, 11575, 6, 15, 7497, // 5,14
+ 5, 15, 34567, 5, 16, 9995, 6, 15, 12867, 6, 16, 8107, // 5,15
+ 5, 0, 12717, 5, 1, 7868, 6, 0, 35315, 6, 1, 9636, // 6, 0
+ 5, 1, 11360, 5, 2, 7224, 6, 1, 37866, 6, 2, 9086, // 6, 1
+ 5, 2, 9977, 5, 3, 6506, 6, 2, 40656, 6, 3, 8397, // 6, 2
+ 5, 3, 8558, 5, 4, 5712, 6, 3, 43710, 6, 4, 7556, // 6, 3
+ 5, 4, 7100, 5, 5, 4843, 6, 4, 47035, 6, 5, 6558, // 6, 4
+ 5, 5, 5624, 5, 6, 3913, 6, 5, 50581, 6, 6, 5418, // 6, 5
+ 5, 6, 4217, 5, 7, 2989, 6, 6, 54105, 6, 7, 4225, // 6, 6
+ 5, 7, 3180, 5, 8, 2294, 6, 7, 56756, 6, 8, 3306, // 6, 7
+ 6, 8, 56751, 6, 9, 3303, 7, 8, 3186, 7, 9, 2296, // 6, 8
+ 6, 9, 54105, 6, 10, 4217, 7, 9, 4225, 7, 10, 2989, // 6, 9
+ 6, 10, 50587, 6, 11, 5400, 7, 10, 5637, 7, 11, 3912, // 6,10
+ 6, 11, 47049, 6, 12, 6530, 7, 11, 7119, 7, 12, 4838, // 6,11
+ 6, 12, 43733, 6, 13, 7516, 7, 12, 8584, 7, 13, 5703, // 6,12
+ 6, 13, 40688, 6, 14, 8344, 7, 13, 10013, 7, 14, 6491, // 6,13
+ 6, 14, 37906, 6, 15, 9020, 7, 14, 11407, 7, 15, 7203, // 6,14
+ 6, 15, 35362, 6, 16, 9558, 7, 15, 12777, 7, 16, 7839, // 6,15
+ 6, 0, 12728, 6, 1, 7674, 7, 0, 35844, 7, 1, 9290, // 7, 0
+ 6, 1, 11317, 6, 2, 7020, 7, 1, 38481, 7, 2, 8718, // 7, 1
+ 6, 2, 9867, 6, 3, 6284, 7, 2, 41389, 7, 3, 7996, // 7, 2
+ 6, 3, 8359, 6, 4, 5454, 7, 3, 44616, 7, 4, 7107, // 7, 3
+ 6, 4, 6774, 6, 5, 4521, 7, 4, 48218, 7, 5, 6023, // 7, 4
+ 6, 5, 5092, 6, 6, 3470, 7, 5, 52253, 7, 6, 4721, // 7, 5
+ 6, 6, 3303, 6, 7, 2295, 7, 6, 56751, 7, 7, 3187, // 7, 6
+ 6, 7, 1541, 6, 8, 1090, 7, 7, 61364, 7, 8, 1541, // 7, 7
+ 7, 8, 61364, 7, 9, 1541, 8, 8, 1542, 8, 9, 1089, // 7, 8
+ 7, 9, 56756, 7, 10, 3180, 8, 9, 3306, 8, 10, 2294, // 7, 9
+ 7, 10, 52266, 7, 11, 4708, 8, 10, 5097, 8, 11, 3465, // 7,10
+ 7, 11, 48240, 7, 12, 6000, 8, 11, 6783, 8, 12, 4513, // 7,11
+ 7, 12, 44649, 7, 13, 7072, 8, 12, 8373, 8, 13, 5442, // 7,12
+ 7, 13, 41432, 7, 14, 7951, 8, 13, 9886, 8, 14, 6267, // 7,13
+ 7, 14, 38534, 7, 15, 8662, 8, 14, 11344, 8, 15, 6996, // 7,14
+ 7, 15, 35905, 7, 16, 9224, 8, 15, 12764, 8, 16, 7643, // 7,15
+ 7, -1, 7643, 7, 0, 12764, 8, -1, 9224, 8, 0, 35905, // 8, 0
+ 7, 0, 6997, 7, 1, 11344, 8, 0, 8662, 8, 1, 38533, // 8, 1
+ 7, 1, 6266, 7, 2, 9886, 8, 1, 7951, 8, 2, 41433, // 8, 2
+ 7, 2, 5443, 7, 3, 8373, 8, 2, 7072, 8, 3, 44648, // 8, 3
+ 7, 3, 4513, 7, 4, 6783, 8, 3, 6000, 8, 4, 48240, // 8, 4
+ 7, 4, 3466, 7, 5, 5097, 8, 4, 4708, 8, 5, 52265, // 8, 5
+ 7, 5, 2294, 7, 6, 3306, 8, 5, 3180, 8, 6, 56756, // 8, 6
+ 7, 6, 1090, 7, 7, 1542, 8, 6, 1541, 8, 7, 61363, // 8, 7
+ 8, 7, 1542, 8, 8, 61364, 9, 7, 1090, 9, 8, 1540, // 8, 8
+ 8, 8, 3186, 8, 9, 56751, 9, 8, 2295, 9, 9, 3304, // 8, 9
+ 8, 9, 4721, 8, 10, 52253, 9, 9, 3470, 9, 10, 5092, // 8,10
+ 8, 10, 6023, 8, 11, 48218, 9, 10, 4521, 9, 11, 6774, // 8,11
+ 8, 11, 7106, 8, 12, 44616, 9, 11, 5454, 9, 12, 8360, // 8,12
+ 8, 12, 7996, 8, 13, 41389, 9, 12, 6284, 9, 13, 9867, // 8,13
+ 8, 13, 8718, 8, 14, 38481, 9, 13, 7020, 9, 14, 11317, // 8,14
+ 8, 14, 9290, 8, 15, 35844, 9, 14, 7674, 9, 15, 12728, // 8,15
+ 8, -1, 7839, 8, 0, 12777, 9, -1, 9558, 9, 0, 35362, // 9, 0
+ 8, 0, 7202, 8, 1, 11407, 9, 0, 9020, 9, 1, 37907, // 9, 1
+ 8, 1, 6491, 8, 2, 10013, 9, 1, 8344, 9, 2, 40688, // 9, 2
+ 8, 2, 5703, 8, 3, 8584, 9, 2, 7516, 9, 3, 43733, // 9, 3
+ 8, 3, 4838, 8, 4, 7119, 9, 3, 6530, 9, 4, 47049, // 9, 4
+ 8, 4, 3911, 8, 5, 5637, 9, 4, 5400, 9, 5, 50588, // 9, 5
+ 8, 5, 2989, 8, 6, 4225, 9, 5, 4217, 9, 6, 54105, // 9, 6
+ 8, 6, 2295, 8, 7, 3186, 9, 6, 3303, 9, 7, 56752, // 9, 7
+ 9, 7, 3306, 9, 8, 56756, 10, 7, 2294, 10, 8, 3180, // 9, 8
+ 9, 8, 4225, 9, 9, 54105, 10, 8, 2989, 10, 9, 4217, // 9, 9
+ 9, 9, 5418, 9, 10, 50581, 10, 9, 3913, 10, 10, 5624, // 9,10
+ 9, 10, 6558, 9, 11, 47035, 10, 10, 4843, 10, 11, 7100, // 9,11
+ 9, 11, 7556, 9, 12, 43710, 10, 11, 5712, 10, 12, 8558, // 9,12
+ 9, 12, 8397, 9, 13, 40656, 10, 12, 6506, 10, 13, 9977, // 9,13
+ 9, 13, 9086, 9, 14, 37866, 10, 13, 7224, 10, 14, 11360, // 9,14
+ 9, 14, 9635, 9, 15, 35315, 10, 14, 7868, 10, 15, 12718, // 9,15
+ 9, -1, 8107, 9, 0, 12867, 10, -1, 9995, 10, 0, 34567, // 10, 0
+ 9, 0, 7497, 9, 1, 11575, 10, 0, 9509, 10, 1, 36955, // 10, 1
+ 9, 1, 6829, 9, 2, 10279, 10, 1, 8902, 10, 2, 39526, // 10, 2
+ 9, 2, 6108, 9, 3, 8982, 10, 2, 8175, 10, 3, 42271, // 10, 3
+ 9, 3, 5350, 9, 4, 7698, 10, 3, 7342, 10, 4, 45146, // 10, 4
+ 9, 4, 4591, 9, 5, 6475, 10, 4, 6451, 10, 5, 48019, // 10, 5
+ 9, 5, 3913, 9, 6, 5418, 10, 5, 5624, 10, 6, 50581, // 10, 6
+ 9, 6, 3470, 9, 7, 4721, 10, 6, 5092, 10, 7, 52253, // 10, 7
+ 10, 7, 5097, 10, 8, 52266, 11, 7, 3466, 11, 8, 4707, // 10, 8
+ 10, 8, 5637, 10, 9, 50587, 11, 8, 3911, 11, 9, 5401, // 10, 9
+ 10, 9, 6475, 10, 10, 48019, 11, 9, 4591, 11, 10, 6451, // 10,10
+ 10, 10, 7377, 10, 11, 45139, 11, 10, 5353, 11, 11, 7667, // 10,11
+ 10, 11, 8224, 10, 12, 42256, 11, 11, 6116, 11, 12, 8940, // 10,12
+ 10, 12, 8966, 10, 13, 39503, 11, 12, 6842, 11, 13, 10225, // 10,13
+ 10, 13, 9587, 10, 14, 36926, 11, 13, 7517, 11, 14, 11506, // 10,14
+ 10, 14, 10086, 10, 15, 34532, 11, 14, 8135, 11, 15, 12783, // 10,15
+ 10, -1, 8438, 10, 0, 13007, 11, -1, 10528, 11, 0, 33563, // 11, 0
+ 10, 0, 7865, 10, 1, 11810, 11, 0, 10111, 11, 1, 35750, // 11, 1
+ 10, 1, 7252, 10, 2, 10630, 11, 1, 9597, 11, 2, 38057, // 11, 2
+ 10, 2, 6611, 10, 3, 9478, 11, 2, 8995, 11, 3, 40452, // 11, 3
+ 10, 3, 5965, 10, 4, 8378, 11, 3, 8332, 11, 4, 42861, // 11, 4
+ 10, 4, 5353, 10, 5, 7377, 11, 4, 7667, 11, 5, 45139, // 11, 5
+ 10, 5, 4843, 10, 6, 6558, 11, 5, 7100, 11, 6, 47035, // 11, 6
+ 10, 6, 4521, 10, 7, 6023, 11, 6, 6774, 11, 7, 48218, // 11, 7
+ 11, 7, 6783, 11, 8, 48240, 12, 7, 4513, 12, 8, 6000, // 11, 8
+ 11, 8, 7119, 11, 9, 47049, 12, 8, 4838, 12, 9, 6530, // 11, 9
+ 11, 9, 7698, 11, 10, 45146, 12, 9, 5350, 12, 10, 7342, // 11,10
+ 11, 10, 8378, 11, 11, 42861, 12, 10, 5965, 12, 11, 8332, // 11,11
+ 11, 11, 9056, 11, 12, 40444, 12, 11, 6615, 12, 12, 9421, // 11,12
+ 11, 12, 9674, 11, 13, 38042, 12, 12, 7261, 12, 13, 10559, // 11,13
+ 11, 13, 10204, 11, 14, 35730, 12, 13, 7881, 12, 14, 11721, // 11,14
+ 11, 14, 10635, 11, 15, 33539, 12, 14, 8463, 12, 15, 12899, // 11,15
+ 11, -1, 8816, 11, 0, 13171, 12, -1, 11143, 12, 0, 32406, // 12, 0
+ 11, 0, 8284, 11, 1, 12074, 12, 0, 10808, 12, 1, 34370, // 12, 1
+ 11, 1, 7728, 11, 2, 11012, 12, 1, 10397, 12, 2, 36399, // 12, 2
+ 11, 2, 7164, 11, 3, 9998, 12, 2, 9924, 12, 3, 38450, // 12, 3
+ 11, 3, 6615, 11, 4, 9056, 12, 3, 9421, 12, 4, 40444, // 12, 4
+ 11, 4, 6116, 11, 5, 8224, 12, 4, 8940, 12, 5, 42256, // 12, 5
+ 11, 5, 5712, 11, 6, 7556, 12, 5, 8558, 12, 6, 43710, // 12, 6
+ 11, 6, 5454, 11, 7, 7106, 12, 6, 8359, 12, 7, 44617, // 12, 7
+ 12, 7, 8373, 12, 8, 44649, 13, 7, 5443, 13, 8, 7071, // 12, 8
+ 12, 8, 8584, 12, 9, 43733, 13, 8, 5703, 13, 9, 7516, // 12, 9
+ 12, 9, 8982, 12, 10, 42271, 13, 9, 6108, 13, 10, 8175, // 12,10
+ 12, 10, 9478, 12, 11, 40452, 13, 10, 6611, 13, 11, 8995, // 12,11
+ 12, 11, 9998, 12, 12, 38450, 13, 11, 7164, 13, 12, 9924, // 12,12
+ 12, 12, 10488, 12, 13, 36392, 13, 12, 7734, 13, 13, 10922, // 12,13
+ 12, 13, 10918, 12, 14, 34358, 13, 13, 8296, 13, 14, 11964, // 12,14
+ 12, 14, 11269, 12, 15, 32391, 13, 14, 8838, 13, 15, 13038, // 12,15
+ 12, -1, 9229, 12, 0, 13332, 13, -1, 11829, 13, 0, 31146, // 13, 0
+ 12, 0, 8735, 12, 1, 12334, 13, 0, 11580, 13, 1, 32887, // 13, 1
+ 12, 1, 8232, 12, 2, 11382, 13, 1, 11272, 13, 2, 34650, // 13, 2
+ 12, 2, 7734, 12, 3, 10488, 13, 2, 10922, 13, 3, 36392, // 13, 3
+ 12, 3, 7261, 12, 4, 9674, 13, 3, 10559, 13, 4, 38042, // 13, 4
+ 12, 4, 6842, 12, 5, 8966, 13, 4, 10226, 13, 5, 39502, // 13, 5
+ 12, 5, 6506, 12, 6, 8397, 13, 5, 9977, 13, 6, 40656, // 13, 6
+ 12, 6, 6284, 12, 7, 7996, 13, 6, 9867, 13, 7, 41389, // 13, 7
+ 13, 7, 9886, 13, 8, 41432, 14, 7, 6266, 14, 8, 7952, // 13, 8
+ 13, 8, 10013, 13, 9, 40688, 14, 8, 6491, 14, 9, 8344, // 13, 9
+ 13, 9, 10279, 13, 10, 39526, 14, 9, 6829, 14, 10, 8902, // 13,10
+ 13, 10, 10630, 13, 11, 38057, 14, 10, 7252, 14, 11, 9597, // 13,11
+ 13, 11, 11012, 13, 12, 36399, 14, 11, 7728, 14, 12, 10397, // 13,12
+ 13, 12, 11382, 13, 13, 34650, 14, 12, 8232, 14, 13, 11272, // 13,13
+ 13, 13, 11709, 13, 14, 32881, 14, 13, 8742, 14, 14, 12204, // 13,14
+ 13, 14, 11977, 13, 15, 31138, 14, 14, 9245, 14, 15, 13176, // 13,15
+ 13, -1, 9662, 13, 0, 13470, 14, -1, 12574, 14, 0, 29830, // 14, 0
+ 13, 0, 9202, 13, 1, 12564, 14, 0, 12412, 14, 1, 31358, // 14, 1
+ 13, 1, 8742, 13, 2, 11709, 14, 1, 12203, 14, 2, 32882, // 14, 2
+ 13, 2, 8296, 13, 3, 10918, 14, 2, 11964, 14, 3, 34358, // 14, 3
+ 13, 3, 7881, 13, 4, 10204, 14, 3, 11721, 14, 4, 35730, // 14, 4
+ 13, 4, 7517, 13, 5, 9587, 14, 4, 11507, 14, 5, 36925, // 14, 5
+ 13, 5, 7224, 13, 6, 9086, 14, 5, 11360, 14, 6, 37866, // 14, 6
+ 13, 6, 7020, 13, 7, 8718, 14, 6, 11317, 14, 7, 38481, // 14, 7
+ 14, 7, 11344, 14, 8, 38534, 15, 7, 6997, 15, 8, 8661, // 14, 8
+ 14, 8, 11407, 14, 9, 37906, 15, 8, 7202, 15, 9, 9021, // 14, 9
+ 14, 9, 11575, 14, 10, 36955, 15, 9, 7497, 15, 10, 9509, // 14,10
+ 14, 10, 11810, 14, 11, 35750, 15, 10, 7865, 15, 11, 10111, // 14,11
+ 14, 11, 12074, 14, 12, 34369, 15, 11, 8284, 15, 12, 10809, // 14,12
+ 14, 12, 12334, 14, 13, 32886, 15, 12, 8735, 15, 13, 11581, // 14,13
+ 14, 13, 12564, 14, 14, 31358, 15, 13, 9202, 15, 14, 12412, // 14,14
+ 14, 14, 12746, 14, 15, 29828, 15, 14, 9671, 15, 15, 13291, // 14,15
+ 14, -1, 10104, 14, 0, 13569, 15, -1, 13368, 15, 0, 28495, // 15, 0
+ 14, 0, 9671, 14, 1, 12746, 15, 0, 13291, 15, 1, 29828, // 15, 1
+ 14, 1, 9245, 14, 2, 11977, 15, 1, 13176, 15, 2, 31138, // 15, 2
+ 14, 2, 8838, 14, 3, 11269, 15, 2, 13038, 15, 3, 32391, // 15, 3
+ 14, 3, 8463, 14, 4, 10635, 15, 3, 12899, 15, 4, 33539, // 15, 4
+ 14, 4, 8135, 14, 5, 10086, 15, 4, 12783, 15, 5, 34532, // 15, 5
+ 14, 5, 7868, 14, 6, 9635, 15, 5, 12717, 15, 6, 35316, // 15, 6
+ 14, 6, 7674, 14, 7, 9290, 15, 6, 12728, 15, 7, 35844, // 15, 7
+ 15, 7, 12764, 15, 8, 35905, 16, 7, 7643, 16, 8, 9224, // 15, 8
+ 15, 8, 12777, 15, 9, 35362, 16, 8, 7839, 16, 9, 9558, // 15, 9
+ 15, 9, 12867, 15, 10, 34567, 16, 9, 8107, 16, 10, 9995, // 15,10
+ 15, 10, 13007, 15, 11, 33564, 16, 10, 8438, 16, 11, 10527, // 15,11
+ 15, 11, 13171, 15, 12, 32406, 16, 11, 8816, 16, 12, 11143, // 15,12
+ 15, 12, 13332, 15, 13, 31146, 16, 12, 9229, 16, 13, 11829, // 15,13
+ 15, 13, 13470, 15, 14, 29831, 16, 13, 9662, 16, 14, 12573, // 15,14
+ 15, 14, 13569, 15, 15, 28495, 16, 14, 10104, 16, 15, 13368, // 15,15
+ // angle of -1.5 degrees
+ -1, 0, 11440, -1, 1, 8358, 0, 0, 34212, 0, 1, 11526, // 0, 0
+ -1, 1, 10780, -1, 2, 7983, 0, 1, 35506, 0, 2, 11267, // 0, 1
+ -1, 2, 10158, -1, 3, 7620, 0, 2, 36764, 0, 3, 10994, // 0, 2
+ -1, 3, 9585, -1, 4, 7276, 0, 3, 37951, 0, 4, 10724, // 0, 3
+ -1, 4, 9072, -1, 5, 6965, 0, 4, 39026, 0, 5, 10473, // 0, 4
+ -1, 5, 8632, -1, 6, 6699, 0, 5, 39940, 0, 6, 10265, // 0, 5
+ -1, 6, 8278, -1, 7, 6489, 0, 6, 40646, 0, 7, 10123, // 0, 6
+ -1, 7, 8018, -1, 8, 6346, 0, 7, 41106, 0, 8, 10066, // 0, 7
+ 0, 8, 41072, 0, 9, 10052, 1, 8, 8052, 1, 9, 6360, // 0, 8
+ 0, 9, 40618, 0, 10, 10100, 1, 9, 8316, 1, 10, 6502, // 0, 9
+ 0, 10, 39918, 0, 11, 10232, 1, 10, 8676, 1, 11, 6710, // 0,10
+ 0, 11, 39009, 0, 12, 10430, 1, 11, 9122, 1, 12, 6975, // 0,11
+ 0, 12, 37939, 0, 13, 10670, 1, 12, 9642, 1, 13, 7285, // 0,12
+ 0, 13, 36756, 0, 14, 10930, 1, 13, 10224, 1, 14, 7626, // 0,13
+ 0, 14, 35502, 0, 15, 11192, 1, 14, 10855, 1, 15, 7987, // 0,14
+ 0, 15, 34212, 0, 16, 11440, 1, 15, 11526, 1, 16, 8358, // 0,15
+ 0, 0, 11192, 0, 1, 7987, 1, 0, 35502, 1, 1, 10855, // 1, 0
+ 0, 1, 10467, 0, 2, 7579, 1, 1, 36959, 1, 2, 10531, // 1, 1
+ 0, 2, 9777, 0, 3, 7177, 1, 2, 38394, 1, 3, 10188, // 1, 2
+ 0, 3, 9135, 0, 4, 6792, 1, 3, 39767, 1, 4, 9842, // 1, 3
+ 0, 4, 8557, 0, 5, 6440, 1, 4, 41026, 1, 5, 9513, // 1, 4
+ 0, 5, 8061, 0, 6, 6137, 1, 5, 42105, 1, 6, 9233, // 1, 5
+ 0, 6, 7667, 0, 7, 5900, 1, 6, 42936, 1, 7, 9033, // 1, 6
+ 0, 7, 7390, 0, 8, 5745, 1, 7, 43461, 1, 8, 8940, // 1, 7
+ 1, 8, 43433, 1, 9, 8929, 2, 8, 7418, 2, 9, 5756, // 1, 8
+ 1, 9, 42913, 1, 10, 9014, 2, 9, 7699, 2, 10, 5910, // 1, 9
+ 1, 10, 42087, 1, 11, 9206, 2, 10, 8098, 2, 11, 6145, // 1,10
+ 1, 11, 41013, 1, 12, 9478, 2, 11, 8599, 2, 12, 6446, // 1,11
+ 1, 12, 39759, 1, 13, 9796, 2, 12, 9184, 2, 13, 6797, // 1,12
+ 1, 13, 38390, 1, 14, 10133, 2, 13, 9834, 2, 14, 7179, // 1,13
+ 1, 14, 36959, 1, 15, 10467, 2, 14, 10532, 2, 15, 7578, // 1,14
+ 1, 15, 35506, 1, 16, 10780, 2, 15, 11267, 2, 16, 7983, // 1,15
+ 1, 0, 10930, 1, 1, 7626, 2, 0, 36756, 2, 1, 10224, // 2, 0
+ 1, 1, 10133, 1, 2, 7179, 2, 1, 38390, 2, 2, 9834, // 2, 1
+ 1, 2, 9366, 1, 3, 6732, 2, 2, 40025, 2, 3, 9413, // 2, 2
+ 1, 3, 8641, 1, 4, 6297, 2, 3, 41618, 2, 4, 8980, // 2, 3
+ 1, 4, 7981, 1, 5, 5891, 2, 4, 43105, 2, 5, 8559, // 2, 4
+ 1, 5, 7411, 1, 6, 5537, 2, 5, 44399, 2, 6, 8189, // 2, 5
+ 1, 6, 6961, 1, 7, 5261, 2, 6, 45401, 2, 7, 7913, // 2, 6
+ 1, 7, 6658, 1, 8, 5087, 2, 7, 46017, 2, 8, 7774, // 2, 7
+ 2, 8, 45995, 2, 9, 7766, 3, 8, 6680, 3, 9, 5095, // 2, 8
+ 2, 9, 45383, 2, 10, 7899, 3, 9, 6986, 3, 10, 5268, // 2, 9
+ 2, 10, 44386, 2, 11, 8167, 3, 10, 7440, 3, 11, 5543, // 2,10
+ 2, 11, 43096, 2, 12, 8530, 3, 11, 8015, 3, 12, 5895, // 2,11
+ 2, 12, 41614, 2, 13, 8941, 3, 12, 8681, 3, 13, 6300, // 2,12
+ 2, 13, 40025, 2, 14, 9366, 3, 13, 9413, 3, 14, 6732, // 2,13
+ 2, 14, 38394, 2, 15, 9777, 3, 14, 10188, 3, 15, 7177, // 2,14
+ 2, 15, 36764, 2, 16, 10158, 3, 15, 10994, 3, 16, 7620, // 2,15
+ 2, 0, 10670, 2, 1, 7285, 3, 0, 37939, 3, 1, 9642, // 3, 0
+ 2, 1, 9796, 2, 2, 6797, 3, 1, 39759, 3, 2, 9184, // 3, 1
+ 2, 2, 8941, 2, 3, 6299, 3, 2, 41614, 3, 3, 8682, // 3, 2
+ 2, 3, 8120, 2, 4, 5804, 3, 3, 43461, 3, 4, 8151, // 3, 3
+ 2, 4, 7356, 2, 5, 5330, 3, 4, 45229, 3, 5, 7621, // 3, 4
+ 2, 5, 6685, 2, 6, 4906, 3, 5, 46806, 3, 6, 7139, // 3, 5
+ 2, 6, 6154, 2, 7, 4572, 3, 6, 48049, 3, 7, 6761, // 3, 6
+ 2, 7, 5811, 2, 8, 4366, 3, 7, 48801, 3, 8, 6558, // 3, 7
+ 3, 8, 48785, 3, 9, 6552, 4, 8, 5827, 4, 9, 4372, // 3, 8
+ 3, 9, 48037, 3, 10, 6750, 4, 9, 6173, 4, 10, 4576, // 3, 9
+ 3, 10, 46798, 3, 11, 7121, 4, 10, 6707, 4, 11, 4910, // 3,10
+ 3, 11, 45224, 3, 12, 7598, 4, 11, 7382, 4, 12, 5332, // 3,11
+ 3, 12, 43461, 3, 13, 8120, 4, 12, 8151, 4, 13, 5804, // 3,12
+ 3, 13, 41618, 3, 14, 8641, 4, 13, 8979, 4, 14, 6298, // 3,13
+ 3, 14, 39767, 3, 15, 9135, 4, 14, 9841, 4, 15, 6793, // 3,14
+ 3, 15, 37951, 3, 16, 9585, 4, 15, 10723, 4, 16, 7277, // 3,15
+ 3, 0, 10430, 3, 1, 6975, 4, 0, 39009, 4, 1, 9122, // 4, 0
+ 3, 1, 9478, 3, 2, 6447, 4, 1, 41013, 4, 2, 8598, // 4, 1
+ 3, 2, 8530, 3, 3, 5895, 4, 2, 43096, 4, 3, 8015, // 4, 2
+ 3, 3, 7598, 3, 4, 5331, 4, 3, 45224, 4, 4, 7383, // 4, 3
+ 3, 4, 6708, 3, 5, 4774, 4, 4, 47328, 4, 5, 6726, // 4, 4
+ 3, 5, 5901, 3, 6, 4257, 4, 5, 49279, 4, 6, 6099, // 4, 5
+ 3, 6, 5248, 3, 7, 3834, 4, 6, 50873, 4, 7, 5581, // 4, 6
+ 3, 7, 4835, 3, 8, 3575, 4, 7, 51842, 4, 8, 5284, // 4, 7
+ 4, 8, 51832, 4, 9, 5280, 5, 8, 4846, 5, 9, 3578, // 4, 8
+ 4, 9, 50865, 4, 10, 5573, 5, 9, 5261, 5, 10, 3837, // 4, 9
+ 4, 10, 49275, 4, 11, 6086, 5, 10, 5917, 5, 11, 4258, // 4,10
+ 4, 11, 47328, 4, 12, 6708, 5, 11, 6727, 5, 12, 4773, // 4,11
+ 4, 12, 45229, 4, 13, 7356, 5, 12, 7622, 5, 13, 5329, // 4,12
+ 4, 13, 43105, 4, 14, 7981, 5, 13, 8559, 5, 14, 5891, // 4,13
+ 4, 14, 41026, 4, 15, 8557, 5, 14, 9513, 5, 15, 6440, // 4,14
+ 4, 15, 39026, 4, 16, 9072, 5, 15, 10473, 5, 16, 6965, // 4,15
+ 4, 0, 10232, 4, 1, 6710, 5, 0, 39918, 5, 1, 8676, // 5, 0
+ 4, 1, 9206, 4, 2, 6145, 5, 1, 42087, 5, 2, 8098, // 5, 1
+ 4, 2, 8167, 4, 3, 5543, 5, 2, 44386, 5, 3, 7440, // 5, 2
+ 4, 3, 7121, 4, 4, 4909, 5, 3, 46798, 5, 4, 6708, // 5, 3
+ 4, 4, 6086, 4, 5, 4258, 5, 4, 49275, 5, 5, 5917, // 5, 4
+ 4, 5, 5103, 4, 6, 3621, 5, 5, 51700, 5, 6, 5112, // 5, 5
+ 4, 6, 4262, 4, 7, 3064, 5, 6, 53816, 5, 7, 4394, // 5, 6
+ 4, 7, 3720, 4, 8, 2708, 5, 7, 55168, 5, 8, 3940, // 5, 7
+ 5, 8, 55162, 5, 9, 3938, 6, 8, 3726, 6, 9, 2710, // 5, 8
+ 5, 9, 53813, 5, 10, 4388, 6, 9, 4269, 6, 10, 3066, // 5, 9
+ 5, 10, 51700, 5, 11, 5103, 6, 10, 5113, 6, 11, 3620, // 5,10
+ 5, 11, 49279, 5, 12, 5901, 6, 11, 6099, 6, 12, 4257, // 5,11
+ 5, 12, 46806, 5, 13, 6685, 6, 12, 7138, 6, 13, 4907, // 5,12
+ 5, 13, 44399, 5, 14, 7411, 6, 13, 8189, 6, 14, 5537, // 5,13
+ 5, 14, 42105, 5, 15, 8061, 6, 14, 9233, 6, 15, 6137, // 5,14
+ 5, 15, 39940, 5, 16, 8632, 6, 15, 10265, 6, 16, 6699, // 5,15
+ 5, 0, 10100, 5, 1, 6502, 6, 0, 40618, 6, 1, 8316, // 6, 0
+ 5, 1, 9014, 5, 2, 5910, 6, 1, 42913, 6, 2, 7699, // 6, 1
+ 5, 2, 7899, 5, 3, 5268, 6, 2, 45383, 6, 3, 6986, // 6, 2
+ 5, 3, 6750, 5, 4, 4576, 6, 3, 48037, 6, 4, 6173, // 6, 3
+ 5, 4, 5573, 5, 5, 3837, 6, 4, 50865, 6, 5, 5261, // 6, 4
+ 5, 5, 4388, 5, 6, 3065, 6, 5, 53813, 6, 6, 4270, // 6, 5
+ 5, 6, 3271, 5, 7, 2316, 6, 6, 56673, 6, 7, 3276, // 6, 6
+ 5, 7, 2462, 5, 8, 1766, 6, 7, 58775, 6, 8, 2533, // 6, 7
+ 6, 8, 58773, 6, 9, 2532, 7, 8, 2464, 7, 9, 1767, // 6, 8
+ 6, 9, 56673, 6, 10, 3271, 7, 9, 3275, 7, 10, 2317, // 6, 9
+ 6, 10, 53816, 6, 11, 4262, 7, 10, 4394, 7, 11, 3064, // 6,10
+ 6, 11, 50873, 6, 12, 5248, 7, 11, 5581, 7, 12, 3834, // 6,11
+ 6, 12, 48049, 6, 13, 6154, 7, 12, 6761, 7, 13, 4572, // 6,12
+ 6, 13, 45401, 6, 14, 6961, 7, 13, 7913, 7, 14, 5261, // 6,13
+ 6, 14, 42936, 6, 15, 7667, 7, 14, 9032, 7, 15, 5901, // 6,14
+ 6, 15, 40646, 6, 16, 8278, 7, 15, 10123, 7, 16, 6489, // 6,15
+ 6, 0, 10052, 6, 1, 6360, 7, 0, 41072, 7, 1, 8052, // 7, 0
+ 6, 1, 8929, 6, 2, 5756, 7, 1, 43433, 7, 2, 7418, // 7, 1
+ 6, 2, 7766, 6, 3, 5095, 7, 2, 45995, 7, 3, 6680, // 7, 2
+ 6, 3, 6552, 6, 4, 4372, 7, 3, 48785, 7, 4, 5827, // 7, 3
+ 6, 4, 5280, 6, 5, 3579, 7, 4, 51832, 7, 5, 4845, // 7, 4
+ 6, 5, 3938, 6, 6, 2710, 7, 5, 55162, 7, 6, 3726, // 7, 5
+ 6, 6, 2532, 6, 7, 1767, 7, 6, 58773, 7, 7, 2464, // 7, 6
+ 6, 7, 1170, 6, 8, 827, 7, 7, 62369, 7, 8, 1170, // 7, 7
+ 7, 8, 62369, 7, 9, 1170, 8, 8, 1170, 8, 9, 827, // 7, 8
+ 7, 9, 58775, 7, 10, 2462, 8, 9, 2533, 8, 10, 1766, // 7, 9
+ 7, 10, 55168, 7, 11, 3720, 8, 10, 3940, 8, 11, 2708, // 7,10
+ 7, 11, 51842, 7, 12, 4835, 8, 11, 5283, 8, 12, 3576, // 7,11
+ 7, 12, 48801, 7, 13, 5811, 8, 12, 6558, 8, 13, 4366, // 7,12
+ 7, 13, 46017, 7, 14, 6658, 8, 13, 7773, 8, 14, 5088, // 7,13
+ 7, 14, 43461, 7, 15, 7390, 8, 14, 8939, 8, 15, 5746, // 7,14
+ 7, 15, 41106, 7, 16, 8018, 8, 15, 10066, 8, 16, 6346, // 7,15
+ 7, -1, 6346, 7, 0, 10066, 8, -1, 8018, 8, 0, 41106, // 8, 0
+ 7, 0, 5745, 7, 1, 8939, 8, 0, 7390, 8, 1, 43462, // 8, 1
+ 7, 1, 5087, 7, 2, 7773, 8, 1, 6658, 8, 2, 46018, // 8, 2
+ 7, 2, 4366, 7, 3, 6558, 8, 2, 5811, 8, 3, 48801, // 8, 3
+ 7, 3, 3575, 7, 4, 5283, 8, 3, 4835, 8, 4, 51843, // 8, 4
+ 7, 4, 2708, 7, 5, 3940, 8, 4, 3720, 8, 5, 55168, // 8, 5
+ 7, 5, 1766, 7, 6, 2533, 8, 5, 2462, 8, 6, 58775, // 8, 6
+ 7, 6, 827, 7, 7, 1170, 8, 6, 1170, 8, 7, 62369, // 8, 7
+ 8, 7, 1170, 8, 8, 62369, 9, 7, 827, 9, 8, 1170, // 8, 8
+ 8, 8, 2464, 8, 9, 58773, 9, 8, 1767, 9, 9, 2532, // 8, 9
+ 8, 9, 3726, 8, 10, 55162, 9, 9, 2710, 9, 10, 3938, // 8,10
+ 8, 10, 4846, 8, 11, 51832, 9, 10, 3579, 9, 11, 5279, // 8,11
+ 8, 11, 5827, 8, 12, 48785, 9, 11, 4372, 9, 12, 6552, // 8,12
+ 8, 12, 6680, 8, 13, 45995, 9, 12, 5095, 9, 13, 7766, // 8,13
+ 8, 13, 7418, 8, 14, 43433, 9, 13, 5756, 9, 14, 8929, // 8,14
+ 8, 14, 8052, 8, 15, 41072, 9, 14, 6360, 9, 15, 10052, // 8,15
+ 8, -1, 6489, 8, 0, 10123, 9, -1, 8278, 9, 0, 40646, // 9, 0
+ 8, 0, 5900, 8, 1, 9032, 9, 0, 7667, 9, 1, 42937, // 9, 1
+ 8, 1, 5261, 8, 2, 7913, 9, 1, 6961, 9, 2, 45401, // 9, 2
+ 8, 2, 4572, 8, 3, 6761, 9, 2, 6154, 9, 3, 48049, // 9, 3
+ 8, 3, 3834, 8, 4, 5581, 9, 3, 5248, 9, 4, 50873, // 9, 4
+ 8, 4, 3064, 8, 5, 4394, 9, 4, 4262, 9, 5, 53816, // 9, 5
+ 8, 5, 2316, 8, 6, 3275, 9, 5, 3271, 9, 6, 56674, // 9, 6
+ 8, 6, 1767, 8, 7, 2464, 9, 6, 2532, 9, 7, 58773, // 9, 7
+ 9, 7, 2533, 9, 8, 58775, 10, 7, 1766, 10, 8, 2462, // 9, 8
+ 9, 8, 3275, 9, 9, 56673, 10, 8, 2316, 10, 9, 3272, // 9, 9
+ 9, 9, 4269, 9, 10, 53813, 10, 9, 3065, 10, 10, 4389, // 9,10
+ 9, 10, 5261, 9, 11, 50865, 10, 10, 3837, 10, 11, 5573, // 9,11
+ 9, 11, 6173, 9, 12, 48037, 10, 11, 4576, 10, 12, 6750, // 9,12
+ 9, 12, 6986, 9, 13, 45383, 10, 12, 5268, 10, 13, 7899, // 9,13
+ 9, 13, 7699, 9, 14, 42913, 10, 13, 5910, 10, 14, 9014, // 9,14
+ 9, 14, 8316, 9, 15, 40618, 10, 14, 6502, 10, 15, 10100, // 9,15
+ 9, -1, 6699, 9, 0, 10265, 10, -1, 8632, 10, 0, 39940, // 10, 0
+ 9, 0, 6137, 9, 1, 9233, 10, 0, 8061, 10, 1, 42105, // 10, 1
+ 9, 1, 5537, 9, 2, 8189, 10, 1, 7411, 10, 2, 44399, // 10, 2
+ 9, 2, 4906, 9, 3, 7138, 10, 2, 6685, 10, 3, 46807, // 10, 3
+ 9, 3, 4257, 9, 4, 6099, 10, 3, 5901, 10, 4, 49279, // 10, 4
+ 9, 4, 3621, 9, 5, 5113, 10, 4, 5103, 10, 5, 51699, // 10, 5
+ 9, 5, 3065, 9, 6, 4269, 10, 5, 4388, 10, 6, 53814, // 10, 6
+ 9, 6, 2710, 9, 7, 3726, 10, 6, 3938, 10, 7, 55162, // 10, 7
+ 10, 7, 3940, 10, 8, 55168, 11, 7, 2708, 11, 8, 3720, // 10, 8
+ 10, 8, 4394, 10, 9, 53816, 11, 8, 3064, 11, 9, 4262, // 10, 9
+ 10, 9, 5113, 10, 10, 51700, 11, 9, 3621, 11, 10, 5102, // 10,10
+ 10, 10, 5917, 10, 11, 49275, 11, 10, 4258, 11, 11, 6086, // 10,11
+ 10, 11, 6707, 10, 12, 46798, 11, 11, 4909, 11, 12, 7122, // 10,12
+ 10, 12, 7440, 10, 13, 44386, 11, 12, 5543, 11, 13, 8167, // 10,13
+ 10, 13, 8098, 10, 14, 42087, 11, 13, 6145, 11, 14, 9206, // 10,14
+ 10, 14, 8676, 10, 15, 39918, 11, 14, 6710, 11, 15, 10232, // 10,15
+ 10, -1, 6965, 10, 0, 10473, 11, -1, 9072, 11, 0, 39026, // 11, 0
+ 10, 0, 6440, 10, 1, 9513, 11, 0, 8557, 11, 1, 41026, // 11, 1
+ 10, 1, 5891, 10, 2, 8559, 11, 1, 7981, 11, 2, 43105, // 11, 2
+ 10, 2, 5330, 10, 3, 7622, 11, 2, 7356, 11, 3, 45228, // 11, 3
+ 10, 3, 4774, 10, 4, 6727, 11, 3, 6708, 11, 4, 47327, // 11, 4
+ 10, 4, 4258, 10, 5, 5917, 11, 4, 6086, 11, 5, 49275, // 11, 5
+ 10, 5, 3837, 10, 6, 5261, 11, 5, 5573, 11, 6, 50865, // 11, 6
+ 10, 6, 3579, 10, 7, 4846, 11, 6, 5280, 11, 7, 51831, // 11, 7
+ 11, 7, 5283, 11, 8, 51842, 12, 7, 3575, 12, 8, 4836, // 11, 8
+ 11, 8, 5581, 11, 9, 50873, 12, 8, 3834, 12, 9, 5248, // 11, 9
+ 11, 9, 6099, 11, 10, 49279, 12, 9, 4257, 12, 10, 5901, // 11,10
+ 11, 10, 6727, 11, 11, 47328, 12, 10, 4774, 12, 11, 6707, // 11,11
+ 11, 11, 7382, 11, 12, 45224, 12, 11, 5331, 12, 12, 7599, // 11,12
+ 11, 12, 8015, 11, 13, 43096, 12, 12, 5895, 12, 13, 8530, // 11,13
+ 11, 13, 8599, 11, 14, 41013, 12, 13, 6447, 12, 14, 9477, // 11,14
+ 11, 14, 9122, 11, 15, 39009, 12, 14, 6975, 12, 15, 10430, // 11,15
+ 11, -1, 7276, 11, 0, 10723, 12, -1, 9585, 12, 0, 37952, // 12, 0
+ 11, 0, 6792, 11, 1, 9841, 12, 0, 9135, 12, 1, 39768, // 12, 1
+ 11, 1, 6297, 11, 2, 8979, 12, 1, 8641, 12, 2, 41619, // 12, 2
+ 11, 2, 5804, 11, 3, 8151, 12, 2, 8120, 12, 3, 43461, // 12, 3
+ 11, 3, 5331, 11, 4, 7382, 12, 3, 7598, 12, 4, 45225, // 12, 4
+ 11, 4, 4909, 11, 5, 6707, 12, 4, 7121, 12, 5, 46799, // 12, 5
+ 11, 5, 4576, 11, 6, 6173, 12, 5, 6750, 12, 6, 48037, // 12, 6
+ 11, 6, 4372, 11, 7, 5827, 12, 6, 6552, 12, 7, 48785, // 12, 7
+ 12, 7, 6558, 12, 8, 48801, 13, 7, 4366, 13, 8, 5811, // 12, 8
+ 12, 8, 6761, 12, 9, 48049, 13, 8, 4572, 13, 9, 6154, // 12, 9
+ 12, 9, 7138, 12, 10, 46806, 13, 9, 4906, 13, 10, 6686, // 12,10
+ 12, 10, 7622, 12, 11, 45229, 13, 10, 5330, 13, 11, 7355, // 12,11
+ 12, 11, 8151, 12, 12, 43461, 13, 11, 5804, 13, 12, 8120, // 12,12
+ 12, 12, 8681, 12, 13, 41614, 13, 12, 6299, 13, 13, 8942, // 12,13
+ 12, 13, 9184, 12, 14, 39759, 13, 13, 6797, 13, 14, 9796, // 12,14
+ 12, 14, 9642, 12, 15, 37939, 13, 14, 7285, 13, 15, 10670, // 12,15
+ 12, -1, 7620, 12, 0, 10994, 13, -1, 10158, 13, 0, 36764, // 13, 0
+ 12, 0, 7177, 12, 1, 10188, 13, 0, 9777, 13, 1, 38394, // 13, 1
+ 12, 1, 6732, 12, 2, 9413, 13, 1, 9366, 13, 2, 40025, // 13, 2
+ 12, 2, 6299, 12, 3, 8681, 13, 2, 8941, 13, 3, 41615, // 13, 3
+ 12, 3, 5895, 12, 4, 8015, 13, 3, 8530, 13, 4, 43096, // 13, 4
+ 12, 4, 5543, 12, 5, 7440, 13, 4, 8167, 13, 5, 44386, // 13, 5
+ 12, 5, 5268, 12, 6, 6986, 13, 5, 7899, 13, 6, 45383, // 13, 6
+ 12, 6, 5095, 12, 7, 6680, 13, 6, 7766, 13, 7, 45995, // 13, 7
+ 13, 7, 7773, 13, 8, 46017, 14, 7, 5087, 14, 8, 6659, // 13, 8
+ 13, 8, 7913, 13, 9, 45401, 14, 8, 5261, 14, 9, 6961, // 13, 9
+ 13, 9, 8189, 13, 10, 44399, 14, 9, 5537, 14, 10, 7411, // 13,10
+ 13, 10, 8559, 13, 11, 43105, 14, 10, 5891, 14, 11, 7981, // 13,11
+ 13, 11, 8979, 13, 12, 41618, 14, 11, 6297, 14, 12, 8642, // 13,12
+ 13, 12, 9413, 13, 13, 40025, 14, 12, 6732, 14, 13, 9366, // 13,13
+ 13, 13, 9834, 13, 14, 38390, 14, 13, 7179, 14, 14, 10133, // 13,14
+ 13, 14, 10224, 13, 15, 36756, 14, 14, 7626, 14, 15, 10930, // 13,15
+ 13, -1, 7983, 13, 0, 11267, 14, -1, 10780, 14, 0, 35506, // 14, 0
+ 13, 0, 7579, 13, 1, 10532, 14, 0, 10467, 14, 1, 36958, // 14, 1
+ 13, 1, 7179, 13, 2, 9834, 14, 1, 10133, 14, 2, 38390, // 14, 2
+ 13, 2, 6797, 13, 3, 9184, 14, 2, 9796, 14, 3, 39759, // 14, 3
+ 13, 3, 6447, 13, 4, 8599, 14, 3, 9478, 14, 4, 41012, // 14, 4
+ 13, 4, 6145, 13, 5, 8098, 14, 4, 9206, 14, 5, 42087, // 14, 5
+ 13, 5, 5910, 13, 6, 7699, 14, 5, 9014, 14, 6, 42913, // 14, 6
+ 13, 6, 5756, 13, 7, 7418, 14, 6, 8929, 14, 7, 43433, // 14, 7
+ 14, 7, 8939, 14, 8, 43461, 15, 7, 5745, 15, 8, 7391, // 14, 8
+ 14, 8, 9032, 14, 9, 42936, 15, 8, 5900, 15, 9, 7668, // 14, 9
+ 14, 9, 9233, 14, 10, 42105, 15, 9, 6137, 15, 10, 8061, // 14,10
+ 14, 10, 9513, 14, 11, 41026, 15, 10, 6440, 15, 11, 8557, // 14,11
+ 14, 11, 9841, 14, 12, 39767, 15, 11, 6792, 15, 12, 9136, // 14,12
+ 14, 12, 10188, 14, 13, 38394, 15, 12, 7177, 15, 13, 9777, // 14,13
+ 14, 13, 10532, 14, 14, 36959, 15, 13, 7579, 15, 14, 10466, // 14,14
+ 14, 14, 10855, 14, 15, 35502, 15, 14, 7987, 15, 15, 11192, // 14,15
+ 14, -1, 8358, 14, 0, 11526, 15, -1, 11440, 15, 0, 34212, // 15, 0
+ 14, 0, 7987, 14, 1, 10855, 15, 0, 11192, 15, 1, 35502, // 15, 1
+ 14, 1, 7626, 14, 2, 10224, 15, 1, 10930, 15, 2, 36756, // 15, 2
+ 14, 2, 7285, 14, 3, 9642, 15, 2, 10670, 15, 3, 37939, // 15, 3
+ 14, 3, 6975, 14, 4, 9122, 15, 3, 10430, 15, 4, 39009, // 15, 4
+ 14, 4, 6710, 14, 5, 8676, 15, 4, 10232, 15, 5, 39918, // 15, 5
+ 14, 5, 6502, 14, 6, 8316, 15, 5, 10100, 15, 6, 40618, // 15, 6
+ 14, 6, 6360, 14, 7, 8052, 15, 6, 10052, 15, 7, 41072, // 15, 7
+ 15, 7, 10066, 15, 8, 41106, 16, 7, 6346, 16, 8, 8018, // 15, 8
+ 15, 8, 10123, 15, 9, 40646, 16, 8, 6489, 16, 9, 8278, // 15, 9
+ 15, 9, 10265, 15, 10, 39940, 16, 9, 6699, 16, 10, 8632, // 15,10
+ 15, 10, 10473, 15, 11, 39026, 16, 10, 6965, 16, 11, 9072, // 15,11
+ 15, 11, 10723, 15, 12, 37951, 16, 11, 7276, 16, 12, 9586, // 15,12
+ 15, 12, 10994, 15, 13, 36764, 16, 12, 7620, 16, 13, 10158, // 15,13
+ 15, 13, 11267, 15, 14, 35506, 16, 13, 7983, 16, 14, 10780, // 15,14
+ 15, 14, 11526, 15, 15, 34212, 16, 14, 8358, 16, 15, 11440, // 15,15
+ // angle of -1.0 degrees
+ -1, 0, 8769, -1, 1, 6280, 0, 0, 41693, 0, 1, 8794, // 0, 0
+ -1, 1, 8265, -1, 2, 5974, 0, 1, 42823, 0, 2, 8474, // 0, 1
+ -1, 2, 7791, -1, 3, 5682, 0, 2, 43904, 0, 3, 8159, // 0, 2
+ -1, 3, 7356, -1, 4, 5410, 0, 3, 44907, 0, 4, 7863, // 0, 3
+ -1, 4, 6970, -1, 5, 5169, 0, 4, 45799, 0, 5, 7598, // 0, 4
+ -1, 5, 6644, -1, 6, 4967, 0, 5, 46541, 0, 6, 7384, // 0, 5
+ -1, 6, 6391, -1, 7, 4814, 0, 6, 47098, 0, 7, 7233, // 0, 6
+ -1, 7, 6217, -1, 8, 4718, 0, 7, 47440, 0, 8, 7161, // 0, 7
+ 0, 8, 47426, 0, 9, 7158, 1, 8, 6230, 1, 9, 4722, // 0, 8
+ 0, 9, 47086, 0, 10, 7227, 1, 9, 6405, 1, 10, 4818, // 0, 9
+ 0, 10, 46532, 0, 11, 7374, 1, 10, 6659, 1, 11, 4971, // 0,10
+ 0, 11, 45791, 0, 12, 7587, 1, 11, 6986, 1, 12, 5172, // 0,11
+ 0, 12, 44901, 0, 13, 7848, 1, 12, 7374, 1, 13, 5413, // 0,12
+ 0, 13, 43900, 0, 14, 8141, 1, 13, 7812, 1, 14, 5683, // 0,13
+ 0, 14, 42821, 0, 15, 8452, 1, 14, 8288, 1, 15, 5975, // 0,14
+ 0, 15, 41693, 0, 16, 8769, 1, 15, 8795, 1, 16, 6279, // 0,15
+ 0, 0, 8452, 0, 1, 5975, 1, 0, 42821, 1, 1, 8288, // 1, 0
+ 0, 1, 7901, 0, 2, 5640, 1, 1, 44074, 1, 2, 7921, // 1, 1
+ 0, 2, 7378, 0, 3, 5315, 1, 2, 45288, 1, 3, 7555, // 1, 2
+ 0, 3, 6892, 0, 4, 5009, 1, 3, 46430, 1, 4, 7205, // 1, 3
+ 0, 4, 6458, 0, 5, 4734, 1, 4, 47458, 1, 5, 6886, // 1, 4
+ 0, 5, 6092, 0, 6, 4502, 1, 5, 48322, 1, 6, 6620, // 1, 5
+ 0, 6, 5809, 0, 7, 4327, 1, 6, 48969, 1, 7, 6431, // 1, 6
+ 0, 7, 5623, 0, 8, 4221, 1, 7, 49358, 1, 8, 6334, // 1, 7
+ 1, 8, 49347, 1, 9, 6332, 2, 8, 5633, 2, 9, 4224, // 1, 8
+ 1, 9, 48960, 1, 10, 6425, 2, 9, 5820, 2, 10, 4331, // 1, 9
+ 1, 10, 48314, 1, 11, 6613, 2, 10, 6104, 2, 11, 4505, // 1,10
+ 1, 11, 47453, 1, 12, 6875, 2, 11, 6472, 2, 12, 4736, // 1,11
+ 1, 12, 46427, 1, 13, 7191, 2, 12, 6908, 2, 13, 5010, // 1,12
+ 1, 13, 45286, 1, 14, 7539, 2, 13, 7395, 2, 14, 5316, // 1,13
+ 1, 14, 44074, 1, 15, 7901, 2, 14, 7921, 2, 15, 5640, // 1,14
+ 1, 15, 42823, 1, 16, 8265, 2, 15, 8474, 2, 16, 5974, // 1,15
+ 1, 0, 8141, 1, 1, 5684, 2, 0, 43900, 2, 1, 7811, // 2, 0
+ 1, 1, 7539, 1, 2, 5316, 2, 1, 45286, 2, 2, 7395, // 2, 1
+ 1, 2, 6959, 1, 3, 4954, 2, 2, 46650, 2, 3, 6973, // 2, 2
+ 1, 3, 6414, 1, 4, 4607, 2, 3, 47955, 2, 4, 6560, // 2, 3
+ 1, 4, 5920, 1, 5, 4290, 2, 4, 49150, 2, 5, 6176, // 2, 4
+ 1, 5, 5499, 1, 6, 4019, 2, 5, 50171, 2, 6, 5847, // 2, 5
+ 1, 6, 5175, 1, 7, 3813, 2, 6, 50942, 2, 7, 5606, // 2, 6
+ 1, 7, 4970, 1, 8, 3691, 2, 7, 51395, 2, 8, 5480, // 2, 7
+ 2, 8, 51387, 2, 9, 5478, 3, 8, 4978, 3, 9, 3693, // 2, 8
+ 2, 9, 50935, 2, 10, 5602, 3, 9, 5184, 3, 10, 3815, // 2, 9
+ 2, 10, 50165, 2, 11, 5842, 3, 10, 5508, 3, 11, 4021, // 2,10
+ 2, 11, 49147, 2, 12, 6168, 3, 11, 5930, 3, 12, 4291, // 2,11
+ 2, 12, 47953, 2, 13, 6549, 3, 12, 6426, 3, 13, 4608, // 2,12
+ 2, 13, 46650, 2, 14, 6959, 3, 13, 6973, 3, 14, 4954, // 2,13
+ 2, 14, 45288, 2, 15, 7378, 3, 14, 7555, 3, 15, 5315, // 2,14
+ 2, 15, 43904, 2, 16, 7791, 3, 15, 8159, 3, 16, 5682, // 2,15
+ 2, 0, 7848, 2, 1, 5413, 3, 0, 44901, 3, 1, 7374, // 3, 0
+ 2, 1, 7191, 2, 2, 5011, 3, 1, 46427, 3, 2, 6907, // 3, 1
+ 2, 2, 6549, 2, 3, 4608, 3, 2, 47953, 3, 3, 6426, // 3, 2
+ 2, 3, 5934, 2, 4, 4214, 3, 3, 49445, 3, 4, 5943, // 3, 3
+ 2, 4, 5365, 2, 5, 3845, 3, 4, 50844, 3, 5, 5482, // 3, 4
+ 2, 5, 4872, 2, 6, 3522, 3, 5, 52069, 3, 6, 5073, // 3, 5
+ 2, 6, 4489, 2, 7, 3273, 3, 6, 53012, 3, 7, 4762, // 3, 6
+ 2, 7, 4254, 2, 8, 3126, 3, 7, 53562, 3, 8, 4594, // 3, 7
+ 3, 8, 53557, 3, 9, 4592, 4, 8, 4259, 4, 9, 3128, // 3, 8
+ 3, 9, 53008, 3, 10, 4759, 4, 9, 4495, 4, 10, 3274, // 3, 9
+ 3, 10, 52066, 3, 11, 5069, 4, 10, 4879, 4, 11, 3522, // 3,10
+ 3, 11, 50843, 3, 12, 5474, 4, 11, 5373, 4, 12, 3846, // 3,11
+ 3, 12, 49445, 3, 13, 5934, 4, 12, 5943, 4, 13, 4214, // 3,12
+ 3, 13, 47955, 3, 14, 6414, 4, 13, 6560, 4, 14, 4607, // 3,13
+ 3, 14, 46430, 3, 15, 6892, 4, 14, 7204, 4, 15, 5010, // 3,14
+ 3, 15, 44907, 3, 16, 7356, 4, 15, 7863, 4, 16, 5410, // 3,15
+ 3, 0, 7587, 3, 1, 5172, 4, 0, 45791, 4, 1, 6986, // 4, 0
+ 3, 1, 6875, 3, 2, 4736, 4, 1, 47453, 4, 2, 6472, // 4, 1
+ 3, 2, 6168, 3, 3, 4291, 4, 2, 49147, 4, 3, 5930, // 4, 2
+ 3, 3, 5474, 3, 4, 3846, 4, 3, 50843, 4, 4, 5373, // 4, 3
+ 3, 4, 4816, 3, 5, 3415, 4, 4, 52484, 4, 5, 4821, // 4, 4
+ 3, 5, 4226, 3, 6, 3023, 4, 5, 53975, 4, 6, 4312, // 4, 5
+ 3, 6, 3755, 3, 7, 2710, 4, 6, 55166, 4, 7, 3905, // 4, 6
+ 3, 7, 3469, 3, 8, 2524, 4, 7, 55870, 4, 8, 3673, // 4, 7
+ 4, 8, 55867, 4, 9, 3671, 5, 8, 3473, 5, 9, 2525, // 4, 8
+ 4, 9, 55164, 4, 10, 3902, 5, 9, 3759, 5, 10, 2711, // 4, 9
+ 4, 10, 53973, 4, 11, 4309, 5, 10, 4230, 5, 11, 3024, // 4,10
+ 4, 11, 52484, 4, 12, 4816, 5, 11, 4822, 5, 12, 3414, // 4,11
+ 4, 12, 50844, 4, 13, 5365, 5, 12, 5481, 5, 13, 3846, // 4,12
+ 4, 13, 49150, 4, 14, 5920, 5, 13, 6176, 5, 14, 4290, // 4,13
+ 4, 14, 47458, 4, 15, 6458, 5, 14, 6886, 5, 15, 4734, // 4,14
+ 4, 15, 45799, 4, 16, 6970, 5, 15, 7599, 5, 16, 5168, // 4,15
+ 4, 0, 7374, 4, 1, 4971, 5, 0, 46532, 5, 1, 6659, // 5, 0
+ 4, 1, 6613, 4, 2, 4505, 5, 1, 48314, 5, 2, 6104, // 5, 1
+ 4, 2, 5842, 4, 3, 4020, 5, 2, 50165, 5, 3, 5509, // 5, 2
+ 4, 3, 5069, 4, 4, 3523, 5, 3, 52066, 5, 4, 4878, // 5, 3
+ 4, 4, 4309, 4, 5, 3023, 5, 4, 53973, 5, 5, 4231, // 5, 4
+ 4, 5, 3595, 4, 6, 2546, 5, 5, 55798, 5, 6, 3597, // 5, 5
+ 4, 6, 2993, 4, 7, 2138, 5, 6, 57354, 5, 7, 3051, // 5, 6
+ 4, 7, 2615, 4, 8, 1884, 5, 7, 58324, 5, 8, 2713, // 5, 7
+ 5, 8, 58322, 5, 9, 2713, 6, 8, 2616, 6, 9, 1885, // 5, 8
+ 5, 9, 57353, 5, 10, 3050, 6, 9, 2995, 6, 10, 2138, // 5, 9
+ 5, 10, 55798, 5, 11, 3595, 6, 10, 3598, 6, 11, 2545, // 5,10
+ 5, 11, 53975, 5, 12, 4226, 6, 11, 4313, 6, 12, 3022, // 5,11
+ 5, 12, 52069, 5, 13, 4872, 6, 12, 5073, 6, 13, 3522, // 5,12
+ 5, 13, 50171, 5, 14, 5499, 6, 13, 5848, 6, 14, 4018, // 5,13
+ 5, 14, 48322, 5, 15, 6092, 6, 14, 6620, 6, 15, 4502, // 5,14
+ 5, 15, 46541, 5, 16, 6644, 6, 15, 7383, 6, 16, 4968, // 5,15
+ 5, 0, 7227, 5, 1, 4818, 6, 0, 47086, 6, 1, 6405, // 6, 0
+ 5, 1, 6425, 5, 2, 4330, 6, 1, 48960, 6, 2, 5821, // 6, 1
+ 5, 2, 5602, 5, 3, 3815, 6, 2, 50935, 6, 3, 5184, // 6, 2
+ 5, 3, 4759, 5, 4, 3274, 6, 3, 53008, 6, 4, 4495, // 6, 3
+ 5, 4, 3902, 5, 5, 2711, 6, 4, 55164, 6, 5, 3759, // 6, 4
+ 5, 5, 3050, 5, 6, 2138, 6, 5, 57353, 6, 6, 2995, // 6, 5
+ 5, 6, 2258, 5, 7, 1597, 6, 6, 59422, 6, 7, 2259, // 6, 6
+ 5, 7, 1695, 5, 8, 1209, 6, 7, 60906, 6, 8, 1726, // 6, 7
+ 6, 8, 60905, 6, 9, 1726, 7, 8, 1695, 7, 9, 1210, // 6, 8
+ 6, 9, 59422, 6, 10, 2258, 7, 9, 2259, 7, 10, 1597, // 6, 9
+ 6, 10, 57354, 6, 11, 2993, 7, 10, 3051, 7, 11, 2138, // 6,10
+ 6, 11, 55166, 6, 12, 3755, 7, 11, 3904, 7, 12, 2711, // 6,11
+ 6, 12, 53012, 6, 13, 4489, 7, 12, 4762, 7, 13, 3273, // 6,12
+ 6, 13, 50942, 6, 14, 5175, 7, 13, 5606, 7, 14, 3813, // 6,13
+ 6, 14, 48969, 6, 15, 5809, 7, 14, 6430, 7, 15, 4328, // 6,14
+ 6, 15, 47098, 6, 16, 6391, 7, 15, 7233, 7, 16, 4814, // 6,15
+ 6, 0, 7158, 6, 1, 4722, 7, 0, 47426, 7, 1, 6230, // 7, 0
+ 6, 1, 6332, 6, 2, 4224, 7, 1, 49347, 7, 2, 5633, // 7, 1
+ 6, 2, 5478, 6, 3, 3693, 7, 2, 51387, 7, 3, 4978, // 7, 2
+ 6, 3, 4592, 6, 4, 3128, 7, 3, 53557, 7, 4, 4259, // 7, 3
+ 6, 4, 3671, 6, 5, 2525, 7, 4, 55867, 7, 5, 3473, // 7, 4
+ 6, 5, 2713, 6, 6, 1884, 7, 5, 58322, 7, 6, 2617, // 7, 5
+ 6, 6, 1726, 6, 7, 1210, 7, 6, 60905, 7, 7, 1695, // 7, 6
+ 6, 7, 789, 6, 8, 558, 7, 7, 63399, 7, 8, 790, // 7, 7
+ 7, 8, 63399, 7, 9, 789, 8, 8, 789, 8, 9, 559, // 7, 8
+ 7, 9, 60906, 7, 10, 1695, 8, 9, 1726, 8, 10, 1209, // 7, 9
+ 7, 10, 58324, 7, 11, 2615, 8, 10, 2714, 8, 11, 1883, // 7,10
+ 7, 11, 55870, 7, 12, 3469, 8, 11, 3672, 8, 12, 2525, // 7,11
+ 7, 12, 53562, 7, 13, 4254, 8, 12, 4594, 8, 13, 3126, // 7,12
+ 7, 13, 51395, 7, 14, 4970, 8, 13, 5480, 8, 14, 3691, // 7,13
+ 7, 14, 49358, 7, 15, 5623, 8, 14, 6335, 8, 15, 4220, // 7,14
+ 7, 15, 47440, 7, 16, 6217, 8, 15, 7161, 8, 16, 4718, // 7,15
+ 7, -1, 4718, 7, 0, 7161, 8, -1, 6217, 8, 0, 47440, // 8, 0
+ 7, 0, 4221, 7, 1, 6335, 8, 0, 5623, 8, 1, 49357, // 8, 1
+ 7, 1, 3691, 7, 2, 5480, 8, 1, 4970, 8, 2, 51395, // 8, 2
+ 7, 2, 3126, 7, 3, 4594, 8, 2, 4254, 8, 3, 53562, // 8, 3
+ 7, 3, 2524, 7, 4, 3672, 8, 3, 3469, 8, 4, 55871, // 8, 4
+ 7, 4, 1884, 7, 5, 2714, 8, 4, 2615, 8, 5, 58323, // 8, 5
+ 7, 5, 1209, 7, 6, 1726, 8, 5, 1695, 8, 6, 60906, // 8, 6
+ 7, 6, 558, 7, 7, 789, 8, 6, 789, 8, 7, 63400, // 8, 7
+ 8, 7, 789, 8, 8, 63399, 9, 7, 558, 9, 8, 790, // 8, 8
+ 8, 8, 1695, 8, 9, 60905, 9, 8, 1210, 9, 9, 1726, // 8, 9
+ 8, 9, 2616, 8, 10, 58322, 9, 9, 1884, 9, 10, 2714, // 8,10
+ 8, 10, 3473, 8, 11, 55867, 9, 10, 2525, 9, 11, 3671, // 8,11
+ 8, 11, 4259, 8, 12, 53557, 9, 11, 3128, 9, 12, 4592, // 8,12
+ 8, 12, 4978, 8, 13, 51387, 9, 12, 3693, 9, 13, 5478, // 8,13
+ 8, 13, 5633, 8, 14, 49347, 9, 13, 4224, 9, 14, 6332, // 8,14
+ 8, 14, 6230, 8, 15, 47426, 9, 14, 4722, 9, 15, 7158, // 8,15
+ 8, -1, 4814, 8, 0, 7233, 9, -1, 6391, 9, 0, 47098, // 9, 0
+ 8, 0, 4327, 8, 1, 6430, 9, 0, 5809, 9, 1, 48970, // 9, 1
+ 8, 1, 3813, 8, 2, 5606, 9, 1, 5175, 9, 2, 50942, // 9, 2
+ 8, 2, 3273, 8, 3, 4762, 9, 2, 4489, 9, 3, 53012, // 9, 3
+ 8, 3, 2710, 8, 4, 3904, 9, 3, 3755, 9, 4, 55167, // 9, 4
+ 8, 4, 2138, 8, 5, 3051, 9, 4, 2993, 9, 5, 57354, // 9, 5
+ 8, 5, 1597, 8, 6, 2259, 9, 5, 2258, 9, 6, 59422, // 9, 6
+ 8, 6, 1210, 8, 7, 1695, 9, 6, 1726, 9, 7, 60905, // 9, 7
+ 9, 7, 1726, 9, 8, 60906, 10, 7, 1209, 10, 8, 1695, // 9, 8
+ 9, 8, 2259, 9, 9, 59422, 10, 8, 1597, 10, 9, 2258, // 9, 9
+ 9, 9, 2995, 9, 10, 57353, 10, 9, 2138, 10, 10, 3050, // 9,10
+ 9, 10, 3759, 9, 11, 55164, 10, 10, 2711, 10, 11, 3902, // 9,11
+ 9, 11, 4495, 9, 12, 53008, 10, 11, 3274, 10, 12, 4759, // 9,12
+ 9, 12, 5184, 9, 13, 50935, 10, 12, 3815, 10, 13, 5602, // 9,13
+ 9, 13, 5820, 9, 14, 48960, 10, 13, 4330, 10, 14, 6426, // 9,14
+ 9, 14, 6405, 9, 15, 47086, 10, 14, 4818, 10, 15, 7227, // 9,15
+ 9, -1, 4967, 9, 0, 7383, 10, -1, 6644, 10, 0, 46542, // 10, 0
+ 9, 0, 4502, 9, 1, 6620, 10, 0, 6092, 10, 1, 48322, // 10, 1
+ 9, 1, 4019, 9, 2, 5848, 10, 1, 5499, 10, 2, 50170, // 10, 2
+ 9, 2, 3522, 9, 3, 5073, 10, 2, 4872, 10, 3, 52069, // 10, 3
+ 9, 3, 3023, 9, 4, 4313, 10, 3, 4226, 10, 4, 53974, // 10, 4
+ 9, 4, 2546, 9, 5, 3598, 10, 4, 3595, 10, 5, 55797, // 10, 5
+ 9, 5, 2138, 9, 6, 2995, 10, 5, 3050, 10, 6, 57353, // 10, 6
+ 9, 6, 1884, 9, 7, 2616, 10, 6, 2713, 10, 7, 58323, // 10, 7
+ 10, 7, 2714, 10, 8, 58324, 11, 7, 1884, 11, 8, 2614, // 10, 8
+ 10, 8, 3051, 10, 9, 57354, 11, 8, 2138, 11, 9, 2993, // 10, 9
+ 10, 9, 3598, 10, 10, 55798, 11, 9, 2546, 11, 10, 3594, // 10,10
+ 10, 10, 4230, 10, 11, 53973, 11, 10, 3023, 11, 11, 4310, // 10,11
+ 10, 11, 4879, 10, 12, 52066, 11, 11, 3523, 11, 12, 5068, // 10,12
+ 10, 12, 5508, 10, 13, 50165, 11, 12, 4020, 11, 13, 5843, // 10,13
+ 10, 13, 6104, 10, 14, 48314, 11, 13, 4505, 11, 14, 6613, // 10,14
+ 10, 14, 6659, 10, 15, 46532, 11, 14, 4971, 11, 15, 7374, // 10,15
+ 10, -1, 5169, 10, 0, 7599, 11, -1, 6970, 11, 0, 45798, // 11, 0
+ 10, 0, 4734, 10, 1, 6886, 11, 0, 6458, 11, 1, 47458, // 11, 1
+ 10, 1, 4290, 10, 2, 6176, 11, 1, 5920, 11, 2, 49150, // 11, 2
+ 10, 2, 3845, 10, 3, 5481, 11, 2, 5365, 11, 3, 50845, // 11, 3
+ 10, 3, 3415, 10, 4, 4822, 11, 3, 4816, 11, 4, 52483, // 11, 4
+ 10, 4, 3023, 10, 5, 4230, 11, 4, 4309, 11, 5, 53974, // 11, 5
+ 10, 5, 2711, 10, 6, 3759, 11, 5, 3902, 11, 6, 55164, // 11, 6
+ 10, 6, 2525, 10, 7, 3473, 11, 6, 3671, 11, 7, 55867, // 11, 7
+ 11, 7, 3672, 11, 8, 55870, 12, 7, 2524, 12, 8, 3470, // 11, 8
+ 11, 8, 3904, 11, 9, 55166, 12, 8, 2710, 12, 9, 3756, // 11, 9
+ 11, 9, 4313, 11, 10, 53975, 12, 9, 3023, 12, 10, 4225, // 11,10
+ 11, 10, 4822, 11, 11, 52484, 12, 10, 3415, 12, 11, 4815, // 11,11
+ 11, 11, 5373, 11, 12, 50843, 12, 11, 3846, 12, 12, 5474, // 11,12
+ 11, 12, 5930, 11, 13, 49147, 12, 12, 4291, 12, 13, 6168, // 11,13
+ 11, 13, 6472, 11, 14, 47453, 12, 13, 4736, 12, 14, 6875, // 11,14
+ 11, 14, 6986, 11, 15, 45791, 12, 14, 5172, 12, 15, 7587, // 11,15
+ 11, -1, 5410, 11, 0, 7863, 12, -1, 7356, 12, 0, 44907, // 12, 0
+ 11, 0, 5009, 11, 1, 7204, 12, 0, 6892, 12, 1, 46431, // 12, 1
+ 11, 1, 4607, 11, 2, 6560, 12, 1, 6414, 12, 2, 47955, // 12, 2
+ 11, 2, 4214, 11, 3, 5943, 12, 2, 5934, 12, 3, 49445, // 12, 3
+ 11, 3, 3846, 11, 4, 5373, 12, 3, 5474, 12, 4, 50843, // 12, 4
+ 11, 4, 3523, 11, 5, 4879, 12, 4, 5069, 12, 5, 52065, // 12, 5
+ 11, 5, 3274, 11, 6, 4495, 12, 5, 4759, 12, 6, 53008, // 12, 6
+ 11, 6, 3128, 11, 7, 4259, 12, 6, 4592, 12, 7, 53557, // 12, 7
+ 12, 7, 4594, 12, 8, 53562, 13, 7, 3126, 13, 8, 4254, // 12, 8
+ 12, 8, 4762, 12, 9, 53012, 13, 8, 3273, 13, 9, 4489, // 12, 9
+ 12, 9, 5073, 12, 10, 52069, 13, 9, 3522, 13, 10, 4872, // 12,10
+ 12, 10, 5481, 12, 11, 50844, 13, 10, 3845, 13, 11, 5366, // 12,11
+ 12, 11, 5943, 12, 12, 49445, 13, 11, 4214, 13, 12, 5934, // 12,12
+ 12, 12, 6426, 12, 13, 47953, 13, 12, 4608, 13, 13, 6549, // 12,13
+ 12, 13, 6908, 12, 14, 46427, 13, 13, 5011, 13, 14, 7190, // 12,14
+ 12, 14, 7374, 12, 15, 44901, 13, 14, 5413, 13, 15, 7848, // 12,15
+ 12, -1, 5682, 12, 0, 8159, 13, -1, 7791, 13, 0, 43904, // 13, 0
+ 12, 0, 5315, 12, 1, 7555, 13, 0, 7378, 13, 1, 45288, // 13, 1
+ 12, 1, 4954, 12, 2, 6973, 13, 1, 6959, 13, 2, 46650, // 13, 2
+ 12, 2, 4608, 12, 3, 6426, 13, 2, 6549, 13, 3, 47953, // 13, 3
+ 12, 3, 4291, 12, 4, 5930, 13, 3, 6168, 13, 4, 49147, // 13, 4
+ 12, 4, 4020, 12, 5, 5508, 13, 4, 5842, 13, 5, 50166, // 13, 5
+ 12, 5, 3815, 12, 6, 5184, 13, 5, 5602, 13, 6, 50935, // 13, 6
+ 12, 6, 3693, 12, 7, 4978, 13, 6, 5478, 13, 7, 51387, // 13, 7
+ 13, 7, 5480, 13, 8, 51395, 14, 7, 3691, 14, 8, 4970, // 13, 8
+ 13, 8, 5606, 13, 9, 50942, 14, 8, 3813, 14, 9, 5175, // 13, 9
+ 13, 9, 5848, 13, 10, 50171, 14, 9, 4019, 14, 10, 5498, // 13,10
+ 13, 10, 6176, 13, 11, 49150, 14, 10, 4290, 14, 11, 5920, // 13,11
+ 13, 11, 6560, 13, 12, 47955, 14, 11, 4607, 14, 12, 6414, // 13,12
+ 13, 12, 6973, 13, 13, 46650, 14, 12, 4954, 14, 13, 6959, // 13,13
+ 13, 13, 7395, 13, 14, 45286, 14, 13, 5316, 14, 14, 7539, // 13,14
+ 13, 14, 7812, 13, 15, 43900, 14, 14, 5684, 14, 15, 8140, // 13,15
+ 13, -1, 5974, 13, 0, 8474, 14, -1, 8265, 14, 0, 42823, // 14, 0
+ 13, 0, 5640, 13, 1, 7921, 14, 0, 7901, 14, 1, 44074, // 14, 1
+ 13, 1, 5316, 13, 2, 7395, 14, 1, 7539, 14, 2, 45286, // 14, 2
+ 13, 2, 5011, 13, 3, 6908, 14, 2, 7191, 14, 3, 46426, // 14, 3
+ 13, 3, 4736, 13, 4, 6472, 14, 3, 6875, 14, 4, 47453, // 14, 4
+ 13, 4, 4505, 13, 5, 6104, 14, 4, 6613, 14, 5, 48314, // 14, 5
+ 13, 5, 4330, 13, 6, 5820, 14, 5, 6425, 14, 6, 48961, // 14, 6
+ 13, 6, 4224, 13, 7, 5633, 14, 6, 6332, 14, 7, 49347, // 14, 7
+ 14, 7, 6335, 14, 8, 49358, 15, 7, 4221, 15, 8, 5622, // 14, 8
+ 14, 8, 6430, 14, 9, 48969, 15, 8, 4327, 15, 9, 5810, // 14, 9
+ 14, 9, 6620, 14, 10, 48322, 15, 9, 4502, 15, 10, 6092, // 14,10
+ 14, 10, 6886, 14, 11, 47458, 15, 10, 4734, 15, 11, 6458, // 14,11
+ 14, 11, 7204, 14, 12, 46430, 15, 11, 5009, 15, 12, 6893, // 14,12
+ 14, 12, 7555, 14, 13, 45288, 15, 12, 5315, 15, 13, 7378, // 14,13
+ 14, 13, 7921, 14, 14, 44074, 15, 13, 5640, 15, 14, 7901, // 14,14
+ 14, 14, 8288, 14, 15, 42821, 15, 14, 5975, 15, 15, 8452, // 14,15
+ 14, -1, 6280, 14, 0, 8795, 15, -1, 8769, 15, 0, 41692, // 15, 0
+ 14, 0, 5975, 14, 1, 8288, 15, 0, 8452, 15, 1, 42821, // 15, 1
+ 14, 1, 5684, 14, 2, 7812, 15, 1, 8141, 15, 2, 43899, // 15, 2
+ 14, 2, 5413, 14, 3, 7374, 15, 2, 7848, 15, 3, 44901, // 15, 3
+ 14, 3, 5172, 14, 4, 6986, 15, 3, 7587, 15, 4, 45791, // 15, 4
+ 14, 4, 4971, 14, 5, 6659, 15, 4, 7374, 15, 5, 46532, // 15, 5
+ 14, 5, 4818, 14, 6, 6405, 15, 5, 7227, 15, 6, 47086, // 15, 6
+ 14, 6, 4722, 14, 7, 6230, 15, 6, 7158, 15, 7, 47426, // 15, 7
+ 15, 7, 7161, 15, 8, 47440, 16, 7, 4718, 16, 8, 6217, // 15, 8
+ 15, 8, 7233, 15, 9, 47098, 16, 8, 4814, 16, 9, 6391, // 15, 9
+ 15, 9, 7383, 15, 10, 46541, 16, 9, 4967, 16, 10, 6645, // 15,10
+ 15, 10, 7599, 15, 11, 45799, 16, 10, 5169, 16, 11, 6969, // 15,11
+ 15, 11, 7863, 15, 12, 44907, 16, 11, 5410, 16, 12, 7356, // 15,12
+ 15, 12, 8159, 15, 13, 43904, 16, 12, 5682, 16, 13, 7791, // 15,13
+ 15, 13, 8474, 15, 14, 42823, 16, 13, 5974, 16, 14, 8265, // 15,14
+ 15, 14, 8795, 15, 15, 41693, 16, 14, 6280, 16, 15, 8768, // 15,15
+ // angle of -0.5 degrees
+ -1, 0, 5106, -1, 1, 3621, 0, 0, 51699, 0, 1, 5110, // 0, 0
+ -1, 1, 4803, -1, 2, 3421, 0, 1, 52457, 0, 2, 4855, // 0, 1
+ -1, 2, 4521, -1, 3, 3235, 0, 2, 53168, 0, 3, 4612, // 0, 2
+ -1, 3, 4264, -1, 4, 3064, 0, 3, 53815, 0, 4, 4393, // 0, 3
+ -1, 4, 4041, -1, 5, 2916, 0, 4, 54378, 0, 5, 4201, // 0, 4
+ -1, 5, 3858, -1, 6, 2796, 0, 5, 54835, 0, 6, 4047, // 0, 5
+ -1, 6, 3722, -1, 7, 2709, 0, 6, 55166, 0, 7, 3939, // 0, 6
+ -1, 7, 3638, -1, 8, 2659, 0, 7, 55354, 0, 8, 3885, // 0, 7
+ 0, 8, 55352, 0, 9, 3885, 1, 8, 3640, 1, 9, 2659, // 0, 8
+ 0, 9, 55164, 0, 10, 3939, 1, 9, 3724, 1, 10, 2709, // 0, 9
+ 0, 10, 54833, 0, 11, 4046, 1, 10, 3860, 1, 11, 2797, // 0,10
+ 0, 11, 54376, 0, 12, 4200, 1, 11, 4043, 1, 12, 2917, // 0,11
+ 0, 12, 53814, 0, 13, 4390, 1, 12, 4267, 1, 13, 3065, // 0,12
+ 0, 13, 53168, 0, 14, 4610, 1, 13, 4523, 1, 14, 3235, // 0,13
+ 0, 14, 52457, 0, 15, 4851, 1, 14, 4806, 1, 15, 3422, // 0,14
+ 0, 15, 51699, 0, 16, 5106, 1, 15, 5110, 1, 16, 3621, // 0,15
+ 0, 0, 4851, 0, 1, 3422, 1, 0, 52457, 1, 1, 4806, // 1, 0
+ 0, 1, 4522, 0, 2, 3204, 1, 1, 53285, 1, 2, 4525, // 1, 1
+ 0, 2, 4212, 0, 3, 2998, 1, 2, 54072, 1, 3, 4254, // 1, 2
+ 0, 3, 3927, 0, 4, 2808, 1, 3, 54796, 1, 4, 4005, // 1, 3
+ 0, 4, 3677, 0, 5, 2640, 1, 4, 55435, 1, 5, 3784, // 1, 4
+ 0, 5, 3470, 0, 6, 2502, 1, 5, 55959, 1, 6, 3605, // 1, 5
+ 0, 6, 3317, 0, 7, 2402, 1, 6, 56340, 1, 7, 3477, // 1, 6
+ 0, 7, 3225, 0, 8, 2346, 1, 7, 56554, 1, 8, 3411, // 1, 7
+ 1, 8, 56552, 1, 9, 3411, 2, 8, 3227, 2, 9, 2346, // 1, 8
+ 1, 9, 56339, 1, 10, 3476, 2, 9, 3319, 2, 10, 2402, // 1, 9
+ 1, 10, 55958, 1, 11, 3604, 2, 10, 3472, 2, 11, 2502, // 1,10
+ 1, 11, 55434, 1, 12, 3783, 2, 11, 3678, 2, 12, 2641, // 1,11
+ 1, 12, 54796, 1, 13, 4003, 2, 12, 3929, 2, 13, 2808, // 1,12
+ 1, 13, 54071, 1, 14, 4253, 2, 13, 4214, 2, 14, 2998, // 1,13
+ 1, 14, 53285, 1, 15, 4522, 2, 14, 4525, 2, 15, 3204, // 1,14
+ 1, 15, 52457, 1, 16, 4803, 2, 15, 4854, 2, 16, 3422, // 1,15
+ 1, 0, 4610, 1, 1, 3235, 2, 0, 53168, 2, 1, 4523, // 2, 0
+ 1, 1, 4253, 1, 2, 2998, 2, 1, 54071, 2, 2, 4214, // 2, 1
+ 1, 2, 3911, 1, 3, 2770, 2, 2, 54941, 2, 3, 3914, // 2, 2
+ 1, 3, 3594, 1, 4, 2556, 2, 3, 55756, 2, 4, 3630, // 2, 3
+ 1, 4, 3310, 1, 5, 2365, 2, 4, 56487, 2, 5, 3374, // 2, 4
+ 1, 5, 3073, 1, 6, 2205, 2, 5, 57096, 2, 6, 3162, // 2, 5
+ 1, 6, 2897, 1, 7, 2088, 2, 6, 57545, 2, 7, 3006, // 2, 6
+ 1, 7, 2794, 1, 8, 2022, 2, 7, 57795, 2, 8, 2925, // 2, 7
+ 2, 8, 57793, 2, 9, 2926, 3, 8, 2795, 3, 9, 2022, // 2, 8
+ 2, 9, 57544, 2, 10, 3007, 3, 9, 2898, 3, 10, 2087, // 2, 9
+ 2, 10, 57095, 2, 11, 3161, 3, 10, 3074, 3, 11, 2206, // 2,10
+ 2, 11, 56486, 2, 12, 3373, 3, 11, 3311, 3, 12, 2366, // 2,11
+ 2, 12, 55756, 2, 13, 3628, 3, 12, 3595, 3, 13, 2557, // 2,12
+ 2, 13, 54941, 2, 14, 3911, 3, 13, 3913, 3, 14, 2771, // 2,13
+ 2, 14, 54072, 2, 15, 4212, 3, 14, 4255, 3, 15, 2997, // 2,14
+ 2, 15, 53168, 2, 16, 4521, 3, 15, 4612, 3, 16, 3235, // 2,15
+ 2, 0, 4390, 2, 1, 3065, 3, 0, 53814, 3, 1, 4267, // 3, 0
+ 2, 1, 4003, 2, 2, 2808, 3, 1, 54796, 3, 2, 3929, // 3, 1
+ 2, 2, 3628, 2, 3, 2557, 3, 2, 55756, 3, 3, 3595, // 3, 2
+ 2, 3, 3273, 2, 4, 2317, 3, 3, 56673, 3, 4, 3273, // 3, 3
+ 2, 4, 2948, 2, 5, 2096, 3, 4, 57514, 3, 5, 2978, // 3, 4
+ 2, 5, 2672, 2, 6, 1908, 3, 5, 58234, 3, 6, 2722, // 3, 5
+ 2, 6, 2463, 2, 7, 1766, 3, 6, 58775, 3, 7, 2532, // 3, 6
+ 2, 7, 2342, 2, 8, 1687, 3, 7, 59077, 3, 8, 2430, // 3, 7
+ 3, 8, 59076, 3, 9, 2430, 4, 8, 2343, 4, 9, 1687, // 3, 8
+ 3, 9, 58774, 3, 10, 2532, 4, 9, 2464, 4, 10, 1766, // 3, 9
+ 3, 10, 58233, 3, 11, 2722, 4, 10, 2673, 4, 11, 1908, // 3,10
+ 3, 11, 57514, 3, 12, 2976, 4, 11, 2950, 4, 12, 2096, // 3,11
+ 3, 12, 56673, 3, 13, 3273, 4, 12, 3274, 4, 13, 2316, // 3,12
+ 3, 13, 55756, 3, 14, 3594, 4, 13, 3630, 4, 14, 2556, // 3,13
+ 3, 14, 54796, 3, 15, 3927, 4, 14, 4005, 4, 15, 2808, // 3,14
+ 3, 15, 53815, 3, 16, 4264, 4, 15, 4392, 4, 16, 3065, // 3,15
+ 3, 0, 4200, 3, 1, 2917, 4, 0, 54376, 4, 1, 4043, // 4, 0
+ 3, 1, 3783, 3, 2, 2640, 4, 1, 55434, 4, 2, 3679, // 4, 1
+ 3, 2, 3373, 3, 3, 2365, 4, 2, 56486, 4, 3, 3312, // 4, 2
+ 3, 3, 2976, 3, 4, 2096, 4, 3, 57514, 4, 4, 2950, // 4, 3
+ 3, 4, 2604, 3, 5, 1843, 4, 4, 58484, 4, 5, 2605, // 4, 4
+ 3, 5, 2276, 3, 6, 1617, 4, 5, 59346, 4, 6, 2297, // 4, 5
+ 3, 6, 2020, 3, 7, 1442, 4, 6, 60018, 4, 7, 2056, // 4, 6
+ 3, 7, 1871, 3, 8, 1341, 4, 7, 60402, 4, 8, 1922, // 4, 7
+ 4, 8, 60402, 4, 9, 1922, 5, 8, 1871, 5, 9, 1341, // 4, 8
+ 4, 9, 60017, 4, 10, 2057, 5, 9, 2020, 5, 10, 1442, // 4, 9
+ 4, 10, 59345, 4, 11, 2297, 5, 10, 2276, 5, 11, 1618, // 4,10
+ 4, 11, 58484, 4, 12, 2604, 5, 11, 2605, 5, 12, 1843, // 4,11
+ 4, 12, 57514, 4, 13, 2948, 5, 12, 2977, 5, 13, 2097, // 4,12
+ 4, 13, 56487, 4, 14, 3310, 5, 13, 3374, 5, 14, 2365, // 4,13
+ 4, 14, 55435, 4, 15, 3677, 5, 14, 3785, 5, 15, 2639, // 4,14
+ 4, 15, 54378, 4, 16, 4041, 5, 15, 4201, 5, 16, 2916, // 4,15
+ 4, 0, 4046, 4, 1, 2797, 5, 0, 54833, 5, 1, 3860, // 5, 0
+ 4, 1, 3604, 4, 2, 2503, 5, 1, 55958, 5, 2, 3471, // 5, 1
+ 4, 2, 3161, 4, 3, 2205, 5, 2, 57095, 5, 3, 3075, // 5, 2
+ 4, 3, 2722, 4, 4, 1908, 5, 3, 58233, 5, 4, 2673, // 5, 3
+ 4, 4, 2297, 4, 5, 1617, 5, 4, 59345, 5, 5, 2277, // 5, 4
+ 4, 5, 1904, 4, 6, 1347, 5, 5, 60381, 5, 6, 1904, // 5, 5
+ 4, 6, 1578, 4, 7, 1121, 5, 6, 61243, 5, 7, 1594, // 5, 6
+ 4, 7, 1380, 4, 8, 985, 5, 7, 61767, 5, 8, 1404, // 5, 7
+ 5, 8, 61767, 5, 9, 1405, 6, 8, 1380, 6, 9, 984, // 5, 8
+ 5, 9, 61243, 5, 10, 1593, 6, 9, 1579, 6, 10, 1121, // 5, 9
+ 5, 10, 60381, 5, 11, 1904, 6, 10, 1904, 6, 11, 1347, // 5,10
+ 5, 11, 59346, 5, 12, 2276, 6, 11, 2297, 6, 12, 1617, // 5,11
+ 5, 12, 58234, 5, 13, 2672, 6, 12, 2723, 6, 13, 1907, // 5,12
+ 5, 13, 57096, 5, 14, 3073, 6, 13, 3161, 6, 14, 2206, // 5,13
+ 5, 14, 55959, 5, 15, 3470, 6, 14, 3605, 6, 15, 2502, // 5,14
+ 5, 15, 54835, 5, 16, 3858, 6, 15, 4047, 6, 16, 2796, // 5,15
+ 5, 0, 3939, 5, 1, 2709, 6, 0, 55164, 6, 1, 3724, // 6, 0
+ 5, 1, 3476, 5, 2, 2403, 6, 1, 56339, 6, 2, 3318, // 6, 1
+ 5, 2, 3007, 5, 3, 2088, 6, 2, 57544, 6, 3, 2897, // 6, 2
+ 5, 3, 2532, 5, 4, 1767, 6, 3, 58774, 6, 4, 2463, // 6, 3
+ 5, 4, 2057, 5, 5, 1442, 6, 4, 60017, 6, 5, 2020, // 6, 4
+ 5, 5, 1593, 5, 6, 1121, 6, 5, 61243, 6, 6, 1579, // 6, 5
+ 5, 6, 1170, 5, 7, 827, 6, 6, 62369, 6, 7, 1170, // 6, 6
+ 5, 7, 875, 5, 8, 622, 6, 7, 63156, 6, 8, 883, // 6, 7
+ 6, 8, 63156, 6, 9, 883, 7, 8, 875, 7, 9, 622, // 6, 8
+ 6, 9, 62369, 6, 10, 1170, 7, 9, 1170, 7, 10, 827, // 6, 9
+ 6, 10, 61243, 6, 11, 1578, 7, 10, 1593, 7, 11, 1122, // 6,10
+ 6, 11, 60018, 6, 12, 2020, 7, 11, 2057, 7, 12, 1441, // 6,11
+ 6, 12, 58775, 6, 13, 2463, 7, 12, 2532, 7, 13, 1766, // 6,12
+ 6, 13, 57545, 6, 14, 2897, 7, 13, 3007, 7, 14, 2087, // 6,13
+ 6, 14, 56340, 6, 15, 3317, 7, 14, 3477, 7, 15, 2402, // 6,14
+ 6, 15, 55166, 6, 16, 3722, 7, 15, 3940, 7, 16, 2708, // 6,15
+ 6, 0, 3885, 6, 1, 2659, 7, 0, 55352, 7, 1, 3640, // 7, 0
+ 6, 1, 3411, 6, 2, 2346, 7, 1, 56552, 7, 2, 3227, // 7, 1
+ 6, 2, 2926, 6, 3, 2022, 7, 2, 57793, 7, 3, 2795, // 7, 2
+ 6, 3, 2430, 6, 4, 1687, 7, 3, 59076, 7, 4, 2343, // 7, 3
+ 6, 4, 1922, 6, 5, 1341, 7, 4, 60402, 7, 5, 1871, // 7, 4
+ 6, 5, 1405, 6, 6, 985, 7, 5, 61767, 7, 6, 1379, // 7, 5
+ 6, 6, 883, 6, 7, 622, 7, 6, 63156, 7, 7, 875, // 7, 6
+ 6, 7, 399, 6, 8, 282, 7, 7, 64455, 7, 8, 400, // 7, 7
+ 7, 8, 64455, 7, 9, 399, 8, 8, 399, 8, 9, 283, // 7, 8
+ 7, 9, 63156, 7, 10, 875, 8, 9, 883, 8, 10, 622, // 7, 9
+ 7, 10, 61767, 7, 11, 1380, 8, 10, 1405, 8, 11, 984, // 7,10
+ 7, 11, 60402, 7, 12, 1871, 8, 11, 1922, 8, 12, 1341, // 7,11
+ 7, 12, 59077, 7, 13, 2342, 8, 12, 2430, 8, 13, 1687, // 7,12
+ 7, 13, 57795, 7, 14, 2794, 8, 13, 2926, 8, 14, 2021, // 7,13
+ 7, 14, 56554, 7, 15, 3225, 8, 14, 3411, 8, 15, 2346, // 7,14
+ 7, 15, 55354, 7, 16, 3638, 8, 15, 3885, 8, 16, 2659, // 7,15
+ 7, -1, 2659, 7, 0, 3885, 8, -1, 3638, 8, 0, 55354, // 8, 0
+ 7, 0, 2346, 7, 1, 3411, 8, 0, 3225, 8, 1, 56554, // 8, 1
+ 7, 1, 2022, 7, 2, 2926, 8, 1, 2794, 8, 2, 57794, // 8, 2
+ 7, 2, 1687, 7, 3, 2430, 8, 2, 2342, 8, 3, 59077, // 8, 3
+ 7, 3, 1341, 7, 4, 1922, 8, 3, 1871, 8, 4, 60402, // 8, 4
+ 7, 4, 985, 7, 5, 1405, 8, 4, 1380, 8, 5, 61766, // 8, 5
+ 7, 5, 622, 7, 6, 883, 8, 5, 875, 8, 6, 63156, // 8, 6
+ 7, 6, 282, 7, 7, 399, 8, 6, 399, 8, 7, 64456, // 8, 7
+ 8, 7, 399, 8, 8, 64455, 9, 7, 282, 9, 8, 400, // 8, 8
+ 8, 8, 875, 8, 9, 63156, 9, 8, 622, 9, 9, 883, // 8, 9
+ 8, 9, 1380, 8, 10, 61767, 9, 9, 985, 9, 10, 1404, // 8,10
+ 8, 10, 1871, 8, 11, 60402, 9, 10, 1341, 9, 11, 1922, // 8,11
+ 8, 11, 2343, 8, 12, 59076, 9, 11, 1687, 9, 12, 2430, // 8,12
+ 8, 12, 2795, 8, 13, 57793, 9, 12, 2022, 9, 13, 2926, // 8,13
+ 8, 13, 3227, 8, 14, 56552, 9, 13, 2346, 9, 14, 3411, // 8,14
+ 8, 14, 3640, 8, 15, 55352, 9, 14, 2659, 9, 15, 3885, // 8,15
+ 8, -1, 2709, 8, 0, 3940, 9, -1, 3722, 9, 0, 55165, // 9, 0
+ 8, 0, 2402, 8, 1, 3477, 9, 0, 3317, 9, 1, 56340, // 9, 1
+ 8, 1, 2088, 8, 2, 3007, 9, 1, 2897, 9, 2, 57544, // 9, 2
+ 8, 2, 1766, 8, 3, 2532, 9, 2, 2463, 9, 3, 58775, // 9, 3
+ 8, 3, 1442, 8, 4, 2057, 9, 3, 2020, 9, 4, 60017, // 9, 4
+ 8, 4, 1121, 8, 5, 1593, 9, 4, 1578, 9, 5, 61244, // 9, 5
+ 8, 5, 827, 8, 6, 1170, 9, 5, 1170, 9, 6, 62369, // 9, 6
+ 8, 6, 622, 8, 7, 875, 9, 6, 883, 9, 7, 63156, // 9, 7
+ 9, 7, 883, 9, 8, 63156, 10, 7, 622, 10, 8, 875, // 9, 8
+ 9, 8, 1170, 9, 9, 62369, 10, 8, 827, 10, 9, 1170, // 9, 9
+ 9, 9, 1579, 9, 10, 61243, 10, 9, 1121, 10, 10, 1593, // 9,10
+ 9, 10, 2020, 9, 11, 60017, 10, 10, 1442, 10, 11, 2057, // 9,11
+ 9, 11, 2464, 9, 12, 58774, 10, 11, 1767, 10, 12, 2531, // 9,12
+ 9, 12, 2898, 9, 13, 57544, 10, 12, 2088, 10, 13, 3006, // 9,13
+ 9, 13, 3319, 9, 14, 56339, 10, 13, 2403, 10, 14, 3475, // 9,14
+ 9, 14, 3724, 9, 15, 55164, 10, 14, 2709, 10, 15, 3939, // 9,15
+ 9, -1, 2796, 9, 0, 4047, 10, -1, 3858, 10, 0, 54835, // 10, 0
+ 9, 0, 2502, 9, 1, 3605, 10, 0, 3470, 10, 1, 55959, // 10, 1
+ 9, 1, 2205, 9, 2, 3161, 10, 1, 3073, 10, 2, 57097, // 10, 2
+ 9, 2, 1908, 9, 3, 2723, 10, 2, 2672, 10, 3, 58233, // 10, 3
+ 9, 3, 1617, 9, 4, 2297, 10, 3, 2276, 10, 4, 59346, // 10, 4
+ 9, 4, 1347, 9, 5, 1904, 10, 4, 1904, 10, 5, 60381, // 10, 5
+ 9, 5, 1121, 9, 6, 1579, 10, 5, 1593, 10, 6, 61243, // 10, 6
+ 9, 6, 985, 9, 7, 1380, 10, 6, 1405, 10, 7, 61766, // 10, 7
+ 10, 7, 1405, 10, 8, 61767, 11, 7, 985, 11, 8, 1379, // 10, 8
+ 10, 8, 1593, 10, 9, 61243, 11, 8, 1121, 11, 9, 1579, // 10, 9
+ 10, 9, 1904, 10, 10, 60381, 11, 9, 1347, 11, 10, 1904, // 10,10
+ 10, 10, 2276, 10, 11, 59345, 11, 10, 1617, 11, 11, 2298, // 10,11
+ 10, 11, 2673, 10, 12, 58233, 11, 11, 1908, 11, 12, 2722, // 10,12
+ 10, 12, 3074, 10, 13, 57095, 11, 12, 2205, 11, 13, 3162, // 10,13
+ 10, 13, 3472, 10, 14, 55958, 11, 13, 2503, 11, 14, 3603, // 10,14
+ 10, 14, 3860, 10, 15, 54833, 11, 14, 2797, 11, 15, 4046, // 10,15
+ 10, -1, 2916, 10, 0, 4201, 11, -1, 4041, 11, 0, 54378, // 11, 0
+ 10, 0, 2640, 10, 1, 3785, 11, 0, 3677, 11, 1, 55434, // 11, 1
+ 10, 1, 2365, 10, 2, 3374, 11, 1, 3310, 11, 2, 56487, // 11, 2
+ 10, 2, 2096, 10, 3, 2977, 11, 2, 2948, 11, 3, 57515, // 11, 3
+ 10, 3, 1843, 10, 4, 2605, 11, 3, 2604, 11, 4, 58484, // 11, 4
+ 10, 4, 1617, 10, 5, 2276, 11, 4, 2297, 11, 5, 59346, // 11, 5
+ 10, 5, 1442, 10, 6, 2020, 11, 5, 2057, 11, 6, 60017, // 11, 6
+ 10, 6, 1341, 10, 7, 1871, 11, 6, 1922, 11, 7, 60402, // 11, 7
+ 11, 7, 1922, 11, 8, 60402, 12, 7, 1341, 12, 8, 1871, // 11, 8
+ 11, 8, 2057, 11, 9, 60018, 12, 8, 1442, 12, 9, 2019, // 11, 9
+ 11, 9, 2297, 11, 10, 59346, 12, 9, 1617, 12, 10, 2276, // 11,10
+ 11, 10, 2605, 11, 11, 58484, 12, 10, 1843, 12, 11, 2604, // 11,11
+ 11, 11, 2950, 11, 12, 57514, 12, 11, 2096, 12, 12, 2976, // 11,12
+ 11, 12, 3311, 11, 13, 56486, 12, 12, 2365, 12, 13, 3374, // 11,13
+ 11, 13, 3678, 11, 14, 55434, 12, 13, 2640, 12, 14, 3784, // 11,14
+ 11, 14, 4043, 11, 15, 54376, 12, 14, 2917, 12, 15, 4200, // 11,15
+ 11, -1, 3064, 11, 0, 4392, 12, -1, 4264, 12, 0, 53816, // 12, 0
+ 11, 0, 2808, 11, 1, 4005, 12, 0, 3927, 12, 1, 54796, // 12, 1
+ 11, 1, 2556, 11, 2, 3630, 12, 1, 3594, 12, 2, 55756, // 12, 2
+ 11, 2, 2317, 11, 3, 3274, 12, 2, 3273, 12, 3, 56672, // 12, 3
+ 11, 3, 2096, 11, 4, 2950, 12, 3, 2976, 12, 4, 57514, // 12, 4
+ 11, 4, 1908, 11, 5, 2673, 12, 4, 2722, 12, 5, 58233, // 12, 5
+ 11, 5, 1767, 11, 6, 2464, 12, 5, 2532, 12, 6, 58773, // 12, 6
+ 11, 6, 1687, 11, 7, 2343, 12, 6, 2430, 12, 7, 59076, // 12, 7
+ 12, 7, 2430, 12, 8, 59077, 13, 7, 1687, 13, 8, 2342, // 12, 8
+ 12, 8, 2532, 12, 9, 58775, 13, 8, 1766, 13, 9, 2463, // 12, 9
+ 12, 9, 2723, 12, 10, 58234, 13, 9, 1908, 13, 10, 2671, // 12,10
+ 12, 10, 2977, 12, 11, 57514, 13, 10, 2096, 13, 11, 2949, // 12,11
+ 12, 11, 3274, 12, 12, 56673, 13, 11, 2317, 13, 12, 3272, // 12,12
+ 12, 12, 3595, 12, 13, 55756, 13, 12, 2557, 13, 13, 3628, // 12,13
+ 12, 13, 3929, 12, 14, 54796, 13, 13, 2808, 13, 14, 4003, // 12,14
+ 12, 14, 4267, 12, 15, 53814, 13, 14, 3065, 13, 15, 4390, // 12,15
+ 12, -1, 3235, 12, 0, 4612, 13, -1, 4521, 13, 0, 53168, // 13, 0
+ 12, 0, 2998, 12, 1, 4255, 13, 0, 4212, 13, 1, 54071, // 13, 1
+ 12, 1, 2770, 12, 2, 3913, 13, 1, 3911, 13, 2, 54942, // 13, 2
+ 12, 2, 2557, 12, 3, 3595, 13, 2, 3628, 13, 3, 55756, // 13, 3
+ 12, 3, 2365, 12, 4, 3311, 13, 3, 3373, 13, 4, 56487, // 13, 4
+ 12, 4, 2205, 12, 5, 3074, 13, 4, 3161, 13, 5, 57096, // 13, 5
+ 12, 5, 2088, 12, 6, 2898, 13, 5, 3007, 13, 6, 57543, // 13, 6
+ 12, 6, 2022, 12, 7, 2795, 13, 6, 2926, 13, 7, 57793, // 13, 7
+ 13, 7, 2926, 13, 8, 57795, 14, 7, 2022, 14, 8, 2793, // 13, 8
+ 13, 8, 3007, 13, 9, 57545, 14, 8, 2088, 14, 9, 2896, // 13, 9
+ 13, 9, 3161, 13, 10, 57096, 14, 9, 2205, 14, 10, 3074, // 13,10
+ 13, 10, 3374, 13, 11, 56487, 14, 10, 2365, 14, 11, 3310, // 13,11
+ 13, 11, 3630, 13, 12, 55756, 14, 11, 2556, 14, 12, 3594, // 13,12
+ 13, 12, 3913, 13, 13, 54941, 14, 12, 2770, 14, 13, 3912, // 13,13
+ 13, 13, 4214, 13, 14, 54071, 14, 13, 2998, 14, 14, 4253, // 13,14
+ 13, 14, 4523, 13, 15, 53168, 14, 14, 3235, 14, 15, 4610, // 13,15
+ 13, -1, 3421, 13, 0, 4854, 14, -1, 4803, 14, 0, 52458, // 14, 0
+ 13, 0, 3204, 13, 1, 4525, 14, 0, 4522, 14, 1, 53285, // 14, 1
+ 13, 1, 2998, 13, 2, 4214, 14, 1, 4253, 14, 2, 54071, // 14, 2
+ 13, 2, 2808, 13, 3, 3929, 14, 2, 4003, 14, 3, 54796, // 14, 3
+ 13, 3, 2640, 13, 4, 3678, 14, 3, 3783, 14, 4, 55435, // 14, 4
+ 13, 4, 2503, 13, 5, 3472, 14, 4, 3604, 14, 5, 55957, // 14, 5
+ 13, 5, 2403, 13, 6, 3319, 14, 5, 3476, 14, 6, 56338, // 14, 6
+ 13, 6, 2346, 13, 7, 3227, 14, 6, 3411, 14, 7, 56552, // 14, 7
+ 14, 7, 3411, 14, 8, 56554, 15, 7, 2346, 15, 8, 3225, // 14, 8
+ 14, 8, 3477, 14, 9, 56340, 15, 8, 2402, 15, 9, 3317, // 14, 9
+ 14, 9, 3605, 14, 10, 55959, 15, 9, 2502, 15, 10, 3470, // 14,10
+ 14, 10, 3785, 14, 11, 55435, 15, 10, 2640, 15, 11, 3676, // 14,11
+ 14, 11, 4005, 14, 12, 54796, 15, 11, 2808, 15, 12, 3927, // 14,12
+ 14, 12, 4255, 14, 13, 54072, 15, 12, 2998, 15, 13, 4211, // 14,13
+ 14, 13, 4525, 14, 14, 53285, 15, 13, 3204, 15, 14, 4522, // 14,14
+ 14, 14, 4806, 14, 15, 52457, 15, 14, 3422, 15, 15, 4851, // 14,15
+ 14, -1, 3621, 14, 0, 5110, 15, -1, 5106, 15, 0, 51699, // 15, 0
+ 14, 0, 3422, 14, 1, 4806, 15, 0, 4851, 15, 1, 52457, // 15, 1
+ 14, 1, 3235, 14, 2, 4523, 15, 1, 4610, 15, 2, 53168, // 15, 2
+ 14, 2, 3065, 14, 3, 4267, 15, 2, 4390, 15, 3, 53814, // 15, 3
+ 14, 3, 2917, 14, 4, 4043, 15, 3, 4200, 15, 4, 54376, // 15, 4
+ 14, 4, 2797, 14, 5, 3860, 15, 4, 4046, 15, 5, 54833, // 15, 5
+ 14, 5, 2709, 14, 6, 3724, 15, 5, 3939, 15, 6, 55164, // 15, 6
+ 14, 6, 2659, 14, 7, 3640, 15, 6, 3885, 15, 7, 55352, // 15, 7
+ 15, 7, 3885, 15, 8, 55354, 16, 7, 2659, 16, 8, 3638, // 15, 8
+ 15, 8, 3940, 15, 9, 55166, 16, 8, 2709, 16, 9, 3721, // 15, 9
+ 15, 9, 4047, 15, 10, 54835, 16, 9, 2796, 16, 10, 3858, // 15,10
+ 15, 10, 4201, 15, 11, 54378, 16, 10, 2916, 16, 11, 4041, // 15,11
+ 15, 11, 4392, 15, 12, 53815, 16, 11, 3064, 16, 12, 4265, // 15,12
+ 15, 12, 4612, 15, 13, 53168, 16, 12, 3235, 16, 13, 4521, // 15,13
+ 15, 13, 4854, 15, 14, 52457, 16, 13, 3421, 16, 14, 4804, // 15,14
+ 15, 14, 5110, 15, 15, 51699, 16, 14, 3621, 16, 15, 5106, // 15,15
+ // angle of 0.0 degrees
+ 0, 0, 16384, 0, 0, 16384, 0, 0, 16384, 0, 0, 16384, // 0, 0
+ 0, 1, 16384, 0, 1, 16384, 0, 1, 16384, 0, 1, 16384, // 0, 1
+ 0, 2, 16384, 0, 2, 16384, 0, 2, 16384, 0, 2, 16384, // 0, 2
+ 0, 3, 16384, 0, 3, 16384, 0, 3, 16384, 0, 3, 16384, // 0, 3
+ 0, 4, 16384, 0, 4, 16384, 0, 4, 16384, 0, 4, 16384, // 0, 4
+ 0, 5, 16384, 0, 5, 16384, 0, 5, 16384, 0, 5, 16384, // 0, 5
+ 0, 6, 16384, 0, 6, 16384, 0, 6, 16384, 0, 6, 16384, // 0, 6
+ 0, 7, 16384, 0, 7, 16384, 0, 7, 16384, 0, 7, 16384, // 0, 7
+ 0, 8, 16384, 0, 8, 16384, 0, 8, 16384, 0, 8, 16384, // 0, 8
+ 0, 9, 16384, 0, 9, 16384, 0, 9, 16384, 0, 9, 16384, // 0, 9
+ 0, 10, 16384, 0, 10, 16384, 0, 10, 16384, 0, 10, 16384, // 0,10
+ 0, 11, 16384, 0, 11, 16384, 0, 11, 16384, 0, 11, 16384, // 0,11
+ 0, 12, 16384, 0, 12, 16384, 0, 12, 16384, 0, 12, 16384, // 0,12
+ 0, 13, 16384, 0, 13, 16384, 0, 13, 16384, 0, 13, 16384, // 0,13
+ 0, 14, 16384, 0, 14, 16384, 0, 14, 16384, 0, 14, 16384, // 0,14
+ 0, 15, 16384, 0, 15, 16384, 0, 15, 16384, 0, 15, 16384, // 0,15
+ 1, 0, 16384, 1, 0, 16384, 1, 0, 16384, 1, 0, 16384, // 1, 0
+ 1, 1, 16384, 1, 1, 16384, 1, 1, 16384, 1, 1, 16384, // 1, 1
+ 1, 2, 16384, 1, 2, 16384, 1, 2, 16384, 1, 2, 16384, // 1, 2
+ 1, 3, 16384, 1, 3, 16384, 1, 3, 16384, 1, 3, 16384, // 1, 3
+ 1, 4, 16384, 1, 4, 16384, 1, 4, 16384, 1, 4, 16384, // 1, 4
+ 1, 5, 16384, 1, 5, 16384, 1, 5, 16384, 1, 5, 16384, // 1, 5
+ 1, 6, 16384, 1, 6, 16384, 1, 6, 16384, 1, 6, 16384, // 1, 6
+ 1, 7, 16384, 1, 7, 16384, 1, 7, 16384, 1, 7, 16384, // 1, 7
+ 1, 8, 16384, 1, 8, 16384, 1, 8, 16384, 1, 8, 16384, // 1, 8
+ 1, 9, 16384, 1, 9, 16384, 1, 9, 16384, 1, 9, 16384, // 1, 9
+ 1, 10, 16384, 1, 10, 16384, 1, 10, 16384, 1, 10, 16384, // 1,10
+ 1, 11, 16384, 1, 11, 16384, 1, 11, 16384, 1, 11, 16384, // 1,11
+ 1, 12, 16384, 1, 12, 16384, 1, 12, 16384, 1, 12, 16384, // 1,12
+ 1, 13, 16384, 1, 13, 16384, 1, 13, 16384, 1, 13, 16384, // 1,13
+ 1, 14, 16384, 1, 14, 16384, 1, 14, 16384, 1, 14, 16384, // 1,14
+ 1, 15, 16384, 1, 15, 16384, 1, 15, 16384, 1, 15, 16384, // 1,15
+ 2, 0, 16384, 2, 0, 16384, 2, 0, 16384, 2, 0, 16384, // 2, 0
+ 2, 1, 16384, 2, 1, 16384, 2, 1, 16384, 2, 1, 16384, // 2, 1
+ 2, 2, 16384, 2, 2, 16384, 2, 2, 16384, 2, 2, 16384, // 2, 2
+ 2, 3, 16384, 2, 3, 16384, 2, 3, 16384, 2, 3, 16384, // 2, 3
+ 2, 4, 16384, 2, 4, 16384, 2, 4, 16384, 2, 4, 16384, // 2, 4
+ 2, 5, 16384, 2, 5, 16384, 2, 5, 16384, 2, 5, 16384, // 2, 5
+ 2, 6, 16384, 2, 6, 16384, 2, 6, 16384, 2, 6, 16384, // 2, 6
+ 2, 7, 16384, 2, 7, 16384, 2, 7, 16384, 2, 7, 16384, // 2, 7
+ 2, 8, 16384, 2, 8, 16384, 2, 8, 16384, 2, 8, 16384, // 2, 8
+ 2, 9, 16384, 2, 9, 16384, 2, 9, 16384, 2, 9, 16384, // 2, 9
+ 2, 10, 16384, 2, 10, 16384, 2, 10, 16384, 2, 10, 16384, // 2,10
+ 2, 11, 16384, 2, 11, 16384, 2, 11, 16384, 2, 11, 16384, // 2,11
+ 2, 12, 16384, 2, 12, 16384, 2, 12, 16384, 2, 12, 16384, // 2,12
+ 2, 13, 16384, 2, 13, 16384, 2, 13, 16384, 2, 13, 16384, // 2,13
+ 2, 14, 16384, 2, 14, 16384, 2, 14, 16384, 2, 14, 16384, // 2,14
+ 2, 15, 16384, 2, 15, 16384, 2, 15, 16384, 2, 15, 16384, // 2,15
+ 3, 0, 16384, 3, 0, 16384, 3, 0, 16384, 3, 0, 16384, // 3, 0
+ 3, 1, 16384, 3, 1, 16384, 3, 1, 16384, 3, 1, 16384, // 3, 1
+ 3, 2, 16384, 3, 2, 16384, 3, 2, 16384, 3, 2, 16384, // 3, 2
+ 3, 3, 16384, 3, 3, 16384, 3, 3, 16384, 3, 3, 16384, // 3, 3
+ 3, 4, 16384, 3, 4, 16384, 3, 4, 16384, 3, 4, 16384, // 3, 4
+ 3, 5, 16384, 3, 5, 16384, 3, 5, 16384, 3, 5, 16384, // 3, 5
+ 3, 6, 16384, 3, 6, 16384, 3, 6, 16384, 3, 6, 16384, // 3, 6
+ 3, 7, 16384, 3, 7, 16384, 3, 7, 16384, 3, 7, 16384, // 3, 7
+ 3, 8, 16384, 3, 8, 16384, 3, 8, 16384, 3, 8, 16384, // 3, 8
+ 3, 9, 16384, 3, 9, 16384, 3, 9, 16384, 3, 9, 16384, // 3, 9
+ 3, 10, 16384, 3, 10, 16384, 3, 10, 16384, 3, 10, 16384, // 3,10
+ 3, 11, 16384, 3, 11, 16384, 3, 11, 16384, 3, 11, 16384, // 3,11
+ 3, 12, 16384, 3, 12, 16384, 3, 12, 16384, 3, 12, 16384, // 3,12
+ 3, 13, 16384, 3, 13, 16384, 3, 13, 16384, 3, 13, 16384, // 3,13
+ 3, 14, 16384, 3, 14, 16384, 3, 14, 16384, 3, 14, 16384, // 3,14
+ 3, 15, 16384, 3, 15, 16384, 3, 15, 16384, 3, 15, 16384, // 3,15
+ 4, 0, 16384, 4, 0, 16384, 4, 0, 16384, 4, 0, 16384, // 4, 0
+ 4, 1, 16384, 4, 1, 16384, 4, 1, 16384, 4, 1, 16384, // 4, 1
+ 4, 2, 16384, 4, 2, 16384, 4, 2, 16384, 4, 2, 16384, // 4, 2
+ 4, 3, 16384, 4, 3, 16384, 4, 3, 16384, 4, 3, 16384, // 4, 3
+ 4, 4, 16384, 4, 4, 16384, 4, 4, 16384, 4, 4, 16384, // 4, 4
+ 4, 5, 16384, 4, 5, 16384, 4, 5, 16384, 4, 5, 16384, // 4, 5
+ 4, 6, 16384, 4, 6, 16384, 4, 6, 16384, 4, 6, 16384, // 4, 6
+ 4, 7, 16384, 4, 7, 16384, 4, 7, 16384, 4, 7, 16384, // 4, 7
+ 4, 8, 16384, 4, 8, 16384, 4, 8, 16384, 4, 8, 16384, // 4, 8
+ 4, 9, 16384, 4, 9, 16384, 4, 9, 16384, 4, 9, 16384, // 4, 9
+ 4, 10, 16384, 4, 10, 16384, 4, 10, 16384, 4, 10, 16384, // 4,10
+ 4, 11, 16384, 4, 11, 16384, 4, 11, 16384, 4, 11, 16384, // 4,11
+ 4, 12, 16384, 4, 12, 16384, 4, 12, 16384, 4, 12, 16384, // 4,12
+ 4, 13, 16384, 4, 13, 16384, 4, 13, 16384, 4, 13, 16384, // 4,13
+ 4, 14, 16384, 4, 14, 16384, 4, 14, 16384, 4, 14, 16384, // 4,14
+ 4, 15, 16384, 4, 15, 16384, 4, 15, 16384, 4, 15, 16384, // 4,15
+ 5, 0, 16384, 5, 0, 16384, 5, 0, 16384, 5, 0, 16384, // 5, 0
+ 5, 1, 16384, 5, 1, 16384, 5, 1, 16384, 5, 1, 16384, // 5, 1
+ 5, 2, 16384, 5, 2, 16384, 5, 2, 16384, 5, 2, 16384, // 5, 2
+ 5, 3, 16384, 5, 3, 16384, 5, 3, 16384, 5, 3, 16384, // 5, 3
+ 5, 4, 16384, 5, 4, 16384, 5, 4, 16384, 5, 4, 16384, // 5, 4
+ 5, 5, 16384, 5, 5, 16384, 5, 5, 16384, 5, 5, 16384, // 5, 5
+ 5, 6, 16384, 5, 6, 16384, 5, 6, 16384, 5, 6, 16384, // 5, 6
+ 5, 7, 16384, 5, 7, 16384, 5, 7, 16384, 5, 7, 16384, // 5, 7
+ 5, 8, 16384, 5, 8, 16384, 5, 8, 16384, 5, 8, 16384, // 5, 8
+ 5, 9, 16384, 5, 9, 16384, 5, 9, 16384, 5, 9, 16384, // 5, 9
+ 5, 10, 16384, 5, 10, 16384, 5, 10, 16384, 5, 10, 16384, // 5,10
+ 5, 11, 16384, 5, 11, 16384, 5, 11, 16384, 5, 11, 16384, // 5,11
+ 5, 12, 16384, 5, 12, 16384, 5, 12, 16384, 5, 12, 16384, // 5,12
+ 5, 13, 16384, 5, 13, 16384, 5, 13, 16384, 5, 13, 16384, // 5,13
+ 5, 14, 16384, 5, 14, 16384, 5, 14, 16384, 5, 14, 16384, // 5,14
+ 5, 15, 16384, 5, 15, 16384, 5, 15, 16384, 5, 15, 16384, // 5,15
+ 6, 0, 16384, 6, 0, 16384, 6, 0, 16384, 6, 0, 16384, // 6, 0
+ 6, 1, 16384, 6, 1, 16384, 6, 1, 16384, 6, 1, 16384, // 6, 1
+ 6, 2, 16384, 6, 2, 16384, 6, 2, 16384, 6, 2, 16384, // 6, 2
+ 6, 3, 16384, 6, 3, 16384, 6, 3, 16384, 6, 3, 16384, // 6, 3
+ 6, 4, 16384, 6, 4, 16384, 6, 4, 16384, 6, 4, 16384, // 6, 4
+ 6, 5, 16384, 6, 5, 16384, 6, 5, 16384, 6, 5, 16384, // 6, 5
+ 6, 6, 16384, 6, 6, 16384, 6, 6, 16384, 6, 6, 16384, // 6, 6
+ 6, 7, 16384, 6, 7, 16384, 6, 7, 16384, 6, 7, 16384, // 6, 7
+ 6, 8, 16384, 6, 8, 16384, 6, 8, 16384, 6, 8, 16384, // 6, 8
+ 6, 9, 16384, 6, 9, 16384, 6, 9, 16384, 6, 9, 16384, // 6, 9
+ 6, 10, 16384, 6, 10, 16384, 6, 10, 16384, 6, 10, 16384, // 6,10
+ 6, 11, 16384, 6, 11, 16384, 6, 11, 16384, 6, 11, 16384, // 6,11
+ 6, 12, 16384, 6, 12, 16384, 6, 12, 16384, 6, 12, 16384, // 6,12
+ 6, 13, 16384, 6, 13, 16384, 6, 13, 16384, 6, 13, 16384, // 6,13
+ 6, 14, 16384, 6, 14, 16384, 6, 14, 16384, 6, 14, 16384, // 6,14
+ 6, 15, 16384, 6, 15, 16384, 6, 15, 16384, 6, 15, 16384, // 6,15
+ 7, 0, 16384, 7, 0, 16384, 7, 0, 16384, 7, 0, 16384, // 7, 0
+ 7, 1, 16384, 7, 1, 16384, 7, 1, 16384, 7, 1, 16384, // 7, 1
+ 7, 2, 16384, 7, 2, 16384, 7, 2, 16384, 7, 2, 16384, // 7, 2
+ 7, 3, 16384, 7, 3, 16384, 7, 3, 16384, 7, 3, 16384, // 7, 3
+ 7, 4, 16384, 7, 4, 16384, 7, 4, 16384, 7, 4, 16384, // 7, 4
+ 7, 5, 16384, 7, 5, 16384, 7, 5, 16384, 7, 5, 16384, // 7, 5
+ 7, 6, 16384, 7, 6, 16384, 7, 6, 16384, 7, 6, 16384, // 7, 6
+ 7, 7, 16384, 7, 7, 16384, 7, 7, 16384, 7, 7, 16384, // 7, 7
+ 7, 8, 16384, 7, 8, 16384, 7, 8, 16384, 7, 8, 16384, // 7, 8
+ 7, 9, 16384, 7, 9, 16384, 7, 9, 16384, 7, 9, 16384, // 7, 9
+ 7, 10, 16384, 7, 10, 16384, 7, 10, 16384, 7, 10, 16384, // 7,10
+ 7, 11, 16384, 7, 11, 16384, 7, 11, 16384, 7, 11, 16384, // 7,11
+ 7, 12, 16384, 7, 12, 16384, 7, 12, 16384, 7, 12, 16384, // 7,12
+ 7, 13, 16384, 7, 13, 16384, 7, 13, 16384, 7, 13, 16384, // 7,13
+ 7, 14, 16384, 7, 14, 16384, 7, 14, 16384, 7, 14, 16384, // 7,14
+ 7, 15, 16384, 7, 15, 16384, 7, 15, 16384, 7, 15, 16384, // 7,15
+ 8, 0, 16384, 8, 0, 16384, 8, 0, 16384, 8, 0, 16384, // 8, 0
+ 8, 1, 16384, 8, 1, 16384, 8, 1, 16384, 8, 1, 16384, // 8, 1
+ 8, 2, 16384, 8, 2, 16384, 8, 2, 16384, 8, 2, 16384, // 8, 2
+ 8, 3, 16384, 8, 3, 16384, 8, 3, 16384, 8, 3, 16384, // 8, 3
+ 8, 4, 16384, 8, 4, 16384, 8, 4, 16384, 8, 4, 16384, // 8, 4
+ 8, 5, 16384, 8, 5, 16384, 8, 5, 16384, 8, 5, 16384, // 8, 5
+ 8, 6, 16384, 8, 6, 16384, 8, 6, 16384, 8, 6, 16384, // 8, 6
+ 8, 7, 16384, 8, 7, 16384, 8, 7, 16384, 8, 7, 16384, // 8, 7
+ 8, 8, 16384, 8, 8, 16384, 8, 8, 16384, 8, 8, 16384, // 8, 8
+ 8, 9, 16384, 8, 9, 16384, 8, 9, 16384, 8, 9, 16384, // 8, 9
+ 8, 10, 16384, 8, 10, 16384, 8, 10, 16384, 8, 10, 16384, // 8,10
+ 8, 11, 16384, 8, 11, 16384, 8, 11, 16384, 8, 11, 16384, // 8,11
+ 8, 12, 16384, 8, 12, 16384, 8, 12, 16384, 8, 12, 16384, // 8,12
+ 8, 13, 16384, 8, 13, 16384, 8, 13, 16384, 8, 13, 16384, // 8,13
+ 8, 14, 16384, 8, 14, 16384, 8, 14, 16384, 8, 14, 16384, // 8,14
+ 8, 15, 16384, 8, 15, 16384, 8, 15, 16384, 8, 15, 16384, // 8,15
+ 9, 0, 16384, 9, 0, 16384, 9, 0, 16384, 9, 0, 16384, // 9, 0
+ 9, 1, 16384, 9, 1, 16384, 9, 1, 16384, 9, 1, 16384, // 9, 1
+ 9, 2, 16384, 9, 2, 16384, 9, 2, 16384, 9, 2, 16384, // 9, 2
+ 9, 3, 16384, 9, 3, 16384, 9, 3, 16384, 9, 3, 16384, // 9, 3
+ 9, 4, 16384, 9, 4, 16384, 9, 4, 16384, 9, 4, 16384, // 9, 4
+ 9, 5, 16384, 9, 5, 16384, 9, 5, 16384, 9, 5, 16384, // 9, 5
+ 9, 6, 16384, 9, 6, 16384, 9, 6, 16384, 9, 6, 16384, // 9, 6
+ 9, 7, 16384, 9, 7, 16384, 9, 7, 16384, 9, 7, 16384, // 9, 7
+ 9, 8, 16384, 9, 8, 16384, 9, 8, 16384, 9, 8, 16384, // 9, 8
+ 9, 9, 16384, 9, 9, 16384, 9, 9, 16384, 9, 9, 16384, // 9, 9
+ 9, 10, 16384, 9, 10, 16384, 9, 10, 16384, 9, 10, 16384, // 9,10
+ 9, 11, 16384, 9, 11, 16384, 9, 11, 16384, 9, 11, 16384, // 9,11
+ 9, 12, 16384, 9, 12, 16384, 9, 12, 16384, 9, 12, 16384, // 9,12
+ 9, 13, 16384, 9, 13, 16384, 9, 13, 16384, 9, 13, 16384, // 9,13
+ 9, 14, 16384, 9, 14, 16384, 9, 14, 16384, 9, 14, 16384, // 9,14
+ 9, 15, 16384, 9, 15, 16384, 9, 15, 16384, 9, 15, 16384, // 9,15
+ 10, 0, 16384, 10, 0, 16384, 10, 0, 16384, 10, 0, 16384, // 10, 0
+ 10, 1, 16384, 10, 1, 16384, 10, 1, 16384, 10, 1, 16384, // 10, 1
+ 10, 2, 16384, 10, 2, 16384, 10, 2, 16384, 10, 2, 16384, // 10, 2
+ 10, 3, 16384, 10, 3, 16384, 10, 3, 16384, 10, 3, 16384, // 10, 3
+ 10, 4, 16384, 10, 4, 16384, 10, 4, 16384, 10, 4, 16384, // 10, 4
+ 10, 5, 16384, 10, 5, 16384, 10, 5, 16384, 10, 5, 16384, // 10, 5
+ 10, 6, 16384, 10, 6, 16384, 10, 6, 16384, 10, 6, 16384, // 10, 6
+ 10, 7, 16384, 10, 7, 16384, 10, 7, 16384, 10, 7, 16384, // 10, 7
+ 10, 8, 16384, 10, 8, 16384, 10, 8, 16384, 10, 8, 16384, // 10, 8
+ 10, 9, 16384, 10, 9, 16384, 10, 9, 16384, 10, 9, 16384, // 10, 9
+ 10, 10, 16384, 10, 10, 16384, 10, 10, 16384, 10, 10, 16384, // 10,10
+ 10, 11, 16384, 10, 11, 16384, 10, 11, 16384, 10, 11, 16384, // 10,11
+ 10, 12, 16384, 10, 12, 16384, 10, 12, 16384, 10, 12, 16384, // 10,12
+ 10, 13, 16384, 10, 13, 16384, 10, 13, 16384, 10, 13, 16384, // 10,13
+ 10, 14, 16384, 10, 14, 16384, 10, 14, 16384, 10, 14, 16384, // 10,14
+ 10, 15, 16384, 10, 15, 16384, 10, 15, 16384, 10, 15, 16384, // 10,15
+ 11, 0, 16384, 11, 0, 16384, 11, 0, 16384, 11, 0, 16384, // 11, 0
+ 11, 1, 16384, 11, 1, 16384, 11, 1, 16384, 11, 1, 16384, // 11, 1
+ 11, 2, 16384, 11, 2, 16384, 11, 2, 16384, 11, 2, 16384, // 11, 2
+ 11, 3, 16384, 11, 3, 16384, 11, 3, 16384, 11, 3, 16384, // 11, 3
+ 11, 4, 16384, 11, 4, 16384, 11, 4, 16384, 11, 4, 16384, // 11, 4
+ 11, 5, 16384, 11, 5, 16384, 11, 5, 16384, 11, 5, 16384, // 11, 5
+ 11, 6, 16384, 11, 6, 16384, 11, 6, 16384, 11, 6, 16384, // 11, 6
+ 11, 7, 16384, 11, 7, 16384, 11, 7, 16384, 11, 7, 16384, // 11, 7
+ 11, 8, 16384, 11, 8, 16384, 11, 8, 16384, 11, 8, 16384, // 11, 8
+ 11, 9, 16384, 11, 9, 16384, 11, 9, 16384, 11, 9, 16384, // 11, 9
+ 11, 10, 16384, 11, 10, 16384, 11, 10, 16384, 11, 10, 16384, // 11,10
+ 11, 11, 16384, 11, 11, 16384, 11, 11, 16384, 11, 11, 16384, // 11,11
+ 11, 12, 16384, 11, 12, 16384, 11, 12, 16384, 11, 12, 16384, // 11,12
+ 11, 13, 16384, 11, 13, 16384, 11, 13, 16384, 11, 13, 16384, // 11,13
+ 11, 14, 16384, 11, 14, 16384, 11, 14, 16384, 11, 14, 16384, // 11,14
+ 11, 15, 16384, 11, 15, 16384, 11, 15, 16384, 11, 15, 16384, // 11,15
+ 12, 0, 16384, 12, 0, 16384, 12, 0, 16384, 12, 0, 16384, // 12, 0
+ 12, 1, 16384, 12, 1, 16384, 12, 1, 16384, 12, 1, 16384, // 12, 1
+ 12, 2, 16384, 12, 2, 16384, 12, 2, 16384, 12, 2, 16384, // 12, 2
+ 12, 3, 16384, 12, 3, 16384, 12, 3, 16384, 12, 3, 16384, // 12, 3
+ 12, 4, 16384, 12, 4, 16384, 12, 4, 16384, 12, 4, 16384, // 12, 4
+ 12, 5, 16384, 12, 5, 16384, 12, 5, 16384, 12, 5, 16384, // 12, 5
+ 12, 6, 16384, 12, 6, 16384, 12, 6, 16384, 12, 6, 16384, // 12, 6
+ 12, 7, 16384, 12, 7, 16384, 12, 7, 16384, 12, 7, 16384, // 12, 7
+ 12, 8, 16384, 12, 8, 16384, 12, 8, 16384, 12, 8, 16384, // 12, 8
+ 12, 9, 16384, 12, 9, 16384, 12, 9, 16384, 12, 9, 16384, // 12, 9
+ 12, 10, 16384, 12, 10, 16384, 12, 10, 16384, 12, 10, 16384, // 12,10
+ 12, 11, 16384, 12, 11, 16384, 12, 11, 16384, 12, 11, 16384, // 12,11
+ 12, 12, 16384, 12, 12, 16384, 12, 12, 16384, 12, 12, 16384, // 12,12
+ 12, 13, 16384, 12, 13, 16384, 12, 13, 16384, 12, 13, 16384, // 12,13
+ 12, 14, 16384, 12, 14, 16384, 12, 14, 16384, 12, 14, 16384, // 12,14
+ 12, 15, 16384, 12, 15, 16384, 12, 15, 16384, 12, 15, 16384, // 12,15
+ 13, 0, 16384, 13, 0, 16384, 13, 0, 16384, 13, 0, 16384, // 13, 0
+ 13, 1, 16384, 13, 1, 16384, 13, 1, 16384, 13, 1, 16384, // 13, 1
+ 13, 2, 16384, 13, 2, 16384, 13, 2, 16384, 13, 2, 16384, // 13, 2
+ 13, 3, 16384, 13, 3, 16384, 13, 3, 16384, 13, 3, 16384, // 13, 3
+ 13, 4, 16384, 13, 4, 16384, 13, 4, 16384, 13, 4, 16384, // 13, 4
+ 13, 5, 16384, 13, 5, 16384, 13, 5, 16384, 13, 5, 16384, // 13, 5
+ 13, 6, 16384, 13, 6, 16384, 13, 6, 16384, 13, 6, 16384, // 13, 6
+ 13, 7, 16384, 13, 7, 16384, 13, 7, 16384, 13, 7, 16384, // 13, 7
+ 13, 8, 16384, 13, 8, 16384, 13, 8, 16384, 13, 8, 16384, // 13, 8
+ 13, 9, 16384, 13, 9, 16384, 13, 9, 16384, 13, 9, 16384, // 13, 9
+ 13, 10, 16384, 13, 10, 16384, 13, 10, 16384, 13, 10, 16384, // 13,10
+ 13, 11, 16384, 13, 11, 16384, 13, 11, 16384, 13, 11, 16384, // 13,11
+ 13, 12, 16384, 13, 12, 16384, 13, 12, 16384, 13, 12, 16384, // 13,12
+ 13, 13, 16384, 13, 13, 16384, 13, 13, 16384, 13, 13, 16384, // 13,13
+ 13, 14, 16384, 13, 14, 16384, 13, 14, 16384, 13, 14, 16384, // 13,14
+ 13, 15, 16384, 13, 15, 16384, 13, 15, 16384, 13, 15, 16384, // 13,15
+ 14, 0, 16384, 14, 0, 16384, 14, 0, 16384, 14, 0, 16384, // 14, 0
+ 14, 1, 16384, 14, 1, 16384, 14, 1, 16384, 14, 1, 16384, // 14, 1
+ 14, 2, 16384, 14, 2, 16384, 14, 2, 16384, 14, 2, 16384, // 14, 2
+ 14, 3, 16384, 14, 3, 16384, 14, 3, 16384, 14, 3, 16384, // 14, 3
+ 14, 4, 16384, 14, 4, 16384, 14, 4, 16384, 14, 4, 16384, // 14, 4
+ 14, 5, 16384, 14, 5, 16384, 14, 5, 16384, 14, 5, 16384, // 14, 5
+ 14, 6, 16384, 14, 6, 16384, 14, 6, 16384, 14, 6, 16384, // 14, 6
+ 14, 7, 16384, 14, 7, 16384, 14, 7, 16384, 14, 7, 16384, // 14, 7
+ 14, 8, 16384, 14, 8, 16384, 14, 8, 16384, 14, 8, 16384, // 14, 8
+ 14, 9, 16384, 14, 9, 16384, 14, 9, 16384, 14, 9, 16384, // 14, 9
+ 14, 10, 16384, 14, 10, 16384, 14, 10, 16384, 14, 10, 16384, // 14,10
+ 14, 11, 16384, 14, 11, 16384, 14, 11, 16384, 14, 11, 16384, // 14,11
+ 14, 12, 16384, 14, 12, 16384, 14, 12, 16384, 14, 12, 16384, // 14,12
+ 14, 13, 16384, 14, 13, 16384, 14, 13, 16384, 14, 13, 16384, // 14,13
+ 14, 14, 16384, 14, 14, 16384, 14, 14, 16384, 14, 14, 16384, // 14,14
+ 14, 15, 16384, 14, 15, 16384, 14, 15, 16384, 14, 15, 16384, // 14,15
+ 15, 0, 16384, 15, 0, 16384, 15, 0, 16384, 15, 0, 16384, // 15, 0
+ 15, 1, 16384, 15, 1, 16384, 15, 1, 16384, 15, 1, 16384, // 15, 1
+ 15, 2, 16384, 15, 2, 16384, 15, 2, 16384, 15, 2, 16384, // 15, 2
+ 15, 3, 16384, 15, 3, 16384, 15, 3, 16384, 15, 3, 16384, // 15, 3
+ 15, 4, 16384, 15, 4, 16384, 15, 4, 16384, 15, 4, 16384, // 15, 4
+ 15, 5, 16384, 15, 5, 16384, 15, 5, 16384, 15, 5, 16384, // 15, 5
+ 15, 6, 16384, 15, 6, 16384, 15, 6, 16384, 15, 6, 16384, // 15, 6
+ 15, 7, 16384, 15, 7, 16384, 15, 7, 16384, 15, 7, 16384, // 15, 7
+ 15, 8, 16384, 15, 8, 16384, 15, 8, 16384, 15, 8, 16384, // 15, 8
+ 15, 9, 16384, 15, 9, 16384, 15, 9, 16384, 15, 9, 16384, // 15, 9
+ 15, 10, 16384, 15, 10, 16384, 15, 10, 16384, 15, 10, 16384, // 15,10
+ 15, 11, 16384, 15, 11, 16384, 15, 11, 16384, 15, 11, 16384, // 15,11
+ 15, 12, 16384, 15, 12, 16384, 15, 12, 16384, 15, 12, 16384, // 15,12
+ 15, 13, 16384, 15, 13, 16384, 15, 13, 16384, 15, 13, 16384, // 15,13
+ 15, 14, 16384, 15, 14, 16384, 15, 14, 16384, 15, 14, 16384, // 15,14
+ 15, 15, 16384, 15, 15, 16384, 15, 15, 16384, 15, 15, 16384, // 15,15
+ // angle of 0.5 degrees
+ 0, -1, 5106, 0, 0, 51699, 1, -1, 3621, 1, 0, 5110, // 0, 0
+ 0, 0, 4851, 0, 1, 52457, 1, 0, 3422, 1, 1, 4806, // 0, 1
+ 0, 1, 4610, 0, 2, 53168, 1, 1, 3235, 1, 2, 4523, // 0, 2
+ 0, 2, 4390, 0, 3, 53814, 1, 2, 3065, 1, 3, 4267, // 0, 3
+ 0, 3, 4200, 0, 4, 54376, 1, 3, 2917, 1, 4, 4043, // 0, 4
+ 0, 4, 4046, 0, 5, 54833, 1, 4, 2797, 1, 5, 3860, // 0, 5
+ 0, 5, 3939, 0, 6, 55164, 1, 5, 2709, 1, 6, 3724, // 0, 6
+ 0, 6, 3885, 0, 7, 55352, 1, 6, 2659, 1, 7, 3640, // 0, 7
+ -1, 7, 2659, -1, 8, 3638, 0, 7, 3885, 0, 8, 55354, // 0, 8
+ -1, 8, 2709, -1, 9, 3722, 0, 8, 3940, 0, 9, 55165, // 0, 9
+ -1, 9, 2796, -1, 10, 3858, 0, 9, 4047, 0, 10, 54835, // 0,10
+ -1, 10, 2916, -1, 11, 4041, 0, 10, 4201, 0, 11, 54378, // 0,11
+ -1, 11, 3064, -1, 12, 4264, 0, 11, 4392, 0, 12, 53816, // 0,12
+ -1, 12, 3235, -1, 13, 4521, 0, 12, 4612, 0, 13, 53168, // 0,13
+ -1, 13, 3421, -1, 14, 4803, 0, 13, 4854, 0, 14, 52458, // 0,14
+ -1, 14, 3621, -1, 15, 5106, 0, 14, 5110, 0, 15, 51699, // 0,15
+ 1, -1, 4803, 1, 0, 52457, 2, -1, 3421, 2, 0, 4855, // 1, 0
+ 1, 0, 4522, 1, 1, 53285, 2, 0, 3204, 2, 1, 4525, // 1, 1
+ 1, 1, 4253, 1, 2, 54071, 2, 1, 2998, 2, 2, 4214, // 1, 2
+ 1, 2, 4003, 1, 3, 54796, 2, 2, 2808, 2, 3, 3929, // 1, 3
+ 1, 3, 3783, 1, 4, 55434, 2, 3, 2640, 2, 4, 3679, // 1, 4
+ 1, 4, 3604, 1, 5, 55958, 2, 4, 2503, 2, 5, 3471, // 1, 5
+ 1, 5, 3476, 1, 6, 56339, 2, 5, 2403, 2, 6, 3318, // 1, 6
+ 1, 6, 3411, 1, 7, 56552, 2, 6, 2346, 2, 7, 3227, // 1, 7
+ 0, 7, 2346, 0, 8, 3225, 1, 7, 3411, 1, 8, 56554, // 1, 8
+ 0, 8, 2402, 0, 9, 3317, 1, 8, 3477, 1, 9, 56340, // 1, 9
+ 0, 9, 2502, 0, 10, 3470, 1, 9, 3605, 1, 10, 55959, // 1,10
+ 0, 10, 2640, 0, 11, 3677, 1, 10, 3785, 1, 11, 55434, // 1,11
+ 0, 11, 2808, 0, 12, 3927, 1, 11, 4005, 1, 12, 54796, // 1,12
+ 0, 12, 2998, 0, 13, 4212, 1, 12, 4255, 1, 13, 54071, // 1,13
+ 0, 13, 3204, 0, 14, 4522, 1, 13, 4525, 1, 14, 53285, // 1,14
+ 0, 14, 3422, 0, 15, 4851, 1, 14, 4806, 1, 15, 52457, // 1,15
+ 2, -1, 4521, 2, 0, 53168, 3, -1, 3235, 3, 0, 4612, // 2, 0
+ 2, 0, 4212, 2, 1, 54072, 3, 0, 2998, 3, 1, 4254, // 2, 1
+ 2, 1, 3911, 2, 2, 54941, 3, 1, 2770, 3, 2, 3914, // 2, 2
+ 2, 2, 3628, 2, 3, 55756, 3, 2, 2557, 3, 3, 3595, // 2, 3
+ 2, 3, 3373, 2, 4, 56486, 3, 3, 2365, 3, 4, 3312, // 2, 4
+ 2, 4, 3161, 2, 5, 57095, 3, 4, 2205, 3, 5, 3075, // 2, 5
+ 2, 5, 3007, 2, 6, 57544, 3, 5, 2088, 3, 6, 2897, // 2, 6
+ 2, 6, 2926, 2, 7, 57793, 3, 6, 2022, 3, 7, 2795, // 2, 7
+ 1, 7, 2022, 1, 8, 2794, 2, 7, 2926, 2, 8, 57794, // 2, 8
+ 1, 8, 2088, 1, 9, 2897, 2, 8, 3007, 2, 9, 57544, // 2, 9
+ 1, 9, 2205, 1, 10, 3073, 2, 9, 3161, 2, 10, 57097, // 2,10
+ 1, 10, 2365, 1, 11, 3310, 2, 10, 3374, 2, 11, 56487, // 2,11
+ 1, 11, 2556, 1, 12, 3594, 2, 11, 3630, 2, 12, 55756, // 2,12
+ 1, 12, 2770, 1, 13, 3911, 2, 12, 3913, 2, 13, 54942, // 2,13
+ 1, 13, 2998, 1, 14, 4253, 2, 13, 4214, 2, 14, 54071, // 2,14
+ 1, 14, 3235, 1, 15, 4610, 2, 14, 4523, 2, 15, 53168, // 2,15
+ 3, -1, 4264, 3, 0, 53815, 4, -1, 3064, 4, 0, 4393, // 3, 0
+ 3, 0, 3927, 3, 1, 54796, 4, 0, 2808, 4, 1, 4005, // 3, 1
+ 3, 1, 3594, 3, 2, 55756, 4, 1, 2556, 4, 2, 3630, // 3, 2
+ 3, 2, 3273, 3, 3, 56673, 4, 2, 2317, 4, 3, 3273, // 3, 3
+ 3, 3, 2976, 3, 4, 57514, 4, 3, 2096, 4, 4, 2950, // 3, 4
+ 3, 4, 2722, 3, 5, 58233, 4, 4, 1908, 4, 5, 2673, // 3, 5
+ 3, 5, 2532, 3, 6, 58774, 4, 5, 1767, 4, 6, 2463, // 3, 6
+ 3, 6, 2430, 3, 7, 59076, 4, 6, 1687, 4, 7, 2343, // 3, 7
+ 2, 7, 1687, 2, 8, 2342, 3, 7, 2430, 3, 8, 59077, // 3, 8
+ 2, 8, 1766, 2, 9, 2463, 3, 8, 2532, 3, 9, 58775, // 3, 9
+ 2, 9, 1908, 2, 10, 2672, 3, 9, 2723, 3, 10, 58233, // 3,10
+ 2, 10, 2096, 2, 11, 2948, 3, 10, 2977, 3, 11, 57515, // 3,11
+ 2, 11, 2317, 2, 12, 3273, 3, 11, 3274, 3, 12, 56672, // 3,12
+ 2, 12, 2557, 2, 13, 3628, 3, 12, 3595, 3, 13, 55756, // 3,13
+ 2, 13, 2808, 2, 14, 4003, 3, 13, 3929, 3, 14, 54796, // 3,14
+ 2, 14, 3065, 2, 15, 4390, 3, 14, 4267, 3, 15, 53814, // 3,15
+ 4, -1, 4041, 4, 0, 54378, 5, -1, 2916, 5, 0, 4201, // 4, 0
+ 4, 0, 3677, 4, 1, 55435, 5, 0, 2640, 5, 1, 3784, // 4, 1
+ 4, 1, 3310, 4, 2, 56487, 5, 1, 2365, 5, 2, 3374, // 4, 2
+ 4, 2, 2948, 4, 3, 57514, 5, 2, 2096, 5, 3, 2978, // 4, 3
+ 4, 3, 2604, 4, 4, 58484, 5, 3, 1843, 5, 4, 2605, // 4, 4
+ 4, 4, 2297, 4, 5, 59345, 5, 4, 1617, 5, 5, 2277, // 4, 5
+ 4, 5, 2057, 4, 6, 60017, 5, 5, 1442, 5, 6, 2020, // 4, 6
+ 4, 6, 1922, 4, 7, 60402, 5, 6, 1341, 5, 7, 1871, // 4, 7
+ 3, 7, 1341, 3, 8, 1871, 4, 7, 1922, 4, 8, 60402, // 4, 8
+ 3, 8, 1442, 3, 9, 2020, 4, 8, 2057, 4, 9, 60017, // 4, 9
+ 3, 9, 1617, 3, 10, 2276, 4, 9, 2297, 4, 10, 59346, // 4,10
+ 3, 10, 1843, 3, 11, 2604, 4, 10, 2605, 4, 11, 58484, // 4,11
+ 3, 11, 2096, 3, 12, 2976, 4, 11, 2950, 4, 12, 57514, // 4,12
+ 3, 12, 2365, 3, 13, 3373, 4, 12, 3311, 4, 13, 56487, // 4,13
+ 3, 13, 2640, 3, 14, 3783, 4, 13, 3678, 4, 14, 55435, // 4,14
+ 3, 14, 2917, 3, 15, 4200, 4, 14, 4043, 4, 15, 54376, // 4,15
+ 5, -1, 3858, 5, 0, 54835, 6, -1, 2796, 6, 0, 4047, // 5, 0
+ 5, 0, 3470, 5, 1, 55959, 6, 0, 2502, 6, 1, 3605, // 5, 1
+ 5, 1, 3073, 5, 2, 57096, 6, 1, 2205, 6, 2, 3162, // 5, 2
+ 5, 2, 2672, 5, 3, 58234, 6, 2, 1908, 6, 3, 2722, // 5, 3
+ 5, 3, 2276, 5, 4, 59346, 6, 3, 1617, 6, 4, 2297, // 5, 4
+ 5, 4, 1904, 5, 5, 60381, 6, 4, 1347, 6, 5, 1904, // 5, 5
+ 5, 5, 1593, 5, 6, 61243, 6, 5, 1121, 6, 6, 1579, // 5, 6
+ 5, 6, 1405, 5, 7, 61767, 6, 6, 985, 6, 7, 1379, // 5, 7
+ 4, 7, 985, 4, 8, 1380, 5, 7, 1405, 5, 8, 61766, // 5, 8
+ 4, 8, 1121, 4, 9, 1578, 5, 8, 1593, 5, 9, 61244, // 5, 9
+ 4, 9, 1347, 4, 10, 1904, 5, 9, 1904, 5, 10, 60381, // 5,10
+ 4, 10, 1617, 4, 11, 2297, 5, 10, 2276, 5, 11, 59346, // 5,11
+ 4, 11, 1908, 4, 12, 2722, 5, 11, 2673, 5, 12, 58233, // 5,12
+ 4, 12, 2205, 4, 13, 3161, 5, 12, 3074, 5, 13, 57096, // 5,13
+ 4, 13, 2503, 4, 14, 3604, 5, 13, 3472, 5, 14, 55957, // 5,14
+ 4, 14, 2797, 4, 15, 4046, 5, 14, 3860, 5, 15, 54833, // 5,15
+ 6, -1, 3722, 6, 0, 55166, 7, -1, 2709, 7, 0, 3939, // 6, 0
+ 6, 0, 3317, 6, 1, 56340, 7, 0, 2402, 7, 1, 3477, // 6, 1
+ 6, 1, 2897, 6, 2, 57545, 7, 1, 2088, 7, 2, 3006, // 6, 2
+ 6, 2, 2463, 6, 3, 58775, 7, 2, 1766, 7, 3, 2532, // 6, 3
+ 6, 3, 2020, 6, 4, 60018, 7, 3, 1442, 7, 4, 2056, // 6, 4
+ 6, 4, 1578, 6, 5, 61243, 7, 4, 1121, 7, 5, 1594, // 6, 5
+ 6, 5, 1170, 6, 6, 62369, 7, 5, 827, 7, 6, 1170, // 6, 6
+ 6, 6, 883, 6, 7, 63156, 7, 6, 622, 7, 7, 875, // 6, 7
+ 5, 7, 622, 5, 8, 875, 6, 7, 883, 6, 8, 63156, // 6, 8
+ 5, 8, 827, 5, 9, 1170, 6, 8, 1170, 6, 9, 62369, // 6, 9
+ 5, 9, 1121, 5, 10, 1593, 6, 9, 1579, 6, 10, 61243, // 6,10
+ 5, 10, 1442, 5, 11, 2057, 6, 10, 2020, 6, 11, 60017, // 6,11
+ 5, 11, 1767, 5, 12, 2532, 6, 11, 2464, 6, 12, 58773, // 6,12
+ 5, 12, 2088, 5, 13, 3007, 6, 12, 2898, 6, 13, 57543, // 6,13
+ 5, 13, 2403, 5, 14, 3476, 6, 13, 3319, 6, 14, 56338, // 6,14
+ 5, 14, 2709, 5, 15, 3939, 6, 14, 3724, 6, 15, 55164, // 6,15
+ 7, -1, 3638, 7, 0, 55354, 8, -1, 2659, 8, 0, 3885, // 7, 0
+ 7, 0, 3225, 7, 1, 56554, 8, 0, 2346, 8, 1, 3411, // 7, 1
+ 7, 1, 2794, 7, 2, 57795, 8, 1, 2022, 8, 2, 2925, // 7, 2
+ 7, 2, 2342, 7, 3, 59077, 8, 2, 1687, 8, 3, 2430, // 7, 3
+ 7, 3, 1871, 7, 4, 60402, 8, 3, 1341, 8, 4, 1922, // 7, 4
+ 7, 4, 1380, 7, 5, 61767, 8, 4, 985, 8, 5, 1404, // 7, 5
+ 7, 5, 875, 7, 6, 63156, 8, 5, 622, 8, 6, 883, // 7, 6
+ 7, 6, 399, 7, 7, 64455, 8, 6, 282, 8, 7, 400, // 7, 7
+ 6, 7, 282, 6, 8, 399, 7, 7, 399, 7, 8, 64456, // 7, 8
+ 6, 8, 622, 6, 9, 883, 7, 8, 875, 7, 9, 63156, // 7, 9
+ 6, 9, 985, 6, 10, 1405, 7, 9, 1380, 7, 10, 61766, // 7,10
+ 6, 10, 1341, 6, 11, 1922, 7, 10, 1871, 7, 11, 60402, // 7,11
+ 6, 11, 1687, 6, 12, 2430, 7, 11, 2343, 7, 12, 59076, // 7,12
+ 6, 12, 2022, 6, 13, 2926, 7, 12, 2795, 7, 13, 57793, // 7,13
+ 6, 13, 2346, 6, 14, 3411, 7, 13, 3227, 7, 14, 56552, // 7,14
+ 6, 14, 2659, 6, 15, 3885, 7, 14, 3640, 7, 15, 55352, // 7,15
+ 8, 0, 55352, 8, 1, 3640, 9, 0, 3885, 9, 1, 2659, // 8, 0
+ 8, 1, 56552, 8, 2, 3227, 9, 1, 3411, 9, 2, 2346, // 8, 1
+ 8, 2, 57793, 8, 3, 2795, 9, 2, 2926, 9, 3, 2022, // 8, 2
+ 8, 3, 59076, 8, 4, 2343, 9, 3, 2430, 9, 4, 1687, // 8, 3
+ 8, 4, 60402, 8, 5, 1871, 9, 4, 1922, 9, 5, 1341, // 8, 4
+ 8, 5, 61767, 8, 6, 1380, 9, 5, 1405, 9, 6, 984, // 8, 5
+ 8, 6, 63156, 8, 7, 875, 9, 6, 883, 9, 7, 622, // 8, 6
+ 8, 7, 64455, 8, 8, 399, 9, 7, 399, 9, 8, 283, // 8, 7
+ 7, 8, 399, 7, 9, 282, 8, 8, 64455, 8, 9, 400, // 8, 8
+ 7, 9, 883, 7, 10, 622, 8, 9, 63156, 8, 10, 875, // 8, 9
+ 7, 10, 1405, 7, 11, 985, 8, 10, 61767, 8, 11, 1379, // 8,10
+ 7, 11, 1922, 7, 12, 1341, 8, 11, 60402, 8, 12, 1871, // 8,11
+ 7, 12, 2430, 7, 13, 1687, 8, 12, 59077, 8, 13, 2342, // 8,12
+ 7, 13, 2926, 7, 14, 2022, 8, 13, 57795, 8, 14, 2793, // 8,13
+ 7, 14, 3411, 7, 15, 2346, 8, 14, 56554, 8, 15, 3225, // 8,14
+ 7, 15, 3885, 7, 16, 2659, 8, 15, 55354, 8, 16, 3638, // 8,15
+ 9, 0, 55164, 9, 1, 3724, 10, 0, 3939, 10, 1, 2709, // 9, 0
+ 9, 1, 56339, 9, 2, 3319, 10, 1, 3476, 10, 2, 2402, // 9, 1
+ 9, 2, 57544, 9, 3, 2898, 10, 2, 3007, 10, 3, 2087, // 9, 2
+ 9, 3, 58774, 9, 4, 2464, 10, 3, 2532, 10, 4, 1766, // 9, 3
+ 9, 4, 60017, 9, 5, 2020, 10, 4, 2057, 10, 5, 1442, // 9, 4
+ 9, 5, 61243, 9, 6, 1579, 10, 5, 1593, 10, 6, 1121, // 9, 5
+ 9, 6, 62369, 9, 7, 1170, 10, 6, 1170, 10, 7, 827, // 9, 6
+ 9, 7, 63156, 9, 8, 883, 10, 7, 875, 10, 8, 622, // 9, 7
+ 8, 8, 875, 8, 9, 622, 9, 8, 63156, 9, 9, 883, // 9, 8
+ 8, 9, 1170, 8, 10, 827, 9, 9, 62369, 9, 10, 1170, // 9, 9
+ 8, 10, 1593, 8, 11, 1121, 9, 10, 61243, 9, 11, 1579, // 9,10
+ 8, 11, 2057, 8, 12, 1442, 9, 11, 60018, 9, 12, 2019, // 9,11
+ 8, 12, 2532, 8, 13, 1766, 9, 12, 58775, 9, 13, 2463, // 9,12
+ 8, 13, 3007, 8, 14, 2088, 9, 13, 57545, 9, 14, 2896, // 9,13
+ 8, 14, 3477, 8, 15, 2402, 9, 14, 56340, 9, 15, 3317, // 9,14
+ 8, 15, 3940, 8, 16, 2709, 9, 15, 55166, 9, 16, 3721, // 9,15
+ 10, 0, 54833, 10, 1, 3860, 11, 0, 4046, 11, 1, 2797, // 10, 0
+ 10, 1, 55958, 10, 2, 3472, 11, 1, 3604, 11, 2, 2502, // 10, 1
+ 10, 2, 57095, 10, 3, 3074, 11, 2, 3161, 11, 3, 2206, // 10, 2
+ 10, 3, 58233, 10, 4, 2673, 11, 3, 2722, 11, 4, 1908, // 10, 3
+ 10, 4, 59345, 10, 5, 2276, 11, 4, 2297, 11, 5, 1618, // 10, 4
+ 10, 5, 60381, 10, 6, 1904, 11, 5, 1904, 11, 6, 1347, // 10, 5
+ 10, 6, 61243, 10, 7, 1593, 11, 6, 1578, 11, 7, 1122, // 10, 6
+ 10, 7, 61767, 10, 8, 1405, 11, 7, 1380, 11, 8, 984, // 10, 7
+ 9, 8, 1380, 9, 9, 985, 10, 8, 61767, 10, 9, 1404, // 10, 8
+ 9, 9, 1579, 9, 10, 1121, 10, 9, 61243, 10, 10, 1593, // 10, 9
+ 9, 10, 1904, 9, 11, 1347, 10, 10, 60381, 10, 11, 1904, // 10,10
+ 9, 11, 2297, 9, 12, 1617, 10, 11, 59346, 10, 12, 2276, // 10,11
+ 9, 12, 2723, 9, 13, 1908, 10, 12, 58234, 10, 13, 2671, // 10,12
+ 9, 13, 3161, 9, 14, 2205, 10, 13, 57096, 10, 14, 3074, // 10,13
+ 9, 14, 3605, 9, 15, 2502, 10, 14, 55959, 10, 15, 3470, // 10,14
+ 9, 15, 4047, 9, 16, 2796, 10, 15, 54835, 10, 16, 3858, // 10,15
+ 11, 0, 54376, 11, 1, 4043, 12, 0, 4200, 12, 1, 2917, // 11, 0
+ 11, 1, 55434, 11, 2, 3678, 12, 1, 3783, 12, 2, 2641, // 11, 1
+ 11, 2, 56486, 11, 3, 3311, 12, 2, 3373, 12, 3, 2366, // 11, 2
+ 11, 3, 57514, 11, 4, 2950, 12, 3, 2976, 12, 4, 2096, // 11, 3
+ 11, 4, 58484, 11, 5, 2605, 12, 4, 2604, 12, 5, 1843, // 11, 4
+ 11, 5, 59346, 11, 6, 2297, 12, 5, 2276, 12, 6, 1617, // 11, 5
+ 11, 6, 60018, 11, 7, 2057, 12, 6, 2020, 12, 7, 1441, // 11, 6
+ 11, 7, 60402, 11, 8, 1922, 12, 7, 1871, 12, 8, 1341, // 11, 7
+ 10, 8, 1871, 10, 9, 1341, 11, 8, 60402, 11, 9, 1922, // 11, 8
+ 10, 9, 2020, 10, 10, 1442, 11, 9, 60017, 11, 10, 2057, // 11, 9
+ 10, 10, 2276, 10, 11, 1617, 11, 10, 59345, 11, 11, 2298, // 11,10
+ 10, 11, 2605, 10, 12, 1843, 11, 11, 58484, 11, 12, 2604, // 11,11
+ 10, 12, 2977, 10, 13, 2096, 11, 12, 57514, 11, 13, 2949, // 11,12
+ 10, 13, 3374, 10, 14, 2365, 11, 13, 56487, 11, 14, 3310, // 11,13
+ 10, 14, 3785, 10, 15, 2640, 11, 14, 55435, 11, 15, 3676, // 11,14
+ 10, 15, 4201, 10, 16, 2916, 11, 15, 54378, 11, 16, 4041, // 11,15
+ 12, 0, 53814, 12, 1, 4267, 13, 0, 4390, 13, 1, 3065, // 12, 0
+ 12, 1, 54796, 12, 2, 3929, 13, 1, 4003, 13, 2, 2808, // 12, 1
+ 12, 2, 55756, 12, 3, 3595, 13, 2, 3628, 13, 3, 2557, // 12, 2
+ 12, 3, 56673, 12, 4, 3274, 13, 3, 3273, 13, 4, 2316, // 12, 3
+ 12, 4, 57514, 12, 5, 2977, 13, 4, 2948, 13, 5, 2097, // 12, 4
+ 12, 5, 58234, 12, 6, 2723, 13, 5, 2672, 13, 6, 1907, // 12, 5
+ 12, 6, 58775, 12, 7, 2532, 13, 6, 2463, 13, 7, 1766, // 12, 6
+ 12, 7, 59077, 12, 8, 2430, 13, 7, 2342, 13, 8, 1687, // 12, 7
+ 11, 8, 2343, 11, 9, 1687, 12, 8, 59076, 12, 9, 2430, // 12, 8
+ 11, 9, 2464, 11, 10, 1767, 12, 9, 58774, 12, 10, 2531, // 12, 9
+ 11, 10, 2673, 11, 11, 1908, 12, 10, 58233, 12, 11, 2722, // 12,10
+ 11, 11, 2950, 11, 12, 2096, 12, 11, 57514, 12, 12, 2976, // 12,11
+ 11, 12, 3274, 11, 13, 2317, 12, 12, 56673, 12, 13, 3272, // 12,12
+ 11, 13, 3630, 11, 14, 2556, 12, 13, 55756, 12, 14, 3594, // 12,13
+ 11, 14, 4005, 11, 15, 2808, 12, 14, 54796, 12, 15, 3927, // 12,14
+ 11, 15, 4392, 11, 16, 3064, 12, 15, 53815, 12, 16, 4265, // 12,15
+ 13, 0, 53168, 13, 1, 4523, 14, 0, 4610, 14, 1, 3235, // 13, 0
+ 13, 1, 54071, 13, 2, 4214, 14, 1, 4253, 14, 2, 2998, // 13, 1
+ 13, 2, 54941, 13, 3, 3913, 14, 2, 3911, 14, 3, 2771, // 13, 2
+ 13, 3, 55756, 13, 4, 3630, 14, 3, 3594, 14, 4, 2556, // 13, 3
+ 13, 4, 56487, 13, 5, 3374, 14, 4, 3310, 14, 5, 2365, // 13, 4
+ 13, 5, 57096, 13, 6, 3161, 14, 5, 3073, 14, 6, 2206, // 13, 5
+ 13, 6, 57545, 13, 7, 3007, 14, 6, 2897, 14, 7, 2087, // 13, 6
+ 13, 7, 57795, 13, 8, 2926, 14, 7, 2794, 14, 8, 2021, // 13, 7
+ 12, 8, 2795, 12, 9, 2022, 13, 8, 57793, 13, 9, 2926, // 13, 8
+ 12, 9, 2898, 12, 10, 2088, 13, 9, 57544, 13, 10, 3006, // 13, 9
+ 12, 10, 3074, 12, 11, 2205, 13, 10, 57095, 13, 11, 3162, // 13,10
+ 12, 11, 3311, 12, 12, 2365, 13, 11, 56486, 13, 12, 3374, // 13,11
+ 12, 12, 3595, 12, 13, 2557, 13, 12, 55756, 13, 13, 3628, // 13,12
+ 12, 13, 3913, 12, 14, 2770, 13, 13, 54941, 13, 14, 3912, // 13,13
+ 12, 14, 4255, 12, 15, 2998, 13, 14, 54072, 13, 15, 4211, // 13,14
+ 12, 15, 4612, 12, 16, 3235, 13, 15, 53168, 13, 16, 4521, // 13,15
+ 14, 0, 52457, 14, 1, 4806, 15, 0, 4851, 15, 1, 3422, // 14, 0
+ 14, 1, 53285, 14, 2, 4525, 15, 1, 4522, 15, 2, 3204, // 14, 1
+ 14, 2, 54072, 14, 3, 4255, 15, 2, 4212, 15, 3, 2997, // 14, 2
+ 14, 3, 54796, 14, 4, 4005, 15, 3, 3927, 15, 4, 2808, // 14, 3
+ 14, 4, 55435, 14, 5, 3785, 15, 4, 3677, 15, 5, 2639, // 14, 4
+ 14, 5, 55959, 14, 6, 3605, 15, 5, 3470, 15, 6, 2502, // 14, 5
+ 14, 6, 56340, 14, 7, 3477, 15, 6, 3317, 15, 7, 2402, // 14, 6
+ 14, 7, 56554, 14, 8, 3411, 15, 7, 3225, 15, 8, 2346, // 14, 7
+ 13, 8, 3227, 13, 9, 2346, 14, 8, 56552, 14, 9, 3411, // 14, 8
+ 13, 9, 3319, 13, 10, 2403, 14, 9, 56339, 14, 10, 3475, // 14, 9
+ 13, 10, 3472, 13, 11, 2503, 14, 10, 55958, 14, 11, 3603, // 14,10
+ 13, 11, 3678, 13, 12, 2640, 14, 11, 55434, 14, 12, 3784, // 14,11
+ 13, 12, 3929, 13, 13, 2808, 14, 12, 54796, 14, 13, 4003, // 14,12
+ 13, 13, 4214, 13, 14, 2998, 14, 13, 54071, 14, 14, 4253, // 14,13
+ 13, 14, 4525, 13, 15, 3204, 14, 14, 53285, 14, 15, 4522, // 14,14
+ 13, 15, 4854, 13, 16, 3421, 14, 15, 52457, 14, 16, 4804, // 14,15
+ 15, 0, 51699, 15, 1, 5110, 16, 0, 5106, 16, 1, 3621, // 15, 0
+ 15, 1, 52457, 15, 2, 4854, 16, 1, 4803, 16, 2, 3422, // 15, 1
+ 15, 2, 53168, 15, 3, 4612, 16, 2, 4521, 16, 3, 3235, // 15, 2
+ 15, 3, 53815, 15, 4, 4392, 16, 3, 4264, 16, 4, 3065, // 15, 3
+ 15, 4, 54378, 15, 5, 4201, 16, 4, 4041, 16, 5, 2916, // 15, 4
+ 15, 5, 54835, 15, 6, 4047, 16, 5, 3858, 16, 6, 2796, // 15, 5
+ 15, 6, 55166, 15, 7, 3940, 16, 6, 3722, 16, 7, 2708, // 15, 6
+ 15, 7, 55354, 15, 8, 3885, 16, 7, 3638, 16, 8, 2659, // 15, 7
+ 14, 8, 3640, 14, 9, 2659, 15, 8, 55352, 15, 9, 3885, // 15, 8
+ 14, 9, 3724, 14, 10, 2709, 15, 9, 55164, 15, 10, 3939, // 15, 9
+ 14, 10, 3860, 14, 11, 2797, 15, 10, 54833, 15, 11, 4046, // 15,10
+ 14, 11, 4043, 14, 12, 2917, 15, 11, 54376, 15, 12, 4200, // 15,11
+ 14, 12, 4267, 14, 13, 3065, 15, 12, 53814, 15, 13, 4390, // 15,12
+ 14, 13, 4523, 14, 14, 3235, 15, 13, 53168, 15, 14, 4610, // 15,13
+ 14, 14, 4806, 14, 15, 3422, 15, 14, 52457, 15, 15, 4851, // 15,14
+ 14, 15, 5110, 14, 16, 3621, 15, 15, 51699, 15, 16, 5106, // 15,15
+ // angle of 1.0 degrees
+ 0, -1, 8769, 0, 0, 41693, 1, -1, 6280, 1, 0, 8794, // 0, 0
+ 0, 0, 8452, 0, 1, 42821, 1, 0, 5975, 1, 1, 8288, // 0, 1
+ 0, 1, 8141, 0, 2, 43900, 1, 1, 5684, 1, 2, 7811, // 0, 2
+ 0, 2, 7848, 0, 3, 44901, 1, 2, 5413, 1, 3, 7374, // 0, 3
+ 0, 3, 7587, 0, 4, 45791, 1, 3, 5172, 1, 4, 6986, // 0, 4
+ 0, 4, 7374, 0, 5, 46532, 1, 4, 4971, 1, 5, 6659, // 0, 5
+ 0, 5, 7227, 0, 6, 47086, 1, 5, 4818, 1, 6, 6405, // 0, 6
+ 0, 6, 7158, 0, 7, 47426, 1, 6, 4722, 1, 7, 6230, // 0, 7
+ -1, 7, 4718, -1, 8, 6217, 0, 7, 7161, 0, 8, 47440, // 0, 8
+ -1, 8, 4814, -1, 9, 6391, 0, 8, 7233, 0, 9, 47098, // 0, 9
+ -1, 9, 4967, -1, 10, 6644, 0, 9, 7383, 0, 10, 46542, // 0,10
+ -1, 10, 5169, -1, 11, 6970, 0, 10, 7599, 0, 11, 45798, // 0,11
+ -1, 11, 5410, -1, 12, 7356, 0, 11, 7863, 0, 12, 44907, // 0,12
+ -1, 12, 5682, -1, 13, 7791, 0, 12, 8159, 0, 13, 43904, // 0,13
+ -1, 13, 5974, -1, 14, 8265, 0, 13, 8474, 0, 14, 42823, // 0,14
+ -1, 14, 6280, -1, 15, 8769, 0, 14, 8795, 0, 15, 41692, // 0,15
+ 1, -1, 8265, 1, 0, 42823, 2, -1, 5974, 2, 0, 8474, // 1, 0
+ 1, 0, 7901, 1, 1, 44074, 2, 0, 5640, 2, 1, 7921, // 1, 1
+ 1, 1, 7539, 1, 2, 45286, 2, 1, 5316, 2, 2, 7395, // 1, 2
+ 1, 2, 7191, 1, 3, 46427, 2, 2, 5011, 2, 3, 6907, // 1, 3
+ 1, 3, 6875, 1, 4, 47453, 2, 3, 4736, 2, 4, 6472, // 1, 4
+ 1, 4, 6613, 1, 5, 48314, 2, 4, 4505, 2, 5, 6104, // 1, 5
+ 1, 5, 6425, 1, 6, 48960, 2, 5, 4330, 2, 6, 5821, // 1, 6
+ 1, 6, 6332, 1, 7, 49347, 2, 6, 4224, 2, 7, 5633, // 1, 7
+ 0, 7, 4221, 0, 8, 5623, 1, 7, 6335, 1, 8, 49357, // 1, 8
+ 0, 8, 4327, 0, 9, 5809, 1, 8, 6430, 1, 9, 48970, // 1, 9
+ 0, 9, 4502, 0, 10, 6092, 1, 9, 6620, 1, 10, 48322, // 1,10
+ 0, 10, 4734, 0, 11, 6458, 1, 10, 6886, 1, 11, 47458, // 1,11
+ 0, 11, 5009, 0, 12, 6892, 1, 11, 7204, 1, 12, 46431, // 1,12
+ 0, 12, 5315, 0, 13, 7378, 1, 12, 7555, 1, 13, 45288, // 1,13
+ 0, 13, 5640, 0, 14, 7901, 1, 13, 7921, 1, 14, 44074, // 1,14
+ 0, 14, 5975, 0, 15, 8452, 1, 14, 8288, 1, 15, 42821, // 1,15
+ 2, -1, 7791, 2, 0, 43904, 3, -1, 5682, 3, 0, 8159, // 2, 0
+ 2, 0, 7378, 2, 1, 45288, 3, 0, 5315, 3, 1, 7555, // 2, 1
+ 2, 1, 6959, 2, 2, 46650, 3, 1, 4954, 3, 2, 6973, // 2, 2
+ 2, 2, 6549, 2, 3, 47953, 3, 2, 4608, 3, 3, 6426, // 2, 3
+ 2, 3, 6168, 2, 4, 49147, 3, 3, 4291, 3, 4, 5930, // 2, 4
+ 2, 4, 5842, 2, 5, 50165, 3, 4, 4020, 3, 5, 5509, // 2, 5
+ 2, 5, 5602, 2, 6, 50935, 3, 5, 3815, 3, 6, 5184, // 2, 6
+ 2, 6, 5478, 2, 7, 51387, 3, 6, 3693, 3, 7, 4978, // 2, 7
+ 1, 7, 3691, 1, 8, 4970, 2, 7, 5480, 2, 8, 51395, // 2, 8
+ 1, 8, 3813, 1, 9, 5175, 2, 8, 5606, 2, 9, 50942, // 2, 9
+ 1, 9, 4019, 1, 10, 5499, 2, 9, 5848, 2, 10, 50170, // 2,10
+ 1, 10, 4290, 1, 11, 5920, 2, 10, 6176, 2, 11, 49150, // 2,11
+ 1, 11, 4607, 1, 12, 6414, 2, 11, 6560, 2, 12, 47955, // 2,12
+ 1, 12, 4954, 1, 13, 6959, 2, 12, 6973, 2, 13, 46650, // 2,13
+ 1, 13, 5316, 1, 14, 7539, 2, 13, 7395, 2, 14, 45286, // 2,14
+ 1, 14, 5684, 1, 15, 8141, 2, 14, 7812, 2, 15, 43899, // 2,15
+ 3, -1, 7356, 3, 0, 44907, 4, -1, 5410, 4, 0, 7863, // 3, 0
+ 3, 0, 6892, 3, 1, 46430, 4, 0, 5009, 4, 1, 7205, // 3, 1
+ 3, 1, 6414, 3, 2, 47955, 4, 1, 4607, 4, 2, 6560, // 3, 2
+ 3, 2, 5934, 3, 3, 49445, 4, 2, 4214, 4, 3, 5943, // 3, 3
+ 3, 3, 5474, 3, 4, 50843, 4, 3, 3846, 4, 4, 5373, // 3, 4
+ 3, 4, 5069, 3, 5, 52066, 4, 4, 3523, 4, 5, 4878, // 3, 5
+ 3, 5, 4759, 3, 6, 53008, 4, 5, 3274, 4, 6, 4495, // 3, 6
+ 3, 6, 4592, 3, 7, 53557, 4, 6, 3128, 4, 7, 4259, // 3, 7
+ 2, 7, 3126, 2, 8, 4254, 3, 7, 4594, 3, 8, 53562, // 3, 8
+ 2, 8, 3273, 2, 9, 4489, 3, 8, 4762, 3, 9, 53012, // 3, 9
+ 2, 9, 3522, 2, 10, 4872, 3, 9, 5073, 3, 10, 52069, // 3,10
+ 2, 10, 3845, 2, 11, 5365, 3, 10, 5481, 3, 11, 50845, // 3,11
+ 2, 11, 4214, 2, 12, 5934, 3, 11, 5943, 3, 12, 49445, // 3,12
+ 2, 12, 4608, 2, 13, 6549, 3, 12, 6426, 3, 13, 47953, // 3,13
+ 2, 13, 5011, 2, 14, 7191, 3, 13, 6908, 3, 14, 46426, // 3,14
+ 2, 14, 5413, 2, 15, 7848, 3, 14, 7374, 3, 15, 44901, // 3,15
+ 4, -1, 6970, 4, 0, 45799, 5, -1, 5169, 5, 0, 7598, // 4, 0
+ 4, 0, 6458, 4, 1, 47458, 5, 0, 4734, 5, 1, 6886, // 4, 1
+ 4, 1, 5920, 4, 2, 49150, 5, 1, 4290, 5, 2, 6176, // 4, 2
+ 4, 2, 5365, 4, 3, 50844, 5, 2, 3845, 5, 3, 5482, // 4, 3
+ 4, 3, 4816, 4, 4, 52484, 5, 3, 3415, 5, 4, 4821, // 4, 4
+ 4, 4, 4309, 4, 5, 53973, 5, 4, 3023, 5, 5, 4231, // 4, 5
+ 4, 5, 3902, 4, 6, 55164, 5, 5, 2711, 5, 6, 3759, // 4, 6
+ 4, 6, 3671, 4, 7, 55867, 5, 6, 2525, 5, 7, 3473, // 4, 7
+ 3, 7, 2524, 3, 8, 3469, 4, 7, 3672, 4, 8, 55871, // 4, 8
+ 3, 8, 2710, 3, 9, 3755, 4, 8, 3904, 4, 9, 55167, // 4, 9
+ 3, 9, 3023, 3, 10, 4226, 4, 9, 4313, 4, 10, 53974, // 4,10
+ 3, 10, 3415, 3, 11, 4816, 4, 10, 4822, 4, 11, 52483, // 4,11
+ 3, 11, 3846, 3, 12, 5474, 4, 11, 5373, 4, 12, 50843, // 4,12
+ 3, 12, 4291, 3, 13, 6168, 4, 12, 5930, 4, 13, 49147, // 4,13
+ 3, 13, 4736, 3, 14, 6875, 4, 13, 6472, 4, 14, 47453, // 4,14
+ 3, 14, 5172, 3, 15, 7587, 4, 14, 6986, 4, 15, 45791, // 4,15
+ 5, -1, 6644, 5, 0, 46541, 6, -1, 4967, 6, 0, 7384, // 5, 0
+ 5, 0, 6092, 5, 1, 48322, 6, 0, 4502, 6, 1, 6620, // 5, 1
+ 5, 1, 5499, 5, 2, 50171, 6, 1, 4019, 6, 2, 5847, // 5, 2
+ 5, 2, 4872, 5, 3, 52069, 6, 2, 3522, 6, 3, 5073, // 5, 3
+ 5, 3, 4226, 5, 4, 53975, 6, 3, 3023, 6, 4, 4312, // 5, 4
+ 5, 4, 3595, 5, 5, 55798, 6, 4, 2546, 6, 5, 3597, // 5, 5
+ 5, 5, 3050, 5, 6, 57353, 6, 5, 2138, 6, 6, 2995, // 5, 6
+ 5, 6, 2713, 5, 7, 58322, 6, 6, 1884, 6, 7, 2617, // 5, 7
+ 4, 7, 1884, 4, 8, 2615, 5, 7, 2714, 5, 8, 58323, // 5, 8
+ 4, 8, 2138, 4, 9, 2993, 5, 8, 3051, 5, 9, 57354, // 5, 9
+ 4, 9, 2546, 4, 10, 3595, 5, 9, 3598, 5, 10, 55797, // 5,10
+ 4, 10, 3023, 4, 11, 4309, 5, 10, 4230, 5, 11, 53974, // 5,11
+ 4, 11, 3523, 4, 12, 5069, 5, 11, 4879, 5, 12, 52065, // 5,12
+ 4, 12, 4020, 4, 13, 5842, 5, 12, 5508, 5, 13, 50166, // 5,13
+ 4, 13, 4505, 4, 14, 6613, 5, 13, 6104, 5, 14, 48314, // 5,14
+ 4, 14, 4971, 4, 15, 7374, 5, 14, 6659, 5, 15, 46532, // 5,15
+ 6, -1, 6391, 6, 0, 47098, 7, -1, 4814, 7, 0, 7233, // 6, 0
+ 6, 0, 5809, 6, 1, 48969, 7, 0, 4327, 7, 1, 6431, // 6, 1
+ 6, 1, 5175, 6, 2, 50942, 7, 1, 3813, 7, 2, 5606, // 6, 2
+ 6, 2, 4489, 6, 3, 53012, 7, 2, 3273, 7, 3, 4762, // 6, 3
+ 6, 3, 3755, 6, 4, 55166, 7, 3, 2710, 7, 4, 3905, // 6, 4
+ 6, 4, 2993, 6, 5, 57354, 7, 4, 2138, 7, 5, 3051, // 6, 5
+ 6, 5, 2258, 6, 6, 59422, 7, 5, 1597, 7, 6, 2259, // 6, 6
+ 6, 6, 1726, 6, 7, 60905, 7, 6, 1210, 7, 7, 1695, // 6, 7
+ 5, 7, 1209, 5, 8, 1695, 6, 7, 1726, 6, 8, 60906, // 6, 8
+ 5, 8, 1597, 5, 9, 2258, 6, 8, 2259, 6, 9, 59422, // 6, 9
+ 5, 9, 2138, 5, 10, 3050, 6, 9, 2995, 6, 10, 57353, // 6,10
+ 5, 10, 2711, 5, 11, 3902, 6, 10, 3759, 6, 11, 55164, // 6,11
+ 5, 11, 3274, 5, 12, 4759, 6, 11, 4495, 6, 12, 53008, // 6,12
+ 5, 12, 3815, 5, 13, 5602, 6, 12, 5184, 6, 13, 50935, // 6,13
+ 5, 13, 4330, 5, 14, 6425, 6, 13, 5820, 6, 14, 48961, // 6,14
+ 5, 14, 4818, 5, 15, 7227, 6, 14, 6405, 6, 15, 47086, // 6,15
+ 7, -1, 6217, 7, 0, 47440, 8, -1, 4718, 8, 0, 7161, // 7, 0
+ 7, 0, 5623, 7, 1, 49358, 8, 0, 4221, 8, 1, 6334, // 7, 1
+ 7, 1, 4970, 7, 2, 51395, 8, 1, 3691, 8, 2, 5480, // 7, 2
+ 7, 2, 4254, 7, 3, 53562, 8, 2, 3126, 8, 3, 4594, // 7, 3
+ 7, 3, 3469, 7, 4, 55870, 8, 3, 2524, 8, 4, 3673, // 7, 4
+ 7, 4, 2615, 7, 5, 58324, 8, 4, 1884, 8, 5, 2713, // 7, 5
+ 7, 5, 1695, 7, 6, 60906, 8, 5, 1209, 8, 6, 1726, // 7, 6
+ 7, 6, 789, 7, 7, 63399, 8, 6, 558, 8, 7, 790, // 7, 7
+ 6, 7, 558, 6, 8, 789, 7, 7, 789, 7, 8, 63400, // 7, 8
+ 6, 8, 1210, 6, 9, 1726, 7, 8, 1695, 7, 9, 60905, // 7, 9
+ 6, 9, 1884, 6, 10, 2713, 7, 9, 2616, 7, 10, 58323, // 7,10
+ 6, 10, 2525, 6, 11, 3671, 7, 10, 3473, 7, 11, 55867, // 7,11
+ 6, 11, 3128, 6, 12, 4592, 7, 11, 4259, 7, 12, 53557, // 7,12
+ 6, 12, 3693, 6, 13, 5478, 7, 12, 4978, 7, 13, 51387, // 7,13
+ 6, 13, 4224, 6, 14, 6332, 7, 13, 5633, 7, 14, 49347, // 7,14
+ 6, 14, 4722, 6, 15, 7158, 7, 14, 6230, 7, 15, 47426, // 7,15
+ 8, 0, 47426, 8, 1, 6230, 9, 0, 7158, 9, 1, 4722, // 8, 0
+ 8, 1, 49347, 8, 2, 5633, 9, 1, 6332, 9, 2, 4224, // 8, 1
+ 8, 2, 51387, 8, 3, 4978, 9, 2, 5478, 9, 3, 3693, // 8, 2
+ 8, 3, 53557, 8, 4, 4259, 9, 3, 4592, 9, 4, 3128, // 8, 3
+ 8, 4, 55867, 8, 5, 3473, 9, 4, 3671, 9, 5, 2525, // 8, 4
+ 8, 5, 58322, 8, 6, 2616, 9, 5, 2713, 9, 6, 1885, // 8, 5
+ 8, 6, 60905, 8, 7, 1695, 9, 6, 1726, 9, 7, 1210, // 8, 6
+ 8, 7, 63399, 8, 8, 789, 9, 7, 789, 9, 8, 559, // 8, 7
+ 7, 8, 789, 7, 9, 558, 8, 8, 63399, 8, 9, 790, // 8, 8
+ 7, 9, 1726, 7, 10, 1209, 8, 9, 60906, 8, 10, 1695, // 8, 9
+ 7, 10, 2714, 7, 11, 1884, 8, 10, 58324, 8, 11, 2614, // 8,10
+ 7, 11, 3672, 7, 12, 2524, 8, 11, 55870, 8, 12, 3470, // 8,11
+ 7, 12, 4594, 7, 13, 3126, 8, 12, 53562, 8, 13, 4254, // 8,12
+ 7, 13, 5480, 7, 14, 3691, 8, 13, 51395, 8, 14, 4970, // 8,13
+ 7, 14, 6335, 7, 15, 4221, 8, 14, 49358, 8, 15, 5622, // 8,14
+ 7, 15, 7161, 7, 16, 4718, 8, 15, 47440, 8, 16, 6217, // 8,15
+ 9, 0, 47086, 9, 1, 6405, 10, 0, 7227, 10, 1, 4818, // 9, 0
+ 9, 1, 48960, 9, 2, 5820, 10, 1, 6425, 10, 2, 4331, // 9, 1
+ 9, 2, 50935, 9, 3, 5184, 10, 2, 5602, 10, 3, 3815, // 9, 2
+ 9, 3, 53008, 9, 4, 4495, 10, 3, 4759, 10, 4, 3274, // 9, 3
+ 9, 4, 55164, 9, 5, 3759, 10, 4, 3902, 10, 5, 2711, // 9, 4
+ 9, 5, 57353, 9, 6, 2995, 10, 5, 3050, 10, 6, 2138, // 9, 5
+ 9, 6, 59422, 9, 7, 2259, 10, 6, 2258, 10, 7, 1597, // 9, 6
+ 9, 7, 60906, 9, 8, 1726, 10, 7, 1695, 10, 8, 1209, // 9, 7
+ 8, 8, 1695, 8, 9, 1210, 9, 8, 60905, 9, 9, 1726, // 9, 8
+ 8, 9, 2259, 8, 10, 1597, 9, 9, 59422, 9, 10, 2258, // 9, 9
+ 8, 10, 3051, 8, 11, 2138, 9, 10, 57354, 9, 11, 2993, // 9,10
+ 8, 11, 3904, 8, 12, 2710, 9, 11, 55166, 9, 12, 3756, // 9,11
+ 8, 12, 4762, 8, 13, 3273, 9, 12, 53012, 9, 13, 4489, // 9,12
+ 8, 13, 5606, 8, 14, 3813, 9, 13, 50942, 9, 14, 5175, // 9,13
+ 8, 14, 6430, 8, 15, 4327, 9, 14, 48969, 9, 15, 5810, // 9,14
+ 8, 15, 7233, 8, 16, 4814, 9, 15, 47098, 9, 16, 6391, // 9,15
+ 10, 0, 46532, 10, 1, 6659, 11, 0, 7374, 11, 1, 4971, // 10, 0
+ 10, 1, 48314, 10, 2, 6104, 11, 1, 6613, 11, 2, 4505, // 10, 1
+ 10, 2, 50165, 10, 3, 5508, 11, 2, 5842, 11, 3, 4021, // 10, 2
+ 10, 3, 52066, 10, 4, 4879, 11, 3, 5069, 11, 4, 3522, // 10, 3
+ 10, 4, 53973, 10, 5, 4230, 11, 4, 4309, 11, 5, 3024, // 10, 4
+ 10, 5, 55798, 10, 6, 3598, 11, 5, 3595, 11, 6, 2545, // 10, 5
+ 10, 6, 57354, 10, 7, 3051, 11, 6, 2993, 11, 7, 2138, // 10, 6
+ 10, 7, 58324, 10, 8, 2714, 11, 7, 2615, 11, 8, 1883, // 10, 7
+ 9, 8, 2616, 9, 9, 1884, 10, 8, 58322, 10, 9, 2714, // 10, 8
+ 9, 9, 2995, 9, 10, 2138, 10, 9, 57353, 10, 10, 3050, // 10, 9
+ 9, 10, 3598, 9, 11, 2546, 10, 10, 55798, 10, 11, 3594, // 10,10
+ 9, 11, 4313, 9, 12, 3023, 10, 11, 53975, 10, 12, 4225, // 10,11
+ 9, 12, 5073, 9, 13, 3522, 10, 12, 52069, 10, 13, 4872, // 10,12
+ 9, 13, 5848, 9, 14, 4019, 10, 13, 50171, 10, 14, 5498, // 10,13
+ 9, 14, 6620, 9, 15, 4502, 10, 14, 48322, 10, 15, 6092, // 10,14
+ 9, 15, 7383, 9, 16, 4967, 10, 15, 46541, 10, 16, 6645, // 10,15
+ 11, 0, 45791, 11, 1, 6986, 12, 0, 7587, 12, 1, 5172, // 11, 0
+ 11, 1, 47453, 11, 2, 6472, 12, 1, 6875, 12, 2, 4736, // 11, 1
+ 11, 2, 49147, 11, 3, 5930, 12, 2, 6168, 12, 3, 4291, // 11, 2
+ 11, 3, 50843, 11, 4, 5373, 12, 3, 5474, 12, 4, 3846, // 11, 3
+ 11, 4, 52484, 11, 5, 4822, 12, 4, 4816, 12, 5, 3414, // 11, 4
+ 11, 5, 53975, 11, 6, 4313, 12, 5, 4226, 12, 6, 3022, // 11, 5
+ 11, 6, 55166, 11, 7, 3904, 12, 6, 3755, 12, 7, 2711, // 11, 6
+ 11, 7, 55870, 11, 8, 3672, 12, 7, 3469, 12, 8, 2525, // 11, 7
+ 10, 8, 3473, 10, 9, 2525, 11, 8, 55867, 11, 9, 3671, // 11, 8
+ 10, 9, 3759, 10, 10, 2711, 11, 9, 55164, 11, 10, 3902, // 11, 9
+ 10, 10, 4230, 10, 11, 3023, 11, 10, 53973, 11, 11, 4310, // 11,10
+ 10, 11, 4822, 10, 12, 3415, 11, 11, 52484, 11, 12, 4815, // 11,11
+ 10, 12, 5481, 10, 13, 3845, 11, 12, 50844, 11, 13, 5366, // 11,12
+ 10, 13, 6176, 10, 14, 4290, 11, 13, 49150, 11, 14, 5920, // 11,13
+ 10, 14, 6886, 10, 15, 4734, 11, 14, 47458, 11, 15, 6458, // 11,14
+ 10, 15, 7599, 10, 16, 5169, 11, 15, 45799, 11, 16, 6969, // 11,15
+ 12, 0, 44901, 12, 1, 7374, 13, 0, 7848, 13, 1, 5413, // 12, 0
+ 12, 1, 46427, 12, 2, 6908, 13, 1, 7191, 13, 2, 5010, // 12, 1
+ 12, 2, 47953, 12, 3, 6426, 13, 2, 6549, 13, 3, 4608, // 12, 2
+ 12, 3, 49445, 12, 4, 5943, 13, 3, 5934, 13, 4, 4214, // 12, 3
+ 12, 4, 50844, 12, 5, 5481, 13, 4, 5365, 13, 5, 3846, // 12, 4
+ 12, 5, 52069, 12, 6, 5073, 13, 5, 4872, 13, 6, 3522, // 12, 5
+ 12, 6, 53012, 12, 7, 4762, 13, 6, 4489, 13, 7, 3273, // 12, 6
+ 12, 7, 53562, 12, 8, 4594, 13, 7, 4254, 13, 8, 3126, // 12, 7
+ 11, 8, 4259, 11, 9, 3128, 12, 8, 53557, 12, 9, 4592, // 12, 8
+ 11, 9, 4495, 11, 10, 3274, 12, 9, 53008, 12, 10, 4759, // 12, 9
+ 11, 10, 4879, 11, 11, 3523, 12, 10, 52066, 12, 11, 5068, // 12,10
+ 11, 11, 5373, 11, 12, 3846, 12, 11, 50843, 12, 12, 5474, // 12,11
+ 11, 12, 5943, 11, 13, 4214, 12, 12, 49445, 12, 13, 5934, // 12,12
+ 11, 13, 6560, 11, 14, 4607, 12, 13, 47955, 12, 14, 6414, // 12,13
+ 11, 14, 7204, 11, 15, 5009, 12, 14, 46430, 12, 15, 6893, // 12,14
+ 11, 15, 7863, 11, 16, 5410, 12, 15, 44907, 12, 16, 7356, // 12,15
+ 13, 0, 43900, 13, 1, 7812, 14, 0, 8141, 14, 1, 5683, // 13, 0
+ 13, 1, 45286, 13, 2, 7395, 14, 1, 7539, 14, 2, 5316, // 13, 1
+ 13, 2, 46650, 13, 3, 6973, 14, 2, 6959, 14, 3, 4954, // 13, 2
+ 13, 3, 47955, 13, 4, 6560, 14, 3, 6414, 14, 4, 4607, // 13, 3
+ 13, 4, 49150, 13, 5, 6176, 14, 4, 5920, 14, 5, 4290, // 13, 4
+ 13, 5, 50171, 13, 6, 5848, 14, 5, 5499, 14, 6, 4018, // 13, 5
+ 13, 6, 50942, 13, 7, 5606, 14, 6, 5175, 14, 7, 3813, // 13, 6
+ 13, 7, 51395, 13, 8, 5480, 14, 7, 4970, 14, 8, 3691, // 13, 7
+ 12, 8, 4978, 12, 9, 3693, 13, 8, 51387, 13, 9, 5478, // 13, 8
+ 12, 9, 5184, 12, 10, 3815, 13, 9, 50935, 13, 10, 5602, // 13, 9
+ 12, 10, 5508, 12, 11, 4020, 13, 10, 50165, 13, 11, 5843, // 13,10
+ 12, 11, 5930, 12, 12, 4291, 13, 11, 49147, 13, 12, 6168, // 13,11
+ 12, 12, 6426, 12, 13, 4608, 13, 12, 47953, 13, 13, 6549, // 13,12
+ 12, 13, 6973, 12, 14, 4954, 13, 13, 46650, 13, 14, 6959, // 13,13
+ 12, 14, 7555, 12, 15, 5315, 13, 14, 45288, 13, 15, 7378, // 13,14
+ 12, 15, 8159, 12, 16, 5682, 13, 15, 43904, 13, 16, 7791, // 13,15
+ 14, 0, 42821, 14, 1, 8288, 15, 0, 8452, 15, 1, 5975, // 14, 0
+ 14, 1, 44074, 14, 2, 7921, 15, 1, 7901, 15, 2, 5640, // 14, 1
+ 14, 2, 45288, 14, 3, 7555, 15, 2, 7378, 15, 3, 5315, // 14, 2
+ 14, 3, 46430, 14, 4, 7204, 15, 3, 6892, 15, 4, 5010, // 14, 3
+ 14, 4, 47458, 14, 5, 6886, 15, 4, 6458, 15, 5, 4734, // 14, 4
+ 14, 5, 48322, 14, 6, 6620, 15, 5, 6092, 15, 6, 4502, // 14, 5
+ 14, 6, 48969, 14, 7, 6430, 15, 6, 5809, 15, 7, 4328, // 14, 6
+ 14, 7, 49358, 14, 8, 6335, 15, 7, 5623, 15, 8, 4220, // 14, 7
+ 13, 8, 5633, 13, 9, 4224, 14, 8, 49347, 14, 9, 6332, // 14, 8
+ 13, 9, 5820, 13, 10, 4330, 14, 9, 48960, 14, 10, 6426, // 14, 9
+ 13, 10, 6104, 13, 11, 4505, 14, 10, 48314, 14, 11, 6613, // 14,10
+ 13, 11, 6472, 13, 12, 4736, 14, 11, 47453, 14, 12, 6875, // 14,11
+ 13, 12, 6908, 13, 13, 5011, 14, 12, 46427, 14, 13, 7190, // 14,12
+ 13, 13, 7395, 13, 14, 5316, 14, 13, 45286, 14, 14, 7539, // 14,13
+ 13, 14, 7921, 13, 15, 5640, 14, 14, 44074, 14, 15, 7901, // 14,14
+ 13, 15, 8474, 13, 16, 5974, 14, 15, 42823, 14, 16, 8265, // 14,15
+ 15, 0, 41693, 15, 1, 8795, 16, 0, 8769, 16, 1, 6279, // 15, 0
+ 15, 1, 42823, 15, 2, 8474, 16, 1, 8265, 16, 2, 5974, // 15, 1
+ 15, 2, 43904, 15, 3, 8159, 16, 2, 7791, 16, 3, 5682, // 15, 2
+ 15, 3, 44907, 15, 4, 7863, 16, 3, 7356, 16, 4, 5410, // 15, 3
+ 15, 4, 45799, 15, 5, 7599, 16, 4, 6970, 16, 5, 5168, // 15, 4
+ 15, 5, 46541, 15, 6, 7383, 16, 5, 6644, 16, 6, 4968, // 15, 5
+ 15, 6, 47098, 15, 7, 7233, 16, 6, 6391, 16, 7, 4814, // 15, 6
+ 15, 7, 47440, 15, 8, 7161, 16, 7, 6217, 16, 8, 4718, // 15, 7
+ 14, 8, 6230, 14, 9, 4722, 15, 8, 47426, 15, 9, 7158, // 15, 8
+ 14, 9, 6405, 14, 10, 4818, 15, 9, 47086, 15, 10, 7227, // 15, 9
+ 14, 10, 6659, 14, 11, 4971, 15, 10, 46532, 15, 11, 7374, // 15,10
+ 14, 11, 6986, 14, 12, 5172, 15, 11, 45791, 15, 12, 7587, // 15,11
+ 14, 12, 7374, 14, 13, 5413, 15, 12, 44901, 15, 13, 7848, // 15,12
+ 14, 13, 7812, 14, 14, 5684, 15, 13, 43900, 15, 14, 8140, // 15,13
+ 14, 14, 8288, 14, 15, 5975, 15, 14, 42821, 15, 15, 8452, // 15,14
+ 14, 15, 8795, 14, 16, 6280, 15, 15, 41693, 15, 16, 8768, // 15,15
+ // angle of 1.5 degrees
+ 0, -1, 11440, 0, 0, 34212, 1, -1, 8358, 1, 0, 11526, // 0, 0
+ 0, 0, 11192, 0, 1, 35502, 1, 0, 7987, 1, 1, 10855, // 0, 1
+ 0, 1, 10930, 0, 2, 36756, 1, 1, 7626, 1, 2, 10224, // 0, 2
+ 0, 2, 10670, 0, 3, 37939, 1, 2, 7285, 1, 3, 9642, // 0, 3
+ 0, 3, 10430, 0, 4, 39009, 1, 3, 6975, 1, 4, 9122, // 0, 4
+ 0, 4, 10232, 0, 5, 39918, 1, 4, 6710, 1, 5, 8676, // 0, 5
+ 0, 5, 10100, 0, 6, 40618, 1, 5, 6502, 1, 6, 8316, // 0, 6
+ 0, 6, 10052, 0, 7, 41072, 1, 6, 6360, 1, 7, 8052, // 0, 7
+ -1, 7, 6346, -1, 8, 8018, 0, 7, 10066, 0, 8, 41106, // 0, 8
+ -1, 8, 6489, -1, 9, 8278, 0, 8, 10123, 0, 9, 40646, // 0, 9
+ -1, 9, 6699, -1, 10, 8632, 0, 9, 10265, 0, 10, 39940, // 0,10
+ -1, 10, 6965, -1, 11, 9072, 0, 10, 10473, 0, 11, 39026, // 0,11
+ -1, 11, 7276, -1, 12, 9585, 0, 11, 10723, 0, 12, 37952, // 0,12
+ -1, 12, 7620, -1, 13, 10158, 0, 12, 10994, 0, 13, 36764, // 0,13
+ -1, 13, 7983, -1, 14, 10780, 0, 13, 11267, 0, 14, 35506, // 0,14
+ -1, 14, 8358, -1, 15, 11440, 0, 14, 11526, 0, 15, 34212, // 0,15
+ 1, -1, 10780, 1, 0, 35506, 2, -1, 7983, 2, 0, 11267, // 1, 0
+ 1, 0, 10467, 1, 1, 36959, 2, 0, 7579, 2, 1, 10531, // 1, 1
+ 1, 1, 10133, 1, 2, 38390, 2, 1, 7179, 2, 2, 9834, // 1, 2
+ 1, 2, 9796, 1, 3, 39759, 2, 2, 6797, 2, 3, 9184, // 1, 3
+ 1, 3, 9478, 1, 4, 41013, 2, 3, 6447, 2, 4, 8598, // 1, 4
+ 1, 4, 9206, 1, 5, 42087, 2, 4, 6145, 2, 5, 8098, // 1, 5
+ 1, 5, 9014, 1, 6, 42913, 2, 5, 5910, 2, 6, 7699, // 1, 6
+ 1, 6, 8929, 1, 7, 43433, 2, 6, 5756, 2, 7, 7418, // 1, 7
+ 0, 7, 5745, 0, 8, 7390, 1, 7, 8939, 1, 8, 43462, // 1, 8
+ 0, 8, 5900, 0, 9, 7667, 1, 8, 9032, 1, 9, 42937, // 1, 9
+ 0, 9, 6137, 0, 10, 8061, 1, 9, 9233, 1, 10, 42105, // 1,10
+ 0, 10, 6440, 0, 11, 8557, 1, 10, 9513, 1, 11, 41026, // 1,11
+ 0, 11, 6792, 0, 12, 9135, 1, 11, 9841, 1, 12, 39768, // 1,12
+ 0, 12, 7177, 0, 13, 9777, 1, 12, 10188, 1, 13, 38394, // 1,13
+ 0, 13, 7579, 0, 14, 10467, 1, 13, 10532, 1, 14, 36958, // 1,14
+ 0, 14, 7987, 0, 15, 11192, 1, 14, 10855, 1, 15, 35502, // 1,15
+ 2, -1, 10158, 2, 0, 36764, 3, -1, 7620, 3, 0, 10994, // 2, 0
+ 2, 0, 9777, 2, 1, 38394, 3, 0, 7177, 3, 1, 10188, // 2, 1
+ 2, 1, 9366, 2, 2, 40025, 3, 1, 6732, 3, 2, 9413, // 2, 2
+ 2, 2, 8941, 2, 3, 41614, 3, 2, 6299, 3, 3, 8682, // 2, 3
+ 2, 3, 8530, 2, 4, 43096, 3, 3, 5895, 3, 4, 8015, // 2, 4
+ 2, 4, 8167, 2, 5, 44386, 3, 4, 5543, 3, 5, 7440, // 2, 5
+ 2, 5, 7899, 2, 6, 45383, 3, 5, 5268, 3, 6, 6986, // 2, 6
+ 2, 6, 7766, 2, 7, 45995, 3, 6, 5095, 3, 7, 6680, // 2, 7
+ 1, 7, 5087, 1, 8, 6658, 2, 7, 7773, 2, 8, 46018, // 2, 8
+ 1, 8, 5261, 1, 9, 6961, 2, 8, 7913, 2, 9, 45401, // 2, 9
+ 1, 9, 5537, 1, 10, 7411, 2, 9, 8189, 2, 10, 44399, // 2,10
+ 1, 10, 5891, 1, 11, 7981, 2, 10, 8559, 2, 11, 43105, // 2,11
+ 1, 11, 6297, 1, 12, 8641, 2, 11, 8979, 2, 12, 41619, // 2,12
+ 1, 12, 6732, 1, 13, 9366, 2, 12, 9413, 2, 13, 40025, // 2,13
+ 1, 13, 7179, 1, 14, 10133, 2, 13, 9834, 2, 14, 38390, // 2,14
+ 1, 14, 7626, 1, 15, 10930, 2, 14, 10224, 2, 15, 36756, // 2,15
+ 3, -1, 9585, 3, 0, 37951, 4, -1, 7276, 4, 0, 10724, // 3, 0
+ 3, 0, 9135, 3, 1, 39767, 4, 0, 6792, 4, 1, 9842, // 3, 1
+ 3, 1, 8641, 3, 2, 41618, 4, 1, 6297, 4, 2, 8980, // 3, 2
+ 3, 2, 8120, 3, 3, 43461, 4, 2, 5804, 4, 3, 8151, // 3, 3
+ 3, 3, 7598, 3, 4, 45224, 4, 3, 5331, 4, 4, 7383, // 3, 4
+ 3, 4, 7121, 3, 5, 46798, 4, 4, 4909, 4, 5, 6708, // 3, 5
+ 3, 5, 6750, 3, 6, 48037, 4, 5, 4576, 4, 6, 6173, // 3, 6
+ 3, 6, 6552, 3, 7, 48785, 4, 6, 4372, 4, 7, 5827, // 3, 7
+ 2, 7, 4366, 2, 8, 5811, 3, 7, 6558, 3, 8, 48801, // 3, 8
+ 2, 8, 4572, 2, 9, 6154, 3, 8, 6761, 3, 9, 48049, // 3, 9
+ 2, 9, 4906, 2, 10, 6685, 3, 9, 7138, 3, 10, 46807, // 3,10
+ 2, 10, 5330, 2, 11, 7356, 3, 10, 7622, 3, 11, 45228, // 3,11
+ 2, 11, 5804, 2, 12, 8120, 3, 11, 8151, 3, 12, 43461, // 3,12
+ 2, 12, 6299, 2, 13, 8941, 3, 12, 8681, 3, 13, 41615, // 3,13
+ 2, 13, 6797, 2, 14, 9796, 3, 13, 9184, 3, 14, 39759, // 3,14
+ 2, 14, 7285, 2, 15, 10670, 3, 14, 9642, 3, 15, 37939, // 3,15
+ 4, -1, 9072, 4, 0, 39026, 5, -1, 6965, 5, 0, 10473, // 4, 0
+ 4, 0, 8557, 4, 1, 41026, 5, 0, 6440, 5, 1, 9513, // 4, 1
+ 4, 1, 7981, 4, 2, 43105, 5, 1, 5891, 5, 2, 8559, // 4, 2
+ 4, 2, 7356, 4, 3, 45229, 5, 2, 5330, 5, 3, 7621, // 4, 3
+ 4, 3, 6708, 4, 4, 47328, 5, 3, 4774, 5, 4, 6726, // 4, 4
+ 4, 4, 6086, 4, 5, 49275, 5, 4, 4258, 5, 5, 5917, // 4, 5
+ 4, 5, 5573, 4, 6, 50865, 5, 5, 3837, 5, 6, 5261, // 4, 6
+ 4, 6, 5280, 4, 7, 51832, 5, 6, 3579, 5, 7, 4845, // 4, 7
+ 3, 7, 3575, 3, 8, 4835, 4, 7, 5283, 4, 8, 51843, // 4, 8
+ 3, 8, 3834, 3, 9, 5248, 4, 8, 5581, 4, 9, 50873, // 4, 9
+ 3, 9, 4257, 3, 10, 5901, 4, 9, 6099, 4, 10, 49279, // 4,10
+ 3, 10, 4774, 3, 11, 6708, 4, 10, 6727, 4, 11, 47327, // 4,11
+ 3, 11, 5331, 3, 12, 7598, 4, 11, 7382, 4, 12, 45225, // 4,12
+ 3, 12, 5895, 3, 13, 8530, 4, 12, 8015, 4, 13, 43096, // 4,13
+ 3, 13, 6447, 3, 14, 9478, 4, 13, 8599, 4, 14, 41012, // 4,14
+ 3, 14, 6975, 3, 15, 10430, 4, 14, 9122, 4, 15, 39009, // 4,15
+ 5, -1, 8632, 5, 0, 39940, 6, -1, 6699, 6, 0, 10265, // 5, 0
+ 5, 0, 8061, 5, 1, 42105, 6, 0, 6137, 6, 1, 9233, // 5, 1
+ 5, 1, 7411, 5, 2, 44399, 6, 1, 5537, 6, 2, 8189, // 5, 2
+ 5, 2, 6685, 5, 3, 46806, 6, 2, 4906, 6, 3, 7139, // 5, 3
+ 5, 3, 5901, 5, 4, 49279, 6, 3, 4257, 6, 4, 6099, // 5, 4
+ 5, 4, 5103, 5, 5, 51700, 6, 4, 3621, 6, 5, 5112, // 5, 5
+ 5, 5, 4388, 5, 6, 53813, 6, 5, 3065, 6, 6, 4270, // 5, 6
+ 5, 6, 3938, 5, 7, 55162, 6, 6, 2710, 6, 7, 3726, // 5, 7
+ 4, 7, 2708, 4, 8, 3720, 5, 7, 3940, 5, 8, 55168, // 5, 8
+ 4, 8, 3064, 4, 9, 4262, 5, 8, 4394, 5, 9, 53816, // 5, 9
+ 4, 9, 3621, 4, 10, 5103, 5, 9, 5113, 5, 10, 51699, // 5,10
+ 4, 10, 4258, 4, 11, 6086, 5, 10, 5917, 5, 11, 49275, // 5,11
+ 4, 11, 4909, 4, 12, 7121, 5, 11, 6707, 5, 12, 46799, // 5,12
+ 4, 12, 5543, 4, 13, 8167, 5, 12, 7440, 5, 13, 44386, // 5,13
+ 4, 13, 6145, 4, 14, 9206, 5, 13, 8098, 5, 14, 42087, // 5,14
+ 4, 14, 6710, 4, 15, 10232, 5, 14, 8676, 5, 15, 39918, // 5,15
+ 6, -1, 8278, 6, 0, 40646, 7, -1, 6489, 7, 0, 10123, // 6, 0
+ 6, 0, 7667, 6, 1, 42936, 7, 0, 5900, 7, 1, 9033, // 6, 1
+ 6, 1, 6961, 6, 2, 45401, 7, 1, 5261, 7, 2, 7913, // 6, 2
+ 6, 2, 6154, 6, 3, 48049, 7, 2, 4572, 7, 3, 6761, // 6, 3
+ 6, 3, 5248, 6, 4, 50873, 7, 3, 3834, 7, 4, 5581, // 6, 4
+ 6, 4, 4262, 6, 5, 53816, 7, 4, 3064, 7, 5, 4394, // 6, 5
+ 6, 5, 3271, 6, 6, 56673, 7, 5, 2316, 7, 6, 3276, // 6, 6
+ 6, 6, 2532, 6, 7, 58773, 7, 6, 1767, 7, 7, 2464, // 6, 7
+ 5, 7, 1766, 5, 8, 2462, 6, 7, 2533, 6, 8, 58775, // 6, 8
+ 5, 8, 2316, 5, 9, 3271, 6, 8, 3275, 6, 9, 56674, // 6, 9
+ 5, 9, 3065, 5, 10, 4388, 6, 9, 4269, 6, 10, 53814, // 6,10
+ 5, 10, 3837, 5, 11, 5573, 6, 10, 5261, 6, 11, 50865, // 6,11
+ 5, 11, 4576, 5, 12, 6750, 6, 11, 6173, 6, 12, 48037, // 6,12
+ 5, 12, 5268, 5, 13, 7899, 6, 12, 6986, 6, 13, 45383, // 6,13
+ 5, 13, 5910, 5, 14, 9014, 6, 13, 7699, 6, 14, 42913, // 6,14
+ 5, 14, 6502, 5, 15, 10100, 6, 14, 8316, 6, 15, 40618, // 6,15
+ 7, -1, 8018, 7, 0, 41106, 8, -1, 6346, 8, 0, 10066, // 7, 0
+ 7, 0, 7390, 7, 1, 43461, 8, 0, 5745, 8, 1, 8940, // 7, 1
+ 7, 1, 6658, 7, 2, 46017, 8, 1, 5087, 8, 2, 7774, // 7, 2
+ 7, 2, 5811, 7, 3, 48801, 8, 2, 4366, 8, 3, 6558, // 7, 3
+ 7, 3, 4835, 7, 4, 51842, 8, 3, 3575, 8, 4, 5284, // 7, 4
+ 7, 4, 3720, 7, 5, 55168, 8, 4, 2708, 8, 5, 3940, // 7, 5
+ 7, 5, 2462, 7, 6, 58775, 8, 5, 1766, 8, 6, 2533, // 7, 6
+ 7, 6, 1170, 7, 7, 62369, 8, 6, 827, 8, 7, 1170, // 7, 7
+ 6, 7, 827, 6, 8, 1170, 7, 7, 1170, 7, 8, 62369, // 7, 8
+ 6, 8, 1767, 6, 9, 2532, 7, 8, 2464, 7, 9, 58773, // 7, 9
+ 6, 9, 2710, 6, 10, 3938, 7, 9, 3726, 7, 10, 55162, // 7,10
+ 6, 10, 3579, 6, 11, 5280, 7, 10, 4846, 7, 11, 51831, // 7,11
+ 6, 11, 4372, 6, 12, 6552, 7, 11, 5827, 7, 12, 48785, // 7,12
+ 6, 12, 5095, 6, 13, 7766, 7, 12, 6680, 7, 13, 45995, // 7,13
+ 6, 13, 5756, 6, 14, 8929, 7, 13, 7418, 7, 14, 43433, // 7,14
+ 6, 14, 6360, 6, 15, 10052, 7, 14, 8052, 7, 15, 41072, // 7,15
+ 8, 0, 41072, 8, 1, 8052, 9, 0, 10052, 9, 1, 6360, // 8, 0
+ 8, 1, 43433, 8, 2, 7418, 9, 1, 8929, 9, 2, 5756, // 8, 1
+ 8, 2, 45995, 8, 3, 6680, 9, 2, 7766, 9, 3, 5095, // 8, 2
+ 8, 3, 48785, 8, 4, 5827, 9, 3, 6552, 9, 4, 4372, // 8, 3
+ 8, 4, 51832, 8, 5, 4846, 9, 4, 5280, 9, 5, 3578, // 8, 4
+ 8, 5, 55162, 8, 6, 3726, 9, 5, 3938, 9, 6, 2710, // 8, 5
+ 8, 6, 58773, 8, 7, 2464, 9, 6, 2532, 9, 7, 1767, // 8, 6
+ 8, 7, 62369, 8, 8, 1170, 9, 7, 1170, 9, 8, 827, // 8, 7
+ 7, 8, 1170, 7, 9, 827, 8, 8, 62369, 8, 9, 1170, // 8, 8
+ 7, 9, 2533, 7, 10, 1766, 8, 9, 58775, 8, 10, 2462, // 8, 9
+ 7, 10, 3940, 7, 11, 2708, 8, 10, 55168, 8, 11, 3720, // 8,10
+ 7, 11, 5283, 7, 12, 3575, 8, 11, 51842, 8, 12, 4836, // 8,11
+ 7, 12, 6558, 7, 13, 4366, 8, 12, 48801, 8, 13, 5811, // 8,12
+ 7, 13, 7773, 7, 14, 5087, 8, 13, 46017, 8, 14, 6659, // 8,13
+ 7, 14, 8939, 7, 15, 5745, 8, 14, 43461, 8, 15, 7391, // 8,14
+ 7, 15, 10066, 7, 16, 6346, 8, 15, 41106, 8, 16, 8018, // 8,15
+ 9, 0, 40618, 9, 1, 8316, 10, 0, 10100, 10, 1, 6502, // 9, 0
+ 9, 1, 42913, 9, 2, 7699, 10, 1, 9014, 10, 2, 5910, // 9, 1
+ 9, 2, 45383, 9, 3, 6986, 10, 2, 7899, 10, 3, 5268, // 9, 2
+ 9, 3, 48037, 9, 4, 6173, 10, 3, 6750, 10, 4, 4576, // 9, 3
+ 9, 4, 50865, 9, 5, 5261, 10, 4, 5573, 10, 5, 3837, // 9, 4
+ 9, 5, 53813, 9, 6, 4269, 10, 5, 4388, 10, 6, 3066, // 9, 5
+ 9, 6, 56673, 9, 7, 3275, 10, 6, 3271, 10, 7, 2317, // 9, 6
+ 9, 7, 58775, 9, 8, 2533, 10, 7, 2462, 10, 8, 1766, // 9, 7
+ 8, 8, 2464, 8, 9, 1767, 9, 8, 58773, 9, 9, 2532, // 9, 8
+ 8, 9, 3275, 8, 10, 2316, 9, 9, 56673, 9, 10, 3272, // 9, 9
+ 8, 10, 4394, 8, 11, 3064, 9, 10, 53816, 9, 11, 4262, // 9,10
+ 8, 11, 5581, 8, 12, 3834, 9, 11, 50873, 9, 12, 5248, // 9,11
+ 8, 12, 6761, 8, 13, 4572, 9, 12, 48049, 9, 13, 6154, // 9,12
+ 8, 13, 7913, 8, 14, 5261, 9, 13, 45401, 9, 14, 6961, // 9,13
+ 8, 14, 9032, 8, 15, 5900, 9, 14, 42936, 9, 15, 7668, // 9,14
+ 8, 15, 10123, 8, 16, 6489, 9, 15, 40646, 9, 16, 8278, // 9,15
+ 10, 0, 39918, 10, 1, 8676, 11, 0, 10232, 11, 1, 6710, // 10, 0
+ 10, 1, 42087, 10, 2, 8098, 11, 1, 9206, 11, 2, 6145, // 10, 1
+ 10, 2, 44386, 10, 3, 7440, 11, 2, 8167, 11, 3, 5543, // 10, 2
+ 10, 3, 46798, 10, 4, 6707, 11, 3, 7121, 11, 4, 4910, // 10, 3
+ 10, 4, 49275, 10, 5, 5917, 11, 4, 6086, 11, 5, 4258, // 10, 4
+ 10, 5, 51700, 10, 6, 5113, 11, 5, 5103, 11, 6, 3620, // 10, 5
+ 10, 6, 53816, 10, 7, 4394, 11, 6, 4262, 11, 7, 3064, // 10, 6
+ 10, 7, 55168, 10, 8, 3940, 11, 7, 3720, 11, 8, 2708, // 10, 7
+ 9, 8, 3726, 9, 9, 2710, 10, 8, 55162, 10, 9, 3938, // 10, 8
+ 9, 9, 4269, 9, 10, 3065, 10, 9, 53813, 10, 10, 4389, // 10, 9
+ 9, 10, 5113, 9, 11, 3621, 10, 10, 51700, 10, 11, 5102, // 10,10
+ 9, 11, 6099, 9, 12, 4257, 10, 11, 49279, 10, 12, 5901, // 10,11
+ 9, 12, 7138, 9, 13, 4906, 10, 12, 46806, 10, 13, 6686, // 10,12
+ 9, 13, 8189, 9, 14, 5537, 10, 13, 44399, 10, 14, 7411, // 10,13
+ 9, 14, 9233, 9, 15, 6137, 10, 14, 42105, 10, 15, 8061, // 10,14
+ 9, 15, 10265, 9, 16, 6699, 10, 15, 39940, 10, 16, 8632, // 10,15
+ 11, 0, 39009, 11, 1, 9122, 12, 0, 10430, 12, 1, 6975, // 11, 0
+ 11, 1, 41013, 11, 2, 8599, 12, 1, 9478, 12, 2, 6446, // 11, 1
+ 11, 2, 43096, 11, 3, 8015, 12, 2, 8530, 12, 3, 5895, // 11, 2
+ 11, 3, 45224, 11, 4, 7382, 12, 3, 7598, 12, 4, 5332, // 11, 3
+ 11, 4, 47328, 11, 5, 6727, 12, 4, 6708, 12, 5, 4773, // 11, 4
+ 11, 5, 49279, 11, 6, 6099, 12, 5, 5901, 12, 6, 4257, // 11, 5
+ 11, 6, 50873, 11, 7, 5581, 12, 6, 5248, 12, 7, 3834, // 11, 6
+ 11, 7, 51842, 11, 8, 5283, 12, 7, 4835, 12, 8, 3576, // 11, 7
+ 10, 8, 4846, 10, 9, 3579, 11, 8, 51832, 11, 9, 5279, // 11, 8
+ 10, 9, 5261, 10, 10, 3837, 11, 9, 50865, 11, 10, 5573, // 11, 9
+ 10, 10, 5917, 10, 11, 4258, 11, 10, 49275, 11, 11, 6086, // 11,10
+ 10, 11, 6727, 10, 12, 4774, 11, 11, 47328, 11, 12, 6707, // 11,11
+ 10, 12, 7622, 10, 13, 5330, 11, 12, 45229, 11, 13, 7355, // 11,12
+ 10, 13, 8559, 10, 14, 5891, 11, 13, 43105, 11, 14, 7981, // 11,13
+ 10, 14, 9513, 10, 15, 6440, 11, 14, 41026, 11, 15, 8557, // 11,14
+ 10, 15, 10473, 10, 16, 6965, 11, 15, 39026, 11, 16, 9072, // 11,15
+ 12, 0, 37939, 12, 1, 9642, 13, 0, 10670, 13, 1, 7285, // 12, 0
+ 12, 1, 39759, 12, 2, 9184, 13, 1, 9796, 13, 2, 6797, // 12, 1
+ 12, 2, 41614, 12, 3, 8681, 13, 2, 8941, 13, 3, 6300, // 12, 2
+ 12, 3, 43461, 12, 4, 8151, 13, 3, 8120, 13, 4, 5804, // 12, 3
+ 12, 4, 45229, 12, 5, 7622, 13, 4, 7356, 13, 5, 5329, // 12, 4
+ 12, 5, 46806, 12, 6, 7138, 13, 5, 6685, 13, 6, 4907, // 12, 5
+ 12, 6, 48049, 12, 7, 6761, 13, 6, 6154, 13, 7, 4572, // 12, 6
+ 12, 7, 48801, 12, 8, 6558, 13, 7, 5811, 13, 8, 4366, // 12, 7
+ 11, 8, 5827, 11, 9, 4372, 12, 8, 48785, 12, 9, 6552, // 12, 8
+ 11, 9, 6173, 11, 10, 4576, 12, 9, 48037, 12, 10, 6750, // 12, 9
+ 11, 10, 6707, 11, 11, 4909, 12, 10, 46798, 12, 11, 7122, // 12,10
+ 11, 11, 7382, 11, 12, 5331, 12, 11, 45224, 12, 12, 7599, // 12,11
+ 11, 12, 8151, 11, 13, 5804, 12, 12, 43461, 12, 13, 8120, // 12,12
+ 11, 13, 8979, 11, 14, 6297, 12, 13, 41618, 12, 14, 8642, // 12,13
+ 11, 14, 9841, 11, 15, 6792, 12, 14, 39767, 12, 15, 9136, // 12,14
+ 11, 15, 10723, 11, 16, 7276, 12, 15, 37951, 12, 16, 9586, // 12,15
+ 13, 0, 36756, 13, 1, 10224, 14, 0, 10930, 14, 1, 7626, // 13, 0
+ 13, 1, 38390, 13, 2, 9834, 14, 1, 10133, 14, 2, 7179, // 13, 1
+ 13, 2, 40025, 13, 3, 9413, 14, 2, 9366, 14, 3, 6732, // 13, 2
+ 13, 3, 41618, 13, 4, 8979, 14, 3, 8641, 14, 4, 6298, // 13, 3
+ 13, 4, 43105, 13, 5, 8559, 14, 4, 7981, 14, 5, 5891, // 13, 4
+ 13, 5, 44399, 13, 6, 8189, 14, 5, 7411, 14, 6, 5537, // 13, 5
+ 13, 6, 45401, 13, 7, 7913, 14, 6, 6961, 14, 7, 5261, // 13, 6
+ 13, 7, 46017, 13, 8, 7773, 14, 7, 6658, 14, 8, 5088, // 13, 7
+ 12, 8, 6680, 12, 9, 5095, 13, 8, 45995, 13, 9, 7766, // 13, 8
+ 12, 9, 6986, 12, 10, 5268, 13, 9, 45383, 13, 10, 7899, // 13, 9
+ 12, 10, 7440, 12, 11, 5543, 13, 10, 44386, 13, 11, 8167, // 13,10
+ 12, 11, 8015, 12, 12, 5895, 13, 11, 43096, 13, 12, 8530, // 13,11
+ 12, 12, 8681, 12, 13, 6299, 13, 12, 41614, 13, 13, 8942, // 13,12
+ 12, 13, 9413, 12, 14, 6732, 13, 13, 40025, 13, 14, 9366, // 13,13
+ 12, 14, 10188, 12, 15, 7177, 13, 14, 38394, 13, 15, 9777, // 13,14
+ 12, 15, 10994, 12, 16, 7620, 13, 15, 36764, 13, 16, 10158, // 13,15
+ 14, 0, 35502, 14, 1, 10855, 15, 0, 11192, 15, 1, 7987, // 14, 0
+ 14, 1, 36959, 14, 2, 10532, 15, 1, 10467, 15, 2, 7578, // 14, 1
+ 14, 2, 38394, 14, 3, 10188, 15, 2, 9777, 15, 3, 7177, // 14, 2
+ 14, 3, 39767, 14, 4, 9841, 15, 3, 9135, 15, 4, 6793, // 14, 3
+ 14, 4, 41026, 14, 5, 9513, 15, 4, 8557, 15, 5, 6440, // 14, 4
+ 14, 5, 42105, 14, 6, 9233, 15, 5, 8061, 15, 6, 6137, // 14, 5
+ 14, 6, 42936, 14, 7, 9032, 15, 6, 7667, 15, 7, 5901, // 14, 6
+ 14, 7, 43461, 14, 8, 8939, 15, 7, 7390, 15, 8, 5746, // 14, 7
+ 13, 8, 7418, 13, 9, 5756, 14, 8, 43433, 14, 9, 8929, // 14, 8
+ 13, 9, 7699, 13, 10, 5910, 14, 9, 42913, 14, 10, 9014, // 14, 9
+ 13, 10, 8098, 13, 11, 6145, 14, 10, 42087, 14, 11, 9206, // 14,10
+ 13, 11, 8599, 13, 12, 6447, 14, 11, 41013, 14, 12, 9477, // 14,11
+ 13, 12, 9184, 13, 13, 6797, 14, 12, 39759, 14, 13, 9796, // 14,12
+ 13, 13, 9834, 13, 14, 7179, 14, 13, 38390, 14, 14, 10133, // 14,13
+ 13, 14, 10532, 13, 15, 7579, 14, 14, 36959, 14, 15, 10466, // 14,14
+ 13, 15, 11267, 13, 16, 7983, 14, 15, 35506, 14, 16, 10780, // 14,15
+ 15, 0, 34212, 15, 1, 11526, 16, 0, 11440, 16, 1, 8358, // 15, 0
+ 15, 1, 35506, 15, 2, 11267, 16, 1, 10780, 16, 2, 7983, // 15, 1
+ 15, 2, 36764, 15, 3, 10994, 16, 2, 10158, 16, 3, 7620, // 15, 2
+ 15, 3, 37951, 15, 4, 10723, 16, 3, 9585, 16, 4, 7277, // 15, 3
+ 15, 4, 39026, 15, 5, 10473, 16, 4, 9072, 16, 5, 6965, // 15, 4
+ 15, 5, 39940, 15, 6, 10265, 16, 5, 8632, 16, 6, 6699, // 15, 5
+ 15, 6, 40646, 15, 7, 10123, 16, 6, 8278, 16, 7, 6489, // 15, 6
+ 15, 7, 41106, 15, 8, 10066, 16, 7, 8018, 16, 8, 6346, // 15, 7
+ 14, 8, 8052, 14, 9, 6360, 15, 8, 41072, 15, 9, 10052, // 15, 8
+ 14, 9, 8316, 14, 10, 6502, 15, 9, 40618, 15, 10, 10100, // 15, 9
+ 14, 10, 8676, 14, 11, 6710, 15, 10, 39918, 15, 11, 10232, // 15,10
+ 14, 11, 9122, 14, 12, 6975, 15, 11, 39009, 15, 12, 10430, // 15,11
+ 14, 12, 9642, 14, 13, 7285, 15, 12, 37939, 15, 13, 10670, // 15,12
+ 14, 13, 10224, 14, 14, 7626, 15, 13, 36756, 15, 14, 10930, // 15,13
+ 14, 14, 10855, 14, 15, 7987, 15, 14, 35502, 15, 15, 11192, // 15,14
+ 14, 15, 11526, 14, 16, 8358, 15, 15, 34212, 15, 16, 11440, // 15,15
+ // angle of 2.0 degrees
+ 0, -1, 13368, 0, 0, 28495, 1, -1, 10104, 1, 0, 13569, // 0, 0
+ 0, 0, 13291, 0, 1, 29828, 1, 0, 9671, 1, 1, 12746, // 0, 1
+ 0, 1, 13176, 0, 2, 31138, 1, 1, 9245, 1, 2, 11977, // 0, 2
+ 0, 2, 13038, 0, 3, 32391, 1, 2, 8838, 1, 3, 11269, // 0, 3
+ 0, 3, 12899, 0, 4, 33539, 1, 3, 8463, 1, 4, 10635, // 0, 4
+ 0, 4, 12783, 0, 5, 34532, 1, 4, 8135, 1, 5, 10086, // 0, 5
+ 0, 5, 12717, 0, 6, 35315, 1, 5, 7868, 1, 6, 9636, // 0, 6
+ 0, 6, 12728, 0, 7, 35844, 1, 6, 7674, 1, 7, 9290, // 0, 7
+ -1, 7, 7643, -1, 8, 9224, 0, 7, 12764, 0, 8, 35905, // 0, 8
+ -1, 8, 7839, -1, 9, 9558, 0, 8, 12777, 0, 9, 35362, // 0, 9
+ -1, 9, 8107, -1, 10, 9995, 0, 9, 12867, 0, 10, 34567, // 0,10
+ -1, 10, 8438, -1, 11, 10528, 0, 10, 13007, 0, 11, 33563, // 0,11
+ -1, 11, 8816, -1, 12, 11143, 0, 11, 13171, 0, 12, 32406, // 0,12
+ -1, 12, 9229, -1, 13, 11829, 0, 12, 13332, 0, 13, 31146, // 0,13
+ -1, 13, 9662, -1, 14, 12574, 0, 13, 13470, 0, 14, 29830, // 0,14
+ -1, 14, 10104, -1, 15, 13368, 0, 14, 13569, 0, 15, 28495, // 0,15
+ 1, -1, 12574, 1, 0, 29831, 2, -1, 9662, 2, 0, 13469, // 1, 0
+ 1, 0, 12412, 1, 1, 31358, 2, 0, 9202, 2, 1, 12564, // 1, 1
+ 1, 1, 12203, 1, 2, 32881, 2, 1, 8742, 2, 2, 11710, // 1, 2
+ 1, 2, 11964, 1, 3, 34358, 2, 2, 8296, 2, 3, 10918, // 1, 3
+ 1, 3, 11721, 1, 4, 35730, 2, 3, 7881, 2, 4, 10204, // 1, 4
+ 1, 4, 11507, 1, 5, 36926, 2, 4, 7517, 2, 5, 9586, // 1, 5
+ 1, 5, 11360, 1, 6, 37866, 2, 5, 7224, 2, 6, 9086, // 1, 6
+ 1, 6, 11317, 1, 7, 38481, 2, 6, 7020, 2, 7, 8718, // 1, 7
+ 0, 7, 6997, 0, 8, 8662, 1, 7, 11344, 1, 8, 38533, // 1, 8
+ 0, 8, 7202, 0, 9, 9020, 1, 8, 11407, 1, 9, 37907, // 1, 9
+ 0, 9, 7497, 0, 10, 9509, 1, 9, 11575, 1, 10, 36955, // 1,10
+ 0, 10, 7865, 0, 11, 10111, 1, 10, 11810, 1, 11, 35750, // 1,11
+ 0, 11, 8284, 0, 12, 10808, 1, 11, 12074, 1, 12, 34370, // 1,12
+ 0, 12, 8735, 0, 13, 11580, 1, 12, 12334, 1, 13, 32887, // 1,13
+ 0, 13, 9202, 0, 14, 12412, 1, 13, 12564, 1, 14, 31358, // 1,14
+ 0, 14, 9671, 0, 15, 13291, 1, 14, 12746, 1, 15, 29828, // 1,15
+ 2, -1, 11829, 2, 0, 31146, 3, -1, 9229, 3, 0, 13332, // 2, 0
+ 2, 0, 11580, 2, 1, 32886, 3, 0, 8735, 3, 1, 12335, // 2, 1
+ 2, 1, 11272, 2, 2, 34650, 3, 1, 8232, 3, 2, 11382, // 2, 2
+ 2, 2, 10922, 2, 3, 36392, 3, 2, 7734, 3, 3, 10488, // 2, 3
+ 2, 3, 10559, 2, 4, 38042, 3, 3, 7261, 3, 4, 9674, // 2, 4
+ 2, 4, 10226, 2, 5, 39503, 3, 4, 6842, 3, 5, 8965, // 2, 5
+ 2, 5, 9977, 2, 6, 40656, 3, 5, 6506, 3, 6, 8397, // 2, 6
+ 2, 6, 9867, 2, 7, 41389, 3, 6, 6284, 3, 7, 7996, // 2, 7
+ 1, 7, 6266, 1, 8, 7951, 2, 7, 9886, 2, 8, 41433, // 2, 8
+ 1, 8, 6491, 1, 9, 8344, 2, 8, 10013, 2, 9, 40688, // 2, 9
+ 1, 9, 6829, 1, 10, 8902, 2, 9, 10279, 2, 10, 39526, // 2,10
+ 1, 10, 7252, 1, 11, 9597, 2, 10, 10630, 2, 11, 38057, // 2,11
+ 1, 11, 7728, 1, 12, 10397, 2, 11, 11012, 2, 12, 36399, // 2,12
+ 1, 12, 8232, 1, 13, 11272, 2, 12, 11382, 2, 13, 34650, // 2,13
+ 1, 13, 8742, 1, 14, 12203, 2, 13, 11709, 2, 14, 32882, // 2,14
+ 1, 14, 9245, 1, 15, 13176, 2, 14, 11977, 2, 15, 31138, // 2,15
+ 3, -1, 11143, 3, 0, 32406, 4, -1, 8816, 4, 0, 13171, // 3, 0
+ 3, 0, 10808, 3, 1, 34369, 4, 0, 8284, 4, 1, 12075, // 3, 1
+ 3, 1, 10397, 3, 2, 36399, 4, 1, 7728, 4, 2, 11012, // 3, 2
+ 3, 2, 9924, 3, 3, 38450, 4, 2, 7164, 4, 3, 9998, // 3, 3
+ 3, 3, 9421, 3, 4, 40444, 4, 3, 6615, 4, 4, 9056, // 3, 4
+ 3, 4, 8940, 3, 5, 42256, 4, 4, 6116, 4, 5, 8224, // 3, 5
+ 3, 5, 8558, 3, 6, 43710, 4, 5, 5712, 4, 6, 7556, // 3, 6
+ 3, 6, 8359, 3, 7, 44616, 4, 6, 5454, 4, 7, 7107, // 3, 7
+ 2, 7, 5443, 2, 8, 7072, 3, 7, 8373, 3, 8, 44648, // 3, 8
+ 2, 8, 5703, 2, 9, 7516, 3, 8, 8584, 3, 9, 43733, // 3, 9
+ 2, 9, 6108, 2, 10, 8175, 3, 9, 8982, 3, 10, 42271, // 3,10
+ 2, 10, 6611, 2, 11, 8995, 3, 10, 9478, 3, 11, 40452, // 3,11
+ 2, 11, 7164, 2, 12, 9924, 3, 11, 9998, 3, 12, 38450, // 3,12
+ 2, 12, 7734, 2, 13, 10922, 3, 12, 10488, 3, 13, 36392, // 3,13
+ 2, 13, 8296, 2, 14, 11964, 3, 13, 10918, 3, 14, 34358, // 3,14
+ 2, 14, 8838, 2, 15, 13038, 3, 14, 11269, 3, 15, 32391, // 3,15
+ 4, -1, 10528, 4, 0, 33564, 5, -1, 8438, 5, 0, 13006, // 4, 0
+ 4, 0, 10111, 4, 1, 35750, 5, 0, 7865, 5, 1, 11810, // 4, 1
+ 4, 1, 9597, 4, 2, 38057, 5, 1, 7252, 5, 2, 10630, // 4, 2
+ 4, 2, 8995, 4, 3, 40452, 5, 2, 6611, 5, 3, 9478, // 4, 3
+ 4, 3, 8332, 4, 4, 42861, 5, 3, 5965, 5, 4, 8378, // 4, 4
+ 4, 4, 7667, 4, 5, 45139, 5, 4, 5353, 5, 5, 7377, // 4, 5
+ 4, 5, 7100, 4, 6, 47035, 5, 5, 4843, 5, 6, 6558, // 4, 6
+ 4, 6, 6774, 4, 7, 48218, 5, 6, 4521, 5, 7, 6023, // 4, 7
+ 3, 7, 4513, 3, 8, 6000, 4, 7, 6783, 4, 8, 48240, // 4, 8
+ 3, 8, 4838, 3, 9, 6530, 4, 8, 7119, 4, 9, 47049, // 4, 9
+ 3, 9, 5350, 3, 10, 7342, 4, 9, 7698, 4, 10, 45146, // 4,10
+ 3, 10, 5965, 3, 11, 8332, 4, 10, 8378, 4, 11, 42861, // 4,11
+ 3, 11, 6615, 3, 12, 9421, 4, 11, 9056, 4, 12, 40444, // 4,12
+ 3, 12, 7261, 3, 13, 10559, 4, 12, 9674, 4, 13, 38042, // 4,13
+ 3, 13, 7881, 3, 14, 11721, 4, 13, 10204, 4, 14, 35730, // 4,14
+ 3, 14, 8463, 3, 15, 12899, 4, 14, 10635, 4, 15, 33539, // 4,15
+ 5, -1, 9995, 5, 0, 34567, 6, -1, 8107, 6, 0, 12867, // 5, 0
+ 5, 0, 9509, 5, 1, 36955, 6, 0, 7497, 6, 1, 11575, // 5, 1
+ 5, 1, 8902, 5, 2, 39526, 6, 1, 6829, 6, 2, 10279, // 5, 2
+ 5, 2, 8175, 5, 3, 42271, 6, 2, 6108, 6, 3, 8982, // 5, 3
+ 5, 3, 7342, 5, 4, 45146, 6, 3, 5350, 6, 4, 7698, // 5, 4
+ 5, 4, 6451, 5, 5, 48019, 6, 4, 4591, 6, 5, 6475, // 5, 5
+ 5, 5, 5624, 5, 6, 50581, 6, 5, 3913, 6, 6, 5418, // 5, 6
+ 5, 6, 5092, 5, 7, 52253, 6, 6, 3470, 6, 7, 4721, // 5, 7
+ 4, 7, 3466, 4, 8, 4708, 5, 7, 5097, 5, 8, 52265, // 5, 8
+ 4, 8, 3911, 4, 9, 5400, 5, 8, 5637, 5, 9, 50588, // 5, 9
+ 4, 9, 4591, 4, 10, 6451, 5, 9, 6475, 5, 10, 48019, // 5,10
+ 4, 10, 5353, 4, 11, 7667, 5, 10, 7377, 5, 11, 45139, // 5,11
+ 4, 11, 6116, 4, 12, 8940, 5, 11, 8224, 5, 12, 42256, // 5,12
+ 4, 12, 6842, 4, 13, 10226, 5, 12, 8966, 5, 13, 39502, // 5,13
+ 4, 13, 7517, 4, 14, 11507, 5, 13, 9587, 5, 14, 36925, // 5,14
+ 4, 14, 8135, 4, 15, 12783, 5, 14, 10086, 5, 15, 34532, // 5,15
+ 6, -1, 9558, 6, 0, 35362, 7, -1, 7839, 7, 0, 12777, // 6, 0
+ 6, 0, 9020, 6, 1, 37906, 7, 0, 7202, 7, 1, 11408, // 6, 1
+ 6, 1, 8344, 6, 2, 40688, 7, 1, 6491, 7, 2, 10013, // 6, 2
+ 6, 2, 7516, 6, 3, 43733, 7, 2, 5703, 7, 3, 8584, // 6, 3
+ 6, 3, 6530, 6, 4, 47049, 7, 3, 4838, 7, 4, 7119, // 6, 4
+ 6, 4, 5400, 6, 5, 50587, 7, 4, 3911, 7, 5, 5638, // 6, 5
+ 6, 5, 4217, 6, 6, 54105, 7, 5, 2989, 7, 6, 4225, // 6, 6
+ 6, 6, 3303, 6, 7, 56751, 7, 6, 2295, 7, 7, 3187, // 6, 7
+ 5, 7, 2294, 5, 8, 3180, 6, 7, 3306, 6, 8, 56756, // 6, 8
+ 5, 8, 2989, 5, 9, 4217, 6, 8, 4225, 6, 9, 54105, // 6, 9
+ 5, 9, 3913, 5, 10, 5624, 6, 9, 5418, 6, 10, 50581, // 6,10
+ 5, 10, 4843, 5, 11, 7100, 6, 10, 6558, 6, 11, 47035, // 6,11
+ 5, 11, 5712, 5, 12, 8558, 6, 11, 7556, 6, 12, 43710, // 6,12
+ 5, 12, 6506, 5, 13, 9977, 6, 12, 8397, 6, 13, 40656, // 6,13
+ 5, 13, 7224, 5, 14, 11360, 6, 13, 9086, 6, 14, 37866, // 6,14
+ 5, 14, 7868, 5, 15, 12717, 6, 14, 9635, 6, 15, 35316, // 6,15
+ 7, -1, 9224, 7, 0, 35905, 8, -1, 7643, 8, 0, 12764, // 7, 0
+ 7, 0, 8662, 7, 1, 38534, 8, 0, 6997, 8, 1, 11343, // 7, 1
+ 7, 1, 7951, 7, 2, 41432, 8, 1, 6266, 8, 2, 9887, // 7, 2
+ 7, 2, 7072, 7, 3, 44649, 8, 2, 5443, 8, 3, 8372, // 7, 3
+ 7, 3, 6000, 7, 4, 48240, 8, 3, 4513, 8, 4, 6783, // 7, 4
+ 7, 4, 4708, 7, 5, 52266, 8, 4, 3466, 8, 5, 5096, // 7, 5
+ 7, 5, 3180, 7, 6, 56756, 8, 5, 2294, 8, 6, 3306, // 7, 6
+ 7, 6, 1541, 7, 7, 61364, 8, 6, 1090, 8, 7, 1541, // 7, 7
+ 6, 7, 1090, 6, 8, 1541, 7, 7, 1542, 7, 8, 61363, // 7, 8
+ 6, 8, 2295, 6, 9, 3303, 7, 8, 3186, 7, 9, 56752, // 7, 9
+ 6, 9, 3470, 6, 10, 5092, 7, 9, 4721, 7, 10, 52253, // 7,10
+ 6, 10, 4521, 6, 11, 6774, 7, 10, 6023, 7, 11, 48218, // 7,11
+ 6, 11, 5454, 6, 12, 8359, 7, 11, 7106, 7, 12, 44617, // 7,12
+ 6, 12, 6284, 6, 13, 9867, 7, 12, 7996, 7, 13, 41389, // 7,13
+ 6, 13, 7020, 6, 14, 11317, 7, 13, 8718, 7, 14, 38481, // 7,14
+ 6, 14, 7674, 6, 15, 12728, 7, 14, 9290, 7, 15, 35844, // 7,15
+ 8, 0, 35844, 8, 1, 9290, 9, 0, 12728, 9, 1, 7674, // 8, 0
+ 8, 1, 38481, 8, 2, 8718, 9, 1, 11317, 9, 2, 7020, // 8, 1
+ 8, 2, 41389, 8, 3, 7996, 9, 2, 9867, 9, 3, 6284, // 8, 2
+ 8, 3, 44616, 8, 4, 7106, 9, 3, 8359, 9, 4, 5455, // 8, 3
+ 8, 4, 48218, 8, 5, 6023, 9, 4, 6774, 9, 5, 4521, // 8, 4
+ 8, 5, 52253, 8, 6, 4721, 9, 5, 5092, 9, 6, 3470, // 8, 5
+ 8, 6, 56751, 8, 7, 3186, 9, 6, 3303, 9, 7, 2296, // 8, 6
+ 8, 7, 61364, 8, 8, 1542, 9, 7, 1541, 9, 8, 1089, // 8, 7
+ 7, 8, 1542, 7, 9, 1090, 8, 8, 61364, 8, 9, 1540, // 8, 8
+ 7, 9, 3306, 7, 10, 2294, 8, 9, 56756, 8, 10, 3180, // 8, 9
+ 7, 10, 5097, 7, 11, 3466, 8, 10, 52266, 8, 11, 4707, // 8,10
+ 7, 11, 6783, 7, 12, 4513, 8, 11, 48240, 8, 12, 6000, // 8,11
+ 7, 12, 8373, 7, 13, 5443, 8, 12, 44649, 8, 13, 7071, // 8,12
+ 7, 13, 9886, 7, 14, 6266, 8, 13, 41432, 8, 14, 7952, // 8,13
+ 7, 14, 11344, 7, 15, 6997, 8, 14, 38534, 8, 15, 8661, // 8,14
+ 7, 15, 12764, 7, 16, 7643, 8, 15, 35905, 8, 16, 9224, // 8,15
+ 9, 0, 35315, 9, 1, 9635, 10, 0, 12717, 10, 1, 7869, // 9, 0
+ 9, 1, 37866, 9, 2, 9086, 10, 1, 11360, 10, 2, 7224, // 9, 1
+ 9, 2, 40656, 9, 3, 8397, 10, 2, 9977, 10, 3, 6506, // 9, 2
+ 9, 3, 43710, 9, 4, 7556, 10, 3, 8558, 10, 4, 5712, // 9, 3
+ 9, 4, 47035, 9, 5, 6558, 10, 4, 7100, 10, 5, 4843, // 9, 4
+ 9, 5, 50581, 9, 6, 5418, 10, 5, 5624, 10, 6, 3913, // 9, 5
+ 9, 6, 54105, 9, 7, 4225, 10, 6, 4217, 10, 7, 2989, // 9, 6
+ 9, 7, 56756, 9, 8, 3306, 10, 7, 3180, 10, 8, 2294, // 9, 7
+ 8, 8, 3186, 8, 9, 2295, 9, 8, 56751, 9, 9, 3304, // 9, 8
+ 8, 9, 4225, 8, 10, 2989, 9, 9, 54105, 9, 10, 4217, // 9, 9
+ 8, 10, 5637, 8, 11, 3911, 9, 10, 50587, 9, 11, 5401, // 9,10
+ 8, 11, 7119, 8, 12, 4838, 9, 11, 47049, 9, 12, 6530, // 9,11
+ 8, 12, 8584, 8, 13, 5703, 9, 12, 43733, 9, 13, 7516, // 9,12
+ 8, 13, 10013, 8, 14, 6491, 9, 13, 40688, 9, 14, 8344, // 9,13
+ 8, 14, 11407, 8, 15, 7202, 9, 14, 37906, 9, 15, 9021, // 9,14
+ 8, 15, 12777, 8, 16, 7839, 9, 15, 35362, 9, 16, 9558, // 9,15
+ 10, 0, 34532, 10, 1, 10086, 11, 0, 12783, 11, 1, 8135, // 10, 0
+ 10, 1, 36926, 10, 2, 9587, 11, 1, 11507, 11, 2, 7516, // 10, 1
+ 10, 2, 39503, 10, 3, 8966, 11, 2, 10226, 11, 3, 6841, // 10, 2
+ 10, 3, 42256, 10, 4, 8224, 11, 3, 8940, 11, 4, 6116, // 10, 3
+ 10, 4, 45139, 10, 5, 7377, 11, 4, 7667, 11, 5, 5353, // 10, 4
+ 10, 5, 48019, 10, 6, 6475, 11, 5, 6451, 11, 6, 4591, // 10, 5
+ 10, 6, 50587, 10, 7, 5637, 11, 6, 5400, 11, 7, 3912, // 10, 6
+ 10, 7, 52266, 10, 8, 5097, 11, 7, 4708, 11, 8, 3465, // 10, 7
+ 9, 8, 4721, 9, 9, 3470, 10, 8, 52253, 10, 9, 5092, // 10, 8
+ 9, 9, 5418, 9, 10, 3913, 10, 9, 50581, 10, 10, 5624, // 10, 9
+ 9, 10, 6475, 9, 11, 4591, 10, 10, 48019, 10, 11, 6451, // 10,10
+ 9, 11, 7698, 9, 12, 5350, 10, 11, 45146, 10, 12, 7342, // 10,11
+ 9, 12, 8982, 9, 13, 6108, 10, 12, 42271, 10, 13, 8175, // 10,12
+ 9, 13, 10279, 9, 14, 6829, 10, 13, 39526, 10, 14, 8902, // 10,13
+ 9, 14, 11575, 9, 15, 7497, 10, 14, 36955, 10, 15, 9509, // 10,14
+ 9, 15, 12867, 9, 16, 8107, 10, 15, 34567, 10, 16, 9995, // 10,15
+ 11, 0, 33539, 11, 1, 10635, 12, 0, 12899, 12, 1, 8463, // 11, 0
+ 11, 1, 35730, 11, 2, 10204, 12, 1, 11721, 12, 2, 7881, // 11, 1
+ 11, 2, 38042, 11, 3, 9674, 12, 2, 10559, 12, 3, 7261, // 11, 2
+ 11, 3, 40444, 11, 4, 9056, 12, 3, 9421, 12, 4, 6615, // 11, 3
+ 11, 4, 42861, 11, 5, 8378, 12, 4, 8332, 12, 5, 5965, // 11, 4
+ 11, 5, 45146, 11, 6, 7698, 12, 5, 7342, 12, 6, 5350, // 11, 5
+ 11, 6, 47049, 11, 7, 7119, 12, 6, 6530, 12, 7, 4838, // 11, 6
+ 11, 7, 48240, 11, 8, 6783, 12, 7, 6000, 12, 8, 4513, // 11, 7
+ 10, 8, 6023, 10, 9, 4521, 11, 8, 48218, 11, 9, 6774, // 11, 8
+ 10, 9, 6558, 10, 10, 4843, 11, 9, 47035, 11, 10, 7100, // 11, 9
+ 10, 10, 7377, 10, 11, 5353, 11, 10, 45139, 11, 11, 7667, // 11,10
+ 10, 11, 8378, 10, 12, 5965, 11, 11, 42861, 11, 12, 8332, // 11,11
+ 10, 12, 9478, 10, 13, 6611, 11, 12, 40452, 11, 13, 8995, // 11,12
+ 10, 13, 10630, 10, 14, 7252, 11, 13, 38057, 11, 14, 9597, // 11,13
+ 10, 14, 11810, 10, 15, 7865, 11, 14, 35750, 11, 15, 10111, // 11,14
+ 10, 15, 13007, 10, 16, 8438, 11, 15, 33564, 11, 16, 10527, // 11,15
+ 12, 0, 32391, 12, 1, 11269, 13, 0, 13038, 13, 1, 8838, // 12, 0
+ 12, 1, 34358, 12, 2, 10918, 13, 1, 11964, 13, 2, 8296, // 12, 1
+ 12, 2, 36392, 12, 3, 10488, 13, 2, 10922, 13, 3, 7734, // 12, 2
+ 12, 3, 38450, 12, 4, 9998, 13, 3, 9924, 13, 4, 7164, // 12, 3
+ 12, 4, 40452, 12, 5, 9478, 13, 4, 8995, 13, 5, 6611, // 12, 4
+ 12, 5, 42271, 12, 6, 8982, 13, 5, 8175, 13, 6, 6108, // 12, 5
+ 12, 6, 43733, 12, 7, 8584, 13, 6, 7516, 13, 7, 5703, // 12, 6
+ 12, 7, 44649, 12, 8, 8373, 13, 7, 7072, 13, 8, 5442, // 12, 7
+ 11, 8, 7106, 11, 9, 5454, 12, 8, 44616, 12, 9, 8360, // 12, 8
+ 11, 9, 7556, 11, 10, 5712, 12, 9, 43710, 12, 10, 8558, // 12, 9
+ 11, 10, 8224, 11, 11, 6116, 12, 10, 42256, 12, 11, 8940, // 12,10
+ 11, 11, 9056, 11, 12, 6615, 12, 11, 40444, 12, 12, 9421, // 12,11
+ 11, 12, 9998, 11, 13, 7164, 12, 12, 38450, 12, 13, 9924, // 12,12
+ 11, 13, 11012, 11, 14, 7728, 12, 13, 36399, 12, 14, 10397, // 12,13
+ 11, 14, 12074, 11, 15, 8284, 12, 14, 34369, 12, 15, 10809, // 12,14
+ 11, 15, 13171, 11, 16, 8816, 12, 15, 32406, 12, 16, 11143, // 12,15
+ 13, 0, 31138, 13, 1, 11977, 14, 0, 13176, 14, 1, 9245, // 13, 0
+ 13, 1, 32881, 13, 2, 11709, 14, 1, 12203, 14, 2, 8743, // 13, 1
+ 13, 2, 34650, 13, 3, 11382, 14, 2, 11272, 14, 3, 8232, // 13, 2
+ 13, 3, 36399, 13, 4, 11012, 14, 3, 10397, 14, 4, 7728, // 13, 3
+ 13, 4, 38057, 13, 5, 10630, 14, 4, 9597, 14, 5, 7252, // 13, 4
+ 13, 5, 39526, 13, 6, 10279, 14, 5, 8902, 14, 6, 6829, // 13, 5
+ 13, 6, 40688, 13, 7, 10013, 14, 6, 8344, 14, 7, 6491, // 13, 6
+ 13, 7, 41432, 13, 8, 9886, 14, 7, 7951, 14, 8, 6267, // 13, 7
+ 12, 8, 7996, 12, 9, 6284, 13, 8, 41389, 13, 9, 9867, // 13, 8
+ 12, 9, 8397, 12, 10, 6506, 13, 9, 40656, 13, 10, 9977, // 13, 9
+ 12, 10, 8966, 12, 11, 6842, 13, 10, 39503, 13, 11, 10225, // 13,10
+ 12, 11, 9674, 12, 12, 7261, 13, 11, 38042, 13, 12, 10559, // 13,11
+ 12, 12, 10488, 12, 13, 7734, 13, 12, 36392, 13, 13, 10922, // 13,12
+ 12, 13, 11382, 12, 14, 8232, 13, 13, 34650, 13, 14, 11272, // 13,13
+ 12, 14, 12334, 12, 15, 8735, 13, 14, 32886, 13, 15, 11581, // 13,14
+ 12, 15, 13332, 12, 16, 9229, 13, 15, 31146, 13, 16, 11829, // 13,15
+ 14, 0, 29828, 14, 1, 12746, 15, 0, 13291, 15, 1, 9671, // 14, 0
+ 14, 1, 31358, 14, 2, 12564, 15, 1, 12412, 15, 2, 9202, // 14, 1
+ 14, 2, 32886, 14, 3, 12334, 15, 2, 11580, 15, 3, 8736, // 14, 2
+ 14, 3, 34369, 14, 4, 12074, 15, 3, 10808, 15, 4, 8285, // 14, 3
+ 14, 4, 35750, 14, 5, 11810, 15, 4, 10111, 15, 5, 7865, // 14, 4
+ 14, 5, 36955, 14, 6, 11575, 15, 5, 9509, 15, 6, 7497, // 14, 5
+ 14, 6, 37906, 14, 7, 11407, 15, 6, 9020, 15, 7, 7203, // 14, 6
+ 14, 7, 38534, 14, 8, 11344, 15, 7, 8662, 15, 8, 6996, // 14, 7
+ 13, 8, 8718, 13, 9, 7020, 14, 8, 38481, 14, 9, 11317, // 14, 8
+ 13, 9, 9086, 13, 10, 7224, 14, 9, 37866, 14, 10, 11360, // 14, 9
+ 13, 10, 9587, 13, 11, 7517, 14, 10, 36926, 14, 11, 11506, // 14,10
+ 13, 11, 10204, 13, 12, 7881, 14, 11, 35730, 14, 12, 11721, // 14,11
+ 13, 12, 10918, 13, 13, 8296, 14, 12, 34358, 14, 13, 11964, // 14,12
+ 13, 13, 11709, 13, 14, 8742, 14, 13, 32881, 14, 14, 12204, // 14,13
+ 13, 14, 12564, 13, 15, 9202, 14, 14, 31358, 14, 15, 12412, // 14,14
+ 13, 15, 13470, 13, 16, 9662, 14, 15, 29831, 14, 16, 12573, // 14,15
+ 15, 0, 28495, 15, 1, 13569, 16, 0, 13368, 16, 1, 10104, // 15, 0
+ 15, 1, 29831, 15, 2, 13470, 16, 1, 12574, 16, 2, 9661, // 15, 1
+ 15, 2, 31146, 15, 3, 13332, 16, 2, 11829, 16, 3, 9229, // 15, 2
+ 15, 3, 32406, 15, 4, 13171, 16, 3, 11143, 16, 4, 8816, // 15, 3
+ 15, 4, 33564, 15, 5, 13007, 16, 4, 10528, 16, 5, 8437, // 15, 4
+ 15, 5, 34567, 15, 6, 12867, 16, 5, 9995, 16, 6, 8107, // 15, 5
+ 15, 6, 35362, 15, 7, 12777, 16, 6, 9558, 16, 7, 7839, // 15, 6
+ 15, 7, 35905, 15, 8, 12764, 16, 7, 9224, 16, 8, 7643, // 15, 7
+ 14, 8, 9290, 14, 9, 7674, 15, 8, 35844, 15, 9, 12728, // 15, 8
+ 14, 9, 9635, 14, 10, 7868, 15, 9, 35315, 15, 10, 12718, // 15, 9
+ 14, 10, 10086, 14, 11, 8135, 15, 10, 34532, 15, 11, 12783, // 15,10
+ 14, 11, 10635, 14, 12, 8463, 15, 11, 33539, 15, 12, 12899, // 15,11
+ 14, 12, 11269, 14, 13, 8838, 15, 12, 32391, 15, 13, 13038, // 15,12
+ 14, 13, 11977, 14, 14, 9245, 15, 13, 31138, 15, 14, 13176, // 15,13
+ 14, 14, 12746, 14, 15, 9671, 15, 14, 29828, 15, 15, 13291, // 15,14
+ 14, 15, 13569, 14, 16, 10104, 15, 15, 28495, 15, 16, 13368, // 15,15
+ // angle of 2.5 degrees
+ 0, -1, 14696, 0, 0, 24063, 1, -1, 11702, 1, 0, 15075, // 0, 0
+ 0, 0, 14872, 0, 1, 25368, 1, 0, 11187, 1, 1, 14109, // 0, 1
+ 0, 1, 14990, 0, 2, 26660, 1, 1, 10676, 1, 2, 13210, // 0, 2
+ 0, 2, 15060, 0, 3, 27903, 1, 2, 10185, 1, 3, 12388, // 0, 3
+ 0, 3, 15100, 0, 4, 29055, 1, 3, 9728, 1, 4, 11653, // 0, 4
+ 0, 4, 15135, 0, 5, 30064, 1, 4, 9323, 1, 5, 11014, // 0, 5
+ 0, 5, 15193, 0, 6, 30876, 1, 5, 8986, 1, 6, 10481, // 0, 6
+ 0, 6, 15301, 0, 7, 31444, 1, 6, 8727, 1, 7, 10064, // 0, 7
+ -1, 7, 8669, -1, 8, 9959, 0, 7, 15376, 0, 8, 31532, // 0, 8
+ -1, 8, 8927, -1, 9, 10351, 0, 8, 15319, 0, 9, 30939, // 0, 9
+ -1, 9, 9265, -1, 10, 10855, 0, 9, 15311, 0, 10, 30105, // 0,10
+ -1, 10, 9673, -1, 11, 11461, 0, 10, 15325, 0, 11, 29077, // 0,11
+ -1, 11, 10135, -1, 12, 12159, 0, 11, 15330, 0, 12, 27912, // 0,12
+ -1, 12, 10637, -1, 13, 12938, 0, 12, 15301, 0, 13, 26660, // 0,13
+ -1, 13, 11164, -1, 14, 13787, 0, 13, 15220, 0, 14, 25365, // 0,14
+ -1, 14, 11702, -1, 15, 14696, 0, 14, 15076, 0, 15, 24062, // 0,15
+ 1, -1, 13787, 1, 0, 25366, 2, -1, 11164, 2, 0, 15219, // 1, 0
+ 1, 0, 13853, 1, 1, 26893, 2, 0, 10644, 2, 1, 14146, // 1, 1
+ 1, 1, 13850, 1, 2, 28427, 2, 1, 10119, 2, 2, 13140, // 1, 2
+ 1, 2, 13789, 1, 3, 29928, 2, 2, 9603, 2, 3, 12216, // 1, 3
+ 1, 3, 13694, 1, 4, 31339, 2, 3, 9118, 2, 4, 11385, // 1, 4
+ 1, 4, 13600, 1, 5, 32586, 2, 4, 8685, 2, 5, 10665, // 1, 5
+ 1, 5, 13548, 1, 6, 33585, 2, 5, 8329, 2, 6, 10074, // 1, 6
+ 1, 6, 13582, 1, 7, 34261, 2, 6, 8068, 2, 7, 9625, // 1, 7
+ 0, 7, 8024, 0, 8, 9534, 1, 7, 13638, 1, 8, 34340, // 1, 8
+ 0, 8, 8286, 0, 9, 9961, 1, 8, 13647, 1, 9, 33642, // 1, 9
+ 0, 9, 8645, 0, 10, 10528, 1, 9, 13740, 1, 10, 32623, // 1,10
+ 0, 10, 9082, 0, 11, 11218, 1, 10, 13875, 1, 11, 31361, // 1,11
+ 0, 11, 9575, 0, 12, 12014, 1, 11, 14009, 1, 12, 29938, // 1,12
+ 0, 12, 10102, 0, 13, 12897, 1, 12, 14107, 1, 13, 28430, // 1,13
+ 0, 13, 10644, 0, 14, 13853, 1, 13, 14145, 1, 14, 26894, // 1,14
+ 0, 14, 11187, 0, 15, 14872, 1, 14, 14109, 1, 15, 25368, // 1,15
+ 2, -1, 12938, 2, 0, 26660, 3, -1, 10637, 3, 0, 15301, // 2, 0
+ 2, 0, 12897, 2, 1, 28430, 3, 0, 10102, 3, 1, 14107, // 2, 1
+ 2, 1, 12769, 2, 2, 30239, 3, 1, 9546, 3, 2, 12982, // 2, 2
+ 2, 2, 12569, 2, 3, 32045, 3, 2, 8988, 3, 3, 11934, // 2, 3
+ 2, 3, 12323, 2, 4, 33777, 3, 3, 8452, 3, 4, 10984, // 2, 4
+ 2, 4, 12079, 2, 5, 35332, 3, 4, 7969, 3, 5, 10156, // 2, 5
+ 2, 5, 11897, 2, 6, 36582, 3, 5, 7573, 3, 6, 9484, // 2, 6
+ 2, 6, 11842, 2, 7, 37402, 3, 6, 7298, 3, 7, 8994, // 2, 7
+ 1, 7, 7266, 1, 8, 8918, 2, 7, 11883, 2, 8, 37469, // 2, 8
+ 1, 8, 7543, 1, 9, 9390, 2, 8, 11972, 2, 9, 36631, // 2, 9
+ 1, 9, 7943, 1, 10, 10041, 2, 9, 12188, 2, 10, 35364, // 2,10
+ 1, 10, 8432, 1, 11, 10842, 2, 10, 12467, 2, 11, 33795, // 2,11
+ 1, 11, 8976, 1, 12, 11760, 2, 11, 12747, 2, 12, 32053, // 2,12
+ 1, 12, 9546, 1, 13, 12769, 2, 12, 12982, 2, 13, 30239, // 2,13
+ 1, 13, 10119, 1, 14, 13850, 2, 13, 13141, 2, 14, 28426, // 2,14
+ 1, 14, 10676, 1, 15, 14990, 2, 14, 13211, 2, 15, 26659, // 2,15
+ 3, -1, 12159, 3, 0, 27912, 4, -1, 10135, 4, 0, 15330, // 3, 0
+ 3, 0, 12014, 3, 1, 29938, 4, 0, 9575, 4, 1, 14009, // 3, 1
+ 3, 1, 11760, 3, 2, 32052, 4, 1, 8976, 4, 2, 12748, // 3, 2
+ 3, 2, 11411, 3, 3, 34213, 4, 2, 8358, 4, 3, 11554, // 3, 3
+ 3, 3, 10995, 3, 4, 36343, 4, 3, 7746, 4, 4, 10452, // 3, 4
+ 3, 4, 10569, 3, 5, 38307, 4, 4, 7180, 4, 5, 9480, // 3, 5
+ 3, 5, 10221, 3, 6, 39912, 4, 5, 6714, 4, 6, 8689, // 3, 6
+ 3, 6, 10051, 3, 7, 40940, 4, 6, 6403, 4, 7, 8142, // 3, 7
+ 2, 7, 6381, 2, 8, 8082, 3, 7, 10079, 3, 8, 40994, // 3, 8
+ 2, 8, 6695, 2, 9, 8617, 3, 8, 10275, 3, 9, 39949, // 3, 9
+ 2, 9, 7165, 2, 10, 9388, 3, 9, 10653, 3, 10, 38330, // 3,10
+ 2, 10, 7737, 2, 11, 10337, 3, 10, 11108, 3, 11, 36354, // 3,11
+ 2, 11, 8358, 2, 12, 11411, 3, 11, 11554, 3, 12, 34213, // 3,12
+ 2, 12, 8988, 2, 13, 12569, 3, 12, 11934, 3, 13, 32045, // 3,13
+ 2, 13, 9603, 2, 14, 13789, 3, 13, 12216, 3, 14, 29928, // 3,14
+ 2, 14, 10185, 2, 15, 15060, 3, 14, 12388, 3, 15, 27903, // 3,15
+ 4, -1, 11461, 4, 0, 29078, 5, -1, 9673, 5, 0, 15324, // 4, 0
+ 4, 0, 11218, 4, 1, 31361, 5, 0, 9082, 5, 1, 13875, // 4, 1
+ 4, 1, 10842, 4, 2, 33795, 5, 1, 8432, 5, 2, 12467, // 4, 2
+ 4, 2, 10337, 4, 3, 36354, 5, 2, 7737, 5, 3, 11108, // 4, 3
+ 4, 3, 9730, 4, 4, 38966, 5, 3, 7022, 5, 4, 9818, // 4, 4
+ 4, 4, 9081, 4, 5, 41475, 5, 4, 6334, 5, 5, 8646, // 4, 5
+ 4, 5, 8507, 4, 6, 43602, 5, 5, 5749, 5, 6, 7678, // 4, 6
+ 4, 6, 8177, 4, 7, 44962, 5, 6, 5368, 5, 7, 7029, // 4, 7
+ 3, 7, 5354, 3, 8, 6987, 4, 7, 8195, 4, 8, 45000, // 4, 8
+ 3, 8, 5739, 3, 9, 7626, 4, 8, 8545, 4, 9, 43626, // 4, 9
+ 3, 9, 6328, 3, 10, 8578, 4, 9, 9143, 4, 10, 41487, // 4,10
+ 3, 10, 7022, 3, 11, 9730, 4, 10, 9818, 4, 11, 38966, // 4,11
+ 3, 11, 7746, 3, 12, 10995, 4, 11, 10452, 4, 12, 36343, // 4,12
+ 3, 12, 8452, 3, 13, 12323, 4, 12, 10983, 4, 13, 33778, // 4,13
+ 3, 13, 9118, 3, 14, 13694, 4, 13, 11385, 4, 14, 31339, // 4,14
+ 3, 14, 9728, 3, 15, 15100, 4, 14, 11652, 4, 15, 29056, // 4,15
+ 5, -1, 10855, 5, 0, 30105, 6, -1, 9265, 6, 0, 15311, // 5, 0
+ 5, 0, 10528, 5, 1, 32624, 6, 0, 8645, 6, 1, 13739, // 5, 1
+ 5, 1, 10041, 5, 2, 35364, 6, 1, 7943, 6, 2, 12188, // 5, 2
+ 5, 2, 9388, 5, 3, 38330, 6, 2, 7165, 6, 3, 10653, // 5, 3
+ 5, 3, 8578, 5, 4, 41487, 6, 3, 6328, 6, 4, 9143, // 5, 4
+ 5, 4, 7659, 5, 5, 44700, 6, 4, 5472, 6, 5, 7705, // 5, 5
+ 5, 5, 6768, 5, 6, 47619, 6, 5, 4694, 6, 6, 6455, // 5, 6
+ 5, 6, 6183, 5, 7, 49566, 6, 6, 4172, 6, 7, 5615, // 5, 7
+ 4, 7, 4164, 4, 8, 5590, 5, 7, 6193, 5, 8, 49589, // 5, 8
+ 4, 8, 4690, 4, 9, 6422, 5, 8, 6794, 5, 9, 47630, // 5, 9
+ 4, 9, 5472, 4, 10, 7659, 5, 9, 7705, 5, 10, 44700, // 5,10
+ 4, 10, 6334, 4, 11, 9081, 5, 10, 8646, 5, 11, 41475, // 5,11
+ 4, 11, 7180, 4, 12, 10569, 5, 11, 9479, 5, 12, 38308, // 5,12
+ 4, 12, 7969, 4, 13, 12079, 5, 12, 10156, 5, 13, 35332, // 5,13
+ 4, 13, 8685, 4, 14, 13600, 5, 13, 10665, 5, 14, 32586, // 5,14
+ 4, 14, 9323, 4, 15, 15135, 5, 14, 11013, 5, 15, 30065, // 5,15
+ 6, -1, 10351, 6, 0, 30939, 7, -1, 8927, 7, 0, 15319, // 6, 0
+ 6, 0, 9961, 6, 1, 33642, 7, 0, 8286, 7, 1, 13647, // 6, 1
+ 6, 1, 9390, 6, 2, 36631, 7, 1, 7543, 7, 2, 11972, // 6, 2
+ 6, 2, 8617, 6, 3, 39949, 7, 2, 6695, 7, 3, 10275, // 6, 3
+ 6, 3, 7626, 6, 4, 43626, 7, 3, 5739, 7, 4, 8545, // 6, 4
+ 6, 4, 6422, 6, 5, 47630, 7, 4, 4690, 7, 5, 6794, // 6, 5
+ 6, 5, 5099, 6, 6, 51701, 7, 5, 3620, 7, 6, 5116, // 6, 6
+ 6, 6, 4044, 6, 7, 54831, 7, 6, 2797, 7, 7, 3864, // 6, 7
+ 5, 7, 2795, 5, 8, 3853, 6, 7, 4049, 6, 8, 54839, // 6, 8
+ 5, 8, 3620, 5, 9, 5099, 6, 8, 5116, 6, 9, 51701, // 6, 9
+ 5, 9, 4694, 5, 10, 6768, 6, 9, 6455, 6, 10, 47619, // 6,10
+ 5, 10, 5749, 5, 11, 8507, 6, 10, 7678, 6, 11, 43602, // 6,11
+ 5, 11, 6714, 5, 12, 10221, 6, 11, 8690, 6, 12, 39911, // 6,12
+ 5, 12, 7573, 5, 13, 11897, 6, 12, 9484, 6, 13, 36582, // 6,13
+ 5, 13, 8329, 5, 14, 13548, 6, 13, 10074, 6, 14, 33585, // 6,14
+ 5, 14, 8986, 5, 15, 15193, 6, 14, 10482, 6, 15, 30875, // 6,15
+ 7, -1, 9959, 7, 0, 31532, 8, -1, 8669, 8, 0, 15376, // 7, 0
+ 7, 0, 9534, 7, 1, 34340, 8, 0, 8024, 8, 1, 13638, // 7, 1
+ 7, 1, 8918, 7, 2, 37470, 8, 1, 7266, 8, 2, 11882, // 7, 2
+ 7, 2, 8082, 7, 3, 40994, 8, 2, 6381, 8, 3, 10079, // 7, 3
+ 7, 3, 6987, 7, 4, 44999, 8, 3, 5354, 8, 4, 8196, // 7, 4
+ 7, 4, 5590, 7, 5, 49588, 8, 4, 4164, 8, 5, 6194, // 7, 5
+ 7, 5, 3853, 7, 6, 54839, 8, 5, 2795, 8, 6, 4049, // 7, 6
+ 7, 6, 1903, 7, 7, 60382, 8, 6, 1347, 8, 7, 1904, // 7, 7
+ 6, 7, 1347, 6, 8, 1903, 7, 7, 1905, 7, 8, 60381, // 7, 8
+ 6, 8, 2797, 6, 9, 4044, 7, 8, 3864, 7, 9, 54831, // 7, 9
+ 6, 9, 4172, 6, 10, 6183, 7, 9, 5615, 7, 10, 49566, // 7,10
+ 6, 10, 5368, 6, 11, 8177, 7, 10, 7029, 7, 11, 44962, // 7,11
+ 6, 11, 6403, 6, 12, 10051, 7, 11, 8141, 7, 12, 40941, // 7,12
+ 6, 12, 7298, 6, 13, 11842, 7, 12, 8994, 7, 13, 37402, // 7,13
+ 6, 13, 8068, 6, 14, 13582, 7, 13, 9626, 7, 14, 34260, // 7,14
+ 6, 14, 8727, 6, 15, 15301, 7, 14, 10065, 7, 15, 31443, // 7,15
+ 8, 0, 31444, 8, 1, 10065, 9, 0, 15301, 9, 1, 8726, // 8, 0
+ 8, 1, 34261, 8, 2, 9626, 9, 1, 13582, 9, 2, 8067, // 8, 1
+ 8, 2, 37402, 8, 3, 8994, 9, 2, 11842, 9, 3, 7298, // 8, 2
+ 8, 3, 40940, 8, 4, 8141, 9, 3, 10051, 9, 4, 6404, // 8, 3
+ 8, 4, 44962, 8, 5, 7029, 9, 4, 8177, 9, 5, 5368, // 8, 4
+ 8, 5, 49566, 8, 6, 5615, 9, 5, 6183, 9, 6, 4172, // 8, 5
+ 8, 6, 54831, 8, 7, 3864, 9, 6, 4044, 9, 7, 2797, // 8, 6
+ 8, 7, 60382, 8, 8, 1905, 9, 7, 1903, 9, 8, 1346, // 8, 7
+ 7, 8, 1905, 7, 9, 1347, 8, 8, 60382, 8, 9, 1902, // 8, 8
+ 7, 9, 4049, 7, 10, 2795, 8, 9, 54839, 8, 10, 3853, // 8, 9
+ 7, 10, 6193, 7, 11, 4164, 8, 10, 49588, 8, 11, 5591, // 8,10
+ 7, 11, 8195, 7, 12, 5354, 8, 11, 44999, 8, 12, 6988, // 8,11
+ 7, 12, 10079, 7, 13, 6381, 8, 12, 40994, 8, 13, 8082, // 8,12
+ 7, 13, 11883, 7, 14, 7266, 8, 13, 37470, 8, 14, 8917, // 8,13
+ 7, 14, 13638, 7, 15, 8024, 8, 14, 34340, 8, 15, 9534, // 8,14
+ 7, 15, 15376, 7, 16, 8669, 8, 15, 31532, 8, 16, 9959, // 8,15
+ 9, 0, 30876, 9, 1, 10482, 10, 0, 15193, 10, 1, 8985, // 9, 0
+ 9, 1, 33585, 9, 2, 10074, 10, 1, 13548, 10, 2, 8329, // 9, 1
+ 9, 2, 36582, 9, 3, 9484, 10, 2, 11897, 10, 3, 7573, // 9, 2
+ 9, 3, 39912, 9, 4, 8690, 10, 3, 10221, 10, 4, 6713, // 9, 3
+ 9, 4, 43602, 9, 5, 7678, 10, 4, 8507, 10, 5, 5749, // 9, 4
+ 9, 5, 47619, 9, 6, 6455, 10, 5, 6768, 10, 6, 4694, // 9, 5
+ 9, 6, 51701, 9, 7, 5116, 10, 6, 5099, 10, 7, 3620, // 9, 6
+ 9, 7, 54839, 9, 8, 4049, 10, 7, 3853, 10, 8, 2795, // 9, 7
+ 8, 8, 3864, 8, 9, 2797, 9, 8, 54831, 9, 9, 4044, // 9, 8
+ 8, 9, 5116, 8, 10, 3620, 9, 9, 51701, 9, 10, 5099, // 9, 9
+ 8, 10, 6794, 8, 11, 4690, 9, 10, 47630, 9, 11, 6422, // 9,10
+ 8, 11, 8545, 8, 12, 5739, 9, 11, 43626, 9, 12, 7626, // 9,11
+ 8, 12, 10275, 8, 13, 6695, 9, 12, 39949, 9, 13, 8617, // 9,12
+ 8, 13, 11972, 8, 14, 7543, 9, 13, 36631, 9, 14, 9390, // 9,13
+ 8, 14, 13647, 8, 15, 8286, 9, 14, 33642, 9, 15, 9961, // 9,14
+ 8, 15, 15319, 8, 16, 8927, 9, 15, 30939, 9, 16, 10351, // 9,15
+ 10, 0, 30064, 10, 1, 11013, 11, 0, 15135, 11, 1, 9324, // 10, 0
+ 10, 1, 32586, 10, 2, 10665, 11, 1, 13600, 11, 2, 8685, // 10, 1
+ 10, 2, 35332, 10, 3, 10156, 11, 2, 12079, 11, 3, 7969, // 10, 2
+ 10, 3, 38307, 10, 4, 9479, 11, 3, 10569, 11, 4, 7181, // 10, 3
+ 10, 4, 41475, 10, 5, 8646, 11, 4, 9081, 11, 5, 6334, // 10, 4
+ 10, 5, 44700, 10, 6, 7705, 11, 5, 7659, 11, 6, 5472, // 10, 5
+ 10, 6, 47630, 10, 7, 6794, 11, 6, 6422, 11, 7, 4690, // 10, 6
+ 10, 7, 49588, 10, 8, 6193, 11, 7, 5590, 11, 8, 4165, // 10, 7
+ 9, 8, 5615, 9, 9, 4172, 10, 8, 49566, 10, 9, 6183, // 10, 8
+ 9, 9, 6455, 9, 10, 4694, 10, 9, 47619, 10, 10, 6768, // 10, 9
+ 9, 10, 7705, 9, 11, 5472, 10, 10, 44700, 10, 11, 7659, // 10,10
+ 9, 11, 9143, 9, 12, 6328, 10, 11, 41487, 10, 12, 8578, // 10,11
+ 9, 12, 10653, 9, 13, 7165, 10, 12, 38330, 10, 13, 9388, // 10,12
+ 9, 13, 12188, 9, 14, 7943, 10, 13, 35364, 10, 14, 10041, // 10,13
+ 9, 14, 13740, 9, 15, 8645, 10, 14, 32624, 10, 15, 10527, // 10,14
+ 9, 15, 15311, 9, 16, 9265, 10, 15, 30105, 10, 16, 10855, // 10,15
+ 11, 0, 29055, 11, 1, 11652, 12, 0, 15100, 12, 1, 9729, // 11, 0
+ 11, 1, 31339, 11, 2, 11385, 12, 1, 13694, 12, 2, 9118, // 11, 1
+ 11, 2, 33777, 11, 3, 10983, 12, 2, 12323, 12, 3, 8453, // 11, 2
+ 11, 3, 36343, 11, 4, 10452, 12, 3, 10995, 12, 4, 7746, // 11, 3
+ 11, 4, 38966, 11, 5, 9818, 12, 4, 9730, 12, 5, 7022, // 11, 4
+ 11, 5, 41487, 11, 6, 9143, 12, 5, 8578, 12, 6, 6328, // 11, 5
+ 11, 6, 43626, 11, 7, 8545, 12, 6, 7626, 12, 7, 5739, // 11, 6
+ 11, 7, 44999, 11, 8, 8195, 12, 7, 6987, 12, 8, 5355, // 11, 7
+ 10, 8, 7029, 10, 9, 5368, 11, 8, 44962, 11, 9, 8177, // 11, 8
+ 10, 9, 7678, 10, 10, 5749, 11, 9, 43602, 11, 10, 8507, // 11, 9
+ 10, 10, 8646, 10, 11, 6334, 11, 10, 41475, 11, 11, 9081, // 11,10
+ 10, 11, 9818, 10, 12, 7022, 11, 11, 38966, 11, 12, 9730, // 11,11
+ 10, 12, 11108, 10, 13, 7737, 11, 12, 36354, 11, 13, 10337, // 11,12
+ 10, 13, 12467, 10, 14, 8432, 11, 13, 33795, 11, 14, 10842, // 11,13
+ 10, 14, 13875, 10, 15, 9082, 11, 14, 31361, 11, 15, 11218, // 11,14
+ 10, 15, 15325, 10, 16, 9673, 11, 15, 29078, 11, 16, 11460, // 11,15
+ 12, 0, 27903, 12, 1, 12388, 13, 0, 15060, 13, 1, 10185, // 12, 0
+ 12, 1, 29928, 12, 2, 12216, 13, 1, 13789, 13, 2, 9603, // 12, 1
+ 12, 2, 32045, 12, 3, 11934, 13, 2, 12569, 13, 3, 8988, // 12, 2
+ 12, 3, 34213, 12, 4, 11554, 13, 3, 11411, 13, 4, 8358, // 12, 3
+ 12, 4, 36354, 12, 5, 11108, 13, 4, 10337, 13, 5, 7737, // 12, 4
+ 12, 5, 38330, 12, 6, 10653, 13, 5, 9388, 13, 6, 7165, // 12, 5
+ 12, 6, 39949, 12, 7, 10275, 13, 6, 8617, 13, 7, 6695, // 12, 6
+ 12, 7, 40994, 12, 8, 10079, 13, 7, 8082, 13, 8, 6381, // 12, 7
+ 11, 8, 8141, 11, 9, 6403, 12, 8, 40940, 12, 9, 10052, // 12, 8
+ 11, 9, 8690, 11, 10, 6714, 12, 9, 39912, 12, 10, 10220, // 12, 9
+ 11, 10, 9479, 11, 11, 7180, 12, 10, 38307, 12, 11, 10570, // 12,10
+ 11, 11, 10452, 11, 12, 7746, 12, 11, 36343, 12, 12, 10995, // 12,11
+ 11, 12, 11554, 11, 13, 8358, 12, 12, 34213, 12, 13, 11411, // 12,12
+ 11, 13, 12747, 11, 14, 8976, 12, 13, 32052, 12, 14, 11761, // 12,13
+ 11, 14, 14009, 11, 15, 9575, 12, 14, 29938, 12, 15, 12014, // 12,14
+ 11, 15, 15330, 11, 16, 10135, 12, 15, 27912, 12, 16, 12159, // 12,15
+ 13, 0, 26660, 13, 1, 13211, 14, 0, 14990, 14, 1, 10675, // 13, 0
+ 13, 1, 28427, 13, 2, 13141, 14, 1, 13850, 14, 2, 10118, // 13, 1
+ 13, 2, 30239, 13, 3, 12982, 14, 2, 12769, 14, 3, 9546, // 13, 2
+ 13, 3, 32052, 13, 4, 12747, 14, 3, 11760, 14, 4, 8977, // 13, 3
+ 13, 4, 33795, 13, 5, 12467, 14, 4, 10842, 14, 5, 8432, // 13, 4
+ 13, 5, 35364, 13, 6, 12188, 14, 5, 10041, 14, 6, 7943, // 13, 5
+ 13, 6, 36631, 13, 7, 11972, 14, 6, 9390, 14, 7, 7543, // 13, 6
+ 13, 7, 37470, 13, 8, 11883, 14, 7, 8918, 14, 8, 7265, // 13, 7
+ 12, 8, 8994, 12, 9, 7298, 13, 8, 37402, 13, 9, 11842, // 13, 8
+ 12, 9, 9484, 12, 10, 7573, 13, 9, 36582, 13, 10, 11897, // 13, 9
+ 12, 10, 10156, 12, 11, 7969, 13, 10, 35332, 13, 11, 12079, // 13,10
+ 12, 11, 10983, 12, 12, 8452, 13, 11, 33777, 13, 12, 12324, // 13,11
+ 12, 12, 11934, 12, 13, 8988, 13, 12, 32045, 13, 13, 12569, // 13,12
+ 12, 13, 12982, 12, 14, 9546, 13, 13, 30239, 13, 14, 12769, // 13,13
+ 12, 14, 14107, 12, 15, 10102, 13, 14, 28430, 13, 15, 12897, // 13,14
+ 12, 15, 15301, 12, 16, 10637, 13, 15, 26660, 13, 16, 12938, // 13,15
+ 14, 0, 25368, 14, 1, 14109, 15, 0, 14872, 15, 1, 11187, // 14, 0
+ 14, 1, 26893, 14, 2, 14145, 15, 1, 13853, 15, 2, 10645, // 14, 1
+ 14, 2, 28430, 14, 3, 14107, 15, 2, 12897, 15, 3, 10102, // 14, 2
+ 14, 3, 29938, 14, 4, 14009, 15, 3, 12014, 15, 4, 9575, // 14, 3
+ 14, 4, 31361, 14, 5, 13875, 15, 4, 11218, 15, 5, 9082, // 14, 4
+ 14, 5, 32624, 14, 6, 13740, 15, 5, 10528, 15, 6, 8644, // 14, 5
+ 14, 6, 33642, 14, 7, 13647, 15, 6, 9961, 15, 7, 8286, // 14, 6
+ 14, 7, 34340, 14, 8, 13638, 15, 7, 9534, 15, 8, 8024, // 14, 7
+ 13, 8, 9626, 13, 9, 8068, 14, 8, 34261, 14, 9, 13581, // 14, 8
+ 13, 9, 10074, 13, 10, 8329, 14, 9, 33585, 14, 10, 13548, // 14, 9
+ 13, 10, 10665, 13, 11, 8685, 14, 10, 32586, 14, 11, 13600, // 14,10
+ 13, 11, 11385, 13, 12, 9118, 14, 11, 31339, 14, 12, 13694, // 14,11
+ 13, 12, 12216, 13, 13, 9603, 14, 12, 29928, 14, 13, 13789, // 14,12
+ 13, 13, 13141, 13, 14, 10119, 14, 13, 28427, 14, 14, 13849, // 14,13
+ 13, 14, 14145, 13, 15, 10644, 14, 14, 26893, 14, 15, 13854, // 14,14
+ 13, 15, 15220, 13, 16, 11164, 14, 15, 25366, 14, 16, 13786, // 14,15
+ 15, 0, 24063, 15, 1, 15076, 16, 0, 14696, 16, 1, 11701, // 15, 0
+ 15, 1, 25366, 15, 2, 15220, 16, 1, 13787, 16, 2, 11163, // 15, 1
+ 15, 2, 26660, 15, 3, 15301, 16, 2, 12938, 16, 3, 10637, // 15, 2
+ 15, 3, 27912, 15, 4, 15330, 16, 3, 12159, 16, 4, 10135, // 15, 3
+ 15, 4, 29078, 15, 5, 15325, 16, 4, 11461, 16, 5, 9672, // 15, 4
+ 15, 5, 30105, 15, 6, 15311, 16, 5, 10855, 16, 6, 9265, // 15, 5
+ 15, 6, 30939, 15, 7, 15319, 16, 6, 10351, 16, 7, 8927, // 15, 6
+ 15, 7, 31532, 15, 8, 15376, 16, 7, 9959, 16, 8, 8669, // 15, 7
+ 14, 8, 10065, 14, 9, 8727, 15, 8, 31444, 15, 9, 15300, // 15, 8
+ 14, 9, 10482, 14, 10, 8986, 15, 9, 30876, 15, 10, 15192, // 15, 9
+ 14, 10, 11013, 14, 11, 9323, 15, 10, 30064, 15, 11, 15136, // 15,10
+ 14, 11, 11652, 14, 12, 9728, 15, 11, 29055, 15, 12, 15101, // 15,11
+ 14, 12, 12388, 14, 13, 10185, 15, 12, 27903, 15, 13, 15060, // 15,12
+ 14, 13, 13211, 14, 14, 10676, 15, 13, 26660, 15, 14, 14989, // 15,13
+ 14, 14, 14109, 14, 15, 11187, 15, 14, 25368, 15, 15, 14872, // 15,14
+ 14, 15, 15076, 14, 16, 11702, 15, 15, 24063, 15, 16, 14695, // 15,15
diff --git a/vp8/common/rotate2.h b/vp8/common/rotate2.h
new file mode 100644
index 000000000..580f55279
--- /dev/null
+++ b/vp8/common/rotate2.h
@@ -0,0 +1,2827 @@
+ // angle of -2.5 degrees
+ -1, 0, 14696, -1, 1, 11702, 0, 0, 24063, 0, 1, 15075, // 0, 0
+ -1, 1, 13787, -1, 2, 11164, 0, 1, 25366, 0, 2, 15219, // 0, 1
+ -1, 2, 12938, -1, 3, 10637, 0, 2, 26660, 0, 3, 15301, // 0, 2
+ -1, 3, 12159, -1, 4, 10135, 0, 3, 27912, 0, 4, 15330, // 0, 3
+ -1, 4, 11461, -1, 5, 9673, 0, 4, 29078, 0, 5, 15324, // 0, 4
+ -1, 5, 10855, -1, 6, 9265, 0, 5, 30105, 0, 6, 15311, // 0, 5
+ -1, 6, 10351, -1, 7, 8927, 0, 6, 30939, 0, 7, 15319, // 0, 6
+ -1, 7, 9959, -1, 8, 8669, 0, 7, 31532, 0, 8, 15376, // 0, 7
+ 0, 8, 31444, 0, 9, 15301, 1, 8, 10065, 1, 9, 8726, // 0, 8
+ 0, 9, 30876, 0, 10, 15193, 1, 9, 10482, 1, 10, 8985, // 0, 9
+ 0, 10, 30064, 0, 11, 15135, 1, 10, 11013, 1, 11, 9324, // 0,10
+ 0, 11, 29055, 0, 12, 15100, 1, 11, 11652, 1, 12, 9729, // 0,11
+ 0, 12, 27903, 0, 13, 15060, 1, 12, 12388, 1, 13, 10185, // 0,12
+ 0, 13, 26660, 0, 14, 14990, 1, 13, 13211, 1, 14, 10675, // 0,13
+ 0, 14, 25368, 0, 15, 14872, 1, 14, 14109, 1, 15, 11187, // 0,14
+ 0, 15, 24063, 0, 16, 14696, 1, 15, 15076, 1, 16, 11701, // 0,15
+ 0, 0, 14872, 0, 1, 11187, 1, 0, 25368, 1, 1, 14109, // 1, 0
+ 0, 1, 13853, 0, 2, 10644, 1, 1, 26893, 1, 2, 14146, // 1, 1
+ 0, 2, 12897, 0, 3, 10102, 1, 2, 28430, 1, 3, 14107, // 1, 2
+ 0, 3, 12014, 0, 4, 9575, 1, 3, 29938, 1, 4, 14009, // 1, 3
+ 0, 4, 11218, 0, 5, 9082, 1, 4, 31361, 1, 5, 13875, // 1, 4
+ 0, 5, 10528, 0, 6, 8645, 1, 5, 32624, 1, 6, 13739, // 1, 5
+ 0, 6, 9961, 0, 7, 8286, 1, 6, 33642, 1, 7, 13647, // 1, 6
+ 0, 7, 9534, 0, 8, 8024, 1, 7, 34340, 1, 8, 13638, // 1, 7
+ 1, 8, 34261, 1, 9, 13582, 2, 8, 9626, 2, 9, 8067, // 1, 8
+ 1, 9, 33585, 1, 10, 13548, 2, 9, 10074, 2, 10, 8329, // 1, 9
+ 1, 10, 32586, 1, 11, 13600, 2, 10, 10665, 2, 11, 8685, // 1,10
+ 1, 11, 31339, 1, 12, 13694, 2, 11, 11385, 2, 12, 9118, // 1,11
+ 1, 12, 29928, 1, 13, 13789, 2, 12, 12216, 2, 13, 9603, // 1,12
+ 1, 13, 28427, 1, 14, 13850, 2, 13, 13141, 2, 14, 10118, // 1,13
+ 1, 14, 26893, 1, 15, 13853, 2, 14, 14145, 2, 15, 10645, // 1,14
+ 1, 15, 25366, 1, 16, 13787, 2, 15, 15220, 2, 16, 11163, // 1,15
+ 1, 0, 14990, 1, 1, 10676, 2, 0, 26660, 2, 1, 13210, // 2, 0
+ 1, 1, 13850, 1, 2, 10119, 2, 1, 28427, 2, 2, 13140, // 2, 1
+ 1, 2, 12769, 1, 3, 9546, 2, 2, 30239, 2, 3, 12982, // 2, 2
+ 1, 3, 11760, 1, 4, 8976, 2, 3, 32052, 2, 4, 12748, // 2, 3
+ 1, 4, 10842, 1, 5, 8432, 2, 4, 33795, 2, 5, 12467, // 2, 4
+ 1, 5, 10041, 1, 6, 7943, 2, 5, 35364, 2, 6, 12188, // 2, 5
+ 1, 6, 9390, 1, 7, 7543, 2, 6, 36631, 2, 7, 11972, // 2, 6
+ 1, 7, 8918, 1, 8, 7266, 2, 7, 37470, 2, 8, 11882, // 2, 7
+ 2, 8, 37402, 2, 9, 11842, 3, 8, 8994, 3, 9, 7298, // 2, 8
+ 2, 9, 36582, 2, 10, 11897, 3, 9, 9484, 3, 10, 7573, // 2, 9
+ 2, 10, 35332, 2, 11, 12079, 3, 10, 10156, 3, 11, 7969, // 2,10
+ 2, 11, 33777, 2, 12, 12323, 3, 11, 10983, 3, 12, 8453, // 2,11
+ 2, 12, 32045, 2, 13, 12569, 3, 12, 11934, 3, 13, 8988, // 2,12
+ 2, 13, 30239, 2, 14, 12769, 3, 13, 12982, 3, 14, 9546, // 2,13
+ 2, 14, 28430, 2, 15, 12897, 3, 14, 14107, 3, 15, 10102, // 2,14
+ 2, 15, 26660, 2, 16, 12938, 3, 15, 15301, 3, 16, 10637, // 2,15
+ 2, 0, 15060, 2, 1, 10185, 3, 0, 27903, 3, 1, 12388, // 3, 0
+ 2, 1, 13789, 2, 2, 9603, 3, 1, 29928, 3, 2, 12216, // 3, 1
+ 2, 2, 12569, 2, 3, 8988, 3, 2, 32045, 3, 3, 11934, // 3, 2
+ 2, 3, 11411, 2, 4, 8358, 3, 3, 34213, 3, 4, 11554, // 3, 3
+ 2, 4, 10337, 2, 5, 7737, 3, 4, 36354, 3, 5, 11108, // 3, 4
+ 2, 5, 9388, 2, 6, 7165, 3, 5, 38330, 3, 6, 10653, // 3, 5
+ 2, 6, 8617, 2, 7, 6695, 3, 6, 39949, 3, 7, 10275, // 3, 6
+ 2, 7, 8082, 2, 8, 6381, 3, 7, 40994, 3, 8, 10079, // 3, 7
+ 3, 8, 40940, 3, 9, 10051, 4, 8, 8141, 4, 9, 6404, // 3, 8
+ 3, 9, 39912, 3, 10, 10221, 4, 9, 8690, 4, 10, 6713, // 3, 9
+ 3, 10, 38307, 3, 11, 10569, 4, 10, 9479, 4, 11, 7181, // 3,10
+ 3, 11, 36343, 3, 12, 10995, 4, 11, 10452, 4, 12, 7746, // 3,11
+ 3, 12, 34213, 3, 13, 11411, 4, 12, 11554, 4, 13, 8358, // 3,12
+ 3, 13, 32052, 3, 14, 11760, 4, 13, 12747, 4, 14, 8977, // 3,13
+ 3, 14, 29938, 3, 15, 12014, 4, 14, 14009, 4, 15, 9575, // 3,14
+ 3, 15, 27912, 3, 16, 12159, 4, 15, 15330, 4, 16, 10135, // 3,15
+ 3, 0, 15100, 3, 1, 9728, 4, 0, 29055, 4, 1, 11653, // 4, 0
+ 3, 1, 13694, 3, 2, 9118, 4, 1, 31339, 4, 2, 11385, // 4, 1
+ 3, 2, 12323, 3, 3, 8452, 4, 2, 33777, 4, 3, 10984, // 4, 2
+ 3, 3, 10995, 3, 4, 7746, 4, 3, 36343, 4, 4, 10452, // 4, 3
+ 3, 4, 9730, 3, 5, 7022, 4, 4, 38966, 4, 5, 9818, // 4, 4
+ 3, 5, 8578, 3, 6, 6328, 4, 5, 41487, 4, 6, 9143, // 4, 5
+ 3, 6, 7626, 3, 7, 5739, 4, 6, 43626, 4, 7, 8545, // 4, 6
+ 3, 7, 6987, 3, 8, 5354, 4, 7, 44999, 4, 8, 8196, // 4, 7
+ 4, 8, 44962, 4, 9, 8177, 5, 8, 7029, 5, 9, 5368, // 4, 8
+ 4, 9, 43602, 4, 10, 8507, 5, 9, 7678, 5, 10, 5749, // 4, 9
+ 4, 10, 41475, 4, 11, 9081, 5, 10, 8646, 5, 11, 6334, // 4,10
+ 4, 11, 38966, 4, 12, 9730, 5, 11, 9818, 5, 12, 7022, // 4,11
+ 4, 12, 36354, 4, 13, 10337, 5, 12, 11108, 5, 13, 7737, // 4,12
+ 4, 13, 33795, 4, 14, 10842, 5, 13, 12467, 5, 14, 8432, // 4,13
+ 4, 14, 31361, 4, 15, 11218, 5, 14, 13875, 5, 15, 9082, // 4,14
+ 4, 15, 29078, 4, 16, 11461, 5, 15, 15325, 5, 16, 9672, // 4,15
+ 4, 0, 15135, 4, 1, 9323, 5, 0, 30064, 5, 1, 11014, // 5, 0
+ 4, 1, 13600, 4, 2, 8685, 5, 1, 32586, 5, 2, 10665, // 5, 1
+ 4, 2, 12079, 4, 3, 7969, 5, 2, 35332, 5, 3, 10156, // 5, 2
+ 4, 3, 10569, 4, 4, 7180, 5, 3, 38307, 5, 4, 9480, // 5, 3
+ 4, 4, 9081, 4, 5, 6334, 5, 4, 41475, 5, 5, 8646, // 5, 4
+ 4, 5, 7659, 4, 6, 5472, 5, 5, 44700, 5, 6, 7705, // 5, 5
+ 4, 6, 6422, 4, 7, 4690, 5, 6, 47630, 5, 7, 6794, // 5, 6
+ 4, 7, 5590, 4, 8, 4164, 5, 7, 49588, 5, 8, 6194, // 5, 7
+ 5, 8, 49566, 5, 9, 6183, 6, 8, 5615, 6, 9, 4172, // 5, 8
+ 5, 9, 47619, 5, 10, 6768, 6, 9, 6455, 6, 10, 4694, // 5, 9
+ 5, 10, 44700, 5, 11, 7659, 6, 10, 7705, 6, 11, 5472, // 5,10
+ 5, 11, 41487, 5, 12, 8578, 6, 11, 9143, 6, 12, 6328, // 5,11
+ 5, 12, 38330, 5, 13, 9388, 6, 12, 10653, 6, 13, 7165, // 5,12
+ 5, 13, 35364, 5, 14, 10041, 6, 13, 12188, 6, 14, 7943, // 5,13
+ 5, 14, 32624, 5, 15, 10528, 6, 14, 13740, 6, 15, 8644, // 5,14
+ 5, 15, 30105, 5, 16, 10855, 6, 15, 15311, 6, 16, 9265, // 5,15
+ 5, 0, 15193, 5, 1, 8986, 6, 0, 30876, 6, 1, 10481, // 6, 0
+ 5, 1, 13548, 5, 2, 8329, 6, 1, 33585, 6, 2, 10074, // 6, 1
+ 5, 2, 11897, 5, 3, 7573, 6, 2, 36582, 6, 3, 9484, // 6, 2
+ 5, 3, 10221, 5, 4, 6714, 6, 3, 39912, 6, 4, 8689, // 6, 3
+ 5, 4, 8507, 5, 5, 5749, 6, 4, 43602, 6, 5, 7678, // 6, 4
+ 5, 5, 6768, 5, 6, 4694, 6, 5, 47619, 6, 6, 6455, // 6, 5
+ 5, 6, 5099, 5, 7, 3620, 6, 6, 51701, 6, 7, 5116, // 6, 6
+ 5, 7, 3853, 5, 8, 2795, 6, 7, 54839, 6, 8, 4049, // 6, 7
+ 6, 8, 54831, 6, 9, 4044, 7, 8, 3864, 7, 9, 2797, // 6, 8
+ 6, 9, 51701, 6, 10, 5099, 7, 9, 5116, 7, 10, 3620, // 6, 9
+ 6, 10, 47630, 6, 11, 6422, 7, 10, 6794, 7, 11, 4690, // 6,10
+ 6, 11, 43626, 6, 12, 7626, 7, 11, 8545, 7, 12, 5739, // 6,11
+ 6, 12, 39949, 6, 13, 8617, 7, 12, 10275, 7, 13, 6695, // 6,12
+ 6, 13, 36631, 6, 14, 9390, 7, 13, 11972, 7, 14, 7543, // 6,13
+ 6, 14, 33642, 6, 15, 9961, 7, 14, 13647, 7, 15, 8286, // 6,14
+ 6, 15, 30939, 6, 16, 10351, 7, 15, 15319, 7, 16, 8927, // 6,15
+ 6, 0, 15301, 6, 1, 8727, 7, 0, 31444, 7, 1, 10064, // 7, 0
+ 6, 1, 13582, 6, 2, 8068, 7, 1, 34261, 7, 2, 9625, // 7, 1
+ 6, 2, 11842, 6, 3, 7298, 7, 2, 37402, 7, 3, 8994, // 7, 2
+ 6, 3, 10051, 6, 4, 6403, 7, 3, 40940, 7, 4, 8142, // 7, 3
+ 6, 4, 8177, 6, 5, 5368, 7, 4, 44962, 7, 5, 7029, // 7, 4
+ 6, 5, 6183, 6, 6, 4172, 7, 5, 49566, 7, 6, 5615, // 7, 5
+ 6, 6, 4044, 6, 7, 2797, 7, 6, 54831, 7, 7, 3864, // 7, 6
+ 6, 7, 1903, 6, 8, 1347, 7, 7, 60382, 7, 8, 1904, // 7, 7
+ 7, 8, 60382, 7, 9, 1903, 8, 8, 1905, 8, 9, 1346, // 7, 8
+ 7, 9, 54839, 7, 10, 3853, 8, 9, 4049, 8, 10, 2795, // 7, 9
+ 7, 10, 49588, 7, 11, 5590, 8, 10, 6193, 8, 11, 4165, // 7,10
+ 7, 11, 44999, 7, 12, 6987, 8, 11, 8195, 8, 12, 5355, // 7,11
+ 7, 12, 40994, 7, 13, 8082, 8, 12, 10079, 8, 13, 6381, // 7,12
+ 7, 13, 37470, 7, 14, 8918, 8, 13, 11883, 8, 14, 7265, // 7,13
+ 7, 14, 34340, 7, 15, 9534, 8, 14, 13638, 8, 15, 8024, // 7,14
+ 7, 15, 31532, 7, 16, 9959, 8, 15, 15376, 8, 16, 8669, // 7,15
+ 7, -1, 8669, 7, 0, 15376, 8, -1, 9959, 8, 0, 31532, // 8, 0
+ 7, 0, 8024, 7, 1, 13638, 8, 0, 9534, 8, 1, 34340, // 8, 1
+ 7, 1, 7266, 7, 2, 11883, 8, 1, 8918, 8, 2, 37469, // 8, 2
+ 7, 2, 6381, 7, 3, 10079, 8, 2, 8082, 8, 3, 40994, // 8, 3
+ 7, 3, 5354, 7, 4, 8195, 8, 3, 6987, 8, 4, 45000, // 8, 4
+ 7, 4, 4164, 7, 5, 6193, 8, 4, 5590, 8, 5, 49589, // 8, 5
+ 7, 5, 2795, 7, 6, 4049, 8, 5, 3853, 8, 6, 54839, // 8, 6
+ 7, 6, 1347, 7, 7, 1905, 8, 6, 1903, 8, 7, 60381, // 8, 7
+ 8, 7, 1905, 8, 8, 60382, 9, 7, 1347, 9, 8, 1902, // 8, 8
+ 8, 8, 3864, 8, 9, 54831, 9, 8, 2797, 9, 9, 4044, // 8, 9
+ 8, 9, 5615, 8, 10, 49566, 9, 9, 4172, 9, 10, 6183, // 8,10
+ 8, 10, 7029, 8, 11, 44962, 9, 10, 5368, 9, 11, 8177, // 8,11
+ 8, 11, 8141, 8, 12, 40940, 9, 11, 6403, 9, 12, 10052, // 8,12
+ 8, 12, 8994, 8, 13, 37402, 9, 12, 7298, 9, 13, 11842, // 8,13
+ 8, 13, 9626, 8, 14, 34261, 9, 13, 8068, 9, 14, 13581, // 8,14
+ 8, 14, 10065, 8, 15, 31444, 9, 14, 8727, 9, 15, 15300, // 8,15
+ 8, -1, 8927, 8, 0, 15319, 9, -1, 10351, 9, 0, 30939, // 9, 0
+ 8, 0, 8286, 8, 1, 13647, 9, 0, 9961, 9, 1, 33642, // 9, 1
+ 8, 1, 7543, 8, 2, 11972, 9, 1, 9390, 9, 2, 36631, // 9, 2
+ 8, 2, 6695, 8, 3, 10275, 9, 2, 8617, 9, 3, 39949, // 9, 3
+ 8, 3, 5739, 8, 4, 8545, 9, 3, 7626, 9, 4, 43626, // 9, 4
+ 8, 4, 4690, 8, 5, 6794, 9, 4, 6422, 9, 5, 47630, // 9, 5
+ 8, 5, 3620, 8, 6, 5116, 9, 5, 5099, 9, 6, 51701, // 9, 6
+ 8, 6, 2797, 8, 7, 3864, 9, 6, 4044, 9, 7, 54831, // 9, 7
+ 9, 7, 4049, 9, 8, 54839, 10, 7, 2795, 10, 8, 3853, // 9, 8
+ 9, 8, 5116, 9, 9, 51701, 10, 8, 3620, 10, 9, 5099, // 9, 9
+ 9, 9, 6455, 9, 10, 47619, 10, 9, 4694, 10, 10, 6768, // 9,10
+ 9, 10, 7678, 9, 11, 43602, 10, 10, 5749, 10, 11, 8507, // 9,11
+ 9, 11, 8690, 9, 12, 39912, 10, 11, 6714, 10, 12, 10220, // 9,12
+ 9, 12, 9484, 9, 13, 36582, 10, 12, 7573, 10, 13, 11897, // 9,13
+ 9, 13, 10074, 9, 14, 33585, 10, 13, 8329, 10, 14, 13548, // 9,14
+ 9, 14, 10482, 9, 15, 30876, 10, 14, 8986, 10, 15, 15192, // 9,15
+ 9, -1, 9265, 9, 0, 15311, 10, -1, 10855, 10, 0, 30105, // 10, 0
+ 9, 0, 8645, 9, 1, 13740, 10, 0, 10528, 10, 1, 32623, // 10, 1
+ 9, 1, 7943, 9, 2, 12188, 10, 1, 10041, 10, 2, 35364, // 10, 2
+ 9, 2, 7165, 9, 3, 10653, 10, 2, 9388, 10, 3, 38330, // 10, 3
+ 9, 3, 6328, 9, 4, 9143, 10, 3, 8578, 10, 4, 41487, // 10, 4
+ 9, 4, 5472, 9, 5, 7705, 10, 4, 7659, 10, 5, 44700, // 10, 5
+ 9, 5, 4694, 9, 6, 6455, 10, 5, 6768, 10, 6, 47619, // 10, 6
+ 9, 6, 4172, 9, 7, 5615, 10, 6, 6183, 10, 7, 49566, // 10, 7
+ 10, 7, 6193, 10, 8, 49588, 11, 7, 4164, 11, 8, 5591, // 10, 8
+ 10, 8, 6794, 10, 9, 47630, 11, 8, 4690, 11, 9, 6422, // 10, 9
+ 10, 9, 7705, 10, 10, 44700, 11, 9, 5472, 11, 10, 7659, // 10,10
+ 10, 10, 8646, 10, 11, 41475, 11, 10, 6334, 11, 11, 9081, // 10,11
+ 10, 11, 9479, 10, 12, 38307, 11, 11, 7180, 11, 12, 10570, // 10,12
+ 10, 12, 10156, 10, 13, 35332, 11, 12, 7969, 11, 13, 12079, // 10,13
+ 10, 13, 10665, 10, 14, 32586, 11, 13, 8685, 11, 14, 13600, // 10,14
+ 10, 14, 11013, 10, 15, 30064, 11, 14, 9323, 11, 15, 15136, // 10,15
+ 10, -1, 9673, 10, 0, 15325, 11, -1, 11461, 11, 0, 29077, // 11, 0
+ 10, 0, 9082, 10, 1, 13875, 11, 0, 11218, 11, 1, 31361, // 11, 1
+ 10, 1, 8432, 10, 2, 12467, 11, 1, 10842, 11, 2, 33795, // 11, 2
+ 10, 2, 7737, 10, 3, 11108, 11, 2, 10337, 11, 3, 36354, // 11, 3
+ 10, 3, 7022, 10, 4, 9818, 11, 3, 9730, 11, 4, 38966, // 11, 4
+ 10, 4, 6334, 10, 5, 8646, 11, 4, 9081, 11, 5, 41475, // 11, 5
+ 10, 5, 5749, 10, 6, 7678, 11, 5, 8507, 11, 6, 43602, // 11, 6
+ 10, 6, 5368, 10, 7, 7029, 11, 6, 8177, 11, 7, 44962, // 11, 7
+ 11, 7, 8195, 11, 8, 44999, 12, 7, 5354, 12, 8, 6988, // 11, 8
+ 11, 8, 8545, 11, 9, 43626, 12, 8, 5739, 12, 9, 7626, // 11, 9
+ 11, 9, 9143, 11, 10, 41487, 12, 9, 6328, 12, 10, 8578, // 11,10
+ 11, 10, 9818, 11, 11, 38966, 12, 10, 7022, 12, 11, 9730, // 11,11
+ 11, 11, 10452, 11, 12, 36343, 12, 11, 7746, 12, 12, 10995, // 11,12
+ 11, 12, 10983, 11, 13, 33777, 12, 12, 8452, 12, 13, 12324, // 11,13
+ 11, 13, 11385, 11, 14, 31339, 12, 13, 9118, 12, 14, 13694, // 11,14
+ 11, 14, 11652, 11, 15, 29055, 12, 14, 9728, 12, 15, 15101, // 11,15
+ 11, -1, 10135, 11, 0, 15330, 12, -1, 12159, 12, 0, 27912, // 12, 0
+ 11, 0, 9575, 11, 1, 14009, 12, 0, 12014, 12, 1, 29938, // 12, 1
+ 11, 1, 8976, 11, 2, 12747, 12, 1, 11760, 12, 2, 32053, // 12, 2
+ 11, 2, 8358, 11, 3, 11554, 12, 2, 11411, 12, 3, 34213, // 12, 3
+ 11, 3, 7746, 11, 4, 10452, 12, 3, 10995, 12, 4, 36343, // 12, 4
+ 11, 4, 7180, 11, 5, 9479, 12, 4, 10569, 12, 5, 38308, // 12, 5
+ 11, 5, 6714, 11, 6, 8690, 12, 5, 10221, 12, 6, 39911, // 12, 6
+ 11, 6, 6403, 11, 7, 8141, 12, 6, 10051, 12, 7, 40941, // 12, 7
+ 12, 7, 10079, 12, 8, 40994, 13, 7, 6381, 13, 8, 8082, // 12, 8
+ 12, 8, 10275, 12, 9, 39949, 13, 8, 6695, 13, 9, 8617, // 12, 9
+ 12, 9, 10653, 12, 10, 38330, 13, 9, 7165, 13, 10, 9388, // 12,10
+ 12, 10, 11108, 12, 11, 36354, 13, 10, 7737, 13, 11, 10337, // 12,11
+ 12, 11, 11554, 12, 12, 34213, 13, 11, 8358, 13, 12, 11411, // 12,12
+ 12, 12, 11934, 12, 13, 32045, 13, 12, 8988, 13, 13, 12569, // 12,13
+ 12, 13, 12216, 12, 14, 29928, 13, 13, 9603, 13, 14, 13789, // 12,14
+ 12, 14, 12388, 12, 15, 27903, 13, 14, 10185, 13, 15, 15060, // 12,15
+ 12, -1, 10637, 12, 0, 15301, 13, -1, 12938, 13, 0, 26660, // 13, 0
+ 12, 0, 10102, 12, 1, 14107, 13, 0, 12897, 13, 1, 28430, // 13, 1
+ 12, 1, 9546, 12, 2, 12982, 13, 1, 12769, 13, 2, 30239, // 13, 2
+ 12, 2, 8988, 12, 3, 11934, 13, 2, 12569, 13, 3, 32045, // 13, 3
+ 12, 3, 8452, 12, 4, 10983, 13, 3, 12323, 13, 4, 33778, // 13, 4
+ 12, 4, 7969, 12, 5, 10156, 13, 4, 12079, 13, 5, 35332, // 13, 5
+ 12, 5, 7573, 12, 6, 9484, 13, 5, 11897, 13, 6, 36582, // 13, 6
+ 12, 6, 7298, 12, 7, 8994, 13, 6, 11842, 13, 7, 37402, // 13, 7
+ 13, 7, 11883, 13, 8, 37470, 14, 7, 7266, 14, 8, 8917, // 13, 8
+ 13, 8, 11972, 13, 9, 36631, 14, 8, 7543, 14, 9, 9390, // 13, 9
+ 13, 9, 12188, 13, 10, 35364, 14, 9, 7943, 14, 10, 10041, // 13,10
+ 13, 10, 12467, 13, 11, 33795, 14, 10, 8432, 14, 11, 10842, // 13,11
+ 13, 11, 12747, 13, 12, 32052, 14, 11, 8976, 14, 12, 11761, // 13,12
+ 13, 12, 12982, 13, 13, 30239, 14, 12, 9546, 14, 13, 12769, // 13,13
+ 13, 13, 13141, 13, 14, 28427, 14, 13, 10119, 14, 14, 13849, // 13,14
+ 13, 14, 13211, 13, 15, 26660, 14, 14, 10676, 14, 15, 14989, // 13,15
+ 13, -1, 11164, 13, 0, 15220, 14, -1, 13787, 14, 0, 25365, // 14, 0
+ 13, 0, 10644, 13, 1, 14145, 14, 0, 13853, 14, 1, 26894, // 14, 1
+ 13, 1, 10119, 13, 2, 13141, 14, 1, 13850, 14, 2, 28426, // 14, 2
+ 13, 2, 9603, 13, 3, 12216, 14, 2, 13789, 14, 3, 29928, // 14, 3
+ 13, 3, 9118, 13, 4, 11385, 14, 3, 13694, 14, 4, 31339, // 14, 4
+ 13, 4, 8685, 13, 5, 10665, 14, 4, 13600, 14, 5, 32586, // 14, 5
+ 13, 5, 8329, 13, 6, 10074, 14, 5, 13548, 14, 6, 33585, // 14, 6
+ 13, 6, 8068, 13, 7, 9626, 14, 6, 13582, 14, 7, 34260, // 14, 7
+ 14, 7, 13638, 14, 8, 34340, 15, 7, 8024, 15, 8, 9534, // 14, 8
+ 14, 8, 13647, 14, 9, 33642, 15, 8, 8286, 15, 9, 9961, // 14, 9
+ 14, 9, 13740, 14, 10, 32624, 15, 9, 8645, 15, 10, 10527, // 14,10
+ 14, 10, 13875, 14, 11, 31361, 15, 10, 9082, 15, 11, 11218, // 14,11
+ 14, 11, 14009, 14, 12, 29938, 15, 11, 9575, 15, 12, 12014, // 14,12
+ 14, 12, 14107, 14, 13, 28430, 15, 12, 10102, 15, 13, 12897, // 14,13
+ 14, 13, 14145, 14, 14, 26893, 15, 13, 10644, 15, 14, 13854, // 14,14
+ 14, 14, 14109, 14, 15, 25368, 15, 14, 11187, 15, 15, 14872, // 14,15
+ 14, -1, 11702, 14, 0, 15076, 15, -1, 14696, 15, 0, 24062, // 15, 0
+ 14, 0, 11187, 14, 1, 14109, 15, 0, 14872, 15, 1, 25368, // 15, 1
+ 14, 1, 10676, 14, 2, 13211, 15, 1, 14990, 15, 2, 26659, // 15, 2
+ 14, 2, 10185, 14, 3, 12388, 15, 2, 15060, 15, 3, 27903, // 15, 3
+ 14, 3, 9728, 14, 4, 11652, 15, 3, 15100, 15, 4, 29056, // 15, 4
+ 14, 4, 9323, 14, 5, 11013, 15, 4, 15135, 15, 5, 30065, // 15, 5
+ 14, 5, 8986, 14, 6, 10482, 15, 5, 15193, 15, 6, 30875, // 15, 6
+ 14, 6, 8727, 14, 7, 10065, 15, 6, 15301, 15, 7, 31443, // 15, 7
+ 15, 7, 15376, 15, 8, 31532, 16, 7, 8669, 16, 8, 9959, // 15, 8
+ 15, 8, 15319, 15, 9, 30939, 16, 8, 8927, 16, 9, 10351, // 15, 9
+ 15, 9, 15311, 15, 10, 30105, 16, 9, 9265, 16, 10, 10855, // 15,10
+ 15, 10, 15325, 15, 11, 29078, 16, 10, 9673, 16, 11, 11460, // 15,11
+ 15, 11, 15330, 15, 12, 27912, 16, 11, 10135, 16, 12, 12159, // 15,12
+ 15, 12, 15301, 15, 13, 26660, 16, 12, 10637, 16, 13, 12938, // 15,13
+ 15, 13, 15220, 15, 14, 25366, 16, 13, 11164, 16, 14, 13786, // 15,14
+ 15, 14, 15076, 15, 15, 24063, 16, 14, 11702, 16, 15, 14695, // 15,15
+ // angle of -2.0 degrees
+ -1, 0, 13368, -1, 1, 10104, 0, 0, 28495, 0, 1, 13569, // 0, 0
+ -1, 1, 12574, -1, 2, 9662, 0, 1, 29831, 0, 2, 13469, // 0, 1
+ -1, 2, 11829, -1, 3, 9229, 0, 2, 31146, 0, 3, 13332, // 0, 2
+ -1, 3, 11143, -1, 4, 8816, 0, 3, 32406, 0, 4, 13171, // 0, 3
+ -1, 4, 10528, -1, 5, 8438, 0, 4, 33564, 0, 5, 13006, // 0, 4
+ -1, 5, 9995, -1, 6, 8107, 0, 5, 34567, 0, 6, 12867, // 0, 5
+ -1, 6, 9558, -1, 7, 7839, 0, 6, 35362, 0, 7, 12777, // 0, 6
+ -1, 7, 9224, -1, 8, 7643, 0, 7, 35905, 0, 8, 12764, // 0, 7
+ 0, 8, 35844, 0, 9, 12728, 1, 8, 9290, 1, 9, 7674, // 0, 8
+ 0, 9, 35315, 0, 10, 12717, 1, 9, 9635, 1, 10, 7869, // 0, 9
+ 0, 10, 34532, 0, 11, 12783, 1, 10, 10086, 1, 11, 8135, // 0,10
+ 0, 11, 33539, 0, 12, 12899, 1, 11, 10635, 1, 12, 8463, // 0,11
+ 0, 12, 32391, 0, 13, 13038, 1, 12, 11269, 1, 13, 8838, // 0,12
+ 0, 13, 31138, 0, 14, 13176, 1, 13, 11977, 1, 14, 9245, // 0,13
+ 0, 14, 29828, 0, 15, 13291, 1, 14, 12746, 1, 15, 9671, // 0,14
+ 0, 15, 28495, 0, 16, 13368, 1, 15, 13569, 1, 16, 10104, // 0,15
+ 0, 0, 13291, 0, 1, 9671, 1, 0, 29828, 1, 1, 12746, // 1, 0
+ 0, 1, 12412, 0, 2, 9202, 1, 1, 31358, 1, 2, 12564, // 1, 1
+ 0, 2, 11580, 0, 3, 8735, 1, 2, 32886, 1, 3, 12335, // 1, 2
+ 0, 3, 10808, 0, 4, 8284, 1, 3, 34369, 1, 4, 12075, // 1, 3
+ 0, 4, 10111, 0, 5, 7865, 1, 4, 35750, 1, 5, 11810, // 1, 4
+ 0, 5, 9509, 0, 6, 7497, 1, 5, 36955, 1, 6, 11575, // 1, 5
+ 0, 6, 9020, 0, 7, 7202, 1, 6, 37906, 1, 7, 11408, // 1, 6
+ 0, 7, 8662, 0, 8, 6997, 1, 7, 38534, 1, 8, 11343, // 1, 7
+ 1, 8, 38481, 1, 9, 11317, 2, 8, 8718, 2, 9, 7020, // 1, 8
+ 1, 9, 37866, 1, 10, 11360, 2, 9, 9086, 2, 10, 7224, // 1, 9
+ 1, 10, 36926, 1, 11, 11507, 2, 10, 9587, 2, 11, 7516, // 1,10
+ 1, 11, 35730, 1, 12, 11721, 2, 11, 10204, 2, 12, 7881, // 1,11
+ 1, 12, 34358, 1, 13, 11964, 2, 12, 10918, 2, 13, 8296, // 1,12
+ 1, 13, 32881, 1, 14, 12203, 2, 13, 11709, 2, 14, 8743, // 1,13
+ 1, 14, 31358, 1, 15, 12412, 2, 14, 12564, 2, 15, 9202, // 1,14
+ 1, 15, 29831, 1, 16, 12574, 2, 15, 13470, 2, 16, 9661, // 1,15
+ 1, 0, 13176, 1, 1, 9245, 2, 0, 31138, 2, 1, 11977, // 2, 0
+ 1, 1, 12203, 1, 2, 8742, 2, 1, 32881, 2, 2, 11710, // 2, 1
+ 1, 2, 11272, 1, 3, 8232, 2, 2, 34650, 2, 3, 11382, // 2, 2
+ 1, 3, 10397, 1, 4, 7728, 2, 3, 36399, 2, 4, 11012, // 2, 3
+ 1, 4, 9597, 1, 5, 7252, 2, 4, 38057, 2, 5, 10630, // 2, 4
+ 1, 5, 8902, 1, 6, 6829, 2, 5, 39526, 2, 6, 10279, // 2, 5
+ 1, 6, 8344, 1, 7, 6491, 2, 6, 40688, 2, 7, 10013, // 2, 6
+ 1, 7, 7951, 1, 8, 6266, 2, 7, 41432, 2, 8, 9887, // 2, 7
+ 2, 8, 41389, 2, 9, 9867, 3, 8, 7996, 3, 9, 6284, // 2, 8
+ 2, 9, 40656, 2, 10, 9977, 3, 9, 8397, 3, 10, 6506, // 2, 9
+ 2, 10, 39503, 2, 11, 10226, 3, 10, 8966, 3, 11, 6841, // 2,10
+ 2, 11, 38042, 2, 12, 10559, 3, 11, 9674, 3, 12, 7261, // 2,11
+ 2, 12, 36392, 2, 13, 10922, 3, 12, 10488, 3, 13, 7734, // 2,12
+ 2, 13, 34650, 2, 14, 11272, 3, 13, 11382, 3, 14, 8232, // 2,13
+ 2, 14, 32886, 2, 15, 11580, 3, 14, 12334, 3, 15, 8736, // 2,14
+ 2, 15, 31146, 2, 16, 11829, 3, 15, 13332, 3, 16, 9229, // 2,15
+ 2, 0, 13038, 2, 1, 8838, 3, 0, 32391, 3, 1, 11269, // 3, 0
+ 2, 1, 11964, 2, 2, 8296, 3, 1, 34358, 3, 2, 10918, // 3, 1
+ 2, 2, 10922, 2, 3, 7734, 3, 2, 36392, 3, 3, 10488, // 3, 2
+ 2, 3, 9924, 2, 4, 7164, 3, 3, 38450, 3, 4, 9998, // 3, 3
+ 2, 4, 8995, 2, 5, 6611, 3, 4, 40452, 3, 5, 9478, // 3, 4
+ 2, 5, 8175, 2, 6, 6108, 3, 5, 42271, 3, 6, 8982, // 3, 5
+ 2, 6, 7516, 2, 7, 5703, 3, 6, 43733, 3, 7, 8584, // 3, 6
+ 2, 7, 7072, 2, 8, 5443, 3, 7, 44649, 3, 8, 8372, // 3, 7
+ 3, 8, 44616, 3, 9, 8359, 4, 8, 7106, 4, 9, 5455, // 3, 8
+ 3, 9, 43710, 3, 10, 8558, 4, 9, 7556, 4, 10, 5712, // 3, 9
+ 3, 10, 42256, 3, 11, 8940, 4, 10, 8224, 4, 11, 6116, // 3,10
+ 3, 11, 40444, 3, 12, 9421, 4, 11, 9056, 4, 12, 6615, // 3,11
+ 3, 12, 38450, 3, 13, 9924, 4, 12, 9998, 4, 13, 7164, // 3,12
+ 3, 13, 36399, 3, 14, 10397, 4, 13, 11012, 4, 14, 7728, // 3,13
+ 3, 14, 34369, 3, 15, 10808, 4, 14, 12074, 4, 15, 8285, // 3,14
+ 3, 15, 32406, 3, 16, 11143, 4, 15, 13171, 4, 16, 8816, // 3,15
+ 3, 0, 12899, 3, 1, 8463, 4, 0, 33539, 4, 1, 10635, // 4, 0
+ 3, 1, 11721, 3, 2, 7881, 4, 1, 35730, 4, 2, 10204, // 4, 1
+ 3, 2, 10559, 3, 3, 7261, 4, 2, 38042, 4, 3, 9674, // 4, 2
+ 3, 3, 9421, 3, 4, 6615, 4, 3, 40444, 4, 4, 9056, // 4, 3
+ 3, 4, 8332, 3, 5, 5965, 4, 4, 42861, 4, 5, 8378, // 4, 4
+ 3, 5, 7342, 3, 6, 5350, 4, 5, 45146, 4, 6, 7698, // 4, 5
+ 3, 6, 6530, 3, 7, 4838, 4, 6, 47049, 4, 7, 7119, // 4, 6
+ 3, 7, 6000, 3, 8, 4513, 4, 7, 48240, 4, 8, 6783, // 4, 7
+ 4, 8, 48218, 4, 9, 6774, 5, 8, 6023, 5, 9, 4521, // 4, 8
+ 4, 9, 47035, 4, 10, 7100, 5, 9, 6558, 5, 10, 4843, // 4, 9
+ 4, 10, 45139, 4, 11, 7667, 5, 10, 7377, 5, 11, 5353, // 4,10
+ 4, 11, 42861, 4, 12, 8332, 5, 11, 8378, 5, 12, 5965, // 4,11
+ 4, 12, 40452, 4, 13, 8995, 5, 12, 9478, 5, 13, 6611, // 4,12
+ 4, 13, 38057, 4, 14, 9597, 5, 13, 10630, 5, 14, 7252, // 4,13
+ 4, 14, 35750, 4, 15, 10111, 5, 14, 11810, 5, 15, 7865, // 4,14
+ 4, 15, 33564, 4, 16, 10528, 5, 15, 13007, 5, 16, 8437, // 4,15
+ 4, 0, 12783, 4, 1, 8135, 5, 0, 34532, 5, 1, 10086, // 5, 0
+ 4, 1, 11507, 4, 2, 7517, 5, 1, 36926, 5, 2, 9586, // 5, 1
+ 4, 2, 10226, 4, 3, 6842, 5, 2, 39503, 5, 3, 8965, // 5, 2
+ 4, 3, 8940, 4, 4, 6116, 5, 3, 42256, 5, 4, 8224, // 5, 3
+ 4, 4, 7667, 4, 5, 5353, 5, 4, 45139, 5, 5, 7377, // 5, 4
+ 4, 5, 6451, 4, 6, 4591, 5, 5, 48019, 5, 6, 6475, // 5, 5
+ 4, 6, 5400, 4, 7, 3911, 5, 6, 50587, 5, 7, 5638, // 5, 6
+ 4, 7, 4708, 4, 8, 3466, 5, 7, 52266, 5, 8, 5096, // 5, 7
+ 5, 8, 52253, 5, 9, 5092, 6, 8, 4721, 6, 9, 3470, // 5, 8
+ 5, 9, 50581, 5, 10, 5624, 6, 9, 5418, 6, 10, 3913, // 5, 9
+ 5, 10, 48019, 5, 11, 6451, 6, 10, 6475, 6, 11, 4591, // 5,10
+ 5, 11, 45146, 5, 12, 7342, 6, 11, 7698, 6, 12, 5350, // 5,11
+ 5, 12, 42271, 5, 13, 8175, 6, 12, 8982, 6, 13, 6108, // 5,12
+ 5, 13, 39526, 5, 14, 8902, 6, 13, 10279, 6, 14, 6829, // 5,13
+ 5, 14, 36955, 5, 15, 9509, 6, 14, 11575, 6, 15, 7497, // 5,14
+ 5, 15, 34567, 5, 16, 9995, 6, 15, 12867, 6, 16, 8107, // 5,15
+ 5, 0, 12717, 5, 1, 7868, 6, 0, 35315, 6, 1, 9636, // 6, 0
+ 5, 1, 11360, 5, 2, 7224, 6, 1, 37866, 6, 2, 9086, // 6, 1
+ 5, 2, 9977, 5, 3, 6506, 6, 2, 40656, 6, 3, 8397, // 6, 2
+ 5, 3, 8558, 5, 4, 5712, 6, 3, 43710, 6, 4, 7556, // 6, 3
+ 5, 4, 7100, 5, 5, 4843, 6, 4, 47035, 6, 5, 6558, // 6, 4
+ 5, 5, 5624, 5, 6, 3913, 6, 5, 50581, 6, 6, 5418, // 6, 5
+ 5, 6, 4217, 5, 7, 2989, 6, 6, 54105, 6, 7, 4225, // 6, 6
+ 5, 7, 3180, 5, 8, 2294, 6, 7, 56756, 6, 8, 3306, // 6, 7
+ 6, 8, 56751, 6, 9, 3303, 7, 8, 3186, 7, 9, 2296, // 6, 8
+ 6, 9, 54105, 6, 10, 4217, 7, 9, 4225, 7, 10, 2989, // 6, 9
+ 6, 10, 50587, 6, 11, 5400, 7, 10, 5637, 7, 11, 3912, // 6,10
+ 6, 11, 47049, 6, 12, 6530, 7, 11, 7119, 7, 12, 4838, // 6,11
+ 6, 12, 43733, 6, 13, 7516, 7, 12, 8584, 7, 13, 5703, // 6,12
+ 6, 13, 40688, 6, 14, 8344, 7, 13, 10013, 7, 14, 6491, // 6,13
+ 6, 14, 37906, 6, 15, 9020, 7, 14, 11407, 7, 15, 7203, // 6,14
+ 6, 15, 35362, 6, 16, 9558, 7, 15, 12777, 7, 16, 7839, // 6,15
+ 6, 0, 12728, 6, 1, 7674, 7, 0, 35844, 7, 1, 9290, // 7, 0
+ 6, 1, 11317, 6, 2, 7020, 7, 1, 38481, 7, 2, 8718, // 7, 1
+ 6, 2, 9867, 6, 3, 6284, 7, 2, 41389, 7, 3, 7996, // 7, 2
+ 6, 3, 8359, 6, 4, 5454, 7, 3, 44616, 7, 4, 7107, // 7, 3
+ 6, 4, 6774, 6, 5, 4521, 7, 4, 48218, 7, 5, 6023, // 7, 4
+ 6, 5, 5092, 6, 6, 3470, 7, 5, 52253, 7, 6, 4721, // 7, 5
+ 6, 6, 3303, 6, 7, 2295, 7, 6, 56751, 7, 7, 3187, // 7, 6
+ 6, 7, 1541, 6, 8, 1090, 7, 7, 61364, 7, 8, 1541, // 7, 7
+ 7, 8, 61364, 7, 9, 1541, 8, 8, 1542, 8, 9, 1089, // 7, 8
+ 7, 9, 56756, 7, 10, 3180, 8, 9, 3306, 8, 10, 2294, // 7, 9
+ 7, 10, 52266, 7, 11, 4708, 8, 10, 5097, 8, 11, 3465, // 7,10
+ 7, 11, 48240, 7, 12, 6000, 8, 11, 6783, 8, 12, 4513, // 7,11
+ 7, 12, 44649, 7, 13, 7072, 8, 12, 8373, 8, 13, 5442, // 7,12
+ 7, 13, 41432, 7, 14, 7951, 8, 13, 9886, 8, 14, 6267, // 7,13
+ 7, 14, 38534, 7, 15, 8662, 8, 14, 11344, 8, 15, 6996, // 7,14
+ 7, 15, 35905, 7, 16, 9224, 8, 15, 12764, 8, 16, 7643, // 7,15
+ 7, -1, 7643, 7, 0, 12764, 8, -1, 9224, 8, 0, 35905, // 8, 0
+ 7, 0, 6997, 7, 1, 11344, 8, 0, 8662, 8, 1, 38533, // 8, 1
+ 7, 1, 6266, 7, 2, 9886, 8, 1, 7951, 8, 2, 41433, // 8, 2
+ 7, 2, 5443, 7, 3, 8373, 8, 2, 7072, 8, 3, 44648, // 8, 3
+ 7, 3, 4513, 7, 4, 6783, 8, 3, 6000, 8, 4, 48240, // 8, 4
+ 7, 4, 3466, 7, 5, 5097, 8, 4, 4708, 8, 5, 52265, // 8, 5
+ 7, 5, 2294, 7, 6, 3306, 8, 5, 3180, 8, 6, 56756, // 8, 6
+ 7, 6, 1090, 7, 7, 1542, 8, 6, 1541, 8, 7, 61363, // 8, 7
+ 8, 7, 1542, 8, 8, 61364, 9, 7, 1090, 9, 8, 1540, // 8, 8
+ 8, 8, 3186, 8, 9, 56751, 9, 8, 2295, 9, 9, 3304, // 8, 9
+ 8, 9, 4721, 8, 10, 52253, 9, 9, 3470, 9, 10, 5092, // 8,10
+ 8, 10, 6023, 8, 11, 48218, 9, 10, 4521, 9, 11, 6774, // 8,11
+ 8, 11, 7106, 8, 12, 44616, 9, 11, 5454, 9, 12, 8360, // 8,12
+ 8, 12, 7996, 8, 13, 41389, 9, 12, 6284, 9, 13, 9867, // 8,13
+ 8, 13, 8718, 8, 14, 38481, 9, 13, 7020, 9, 14, 11317, // 8,14
+ 8, 14, 9290, 8, 15, 35844, 9, 14, 7674, 9, 15, 12728, // 8,15
+ 8, -1, 7839, 8, 0, 12777, 9, -1, 9558, 9, 0, 35362, // 9, 0
+ 8, 0, 7202, 8, 1, 11407, 9, 0, 9020, 9, 1, 37907, // 9, 1
+ 8, 1, 6491, 8, 2, 10013, 9, 1, 8344, 9, 2, 40688, // 9, 2
+ 8, 2, 5703, 8, 3, 8584, 9, 2, 7516, 9, 3, 43733, // 9, 3
+ 8, 3, 4838, 8, 4, 7119, 9, 3, 6530, 9, 4, 47049, // 9, 4
+ 8, 4, 3911, 8, 5, 5637, 9, 4, 5400, 9, 5, 50588, // 9, 5
+ 8, 5, 2989, 8, 6, 4225, 9, 5, 4217, 9, 6, 54105, // 9, 6
+ 8, 6, 2295, 8, 7, 3186, 9, 6, 3303, 9, 7, 56752, // 9, 7
+ 9, 7, 3306, 9, 8, 56756, 10, 7, 2294, 10, 8, 3180, // 9, 8
+ 9, 8, 4225, 9, 9, 54105, 10, 8, 2989, 10, 9, 4217, // 9, 9
+ 9, 9, 5418, 9, 10, 50581, 10, 9, 3913, 10, 10, 5624, // 9,10
+ 9, 10, 6558, 9, 11, 47035, 10, 10, 4843, 10, 11, 7100, // 9,11
+ 9, 11, 7556, 9, 12, 43710, 10, 11, 5712, 10, 12, 8558, // 9,12
+ 9, 12, 8397, 9, 13, 40656, 10, 12, 6506, 10, 13, 9977, // 9,13
+ 9, 13, 9086, 9, 14, 37866, 10, 13, 7224, 10, 14, 11360, // 9,14
+ 9, 14, 9635, 9, 15, 35315, 10, 14, 7868, 10, 15, 12718, // 9,15
+ 9, -1, 8107, 9, 0, 12867, 10, -1, 9995, 10, 0, 34567, // 10, 0
+ 9, 0, 7497, 9, 1, 11575, 10, 0, 9509, 10, 1, 36955, // 10, 1
+ 9, 1, 6829, 9, 2, 10279, 10, 1, 8902, 10, 2, 39526, // 10, 2
+ 9, 2, 6108, 9, 3, 8982, 10, 2, 8175, 10, 3, 42271, // 10, 3
+ 9, 3, 5350, 9, 4, 7698, 10, 3, 7342, 10, 4, 45146, // 10, 4
+ 9, 4, 4591, 9, 5, 6475, 10, 4, 6451, 10, 5, 48019, // 10, 5
+ 9, 5, 3913, 9, 6, 5418, 10, 5, 5624, 10, 6, 50581, // 10, 6
+ 9, 6, 3470, 9, 7, 4721, 10, 6, 5092, 10, 7, 52253, // 10, 7
+ 10, 7, 5097, 10, 8, 52266, 11, 7, 3466, 11, 8, 4707, // 10, 8
+ 10, 8, 5637, 10, 9, 50587, 11, 8, 3911, 11, 9, 5401, // 10, 9
+ 10, 9, 6475, 10, 10, 48019, 11, 9, 4591, 11, 10, 6451, // 10,10
+ 10, 10, 7377, 10, 11, 45139, 11, 10, 5353, 11, 11, 7667, // 10,11
+ 10, 11, 8224, 10, 12, 42256, 11, 11, 6116, 11, 12, 8940, // 10,12
+ 10, 12, 8966, 10, 13, 39503, 11, 12, 6842, 11, 13, 10225, // 10,13
+ 10, 13, 9587, 10, 14, 36926, 11, 13, 7517, 11, 14, 11506, // 10,14
+ 10, 14, 10086, 10, 15, 34532, 11, 14, 8135, 11, 15, 12783, // 10,15
+ 10, -1, 8438, 10, 0, 13007, 11, -1, 10528, 11, 0, 33563, // 11, 0
+ 10, 0, 7865, 10, 1, 11810, 11, 0, 10111, 11, 1, 35750, // 11, 1
+ 10, 1, 7252, 10, 2, 10630, 11, 1, 9597, 11, 2, 38057, // 11, 2
+ 10, 2, 6611, 10, 3, 9478, 11, 2, 8995, 11, 3, 40452, // 11, 3
+ 10, 3, 5965, 10, 4, 8378, 11, 3, 8332, 11, 4, 42861, // 11, 4
+ 10, 4, 5353, 10, 5, 7377, 11, 4, 7667, 11, 5, 45139, // 11, 5
+ 10, 5, 4843, 10, 6, 6558, 11, 5, 7100, 11, 6, 47035, // 11, 6
+ 10, 6, 4521, 10, 7, 6023, 11, 6, 6774, 11, 7, 48218, // 11, 7
+ 11, 7, 6783, 11, 8, 48240, 12, 7, 4513, 12, 8, 6000, // 11, 8
+ 11, 8, 7119, 11, 9, 47049, 12, 8, 4838, 12, 9, 6530, // 11, 9
+ 11, 9, 7698, 11, 10, 45146, 12, 9, 5350, 12, 10, 7342, // 11,10
+ 11, 10, 8378, 11, 11, 42861, 12, 10, 5965, 12, 11, 8332, // 11,11
+ 11, 11, 9056, 11, 12, 40444, 12, 11, 6615, 12, 12, 9421, // 11,12
+ 11, 12, 9674, 11, 13, 38042, 12, 12, 7261, 12, 13, 10559, // 11,13
+ 11, 13, 10204, 11, 14, 35730, 12, 13, 7881, 12, 14, 11721, // 11,14
+ 11, 14, 10635, 11, 15, 33539, 12, 14, 8463, 12, 15, 12899, // 11,15
+ 11, -1, 8816, 11, 0, 13171, 12, -1, 11143, 12, 0, 32406, // 12, 0
+ 11, 0, 8284, 11, 1, 12074, 12, 0, 10808, 12, 1, 34370, // 12, 1
+ 11, 1, 7728, 11, 2, 11012, 12, 1, 10397, 12, 2, 36399, // 12, 2
+ 11, 2, 7164, 11, 3, 9998, 12, 2, 9924, 12, 3, 38450, // 12, 3
+ 11, 3, 6615, 11, 4, 9056, 12, 3, 9421, 12, 4, 40444, // 12, 4
+ 11, 4, 6116, 11, 5, 8224, 12, 4, 8940, 12, 5, 42256, // 12, 5
+ 11, 5, 5712, 11, 6, 7556, 12, 5, 8558, 12, 6, 43710, // 12, 6
+ 11, 6, 5454, 11, 7, 7106, 12, 6, 8359, 12, 7, 44617, // 12, 7
+ 12, 7, 8373, 12, 8, 44649, 13, 7, 5443, 13, 8, 7071, // 12, 8
+ 12, 8, 8584, 12, 9, 43733, 13, 8, 5703, 13, 9, 7516, // 12, 9
+ 12, 9, 8982, 12, 10, 42271, 13, 9, 6108, 13, 10, 8175, // 12,10
+ 12, 10, 9478, 12, 11, 40452, 13, 10, 6611, 13, 11, 8995, // 12,11
+ 12, 11, 9998, 12, 12, 38450, 13, 11, 7164, 13, 12, 9924, // 12,12
+ 12, 12, 10488, 12, 13, 36392, 13, 12, 7734, 13, 13, 10922, // 12,13
+ 12, 13, 10918, 12, 14, 34358, 13, 13, 8296, 13, 14, 11964, // 12,14
+ 12, 14, 11269, 12, 15, 32391, 13, 14, 8838, 13, 15, 13038, // 12,15
+ 12, -1, 9229, 12, 0, 13332, 13, -1, 11829, 13, 0, 31146, // 13, 0
+ 12, 0, 8735, 12, 1, 12334, 13, 0, 11580, 13, 1, 32887, // 13, 1
+ 12, 1, 8232, 12, 2, 11382, 13, 1, 11272, 13, 2, 34650, // 13, 2
+ 12, 2, 7734, 12, 3, 10488, 13, 2, 10922, 13, 3, 36392, // 13, 3
+ 12, 3, 7261, 12, 4, 9674, 13, 3, 10559, 13, 4, 38042, // 13, 4
+ 12, 4, 6842, 12, 5, 8966, 13, 4, 10226, 13, 5, 39502, // 13, 5
+ 12, 5, 6506, 12, 6, 8397, 13, 5, 9977, 13, 6, 40656, // 13, 6
+ 12, 6, 6284, 12, 7, 7996, 13, 6, 9867, 13, 7, 41389, // 13, 7
+ 13, 7, 9886, 13, 8, 41432, 14, 7, 6266, 14, 8, 7952, // 13, 8
+ 13, 8, 10013, 13, 9, 40688, 14, 8, 6491, 14, 9, 8344, // 13, 9
+ 13, 9, 10279, 13, 10, 39526, 14, 9, 6829, 14, 10, 8902, // 13,10
+ 13, 10, 10630, 13, 11, 38057, 14, 10, 7252, 14, 11, 9597, // 13,11
+ 13, 11, 11012, 13, 12, 36399, 14, 11, 7728, 14, 12, 10397, // 13,12
+ 13, 12, 11382, 13, 13, 34650, 14, 12, 8232, 14, 13, 11272, // 13,13
+ 13, 13, 11709, 13, 14, 32881, 14, 13, 8742, 14, 14, 12204, // 13,14
+ 13, 14, 11977, 13, 15, 31138, 14, 14, 9245, 14, 15, 13176, // 13,15
+ 13, -1, 9662, 13, 0, 13470, 14, -1, 12574, 14, 0, 29830, // 14, 0
+ 13, 0, 9202, 13, 1, 12564, 14, 0, 12412, 14, 1, 31358, // 14, 1
+ 13, 1, 8742, 13, 2, 11709, 14, 1, 12203, 14, 2, 32882, // 14, 2
+ 13, 2, 8296, 13, 3, 10918, 14, 2, 11964, 14, 3, 34358, // 14, 3
+ 13, 3, 7881, 13, 4, 10204, 14, 3, 11721, 14, 4, 35730, // 14, 4
+ 13, 4, 7517, 13, 5, 9587, 14, 4, 11507, 14, 5, 36925, // 14, 5
+ 13, 5, 7224, 13, 6, 9086, 14, 5, 11360, 14, 6, 37866, // 14, 6
+ 13, 6, 7020, 13, 7, 8718, 14, 6, 11317, 14, 7, 38481, // 14, 7
+ 14, 7, 11344, 14, 8, 38534, 15, 7, 6997, 15, 8, 8661, // 14, 8
+ 14, 8, 11407, 14, 9, 37906, 15, 8, 7202, 15, 9, 9021, // 14, 9
+ 14, 9, 11575, 14, 10, 36955, 15, 9, 7497, 15, 10, 9509, // 14,10
+ 14, 10, 11810, 14, 11, 35750, 15, 10, 7865, 15, 11, 10111, // 14,11
+ 14, 11, 12074, 14, 12, 34369, 15, 11, 8284, 15, 12, 10809, // 14,12
+ 14, 12, 12334, 14, 13, 32886, 15, 12, 8735, 15, 13, 11581, // 14,13
+ 14, 13, 12564, 14, 14, 31358, 15, 13, 9202, 15, 14, 12412, // 14,14
+ 14, 14, 12746, 14, 15, 29828, 15, 14, 9671, 15, 15, 13291, // 14,15
+ 14, -1, 10104, 14, 0, 13569, 15, -1, 13368, 15, 0, 28495, // 15, 0
+ 14, 0, 9671, 14, 1, 12746, 15, 0, 13291, 15, 1, 29828, // 15, 1
+ 14, 1, 9245, 14, 2, 11977, 15, 1, 13176, 15, 2, 31138, // 15, 2
+ 14, 2, 8838, 14, 3, 11269, 15, 2, 13038, 15, 3, 32391, // 15, 3
+ 14, 3, 8463, 14, 4, 10635, 15, 3, 12899, 15, 4, 33539, // 15, 4
+ 14, 4, 8135, 14, 5, 10086, 15, 4, 12783, 15, 5, 34532, // 15, 5
+ 14, 5, 7868, 14, 6, 9635, 15, 5, 12717, 15, 6, 35316, // 15, 6
+ 14, 6, 7674, 14, 7, 9290, 15, 6, 12728, 15, 7, 35844, // 15, 7
+ 15, 7, 12764, 15, 8, 35905, 16, 7, 7643, 16, 8, 9224, // 15, 8
+ 15, 8, 12777, 15, 9, 35362, 16, 8, 7839, 16, 9, 9558, // 15, 9
+ 15, 9, 12867, 15, 10, 34567, 16, 9, 8107, 16, 10, 9995, // 15,10
+ 15, 10, 13007, 15, 11, 33564, 16, 10, 8438, 16, 11, 10527, // 15,11
+ 15, 11, 13171, 15, 12, 32406, 16, 11, 8816, 16, 12, 11143, // 15,12
+ 15, 12, 13332, 15, 13, 31146, 16, 12, 9229, 16, 13, 11829, // 15,13
+ 15, 13, 13470, 15, 14, 29831, 16, 13, 9662, 16, 14, 12573, // 15,14
+ 15, 14, 13569, 15, 15, 28495, 16, 14, 10104, 16, 15, 13368, // 15,15
+ // angle of -1.5 degrees
+ -1, 0, 11440, -1, 1, 8358, 0, 0, 34212, 0, 1, 11526, // 0, 0
+ -1, 1, 10780, -1, 2, 7983, 0, 1, 35506, 0, 2, 11267, // 0, 1
+ -1, 2, 10158, -1, 3, 7620, 0, 2, 36764, 0, 3, 10994, // 0, 2
+ -1, 3, 9585, -1, 4, 7276, 0, 3, 37951, 0, 4, 10724, // 0, 3
+ -1, 4, 9072, -1, 5, 6965, 0, 4, 39026, 0, 5, 10473, // 0, 4
+ -1, 5, 8632, -1, 6, 6699, 0, 5, 39940, 0, 6, 10265, // 0, 5
+ -1, 6, 8278, -1, 7, 6489, 0, 6, 40646, 0, 7, 10123, // 0, 6
+ -1, 7, 8018, -1, 8, 6346, 0, 7, 41106, 0, 8, 10066, // 0, 7
+ 0, 8, 41072, 0, 9, 10052, 1, 8, 8052, 1, 9, 6360, // 0, 8
+ 0, 9, 40618, 0, 10, 10100, 1, 9, 8316, 1, 10, 6502, // 0, 9
+ 0, 10, 39918, 0, 11, 10232, 1, 10, 8676, 1, 11, 6710, // 0,10
+ 0, 11, 39009, 0, 12, 10430, 1, 11, 9122, 1, 12, 6975, // 0,11
+ 0, 12, 37939, 0, 13, 10670, 1, 12, 9642, 1, 13, 7285, // 0,12
+ 0, 13, 36756, 0, 14, 10930, 1, 13, 10224, 1, 14, 7626, // 0,13
+ 0, 14, 35502, 0, 15, 11192, 1, 14, 10855, 1, 15, 7987, // 0,14
+ 0, 15, 34212, 0, 16, 11440, 1, 15, 11526, 1, 16, 8358, // 0,15
+ 0, 0, 11192, 0, 1, 7987, 1, 0, 35502, 1, 1, 10855, // 1, 0
+ 0, 1, 10467, 0, 2, 7579, 1, 1, 36959, 1, 2, 10531, // 1, 1
+ 0, 2, 9777, 0, 3, 7177, 1, 2, 38394, 1, 3, 10188, // 1, 2
+ 0, 3, 9135, 0, 4, 6792, 1, 3, 39767, 1, 4, 9842, // 1, 3
+ 0, 4, 8557, 0, 5, 6440, 1, 4, 41026, 1, 5, 9513, // 1, 4
+ 0, 5, 8061, 0, 6, 6137, 1, 5, 42105, 1, 6, 9233, // 1, 5
+ 0, 6, 7667, 0, 7, 5900, 1, 6, 42936, 1, 7, 9033, // 1, 6
+ 0, 7, 7390, 0, 8, 5745, 1, 7, 43461, 1, 8, 8940, // 1, 7
+ 1, 8, 43433, 1, 9, 8929, 2, 8, 7418, 2, 9, 5756, // 1, 8
+ 1, 9, 42913, 1, 10, 9014, 2, 9, 7699, 2, 10, 5910, // 1, 9
+ 1, 10, 42087, 1, 11, 9206, 2, 10, 8098, 2, 11, 6145, // 1,10
+ 1, 11, 41013, 1, 12, 9478, 2, 11, 8599, 2, 12, 6446, // 1,11
+ 1, 12, 39759, 1, 13, 9796, 2, 12, 9184, 2, 13, 6797, // 1,12
+ 1, 13, 38390, 1, 14, 10133, 2, 13, 9834, 2, 14, 7179, // 1,13
+ 1, 14, 36959, 1, 15, 10467, 2, 14, 10532, 2, 15, 7578, // 1,14
+ 1, 15, 35506, 1, 16, 10780, 2, 15, 11267, 2, 16, 7983, // 1,15
+ 1, 0, 10930, 1, 1, 7626, 2, 0, 36756, 2, 1, 10224, // 2, 0
+ 1, 1, 10133, 1, 2, 7179, 2, 1, 38390, 2, 2, 9834, // 2, 1
+ 1, 2, 9366, 1, 3, 6732, 2, 2, 40025, 2, 3, 9413, // 2, 2
+ 1, 3, 8641, 1, 4, 6297, 2, 3, 41618, 2, 4, 8980, // 2, 3
+ 1, 4, 7981, 1, 5, 5891, 2, 4, 43105, 2, 5, 8559, // 2, 4
+ 1, 5, 7411, 1, 6, 5537, 2, 5, 44399, 2, 6, 8189, // 2, 5
+ 1, 6, 6961, 1, 7, 5261, 2, 6, 45401, 2, 7, 7913, // 2, 6
+ 1, 7, 6658, 1, 8, 5087, 2, 7, 46017, 2, 8, 7774, // 2, 7
+ 2, 8, 45995, 2, 9, 7766, 3, 8, 6680, 3, 9, 5095, // 2, 8
+ 2, 9, 45383, 2, 10, 7899, 3, 9, 6986, 3, 10, 5268, // 2, 9
+ 2, 10, 44386, 2, 11, 8167, 3, 10, 7440, 3, 11, 5543, // 2,10
+ 2, 11, 43096, 2, 12, 8530, 3, 11, 8015, 3, 12, 5895, // 2,11
+ 2, 12, 41614, 2, 13, 8941, 3, 12, 8681, 3, 13, 6300, // 2,12
+ 2, 13, 40025, 2, 14, 9366, 3, 13, 9413, 3, 14, 6732, // 2,13
+ 2, 14, 38394, 2, 15, 9777, 3, 14, 10188, 3, 15, 7177, // 2,14
+ 2, 15, 36764, 2, 16, 10158, 3, 15, 10994, 3, 16, 7620, // 2,15
+ 2, 0, 10670, 2, 1, 7285, 3, 0, 37939, 3, 1, 9642, // 3, 0
+ 2, 1, 9796, 2, 2, 6797, 3, 1, 39759, 3, 2, 9184, // 3, 1
+ 2, 2, 8941, 2, 3, 6299, 3, 2, 41614, 3, 3, 8682, // 3, 2
+ 2, 3, 8120, 2, 4, 5804, 3, 3, 43461, 3, 4, 8151, // 3, 3
+ 2, 4, 7356, 2, 5, 5330, 3, 4, 45229, 3, 5, 7621, // 3, 4
+ 2, 5, 6685, 2, 6, 4906, 3, 5, 46806, 3, 6, 7139, // 3, 5
+ 2, 6, 6154, 2, 7, 4572, 3, 6, 48049, 3, 7, 6761, // 3, 6
+ 2, 7, 5811, 2, 8, 4366, 3, 7, 48801, 3, 8, 6558, // 3, 7
+ 3, 8, 48785, 3, 9, 6552, 4, 8, 5827, 4, 9, 4372, // 3, 8
+ 3, 9, 48037, 3, 10, 6750, 4, 9, 6173, 4, 10, 4576, // 3, 9
+ 3, 10, 46798, 3, 11, 7121, 4, 10, 6707, 4, 11, 4910, // 3,10
+ 3, 11, 45224, 3, 12, 7598, 4, 11, 7382, 4, 12, 5332, // 3,11
+ 3, 12, 43461, 3, 13, 8120, 4, 12, 8151, 4, 13, 5804, // 3,12
+ 3, 13, 41618, 3, 14, 8641, 4, 13, 8979, 4, 14, 6298, // 3,13
+ 3, 14, 39767, 3, 15, 9135, 4, 14, 9841, 4, 15, 6793, // 3,14
+ 3, 15, 37951, 3, 16, 9585, 4, 15, 10723, 4, 16, 7277, // 3,15
+ 3, 0, 10430, 3, 1, 6975, 4, 0, 39009, 4, 1, 9122, // 4, 0
+ 3, 1, 9478, 3, 2, 6447, 4, 1, 41013, 4, 2, 8598, // 4, 1
+ 3, 2, 8530, 3, 3, 5895, 4, 2, 43096, 4, 3, 8015, // 4, 2
+ 3, 3, 7598, 3, 4, 5331, 4, 3, 45224, 4, 4, 7383, // 4, 3
+ 3, 4, 6708, 3, 5, 4774, 4, 4, 47328, 4, 5, 6726, // 4, 4
+ 3, 5, 5901, 3, 6, 4257, 4, 5, 49279, 4, 6, 6099, // 4, 5
+ 3, 6, 5248, 3, 7, 3834, 4, 6, 50873, 4, 7, 5581, // 4, 6
+ 3, 7, 4835, 3, 8, 3575, 4, 7, 51842, 4, 8, 5284, // 4, 7
+ 4, 8, 51832, 4, 9, 5280, 5, 8, 4846, 5, 9, 3578, // 4, 8
+ 4, 9, 50865, 4, 10, 5573, 5, 9, 5261, 5, 10, 3837, // 4, 9
+ 4, 10, 49275, 4, 11, 6086, 5, 10, 5917, 5, 11, 4258, // 4,10
+ 4, 11, 47328, 4, 12, 6708, 5, 11, 6727, 5, 12, 4773, // 4,11
+ 4, 12, 45229, 4, 13, 7356, 5, 12, 7622, 5, 13, 5329, // 4,12
+ 4, 13, 43105, 4, 14, 7981, 5, 13, 8559, 5, 14, 5891, // 4,13
+ 4, 14, 41026, 4, 15, 8557, 5, 14, 9513, 5, 15, 6440, // 4,14
+ 4, 15, 39026, 4, 16, 9072, 5, 15, 10473, 5, 16, 6965, // 4,15
+ 4, 0, 10232, 4, 1, 6710, 5, 0, 39918, 5, 1, 8676, // 5, 0
+ 4, 1, 9206, 4, 2, 6145, 5, 1, 42087, 5, 2, 8098, // 5, 1
+ 4, 2, 8167, 4, 3, 5543, 5, 2, 44386, 5, 3, 7440, // 5, 2
+ 4, 3, 7121, 4, 4, 4909, 5, 3, 46798, 5, 4, 6708, // 5, 3
+ 4, 4, 6086, 4, 5, 4258, 5, 4, 49275, 5, 5, 5917, // 5, 4
+ 4, 5, 5103, 4, 6, 3621, 5, 5, 51700, 5, 6, 5112, // 5, 5
+ 4, 6, 4262, 4, 7, 3064, 5, 6, 53816, 5, 7, 4394, // 5, 6
+ 4, 7, 3720, 4, 8, 2708, 5, 7, 55168, 5, 8, 3940, // 5, 7
+ 5, 8, 55162, 5, 9, 3938, 6, 8, 3726, 6, 9, 2710, // 5, 8
+ 5, 9, 53813, 5, 10, 4388, 6, 9, 4269, 6, 10, 3066, // 5, 9
+ 5, 10, 51700, 5, 11, 5103, 6, 10, 5113, 6, 11, 3620, // 5,10
+ 5, 11, 49279, 5, 12, 5901, 6, 11, 6099, 6, 12, 4257, // 5,11
+ 5, 12, 46806, 5, 13, 6685, 6, 12, 7138, 6, 13, 4907, // 5,12
+ 5, 13, 44399, 5, 14, 7411, 6, 13, 8189, 6, 14, 5537, // 5,13
+ 5, 14, 42105, 5, 15, 8061, 6, 14, 9233, 6, 15, 6137, // 5,14
+ 5, 15, 39940, 5, 16, 8632, 6, 15, 10265, 6, 16, 6699, // 5,15
+ 5, 0, 10100, 5, 1, 6502, 6, 0, 40618, 6, 1, 8316, // 6, 0
+ 5, 1, 9014, 5, 2, 5910, 6, 1, 42913, 6, 2, 7699, // 6, 1
+ 5, 2, 7899, 5, 3, 5268, 6, 2, 45383, 6, 3, 6986, // 6, 2
+ 5, 3, 6750, 5, 4, 4576, 6, 3, 48037, 6, 4, 6173, // 6, 3
+ 5, 4, 5573, 5, 5, 3837, 6, 4, 50865, 6, 5, 5261, // 6, 4
+ 5, 5, 4388, 5, 6, 3065, 6, 5, 53813, 6, 6, 4270, // 6, 5
+ 5, 6, 3271, 5, 7, 2316, 6, 6, 56673, 6, 7, 3276, // 6, 6
+ 5, 7, 2462, 5, 8, 1766, 6, 7, 58775, 6, 8, 2533, // 6, 7
+ 6, 8, 58773, 6, 9, 2532, 7, 8, 2464, 7, 9, 1767, // 6, 8
+ 6, 9, 56673, 6, 10, 3271, 7, 9, 3275, 7, 10, 2317, // 6, 9
+ 6, 10, 53816, 6, 11, 4262, 7, 10, 4394, 7, 11, 3064, // 6,10
+ 6, 11, 50873, 6, 12, 5248, 7, 11, 5581, 7, 12, 3834, // 6,11
+ 6, 12, 48049, 6, 13, 6154, 7, 12, 6761, 7, 13, 4572, // 6,12
+ 6, 13, 45401, 6, 14, 6961, 7, 13, 7913, 7, 14, 5261, // 6,13
+ 6, 14, 42936, 6, 15, 7667, 7, 14, 9032, 7, 15, 5901, // 6,14
+ 6, 15, 40646, 6, 16, 8278, 7, 15, 10123, 7, 16, 6489, // 6,15
+ 6, 0, 10052, 6, 1, 6360, 7, 0, 41072, 7, 1, 8052, // 7, 0
+ 6, 1, 8929, 6, 2, 5756, 7, 1, 43433, 7, 2, 7418, // 7, 1
+ 6, 2, 7766, 6, 3, 5095, 7, 2, 45995, 7, 3, 6680, // 7, 2
+ 6, 3, 6552, 6, 4, 4372, 7, 3, 48785, 7, 4, 5827, // 7, 3
+ 6, 4, 5280, 6, 5, 3579, 7, 4, 51832, 7, 5, 4845, // 7, 4
+ 6, 5, 3938, 6, 6, 2710, 7, 5, 55162, 7, 6, 3726, // 7, 5
+ 6, 6, 2532, 6, 7, 1767, 7, 6, 58773, 7, 7, 2464, // 7, 6
+ 6, 7, 1170, 6, 8, 827, 7, 7, 62369, 7, 8, 1170, // 7, 7
+ 7, 8, 62369, 7, 9, 1170, 8, 8, 1170, 8, 9, 827, // 7, 8
+ 7, 9, 58775, 7, 10, 2462, 8, 9, 2533, 8, 10, 1766, // 7, 9
+ 7, 10, 55168, 7, 11, 3720, 8, 10, 3940, 8, 11, 2708, // 7,10
+ 7, 11, 51842, 7, 12, 4835, 8, 11, 5283, 8, 12, 3576, // 7,11
+ 7, 12, 48801, 7, 13, 5811, 8, 12, 6558, 8, 13, 4366, // 7,12
+ 7, 13, 46017, 7, 14, 6658, 8, 13, 7773, 8, 14, 5088, // 7,13
+ 7, 14, 43461, 7, 15, 7390, 8, 14, 8939, 8, 15, 5746, // 7,14
+ 7, 15, 41106, 7, 16, 8018, 8, 15, 10066, 8, 16, 6346, // 7,15
+ 7, -1, 6346, 7, 0, 10066, 8, -1, 8018, 8, 0, 41106, // 8, 0
+ 7, 0, 5745, 7, 1, 8939, 8, 0, 7390, 8, 1, 43462, // 8, 1
+ 7, 1, 5087, 7, 2, 7773, 8, 1, 6658, 8, 2, 46018, // 8, 2
+ 7, 2, 4366, 7, 3, 6558, 8, 2, 5811, 8, 3, 48801, // 8, 3
+ 7, 3, 3575, 7, 4, 5283, 8, 3, 4835, 8, 4, 51843, // 8, 4
+ 7, 4, 2708, 7, 5, 3940, 8, 4, 3720, 8, 5, 55168, // 8, 5
+ 7, 5, 1766, 7, 6, 2533, 8, 5, 2462, 8, 6, 58775, // 8, 6
+ 7, 6, 827, 7, 7, 1170, 8, 6, 1170, 8, 7, 62369, // 8, 7
+ 8, 7, 1170, 8, 8, 62369, 9, 7, 827, 9, 8, 1170, // 8, 8
+ 8, 8, 2464, 8, 9, 58773, 9, 8, 1767, 9, 9, 2532, // 8, 9
+ 8, 9, 3726, 8, 10, 55162, 9, 9, 2710, 9, 10, 3938, // 8,10
+ 8, 10, 4846, 8, 11, 51832, 9, 10, 3579, 9, 11, 5279, // 8,11
+ 8, 11, 5827, 8, 12, 48785, 9, 11, 4372, 9, 12, 6552, // 8,12
+ 8, 12, 6680, 8, 13, 45995, 9, 12, 5095, 9, 13, 7766, // 8,13
+ 8, 13, 7418, 8, 14, 43433, 9, 13, 5756, 9, 14, 8929, // 8,14
+ 8, 14, 8052, 8, 15, 41072, 9, 14, 6360, 9, 15, 10052, // 8,15
+ 8, -1, 6489, 8, 0, 10123, 9, -1, 8278, 9, 0, 40646, // 9, 0
+ 8, 0, 5900, 8, 1, 9032, 9, 0, 7667, 9, 1, 42937, // 9, 1
+ 8, 1, 5261, 8, 2, 7913, 9, 1, 6961, 9, 2, 45401, // 9, 2
+ 8, 2, 4572, 8, 3, 6761, 9, 2, 6154, 9, 3, 48049, // 9, 3
+ 8, 3, 3834, 8, 4, 5581, 9, 3, 5248, 9, 4, 50873, // 9, 4
+ 8, 4, 3064, 8, 5, 4394, 9, 4, 4262, 9, 5, 53816, // 9, 5
+ 8, 5, 2316, 8, 6, 3275, 9, 5, 3271, 9, 6, 56674, // 9, 6
+ 8, 6, 1767, 8, 7, 2464, 9, 6, 2532, 9, 7, 58773, // 9, 7
+ 9, 7, 2533, 9, 8, 58775, 10, 7, 1766, 10, 8, 2462, // 9, 8
+ 9, 8, 3275, 9, 9, 56673, 10, 8, 2316, 10, 9, 3272, // 9, 9
+ 9, 9, 4269, 9, 10, 53813, 10, 9, 3065, 10, 10, 4389, // 9,10
+ 9, 10, 5261, 9, 11, 50865, 10, 10, 3837, 10, 11, 5573, // 9,11
+ 9, 11, 6173, 9, 12, 48037, 10, 11, 4576, 10, 12, 6750, // 9,12
+ 9, 12, 6986, 9, 13, 45383, 10, 12, 5268, 10, 13, 7899, // 9,13
+ 9, 13, 7699, 9, 14, 42913, 10, 13, 5910, 10, 14, 9014, // 9,14
+ 9, 14, 8316, 9, 15, 40618, 10, 14, 6502, 10, 15, 10100, // 9,15
+ 9, -1, 6699, 9, 0, 10265, 10, -1, 8632, 10, 0, 39940, // 10, 0
+ 9, 0, 6137, 9, 1, 9233, 10, 0, 8061, 10, 1, 42105, // 10, 1
+ 9, 1, 5537, 9, 2, 8189, 10, 1, 7411, 10, 2, 44399, // 10, 2
+ 9, 2, 4906, 9, 3, 7138, 10, 2, 6685, 10, 3, 46807, // 10, 3
+ 9, 3, 4257, 9, 4, 6099, 10, 3, 5901, 10, 4, 49279, // 10, 4
+ 9, 4, 3621, 9, 5, 5113, 10, 4, 5103, 10, 5, 51699, // 10, 5
+ 9, 5, 3065, 9, 6, 4269, 10, 5, 4388, 10, 6, 53814, // 10, 6
+ 9, 6, 2710, 9, 7, 3726, 10, 6, 3938, 10, 7, 55162, // 10, 7
+ 10, 7, 3940, 10, 8, 55168, 11, 7, 2708, 11, 8, 3720, // 10, 8
+ 10, 8, 4394, 10, 9, 53816, 11, 8, 3064, 11, 9, 4262, // 10, 9
+ 10, 9, 5113, 10, 10, 51700, 11, 9, 3621, 11, 10, 5102, // 10,10
+ 10, 10, 5917, 10, 11, 49275, 11, 10, 4258, 11, 11, 6086, // 10,11
+ 10, 11, 6707, 10, 12, 46798, 11, 11, 4909, 11, 12, 7122, // 10,12
+ 10, 12, 7440, 10, 13, 44386, 11, 12, 5543, 11, 13, 8167, // 10,13
+ 10, 13, 8098, 10, 14, 42087, 11, 13, 6145, 11, 14, 9206, // 10,14
+ 10, 14, 8676, 10, 15, 39918, 11, 14, 6710, 11, 15, 10232, // 10,15
+ 10, -1, 6965, 10, 0, 10473, 11, -1, 9072, 11, 0, 39026, // 11, 0
+ 10, 0, 6440, 10, 1, 9513, 11, 0, 8557, 11, 1, 41026, // 11, 1
+ 10, 1, 5891, 10, 2, 8559, 11, 1, 7981, 11, 2, 43105, // 11, 2
+ 10, 2, 5330, 10, 3, 7622, 11, 2, 7356, 11, 3, 45228, // 11, 3
+ 10, 3, 4774, 10, 4, 6727, 11, 3, 6708, 11, 4, 47327, // 11, 4
+ 10, 4, 4258, 10, 5, 5917, 11, 4, 6086, 11, 5, 49275, // 11, 5
+ 10, 5, 3837, 10, 6, 5261, 11, 5, 5573, 11, 6, 50865, // 11, 6
+ 10, 6, 3579, 10, 7, 4846, 11, 6, 5280, 11, 7, 51831, // 11, 7
+ 11, 7, 5283, 11, 8, 51842, 12, 7, 3575, 12, 8, 4836, // 11, 8
+ 11, 8, 5581, 11, 9, 50873, 12, 8, 3834, 12, 9, 5248, // 11, 9
+ 11, 9, 6099, 11, 10, 49279, 12, 9, 4257, 12, 10, 5901, // 11,10
+ 11, 10, 6727, 11, 11, 47328, 12, 10, 4774, 12, 11, 6707, // 11,11
+ 11, 11, 7382, 11, 12, 45224, 12, 11, 5331, 12, 12, 7599, // 11,12
+ 11, 12, 8015, 11, 13, 43096, 12, 12, 5895, 12, 13, 8530, // 11,13
+ 11, 13, 8599, 11, 14, 41013, 12, 13, 6447, 12, 14, 9477, // 11,14
+ 11, 14, 9122, 11, 15, 39009, 12, 14, 6975, 12, 15, 10430, // 11,15
+ 11, -1, 7276, 11, 0, 10723, 12, -1, 9585, 12, 0, 37952, // 12, 0
+ 11, 0, 6792, 11, 1, 9841, 12, 0, 9135, 12, 1, 39768, // 12, 1
+ 11, 1, 6297, 11, 2, 8979, 12, 1, 8641, 12, 2, 41619, // 12, 2
+ 11, 2, 5804, 11, 3, 8151, 12, 2, 8120, 12, 3, 43461, // 12, 3
+ 11, 3, 5331, 11, 4, 7382, 12, 3, 7598, 12, 4, 45225, // 12, 4
+ 11, 4, 4909, 11, 5, 6707, 12, 4, 7121, 12, 5, 46799, // 12, 5
+ 11, 5, 4576, 11, 6, 6173, 12, 5, 6750, 12, 6, 48037, // 12, 6
+ 11, 6, 4372, 11, 7, 5827, 12, 6, 6552, 12, 7, 48785, // 12, 7
+ 12, 7, 6558, 12, 8, 48801, 13, 7, 4366, 13, 8, 5811, // 12, 8
+ 12, 8, 6761, 12, 9, 48049, 13, 8, 4572, 13, 9, 6154, // 12, 9
+ 12, 9, 7138, 12, 10, 46806, 13, 9, 4906, 13, 10, 6686, // 12,10
+ 12, 10, 7622, 12, 11, 45229, 13, 10, 5330, 13, 11, 7355, // 12,11
+ 12, 11, 8151, 12, 12, 43461, 13, 11, 5804, 13, 12, 8120, // 12,12
+ 12, 12, 8681, 12, 13, 41614, 13, 12, 6299, 13, 13, 8942, // 12,13
+ 12, 13, 9184, 12, 14, 39759, 13, 13, 6797, 13, 14, 9796, // 12,14
+ 12, 14, 9642, 12, 15, 37939, 13, 14, 7285, 13, 15, 10670, // 12,15
+ 12, -1, 7620, 12, 0, 10994, 13, -1, 10158, 13, 0, 36764, // 13, 0
+ 12, 0, 7177, 12, 1, 10188, 13, 0, 9777, 13, 1, 38394, // 13, 1
+ 12, 1, 6732, 12, 2, 9413, 13, 1, 9366, 13, 2, 40025, // 13, 2
+ 12, 2, 6299, 12, 3, 8681, 13, 2, 8941, 13, 3, 41615, // 13, 3
+ 12, 3, 5895, 12, 4, 8015, 13, 3, 8530, 13, 4, 43096, // 13, 4
+ 12, 4, 5543, 12, 5, 7440, 13, 4, 8167, 13, 5, 44386, // 13, 5
+ 12, 5, 5268, 12, 6, 6986, 13, 5, 7899, 13, 6, 45383, // 13, 6
+ 12, 6, 5095, 12, 7, 6680, 13, 6, 7766, 13, 7, 45995, // 13, 7
+ 13, 7, 7773, 13, 8, 46017, 14, 7, 5087, 14, 8, 6659, // 13, 8
+ 13, 8, 7913, 13, 9, 45401, 14, 8, 5261, 14, 9, 6961, // 13, 9
+ 13, 9, 8189, 13, 10, 44399, 14, 9, 5537, 14, 10, 7411, // 13,10
+ 13, 10, 8559, 13, 11, 43105, 14, 10, 5891, 14, 11, 7981, // 13,11
+ 13, 11, 8979, 13, 12, 41618, 14, 11, 6297, 14, 12, 8642, // 13,12
+ 13, 12, 9413, 13, 13, 40025, 14, 12, 6732, 14, 13, 9366, // 13,13
+ 13, 13, 9834, 13, 14, 38390, 14, 13, 7179, 14, 14, 10133, // 13,14
+ 13, 14, 10224, 13, 15, 36756, 14, 14, 7626, 14, 15, 10930, // 13,15
+ 13, -1, 7983, 13, 0, 11267, 14, -1, 10780, 14, 0, 35506, // 14, 0
+ 13, 0, 7579, 13, 1, 10532, 14, 0, 10467, 14, 1, 36958, // 14, 1
+ 13, 1, 7179, 13, 2, 9834, 14, 1, 10133, 14, 2, 38390, // 14, 2
+ 13, 2, 6797, 13, 3, 9184, 14, 2, 9796, 14, 3, 39759, // 14, 3
+ 13, 3, 6447, 13, 4, 8599, 14, 3, 9478, 14, 4, 41012, // 14, 4
+ 13, 4, 6145, 13, 5, 8098, 14, 4, 9206, 14, 5, 42087, // 14, 5
+ 13, 5, 5910, 13, 6, 7699, 14, 5, 9014, 14, 6, 42913, // 14, 6
+ 13, 6, 5756, 13, 7, 7418, 14, 6, 8929, 14, 7, 43433, // 14, 7
+ 14, 7, 8939, 14, 8, 43461, 15, 7, 5745, 15, 8, 7391, // 14, 8
+ 14, 8, 9032, 14, 9, 42936, 15, 8, 5900, 15, 9, 7668, // 14, 9
+ 14, 9, 9233, 14, 10, 42105, 15, 9, 6137, 15, 10, 8061, // 14,10
+ 14, 10, 9513, 14, 11, 41026, 15, 10, 6440, 15, 11, 8557, // 14,11
+ 14, 11, 9841, 14, 12, 39767, 15, 11, 6792, 15, 12, 9136, // 14,12
+ 14, 12, 10188, 14, 13, 38394, 15, 12, 7177, 15, 13, 9777, // 14,13
+ 14, 13, 10532, 14, 14, 36959, 15, 13, 7579, 15, 14, 10466, // 14,14
+ 14, 14, 10855, 14, 15, 35502, 15, 14, 7987, 15, 15, 11192, // 14,15
+ 14, -1, 8358, 14, 0, 11526, 15, -1, 11440, 15, 0, 34212, // 15, 0
+ 14, 0, 7987, 14, 1, 10855, 15, 0, 11192, 15, 1, 35502, // 15, 1
+ 14, 1, 7626, 14, 2, 10224, 15, 1, 10930, 15, 2, 36756, // 15, 2
+ 14, 2, 7285, 14, 3, 9642, 15, 2, 10670, 15, 3, 37939, // 15, 3
+ 14, 3, 6975, 14, 4, 9122, 15, 3, 10430, 15, 4, 39009, // 15, 4
+ 14, 4, 6710, 14, 5, 8676, 15, 4, 10232, 15, 5, 39918, // 15, 5
+ 14, 5, 6502, 14, 6, 8316, 15, 5, 10100, 15, 6, 40618, // 15, 6
+ 14, 6, 6360, 14, 7, 8052, 15, 6, 10052, 15, 7, 41072, // 15, 7
+ 15, 7, 10066, 15, 8, 41106, 16, 7, 6346, 16, 8, 8018, // 15, 8
+ 15, 8, 10123, 15, 9, 40646, 16, 8, 6489, 16, 9, 8278, // 15, 9
+ 15, 9, 10265, 15, 10, 39940, 16, 9, 6699, 16, 10, 8632, // 15,10
+ 15, 10, 10473, 15, 11, 39026, 16, 10, 6965, 16, 11, 9072, // 15,11
+ 15, 11, 10723, 15, 12, 37951, 16, 11, 7276, 16, 12, 9586, // 15,12
+ 15, 12, 10994, 15, 13, 36764, 16, 12, 7620, 16, 13, 10158, // 15,13
+ 15, 13, 11267, 15, 14, 35506, 16, 13, 7983, 16, 14, 10780, // 15,14
+ 15, 14, 11526, 15, 15, 34212, 16, 14, 8358, 16, 15, 11440, // 15,15
+ // angle of -1.0 degrees
+ -1, 0, 8769, -1, 1, 6280, 0, 0, 41693, 0, 1, 8794, // 0, 0
+ -1, 1, 8265, -1, 2, 5974, 0, 1, 42823, 0, 2, 8474, // 0, 1
+ -1, 2, 7791, -1, 3, 5682, 0, 2, 43904, 0, 3, 8159, // 0, 2
+ -1, 3, 7356, -1, 4, 5410, 0, 3, 44907, 0, 4, 7863, // 0, 3
+ -1, 4, 6970, -1, 5, 5169, 0, 4, 45799, 0, 5, 7598, // 0, 4
+ -1, 5, 6644, -1, 6, 4967, 0, 5, 46541, 0, 6, 7384, // 0, 5
+ -1, 6, 6391, -1, 7, 4814, 0, 6, 47098, 0, 7, 7233, // 0, 6
+ -1, 7, 6217, -1, 8, 4718, 0, 7, 47440, 0, 8, 7161, // 0, 7
+ 0, 8, 47426, 0, 9, 7158, 1, 8, 6230, 1, 9, 4722, // 0, 8
+ 0, 9, 47086, 0, 10, 7227, 1, 9, 6405, 1, 10, 4818, // 0, 9
+ 0, 10, 46532, 0, 11, 7374, 1, 10, 6659, 1, 11, 4971, // 0,10
+ 0, 11, 45791, 0, 12, 7587, 1, 11, 6986, 1, 12, 5172, // 0,11
+ 0, 12, 44901, 0, 13, 7848, 1, 12, 7374, 1, 13, 5413, // 0,12
+ 0, 13, 43900, 0, 14, 8141, 1, 13, 7812, 1, 14, 5683, // 0,13
+ 0, 14, 42821, 0, 15, 8452, 1, 14, 8288, 1, 15, 5975, // 0,14
+ 0, 15, 41693, 0, 16, 8769, 1, 15, 8795, 1, 16, 6279, // 0,15
+ 0, 0, 8452, 0, 1, 5975, 1, 0, 42821, 1, 1, 8288, // 1, 0
+ 0, 1, 7901, 0, 2, 5640, 1, 1, 44074, 1, 2, 7921, // 1, 1
+ 0, 2, 7378, 0, 3, 5315, 1, 2, 45288, 1, 3, 7555, // 1, 2
+ 0, 3, 6892, 0, 4, 5009, 1, 3, 46430, 1, 4, 7205, // 1, 3
+ 0, 4, 6458, 0, 5, 4734, 1, 4, 47458, 1, 5, 6886, // 1, 4
+ 0, 5, 6092, 0, 6, 4502, 1, 5, 48322, 1, 6, 6620, // 1, 5
+ 0, 6, 5809, 0, 7, 4327, 1, 6, 48969, 1, 7, 6431, // 1, 6
+ 0, 7, 5623, 0, 8, 4221, 1, 7, 49358, 1, 8, 6334, // 1, 7
+ 1, 8, 49347, 1, 9, 6332, 2, 8, 5633, 2, 9, 4224, // 1, 8
+ 1, 9, 48960, 1, 10, 6425, 2, 9, 5820, 2, 10, 4331, // 1, 9
+ 1, 10, 48314, 1, 11, 6613, 2, 10, 6104, 2, 11, 4505, // 1,10
+ 1, 11, 47453, 1, 12, 6875, 2, 11, 6472, 2, 12, 4736, // 1,11
+ 1, 12, 46427, 1, 13, 7191, 2, 12, 6908, 2, 13, 5010, // 1,12
+ 1, 13, 45286, 1, 14, 7539, 2, 13, 7395, 2, 14, 5316, // 1,13
+ 1, 14, 44074, 1, 15, 7901, 2, 14, 7921, 2, 15, 5640, // 1,14
+ 1, 15, 42823, 1, 16, 8265, 2, 15, 8474, 2, 16, 5974, // 1,15
+ 1, 0, 8141, 1, 1, 5684, 2, 0, 43900, 2, 1, 7811, // 2, 0
+ 1, 1, 7539, 1, 2, 5316, 2, 1, 45286, 2, 2, 7395, // 2, 1
+ 1, 2, 6959, 1, 3, 4954, 2, 2, 46650, 2, 3, 6973, // 2, 2
+ 1, 3, 6414, 1, 4, 4607, 2, 3, 47955, 2, 4, 6560, // 2, 3
+ 1, 4, 5920, 1, 5, 4290, 2, 4, 49150, 2, 5, 6176, // 2, 4
+ 1, 5, 5499, 1, 6, 4019, 2, 5, 50171, 2, 6, 5847, // 2, 5
+ 1, 6, 5175, 1, 7, 3813, 2, 6, 50942, 2, 7, 5606, // 2, 6
+ 1, 7, 4970, 1, 8, 3691, 2, 7, 51395, 2, 8, 5480, // 2, 7
+ 2, 8, 51387, 2, 9, 5478, 3, 8, 4978, 3, 9, 3693, // 2, 8
+ 2, 9, 50935, 2, 10, 5602, 3, 9, 5184, 3, 10, 3815, // 2, 9
+ 2, 10, 50165, 2, 11, 5842, 3, 10, 5508, 3, 11, 4021, // 2,10
+ 2, 11, 49147, 2, 12, 6168, 3, 11, 5930, 3, 12, 4291, // 2,11
+ 2, 12, 47953, 2, 13, 6549, 3, 12, 6426, 3, 13, 4608, // 2,12
+ 2, 13, 46650, 2, 14, 6959, 3, 13, 6973, 3, 14, 4954, // 2,13
+ 2, 14, 45288, 2, 15, 7378, 3, 14, 7555, 3, 15, 5315, // 2,14
+ 2, 15, 43904, 2, 16, 7791, 3, 15, 8159, 3, 16, 5682, // 2,15
+ 2, 0, 7848, 2, 1, 5413, 3, 0, 44901, 3, 1, 7374, // 3, 0
+ 2, 1, 7191, 2, 2, 5011, 3, 1, 46427, 3, 2, 6907, // 3, 1
+ 2, 2, 6549, 2, 3, 4608, 3, 2, 47953, 3, 3, 6426, // 3, 2
+ 2, 3, 5934, 2, 4, 4214, 3, 3, 49445, 3, 4, 5943, // 3, 3
+ 2, 4, 5365, 2, 5, 3845, 3, 4, 50844, 3, 5, 5482, // 3, 4
+ 2, 5, 4872, 2, 6, 3522, 3, 5, 52069, 3, 6, 5073, // 3, 5
+ 2, 6, 4489, 2, 7, 3273, 3, 6, 53012, 3, 7, 4762, // 3, 6
+ 2, 7, 4254, 2, 8, 3126, 3, 7, 53562, 3, 8, 4594, // 3, 7
+ 3, 8, 53557, 3, 9, 4592, 4, 8, 4259, 4, 9, 3128, // 3, 8
+ 3, 9, 53008, 3, 10, 4759, 4, 9, 4495, 4, 10, 3274, // 3, 9
+ 3, 10, 52066, 3, 11, 5069, 4, 10, 4879, 4, 11, 3522, // 3,10
+ 3, 11, 50843, 3, 12, 5474, 4, 11, 5373, 4, 12, 3846, // 3,11
+ 3, 12, 49445, 3, 13, 5934, 4, 12, 5943, 4, 13, 4214, // 3,12
+ 3, 13, 47955, 3, 14, 6414, 4, 13, 6560, 4, 14, 4607, // 3,13
+ 3, 14, 46430, 3, 15, 6892, 4, 14, 7204, 4, 15, 5010, // 3,14
+ 3, 15, 44907, 3, 16, 7356, 4, 15, 7863, 4, 16, 5410, // 3,15
+ 3, 0, 7587, 3, 1, 5172, 4, 0, 45791, 4, 1, 6986, // 4, 0
+ 3, 1, 6875, 3, 2, 4736, 4, 1, 47453, 4, 2, 6472, // 4, 1
+ 3, 2, 6168, 3, 3, 4291, 4, 2, 49147, 4, 3, 5930, // 4, 2
+ 3, 3, 5474, 3, 4, 3846, 4, 3, 50843, 4, 4, 5373, // 4, 3
+ 3, 4, 4816, 3, 5, 3415, 4, 4, 52484, 4, 5, 4821, // 4, 4
+ 3, 5, 4226, 3, 6, 3023, 4, 5, 53975, 4, 6, 4312, // 4, 5
+ 3, 6, 3755, 3, 7, 2710, 4, 6, 55166, 4, 7, 3905, // 4, 6
+ 3, 7, 3469, 3, 8, 2524, 4, 7, 55870, 4, 8, 3673, // 4, 7
+ 4, 8, 55867, 4, 9, 3671, 5, 8, 3473, 5, 9, 2525, // 4, 8
+ 4, 9, 55164, 4, 10, 3902, 5, 9, 3759, 5, 10, 2711, // 4, 9
+ 4, 10, 53973, 4, 11, 4309, 5, 10, 4230, 5, 11, 3024, // 4,10
+ 4, 11, 52484, 4, 12, 4816, 5, 11, 4822, 5, 12, 3414, // 4,11
+ 4, 12, 50844, 4, 13, 5365, 5, 12, 5481, 5, 13, 3846, // 4,12
+ 4, 13, 49150, 4, 14, 5920, 5, 13, 6176, 5, 14, 4290, // 4,13
+ 4, 14, 47458, 4, 15, 6458, 5, 14, 6886, 5, 15, 4734, // 4,14
+ 4, 15, 45799, 4, 16, 6970, 5, 15, 7599, 5, 16, 5168, // 4,15
+ 4, 0, 7374, 4, 1, 4971, 5, 0, 46532, 5, 1, 6659, // 5, 0
+ 4, 1, 6613, 4, 2, 4505, 5, 1, 48314, 5, 2, 6104, // 5, 1
+ 4, 2, 5842, 4, 3, 4020, 5, 2, 50165, 5, 3, 5509, // 5, 2
+ 4, 3, 5069, 4, 4, 3523, 5, 3, 52066, 5, 4, 4878, // 5, 3
+ 4, 4, 4309, 4, 5, 3023, 5, 4, 53973, 5, 5, 4231, // 5, 4
+ 4, 5, 3595, 4, 6, 2546, 5, 5, 55798, 5, 6, 3597, // 5, 5
+ 4, 6, 2993, 4, 7, 2138, 5, 6, 57354, 5, 7, 3051, // 5, 6
+ 4, 7, 2615, 4, 8, 1884, 5, 7, 58324, 5, 8, 2713, // 5, 7
+ 5, 8, 58322, 5, 9, 2713, 6, 8, 2616, 6, 9, 1885, // 5, 8
+ 5, 9, 57353, 5, 10, 3050, 6, 9, 2995, 6, 10, 2138, // 5, 9
+ 5, 10, 55798, 5, 11, 3595, 6, 10, 3598, 6, 11, 2545, // 5,10
+ 5, 11, 53975, 5, 12, 4226, 6, 11, 4313, 6, 12, 3022, // 5,11
+ 5, 12, 52069, 5, 13, 4872, 6, 12, 5073, 6, 13, 3522, // 5,12
+ 5, 13, 50171, 5, 14, 5499, 6, 13, 5848, 6, 14, 4018, // 5,13
+ 5, 14, 48322, 5, 15, 6092, 6, 14, 6620, 6, 15, 4502, // 5,14
+ 5, 15, 46541, 5, 16, 6644, 6, 15, 7383, 6, 16, 4968, // 5,15
+ 5, 0, 7227, 5, 1, 4818, 6, 0, 47086, 6, 1, 6405, // 6, 0
+ 5, 1, 6425, 5, 2, 4330, 6, 1, 48960, 6, 2, 5821, // 6, 1
+ 5, 2, 5602, 5, 3, 3815, 6, 2, 50935, 6, 3, 5184, // 6, 2
+ 5, 3, 4759, 5, 4, 3274, 6, 3, 53008, 6, 4, 4495, // 6, 3
+ 5, 4, 3902, 5, 5, 2711, 6, 4, 55164, 6, 5, 3759, // 6, 4
+ 5, 5, 3050, 5, 6, 2138, 6, 5, 57353, 6, 6, 2995, // 6, 5
+ 5, 6, 2258, 5, 7, 1597, 6, 6, 59422, 6, 7, 2259, // 6, 6
+ 5, 7, 1695, 5, 8, 1209, 6, 7, 60906, 6, 8, 1726, // 6, 7
+ 6, 8, 60905, 6, 9, 1726, 7, 8, 1695, 7, 9, 1210, // 6, 8
+ 6, 9, 59422, 6, 10, 2258, 7, 9, 2259, 7, 10, 1597, // 6, 9
+ 6, 10, 57354, 6, 11, 2993, 7, 10, 3051, 7, 11, 2138, // 6,10
+ 6, 11, 55166, 6, 12, 3755, 7, 11, 3904, 7, 12, 2711, // 6,11
+ 6, 12, 53012, 6, 13, 4489, 7, 12, 4762, 7, 13, 3273, // 6,12
+ 6, 13, 50942, 6, 14, 5175, 7, 13, 5606, 7, 14, 3813, // 6,13
+ 6, 14, 48969, 6, 15, 5809, 7, 14, 6430, 7, 15, 4328, // 6,14
+ 6, 15, 47098, 6, 16, 6391, 7, 15, 7233, 7, 16, 4814, // 6,15
+ 6, 0, 7158, 6, 1, 4722, 7, 0, 47426, 7, 1, 6230, // 7, 0
+ 6, 1, 6332, 6, 2, 4224, 7, 1, 49347, 7, 2, 5633, // 7, 1
+ 6, 2, 5478, 6, 3, 3693, 7, 2, 51387, 7, 3, 4978, // 7, 2
+ 6, 3, 4592, 6, 4, 3128, 7, 3, 53557, 7, 4, 4259, // 7, 3
+ 6, 4, 3671, 6, 5, 2525, 7, 4, 55867, 7, 5, 3473, // 7, 4
+ 6, 5, 2713, 6, 6, 1884, 7, 5, 58322, 7, 6, 2617, // 7, 5
+ 6, 6, 1726, 6, 7, 1210, 7, 6, 60905, 7, 7, 1695, // 7, 6
+ 6, 7, 789, 6, 8, 558, 7, 7, 63399, 7, 8, 790, // 7, 7
+ 7, 8, 63399, 7, 9, 789, 8, 8, 789, 8, 9, 559, // 7, 8
+ 7, 9, 60906, 7, 10, 1695, 8, 9, 1726, 8, 10, 1209, // 7, 9
+ 7, 10, 58324, 7, 11, 2615, 8, 10, 2714, 8, 11, 1883, // 7,10
+ 7, 11, 55870, 7, 12, 3469, 8, 11, 3672, 8, 12, 2525, // 7,11
+ 7, 12, 53562, 7, 13, 4254, 8, 12, 4594, 8, 13, 3126, // 7,12
+ 7, 13, 51395, 7, 14, 4970, 8, 13, 5480, 8, 14, 3691, // 7,13
+ 7, 14, 49358, 7, 15, 5623, 8, 14, 6335, 8, 15, 4220, // 7,14
+ 7, 15, 47440, 7, 16, 6217, 8, 15, 7161, 8, 16, 4718, // 7,15
+ 7, -1, 4718, 7, 0, 7161, 8, -1, 6217, 8, 0, 47440, // 8, 0
+ 7, 0, 4221, 7, 1, 6335, 8, 0, 5623, 8, 1, 49357, // 8, 1
+ 7, 1, 3691, 7, 2, 5480, 8, 1, 4970, 8, 2, 51395, // 8, 2
+ 7, 2, 3126, 7, 3, 4594, 8, 2, 4254, 8, 3, 53562, // 8, 3
+ 7, 3, 2524, 7, 4, 3672, 8, 3, 3469, 8, 4, 55871, // 8, 4
+ 7, 4, 1884, 7, 5, 2714, 8, 4, 2615, 8, 5, 58323, // 8, 5
+ 7, 5, 1209, 7, 6, 1726, 8, 5, 1695, 8, 6, 60906, // 8, 6
+ 7, 6, 558, 7, 7, 789, 8, 6, 789, 8, 7, 63400, // 8, 7
+ 8, 7, 789, 8, 8, 63399, 9, 7, 558, 9, 8, 790, // 8, 8
+ 8, 8, 1695, 8, 9, 60905, 9, 8, 1210, 9, 9, 1726, // 8, 9
+ 8, 9, 2616, 8, 10, 58322, 9, 9, 1884, 9, 10, 2714, // 8,10
+ 8, 10, 3473, 8, 11, 55867, 9, 10, 2525, 9, 11, 3671, // 8,11
+ 8, 11, 4259, 8, 12, 53557, 9, 11, 3128, 9, 12, 4592, // 8,12
+ 8, 12, 4978, 8, 13, 51387, 9, 12, 3693, 9, 13, 5478, // 8,13
+ 8, 13, 5633, 8, 14, 49347, 9, 13, 4224, 9, 14, 6332, // 8,14
+ 8, 14, 6230, 8, 15, 47426, 9, 14, 4722, 9, 15, 7158, // 8,15
+ 8, -1, 4814, 8, 0, 7233, 9, -1, 6391, 9, 0, 47098, // 9, 0
+ 8, 0, 4327, 8, 1, 6430, 9, 0, 5809, 9, 1, 48970, // 9, 1
+ 8, 1, 3813, 8, 2, 5606, 9, 1, 5175, 9, 2, 50942, // 9, 2
+ 8, 2, 3273, 8, 3, 4762, 9, 2, 4489, 9, 3, 53012, // 9, 3
+ 8, 3, 2710, 8, 4, 3904, 9, 3, 3755, 9, 4, 55167, // 9, 4
+ 8, 4, 2138, 8, 5, 3051, 9, 4, 2993, 9, 5, 57354, // 9, 5
+ 8, 5, 1597, 8, 6, 2259, 9, 5, 2258, 9, 6, 59422, // 9, 6
+ 8, 6, 1210, 8, 7, 1695, 9, 6, 1726, 9, 7, 60905, // 9, 7
+ 9, 7, 1726, 9, 8, 60906, 10, 7, 1209, 10, 8, 1695, // 9, 8
+ 9, 8, 2259, 9, 9, 59422, 10, 8, 1597, 10, 9, 2258, // 9, 9
+ 9, 9, 2995, 9, 10, 57353, 10, 9, 2138, 10, 10, 3050, // 9,10
+ 9, 10, 3759, 9, 11, 55164, 10, 10, 2711, 10, 11, 3902, // 9,11
+ 9, 11, 4495, 9, 12, 53008, 10, 11, 3274, 10, 12, 4759, // 9,12
+ 9, 12, 5184, 9, 13, 50935, 10, 12, 3815, 10, 13, 5602, // 9,13
+ 9, 13, 5820, 9, 14, 48960, 10, 13, 4330, 10, 14, 6426, // 9,14
+ 9, 14, 6405, 9, 15, 47086, 10, 14, 4818, 10, 15, 7227, // 9,15
+ 9, -1, 4967, 9, 0, 7383, 10, -1, 6644, 10, 0, 46542, // 10, 0
+ 9, 0, 4502, 9, 1, 6620, 10, 0, 6092, 10, 1, 48322, // 10, 1
+ 9, 1, 4019, 9, 2, 5848, 10, 1, 5499, 10, 2, 50170, // 10, 2
+ 9, 2, 3522, 9, 3, 5073, 10, 2, 4872, 10, 3, 52069, // 10, 3
+ 9, 3, 3023, 9, 4, 4313, 10, 3, 4226, 10, 4, 53974, // 10, 4
+ 9, 4, 2546, 9, 5, 3598, 10, 4, 3595, 10, 5, 55797, // 10, 5
+ 9, 5, 2138, 9, 6, 2995, 10, 5, 3050, 10, 6, 57353, // 10, 6
+ 9, 6, 1884, 9, 7, 2616, 10, 6, 2713, 10, 7, 58323, // 10, 7
+ 10, 7, 2714, 10, 8, 58324, 11, 7, 1884, 11, 8, 2614, // 10, 8
+ 10, 8, 3051, 10, 9, 57354, 11, 8, 2138, 11, 9, 2993, // 10, 9
+ 10, 9, 3598, 10, 10, 55798, 11, 9, 2546, 11, 10, 3594, // 10,10
+ 10, 10, 4230, 10, 11, 53973, 11, 10, 3023, 11, 11, 4310, // 10,11
+ 10, 11, 4879, 10, 12, 52066, 11, 11, 3523, 11, 12, 5068, // 10,12
+ 10, 12, 5508, 10, 13, 50165, 11, 12, 4020, 11, 13, 5843, // 10,13
+ 10, 13, 6104, 10, 14, 48314, 11, 13, 4505, 11, 14, 6613, // 10,14
+ 10, 14, 6659, 10, 15, 46532, 11, 14, 4971, 11, 15, 7374, // 10,15
+ 10, -1, 5169, 10, 0, 7599, 11, -1, 6970, 11, 0, 45798, // 11, 0
+ 10, 0, 4734, 10, 1, 6886, 11, 0, 6458, 11, 1, 47458, // 11, 1
+ 10, 1, 4290, 10, 2, 6176, 11, 1, 5920, 11, 2, 49150, // 11, 2
+ 10, 2, 3845, 10, 3, 5481, 11, 2, 5365, 11, 3, 50845, // 11, 3
+ 10, 3, 3415, 10, 4, 4822, 11, 3, 4816, 11, 4, 52483, // 11, 4
+ 10, 4, 3023, 10, 5, 4230, 11, 4, 4309, 11, 5, 53974, // 11, 5
+ 10, 5, 2711, 10, 6, 3759, 11, 5, 3902, 11, 6, 55164, // 11, 6
+ 10, 6, 2525, 10, 7, 3473, 11, 6, 3671, 11, 7, 55867, // 11, 7
+ 11, 7, 3672, 11, 8, 55870, 12, 7, 2524, 12, 8, 3470, // 11, 8
+ 11, 8, 3904, 11, 9, 55166, 12, 8, 2710, 12, 9, 3756, // 11, 9
+ 11, 9, 4313, 11, 10, 53975, 12, 9, 3023, 12, 10, 4225, // 11,10
+ 11, 10, 4822, 11, 11, 52484, 12, 10, 3415, 12, 11, 4815, // 11,11
+ 11, 11, 5373, 11, 12, 50843, 12, 11, 3846, 12, 12, 5474, // 11,12
+ 11, 12, 5930, 11, 13, 49147, 12, 12, 4291, 12, 13, 6168, // 11,13
+ 11, 13, 6472, 11, 14, 47453, 12, 13, 4736, 12, 14, 6875, // 11,14
+ 11, 14, 6986, 11, 15, 45791, 12, 14, 5172, 12, 15, 7587, // 11,15
+ 11, -1, 5410, 11, 0, 7863, 12, -1, 7356, 12, 0, 44907, // 12, 0
+ 11, 0, 5009, 11, 1, 7204, 12, 0, 6892, 12, 1, 46431, // 12, 1
+ 11, 1, 4607, 11, 2, 6560, 12, 1, 6414, 12, 2, 47955, // 12, 2
+ 11, 2, 4214, 11, 3, 5943, 12, 2, 5934, 12, 3, 49445, // 12, 3
+ 11, 3, 3846, 11, 4, 5373, 12, 3, 5474, 12, 4, 50843, // 12, 4
+ 11, 4, 3523, 11, 5, 4879, 12, 4, 5069, 12, 5, 52065, // 12, 5
+ 11, 5, 3274, 11, 6, 4495, 12, 5, 4759, 12, 6, 53008, // 12, 6
+ 11, 6, 3128, 11, 7, 4259, 12, 6, 4592, 12, 7, 53557, // 12, 7
+ 12, 7, 4594, 12, 8, 53562, 13, 7, 3126, 13, 8, 4254, // 12, 8
+ 12, 8, 4762, 12, 9, 53012, 13, 8, 3273, 13, 9, 4489, // 12, 9
+ 12, 9, 5073, 12, 10, 52069, 13, 9, 3522, 13, 10, 4872, // 12,10
+ 12, 10, 5481, 12, 11, 50844, 13, 10, 3845, 13, 11, 5366, // 12,11
+ 12, 11, 5943, 12, 12, 49445, 13, 11, 4214, 13, 12, 5934, // 12,12
+ 12, 12, 6426, 12, 13, 47953, 13, 12, 4608, 13, 13, 6549, // 12,13
+ 12, 13, 6908, 12, 14, 46427, 13, 13, 5011, 13, 14, 7190, // 12,14
+ 12, 14, 7374, 12, 15, 44901, 13, 14, 5413, 13, 15, 7848, // 12,15
+ 12, -1, 5682, 12, 0, 8159, 13, -1, 7791, 13, 0, 43904, // 13, 0
+ 12, 0, 5315, 12, 1, 7555, 13, 0, 7378, 13, 1, 45288, // 13, 1
+ 12, 1, 4954, 12, 2, 6973, 13, 1, 6959, 13, 2, 46650, // 13, 2
+ 12, 2, 4608, 12, 3, 6426, 13, 2, 6549, 13, 3, 47953, // 13, 3
+ 12, 3, 4291, 12, 4, 5930, 13, 3, 6168, 13, 4, 49147, // 13, 4
+ 12, 4, 4020, 12, 5, 5508, 13, 4, 5842, 13, 5, 50166, // 13, 5
+ 12, 5, 3815, 12, 6, 5184, 13, 5, 5602, 13, 6, 50935, // 13, 6
+ 12, 6, 3693, 12, 7, 4978, 13, 6, 5478, 13, 7, 51387, // 13, 7
+ 13, 7, 5480, 13, 8, 51395, 14, 7, 3691, 14, 8, 4970, // 13, 8
+ 13, 8, 5606, 13, 9, 50942, 14, 8, 3813, 14, 9, 5175, // 13, 9
+ 13, 9, 5848, 13, 10, 50171, 14, 9, 4019, 14, 10, 5498, // 13,10
+ 13, 10, 6176, 13, 11, 49150, 14, 10, 4290, 14, 11, 5920, // 13,11
+ 13, 11, 6560, 13, 12, 47955, 14, 11, 4607, 14, 12, 6414, // 13,12
+ 13, 12, 6973, 13, 13, 46650, 14, 12, 4954, 14, 13, 6959, // 13,13
+ 13, 13, 7395, 13, 14, 45286, 14, 13, 5316, 14, 14, 7539, // 13,14
+ 13, 14, 7812, 13, 15, 43900, 14, 14, 5684, 14, 15, 8140, // 13,15
+ 13, -1, 5974, 13, 0, 8474, 14, -1, 8265, 14, 0, 42823, // 14, 0
+ 13, 0, 5640, 13, 1, 7921, 14, 0, 7901, 14, 1, 44074, // 14, 1
+ 13, 1, 5316, 13, 2, 7395, 14, 1, 7539, 14, 2, 45286, // 14, 2
+ 13, 2, 5011, 13, 3, 6908, 14, 2, 7191, 14, 3, 46426, // 14, 3
+ 13, 3, 4736, 13, 4, 6472, 14, 3, 6875, 14, 4, 47453, // 14, 4
+ 13, 4, 4505, 13, 5, 6104, 14, 4, 6613, 14, 5, 48314, // 14, 5
+ 13, 5, 4330, 13, 6, 5820, 14, 5, 6425, 14, 6, 48961, // 14, 6
+ 13, 6, 4224, 13, 7, 5633, 14, 6, 6332, 14, 7, 49347, // 14, 7
+ 14, 7, 6335, 14, 8, 49358, 15, 7, 4221, 15, 8, 5622, // 14, 8
+ 14, 8, 6430, 14, 9, 48969, 15, 8, 4327, 15, 9, 5810, // 14, 9
+ 14, 9, 6620, 14, 10, 48322, 15, 9, 4502, 15, 10, 6092, // 14,10
+ 14, 10, 6886, 14, 11, 47458, 15, 10, 4734, 15, 11, 6458, // 14,11
+ 14, 11, 7204, 14, 12, 46430, 15, 11, 5009, 15, 12, 6893, // 14,12
+ 14, 12, 7555, 14, 13, 45288, 15, 12, 5315, 15, 13, 7378, // 14,13
+ 14, 13, 7921, 14, 14, 44074, 15, 13, 5640, 15, 14, 7901, // 14,14
+ 14, 14, 8288, 14, 15, 42821, 15, 14, 5975, 15, 15, 8452, // 14,15
+ 14, -1, 6280, 14, 0, 8795, 15, -1, 8769, 15, 0, 41692, // 15, 0
+ 14, 0, 5975, 14, 1, 8288, 15, 0, 8452, 15, 1, 42821, // 15, 1
+ 14, 1, 5684, 14, 2, 7812, 15, 1, 8141, 15, 2, 43899, // 15, 2
+ 14, 2, 5413, 14, 3, 7374, 15, 2, 7848, 15, 3, 44901, // 15, 3
+ 14, 3, 5172, 14, 4, 6986, 15, 3, 7587, 15, 4, 45791, // 15, 4
+ 14, 4, 4971, 14, 5, 6659, 15, 4, 7374, 15, 5, 46532, // 15, 5
+ 14, 5, 4818, 14, 6, 6405, 15, 5, 7227, 15, 6, 47086, // 15, 6
+ 14, 6, 4722, 14, 7, 6230, 15, 6, 7158, 15, 7, 47426, // 15, 7
+ 15, 7, 7161, 15, 8, 47440, 16, 7, 4718, 16, 8, 6217, // 15, 8
+ 15, 8, 7233, 15, 9, 47098, 16, 8, 4814, 16, 9, 6391, // 15, 9
+ 15, 9, 7383, 15, 10, 46541, 16, 9, 4967, 16, 10, 6645, // 15,10
+ 15, 10, 7599, 15, 11, 45799, 16, 10, 5169, 16, 11, 6969, // 15,11
+ 15, 11, 7863, 15, 12, 44907, 16, 11, 5410, 16, 12, 7356, // 15,12
+ 15, 12, 8159, 15, 13, 43904, 16, 12, 5682, 16, 13, 7791, // 15,13
+ 15, 13, 8474, 15, 14, 42823, 16, 13, 5974, 16, 14, 8265, // 15,14
+ 15, 14, 8795, 15, 15, 41693, 16, 14, 6280, 16, 15, 8768, // 15,15
+ // angle of -0.5 degrees
+ -1, 0, 5106, -1, 1, 3621, 0, 0, 51699, 0, 1, 5110, // 0, 0
+ -1, 1, 4803, -1, 2, 3421, 0, 1, 52457, 0, 2, 4855, // 0, 1
+ -1, 2, 4521, -1, 3, 3235, 0, 2, 53168, 0, 3, 4612, // 0, 2
+ -1, 3, 4264, -1, 4, 3064, 0, 3, 53815, 0, 4, 4393, // 0, 3
+ -1, 4, 4041, -1, 5, 2916, 0, 4, 54378, 0, 5, 4201, // 0, 4
+ -1, 5, 3858, -1, 6, 2796, 0, 5, 54835, 0, 6, 4047, // 0, 5
+ -1, 6, 3722, -1, 7, 2709, 0, 6, 55166, 0, 7, 3939, // 0, 6
+ -1, 7, 3638, -1, 8, 2659, 0, 7, 55354, 0, 8, 3885, // 0, 7
+ 0, 8, 55352, 0, 9, 3885, 1, 8, 3640, 1, 9, 2659, // 0, 8
+ 0, 9, 55164, 0, 10, 3939, 1, 9, 3724, 1, 10, 2709, // 0, 9
+ 0, 10, 54833, 0, 11, 4046, 1, 10, 3860, 1, 11, 2797, // 0,10
+ 0, 11, 54376, 0, 12, 4200, 1, 11, 4043, 1, 12, 2917, // 0,11
+ 0, 12, 53814, 0, 13, 4390, 1, 12, 4267, 1, 13, 3065, // 0,12
+ 0, 13, 53168, 0, 14, 4610, 1, 13, 4523, 1, 14, 3235, // 0,13
+ 0, 14, 52457, 0, 15, 4851, 1, 14, 4806, 1, 15, 3422, // 0,14
+ 0, 15, 51699, 0, 16, 5106, 1, 15, 5110, 1, 16, 3621, // 0,15
+ 0, 0, 4851, 0, 1, 3422, 1, 0, 52457, 1, 1, 4806, // 1, 0
+ 0, 1, 4522, 0, 2, 3204, 1, 1, 53285, 1, 2, 4525, // 1, 1
+ 0, 2, 4212, 0, 3, 2998, 1, 2, 54072, 1, 3, 4254, // 1, 2
+ 0, 3, 3927, 0, 4, 2808, 1, 3, 54796, 1, 4, 4005, // 1, 3
+ 0, 4, 3677, 0, 5, 2640, 1, 4, 55435, 1, 5, 3784, // 1, 4
+ 0, 5, 3470, 0, 6, 2502, 1, 5, 55959, 1, 6, 3605, // 1, 5
+ 0, 6, 3317, 0, 7, 2402, 1, 6, 56340, 1, 7, 3477, // 1, 6
+ 0, 7, 3225, 0, 8, 2346, 1, 7, 56554, 1, 8, 3411, // 1, 7
+ 1, 8, 56552, 1, 9, 3411, 2, 8, 3227, 2, 9, 2346, // 1, 8
+ 1, 9, 56339, 1, 10, 3476, 2, 9, 3319, 2, 10, 2402, // 1, 9
+ 1, 10, 55958, 1, 11, 3604, 2, 10, 3472, 2, 11, 2502, // 1,10
+ 1, 11, 55434, 1, 12, 3783, 2, 11, 3678, 2, 12, 2641, // 1,11
+ 1, 12, 54796, 1, 13, 4003, 2, 12, 3929, 2, 13, 2808, // 1,12
+ 1, 13, 54071, 1, 14, 4253, 2, 13, 4214, 2, 14, 2998, // 1,13
+ 1, 14, 53285, 1, 15, 4522, 2, 14, 4525, 2, 15, 3204, // 1,14
+ 1, 15, 52457, 1, 16, 4803, 2, 15, 4854, 2, 16, 3422, // 1,15
+ 1, 0, 4610, 1, 1, 3235, 2, 0, 53168, 2, 1, 4523, // 2, 0
+ 1, 1, 4253, 1, 2, 2998, 2, 1, 54071, 2, 2, 4214, // 2, 1
+ 1, 2, 3911, 1, 3, 2770, 2, 2, 54941, 2, 3, 3914, // 2, 2
+ 1, 3, 3594, 1, 4, 2556, 2, 3, 55756, 2, 4, 3630, // 2, 3
+ 1, 4, 3310, 1, 5, 2365, 2, 4, 56487, 2, 5, 3374, // 2, 4
+ 1, 5, 3073, 1, 6, 2205, 2, 5, 57096, 2, 6, 3162, // 2, 5
+ 1, 6, 2897, 1, 7, 2088, 2, 6, 57545, 2, 7, 3006, // 2, 6
+ 1, 7, 2794, 1, 8, 2022, 2, 7, 57795, 2, 8, 2925, // 2, 7
+ 2, 8, 57793, 2, 9, 2926, 3, 8, 2795, 3, 9, 2022, // 2, 8
+ 2, 9, 57544, 2, 10, 3007, 3, 9, 2898, 3, 10, 2087, // 2, 9
+ 2, 10, 57095, 2, 11, 3161, 3, 10, 3074, 3, 11, 2206, // 2,10
+ 2, 11, 56486, 2, 12, 3373, 3, 11, 3311, 3, 12, 2366, // 2,11
+ 2, 12, 55756, 2, 13, 3628, 3, 12, 3595, 3, 13, 2557, // 2,12
+ 2, 13, 54941, 2, 14, 3911, 3, 13, 3913, 3, 14, 2771, // 2,13
+ 2, 14, 54072, 2, 15, 4212, 3, 14, 4255, 3, 15, 2997, // 2,14
+ 2, 15, 53168, 2, 16, 4521, 3, 15, 4612, 3, 16, 3235, // 2,15
+ 2, 0, 4390, 2, 1, 3065, 3, 0, 53814, 3, 1, 4267, // 3, 0
+ 2, 1, 4003, 2, 2, 2808, 3, 1, 54796, 3, 2, 3929, // 3, 1
+ 2, 2, 3628, 2, 3, 2557, 3, 2, 55756, 3, 3, 3595, // 3, 2
+ 2, 3, 3273, 2, 4, 2317, 3, 3, 56673, 3, 4, 3273, // 3, 3
+ 2, 4, 2948, 2, 5, 2096, 3, 4, 57514, 3, 5, 2978, // 3, 4
+ 2, 5, 2672, 2, 6, 1908, 3, 5, 58234, 3, 6, 2722, // 3, 5
+ 2, 6, 2463, 2, 7, 1766, 3, 6, 58775, 3, 7, 2532, // 3, 6
+ 2, 7, 2342, 2, 8, 1687, 3, 7, 59077, 3, 8, 2430, // 3, 7
+ 3, 8, 59076, 3, 9, 2430, 4, 8, 2343, 4, 9, 1687, // 3, 8
+ 3, 9, 58774, 3, 10, 2532, 4, 9, 2464, 4, 10, 1766, // 3, 9
+ 3, 10, 58233, 3, 11, 2722, 4, 10, 2673, 4, 11, 1908, // 3,10
+ 3, 11, 57514, 3, 12, 2976, 4, 11, 2950, 4, 12, 2096, // 3,11
+ 3, 12, 56673, 3, 13, 3273, 4, 12, 3274, 4, 13, 2316, // 3,12
+ 3, 13, 55756, 3, 14, 3594, 4, 13, 3630, 4, 14, 2556, // 3,13
+ 3, 14, 54796, 3, 15, 3927, 4, 14, 4005, 4, 15, 2808, // 3,14
+ 3, 15, 53815, 3, 16, 4264, 4, 15, 4392, 4, 16, 3065, // 3,15
+ 3, 0, 4200, 3, 1, 2917, 4, 0, 54376, 4, 1, 4043, // 4, 0
+ 3, 1, 3783, 3, 2, 2640, 4, 1, 55434, 4, 2, 3679, // 4, 1
+ 3, 2, 3373, 3, 3, 2365, 4, 2, 56486, 4, 3, 3312, // 4, 2
+ 3, 3, 2976, 3, 4, 2096, 4, 3, 57514, 4, 4, 2950, // 4, 3
+ 3, 4, 2604, 3, 5, 1843, 4, 4, 58484, 4, 5, 2605, // 4, 4
+ 3, 5, 2276, 3, 6, 1617, 4, 5, 59346, 4, 6, 2297, // 4, 5
+ 3, 6, 2020, 3, 7, 1442, 4, 6, 60018, 4, 7, 2056, // 4, 6
+ 3, 7, 1871, 3, 8, 1341, 4, 7, 60402, 4, 8, 1922, // 4, 7
+ 4, 8, 60402, 4, 9, 1922, 5, 8, 1871, 5, 9, 1341, // 4, 8
+ 4, 9, 60017, 4, 10, 2057, 5, 9, 2020, 5, 10, 1442, // 4, 9
+ 4, 10, 59345, 4, 11, 2297, 5, 10, 2276, 5, 11, 1618, // 4,10
+ 4, 11, 58484, 4, 12, 2604, 5, 11, 2605, 5, 12, 1843, // 4,11
+ 4, 12, 57514, 4, 13, 2948, 5, 12, 2977, 5, 13, 2097, // 4,12
+ 4, 13, 56487, 4, 14, 3310, 5, 13, 3374, 5, 14, 2365, // 4,13
+ 4, 14, 55435, 4, 15, 3677, 5, 14, 3785, 5, 15, 2639, // 4,14
+ 4, 15, 54378, 4, 16, 4041, 5, 15, 4201, 5, 16, 2916, // 4,15
+ 4, 0, 4046, 4, 1, 2797, 5, 0, 54833, 5, 1, 3860, // 5, 0
+ 4, 1, 3604, 4, 2, 2503, 5, 1, 55958, 5, 2, 3471, // 5, 1
+ 4, 2, 3161, 4, 3, 2205, 5, 2, 57095, 5, 3, 3075, // 5, 2
+ 4, 3, 2722, 4, 4, 1908, 5, 3, 58233, 5, 4, 2673, // 5, 3
+ 4, 4, 2297, 4, 5, 1617, 5, 4, 59345, 5, 5, 2277, // 5, 4
+ 4, 5, 1904, 4, 6, 1347, 5, 5, 60381, 5, 6, 1904, // 5, 5
+ 4, 6, 1578, 4, 7, 1121, 5, 6, 61243, 5, 7, 1594, // 5, 6
+ 4, 7, 1380, 4, 8, 985, 5, 7, 61767, 5, 8, 1404, // 5, 7
+ 5, 8, 61767, 5, 9, 1405, 6, 8, 1380, 6, 9, 984, // 5, 8
+ 5, 9, 61243, 5, 10, 1593, 6, 9, 1579, 6, 10, 1121, // 5, 9
+ 5, 10, 60381, 5, 11, 1904, 6, 10, 1904, 6, 11, 1347, // 5,10
+ 5, 11, 59346, 5, 12, 2276, 6, 11, 2297, 6, 12, 1617, // 5,11
+ 5, 12, 58234, 5, 13, 2672, 6, 12, 2723, 6, 13, 1907, // 5,12
+ 5, 13, 57096, 5, 14, 3073, 6, 13, 3161, 6, 14, 2206, // 5,13
+ 5, 14, 55959, 5, 15, 3470, 6, 14, 3605, 6, 15, 2502, // 5,14
+ 5, 15, 54835, 5, 16, 3858, 6, 15, 4047, 6, 16, 2796, // 5,15
+ 5, 0, 3939, 5, 1, 2709, 6, 0, 55164, 6, 1, 3724, // 6, 0
+ 5, 1, 3476, 5, 2, 2403, 6, 1, 56339, 6, 2, 3318, // 6, 1
+ 5, 2, 3007, 5, 3, 2088, 6, 2, 57544, 6, 3, 2897, // 6, 2
+ 5, 3, 2532, 5, 4, 1767, 6, 3, 58774, 6, 4, 2463, // 6, 3
+ 5, 4, 2057, 5, 5, 1442, 6, 4, 60017, 6, 5, 2020, // 6, 4
+ 5, 5, 1593, 5, 6, 1121, 6, 5, 61243, 6, 6, 1579, // 6, 5
+ 5, 6, 1170, 5, 7, 827, 6, 6, 62369, 6, 7, 1170, // 6, 6
+ 5, 7, 875, 5, 8, 622, 6, 7, 63156, 6, 8, 883, // 6, 7
+ 6, 8, 63156, 6, 9, 883, 7, 8, 875, 7, 9, 622, // 6, 8
+ 6, 9, 62369, 6, 10, 1170, 7, 9, 1170, 7, 10, 827, // 6, 9
+ 6, 10, 61243, 6, 11, 1578, 7, 10, 1593, 7, 11, 1122, // 6,10
+ 6, 11, 60018, 6, 12, 2020, 7, 11, 2057, 7, 12, 1441, // 6,11
+ 6, 12, 58775, 6, 13, 2463, 7, 12, 2532, 7, 13, 1766, // 6,12
+ 6, 13, 57545, 6, 14, 2897, 7, 13, 3007, 7, 14, 2087, // 6,13
+ 6, 14, 56340, 6, 15, 3317, 7, 14, 3477, 7, 15, 2402, // 6,14
+ 6, 15, 55166, 6, 16, 3722, 7, 15, 3940, 7, 16, 2708, // 6,15
+ 6, 0, 3885, 6, 1, 2659, 7, 0, 55352, 7, 1, 3640, // 7, 0
+ 6, 1, 3411, 6, 2, 2346, 7, 1, 56552, 7, 2, 3227, // 7, 1
+ 6, 2, 2926, 6, 3, 2022, 7, 2, 57793, 7, 3, 2795, // 7, 2
+ 6, 3, 2430, 6, 4, 1687, 7, 3, 59076, 7, 4, 2343, // 7, 3
+ 6, 4, 1922, 6, 5, 1341, 7, 4, 60402, 7, 5, 1871, // 7, 4
+ 6, 5, 1405, 6, 6, 985, 7, 5, 61767, 7, 6, 1379, // 7, 5
+ 6, 6, 883, 6, 7, 622, 7, 6, 63156, 7, 7, 875, // 7, 6
+ 6, 7, 399, 6, 8, 282, 7, 7, 64455, 7, 8, 400, // 7, 7
+ 7, 8, 64455, 7, 9, 399, 8, 8, 399, 8, 9, 283, // 7, 8
+ 7, 9, 63156, 7, 10, 875, 8, 9, 883, 8, 10, 622, // 7, 9
+ 7, 10, 61767, 7, 11, 1380, 8, 10, 1405, 8, 11, 984, // 7,10
+ 7, 11, 60402, 7, 12, 1871, 8, 11, 1922, 8, 12, 1341, // 7,11
+ 7, 12, 59077, 7, 13, 2342, 8, 12, 2430, 8, 13, 1687, // 7,12
+ 7, 13, 57795, 7, 14, 2794, 8, 13, 2926, 8, 14, 2021, // 7,13
+ 7, 14, 56554, 7, 15, 3225, 8, 14, 3411, 8, 15, 2346, // 7,14
+ 7, 15, 55354, 7, 16, 3638, 8, 15, 3885, 8, 16, 2659, // 7,15
+ 7, -1, 2659, 7, 0, 3885, 8, -1, 3638, 8, 0, 55354, // 8, 0
+ 7, 0, 2346, 7, 1, 3411, 8, 0, 3225, 8, 1, 56554, // 8, 1
+ 7, 1, 2022, 7, 2, 2926, 8, 1, 2794, 8, 2, 57794, // 8, 2
+ 7, 2, 1687, 7, 3, 2430, 8, 2, 2342, 8, 3, 59077, // 8, 3
+ 7, 3, 1341, 7, 4, 1922, 8, 3, 1871, 8, 4, 60402, // 8, 4
+ 7, 4, 985, 7, 5, 1405, 8, 4, 1380, 8, 5, 61766, // 8, 5
+ 7, 5, 622, 7, 6, 883, 8, 5, 875, 8, 6, 63156, // 8, 6
+ 7, 6, 282, 7, 7, 399, 8, 6, 399, 8, 7, 64456, // 8, 7
+ 8, 7, 399, 8, 8, 64455, 9, 7, 282, 9, 8, 400, // 8, 8
+ 8, 8, 875, 8, 9, 63156, 9, 8, 622, 9, 9, 883, // 8, 9
+ 8, 9, 1380, 8, 10, 61767, 9, 9, 985, 9, 10, 1404, // 8,10
+ 8, 10, 1871, 8, 11, 60402, 9, 10, 1341, 9, 11, 1922, // 8,11
+ 8, 11, 2343, 8, 12, 59076, 9, 11, 1687, 9, 12, 2430, // 8,12
+ 8, 12, 2795, 8, 13, 57793, 9, 12, 2022, 9, 13, 2926, // 8,13
+ 8, 13, 3227, 8, 14, 56552, 9, 13, 2346, 9, 14, 3411, // 8,14
+ 8, 14, 3640, 8, 15, 55352, 9, 14, 2659, 9, 15, 3885, // 8,15
+ 8, -1, 2709, 8, 0, 3940, 9, -1, 3722, 9, 0, 55165, // 9, 0
+ 8, 0, 2402, 8, 1, 3477, 9, 0, 3317, 9, 1, 56340, // 9, 1
+ 8, 1, 2088, 8, 2, 3007, 9, 1, 2897, 9, 2, 57544, // 9, 2
+ 8, 2, 1766, 8, 3, 2532, 9, 2, 2463, 9, 3, 58775, // 9, 3
+ 8, 3, 1442, 8, 4, 2057, 9, 3, 2020, 9, 4, 60017, // 9, 4
+ 8, 4, 1121, 8, 5, 1593, 9, 4, 1578, 9, 5, 61244, // 9, 5
+ 8, 5, 827, 8, 6, 1170, 9, 5, 1170, 9, 6, 62369, // 9, 6
+ 8, 6, 622, 8, 7, 875, 9, 6, 883, 9, 7, 63156, // 9, 7
+ 9, 7, 883, 9, 8, 63156, 10, 7, 622, 10, 8, 875, // 9, 8
+ 9, 8, 1170, 9, 9, 62369, 10, 8, 827, 10, 9, 1170, // 9, 9
+ 9, 9, 1579, 9, 10, 61243, 10, 9, 1121, 10, 10, 1593, // 9,10
+ 9, 10, 2020, 9, 11, 60017, 10, 10, 1442, 10, 11, 2057, // 9,11
+ 9, 11, 2464, 9, 12, 58774, 10, 11, 1767, 10, 12, 2531, // 9,12
+ 9, 12, 2898, 9, 13, 57544, 10, 12, 2088, 10, 13, 3006, // 9,13
+ 9, 13, 3319, 9, 14, 56339, 10, 13, 2403, 10, 14, 3475, // 9,14
+ 9, 14, 3724, 9, 15, 55164, 10, 14, 2709, 10, 15, 3939, // 9,15
+ 9, -1, 2796, 9, 0, 4047, 10, -1, 3858, 10, 0, 54835, // 10, 0
+ 9, 0, 2502, 9, 1, 3605, 10, 0, 3470, 10, 1, 55959, // 10, 1
+ 9, 1, 2205, 9, 2, 3161, 10, 1, 3073, 10, 2, 57097, // 10, 2
+ 9, 2, 1908, 9, 3, 2723, 10, 2, 2672, 10, 3, 58233, // 10, 3
+ 9, 3, 1617, 9, 4, 2297, 10, 3, 2276, 10, 4, 59346, // 10, 4
+ 9, 4, 1347, 9, 5, 1904, 10, 4, 1904, 10, 5, 60381, // 10, 5
+ 9, 5, 1121, 9, 6, 1579, 10, 5, 1593, 10, 6, 61243, // 10, 6
+ 9, 6, 985, 9, 7, 1380, 10, 6, 1405, 10, 7, 61766, // 10, 7
+ 10, 7, 1405, 10, 8, 61767, 11, 7, 985, 11, 8, 1379, // 10, 8
+ 10, 8, 1593, 10, 9, 61243, 11, 8, 1121, 11, 9, 1579, // 10, 9
+ 10, 9, 1904, 10, 10, 60381, 11, 9, 1347, 11, 10, 1904, // 10,10
+ 10, 10, 2276, 10, 11, 59345, 11, 10, 1617, 11, 11, 2298, // 10,11
+ 10, 11, 2673, 10, 12, 58233, 11, 11, 1908, 11, 12, 2722, // 10,12
+ 10, 12, 3074, 10, 13, 57095, 11, 12, 2205, 11, 13, 3162, // 10,13
+ 10, 13, 3472, 10, 14, 55958, 11, 13, 2503, 11, 14, 3603, // 10,14
+ 10, 14, 3860, 10, 15, 54833, 11, 14, 2797, 11, 15, 4046, // 10,15
+ 10, -1, 2916, 10, 0, 4201, 11, -1, 4041, 11, 0, 54378, // 11, 0
+ 10, 0, 2640, 10, 1, 3785, 11, 0, 3677, 11, 1, 55434, // 11, 1
+ 10, 1, 2365, 10, 2, 3374, 11, 1, 3310, 11, 2, 56487, // 11, 2
+ 10, 2, 2096, 10, 3, 2977, 11, 2, 2948, 11, 3, 57515, // 11, 3
+ 10, 3, 1843, 10, 4, 2605, 11, 3, 2604, 11, 4, 58484, // 11, 4
+ 10, 4, 1617, 10, 5, 2276, 11, 4, 2297, 11, 5, 59346, // 11, 5
+ 10, 5, 1442, 10, 6, 2020, 11, 5, 2057, 11, 6, 60017, // 11, 6
+ 10, 6, 1341, 10, 7, 1871, 11, 6, 1922, 11, 7, 60402, // 11, 7
+ 11, 7, 1922, 11, 8, 60402, 12, 7, 1341, 12, 8, 1871, // 11, 8
+ 11, 8, 2057, 11, 9, 60018, 12, 8, 1442, 12, 9, 2019, // 11, 9
+ 11, 9, 2297, 11, 10, 59346, 12, 9, 1617, 12, 10, 2276, // 11,10
+ 11, 10, 2605, 11, 11, 58484, 12, 10, 1843, 12, 11, 2604, // 11,11
+ 11, 11, 2950, 11, 12, 57514, 12, 11, 2096, 12, 12, 2976, // 11,12
+ 11, 12, 3311, 11, 13, 56486, 12, 12, 2365, 12, 13, 3374, // 11,13
+ 11, 13, 3678, 11, 14, 55434, 12, 13, 2640, 12, 14, 3784, // 11,14
+ 11, 14, 4043, 11, 15, 54376, 12, 14, 2917, 12, 15, 4200, // 11,15
+ 11, -1, 3064, 11, 0, 4392, 12, -1, 4264, 12, 0, 53816, // 12, 0
+ 11, 0, 2808, 11, 1, 4005, 12, 0, 3927, 12, 1, 54796, // 12, 1
+ 11, 1, 2556, 11, 2, 3630, 12, 1, 3594, 12, 2, 55756, // 12, 2
+ 11, 2, 2317, 11, 3, 3274, 12, 2, 3273, 12, 3, 56672, // 12, 3
+ 11, 3, 2096, 11, 4, 2950, 12, 3, 2976, 12, 4, 57514, // 12, 4
+ 11, 4, 1908, 11, 5, 2673, 12, 4, 2722, 12, 5, 58233, // 12, 5
+ 11, 5, 1767, 11, 6, 2464, 12, 5, 2532, 12, 6, 58773, // 12, 6
+ 11, 6, 1687, 11, 7, 2343, 12, 6, 2430, 12, 7, 59076, // 12, 7
+ 12, 7, 2430, 12, 8, 59077, 13, 7, 1687, 13, 8, 2342, // 12, 8
+ 12, 8, 2532, 12, 9, 58775, 13, 8, 1766, 13, 9, 2463, // 12, 9
+ 12, 9, 2723, 12, 10, 58234, 13, 9, 1908, 13, 10, 2671, // 12,10
+ 12, 10, 2977, 12, 11, 57514, 13, 10, 2096, 13, 11, 2949, // 12,11
+ 12, 11, 3274, 12, 12, 56673, 13, 11, 2317, 13, 12, 3272, // 12,12
+ 12, 12, 3595, 12, 13, 55756, 13, 12, 2557, 13, 13, 3628, // 12,13
+ 12, 13, 3929, 12, 14, 54796, 13, 13, 2808, 13, 14, 4003, // 12,14
+ 12, 14, 4267, 12, 15, 53814, 13, 14, 3065, 13, 15, 4390, // 12,15
+ 12, -1, 3235, 12, 0, 4612, 13, -1, 4521, 13, 0, 53168, // 13, 0
+ 12, 0, 2998, 12, 1, 4255, 13, 0, 4212, 13, 1, 54071, // 13, 1
+ 12, 1, 2770, 12, 2, 3913, 13, 1, 3911, 13, 2, 54942, // 13, 2
+ 12, 2, 2557, 12, 3, 3595, 13, 2, 3628, 13, 3, 55756, // 13, 3
+ 12, 3, 2365, 12, 4, 3311, 13, 3, 3373, 13, 4, 56487, // 13, 4
+ 12, 4, 2205, 12, 5, 3074, 13, 4, 3161, 13, 5, 57096, // 13, 5
+ 12, 5, 2088, 12, 6, 2898, 13, 5, 3007, 13, 6, 57543, // 13, 6
+ 12, 6, 2022, 12, 7, 2795, 13, 6, 2926, 13, 7, 57793, // 13, 7
+ 13, 7, 2926, 13, 8, 57795, 14, 7, 2022, 14, 8, 2793, // 13, 8
+ 13, 8, 3007, 13, 9, 57545, 14, 8, 2088, 14, 9, 2896, // 13, 9
+ 13, 9, 3161, 13, 10, 57096, 14, 9, 2205, 14, 10, 3074, // 13,10
+ 13, 10, 3374, 13, 11, 56487, 14, 10, 2365, 14, 11, 3310, // 13,11
+ 13, 11, 3630, 13, 12, 55756, 14, 11, 2556, 14, 12, 3594, // 13,12
+ 13, 12, 3913, 13, 13, 54941, 14, 12, 2770, 14, 13, 3912, // 13,13
+ 13, 13, 4214, 13, 14, 54071, 14, 13, 2998, 14, 14, 4253, // 13,14
+ 13, 14, 4523, 13, 15, 53168, 14, 14, 3235, 14, 15, 4610, // 13,15
+ 13, -1, 3421, 13, 0, 4854, 14, -1, 4803, 14, 0, 52458, // 14, 0
+ 13, 0, 3204, 13, 1, 4525, 14, 0, 4522, 14, 1, 53285, // 14, 1
+ 13, 1, 2998, 13, 2, 4214, 14, 1, 4253, 14, 2, 54071, // 14, 2
+ 13, 2, 2808, 13, 3, 3929, 14, 2, 4003, 14, 3, 54796, // 14, 3
+ 13, 3, 2640, 13, 4, 3678, 14, 3, 3783, 14, 4, 55435, // 14, 4
+ 13, 4, 2503, 13, 5, 3472, 14, 4, 3604, 14, 5, 55957, // 14, 5
+ 13, 5, 2403, 13, 6, 3319, 14, 5, 3476, 14, 6, 56338, // 14, 6
+ 13, 6, 2346, 13, 7, 3227, 14, 6, 3411, 14, 7, 56552, // 14, 7
+ 14, 7, 3411, 14, 8, 56554, 15, 7, 2346, 15, 8, 3225, // 14, 8
+ 14, 8, 3477, 14, 9, 56340, 15, 8, 2402, 15, 9, 3317, // 14, 9
+ 14, 9, 3605, 14, 10, 55959, 15, 9, 2502, 15, 10, 3470, // 14,10
+ 14, 10, 3785, 14, 11, 55435, 15, 10, 2640, 15, 11, 3676, // 14,11
+ 14, 11, 4005, 14, 12, 54796, 15, 11, 2808, 15, 12, 3927, // 14,12
+ 14, 12, 4255, 14, 13, 54072, 15, 12, 2998, 15, 13, 4211, // 14,13
+ 14, 13, 4525, 14, 14, 53285, 15, 13, 3204, 15, 14, 4522, // 14,14
+ 14, 14, 4806, 14, 15, 52457, 15, 14, 3422, 15, 15, 4851, // 14,15
+ 14, -1, 3621, 14, 0, 5110, 15, -1, 5106, 15, 0, 51699, // 15, 0
+ 14, 0, 3422, 14, 1, 4806, 15, 0, 4851, 15, 1, 52457, // 15, 1
+ 14, 1, 3235, 14, 2, 4523, 15, 1, 4610, 15, 2, 53168, // 15, 2
+ 14, 2, 3065, 14, 3, 4267, 15, 2, 4390, 15, 3, 53814, // 15, 3
+ 14, 3, 2917, 14, 4, 4043, 15, 3, 4200, 15, 4, 54376, // 15, 4
+ 14, 4, 2797, 14, 5, 3860, 15, 4, 4046, 15, 5, 54833, // 15, 5
+ 14, 5, 2709, 14, 6, 3724, 15, 5, 3939, 15, 6, 55164, // 15, 6
+ 14, 6, 2659, 14, 7, 3640, 15, 6, 3885, 15, 7, 55352, // 15, 7
+ 15, 7, 3885, 15, 8, 55354, 16, 7, 2659, 16, 8, 3638, // 15, 8
+ 15, 8, 3940, 15, 9, 55166, 16, 8, 2709, 16, 9, 3721, // 15, 9
+ 15, 9, 4047, 15, 10, 54835, 16, 9, 2796, 16, 10, 3858, // 15,10
+ 15, 10, 4201, 15, 11, 54378, 16, 10, 2916, 16, 11, 4041, // 15,11
+ 15, 11, 4392, 15, 12, 53815, 16, 11, 3064, 16, 12, 4265, // 15,12
+ 15, 12, 4612, 15, 13, 53168, 16, 12, 3235, 16, 13, 4521, // 15,13
+ 15, 13, 4854, 15, 14, 52457, 16, 13, 3421, 16, 14, 4804, // 15,14
+ 15, 14, 5110, 15, 15, 51699, 16, 14, 3621, 16, 15, 5106, // 15,15
+ // angle of 0.0 degrees
+ 0, 0, 16384, 0, 0, 16384, 0, 0, 16384, 0, 0, 16384, // 0, 0
+ 0, 1, 16384, 0, 1, 16384, 0, 1, 16384, 0, 1, 16384, // 0, 1
+ 0, 2, 16384, 0, 2, 16384, 0, 2, 16384, 0, 2, 16384, // 0, 2
+ 0, 3, 16384, 0, 3, 16384, 0, 3, 16384, 0, 3, 16384, // 0, 3
+ 0, 4, 16384, 0, 4, 16384, 0, 4, 16384, 0, 4, 16384, // 0, 4
+ 0, 5, 16384, 0, 5, 16384, 0, 5, 16384, 0, 5, 16384, // 0, 5
+ 0, 6, 16384, 0, 6, 16384, 0, 6, 16384, 0, 6, 16384, // 0, 6
+ 0, 7, 16384, 0, 7, 16384, 0, 7, 16384, 0, 7, 16384, // 0, 7
+ 0, 8, 16384, 0, 8, 16384, 0, 8, 16384, 0, 8, 16384, // 0, 8
+ 0, 9, 16384, 0, 9, 16384, 0, 9, 16384, 0, 9, 16384, // 0, 9
+ 0, 10, 16384, 0, 10, 16384, 0, 10, 16384, 0, 10, 16384, // 0,10
+ 0, 11, 16384, 0, 11, 16384, 0, 11, 16384, 0, 11, 16384, // 0,11
+ 0, 12, 16384, 0, 12, 16384, 0, 12, 16384, 0, 12, 16384, // 0,12
+ 0, 13, 16384, 0, 13, 16384, 0, 13, 16384, 0, 13, 16384, // 0,13
+ 0, 14, 16384, 0, 14, 16384, 0, 14, 16384, 0, 14, 16384, // 0,14
+ 0, 15, 16384, 0, 15, 16384, 0, 15, 16384, 0, 15, 16384, // 0,15
+ 1, 0, 16384, 1, 0, 16384, 1, 0, 16384, 1, 0, 16384, // 1, 0
+ 1, 1, 16384, 1, 1, 16384, 1, 1, 16384, 1, 1, 16384, // 1, 1
+ 1, 2, 16384, 1, 2, 16384, 1, 2, 16384, 1, 2, 16384, // 1, 2
+ 1, 3, 16384, 1, 3, 16384, 1, 3, 16384, 1, 3, 16384, // 1, 3
+ 1, 4, 16384, 1, 4, 16384, 1, 4, 16384, 1, 4, 16384, // 1, 4
+ 1, 5, 16384, 1, 5, 16384, 1, 5, 16384, 1, 5, 16384, // 1, 5
+ 1, 6, 16384, 1, 6, 16384, 1, 6, 16384, 1, 6, 16384, // 1, 6
+ 1, 7, 16384, 1, 7, 16384, 1, 7, 16384, 1, 7, 16384, // 1, 7
+ 1, 8, 16384, 1, 8, 16384, 1, 8, 16384, 1, 8, 16384, // 1, 8
+ 1, 9, 16384, 1, 9, 16384, 1, 9, 16384, 1, 9, 16384, // 1, 9
+ 1, 10, 16384, 1, 10, 16384, 1, 10, 16384, 1, 10, 16384, // 1,10
+ 1, 11, 16384, 1, 11, 16384, 1, 11, 16384, 1, 11, 16384, // 1,11
+ 1, 12, 16384, 1, 12, 16384, 1, 12, 16384, 1, 12, 16384, // 1,12
+ 1, 13, 16384, 1, 13, 16384, 1, 13, 16384, 1, 13, 16384, // 1,13
+ 1, 14, 16384, 1, 14, 16384, 1, 14, 16384, 1, 14, 16384, // 1,14
+ 1, 15, 16384, 1, 15, 16384, 1, 15, 16384, 1, 15, 16384, // 1,15
+ 2, 0, 16384, 2, 0, 16384, 2, 0, 16384, 2, 0, 16384, // 2, 0
+ 2, 1, 16384, 2, 1, 16384, 2, 1, 16384, 2, 1, 16384, // 2, 1
+ 2, 2, 16384, 2, 2, 16384, 2, 2, 16384, 2, 2, 16384, // 2, 2
+ 2, 3, 16384, 2, 3, 16384, 2, 3, 16384, 2, 3, 16384, // 2, 3
+ 2, 4, 16384, 2, 4, 16384, 2, 4, 16384, 2, 4, 16384, // 2, 4
+ 2, 5, 16384, 2, 5, 16384, 2, 5, 16384, 2, 5, 16384, // 2, 5
+ 2, 6, 16384, 2, 6, 16384, 2, 6, 16384, 2, 6, 16384, // 2, 6
+ 2, 7, 16384, 2, 7, 16384, 2, 7, 16384, 2, 7, 16384, // 2, 7
+ 2, 8, 16384, 2, 8, 16384, 2, 8, 16384, 2, 8, 16384, // 2, 8
+ 2, 9, 16384, 2, 9, 16384, 2, 9, 16384, 2, 9, 16384, // 2, 9
+ 2, 10, 16384, 2, 10, 16384, 2, 10, 16384, 2, 10, 16384, // 2,10
+ 2, 11, 16384, 2, 11, 16384, 2, 11, 16384, 2, 11, 16384, // 2,11
+ 2, 12, 16384, 2, 12, 16384, 2, 12, 16384, 2, 12, 16384, // 2,12
+ 2, 13, 16384, 2, 13, 16384, 2, 13, 16384, 2, 13, 16384, // 2,13
+ 2, 14, 16384, 2, 14, 16384, 2, 14, 16384, 2, 14, 16384, // 2,14
+ 2, 15, 16384, 2, 15, 16384, 2, 15, 16384, 2, 15, 16384, // 2,15
+ 3, 0, 16384, 3, 0, 16384, 3, 0, 16384, 3, 0, 16384, // 3, 0
+ 3, 1, 16384, 3, 1, 16384, 3, 1, 16384, 3, 1, 16384, // 3, 1
+ 3, 2, 16384, 3, 2, 16384, 3, 2, 16384, 3, 2, 16384, // 3, 2
+ 3, 3, 16384, 3, 3, 16384, 3, 3, 16384, 3, 3, 16384, // 3, 3
+ 3, 4, 16384, 3, 4, 16384, 3, 4, 16384, 3, 4, 16384, // 3, 4
+ 3, 5, 16384, 3, 5, 16384, 3, 5, 16384, 3, 5, 16384, // 3, 5
+ 3, 6, 16384, 3, 6, 16384, 3, 6, 16384, 3, 6, 16384, // 3, 6
+ 3, 7, 16384, 3, 7, 16384, 3, 7, 16384, 3, 7, 16384, // 3, 7
+ 3, 8, 16384, 3, 8, 16384, 3, 8, 16384, 3, 8, 16384, // 3, 8
+ 3, 9, 16384, 3, 9, 16384, 3, 9, 16384, 3, 9, 16384, // 3, 9
+ 3, 10, 16384, 3, 10, 16384, 3, 10, 16384, 3, 10, 16384, // 3,10
+ 3, 11, 16384, 3, 11, 16384, 3, 11, 16384, 3, 11, 16384, // 3,11
+ 3, 12, 16384, 3, 12, 16384, 3, 12, 16384, 3, 12, 16384, // 3,12
+ 3, 13, 16384, 3, 13, 16384, 3, 13, 16384, 3, 13, 16384, // 3,13
+ 3, 14, 16384, 3, 14, 16384, 3, 14, 16384, 3, 14, 16384, // 3,14
+ 3, 15, 16384, 3, 15, 16384, 3, 15, 16384, 3, 15, 16384, // 3,15
+ 4, 0, 16384, 4, 0, 16384, 4, 0, 16384, 4, 0, 16384, // 4, 0
+ 4, 1, 16384, 4, 1, 16384, 4, 1, 16384, 4, 1, 16384, // 4, 1
+ 4, 2, 16384, 4, 2, 16384, 4, 2, 16384, 4, 2, 16384, // 4, 2
+ 4, 3, 16384, 4, 3, 16384, 4, 3, 16384, 4, 3, 16384, // 4, 3
+ 4, 4, 16384, 4, 4, 16384, 4, 4, 16384, 4, 4, 16384, // 4, 4
+ 4, 5, 16384, 4, 5, 16384, 4, 5, 16384, 4, 5, 16384, // 4, 5
+ 4, 6, 16384, 4, 6, 16384, 4, 6, 16384, 4, 6, 16384, // 4, 6
+ 4, 7, 16384, 4, 7, 16384, 4, 7, 16384, 4, 7, 16384, // 4, 7
+ 4, 8, 16384, 4, 8, 16384, 4, 8, 16384, 4, 8, 16384, // 4, 8
+ 4, 9, 16384, 4, 9, 16384, 4, 9, 16384, 4, 9, 16384, // 4, 9
+ 4, 10, 16384, 4, 10, 16384, 4, 10, 16384, 4, 10, 16384, // 4,10
+ 4, 11, 16384, 4, 11, 16384, 4, 11, 16384, 4, 11, 16384, // 4,11
+ 4, 12, 16384, 4, 12, 16384, 4, 12, 16384, 4, 12, 16384, // 4,12
+ 4, 13, 16384, 4, 13, 16384, 4, 13, 16384, 4, 13, 16384, // 4,13
+ 4, 14, 16384, 4, 14, 16384, 4, 14, 16384, 4, 14, 16384, // 4,14
+ 4, 15, 16384, 4, 15, 16384, 4, 15, 16384, 4, 15, 16384, // 4,15
+ 5, 0, 16384, 5, 0, 16384, 5, 0, 16384, 5, 0, 16384, // 5, 0
+ 5, 1, 16384, 5, 1, 16384, 5, 1, 16384, 5, 1, 16384, // 5, 1
+ 5, 2, 16384, 5, 2, 16384, 5, 2, 16384, 5, 2, 16384, // 5, 2
+ 5, 3, 16384, 5, 3, 16384, 5, 3, 16384, 5, 3, 16384, // 5, 3
+ 5, 4, 16384, 5, 4, 16384, 5, 4, 16384, 5, 4, 16384, // 5, 4
+ 5, 5, 16384, 5, 5, 16384, 5, 5, 16384, 5, 5, 16384, // 5, 5
+ 5, 6, 16384, 5, 6, 16384, 5, 6, 16384, 5, 6, 16384, // 5, 6
+ 5, 7, 16384, 5, 7, 16384, 5, 7, 16384, 5, 7, 16384, // 5, 7
+ 5, 8, 16384, 5, 8, 16384, 5, 8, 16384, 5, 8, 16384, // 5, 8
+ 5, 9, 16384, 5, 9, 16384, 5, 9, 16384, 5, 9, 16384, // 5, 9
+ 5, 10, 16384, 5, 10, 16384, 5, 10, 16384, 5, 10, 16384, // 5,10
+ 5, 11, 16384, 5, 11, 16384, 5, 11, 16384, 5, 11, 16384, // 5,11
+ 5, 12, 16384, 5, 12, 16384, 5, 12, 16384, 5, 12, 16384, // 5,12
+ 5, 13, 16384, 5, 13, 16384, 5, 13, 16384, 5, 13, 16384, // 5,13
+ 5, 14, 16384, 5, 14, 16384, 5, 14, 16384, 5, 14, 16384, // 5,14
+ 5, 15, 16384, 5, 15, 16384, 5, 15, 16384, 5, 15, 16384, // 5,15
+ 6, 0, 16384, 6, 0, 16384, 6, 0, 16384, 6, 0, 16384, // 6, 0
+ 6, 1, 16384, 6, 1, 16384, 6, 1, 16384, 6, 1, 16384, // 6, 1
+ 6, 2, 16384, 6, 2, 16384, 6, 2, 16384, 6, 2, 16384, // 6, 2
+ 6, 3, 16384, 6, 3, 16384, 6, 3, 16384, 6, 3, 16384, // 6, 3
+ 6, 4, 16384, 6, 4, 16384, 6, 4, 16384, 6, 4, 16384, // 6, 4
+ 6, 5, 16384, 6, 5, 16384, 6, 5, 16384, 6, 5, 16384, // 6, 5
+ 6, 6, 16384, 6, 6, 16384, 6, 6, 16384, 6, 6, 16384, // 6, 6
+ 6, 7, 16384, 6, 7, 16384, 6, 7, 16384, 6, 7, 16384, // 6, 7
+ 6, 8, 16384, 6, 8, 16384, 6, 8, 16384, 6, 8, 16384, // 6, 8
+ 6, 9, 16384, 6, 9, 16384, 6, 9, 16384, 6, 9, 16384, // 6, 9
+ 6, 10, 16384, 6, 10, 16384, 6, 10, 16384, 6, 10, 16384, // 6,10
+ 6, 11, 16384, 6, 11, 16384, 6, 11, 16384, 6, 11, 16384, // 6,11
+ 6, 12, 16384, 6, 12, 16384, 6, 12, 16384, 6, 12, 16384, // 6,12
+ 6, 13, 16384, 6, 13, 16384, 6, 13, 16384, 6, 13, 16384, // 6,13
+ 6, 14, 16384, 6, 14, 16384, 6, 14, 16384, 6, 14, 16384, // 6,14
+ 6, 15, 16384, 6, 15, 16384, 6, 15, 16384, 6, 15, 16384, // 6,15
+ 7, 0, 16384, 7, 0, 16384, 7, 0, 16384, 7, 0, 16384, // 7, 0
+ 7, 1, 16384, 7, 1, 16384, 7, 1, 16384, 7, 1, 16384, // 7, 1
+ 7, 2, 16384, 7, 2, 16384, 7, 2, 16384, 7, 2, 16384, // 7, 2
+ 7, 3, 16384, 7, 3, 16384, 7, 3, 16384, 7, 3, 16384, // 7, 3
+ 7, 4, 16384, 7, 4, 16384, 7, 4, 16384, 7, 4, 16384, // 7, 4
+ 7, 5, 16384, 7, 5, 16384, 7, 5, 16384, 7, 5, 16384, // 7, 5
+ 7, 6, 16384, 7, 6, 16384, 7, 6, 16384, 7, 6, 16384, // 7, 6
+ 7, 7, 16384, 7, 7, 16384, 7, 7, 16384, 7, 7, 16384, // 7, 7
+ 7, 8, 16384, 7, 8, 16384, 7, 8, 16384, 7, 8, 16384, // 7, 8
+ 7, 9, 16384, 7, 9, 16384, 7, 9, 16384, 7, 9, 16384, // 7, 9
+ 7, 10, 16384, 7, 10, 16384, 7, 10, 16384, 7, 10, 16384, // 7,10
+ 7, 11, 16384, 7, 11, 16384, 7, 11, 16384, 7, 11, 16384, // 7,11
+ 7, 12, 16384, 7, 12, 16384, 7, 12, 16384, 7, 12, 16384, // 7,12
+ 7, 13, 16384, 7, 13, 16384, 7, 13, 16384, 7, 13, 16384, // 7,13
+ 7, 14, 16384, 7, 14, 16384, 7, 14, 16384, 7, 14, 16384, // 7,14
+ 7, 15, 16384, 7, 15, 16384, 7, 15, 16384, 7, 15, 16384, // 7,15
+ 8, 0, 16384, 8, 0, 16384, 8, 0, 16384, 8, 0, 16384, // 8, 0
+ 8, 1, 16384, 8, 1, 16384, 8, 1, 16384, 8, 1, 16384, // 8, 1
+ 8, 2, 16384, 8, 2, 16384, 8, 2, 16384, 8, 2, 16384, // 8, 2
+ 8, 3, 16384, 8, 3, 16384, 8, 3, 16384, 8, 3, 16384, // 8, 3
+ 8, 4, 16384, 8, 4, 16384, 8, 4, 16384, 8, 4, 16384, // 8, 4
+ 8, 5, 16384, 8, 5, 16384, 8, 5, 16384, 8, 5, 16384, // 8, 5
+ 8, 6, 16384, 8, 6, 16384, 8, 6, 16384, 8, 6, 16384, // 8, 6
+ 8, 7, 16384, 8, 7, 16384, 8, 7, 16384, 8, 7, 16384, // 8, 7
+ 8, 8, 16384, 8, 8, 16384, 8, 8, 16384, 8, 8, 16384, // 8, 8
+ 8, 9, 16384, 8, 9, 16384, 8, 9, 16384, 8, 9, 16384, // 8, 9
+ 8, 10, 16384, 8, 10, 16384, 8, 10, 16384, 8, 10, 16384, // 8,10
+ 8, 11, 16384, 8, 11, 16384, 8, 11, 16384, 8, 11, 16384, // 8,11
+ 8, 12, 16384, 8, 12, 16384, 8, 12, 16384, 8, 12, 16384, // 8,12
+ 8, 13, 16384, 8, 13, 16384, 8, 13, 16384, 8, 13, 16384, // 8,13
+ 8, 14, 16384, 8, 14, 16384, 8, 14, 16384, 8, 14, 16384, // 8,14
+ 8, 15, 16384, 8, 15, 16384, 8, 15, 16384, 8, 15, 16384, // 8,15
+ 9, 0, 16384, 9, 0, 16384, 9, 0, 16384, 9, 0, 16384, // 9, 0
+ 9, 1, 16384, 9, 1, 16384, 9, 1, 16384, 9, 1, 16384, // 9, 1
+ 9, 2, 16384, 9, 2, 16384, 9, 2, 16384, 9, 2, 16384, // 9, 2
+ 9, 3, 16384, 9, 3, 16384, 9, 3, 16384, 9, 3, 16384, // 9, 3
+ 9, 4, 16384, 9, 4, 16384, 9, 4, 16384, 9, 4, 16384, // 9, 4
+ 9, 5, 16384, 9, 5, 16384, 9, 5, 16384, 9, 5, 16384, // 9, 5
+ 9, 6, 16384, 9, 6, 16384, 9, 6, 16384, 9, 6, 16384, // 9, 6
+ 9, 7, 16384, 9, 7, 16384, 9, 7, 16384, 9, 7, 16384, // 9, 7
+ 9, 8, 16384, 9, 8, 16384, 9, 8, 16384, 9, 8, 16384, // 9, 8
+ 9, 9, 16384, 9, 9, 16384, 9, 9, 16384, 9, 9, 16384, // 9, 9
+ 9, 10, 16384, 9, 10, 16384, 9, 10, 16384, 9, 10, 16384, // 9,10
+ 9, 11, 16384, 9, 11, 16384, 9, 11, 16384, 9, 11, 16384, // 9,11
+ 9, 12, 16384, 9, 12, 16384, 9, 12, 16384, 9, 12, 16384, // 9,12
+ 9, 13, 16384, 9, 13, 16384, 9, 13, 16384, 9, 13, 16384, // 9,13
+ 9, 14, 16384, 9, 14, 16384, 9, 14, 16384, 9, 14, 16384, // 9,14
+ 9, 15, 16384, 9, 15, 16384, 9, 15, 16384, 9, 15, 16384, // 9,15
+ 10, 0, 16384, 10, 0, 16384, 10, 0, 16384, 10, 0, 16384, // 10, 0
+ 10, 1, 16384, 10, 1, 16384, 10, 1, 16384, 10, 1, 16384, // 10, 1
+ 10, 2, 16384, 10, 2, 16384, 10, 2, 16384, 10, 2, 16384, // 10, 2
+ 10, 3, 16384, 10, 3, 16384, 10, 3, 16384, 10, 3, 16384, // 10, 3
+ 10, 4, 16384, 10, 4, 16384, 10, 4, 16384, 10, 4, 16384, // 10, 4
+ 10, 5, 16384, 10, 5, 16384, 10, 5, 16384, 10, 5, 16384, // 10, 5
+ 10, 6, 16384, 10, 6, 16384, 10, 6, 16384, 10, 6, 16384, // 10, 6
+ 10, 7, 16384, 10, 7, 16384, 10, 7, 16384, 10, 7, 16384, // 10, 7
+ 10, 8, 16384, 10, 8, 16384, 10, 8, 16384, 10, 8, 16384, // 10, 8
+ 10, 9, 16384, 10, 9, 16384, 10, 9, 16384, 10, 9, 16384, // 10, 9
+ 10, 10, 16384, 10, 10, 16384, 10, 10, 16384, 10, 10, 16384, // 10,10
+ 10, 11, 16384, 10, 11, 16384, 10, 11, 16384, 10, 11, 16384, // 10,11
+ 10, 12, 16384, 10, 12, 16384, 10, 12, 16384, 10, 12, 16384, // 10,12
+ 10, 13, 16384, 10, 13, 16384, 10, 13, 16384, 10, 13, 16384, // 10,13
+ 10, 14, 16384, 10, 14, 16384, 10, 14, 16384, 10, 14, 16384, // 10,14
+ 10, 15, 16384, 10, 15, 16384, 10, 15, 16384, 10, 15, 16384, // 10,15
+ 11, 0, 16384, 11, 0, 16384, 11, 0, 16384, 11, 0, 16384, // 11, 0
+ 11, 1, 16384, 11, 1, 16384, 11, 1, 16384, 11, 1, 16384, // 11, 1
+ 11, 2, 16384, 11, 2, 16384, 11, 2, 16384, 11, 2, 16384, // 11, 2
+ 11, 3, 16384, 11, 3, 16384, 11, 3, 16384, 11, 3, 16384, // 11, 3
+ 11, 4, 16384, 11, 4, 16384, 11, 4, 16384, 11, 4, 16384, // 11, 4
+ 11, 5, 16384, 11, 5, 16384, 11, 5, 16384, 11, 5, 16384, // 11, 5
+ 11, 6, 16384, 11, 6, 16384, 11, 6, 16384, 11, 6, 16384, // 11, 6
+ 11, 7, 16384, 11, 7, 16384, 11, 7, 16384, 11, 7, 16384, // 11, 7
+ 11, 8, 16384, 11, 8, 16384, 11, 8, 16384, 11, 8, 16384, // 11, 8
+ 11, 9, 16384, 11, 9, 16384, 11, 9, 16384, 11, 9, 16384, // 11, 9
+ 11, 10, 16384, 11, 10, 16384, 11, 10, 16384, 11, 10, 16384, // 11,10
+ 11, 11, 16384, 11, 11, 16384, 11, 11, 16384, 11, 11, 16384, // 11,11
+ 11, 12, 16384, 11, 12, 16384, 11, 12, 16384, 11, 12, 16384, // 11,12
+ 11, 13, 16384, 11, 13, 16384, 11, 13, 16384, 11, 13, 16384, // 11,13
+ 11, 14, 16384, 11, 14, 16384, 11, 14, 16384, 11, 14, 16384, // 11,14
+ 11, 15, 16384, 11, 15, 16384, 11, 15, 16384, 11, 15, 16384, // 11,15
+ 12, 0, 16384, 12, 0, 16384, 12, 0, 16384, 12, 0, 16384, // 12, 0
+ 12, 1, 16384, 12, 1, 16384, 12, 1, 16384, 12, 1, 16384, // 12, 1
+ 12, 2, 16384, 12, 2, 16384, 12, 2, 16384, 12, 2, 16384, // 12, 2
+ 12, 3, 16384, 12, 3, 16384, 12, 3, 16384, 12, 3, 16384, // 12, 3
+ 12, 4, 16384, 12, 4, 16384, 12, 4, 16384, 12, 4, 16384, // 12, 4
+ 12, 5, 16384, 12, 5, 16384, 12, 5, 16384, 12, 5, 16384, // 12, 5
+ 12, 6, 16384, 12, 6, 16384, 12, 6, 16384, 12, 6, 16384, // 12, 6
+ 12, 7, 16384, 12, 7, 16384, 12, 7, 16384, 12, 7, 16384, // 12, 7
+ 12, 8, 16384, 12, 8, 16384, 12, 8, 16384, 12, 8, 16384, // 12, 8
+ 12, 9, 16384, 12, 9, 16384, 12, 9, 16384, 12, 9, 16384, // 12, 9
+ 12, 10, 16384, 12, 10, 16384, 12, 10, 16384, 12, 10, 16384, // 12,10
+ 12, 11, 16384, 12, 11, 16384, 12, 11, 16384, 12, 11, 16384, // 12,11
+ 12, 12, 16384, 12, 12, 16384, 12, 12, 16384, 12, 12, 16384, // 12,12
+ 12, 13, 16384, 12, 13, 16384, 12, 13, 16384, 12, 13, 16384, // 12,13
+ 12, 14, 16384, 12, 14, 16384, 12, 14, 16384, 12, 14, 16384, // 12,14
+ 12, 15, 16384, 12, 15, 16384, 12, 15, 16384, 12, 15, 16384, // 12,15
+ 13, 0, 16384, 13, 0, 16384, 13, 0, 16384, 13, 0, 16384, // 13, 0
+ 13, 1, 16384, 13, 1, 16384, 13, 1, 16384, 13, 1, 16384, // 13, 1
+ 13, 2, 16384, 13, 2, 16384, 13, 2, 16384, 13, 2, 16384, // 13, 2
+ 13, 3, 16384, 13, 3, 16384, 13, 3, 16384, 13, 3, 16384, // 13, 3
+ 13, 4, 16384, 13, 4, 16384, 13, 4, 16384, 13, 4, 16384, // 13, 4
+ 13, 5, 16384, 13, 5, 16384, 13, 5, 16384, 13, 5, 16384, // 13, 5
+ 13, 6, 16384, 13, 6, 16384, 13, 6, 16384, 13, 6, 16384, // 13, 6
+ 13, 7, 16384, 13, 7, 16384, 13, 7, 16384, 13, 7, 16384, // 13, 7
+ 13, 8, 16384, 13, 8, 16384, 13, 8, 16384, 13, 8, 16384, // 13, 8
+ 13, 9, 16384, 13, 9, 16384, 13, 9, 16384, 13, 9, 16384, // 13, 9
+ 13, 10, 16384, 13, 10, 16384, 13, 10, 16384, 13, 10, 16384, // 13,10
+ 13, 11, 16384, 13, 11, 16384, 13, 11, 16384, 13, 11, 16384, // 13,11
+ 13, 12, 16384, 13, 12, 16384, 13, 12, 16384, 13, 12, 16384, // 13,12
+ 13, 13, 16384, 13, 13, 16384, 13, 13, 16384, 13, 13, 16384, // 13,13
+ 13, 14, 16384, 13, 14, 16384, 13, 14, 16384, 13, 14, 16384, // 13,14
+ 13, 15, 16384, 13, 15, 16384, 13, 15, 16384, 13, 15, 16384, // 13,15
+ 14, 0, 16384, 14, 0, 16384, 14, 0, 16384, 14, 0, 16384, // 14, 0
+ 14, 1, 16384, 14, 1, 16384, 14, 1, 16384, 14, 1, 16384, // 14, 1
+ 14, 2, 16384, 14, 2, 16384, 14, 2, 16384, 14, 2, 16384, // 14, 2
+ 14, 3, 16384, 14, 3, 16384, 14, 3, 16384, 14, 3, 16384, // 14, 3
+ 14, 4, 16384, 14, 4, 16384, 14, 4, 16384, 14, 4, 16384, // 14, 4
+ 14, 5, 16384, 14, 5, 16384, 14, 5, 16384, 14, 5, 16384, // 14, 5
+ 14, 6, 16384, 14, 6, 16384, 14, 6, 16384, 14, 6, 16384, // 14, 6
+ 14, 7, 16384, 14, 7, 16384, 14, 7, 16384, 14, 7, 16384, // 14, 7
+ 14, 8, 16384, 14, 8, 16384, 14, 8, 16384, 14, 8, 16384, // 14, 8
+ 14, 9, 16384, 14, 9, 16384, 14, 9, 16384, 14, 9, 16384, // 14, 9
+ 14, 10, 16384, 14, 10, 16384, 14, 10, 16384, 14, 10, 16384, // 14,10
+ 14, 11, 16384, 14, 11, 16384, 14, 11, 16384, 14, 11, 16384, // 14,11
+ 14, 12, 16384, 14, 12, 16384, 14, 12, 16384, 14, 12, 16384, // 14,12
+ 14, 13, 16384, 14, 13, 16384, 14, 13, 16384, 14, 13, 16384, // 14,13
+ 14, 14, 16384, 14, 14, 16384, 14, 14, 16384, 14, 14, 16384, // 14,14
+ 14, 15, 16384, 14, 15, 16384, 14, 15, 16384, 14, 15, 16384, // 14,15
+ 15, 0, 16384, 15, 0, 16384, 15, 0, 16384, 15, 0, 16384, // 15, 0
+ 15, 1, 16384, 15, 1, 16384, 15, 1, 16384, 15, 1, 16384, // 15, 1
+ 15, 2, 16384, 15, 2, 16384, 15, 2, 16384, 15, 2, 16384, // 15, 2
+ 15, 3, 16384, 15, 3, 16384, 15, 3, 16384, 15, 3, 16384, // 15, 3
+ 15, 4, 16384, 15, 4, 16384, 15, 4, 16384, 15, 4, 16384, // 15, 4
+ 15, 5, 16384, 15, 5, 16384, 15, 5, 16384, 15, 5, 16384, // 15, 5
+ 15, 6, 16384, 15, 6, 16384, 15, 6, 16384, 15, 6, 16384, // 15, 6
+ 15, 7, 16384, 15, 7, 16384, 15, 7, 16384, 15, 7, 16384, // 15, 7
+ 15, 8, 16384, 15, 8, 16384, 15, 8, 16384, 15, 8, 16384, // 15, 8
+ 15, 9, 16384, 15, 9, 16384, 15, 9, 16384, 15, 9, 16384, // 15, 9
+ 15, 10, 16384, 15, 10, 16384, 15, 10, 16384, 15, 10, 16384, // 15,10
+ 15, 11, 16384, 15, 11, 16384, 15, 11, 16384, 15, 11, 16384, // 15,11
+ 15, 12, 16384, 15, 12, 16384, 15, 12, 16384, 15, 12, 16384, // 15,12
+ 15, 13, 16384, 15, 13, 16384, 15, 13, 16384, 15, 13, 16384, // 15,13
+ 15, 14, 16384, 15, 14, 16384, 15, 14, 16384, 15, 14, 16384, // 15,14
+ 15, 15, 16384, 15, 15, 16384, 15, 15, 16384, 15, 15, 16384, // 15,15
+ // angle of 0.5 degrees
+ 0, -1, 5106, 0, 0, 51699, 1, -1, 3621, 1, 0, 5110, // 0, 0
+ 0, 0, 4851, 0, 1, 52457, 1, 0, 3422, 1, 1, 4806, // 0, 1
+ 0, 1, 4610, 0, 2, 53168, 1, 1, 3235, 1, 2, 4523, // 0, 2
+ 0, 2, 4390, 0, 3, 53814, 1, 2, 3065, 1, 3, 4267, // 0, 3
+ 0, 3, 4200, 0, 4, 54376, 1, 3, 2917, 1, 4, 4043, // 0, 4
+ 0, 4, 4046, 0, 5, 54833, 1, 4, 2797, 1, 5, 3860, // 0, 5
+ 0, 5, 3939, 0, 6, 55164, 1, 5, 2709, 1, 6, 3724, // 0, 6
+ 0, 6, 3885, 0, 7, 55352, 1, 6, 2659, 1, 7, 3640, // 0, 7
+ -1, 7, 2659, -1, 8, 3638, 0, 7, 3885, 0, 8, 55354, // 0, 8
+ -1, 8, 2709, -1, 9, 3722, 0, 8, 3940, 0, 9, 55165, // 0, 9
+ -1, 9, 2796, -1, 10, 3858, 0, 9, 4047, 0, 10, 54835, // 0,10
+ -1, 10, 2916, -1, 11, 4041, 0, 10, 4201, 0, 11, 54378, // 0,11
+ -1, 11, 3064, -1, 12, 4264, 0, 11, 4392, 0, 12, 53816, // 0,12
+ -1, 12, 3235, -1, 13, 4521, 0, 12, 4612, 0, 13, 53168, // 0,13
+ -1, 13, 3421, -1, 14, 4803, 0, 13, 4854, 0, 14, 52458, // 0,14
+ -1, 14, 3621, -1, 15, 5106, 0, 14, 5110, 0, 15, 51699, // 0,15
+ 1, -1, 4803, 1, 0, 52457, 2, -1, 3421, 2, 0, 4855, // 1, 0
+ 1, 0, 4522, 1, 1, 53285, 2, 0, 3204, 2, 1, 4525, // 1, 1
+ 1, 1, 4253, 1, 2, 54071, 2, 1, 2998, 2, 2, 4214, // 1, 2
+ 1, 2, 4003, 1, 3, 54796, 2, 2, 2808, 2, 3, 3929, // 1, 3
+ 1, 3, 3783, 1, 4, 55434, 2, 3, 2640, 2, 4, 3679, // 1, 4
+ 1, 4, 3604, 1, 5, 55958, 2, 4, 2503, 2, 5, 3471, // 1, 5
+ 1, 5, 3476, 1, 6, 56339, 2, 5, 2403, 2, 6, 3318, // 1, 6
+ 1, 6, 3411, 1, 7, 56552, 2, 6, 2346, 2, 7, 3227, // 1, 7
+ 0, 7, 2346, 0, 8, 3225, 1, 7, 3411, 1, 8, 56554, // 1, 8
+ 0, 8, 2402, 0, 9, 3317, 1, 8, 3477, 1, 9, 56340, // 1, 9
+ 0, 9, 2502, 0, 10, 3470, 1, 9, 3605, 1, 10, 55959, // 1,10
+ 0, 10, 2640, 0, 11, 3677, 1, 10, 3785, 1, 11, 55434, // 1,11
+ 0, 11, 2808, 0, 12, 3927, 1, 11, 4005, 1, 12, 54796, // 1,12
+ 0, 12, 2998, 0, 13, 4212, 1, 12, 4255, 1, 13, 54071, // 1,13
+ 0, 13, 3204, 0, 14, 4522, 1, 13, 4525, 1, 14, 53285, // 1,14
+ 0, 14, 3422, 0, 15, 4851, 1, 14, 4806, 1, 15, 52457, // 1,15
+ 2, -1, 4521, 2, 0, 53168, 3, -1, 3235, 3, 0, 4612, // 2, 0
+ 2, 0, 4212, 2, 1, 54072, 3, 0, 2998, 3, 1, 4254, // 2, 1
+ 2, 1, 3911, 2, 2, 54941, 3, 1, 2770, 3, 2, 3914, // 2, 2
+ 2, 2, 3628, 2, 3, 55756, 3, 2, 2557, 3, 3, 3595, // 2, 3
+ 2, 3, 3373, 2, 4, 56486, 3, 3, 2365, 3, 4, 3312, // 2, 4
+ 2, 4, 3161, 2, 5, 57095, 3, 4, 2205, 3, 5, 3075, // 2, 5
+ 2, 5, 3007, 2, 6, 57544, 3, 5, 2088, 3, 6, 2897, // 2, 6
+ 2, 6, 2926, 2, 7, 57793, 3, 6, 2022, 3, 7, 2795, // 2, 7
+ 1, 7, 2022, 1, 8, 2794, 2, 7, 2926, 2, 8, 57794, // 2, 8
+ 1, 8, 2088, 1, 9, 2897, 2, 8, 3007, 2, 9, 57544, // 2, 9
+ 1, 9, 2205, 1, 10, 3073, 2, 9, 3161, 2, 10, 57097, // 2,10
+ 1, 10, 2365, 1, 11, 3310, 2, 10, 3374, 2, 11, 56487, // 2,11
+ 1, 11, 2556, 1, 12, 3594, 2, 11, 3630, 2, 12, 55756, // 2,12
+ 1, 12, 2770, 1, 13, 3911, 2, 12, 3913, 2, 13, 54942, // 2,13
+ 1, 13, 2998, 1, 14, 4253, 2, 13, 4214, 2, 14, 54071, // 2,14
+ 1, 14, 3235, 1, 15, 4610, 2, 14, 4523, 2, 15, 53168, // 2,15
+ 3, -1, 4264, 3, 0, 53815, 4, -1, 3064, 4, 0, 4393, // 3, 0
+ 3, 0, 3927, 3, 1, 54796, 4, 0, 2808, 4, 1, 4005, // 3, 1
+ 3, 1, 3594, 3, 2, 55756, 4, 1, 2556, 4, 2, 3630, // 3, 2
+ 3, 2, 3273, 3, 3, 56673, 4, 2, 2317, 4, 3, 3273, // 3, 3
+ 3, 3, 2976, 3, 4, 57514, 4, 3, 2096, 4, 4, 2950, // 3, 4
+ 3, 4, 2722, 3, 5, 58233, 4, 4, 1908, 4, 5, 2673, // 3, 5
+ 3, 5, 2532, 3, 6, 58774, 4, 5, 1767, 4, 6, 2463, // 3, 6
+ 3, 6, 2430, 3, 7, 59076, 4, 6, 1687, 4, 7, 2343, // 3, 7
+ 2, 7, 1687, 2, 8, 2342, 3, 7, 2430, 3, 8, 59077, // 3, 8
+ 2, 8, 1766, 2, 9, 2463, 3, 8, 2532, 3, 9, 58775, // 3, 9
+ 2, 9, 1908, 2, 10, 2672, 3, 9, 2723, 3, 10, 58233, // 3,10
+ 2, 10, 2096, 2, 11, 2948, 3, 10, 2977, 3, 11, 57515, // 3,11
+ 2, 11, 2317, 2, 12, 3273, 3, 11, 3274, 3, 12, 56672, // 3,12
+ 2, 12, 2557, 2, 13, 3628, 3, 12, 3595, 3, 13, 55756, // 3,13
+ 2, 13, 2808, 2, 14, 4003, 3, 13, 3929, 3, 14, 54796, // 3,14
+ 2, 14, 3065, 2, 15, 4390, 3, 14, 4267, 3, 15, 53814, // 3,15
+ 4, -1, 4041, 4, 0, 54378, 5, -1, 2916, 5, 0, 4201, // 4, 0
+ 4, 0, 3677, 4, 1, 55435, 5, 0, 2640, 5, 1, 3784, // 4, 1
+ 4, 1, 3310, 4, 2, 56487, 5, 1, 2365, 5, 2, 3374, // 4, 2
+ 4, 2, 2948, 4, 3, 57514, 5, 2, 2096, 5, 3, 2978, // 4, 3
+ 4, 3, 2604, 4, 4, 58484, 5, 3, 1843, 5, 4, 2605, // 4, 4
+ 4, 4, 2297, 4, 5, 59345, 5, 4, 1617, 5, 5, 2277, // 4, 5
+ 4, 5, 2057, 4, 6, 60017, 5, 5, 1442, 5, 6, 2020, // 4, 6
+ 4, 6, 1922, 4, 7, 60402, 5, 6, 1341, 5, 7, 1871, // 4, 7
+ 3, 7, 1341, 3, 8, 1871, 4, 7, 1922, 4, 8, 60402, // 4, 8
+ 3, 8, 1442, 3, 9, 2020, 4, 8, 2057, 4, 9, 60017, // 4, 9
+ 3, 9, 1617, 3, 10, 2276, 4, 9, 2297, 4, 10, 59346, // 4,10
+ 3, 10, 1843, 3, 11, 2604, 4, 10, 2605, 4, 11, 58484, // 4,11
+ 3, 11, 2096, 3, 12, 2976, 4, 11, 2950, 4, 12, 57514, // 4,12
+ 3, 12, 2365, 3, 13, 3373, 4, 12, 3311, 4, 13, 56487, // 4,13
+ 3, 13, 2640, 3, 14, 3783, 4, 13, 3678, 4, 14, 55435, // 4,14
+ 3, 14, 2917, 3, 15, 4200, 4, 14, 4043, 4, 15, 54376, // 4,15
+ 5, -1, 3858, 5, 0, 54835, 6, -1, 2796, 6, 0, 4047, // 5, 0
+ 5, 0, 3470, 5, 1, 55959, 6, 0, 2502, 6, 1, 3605, // 5, 1
+ 5, 1, 3073, 5, 2, 57096, 6, 1, 2205, 6, 2, 3162, // 5, 2
+ 5, 2, 2672, 5, 3, 58234, 6, 2, 1908, 6, 3, 2722, // 5, 3
+ 5, 3, 2276, 5, 4, 59346, 6, 3, 1617, 6, 4, 2297, // 5, 4
+ 5, 4, 1904, 5, 5, 60381, 6, 4, 1347, 6, 5, 1904, // 5, 5
+ 5, 5, 1593, 5, 6, 61243, 6, 5, 1121, 6, 6, 1579, // 5, 6
+ 5, 6, 1405, 5, 7, 61767, 6, 6, 985, 6, 7, 1379, // 5, 7
+ 4, 7, 985, 4, 8, 1380, 5, 7, 1405, 5, 8, 61766, // 5, 8
+ 4, 8, 1121, 4, 9, 1578, 5, 8, 1593, 5, 9, 61244, // 5, 9
+ 4, 9, 1347, 4, 10, 1904, 5, 9, 1904, 5, 10, 60381, // 5,10
+ 4, 10, 1617, 4, 11, 2297, 5, 10, 2276, 5, 11, 59346, // 5,11
+ 4, 11, 1908, 4, 12, 2722, 5, 11, 2673, 5, 12, 58233, // 5,12
+ 4, 12, 2205, 4, 13, 3161, 5, 12, 3074, 5, 13, 57096, // 5,13
+ 4, 13, 2503, 4, 14, 3604, 5, 13, 3472, 5, 14, 55957, // 5,14
+ 4, 14, 2797, 4, 15, 4046, 5, 14, 3860, 5, 15, 54833, // 5,15
+ 6, -1, 3722, 6, 0, 55166, 7, -1, 2709, 7, 0, 3939, // 6, 0
+ 6, 0, 3317, 6, 1, 56340, 7, 0, 2402, 7, 1, 3477, // 6, 1
+ 6, 1, 2897, 6, 2, 57545, 7, 1, 2088, 7, 2, 3006, // 6, 2
+ 6, 2, 2463, 6, 3, 58775, 7, 2, 1766, 7, 3, 2532, // 6, 3
+ 6, 3, 2020, 6, 4, 60018, 7, 3, 1442, 7, 4, 2056, // 6, 4
+ 6, 4, 1578, 6, 5, 61243, 7, 4, 1121, 7, 5, 1594, // 6, 5
+ 6, 5, 1170, 6, 6, 62369, 7, 5, 827, 7, 6, 1170, // 6, 6
+ 6, 6, 883, 6, 7, 63156, 7, 6, 622, 7, 7, 875, // 6, 7
+ 5, 7, 622, 5, 8, 875, 6, 7, 883, 6, 8, 63156, // 6, 8
+ 5, 8, 827, 5, 9, 1170, 6, 8, 1170, 6, 9, 62369, // 6, 9
+ 5, 9, 1121, 5, 10, 1593, 6, 9, 1579, 6, 10, 61243, // 6,10
+ 5, 10, 1442, 5, 11, 2057, 6, 10, 2020, 6, 11, 60017, // 6,11
+ 5, 11, 1767, 5, 12, 2532, 6, 11, 2464, 6, 12, 58773, // 6,12
+ 5, 12, 2088, 5, 13, 3007, 6, 12, 2898, 6, 13, 57543, // 6,13
+ 5, 13, 2403, 5, 14, 3476, 6, 13, 3319, 6, 14, 56338, // 6,14
+ 5, 14, 2709, 5, 15, 3939, 6, 14, 3724, 6, 15, 55164, // 6,15
+ 7, -1, 3638, 7, 0, 55354, 8, -1, 2659, 8, 0, 3885, // 7, 0
+ 7, 0, 3225, 7, 1, 56554, 8, 0, 2346, 8, 1, 3411, // 7, 1
+ 7, 1, 2794, 7, 2, 57795, 8, 1, 2022, 8, 2, 2925, // 7, 2
+ 7, 2, 2342, 7, 3, 59077, 8, 2, 1687, 8, 3, 2430, // 7, 3
+ 7, 3, 1871, 7, 4, 60402, 8, 3, 1341, 8, 4, 1922, // 7, 4
+ 7, 4, 1380, 7, 5, 61767, 8, 4, 985, 8, 5, 1404, // 7, 5
+ 7, 5, 875, 7, 6, 63156, 8, 5, 622, 8, 6, 883, // 7, 6
+ 7, 6, 399, 7, 7, 64455, 8, 6, 282, 8, 7, 400, // 7, 7
+ 6, 7, 282, 6, 8, 399, 7, 7, 399, 7, 8, 64456, // 7, 8
+ 6, 8, 622, 6, 9, 883, 7, 8, 875, 7, 9, 63156, // 7, 9
+ 6, 9, 985, 6, 10, 1405, 7, 9, 1380, 7, 10, 61766, // 7,10
+ 6, 10, 1341, 6, 11, 1922, 7, 10, 1871, 7, 11, 60402, // 7,11
+ 6, 11, 1687, 6, 12, 2430, 7, 11, 2343, 7, 12, 59076, // 7,12
+ 6, 12, 2022, 6, 13, 2926, 7, 12, 2795, 7, 13, 57793, // 7,13
+ 6, 13, 2346, 6, 14, 3411, 7, 13, 3227, 7, 14, 56552, // 7,14
+ 6, 14, 2659, 6, 15, 3885, 7, 14, 3640, 7, 15, 55352, // 7,15
+ 8, 0, 55352, 8, 1, 3640, 9, 0, 3885, 9, 1, 2659, // 8, 0
+ 8, 1, 56552, 8, 2, 3227, 9, 1, 3411, 9, 2, 2346, // 8, 1
+ 8, 2, 57793, 8, 3, 2795, 9, 2, 2926, 9, 3, 2022, // 8, 2
+ 8, 3, 59076, 8, 4, 2343, 9, 3, 2430, 9, 4, 1687, // 8, 3
+ 8, 4, 60402, 8, 5, 1871, 9, 4, 1922, 9, 5, 1341, // 8, 4
+ 8, 5, 61767, 8, 6, 1380, 9, 5, 1405, 9, 6, 984, // 8, 5
+ 8, 6, 63156, 8, 7, 875, 9, 6, 883, 9, 7, 622, // 8, 6
+ 8, 7, 64455, 8, 8, 399, 9, 7, 399, 9, 8, 283, // 8, 7
+ 7, 8, 399, 7, 9, 282, 8, 8, 64455, 8, 9, 400, // 8, 8
+ 7, 9, 883, 7, 10, 622, 8, 9, 63156, 8, 10, 875, // 8, 9
+ 7, 10, 1405, 7, 11, 985, 8, 10, 61767, 8, 11, 1379, // 8,10
+ 7, 11, 1922, 7, 12, 1341, 8, 11, 60402, 8, 12, 1871, // 8,11
+ 7, 12, 2430, 7, 13, 1687, 8, 12, 59077, 8, 13, 2342, // 8,12
+ 7, 13, 2926, 7, 14, 2022, 8, 13, 57795, 8, 14, 2793, // 8,13
+ 7, 14, 3411, 7, 15, 2346, 8, 14, 56554, 8, 15, 3225, // 8,14
+ 7, 15, 3885, 7, 16, 2659, 8, 15, 55354, 8, 16, 3638, // 8,15
+ 9, 0, 55164, 9, 1, 3724, 10, 0, 3939, 10, 1, 2709, // 9, 0
+ 9, 1, 56339, 9, 2, 3319, 10, 1, 3476, 10, 2, 2402, // 9, 1
+ 9, 2, 57544, 9, 3, 2898, 10, 2, 3007, 10, 3, 2087, // 9, 2
+ 9, 3, 58774, 9, 4, 2464, 10, 3, 2532, 10, 4, 1766, // 9, 3
+ 9, 4, 60017, 9, 5, 2020, 10, 4, 2057, 10, 5, 1442, // 9, 4
+ 9, 5, 61243, 9, 6, 1579, 10, 5, 1593, 10, 6, 1121, // 9, 5
+ 9, 6, 62369, 9, 7, 1170, 10, 6, 1170, 10, 7, 827, // 9, 6
+ 9, 7, 63156, 9, 8, 883, 10, 7, 875, 10, 8, 622, // 9, 7
+ 8, 8, 875, 8, 9, 622, 9, 8, 63156, 9, 9, 883, // 9, 8
+ 8, 9, 1170, 8, 10, 827, 9, 9, 62369, 9, 10, 1170, // 9, 9
+ 8, 10, 1593, 8, 11, 1121, 9, 10, 61243, 9, 11, 1579, // 9,10
+ 8, 11, 2057, 8, 12, 1442, 9, 11, 60018, 9, 12, 2019, // 9,11
+ 8, 12, 2532, 8, 13, 1766, 9, 12, 58775, 9, 13, 2463, // 9,12
+ 8, 13, 3007, 8, 14, 2088, 9, 13, 57545, 9, 14, 2896, // 9,13
+ 8, 14, 3477, 8, 15, 2402, 9, 14, 56340, 9, 15, 3317, // 9,14
+ 8, 15, 3940, 8, 16, 2709, 9, 15, 55166, 9, 16, 3721, // 9,15
+ 10, 0, 54833, 10, 1, 3860, 11, 0, 4046, 11, 1, 2797, // 10, 0
+ 10, 1, 55958, 10, 2, 3472, 11, 1, 3604, 11, 2, 2502, // 10, 1
+ 10, 2, 57095, 10, 3, 3074, 11, 2, 3161, 11, 3, 2206, // 10, 2
+ 10, 3, 58233, 10, 4, 2673, 11, 3, 2722, 11, 4, 1908, // 10, 3
+ 10, 4, 59345, 10, 5, 2276, 11, 4, 2297, 11, 5, 1618, // 10, 4
+ 10, 5, 60381, 10, 6, 1904, 11, 5, 1904, 11, 6, 1347, // 10, 5
+ 10, 6, 61243, 10, 7, 1593, 11, 6, 1578, 11, 7, 1122, // 10, 6
+ 10, 7, 61767, 10, 8, 1405, 11, 7, 1380, 11, 8, 984, // 10, 7
+ 9, 8, 1380, 9, 9, 985, 10, 8, 61767, 10, 9, 1404, // 10, 8
+ 9, 9, 1579, 9, 10, 1121, 10, 9, 61243, 10, 10, 1593, // 10, 9
+ 9, 10, 1904, 9, 11, 1347, 10, 10, 60381, 10, 11, 1904, // 10,10
+ 9, 11, 2297, 9, 12, 1617, 10, 11, 59346, 10, 12, 2276, // 10,11
+ 9, 12, 2723, 9, 13, 1908, 10, 12, 58234, 10, 13, 2671, // 10,12
+ 9, 13, 3161, 9, 14, 2205, 10, 13, 57096, 10, 14, 3074, // 10,13
+ 9, 14, 3605, 9, 15, 2502, 10, 14, 55959, 10, 15, 3470, // 10,14
+ 9, 15, 4047, 9, 16, 2796, 10, 15, 54835, 10, 16, 3858, // 10,15
+ 11, 0, 54376, 11, 1, 4043, 12, 0, 4200, 12, 1, 2917, // 11, 0
+ 11, 1, 55434, 11, 2, 3678, 12, 1, 3783, 12, 2, 2641, // 11, 1
+ 11, 2, 56486, 11, 3, 3311, 12, 2, 3373, 12, 3, 2366, // 11, 2
+ 11, 3, 57514, 11, 4, 2950, 12, 3, 2976, 12, 4, 2096, // 11, 3
+ 11, 4, 58484, 11, 5, 2605, 12, 4, 2604, 12, 5, 1843, // 11, 4
+ 11, 5, 59346, 11, 6, 2297, 12, 5, 2276, 12, 6, 1617, // 11, 5
+ 11, 6, 60018, 11, 7, 2057, 12, 6, 2020, 12, 7, 1441, // 11, 6
+ 11, 7, 60402, 11, 8, 1922, 12, 7, 1871, 12, 8, 1341, // 11, 7
+ 10, 8, 1871, 10, 9, 1341, 11, 8, 60402, 11, 9, 1922, // 11, 8
+ 10, 9, 2020, 10, 10, 1442, 11, 9, 60017, 11, 10, 2057, // 11, 9
+ 10, 10, 2276, 10, 11, 1617, 11, 10, 59345, 11, 11, 2298, // 11,10
+ 10, 11, 2605, 10, 12, 1843, 11, 11, 58484, 11, 12, 2604, // 11,11
+ 10, 12, 2977, 10, 13, 2096, 11, 12, 57514, 11, 13, 2949, // 11,12
+ 10, 13, 3374, 10, 14, 2365, 11, 13, 56487, 11, 14, 3310, // 11,13
+ 10, 14, 3785, 10, 15, 2640, 11, 14, 55435, 11, 15, 3676, // 11,14
+ 10, 15, 4201, 10, 16, 2916, 11, 15, 54378, 11, 16, 4041, // 11,15
+ 12, 0, 53814, 12, 1, 4267, 13, 0, 4390, 13, 1, 3065, // 12, 0
+ 12, 1, 54796, 12, 2, 3929, 13, 1, 4003, 13, 2, 2808, // 12, 1
+ 12, 2, 55756, 12, 3, 3595, 13, 2, 3628, 13, 3, 2557, // 12, 2
+ 12, 3, 56673, 12, 4, 3274, 13, 3, 3273, 13, 4, 2316, // 12, 3
+ 12, 4, 57514, 12, 5, 2977, 13, 4, 2948, 13, 5, 2097, // 12, 4
+ 12, 5, 58234, 12, 6, 2723, 13, 5, 2672, 13, 6, 1907, // 12, 5
+ 12, 6, 58775, 12, 7, 2532, 13, 6, 2463, 13, 7, 1766, // 12, 6
+ 12, 7, 59077, 12, 8, 2430, 13, 7, 2342, 13, 8, 1687, // 12, 7
+ 11, 8, 2343, 11, 9, 1687, 12, 8, 59076, 12, 9, 2430, // 12, 8
+ 11, 9, 2464, 11, 10, 1767, 12, 9, 58774, 12, 10, 2531, // 12, 9
+ 11, 10, 2673, 11, 11, 1908, 12, 10, 58233, 12, 11, 2722, // 12,10
+ 11, 11, 2950, 11, 12, 2096, 12, 11, 57514, 12, 12, 2976, // 12,11
+ 11, 12, 3274, 11, 13, 2317, 12, 12, 56673, 12, 13, 3272, // 12,12
+ 11, 13, 3630, 11, 14, 2556, 12, 13, 55756, 12, 14, 3594, // 12,13
+ 11, 14, 4005, 11, 15, 2808, 12, 14, 54796, 12, 15, 3927, // 12,14
+ 11, 15, 4392, 11, 16, 3064, 12, 15, 53815, 12, 16, 4265, // 12,15
+ 13, 0, 53168, 13, 1, 4523, 14, 0, 4610, 14, 1, 3235, // 13, 0
+ 13, 1, 54071, 13, 2, 4214, 14, 1, 4253, 14, 2, 2998, // 13, 1
+ 13, 2, 54941, 13, 3, 3913, 14, 2, 3911, 14, 3, 2771, // 13, 2
+ 13, 3, 55756, 13, 4, 3630, 14, 3, 3594, 14, 4, 2556, // 13, 3
+ 13, 4, 56487, 13, 5, 3374, 14, 4, 3310, 14, 5, 2365, // 13, 4
+ 13, 5, 57096, 13, 6, 3161, 14, 5, 3073, 14, 6, 2206, // 13, 5
+ 13, 6, 57545, 13, 7, 3007, 14, 6, 2897, 14, 7, 2087, // 13, 6
+ 13, 7, 57795, 13, 8, 2926, 14, 7, 2794, 14, 8, 2021, // 13, 7
+ 12, 8, 2795, 12, 9, 2022, 13, 8, 57793, 13, 9, 2926, // 13, 8
+ 12, 9, 2898, 12, 10, 2088, 13, 9, 57544, 13, 10, 3006, // 13, 9
+ 12, 10, 3074, 12, 11, 2205, 13, 10, 57095, 13, 11, 3162, // 13,10
+ 12, 11, 3311, 12, 12, 2365, 13, 11, 56486, 13, 12, 3374, // 13,11
+ 12, 12, 3595, 12, 13, 2557, 13, 12, 55756, 13, 13, 3628, // 13,12
+ 12, 13, 3913, 12, 14, 2770, 13, 13, 54941, 13, 14, 3912, // 13,13
+ 12, 14, 4255, 12, 15, 2998, 13, 14, 54072, 13, 15, 4211, // 13,14
+ 12, 15, 4612, 12, 16, 3235, 13, 15, 53168, 13, 16, 4521, // 13,15
+ 14, 0, 52457, 14, 1, 4806, 15, 0, 4851, 15, 1, 3422, // 14, 0
+ 14, 1, 53285, 14, 2, 4525, 15, 1, 4522, 15, 2, 3204, // 14, 1
+ 14, 2, 54072, 14, 3, 4255, 15, 2, 4212, 15, 3, 2997, // 14, 2
+ 14, 3, 54796, 14, 4, 4005, 15, 3, 3927, 15, 4, 2808, // 14, 3
+ 14, 4, 55435, 14, 5, 3785, 15, 4, 3677, 15, 5, 2639, // 14, 4
+ 14, 5, 55959, 14, 6, 3605, 15, 5, 3470, 15, 6, 2502, // 14, 5
+ 14, 6, 56340, 14, 7, 3477, 15, 6, 3317, 15, 7, 2402, // 14, 6
+ 14, 7, 56554, 14, 8, 3411, 15, 7, 3225, 15, 8, 2346, // 14, 7
+ 13, 8, 3227, 13, 9, 2346, 14, 8, 56552, 14, 9, 3411, // 14, 8
+ 13, 9, 3319, 13, 10, 2403, 14, 9, 56339, 14, 10, 3475, // 14, 9
+ 13, 10, 3472, 13, 11, 2503, 14, 10, 55958, 14, 11, 3603, // 14,10
+ 13, 11, 3678, 13, 12, 2640, 14, 11, 55434, 14, 12, 3784, // 14,11
+ 13, 12, 3929, 13, 13, 2808, 14, 12, 54796, 14, 13, 4003, // 14,12
+ 13, 13, 4214, 13, 14, 2998, 14, 13, 54071, 14, 14, 4253, // 14,13
+ 13, 14, 4525, 13, 15, 3204, 14, 14, 53285, 14, 15, 4522, // 14,14
+ 13, 15, 4854, 13, 16, 3421, 14, 15, 52457, 14, 16, 4804, // 14,15
+ 15, 0, 51699, 15, 1, 5110, 16, 0, 5106, 16, 1, 3621, // 15, 0
+ 15, 1, 52457, 15, 2, 4854, 16, 1, 4803, 16, 2, 3422, // 15, 1
+ 15, 2, 53168, 15, 3, 4612, 16, 2, 4521, 16, 3, 3235, // 15, 2
+ 15, 3, 53815, 15, 4, 4392, 16, 3, 4264, 16, 4, 3065, // 15, 3
+ 15, 4, 54378, 15, 5, 4201, 16, 4, 4041, 16, 5, 2916, // 15, 4
+ 15, 5, 54835, 15, 6, 4047, 16, 5, 3858, 16, 6, 2796, // 15, 5
+ 15, 6, 55166, 15, 7, 3940, 16, 6, 3722, 16, 7, 2708, // 15, 6
+ 15, 7, 55354, 15, 8, 3885, 16, 7, 3638, 16, 8, 2659, // 15, 7
+ 14, 8, 3640, 14, 9, 2659, 15, 8, 55352, 15, 9, 3885, // 15, 8
+ 14, 9, 3724, 14, 10, 2709, 15, 9, 55164, 15, 10, 3939, // 15, 9
+ 14, 10, 3860, 14, 11, 2797, 15, 10, 54833, 15, 11, 4046, // 15,10
+ 14, 11, 4043, 14, 12, 2917, 15, 11, 54376, 15, 12, 4200, // 15,11
+ 14, 12, 4267, 14, 13, 3065, 15, 12, 53814, 15, 13, 4390, // 15,12
+ 14, 13, 4523, 14, 14, 3235, 15, 13, 53168, 15, 14, 4610, // 15,13
+ 14, 14, 4806, 14, 15, 3422, 15, 14, 52457, 15, 15, 4851, // 15,14
+ 14, 15, 5110, 14, 16, 3621, 15, 15, 51699, 15, 16, 5106, // 15,15
+ // angle of 1.0 degrees
+ 0, -1, 8769, 0, 0, 41693, 1, -1, 6280, 1, 0, 8794, // 0, 0
+ 0, 0, 8452, 0, 1, 42821, 1, 0, 5975, 1, 1, 8288, // 0, 1
+ 0, 1, 8141, 0, 2, 43900, 1, 1, 5684, 1, 2, 7811, // 0, 2
+ 0, 2, 7848, 0, 3, 44901, 1, 2, 5413, 1, 3, 7374, // 0, 3
+ 0, 3, 7587, 0, 4, 45791, 1, 3, 5172, 1, 4, 6986, // 0, 4
+ 0, 4, 7374, 0, 5, 46532, 1, 4, 4971, 1, 5, 6659, // 0, 5
+ 0, 5, 7227, 0, 6, 47086, 1, 5, 4818, 1, 6, 6405, // 0, 6
+ 0, 6, 7158, 0, 7, 47426, 1, 6, 4722, 1, 7, 6230, // 0, 7
+ -1, 7, 4718, -1, 8, 6217, 0, 7, 7161, 0, 8, 47440, // 0, 8
+ -1, 8, 4814, -1, 9, 6391, 0, 8, 7233, 0, 9, 47098, // 0, 9
+ -1, 9, 4967, -1, 10, 6644, 0, 9, 7383, 0, 10, 46542, // 0,10
+ -1, 10, 5169, -1, 11, 6970, 0, 10, 7599, 0, 11, 45798, // 0,11
+ -1, 11, 5410, -1, 12, 7356, 0, 11, 7863, 0, 12, 44907, // 0,12
+ -1, 12, 5682, -1, 13, 7791, 0, 12, 8159, 0, 13, 43904, // 0,13
+ -1, 13, 5974, -1, 14, 8265, 0, 13, 8474, 0, 14, 42823, // 0,14
+ -1, 14, 6280, -1, 15, 8769, 0, 14, 8795, 0, 15, 41692, // 0,15
+ 1, -1, 8265, 1, 0, 42823, 2, -1, 5974, 2, 0, 8474, // 1, 0
+ 1, 0, 7901, 1, 1, 44074, 2, 0, 5640, 2, 1, 7921, // 1, 1
+ 1, 1, 7539, 1, 2, 45286, 2, 1, 5316, 2, 2, 7395, // 1, 2
+ 1, 2, 7191, 1, 3, 46427, 2, 2, 5011, 2, 3, 6907, // 1, 3
+ 1, 3, 6875, 1, 4, 47453, 2, 3, 4736, 2, 4, 6472, // 1, 4
+ 1, 4, 6613, 1, 5, 48314, 2, 4, 4505, 2, 5, 6104, // 1, 5
+ 1, 5, 6425, 1, 6, 48960, 2, 5, 4330, 2, 6, 5821, // 1, 6
+ 1, 6, 6332, 1, 7, 49347, 2, 6, 4224, 2, 7, 5633, // 1, 7
+ 0, 7, 4221, 0, 8, 5623, 1, 7, 6335, 1, 8, 49357, // 1, 8
+ 0, 8, 4327, 0, 9, 5809, 1, 8, 6430, 1, 9, 48970, // 1, 9
+ 0, 9, 4502, 0, 10, 6092, 1, 9, 6620, 1, 10, 48322, // 1,10
+ 0, 10, 4734, 0, 11, 6458, 1, 10, 6886, 1, 11, 47458, // 1,11
+ 0, 11, 5009, 0, 12, 6892, 1, 11, 7204, 1, 12, 46431, // 1,12
+ 0, 12, 5315, 0, 13, 7378, 1, 12, 7555, 1, 13, 45288, // 1,13
+ 0, 13, 5640, 0, 14, 7901, 1, 13, 7921, 1, 14, 44074, // 1,14
+ 0, 14, 5975, 0, 15, 8452, 1, 14, 8288, 1, 15, 42821, // 1,15
+ 2, -1, 7791, 2, 0, 43904, 3, -1, 5682, 3, 0, 8159, // 2, 0
+ 2, 0, 7378, 2, 1, 45288, 3, 0, 5315, 3, 1, 7555, // 2, 1
+ 2, 1, 6959, 2, 2, 46650, 3, 1, 4954, 3, 2, 6973, // 2, 2
+ 2, 2, 6549, 2, 3, 47953, 3, 2, 4608, 3, 3, 6426, // 2, 3
+ 2, 3, 6168, 2, 4, 49147, 3, 3, 4291, 3, 4, 5930, // 2, 4
+ 2, 4, 5842, 2, 5, 50165, 3, 4, 4020, 3, 5, 5509, // 2, 5
+ 2, 5, 5602, 2, 6, 50935, 3, 5, 3815, 3, 6, 5184, // 2, 6
+ 2, 6, 5478, 2, 7, 51387, 3, 6, 3693, 3, 7, 4978, // 2, 7
+ 1, 7, 3691, 1, 8, 4970, 2, 7, 5480, 2, 8, 51395, // 2, 8
+ 1, 8, 3813, 1, 9, 5175, 2, 8, 5606, 2, 9, 50942, // 2, 9
+ 1, 9, 4019, 1, 10, 5499, 2, 9, 5848, 2, 10, 50170, // 2,10
+ 1, 10, 4290, 1, 11, 5920, 2, 10, 6176, 2, 11, 49150, // 2,11
+ 1, 11, 4607, 1, 12, 6414, 2, 11, 6560, 2, 12, 47955, // 2,12
+ 1, 12, 4954, 1, 13, 6959, 2, 12, 6973, 2, 13, 46650, // 2,13
+ 1, 13, 5316, 1, 14, 7539, 2, 13, 7395, 2, 14, 45286, // 2,14
+ 1, 14, 5684, 1, 15, 8141, 2, 14, 7812, 2, 15, 43899, // 2,15
+ 3, -1, 7356, 3, 0, 44907, 4, -1, 5410, 4, 0, 7863, // 3, 0
+ 3, 0, 6892, 3, 1, 46430, 4, 0, 5009, 4, 1, 7205, // 3, 1
+ 3, 1, 6414, 3, 2, 47955, 4, 1, 4607, 4, 2, 6560, // 3, 2
+ 3, 2, 5934, 3, 3, 49445, 4, 2, 4214, 4, 3, 5943, // 3, 3
+ 3, 3, 5474, 3, 4, 50843, 4, 3, 3846, 4, 4, 5373, // 3, 4
+ 3, 4, 5069, 3, 5, 52066, 4, 4, 3523, 4, 5, 4878, // 3, 5
+ 3, 5, 4759, 3, 6, 53008, 4, 5, 3274, 4, 6, 4495, // 3, 6
+ 3, 6, 4592, 3, 7, 53557, 4, 6, 3128, 4, 7, 4259, // 3, 7
+ 2, 7, 3126, 2, 8, 4254, 3, 7, 4594, 3, 8, 53562, // 3, 8
+ 2, 8, 3273, 2, 9, 4489, 3, 8, 4762, 3, 9, 53012, // 3, 9
+ 2, 9, 3522, 2, 10, 4872, 3, 9, 5073, 3, 10, 52069, // 3,10
+ 2, 10, 3845, 2, 11, 5365, 3, 10, 5481, 3, 11, 50845, // 3,11
+ 2, 11, 4214, 2, 12, 5934, 3, 11, 5943, 3, 12, 49445, // 3,12
+ 2, 12, 4608, 2, 13, 6549, 3, 12, 6426, 3, 13, 47953, // 3,13
+ 2, 13, 5011, 2, 14, 7191, 3, 13, 6908, 3, 14, 46426, // 3,14
+ 2, 14, 5413, 2, 15, 7848, 3, 14, 7374, 3, 15, 44901, // 3,15
+ 4, -1, 6970, 4, 0, 45799, 5, -1, 5169, 5, 0, 7598, // 4, 0
+ 4, 0, 6458, 4, 1, 47458, 5, 0, 4734, 5, 1, 6886, // 4, 1
+ 4, 1, 5920, 4, 2, 49150, 5, 1, 4290, 5, 2, 6176, // 4, 2
+ 4, 2, 5365, 4, 3, 50844, 5, 2, 3845, 5, 3, 5482, // 4, 3
+ 4, 3, 4816, 4, 4, 52484, 5, 3, 3415, 5, 4, 4821, // 4, 4
+ 4, 4, 4309, 4, 5, 53973, 5, 4, 3023, 5, 5, 4231, // 4, 5
+ 4, 5, 3902, 4, 6, 55164, 5, 5, 2711, 5, 6, 3759, // 4, 6
+ 4, 6, 3671, 4, 7, 55867, 5, 6, 2525, 5, 7, 3473, // 4, 7
+ 3, 7, 2524, 3, 8, 3469, 4, 7, 3672, 4, 8, 55871, // 4, 8
+ 3, 8, 2710, 3, 9, 3755, 4, 8, 3904, 4, 9, 55167, // 4, 9
+ 3, 9, 3023, 3, 10, 4226, 4, 9, 4313, 4, 10, 53974, // 4,10
+ 3, 10, 3415, 3, 11, 4816, 4, 10, 4822, 4, 11, 52483, // 4,11
+ 3, 11, 3846, 3, 12, 5474, 4, 11, 5373, 4, 12, 50843, // 4,12
+ 3, 12, 4291, 3, 13, 6168, 4, 12, 5930, 4, 13, 49147, // 4,13
+ 3, 13, 4736, 3, 14, 6875, 4, 13, 6472, 4, 14, 47453, // 4,14
+ 3, 14, 5172, 3, 15, 7587, 4, 14, 6986, 4, 15, 45791, // 4,15
+ 5, -1, 6644, 5, 0, 46541, 6, -1, 4967, 6, 0, 7384, // 5, 0
+ 5, 0, 6092, 5, 1, 48322, 6, 0, 4502, 6, 1, 6620, // 5, 1
+ 5, 1, 5499, 5, 2, 50171, 6, 1, 4019, 6, 2, 5847, // 5, 2
+ 5, 2, 4872, 5, 3, 52069, 6, 2, 3522, 6, 3, 5073, // 5, 3
+ 5, 3, 4226, 5, 4, 53975, 6, 3, 3023, 6, 4, 4312, // 5, 4
+ 5, 4, 3595, 5, 5, 55798, 6, 4, 2546, 6, 5, 3597, // 5, 5
+ 5, 5, 3050, 5, 6, 57353, 6, 5, 2138, 6, 6, 2995, // 5, 6
+ 5, 6, 2713, 5, 7, 58322, 6, 6, 1884, 6, 7, 2617, // 5, 7
+ 4, 7, 1884, 4, 8, 2615, 5, 7, 2714, 5, 8, 58323, // 5, 8
+ 4, 8, 2138, 4, 9, 2993, 5, 8, 3051, 5, 9, 57354, // 5, 9
+ 4, 9, 2546, 4, 10, 3595, 5, 9, 3598, 5, 10, 55797, // 5,10
+ 4, 10, 3023, 4, 11, 4309, 5, 10, 4230, 5, 11, 53974, // 5,11
+ 4, 11, 3523, 4, 12, 5069, 5, 11, 4879, 5, 12, 52065, // 5,12
+ 4, 12, 4020, 4, 13, 5842, 5, 12, 5508, 5, 13, 50166, // 5,13
+ 4, 13, 4505, 4, 14, 6613, 5, 13, 6104, 5, 14, 48314, // 5,14
+ 4, 14, 4971, 4, 15, 7374, 5, 14, 6659, 5, 15, 46532, // 5,15
+ 6, -1, 6391, 6, 0, 47098, 7, -1, 4814, 7, 0, 7233, // 6, 0
+ 6, 0, 5809, 6, 1, 48969, 7, 0, 4327, 7, 1, 6431, // 6, 1
+ 6, 1, 5175, 6, 2, 50942, 7, 1, 3813, 7, 2, 5606, // 6, 2
+ 6, 2, 4489, 6, 3, 53012, 7, 2, 3273, 7, 3, 4762, // 6, 3
+ 6, 3, 3755, 6, 4, 55166, 7, 3, 2710, 7, 4, 3905, // 6, 4
+ 6, 4, 2993, 6, 5, 57354, 7, 4, 2138, 7, 5, 3051, // 6, 5
+ 6, 5, 2258, 6, 6, 59422, 7, 5, 1597, 7, 6, 2259, // 6, 6
+ 6, 6, 1726, 6, 7, 60905, 7, 6, 1210, 7, 7, 1695, // 6, 7
+ 5, 7, 1209, 5, 8, 1695, 6, 7, 1726, 6, 8, 60906, // 6, 8
+ 5, 8, 1597, 5, 9, 2258, 6, 8, 2259, 6, 9, 59422, // 6, 9
+ 5, 9, 2138, 5, 10, 3050, 6, 9, 2995, 6, 10, 57353, // 6,10
+ 5, 10, 2711, 5, 11, 3902, 6, 10, 3759, 6, 11, 55164, // 6,11
+ 5, 11, 3274, 5, 12, 4759, 6, 11, 4495, 6, 12, 53008, // 6,12
+ 5, 12, 3815, 5, 13, 5602, 6, 12, 5184, 6, 13, 50935, // 6,13
+ 5, 13, 4330, 5, 14, 6425, 6, 13, 5820, 6, 14, 48961, // 6,14
+ 5, 14, 4818, 5, 15, 7227, 6, 14, 6405, 6, 15, 47086, // 6,15
+ 7, -1, 6217, 7, 0, 47440, 8, -1, 4718, 8, 0, 7161, // 7, 0
+ 7, 0, 5623, 7, 1, 49358, 8, 0, 4221, 8, 1, 6334, // 7, 1
+ 7, 1, 4970, 7, 2, 51395, 8, 1, 3691, 8, 2, 5480, // 7, 2
+ 7, 2, 4254, 7, 3, 53562, 8, 2, 3126, 8, 3, 4594, // 7, 3
+ 7, 3, 3469, 7, 4, 55870, 8, 3, 2524, 8, 4, 3673, // 7, 4
+ 7, 4, 2615, 7, 5, 58324, 8, 4, 1884, 8, 5, 2713, // 7, 5
+ 7, 5, 1695, 7, 6, 60906, 8, 5, 1209, 8, 6, 1726, // 7, 6
+ 7, 6, 789, 7, 7, 63399, 8, 6, 558, 8, 7, 790, // 7, 7
+ 6, 7, 558, 6, 8, 789, 7, 7, 789, 7, 8, 63400, // 7, 8
+ 6, 8, 1210, 6, 9, 1726, 7, 8, 1695, 7, 9, 60905, // 7, 9
+ 6, 9, 1884, 6, 10, 2713, 7, 9, 2616, 7, 10, 58323, // 7,10
+ 6, 10, 2525, 6, 11, 3671, 7, 10, 3473, 7, 11, 55867, // 7,11
+ 6, 11, 3128, 6, 12, 4592, 7, 11, 4259, 7, 12, 53557, // 7,12
+ 6, 12, 3693, 6, 13, 5478, 7, 12, 4978, 7, 13, 51387, // 7,13
+ 6, 13, 4224, 6, 14, 6332, 7, 13, 5633, 7, 14, 49347, // 7,14
+ 6, 14, 4722, 6, 15, 7158, 7, 14, 6230, 7, 15, 47426, // 7,15
+ 8, 0, 47426, 8, 1, 6230, 9, 0, 7158, 9, 1, 4722, // 8, 0
+ 8, 1, 49347, 8, 2, 5633, 9, 1, 6332, 9, 2, 4224, // 8, 1
+ 8, 2, 51387, 8, 3, 4978, 9, 2, 5478, 9, 3, 3693, // 8, 2
+ 8, 3, 53557, 8, 4, 4259, 9, 3, 4592, 9, 4, 3128, // 8, 3
+ 8, 4, 55867, 8, 5, 3473, 9, 4, 3671, 9, 5, 2525, // 8, 4
+ 8, 5, 58322, 8, 6, 2616, 9, 5, 2713, 9, 6, 1885, // 8, 5
+ 8, 6, 60905, 8, 7, 1695, 9, 6, 1726, 9, 7, 1210, // 8, 6
+ 8, 7, 63399, 8, 8, 789, 9, 7, 789, 9, 8, 559, // 8, 7
+ 7, 8, 789, 7, 9, 558, 8, 8, 63399, 8, 9, 790, // 8, 8
+ 7, 9, 1726, 7, 10, 1209, 8, 9, 60906, 8, 10, 1695, // 8, 9
+ 7, 10, 2714, 7, 11, 1884, 8, 10, 58324, 8, 11, 2614, // 8,10
+ 7, 11, 3672, 7, 12, 2524, 8, 11, 55870, 8, 12, 3470, // 8,11
+ 7, 12, 4594, 7, 13, 3126, 8, 12, 53562, 8, 13, 4254, // 8,12
+ 7, 13, 5480, 7, 14, 3691, 8, 13, 51395, 8, 14, 4970, // 8,13
+ 7, 14, 6335, 7, 15, 4221, 8, 14, 49358, 8, 15, 5622, // 8,14
+ 7, 15, 7161, 7, 16, 4718, 8, 15, 47440, 8, 16, 6217, // 8,15
+ 9, 0, 47086, 9, 1, 6405, 10, 0, 7227, 10, 1, 4818, // 9, 0
+ 9, 1, 48960, 9, 2, 5820, 10, 1, 6425, 10, 2, 4331, // 9, 1
+ 9, 2, 50935, 9, 3, 5184, 10, 2, 5602, 10, 3, 3815, // 9, 2
+ 9, 3, 53008, 9, 4, 4495, 10, 3, 4759, 10, 4, 3274, // 9, 3
+ 9, 4, 55164, 9, 5, 3759, 10, 4, 3902, 10, 5, 2711, // 9, 4
+ 9, 5, 57353, 9, 6, 2995, 10, 5, 3050, 10, 6, 2138, // 9, 5
+ 9, 6, 59422, 9, 7, 2259, 10, 6, 2258, 10, 7, 1597, // 9, 6
+ 9, 7, 60906, 9, 8, 1726, 10, 7, 1695, 10, 8, 1209, // 9, 7
+ 8, 8, 1695, 8, 9, 1210, 9, 8, 60905, 9, 9, 1726, // 9, 8
+ 8, 9, 2259, 8, 10, 1597, 9, 9, 59422, 9, 10, 2258, // 9, 9
+ 8, 10, 3051, 8, 11, 2138, 9, 10, 57354, 9, 11, 2993, // 9,10
+ 8, 11, 3904, 8, 12, 2710, 9, 11, 55166, 9, 12, 3756, // 9,11
+ 8, 12, 4762, 8, 13, 3273, 9, 12, 53012, 9, 13, 4489, // 9,12
+ 8, 13, 5606, 8, 14, 3813, 9, 13, 50942, 9, 14, 5175, // 9,13
+ 8, 14, 6430, 8, 15, 4327, 9, 14, 48969, 9, 15, 5810, // 9,14
+ 8, 15, 7233, 8, 16, 4814, 9, 15, 47098, 9, 16, 6391, // 9,15
+ 10, 0, 46532, 10, 1, 6659, 11, 0, 7374, 11, 1, 4971, // 10, 0
+ 10, 1, 48314, 10, 2, 6104, 11, 1, 6613, 11, 2, 4505, // 10, 1
+ 10, 2, 50165, 10, 3, 5508, 11, 2, 5842, 11, 3, 4021, // 10, 2
+ 10, 3, 52066, 10, 4, 4879, 11, 3, 5069, 11, 4, 3522, // 10, 3
+ 10, 4, 53973, 10, 5, 4230, 11, 4, 4309, 11, 5, 3024, // 10, 4
+ 10, 5, 55798, 10, 6, 3598, 11, 5, 3595, 11, 6, 2545, // 10, 5
+ 10, 6, 57354, 10, 7, 3051, 11, 6, 2993, 11, 7, 2138, // 10, 6
+ 10, 7, 58324, 10, 8, 2714, 11, 7, 2615, 11, 8, 1883, // 10, 7
+ 9, 8, 2616, 9, 9, 1884, 10, 8, 58322, 10, 9, 2714, // 10, 8
+ 9, 9, 2995, 9, 10, 2138, 10, 9, 57353, 10, 10, 3050, // 10, 9
+ 9, 10, 3598, 9, 11, 2546, 10, 10, 55798, 10, 11, 3594, // 10,10
+ 9, 11, 4313, 9, 12, 3023, 10, 11, 53975, 10, 12, 4225, // 10,11
+ 9, 12, 5073, 9, 13, 3522, 10, 12, 52069, 10, 13, 4872, // 10,12
+ 9, 13, 5848, 9, 14, 4019, 10, 13, 50171, 10, 14, 5498, // 10,13
+ 9, 14, 6620, 9, 15, 4502, 10, 14, 48322, 10, 15, 6092, // 10,14
+ 9, 15, 7383, 9, 16, 4967, 10, 15, 46541, 10, 16, 6645, // 10,15
+ 11, 0, 45791, 11, 1, 6986, 12, 0, 7587, 12, 1, 5172, // 11, 0
+ 11, 1, 47453, 11, 2, 6472, 12, 1, 6875, 12, 2, 4736, // 11, 1
+ 11, 2, 49147, 11, 3, 5930, 12, 2, 6168, 12, 3, 4291, // 11, 2
+ 11, 3, 50843, 11, 4, 5373, 12, 3, 5474, 12, 4, 3846, // 11, 3
+ 11, 4, 52484, 11, 5, 4822, 12, 4, 4816, 12, 5, 3414, // 11, 4
+ 11, 5, 53975, 11, 6, 4313, 12, 5, 4226, 12, 6, 3022, // 11, 5
+ 11, 6, 55166, 11, 7, 3904, 12, 6, 3755, 12, 7, 2711, // 11, 6
+ 11, 7, 55870, 11, 8, 3672, 12, 7, 3469, 12, 8, 2525, // 11, 7
+ 10, 8, 3473, 10, 9, 2525, 11, 8, 55867, 11, 9, 3671, // 11, 8
+ 10, 9, 3759, 10, 10, 2711, 11, 9, 55164, 11, 10, 3902, // 11, 9
+ 10, 10, 4230, 10, 11, 3023, 11, 10, 53973, 11, 11, 4310, // 11,10
+ 10, 11, 4822, 10, 12, 3415, 11, 11, 52484, 11, 12, 4815, // 11,11
+ 10, 12, 5481, 10, 13, 3845, 11, 12, 50844, 11, 13, 5366, // 11,12
+ 10, 13, 6176, 10, 14, 4290, 11, 13, 49150, 11, 14, 5920, // 11,13
+ 10, 14, 6886, 10, 15, 4734, 11, 14, 47458, 11, 15, 6458, // 11,14
+ 10, 15, 7599, 10, 16, 5169, 11, 15, 45799, 11, 16, 6969, // 11,15
+ 12, 0, 44901, 12, 1, 7374, 13, 0, 7848, 13, 1, 5413, // 12, 0
+ 12, 1, 46427, 12, 2, 6908, 13, 1, 7191, 13, 2, 5010, // 12, 1
+ 12, 2, 47953, 12, 3, 6426, 13, 2, 6549, 13, 3, 4608, // 12, 2
+ 12, 3, 49445, 12, 4, 5943, 13, 3, 5934, 13, 4, 4214, // 12, 3
+ 12, 4, 50844, 12, 5, 5481, 13, 4, 5365, 13, 5, 3846, // 12, 4
+ 12, 5, 52069, 12, 6, 5073, 13, 5, 4872, 13, 6, 3522, // 12, 5
+ 12, 6, 53012, 12, 7, 4762, 13, 6, 4489, 13, 7, 3273, // 12, 6
+ 12, 7, 53562, 12, 8, 4594, 13, 7, 4254, 13, 8, 3126, // 12, 7
+ 11, 8, 4259, 11, 9, 3128, 12, 8, 53557, 12, 9, 4592, // 12, 8
+ 11, 9, 4495, 11, 10, 3274, 12, 9, 53008, 12, 10, 4759, // 12, 9
+ 11, 10, 4879, 11, 11, 3523, 12, 10, 52066, 12, 11, 5068, // 12,10
+ 11, 11, 5373, 11, 12, 3846, 12, 11, 50843, 12, 12, 5474, // 12,11
+ 11, 12, 5943, 11, 13, 4214, 12, 12, 49445, 12, 13, 5934, // 12,12
+ 11, 13, 6560, 11, 14, 4607, 12, 13, 47955, 12, 14, 6414, // 12,13
+ 11, 14, 7204, 11, 15, 5009, 12, 14, 46430, 12, 15, 6893, // 12,14
+ 11, 15, 7863, 11, 16, 5410, 12, 15, 44907, 12, 16, 7356, // 12,15
+ 13, 0, 43900, 13, 1, 7812, 14, 0, 8141, 14, 1, 5683, // 13, 0
+ 13, 1, 45286, 13, 2, 7395, 14, 1, 7539, 14, 2, 5316, // 13, 1
+ 13, 2, 46650, 13, 3, 6973, 14, 2, 6959, 14, 3, 4954, // 13, 2
+ 13, 3, 47955, 13, 4, 6560, 14, 3, 6414, 14, 4, 4607, // 13, 3
+ 13, 4, 49150, 13, 5, 6176, 14, 4, 5920, 14, 5, 4290, // 13, 4
+ 13, 5, 50171, 13, 6, 5848, 14, 5, 5499, 14, 6, 4018, // 13, 5
+ 13, 6, 50942, 13, 7, 5606, 14, 6, 5175, 14, 7, 3813, // 13, 6
+ 13, 7, 51395, 13, 8, 5480, 14, 7, 4970, 14, 8, 3691, // 13, 7
+ 12, 8, 4978, 12, 9, 3693, 13, 8, 51387, 13, 9, 5478, // 13, 8
+ 12, 9, 5184, 12, 10, 3815, 13, 9, 50935, 13, 10, 5602, // 13, 9
+ 12, 10, 5508, 12, 11, 4020, 13, 10, 50165, 13, 11, 5843, // 13,10
+ 12, 11, 5930, 12, 12, 4291, 13, 11, 49147, 13, 12, 6168, // 13,11
+ 12, 12, 6426, 12, 13, 4608, 13, 12, 47953, 13, 13, 6549, // 13,12
+ 12, 13, 6973, 12, 14, 4954, 13, 13, 46650, 13, 14, 6959, // 13,13
+ 12, 14, 7555, 12, 15, 5315, 13, 14, 45288, 13, 15, 7378, // 13,14
+ 12, 15, 8159, 12, 16, 5682, 13, 15, 43904, 13, 16, 7791, // 13,15
+ 14, 0, 42821, 14, 1, 8288, 15, 0, 8452, 15, 1, 5975, // 14, 0
+ 14, 1, 44074, 14, 2, 7921, 15, 1, 7901, 15, 2, 5640, // 14, 1
+ 14, 2, 45288, 14, 3, 7555, 15, 2, 7378, 15, 3, 5315, // 14, 2
+ 14, 3, 46430, 14, 4, 7204, 15, 3, 6892, 15, 4, 5010, // 14, 3
+ 14, 4, 47458, 14, 5, 6886, 15, 4, 6458, 15, 5, 4734, // 14, 4
+ 14, 5, 48322, 14, 6, 6620, 15, 5, 6092, 15, 6, 4502, // 14, 5
+ 14, 6, 48969, 14, 7, 6430, 15, 6, 5809, 15, 7, 4328, // 14, 6
+ 14, 7, 49358, 14, 8, 6335, 15, 7, 5623, 15, 8, 4220, // 14, 7
+ 13, 8, 5633, 13, 9, 4224, 14, 8, 49347, 14, 9, 6332, // 14, 8
+ 13, 9, 5820, 13, 10, 4330, 14, 9, 48960, 14, 10, 6426, // 14, 9
+ 13, 10, 6104, 13, 11, 4505, 14, 10, 48314, 14, 11, 6613, // 14,10
+ 13, 11, 6472, 13, 12, 4736, 14, 11, 47453, 14, 12, 6875, // 14,11
+ 13, 12, 6908, 13, 13, 5011, 14, 12, 46427, 14, 13, 7190, // 14,12
+ 13, 13, 7395, 13, 14, 5316, 14, 13, 45286, 14, 14, 7539, // 14,13
+ 13, 14, 7921, 13, 15, 5640, 14, 14, 44074, 14, 15, 7901, // 14,14
+ 13, 15, 8474, 13, 16, 5974, 14, 15, 42823, 14, 16, 8265, // 14,15
+ 15, 0, 41693, 15, 1, 8795, 16, 0, 8769, 16, 1, 6279, // 15, 0
+ 15, 1, 42823, 15, 2, 8474, 16, 1, 8265, 16, 2, 5974, // 15, 1
+ 15, 2, 43904, 15, 3, 8159, 16, 2, 7791, 16, 3, 5682, // 15, 2
+ 15, 3, 44907, 15, 4, 7863, 16, 3, 7356, 16, 4, 5410, // 15, 3
+ 15, 4, 45799, 15, 5, 7599, 16, 4, 6970, 16, 5, 5168, // 15, 4
+ 15, 5, 46541, 15, 6, 7383, 16, 5, 6644, 16, 6, 4968, // 15, 5
+ 15, 6, 47098, 15, 7, 7233, 16, 6, 6391, 16, 7, 4814, // 15, 6
+ 15, 7, 47440, 15, 8, 7161, 16, 7, 6217, 16, 8, 4718, // 15, 7
+ 14, 8, 6230, 14, 9, 4722, 15, 8, 47426, 15, 9, 7158, // 15, 8
+ 14, 9, 6405, 14, 10, 4818, 15, 9, 47086, 15, 10, 7227, // 15, 9
+ 14, 10, 6659, 14, 11, 4971, 15, 10, 46532, 15, 11, 7374, // 15,10
+ 14, 11, 6986, 14, 12, 5172, 15, 11, 45791, 15, 12, 7587, // 15,11
+ 14, 12, 7374, 14, 13, 5413, 15, 12, 44901, 15, 13, 7848, // 15,12
+ 14, 13, 7812, 14, 14, 5684, 15, 13, 43900, 15, 14, 8140, // 15,13
+ 14, 14, 8288, 14, 15, 5975, 15, 14, 42821, 15, 15, 8452, // 15,14
+ 14, 15, 8795, 14, 16, 6280, 15, 15, 41693, 15, 16, 8768, // 15,15
+ // angle of 1.5 degrees
+ 0, -1, 11440, 0, 0, 34212, 1, -1, 8358, 1, 0, 11526, // 0, 0
+ 0, 0, 11192, 0, 1, 35502, 1, 0, 7987, 1, 1, 10855, // 0, 1
+ 0, 1, 10930, 0, 2, 36756, 1, 1, 7626, 1, 2, 10224, // 0, 2
+ 0, 2, 10670, 0, 3, 37939, 1, 2, 7285, 1, 3, 9642, // 0, 3
+ 0, 3, 10430, 0, 4, 39009, 1, 3, 6975, 1, 4, 9122, // 0, 4
+ 0, 4, 10232, 0, 5, 39918, 1, 4, 6710, 1, 5, 8676, // 0, 5
+ 0, 5, 10100, 0, 6, 40618, 1, 5, 6502, 1, 6, 8316, // 0, 6
+ 0, 6, 10052, 0, 7, 41072, 1, 6, 6360, 1, 7, 8052, // 0, 7
+ -1, 7, 6346, -1, 8, 8018, 0, 7, 10066, 0, 8, 41106, // 0, 8
+ -1, 8, 6489, -1, 9, 8278, 0, 8, 10123, 0, 9, 40646, // 0, 9
+ -1, 9, 6699, -1, 10, 8632, 0, 9, 10265, 0, 10, 39940, // 0,10
+ -1, 10, 6965, -1, 11, 9072, 0, 10, 10473, 0, 11, 39026, // 0,11
+ -1, 11, 7276, -1, 12, 9585, 0, 11, 10723, 0, 12, 37952, // 0,12
+ -1, 12, 7620, -1, 13, 10158, 0, 12, 10994, 0, 13, 36764, // 0,13
+ -1, 13, 7983, -1, 14, 10780, 0, 13, 11267, 0, 14, 35506, // 0,14
+ -1, 14, 8358, -1, 15, 11440, 0, 14, 11526, 0, 15, 34212, // 0,15
+ 1, -1, 10780, 1, 0, 35506, 2, -1, 7983, 2, 0, 11267, // 1, 0
+ 1, 0, 10467, 1, 1, 36959, 2, 0, 7579, 2, 1, 10531, // 1, 1
+ 1, 1, 10133, 1, 2, 38390, 2, 1, 7179, 2, 2, 9834, // 1, 2
+ 1, 2, 9796, 1, 3, 39759, 2, 2, 6797, 2, 3, 9184, // 1, 3
+ 1, 3, 9478, 1, 4, 41013, 2, 3, 6447, 2, 4, 8598, // 1, 4
+ 1, 4, 9206, 1, 5, 42087, 2, 4, 6145, 2, 5, 8098, // 1, 5
+ 1, 5, 9014, 1, 6, 42913, 2, 5, 5910, 2, 6, 7699, // 1, 6
+ 1, 6, 8929, 1, 7, 43433, 2, 6, 5756, 2, 7, 7418, // 1, 7
+ 0, 7, 5745, 0, 8, 7390, 1, 7, 8939, 1, 8, 43462, // 1, 8
+ 0, 8, 5900, 0, 9, 7667, 1, 8, 9032, 1, 9, 42937, // 1, 9
+ 0, 9, 6137, 0, 10, 8061, 1, 9, 9233, 1, 10, 42105, // 1,10
+ 0, 10, 6440, 0, 11, 8557, 1, 10, 9513, 1, 11, 41026, // 1,11
+ 0, 11, 6792, 0, 12, 9135, 1, 11, 9841, 1, 12, 39768, // 1,12
+ 0, 12, 7177, 0, 13, 9777, 1, 12, 10188, 1, 13, 38394, // 1,13
+ 0, 13, 7579, 0, 14, 10467, 1, 13, 10532, 1, 14, 36958, // 1,14
+ 0, 14, 7987, 0, 15, 11192, 1, 14, 10855, 1, 15, 35502, // 1,15
+ 2, -1, 10158, 2, 0, 36764, 3, -1, 7620, 3, 0, 10994, // 2, 0
+ 2, 0, 9777, 2, 1, 38394, 3, 0, 7177, 3, 1, 10188, // 2, 1
+ 2, 1, 9366, 2, 2, 40025, 3, 1, 6732, 3, 2, 9413, // 2, 2
+ 2, 2, 8941, 2, 3, 41614, 3, 2, 6299, 3, 3, 8682, // 2, 3
+ 2, 3, 8530, 2, 4, 43096, 3, 3, 5895, 3, 4, 8015, // 2, 4
+ 2, 4, 8167, 2, 5, 44386, 3, 4, 5543, 3, 5, 7440, // 2, 5
+ 2, 5, 7899, 2, 6, 45383, 3, 5, 5268, 3, 6, 6986, // 2, 6
+ 2, 6, 7766, 2, 7, 45995, 3, 6, 5095, 3, 7, 6680, // 2, 7
+ 1, 7, 5087, 1, 8, 6658, 2, 7, 7773, 2, 8, 46018, // 2, 8
+ 1, 8, 5261, 1, 9, 6961, 2, 8, 7913, 2, 9, 45401, // 2, 9
+ 1, 9, 5537, 1, 10, 7411, 2, 9, 8189, 2, 10, 44399, // 2,10
+ 1, 10, 5891, 1, 11, 7981, 2, 10, 8559, 2, 11, 43105, // 2,11
+ 1, 11, 6297, 1, 12, 8641, 2, 11, 8979, 2, 12, 41619, // 2,12
+ 1, 12, 6732, 1, 13, 9366, 2, 12, 9413, 2, 13, 40025, // 2,13
+ 1, 13, 7179, 1, 14, 10133, 2, 13, 9834, 2, 14, 38390, // 2,14
+ 1, 14, 7626, 1, 15, 10930, 2, 14, 10224, 2, 15, 36756, // 2,15
+ 3, -1, 9585, 3, 0, 37951, 4, -1, 7276, 4, 0, 10724, // 3, 0
+ 3, 0, 9135, 3, 1, 39767, 4, 0, 6792, 4, 1, 9842, // 3, 1
+ 3, 1, 8641, 3, 2, 41618, 4, 1, 6297, 4, 2, 8980, // 3, 2
+ 3, 2, 8120, 3, 3, 43461, 4, 2, 5804, 4, 3, 8151, // 3, 3
+ 3, 3, 7598, 3, 4, 45224, 4, 3, 5331, 4, 4, 7383, // 3, 4
+ 3, 4, 7121, 3, 5, 46798, 4, 4, 4909, 4, 5, 6708, // 3, 5
+ 3, 5, 6750, 3, 6, 48037, 4, 5, 4576, 4, 6, 6173, // 3, 6
+ 3, 6, 6552, 3, 7, 48785, 4, 6, 4372, 4, 7, 5827, // 3, 7
+ 2, 7, 4366, 2, 8, 5811, 3, 7, 6558, 3, 8, 48801, // 3, 8
+ 2, 8, 4572, 2, 9, 6154, 3, 8, 6761, 3, 9, 48049, // 3, 9
+ 2, 9, 4906, 2, 10, 6685, 3, 9, 7138, 3, 10, 46807, // 3,10
+ 2, 10, 5330, 2, 11, 7356, 3, 10, 7622, 3, 11, 45228, // 3,11
+ 2, 11, 5804, 2, 12, 8120, 3, 11, 8151, 3, 12, 43461, // 3,12
+ 2, 12, 6299, 2, 13, 8941, 3, 12, 8681, 3, 13, 41615, // 3,13
+ 2, 13, 6797, 2, 14, 9796, 3, 13, 9184, 3, 14, 39759, // 3,14
+ 2, 14, 7285, 2, 15, 10670, 3, 14, 9642, 3, 15, 37939, // 3,15
+ 4, -1, 9072, 4, 0, 39026, 5, -1, 6965, 5, 0, 10473, // 4, 0
+ 4, 0, 8557, 4, 1, 41026, 5, 0, 6440, 5, 1, 9513, // 4, 1
+ 4, 1, 7981, 4, 2, 43105, 5, 1, 5891, 5, 2, 8559, // 4, 2
+ 4, 2, 7356, 4, 3, 45229, 5, 2, 5330, 5, 3, 7621, // 4, 3
+ 4, 3, 6708, 4, 4, 47328, 5, 3, 4774, 5, 4, 6726, // 4, 4
+ 4, 4, 6086, 4, 5, 49275, 5, 4, 4258, 5, 5, 5917, // 4, 5
+ 4, 5, 5573, 4, 6, 50865, 5, 5, 3837, 5, 6, 5261, // 4, 6
+ 4, 6, 5280, 4, 7, 51832, 5, 6, 3579, 5, 7, 4845, // 4, 7
+ 3, 7, 3575, 3, 8, 4835, 4, 7, 5283, 4, 8, 51843, // 4, 8
+ 3, 8, 3834, 3, 9, 5248, 4, 8, 5581, 4, 9, 50873, // 4, 9
+ 3, 9, 4257, 3, 10, 5901, 4, 9, 6099, 4, 10, 49279, // 4,10
+ 3, 10, 4774, 3, 11, 6708, 4, 10, 6727, 4, 11, 47327, // 4,11
+ 3, 11, 5331, 3, 12, 7598, 4, 11, 7382, 4, 12, 45225, // 4,12
+ 3, 12, 5895, 3, 13, 8530, 4, 12, 8015, 4, 13, 43096, // 4,13
+ 3, 13, 6447, 3, 14, 9478, 4, 13, 8599, 4, 14, 41012, // 4,14
+ 3, 14, 6975, 3, 15, 10430, 4, 14, 9122, 4, 15, 39009, // 4,15
+ 5, -1, 8632, 5, 0, 39940, 6, -1, 6699, 6, 0, 10265, // 5, 0
+ 5, 0, 8061, 5, 1, 42105, 6, 0, 6137, 6, 1, 9233, // 5, 1
+ 5, 1, 7411, 5, 2, 44399, 6, 1, 5537, 6, 2, 8189, // 5, 2
+ 5, 2, 6685, 5, 3, 46806, 6, 2, 4906, 6, 3, 7139, // 5, 3
+ 5, 3, 5901, 5, 4, 49279, 6, 3, 4257, 6, 4, 6099, // 5, 4
+ 5, 4, 5103, 5, 5, 51700, 6, 4, 3621, 6, 5, 5112, // 5, 5
+ 5, 5, 4388, 5, 6, 53813, 6, 5, 3065, 6, 6, 4270, // 5, 6
+ 5, 6, 3938, 5, 7, 55162, 6, 6, 2710, 6, 7, 3726, // 5, 7
+ 4, 7, 2708, 4, 8, 3720, 5, 7, 3940, 5, 8, 55168, // 5, 8
+ 4, 8, 3064, 4, 9, 4262, 5, 8, 4394, 5, 9, 53816, // 5, 9
+ 4, 9, 3621, 4, 10, 5103, 5, 9, 5113, 5, 10, 51699, // 5,10
+ 4, 10, 4258, 4, 11, 6086, 5, 10, 5917, 5, 11, 49275, // 5,11
+ 4, 11, 4909, 4, 12, 7121, 5, 11, 6707, 5, 12, 46799, // 5,12
+ 4, 12, 5543, 4, 13, 8167, 5, 12, 7440, 5, 13, 44386, // 5,13
+ 4, 13, 6145, 4, 14, 9206, 5, 13, 8098, 5, 14, 42087, // 5,14
+ 4, 14, 6710, 4, 15, 10232, 5, 14, 8676, 5, 15, 39918, // 5,15
+ 6, -1, 8278, 6, 0, 40646, 7, -1, 6489, 7, 0, 10123, // 6, 0
+ 6, 0, 7667, 6, 1, 42936, 7, 0, 5900, 7, 1, 9033, // 6, 1
+ 6, 1, 6961, 6, 2, 45401, 7, 1, 5261, 7, 2, 7913, // 6, 2
+ 6, 2, 6154, 6, 3, 48049, 7, 2, 4572, 7, 3, 6761, // 6, 3
+ 6, 3, 5248, 6, 4, 50873, 7, 3, 3834, 7, 4, 5581, // 6, 4
+ 6, 4, 4262, 6, 5, 53816, 7, 4, 3064, 7, 5, 4394, // 6, 5
+ 6, 5, 3271, 6, 6, 56673, 7, 5, 2316, 7, 6, 3276, // 6, 6
+ 6, 6, 2532, 6, 7, 58773, 7, 6, 1767, 7, 7, 2464, // 6, 7
+ 5, 7, 1766, 5, 8, 2462, 6, 7, 2533, 6, 8, 58775, // 6, 8
+ 5, 8, 2316, 5, 9, 3271, 6, 8, 3275, 6, 9, 56674, // 6, 9
+ 5, 9, 3065, 5, 10, 4388, 6, 9, 4269, 6, 10, 53814, // 6,10
+ 5, 10, 3837, 5, 11, 5573, 6, 10, 5261, 6, 11, 50865, // 6,11
+ 5, 11, 4576, 5, 12, 6750, 6, 11, 6173, 6, 12, 48037, // 6,12
+ 5, 12, 5268, 5, 13, 7899, 6, 12, 6986, 6, 13, 45383, // 6,13
+ 5, 13, 5910, 5, 14, 9014, 6, 13, 7699, 6, 14, 42913, // 6,14
+ 5, 14, 6502, 5, 15, 10100, 6, 14, 8316, 6, 15, 40618, // 6,15
+ 7, -1, 8018, 7, 0, 41106, 8, -1, 6346, 8, 0, 10066, // 7, 0
+ 7, 0, 7390, 7, 1, 43461, 8, 0, 5745, 8, 1, 8940, // 7, 1
+ 7, 1, 6658, 7, 2, 46017, 8, 1, 5087, 8, 2, 7774, // 7, 2
+ 7, 2, 5811, 7, 3, 48801, 8, 2, 4366, 8, 3, 6558, // 7, 3
+ 7, 3, 4835, 7, 4, 51842, 8, 3, 3575, 8, 4, 5284, // 7, 4
+ 7, 4, 3720, 7, 5, 55168, 8, 4, 2708, 8, 5, 3940, // 7, 5
+ 7, 5, 2462, 7, 6, 58775, 8, 5, 1766, 8, 6, 2533, // 7, 6
+ 7, 6, 1170, 7, 7, 62369, 8, 6, 827, 8, 7, 1170, // 7, 7
+ 6, 7, 827, 6, 8, 1170, 7, 7, 1170, 7, 8, 62369, // 7, 8
+ 6, 8, 1767, 6, 9, 2532, 7, 8, 2464, 7, 9, 58773, // 7, 9
+ 6, 9, 2710, 6, 10, 3938, 7, 9, 3726, 7, 10, 55162, // 7,10
+ 6, 10, 3579, 6, 11, 5280, 7, 10, 4846, 7, 11, 51831, // 7,11
+ 6, 11, 4372, 6, 12, 6552, 7, 11, 5827, 7, 12, 48785, // 7,12
+ 6, 12, 5095, 6, 13, 7766, 7, 12, 6680, 7, 13, 45995, // 7,13
+ 6, 13, 5756, 6, 14, 8929, 7, 13, 7418, 7, 14, 43433, // 7,14
+ 6, 14, 6360, 6, 15, 10052, 7, 14, 8052, 7, 15, 41072, // 7,15
+ 8, 0, 41072, 8, 1, 8052, 9, 0, 10052, 9, 1, 6360, // 8, 0
+ 8, 1, 43433, 8, 2, 7418, 9, 1, 8929, 9, 2, 5756, // 8, 1
+ 8, 2, 45995, 8, 3, 6680, 9, 2, 7766, 9, 3, 5095, // 8, 2
+ 8, 3, 48785, 8, 4, 5827, 9, 3, 6552, 9, 4, 4372, // 8, 3
+ 8, 4, 51832, 8, 5, 4846, 9, 4, 5280, 9, 5, 3578, // 8, 4
+ 8, 5, 55162, 8, 6, 3726, 9, 5, 3938, 9, 6, 2710, // 8, 5
+ 8, 6, 58773, 8, 7, 2464, 9, 6, 2532, 9, 7, 1767, // 8, 6
+ 8, 7, 62369, 8, 8, 1170, 9, 7, 1170, 9, 8, 827, // 8, 7
+ 7, 8, 1170, 7, 9, 827, 8, 8, 62369, 8, 9, 1170, // 8, 8
+ 7, 9, 2533, 7, 10, 1766, 8, 9, 58775, 8, 10, 2462, // 8, 9
+ 7, 10, 3940, 7, 11, 2708, 8, 10, 55168, 8, 11, 3720, // 8,10
+ 7, 11, 5283, 7, 12, 3575, 8, 11, 51842, 8, 12, 4836, // 8,11
+ 7, 12, 6558, 7, 13, 4366, 8, 12, 48801, 8, 13, 5811, // 8,12
+ 7, 13, 7773, 7, 14, 5087, 8, 13, 46017, 8, 14, 6659, // 8,13
+ 7, 14, 8939, 7, 15, 5745, 8, 14, 43461, 8, 15, 7391, // 8,14
+ 7, 15, 10066, 7, 16, 6346, 8, 15, 41106, 8, 16, 8018, // 8,15
+ 9, 0, 40618, 9, 1, 8316, 10, 0, 10100, 10, 1, 6502, // 9, 0
+ 9, 1, 42913, 9, 2, 7699, 10, 1, 9014, 10, 2, 5910, // 9, 1
+ 9, 2, 45383, 9, 3, 6986, 10, 2, 7899, 10, 3, 5268, // 9, 2
+ 9, 3, 48037, 9, 4, 6173, 10, 3, 6750, 10, 4, 4576, // 9, 3
+ 9, 4, 50865, 9, 5, 5261, 10, 4, 5573, 10, 5, 3837, // 9, 4
+ 9, 5, 53813, 9, 6, 4269, 10, 5, 4388, 10, 6, 3066, // 9, 5
+ 9, 6, 56673, 9, 7, 3275, 10, 6, 3271, 10, 7, 2317, // 9, 6
+ 9, 7, 58775, 9, 8, 2533, 10, 7, 2462, 10, 8, 1766, // 9, 7
+ 8, 8, 2464, 8, 9, 1767, 9, 8, 58773, 9, 9, 2532, // 9, 8
+ 8, 9, 3275, 8, 10, 2316, 9, 9, 56673, 9, 10, 3272, // 9, 9
+ 8, 10, 4394, 8, 11, 3064, 9, 10, 53816, 9, 11, 4262, // 9,10
+ 8, 11, 5581, 8, 12, 3834, 9, 11, 50873, 9, 12, 5248, // 9,11
+ 8, 12, 6761, 8, 13, 4572, 9, 12, 48049, 9, 13, 6154, // 9,12
+ 8, 13, 7913, 8, 14, 5261, 9, 13, 45401, 9, 14, 6961, // 9,13
+ 8, 14, 9032, 8, 15, 5900, 9, 14, 42936, 9, 15, 7668, // 9,14
+ 8, 15, 10123, 8, 16, 6489, 9, 15, 40646, 9, 16, 8278, // 9,15
+ 10, 0, 39918, 10, 1, 8676, 11, 0, 10232, 11, 1, 6710, // 10, 0
+ 10, 1, 42087, 10, 2, 8098, 11, 1, 9206, 11, 2, 6145, // 10, 1
+ 10, 2, 44386, 10, 3, 7440, 11, 2, 8167, 11, 3, 5543, // 10, 2
+ 10, 3, 46798, 10, 4, 6707, 11, 3, 7121, 11, 4, 4910, // 10, 3
+ 10, 4, 49275, 10, 5, 5917, 11, 4, 6086, 11, 5, 4258, // 10, 4
+ 10, 5, 51700, 10, 6, 5113, 11, 5, 5103, 11, 6, 3620, // 10, 5
+ 10, 6, 53816, 10, 7, 4394, 11, 6, 4262, 11, 7, 3064, // 10, 6
+ 10, 7, 55168, 10, 8, 3940, 11, 7, 3720, 11, 8, 2708, // 10, 7
+ 9, 8, 3726, 9, 9, 2710, 10, 8, 55162, 10, 9, 3938, // 10, 8
+ 9, 9, 4269, 9, 10, 3065, 10, 9, 53813, 10, 10, 4389, // 10, 9
+ 9, 10, 5113, 9, 11, 3621, 10, 10, 51700, 10, 11, 5102, // 10,10
+ 9, 11, 6099, 9, 12, 4257, 10, 11, 49279, 10, 12, 5901, // 10,11
+ 9, 12, 7138, 9, 13, 4906, 10, 12, 46806, 10, 13, 6686, // 10,12
+ 9, 13, 8189, 9, 14, 5537, 10, 13, 44399, 10, 14, 7411, // 10,13
+ 9, 14, 9233, 9, 15, 6137, 10, 14, 42105, 10, 15, 8061, // 10,14
+ 9, 15, 10265, 9, 16, 6699, 10, 15, 39940, 10, 16, 8632, // 10,15
+ 11, 0, 39009, 11, 1, 9122, 12, 0, 10430, 12, 1, 6975, // 11, 0
+ 11, 1, 41013, 11, 2, 8599, 12, 1, 9478, 12, 2, 6446, // 11, 1
+ 11, 2, 43096, 11, 3, 8015, 12, 2, 8530, 12, 3, 5895, // 11, 2
+ 11, 3, 45224, 11, 4, 7382, 12, 3, 7598, 12, 4, 5332, // 11, 3
+ 11, 4, 47328, 11, 5, 6727, 12, 4, 6708, 12, 5, 4773, // 11, 4
+ 11, 5, 49279, 11, 6, 6099, 12, 5, 5901, 12, 6, 4257, // 11, 5
+ 11, 6, 50873, 11, 7, 5581, 12, 6, 5248, 12, 7, 3834, // 11, 6
+ 11, 7, 51842, 11, 8, 5283, 12, 7, 4835, 12, 8, 3576, // 11, 7
+ 10, 8, 4846, 10, 9, 3579, 11, 8, 51832, 11, 9, 5279, // 11, 8
+ 10, 9, 5261, 10, 10, 3837, 11, 9, 50865, 11, 10, 5573, // 11, 9
+ 10, 10, 5917, 10, 11, 4258, 11, 10, 49275, 11, 11, 6086, // 11,10
+ 10, 11, 6727, 10, 12, 4774, 11, 11, 47328, 11, 12, 6707, // 11,11
+ 10, 12, 7622, 10, 13, 5330, 11, 12, 45229, 11, 13, 7355, // 11,12
+ 10, 13, 8559, 10, 14, 5891, 11, 13, 43105, 11, 14, 7981, // 11,13
+ 10, 14, 9513, 10, 15, 6440, 11, 14, 41026, 11, 15, 8557, // 11,14
+ 10, 15, 10473, 10, 16, 6965, 11, 15, 39026, 11, 16, 9072, // 11,15
+ 12, 0, 37939, 12, 1, 9642, 13, 0, 10670, 13, 1, 7285, // 12, 0
+ 12, 1, 39759, 12, 2, 9184, 13, 1, 9796, 13, 2, 6797, // 12, 1
+ 12, 2, 41614, 12, 3, 8681, 13, 2, 8941, 13, 3, 6300, // 12, 2
+ 12, 3, 43461, 12, 4, 8151, 13, 3, 8120, 13, 4, 5804, // 12, 3
+ 12, 4, 45229, 12, 5, 7622, 13, 4, 7356, 13, 5, 5329, // 12, 4
+ 12, 5, 46806, 12, 6, 7138, 13, 5, 6685, 13, 6, 4907, // 12, 5
+ 12, 6, 48049, 12, 7, 6761, 13, 6, 6154, 13, 7, 4572, // 12, 6
+ 12, 7, 48801, 12, 8, 6558, 13, 7, 5811, 13, 8, 4366, // 12, 7
+ 11, 8, 5827, 11, 9, 4372, 12, 8, 48785, 12, 9, 6552, // 12, 8
+ 11, 9, 6173, 11, 10, 4576, 12, 9, 48037, 12, 10, 6750, // 12, 9
+ 11, 10, 6707, 11, 11, 4909, 12, 10, 46798, 12, 11, 7122, // 12,10
+ 11, 11, 7382, 11, 12, 5331, 12, 11, 45224, 12, 12, 7599, // 12,11
+ 11, 12, 8151, 11, 13, 5804, 12, 12, 43461, 12, 13, 8120, // 12,12
+ 11, 13, 8979, 11, 14, 6297, 12, 13, 41618, 12, 14, 8642, // 12,13
+ 11, 14, 9841, 11, 15, 6792, 12, 14, 39767, 12, 15, 9136, // 12,14
+ 11, 15, 10723, 11, 16, 7276, 12, 15, 37951, 12, 16, 9586, // 12,15
+ 13, 0, 36756, 13, 1, 10224, 14, 0, 10930, 14, 1, 7626, // 13, 0
+ 13, 1, 38390, 13, 2, 9834, 14, 1, 10133, 14, 2, 7179, // 13, 1
+ 13, 2, 40025, 13, 3, 9413, 14, 2, 9366, 14, 3, 6732, // 13, 2
+ 13, 3, 41618, 13, 4, 8979, 14, 3, 8641, 14, 4, 6298, // 13, 3
+ 13, 4, 43105, 13, 5, 8559, 14, 4, 7981, 14, 5, 5891, // 13, 4
+ 13, 5, 44399, 13, 6, 8189, 14, 5, 7411, 14, 6, 5537, // 13, 5
+ 13, 6, 45401, 13, 7, 7913, 14, 6, 6961, 14, 7, 5261, // 13, 6
+ 13, 7, 46017, 13, 8, 7773, 14, 7, 6658, 14, 8, 5088, // 13, 7
+ 12, 8, 6680, 12, 9, 5095, 13, 8, 45995, 13, 9, 7766, // 13, 8
+ 12, 9, 6986, 12, 10, 5268, 13, 9, 45383, 13, 10, 7899, // 13, 9
+ 12, 10, 7440, 12, 11, 5543, 13, 10, 44386, 13, 11, 8167, // 13,10
+ 12, 11, 8015, 12, 12, 5895, 13, 11, 43096, 13, 12, 8530, // 13,11
+ 12, 12, 8681, 12, 13, 6299, 13, 12, 41614, 13, 13, 8942, // 13,12
+ 12, 13, 9413, 12, 14, 6732, 13, 13, 40025, 13, 14, 9366, // 13,13
+ 12, 14, 10188, 12, 15, 7177, 13, 14, 38394, 13, 15, 9777, // 13,14
+ 12, 15, 10994, 12, 16, 7620, 13, 15, 36764, 13, 16, 10158, // 13,15
+ 14, 0, 35502, 14, 1, 10855, 15, 0, 11192, 15, 1, 7987, // 14, 0
+ 14, 1, 36959, 14, 2, 10532, 15, 1, 10467, 15, 2, 7578, // 14, 1
+ 14, 2, 38394, 14, 3, 10188, 15, 2, 9777, 15, 3, 7177, // 14, 2
+ 14, 3, 39767, 14, 4, 9841, 15, 3, 9135, 15, 4, 6793, // 14, 3
+ 14, 4, 41026, 14, 5, 9513, 15, 4, 8557, 15, 5, 6440, // 14, 4
+ 14, 5, 42105, 14, 6, 9233, 15, 5, 8061, 15, 6, 6137, // 14, 5
+ 14, 6, 42936, 14, 7, 9032, 15, 6, 7667, 15, 7, 5901, // 14, 6
+ 14, 7, 43461, 14, 8, 8939, 15, 7, 7390, 15, 8, 5746, // 14, 7
+ 13, 8, 7418, 13, 9, 5756, 14, 8, 43433, 14, 9, 8929, // 14, 8
+ 13, 9, 7699, 13, 10, 5910, 14, 9, 42913, 14, 10, 9014, // 14, 9
+ 13, 10, 8098, 13, 11, 6145, 14, 10, 42087, 14, 11, 9206, // 14,10
+ 13, 11, 8599, 13, 12, 6447, 14, 11, 41013, 14, 12, 9477, // 14,11
+ 13, 12, 9184, 13, 13, 6797, 14, 12, 39759, 14, 13, 9796, // 14,12
+ 13, 13, 9834, 13, 14, 7179, 14, 13, 38390, 14, 14, 10133, // 14,13
+ 13, 14, 10532, 13, 15, 7579, 14, 14, 36959, 14, 15, 10466, // 14,14
+ 13, 15, 11267, 13, 16, 7983, 14, 15, 35506, 14, 16, 10780, // 14,15
+ 15, 0, 34212, 15, 1, 11526, 16, 0, 11440, 16, 1, 8358, // 15, 0
+ 15, 1, 35506, 15, 2, 11267, 16, 1, 10780, 16, 2, 7983, // 15, 1
+ 15, 2, 36764, 15, 3, 10994, 16, 2, 10158, 16, 3, 7620, // 15, 2
+ 15, 3, 37951, 15, 4, 10723, 16, 3, 9585, 16, 4, 7277, // 15, 3
+ 15, 4, 39026, 15, 5, 10473, 16, 4, 9072, 16, 5, 6965, // 15, 4
+ 15, 5, 39940, 15, 6, 10265, 16, 5, 8632, 16, 6, 6699, // 15, 5
+ 15, 6, 40646, 15, 7, 10123, 16, 6, 8278, 16, 7, 6489, // 15, 6
+ 15, 7, 41106, 15, 8, 10066, 16, 7, 8018, 16, 8, 6346, // 15, 7
+ 14, 8, 8052, 14, 9, 6360, 15, 8, 41072, 15, 9, 10052, // 15, 8
+ 14, 9, 8316, 14, 10, 6502, 15, 9, 40618, 15, 10, 10100, // 15, 9
+ 14, 10, 8676, 14, 11, 6710, 15, 10, 39918, 15, 11, 10232, // 15,10
+ 14, 11, 9122, 14, 12, 6975, 15, 11, 39009, 15, 12, 10430, // 15,11
+ 14, 12, 9642, 14, 13, 7285, 15, 12, 37939, 15, 13, 10670, // 15,12
+ 14, 13, 10224, 14, 14, 7626, 15, 13, 36756, 15, 14, 10930, // 15,13
+ 14, 14, 10855, 14, 15, 7987, 15, 14, 35502, 15, 15, 11192, // 15,14
+ 14, 15, 11526, 14, 16, 8358, 15, 15, 34212, 15, 16, 11440, // 15,15
+ // angle of 2.0 degrees
+ 0, -1, 13368, 0, 0, 28495, 1, -1, 10104, 1, 0, 13569, // 0, 0
+ 0, 0, 13291, 0, 1, 29828, 1, 0, 9671, 1, 1, 12746, // 0, 1
+ 0, 1, 13176, 0, 2, 31138, 1, 1, 9245, 1, 2, 11977, // 0, 2
+ 0, 2, 13038, 0, 3, 32391, 1, 2, 8838, 1, 3, 11269, // 0, 3
+ 0, 3, 12899, 0, 4, 33539, 1, 3, 8463, 1, 4, 10635, // 0, 4
+ 0, 4, 12783, 0, 5, 34532, 1, 4, 8135, 1, 5, 10086, // 0, 5
+ 0, 5, 12717, 0, 6, 35315, 1, 5, 7868, 1, 6, 9636, // 0, 6
+ 0, 6, 12728, 0, 7, 35844, 1, 6, 7674, 1, 7, 9290, // 0, 7
+ -1, 7, 7643, -1, 8, 9224, 0, 7, 12764, 0, 8, 35905, // 0, 8
+ -1, 8, 7839, -1, 9, 9558, 0, 8, 12777, 0, 9, 35362, // 0, 9
+ -1, 9, 8107, -1, 10, 9995, 0, 9, 12867, 0, 10, 34567, // 0,10
+ -1, 10, 8438, -1, 11, 10528, 0, 10, 13007, 0, 11, 33563, // 0,11
+ -1, 11, 8816, -1, 12, 11143, 0, 11, 13171, 0, 12, 32406, // 0,12
+ -1, 12, 9229, -1, 13, 11829, 0, 12, 13332, 0, 13, 31146, // 0,13
+ -1, 13, 9662, -1, 14, 12574, 0, 13, 13470, 0, 14, 29830, // 0,14
+ -1, 14, 10104, -1, 15, 13368, 0, 14, 13569, 0, 15, 28495, // 0,15
+ 1, -1, 12574, 1, 0, 29831, 2, -1, 9662, 2, 0, 13469, // 1, 0
+ 1, 0, 12412, 1, 1, 31358, 2, 0, 9202, 2, 1, 12564, // 1, 1
+ 1, 1, 12203, 1, 2, 32881, 2, 1, 8742, 2, 2, 11710, // 1, 2
+ 1, 2, 11964, 1, 3, 34358, 2, 2, 8296, 2, 3, 10918, // 1, 3
+ 1, 3, 11721, 1, 4, 35730, 2, 3, 7881, 2, 4, 10204, // 1, 4
+ 1, 4, 11507, 1, 5, 36926, 2, 4, 7517, 2, 5, 9586, // 1, 5
+ 1, 5, 11360, 1, 6, 37866, 2, 5, 7224, 2, 6, 9086, // 1, 6
+ 1, 6, 11317, 1, 7, 38481, 2, 6, 7020, 2, 7, 8718, // 1, 7
+ 0, 7, 6997, 0, 8, 8662, 1, 7, 11344, 1, 8, 38533, // 1, 8
+ 0, 8, 7202, 0, 9, 9020, 1, 8, 11407, 1, 9, 37907, // 1, 9
+ 0, 9, 7497, 0, 10, 9509, 1, 9, 11575, 1, 10, 36955, // 1,10
+ 0, 10, 7865, 0, 11, 10111, 1, 10, 11810, 1, 11, 35750, // 1,11
+ 0, 11, 8284, 0, 12, 10808, 1, 11, 12074, 1, 12, 34370, // 1,12
+ 0, 12, 8735, 0, 13, 11580, 1, 12, 12334, 1, 13, 32887, // 1,13
+ 0, 13, 9202, 0, 14, 12412, 1, 13, 12564, 1, 14, 31358, // 1,14
+ 0, 14, 9671, 0, 15, 13291, 1, 14, 12746, 1, 15, 29828, // 1,15
+ 2, -1, 11829, 2, 0, 31146, 3, -1, 9229, 3, 0, 13332, // 2, 0
+ 2, 0, 11580, 2, 1, 32886, 3, 0, 8735, 3, 1, 12335, // 2, 1
+ 2, 1, 11272, 2, 2, 34650, 3, 1, 8232, 3, 2, 11382, // 2, 2
+ 2, 2, 10922, 2, 3, 36392, 3, 2, 7734, 3, 3, 10488, // 2, 3
+ 2, 3, 10559, 2, 4, 38042, 3, 3, 7261, 3, 4, 9674, // 2, 4
+ 2, 4, 10226, 2, 5, 39503, 3, 4, 6842, 3, 5, 8965, // 2, 5
+ 2, 5, 9977, 2, 6, 40656, 3, 5, 6506, 3, 6, 8397, // 2, 6
+ 2, 6, 9867, 2, 7, 41389, 3, 6, 6284, 3, 7, 7996, // 2, 7
+ 1, 7, 6266, 1, 8, 7951, 2, 7, 9886, 2, 8, 41433, // 2, 8
+ 1, 8, 6491, 1, 9, 8344, 2, 8, 10013, 2, 9, 40688, // 2, 9
+ 1, 9, 6829, 1, 10, 8902, 2, 9, 10279, 2, 10, 39526, // 2,10
+ 1, 10, 7252, 1, 11, 9597, 2, 10, 10630, 2, 11, 38057, // 2,11
+ 1, 11, 7728, 1, 12, 10397, 2, 11, 11012, 2, 12, 36399, // 2,12
+ 1, 12, 8232, 1, 13, 11272, 2, 12, 11382, 2, 13, 34650, // 2,13
+ 1, 13, 8742, 1, 14, 12203, 2, 13, 11709, 2, 14, 32882, // 2,14
+ 1, 14, 9245, 1, 15, 13176, 2, 14, 11977, 2, 15, 31138, // 2,15
+ 3, -1, 11143, 3, 0, 32406, 4, -1, 8816, 4, 0, 13171, // 3, 0
+ 3, 0, 10808, 3, 1, 34369, 4, 0, 8284, 4, 1, 12075, // 3, 1
+ 3, 1, 10397, 3, 2, 36399, 4, 1, 7728, 4, 2, 11012, // 3, 2
+ 3, 2, 9924, 3, 3, 38450, 4, 2, 7164, 4, 3, 9998, // 3, 3
+ 3, 3, 9421, 3, 4, 40444, 4, 3, 6615, 4, 4, 9056, // 3, 4
+ 3, 4, 8940, 3, 5, 42256, 4, 4, 6116, 4, 5, 8224, // 3, 5
+ 3, 5, 8558, 3, 6, 43710, 4, 5, 5712, 4, 6, 7556, // 3, 6
+ 3, 6, 8359, 3, 7, 44616, 4, 6, 5454, 4, 7, 7107, // 3, 7
+ 2, 7, 5443, 2, 8, 7072, 3, 7, 8373, 3, 8, 44648, // 3, 8
+ 2, 8, 5703, 2, 9, 7516, 3, 8, 8584, 3, 9, 43733, // 3, 9
+ 2, 9, 6108, 2, 10, 8175, 3, 9, 8982, 3, 10, 42271, // 3,10
+ 2, 10, 6611, 2, 11, 8995, 3, 10, 9478, 3, 11, 40452, // 3,11
+ 2, 11, 7164, 2, 12, 9924, 3, 11, 9998, 3, 12, 38450, // 3,12
+ 2, 12, 7734, 2, 13, 10922, 3, 12, 10488, 3, 13, 36392, // 3,13
+ 2, 13, 8296, 2, 14, 11964, 3, 13, 10918, 3, 14, 34358, // 3,14
+ 2, 14, 8838, 2, 15, 13038, 3, 14, 11269, 3, 15, 32391, // 3,15
+ 4, -1, 10528, 4, 0, 33564, 5, -1, 8438, 5, 0, 13006, // 4, 0
+ 4, 0, 10111, 4, 1, 35750, 5, 0, 7865, 5, 1, 11810, // 4, 1
+ 4, 1, 9597, 4, 2, 38057, 5, 1, 7252, 5, 2, 10630, // 4, 2
+ 4, 2, 8995, 4, 3, 40452, 5, 2, 6611, 5, 3, 9478, // 4, 3
+ 4, 3, 8332, 4, 4, 42861, 5, 3, 5965, 5, 4, 8378, // 4, 4
+ 4, 4, 7667, 4, 5, 45139, 5, 4, 5353, 5, 5, 7377, // 4, 5
+ 4, 5, 7100, 4, 6, 47035, 5, 5, 4843, 5, 6, 6558, // 4, 6
+ 4, 6, 6774, 4, 7, 48218, 5, 6, 4521, 5, 7, 6023, // 4, 7
+ 3, 7, 4513, 3, 8, 6000, 4, 7, 6783, 4, 8, 48240, // 4, 8
+ 3, 8, 4838, 3, 9, 6530, 4, 8, 7119, 4, 9, 47049, // 4, 9
+ 3, 9, 5350, 3, 10, 7342, 4, 9, 7698, 4, 10, 45146, // 4,10
+ 3, 10, 5965, 3, 11, 8332, 4, 10, 8378, 4, 11, 42861, // 4,11
+ 3, 11, 6615, 3, 12, 9421, 4, 11, 9056, 4, 12, 40444, // 4,12
+ 3, 12, 7261, 3, 13, 10559, 4, 12, 9674, 4, 13, 38042, // 4,13
+ 3, 13, 7881, 3, 14, 11721, 4, 13, 10204, 4, 14, 35730, // 4,14
+ 3, 14, 8463, 3, 15, 12899, 4, 14, 10635, 4, 15, 33539, // 4,15
+ 5, -1, 9995, 5, 0, 34567, 6, -1, 8107, 6, 0, 12867, // 5, 0
+ 5, 0, 9509, 5, 1, 36955, 6, 0, 7497, 6, 1, 11575, // 5, 1
+ 5, 1, 8902, 5, 2, 39526, 6, 1, 6829, 6, 2, 10279, // 5, 2
+ 5, 2, 8175, 5, 3, 42271, 6, 2, 6108, 6, 3, 8982, // 5, 3
+ 5, 3, 7342, 5, 4, 45146, 6, 3, 5350, 6, 4, 7698, // 5, 4
+ 5, 4, 6451, 5, 5, 48019, 6, 4, 4591, 6, 5, 6475, // 5, 5
+ 5, 5, 5624, 5, 6, 50581, 6, 5, 3913, 6, 6, 5418, // 5, 6
+ 5, 6, 5092, 5, 7, 52253, 6, 6, 3470, 6, 7, 4721, // 5, 7
+ 4, 7, 3466, 4, 8, 4708, 5, 7, 5097, 5, 8, 52265, // 5, 8
+ 4, 8, 3911, 4, 9, 5400, 5, 8, 5637, 5, 9, 50588, // 5, 9
+ 4, 9, 4591, 4, 10, 6451, 5, 9, 6475, 5, 10, 48019, // 5,10
+ 4, 10, 5353, 4, 11, 7667, 5, 10, 7377, 5, 11, 45139, // 5,11
+ 4, 11, 6116, 4, 12, 8940, 5, 11, 8224, 5, 12, 42256, // 5,12
+ 4, 12, 6842, 4, 13, 10226, 5, 12, 8966, 5, 13, 39502, // 5,13
+ 4, 13, 7517, 4, 14, 11507, 5, 13, 9587, 5, 14, 36925, // 5,14
+ 4, 14, 8135, 4, 15, 12783, 5, 14, 10086, 5, 15, 34532, // 5,15
+ 6, -1, 9558, 6, 0, 35362, 7, -1, 7839, 7, 0, 12777, // 6, 0
+ 6, 0, 9020, 6, 1, 37906, 7, 0, 7202, 7, 1, 11408, // 6, 1
+ 6, 1, 8344, 6, 2, 40688, 7, 1, 6491, 7, 2, 10013, // 6, 2
+ 6, 2, 7516, 6, 3, 43733, 7, 2, 5703, 7, 3, 8584, // 6, 3
+ 6, 3, 6530, 6, 4, 47049, 7, 3, 4838, 7, 4, 7119, // 6, 4
+ 6, 4, 5400, 6, 5, 50587, 7, 4, 3911, 7, 5, 5638, // 6, 5
+ 6, 5, 4217, 6, 6, 54105, 7, 5, 2989, 7, 6, 4225, // 6, 6
+ 6, 6, 3303, 6, 7, 56751, 7, 6, 2295, 7, 7, 3187, // 6, 7
+ 5, 7, 2294, 5, 8, 3180, 6, 7, 3306, 6, 8, 56756, // 6, 8
+ 5, 8, 2989, 5, 9, 4217, 6, 8, 4225, 6, 9, 54105, // 6, 9
+ 5, 9, 3913, 5, 10, 5624, 6, 9, 5418, 6, 10, 50581, // 6,10
+ 5, 10, 4843, 5, 11, 7100, 6, 10, 6558, 6, 11, 47035, // 6,11
+ 5, 11, 5712, 5, 12, 8558, 6, 11, 7556, 6, 12, 43710, // 6,12
+ 5, 12, 6506, 5, 13, 9977, 6, 12, 8397, 6, 13, 40656, // 6,13
+ 5, 13, 7224, 5, 14, 11360, 6, 13, 9086, 6, 14, 37866, // 6,14
+ 5, 14, 7868, 5, 15, 12717, 6, 14, 9635, 6, 15, 35316, // 6,15
+ 7, -1, 9224, 7, 0, 35905, 8, -1, 7643, 8, 0, 12764, // 7, 0
+ 7, 0, 8662, 7, 1, 38534, 8, 0, 6997, 8, 1, 11343, // 7, 1
+ 7, 1, 7951, 7, 2, 41432, 8, 1, 6266, 8, 2, 9887, // 7, 2
+ 7, 2, 7072, 7, 3, 44649, 8, 2, 5443, 8, 3, 8372, // 7, 3
+ 7, 3, 6000, 7, 4, 48240, 8, 3, 4513, 8, 4, 6783, // 7, 4
+ 7, 4, 4708, 7, 5, 52266, 8, 4, 3466, 8, 5, 5096, // 7, 5
+ 7, 5, 3180, 7, 6, 56756, 8, 5, 2294, 8, 6, 3306, // 7, 6
+ 7, 6, 1541, 7, 7, 61364, 8, 6, 1090, 8, 7, 1541, // 7, 7
+ 6, 7, 1090, 6, 8, 1541, 7, 7, 1542, 7, 8, 61363, // 7, 8
+ 6, 8, 2295, 6, 9, 3303, 7, 8, 3186, 7, 9, 56752, // 7, 9
+ 6, 9, 3470, 6, 10, 5092, 7, 9, 4721, 7, 10, 52253, // 7,10
+ 6, 10, 4521, 6, 11, 6774, 7, 10, 6023, 7, 11, 48218, // 7,11
+ 6, 11, 5454, 6, 12, 8359, 7, 11, 7106, 7, 12, 44617, // 7,12
+ 6, 12, 6284, 6, 13, 9867, 7, 12, 7996, 7, 13, 41389, // 7,13
+ 6, 13, 7020, 6, 14, 11317, 7, 13, 8718, 7, 14, 38481, // 7,14
+ 6, 14, 7674, 6, 15, 12728, 7, 14, 9290, 7, 15, 35844, // 7,15
+ 8, 0, 35844, 8, 1, 9290, 9, 0, 12728, 9, 1, 7674, // 8, 0
+ 8, 1, 38481, 8, 2, 8718, 9, 1, 11317, 9, 2, 7020, // 8, 1
+ 8, 2, 41389, 8, 3, 7996, 9, 2, 9867, 9, 3, 6284, // 8, 2
+ 8, 3, 44616, 8, 4, 7106, 9, 3, 8359, 9, 4, 5455, // 8, 3
+ 8, 4, 48218, 8, 5, 6023, 9, 4, 6774, 9, 5, 4521, // 8, 4
+ 8, 5, 52253, 8, 6, 4721, 9, 5, 5092, 9, 6, 3470, // 8, 5
+ 8, 6, 56751, 8, 7, 3186, 9, 6, 3303, 9, 7, 2296, // 8, 6
+ 8, 7, 61364, 8, 8, 1542, 9, 7, 1541, 9, 8, 1089, // 8, 7
+ 7, 8, 1542, 7, 9, 1090, 8, 8, 61364, 8, 9, 1540, // 8, 8
+ 7, 9, 3306, 7, 10, 2294, 8, 9, 56756, 8, 10, 3180, // 8, 9
+ 7, 10, 5097, 7, 11, 3466, 8, 10, 52266, 8, 11, 4707, // 8,10
+ 7, 11, 6783, 7, 12, 4513, 8, 11, 48240, 8, 12, 6000, // 8,11
+ 7, 12, 8373, 7, 13, 5443, 8, 12, 44649, 8, 13, 7071, // 8,12
+ 7, 13, 9886, 7, 14, 6266, 8, 13, 41432, 8, 14, 7952, // 8,13
+ 7, 14, 11344, 7, 15, 6997, 8, 14, 38534, 8, 15, 8661, // 8,14
+ 7, 15, 12764, 7, 16, 7643, 8, 15, 35905, 8, 16, 9224, // 8,15
+ 9, 0, 35315, 9, 1, 9635, 10, 0, 12717, 10, 1, 7869, // 9, 0
+ 9, 1, 37866, 9, 2, 9086, 10, 1, 11360, 10, 2, 7224, // 9, 1
+ 9, 2, 40656, 9, 3, 8397, 10, 2, 9977, 10, 3, 6506, // 9, 2
+ 9, 3, 43710, 9, 4, 7556, 10, 3, 8558, 10, 4, 5712, // 9, 3
+ 9, 4, 47035, 9, 5, 6558, 10, 4, 7100, 10, 5, 4843, // 9, 4
+ 9, 5, 50581, 9, 6, 5418, 10, 5, 5624, 10, 6, 3913, // 9, 5
+ 9, 6, 54105, 9, 7, 4225, 10, 6, 4217, 10, 7, 2989, // 9, 6
+ 9, 7, 56756, 9, 8, 3306, 10, 7, 3180, 10, 8, 2294, // 9, 7
+ 8, 8, 3186, 8, 9, 2295, 9, 8, 56751, 9, 9, 3304, // 9, 8
+ 8, 9, 4225, 8, 10, 2989, 9, 9, 54105, 9, 10, 4217, // 9, 9
+ 8, 10, 5637, 8, 11, 3911, 9, 10, 50587, 9, 11, 5401, // 9,10
+ 8, 11, 7119, 8, 12, 4838, 9, 11, 47049, 9, 12, 6530, // 9,11
+ 8, 12, 8584, 8, 13, 5703, 9, 12, 43733, 9, 13, 7516, // 9,12
+ 8, 13, 10013, 8, 14, 6491, 9, 13, 40688, 9, 14, 8344, // 9,13
+ 8, 14, 11407, 8, 15, 7202, 9, 14, 37906, 9, 15, 9021, // 9,14
+ 8, 15, 12777, 8, 16, 7839, 9, 15, 35362, 9, 16, 9558, // 9,15
+ 10, 0, 34532, 10, 1, 10086, 11, 0, 12783, 11, 1, 8135, // 10, 0
+ 10, 1, 36926, 10, 2, 9587, 11, 1, 11507, 11, 2, 7516, // 10, 1
+ 10, 2, 39503, 10, 3, 8966, 11, 2, 10226, 11, 3, 6841, // 10, 2
+ 10, 3, 42256, 10, 4, 8224, 11, 3, 8940, 11, 4, 6116, // 10, 3
+ 10, 4, 45139, 10, 5, 7377, 11, 4, 7667, 11, 5, 5353, // 10, 4
+ 10, 5, 48019, 10, 6, 6475, 11, 5, 6451, 11, 6, 4591, // 10, 5
+ 10, 6, 50587, 10, 7, 5637, 11, 6, 5400, 11, 7, 3912, // 10, 6
+ 10, 7, 52266, 10, 8, 5097, 11, 7, 4708, 11, 8, 3465, // 10, 7
+ 9, 8, 4721, 9, 9, 3470, 10, 8, 52253, 10, 9, 5092, // 10, 8
+ 9, 9, 5418, 9, 10, 3913, 10, 9, 50581, 10, 10, 5624, // 10, 9
+ 9, 10, 6475, 9, 11, 4591, 10, 10, 48019, 10, 11, 6451, // 10,10
+ 9, 11, 7698, 9, 12, 5350, 10, 11, 45146, 10, 12, 7342, // 10,11
+ 9, 12, 8982, 9, 13, 6108, 10, 12, 42271, 10, 13, 8175, // 10,12
+ 9, 13, 10279, 9, 14, 6829, 10, 13, 39526, 10, 14, 8902, // 10,13
+ 9, 14, 11575, 9, 15, 7497, 10, 14, 36955, 10, 15, 9509, // 10,14
+ 9, 15, 12867, 9, 16, 8107, 10, 15, 34567, 10, 16, 9995, // 10,15
+ 11, 0, 33539, 11, 1, 10635, 12, 0, 12899, 12, 1, 8463, // 11, 0
+ 11, 1, 35730, 11, 2, 10204, 12, 1, 11721, 12, 2, 7881, // 11, 1
+ 11, 2, 38042, 11, 3, 9674, 12, 2, 10559, 12, 3, 7261, // 11, 2
+ 11, 3, 40444, 11, 4, 9056, 12, 3, 9421, 12, 4, 6615, // 11, 3
+ 11, 4, 42861, 11, 5, 8378, 12, 4, 8332, 12, 5, 5965, // 11, 4
+ 11, 5, 45146, 11, 6, 7698, 12, 5, 7342, 12, 6, 5350, // 11, 5
+ 11, 6, 47049, 11, 7, 7119, 12, 6, 6530, 12, 7, 4838, // 11, 6
+ 11, 7, 48240, 11, 8, 6783, 12, 7, 6000, 12, 8, 4513, // 11, 7
+ 10, 8, 6023, 10, 9, 4521, 11, 8, 48218, 11, 9, 6774, // 11, 8
+ 10, 9, 6558, 10, 10, 4843, 11, 9, 47035, 11, 10, 7100, // 11, 9
+ 10, 10, 7377, 10, 11, 5353, 11, 10, 45139, 11, 11, 7667, // 11,10
+ 10, 11, 8378, 10, 12, 5965, 11, 11, 42861, 11, 12, 8332, // 11,11
+ 10, 12, 9478, 10, 13, 6611, 11, 12, 40452, 11, 13, 8995, // 11,12
+ 10, 13, 10630, 10, 14, 7252, 11, 13, 38057, 11, 14, 9597, // 11,13
+ 10, 14, 11810, 10, 15, 7865, 11, 14, 35750, 11, 15, 10111, // 11,14
+ 10, 15, 13007, 10, 16, 8438, 11, 15, 33564, 11, 16, 10527, // 11,15
+ 12, 0, 32391, 12, 1, 11269, 13, 0, 13038, 13, 1, 8838, // 12, 0
+ 12, 1, 34358, 12, 2, 10918, 13, 1, 11964, 13, 2, 8296, // 12, 1
+ 12, 2, 36392, 12, 3, 10488, 13, 2, 10922, 13, 3, 7734, // 12, 2
+ 12, 3, 38450, 12, 4, 9998, 13, 3, 9924, 13, 4, 7164, // 12, 3
+ 12, 4, 40452, 12, 5, 9478, 13, 4, 8995, 13, 5, 6611, // 12, 4
+ 12, 5, 42271, 12, 6, 8982, 13, 5, 8175, 13, 6, 6108, // 12, 5
+ 12, 6, 43733, 12, 7, 8584, 13, 6, 7516, 13, 7, 5703, // 12, 6
+ 12, 7, 44649, 12, 8, 8373, 13, 7, 7072, 13, 8, 5442, // 12, 7
+ 11, 8, 7106, 11, 9, 5454, 12, 8, 44616, 12, 9, 8360, // 12, 8
+ 11, 9, 7556, 11, 10, 5712, 12, 9, 43710, 12, 10, 8558, // 12, 9
+ 11, 10, 8224, 11, 11, 6116, 12, 10, 42256, 12, 11, 8940, // 12,10
+ 11, 11, 9056, 11, 12, 6615, 12, 11, 40444, 12, 12, 9421, // 12,11
+ 11, 12, 9998, 11, 13, 7164, 12, 12, 38450, 12, 13, 9924, // 12,12
+ 11, 13, 11012, 11, 14, 7728, 12, 13, 36399, 12, 14, 10397, // 12,13
+ 11, 14, 12074, 11, 15, 8284, 12, 14, 34369, 12, 15, 10809, // 12,14
+ 11, 15, 13171, 11, 16, 8816, 12, 15, 32406, 12, 16, 11143, // 12,15
+ 13, 0, 31138, 13, 1, 11977, 14, 0, 13176, 14, 1, 9245, // 13, 0
+ 13, 1, 32881, 13, 2, 11709, 14, 1, 12203, 14, 2, 8743, // 13, 1
+ 13, 2, 34650, 13, 3, 11382, 14, 2, 11272, 14, 3, 8232, // 13, 2
+ 13, 3, 36399, 13, 4, 11012, 14, 3, 10397, 14, 4, 7728, // 13, 3
+ 13, 4, 38057, 13, 5, 10630, 14, 4, 9597, 14, 5, 7252, // 13, 4
+ 13, 5, 39526, 13, 6, 10279, 14, 5, 8902, 14, 6, 6829, // 13, 5
+ 13, 6, 40688, 13, 7, 10013, 14, 6, 8344, 14, 7, 6491, // 13, 6
+ 13, 7, 41432, 13, 8, 9886, 14, 7, 7951, 14, 8, 6267, // 13, 7
+ 12, 8, 7996, 12, 9, 6284, 13, 8, 41389, 13, 9, 9867, // 13, 8
+ 12, 9, 8397, 12, 10, 6506, 13, 9, 40656, 13, 10, 9977, // 13, 9
+ 12, 10, 8966, 12, 11, 6842, 13, 10, 39503, 13, 11, 10225, // 13,10
+ 12, 11, 9674, 12, 12, 7261, 13, 11, 38042, 13, 12, 10559, // 13,11
+ 12, 12, 10488, 12, 13, 7734, 13, 12, 36392, 13, 13, 10922, // 13,12
+ 12, 13, 11382, 12, 14, 8232, 13, 13, 34650, 13, 14, 11272, // 13,13
+ 12, 14, 12334, 12, 15, 8735, 13, 14, 32886, 13, 15, 11581, // 13,14
+ 12, 15, 13332, 12, 16, 9229, 13, 15, 31146, 13, 16, 11829, // 13,15
+ 14, 0, 29828, 14, 1, 12746, 15, 0, 13291, 15, 1, 9671, // 14, 0
+ 14, 1, 31358, 14, 2, 12564, 15, 1, 12412, 15, 2, 9202, // 14, 1
+ 14, 2, 32886, 14, 3, 12334, 15, 2, 11580, 15, 3, 8736, // 14, 2
+ 14, 3, 34369, 14, 4, 12074, 15, 3, 10808, 15, 4, 8285, // 14, 3
+ 14, 4, 35750, 14, 5, 11810, 15, 4, 10111, 15, 5, 7865, // 14, 4
+ 14, 5, 36955, 14, 6, 11575, 15, 5, 9509, 15, 6, 7497, // 14, 5
+ 14, 6, 37906, 14, 7, 11407, 15, 6, 9020, 15, 7, 7203, // 14, 6
+ 14, 7, 38534, 14, 8, 11344, 15, 7, 8662, 15, 8, 6996, // 14, 7
+ 13, 8, 8718, 13, 9, 7020, 14, 8, 38481, 14, 9, 11317, // 14, 8
+ 13, 9, 9086, 13, 10, 7224, 14, 9, 37866, 14, 10, 11360, // 14, 9
+ 13, 10, 9587, 13, 11, 7517, 14, 10, 36926, 14, 11, 11506, // 14,10
+ 13, 11, 10204, 13, 12, 7881, 14, 11, 35730, 14, 12, 11721, // 14,11
+ 13, 12, 10918, 13, 13, 8296, 14, 12, 34358, 14, 13, 11964, // 14,12
+ 13, 13, 11709, 13, 14, 8742, 14, 13, 32881, 14, 14, 12204, // 14,13
+ 13, 14, 12564, 13, 15, 9202, 14, 14, 31358, 14, 15, 12412, // 14,14
+ 13, 15, 13470, 13, 16, 9662, 14, 15, 29831, 14, 16, 12573, // 14,15
+ 15, 0, 28495, 15, 1, 13569, 16, 0, 13368, 16, 1, 10104, // 15, 0
+ 15, 1, 29831, 15, 2, 13470, 16, 1, 12574, 16, 2, 9661, // 15, 1
+ 15, 2, 31146, 15, 3, 13332, 16, 2, 11829, 16, 3, 9229, // 15, 2
+ 15, 3, 32406, 15, 4, 13171, 16, 3, 11143, 16, 4, 8816, // 15, 3
+ 15, 4, 33564, 15, 5, 13007, 16, 4, 10528, 16, 5, 8437, // 15, 4
+ 15, 5, 34567, 15, 6, 12867, 16, 5, 9995, 16, 6, 8107, // 15, 5
+ 15, 6, 35362, 15, 7, 12777, 16, 6, 9558, 16, 7, 7839, // 15, 6
+ 15, 7, 35905, 15, 8, 12764, 16, 7, 9224, 16, 8, 7643, // 15, 7
+ 14, 8, 9290, 14, 9, 7674, 15, 8, 35844, 15, 9, 12728, // 15, 8
+ 14, 9, 9635, 14, 10, 7868, 15, 9, 35315, 15, 10, 12718, // 15, 9
+ 14, 10, 10086, 14, 11, 8135, 15, 10, 34532, 15, 11, 12783, // 15,10
+ 14, 11, 10635, 14, 12, 8463, 15, 11, 33539, 15, 12, 12899, // 15,11
+ 14, 12, 11269, 14, 13, 8838, 15, 12, 32391, 15, 13, 13038, // 15,12
+ 14, 13, 11977, 14, 14, 9245, 15, 13, 31138, 15, 14, 13176, // 15,13
+ 14, 14, 12746, 14, 15, 9671, 15, 14, 29828, 15, 15, 13291, // 15,14
+ 14, 15, 13569, 14, 16, 10104, 15, 15, 28495, 15, 16, 13368, // 15,15
+ // angle of 2.5 degrees
+ 0, -1, 14696, 0, 0, 24063, 1, -1, 11702, 1, 0, 15075, // 0, 0
+ 0, 0, 14872, 0, 1, 25368, 1, 0, 11187, 1, 1, 14109, // 0, 1
+ 0, 1, 14990, 0, 2, 26660, 1, 1, 10676, 1, 2, 13210, // 0, 2
+ 0, 2, 15060, 0, 3, 27903, 1, 2, 10185, 1, 3, 12388, // 0, 3
+ 0, 3, 15100, 0, 4, 29055, 1, 3, 9728, 1, 4, 11653, // 0, 4
+ 0, 4, 15135, 0, 5, 30064, 1, 4, 9323, 1, 5, 11014, // 0, 5
+ 0, 5, 15193, 0, 6, 30876, 1, 5, 8986, 1, 6, 10481, // 0, 6
+ 0, 6, 15301, 0, 7, 31444, 1, 6, 8727, 1, 7, 10064, // 0, 7
+ -1, 7, 8669, -1, 8, 9959, 0, 7, 15376, 0, 8, 31532, // 0, 8
+ -1, 8, 8927, -1, 9, 10351, 0, 8, 15319, 0, 9, 30939, // 0, 9
+ -1, 9, 9265, -1, 10, 10855, 0, 9, 15311, 0, 10, 30105, // 0,10
+ -1, 10, 9673, -1, 11, 11461, 0, 10, 15325, 0, 11, 29077, // 0,11
+ -1, 11, 10135, -1, 12, 12159, 0, 11, 15330, 0, 12, 27912, // 0,12
+ -1, 12, 10637, -1, 13, 12938, 0, 12, 15301, 0, 13, 26660, // 0,13
+ -1, 13, 11164, -1, 14, 13787, 0, 13, 15220, 0, 14, 25365, // 0,14
+ -1, 14, 11702, -1, 15, 14696, 0, 14, 15076, 0, 15, 24062, // 0,15
+ 1, -1, 13787, 1, 0, 25366, 2, -1, 11164, 2, 0, 15219, // 1, 0
+ 1, 0, 13853, 1, 1, 26893, 2, 0, 10644, 2, 1, 14146, // 1, 1
+ 1, 1, 13850, 1, 2, 28427, 2, 1, 10119, 2, 2, 13140, // 1, 2
+ 1, 2, 13789, 1, 3, 29928, 2, 2, 9603, 2, 3, 12216, // 1, 3
+ 1, 3, 13694, 1, 4, 31339, 2, 3, 9118, 2, 4, 11385, // 1, 4
+ 1, 4, 13600, 1, 5, 32586, 2, 4, 8685, 2, 5, 10665, // 1, 5
+ 1, 5, 13548, 1, 6, 33585, 2, 5, 8329, 2, 6, 10074, // 1, 6
+ 1, 6, 13582, 1, 7, 34261, 2, 6, 8068, 2, 7, 9625, // 1, 7
+ 0, 7, 8024, 0, 8, 9534, 1, 7, 13638, 1, 8, 34340, // 1, 8
+ 0, 8, 8286, 0, 9, 9961, 1, 8, 13647, 1, 9, 33642, // 1, 9
+ 0, 9, 8645, 0, 10, 10528, 1, 9, 13740, 1, 10, 32623, // 1,10
+ 0, 10, 9082, 0, 11, 11218, 1, 10, 13875, 1, 11, 31361, // 1,11
+ 0, 11, 9575, 0, 12, 12014, 1, 11, 14009, 1, 12, 29938, // 1,12
+ 0, 12, 10102, 0, 13, 12897, 1, 12, 14107, 1, 13, 28430, // 1,13
+ 0, 13, 10644, 0, 14, 13853, 1, 13, 14145, 1, 14, 26894, // 1,14
+ 0, 14, 11187, 0, 15, 14872, 1, 14, 14109, 1, 15, 25368, // 1,15
+ 2, -1, 12938, 2, 0, 26660, 3, -1, 10637, 3, 0, 15301, // 2, 0
+ 2, 0, 12897, 2, 1, 28430, 3, 0, 10102, 3, 1, 14107, // 2, 1
+ 2, 1, 12769, 2, 2, 30239, 3, 1, 9546, 3, 2, 12982, // 2, 2
+ 2, 2, 12569, 2, 3, 32045, 3, 2, 8988, 3, 3, 11934, // 2, 3
+ 2, 3, 12323, 2, 4, 33777, 3, 3, 8452, 3, 4, 10984, // 2, 4
+ 2, 4, 12079, 2, 5, 35332, 3, 4, 7969, 3, 5, 10156, // 2, 5
+ 2, 5, 11897, 2, 6, 36582, 3, 5, 7573, 3, 6, 9484, // 2, 6
+ 2, 6, 11842, 2, 7, 37402, 3, 6, 7298, 3, 7, 8994, // 2, 7
+ 1, 7, 7266, 1, 8, 8918, 2, 7, 11883, 2, 8, 37469, // 2, 8
+ 1, 8, 7543, 1, 9, 9390, 2, 8, 11972, 2, 9, 36631, // 2, 9
+ 1, 9, 7943, 1, 10, 10041, 2, 9, 12188, 2, 10, 35364, // 2,10
+ 1, 10, 8432, 1, 11, 10842, 2, 10, 12467, 2, 11, 33795, // 2,11
+ 1, 11, 8976, 1, 12, 11760, 2, 11, 12747, 2, 12, 32053, // 2,12
+ 1, 12, 9546, 1, 13, 12769, 2, 12, 12982, 2, 13, 30239, // 2,13
+ 1, 13, 10119, 1, 14, 13850, 2, 13, 13141, 2, 14, 28426, // 2,14
+ 1, 14, 10676, 1, 15, 14990, 2, 14, 13211, 2, 15, 26659, // 2,15
+ 3, -1, 12159, 3, 0, 27912, 4, -1, 10135, 4, 0, 15330, // 3, 0
+ 3, 0, 12014, 3, 1, 29938, 4, 0, 9575, 4, 1, 14009, // 3, 1
+ 3, 1, 11760, 3, 2, 32052, 4, 1, 8976, 4, 2, 12748, // 3, 2
+ 3, 2, 11411, 3, 3, 34213, 4, 2, 8358, 4, 3, 11554, // 3, 3
+ 3, 3, 10995, 3, 4, 36343, 4, 3, 7746, 4, 4, 10452, // 3, 4
+ 3, 4, 10569, 3, 5, 38307, 4, 4, 7180, 4, 5, 9480, // 3, 5
+ 3, 5, 10221, 3, 6, 39912, 4, 5, 6714, 4, 6, 8689, // 3, 6
+ 3, 6, 10051, 3, 7, 40940, 4, 6, 6403, 4, 7, 8142, // 3, 7
+ 2, 7, 6381, 2, 8, 8082, 3, 7, 10079, 3, 8, 40994, // 3, 8
+ 2, 8, 6695, 2, 9, 8617, 3, 8, 10275, 3, 9, 39949, // 3, 9
+ 2, 9, 7165, 2, 10, 9388, 3, 9, 10653, 3, 10, 38330, // 3,10
+ 2, 10, 7737, 2, 11, 10337, 3, 10, 11108, 3, 11, 36354, // 3,11
+ 2, 11, 8358, 2, 12, 11411, 3, 11, 11554, 3, 12, 34213, // 3,12
+ 2, 12, 8988, 2, 13, 12569, 3, 12, 11934, 3, 13, 32045, // 3,13
+ 2, 13, 9603, 2, 14, 13789, 3, 13, 12216, 3, 14, 29928, // 3,14
+ 2, 14, 10185, 2, 15, 15060, 3, 14, 12388, 3, 15, 27903, // 3,15
+ 4, -1, 11461, 4, 0, 29078, 5, -1, 9673, 5, 0, 15324, // 4, 0
+ 4, 0, 11218, 4, 1, 31361, 5, 0, 9082, 5, 1, 13875, // 4, 1
+ 4, 1, 10842, 4, 2, 33795, 5, 1, 8432, 5, 2, 12467, // 4, 2
+ 4, 2, 10337, 4, 3, 36354, 5, 2, 7737, 5, 3, 11108, // 4, 3
+ 4, 3, 9730, 4, 4, 38966, 5, 3, 7022, 5, 4, 9818, // 4, 4
+ 4, 4, 9081, 4, 5, 41475, 5, 4, 6334, 5, 5, 8646, // 4, 5
+ 4, 5, 8507, 4, 6, 43602, 5, 5, 5749, 5, 6, 7678, // 4, 6
+ 4, 6, 8177, 4, 7, 44962, 5, 6, 5368, 5, 7, 7029, // 4, 7
+ 3, 7, 5354, 3, 8, 6987, 4, 7, 8195, 4, 8, 45000, // 4, 8
+ 3, 8, 5739, 3, 9, 7626, 4, 8, 8545, 4, 9, 43626, // 4, 9
+ 3, 9, 6328, 3, 10, 8578, 4, 9, 9143, 4, 10, 41487, // 4,10
+ 3, 10, 7022, 3, 11, 9730, 4, 10, 9818, 4, 11, 38966, // 4,11
+ 3, 11, 7746, 3, 12, 10995, 4, 11, 10452, 4, 12, 36343, // 4,12
+ 3, 12, 8452, 3, 13, 12323, 4, 12, 10983, 4, 13, 33778, // 4,13
+ 3, 13, 9118, 3, 14, 13694, 4, 13, 11385, 4, 14, 31339, // 4,14
+ 3, 14, 9728, 3, 15, 15100, 4, 14, 11652, 4, 15, 29056, // 4,15
+ 5, -1, 10855, 5, 0, 30105, 6, -1, 9265, 6, 0, 15311, // 5, 0
+ 5, 0, 10528, 5, 1, 32624, 6, 0, 8645, 6, 1, 13739, // 5, 1
+ 5, 1, 10041, 5, 2, 35364, 6, 1, 7943, 6, 2, 12188, // 5, 2
+ 5, 2, 9388, 5, 3, 38330, 6, 2, 7165, 6, 3, 10653, // 5, 3
+ 5, 3, 8578, 5, 4, 41487, 6, 3, 6328, 6, 4, 9143, // 5, 4
+ 5, 4, 7659, 5, 5, 44700, 6, 4, 5472, 6, 5, 7705, // 5, 5
+ 5, 5, 6768, 5, 6, 47619, 6, 5, 4694, 6, 6, 6455, // 5, 6
+ 5, 6, 6183, 5, 7, 49566, 6, 6, 4172, 6, 7, 5615, // 5, 7
+ 4, 7, 4164, 4, 8, 5590, 5, 7, 6193, 5, 8, 49589, // 5, 8
+ 4, 8, 4690, 4, 9, 6422, 5, 8, 6794, 5, 9, 47630, // 5, 9
+ 4, 9, 5472, 4, 10, 7659, 5, 9, 7705, 5, 10, 44700, // 5,10
+ 4, 10, 6334, 4, 11, 9081, 5, 10, 8646, 5, 11, 41475, // 5,11
+ 4, 11, 7180, 4, 12, 10569, 5, 11, 9479, 5, 12, 38308, // 5,12
+ 4, 12, 7969, 4, 13, 12079, 5, 12, 10156, 5, 13, 35332, // 5,13
+ 4, 13, 8685, 4, 14, 13600, 5, 13, 10665, 5, 14, 32586, // 5,14
+ 4, 14, 9323, 4, 15, 15135, 5, 14, 11013, 5, 15, 30065, // 5,15
+ 6, -1, 10351, 6, 0, 30939, 7, -1, 8927, 7, 0, 15319, // 6, 0
+ 6, 0, 9961, 6, 1, 33642, 7, 0, 8286, 7, 1, 13647, // 6, 1
+ 6, 1, 9390, 6, 2, 36631, 7, 1, 7543, 7, 2, 11972, // 6, 2
+ 6, 2, 8617, 6, 3, 39949, 7, 2, 6695, 7, 3, 10275, // 6, 3
+ 6, 3, 7626, 6, 4, 43626, 7, 3, 5739, 7, 4, 8545, // 6, 4
+ 6, 4, 6422, 6, 5, 47630, 7, 4, 4690, 7, 5, 6794, // 6, 5
+ 6, 5, 5099, 6, 6, 51701, 7, 5, 3620, 7, 6, 5116, // 6, 6
+ 6, 6, 4044, 6, 7, 54831, 7, 6, 2797, 7, 7, 3864, // 6, 7
+ 5, 7, 2795, 5, 8, 3853, 6, 7, 4049, 6, 8, 54839, // 6, 8
+ 5, 8, 3620, 5, 9, 5099, 6, 8, 5116, 6, 9, 51701, // 6, 9
+ 5, 9, 4694, 5, 10, 6768, 6, 9, 6455, 6, 10, 47619, // 6,10
+ 5, 10, 5749, 5, 11, 8507, 6, 10, 7678, 6, 11, 43602, // 6,11
+ 5, 11, 6714, 5, 12, 10221, 6, 11, 8690, 6, 12, 39911, // 6,12
+ 5, 12, 7573, 5, 13, 11897, 6, 12, 9484, 6, 13, 36582, // 6,13
+ 5, 13, 8329, 5, 14, 13548, 6, 13, 10074, 6, 14, 33585, // 6,14
+ 5, 14, 8986, 5, 15, 15193, 6, 14, 10482, 6, 15, 30875, // 6,15
+ 7, -1, 9959, 7, 0, 31532, 8, -1, 8669, 8, 0, 15376, // 7, 0
+ 7, 0, 9534, 7, 1, 34340, 8, 0, 8024, 8, 1, 13638, // 7, 1
+ 7, 1, 8918, 7, 2, 37470, 8, 1, 7266, 8, 2, 11882, // 7, 2
+ 7, 2, 8082, 7, 3, 40994, 8, 2, 6381, 8, 3, 10079, // 7, 3
+ 7, 3, 6987, 7, 4, 44999, 8, 3, 5354, 8, 4, 8196, // 7, 4
+ 7, 4, 5590, 7, 5, 49588, 8, 4, 4164, 8, 5, 6194, // 7, 5
+ 7, 5, 3853, 7, 6, 54839, 8, 5, 2795, 8, 6, 4049, // 7, 6
+ 7, 6, 1903, 7, 7, 60382, 8, 6, 1347, 8, 7, 1904, // 7, 7
+ 6, 7, 1347, 6, 8, 1903, 7, 7, 1905, 7, 8, 60381, // 7, 8
+ 6, 8, 2797, 6, 9, 4044, 7, 8, 3864, 7, 9, 54831, // 7, 9
+ 6, 9, 4172, 6, 10, 6183, 7, 9, 5615, 7, 10, 49566, // 7,10
+ 6, 10, 5368, 6, 11, 8177, 7, 10, 7029, 7, 11, 44962, // 7,11
+ 6, 11, 6403, 6, 12, 10051, 7, 11, 8141, 7, 12, 40941, // 7,12
+ 6, 12, 7298, 6, 13, 11842, 7, 12, 8994, 7, 13, 37402, // 7,13
+ 6, 13, 8068, 6, 14, 13582, 7, 13, 9626, 7, 14, 34260, // 7,14
+ 6, 14, 8727, 6, 15, 15301, 7, 14, 10065, 7, 15, 31443, // 7,15
+ 8, 0, 31444, 8, 1, 10065, 9, 0, 15301, 9, 1, 8726, // 8, 0
+ 8, 1, 34261, 8, 2, 9626, 9, 1, 13582, 9, 2, 8067, // 8, 1
+ 8, 2, 37402, 8, 3, 8994, 9, 2, 11842, 9, 3, 7298, // 8, 2
+ 8, 3, 40940, 8, 4, 8141, 9, 3, 10051, 9, 4, 6404, // 8, 3
+ 8, 4, 44962, 8, 5, 7029, 9, 4, 8177, 9, 5, 5368, // 8, 4
+ 8, 5, 49566, 8, 6, 5615, 9, 5, 6183, 9, 6, 4172, // 8, 5
+ 8, 6, 54831, 8, 7, 3864, 9, 6, 4044, 9, 7, 2797, // 8, 6
+ 8, 7, 60382, 8, 8, 1905, 9, 7, 1903, 9, 8, 1346, // 8, 7
+ 7, 8, 1905, 7, 9, 1347, 8, 8, 60382, 8, 9, 1902, // 8, 8
+ 7, 9, 4049, 7, 10, 2795, 8, 9, 54839, 8, 10, 3853, // 8, 9
+ 7, 10, 6193, 7, 11, 4164, 8, 10, 49588, 8, 11, 5591, // 8,10
+ 7, 11, 8195, 7, 12, 5354, 8, 11, 44999, 8, 12, 6988, // 8,11
+ 7, 12, 10079, 7, 13, 6381, 8, 12, 40994, 8, 13, 8082, // 8,12
+ 7, 13, 11883, 7, 14, 7266, 8, 13, 37470, 8, 14, 8917, // 8,13
+ 7, 14, 13638, 7, 15, 8024, 8, 14, 34340, 8, 15, 9534, // 8,14
+ 7, 15, 15376, 7, 16, 8669, 8, 15, 31532, 8, 16, 9959, // 8,15
+ 9, 0, 30876, 9, 1, 10482, 10, 0, 15193, 10, 1, 8985, // 9, 0
+ 9, 1, 33585, 9, 2, 10074, 10, 1, 13548, 10, 2, 8329, // 9, 1
+ 9, 2, 36582, 9, 3, 9484, 10, 2, 11897, 10, 3, 7573, // 9, 2
+ 9, 3, 39912, 9, 4, 8690, 10, 3, 10221, 10, 4, 6713, // 9, 3
+ 9, 4, 43602, 9, 5, 7678, 10, 4, 8507, 10, 5, 5749, // 9, 4
+ 9, 5, 47619, 9, 6, 6455, 10, 5, 6768, 10, 6, 4694, // 9, 5
+ 9, 6, 51701, 9, 7, 5116, 10, 6, 5099, 10, 7, 3620, // 9, 6
+ 9, 7, 54839, 9, 8, 4049, 10, 7, 3853, 10, 8, 2795, // 9, 7
+ 8, 8, 3864, 8, 9, 2797, 9, 8, 54831, 9, 9, 4044, // 9, 8
+ 8, 9, 5116, 8, 10, 3620, 9, 9, 51701, 9, 10, 5099, // 9, 9
+ 8, 10, 6794, 8, 11, 4690, 9, 10, 47630, 9, 11, 6422, // 9,10
+ 8, 11, 8545, 8, 12, 5739, 9, 11, 43626, 9, 12, 7626, // 9,11
+ 8, 12, 10275, 8, 13, 6695, 9, 12, 39949, 9, 13, 8617, // 9,12
+ 8, 13, 11972, 8, 14, 7543, 9, 13, 36631, 9, 14, 9390, // 9,13
+ 8, 14, 13647, 8, 15, 8286, 9, 14, 33642, 9, 15, 9961, // 9,14
+ 8, 15, 15319, 8, 16, 8927, 9, 15, 30939, 9, 16, 10351, // 9,15
+ 10, 0, 30064, 10, 1, 11013, 11, 0, 15135, 11, 1, 9324, // 10, 0
+ 10, 1, 32586, 10, 2, 10665, 11, 1, 13600, 11, 2, 8685, // 10, 1
+ 10, 2, 35332, 10, 3, 10156, 11, 2, 12079, 11, 3, 7969, // 10, 2
+ 10, 3, 38307, 10, 4, 9479, 11, 3, 10569, 11, 4, 7181, // 10, 3
+ 10, 4, 41475, 10, 5, 8646, 11, 4, 9081, 11, 5, 6334, // 10, 4
+ 10, 5, 44700, 10, 6, 7705, 11, 5, 7659, 11, 6, 5472, // 10, 5
+ 10, 6, 47630, 10, 7, 6794, 11, 6, 6422, 11, 7, 4690, // 10, 6
+ 10, 7, 49588, 10, 8, 6193, 11, 7, 5590, 11, 8, 4165, // 10, 7
+ 9, 8, 5615, 9, 9, 4172, 10, 8, 49566, 10, 9, 6183, // 10, 8
+ 9, 9, 6455, 9, 10, 4694, 10, 9, 47619, 10, 10, 6768, // 10, 9
+ 9, 10, 7705, 9, 11, 5472, 10, 10, 44700, 10, 11, 7659, // 10,10
+ 9, 11, 9143, 9, 12, 6328, 10, 11, 41487, 10, 12, 8578, // 10,11
+ 9, 12, 10653, 9, 13, 7165, 10, 12, 38330, 10, 13, 9388, // 10,12
+ 9, 13, 12188, 9, 14, 7943, 10, 13, 35364, 10, 14, 10041, // 10,13
+ 9, 14, 13740, 9, 15, 8645, 10, 14, 32624, 10, 15, 10527, // 10,14
+ 9, 15, 15311, 9, 16, 9265, 10, 15, 30105, 10, 16, 10855, // 10,15
+ 11, 0, 29055, 11, 1, 11652, 12, 0, 15100, 12, 1, 9729, // 11, 0
+ 11, 1, 31339, 11, 2, 11385, 12, 1, 13694, 12, 2, 9118, // 11, 1
+ 11, 2, 33777, 11, 3, 10983, 12, 2, 12323, 12, 3, 8453, // 11, 2
+ 11, 3, 36343, 11, 4, 10452, 12, 3, 10995, 12, 4, 7746, // 11, 3
+ 11, 4, 38966, 11, 5, 9818, 12, 4, 9730, 12, 5, 7022, // 11, 4
+ 11, 5, 41487, 11, 6, 9143, 12, 5, 8578, 12, 6, 6328, // 11, 5
+ 11, 6, 43626, 11, 7, 8545, 12, 6, 7626, 12, 7, 5739, // 11, 6
+ 11, 7, 44999, 11, 8, 8195, 12, 7, 6987, 12, 8, 5355, // 11, 7
+ 10, 8, 7029, 10, 9, 5368, 11, 8, 44962, 11, 9, 8177, // 11, 8
+ 10, 9, 7678, 10, 10, 5749, 11, 9, 43602, 11, 10, 8507, // 11, 9
+ 10, 10, 8646, 10, 11, 6334, 11, 10, 41475, 11, 11, 9081, // 11,10
+ 10, 11, 9818, 10, 12, 7022, 11, 11, 38966, 11, 12, 9730, // 11,11
+ 10, 12, 11108, 10, 13, 7737, 11, 12, 36354, 11, 13, 10337, // 11,12
+ 10, 13, 12467, 10, 14, 8432, 11, 13, 33795, 11, 14, 10842, // 11,13
+ 10, 14, 13875, 10, 15, 9082, 11, 14, 31361, 11, 15, 11218, // 11,14
+ 10, 15, 15325, 10, 16, 9673, 11, 15, 29078, 11, 16, 11460, // 11,15
+ 12, 0, 27903, 12, 1, 12388, 13, 0, 15060, 13, 1, 10185, // 12, 0
+ 12, 1, 29928, 12, 2, 12216, 13, 1, 13789, 13, 2, 9603, // 12, 1
+ 12, 2, 32045, 12, 3, 11934, 13, 2, 12569, 13, 3, 8988, // 12, 2
+ 12, 3, 34213, 12, 4, 11554, 13, 3, 11411, 13, 4, 8358, // 12, 3
+ 12, 4, 36354, 12, 5, 11108, 13, 4, 10337, 13, 5, 7737, // 12, 4
+ 12, 5, 38330, 12, 6, 10653, 13, 5, 9388, 13, 6, 7165, // 12, 5
+ 12, 6, 39949, 12, 7, 10275, 13, 6, 8617, 13, 7, 6695, // 12, 6
+ 12, 7, 40994, 12, 8, 10079, 13, 7, 8082, 13, 8, 6381, // 12, 7
+ 11, 8, 8141, 11, 9, 6403, 12, 8, 40940, 12, 9, 10052, // 12, 8
+ 11, 9, 8690, 11, 10, 6714, 12, 9, 39912, 12, 10, 10220, // 12, 9
+ 11, 10, 9479, 11, 11, 7180, 12, 10, 38307, 12, 11, 10570, // 12,10
+ 11, 11, 10452, 11, 12, 7746, 12, 11, 36343, 12, 12, 10995, // 12,11
+ 11, 12, 11554, 11, 13, 8358, 12, 12, 34213, 12, 13, 11411, // 12,12
+ 11, 13, 12747, 11, 14, 8976, 12, 13, 32052, 12, 14, 11761, // 12,13
+ 11, 14, 14009, 11, 15, 9575, 12, 14, 29938, 12, 15, 12014, // 12,14
+ 11, 15, 15330, 11, 16, 10135, 12, 15, 27912, 12, 16, 12159, // 12,15
+ 13, 0, 26660, 13, 1, 13211, 14, 0, 14990, 14, 1, 10675, // 13, 0
+ 13, 1, 28427, 13, 2, 13141, 14, 1, 13850, 14, 2, 10118, // 13, 1
+ 13, 2, 30239, 13, 3, 12982, 14, 2, 12769, 14, 3, 9546, // 13, 2
+ 13, 3, 32052, 13, 4, 12747, 14, 3, 11760, 14, 4, 8977, // 13, 3
+ 13, 4, 33795, 13, 5, 12467, 14, 4, 10842, 14, 5, 8432, // 13, 4
+ 13, 5, 35364, 13, 6, 12188, 14, 5, 10041, 14, 6, 7943, // 13, 5
+ 13, 6, 36631, 13, 7, 11972, 14, 6, 9390, 14, 7, 7543, // 13, 6
+ 13, 7, 37470, 13, 8, 11883, 14, 7, 8918, 14, 8, 7265, // 13, 7
+ 12, 8, 8994, 12, 9, 7298, 13, 8, 37402, 13, 9, 11842, // 13, 8
+ 12, 9, 9484, 12, 10, 7573, 13, 9, 36582, 13, 10, 11897, // 13, 9
+ 12, 10, 10156, 12, 11, 7969, 13, 10, 35332, 13, 11, 12079, // 13,10
+ 12, 11, 10983, 12, 12, 8452, 13, 11, 33777, 13, 12, 12324, // 13,11
+ 12, 12, 11934, 12, 13, 8988, 13, 12, 32045, 13, 13, 12569, // 13,12
+ 12, 13, 12982, 12, 14, 9546, 13, 13, 30239, 13, 14, 12769, // 13,13
+ 12, 14, 14107, 12, 15, 10102, 13, 14, 28430, 13, 15, 12897, // 13,14
+ 12, 15, 15301, 12, 16, 10637, 13, 15, 26660, 13, 16, 12938, // 13,15
+ 14, 0, 25368, 14, 1, 14109, 15, 0, 14872, 15, 1, 11187, // 14, 0
+ 14, 1, 26893, 14, 2, 14145, 15, 1, 13853, 15, 2, 10645, // 14, 1
+ 14, 2, 28430, 14, 3, 14107, 15, 2, 12897, 15, 3, 10102, // 14, 2
+ 14, 3, 29938, 14, 4, 14009, 15, 3, 12014, 15, 4, 9575, // 14, 3
+ 14, 4, 31361, 14, 5, 13875, 15, 4, 11218, 15, 5, 9082, // 14, 4
+ 14, 5, 32624, 14, 6, 13740, 15, 5, 10528, 15, 6, 8644, // 14, 5
+ 14, 6, 33642, 14, 7, 13647, 15, 6, 9961, 15, 7, 8286, // 14, 6
+ 14, 7, 34340, 14, 8, 13638, 15, 7, 9534, 15, 8, 8024, // 14, 7
+ 13, 8, 9626, 13, 9, 8068, 14, 8, 34261, 14, 9, 13581, // 14, 8
+ 13, 9, 10074, 13, 10, 8329, 14, 9, 33585, 14, 10, 13548, // 14, 9
+ 13, 10, 10665, 13, 11, 8685, 14, 10, 32586, 14, 11, 13600, // 14,10
+ 13, 11, 11385, 13, 12, 9118, 14, 11, 31339, 14, 12, 13694, // 14,11
+ 13, 12, 12216, 13, 13, 9603, 14, 12, 29928, 14, 13, 13789, // 14,12
+ 13, 13, 13141, 13, 14, 10119, 14, 13, 28427, 14, 14, 13849, // 14,13
+ 13, 14, 14145, 13, 15, 10644, 14, 14, 26893, 14, 15, 13854, // 14,14
+ 13, 15, 15220, 13, 16, 11164, 14, 15, 25366, 14, 16, 13786, // 14,15
+ 15, 0, 24063, 15, 1, 15076, 16, 0, 14696, 16, 1, 11701, // 15, 0
+ 15, 1, 25366, 15, 2, 15220, 16, 1, 13787, 16, 2, 11163, // 15, 1
+ 15, 2, 26660, 15, 3, 15301, 16, 2, 12938, 16, 3, 10637, // 15, 2
+ 15, 3, 27912, 15, 4, 15330, 16, 3, 12159, 16, 4, 10135, // 15, 3
+ 15, 4, 29078, 15, 5, 15325, 16, 4, 11461, 16, 5, 9672, // 15, 4
+ 15, 5, 30105, 15, 6, 15311, 16, 5, 10855, 16, 6, 9265, // 15, 5
+ 15, 6, 30939, 15, 7, 15319, 16, 6, 10351, 16, 7, 8927, // 15, 6
+ 15, 7, 31532, 15, 8, 15376, 16, 7, 9959, 16, 8, 8669, // 15, 7
+ 14, 8, 10065, 14, 9, 8727, 15, 8, 31444, 15, 9, 15300, // 15, 8
+ 14, 9, 10482, 14, 10, 8986, 15, 9, 30876, 15, 10, 15192, // 15, 9
+ 14, 10, 11013, 14, 11, 9323, 15, 10, 30064, 15, 11, 15136, // 15,10
+ 14, 11, 11652, 14, 12, 9728, 15, 11, 29055, 15, 12, 15101, // 15,11
+ 14, 12, 12388, 14, 13, 10185, 15, 12, 27903, 15, 13, 15060, // 15,12
+ 14, 13, 13211, 14, 14, 10676, 15, 13, 26660, 15, 14, 14989, // 15,13
+ 14, 14, 14109, 14, 15, 11187, 15, 14, 25368, 15, 15, 14872, // 15,14
+ 14, 15, 15076, 14, 16, 11702, 15, 15, 24063, 15, 16, 14695, // 15,15
diff --git a/vp8/common/seg_common.c b/vp8/common/seg_common.c
new file mode 100644
index 000000000..3ba374a49
--- /dev/null
+++ b/vp8/common/seg_common.c
@@ -0,0 +1,167 @@
+/*
+ * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "vp8/common/seg_common.h"
+
+const int segfeaturedata_signed[SEG_LVL_MAX] = {1, 1, 0, 0, 0, 0};
+const int vp8_seg_feature_data_bits[SEG_LVL_MAX] =
+ {QINDEX_BITS, 6, 4, 4, 6, 2};
+
+// These functions provide access to new segment level features.
+// Eventually these function may be "optimized out" but for the moment,
+// the coding mechanism is still subject to change so these provide a
+// convenient single point of change.
+
+int segfeature_active( MACROBLOCKD *xd,
+ int segment_id,
+ SEG_LVL_FEATURES feature_id )
+{
+ // Return true if mask bit set and segmentation enabled.
+ return ( xd->segmentation_enabled &&
+ ( xd->segment_feature_mask[segment_id] &
+ (0x01 << feature_id) ) );
+}
+
+void clearall_segfeatures( MACROBLOCKD *xd )
+{
+ vpx_memset(xd->segment_feature_data, 0, sizeof(xd->segment_feature_data));
+ vpx_memset(xd->segment_feature_mask, 0, sizeof(xd->segment_feature_mask));
+}
+
+void enable_segfeature( MACROBLOCKD *xd,
+ int segment_id,
+ SEG_LVL_FEATURES feature_id )
+{
+ xd->segment_feature_mask[segment_id] |= (0x01 << feature_id);
+}
+
+void disable_segfeature( MACROBLOCKD *xd,
+ int segment_id,
+ SEG_LVL_FEATURES feature_id )
+{
+ xd->segment_feature_mask[segment_id] &= ~(1 << feature_id);
+}
+
+int seg_feature_data_bits( SEG_LVL_FEATURES feature_id )
+{
+ return vp8_seg_feature_data_bits[feature_id];
+}
+
+int is_segfeature_signed( SEG_LVL_FEATURES feature_id )
+{
+ return ( segfeaturedata_signed[feature_id] );
+}
+
+void clear_segdata( MACROBLOCKD *xd,
+ int segment_id,
+ SEG_LVL_FEATURES feature_id)
+{
+ xd->segment_feature_data[segment_id][feature_id] = 0;
+}
+
+void set_segdata( MACROBLOCKD *xd,
+ int segment_id,
+ SEG_LVL_FEATURES feature_id,
+ int seg_data )
+{
+ xd->segment_feature_data[segment_id][feature_id] = seg_data;
+}
+
+int get_segdata( MACROBLOCKD *xd,
+ int segment_id,
+ SEG_LVL_FEATURES feature_id )
+{
+ return xd->segment_feature_data[segment_id][feature_id];
+}
+#if CONFIG_FEATUREUPDATES
+int old_segfeature_active( MACROBLOCKD *xd,
+ int segment_id,
+ SEG_LVL_FEATURES feature_id )
+{
+ // Return true if mask bit set and segmentation enabled.
+ return ( xd->segmentation_enabled &&
+ ( xd->old_segment_feature_mask[segment_id] &
+ (0x01 << feature_id) ) );
+}
+
+int get_old_segdata( MACROBLOCKD *xd,
+ int segment_id,
+ SEG_LVL_FEATURES feature_id )
+{
+ return xd->old_segment_feature_data[segment_id][feature_id];
+}
+
+int segfeature_changed( MACROBLOCKD *xd,
+ int segment_id,
+ SEG_LVL_FEATURES feature_id )
+{
+ // Return true if mask bit or data is different from last time
+ return
+ ( xd->segmentation_enabled &&
+ (
+ (xd->old_segment_feature_mask[segment_id] & (1 << feature_id) ) !=
+ (xd->segment_feature_mask[segment_id] & (1 << feature_id) )
+ || xd->old_segment_feature_data[segment_id][feature_id] !=
+ xd->segment_feature_data[segment_id][feature_id]
+ )
+ );
+}
+
+void save_segment_info ( MACROBLOCKD *xd )
+{
+ int i,j;
+ for (i = 0; i < MAX_MB_SEGMENTS; i++)
+ {
+ xd->old_segment_feature_mask[i] = xd->segment_feature_mask[i];
+
+ // For each segmentation codable feature...
+ for (j = 0; j < SEG_LVL_MAX; j++)
+ {
+ xd->old_segment_feature_data[i][j]=xd->segment_feature_data[i][j];
+
+ }
+ }
+}
+#endif
+void clear_segref( MACROBLOCKD *xd, int segment_id )
+{
+ xd->segment_feature_data[segment_id][SEG_LVL_REF_FRAME] = 0;
+}
+
+void set_segref( MACROBLOCKD *xd,
+ int segment_id,
+ MV_REFERENCE_FRAME ref_frame )
+{
+ xd->segment_feature_data[segment_id][SEG_LVL_REF_FRAME] |=
+ (1 << ref_frame);
+}
+
+int check_segref( MACROBLOCKD *xd,
+ int segment_id,
+ MV_REFERENCE_FRAME ref_frame )
+{
+ return ( xd->segment_feature_data[segment_id][SEG_LVL_REF_FRAME] &
+ (1 << ref_frame) ) ? 1 : 0;
+}
+
+int check_segref_inter(MACROBLOCKD *xd, int segment_id)
+{
+ return ( xd->segment_feature_data[segment_id][SEG_LVL_REF_FRAME] &
+ ~(1 << INTRA_FRAME) ) ? 1 : 0;
+}
+
+int get_seg_tx_type(MACROBLOCKD *xd, int segment_id)
+{
+ if ( segfeature_active(xd, segment_id, SEG_LVL_TRANSFORM) )
+ return get_segdata(xd, segment_id, SEG_LVL_TRANSFORM);
+ else
+ return TX_4X4;
+}
+// TBD? Functions to read and write segment data with range / validity checking
diff --git a/vp8/common/seg_common.h b/vp8/common/seg_common.h
new file mode 100644
index 000000000..bfd364e6d
--- /dev/null
+++ b/vp8/common/seg_common.h
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2012 The WebM project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "type_aliases.h"
+#include "onyxc_int.h"
+#include "vp8/common/blockd.h"
+
+#ifndef __INC_SEG_COMMON_H__
+#define __INC_SEG_COMMON_H__ 1
+
+int segfeature_active( MACROBLOCKD *xd,
+ int segment_id,
+ SEG_LVL_FEATURES feature_id );
+
+void clearall_segfeatures( MACROBLOCKD *xd );
+
+void enable_segfeature( MACROBLOCKD *xd,
+ int segment_id,
+ SEG_LVL_FEATURES feature_id );
+
+void disable_segfeature( MACROBLOCKD *xd,
+ int segment_id,
+ SEG_LVL_FEATURES feature_id );
+
+int seg_feature_data_bits( SEG_LVL_FEATURES feature_id );
+
+int is_segfeature_signed( SEG_LVL_FEATURES feature_id );
+
+void clear_segdata( MACROBLOCKD *xd,
+ int segment_id,
+ SEG_LVL_FEATURES feature_id);
+
+void set_segdata( MACROBLOCKD *xd,
+ int segment_id,
+ SEG_LVL_FEATURES feature_id,
+ int seg_data );
+
+int get_segdata( MACROBLOCKD *xd,
+ int segment_id,
+ SEG_LVL_FEATURES feature_id );
+
+#if CONFIG_FEATUREUPDATES
+
+int old_segfeature_active( MACROBLOCKD *xd,
+ int segment_id,
+ SEG_LVL_FEATURES feature_id );
+
+int get_old_segdata( MACROBLOCKD *xd,
+ int segment_id,
+ SEG_LVL_FEATURES feature_id );
+
+void save_segment_info ( MACROBLOCKD *xd );
+
+int segfeature_changed( MACROBLOCKD *xd,
+ int segment_id,
+ SEG_LVL_FEATURES feature_id );
+
+
+
+#endif
+
+
+void clear_segref( MACROBLOCKD *xd, int segment_id );
+
+void set_segref( MACROBLOCKD *xd,
+ int segment_id,
+ MV_REFERENCE_FRAME ref_frame );
+
+int check_segref( MACROBLOCKD *xd,
+ int segment_id,
+ MV_REFERENCE_FRAME ref_frame );
+
+int check_segref_inter(MACROBLOCKD *xd, int segment_id);
+
+int get_seg_tx_type(MACROBLOCKD *xd, int segment_id);
+
+#endif /* __INC_SEG_COMMON_H__ */
+
diff --git a/vp8/common/subpixel.h b/vp8/common/subpixel.h
index acdeec3bc..0b1b72fa0 100644
--- a/vp8/common/subpixel.h
+++ b/vp8/common/subpixel.h
@@ -34,6 +34,15 @@ extern prototype_subpixel_predict(vp8_subpix_sixtap16x16);
#endif
extern prototype_subpixel_predict(vp8_subpix_sixtap8x8);
+#ifndef vp8_subpix_sixtap_avg16x16
+#define vp8_subpix_sixtap_avg16x16 vp8_sixtap_predict_avg16x16_c
+#endif
+extern prototype_subpixel_predict(vp8_subpix_sixtap_avg16x16);
+
+#ifndef vp8_subpix_sixtap_avg8x8
+#define vp8_subpix_sixtap_avg8x8 vp8_sixtap_predict_avg8x8_c
+#endif
+extern prototype_subpixel_predict(vp8_subpix_sixtap_avg8x8);
#ifndef vp8_subpix_sixtap8x4
#define vp8_subpix_sixtap8x4 vp8_sixtap_predict8x4_c
#endif
@@ -54,6 +63,16 @@ extern prototype_subpixel_predict(vp8_subpix_bilinear16x16);
#endif
extern prototype_subpixel_predict(vp8_subpix_bilinear8x8);
+#ifndef vp8_subpix_bilinear_avg16x16
+#define vp8_subpix_bilinear_avg16x16 vp8_bilinear_predict_avg16x16_c
+#endif
+extern prototype_subpixel_predict(vp8_subpix_bilinear_avg16x16);
+
+#ifndef vp8_subpix_bilinear_avg8x8
+#define vp8_subpix_bilinear_avg8x8 vp8_bilinear_predict_avg8x8_c
+#endif
+extern prototype_subpixel_predict(vp8_subpix_bilinear_avg8x8);
+
#ifndef vp8_subpix_bilinear8x4
#define vp8_subpix_bilinear8x4 vp8_bilinear_predict8x4_c
#endif
@@ -69,10 +88,14 @@ typedef struct
{
vp8_subpix_fn_t sixtap16x16;
vp8_subpix_fn_t sixtap8x8;
+ vp8_subpix_fn_t sixtap_avg16x16;
+ vp8_subpix_fn_t sixtap_avg8x8;
vp8_subpix_fn_t sixtap8x4;
vp8_subpix_fn_t sixtap4x4;
vp8_subpix_fn_t bilinear16x16;
vp8_subpix_fn_t bilinear8x8;
+ vp8_subpix_fn_t bilinear_avg16x16;
+ vp8_subpix_fn_t bilinear_avg8x8;
vp8_subpix_fn_t bilinear8x4;
vp8_subpix_fn_t bilinear4x4;
} vp8_subpix_rtcd_vtable_t;
diff --git a/vp8/common/systemdependent.h b/vp8/common/systemdependent.h
index f99c4bb2a..db996987a 100644
--- a/vp8/common/systemdependent.h
+++ b/vp8/common/systemdependent.h
@@ -9,7 +9,7 @@
*/
-#include "vpx_config.h"
+#include "vpx_ports/config.h"
#if ARCH_X86 || ARCH_X86_64
void vpx_reset_mmx_state(void);
#define vp8_clear_system_state() vpx_reset_mmx_state()
diff --git a/vp8/common/tapify.py b/vp8/common/tapify.py
new file mode 100644
index 000000000..99529cff0
--- /dev/null
+++ b/vp8/common/tapify.py
@@ -0,0 +1,106 @@
+"""
+ * Copyright (c) 2012 The WebM project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+"""
+#!/usr/bin/env python
+import sys,string,os,re,math,numpy
+scale = 2**16
+def dist(p1,p2):
+ x1,y1 = p1
+ x2,y2 = p2
+ if x1==x2 and y1==y2 :
+ return 1.0
+ return 1/ math.sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2))
+
+def gettaps(p):
+ def l(b):
+ return int(math.floor(b))
+ def h(b):
+ return int(math.ceil(b))
+ def t(b,p,s):
+ return int((scale*dist(b,p)+s/2)/s)
+ r,c = p
+ ul=[l(r),l(c)]
+ ur=[l(r),h(c)]
+ ll=[h(r),l(c)]
+ lr=[h(r),h(c)]
+ sum = dist(ul,p)+dist(ur,p)+dist(ll,p)+dist(lr,p)
+ t4 = scale - t(ul,p,sum) - t(ur,p,sum) - t(ll,p,sum);
+ return [[ul,t(ul,p,sum)],[ur,t(ur,p,sum)],
+ [ll,t(ll,p,sum)],[lr,t4]]
+
+def print_mb_taps(angle,blocksize):
+ theta = angle / 57.2957795;
+ affine = [[math.cos(theta),-math.sin(theta)],
+ [math.sin(theta),math.cos(theta)]]
+ radius = (float(blocksize)-1)/2
+ print " // angle of",angle,"degrees"
+ for y in range(blocksize) :
+ for x in range(blocksize) :
+ r,c = numpy.dot(affine,[y-radius, x-radius])
+ tps = gettaps([r+radius,c+radius])
+ for t in tps :
+ p,t = t
+ tr,tc = p
+ print " %2d, %2d, %5d, " % (tr,tc,t,),
+ print " // %2d,%2d " % (y,x)
+
+i=float(sys.argv[1])
+while i <= float(sys.argv[2]) :
+ print_mb_taps(i,float(sys.argv[4]))
+ i=i+float(sys.argv[3])
+"""
+
+taps = []
+pt=dict()
+ptr=dict()
+for y in range(16) :
+ for x in range(16) :
+ r,c = numpy.dot(affine,[y-7.5, x-7.5])
+ tps = gettaps([r+7.5,c+7.5])
+ j=0
+ for tp in tps :
+ p,i = tp
+ r,c = p
+ pt[y,x,j]= [p,i]
+ try:
+ ptr[r,j,c].append([y,x])
+ except:
+ ptr[r,j,c]=[[y,x]]
+ j = j+1
+
+for key in sorted(pt.keys()) :
+ print key,pt[key]
+
+lr = -99
+lj = -99
+lc = 0
+
+shuf=""
+mask=""
+for r,j,c in sorted(ptr.keys()) :
+ for y,x in ptr[r,j,c] :
+ if lr != r or lj != j :
+ print "shuf_"+str(lr)+"_"+str(lj)+"_"+shuf.ljust(16,"0"), lc
+ shuf=""
+ lc = 0
+ for i in range(lc,c-1) :
+ shuf = shuf +"0"
+ shuf = shuf + hex(x)[2]
+ lc =c
+ break
+ lr = r
+ lj = j
+# print r,j,c,ptr[r,j,c]
+# print
+
+for r,j,c in sorted(ptr.keys()) :
+ for y,x in ptr[r,j,c] :
+ print r,j,c,y,x
+ break
+"""
diff --git a/vp8/common/threading.h b/vp8/common/threading.h
deleted file mode 100644
index 5927cb165..000000000
--- a/vp8/common/threading.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-
-#ifndef _PTHREAD_EMULATION
-#define _PTHREAD_EMULATION
-
-#if CONFIG_OS_SUPPORT && CONFIG_MULTITHREAD
-
-/* Thread management macros */
-#ifdef _WIN32
-/* Win32 */
-#define _WIN32_WINNT 0x500 /* WINBASE.H - Enable signal_object_and_wait */
-#include <process.h>
-#include <windows.h>
-#define THREAD_FUNCTION DWORD WINAPI
-#define THREAD_FUNCTION_RETURN DWORD
-#define THREAD_SPECIFIC_INDEX DWORD
-#define pthread_t HANDLE
-#define pthread_attr_t DWORD
-#define pthread_create(thhandle,attr,thfunc,tharg) (int)((*thhandle=(HANDLE)_beginthreadex(NULL,0,(unsigned int (__stdcall *)(void *))thfunc,tharg,0,NULL))==NULL)
-#define pthread_join(thread, result) ((WaitForSingleObject((thread),INFINITE)!=WAIT_OBJECT_0) || !CloseHandle(thread))
-#define pthread_detach(thread) if(thread!=NULL)CloseHandle(thread)
-#define thread_sleep(nms) Sleep(nms)
-#define pthread_cancel(thread) terminate_thread(thread,0)
-#define ts_key_create(ts_key, destructor) {ts_key = TlsAlloc();};
-#define pthread_getspecific(ts_key) TlsGetValue(ts_key)
-#define pthread_setspecific(ts_key, value) TlsSetValue(ts_key, (void *)value)
-#define pthread_self() GetCurrentThreadId()
-#else
-#ifdef __APPLE__
-#include <mach/mach_init.h>
-#include <mach/semaphore.h>
-#include <mach/task.h>
-#include <time.h>
-#include <unistd.h>
-
-#else
-#include <semaphore.h>
-#endif
-
-#include <pthread.h>
-/* pthreads */
-/* Nearly everything is already defined */
-#define THREAD_FUNCTION void *
-#define THREAD_FUNCTION_RETURN void *
-#define THREAD_SPECIFIC_INDEX pthread_key_t
-#define ts_key_create(ts_key, destructor) pthread_key_create (&(ts_key), destructor);
-#endif
-
-/* Syncrhronization macros: Win32 and Pthreads */
-#ifdef _WIN32
-#define sem_t HANDLE
-#define pause(voidpara) __asm PAUSE
-#define sem_init(sem, sem_attr1, sem_init_value) (int)((*sem = CreateSemaphore(NULL,0,32768,NULL))==NULL)
-#define sem_wait(sem) (int)(WAIT_OBJECT_0 != WaitForSingleObject(*sem,INFINITE))
-#define sem_post(sem) ReleaseSemaphore(*sem,1,NULL)
-#define sem_destroy(sem) if(*sem)((int)(CloseHandle(*sem))==TRUE)
-#define thread_sleep(nms) Sleep(nms)
-
-#else
-
-#ifdef __APPLE__
-#define sem_t semaphore_t
-#define sem_init(X,Y,Z) semaphore_create(mach_task_self(), X, SYNC_POLICY_FIFO, Z)
-#define sem_wait(sem) (semaphore_wait(*sem) )
-#define sem_post(sem) semaphore_signal(*sem)
-#define sem_destroy(sem) semaphore_destroy(mach_task_self(),*sem)
-#define thread_sleep(nms) /* { struct timespec ts;ts.tv_sec=0; ts.tv_nsec = 1000*nms;nanosleep(&ts, NULL);} */
-#else
-#include <unistd.h>
-#include <sched.h>
-#define thread_sleep(nms) sched_yield();/* {struct timespec ts;ts.tv_sec=0; ts.tv_nsec = 1000*nms;nanosleep(&ts, NULL);} */
-#endif
-/* Not Windows. Assume pthreads */
-
-#endif
-
-#if ARCH_X86 || ARCH_X86_64
-#include "vpx_ports/x86.h"
-#else
-#define x86_pause_hint()
-#endif
-
-#endif /* CONFIG_OS_SUPPORT && CONFIG_MULTITHREAD */
-
-#endif
diff --git a/vp8/common/x86/mask_sse3.asm b/vp8/common/x86/mask_sse3.asm
new file mode 100644
index 000000000..0d90cfa86
--- /dev/null
+++ b/vp8/common/x86/mask_sse3.asm
@@ -0,0 +1,484 @@
+;
+; Copyright (c) 2010 The WebM project authors. All Rights Reserved.
+;
+; Use of this source code is governed by a BSD-style license
+; that can be found in the LICENSE file in the root of the source
+; tree. An additional intellectual property rights grant can be found
+; in the file PATENTS. All contributing project authors may
+; be found in the AUTHORS file in the root of the source tree.
+;
+
+
+%include "vpx_ports/x86_abi_support.asm"
+
+;void int vp8_makemask_sse3(
+; unsigned char *y,
+; unsigned char *u,
+; unsigned char *v,
+; unsigned char *ym,
+; unsigned char *uvm,
+; int yp,
+; int uvp,
+; int ys,
+; int us,
+; int vs,
+; int yt,
+; int ut,
+; int vt)
+global sym(vp8_makemask_sse3)
+sym(vp8_makemask_sse3):
+ push rbp
+ mov rbp, rsp
+ SHADOW_ARGS_TO_STACK 14
+ push rsi
+ push rdi
+ ; end prolog
+
+ mov rsi, arg(0) ;y
+ mov rdi, arg(1) ;u
+ mov rcx, arg(2) ;v
+ mov rax, arg(3) ;ym
+ movsxd rbx, dword arg(4) ;yp
+ movsxd rdx, dword arg(5) ;uvp
+
+ pxor xmm0,xmm0
+
+ ;make 16 copies of the center y value
+ movd xmm1, arg(6)
+ pshufb xmm1, xmm0
+
+ ; make 16 copies of the center u value
+ movd xmm2, arg(7)
+ pshufb xmm2, xmm0
+
+ ; make 16 copies of the center v value
+ movd xmm3, arg(8)
+ pshufb xmm3, xmm0
+ unpcklpd xmm2, xmm3
+
+ ;make 16 copies of the y tolerance
+ movd xmm3, arg(9)
+ pshufb xmm3, xmm0
+
+ ;make 16 copies of the u tolerance
+ movd xmm4, arg(10)
+ pshufb xmm4, xmm0
+
+ ;make 16 copies of the v tolerance
+ movd xmm5, arg(11)
+ pshufb xmm5, xmm0
+ unpckhpd xmm4, xmm5
+
+ mov r8,8
+
+NextPairOfRows:
+
+ ;grab the y source values
+ movdqu xmm0, [rsi]
+
+ ;compute abs difference between source and y target
+ movdqa xmm6, xmm1
+ movdqa xmm7, xmm0
+ psubusb xmm0, xmm1
+ psubusb xmm6, xmm7
+ por xmm0, xmm6
+
+ ;compute abs difference between
+ movdqa xmm6, xmm3
+ pcmpgtb xmm6, xmm0
+
+ ;grab the y source values
+ add rsi, rbx
+ movdqu xmm0, [rsi]
+
+ ;compute abs difference between source and y target
+ movdqa xmm11, xmm1
+ movdqa xmm7, xmm0
+ psubusb xmm0, xmm1
+ psubusb xmm11, xmm7
+ por xmm0, xmm11
+
+ ;compute abs difference between
+ movdqa xmm11, xmm3
+ pcmpgtb xmm11, xmm0
+
+
+ ;grab the u and v source values
+ movdqu xmm7, [rdi]
+ movdqu xmm8, [rcx]
+ unpcklpd xmm7, xmm8
+
+ ;compute abs difference between source and uv targets
+ movdqa xmm9, xmm2
+ movdqa xmm10, xmm7
+ psubusb xmm7, xmm2
+ psubusb xmm9, xmm10
+ por xmm7, xmm9
+
+ ;check whether the number is < tolerance
+ movdqa xmm0, xmm4
+ pcmpgtb xmm0, xmm7
+
+ ;double u and v masks
+ movdqa xmm8, xmm0
+ punpckhbw xmm0, xmm0
+ punpcklbw xmm8, xmm8
+
+ ;mask row 0 and output
+ pand xmm6, xmm8
+ pand xmm6, xmm0
+ movdqa [rax],xmm6
+
+ ;mask row 1 and output
+ pand xmm11, xmm8
+ pand xmm11, xmm0
+ movdqa [rax+16],xmm11
+
+
+ ; to the next row or set of rows
+ add rsi, rbx
+ add rdi, rdx
+ add rcx, rdx
+ add rax,32
+ dec r8
+ jnz NextPairOfRows
+
+
+ ; begin epilog
+ pop rdi
+ pop rsi
+ UNSHADOW_ARGS
+ pop rbp
+ ret
+
+;GROW_HORIZ (register for result, source register or mem local)
+; takes source and shifts left and ors with source
+; then shifts right and ors with source
+%macro GROW_HORIZ 2
+ movdqa %1, %2
+ movdqa xmm14, %1
+ movdqa xmm15, %1
+ pslldq xmm14, 1
+ psrldq xmm15, 1
+ por %1,xmm14
+ por %1,xmm15
+%endmacro
+;GROW_VERT (result, center row, above row, below row)
+%macro GROW_VERT 4
+ movdqa %1,%2
+ por %1,%3
+ por %1,%4
+%endmacro
+
+;GROW_NEXTLINE (new line to grow, new source, line to write)
+%macro GROW_NEXTLINE 3
+ GROW_HORIZ %1, %2
+ GROW_VERT xmm3, xmm0, xmm1, xmm2
+ movdqa %3,xmm3
+%endmacro
+
+
+;void int vp8_growmaskmb_sse3(
+; unsigned char *om,
+; unsigned char *nm,
+global sym(vp8_growmaskmb_sse3)
+sym(vp8_growmaskmb_sse3):
+ push rbp
+ mov rbp, rsp
+ SHADOW_ARGS_TO_STACK 2
+ push rsi
+ push rdi
+ ; end prolog
+
+ mov rsi, arg(0) ;src
+ mov rdi, arg(1) ;rst
+
+ GROW_HORIZ xmm0, [rsi]
+ GROW_HORIZ xmm1, [rsi+16]
+ GROW_HORIZ xmm2, [rsi+32]
+
+ GROW_VERT xmm3, xmm0, xmm1, xmm2
+ por xmm0,xmm1
+ movdqa [rdi], xmm0
+ movdqa [rdi+16],xmm3
+
+ GROW_NEXTLINE xmm0,[rsi+48],[rdi+32]
+ GROW_NEXTLINE xmm1,[rsi+64],[rdi+48]
+ GROW_NEXTLINE xmm2,[rsi+80],[rdi+64]
+ GROW_NEXTLINE xmm0,[rsi+96],[rdi+80]
+ GROW_NEXTLINE xmm1,[rsi+112],[rdi+96]
+ GROW_NEXTLINE xmm2,[rsi+128],[rdi+112]
+ GROW_NEXTLINE xmm0,[rsi+144],[rdi+128]
+ GROW_NEXTLINE xmm1,[rsi+160],[rdi+144]
+ GROW_NEXTLINE xmm2,[rsi+176],[rdi+160]
+ GROW_NEXTLINE xmm0,[rsi+192],[rdi+176]
+ GROW_NEXTLINE xmm1,[rsi+208],[rdi+192]
+ GROW_NEXTLINE xmm2,[rsi+224],[rdi+208]
+ GROW_NEXTLINE xmm0,[rsi+240],[rdi+224]
+
+ por xmm0,xmm2
+ movdqa [rdi+240], xmm0
+
+ ; begin epilog
+ pop rdi
+ pop rsi
+ UNSHADOW_ARGS
+ pop rbp
+ ret
+
+
+
+;unsigned int vp8_sad16x16_masked_wmt(
+; unsigned char *src_ptr,
+; int src_stride,
+; unsigned char *ref_ptr,
+; int ref_stride,
+; unsigned char *mask)
+global sym(vp8_sad16x16_masked_wmt)
+sym(vp8_sad16x16_masked_wmt):
+ push rbp
+ mov rbp, rsp
+ SHADOW_ARGS_TO_STACK 5
+ push rsi
+ push rdi
+ ; end prolog
+ mov rsi, arg(0) ;src_ptr
+ mov rdi, arg(2) ;ref_ptr
+
+ mov rbx, arg(4) ;mask
+ movsxd rax, dword ptr arg(1) ;src_stride
+ movsxd rdx, dword ptr arg(3) ;ref_stride
+
+ mov rcx, 16
+
+ pxor xmm3, xmm3
+
+NextSadRow:
+ movdqu xmm0, [rsi]
+ movdqu xmm1, [rdi]
+ movdqu xmm2, [rbx]
+ pand xmm0, xmm2
+ pand xmm1, xmm2
+
+ psadbw xmm0, xmm1
+ paddw xmm3, xmm0
+
+ add rsi, rax
+ add rdi, rdx
+ add rbx, 16
+
+ dec rcx
+ jnz NextSadRow
+
+ movdqa xmm4 , xmm3
+ psrldq xmm4, 8
+ paddw xmm3, xmm4
+ movq rax, xmm3
+ ; begin epilog
+ pop rdi
+ pop rsi
+ UNSHADOW_ARGS
+ pop rbp
+ ret
+
+
+;unsigned int vp8_sad16x16_unmasked_wmt(
+; unsigned char *src_ptr,
+; int src_stride,
+; unsigned char *ref_ptr,
+; int ref_stride,
+; unsigned char *mask)
+global sym(vp8_sad16x16_unmasked_wmt)
+sym(vp8_sad16x16_unmasked_wmt):
+ push rbp
+ mov rbp, rsp
+ SHADOW_ARGS_TO_STACK 5
+ push rsi
+ push rdi
+ ; end prolog
+ mov rsi, arg(0) ;src_ptr
+ mov rdi, arg(2) ;ref_ptr
+
+ mov rbx, arg(4) ;mask
+ movsxd rax, dword ptr arg(1) ;src_stride
+ movsxd rdx, dword ptr arg(3) ;ref_stride
+
+ mov rcx, 16
+
+ pxor xmm3, xmm3
+
+next_vp8_sad16x16_unmasked_wmt:
+ movdqu xmm0, [rsi]
+ movdqu xmm1, [rdi]
+ movdqu xmm2, [rbx]
+ por xmm0, xmm2
+ por xmm1, xmm2
+
+ psadbw xmm0, xmm1
+ paddw xmm3, xmm0
+
+ add rsi, rax
+ add rdi, rdx
+ add rbx, 16
+
+ dec rcx
+ jnz next_vp8_sad16x16_unmasked_wmt
+
+ movdqa xmm4 , xmm3
+ psrldq xmm4, 8
+ paddw xmm3, xmm4
+ movq rax, xmm3
+ ; begin epilog
+ pop rdi
+ pop rsi
+ UNSHADOW_ARGS
+ pop rbp
+ ret
+
+
+;unsigned int vp8_masked_predictor_wmt(
+; unsigned char *masked,
+; unsigned char *unmasked,
+; int src_stride,
+; unsigned char *dst_ptr,
+; int dst_stride,
+; unsigned char *mask)
+global sym(vp8_masked_predictor_wmt)
+sym(vp8_masked_predictor_wmt):
+ push rbp
+ mov rbp, rsp
+ SHADOW_ARGS_TO_STACK 6
+ push rsi
+ push rdi
+ ; end prolog
+ mov rsi, arg(0) ;src_ptr
+ mov rdi, arg(1) ;ref_ptr
+
+ mov rbx, arg(5) ;mask
+ movsxd rax, dword ptr arg(2) ;src_stride
+ mov r11, arg(3) ; destination
+ movsxd rdx, dword ptr arg(4) ;dst_stride
+
+ mov rcx, 16
+
+ pxor xmm3, xmm3
+
+next_vp8_masked_predictor_wmt:
+ movdqu xmm0, [rsi]
+ movdqu xmm1, [rdi]
+ movdqu xmm2, [rbx]
+
+ pand xmm0, xmm2
+ pandn xmm2, xmm1
+ por xmm0, xmm2
+ movdqu [r11], xmm0
+
+ add r11, rdx
+ add rsi, rax
+ add rdi, rdx
+ add rbx, 16
+
+ dec rcx
+ jnz next_vp8_masked_predictor_wmt
+
+ ; begin epilog
+ pop rdi
+ pop rsi
+ UNSHADOW_ARGS
+ pop rbp
+ ret
+
+;unsigned int vp8_masked_predictor_uv_wmt(
+; unsigned char *masked,
+; unsigned char *unmasked,
+; int src_stride,
+; unsigned char *dst_ptr,
+; int dst_stride,
+; unsigned char *mask)
+global sym(vp8_masked_predictor_uv_wmt)
+sym(vp8_masked_predictor_uv_wmt):
+ push rbp
+ mov rbp, rsp
+ SHADOW_ARGS_TO_STACK 6
+ push rsi
+ push rdi
+ ; end prolog
+ mov rsi, arg(0) ;src_ptr
+ mov rdi, arg(1) ;ref_ptr
+
+ mov rbx, arg(5) ;mask
+ movsxd rax, dword ptr arg(2) ;src_stride
+ mov r11, arg(3) ; destination
+ movsxd rdx, dword ptr arg(4) ;dst_stride
+
+ mov rcx, 8
+
+ pxor xmm3, xmm3
+
+next_vp8_masked_predictor_uv_wmt:
+ movq xmm0, [rsi]
+ movq xmm1, [rdi]
+ movq xmm2, [rbx]
+
+ pand xmm0, xmm2
+ pandn xmm2, xmm1
+ por xmm0, xmm2
+ movq [r11], xmm0
+
+ add r11, rdx
+ add rsi, rax
+ add rdi, rax
+ add rbx, 8
+
+ dec rcx
+ jnz next_vp8_masked_predictor_uv_wmt
+
+ ; begin epilog
+ pop rdi
+ pop rsi
+ UNSHADOW_ARGS
+ pop rbp
+ ret
+
+
+;unsigned int vp8_uv_from_y_mask(
+; unsigned char *ymask,
+; unsigned char *uvmask)
+global sym(vp8_uv_from_y_mask)
+sym(vp8_uv_from_y_mask):
+ push rbp
+ mov rbp, rsp
+ SHADOW_ARGS_TO_STACK 6
+ push rsi
+ push rdi
+ ; end prolog
+ mov rsi, arg(0) ;src_ptr
+ mov rdi, arg(1) ;dst_ptr
+
+
+ mov rcx, 8
+
+ pxor xmm3, xmm3
+
+next_p8_uv_from_y_mask:
+ movdqu xmm0, [rsi]
+ pshufb xmm0, [shuf1b] ;[GLOBAL(shuf1b)]
+ movq [rdi],xmm0
+ add rdi, 8
+ add rsi,32
+
+ dec rcx
+ jnz next_p8_uv_from_y_mask
+
+ ; begin epilog
+ pop rdi
+ pop rsi
+ UNSHADOW_ARGS
+ pop rbp
+ ret
+
+SECTION_RODATA
+align 16
+shuf1b:
+ db 0, 2, 4, 6, 8, 10, 12, 14, 0, 0, 0, 0, 0, 0, 0, 0
+
diff --git a/vp8/common/x86/recon_wrapper_sse2.c b/vp8/common/x86/recon_wrapper_sse2.c
index fcc75a901..cb7b69c08 100644
--- a/vp8/common/x86/recon_wrapper_sse2.c
+++ b/vp8/common/x86/recon_wrapper_sse2.c
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "vpx_config.h"
+#include "vpx_ports/config.h"
#include "vp8/common/recon.h"
#include "recon_x86.h"
#include "vpx_mem/vpx_mem.h"
diff --git a/vp8/common/x86/subpixel_ssse3.asm b/vp8/common/x86/subpixel_ssse3.asm
index 6bca82bfb..39f4f7b88 100644
--- a/vp8/common/x86/subpixel_ssse3.asm
+++ b/vp8/common/x86/subpixel_ssse3.asm
@@ -1495,13 +1495,33 @@ k2_k4:
times 8 db 36, -11
times 8 db 12, -6
align 16
+%if CONFIG_SIXTEENTH_SUBPEL_UV
vp8_bilinear_filters_ssse3:
times 8 db 128, 0
+ times 8 db 120, 8
times 8 db 112, 16
+ times 8 db 104, 24
times 8 db 96, 32
+ times 8 db 88, 40
times 8 db 80, 48
+ times 8 db 72, 56
times 8 db 64, 64
+ times 8 db 56, 72
times 8 db 48, 80
+ times 8 db 40, 88
times 8 db 32, 96
+ times 8 db 24, 104
times 8 db 16, 112
+ times 8 db 8, 120
+%else
+vp8_bilinear_filters_ssse3:
+ times 8 db 128, 0
+ times 8 db 112, 16
+ times 8 db 96, 32
+ times 8 db 80, 48
+ times 8 db 64, 64
+ times 8 db 48, 80
+ times 8 db 32, 96
+ times 8 db 16, 112
+%endif
diff --git a/vp8/common/x86/vp8_asm_stubs.c b/vp8/common/x86/vp8_asm_stubs.c
index bce7bc38e..458b3f638 100644
--- a/vp8/common/x86/vp8_asm_stubs.c
+++ b/vp8/common/x86/vp8_asm_stubs.c
@@ -9,12 +9,19 @@
*/
-#include "vpx_config.h"
+#include "vpx_ports/config.h"
#include "vpx_ports/mem.h"
#include "vp8/common/subpixel.h"
+#if CONFIG_SIXTEENTH_SUBPEL_UV
+extern const short vp8_six_tap_mmx[16][6*8];
+extern const short vp8_bilinear_filters_mmx[16][2*8];
+#else
extern const short vp8_six_tap_mmx[8][6*8];
extern const short vp8_bilinear_filters_mmx[8][2*8];
+#endif
+
+//#define ANNOUNCE_FUNCTION
extern void vp8_filter_block1d_h6_mmx
(
@@ -128,6 +135,9 @@ void vp8_sixtap_predict4x4_mmx
int dst_pitch
)
{
+#ifdef ANNOUNCE_FUNCTION
+ printf("vp8_sixtap_predict4x4_mmx\n");
+#endif
DECLARE_ALIGNED_ARRAY(16, unsigned short, FData2, 16*16); /* Temp data bufffer used in filtering */
const short *HFilter, *VFilter;
HFilter = vp8_six_tap_mmx[xoffset];
@@ -149,6 +159,9 @@ void vp8_sixtap_predict16x16_mmx
)
{
+#ifdef ANNOUNCE_FUNCTION
+ printf("vp8_sixtap_predict16x16_mmx\n");
+#endif
DECLARE_ALIGNED_ARRAY(16, unsigned short, FData2, 24*24); /* Temp data bufffer used in filtering */
const short *HFilter, *VFilter;
@@ -181,6 +194,9 @@ void vp8_sixtap_predict8x8_mmx
)
{
+#ifdef ANNOUNCE_FUNCTION
+ printf("vp8_sixtap_predict8x8_mmx\n");
+#endif
DECLARE_ALIGNED_ARRAY(16, unsigned short, FData2, 256); /* Temp data bufffer used in filtering */
const short *HFilter, *VFilter;
@@ -206,7 +222,9 @@ void vp8_sixtap_predict8x4_mmx
int dst_pitch
)
{
-
+#ifdef ANNOUNCE_FUNCTION
+ printf("vp8_sixtap_predict8x4_mmx\n");
+#endif
DECLARE_ALIGNED_ARRAY(16, unsigned short, FData2, 256); /* Temp data bufffer used in filtering */
const short *HFilter, *VFilter;
@@ -256,6 +274,9 @@ void vp8_sixtap_predict16x16_sse2
DECLARE_ALIGNED_ARRAY(16, unsigned short, FData2, 24*24); /* Temp data bufffer used in filtering */
const short *HFilter, *VFilter;
+#ifdef ANNOUNCE_FUNCTION
+ printf("vp8_sixtap_predict16x16_sse2\n");
+#endif
if (xoffset)
{
@@ -295,6 +316,9 @@ void vp8_sixtap_predict8x8_sse2
{
DECLARE_ALIGNED_ARRAY(16, unsigned short, FData2, 256); /* Temp data bufffer used in filtering */
const short *HFilter, *VFilter;
+#ifdef ANNOUNCE_FUNCTION
+ printf("vp8_sixtap_predict8x8_sse2\n");
+#endif
if (xoffset)
{
@@ -333,6 +357,9 @@ void vp8_sixtap_predict8x4_sse2
{
DECLARE_ALIGNED_ARRAY(16, unsigned short, FData2, 256); /* Temp data bufffer used in filtering */
const short *HFilter, *VFilter;
+#ifdef ANNOUNCE_FUNCTION
+ printf("vp8_sixtap_predict8x4_sse2\n");
+#endif
if (xoffset)
{
@@ -434,6 +461,9 @@ void vp8_sixtap_predict16x16_ssse3
)
{
DECLARE_ALIGNED_ARRAY(16, unsigned char, FData2, 24*24);
+#ifdef ANNOUNCE_FUNCTION
+ printf("vp8_sixtap_predict16x16_ssse3\n");
+#endif
if (xoffset)
{
@@ -466,6 +496,9 @@ void vp8_sixtap_predict8x8_ssse3
)
{
DECLARE_ALIGNED_ARRAY(16, unsigned char, FData2, 256);
+#ifdef ANNOUNCE_FUNCTION
+ printf("vp8_sixtap_predict8x8_ssse3\n");
+#endif
if (xoffset)
{
@@ -498,6 +531,9 @@ void vp8_sixtap_predict8x4_ssse3
)
{
DECLARE_ALIGNED_ARRAY(16, unsigned char, FData2, 256);
+#ifdef ANNOUNCE_FUNCTION
+ printf("vp8_sixtap_predict8x4_ssse3\n");
+#endif
if (xoffset)
{
@@ -530,6 +566,9 @@ void vp8_sixtap_predict4x4_ssse3
)
{
DECLARE_ALIGNED_ARRAY(16, unsigned char, FData2, 4*9);
+#ifdef ANNOUNCE_FUNCTION
+ printf("vp8_sixtap_predict4x4_ssse3\n");
+#endif
if (xoffset)
{
diff --git a/vp8/common/x86/x86_systemdependent.c b/vp8/common/x86/x86_systemdependent.c
index 33a984b79..53009502c 100644
--- a/vp8/common/x86/x86_systemdependent.c
+++ b/vp8/common/x86/x86_systemdependent.c
@@ -43,17 +43,17 @@ void vp8_arch_x86_common_init(VP8_COMMON *ctx)
rtcd->idct.iwalsh16 = vp8_short_inv_walsh4x4_mmx;
rtcd->idct.iwalsh1 = vp8_short_inv_walsh4x4_1_mmx;
-
-
rtcd->recon.recon = vp8_recon_b_mmx;
rtcd->recon.copy8x8 = vp8_copy_mem8x8_mmx;
rtcd->recon.copy8x4 = vp8_copy_mem8x4_mmx;
rtcd->recon.copy16x16 = vp8_copy_mem16x16_mmx;
+#if CONFIG_ENHANCED_INTERP == 0 && CONFIG_HIGH_PRECISION_MV == 0 && CONFIG_SIXTEENTH_SUBPEL_UV == 0
rtcd->subpix.sixtap16x16 = vp8_sixtap_predict16x16_mmx;
rtcd->subpix.sixtap8x8 = vp8_sixtap_predict8x8_mmx;
rtcd->subpix.sixtap8x4 = vp8_sixtap_predict8x4_mmx;
rtcd->subpix.sixtap4x4 = vp8_sixtap_predict4x4_mmx;
+#endif
rtcd->subpix.bilinear16x16 = vp8_bilinear_predict16x16_mmx;
rtcd->subpix.bilinear8x8 = vp8_bilinear_predict8x8_mmx;
rtcd->subpix.bilinear8x4 = vp8_bilinear_predict8x4_mmx;
@@ -91,9 +91,11 @@ void vp8_arch_x86_common_init(VP8_COMMON *ctx)
rtcd->idct.iwalsh16 = vp8_short_inv_walsh4x4_sse2;
+#if CONFIG_ENHANCED_INTERP == 0 && CONFIG_HIGH_PRECISION_MV == 0 && CONFIG_SIXTEENTH_SUBPEL_UV == 0
rtcd->subpix.sixtap16x16 = vp8_sixtap_predict16x16_sse2;
rtcd->subpix.sixtap8x8 = vp8_sixtap_predict8x8_sse2;
rtcd->subpix.sixtap8x4 = vp8_sixtap_predict8x4_sse2;
+#endif
rtcd->subpix.bilinear16x16 = vp8_bilinear_predict16x16_sse2;
rtcd->subpix.bilinear8x8 = vp8_bilinear_predict8x8_sse2;
@@ -120,12 +122,14 @@ void vp8_arch_x86_common_init(VP8_COMMON *ctx)
if (flags & HAS_SSSE3)
{
+#if CONFIG_ENHANCED_INTERP == 0 && CONFIG_HIGH_PRECISION_MV == 0
rtcd->subpix.sixtap16x16 = vp8_sixtap_predict16x16_ssse3;
rtcd->subpix.sixtap8x8 = vp8_sixtap_predict8x8_ssse3;
rtcd->subpix.sixtap8x4 = vp8_sixtap_predict8x4_ssse3;
rtcd->subpix.sixtap4x4 = vp8_sixtap_predict4x4_ssse3;
rtcd->subpix.bilinear16x16 = vp8_bilinear_predict16x16_ssse3;
rtcd->subpix.bilinear8x8 = vp8_bilinear_predict8x8_ssse3;
+#endif
rtcd->recon.build_intra_predictors_mbuv =
vp8_build_intra_predictors_mbuv_ssse3;