61 int buf_size = avpkt->
size;
63 const unsigned char *encoded = buf;
64 unsigned char *pixptr, *pixptr_end;
66 unsigned int dlen, p, row;
67 const unsigned char *lp, *dp;
69 unsigned int planes = c->
planes;
70 unsigned char *planemap = c->
planemap;
83 dp = encoded + planes * (height << 1);
85 for (p = 0; p < planes; p++) {
87 lp = encoded + p * (height << 1);
90 for (row = 0; row <
height; row++) {
93 if(lp - encoded + row*2 + 1 >= buf_size)
95 dlen =
av_be2ne16(*(
const unsigned short *)(lp + row * 2));
98 if (dp + 1 >= buf + buf_size)
100 if ((count = *dp++) <= 127) {
103 if (pixptr + count * planes > pixptr_end)
105 if (dp + count > buf + buf_size)
113 if (pixptr + count * planes > pixptr_end)