00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef AVCODEC_SANM_DATA_H
00023 #define AVCODEC_SANM_DATA_H
00024
00025 #include <stdint.h>
00026
00027 #define GLYPH_COORD_VECT_SIZE 16
00028
00029 static const int8_t glyph4_x[GLYPH_COORD_VECT_SIZE] =
00030 { 0, 1, 2, 3, 3, 3, 3, 2, 1, 0, 0, 0, 1, 2, 2, 1 };
00031 static const int8_t glyph4_y[GLYPH_COORD_VECT_SIZE] =
00032 { 0, 0, 0, 0, 1, 2, 3, 3, 3, 3, 2, 1, 1, 1, 2, 2 };
00033 static const int8_t glyph8_x[GLYPH_COORD_VECT_SIZE] =
00034 { 0, 2, 5, 7, 7, 7, 7, 7, 7, 5, 2, 0, 0, 0, 0, 0 };
00035 static const int8_t glyph8_y[GLYPH_COORD_VECT_SIZE] =
00036 { 0, 0, 0, 0, 1, 3, 4, 6, 7, 7, 7, 7, 6, 4, 3, 1 };
00037
00038 static const int8_t motion_vectors[256][2] =
00039 {
00040 { 0, 0}, { -1, -43}, { 6, -43}, { -9, -42}, { 13, -41},
00041 {-16, -40}, { 19, -39}, {-23, -36}, { 26, -34}, { -2, -33},
00042 { 4, -33}, {-29, -32}, { -9, -32}, { 11, -31}, {-16, -29},
00043 { 32, -29}, { 18, -28}, {-34, -26}, {-22, -25}, { -1, -25},
00044 { 3, -25}, { -7, -24}, { 8, -24}, { 24, -23}, { 36, -23},
00045 {-12, -22}, { 13, -21}, {-38, -20}, { 0, -20}, {-27, -19},
00046 { -4, -19}, { 4, -19}, {-17, -18}, { -8, -17}, { 8, -17},
00047 { 18, -17}, { 28, -17}, { 39, -17}, {-12, -15}, { 12, -15},
00048 {-21, -14}, { -1, -14}, { 1, -14}, {-41, -13}, { -5, -13},
00049 { 5, -13}, { 21, -13}, {-31, -12}, {-15, -11}, { -8, -11},
00050 { 8, -11}, { 15, -11}, { -2, -10}, { 1, -10}, { 31, -10},
00051 {-23, -9}, {-11, -9}, { -5, -9}, { 4, -9}, { 11, -9},
00052 { 42, -9}, { 6, -8}, { 24, -8}, {-18, -7}, { -7, -7},
00053 { -3, -7}, { -1, -7}, { 2, -7}, { 18, -7}, {-43, -6},
00054 {-13, -6}, { -4, -6}, { 4, -6}, { 8, -6}, {-33, -5},
00055 { -9, -5}, { -2, -5}, { 0, -5}, { 2, -5}, { 5, -5},
00056 { 13, -5}, {-25, -4}, { -6, -4}, { -3, -4}, { 3, -4},
00057 { 9, -4}, {-19, -3}, { -7, -3}, { -4, -3}, { -2, -3},
00058 { -1, -3}, { 0, -3}, { 1, -3}, { 2, -3}, { 4, -3},
00059 { 6, -3}, { 33, -3}, {-14, -2}, {-10, -2}, { -5, -2},
00060 { -3, -2}, { -2, -2}, { -1, -2}, { 0, -2}, { 1, -2},
00061 { 2, -2}, { 3, -2}, { 5, -2}, { 7, -2}, { 14, -2},
00062 { 19, -2}, { 25, -2}, { 43, -2}, { -7, -1}, { -3, -1},
00063 { -2, -1}, { -1, -1}, { 0, -1}, { 1, -1}, { 2, -1},
00064 { 3, -1}, { 10, -1}, { -5, 0}, { -3, 0}, { -2, 0},
00065 { -1, 0}, { 1, 0}, { 2, 0}, { 3, 0}, { 5, 0},
00066 { 7, 0}, {-10, 1}, { -7, 1}, { -3, 1}, { -2, 1},
00067 { -1, 1}, { 0, 1}, { 1, 1}, { 2, 1}, { 3, 1},
00068 {-43, 2}, {-25, 2}, {-19, 2}, {-14, 2}, { -5, 2},
00069 { -3, 2}, { -2, 2}, { -1, 2}, { 0, 2}, { 1, 2},
00070 { 2, 2}, { 3, 2}, { 5, 2}, { 7, 2}, { 10, 2},
00071 { 14, 2}, {-33, 3}, { -6, 3}, { -4, 3}, { -2, 3},
00072 { -1, 3}, { 0, 3}, { 1, 3}, { 2, 3}, { 4, 3},
00073 { 19, 3}, { -9, 4}, { -3, 4}, { 3, 4}, { 7, 4},
00074 { 25, 4}, {-13, 5}, { -5, 5}, { -2, 5}, { 0, 5},
00075 { 2, 5}, { 5, 5}, { 9, 5}, { 33, 5}, { -8, 6},
00076 { -4, 6}, { 4, 6}, { 13, 6}, { 43, 6}, {-18, 7},
00077 { -2, 7}, { 0, 7}, { 2, 7}, { 7, 7}, { 18, 7},
00078 {-24, 8}, { -6, 8}, {-42, 9}, {-11, 9}, { -4, 9},
00079 { 5, 9}, { 11, 9}, { 23, 9}, {-31, 10}, { -1, 10},
00080 { 2, 10}, {-15, 11}, { -8, 11}, { 8, 11}, { 15, 11},
00081 { 31, 12}, {-21, 13}, { -5, 13}, { 5, 13}, { 41, 13},
00082 { -1, 14}, { 1, 14}, { 21, 14}, {-12, 15}, { 12, 15},
00083 {-39, 17}, {-28, 17}, {-18, 17}, { -8, 17}, { 8, 17},
00084 { 17, 18}, { -4, 19}, { 0, 19}, { 4, 19}, { 27, 19},
00085 { 38, 20}, {-13, 21}, { 12, 22}, {-36, 23}, {-24, 23},
00086 { -8, 24}, { 7, 24}, { -3, 25}, { 1, 25}, { 22, 25},
00087 { 34, 26}, {-18, 28}, {-32, 29}, { 16, 29}, {-11, 31},
00088 { 9, 32}, { 29, 32}, { -4, 33}, { 2, 33}, {-26, 34},
00089 { 23, 36}, {-19, 39}, { 16, 40}, {-13, 41}, { 9, 42},
00090 { -6, 43}, { 1, 43}, { 0, 0}, { 0, 0}, { 0, 0},
00091 };
00092
00093 static const int8_t c37_mv[] = {
00094 0, 0, 1, 0, 2, 0, 3, 0, 5, 0,
00095 8, 0, 13, 0, 21, 0, -1, 0, -2, 0,
00096 -3, 0, -5, 0, -8, 0, -13, 0, -17, 0,
00097 -21, 0, 0, 1, 1, 1, 2, 1, 3, 1,
00098 5, 1, 8, 1, 13, 1, 21, 1, -1, 1,
00099 -2, 1, -3, 1, -5, 1, -8, 1, -13, 1,
00100 -17, 1, -21, 1, 0, 2, 1, 2, 2, 2,
00101 3, 2, 5, 2, 8, 2, 13, 2, 21, 2,
00102 -1, 2, -2, 2, -3, 2, -5, 2, -8, 2,
00103 -13, 2, -17, 2, -21, 2, 0, 3, 1, 3,
00104 2, 3, 3, 3, 5, 3, 8, 3, 13, 3,
00105 21, 3, -1, 3, -2, 3, -3, 3, -5, 3,
00106 -8, 3, -13, 3, -17, 3, -21, 3, 0, 5,
00107 1, 5, 2, 5, 3, 5, 5, 5, 8, 5,
00108 13, 5, 21, 5, -1, 5, -2, 5, -3, 5,
00109 -5, 5, -8, 5, -13, 5, -17, 5, -21, 5,
00110 0, 8, 1, 8, 2, 8, 3, 8, 5, 8,
00111 8, 8, 13, 8, 21, 8, -1, 8, -2, 8,
00112 -3, 8, -5, 8, -8, 8, -13, 8, -17, 8,
00113 -21, 8, 0, 13, 1, 13, 2, 13, 3, 13,
00114 5, 13, 8, 13, 13, 13, 21, 13, -1, 13,
00115 -2, 13, -3, 13, -5, 13, -8, 13, -13, 13,
00116 -17, 13, -21, 13, 0, 21, 1, 21, 2, 21,
00117 3, 21, 5, 21, 8, 21, 13, 21, 21, 21,
00118 -1, 21, -2, 21, -3, 21, -5, 21, -8, 21,
00119 -13, 21, -17, 21, -21, 21, 0, -1, 1, -1,
00120 2, -1, 3, -1, 5, -1, 8, -1, 13, -1,
00121 21, -1, -1, -1, -2, -1, -3, -1, -5, -1,
00122 -8, -1, -13, -1, -17, -1, -21, -1, 0, -2,
00123 1, -2, 2, -2, 3, -2, 5, -2, 8, -2,
00124 13, -2, 21, -2, -1, -2, -2, -2, -3, -2,
00125 -5, -2, -8, -2, -13, -2, -17, -2, -21, -2,
00126 0, -3, 1, -3, 2, -3, 3, -3, 5, -3,
00127 8, -3, 13, -3, 21, -3, -1, -3, -2, -3,
00128 -3, -3, -5, -3, -8, -3, -13, -3, -17, -3,
00129 -21, -3, 0, -5, 1, -5, 2, -5, 3, -5,
00130 5, -5, 8, -5, 13, -5, 21, -5, -1, -5,
00131 -2, -5, -3, -5, -5, -5, -8, -5, -13, -5,
00132 -17, -5, -21, -5, 0, -8, 1, -8, 2, -8,
00133 3, -8, 5, -8, 8, -8, 13, -8, 21, -8,
00134 -1, -8, -2, -8, -3, -8, -5, -8, -8, -8,
00135 -13, -8, -17, -8, -21, -8, 0, -13, 1, -13,
00136 2, -13, 3, -13, 5, -13, 8, -13, 13, -13,
00137 21, -13, -1, -13, -2, -13, -3, -13, -5, -13,
00138 -8, -13, -13, -13, -17, -13, -21, -13, 0, -17,
00139 1, -17, 2, -17, 3, -17, 5, -17, 8, -17,
00140 13, -17, 21, -17, -1, -17, -2, -17, -3, -17,
00141 -5, -17, -8, -17, -13, -17, -17, -17, -21, -17,
00142 0, -21, 1, -21, 2, -21, 3, -21, 5, -21,
00143 8, -21, 13, -21, 21, -21, -1, -21, -2, -21,
00144 -3, -21, -5, -21, -8, -21, -13, -21, -17, -21,
00145 0, 0, -8, -29, 8, -29, -18, -25, 17, -25,
00146 0, -23, -6, -22, 6, -22, -13, -19, 12, -19,
00147 0, -18, 25, -18, -25, -17, -5, -17, 5, -17,
00148 -10, -15, 10, -15, 0, -14, -4, -13, 4, -13,
00149 19, -13, -19, -12, -8, -11, -2, -11, 0, -11,
00150 2, -11, 8, -11, -15, -10, -4, -10, 4, -10,
00151 15, -10, -6, -9, -1, -9, 1, -9, 6, -9,
00152 -29, -8, -11, -8, -8, -8, -3, -8, 3, -8,
00153 8, -8, 11, -8, 29, -8, -5, -7, -2, -7,
00154 0, -7, 2, -7, 5, -7, -22, -6, -9, -6,
00155 -6, -6, -3, -6, -1, -6, 1, -6, 3, -6,
00156 6, -6, 9, -6, 22, -6, -17, -5, -7, -5,
00157 -4, -5, -2, -5, 0, -5, 2, -5, 4, -5,
00158 7, -5, 17, -5, -13, -4, -10, -4, -5, -4,
00159 -3, -4, -1, -4, 0, -4, 1, -4, 3, -4,
00160 5, -4, 10, -4, 13, -4, -8, -3, -6, -3,
00161 -4, -3, -3, -3, -2, -3, -1, -3, 0, -3,
00162 1, -3, 2, -3, 4, -3, 6, -3, 8, -3,
00163 -11, -2, -7, -2, -5, -2, -3, -2, -2, -2,
00164 -1, -2, 0, -2, 1, -2, 2, -2, 3, -2,
00165 5, -2, 7, -2, 11, -2, -9, -1, -6, -1,
00166 -4, -1, -3, -1, -2, -1, -1, -1, 0, -1,
00167 1, -1, 2, -1, 3, -1, 4, -1, 6, -1,
00168 9, -1, -31, 0, -23, 0, -18, 0, -14, 0,
00169 -11, 0, -7, 0, -5, 0, -4, 0, -3, 0,
00170 -2, 0, -1, 0, 0, -31, 1, 0, 2, 0,
00171 3, 0, 4, 0, 5, 0, 7, 0, 11, 0,
00172 14, 0, 18, 0, 23, 0, 31, 0, -9, 1,
00173 -6, 1, -4, 1, -3, 1, -2, 1, -1, 1,
00174 0, 1, 1, 1, 2, 1, 3, 1, 4, 1,
00175 6, 1, 9, 1, -11, 2, -7, 2, -5, 2,
00176 -3, 2, -2, 2, -1, 2, 0, 2, 1, 2,
00177 2, 2, 3, 2, 5, 2, 7, 2, 11, 2,
00178 -8, 3, -6, 3, -4, 3, -2, 3, -1, 3,
00179 0, 3, 1, 3, 2, 3, 3, 3, 4, 3,
00180 6, 3, 8, 3, -13, 4, -10, 4, -5, 4,
00181 -3, 4, -1, 4, 0, 4, 1, 4, 3, 4,
00182 5, 4, 10, 4, 13, 4, -17, 5, -7, 5,
00183 -4, 5, -2, 5, 0, 5, 2, 5, 4, 5,
00184 7, 5, 17, 5, -22, 6, -9, 6, -6, 6,
00185 -3, 6, -1, 6, 1, 6, 3, 6, 6, 6,
00186 9, 6, 22, 6, -5, 7, -2, 7, 0, 7,
00187 2, 7, 5, 7, -29, 8, -11, 8, -8, 8,
00188 -3, 8, 3, 8, 8, 8, 11, 8, 29, 8,
00189 -6, 9, -1, 9, 1, 9, 6, 9, -15, 10,
00190 -4, 10, 4, 10, 15, 10, -8, 11, -2, 11,
00191 0, 11, 2, 11, 8, 11, 19, 12, -19, 13,
00192 -4, 13, 4, 13, 0, 14, -10, 15, 10, 15,
00193 -5, 17, 5, 17, 25, 17, -25, 18, 0, 18,
00194 -12, 19, 13, 19, -6, 22, 6, 22, 0, 23,
00195 -17, 25, 18, 25, -8, 29, 8, 29, 0, 31,
00196 0, 0, -6, -22, 6, -22, -13, -19, 12, -19,
00197 0, -18, -5, -17, 5, -17, -10, -15, 10, -15,
00198 0, -14, -4, -13, 4, -13, 19, -13, -19, -12,
00199 -8, -11, -2, -11, 0, -11, 2, -11, 8, -11,
00200 -15, -10, -4, -10, 4, -10, 15, -10, -6, -9,
00201 -1, -9, 1, -9, 6, -9, -11, -8, -8, -8,
00202 -3, -8, 0, -8, 3, -8, 8, -8, 11, -8,
00203 -5, -7, -2, -7, 0, -7, 2, -7, 5, -7,
00204 -22, -6, -9, -6, -6, -6, -3, -6, -1, -6,
00205 1, -6, 3, -6, 6, -6, 9, -6, 22, -6,
00206 -17, -5, -7, -5, -4, -5, -2, -5, -1, -5,
00207 0, -5, 1, -5, 2, -5, 4, -5, 7, -5,
00208 17, -5, -13, -4, -10, -4, -5, -4, -3, -4,
00209 -2, -4, -1, -4, 0, -4, 1, -4, 2, -4,
00210 3, -4, 5, -4, 10, -4, 13, -4, -8, -3,
00211 -6, -3, -4, -3, -3, -3, -2, -3, -1, -3,
00212 0, -3, 1, -3, 2, -3, 3, -3, 4, -3,
00213 6, -3, 8, -3, -11, -2, -7, -2, -5, -2,
00214 -4, -2, -3, -2, -2, -2, -1, -2, 0, -2,
00215 1, -2, 2, -2, 3, -2, 4, -2, 5, -2,
00216 7, -2, 11, -2, -9, -1, -6, -1, -5, -1,
00217 -4, -1, -3, -1, -2, -1, -1, -1, 0, -1,
00218 1, -1, 2, -1, 3, -1, 4, -1, 5, -1,
00219 6, -1, 9, -1, -23, 0, -18, 0, -14, 0,
00220 -11, 0, -7, 0, -5, 0, -4, 0, -3, 0,
00221 -2, 0, -1, 0, 0, -23, 1, 0, 2, 0,
00222 3, 0, 4, 0, 5, 0, 7, 0, 11, 0,
00223 14, 0, 18, 0, 23, 0, -9, 1, -6, 1,
00224 -5, 1, -4, 1, -3, 1, -2, 1, -1, 1,
00225 0, 1, 1, 1, 2, 1, 3, 1, 4, 1,
00226 5, 1, 6, 1, 9, 1, -11, 2, -7, 2,
00227 -5, 2, -4, 2, -3, 2, -2, 2, -1, 2,
00228 0, 2, 1, 2, 2, 2, 3, 2, 4, 2,
00229 5, 2, 7, 2, 11, 2, -8, 3, -6, 3,
00230 -4, 3, -3, 3, -2, 3, -1, 3, 0, 3,
00231 1, 3, 2, 3, 3, 3, 4, 3, 6, 3,
00232 8, 3, -13, 4, -10, 4, -5, 4, -3, 4,
00233 -2, 4, -1, 4, 0, 4, 1, 4, 2, 4,
00234 3, 4, 5, 4, 10, 4, 13, 4, -17, 5,
00235 -7, 5, -4, 5, -2, 5, -1, 5, 0, 5,
00236 1, 5, 2, 5, 4, 5, 7, 5, 17, 5,
00237 -22, 6, -9, 6, -6, 6, -3, 6, -1, 6,
00238 1, 6, 3, 6, 6, 6, 9, 6, 22, 6,
00239 -5, 7, -2, 7, 0, 7, 2, 7, 5, 7,
00240 -11, 8, -8, 8, -3, 8, 0, 8, 3, 8,
00241 8, 8, 11, 8, -6, 9, -1, 9, 1, 9,
00242 6, 9, -15, 10, -4, 10, 4, 10, 15, 10,
00243 -8, 11, -2, 11, 0, 11, 2, 11, 8, 11,
00244 19, 12, -19, 13, -4, 13, 4, 13, 0, 14,
00245 -10, 15, 10, 15, -5, 17, 5, 17, 0, 18,
00246 -12, 19, 13, 19, -6, 22, 6, 22, 0, 23,
00247 };
00248 #endif