30 #define BITSTREAM_READER_LE
40 #define FORMAT_SIMPLE 1
41 #define FORMAT_ENCRYPTED 2
79 0x00000001, 0x00000002, 0x00000004, 0x00000008,
80 0x00000010, 0x00000020, 0x00000040, 0x00000080,
81 0x00000100, 0x00000200, 0x00000400, 0x00000800,
82 0x00001000, 0x00002000, 0x00004000, 0x00008000,
83 0x00010000, 0x00020000, 0x00040000, 0x00080000,
84 0x00100000, 0x00200000, 0x00400000, 0x00800000,
85 0x01000000, 0x02000000, 0x04000000, 0x08000000,
86 0x10000000, 0x20000000, 0x40000000, 0x80000000,
87 0x80000000, 0x80000000, 0x80000000, 0x80000000,
88 0x80000000, 0x80000000, 0x80000000, 0x80000000
104 for (i = 0; i < 8; i++)
117 qm[0] -= dx[0]; qm[1] -= dx[1]; qm[2] -= dx[2]; qm[3] -= dx[3];
118 qm[4] -= dx[4]; qm[5] -= dx[5]; qm[6] -= dx[6]; qm[7] -= dx[7];
119 }
else if (c->
error > 0) {
120 qm[0] += dx[0]; qm[1] += dx[1]; qm[2] += dx[2]; qm[3] += dx[3];
121 qm[4] += dx[4]; qm[5] += dx[5]; qm[6] += dx[6]; qm[7] += dx[7];
124 sum += dl[0] * qm[0] + dl[1] * qm[1] + dl[2] * qm[2] + dl[3] * qm[3] +
125 dl[4] * qm[4] + dl[5] * qm[5] + dl[6] * qm[6] + dl[7] * qm[7];
127 dx[0] = dx[1]; dx[1] = dx[2]; dx[2] = dx[3]; dx[3] = dx[4];
128 dl[0] = dl[1]; dl[1] = dl[2]; dl[2] = dl[3]; dl[3] = dl[4];
130 dx[4] = ((dl[4] >> 30) | 1);
131 dx[5] = ((dl[5] >> 30) | 2) & ~1;
132 dx[6] = ((dl[6] >> 30) | 2) & ~1;
133 dx[7] = ((dl[7] >> 30) | 4) & ~3;
136 *in += (sum >> c->
shift);
138 dl[4] = -dl[5]; dl[5] = -dl[6];
139 dl[6] = *in - dl[7]; dl[7] = *
in;
140 dl[5] += dl[6]; dl[4] += dl[5];
177 if (CRC != (crc ^ 0xFFFFFFFFU)) {
187 uint64_t crc = UINT64_MAX,
poly = 0x42F0E1EBA9EA3693
U;
192 crc ^= (uint64_t)*pass++ << 56;
193 for (i = 0; i < 8; i++)
194 crc = (crc << 1) ^ (poly & (((int64_t) crc) >> 63));
197 return crc ^ UINT64_MAX;
229 av_log(avctx,
AV_LOG_ERROR,
"Missing password for encrypted stream. Please use the -password option\n");
318 int *got_frame_ptr,
AVPacket *avpkt)
322 int buf_size = avpkt->
size;
358 uint32_t unary,
depth, k;
389 rice->
sum1 += value - (rice->
sum1 >> 4);
396 rice->
sum0 += value - (rice->
sum0 >> 4);
404 *p = 1 + ((value >> 1) ^ ((value & 1) - 1));
410 #define PRED(x, k) (int32_t)((((uint64_t)x << k) - x) >> k)
412 case 1: *p +=
PRED(*predictor, 4);
break;
414 case 3: *p +=
PRED(*predictor, 5);
break;
426 for (*p += *r / 2; r > p - s->
channels; r--)
451 *samples++ = *p + 0x80;
492 #define OFFSET(x) offsetof(TTAContext, x)
493 #define DEC (AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_AUDIO_PARAM)