40 #define EA_PREAMBLE_SIZE 8
41 #define MADk_TAG MKTAG('M', 'A', 'D', 'k')
42 #define MADm_TAG MKTAG('M', 'A', 'D', 'm')
43 #define MADe_TAG MKTAG('M', 'A', 'D', 'e')
76 static inline void comp(
unsigned char *dst,
int dst_stride,
77 unsigned char *
src,
int src_stride,
int add)
82 dst[j*dst_stride + i] = av_clip_uint8(src[j*src_stride + i] + add);
87 int j,
int mv_x,
int mv_y,
int add)
93 comp(frame->
data[0] + (mb_y*16 + ((j&2)<<2))*frame->
linesize[0] + mb_x*16 + ((j&1)<<3),
110 int mb_x,
int mb_y,
int j)
114 frame->
data[0] + (mb_y*16 + ((j&2)<<2))*frame->
linesize[0] + mb_x*16 + ((j&1)<<3),
119 frame->
data[index] + (mb_y*8)*frame->
linesize[index] + mb_x*8,
131 block[0] = (128 +
get_sbits(&s->
gb, 8)) * quant_matrix[0];
145 }
else if (level != 0) {
148 level = (level*quant_matrix[j]) >> 4;
164 level = (level*quant_matrix[j]) >> 4;
168 level = (level*quant_matrix[j]) >> 4;
210 for (j=0; j<6; j++) {
211 if (mv_map & (1<<j)) {
235 void *
data,
int *got_frame,
239 int buf_size = avpkt->
size;
240 const uint8_t *buf_end = buf+buf_size;
258 AV_RL16(&buf[6]), 1000, 1<<30);
265 if (width < 16 || height < 16) {
270 if (avctx->
width != width || avctx->
height != height) {
272 if((width * height)/2048*7 > buf_end-buf)