48 int transparent, interlaced = 1, skip, opaque_length, i, j, k;
54 while (extradata_size >= 24) {
55 uint32_t atom_size =
AV_RB32(extradata);
56 if (!memcmp(&extradata[4],
"APRGAPRG0001", 12)) {
57 interlaced = extradata[19] != 1;
60 if (atom_size && atom_size <= extradata_size) {
61 extradata += atom_size;
62 extradata_size -= atom_size;
67 if (avctx->
height == 486) {
72 opaque_length = 2 * avctx->
width * (avctx->
height + skip) + 4 * interlaced;
73 if (avpkt->
size < opaque_length) {
78 avpkt->
size >= opaque_length * 2 + 4;
79 srca = src + opaque_length + 5;
92 src += avctx->
width * skip;
93 srca += avctx->
width * skip;
96 for (i = 0; i < interlaced + 1; i++) {
97 src += avctx->
width * skip;
98 srca += avctx->
width * skip;
99 if (interlaced && avctx->
height == 486) {
111 for (j = 0; j < avctx->
height >> interlaced; j++) {
112 for (k = 0; k < avctx->
width >> 1; k++) {
115 a[2 * k ] = 0xFF - (transparent ? *srca++ : 0);
118 y[2 * k + 1] = *src++;
119 a[2 * k + 1] = 0xFF - (transparent ? *srca++ : 0);
123 y += (interlaced + 1) * pic->
linesize[0];
124 u += (interlaced + 1) * pic->
linesize[1];
125 v += (interlaced + 1) * pic->
linesize[2];
126 a += (interlaced + 1) * pic->
linesize[3];