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;
70 unsigned int planes = c->
planes;
71 unsigned char *planemap = c->
planemap;
84 dp = encoded + planes * (height << 1);
92 for (p = 0; p < planes; p++) {
94 lp = encoded + p * (height << 1);
97 for (row = 0; row <
height; row++) {
100 dlen =
av_be2ne16(*(
const unsigned short *)(lp + row * 2));
103 if (dp + 1 >= buf + buf_size)
105 if ((count = *dp++) <= 127) {
108 if (pixptr + count * px_inc > pixptr_end)
110 if (dp + count > buf + buf_size)
118 if (pixptr + count * px_inc > pixptr_end)