48 for (i = 0; i < 256; i++) {
62 while (he[last].len == 255 && last)
66 for (i = last; i >= 0; i--) {
67 codes[i] = code >> (32 - he[i].
len);
70 code += 0x80000000
u >> (he[i].
len - 1);
74 bits,
sizeof(*bits),
sizeof(*bits),
75 codes,
sizeof(*codes),
sizeof(*codes),
76 syms,
sizeof(*syms),
sizeof(*syms), 0);
97 for (slice = 0; slice < c->
slices; slice++) {
101 send = (height * (slice + 1) / c->
slices) & cmask;
102 dest = dst + sstart * stride;
105 for (j = sstart; j < send; j++) {
106 for (i = 0; i < width * step; i += step) {
123 for (slice = 0; slice < c->
slices; slice++) {
125 int slice_data_start, slice_data_end, slice_size;
128 send = (height * (slice + 1) / c->
slices) & cmask;
129 dest = dst + sstart * stride;
132 slice_data_start = slice ?
AV_RL32(src + slice * 4 - 4) : 0;
133 slice_data_end =
AV_RL32(src + slice * 4);
134 slice_size = slice_data_end - slice_data_start;
138 "yet a slice has a length of zero.\n");
146 (slice_data_end - slice_data_start + 3) >> 2);
150 for (j = sstart; j < send; j++) {
151 for (i = 0; i < width * step; i += step) {
154 "Slice decoding ran out of bits\n");
189 for (j = 0; j <
height; j++) {
190 for (i = 0; i < width * step; i += step) {
194 src[i] = r + g - 0x80;
195 src[i + 2] = b + g - 0x80;
207 int slice_start, slice_height;
208 const int cmask = ~rmode;
210 for (slice = 0; slice < slices; slice++) {
211 slice_start = ((slice *
height) / slices) & cmask;
212 slice_height = ((((slice + 1) * height) / slices) & cmask) -
215 bsrc = src + slice_start * stride;
220 for (i = step; i < width * step; i += step) {
225 if (slice_height == 1)
231 for (i = step; i < width * step; i += step) {
232 B = bsrc[i - stride];
239 for (j = 2; j < slice_height; j++) {
240 for (i = 0; i < width * step; i += step) {
241 B = bsrc[i - stride];
261 int slice_start, slice_height;
262 const int cmask = ~(rmode ? 3 : 1);
263 const int stride2 = stride << 1;
265 for (slice = 0; slice < slices; slice++) {
266 slice_start = ((slice *
height) / slices) & cmask;
267 slice_height = ((((slice + 1) * height) / slices) & cmask) -
271 bsrc = src + slice_start * stride;
276 for (i = step; i < width * step; i += step) {
280 for (i = 0; i < width * step; i += step) {
281 bsrc[stride + i] +=
A;
282 A = bsrc[stride + i];
285 if (slice_height == 1)
291 for (i = step; i < width * step; i += step) {
292 B = bsrc[i - stride2];
297 for (i = 0; i < width * step; i += step) {
298 B = bsrc[i - stride];
301 A = bsrc[stride + i];
305 for (j = 2; j < slice_height; j++) {
306 for (i = 0; i < width * step; i += step) {
307 B = bsrc[i - stride2];
312 for (i = 0; i < width * step; i += step) {
313 B = bsrc[i - stride];
316 A = bsrc[i + stride];
327 int buf_size = avpkt->
size;
331 int plane_size, max_slice_size = 0, slice_start,
slice_end, slice_size;
341 for (i = 0; i < c->
planes; i++) {
342 plane_start[i] = gb.
buffer;
350 for (j = 0; j < c->
slices; j++) {
351 slice_end = bytestream2_get_le32u(&gb);
352 slice_size = slice_end - slice_start;
353 if (slice_end < 0 || slice_size < 0 ||
359 max_slice_size =
FFMAX(max_slice_size, slice_size);
390 for (i = 0; i < c->
planes; i++) {
393 avctx->
height, plane_start[i],
414 for (i = 0; i < 3; i++) {
435 for (i = 0; i < 3; i++) {
476 "Insufficient extradata size %d, should be at least 16\n",
499 case MKTAG(
'U',
'L',
'R',
'G'):
503 case MKTAG(
'U',
'L',
'R',
'A'):
507 case MKTAG(
'U',
'L',
'Y',
'0'):
512 case MKTAG(
'U',
'L',
'Y',
'2'):
517 case MKTAG(
'U',
'L',
'H',
'0'):
522 case MKTAG(
'U',
'L',
'H',
'2'):