comparison dvdata.h @ 3149:2679184e8be0 libavcodec

AC coefficient weighing (per SMPTE 314M) for the DV encoder and decoder. The performance impact is less than 1%. Patch by Dan Maas (dmaas at maasdigital dot com)
author romansh
date Mon, 27 Feb 2006 04:50:06 +0000
parents 0b546eab515d
children 312b86bc4202
comparison
equal deleted inserted replaced
3148:d4d8e5436be7 3149:2679184e8be0
1254 0x0634, 0x2120, 0x2d44, 0x3610, 0x1258, 1254 0x0634, 0x2120, 0x2d44, 0x3610, 0x1258,
1255 0x0734, 0x2220, 0x2e44, 0x3710, 0x1458, 1255 0x0734, 0x2220, 0x2e44, 0x3710, 0x1458,
1256 0x0834, 0x2320, 0x2f44, 0x3810, 0x1658, 1256 0x0834, 0x2320, 0x2f44, 0x3810, 0x1658,
1257 }; 1257 };
1258 1258
1259 /* DV25/50 DCT coefficient weights and inverse weights */
1260 /* created by dvtables.py */
1261 static const int dv_weight_bits = 18;
1262 static const int dv_weight_88[64] = {
1263 131072, 257107, 257107, 242189, 252167, 242189, 235923, 237536,
1264 237536, 235923, 229376, 231390, 223754, 231390, 229376, 222935,
1265 224969, 217965, 217965, 224969, 222935, 200636, 218652, 211916,
1266 212325, 211916, 218652, 200636, 188995, 196781, 205965, 206433,
1267 206433, 205965, 196781, 188995, 185364, 185364, 200636, 200704,
1268 200636, 185364, 185364, 174609, 180568, 195068, 195068, 180568,
1269 174609, 170091, 175557, 189591, 175557, 170091, 165371, 170627,
1270 170627, 165371, 160727, 153560, 160727, 144651, 144651, 136258,
1271 };
1272 static const int dv_weight_248[64] = {
1273 131072, 242189, 257107, 237536, 229376, 200636, 242189, 223754,
1274 224969, 196781, 262144, 242189, 229376, 200636, 257107, 237536,
1275 211916, 185364, 235923, 217965, 229376, 211916, 206433, 180568,
1276 242189, 223754, 224969, 196781, 211916, 185364, 235923, 217965,
1277 200704, 175557, 222935, 205965, 200636, 185364, 195068, 170627,
1278 229376, 211916, 206433, 180568, 200704, 175557, 222935, 205965,
1279 175557, 153560, 188995, 174609, 165371, 144651, 200636, 185364,
1280 195068, 170627, 175557, 153560, 188995, 174609, 165371, 144651,
1281 };
1282 static const int dv_iweight_bits = 14;
1283 static const int dv_iweight_88[64] = {
1284 32768, 16710, 16710, 17735, 17015, 17735, 18197, 18079,
1285 18079, 18197, 18725, 18559, 19196, 18559, 18725, 19284,
1286 19108, 19692, 19692, 19108, 19284, 21400, 19645, 20262,
1287 20214, 20262, 19645, 21400, 22733, 21845, 20867, 20815,
1288 20815, 20867, 21845, 22733, 23173, 23173, 21400, 21400,
1289 21400, 23173, 23173, 24600, 23764, 22017, 22017, 23764,
1290 24600, 25267, 24457, 22672, 24457, 25267, 25971, 25191,
1291 25191, 25971, 26715, 27962, 26715, 29642, 29642, 31536,
1292 };
1293 static const int dv_iweight_248[64] = {
1294 32768, 17735, 16710, 18079, 18725, 21400, 17735, 19196,
1295 19108, 21845, 16384, 17735, 18725, 21400, 16710, 18079,
1296 20262, 23173, 18197, 19692, 18725, 20262, 20815, 23764,
1297 17735, 19196, 19108, 21845, 20262, 23173, 18197, 19692,
1298 21400, 24457, 19284, 20867, 21400, 23173, 22017, 25191,
1299 18725, 20262, 20815, 23764, 21400, 24457, 19284, 20867,
1300 24457, 27962, 22733, 24600, 25971, 29642, 21400, 23173,
1301 22017, 25191, 24457, 27962, 22733, 24600, 25971, 29642,
1302 };
1303
1259 static const uint16_t dv_audio_shuffle525[10][9] = { 1304 static const uint16_t dv_audio_shuffle525[10][9] = {
1260 { 0, 30, 60, 20, 50, 80, 10, 40, 70 }, /* 1st channel */ 1305 { 0, 30, 60, 20, 50, 80, 10, 40, 70 }, /* 1st channel */
1261 { 6, 36, 66, 26, 56, 86, 16, 46, 76 }, 1306 { 6, 36, 66, 26, 56, 86, 16, 46, 76 },
1262 { 12, 42, 72, 2, 32, 62, 22, 52, 82 }, 1307 { 12, 42, 72, 2, 32, 62, 22, 52, 82 },
1263 { 18, 48, 78, 8, 38, 68, 28, 58, 88 }, 1308 { 18, 48, 78, 8, 38, 68, 28, 58, 88 },