49 for (i = 0; i < 256; i++) {
63 while (he[last].len == 255 && last)
67 for (i = last; i >= 0; i--) {
68 codes[i] = code >> (32 - he[i].
len);
71 code += 0x80000000
u >> (he[i].
len - 1);
75 bits,
sizeof(*bits),
sizeof(*bits),
76 codes,
sizeof(*codes),
sizeof(*codes),
77 syms,
sizeof(*syms),
sizeof(*syms), 0);
98 for (slice = 0; slice < c->
slices; slice++) {
102 send = (height * (slice + 1) / c->
slices) & cmask;
103 dest = dst + sstart * stride;
106 for (j = sstart; j < send; j++) {
107 for (i = 0; i < width * step; i += step) {
124 for (slice = 0; slice < c->
slices; slice++) {
126 int slice_data_start, slice_data_end, slice_size;
129 send = (height * (slice + 1) / c->
slices) & cmask;
130 dest = dst + sstart * stride;
133 slice_data_start = slice ?
AV_RL32(src + slice * 4 - 4) : 0;
134 slice_data_end =
AV_RL32(src + slice * 4);
135 slice_size = slice_data_end - slice_data_start;
139 "yet a slice has a length of zero.\n");
148 (slice_data_end - slice_data_start + 3) >> 2);
152 for (j = sstart; j < send; j++) {
153 for (i = 0; i < width * step; i += step) {
156 "Slice decoding ran out of bits\n");
191 for (j = 0; j <
height; j++) {
192 for (i = 0; i < width * step; i += step) {
196 src[i] = r + g - 0x80;
197 src[i + 2] = b + g - 0x80;
209 int slice_start, slice_height;
210 const int cmask = ~rmode;
212 for (slice = 0; slice < slices; slice++) {
213 slice_start = ((slice *
height) / slices) & cmask;
214 slice_height = ((((slice + 1) * height) / slices) & cmask) -
217 bsrc = src + slice_start * stride;
222 for (i = step; i < width * step; i += step) {
227 if (slice_height == 1)
233 for (i = step; i < width * step; i += step) {
234 B = bsrc[i - stride];
241 for (j = 2; j < slice_height; j++) {
242 for (i = 0; i < width * step; i += step) {
243 B = bsrc[i - stride];
263 int slice_start, slice_height;
264 const int cmask = ~(rmode ? 3 : 1);
265 const int stride2 = stride << 1;
267 for (slice = 0; slice < slices; slice++) {
268 slice_start = ((slice *
height) / slices) & cmask;
269 slice_height = ((((slice + 1) * height) / slices) & cmask) -
273 bsrc = src + slice_start * stride;
278 for (i = step; i < width * step; i += step) {
282 for (i = 0; i < width * step; i += step) {
283 bsrc[stride + i] +=
A;
284 A = bsrc[stride + i];
287 if (slice_height == 1)
293 for (i = step; i < width * step; i += step) {
294 B = bsrc[i - stride2];
299 for (i = 0; i < width * step; i += step) {
300 B = bsrc[i - stride];
303 A = bsrc[stride + i];
307 for (j = 2; j < slice_height; j++) {
308 for (i = 0; i < width * step; i += step) {
309 B = bsrc[i - stride2];
314 for (i = 0; i < width * step; i += step) {
315 B = bsrc[i - stride];
318 A = bsrc[i + stride];
329 int buf_size = avpkt->
size;
333 int plane_size, max_slice_size = 0, slice_start,
slice_end, slice_size;
343 for (i = 0; i < c->
planes; i++) {
344 plane_start[i] = gb.
buffer;
352 for (j = 0; j < c->
slices; j++) {
353 slice_end = bytestream2_get_le32u(&gb);
354 slice_size = slice_end - slice_start;
355 if (slice_end < 0 || slice_size < 0 ||
361 max_slice_size =
FFMAX(max_slice_size, slice_size);
393 for (i = 0; i < c->
planes; i++) {
396 avctx->
height, plane_start[i],
417 for (i = 0; i < 3; i++) {
438 for (i = 0; i < 3; i++) {
479 "Insufficient extradata size %d, should be at least 16\n",
502 case MKTAG(
'U',
'L',
'R',
'G'):
506 case MKTAG(
'U',
'L',
'R',
'A'):
510 case MKTAG(
'U',
'L',
'Y',
'0'):
515 case MKTAG(
'U',
'L',
'Y',
'2'):
520 case MKTAG(
'U',
'L',
'H',
'0'):
525 case MKTAG(
'U',
'L',
'H',
'2'):