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;
84 dp = encoded + planes * (height << 1);
86 for (p = 0; p < planes; p++) {
88 lp = encoded + p * (height << 1);
91 for (row = 0; row <
height; row++) {
94 if(lp - encoded + row*2 + 1 >= buf_size)
96 dlen =
av_be2ne16(*(
const unsigned short *)(lp + row * 2));
99 if (dp + 1 >= buf + buf_size)
101 if ((count = *dp++) <= 127) {
104 if (pixptr + count * planes > pixptr_end)
106 if (dp + count > buf + buf_size)
114 if (pixptr + count * planes > pixptr_end)