1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
|
As required by the libjpeg license, additions, deletions and changes to
the original files are listed here. Files noted as "Only in jpeg-8c"
were deleted; files noted as "Only in ioquake3/code/jpeg-8c" were added.
To regenerate this file, replace everything after "------" with the output
of this command: diff -ru jpeg-8c ioquake3/code/jpeg-8c
------
Only in jpeg-8c: aclocal.m4
Only in jpeg-8c: ansi2knr.1
Only in jpeg-8c: ansi2knr.c
Only in jpeg-8c: cderror.h
Only in jpeg-8c: cdjpeg.c
Only in jpeg-8c: cdjpeg.h
Only in jpeg-8c: change.log
Only in jpeg-8c: cjpeg.1
Only in jpeg-8c: cjpeg.c
Only in jpeg-8c: ckconfig.c
Only in jpeg-8c: coderules.txt
Only in jpeg-8c: config.guess
Only in jpeg-8c: config.sub
Only in jpeg-8c: configure
Only in jpeg-8c: configure.ac
Only in jpeg-8c: depcomp
Only in jpeg-8c: djpeg.1
Only in jpeg-8c: djpeg.c
Only in jpeg-8c: example.c
Only in jpeg-8c: filelist.txt
Only in jpeg-8c: install-sh
Only in jpeg-8c: install.txt
diff -ru jpeg-8c/jcmainct.c ioquake3/code/jpeg-8c/jcmainct.c
--- jpeg-8c/jcmainct.c 2003-10-19 18:55:34.000000000 +0100
+++ ioquake3/code/jpeg-8c/jcmainct.c 2011-11-25 11:24:52.000000000 +0000
@@ -68,32 +68,32 @@
METHODDEF(void)
start_pass_main (j_compress_ptr cinfo, J_BUF_MODE pass_mode)
{
- my_main_ptr main = (my_main_ptr) cinfo->main;
+ my_main_ptr main_ptr = (my_main_ptr) cinfo->main;
/* Do nothing in raw-data mode. */
if (cinfo->raw_data_in)
return;
- main->cur_iMCU_row = 0; /* initialize counters */
- main->rowgroup_ctr = 0;
- main->suspended = FALSE;
- main->pass_mode = pass_mode; /* save mode for use by process_data */
+ main_ptr->cur_iMCU_row = 0; /* initialize counters */
+ main_ptr->rowgroup_ctr = 0;
+ main_ptr->suspended = FALSE;
+ main_ptr->pass_mode = pass_mode; /* save mode for use by process_data */
switch (pass_mode) {
case JBUF_PASS_THRU:
#ifdef FULL_MAIN_BUFFER_SUPPORTED
- if (main->whole_image[0] != NULL)
+ if (main_ptr->whole_image[0] != NULL)
ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
#endif
- main->pub.process_data = process_data_simple_main;
+ main_ptr->pub.process_data = process_data_simple_main;
break;
#ifdef FULL_MAIN_BUFFER_SUPPORTED
case JBUF_SAVE_SOURCE:
case JBUF_CRANK_DEST:
case JBUF_SAVE_AND_PASS:
- if (main->whole_image[0] == NULL)
+ if (main_ptr->whole_image[0] == NULL)
ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
- main->pub.process_data = process_data_buffer_main;
+ main_ptr->pub.process_data = process_data_buffer_main;
break;
#endif
default:
@@ -114,46 +114,46 @@
JSAMPARRAY input_buf, JDIMENSION *in_row_ctr,
JDIMENSION in_rows_avail)
{
- my_main_ptr main = (my_main_ptr) cinfo->main;
+ my_main_ptr main_ptr = (my_main_ptr) cinfo->main;
- while (main->cur_iMCU_row < cinfo->total_iMCU_rows) {
+ while (main_ptr->cur_iMCU_row < cinfo->total_iMCU_rows) {
/* Read input data if we haven't filled the main buffer yet */
- if (main->rowgroup_ctr < (JDIMENSION) cinfo->min_DCT_v_scaled_size)
+ if (main_ptr->rowgroup_ctr < (JDIMENSION) cinfo->min_DCT_v_scaled_size)
(*cinfo->prep->pre_process_data) (cinfo,
input_buf, in_row_ctr, in_rows_avail,
- main->buffer, &main->rowgroup_ctr,
+ main_ptr->buffer, &main_ptr->rowgroup_ctr,
(JDIMENSION) cinfo->min_DCT_v_scaled_size);
/* If we don't have a full iMCU row buffered, return to application for
* more data. Note that preprocessor will always pad to fill the iMCU row
* at the bottom of the image.
*/
- if (main->rowgroup_ctr != (JDIMENSION) cinfo->min_DCT_v_scaled_size)
+ if (main_ptr->rowgroup_ctr != (JDIMENSION) cinfo->min_DCT_v_scaled_size)
return;
/* Send the completed row to the compressor */
- if (! (*cinfo->coef->compress_data) (cinfo, main->buffer)) {
+ if (! (*cinfo->coef->compress_data) (cinfo, main_ptr->buffer)) {
/* If compressor did not consume the whole row, then we must need to
* suspend processing and return to the application. In this situation
* we pretend we didn't yet consume the last input row; otherwise, if
* it happened to be the last row of the image, the application would
* think we were done.
*/
- if (! main->suspended) {
+ if (! main_ptr->suspended) {
(*in_row_ctr)--;
- main->suspended = TRUE;
+ main_ptr->suspended = TRUE;
}
return;
}
/* We did finish the row. Undo our little suspension hack if a previous
* call suspended; then mark the main buffer empty.
*/
- if (main->suspended) {
+ if (main_ptr->suspended) {
(*in_row_ctr)++;
- main->suspended = FALSE;
+ main_ptr->suspended = FALSE;
}
- main->rowgroup_ctr = 0;
- main->cur_iMCU_row++;
+ main_ptr->rowgroup_ctr = 0;
+ main_ptr->cur_iMCU_row++;
}
}
@@ -170,25 +170,25 @@
JSAMPARRAY input_buf, JDIMENSION *in_row_ctr,
JDIMENSION in_rows_avail)
{
- my_main_ptr main = (my_main_ptr) cinfo->main;
+ my_main_ptr main_ptr = (my_main_ptr) cinfo->main;
int ci;
jpeg_component_info *compptr;
- boolean writing = (main->pass_mode != JBUF_CRANK_DEST);
+ boolean writing = (main_ptr->pass_mode != JBUF_CRANK_DEST);
- while (main->cur_iMCU_row < cinfo->total_iMCU_rows) {
+ while (main_ptr->cur_iMCU_row < cinfo->total_iMCU_rows) {
/* Realign the virtual buffers if at the start of an iMCU row. */
- if (main->rowgroup_ctr == 0) {
+ if (main_ptr->rowgroup_ctr == 0) {
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
ci++, compptr++) {
- main->buffer[ci] = (*cinfo->mem->access_virt_sarray)
- ((j_common_ptr) cinfo, main->whole_image[ci],
- main->cur_iMCU_row * (compptr->v_samp_factor * DCTSIZE),
+ main_ptr->buffer[ci] = (*cinfo->mem->access_virt_sarray)
+ ((j_common_ptr) cinfo, main_ptr->whole_image[ci],
+ main_ptr->cur_iMCU_row * (compptr->v_samp_factor * DCTSIZE),
(JDIMENSION) (compptr->v_samp_factor * DCTSIZE), writing);
}
/* In a read pass, pretend we just read some source data. */
if (! writing) {
*in_row_ctr += cinfo->max_v_samp_factor * DCTSIZE;
- main->rowgroup_ctr = DCTSIZE;
+ main_ptr->rowgroup_ctr = DCTSIZE;
}
}
@@ -197,40 +197,40 @@
if (writing) {
(*cinfo->prep->pre_process_data) (cinfo,
input_buf, in_row_ctr, in_rows_avail,
- main->buffer, &main->rowgroup_ctr,
+ main_ptr->buffer, &main_ptr->rowgroup_ctr,
(JDIMENSION) DCTSIZE);
/* Return to application if we need more data to fill the iMCU row. */
- if (main->rowgroup_ctr < DCTSIZE)
+ if (main_ptr->rowgroup_ctr < DCTSIZE)
return;
}
/* Emit data, unless this is a sink-only pass. */
- if (main->pass_mode != JBUF_SAVE_SOURCE) {
- if (! (*cinfo->coef->compress_data) (cinfo, main->buffer)) {
+ if (main_ptr->pass_mode != JBUF_SAVE_SOURCE) {
+ if (! (*cinfo->coef->compress_data) (cinfo, main_ptr->buffer)) {
/* If compressor did not consume the whole row, then we must need to
* suspend processing and return to the application. In this situation
* we pretend we didn't yet consume the last input row; otherwise, if
* it happened to be the last row of the image, the application would
* think we were done.
*/
- if (! main->suspended) {
+ if (! main_ptr->suspended) {
(*in_row_ctr)--;
- main->suspended = TRUE;
+ main_ptr->suspended = TRUE;
}
return;
}
/* We did finish the row. Undo our little suspension hack if a previous
* call suspended; then mark the main buffer empty.
*/
- if (main->suspended) {
+ if (main_ptr->suspended) {
(*in_row_ctr)++;
- main->suspended = FALSE;
+ main_ptr->suspended = FALSE;
}
}
/* If get here, we are done with this iMCU row. Mark buffer empty. */
- main->rowgroup_ctr = 0;
- main->cur_iMCU_row++;
+ main_ptr->rowgroup_ctr = 0;
+ main_ptr->cur_iMCU_row++;
}
}
@@ -244,15 +244,15 @@
GLOBAL(void)
jinit_c_main_controller (j_compress_ptr cinfo, boolean need_full_buffer)
{
- my_main_ptr main;
+ my_main_ptr main_ptr;
int ci;
jpeg_component_info *compptr;
- main = (my_main_ptr)
+ main_ptr = (my_main_ptr)
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
SIZEOF(my_main_controller));
- cinfo->main = (struct jpeg_c_main_controller *) main;
- main->pub.start_pass = start_pass_main;
+ cinfo->main = (struct jpeg_c_main_controller *) main_ptr;
+ main_ptr->pub.start_pass = start_pass_main;
/* We don't need to create a buffer in raw-data mode. */
if (cinfo->raw_data_in)
@@ -267,7 +267,7 @@
/* Note we pad the bottom to a multiple of the iMCU height */
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
ci++, compptr++) {
- main->whole_image[ci] = (*cinfo->mem->request_virt_sarray)
+ main_ptr->whole_image[ci] = (*cinfo->mem->request_virt_sarray)
((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE,
compptr->width_in_blocks * compptr->DCT_h_scaled_size,
(JDIMENSION) jround_up((long) compptr->height_in_blocks,
@@ -279,12 +279,12 @@
#endif
} else {
#ifdef FULL_MAIN_BUFFER_SUPPORTED
- main->whole_image[0] = NULL; /* flag for no virtual arrays */
+ main_ptr->whole_image[0] = NULL; /* flag for no virtual arrays */
#endif
/* Allocate a strip buffer for each component */
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
ci++, compptr++) {
- main->buffer[ci] = (*cinfo->mem->alloc_sarray)
+ main_ptr->buffer[ci] = (*cinfo->mem->alloc_sarray)
((j_common_ptr) cinfo, JPOOL_IMAGE,
compptr->width_in_blocks * compptr->DCT_h_scaled_size,
(JDIMENSION) (compptr->v_samp_factor * compptr->DCT_v_scaled_size));
Only in jpeg-8c: jconfig.bcc
Only in jpeg-8c: jconfig.cfg
Only in jpeg-8c: jconfig.dj
Only in ioquake3/code/jpeg-8c: jconfig.h
Only in jpeg-8c: jconfig.mac
Only in jpeg-8c: jconfig.manx
Only in jpeg-8c: jconfig.mc6
Only in jpeg-8c: jconfig.sas
Only in jpeg-8c: jconfig.st
Only in jpeg-8c: jconfig.txt
Only in jpeg-8c: jconfig.vc
Only in jpeg-8c: jconfig.vms
Only in jpeg-8c: jconfig.wat
diff -ru jpeg-8c/jdmainct.c ioquake3/code/jpeg-8c/jdmainct.c
--- jpeg-8c/jdmainct.c 2002-02-24 19:07:28.000000000 +0000
+++ ioquake3/code/jpeg-8c/jdmainct.c 2011-11-25 11:24:52.000000000 +0000
@@ -159,7 +159,7 @@
* This is done only once, not once per pass.
*/
{
- my_main_ptr main = (my_main_ptr) cinfo->main;
+ my_main_ptr main_ptr = (my_main_ptr) cinfo->main;
int ci, rgroup;
int M = cinfo->min_DCT_v_scaled_size;
jpeg_component_info *compptr;
@@ -168,10 +168,10 @@
/* Get top-level space for component array pointers.
* We alloc both arrays with one call to save a few cycles.
*/
- main->xbuffer[0] = (JSAMPIMAGE)
+ main_ptr->xbuffer[0] = (JSAMPIMAGE)
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
cinfo->num_components * 2 * SIZEOF(JSAMPARRAY));
- main->xbuffer[1] = main->xbuffer[0] + cinfo->num_components;
+ main_ptr->xbuffer[1] = main_ptr->xbuffer[0] + cinfo->num_components;
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
ci++, compptr++) {
@@ -184,9 +184,9 @@
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
2 * (rgroup * (M + 4)) * SIZEOF(JSAMPROW));
xbuf += rgroup; /* want one row group at negative offsets */
- main->xbuffer[0][ci] = xbuf;
+ main_ptr->xbuffer[0][ci] = xbuf;
xbuf += rgroup * (M + 4);
- main->xbuffer[1][ci] = xbuf;
+ main_ptr->xbuffer[1][ci] = xbuf;
}
}
@@ -194,13 +194,13 @@
LOCAL(void)
make_funny_pointers (j_decompress_ptr cinfo)
/* Create the funny pointer lists discussed in the comments above.
- * The actual workspace is already allocated (in main->buffer),
+ * The actual workspace is already allocated (in main_ptr->buffer),
* and the space for the pointer lists is allocated too.
* This routine just fills in the curiously ordered lists.
* This will be repeated at the beginning of each pass.
*/
{
- my_main_ptr main = (my_main_ptr) cinfo->main;
+ my_main_ptr main_ptr = (my_main_ptr) cinfo->main;
int ci, i, rgroup;
int M = cinfo->min_DCT_v_scaled_size;
jpeg_component_info *compptr;
@@ -210,10 +210,10 @@
ci++, compptr++) {
rgroup = (compptr->v_samp_factor * compptr->DCT_v_scaled_size) /
cinfo->min_DCT_v_scaled_size; /* height of a row group of component */
- xbuf0 = main->xbuffer[0][ci];
- xbuf1 = main->xbuffer[1][ci];
+ xbuf0 = main_ptr->xbuffer[0][ci];
+ xbuf1 = main_ptr->xbuffer[1][ci];
/* First copy the workspace pointers as-is */
- buf = main->buffer[ci];
+ buf = main_ptr->buffer[ci];
for (i = 0; i < rgroup * (M + 2); i++) {
xbuf0[i] = xbuf1[i] = buf[i];
}
@@ -240,7 +240,7 @@
* This changes the pointer list state from top-of-image to the normal state.
*/
{
- my_main_ptr main = (my_main_ptr) cinfo->main;
+ my_main_ptr main_ptr = (my_main_ptr) cinfo->main;
int ci, i, rgroup;
int M = cinfo->min_DCT_v_scaled_size;
jpeg_component_info *compptr;
@@ -250,8 +250,8 @@
ci++, compptr++) {
rgroup = (compptr->v_samp_factor * compptr->DCT_v_scaled_size) /
cinfo->min_DCT_v_scaled_size; /* height of a row group of component */
- xbuf0 = main->xbuffer[0][ci];
- xbuf1 = main->xbuffer[1][ci];
+ xbuf0 = main_ptr->xbuffer[0][ci];
+ xbuf1 = main_ptr->xbuffer[1][ci];
for (i = 0; i < rgroup; i++) {
xbuf0[i - rgroup] = xbuf0[rgroup*(M+1) + i];
xbuf1[i - rgroup] = xbuf1[rgroup*(M+1) + i];
@@ -269,7 +269,7 @@
* Also sets rowgroups_avail to indicate number of nondummy row groups in row.
*/
{
- my_main_ptr main = (my_main_ptr) cinfo->main;
+ my_main_ptr main_ptr = (my_main_ptr) cinfo->main;
int ci, i, rgroup, iMCUheight, rows_left;
jpeg_component_info *compptr;
JSAMPARRAY xbuf;
@@ -286,12 +286,12 @@
* so we need only do it once.
*/
if (ci == 0) {
- main->rowgroups_avail = (JDIMENSION) ((rows_left-1) / rgroup + 1);
+ main_ptr->rowgroups_avail = (JDIMENSION) ((rows_left-1) / rgroup + 1);
}
/* Duplicate the last real sample row rgroup*2 times; this pads out the
* last partial rowgroup and ensures at least one full rowgroup of context.
*/
- xbuf = main->xbuffer[main->whichptr][ci];
+ xbuf = main_ptr->xbuffer[main_ptr->whichptr][ci];
for (i = 0; i < rgroup * 2; i++) {
xbuf[rows_left + i] = xbuf[rows_left-1];
}
@@ -306,27 +306,27 @@
METHODDEF(void)
start_pass_main (j_decompress_ptr cinfo, J_BUF_MODE pass_mode)
{
- my_main_ptr main = (my_main_ptr) cinfo->main;
+ my_main_ptr main_ptr = (my_main_ptr) cinfo->main;
switch (pass_mode) {
case JBUF_PASS_THRU:
if (cinfo->upsample->need_context_rows) {
- main->pub.process_data = process_data_context_main;
+ main_ptr->pub.process_data = process_data_context_main;
make_funny_pointers(cinfo); /* Create the xbuffer[] lists */
- main->whichptr = 0; /* Read first iMCU row into xbuffer[0] */
- main->context_state = CTX_PREPARE_FOR_IMCU;
- main->iMCU_row_ctr = 0;
+ main_ptr->whichptr = 0; /* Read first iMCU row into xbuffer[0] */
+ main_ptr->context_state = CTX_PREPARE_FOR_IMCU;
+ main_ptr->iMCU_row_ctr = 0;
} else {
/* Simple case with no context needed */
- main->pub.process_data = process_data_simple_main;
+ main_ptr->pub.process_data = process_data_simple_main;
}
- main->buffer_full = FALSE; /* Mark buffer empty */
- main->rowgroup_ctr = 0;
+ main_ptr->buffer_full = FALSE; /* Mark buffer empty */
+ main_ptr->rowgroup_ctr = 0;
break;
#ifdef QUANT_2PASS_SUPPORTED
case JBUF_CRANK_DEST:
/* For last pass of 2-pass quantization, just crank the postprocessor */
- main->pub.process_data = process_data_crank_post;
+ main_ptr->pub.process_data = process_data_crank_post;
break;
#endif
default:
@@ -346,14 +346,14 @@
JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
JDIMENSION out_rows_avail)
{
- my_main_ptr main = (my_main_ptr) cinfo->main;
+ my_main_ptr main_ptr = (my_main_ptr) cinfo->main;
JDIMENSION rowgroups_avail;
/* Read input data if we haven't filled the main buffer yet */
- if (! main->buffer_full) {
- if (! (*cinfo->coef->decompress_data) (cinfo, main->buffer))
+ if (! main_ptr->buffer_full) {
+ if (! (*cinfo->coef->decompress_data) (cinfo, main_ptr->buffer))
return; /* suspension forced, can do nothing more */
- main->buffer_full = TRUE; /* OK, we have an iMCU row to work with */
+ main_ptr->buffer_full = TRUE; /* OK, we have an iMCU row to work with */
}
/* There are always min_DCT_scaled_size row groups in an iMCU row. */
@@ -364,14 +364,14 @@
*/
/* Feed the postprocessor */
- (*cinfo->post->post_process_data) (cinfo, main->buffer,
- &main->rowgroup_ctr, rowgroups_avail,
+ (*cinfo->post->post_process_data) (cinfo, main_ptr->buffer,
+ &main_ptr->rowgroup_ctr, rowgroups_avail,
output_buf, out_row_ctr, out_rows_avail);
/* Has postprocessor consumed all the data yet? If so, mark buffer empty */
- if (main->rowgroup_ctr >= rowgroups_avail) {
- main->buffer_full = FALSE;
- main->rowgroup_ctr = 0;
+ if (main_ptr->rowgroup_ctr >= rowgroups_avail) {
+ main_ptr->buffer_full = FALSE;
+ main_ptr->rowgroup_ctr = 0;
}
}
@@ -386,15 +386,15 @@
JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
JDIMENSION out_rows_avail)
{
- my_main_ptr main = (my_main_ptr) cinfo->main;
+ my_main_ptr main_ptr = (my_main_ptr) cinfo->main;
/* Read input data if we haven't filled the main buffer yet */
- if (! main->buffer_full) {
+ if (! main_ptr->buffer_full) {
if (! (*cinfo->coef->decompress_data) (cinfo,
- main->xbuffer[main->whichptr]))
+ main_ptr->xbuffer[main_ptr->whichptr]))
return; /* suspension forced, can do nothing more */
- main->buffer_full = TRUE; /* OK, we have an iMCU row to work with */
- main->iMCU_row_ctr++; /* count rows received */
+ main_ptr->buffer_full = TRUE; /* OK, we have an iMCU row to work with */
+ main_ptr->iMCU_row_ctr++; /* count rows received */
}
/* Postprocessor typically will not swallow all the input data it is handed
@@ -402,47 +402,47 @@
* to exit and restart. This switch lets us keep track of how far we got.
* Note that each case falls through to the next on successful completion.
*/
- switch (main->context_state) {
+ switch (main_ptr->context_state) {
case CTX_POSTPONED_ROW:
/* Call postprocessor using previously set pointers for postponed row */
- (*cinfo->post->post_process_data) (cinfo, main->xbuffer[main->whichptr],
- &main->rowgroup_ctr, main->rowgroups_avail,
+ (*cinfo->post->post_process_data) (cinfo, main_ptr->xbuffer[main_ptr->whichptr],
+ &main_ptr->rowgroup_ctr, main_ptr->rowgroups_avail,
output_buf, out_row_ctr, out_rows_avail);
- if (main->rowgroup_ctr < main->rowgroups_avail)
+ if (main_ptr->rowgroup_ctr < main_ptr->rowgroups_avail)
return; /* Need to suspend */
- main->context_state = CTX_PREPARE_FOR_IMCU;
+ main_ptr->context_state = CTX_PREPARE_FOR_IMCU;
if (*out_row_ctr >= out_rows_avail)
return; /* Postprocessor exactly filled output buf */
/*FALLTHROUGH*/
case CTX_PREPARE_FOR_IMCU:
/* Prepare to process first M-1 row groups of this iMCU row */
- main->rowgroup_ctr = 0;
- main->rowgroups_avail = (JDIMENSION) (cinfo->min_DCT_v_scaled_size - 1);
+ main_ptr->rowgroup_ctr = 0;
+ main_ptr->rowgroups_avail = (JDIMENSION) (cinfo->min_DCT_v_scaled_size - 1);
/* Check for bottom of image: if so, tweak pointers to "duplicate"
* the last sample row, and adjust rowgroups_avail to ignore padding rows.
*/
- if (main->iMCU_row_ctr == cinfo->total_iMCU_rows)
+ if (main_ptr->iMCU_row_ctr == cinfo->total_iMCU_rows)
set_bottom_pointers(cinfo);
- main->context_state = CTX_PROCESS_IMCU;
+ main_ptr->context_state = CTX_PROCESS_IMCU;
/*FALLTHROUGH*/
case CTX_PROCESS_IMCU:
/* Call postprocessor using previously set pointers */
- (*cinfo->post->post_process_data) (cinfo, main->xbuffer[main->whichptr],
- &main->rowgroup_ctr, main->rowgroups_avail,
+ (*cinfo->post->post_process_data) (cinfo, main_ptr->xbuffer[main_ptr->whichptr],
+ &main_ptr->rowgroup_ctr, main_ptr->rowgroups_avail,
output_buf, out_row_ctr, out_rows_avail);
- if (main->rowgroup_ctr < main->rowgroups_avail)
+ if (main_ptr->rowgroup_ctr < main_ptr->rowgroups_avail)
return; /* Need to suspend */
/* After the first iMCU, change wraparound pointers to normal state */
- if (main->iMCU_row_ctr == 1)
+ if (main_ptr->iMCU_row_ctr == 1)
set_wraparound_pointers(cinfo);
/* Prepare to load new iMCU row using other xbuffer list */
- main->whichptr ^= 1; /* 0=>1 or 1=>0 */
- main->buffer_full = FALSE;
+ main_ptr->whichptr ^= 1; /* 0=>1 or 1=>0 */
+ main_ptr->buffer_full = FALSE;
/* Still need to process last row group of this iMCU row, */
/* which is saved at index M+1 of the other xbuffer */
- main->rowgroup_ctr = (JDIMENSION) (cinfo->min_DCT_v_scaled_size + 1);
- main->rowgroups_avail = (JDIMENSION) (cinfo->min_DCT_v_scaled_size + 2);
- main->context_state = CTX_POSTPONED_ROW;
+ main_ptr->rowgroup_ctr = (JDIMENSION) (cinfo->min_DCT_v_scaled_size + 1);
+ main_ptr->rowgroups_avail = (JDIMENSION) (cinfo->min_DCT_v_scaled_size + 2);
+ main_ptr->context_state = CTX_POSTPONED_ROW;
}
}
@@ -475,15 +475,15 @@
GLOBAL(void)
jinit_d_main_controller (j_decompress_ptr cinfo, boolean need_full_buffer)
{
- my_main_ptr main;
+ my_main_ptr main_ptr;
int ci, rgroup, ngroups;
jpeg_component_info *compptr;
- main = (my_main_ptr)
+ main_ptr = (my_main_ptr)
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
SIZEOF(my_main_controller));
- cinfo->main = (struct jpeg_d_main_controller *) main;
- main->pub.start_pass = start_pass_main;
+ cinfo->main = (struct jpeg_d_main_controller *) main_ptr;
+ main_ptr->pub.start_pass = start_pass_main;
if (need_full_buffer) /* shouldn't happen */
ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
@@ -504,7 +504,7 @@
ci++, compptr++) {
rgroup = (compptr->v_samp_factor * compptr->DCT_v_scaled_size) /
cinfo->min_DCT_v_scaled_size; /* height of a row group of component */
- main->buffer[ci] = (*cinfo->mem->alloc_sarray)
+ main_ptr->buffer[ci] = (*cinfo->mem->alloc_sarray)
((j_common_ptr) cinfo, JPOOL_IMAGE,
compptr->width_in_blocks * compptr->DCT_h_scaled_size,
(JDIMENSION) (rgroup * ngroups));
diff -ru jpeg-8c/jerror.c ioquake3/code/jpeg-8c/jerror.c
--- jpeg-8c/jerror.c 1998-02-21 19:03:16.000000000 +0000
+++ ioquake3/code/jpeg-8c/jerror.c 2011-11-25 11:24:52.000000000 +0000
@@ -24,6 +24,8 @@
#include "jversion.h"
#include "jerror.h"
+#include <stdlib.h>
+
#ifdef USE_WINDOWS_MESSAGEBOX
#include <windows.h>
#endif
Only in jpeg-8c: jmemansi.c
Only in jpeg-8c: jmemdosa.asm
Only in jpeg-8c: jmemdos.c
Only in jpeg-8c: jmemmac.c
Only in jpeg-8c: jmemname.c
Only in jpeg-8c: jpegtran.1
Only in jpeg-8c: jpegtran.c
Only in jpeg-8c: libjpeg.map
Only in jpeg-8c: libjpeg.txt
Only in jpeg-8c: ltmain.sh
Only in jpeg-8c: makcjpeg.st
Only in jpeg-8c: makdjpeg.st
Only in jpeg-8c: makeadsw.vc6
Only in jpeg-8c: makeasln.v10
Only in jpeg-8c: makecdep.vc6
Only in jpeg-8c: makecdsp.vc6
Only in jpeg-8c: makecfil.v10
Only in jpeg-8c: makecmak.vc6
Only in jpeg-8c: makecvcx.v10
Only in jpeg-8c: makeddep.vc6
Only in jpeg-8c: makeddsp.vc6
Only in jpeg-8c: makedfil.v10
Only in jpeg-8c: makedmak.vc6
Only in jpeg-8c: makedvcx.v10
Only in jpeg-8c: Makefile.am
Only in jpeg-8c: makefile.ansi
Only in jpeg-8c: makefile.bcc
Only in jpeg-8c: makefile.dj
Only in jpeg-8c: Makefile.in
Only in jpeg-8c: makefile.manx
Only in jpeg-8c: makefile.mc6
Only in jpeg-8c: makefile.mms
Only in jpeg-8c: makefile.sas
Only in jpeg-8c: makefile.unix
Only in jpeg-8c: makefile.vc
Only in jpeg-8c: makefile.vms
Only in jpeg-8c: makefile.wat
Only in jpeg-8c: makejdep.vc6
Only in jpeg-8c: makejdsp.vc6
Only in jpeg-8c: makejdsw.vc6
Only in jpeg-8c: makejfil.v10
Only in jpeg-8c: makejmak.vc6
Only in jpeg-8c: makejsln.v10
Only in jpeg-8c: makejvcx.v10
Only in jpeg-8c: makeproj.mac
Only in jpeg-8c: makerdep.vc6
Only in jpeg-8c: makerdsp.vc6
Only in jpeg-8c: makerfil.v10
Only in jpeg-8c: makermak.vc6
Only in jpeg-8c: makervcx.v10
Only in jpeg-8c: maketdep.vc6
Only in jpeg-8c: maketdsp.vc6
Only in jpeg-8c: maketfil.v10
Only in jpeg-8c: maketmak.vc6
Only in jpeg-8c: maketvcx.v10
Only in jpeg-8c: makewdep.vc6
Only in jpeg-8c: makewdsp.vc6
Only in jpeg-8c: makewfil.v10
Only in jpeg-8c: makewmak.vc6
Only in jpeg-8c: makewvcx.v10
Only in jpeg-8c: makljpeg.st
Only in jpeg-8c: maktjpeg.st
Only in jpeg-8c: makvms.opt
Only in jpeg-8c: missing
Only in jpeg-8c: rdbmp.c
Only in jpeg-8c: rdcolmap.c
Only in jpeg-8c: rdgif.c
Only in jpeg-8c: rdjpgcom.1
Only in jpeg-8c: rdjpgcom.c
Only in jpeg-8c: rdppm.c
Only in jpeg-8c: rdrle.c
Only in jpeg-8c: rdswitch.c
Only in jpeg-8c: rdtarga.c
Only in jpeg-8c: structure.txt
Only in jpeg-8c: testimg.bmp
Only in jpeg-8c: testimg.jpg
Only in jpeg-8c: testimgp.jpg
Only in jpeg-8c: testimg.ppm
Only in jpeg-8c: testorig.jpg
Only in jpeg-8c: testprog.jpg
Only in jpeg-8c: transupp.c
Only in jpeg-8c: transupp.h
Only in jpeg-8c: usage.txt
Only in jpeg-8c: wizard.txt
Only in jpeg-8c: wrbmp.c
Only in jpeg-8c: wrgif.c
Only in jpeg-8c: wrjpgcom.1
Only in jpeg-8c: wrjpgcom.c
Only in jpeg-8c: wrppm.c
Only in jpeg-8c: wrrle.c
Only in jpeg-8c: wrtarga.c
|